SSL_RSTATE_STRING(3ossl)

πŸ“¦
version 15.1 Β· 3 versions
, in freebsd 15.1

πŸ’… SSL_RSTATE_STRING(3ossl)

okay so bestie, this is the 3ossl manual page, and it's literally all about peeking at what an SSL object is doing mid-read. it's a tiny little page, a real snacc, so let's go πŸŽ€


✨ 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 πŸ’–

SSL_rstate_string() returns a 2 letter string indicating the current read state of the SSL object ssl. short and sweet, two characters, that's it πŸ’…

SSL_rstate_string_long() returns a string indicating the current read state of the SSL object ssl. same vibe, but the long version, iykyk.

🫢 NOTES 🫢

so when it's doing a read operation, the SSL/TLS engine has to parse the record β€” and a record is made of a header and a body, bestie. two parts. iconic structure honestly.

when you're working in a blocking environment, SSL_rstate_string[_long]() should always return "RD"/"read done". always. no cap. πŸ’€

ngl, this function should only seldom be needed in applications. like, it's not the main character here, it's a guest star. don't build your whole personality around calling it πŸ™ˆ

πŸ‘‘ 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. header era ✨
  • "RB"/"read body" β€” the body of the record is being evaluated. body era ✨
  • "unknown"/"unknown" β€” the read state is unknown. this should never happen. like literally never, if you see this something is deeply wrong 😭

when used with QUIC SSL objects, these functions always return "RH"/"read header" in normal conditions. QUIC stays in its header lane fr fr 🌈

⭐ SEE ALSO ⭐

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 πŸ“ mwah πŸ’œ this was version 3.5.6, dated 2026-04-07, and the manual is SSL_RSTATE_STRING(3ossl) β€” go read ssl(7) next, slay πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from