SSL_CTX_SET_QUIET_SHUTDOWN(3SSL)
π SSL_CTX_set_quiet_shutdown β manipulate shutdown behaviour π
okay bestie, pull up a chair, because we're about to talk about the quiet shutdown flag and honestly? it's giving "leaving the party without saying bye" energy π. this is the OpenSSL manual for SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown and SSL_get_quiet_shutdown, and yes we're doing all four, no skipping, periodt.
β¨ NAME β¨
SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown β 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);
like, look at them, so tidy, so iconic π
π¦ DESCRIPTION π¦
SSL_CTX_set_quiet_shutdown() sets the "quiet shutdown" flag for ctx to be mode. and the tea here is that SSL objects made from that ctx inherit the mode that was valid at the time SSL_new(3) gets called. mode can be 0 or 1, that's it, that's the range, no in-between bestie. π«Ά
SSL_CTX_get_quiet_shutdown() hands you back the "quiet shutdown" setting of ctx. reading only, no drama.
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 until you call SSL_set_quiet_shutdown() again. important: it is not changed when SSL_clear(3) is called. mode may be 0 or 1. π
SSL_get_quiet_shutdown() returns the "quiet shutdown" setting of ssl. cute, simple.
π¨ okay so here's the caveat and it's a big one: 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. so if you're on QUIC, this whole page is basically a museum exhibit, bestie. π
π NOTES π
so 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 to do. that's β¨etiquetteβ¨.
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. and then SSL_shutdown(3) 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 listen, the original manpage says this plainly so I'ma say it plainly too: this behaviour violates the TLS standard. no cap. it's a vibe violation, it's a protocol violation, it's a "we don't do that here" but you can do it. iykyk.
the default is normal shutdown behaviour, as described by the TLS standard. so if you never touch any of this, you're being a good citizen. π
π RETURN VALUES π
SSL_CTX_set_quiet_shutdown()andSSL_set_quiet_shutdown()do not return diagnostic information. they're setters, they don't gossip, they just do the thing.SSL_CTX_get_quiet_shutdown()andSSL_get_quiet_shutdown()return the current setting. that's the whole vibe.
π SEE ALSO π
ssl(7), SSL_shutdown(3), SSL_set_shutdown(3), SSL_new(3), SSL_clear(3), SSL_free(3)
go read SSL_shutdown(3) next fr fr, it's the main character of this whole storyline π
π 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>.
and that's the whole page bestie, we ate and left no crumbs π«Ά this was version 4.0.3, dated 2026-09-29, from the SSL_CTX_SET_QUIET_SHUTDOWN(3SSL) manual β stay quiet, stay shutdown, stay slay β¨ππ
π¦ where this page comes from
- ubuntu stonking: libssl-doc 4.0.3-1ubuntu1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms