---
name: "libressl-SSL_session_reused"
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_reused"
---

# libressl-SSL\_session\_reused(3)

query whether a reused session was negotiated during handshake

## NAME

**SSL\_session\_reused** – query whether a reused session was negotiated during handshake

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*int*\

**SSL\_session\_reused**(*SSL \*ssl*);

## DESCRIPTION

Query whether a reused session was negotiated during the handshake.

During the negotiation, a client can propose to reuse a session. The server then looks up the session in its cache. If both client and server agree on the session, it will be reused and a flag is set that can be queried by the application.

## RETURN VALUES

The following return values can occur:

- 0

  A new session was negotiated.

- 1

  A session was reused.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_ctrl(3), SSL\_CTX\_set\_session\_cache\_mode(3), SSL\_set\_session(3)

## HISTORY

**SSL\_session\_reused**() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4.
