diff options
author | 2014-04-23 12:42:16 +0000 | |
---|---|---|
committer | 2014-04-23 12:42:16 +0000 | |
commit | 04511ee9c87cf25eed598b0c0c1ac439df1dd40f (patch) | |
tree | d22c207113c29deb014bb4ec9861943565dfb00d /lib | |
parent | We do not need ARGV, Argc and Argv - just use argc and argv like normal (diff) | |
download | wireguard-openbsd-04511ee9c87cf25eed598b0c0c1ac439df1dd40f.tar.xz wireguard-openbsd-04511ee9c87cf25eed598b0c0c1ac439df1dd40f.zip |
Casting from a const unsigned char ** to a const unsigned char ** seems...
unnecessary. Remove the temporary ugly casts - the comments even call them
that!
ok guenther@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/asn1/d2i_pu.c | 12 | ||||
-rw-r--r-- | lib/libssl/src/crypto/asn1/d2i_pu.c | 12 |
2 files changed, 8 insertions, 16 deletions
diff --git a/lib/libcrypto/asn1/d2i_pu.c b/lib/libcrypto/asn1/d2i_pu.c index 564f0945b53..d0c2cecd7d6 100644 --- a/lib/libcrypto/asn1/d2i_pu.c +++ b/lib/libcrypto/asn1/d2i_pu.c @@ -93,9 +93,8 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) switch (EVP_PKEY_id(ret)) { #ifndef OPENSSL_NO_RSA case EVP_PKEY_RSA: - if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, - (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */ - { + if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, pp, length)) == + NULL) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; } @@ -103,9 +102,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) #endif #ifndef OPENSSL_NO_DSA case EVP_PKEY_DSA: - if (!d2i_DSAPublicKey(&(ret->pkey.dsa), - (const unsigned char **)pp,length)) /* TMP UGLY CAST */ - { + if (!d2i_DSAPublicKey(&(ret->pkey.dsa), pp, length)) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; } @@ -113,8 +110,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) #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; } diff --git a/lib/libssl/src/crypto/asn1/d2i_pu.c b/lib/libssl/src/crypto/asn1/d2i_pu.c index 564f0945b53..d0c2cecd7d6 100644 --- a/lib/libssl/src/crypto/asn1/d2i_pu.c +++ b/lib/libssl/src/crypto/asn1/d2i_pu.c @@ -93,9 +93,8 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) switch (EVP_PKEY_id(ret)) { #ifndef OPENSSL_NO_RSA case EVP_PKEY_RSA: - if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, - (const unsigned char **)pp,length)) == NULL) /* TMP UGLY CAST */ - { + if ((ret->pkey.rsa = d2i_RSAPublicKey(NULL, pp, length)) == + NULL) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; } @@ -103,9 +102,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) #endif #ifndef OPENSSL_NO_DSA case EVP_PKEY_DSA: - if (!d2i_DSAPublicKey(&(ret->pkey.dsa), - (const unsigned char **)pp,length)) /* TMP UGLY CAST */ - { + if (!d2i_DSAPublicKey(&(ret->pkey.dsa), pp, length)) { ASN1err(ASN1_F_D2I_PUBLICKEY, ERR_R_ASN1_LIB); goto err; } @@ -113,8 +110,7 @@ d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, long length) #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; } |