diff options
author | Dr. Stephen Henson <steve@openssl.org> | 1999-02-07 00:14:12 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 1999-02-07 00:14:12 +0000 |
commit | 142fcca8ca2c8018a1e56c1047cbff47708d4538 (patch) | |
tree | 147db09a8c8ea5ccc03ab055cafb04a66aab94d8 /crypto/asn1/asn1_mac.h | |
parent | ebbfd76c694d3e2b9d8f68e4ce846d01fbf45be2 (diff) | |
download | openssl-142fcca8ca2c8018a1e56c1047cbff47708d4538.tar.gz |
Add support for GeneralName and GeneralNames extensions. Also preliminary
support for subject and issuer alt name. Add a new ASN1 macro and fix a
nasty bug that left an ASN1 buffer modified on an error condition with
IMPLICIT tagging.
Diffstat (limited to 'crypto/asn1/asn1_mac.h')
-rw-r--r-- | crypto/asn1/asn1_mac.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/crypto/asn1/asn1_mac.h b/crypto/asn1/asn1_mac.h index d4e36fb1db..e4cb3117ad 100644 --- a/crypto/asn1/asn1_mac.h +++ b/crypto/asn1/asn1_mac.h @@ -134,15 +134,20 @@ err:\ M_ASN1_D2I_get(b,func); \ } +#define M_ASN1_D2I_get_imp(b,func, type) \ + M_ASN1_next=(_tmp& ~V_ASN1_PRIMATIVE_TAG)|type; \ + c.q=c.p; \ + if (func(&(b),&c.p,c.slen) == NULL) \ + {c.line=__LINE__; M_ASN1_next_prev = _tmp; goto err; } \ + c.slen-=(c.p-c.q);\ + M_ASN1_next_prev=_tmp; + #define M_ASN1_D2I_get_IMP_opt(b,func,tag,type) \ if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == \ (V_ASN1_CONTEXT_SPECIFIC|(tag)))) \ { \ - unsigned char tmp; \ - tmp=M_ASN1_next; \ - M_ASN1_next=(tmp& ~V_ASN1_PRIMATIVE_TAG)|type; \ - M_ASN1_D2I_get(b,func); \ - M_ASN1_next_prev=tmp; \ + unsigned char _tmp = M_ASN1_next; \ + M_ASN1_D2I_get_imp(b,func, type);\ } #define M_ASN1_D2I_get_set(r,func,free_func) \ |