SSL_CTX_SET_QUIET_SHUTDOWN(3ossl)
π SSL_CTX_SET_QUIET_SHUTDOWN β the 3ossl girlies' guide to shutting things down quietly β¨
Okay bestie, buckle up π this is the 3ossl manual page for four little functions that control whether your TLS goodbye is loud and proper or, like, silent and slightly illegal. Yes, illegal. We'll get there. π
πΈ NAME πΈ
SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown β literally the four functions that manipulate shutdown behaviour. Get/set, context/object, quiet mode. That's the whole vibe check. π¦
β¨ 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);
Copy it exactly, bestie, don't freestyle the signatures. π
π DESCRIPTION π
So here's the tea, one function at a time:
SSL_CTX_set_quiet_shutdown()β sets the "quiet shutdown" flag forctxto bemode. And the inherited-lore is real:SSLobjects created fromctxinherit the mode that was valid at the timeSSL_new(3)is called.modemay be0or1. That's it. That's the whole range. Main character energy only has two settings. πSSL_CTX_get_quiet_shutdown()β returns the "quiet shutdown" setting ofctx. Reading is free, no cap. πSSL_set_quiet_shutdown()β sets the "quiet shutdown" flag forsslto bemode. The setting stays valid untilsslis removed withSSL_free(3)orSSL_set_quiet_shutdown()is called again. Important detail alert π¨: it is not changed whenSSL_clear(3)is called.modemay be0or1. Same two options, she's consistent. πSSL_get_quiet_shutdown()β returns the "quiet shutdown" setting ofssl. Iconic, brief, does what it says. π
π«Ά And now the caveat nobody wants to hear: these functions are not supported for QUIC SSL objects. SSL_set_quiet_shutdown() has no effect if called on a QUIC SSL object. Like, zero. Nothing. It's giving "talking to a wall". π
π§ NOTES π§
Okay 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, standards-respecting, "thank you for the conversation" behaviour. πΈ
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 SSL_shutdown(3) then behaves like SSL_set_shutdown(3) called with SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.) So the session is thus considered to be shutdown, but no close_notify alert is sent to the peer. π«₯
π And yeah β this behaviour violates the TLS standard. Not a vibe, not a flex, just a fact. Say it with me: quiet shutdown is a standard-breaker. Use it knowing that.
The default is normal shutdown behaviour as described by the TLS standard. Which is to say: the loud, correct, close_notify-sending behaviour is what you get unless you deliberately opt in to the chaos. π
π RETURN VALUES π
SSL_CTX_set_quiet_shutdown()andSSL_set_quiet_shutdown()do not return diagnostic information. Nothing. Void. They simply do. Silent kings. π€«SSL_CTX_get_quiet_shutdown()andSSL_get_quiet_shutdown()return the current setting. Yes, the0or1situation. π
π₯ SEE ALSO π₯
Go read them, 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! This masterpiece is from OpenSSL version 3.5.6, dated 2026-04-07, and it's filed under SSL_CTX_SET_QUIET_SHUTDOWN(3ossl). Go forth and shut down β quietly, if you dare. π ππ¦
π¦ where this page comes from
- freebsd 15.1: base 15.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms