2012/2/16 Jakob Bohm <[email protected]>:
> I think the PEM formatting (a line with dashes, the
> Base64 lines and another line with dashes) is currently
> tied to writing and reading files via the BIO layer.
>
> So you would have to set up a "memory" BIO handle, then
> tell the X509 routines to save the certificate in PEM
> format to your memory BIO handle.
>
> Of cause if you just want to print it to stdout or
> another real file handle, you could just use a BIO
> pointing to that file handle.

Thanks, indeed what I need is to store the PEM format in a C string,
so I expect that I need to know the length of the resulting PEM format
in order to malloc for the char pointer.

I will check the memory BIO handle.

Thanks a lot.

-- 
Iñaki Baz Castillo
<[email protected]>
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [email protected]
Automated List Manager                           [email protected]

Reply via email to