Change the version text, it's time to release the first beta of 0.9.5a.
[openssl.git] / crypto / x509v3 / v3_crld.c
index 897ffb63e4abd81dfa0358d2d1e6cc616bf7435c..e459d2595ac5230a1eea2d621d923c8bdb13c049 100644 (file)
@@ -211,20 +211,20 @@ void DIST_POINT_free(DIST_POINT *a)
 {
        if (a == NULL) return;
        DIST_POINT_NAME_free(a->distpoint);
-       ASN1_BIT_STRING_free(a->reasons);
+       M_ASN1_BIT_STRING_free(a->reasons);
        sk_GENERAL_NAME_pop_free(a->CRLissuer, GENERAL_NAME_free);
-       Free ((char *)a);
+       Free (a);
 }
 
 int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp)
 {
-       int v = 0;
        M_ASN1_I2D_vars(a);
 
        if(a->fullname) {
                M_ASN1_I2D_len_IMP_opt (a->fullname, i2d_GENERAL_NAMES);
        } else {
-               M_ASN1_I2D_len_EXP_opt (a->relativename, i2d_X509_NAME, 1, v);
+               M_ASN1_I2D_len_IMP_SET_opt_type(X509_NAME_ENTRY,
+                               a->relativename, i2d_X509_NAME_ENTRY, 1);
        }
 
        /* Don't want a SEQUENCE so... */
@@ -234,7 +234,8 @@ int i2d_DIST_POINT_NAME(DIST_POINT_NAME *a, unsigned char **pp)
        if(a->fullname) {
                M_ASN1_I2D_put_IMP_opt (a->fullname, i2d_GENERAL_NAMES, 0);
        } else {
-               M_ASN1_I2D_put_EXP_opt (a->relativename, i2d_X509_NAME, 1, v);
+               M_ASN1_I2D_put_IMP_SET_opt_type(X509_NAME_ENTRY,
+                               a->relativename, i2d_X509_NAME_ENTRY, 1);
        }
        M_ASN1_I2D_finish();
 }
@@ -253,9 +254,9 @@ DIST_POINT_NAME *DIST_POINT_NAME_new(void)
 void DIST_POINT_NAME_free(DIST_POINT_NAME *a)
 {
        if (a == NULL) return;
-       X509_NAME_free(a->relativename);
+       sk_X509_NAME_ENTRY_pop_free(a->relativename, X509_NAME_ENTRY_free);
        sk_GENERAL_NAME_pop_free(a->fullname, GENERAL_NAME_free);
-       Free ((char *)a);
+       Free (a);
 }
 
 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,
                M_ASN1_D2I_get_imp(ret->fullname, d2i_GENERAL_NAMES,
                                                        V_ASN1_SEQUENCE);
        } else if (tag == (1|V_ASN1_CONTEXT_SPECIFIC)) {
-               M_ASN1_D2I_get_EXP_opt (ret->relativename, d2i_X509_NAME, 1);
+               M_ASN1_D2I_get_IMP_set_opt_type (X509_NAME_ENTRY,
+                       ret->relativename, d2i_X509_NAME_ENTRY, X509_NAME_ENTRY_free, 1);
        } else {
                c.error = ASN1_R_BAD_TAG;
                goto err;