LIBRESSL-SSL_SESSION_GET_PROTOCOL_VERSION(3)

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

πŸ’… LIBRESSL-SSL_SESSION_GET_PROTOCOL_VERSION(3) πŸ’…

okay so this is a page from the Library Functions Manual β€” it's called SSL_SESSION_GET_PROTOCOL_VERSION(3) and it lives in libssl (well, the include line says libssl and libcrypto together, bestie, they're a package deal 🫢).


✨ NAME ✨

SSL_SESSION_get_protocol_version β€” it gets the protocol version of a session. that's it, that's the whole job, and honestly? iconic for knowing its lane πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

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

int
SSL_SESSION_get_protocol_version(const SSL_SESSION *s);

like yes, you include <openssl/ssl.h>, and yes the library β€œlibssl” libcrypto line is in there exactly like that. copy it, don't @ me 🌸


πŸ¦‹ DESCRIPTION πŸ¦‹

SSL_SESSION_get_protocol_version() returns the protocol version number used by the session s. one function, one job, zero drama. it looks at the session you hand it and tells you which protocol version that session is speaking. periodt ✨


πŸ‘‘ RETURN VALUES πŸ‘‘

SSL_SESSION_get_protocol_version() returns a constant like TLS1_VERSION or TLS1_2_VERSION. so like, not a mystery number you have to decode in your notes app β€” it's one of those named constants, iykyk πŸ’–


πŸ”₯ SEE ALSO πŸ”₯

the whole session-adjacent friend group, fr fr 🌈


⭐ HISTORY ⭐

SSL_SESSION_get_protocol_version() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 6.3. yeah she's been around, she's got main character energy from day one πŸ‘‘


ngl there's literally nothing dangerous in here β€” no undefined behaviour jumpscare, no deprecated-era warning, just a chill little getter. go get your version bestie πŸ’œ

and that's the page!! πŸŽ€ shoutout to Debian for this build, dated June 8 🌸 β€” signed off with SSL_SESSION_GET_PROTOCOL_VERSION(3) energy and a lil πŸ¦‹

πŸ“¦ where this page comes from