Initial support for Certificate Policies extension: print out works but setting
[oweals/openssl.git] / crypto / asn1 / p7_enc_c.c
index b27d443533879d262a058ecf0a65341ab6f0e193..f98afb51b8d9c06db0dea22c85b346e65961918d 100644 (file)
@@ -1,5 +1,5 @@
 /* crypto/asn1/p7_enc_c.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
@@ -62,8 +62,8 @@
 #include "x509.h"
 
 /*
- * ASN1err(ASN1_F_PKCS7_ENC_CONTENT_NEW,ASN1_R_LENGTH_MISMATCH);
- * ASN1err(ASN1_F_D2I_PKCS7_ENC_CONTENT,ASN1_R_LENGTH_MISMATCH);
+ * ASN1err(ASN1_F_PKCS7_ENC_CONTENT_NEW,ERR_R_ASN1_LENGTH_MISMATCH);
+ * ASN1err(ASN1_F_D2I_PKCS7_ENC_CONTENT,ERR_R_ASN1_LENGTH_MISMATCH);
  */
 
 int i2d_PKCS7_ENC_CONTENT(a,pp)
@@ -106,9 +106,11 @@ long length;
 PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new()
        {
        PKCS7_ENC_CONTENT *ret=NULL;
+       ASN1_CTX c;
 
        M_ASN1_New_Malloc(ret,PKCS7_ENC_CONTENT);
-       M_ASN1_New(ret->content_type,ASN1_OBJECT_new);
+       /* M_ASN1_New(ret->content_type,ASN1_OBJECT_new); */
+       ret->content_type=OBJ_nid2obj(NID_pkcs7_encrypted);
        M_ASN1_New(ret->algorithm,X509_ALGOR_new);
        ret->enc_data=NULL;
        return(ret);