well, I think the certificate is coded in base64. so write it to file, run
openssl base64 -d -in file -out newfile
and read the newfile in. or start parsing it an pipe the output to your application.



Zitat von Iñaki Baz Castillo <[email protected]>:

Hi, after the SSL/TLS handshake from a client I want to get the
client's certificate(s) in PEM format (so I get a string I can print
somewhere).

So I do:

  X509 *client_cert;
  if ((client_cert = SSL_get_peer_certificate(ssl))) {
    # Printf got cert in PEM format
  }

Now my question is: how can I get the PEM string of the client's certificate(s)?

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]



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

Reply via email to