diff options
Diffstat (limited to 'src/lib/libssl/src/crypto/asn1/d2i_pu.c')
-rw-r--r-- | src/lib/libssl/src/crypto/asn1/d2i_pu.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_pu.c index e0d203cef7..71f2eb361b 100644 --- a/src/lib/libssl/src/crypto/asn1/d2i_pu.c +++ b/src/lib/libssl/src/crypto/asn1/d2i_pu.c | |||
@@ -62,6 +62,12 @@ | |||
62 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
64 | #include <openssl/asn1.h> | 64 | #include <openssl/asn1.h> |
65 | #ifndef OPENSSL_NO_RSA | ||
66 | #include <openssl/rsa.h> | ||
67 | #endif | ||
68 | #ifndef OPENSSL_NO_DSA | ||
69 | #include <openssl/dsa.h> | ||
70 | #endif | ||
65 | 71 | ||
66 | EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp, | 72 | EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp, |
67 | long length) | 73 | long length) |
@@ -82,18 +88,20 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, unsigned char **pp, | |||
82 | ret->type=EVP_PKEY_type(type); | 88 | ret->type=EVP_PKEY_type(type); |
83 | switch (ret->type) | 89 | switch (ret->type) |
84 | { | 90 | { |
85 | #ifndef NO_RSA | 91 | #ifndef OPENSSL_NO_RSA |
86 | case EVP_PKEY_RSA: | 92 | case EVP_PKEY_RSA: |
87 | if ((ret->pkey.rsa=d2i_RSAPublicKey(NULL,pp,length)) == NULL) | 93 | if ((ret->pkey.rsa=d2i_RSAPublicKey(NULL, |
94 | (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */ | ||
88 | { | 95 | { |
89 | ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB); | 96 | ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB); |
90 | goto err; | 97 | goto err; |
91 | } | 98 | } |
92 | break; | 99 | break; |
93 | #endif | 100 | #endif |
94 | #ifndef NO_DSA | 101 | #ifndef OPENSSL_NO_DSA |
95 | case EVP_PKEY_DSA: | 102 | case EVP_PKEY_DSA: |
96 | if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL,pp,length)) == NULL) | 103 | if ((ret->pkey.dsa=d2i_DSAPublicKey(NULL, |
104 | (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */ | ||
97 | { | 105 | { |
98 | ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB); | 106 | ASN1err(ASN1_F_D2I_PUBLICKEY,ERR_R_ASN1_LIB); |
99 | goto err; | 107 | goto err; |