SSL_GET_DEFAULT_TIMEOUT(3ossl)
π SSL_GET_DEFAULT_TIMEOUT β ok bestie, it's giving "how long does a session last" β¨
So this page lives in the OpenSSL manual, section 3ossl (that's the SSL_GET_DEFAULT_TIMEOUT(3ossl) vibe, iykyk). It's a tiny one. Like, one function, one number, and yet β iconic. Let's get into it. π¦
πΈ NAME πΈ
SSL_get_default_timeout β get that default session timeout value, queen π
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
long SSL_get_default_timeout(const SSL *ssl);
π DESCRIPTION π
SSL_get_default_timeout() hands you back the default timeout value that gets assigned to SSL_SESSION objects negotiated for whatever protocol is valid for ssl. That's it. That's the whole function. Simple, elegant, no notes. π
π§ NOTES π§
Okay so here's the tea, bestie π΅ β every time a new session gets negotiated, it gets assigned a timeout value. Once that clock runs out, the session is not accepted for session reuse anymore. Bye bye, session, you had a good run π
Now: if that timeout value was not explicitly set using SSL_CTX_set_timeout(3), then the hardcoded default timeout for the protocol kicks in.
And guess what SSL_get_default_timeout() returns? Yep β that hardcoded value. And the number is:
300 seconds for all currently supported protocols. β°
No cap. Three hundred. Every protocol. Same number. It's giving consistency, honestly. π
π RETURN VALUES π
See description, babe. That's literally where it is. π
π₯ SEE ALSO π₯
ssl(7)SSL_CTX_set_session_cache_mode(3)SSL_SESSION_get_time(3)SSL_CTX_flush_sessions(3)SSL_get_default_timeout(3)
(the last one is this page β yes, the manpage cites itself, main character energy fr fr β)
π COPYRIGHT π
Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved. π«Ά
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
Okay that's the whole page!! Thanks for reading my little manpage era πβ¨
Signed off from the OpenSSL manual, version 3.5.9, dated 2026-09-29 β catch you in the next one, bestie ππ¦
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms