Stack.
[openssl.git] / crypto / asn1 / p7_s_e.c
index 1df66dd..7b3440c 100644 (file)
@@ -71,7 +71,8 @@ int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp)
        M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT);
        M_ASN1_I2D_len_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0);
        M_ASN1_I2D_len_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1);
-       M_ASN1_I2D_len_SET(a->signer_info,i2d_PKCS7_SIGNER_INFO);
+       M_ASN1_I2D_len_SET_type(PKCS7_SIGNER_INFO,a->signer_info,
+                               i2d_PKCS7_SIGNER_INFO);
 
        M_ASN1_I2D_seq_total();
 
@@ -81,7 +82,8 @@ int i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **pp)
        M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT);
        M_ASN1_I2D_put_IMP_SEQUENCE_opt_type(X509,a->cert,i2d_X509,0);
        M_ASN1_I2D_put_IMP_SET_opt_type(X509_CRL,a->crl,i2d_X509_CRL,1);
-       M_ASN1_I2D_put_SET(a->signer_info,i2d_PKCS7_SIGNER_INFO);
+       M_ASN1_I2D_put_SET_type(PKCS7_SIGNER_INFO,a->signer_info,
+                               i2d_PKCS7_SIGNER_INFO);
 
        M_ASN1_I2D_finish();
        }
@@ -102,8 +104,8 @@ PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a,
        M_ASN1_D2I_get_IMP_set_opt_type(X509,ret->cert,d2i_X509,X509_free,0);
        M_ASN1_D2I_get_IMP_set_opt_type(X509_CRL,ret->crl,d2i_X509_CRL,
                                        X509_CRL_free,1);
-       M_ASN1_D2I_get_set(ret->signer_info,d2i_PKCS7_SIGNER_INFO,
-               PKCS7_SIGNER_INFO_free);
+       M_ASN1_D2I_get_set_type(PKCS7_SIGNER_INFO,ret->signer_info,
+                               d2i_PKCS7_SIGNER_INFO,PKCS7_SIGNER_INFO_free);
 
        M_ASN1_D2I_Finish(a,PKCS7_SIGN_ENVELOPE_free,
                ASN1_F_D2I_PKCS7_SIGN_ENVELOPE);
@@ -121,7 +123,7 @@ PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new(void)
        M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
        ret->cert=NULL;
        ret->crl=NULL;
-       M_ASN1_New(ret->signer_info,sk_new_null);
+       M_ASN1_New(ret->signer_info,sk_PKCS7_SIGNER_INFO_new_null);
        return(ret);
        M_ASN1_New_Error(ASN1_F_PKCS7_SIGN_ENVELOPE_NEW);
        }
@@ -135,7 +137,7 @@ void PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a)
        PKCS7_ENC_CONTENT_free(a->enc_data);
        sk_X509_pop_free(a->cert,X509_free);
        sk_X509_CRL_pop_free(a->crl,X509_CRL_free);
-       sk_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free);
+       sk_PKCS7_SIGNER_INFO_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free);
        Free((char *)a);
        }