mirror of https://github.com/openssl/openssl
apps/x509: Fix -CAfile option being neglected with -new or -in
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/18373)
This commit is contained in:
parent
f95fec2938
commit
10c7887330
|
@ -730,7 +730,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;
|
||||
|
|
Loading…
Reference in New Issue