Blame doc/man3/SSL_in_init.pod

Packit c4476c
=pod
Packit c4476c
Packit c4476c
=head1 NAME
Packit c4476c
Packit c4476c
SSL_in_before,
Packit c4476c
SSL_in_init,
Packit c4476c
SSL_is_init_finished,
Packit c4476c
SSL_in_connect_init,
Packit c4476c
SSL_in_accept_init,
Packit c4476c
SSL_get_state
Packit c4476c
- retrieve information about the handshake state machine
Packit c4476c
Packit c4476c
=head1 SYNOPSIS
Packit c4476c
Packit c4476c
 #include <openssl/ssl.h>
Packit c4476c
Packit c4476c
 int SSL_in_init(const SSL *s);
Packit c4476c
 int SSL_in_before(const SSL *s);
Packit c4476c
 int SSL_is_init_finished(const SSL *s);
Packit c4476c
Packit c4476c
 int SSL_in_connect_init(SSL *s);
Packit c4476c
 int SSL_in_accept_init(SSL *s);
Packit c4476c
Packit c4476c
 OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl);
Packit c4476c
Packit c4476c
=head1 DESCRIPTION
Packit c4476c
Packit c4476c
SSL_in_init() returns 1 if the SSL/TLS state machine is currently processing or
Packit c4476c
awaiting handshake messages, or 0 otherwise.
Packit c4476c
Packit c4476c
SSL_in_before() returns 1 if no SSL/TLS handshake has yet been initiated, or 0
Packit c4476c
otherwise.
Packit c4476c
Packit c4476c
SSL_is_init_finished() returns 1 if the SSL/TLS connection is in a state where
Packit c4476c
fully protected application data can be transferred or 0 otherwise.
Packit c4476c
Packit c4476c
Note that in some circumstances (such as when early data is being transferred)
Packit c4476c
SSL_in_init(), SSL_in_before() and SSL_is_init_finished() can all return 0.
Packit c4476c
Packit c4476c
SSL_in_connect_init() returns 1 if B<s> is acting as a client and SSL_in_init()
Packit c4476c
would return 1, or 0 otherwise.
Packit c4476c
Packit c4476c
SSL_in_accept_init() returns 1 if B<s> is acting as a server and SSL_in_init()
Packit c4476c
would return 1, or 0 otherwise.
Packit c4476c
Packit c4476c
SSL_in_connect_init() and SSL_in_accept_init() are implemented as macros.
Packit c4476c
Packit c4476c
SSL_get_state() returns a value indicating the current state of the handshake
Packit c4476c
state machine. OSSL_HANDSHAKE_STATE is an enumerated type where each value
Packit c4476c
indicates a discrete state machine state. Note that future versions of OpenSSL
Packit c4476c
may define more states so applications should expect to receive unrecognised
Packit c4476c
state values. The naming format is made up of a number of elements as follows:
Packit c4476c
Packit c4476c
B<protocol>_ST_B<role>_B<message>
Packit c4476c
Packit c4476c
B<protocol> is one of TLS or DTLS. DTLS is used where a state is specific to the
Packit c4476c
DTLS protocol. Otherwise TLS is used.
Packit c4476c
Packit c4476c
B<role> is one of CR, CW, SR or SW to indicate "client reading",
Packit c4476c
"client writing", "server reading" or "server writing" respectively.
Packit c4476c
Packit c4476c
B<message> is the name of a handshake message that is being or has been sent, or
Packit c4476c
is being or has been processed.
Packit c4476c
Packit c4476c
Additionally there are some special states that do not conform to the above
Packit c4476c
format. These are:
Packit c4476c
Packit c4476c
=over 4
Packit c4476c
Packit c4476c
=item TLS_ST_BEFORE
Packit c4476c
Packit c4476c
No handshake messages have yet been been sent or received.
Packit c4476c
Packit c4476c
=item TLS_ST_OK
Packit c4476c
Packit c4476c
Handshake message sending/processing has completed.
Packit c4476c
Packit c4476c
=item TLS_ST_EARLY_DATA
Packit c4476c
Packit c4476c
Early data is being processed
Packit c4476c
Packit c4476c
=item TLS_ST_PENDING_EARLY_DATA_END
Packit c4476c
Packit c4476c
Awaiting the end of early data processing
Packit c4476c
Packit c4476c
=back
Packit c4476c
Packit c4476c
=head1 RETURN VALUES
Packit c4476c
Packit c4476c
SSL_in_init(), SSL_in_before(), SSL_is_init_finished(), SSL_in_connect_init()
Packit c4476c
and SSL_in_accept_init() return values as indicated above.
Packit c4476c
Packit c4476c
SSL_get_state() returns the current handshake state.
Packit c4476c
Packit c4476c
Packit c4476c
=head1 SEE ALSO
Packit c4476c
Packit c4476c
L<ssl(7)>,
Packit c4476c
L<SSL_read_early_data(3)>
Packit c4476c
Packit c4476c
=head1 COPYRIGHT
Packit c4476c
Packit c4476c
Copyright 2017-2018 The OpenSSL Project Authors. All Rights Reserved.
Packit c4476c
Packit c4476c
Licensed under the OpenSSL license (the "License").  You may not use
Packit c4476c
this file except in compliance with the License.  You can obtain a copy
Packit c4476c
in the file LICENSE in the source distribution or at
Packit c4476c
L<https://www.openssl.org/source/license.html>.
Packit c4476c
Packit c4476c
=cut