---
name: "libressl-SSL_SESSION_get0_peer"
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_SESSION_get0_peer"
---

# libressl-SSL\_SESSION\_get0\_peer(3)

get details about peer's certificate for a session

## NAME

**SSL\_SESSION\_get0\_peer** – get details about peer's certificate for a session

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*X509* *\**\

**SSL\_SESSION\_get0\_peer**(*SSL\_SESSION \*s*);

## DESCRIPTION

**SSL\_SESSION\_get0\_peer**() returns a pointer to the peer certificate associated with the session *s* or NULL if no peer certificate is available. The caller should not free the returned value, unless X509\_up\_ref(3) has also been called.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_get\_session(3), SSL\_SESSION\_new(3)

## HISTORY

**SSL\_SESSION\_get0\_peer**() first appeared in OpenSSL 1.0.1 and has been available since OpenBSD 5.3.
