summaryrefslogtreecommitdiff
path: root/src/lib/libssl/doc/SSL_set_shutdown.3
diff options
context:
space:
mode:
authorbentley <>2014-10-12 09:33:04 +0000
committerbentley <>2014-10-12 09:33:04 +0000
commit82b7f378b6907ab315a6e50322d2a0a8794a0aa9 (patch)
treea5087bf8d016a6041c2b6822fbecfd8f6c5e70b1 /src/lib/libssl/doc/SSL_set_shutdown.3
parent0a63f0cf49369e1926567ab62e04e3355cedf0cd (diff)
downloadopenbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.tar.gz
openbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.tar.bz2
openbsd-82b7f378b6907ab315a6e50322d2a0a8794a0aa9.zip
Convert libssl manpages from pod to mdoc(7).
libcrypto has not been started yet. ok schwarze@ miod@
Diffstat (limited to 'src/lib/libssl/doc/SSL_set_shutdown.3')
-rw-r--r--src/lib/libssl/doc/SSL_set_shutdown.385
1 files changed, 85 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_set_shutdown.3 b/src/lib/libssl/doc/SSL_set_shutdown.3
new file mode 100644
index 0000000000..239bbd6801
--- /dev/null
+++ b/src/lib/libssl/doc/SSL_set_shutdown.3
@@ -0,0 +1,85 @@
1.Dd $Mdocdate: October 12 2014 $
2.Dt SSL_SET_SHUTDOWN 3
3.Os
4.Sh NAME
5.Nm SSL_set_shutdown ,
6.Nm SSL_get_shutdown
7.Nd manipulate shutdown state of an SSL connection
8.Sh SYNOPSIS
9.In openssl/ssl.h
10.Ft void
11.Fn SSL_set_shutdown "SSL *ssl" "int mode"
12.Ft int
13.Fn SSL_get_shutdown "const SSL *ssl"
14.Sh DESCRIPTION
15.Fn SSL_set_shutdown
16sets the shutdown state of
17.Fa ssl
18to
19.Fa mode .
20.Pp
21.Fn SSL_get_shutdown
22returns the shutdown mode of
23.Fa ssl .
24.Sh NOTES
25The shutdown state of an ssl connection is a bitmask of:
26.Bl -tag -width Ds
27.It 0
28No shutdown setting, yet.
29.It Dv SSL_SENT_SHUTDOWN
30A
31.Dq close notify
32shutdown alert was sent to the peer; the connection is being considered closed
33and the session is closed and correct.
34.It Dv SSL_RECEIVED_SHUTDOWN
35A shutdown alert was received form the peer, either a normal
36.Dq close notify
37or a fatal error.
38.El
39.Pp
40.Dv SSL_SENT_SHUTDOWN
41and
42.Dv SSL_RECEIVED_SHUTDOWN
43can be set at the same time.
44.Pp
45The shutdown state of the connection is used to determine the state of the
46.Fa ssl
47session.
48If the session is still open when
49.Xr SSL_clear 3
50or
51.Xr SSL_free 3
52is called, it is considered bad and removed according to RFC2246.
53The actual condition for a correctly closed session is
54.Dv SSL_SENT_SHUTDOWN
55(according to the TLS RFC, it is acceptable to only send the
56.Dq close notify
57alert but to not wait for the peer's answer when the underlying connection is
58closed).
59.Fn SSL_set_shutdown
60can be used to set this state without sending a close alert to the peer (see
61.Xr SSL_shutdown 3 ) .
62.Pp
63If a
64.Dq close notify
65was received,
66.Dv SSL_RECEIVED_SHUTDOWN
67will be set, but to set
68.Dv SSL_SENT_SHUTDOWN
69the application must still call
70.Xr SSL_shutdown 3
71or
72.Fn SSL_set_shutdown
73itself.
74.Sh RETURN VALUES
75.Fn SSL_set_shutdown
76does not return diagnostic information.
77.Pp
78.Fn SSL_get_shutdown
79returns the current setting.
80.Sh SEE ALSO
81.Xr ssl 3 ,
82.Xr SSL_clear 3 ,
83.Xr SSL_CTX_set_quiet_shutdown 3 ,
84.Xr SSL_free 3 ,
85.Xr SSL_shutdown 3