LIBRESSL-SSL_CTX_SET_QUIET_SHUTDOWN(3)

πŸ“¦
version 4.4.0 Β· 2 versions
, in arch rolling

πŸ’… SSL_CTX_SET_QUIET_SHUTDOWN(3) β€” the group chat edition πŸŽ€

okay so bestie, welcome to the SSL_CTX_SET_QUIET_SHUTDOWN(3) page from the Library Functions Manual β€” yes that's the whole title, it's giving "my name is on the attendance sheet" energy. grab a strawberry πŸ“ and let's get into it, because this one is literally about how your TLS connection says goodbye. and ngl, the goodbye is kinda rude by default-adjacent settings. let's go ✨


🌸 NAME 🌸

SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown β€” these four icons manipulate shutdown behaviour 🫢


✨ SYNOPSIS ✨

the library situation is library β€œlibssl” libcrypto, and you pull it in with:

#include <openssl/ssl.h>

then the four besties, verbatim, no cap:

void
SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);

int
SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);

void
SSL_set_quiet_shutdown(SSL *ssl, int mode);

int
SSL_get_quiet_shutdown(const SSL *ssl);

πŸ’– DESCRIPTION πŸ’–

the setters and getters, one by one πŸ‘‘

  • SSL_CTX_set_quiet_shutdown() β€” sets the β€œquiet shutdown” flag for ctx to be mode. and here's the cute part: SSL objects created from ctx inherit the mode that was valid at the time SSL_new(3) is called. so it's giving "family heirloom" energy. mode may be 0 or 1, that's the whole menu, no secret third option πŸ’€
  • SSL_CTX_get_quiet_shutdown() β€” returns the β€œquiet shutdown” setting of ctx. that's it. that's the whole function. lowkey iconic for it 🌈
  • SSL_set_quiet_shutdown() β€” sets the β€œquiet shutdown” flag for ssl to be mode. this setting stays valid until ssl is removed with SSL_free(3) or SSL_set_quiet_shutdown() is called again. and listen β€” it is not changed when SSL_clear(3) is called. so don't expect a clear to reset this, it will not, periodt. mode may be 0 or 1.
  • SSL_get_quiet_shutdown() β€” returns the β€œquiet shutdown” setting of ssl. πŸ’œ

okay but what does "quiet" actually mean 😭

normally when an SSL connection is finished, the parties must send out β€œclose notify” alert messages using SSL_shutdown(3) for a clean shutdown. that's the polite thing. that's the waving-back energy. πŸ¦‹

when you set the β€œquiet shutdown” flag to 1, though β€” SSL_shutdown(3) will set the internal flags to SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN. and then SSL_shutdown(3) behaves like SSL_set_shutdown(3) called with SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN. so the session is thus considered to be shut down, but no β€œclose notify” alert is sent to the peer. you just… left. ghosted them. πŸ‘»

⚠️ bestie I need you to hear me: this behaviour violates the TLS standard. like, actually. it's in the manpage, it's not me being dramatic. the standard says wave back, this flag says don't. 🚨

the default is normal shutdown behaviour as described by the TLS standard. so if you don't touch this, you're being a good citizen, no notes πŸ’…


πŸŽ€ RETURN VALUES πŸŽ€

SSL_CTX_get_quiet_shutdown() and SSL_get_quiet_shutdown() return the current setting. the setters return void, they return nothing, they simply do their thing and leave 🌸


πŸ¦‹ SEE ALSO πŸ¦‹

ssl(3), SSL_clear(3), SSL_free(3), SSL_new(3), SSL_set_shutdown(3), SSL_shutdown(3) β€” go read these too, they're all in the same friend group, iykyk πŸ’–


πŸ‘‘ HISTORY πŸ‘‘

these functions first appeared in SSLeay 0.8.1 and have been available since OpenBSD 2.4. elder icons, honestly, they've been slaying since before some of us were born πŸ™ˆ


okay that's the page!! remember: quiet shutdown = ghosting your peer, and it violates the TLS standard, so use it on purpose and not by accident, fr fr πŸ’€

and a lil sign-off from the footer: this beauty comes to you from Debian, dated August 25, 2026, and the page itself is SSL_CTX_SET_QUIET_SHUTDOWN(3) β€” take care of her, she's been through a lot of renames in that header line 😭🫢✨

πŸ“¦ where this page comes from
  • arch rolling: libressl 4.4.0-1 Β· ISC AND custom:OpenSSL
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms