]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/asn1/d2i_pu.c
sm2: fix {i2d,d2i}_PublicKey EC_KEY is EVP_PKEY_SM2
[thirdparty/openssl.git] / crypto / asn1 / d2i_pu.c
index 1be114b8a2a21c03de5dc77171989db7d7d7f757..6d5dd1bc603eb30597f1b86ac663662531cd8b75 100644 (file)
@@ -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);