[openssl] master update

tomas at openssl.org tomas at openssl.org
Fri Mar 19 14:10:08 UTC 2021


The branch master has been updated
       via  6084b5c2c9ab5a167d808d6f6c9b21f98c99bbc2 (commit)
      from  03cd9d2f230fd60af23ed5ccbe8c6e8ad245cd73 (commit)


- Log -----------------------------------------------------------------
commit 6084b5c2c9ab5a167d808d6f6c9b21f98c99bbc2
Author: Tomas Mraz <tomas at openssl.org>
Date:   Thu Mar 18 14:22:20 2021 +0100

    EVP_PKEY_get_*_param should work with legacy
    
    Also do not shortcut the pkey == NULL case
    to allow EVP_PKEY_get_params() to raise an error.
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/14606)

-----------------------------------------------------------------------

Summary of changes:
 crypto/evp/p_lib.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/crypto/evp/p_lib.c b/crypto/evp/p_lib.c
index 620c828159..4abecdf30c 100644
--- a/crypto/evp/p_lib.c
+++ b/crypto/evp/p_lib.c
@@ -1980,9 +1980,7 @@ int EVP_PKEY_get_bn_param(const EVP_PKEY *pkey, const char *key_name,
     size_t buf_sz = 0;
 
     if (key_name == NULL
-        || bn == NULL
-        || pkey == NULL
-        || !evp_pkey_is_provided(pkey))
+        || bn == NULL)
         return 0;
 
     memset(buffer, 0, sizeof(buffer));
@@ -2021,9 +2019,7 @@ int EVP_PKEY_get_octet_string_param(const EVP_PKEY *pkey, const char *key_name,
     OSSL_PARAM params[2];
     int ret1 = 0, ret2 = 0;
 
-    if (key_name == NULL
-        || pkey == NULL
-        || !evp_pkey_is_provided(pkey))
+    if (key_name == NULL)
         return 0;
 
     params[0] = OSSL_PARAM_construct_octet_string(key_name, buf, max_buf_sz);


More information about the openssl-commits mailing list