SSL_STATE_STRING(3)

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

πŸŽ€ SSL_state_string(3) πŸŽ€

Library Functions Manual energy β€” okay bestie, this is the page for the SSL state-string girlies, and we're keeping every flag, every detail, every little crumb. πŸ’…

✨ NAME ✨

SSL_state_string, SSL_state_string_long β€” get textual description of state of an SSL object. That's the whole vibe: you want the texty description of what an SSL object is doing, no cap.

πŸŽ€ SYNOPSIS πŸŽ€

Okay so first, the library/include situation, literally exact:

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

const char *
SSL_state_string(const SSL *ssl);

const char *
SSL_state_string_long(const SSL *ssl);

πŸ’… DESCRIPTION πŸ’…

Okay so SSL_state_string() returns a 6 letter string indicating the current state of the SSL object ssl. Six letters. Tiny string. Iconic.

SSL_state_string_long() returns a string indicating the current state of the SSL object ssl. Longer string, same state-reading mission.

During its use, an SSL object passes several states. The state is internally maintained. Querying the state information is not very informative before or when a connection has been established. It however can be of significant interest during the handshake. Like, that's when the tea is actually hot πŸ”₯.

When using non-blocking sockets, the function call performing the handshake may return with SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE condition, so that SSL_state_string[_long]() may be called. Bestie, that bracket notation is doing exactly what it's doing β€” keep it.

For both blocking or non-blocking sockets, the details state information can be used within the info_callback() function set with the SSL_set_info_callback(3) call.

😭 RETURN VALUES 😭

Detailed description of possible states to be included later. That's literally the whole return-values section. The manpage says it will be included later, and we are respectfully waiting 😭.

No extra state list here β€” the original says the detailed description of possible states is β€œto be included later,” so that's the whole mood.

πŸ‘€ SEE ALSO πŸ‘€

πŸ¦‹ HISTORY πŸ¦‹

SSL_state_string() and SSL_state_string_long() first appeared in SSLeay 0.6.0 and have been available since OpenBSD 2.4. Vintage but still serving πŸ’–.


πŸ’– cute sign-off: this page is from Debian, dated June 8, 2025 β€” k bye bestie, go read your SSL states πŸ’–

πŸ“¦ where this page comes from