---
name: "libressl-SSL_CTX_get0_certificate"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-SSL_CTX_get0_certificate"
---

# libressl-SSL\_CTX\_get0\_certificate(3)

get the active certificate from an SSL context

## NAME

**SSL\_CTX\_get0\_certificate** – get the active certificate from an SSL context

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

**#include \<openssl/ssl.h\>**

*X509* *\**\

**SSL\_CTX\_get0\_certificate**(*const SSL\_CTX \*ctx*);

## DESCRIPTION

The **SSL\_CTX\_get0\_certificate**() function returns an internal pointer to the ASN.1 certificate currently active in *ctx* or NULL if none was installed with SSL\_CTX\_use\_certificate(3) or similar functions.

The returned pointer must not be freed by the caller.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_CTX\_new(3), SSL\_CTX\_use\_certificate(3), X509\_get\_pubkey(3), X509\_get\_subject\_name(3), X509\_new(3)

## HISTORY

**SSL\_CTX\_get0\_certificate**() first appeared in OpenSSL 1.0.2 and have been available since OpenBSD 6.3.
