Hi, Thank you all for the replys.
I've found out what the problem was. The buffer that I sent to d2i_X509 function was bad ASN.1 buffer. After solving the cetrificate buffer retrieval everything worked great! Thanks Again, Lior 2009/5/21 Peter Sylvester <[email protected]> > Victor B. Wagner wrote: > >> On 2009.05.20 at 18:28:42 +0200, Peter Sylvester wrote: >> >> >> >>> IMO a good approach is also to simple read and understand apps/x509.c >>> >>> >> >> Unfortunately, it wouldn't help much. x509 utility does work only with >> certificates in files (or stdin), so it uses d2i_X509_bio. >> >> In this case certificate is stored in the memory buffer, so it seems to >> be an extra overhead first to create BIO_mem from this buffer and then >> decode it using d2i_X509_bio. >> > Right, but I was unprecise, on needs > > 1 : how to initialise the openssl library, load error strings, etv > 2 : decoding, yes not using d2i_X509_bio but d2i_X509 > 3 : extract, and print the content > > /P > > > ______________________________________________________________________ >> OpenSSL Project http://www.openssl.org >> User Support Mailing List [email protected] >> Automated List Manager [email protected] >> >> > > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List [email protected] > Automated List Manager [email protected] > -- Lior Aharoni
