SSL_RSTATE_STRING(3)

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

πŸ’– NAME πŸ’–

okay so this is the SSL_RSTATE_STRING(3) page, hanging out in the Library Functions Manual πŸ’… and it's all about SSL_rstate_string and SSL_rstate_string_long β€” the two functions that get you a textual description of the state of an SSL object during a read operation. slay.


✨ SYNOPSIS ✨

bestie, you're pulling this in from the library β€œlibssl” libcrypto crew, and you include #include <openssl/ssl.h> β€” then the calls look exactly like this:

const char *
SSL_rstate_string(SSL *ssl);

const char *
SSL_rstate_string_long(SSL *ssl);

πŸ¦‹ DESCRIPTION πŸ¦‹

SSL_rstate_string() returns a 2-letter string indicating the current read state of the SSL object ssl. short and cute, iykyk.

SSL_rstate_string_long() returns a string indicating the current read state of the SSL object ssl. the longer, chattier version πŸ’¬.

when you're performing a read operation, the SSL/TLS engine must parse the record, consisting of header and body. both. the whole thing. when working in a blocking environment, SSL_rstate_string[_long]() should always return "RD"/"read done" β€” periodt.

this function should only seldom be needed in applications. like, genuinely, it's not the main character of your app's needs πŸ™ˆ.


πŸ”₯ 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. we're looking at the header bestie.
  • "RB"/"read body" β€” the body of the record is being evaluated. now we're in the body era.
  • "RD"/"read done" β€” the record has been completely processed. finished. ate. πŸ’…
  • "unknown"/"unknown" β€” the read state is unknown. this should never happen πŸ’€ like fr fr, never.

πŸ‘€ SEE ALSO πŸ‘€


🌸 HISTORY 🌸

SSL_rstate_string() and SSL_rstate_string_long() first appeared in SSLeay 0.6.0 and have been available since OpenBSD 2.4. iconic lineage honestly πŸ‘‘


mwah πŸ’‹ this page's cute little footer says Debian, June 8, 2025 β€” that's the source/version and date, bestie 🫢✨

πŸ“¦ where this page comes from