Sortix
Sortix Download Manual Development Source Code News Blog More
current nightly

Sortix volatile manual

This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.

SSL_GET_CERTIFICATE(3) Library Functions Manual SSL_GET_CERTIFICATE(3)

NAME

SSL_get_certificate, SSL_get_privatekey — get SSL certificate and private key

SYNOPSIS

#include <openssl/ssl.h>

X509 *
SSL_get_certificate(const SSL *ssl);

EVP_PKEY *
SSL_get_privatekey(const SSL *ssl);

DESCRIPTION

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

RETURN VALUES

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.

SEE ALSO

ssl(3), SSL_check_private_key(3), SSL_use_certificate(3)

HISTORY

SSL_get_certificate() first appeared in SSLeay 0.5.2a. SSL_get_privatekey() first appeared in SSLeay 0.8.0. Both functions have been available since OpenBSD 2.4.

June 12, 2019 Sortix 1.1.0-dev
Copyright 2011-2025 Jonas 'Sortie' Termansen and contributors.
Sortix's source code is free software under the ISC license.
#sortix on irc.sortix.org
@sortix_org