Billy Cole wrote:
> 
> 
> Secondly, is there some easy way (that I'm missing) of reading a certificate in
> from
> a buffer instead of a file? This BIO stuff gets deep real fast and I just want
> to make
> sure I'm spending time in the right places.
> 

If its DER encoded you can use d2i_X509 see
http://www.openssl.org/support/faq.html#PROG3 for general info.

If its PEM or DER you can use a BIO. This isn't difficult at all and you
can treat BIO just like a FILE for this application. If you do:

BIO *buf = BIO_new_mem_buf(buffer, len);

then pass the BIO to the PEM or d2i_X509_bio() function it should work.

Steve.
-- 
Dr Stephen N. Henson.   http://www.drh-consultancy.demon.co.uk/
Personal Email: [EMAIL PROTECTED] 
Senior crypto engineer, Celo Communications: http://www.celocom.com/
Core developer of the   OpenSSL project: http://www.openssl.org/
Business Email: [EMAIL PROTECTED] PGP key: via homepage.
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to