X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=crypto%2Fcms%2Fcms_io.c;h=f332a303d360e060f31782995099105f7fc845ce;hb=c18440956dd4a756e778b05d6ceadc27bd034edb;hp=1bb60b8dcbbba0ccf627e7cb4ad76f9335bb0bdb;hpb=8931b30d8478b0bd24af251fac64e7b0bf121369;p=oweals%2Fopenssl.git diff --git a/crypto/cms/cms_io.c b/crypto/cms/cms_io.c index 1bb60b8dcb..f332a303d3 100644 --- a/crypto/cms/cms_io.c +++ b/crypto/cms/cms_io.c @@ -55,7 +55,7 @@ #include #include #include -#include "cms.h" +#include #include "cms_lcl.h" int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms) @@ -89,20 +89,6 @@ int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms) IMPLEMENT_PEM_rw_const(CMS, CMS_ContentInfo, PEM_STRING_CMS, CMS_ContentInfo) -#if 0 -/* Streaming encode support for CMS */ - -static BIO *cmsbio_init(ASN1_VALUE *val, BIO *out) - { - return CMS_dataInit((CMS_ContentInfo *)val, out); - } - -static int cmsbio_final(ASN1_VALUE *val, BIO *cmsbio) - { - return CMS_dataFinal((CMS_ContentInfo *)val, cmsbio); - } -#endif - BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms) { return BIO_new_NDEF(out, (ASN1_VALUE *)cms, @@ -128,19 +114,20 @@ int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags) { STACK_OF(X509_ALGOR) *mdalgs; int ctype_nid = OBJ_obj2nid(cms->contentType); + int econt_nid = OBJ_obj2nid(CMS_get0_eContentType(cms)); if (ctype_nid == NID_pkcs7_signed) mdalgs = cms->d.signedData->digestAlgorithms; else mdalgs = NULL; return SMIME_write_ASN1(bio, (ASN1_VALUE *)cms, data, flags, - ctype_nid, mdalgs, + ctype_nid, econt_nid, mdalgs, ASN1_ITEM_rptr(CMS_ContentInfo)); } CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont) { - return (CMS_ContentInfo *)SMIME_read_asn1(bio, bcont, + return (CMS_ContentInfo *)SMIME_read_ASN1(bio, bcont, ASN1_ITEM_rptr(CMS_ContentInfo)); }