PKCS7 *p7,*p7bak;
..
...
p7 = PKCS7_new();
PKCS7_set_type(p7,NID_pks7_signed);
...
p = buf;
bufLen = i2d_PKCS7(p7,&p);
p = buf;
p7bak = d2i_PKCS7(NULL,&p,bufLen);
p7 and p7bak are not same, p7bak->type->sn,ln
is NULL,while p7bak->d.sign is correct.
I noticed in i2d_PKCS7(), M_ASN1_I2D_INF_seq_start()
is used, I suspected when in d2i_PKCS7, we need some extra
codes to deal with it.
----
lou weiwen
E-mail:[EMAIL PROTECTED]
Tel:(010)62970181
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]