summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2022-05-20 06:23:54 +0200
committerHugo Landau <hlandau@openssl.org>2022-07-14 07:23:58 +0100
commit10c7887330bb6ca136cd16fe081639f4462a072e (patch)
tree06fbb2ec741662e30aa44432a423f3b4edecacba /apps
parentf95fec293800b47e5eff0f08daefcf1397a24423 (diff)
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)
Diffstat (limited to 'apps')
-rw-r--r--apps/x509.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 2855873604..182730be96 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -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;