_____  

From: Mohammad khodaei [mailto:m_khod...@yahoo.com] 
Sent: Wednesday, 04 July, 2012 07:12
To: openssl-users@openssl.org; dthomp...@prinpay.com
Subject: Re: Convert PKCS7_decrypt output to char*


Thanks a lot for the response. I applied the feedbacks you gave me. Now I
changed the parts you mentioned in the previous post. I also checked the
error messages and they exactly show up after line:

p7 = d2i_PKCS7_bio(in, NULL);



The error messages are:

140258883262112:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong
tag:tasn_dec.c:1319:
140258883262112:error:0D07803A:asn1 encoding
routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=PKCS7


For the sake of completeness, I just copy the entire function here so that
it would be easier to see what I have done so far.  <snip>
 

I said BIO_new_mem_buf replaces the memBIO steps -- 
NOT the b64BIO steps, you still need those. In detail:
_new_mem_buf creates a memBIO prefilled with your (b64) data;
then you instantiate _f_base64 and push on the memBIO;
then you d2i_x_bio from the composite.  

Reply via email to