> [[email protected] - Fri Feb 18 13:34:58 2011]:
> 
> Hi,
> 
> A collegue has an issue with SMIME_write_PKCS7() using Python and the
> M2Crypto library for a multipart (MIME) signature. He uses a memory BIO
> as output. He told me that the script works with OpenSSL 0.9.8g, but not
> with OpenSSL 0.9.8o. In CVS, I saw that PKCS7 and ASN.1 code for SMIME
> changed a lot, it is maybe a regression introduced by a code
> factorization.
> 
> 
> If data is not NULL, int_smime_write_ASN1() calls data_fn
> (pk7_output_data() in my case) twice, and write into the output BIO
> after the first call to data_fn. The problem is that PKCS7_dataFinal()
> sets the output buffer to read only (I don't understood exactly in which
> case).
> 
> M2Crypto adds PKCS7_DETACHED flag is data is not NULL. The real call
> looks like:
> SMIME_write_PKCS7(out, pkcs7, info, PKCS7_TEXT | PKCS7_DETACHED)
> 
> I am sorry, but I don't have a C script to reproduce the issue: only a
> Python script (attached to this email, smime.py) using
> flags=PKCS7_DETACHED. Output with error:

It isn't clear what the flags to PKCS7_sign() are. If you haven't set
PKCS7_DETACHED you shouldn't set the content parameter to
SMIME_write_PKCS7(): that is only used for detached content.

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
Development Mailing List                       [email protected]
Automated List Manager                           [email protected]

Reply via email to