---
name: "libressl-SSL_SESSION_print"
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_print"
---

# libressl-SSL\_SESSION\_print(3)

print some properties of an SSL\_SESSION object

## NAME

**SSL\_SESSION\_print**, **SSL\_SESSION\_print\_fp** – print some properties of an SSL\_SESSION object

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*int*\

**SSL\_SESSION\_print**(*BIO \*bp*, *const SSL\_SESSION \*session*);

*int*\

**SSL\_SESSION\_print\_fp**(*FILE \*fp*, *const SSL\_SESSION \*session*);

## DESCRIPTION

**SSL\_SESSION\_print**() prints some properties of *session* in a human-readable format to the *BIO \*bp*, including protocol version, cipher name, session ID, session ID context, master key, session ticket lifetime hint, session ticket, start time, timeout, and verify return code.

**SSL\_SESSION\_print\_fp**() does the same as **SSL\_SESSION\_print**() except that it prints to the *FILE \*fp*.

## RETURN VALUES

**SSL\_SESSION\_print**() and **SSL\_SESSION\_print\_fp**() return 1 for success or 0 for failure.

In some cases, the reason for failure can be determined with ERR\_get\_error(3).

## SEE ALSO

d2i\_SSL\_SESSION(3), PEM\_read\_SSL\_SESSION(3), [ssl(3)](/ssl/3.md), SSL\_get\_session(3), SSL\_SESSION\_free(3), SSL\_SESSION\_get\_ex\_new\_index(3), SSL\_SESSION\_get\_time(3), SSL\_SESSION\_new(3)

## HISTORY

**SSL\_SESSION\_print**() first appeared in SSLeay 0.5.2. **SSL\_SESSION\_print\_fp**() first appeared in SSLeay 0.6.0. Both functions have been available since OpenBSD 2.4.
