[openssl-users] CMS questions

Dr. Stephen Henson steve at openssl.org
Fri May 1 13:36:33 UTC 2015


On Fri, May 01, 2015, Richard Welty wrote:

> 
> 
> On 2/24/15 10:10 AM, Dr. Stephen Henson wrote:
> > So the embedded content type will be enveloped data?
> >
> > If so first you can check that type using CMS_get0_eContentType().
> >
> > Then you can use CMS_get0_content() to retrieve the embedded content as a
> > pointer to an OCTET STRING pointer. You should check that content is
> not NULL
> > and then retrieve the encoding of the content using ASN1_STRING_data and
> > ASN1_STRING_length.
> >
> > Once you have those you can decode using d2i_CMS_ContentInfo().
> >
> ok, i'm not understanding how i supply the private key for decrypting
> the enveloped data in this scenario.
> 

You get back a CMS_ContentInfo structure which you can then process using the
appropriate CMS functions such as CMS_decrypt().

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org


More information about the openssl-users mailing list