OpenBSD manual page server

Manual Page Search Parameters

SSL_GET_CERTIFICATE(3) Library Functions Manual SSL_GET_CERTIFICATE(3)

SSL_get_certificate, SSL_get_privatekeyget SSL certificate and private key

#include <openssl/ssl.h>

X509 *
SSL_get_certificate(const SSL *ssl);

EVP_PKEY *
SSL_get_privatekey(SSL *ssl);

These functions retrieve certificate and key data from an SSL object. They return internal pointers that must not be freed by the application program.

SSL_get_certificate() returns the active X.509 certificate currently used by ssl or NULL if none is active.

SSL_get_privatekey() returns the active private key currently used by ssl or NULL if none is active.

SSL_check_private_key(3), SSL_use_certificate(3)

SSL_get_certificate() and SSL_get_privatekey() appeared before SSLeay 0.8 and have been available since OpenBSD 2.4.

March 21, 2018 OpenBSD-6.3