SSL_CTX_SET_QUIET_SHUTDOWN(3ossl)
π SSL_CTX_SET_QUIET_SHUTDOWN (3ossl) β¨
okay bestie, welcome to the 3ossl manual page β yes that's the OpenSSL girlies, we're in their house π«Ά. This one is about the four little functions that let you say "shhh π€«" when an SSL connection is closing out. Let's go.
πΈ NAME πΈ
SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown β literally the whole squad that lets you manipulate shutdown behaviour π
β¨ SYNOPSIS β¨
#include <openssl/ssl.h>
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 π
So here's the tea β on each of these:
SSL_CTX_set_quiet_shutdown()β sets the "quiet shutdown" flag forctxto whatevermodeyou pass. And the way inheritance works? Any SSL objects created fromctxinherit the mode that was valid at the exact momentSSL_new(3)got called, no cap π§.modemay be0or1, that's it, that's the whole menu.SSL_CTX_get_quiet_shutdown()β returns the "quiet shutdown" setting ofctx. Reading the vibe check of your context, basically πSSL_set_quiet_shutdown()β sets the "quiet shutdown" flag forssltomode. This setting stays valid untilsslis removed withSSL_free(3)or until you callSSL_set_quiet_shutdown()again. And bestie, important: it is not changed whenSSL_clear(3)is called π¨.modemay be0or1.SSL_get_quiet_shutdown()β returns the "quiet shutdown" setting ofssl. Iconic, simple, useful.
β οΈ Heads up! These functions are not supported for QUIC SSL objects. And SSL_set_quiet_shutdown() has no effect if you call it on a QUIC SSL object. Like, it just does nothing. Don't come for me, that's just how it is π
π₯ NOTES π₯
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, standard-compliant way to say goodbye πβ¨
But when you set the "quiet shutdown" flag to 1, SSL_shutdown(3) will set the internal flags to SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN. (Which means SSL_shutdown(3) then behaves like SSL_set_shutdown(3) called with SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.) So the session is considered to be shutdown, but no close_notify alert is sent to the peer. π
π¨ And this is the part where I have to be dramatic: this behaviour violates the TLS standard. For real for real. It's giving "skipping the goodbye text and just ghosting" π» β technically a shutdown, socially a crime.
The default is normal shutdown behaviour as described by the TLS standard. So if you don't touch anything, you're being a well-behaved TLS citizen π
π RETURN VALUES π
SSL_CTX_set_quiet_shutdown()andSSL_set_quiet_shutdown()do not return diagnostic information. They're setters, they just do the thing, no receipts π§ΎβSSL_CTX_get_quiet_shutdown()andSSL_get_quiet_shutdown()return the current setting.0or1, take it or leave it βοΈ
π¦ SEE ALSO π¦
ssl(7), SSL_shutdown(3), SSL_set_shutdown(3), SSL_new(3), SSL_clear(3), SSL_free(3) β go read these, they're the friend group of this page, iykyk π
π 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>.
okay that's the whole page bestie, go forth and shut down quietly (responsibly, per the TLS standard, please) πΈπ β¨
with love, from the 3.5.0 girlies π β dated 2026-09-25, signed SSL_CTX_SET_QUIET_SHUTDOWN(3ossl), mwah π
π¦ where this page comes from
- opensuse-leap 16.0: openssl-3-doc 3.5.0-160000.11.1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms