SSL_STATE_STRING(3ossl)
β¨ SSL_STATE_STRING β¨
okay so bestie, welcome to SSL_STATE_STRING(3ossl) β the page where we learn how to ask an SSL object "hey girl, what state are you in rn?" π
Both functions live in OpenSSL, and yes they're giving "short answer" vs "long answer" energy.
πΈ 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);
like, that's the whole vibe. two functions, one header, no drama. β¨
π DESCRIPTION π
SSL_state_string()β returns an abbreviated string showing the current state of the SSL object,ssl. The returned NUL-terminated string contains 6 or fewer characters. tiny. compact. iconic. πSSL_state_string_long()β returns a descriptive string showing the current state of the SSL object,ssl. the full sentence, the whole story, the main character energy. π
π¦ NOTES π¦
During its whole life, an SSL object passes through several states β and the state is maintained internally, so you're not setting it yourself, you're just peeking. π
ngl, querying the state info is not very informative before or when a connection has been established. but during the handshake? oh it's significant interest, fr fr. π₯
When you're using nonblocking sockets, the function call doing the handshake may come back with an SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE condition β and that's when you'd call SSL_state_string[_long](). π
And for both blocking and nonblocking sockets, you can use that detailed state information inside the info_callback function that you set with the SSL_set_info_callback() call. π«Ά
β RETURN VALUES β
Detailed description of possible states to be included later. π
(that's genuinely what the page says bestie, we're all waiting for the sequel. π)
π 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, mwah π β signed, sealed, and stamped with 3.5.0 on 2026-09-25, SSL_STATE_STRING(3ossl), periodt. π§π
π¦ 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