
#use wml::openssl-macros area=docs page=SSL_state_string

<title>Documents, SSL_state_string(3)</title>

<h1>SSL_state_string(3)</h1>

#use wml::imp::generic

{:
## What's this? [[s|(<STRONG>[^<].+?)</A>(</STRONG><DD>)|$1$2|sg]]
[[s|<P>\s+<P>|<P>|sg]]
[[s|<P>\s+</|</|sg]]
[[s|<DD>\s*<DT>|<DD>&nbsp;<DT>|sg]]
[[s|<DD>\s*</DL>|<DD>&nbsp;</DL>|sg]]
[[s|\[|&#91;|sg]]
[[s|\]|&#93;|sg]]

<!-- INDEX BEGIN -->

<UL>

	<LI><A HREF="#NAME">NAME</A>
	<LI><A HREF="#SYNOPSIS">SYNOPSIS</A>
	<LI><A HREF="#DESCRIPTION">DESCRIPTION</A>
	<LI><A HREF="#NOTES">NOTES</A>
	<LI><A HREF="#RETURN_VALUES">RETURN VALUES</A>
	<LI><A HREF="#SEE_ALSO">SEE ALSO</A>
</UL>
<!-- INDEX END -->

<HR>
<P>
<HR>
<H1><A NAME="NAME">NAME</A></H1>
<P>
SSL_state_string, SSL_state_string_long - get textual description of state
of an SSL object

</P>
<P>
<HR>
<H1><A NAME="SYNOPSIS">SYNOPSIS</A></H1>
<PRE> #include &lt;openssl/ssl.h&gt;
</PRE>
<PRE> const char *SSL_state_string(const SSL *ssl);
 const char *SSL_state_string_long(const SSL *ssl);
</PRE>
<P>
<HR>
<H1><A NAME="DESCRIPTION">DESCRIPTION</A></H1>
<P>
<CODE>SSL_state_string()</CODE> returns a 6 letter string indicating the
current state of the SSL object <STRONG>ssl</STRONG>.

</P>
<P>
<CODE>SSL_state_string_long()</CODE> returns a string indicating the
current state of the SSL object <STRONG>ssl</STRONG>.

</P>
<P>
<HR>
<H1><A NAME="NOTES">NOTES</A></H1>
<P>
During its use, an SSL objects passes several states. The state is
internally maintained. Querying the state information is not very
informative before or when a connection has been established. It however
can be of significant interest during the handshake.

</P>
<P>
When using non-blocking sockets, the function call performing the handshake
may return with SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE condition, so
that SSL_state_string[_long]() may be called.

</P>
<P>
For both blocking or non-blocking sockets, the details state information
can be used within the info_callback function set with the
<CODE>SSL_set_info_callback()</CODE> call.

</P>
<P>
<HR>
<H1><A NAME="RETURN_VALUES">RETURN VALUES</A></H1>
<P>
Detailed description of possible states to be included later.

</P>
<P>
<HR>
<H1><A NAME="SEE_ALSO">SEE ALSO</A></H1>
<P>
<A HREF="../ssl/ssl.html#">ssl(3)</A>, <A HREF="../ssl/SSL_CTX_set_info_callback.html#">SSL_CTX_set_info_callback(3)</A>



</P>
:}


