diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_enc.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_enc.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_enc.c b/src/lib/libcrypto/asn1/tasn_enc.c index 67d774a9c1..c59033e54d 100644 --- a/src/lib/libcrypto/asn1/tasn_enc.c +++ b/src/lib/libcrypto/asn1/tasn_enc.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tasn_enc.c,v 1.15 2015/02/14 15:21:49 miod Exp $ */ | 1 | /* $OpenBSD: tasn_enc.c,v 1.16 2015/02/14 15:23:57 miod Exp $ */ |
2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
3 | * project 2000. | 3 | * project 2000. |
4 | */ | 4 | */ |
@@ -131,9 +131,7 @@ ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, | |||
131 | int tag, int aclass) | 131 | int tag, int aclass) |
132 | { | 132 | { |
133 | const ASN1_TEMPLATE *tt = NULL; | 133 | const ASN1_TEMPLATE *tt = NULL; |
134 | unsigned char *p = NULL; | ||
135 | int i, seqcontlen, seqlen, ndef = 1; | 134 | int i, seqcontlen, seqlen, ndef = 1; |
136 | const ASN1_COMPAT_FUNCS *cf; | ||
137 | const ASN1_EXTERN_FUNCS *ef; | 135 | const ASN1_EXTERN_FUNCS *ef; |
138 | const ASN1_AUX *aux = it->funcs; | 136 | const ASN1_AUX *aux = it->funcs; |
139 | ASN1_aux_cb *asn1_cb = 0; | 137 | ASN1_aux_cb *asn1_cb = 0; |
@@ -178,19 +176,6 @@ ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, const ASN1_ITEM *it, | |||
178 | ef = it->funcs; | 176 | ef = it->funcs; |
179 | return ef->asn1_ex_i2d(pval, out, it, tag, aclass); | 177 | return ef->asn1_ex_i2d(pval, out, it, tag, aclass); |
180 | 178 | ||
181 | case ASN1_ITYPE_COMPAT: | ||
182 | /* old style hackery... */ | ||
183 | cf = it->funcs; | ||
184 | if (out) | ||
185 | p = *out; | ||
186 | i = cf->asn1_i2d(*pval, out); | ||
187 | /* Fixup for IMPLICIT tag: note this messes up for tags > 30, | ||
188 | * but so did the old code. Tags > 30 are very rare anyway. | ||
189 | */ | ||
190 | if (out && (tag != -1)) | ||
191 | *p = aclass | tag | (*p & V_ASN1_CONSTRUCTED); | ||
192 | return i; | ||
193 | |||
194 | case ASN1_ITYPE_NDEF_SEQUENCE: | 179 | case ASN1_ITYPE_NDEF_SEQUENCE: |
195 | /* Use indefinite length constructed if requested */ | 180 | /* Use indefinite length constructed if requested */ |
196 | if (aclass & ASN1_TFLG_NDEF) | 181 | if (aclass & ASN1_TFLG_NDEF) |