[openssl] openssl-3.0 update

tomas at openssl.org tomas at openssl.org
Wed Jan 5 09:08:28 UTC 2022


The branch openssl-3.0 has been updated
       via  82df03d7dd6f207f47ad023ef341c563188903b4 (commit)
      from  038a185971c84ea3978a6a8ba799fca46dc919e7 (commit)


- Log -----------------------------------------------------------------
commit 82df03d7dd6f207f47ad023ef341c563188903b4
Author: zhaozg <zhaozg at gmail.com>
Date:   Sat Jan 1 22:45:12 2022 +0800

    sm2: fix {i2d,d2i}_PublicKey EC_KEY is EVP_PKEY_SM2
    
    CLA: trivial
    
    Reviewed-by: Paul Dale <pauli at openssl.org>
    Reviewed-by: Tomas Mraz <tomas at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/17389)
    
    (cherry picked from commit 8582dccc4dd1f1667b0e91a098e2cc78c7146dd7)

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

Summary of changes:
 crypto/asn1/d2i_pu.c  | 2 +-
 crypto/asn1/i2d_evp.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c
index 1be114b8a2..6d5dd1bc60 100644
--- a/crypto/asn1/d2i_pu.c
+++ b/crypto/asn1/d2i_pu.c
@@ -54,7 +54,7 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
         goto err;
     }
 
-    switch (EVP_PKEY_get_id(ret)) {
+    switch (EVP_PKEY_get_base_id(ret)) {
     case EVP_PKEY_RSA:
         if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, pp, length)) == NULL) {
             ERR_raise(ERR_LIB_ASN1, ERR_R_ASN1_LIB);
diff --git a/crypto/asn1/i2d_evp.c b/crypto/asn1/i2d_evp.c
index 8b36388263..070ac83376 100644
--- a/crypto/asn1/i2d_evp.c
+++ b/crypto/asn1/i2d_evp.c
@@ -131,7 +131,7 @@ int i2d_PublicKey(const EVP_PKEY *a, unsigned char **pp)
 
         return i2d_provided(a, EVP_PKEY_PUBLIC_KEY, output_info, pp);
     }
-    switch (EVP_PKEY_get_id(a)) {
+    switch (EVP_PKEY_get_base_id(a)) {
     case EVP_PKEY_RSA:
         return i2d_RSAPublicKey(EVP_PKEY_get0_RSA(a), pp);
 #ifndef OPENSSL_NO_DSA


More information about the openssl-commits mailing list