Skip to content

Commit

Permalink
apps/x509: Fix -CAfile option being neglected with -new or -in
Browse files Browse the repository at this point in the history
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #18373)

(cherry picked from commit 10c7887)
  • Loading branch information
DDvO authored and hlandau committed Jul 14, 2022
1 parent 56f7697 commit fcdd41f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/x509.c
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ int x509_main(int argc, char **argv)
}
if ((x = X509_new_ex(app_get0_libctx(), app_get0_propq())) == NULL)
goto end;
if (sno == NULL) {
if (CAfile == NULL && sno == NULL) {
sno = ASN1_INTEGER_new();
if (sno == NULL || !rand_serial(NULL, sno))
goto end;
Expand Down

0 comments on commit fcdd41f

Please sign in to comment.