SSL_CTX_set_quiet_shutdown.pod 2.3 KB

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