Hello, OpenSSL developers. I ran across an interesting thing while
working with openssl-0.9.7beta2, and am wondering if it's a bug, or is
intentional. I have signed some data, creating a PKCS7 signed object.
I've then encrypted that signed object, creating an enveloped object. At
each step in this process, I'm displaying the various attributes and
structs members (in a way that unhealthily violates the opacity of
objects, I admit). The interesting case is this: I write the enveloped
object out via PEM_write_bio_PKCS7(), and then read it back in using
PEM_read_bio_PKCS(). The enveloped object read back in seems to be same
as that written out -- except that p7->d.enveloped->enc_data->cipher is
NULL, where it was not NULL when being written out.
I looked into the PKCS7_dataDecode() routine, to see how it decrypted an
eveloped object's encrypted contents without using that cipher. It
apparently does so by using p7->d.enveloped->enc_data->algorithm to get
the matching(?) cipher by name.
Is this use (and lack of) of that enc_data->cipher member intentional? Or
perhaps this is a case specific to working with enveloped objects? Or,
most likely, I am missing something. =)
Cheers,
TJ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Absence is to love what wind is to fire: it extinguishes the small, it
enkindles the great.
-Comte de Bussy-Rabutin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]