Hi all,

I still have some trouble with the memory BIO.
I want to write a PEM struct into a memory BIO
So I do :

BIO * bp;
d=malloc(1024);
bp=BIO_new_mem_buf(d,1024);
ret = PEM_write_bio_X509(bp,x509);

And it fails !

But if i do :

BIO *out;
BIO *out=OpenSSLCore.BIO_new(OpenSSLCore.BIO_s_file());
BIO_set_fp(out,stdout,BIO_NOCLOSE);
ret =  PEM_write_bio_X509(out, x509) // x509 is a X509 *

it works and print down the PEM certificate.

Any Idea ?
I didn't found example on Memory BIO ...

Thanks

Laurent

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

Reply via email to