diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2005-04-20 21:48:06 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2005-04-20 21:48:06 +0000 |
commit | 2c45bf2bc9be4704c63b024d5721c1f537adb0f2 (patch) | |
tree | ef7f30f18ea2cee15e32b2400b21cb296b8150ec /crypto/asn1 | |
parent | 836ec0c76488d5056096d33c4868e3d4b9a3eac1 (diff) |
Rename typed version of M_ASN1_get M_ASN1_get_x to avoid conflicts.
Remove more bogus shadow warnings.
Diffstat (limited to 'crypto/asn1')
-rw-r--r-- | crypto/asn1/a_hdr.c | 4 | ||||
-rw-r--r-- | crypto/asn1/asn1_mac.h | 9 | ||||
-rw-r--r-- | crypto/asn1/x_pkey.c | 4 |
3 files changed, 12 insertions, 5 deletions
diff --git a/crypto/asn1/a_hdr.c b/crypto/asn1/a_hdr.c index c5520b77f9..d1c2a7b9e3 100644 --- a/crypto/asn1/a_hdr.c +++ b/crypto/asn1/a_hdr.c @@ -83,10 +83,10 @@ ASN1_HEADER *d2i_ASN1_HEADER(ASN1_HEADER **a, const unsigned char **pp, M_ASN1_D2I_Init(); M_ASN1_D2I_start_sequence(); - M_ASN1_D2I_get(ASN1_OCTET_STRING,ret->header,d2i_ASN1_OCTET_STRING); + M_ASN1_D2I_get_x(ASN1_OCTET_STRING,ret->header,d2i_ASN1_OCTET_STRING); if (ret->meth != NULL) { - M_ASN1_D2I_get(void,ret->data,ret->meth->d2i); + M_ASN1_D2I_get_x(void,ret->data,ret->meth->d2i); } else { diff --git a/crypto/asn1/asn1_mac.h b/crypto/asn1/asn1_mac.h index f95cb145b7..d958ca60d9 100644 --- a/crypto/asn1/asn1_mac.h +++ b/crypto/asn1/asn1_mac.h @@ -126,7 +126,14 @@ err:\ (c.eos=ASN1_const_check_infinite_end(&c.p,c.slen))) /* Don't use this with d2i_ASN1_BOOLEAN() */ -#define M_ASN1_D2I_get(type,b,func) \ +#define M_ASN1_D2I_get(b, func) \ + c.q=c.p; \ + if (func(&(b),&c.p,c.slen) == NULL) \ + {c.line=__LINE__; goto err; } \ + c.slen-=(c.p-c.q); + +/* Don't use this with d2i_ASN1_BOOLEAN() */ +#define M_ASN1_D2I_get_x(type,b,func) \ c.q=c.p; \ if (((D2I_OF(type))func)(&(b),&c.p,c.slen) == NULL) \ {c.line=__LINE__; goto err; } \ diff --git a/crypto/asn1/x_pkey.c b/crypto/asn1/x_pkey.c index ee860beaa6..8453618426 100644 --- a/crypto/asn1/x_pkey.c +++ b/crypto/asn1/x_pkey.c @@ -76,8 +76,8 @@ X509_PKEY *d2i_X509_PKEY(X509_PKEY **a, const unsigned char **pp, long length) M_ASN1_D2I_Init(); M_ASN1_D2I_start_sequence(); - M_ASN1_D2I_get(X509_ALGOR,ret->enc_algor,d2i_X509_ALGOR); - M_ASN1_D2I_get(ASN1_OCTET_STRING,ret->enc_pkey,d2i_ASN1_OCTET_STRING); + M_ASN1_D2I_get_x(X509_ALGOR,ret->enc_algor,d2i_X509_ALGOR); + M_ASN1_D2I_get_x(ASN1_OCTET_STRING,ret->enc_pkey,d2i_ASN1_OCTET_STRING); ret->cipher.cipher=EVP_get_cipherbyname( OBJ_nid2ln(OBJ_obj2nid(ret->enc_algor->algorithm))); |