xref: /openbsd-src/lib/libssl/man/SSL_rstate_string.3 (revision 10e00d1796876719ecd5784348f9f4f2b3dd83c5)
1*10e00d17Sschwarze.\"	$OpenBSD: SSL_rstate_string.3,v 1.4 2018/03/27 17:35:50 schwarze Exp $
26f246b13Sschwarze.\"	OpenSSL b97fdb57 Nov 11 09:33:09 2016 +0100
3f1a3c524Sschwarze.\"
46f246b13Sschwarze.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
56f246b13Sschwarze.\" Copyright (c) 2001 The OpenSSL Project.  All rights reserved.
6f1a3c524Sschwarze.\"
76f246b13Sschwarze.\" Redistribution and use in source and binary forms, with or without
86f246b13Sschwarze.\" modification, are permitted provided that the following conditions
96f246b13Sschwarze.\" are met:
106f246b13Sschwarze.\"
116f246b13Sschwarze.\" 1. Redistributions of source code must retain the above copyright
126f246b13Sschwarze.\"    notice, this list of conditions and the following disclaimer.
136f246b13Sschwarze.\"
146f246b13Sschwarze.\" 2. Redistributions in binary form must reproduce the above copyright
156f246b13Sschwarze.\"    notice, this list of conditions and the following disclaimer in
166f246b13Sschwarze.\"    the documentation and/or other materials provided with the
176f246b13Sschwarze.\"    distribution.
186f246b13Sschwarze.\"
196f246b13Sschwarze.\" 3. All advertising materials mentioning features or use of this
206f246b13Sschwarze.\"    software must display the following acknowledgment:
216f246b13Sschwarze.\"    "This product includes software developed by the OpenSSL Project
226f246b13Sschwarze.\"    for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
236f246b13Sschwarze.\"
246f246b13Sschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
256f246b13Sschwarze.\"    endorse or promote products derived from this software without
266f246b13Sschwarze.\"    prior written permission. For written permission, please contact
276f246b13Sschwarze.\"    openssl-core@openssl.org.
286f246b13Sschwarze.\"
296f246b13Sschwarze.\" 5. Products derived from this software may not be called "OpenSSL"
306f246b13Sschwarze.\"    nor may "OpenSSL" appear in their names without prior written
316f246b13Sschwarze.\"    permission of the OpenSSL Project.
326f246b13Sschwarze.\"
336f246b13Sschwarze.\" 6. Redistributions of any form whatsoever must retain the following
346f246b13Sschwarze.\"    acknowledgment:
356f246b13Sschwarze.\"    "This product includes software developed by the OpenSSL Project
366f246b13Sschwarze.\"    for use in the OpenSSL Toolkit (http://www.openssl.org/)"
376f246b13Sschwarze.\"
386f246b13Sschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
396f246b13Sschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
406f246b13Sschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
416f246b13Sschwarze.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR
426f246b13Sschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
436f246b13Sschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
446f246b13Sschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
456f246b13Sschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
466f246b13Sschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
476f246b13Sschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
486f246b13Sschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
496f246b13Sschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE.
506f246b13Sschwarze.\"
51*10e00d17Sschwarze.Dd $Mdocdate: March 27 2018 $
52f1a3c524Sschwarze.Dt SSL_RSTATE_STRING 3
53f1a3c524Sschwarze.Os
54f1a3c524Sschwarze.Sh NAME
55f1a3c524Sschwarze.Nm SSL_rstate_string ,
56f1a3c524Sschwarze.Nm SSL_rstate_string_long
57f1a3c524Sschwarze.Nd get textual description of state of an SSL object during read operation
58f1a3c524Sschwarze.Sh SYNOPSIS
59f1a3c524Sschwarze.In openssl/ssl.h
60f1a3c524Sschwarze.Ft const char *
61f1a3c524Sschwarze.Fn SSL_rstate_string "SSL *ssl"
62f1a3c524Sschwarze.Ft const char *
63f1a3c524Sschwarze.Fn SSL_rstate_string_long "SSL *ssl"
64f1a3c524Sschwarze.Sh DESCRIPTION
65f1a3c524Sschwarze.Fn SSL_rstate_string
66f1a3c524Sschwarzereturns a 2-letter string indicating the current read state of the
67f1a3c524Sschwarze.Vt SSL
68f1a3c524Sschwarzeobject
69f1a3c524Sschwarze.Fa ssl .
70f1a3c524Sschwarze.Pp
71f1a3c524Sschwarze.Fn SSL_rstate_string_long
72f1a3c524Sschwarzereturns a string indicating the current read state of the
73f1a3c524Sschwarze.Vt SSL
74f1a3c524Sschwarzeobject
75f1a3c524Sschwarze.Fa ssl .
766f246b13Sschwarze.Pp
77f1a3c524SschwarzeWhen performing a read operation, the SSL/TLS engine must parse the record,
78f1a3c524Sschwarzeconsisting of header and body.
79f1a3c524SschwarzeWhen working in a blocking environment,
80f1a3c524Sschwarze.Fn SSL_rstate_string[_long]
81f1a3c524Sschwarzeshould always return
82f1a3c524Sschwarze.Qo RD Qc Ns / Ns Qo read done Qc .
83f1a3c524Sschwarze.Pp
84f1a3c524SschwarzeThis function should only seldom be needed in applications.
85f1a3c524Sschwarze.Sh RETURN VALUES
86f1a3c524Sschwarze.Fn SSL_rstate_string
87f1a3c524Sschwarzeand
88f1a3c524Sschwarze.Fn SSL_rstate_string_long
89f1a3c524Sschwarzecan return the following values:
90f1a3c524Sschwarze.Bl -tag -width Ds
91f1a3c524Sschwarze.It Qo RH Qc Ns / Ns Qo read header Qc
92f1a3c524SschwarzeThe header of the record is being evaluated.
93f1a3c524Sschwarze.It Qo RB Qc Ns / Ns Qo read body Qc
94f1a3c524SschwarzeThe body of the record is being evaluated.
95f1a3c524Sschwarze.It Qo RD Qc Ns / Ns Qo read done Qc
96f1a3c524SschwarzeThe record has been completely processed.
97f1a3c524Sschwarze.It Qo unknown Qc Ns / Ns Qo unknown Qc
98f1a3c524SschwarzeThe read state is unknown.
99f1a3c524SschwarzeThis should never happen.
100f1a3c524Sschwarze.El
101f1a3c524Sschwarze.Sh SEE ALSO
102f1a3c524Sschwarze.Xr ssl 3
1038fba1ec8Sschwarze.Sh HISTORY
1048fba1ec8Sschwarze.Fn SSL_rstate_string
1058fba1ec8Sschwarzeand
1068fba1ec8Sschwarze.Fn SSL_rstate_string_long
107*10e00d17Sschwarzefirst appeared in SSLeay 0.6.0 and have been available since
1088fba1ec8Sschwarze.Ox 2.4 .
109