OLD | NEW |
1 /* crypto/asn1/asn1_mac.h */ | 1 /* crypto/asn1/asn1_mac.h */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 {c.line=__LINE__; goto err; } \ | 146 {c.line=__LINE__; goto err; } \ |
147 c.slen-=(c.p-c.q); | 147 c.slen-=(c.p-c.q); |
148 | 148 |
149 #define M_ASN1_D2I_get_opt(b,func,type) \ | 149 #define M_ASN1_D2I_get_opt(b,func,type) \ |
150 if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \ | 150 if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \ |
151 == (V_ASN1_UNIVERSAL|(type)))) \ | 151 == (V_ASN1_UNIVERSAL|(type)))) \ |
152 { \ | 152 { \ |
153 M_ASN1_D2I_get(b,func); \ | 153 M_ASN1_D2I_get(b,func); \ |
154 } | 154 } |
155 | 155 |
| 156 #define M_ASN1_D2I_get_int_opt(b,func,type) \ |
| 157 if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) \ |
| 158 == (V_ASN1_UNIVERSAL|(type)))) \ |
| 159 { \ |
| 160 M_ASN1_D2I_get_int(b,func); \ |
| 161 } |
| 162 |
156 #define M_ASN1_D2I_get_imp(b,func, type) \ | 163 #define M_ASN1_D2I_get_imp(b,func, type) \ |
157 M_ASN1_next=(_tmp& V_ASN1_CONSTRUCTED)|type; \ | 164 M_ASN1_next=(_tmp& V_ASN1_CONSTRUCTED)|type; \ |
158 c.q=c.p; \ | 165 c.q=c.p; \ |
159 if (func(&(b),&c.p,c.slen) == NULL) \ | 166 if (func(&(b),&c.p,c.slen) == NULL) \ |
160 {c.line=__LINE__; M_ASN1_next_prev = _tmp; goto err; } \ | 167 {c.line=__LINE__; M_ASN1_next_prev = _tmp; goto err; } \ |
161 c.slen-=(c.p-c.q);\ | 168 c.slen-=(c.p-c.q);\ |
162 M_ASN1_next_prev=_tmp; | 169 M_ASN1_next_prev=_tmp; |
163 | 170 |
164 #define M_ASN1_D2I_get_IMP_opt(b,func,tag,type) \ | 171 #define M_ASN1_D2I_get_IMP_opt(b,func,tag,type) \ |
165 if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == \ | 172 if ((c.slen != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) == \ |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 #define M_ASN1_I2D_finish() *pp=p; \ | 569 #define M_ASN1_I2D_finish() *pp=p; \ |
563 return(r); | 570 return(r); |
564 | 571 |
565 int asn1_GetSequence(ASN1_const_CTX *c, long *length); | 572 int asn1_GetSequence(ASN1_const_CTX *c, long *length); |
566 void asn1_add_error(const unsigned char *address,int offset); | 573 void asn1_add_error(const unsigned char *address,int offset); |
567 #ifdef __cplusplus | 574 #ifdef __cplusplus |
568 } | 575 } |
569 #endif | 576 #endif |
570 | 577 |
571 #endif | 578 #endif |
OLD | NEW |