xref: /freebsd/crypto/openssl/doc/man3/SSL_CTX_set_quiet_shutdown.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimSSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown - manipulate shutdown behaviour
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/ssl.h>
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);
12e71b7053SJung-uk Kim int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
13e71b7053SJung-uk Kim
14e71b7053SJung-uk Kim void SSL_set_quiet_shutdown(SSL *ssl, int mode);
15e71b7053SJung-uk Kim int SSL_get_quiet_shutdown(const SSL *ssl);
16e71b7053SJung-uk Kim
17e71b7053SJung-uk Kim=head1 DESCRIPTION
18e71b7053SJung-uk Kim
19e71b7053SJung-uk KimSSL_CTX_set_quiet_shutdown() sets the "quiet shutdown" flag for B<ctx> to be
20e71b7053SJung-uk KimB<mode>. SSL objects created from B<ctx> inherit the B<mode> valid at the time
21e71b7053SJung-uk KimL<SSL_new(3)> is called. B<mode> may be 0 or 1.
22e71b7053SJung-uk Kim
23e71b7053SJung-uk KimSSL_CTX_get_quiet_shutdown() returns the "quiet shutdown" setting of B<ctx>.
24e71b7053SJung-uk Kim
25e71b7053SJung-uk KimSSL_set_quiet_shutdown() sets the "quiet shutdown" flag for B<ssl> to be
26e71b7053SJung-uk KimB<mode>. The setting stays valid until B<ssl> is removed with
27e71b7053SJung-uk KimL<SSL_free(3)> or SSL_set_quiet_shutdown() is called again.
28e71b7053SJung-uk KimIt is not changed when L<SSL_clear(3)> is called.
29e71b7053SJung-uk KimB<mode> may be 0 or 1.
30e71b7053SJung-uk Kim
31e71b7053SJung-uk KimSSL_get_quiet_shutdown() returns the "quiet shutdown" setting of B<ssl>.
32e71b7053SJung-uk Kim
33e71b7053SJung-uk Kim=head1 NOTES
34e71b7053SJung-uk Kim
35e71b7053SJung-uk KimNormally when a SSL connection is finished, the parties must send out
36c9cf7b5cSJung-uk Kimclose_notify alert messages using L<SSL_shutdown(3)>
37e71b7053SJung-uk Kimfor a clean shutdown.
38e71b7053SJung-uk Kim
39e71b7053SJung-uk KimWhen setting the "quiet shutdown" flag to 1, L<SSL_shutdown(3)>
40e71b7053SJung-uk Kimwill set the internal flags to SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.
41e71b7053SJung-uk Kim(L<SSL_shutdown(3)> then behaves like
42e71b7053SJung-uk KimL<SSL_set_shutdown(3)> called with
43e71b7053SJung-uk KimSSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.)
44c9cf7b5cSJung-uk KimThe session is thus considered to be shutdown, but no close_notify alert
45e71b7053SJung-uk Kimis sent to the peer. This behaviour violates the TLS standard.
46e71b7053SJung-uk Kim
47e71b7053SJung-uk KimThe default is normal shutdown behaviour as described by the TLS standard.
48e71b7053SJung-uk Kim
49e71b7053SJung-uk Kim=head1 RETURN VALUES
50e71b7053SJung-uk Kim
51e71b7053SJung-uk KimSSL_CTX_set_quiet_shutdown() and SSL_set_quiet_shutdown() do not return
52e71b7053SJung-uk Kimdiagnostic information.
53e71b7053SJung-uk Kim
54e71b7053SJung-uk KimSSL_CTX_get_quiet_shutdown() and SSL_get_quiet_shutdown return the current
55e71b7053SJung-uk Kimsetting.
56e71b7053SJung-uk Kim
57e71b7053SJung-uk Kim=head1 SEE ALSO
58e71b7053SJung-uk Kim
59e71b7053SJung-uk KimL<ssl(7)>, L<SSL_shutdown(3)>,
60e71b7053SJung-uk KimL<SSL_set_shutdown(3)>, L<SSL_new(3)>,
61e71b7053SJung-uk KimL<SSL_clear(3)>, L<SSL_free(3)>
62e71b7053SJung-uk Kim
63e71b7053SJung-uk Kim=head1 COPYRIGHT
64e71b7053SJung-uk Kim
65c9cf7b5cSJung-uk KimCopyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
66e71b7053SJung-uk Kim
67*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
68e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
69e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
70e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
71e71b7053SJung-uk Kim
72e71b7053SJung-uk Kim=cut
73