189837Skris=pod 289837Skris 389837Skris=head1 NAME 489837Skris 589837SkrisSSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown, SSL_get_quiet_shutdown - manipulate shutdown behaviour 689837Skris 789837Skris=head1 SYNOPSIS 889837Skris 989837Skris #include <openssl/ssl.h> 1089837Skris 1189837Skris void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode); 12160814Ssimon int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx); 1389837Skris 1489837Skris void SSL_set_quiet_shutdown(SSL *ssl, int mode); 15160814Ssimon int SSL_get_quiet_shutdown(const SSL *ssl); 1689837Skris 1789837Skris=head1 DESCRIPTION 1889837Skris 1989837SkrisSSL_CTX_set_quiet_shutdown() sets the "quiet shutdown" flag for B<ctx> to be 2089837SkrisB<mode>. SSL objects created from B<ctx> inherit the B<mode> valid at the time 2189837SkrisL<SSL_new(3)|SSL_new(3)> is called. B<mode> may be 0 or 1. 2289837Skris 2389837SkrisSSL_CTX_get_quiet_shutdown() returns the "quiet shutdown" setting of B<ctx>. 2489837Skris 2589837SkrisSSL_set_quiet_shutdown() sets the "quiet shutdown" flag for B<ssl> to be 2689837SkrisB<mode>. The setting stays valid until B<ssl> is removed with 2789837SkrisL<SSL_free(3)|SSL_free(3)> or SSL_set_quiet_shutdown() is called again. 2889837SkrisIt is not changed when L<SSL_clear(3)|SSL_clear(3)> is called. 2989837SkrisB<mode> may be 0 or 1. 3089837Skris 3189837SkrisSSL_get_quiet_shutdown() returns the "quiet shutdown" setting of B<ssl>. 3289837Skris 3389837Skris=head1 NOTES 3489837Skris 3589837SkrisNormally when a SSL connection is finished, the parties must send out 3689837Skris"close notify" alert messages using L<SSL_shutdown(3)|SSL_shutdown(3)> 3789837Skrisfor a clean shutdown. 3889837Skris 3989837SkrisWhen setting the "quiet shutdown" flag to 1, L<SSL_shutdown(3)|SSL_shutdown(3)> 4089837Skriswill set the internal flags to SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN. 4189837Skris(L<SSL_shutdown(3)|SSL_shutdown(3)> then behaves like 4289837SkrisL<SSL_set_shutdown(3)|SSL_set_shutdown(3)> called with 4389837SkrisSSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.) 4489837SkrisThe session is thus considered to be shutdown, but no "close notify" alert 4589837Skrisis sent to the peer. This behaviour violates the TLS standard. 4689837Skris 4789837SkrisThe default is normal shutdown behaviour as described by the TLS standard. 4889837Skris 4989837Skris=head1 RETURN VALUES 5089837Skris 5189837SkrisSSL_CTX_set_quiet_shutdown() and SSL_set_quiet_shutdown() do not return 5289837Skrisdiagnostic information. 5389837Skris 5489837SkrisSSL_CTX_get_quiet_shutdown() and SSL_get_quiet_shutdown return the current 5589837Skrissetting. 5689837Skris 5789837Skris=head1 SEE ALSO 5889837Skris 5989837SkrisL<ssl(3)|ssl(3)>, L<SSL_shutdown(3)|SSL_shutdown(3)>, 6089837SkrisL<SSL_set_shutdown(3)|SSL_set_shutdown(3)>, L<SSL_new(3)|SSL_new(3)>, 6189837SkrisL<SSL_clear(3)|SSL_clear(3)>, L<SSL_free(3)|SSL_free(3)> 6289837Skris 6389837Skris=cut 64