SSL_STATE_STRING(3ossl)
π SSL_STATE_STRING π
okay bestie, so this one is from the OpenSSL manual, page SSL_STATE_STRING(3ossl), and it's genuinely so useful β it's literally the "what is my SSL object even doing rn" page. no cap.
β¨ NAME β¨
SSL_state_string, SSL_state_string_long β get a textual description of the state of an SSL object π¦
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
const char *SSL_state_string(const SSL *ssl);
const char *SSL_state_string_long(const SSL *ssl);
π DESCRIPTION π
SSL_state_string()β hands you back an abbreviated string that tells you the current state of theSSLobjectssl. The returned string is NUL-terminated and it's tiny β it contains 6 or fewer characters. it's giving short and sweet fr fr πSSL_state_string_long()β same vibe, but it returns a descriptive string that tells you the current state of theSSLobjectssl. this one actually spells it out for you β¨
π NOTES π
so during its whole life, an SSL object passes through several states. that state is maintained internally, iykyk β it's not something you're out here setting yourself.
ngl, querying the state info is not very informative before a connection has been established, or right when one is being established. BUT β and this is the main character moment β it can be of significant interest during the handshake. that's where the tea is β
if you're using nonblocking sockets, the function call that's doing the handshake may come back with an SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE condition, and that's exactly when SSL_state_string[_long]() may be called. like, that's your window π«Ά
and for both blocking and nonblocking sockets β the detailed state information can be used inside the info_callback function that you set with the SSL_set_info_callback() call. obsessed with her tbh π
π RETURN VALUES π
a detailed description of the possible states is to be included later. yeah bestie, that's literally all it says. not me waiting for the lore drop π
π SEE ALSO π
π COPYRIGHT π
Copyright 2001-2021 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, periodt π
this was version 3.5.9, dated 2026-09-29, page SSL_STATE_STRING(3ossl), and it's giving OpenSSL energy from start to finish. mwah, go read your handshake states πβ¨π
π¦ 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