Hi,

I was under the impression that the following two code fragments are 
equivalent. But the first can successfully decode a BER encoded
certificate (in "value"), while the second fails - data too long. When should
ASN1_item_d2i_bio be used?


cert = d2i_X509(NULL,(unsigned char **) &value, valueLen);


in = BIO_new_mem_buf(value, valueLen);
cert = (X509 *) ASN1_item_d2i_bio(ASN1_ITEM_rptr(X509), in, NULL);


Am I missing something?

Markus
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to