SSL_CTX_SET_QUIET_SHUTDOWN(3ossl)
π SSL_CTX_SET_QUIET_SHUTDOWN β the OpenSSL one, bestie
okay so we're in the 3ossl girlies section of the OpenSSL manual, and today's main character is quiet shutdown. yes it's a real thing. no it's not about being shy. let's get into it π
β¨ NAME β¨
SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown β these four baddies manipulate shutdown behaviour. that's the whole job. that's what they do. π
πΈ 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, bestie. there's a lil flag called the "quiet shutdown" flag and these functions are how you poke at it.
SSL_CTX_set_quiet_shutdown()β sets the "quiet shutdown" flag onctxto bemode. and here's the inherited-behavior moment: anySSLobjects you create fromctxwill pick up whatevermodewas valid at the timeSSL_new(3)is called. so set it before you spawn, okay?modemay be0or1. that's it. those are the options. πSSL_CTX_get_quiet_shutdown()β just hands you back the current "quiet shutdown" setting ofctx. a little reading, no writing. respectful. β¨SSL_set_quiet_shutdown()β sets the "quiet shutdown" flag onsslto bemode. and this setting stays valid untilsslgets removed withSSL_free(3), or until you callSSL_set_quiet_shutdown()again. IMPORTANT: it is not changed whenSSL_clear(3)is called. like,SSL_clear(3)does not touch it. no cap.modemay be0or1.SSL_get_quiet_shutdown()β returns the current "quiet shutdown" setting ofssl. reading again. love that for us. π«Ά
π¨ okay so this next bit is a whole thing: 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 likeβ¦ don't. π
π NOTES π
normally β and by normally i mean the standard, well-behaved way β when an SSL connection finishes, 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 the TLS standard behavior.
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) was called with SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN. π
so the session is considered to be shutdown, bestie β but no close_notify alert is sent to the peer. it justβ¦ ghosts them. and yeah, this behaviour violates the TLS standard. it's giving "i left the group chat with no explanation." so know what you're doing before you flip this on.
the default is normal shutdown behaviour, as described by the TLS standard. that's the baseline. the safe vibe. β
π₯ RETURN VALUES π₯
SSL_CTX_set_quiet_shutdown()andSSL_set_quiet_shutdown()β do not return diagnostic information. nothing. void. they set and they dip. πSSL_CTX_get_quiet_shutdown()andSSL_get_quiet_shutdown()β return the current setting. that's the whole answer.
π SEE ALSO π
ssl(7), SSL_shutdown(3), SSL_set_shutdown(3), SSL_new(3), SSL_clear(3), SSL_free(3)
π 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, babes π§ this one's from OpenSSL 3.5.9, dated 2026-09-29, and it's the SSL_CTX_SET_QUIET_SHUTDOWN(3ossl) manual page β now go set your flags responsibly, mwah ππΈβ¨
π¦ where this page comes from
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 43: openssl-devel 1:3.5.9-1.fc43 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- fedora 44: openssl-devel 1:3.5.9-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms