SSL_CTX_set_quiet_shutdown.pod 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. =pod
  2. =head1 NAME
  3. SSL_CTX_set_quiet_shutdown, SSL_CTX_get_quiet_shutdown, SSL_set_quiet_shutdown,
  4. SSL_get_quiet_shutdown - manipulate shutdown behaviour
  5. =head1 SYNOPSIS
  6. #include <openssl/ssl.h>
  7. void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);
  8. int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
  9. void SSL_set_quiet_shutdown(SSL *ssl, int mode);
  10. int SSL_get_quiet_shutdown(const SSL *ssl);
  11. =head1 DESCRIPTION
  12. SSL_CTX_set_quiet_shutdown() sets the "quiet shutdown" flag for B<ctx> to be
  13. B<mode>. SSL objects created from B<ctx> inherit the B<mode> valid at the time
  14. L<SSL_new(3)> is called. B<mode> may be 0 or 1.
  15. SSL_CTX_get_quiet_shutdown() returns the "quiet shutdown" setting of B<ctx>.
  16. SSL_set_quiet_shutdown() sets the "quiet shutdown" flag for B<ssl> to be
  17. B<mode>. The setting stays valid until B<ssl> is removed with
  18. L<SSL_free(3)> or SSL_set_quiet_shutdown() is called again.
  19. It is not changed when L<SSL_clear(3)> is called.
  20. B<mode> may be 0 or 1.
  21. SSL_get_quiet_shutdown() returns the "quiet shutdown" setting of B<ssl>.
  22. These functions are not supported for QUIC SSL objects. SSL_set_quiet_shutdown()
  23. has no effect if called on a QUIC SSL object.
  24. =head1 NOTES
  25. Normally when a SSL connection is finished, the parties must send out
  26. close_notify alert messages using L<SSL_shutdown(3)>
  27. for a clean shutdown.
  28. When setting the "quiet shutdown" flag to 1, L<SSL_shutdown(3)>
  29. will set the internal flags to SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.
  30. (L<SSL_shutdown(3)> then behaves like
  31. L<SSL_set_shutdown(3)> called with
  32. SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN.)
  33. The session is thus considered to be shutdown, but no close_notify alert
  34. is sent to the peer. This behaviour violates the TLS standard.
  35. The default is normal shutdown behaviour as described by the TLS standard.
  36. =head1 RETURN VALUES
  37. SSL_CTX_set_quiet_shutdown() and SSL_set_quiet_shutdown() do not return
  38. diagnostic information.
  39. SSL_CTX_get_quiet_shutdown() and SSL_get_quiet_shutdown() return the current
  40. setting.
  41. =head1 SEE ALSO
  42. L<ssl(7)>, L<SSL_shutdown(3)>,
  43. L<SSL_set_shutdown(3)>, L<SSL_new(3)>,
  44. L<SSL_clear(3)>, L<SSL_free(3)>
  45. =head1 COPYRIGHT
  46. Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved.
  47. Licensed under the Apache License 2.0 (the "License"). You may not use
  48. this file except in compliance with the License. You can obtain a copy
  49. in the file LICENSE in the source distribution or at
  50. L<https://www.openssl.org/source/license.html>.
  51. =cut