---
name: "SSL_CTX_set_quiet_shutdown"
section: "3ssl"
platform: "linux"
package: "openssl"
version: "3.6.5-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/SSL_CTX_set_quiet_shutdown"
---

# SSL\_CTX\_set\_quiet\_shutdown(3ssl)

manipulate shutdown behaviour

## 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);
```

## DESCRIPTION

**SSL\_CTX\_set\_quiet\_shutdown()** sets the "quiet shutdown" flag for **ctx** to be **mode**. SSL objects created from **ctx** inherit the **mode** valid at the time **SSL\_new**(3) is called. **mode** may be 0 or 1.

**SSL\_CTX\_get\_quiet\_shutdown()** returns the "quiet shutdown" setting of **ctx**.

**SSL\_set\_quiet\_shutdown()** sets the "quiet shutdown" flag for **ssl** to be **mode**. The setting stays valid until **ssl** is removed with **SSL\_free**(3) or **SSL\_set\_quiet\_shutdown()** is called again. 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**.

These functions are not supported for QUIC SSL objects. **SSL\_set\_quiet\_shutdown()** has no effect if called on a QUIC SSL object.

## 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.

When setting the "quiet shutdown" flag to 1, **SSL\_shutdown**(3) will set the internal flags to SSL\_SENT\_SHUTDOWN\|SSL\_RECEIVED\_SHUTDOWN. (**SSL\_shutdown**(3) then behaves like **SSL\_set\_shutdown**(3) called with SSL\_SENT\_SHUTDOWN\|SSL\_RECEIVED\_SHUTDOWN.) The session is thus considered to be shutdown, but no close\_notify alert is sent to the peer. This behaviour violates the TLS standard.

The default is normal shutdown behaviour as described by the TLS standard.

## RETURN VALUES

**SSL\_CTX\_set\_quiet\_shutdown()** and **SSL\_set\_quiet\_shutdown()** do not return diagnostic information.

**SSL\_CTX\_get\_quiet\_shutdown()** and **SSL\_get\_quiet\_shutdown()** return the current setting.

## SEE ALSO

[**ssl**(7)](/ssl/7.md), **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\>.
