On 10/07/2010 10:04 PM, Dr. Stephen Henson wrote:
> On Thu, Oct 07, 2010, [email protected] 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.
>   

Works fine.

Thanks for your help.


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to