diff options
Diffstat (limited to 'src/lib/libcrypto/x509v3/v3_crld.c')
-rw-r--r-- | src/lib/libcrypto/x509v3/v3_crld.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/lib/libcrypto/x509v3/v3_crld.c b/src/lib/libcrypto/x509v3/v3_crld.c index 897ffb63e4..e459d2595a 100644 --- a/src/lib/libcrypto/x509v3/v3_crld.c +++ b/src/lib/libcrypto/x509v3/v3_crld.c | |||
@@ -211,20 +211,20 @@ void DIST_POINT_free(DIST_POINT *a) | |||
211 | { | 211 | { |
212 | if (a == NULL) return; | 212 | if (a == NULL) return; |
213 | DIST_POINT_NAME_free(a->distpoint); | 213 | DIST_POINT_NAME_free(a->distpoint); |
214 | ASN1_BIT_STRING_free(a->reasons); | 214 | M_ASN1_BIT_STRING_free(a->reasons); |
215 | sk_GENERAL_NAME_pop_free(a->CRLissuer, GENERAL_NAME_free); | 215 | sk_GENERAL_NAME_pop_free(a->CRLissuer, GENERAL_NAME_free); |
216 | Free ((char *)a); | 216 | Free (a); |
217 | } | 217 | } |
218 | 218 | ||
219 | int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp) | 219 | int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp) |
220 | { | 220 | { |
221 | int v = 0; | ||
222 | M_ASN1_I2D_vars(a); | 221 | M_ASN1_I2D_vars(a); |
223 | 222 | ||
224 | if(a->fullname) { | 223 | if(a->fullname) { |
225 | M_ASN1_I2D_len_IMP_opt (a->fullname, i2d_GENERAL_NAMES); | 224 | M_ASN1_I2D_len_IMP_opt (a->fullname, i2d_GENERAL_NAMES); |
226 | } else { | 225 | } else { |
227 | M_ASN1_I2D_len_EXP_opt (a->relativename, i2d_X509_NAME, 1, v); | 226 | M_ASN1_I2D_len_IMP_SET_opt_type(X509_NAME_ENTRY, |
227 | a->relativename, i2d_X509_NAME_ENTRY, 1); | ||
228 | } | 228 | } |
229 | 229 | ||
230 | /* Don't want a SEQUENCE so... */ | 230 | /* Don't want a SEQUENCE so... */ |
@@ -234,7 +234,8 @@ int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp) | |||
234 | if(a->fullname) { | 234 | if(a->fullname) { |
235 | M_ASN1_I2D_put_IMP_opt (a->fullname, i2d_GENERAL_NAMES, 0); | 235 | M_ASN1_I2D_put_IMP_opt (a->fullname, i2d_GENERAL_NAMES, 0); |
236 | } else { | 236 | } else { |
237 | M_ASN1_I2D_put_EXP_opt (a->relativename, i2d_X509_NAME, 1, v); | 237 | M_ASN1_I2D_put_IMP_SET_opt_type(X509_NAME_ENTRY, |
238 | a->relativename, i2d_X509_NAME_ENTRY, 1); | ||
238 | } | 239 | } |
239 | M_ASN1_I2D_finish(); | 240 | M_ASN1_I2D_finish(); |
240 | } | 241 | } |
@@ -253,9 +254,9 @@ DIST_POINT_NAME *DIST_POINT_NAME_new(void) | |||
253 | void DIST_POINT_NAME_free(DIST_POINT_NAME *a) | 254 | void DIST_POINT_NAME_free(DIST_POINT_NAME *a) |
254 | { | 255 | { |
255 | if (a == NULL) return; | 256 | if (a == NULL) return; |
256 | X509_NAME_free(a->relativename); | 257 | sk_X509_NAME_ENTRY_pop_free(a->relativename, X509_NAME_ENTRY_free); |
257 | sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free); | 258 | sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free); |
258 | Free ((char *)a); | 259 | Free (a); |
259 | } | 260 | } |
260 | 261 | ||
261 | DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp, | 262 | DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp, |
@@ -273,7 +274,8 @@ DIST_POINT_NAME *d2i_DIST_POINT_NAME(DIST_POINT_NAME **a, unsigned char **pp, | |||
273 | M_ASN1_D2I_get_imp(ret->fullname, d2i_GENERAL_NAMES, | 274 | M_ASN1_D2I_get_imp(ret->fullname, d2i_GENERAL_NAMES, |
274 | V_ASN1_SEQUENCE); | 275 | V_ASN1_SEQUENCE); |
275 | } else if (tag == (1|V_ASN1_CONTEXT_SPECIFIC)) { | 276 | } else if (tag == (1|V_ASN1_CONTEXT_SPECIFIC)) { |
276 | M_ASN1_D2I_get_EXP_opt (ret->relativename, d2i_X509_NAME, 1); | 277 | M_ASN1_D2I_get_IMP_set_opt_type (X509_NAME_ENTRY, |
278 | ret->relativename, d2i_X509_NAME_ENTRY, X509_NAME_ENTRY_free, 1); | ||
277 | } else { | 279 | } else { |
278 | c.error = ASN1_R_BAD_TAG; | 280 | c.error = ASN1_R_BAD_TAG; |
279 | goto err; | 281 | goto err; |