SSL_GET_STATE(3) | Library Functions Manual | SSL_GET_STATE(3) |
SSL_get_state
,
SSL_state
,
SSL_in_accept_init
,
SSL_in_before
,
SSL_in_connect_init
,
SSL_in_init
,
SSL_is_init_finished
—
inspect the state of the SSL state machine
#include
<openssl/ssl.h>
int
SSL_get_state
(const SSL
*ssl);
int
SSL_state
(const SSL *ssl);
int
SSL_in_accept_init
(const SSL
*ssl);
int
SSL_in_before
(const SSL
*ssl);
int
SSL_in_connect_init
(const SSL
*ssl);
int
SSL_in_init
(const SSL *ssl);
int
SSL_is_init_finished
(const SSL
*ssl);
SSL_get_state
()
returns an encoded representation of the current state of the SSL state
machine.
SSL_state
()
is a deprecated alias for SSL_get_state
().
The following bits may be set:
SSL_ST_ACCEPT
SSL_in_accept_init
()
returns non-zero if this bit is set or 0 otherwise.SSL_ST_BEFORE
SSL_in_before
()
returns non-zero if this bit is set or 0 otherwise.SSL_ST_CONNECT
SSL_in_connect_init
()
returns non-zero if this bit is set or 0 otherwise.The following masks can be used:
SSL_ST_INIT
SSL_ST_ACCEPT
or
SSL_ST_CONNECT
is set. The function
SSL_in_init
()
returns a non-zero value if one of these is set or 0 otherwise.SSL_ST_MASK
SSL_ST_ACCEPT
,
SSL_ST_BEFORE
, and
SSL_ST_CONNECT
.SSL_ST_OK
SSL_is_init_finished
()
returns a non-zero value if the state equals this constant, or 0
otherwise.SSL_ST_RENEGOTIATE
The meaning of other bits is protocol-dependent. Application programs usually do not need to inspect any of those other bits.
All these functions may be implemented as macros.
These functions are available in all versions of OpenSSL.
December 10, 2016 | OpenBSD-6.1 |