Check PKCS7 structures in PKCS#12 files are of type data.
[openssl.git] / crypto / asn1 / d2i_pu.c
index d0fd73209890410cf5aab9a93565da1e583627a7..3694f51a8c0af5961b7765856f7b99402ed49300 100644 (file)
@@ -72,7 +72,7 @@
 #include <openssl/ec.h>
 #endif
 
-EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
+EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
             long length)
        {
        EVP_PKEY *ret;
@@ -113,7 +113,7 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
 #endif
 #ifndef OPENSSL_NO_EC
        case EVP_PKEY_EC:
-               if (!o2i_ECPublicKey(&(ret->pkey.eckey),
+               if (!o2i_ECPublicKey(&(ret->pkey.ec),
                                     (const unsigned char **)pp, length))
                        {
                        ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB);