---
name: "libressl-SSL_get_default_timeout"
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_get_default_timeout"
---

# libressl-SSL\_get\_default\_timeout(3)

get default session timeout value

## NAME

**SSL\_get\_default\_timeout** – get default session timeout value

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*long*\

**SSL\_get\_default\_timeout**(*const SSL \*ssl*);

## DESCRIPTION

**SSL\_get\_default\_timeout**() returns the default timeout value assigned to *SSL\_SESSION* objects negotiated for the protocol valid for *ssl*.

Whenever a new session is negotiated, it is assigned a timeout value, after which it will not be accepted for session reuse. If the timeout value was not explicitly set using SSL\_CTX\_set\_timeout(3), the hardcoded default timeout for the protocol will be used.

**SSL\_get\_default\_timeout**() return this hardcoded value, which is 300 seconds for all currently supported protocols (SSLv2, SSLv3, and TLSv1).

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_CTX\_flush\_sessions(3), SSL\_CTX\_set\_session\_cache\_mode(3), SSL\_SESSION\_get\_time(3)

## HISTORY

**SSL\_get\_default\_timeout**() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4.
