xref: /freebsd/crypto/openssl/doc/man3/SSL_state_string.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk KimSSL_state_string, SSL_state_string_long - get textual description of state of an SSL object
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/ssl.h>
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim const char *SSL_state_string(const SSL *ssl);
12e71b7053SJung-uk Kim const char *SSL_state_string_long(const SSL *ssl);
13e71b7053SJung-uk Kim
14e71b7053SJung-uk Kim=head1 DESCRIPTION
15e71b7053SJung-uk Kim
16*b077aed3SPierre ProncherySSL_state_string() returns an abbreviated string indicating the current state
17*b077aed3SPierre Proncheryof the SSL object B<ssl>. The returned NUL-terminated string contains 6 or fewer characters.
18e71b7053SJung-uk Kim
19*b077aed3SPierre ProncherySSL_state_string_long() returns a descriptive string indicating the current state of
20e71b7053SJung-uk Kimthe SSL object B<ssl>.
21e71b7053SJung-uk Kim
22e71b7053SJung-uk Kim=head1 NOTES
23e71b7053SJung-uk Kim
24e71b7053SJung-uk KimDuring its use, an SSL objects passes several states. The state is internally
25e71b7053SJung-uk Kimmaintained. Querying the state information is not very informative before
26e71b7053SJung-uk Kimor when a connection has been established. It however can be of significant
27e71b7053SJung-uk Kiminterest during the handshake.
28e71b7053SJung-uk Kim
2958f35182SJung-uk KimWhen using nonblocking sockets, the function call performing the handshake
30e71b7053SJung-uk Kimmay return with SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE condition,
31e71b7053SJung-uk Kimso that SSL_state_string[_long]() may be called.
32e71b7053SJung-uk Kim
3358f35182SJung-uk KimFor both blocking or nonblocking sockets, the details state information
34e71b7053SJung-uk Kimcan be used within the info_callback function set with the
35e71b7053SJung-uk KimSSL_set_info_callback() call.
36e71b7053SJung-uk Kim
37e71b7053SJung-uk Kim=head1 RETURN VALUES
38e71b7053SJung-uk Kim
39e71b7053SJung-uk KimDetailed description of possible states to be included later.
40e71b7053SJung-uk Kim
41e71b7053SJung-uk Kim=head1 SEE ALSO
42e71b7053SJung-uk Kim
43e71b7053SJung-uk KimL<ssl(7)>, L<SSL_CTX_set_info_callback(3)>
44e71b7053SJung-uk Kim
45e71b7053SJung-uk Kim=head1 COPYRIGHT
46e71b7053SJung-uk Kim
47*b077aed3SPierre ProncheryCopyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved.
48e71b7053SJung-uk Kim
49*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
50e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
51e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
52e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
53e71b7053SJung-uk Kim
54e71b7053SJung-uk Kim=cut
55