SSL_SESSION_REUSED(3)

πŸ“¦ version 4.4.0, in alpine 3.24, arch rolling

πŸ’… SSL_SESSION_REUSED(3) πŸ’…

okay bestie so this is a page from the Library Functions Manual and it's literally about asking one tiny question: did we just reuse a session or not? no cap, that's the whole vibe. πŸŽ€


✨ NAME ✨

SSL_session_reused β€” the little function that tells you whether a reused session was negotiated during the handshake πŸ¦‹


🌸 SYNOPSIS 🌸

library β€œlibssl” libcrypto #include <openssl/ssl.h>

int
SSL_session_reused(SSL *ssl);

like yes, she's short. she's iconic. she takes exactly one SSL *ssl and returns an int. periodt. πŸ’œ


🫢 DESCRIPTION 🫢

So what does she actually do? She queries whether a reused session was negotiated during the handshake. that's it. that's the job. πŸ’…

Here's the lore though, because it's honestly kind of slay:

During the negotiation, a client can propose to reuse a session. the server then goes and looks that session up in its cache (very main character of her). and if both client and server agree on the session, it will be reused β€” and a flag gets set that can be queried by the application. πŸŽ€

so basically: client says "hey can we reuse this?", server checks the cache, they both agree, boom, reused, flag set, and your application can ask about it with this function. the way that works is genuinely so clean. ⭐


πŸ”₯ RETURN VALUES πŸ”₯

The following return values can occur, and honestly it's giving "spoiler alert":

  • 0 β€” a new session was negotiated. fresh start, new beginnings, we're so back. 🌈
  • 1 β€” a session was reused. recycling era, environmentally conscious queen. β™»οΈπŸ’–
no like literally those are the only two. she's binary-coded. 🩷

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too bestie, they're all part of the same friend group:


πŸ¦‹ HISTORY πŸ¦‹

SSL_session_reused() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4. so she's been serving since the ancient times and honestly she hasn't aged a day. πŸ’€βœ¨


and that's the page!! πŸ’– this little legend came to you from the Debian crew β€” specifically dated June 8, 2025, so you know it's fresh β€” and it's SSL_SESSION_REUSED(3) and she ate. mwah. πŸ’…πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from