On Tue, Apr 26, 2005, John Moore wrote: > 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). >
In the case of several types of BIO (for example file BIOs) EOF is automatically detected and signalled. For memory BIOs this isn't possible because when the BIO is empty it could either mean that the call should be retried later when more data is available or that all data has been read and EOF has been reached. So an application has to indicate with that call the when the BIO is empty that EOF has been reached. The default behaviour (for historical reasons) is to signal that the call should be retried. 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]