SSL_SESSION_HAS_TICKET(3ossl)
π SSL_SESSION_HAS_TICKET(3ossl) π
okay so bestie, you know how TLS sessions can carry around this little ticket thing like a VIP wristband at a concert? ποΈβ¨ This page is literally all about peeking at that wristband. It's part of OpenSSL (the 3ossl crew, iykyk), and honestly? Iconic.
β¨ NAME β¨
SSL_SESSION_get0_ticket, SSL_SESSION_has_ticket, SSL_SESSION_get_ticket_lifetime_hint β get details about the ticket associated with a session π
π¦ SYNOPSIS π¦
#include <openssl/ssl.h>
int SSL_SESSION_has_ticket(const SSL_SESSION *s);
unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s);
void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick,
size_t *len);
πΈ DESCRIPTION πΈ
SSL_SESSION_has_ticket()β vibe check on the ticket π returns1if there is a Session Ticket associated with this session, and0otherwise. That's it. That's the whole function. Simple queen behaviour.SSL_SESSION_get_ticket_lifetime_hintβ returns the lifetime hint in seconds associated with the session ticket β³ (yes, no parentheses in the original name, that's how it is, don't come for me).SSL_SESSION_get0_ticketβ obtains a pointer to the ticket associated with a session π The length of the ticket gets written to*len. And iftickis nonNULL, then a pointer to the ticket gets written to*tick.
β οΈ bestie listen β that pointer is only valid while the connection is in use. And the session (and hence the ticket pointer) may also become invalid as a result of a call to SSL_CTX_flush_sessions(). So do not be out here storing that pointer in your notes app and expecting it to work later. It literally will not. π
π₯ RETURN VALUES π₯
SSL_SESSION_has_ticket()β returns1if session ticket exists, or0otherwise π«ΆSSL_SESSION_get_ticket_lifetime_hint()β returns the number of seconds β
π SEE ALSO π
ssl(7), d2i_SSL_SESSION(3), SSL_SESSION_get_time(3), SSL_SESSION_free(3)
π HISTORY π
The SSL_SESSION_has_ticket(), SSL_SESSION_get_ticket_lifetime_hint() and SSL_SESSION_get0_ticket() functions were added in OpenSSL 1.1.0 π so they're giving seasoned, not brand new.
π COPYRIGHT π
Copyright 2015-2018 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>.
β¨ and that's the whole page, bestie! π this was OpenSSL 3.5.0, dated 2026-09-25, and yes it's still called SSL_SESSION_HAS_TICKET(3ossl) β go forth and check those tickets, no cap ππ¦π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms