1 .\" $OpenBSD: SSL_get_state.3,v 1.1 2016/12/10 13:54:32 schwarze Exp $
3 .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .Dd $Mdocdate: December 10 2016 $
23 .Nm SSL_in_accept_init ,
25 .Nm SSL_in_connect_init ,
27 .Nm SSL_is_init_finished
28 .Nd inspect the state of the SSL state machine
40 .Fo SSL_in_accept_init
48 .Fo SSL_in_connect_init
56 .Fo SSL_is_init_finished
61 returns an encoded representation of the current state of the SSL
64 is a deprecated alias for
67 The following bits may be set:
73 .Xr SSL_set_accept_state 3 .
76 is set up for server mode and no client initiated the TLS handshake yet.
78 .Fn SSL_in_accept_init
79 returns non-zero if this bit is set or 0 otherwise.
81 This bit is set by the
84 .Xr SSL_set_accept_state 3 ,
86 .Xr SSL_set_connect_state 3
88 It indicates that the TLS handshake was not initiated yet.
91 returns non-zero if this bit is set or 0 otherwise.
96 .Xr SSL_set_connect_state 3 .
99 is set up for client mode and no TLS handshake was initiated yet.
101 .Fn SSL_in_connect_init
102 returns non-zero if this bit is set or 0 otherwise.
105 The following masks can be used:
115 returns a non-zero value if one of these is set or 0 otherwise.
117 This mask includes all bits except
123 The state is set to this value when a connection is established.
125 .Fn SSL_is_init_finished
126 returns a non-zero value if the state equals this constant, or 0 otherwise.
127 .It Dv SSL_ST_RENEGOTIATE
128 The program is about to renegotiate, for example when entering
133 .Xr SSL_renegotiate 3
137 The meaning of other bits is protocol-dependent.
138 Application programs usually do not need to inspect any of those
141 All these functions may be implemented as macros.
143 .Xr SSL_renegotiate 3 ,
144 .Xr SSL_set_connect_state 3
146 These functions are available in all versions of OpenSSL.