diff options
author | beck <> | 2002-05-15 02:29:21 +0000 |
---|---|---|
committer | beck <> | 2002-05-15 02:29:21 +0000 |
commit | b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9 (patch) | |
tree | fa27cf82a1250b64ed3bf5f4a18c7354d470bbcc /src/lib/libcrypto/asn1/d2i_pu.c | |
parent | e471e1ea98d673597b182ea85f29e30c97cd08b5 (diff) | |
download | openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.gz openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.tar.bz2 openbsd-b64270d1e45fe7f3241e4c9b6ce60d5ac89bc2e9.zip |
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'src/lib/libcrypto/asn1/d2i_pu.c')
-rw-r--r-- | src/lib/libcrypto/asn1/d2i_pu.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/d2i_pu.c b/src/lib/libcrypto/asn1/d2i_pu.c index e0d203cef7..71f2eb361b 100644 --- a/src/lib/libcrypto/asn1/d2i_pu.c +++ b/src/lib/libcrypto/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; |