1SSL_IN_INIT(3)                      OpenSSL                     SSL_IN_INIT(3)
2
3
4

NAME

6       SSL_in_before, SSL_in_init, SSL_is_init_finished, SSL_in_connect_init,
7       SSL_in_accept_init, SSL_get_state - retrieve information about the
8       handshake state machine
9

SYNOPSIS

11        #include <openssl/ssl.h>
12
13        int SSL_in_init(const SSL *s);
14        int SSL_in_before(const SSL *s);
15        int SSL_is_init_finished(const SSL *s);
16
17        int SSL_in_connect_init(SSL *s);
18        int SSL_in_accept_init(SSL *s);
19
20        OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl);
21

DESCRIPTION

23       SSL_in_init() returns 1 if the SSL/TLS state machine is currently
24       processing or awaiting handshake messages, or 0 otherwise.
25
26       SSL_in_before() returns 1 if no SSL/TLS handshake has yet been
27       initiated, or 0 otherwise.
28
29       SSL_is_init_finished() returns 1 if the SSL/TLS connection is in a
30       state where fully protected application data can be transferred or 0
31       otherwise.
32
33       Note that in some circumstances (such as when early data is being
34       transferred) SSL_in_init(), SSL_in_before() and SSL_is_init_finished()
35       can all return 0.
36
37       SSL_in_connect_init() returns 1 if s is acting as a client and
38       SSL_in_init() would return 1, or 0 otherwise.
39
40       SSL_in_accept_init() returns 1 if s is acting as a server and
41       SSL_in_init() would return 1, or 0 otherwise.
42
43       SSL_in_connect_init() and SSL_in_accept_init() are implemented as
44       macros.
45
46       SSL_get_state() returns a value indicating the current state of the
47       handshake state machine. OSSL_HANDSHAKE_STATE is an enumerated type
48       where each value indicates a discrete state machine state. Note that
49       future versions of OpenSSL may define more states so applications
50       should expect to receive unrecognised state values. The naming format
51       is made up of a number of elements as follows:
52
53       protocol_ST_role_message
54
55       protocol is one of TLS or DTLS. DTLS is used where a state is specific
56       to the DTLS protocol. Otherwise TLS is used.
57
58       role is one of CR, CW, SR or SW to indicate "client reading", "client
59       writing", "server reading" or "server writing" respectively.
60
61       message is the name of a handshake message that is being or has been
62       sent, or is being or has been processed.
63
64       Additionally there are some special states that do not conform to the
65       above format. These are:
66
67       TLS_ST_BEFORE
68           No handshake messages have yet been been sent or received.
69
70       TLS_ST_OK
71           Handshake message sending/processing has completed.
72
73       TLS_ST_EARLY_DATA
74           Early data is being processed
75
76       TLS_ST_PENDING_EARLY_DATA_END
77           Awaiting the end of early data processing
78

RETURN VALUES

80       SSL_in_init(), SSL_in_before(), SSL_is_init_finished(),
81       SSL_in_connect_init() and SSL_in_accept_init() return values as
82       indicated above.
83
84       SSL_get_state() returns the current handshake state.
85

SEE ALSO

87       ssl(7), SSL_read_early_data(3)
88
90       Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
91
92       Licensed under the OpenSSL license (the "License").  You may not use
93       this file except in compliance with the License.  You can obtain a copy
94       in the file LICENSE in the source distribution or at
95       <https://www.openssl.org/source/license.html>.
96
97
98
991.1.1l                            2021-09-15                    SSL_IN_INIT(3)
Impressum