summaryrefslogtreecommitdiff
path: root/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod
diff options
context:
space:
mode:
authorbeck <>2000-12-15 02:58:47 +0000
committerbeck <>2000-12-15 02:58:47 +0000
commit9200bb13d15da4b2a23e6bc92c20e95b74aa2113 (patch)
tree5c52d628ec1e34be76e7ef2a4235d248b7c44d24 /src/lib/libssl/src/doc/ssl/SSL_shutdown.pod
parente131d25072e3d4197ba4b9bcc0d1b27d34d6488d (diff)
downloadopenbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.gz
openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.tar.bz2
openbsd-9200bb13d15da4b2a23e6bc92c20e95b74aa2113.zip
openssl-engine-0.9.6 merge
Diffstat (limited to 'src/lib/libssl/src/doc/ssl/SSL_shutdown.pod')
-rw-r--r--src/lib/libssl/src/doc/ssl/SSL_shutdown.pod62
1 files changed, 62 insertions, 0 deletions
diff --git a/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod b/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod
new file mode 100644
index 0000000000..20e273bd4d
--- /dev/null
+++ b/src/lib/libssl/src/doc/ssl/SSL_shutdown.pod
@@ -0,0 +1,62 @@
1=pod
2
3=head1 NAME
4
5SSL_shutdown - shut down a TLS/SSL connection
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
11 int SSL_shutdown(SSL *ssl);
12
13=head1 DESCRIPTION
14
15SSL_shutdown() shuts down an active TLS/SSL connection. It sends the shutdown
16alert to the peer. The behaviour of SSL_shutdown() depends on the underlying
17BIO.
18
19If the underlying BIO is B<blocking>, SSL_shutdown() will only return once the
20handshake has been finished or an error occurred.
21
22If the underlying BIO is B<non-blocking>, SSL_shutdown() will also return
23when the underlying BIO could not satisfy the needs of SSL_shutdown()
24to continue the handshake. In this case a call to SSL_get_error() with the
25return value of SSL_shutdown() will yield B<SSL_ERROR_WANT_READ> or
26B<SSL_ERROR_WANT_WRITE>. The calling process then must repeat the call after
27taking appropriate action to satisfy the needs of SSL_shutdown().
28The action depends on the underlying BIO. When using a non-blocking socket,
29nothing is to be done, but select() can be used to check for the required
30condition. When using a buffering BIO, like a BIO pair, data must be written
31into or retrieved out of the BIO before being able to continue.
32
33=head1 RETURN VALUES
34
35The following return values can occur:
36
37=over 4
38
39=item 1
40
41The shutdown was successfully completed.
42
43=item 0
44
45The shutdown was not successful. Call SSL_get_error() with the return
46value B<ret> to find out the reason.
47
48=item -1
49
50The shutdown was not successful because a fatal error occurred either
51at the protocol level or a connection failure occurred. It can also occur of
52action is need to continue the operation for non-blocking BIOs.
53Call SSL_get_error() with the return value B<ret> to find out the reason.
54
55=back
56
57=head1 SEE ALSO
58
59L<SSL_get_error(3)|SSL_get_error(3)>, L<SSL_connect(3)|SSL_connect(3)>,
60L<SSL_accept(3)|SSL_accept(3)>, L<ssl(3)|ssl(3)>, L<bio(3)|bio(3)>
61
62=cut