openssl-prebuild/linux_amd64/ssl/share/doc/openssl/html/man3/SSL_want.html

160 lines
5.5 KiB
HTML
Executable File

<?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SSL_want</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body style="background-color: white">
<!-- INDEX BEGIN -->
<div name="index">
<p><a name="__index__"></a></p>
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#notes">NOTES</a></li>
<li><a href="#return_values">RETURN VALUES</a></li>
<li><a href="#see_also">SEE ALSO</a></li>
<li><a href="#history">HISTORY</a></li>
<li><a href="#copyright">COPYRIGHT</a></li>
</ul>
<hr name="index" />
</div>
<!-- INDEX END -->
<p>
</p>
<hr />
<h1><a name="name">NAME</a></h1>
<p>SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup,
SSL_want_async, SSL_want_async_job, SSL_want_client_hello_cb - obtain state
information TLS/SSL I/O operation</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
#include &lt;openssl/ssl.h&gt;</pre>
<pre>
int SSL_want(const SSL *ssl);
int SSL_want_nothing(const SSL *ssl);
int SSL_want_read(const SSL *ssl);
int SSL_want_write(const SSL *ssl);
int SSL_want_x509_lookup(const SSL *ssl);
int SSL_want_async(const SSL *ssl);
int SSL_want_async_job(const SSL *ssl);
int SSL_want_client_hello_cb(const SSL *ssl);</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p><code>SSL_want()</code> returns state information for the SSL object <strong>ssl</strong>.</p>
<p>The other SSL_want_*() calls are shortcuts for the possible states returned
by <code>SSL_want()</code>.</p>
<p>
</p>
<hr />
<h1><a name="notes">NOTES</a></h1>
<p><code>SSL_want()</code> examines the internal state information of the SSL object. Its
return values are similar to that of <em>SSL_get_error(3)</em>.
Unlike <em>SSL_get_error(3)</em>, which also evaluates the
error queue, the results are obtained by examining an internal state flag
only. The information must therefore only be used for normal operation under
non-blocking I/O. Error conditions are not handled and must be treated
using <em>SSL_get_error(3)</em>.</p>
<p>The result returned by <code>SSL_want()</code> should always be consistent with
the result of <em>SSL_get_error(3)</em>.</p>
<p>
</p>
<hr />
<h1><a name="return_values">RETURN VALUES</a></h1>
<p>The following return values can currently occur for SSL_want():</p>
<dl>
<dt><strong><a name="ssl_nothing" class="item">SSL_NOTHING</a></strong></dt>
<dd>
<p>There is no data to be written or to be read.</p>
</dd>
<dt><strong><a name="ssl_writing" class="item">SSL_WRITING</a></strong></dt>
<dd>
<p>There are data in the SSL buffer that must be written to the underlying
<strong>BIO</strong> layer in order to complete the actual SSL_*() operation.
A call to <em>SSL_get_error(3)</em> should return
SSL_ERROR_WANT_WRITE.</p>
</dd>
<dt><strong><a name="ssl_reading" class="item">SSL_READING</a></strong></dt>
<dd>
<p>More data must be read from the underlying <strong>BIO</strong> layer in order to
complete the actual SSL_*() operation.
A call to <em>SSL_get_error(3)</em> should return
SSL_ERROR_WANT_READ.</p>
</dd>
<dt><strong><a name="ssl_x509_lookup" class="item">SSL_X509_LOOKUP</a></strong></dt>
<dd>
<p>The operation did not complete because an application callback set by
<code>SSL_CTX_set_client_cert_cb()</code> has asked to be called again.
A call to <em>SSL_get_error(3)</em> should return
SSL_ERROR_WANT_X509_LOOKUP.</p>
</dd>
<dt><strong><a name="ssl_async_paused" class="item">SSL_ASYNC_PAUSED</a></strong></dt>
<dd>
<p>An asynchronous operation partially completed and was then paused. See
<em>SSL_get_all_async_fds(3)</em>. A call to <em>SSL_get_error(3)</em> should return
SSL_ERROR_WANT_ASYNC.</p>
</dd>
<dt><strong><a name="ssl_async_no_jobs" class="item">SSL_ASYNC_NO_JOBS</a></strong></dt>
<dd>
<p>The asynchronous job could not be started because there were no async jobs
available in the pool (see ASYNC_init_thread(3)). A call to <em>SSL_get_error(3)</em>
should return SSL_ERROR_WANT_ASYNC_JOB.</p>
</dd>
<dt><strong><a name="ssl_client_hello_cb" class="item">SSL_CLIENT_HELLO_CB</a></strong></dt>
<dd>
<p>The operation did not complete because an application callback set by
<code>SSL_CTX_set_client_hello_cb()</code> has asked to be called again.
A call to <em>SSL_get_error(3)</em> should return
SSL_ERROR_WANT_CLIENT_HELLO_CB.</p>
</dd>
</dl>
<p><code>SSL_want_nothing()</code>, <code>SSL_want_read()</code>, <code>SSL_want_write()</code>, SSL_want_x509_lookup(),
<code>SSL_want_async()</code>, <code>SSL_want_async_job()</code>, and <code>SSL_want_client_hello_cb()</code> return
1, when the corresponding condition is true or 0 otherwise.</p>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><em>ssl(7)</em>, <em>SSL_get_error(3)</em></p>
<p>
</p>
<hr />
<h1><a name="history">HISTORY</a></h1>
<p>The <code>SSL_want_client_hello_cb()</code> function and the SSL_CLIENT_HELLO_CB return value
were added in OpenSSL 1.1.1.</p>
<p>
</p>
<hr />
<h1><a name="copyright">COPYRIGHT</a></h1>
<p>Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.</p>
<p>Licensed under the Apache License 2.0 (the &quot;License&quot;). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
<a href="https://www.openssl.org/source/license.html">https://www.openssl.org/source/license.html</a>.</p>
</body>
</html>