summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDmitry Belyavskiy <beldmit@gmail.com>2021-08-02 17:00:51 +0200
committerDmitry Belyavskiy <beldmit@gmail.com>2021-08-03 22:04:11 +0200
commit6b38d7dc1bccc708279ca5091ebc28cd4bdf225d (patch)
tree0f1eb24e8948f7aaa0cbf38cdfea0e774341ac70 /apps
parentab98861e919b8f8f7fee3f2d44ef3b4b05908a25 (diff)
If we have passed the private key, don't copy it implicitly
Fixes #16197 Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com> Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16199)
Diffstat (limited to 'apps')
-rw-r--r--apps/req.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/req.c b/apps/req.c
index eb286f8a8e..5524092f2c 100644
--- a/apps/req.c
+++ b/apps/req.c
@@ -686,7 +686,7 @@ int req_main(int argc, char **argv)
EVP_PKEY_CTX_free(genctx);
genctx = NULL;
}
- if (keyout == NULL) {
+ if (keyout == NULL && keyfile == NULL) {
keyout = NCONF_get_string(req_conf, section, KEYFILE);
if (keyout == NULL)
ERR_clear_error();