LIBRESSL-SSL_CTX_SET_QUIET_SHUTDOWN(3)
π 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 forctxto bemode. and here's the cute part:SSLobjects created fromctxinherit the mode that was valid at the timeSSL_new(3)is called. so it's giving "family heirloom" energy.modemay be0or1, that's the whole menu, no secret third option πSSL_CTX_get_quiet_shutdown()β returns the βquiet shutdownβ setting ofctx. that's it. that's the whole function. lowkey iconic for it πSSL_set_quiet_shutdown()β sets the βquiet shutdownβ flag forsslto bemode. this setting stays valid untilsslis removed withSSL_free(3)orSSL_set_quiet_shutdown()is called again. and listen β it is not changed whenSSL_clear(3)is called. so don't expect a clear to reset this, it will not, periodt.modemay be0or1.SSL_get_quiet_shutdown()β returns the βquiet shutdownβ setting ofssl. π
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
- Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms