diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_enc.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_enc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_enc.c b/src/lib/libcrypto/asn1/tasn_enc.c index 2721f904a6..936ad1f767 100644 --- a/src/lib/libcrypto/asn1/tasn_enc.c +++ b/src/lib/libcrypto/asn1/tasn_enc.c | |||
@@ -158,7 +158,7 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, | |||
158 | return asn1_i2d_ex_primitive(pval, out, it, -1, aclass); | 158 | return asn1_i2d_ex_primitive(pval, out, it, -1, aclass); |
159 | 159 | ||
160 | case ASN1_ITYPE_CHOICE: | 160 | case ASN1_ITYPE_CHOICE: |
161 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it)) | 161 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL)) |
162 | return 0; | 162 | return 0; |
163 | i = asn1_get_choice_selector(pval, it); | 163 | i = asn1_get_choice_selector(pval, it); |
164 | if ((i >= 0) && (i < it->tcount)) | 164 | if ((i >= 0) && (i < it->tcount)) |
@@ -171,7 +171,7 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, | |||
171 | -1, aclass); | 171 | -1, aclass); |
172 | } | 172 | } |
173 | /* Fixme: error condition if selector out of range */ | 173 | /* Fixme: error condition if selector out of range */ |
174 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it)) | 174 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL)) |
175 | return 0; | 175 | return 0; |
176 | break; | 176 | break; |
177 | 177 | ||
@@ -216,7 +216,7 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, | |||
216 | aclass = (aclass & ~ASN1_TFLG_TAG_CLASS) | 216 | aclass = (aclass & ~ASN1_TFLG_TAG_CLASS) |
217 | | V_ASN1_UNIVERSAL; | 217 | | V_ASN1_UNIVERSAL; |
218 | } | 218 | } |
219 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it)) | 219 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_PRE, pval, it, NULL)) |
220 | return 0; | 220 | return 0; |
221 | /* First work out sequence content length */ | 221 | /* First work out sequence content length */ |
222 | for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) | 222 | for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) |
@@ -250,7 +250,7 @@ int ASN1_item_ex_i2d(ASN1_VALUE **pval, unsigned char **out, | |||
250 | } | 250 | } |
251 | if (ndef == 2) | 251 | if (ndef == 2) |
252 | ASN1_put_eoc(out); | 252 | ASN1_put_eoc(out); |
253 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it)) | 253 | if (asn1_cb && !asn1_cb(ASN1_OP_I2D_POST, pval, it, NULL)) |
254 | return 0; | 254 | return 0; |
255 | return seqlen; | 255 | return seqlen; |
256 | 256 | ||
@@ -569,7 +569,8 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype, | |||
569 | ASN1_STRING *strtmp; | 569 | ASN1_STRING *strtmp; |
570 | ASN1_OBJECT *otmp; | 570 | ASN1_OBJECT *otmp; |
571 | int utype; | 571 | int utype; |
572 | unsigned char *cont, c; | 572 | const unsigned char *cont; |
573 | unsigned char c; | ||
573 | int len; | 574 | int len; |
574 | const ASN1_PRIMITIVE_FUNCS *pf; | 575 | const ASN1_PRIMITIVE_FUNCS *pf; |
575 | pf = it->funcs; | 576 | pf = it->funcs; |