diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-01-19 01:21:12 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-01-20 04:24:59 +0100 |
commit | 3aeb93486588e7dd01379c50b8fd496d55cf8858 (patch) | |
tree | e5d5793ef4786dbfac5c724e8235a3aa1ce323b2 /crypto/asn1/d2i_pu.c | |
parent | Remove the GOST engine (diff) | |
download | openssl-3aeb93486588e7dd01379c50b8fd496d55cf8858.tar.xz openssl-3aeb93486588e7dd01379c50b8fd496d55cf8858.zip |
make EVP_PKEY opaque
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/asn1/d2i_pu.c')
-rw-r--r-- | crypto/asn1/d2i_pu.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/crypto/asn1/d2i_pu.c b/crypto/asn1/d2i_pu.c index 11176f0e16..1b29f1c7f1 100644 --- a/crypto/asn1/d2i_pu.c +++ b/crypto/asn1/d2i_pu.c @@ -72,6 +72,8 @@ # include <openssl/ec.h> #endif +#include "internal/evp_int.h" + EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) { @@ -93,10 +95,7 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, switch (EVP_PKEY_id(ret)) { #ifndef OPENSSL_NO_RSA case EVP_PKEY_RSA: - /* TMP UGLY CAST */ - if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, - (const unsigned char **)pp, - length)) == NULL) { + if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, pp, length)) == NULL) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; } @@ -105,8 +104,7 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, #ifndef OPENSSL_NO_DSA case EVP_PKEY_DSA: /* TMP UGLY CAST */ - if (!d2i_DSAPublicKey(&(ret->pkey.dsa), - (const unsigned char **)pp, length)) { + if (!d2i_DSAPublicKey(&ret->pkey.dsa, pp, length)) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; } @@ -114,8 +112,7 @@ EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, #endif #ifndef OPENSSL_NO_EC case EVP_PKEY_EC: - if (!o2i_ECPublicKey(&(ret->pkey.ec), - (const unsigned char **)pp, length)) { + if (!o2i_ECPublicKey(&ret->pkey.ec, pp, length)) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; } |