Fixes for Win32 build.
[openssl.git] / crypto / asn1 / p7_enc.c
index f5ebbf776d56a414c7874109874886e2a2f9e9bd..38ccafbdb0ddaba99d83f71a6888a763189df230 100644 (file)
 
 #include <stdio.h>
 #include "cryptlib.h"
-#include "asn1_mac.h"
-#include "x509.h"
-
-/*
- * ASN1err(ASN1_F_PKCS7_ENCRYPT_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
- * ASN1err(ASN1_F_D2I_PKCS7_ENCRYPT,ERR_R_ASN1_LENGTH_MISMATCH);
- */
+#include <openssl/asn1_mac.h>
+#include <openssl/x509.h>
 
 int i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **pp)
        {
@@ -100,7 +95,7 @@ PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void)
        ASN1_CTX c;
 
        M_ASN1_New_Malloc(ret,PKCS7_ENCRYPT);
-       M_ASN1_New(ret->version,ASN1_INTEGER_new);
+       M_ASN1_New(ret->version,M_ASN1_INTEGER_new);
        M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new);
        return(ret);
        M_ASN1_New_Error(ASN1_F_PKCS7_ENCRYPT_NEW);
@@ -109,8 +104,8 @@ PKCS7_ENCRYPT *PKCS7_ENCRYPT_new(void)
 void PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a)
        {
        if (a == NULL) return;
-       ASN1_INTEGER_free(a->version);
+       M_ASN1_INTEGER_free(a->version);
        PKCS7_ENC_CONTENT_free(a->enc_data);
-       Free((char *)a);
+       OPENSSL_free(a);
        }