Good day!
I have problem with reading S/MIME PKCS#7 container from membuf. I've
got "not enough data" error in ASN parsing routine (asn1_d2i_read_bio).
I have sign & crypt zip file (430kb) with S/MIME PKCS#7 within PHP. Then
I wrote a small application to decrypt & verify:
/* Decrypt */
in = BIO_new_file("sign_n_enc.file", "rb")
pio = BIO_new(BIO_s_mem())
p7 = SMIME_read_PKCS7(in)
PKCS7_decrypt(p7, key, recip, pio, 0)
/* Verify */
p7 = SMIME_read_PKCS7(pio, &datain)
PKCS7_verify(p7, NULL, store, datain, out, 0)
If I create pio as:
pio = BIO_new_file("_tmpfile_", "w+")
p7 = SMIME_read_PKCS7(in)
PKCS7_decrypt(p7, key, recip, pio, 0)
BIO_seek(pio, 0)
p7 = SMIME_read_PKCS7(pio,...)
PKCS7_verify(p7, NULL, store, datain, out, 0)
Then I would be success in verify.
My OpenSSL version is 0.9.8j.
Rgds,
Anton
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org