xref: /openssl/doc/man3/SSL_rstate_string.pod (revision da1c088f)
1=pod
2
3=head1 NAME
4
5SSL_rstate_string, SSL_rstate_string_long - get textual description of state of an SSL object during read operation
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
11 const char *SSL_rstate_string(SSL *ssl);
12 const char *SSL_rstate_string_long(SSL *ssl);
13
14=head1 DESCRIPTION
15
16SSL_rstate_string() returns a 2 letter string indicating the current read state
17of the SSL object B<ssl>.
18
19SSL_rstate_string_long() returns a string indicating the current read state of
20the SSL object B<ssl>.
21
22=head1 NOTES
23
24When performing a read operation, the SSL/TLS engine must parse the record,
25consisting of header and body. When working in a blocking environment,
26SSL_rstate_string[_long]() should always return "RD"/"read done".
27
28This function should only seldom be needed in applications.
29
30=head1 RETURN VALUES
31
32SSL_rstate_string() and SSL_rstate_string_long() can return the following
33values:
34
35=over 4
36
37=item "RH"/"read header"
38
39The header of the record is being evaluated.
40
41=item "RB"/"read body"
42
43The body of the record is being evaluated.
44
45=item "unknown"/"unknown"
46
47The read state is unknown. This should never happen.
48
49=back
50
51When used with QUIC SSL objects, these functions always return "RH"/"read
52header" in normal conditions.
53
54=head1 SEE ALSO
55
56L<ssl(7)>
57
58=head1 COPYRIGHT
59
60Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved.
61
62Licensed under the Apache License 2.0 (the "License").  You may not use
63this file except in compliance with the License.  You can obtain a copy
64in the file LICENSE in the source distribution or at
65L<https://www.openssl.org/source/license.html>.
66
67=cut
68