SSL_RSTATE_STRING(3SSL)
π SSL_RSTATE_STRING π
okay bestie, welcome to the manual page for SSL_rstate_string and SSL_rstate_string_long β two lil functions from the OpenSSL zone (that's the 3SSL manual, if you're keeping track) that tell you what your SSL object is doing while it's reading. cute, right? let's get into it π¦
β¨ NAME β¨
SSL_rstate_string, SSL_rstate_string_long β get a textual description of the state of an SSL object during a read operation π
πΈ SYNOPSIS πΈ
#include <openssl/ssl.h>
const char *SSL_rstate_string(SSL *ssl);
const char *SSL_rstate_string_long(SSL *ssl);
π DESCRIPTION π
so SSL_rstate_string() returns a 2 letter string that tells you the current read state of the SSL object ssl. short and iconic. π«Ά
and SSL_rstate_string_long() returns a string indicating the current read state of the SSL object ssl. same energy, just with the words spelled all the way out. the long version ate, ngl.
π NOTES π
when you're doing a read operation, the SSL/TLS engine has to parse the record β and a record is made up of a header and a body. the way that works is lowkey important to know.
when you're working in a blocking environment, SSL_rstate_string[_long]() should always return "RD"/"read done". always. no cap.
this function should only seldom be needed in applications. like, it's not the main character here, it's more of a background cameo. π
π RETURN VALUES π
SSL_rstate_string() and SSL_rstate_string_long() can return the following values:
"RH"/"read header"β the header of the record is being evaluated. it's giving header era. π"RB"/"read body"β the body of the record is being evaluated. it's giving body era. π"unknown"/"unknown"β the read state is unknown. this should never happen. like literally never. if you see this, something is deeply unwell. π
when used with QUIC SSL objects, these functions always return "RH"/"read header" in normal conditions. periodt.
π SEE ALSO π
π§ COPYRIGHT π§
Copyright 2001-2023 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>.
and that's the whole page, bestie π this was SSL_RSTATE_STRING(3SSL), version 4.0.3, dated 2026-09-29. slay, go read your records, ily πβ¨
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms