Thanks a lot! That worked but I don't understand why or when we need to do that.

As explained, I'm trying to decrypt and verify a signed and encrypted message. When I invoke SMIME_read_PKCS7 before I decrypt I didn't have to signal EOF on the BIO that contained the original SMIME content. Now I set the signal on the BIO returned from PKCS7_decrypt and SMIME_read_PKCS7 works (where it was crashing previously with the 'not enough data' error).

Thanks for your time.

- John.

From: "Dr. Stephen Henson" <[EMAIL PROTECTED]>
Reply-To: openssl-users@openssl.org
To: openssl-users@openssl.org
Subject: Re: SMIME_read_PKCS7 error
Date: Tue, 26 Apr 2005 18:52:45 +0200

On Tue, Apr 26, 2005, John Moore wrote:

> Thanks. I guess that's not a problem then. The 'ASN1_d2i_bio:not enough
> data' error persists.
>

If you are parsing the result from a memory BIO then you have to tell it to
signal EOF when the BIO empties.

You do that with: BIO_set_mem_eof_return(bio, 0).

Steve.
--
Dr Stephen N. Henson. Email, S/MIME and PGP keys: see homepage
OpenSSL project core developer and freelance consultant.
Funding needed! Details on homepage.
Homepage: http://www.drh-consultancy.demon.co.uk
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to