Changeset 94082 in vbox for trunk/src/libs/openssl-3.0.1/doc/man3/SSL_shutdown.pod
- Timestamp:
- Mar 3, 2022 7:17:34 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150325
- Location:
- trunk/src/libs/openssl-3.0.1
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.1
- Property svn:mergeinfo
-
old new 12 12 /vendor/openssl/1.1.1c:131722-131725 13 13 /vendor/openssl/1.1.1k:145841-145843 14 /vendor/openssl/3.0.1:150323-150324 15 /vendor/openssl/current:147554-150322
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.1/doc/man3/SSL_shutdown.pod
r91772 r94082 15 15 SSL_shutdown() shuts down an active TLS/SSL connection. It sends the 16 16 close_notify shutdown alert to the peer. 17 18 =head1 NOTES19 17 20 18 SSL_shutdown() tries to send the close_notify shutdown alert to the peer. … … 52 50 It is not possible to call SSL_write() after calling SSL_shutdown(). 53 51 The read direction is closed by the peer. 52 53 The behaviour of SSL_shutdown() additionally depends on the underlying BIO. 54 If the underlying BIO is B<blocking>, SSL_shutdown() will only return once the 55 handshake step has been finished or an error occurred. 56 57 If the underlying BIO is B<nonblocking>, SSL_shutdown() will also return 58 when the underlying BIO could not satisfy the needs of SSL_shutdown() 59 to continue the handshake. In this case a call to SSL_get_error() with the 60 return value of SSL_shutdown() will yield B<SSL_ERROR_WANT_READ> or 61 B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after 62 taking appropriate action to satisfy the needs of SSL_shutdown(). 63 The action depends on the underlying BIO. When using a nonblocking socket, 64 nothing is to be done, but select() can be used to check for the required 65 condition. When using a buffering BIO, like a BIO pair, data must be written 66 into or retrieved out of the BIO before being able to continue. 67 68 After SSL_shutdown() returned 0, it is possible to call SSL_shutdown() again 69 to wait for the peer's close_notify alert. 70 SSL_shutdown() will return 1 in that case. 71 However, it is recommended to wait for it using SSL_read() instead. 72 73 SSL_shutdown() can be modified to only set the connection to "shutdown" 74 state but not actually send the close_notify alert messages, 75 see L<SSL_CTX_set_quiet_shutdown(3)>. 76 When "quiet shutdown" is enabled, SSL_shutdown() will always succeed 77 and return 1. 78 Note that this is not standard compliant behaviour. 79 It should only be done when the peer has a way to make sure all 80 data has been received and doesn't wait for the close_notify alert 81 message, otherwise an unexpected EOF will be reported. 82 83 There are implementations that do not send the required close_notify alert. 84 If there is a need to communicate with such an implementation, and it's clear 85 that all data has been received, do not wait for the peer's close_notify alert. 86 Waiting for the close_notify alert when the peer just closes the connection 87 will result in an error being generated. 88 The error can be ignored using the B<SSL_OP_IGNORE_UNEXPECTED_EOF>. 89 For more information see L<SSL_CTX_set_options(3)>. 54 90 55 91 =head2 First to close the connection … … 90 126 SSL_get_shutdown() (see also L<SSL_set_shutdown(3)> call. 91 127 92 =head1 NOTES93 94 The behaviour of SSL_shutdown() additionally depends on the underlying BIO.95 If the underlying BIO is B<blocking>, SSL_shutdown() will only return once the96 handshake step has been finished or an error occurred.97 98 If the underlying BIO is B<nonblocking>, SSL_shutdown() will also return99 when the underlying BIO could not satisfy the needs of SSL_shutdown()100 to continue the handshake. In this case a call to SSL_get_error() with the101 return value of SSL_shutdown() will yield B<SSL_ERROR_WANT_READ> or102 B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after103 taking appropriate action to satisfy the needs of SSL_shutdown().104 The action depends on the underlying BIO. When using a nonblocking socket,105 nothing is to be done, but select() can be used to check for the required106 condition. When using a buffering BIO, like a BIO pair, data must be written107 into or retrieved out of the BIO before being able to continue.108 109 After SSL_shutdown() returned 0, it is possible to call SSL_shutdown() again110 to wait for the peer's close_notify alert.111 SSL_shutdown() will return 1 in that case.112 However, it is recommended to wait for it using SSL_read() instead.113 114 SSL_shutdown() can be modified to only set the connection to "shutdown"115 state but not actually send the close_notify alert messages,116 see L<SSL_CTX_set_quiet_shutdown(3)>.117 When "quiet shutdown" is enabled, SSL_shutdown() will always succeed118 and return 1.119 Note that this is not standard compliant behaviour.120 It should only be done when the peer has a way to make sure all121 data has been received and doesn't wait for the close_notify alert122 message, otherwise an unexpected EOF will be reported.123 124 There are implementations that do not send the required close_notify alert.125 If there is a need to communicate with such an implementation, and it's clear126 that all data has been received, do not wait for the peer's close_notify alert.127 Waiting for the close_notify alert when the peer just closes the connection will128 result in an error being generated.129 130 128 =head1 RETURN VALUES 131 129 … … 164 162 L<SSL_get_error(3)>, L<SSL_connect(3)>, 165 163 L<SSL_accept(3)>, L<SSL_set_shutdown(3)>, 166 L<SSL_CTX_set_quiet_shutdown(3)>, 164 L<SSL_CTX_set_quiet_shutdown(3)>, L<SSL_CTX_set_options(3)> 167 165 L<SSL_clear(3)>, L<SSL_free(3)>, 168 166 L<ssl(7)>, L<bio(7)> … … 172 170 Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. 173 171 174 Licensed under the OpenSSL license(the "License"). You may not use172 Licensed under the Apache License 2.0 (the "License"). You may not use 175 173 this file except in compliance with the License. You can obtain a copy 176 174 in the file LICENSE in the source distribution or at
Note:
See TracChangeset
for help on using the changeset viewer.