From 5ce38c90cf43ee79cd999716ea83a5a44eeb819e Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Tue, 28 Jul 2015 11:46:38 -0400 Subject: Update openssl to 1.0.2d Also update Cryptlib to edk2 r17731 Signed-off-by: Gary Ching-Pang Lin --- Cryptlib/OpenSSL/crypto/asn1/d2i_pu.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Cryptlib/OpenSSL/crypto/asn1/d2i_pu.c') diff --git a/Cryptlib/OpenSSL/crypto/asn1/d2i_pu.c b/Cryptlib/OpenSSL/crypto/asn1/d2i_pu.c index 1f05fee2..33542dd1 100644 --- a/Cryptlib/OpenSSL/crypto/asn1/d2i_pu.c +++ b/Cryptlib/OpenSSL/crypto/asn1/d2i_pu.c @@ -85,9 +85,12 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, } else ret = *a; - ret->save_type = type; - ret->type = EVP_PKEY_type(type); - switch (ret->type) { + if (!EVP_PKEY_set_type(ret, type)) { + ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_EVP_LIB); + goto err; + } + + switch (EVP_PKEY_id(ret)) { #ifndef OPENSSL_NO_RSA case EVP_PKEY_RSA: /* TMP UGLY CAST */ -- cgit v1.2.3