SSL_want.pod revision 89837
11578Srgrimes=pod
21578Srgrimes
31578Srgrimes=head1 NAME
41578Srgrimes
51578SrgrimesSSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup - obtain state information TLS/SSL I/O operation
61578Srgrimes
71578Srgrimes=head1 SYNOPSIS
81578Srgrimes
91578Srgrimes #include <openssl/ssl.h>
101578Srgrimes
111578Srgrimes int SSL_want(SSL *ssl);
121578Srgrimes int SSL_want_nothing(SSL *ssl);
131578Srgrimes int SSL_want_read(SSL *ssl);
141578Srgrimes int SSL_want_write(SSL *ssl);
151578Srgrimes int SSL_want_x509_lookup(SSL *ssl);
161578Srgrimes
171578Srgrimes=head1 DESCRIPTION
181578Srgrimes
191578SrgrimesSSL_want() returns state information for the SSL object B<ssl>.
201578Srgrimes
211578SrgrimesThe other SSL_want_*() calls are shortcuts for the possible states returned
221578Srgrimesby SSL_want().
231578Srgrimes
241578Srgrimes=head1 NOTES
251578Srgrimes
261578SrgrimesSSL_want() examines the internal state information of the SSL object. Its
271578Srgrimesreturn values are similar to that of L<SSL_get_error(3)|SSL_get_error(3)>.
281578SrgrimesUnlike L<SSL_get_error(3)|SSL_get_error(3)>, which also evaluates the
291578Srgrimeserror queue, the results are obtained by examining an internal state flag
301578Srgrimesonly. The information must therefore only be used for normal operation under
311578Srgrimesnon-blocking I/O. Error conditions are not handled and must be treated
321578Srgrimesusing L<SSL_get_error(3)|SSL_get_error(3)>.
33165906Simp
34165906SimpThe result returned by SSL_want() should always be consistent with
35165906Simpthe result of L<SSL_get_error(3)|SSL_get_error(3)>.
361578Srgrimes
371578Srgrimes=head1 RETURN VALUES
381578Srgrimes
391578SrgrimesThe following return values can currently occur for SSL_want():
401578Srgrimes
411578Srgrimes=over 4
421578Srgrimes
431578Srgrimes=item SSL_NOTHING
441578Srgrimes
451578SrgrimesThere is no data to be written or to be read.
461578Srgrimes
47205146Sed=item SSL_WRITING
481578Srgrimes
49205146SedThere are data in the SSL buffer that must be written to the underlying
501578SrgrimesB<BIO> layer in order to complete the actual SSL_*() operation.
51205146SedA call to L<SSL_get_error(3)|SSL_get_error(3)> should return
52205146SedSSL_ERROR_WANT_WRITE.
53205146Sed
541578Srgrimes=item SSL_READING
551578Srgrimes
56205146SedMore data must be read from the underlying B<BIO> layer in order to
571578Srgrimescomplete the actual SSL_*() operation.
58205146SedA call to L<SSL_get_error(3)|SSL_get_error(3)> should return
59205146SedSSL_ERROR_WANT_READ.
602768Sache
61205146Sed=item SSL_X509_LOOKUP
62205146Sed
63205146SedThe operation did not complete because an application callback set by
641578SrgrimesSSL_CTX_set_client_cert_cb() has asked to be called again.
652768SacheA call to L<SSL_get_error(3)|SSL_get_error(3)> should return
66205146SedSSL_ERROR_WANT_X509_LOOKUP.
67205146Sed
68205146Sed=back
69205146Sed
70205146SedSSL_want_nothing(), SSL_want_read(), SSL_want_write(), SSL_want_x509_lookup()
71205146Sedreturn 1, when the corresponding condition is true or 0 otherwise.
72205146Sed
73205146Sed=head1 SEE ALSO
74205146Sed
75205146SedL<ssl(3)|ssl(3)>, L<err(3)|err(3)>, L<SSL_get_error(3)|SSL_get_error(3)>
76205146Sed
77205146Sed=cut
78205146Sed