On Thu, Oct 07, 2010, t...@compumatica.de wrote:

> Hi,
> 
> I like to verify a S/MIME message with CMS_verify() (openssl-1.0.0a). If
> the CMS structure does not contain a certificate and if I also cannot
> provide the certificate, the verification fails. "error:2E09D08A:CMS
> routines:CMS_verify:signer certificate not found"
> 
> I know that I need the certificate to verify the signature, but what can
> I do in this case, to get my hands on the content? Even if I use
> CMS_NO_CONTENT_VERIFY I get the same error and the output is empty. Is
> there an other way to extract the data out of the CMS structure?
> 

You can do this via the lower level API.

Something like..

ASN1_OCTET_STRING **pos = CMS_get0_content(cms);

Then the content is ASN1_STRING_length(*pos) bytes using the buffer
ASN1_STRING_data(*pos). Note that those are internal pointers which should be
treated as read only.

Steve.
--
Dr Stephen N. Henson. OpenSSL project core developer.
Commercial tech support now available see: http://www.openssl.org
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to