summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/crypto/asn1/d2i_pu.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libssl/src/crypto/asn1/d2i_pu.c')
-rw-r--r--src/lib/libssl/src/crypto/asn1/d2i_pu.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_pu.c
index 3694f51a8c..71f2eb361b 100644
--- a/src/lib/libssl/src/crypto/asn1/d2i_pu.c
+++ b/src/lib/libssl/src/crypto/asn1/d2i_pu.c
@@ -68,11 +68,8 @@
68#ifndef OPENSSL_NO_DSA 68#ifndef OPENSSL_NO_DSA
69#include <openssl/dsa.h> 69#include <openssl/dsa.h>
70#endif 70#endif
71#ifndef OPENSSL_NO_EC
72#include <openssl/ec.h>
73#endif
74 71
75EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, 72EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp,
76 long length) 73 long length)
77 { 74 {
78 EVP_PKEY *ret; 75 EVP_PKEY *ret;
@@ -103,24 +100,14 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
103#endif 100#endif
104#ifndef OPENSSL_NO_DSA 101#ifndef OPENSSL_NO_DSA
105 case EVP_PKEY_DSA: 102 case EVP_PKEY_DSA:
106 if (!d2i_DSAPublicKey(&(ret->pkey.dsa), 103 if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL,
107 (const unsigned char **)pp,length)) /* TMP UGLY CAST */ 104 (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */
108 { 105 {
109 ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB); 106 ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB);
110 goto err; 107 goto err;
111 } 108 }
112 break; 109 break;
113#endif 110#endif
114#ifndef OPENSSL_NO_EC
115 case EVP_PKEY_EC:
116 if (!o2i_ECPublicKey(&(ret->pkey.ec),
117 (const unsigned char **)pp, length))
118 {
119 ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB);
120 goto err;
121 }
122 break;
123#endif
124 default: 111 default:
125 ASN1err(ASN1_F_D2I_PUBLICKEY,ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE); 112 ASN1err(ASN1_F_D2I_PUBLICKEY,ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE);
126 goto err; 113 goto err;