diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-05-20 06:23:54 +0200 |
---|---|---|
committer | Hugo Landau <hlandau@openssl.org> | 2022-07-14 07:26:23 +0100 |
commit | fcdd41fea3ed56660ce03cec7f07217c99d90d31 (patch) | |
tree | d146bd262287539390a2006fbc2fd3f027f543ac /apps/x509.c | |
parent | 56f7697c70e539b18af0f17282caf58c76576d9e (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)
(cherry picked from commit 10c7887330bb6ca136cd16fe081639f4462a072e)
Diffstat (limited to 'apps/x509.c')
-rw-r--r-- | apps/x509.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/x509.c b/apps/x509.c index 2b9a0b6cb4..dca33f1e6a 100644 --- a/apps/x509.c +++ b/apps/x509.c @@ -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; |