diff options
author | Jon Spillett <jon.spillett@oracle.com> | 2021-01-13 14:10:51 +1000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-01-15 17:24:41 +0100 |
commit | 2c04b34140be8833dae0e4debcb6ebf5fd0f287c (patch) | |
tree | 17019aebe6688c917b52ac6bdeec596ab241d8b3 /crypto/dh/dh_backend.c | |
parent | 39f3427dc1cd8cf72cf4b3c8c26256874a067bfd (diff) |
Allow EVP_PKEY private key objects to be created without a public component
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13855)
Diffstat (limited to 'crypto/dh/dh_backend.c')
-rw-r--r-- | crypto/dh/dh_backend.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/crypto/dh/dh_backend.c b/crypto/dh/dh_backend.c index 660bb4845a..6e545763dc 100644 --- a/crypto/dh/dh_backend.c +++ b/crypto/dh/dh_backend.c @@ -69,15 +69,6 @@ int dh_key_fromdata(DH *dh, const OSSL_PARAM params[]) param_priv_key = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_PRIV_KEY); param_pub_key = OSSL_PARAM_locate_const(params, OSSL_PKEY_PARAM_PUB_KEY); - /* - * DH documentation says that a public key must be present if a - * private key is present. - * We want to have at least a public key either way, so we end up - * requiring it unconditionally. - */ - if (param_priv_key != NULL && param_pub_key == NULL) - return 0; - if ((param_priv_key != NULL && !OSSL_PARAM_get_BN(param_priv_key, &priv_key)) || (param_pub_key != NULL |