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

# libressl-SSL\_CTX\_set\_quiet\_shutdown(3)

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

SSL Library (libssl, -lssl) libcrypto

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

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 shut down, 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\_get\_quiet\_shutdown**() and **SSL\_get\_quiet\_shutdown**() return the current setting.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_clear(3), SSL\_free(3), SSL\_new(3), SSL\_set\_shutdown(3), SSL\_shutdown(3)

## HISTORY

These functions first appeared in SSLeay 0.8.1 and have been available since OpenBSD 2.4.
