SSL_want.pod revision 89837
172445Sassar=pod
2233294Sstas
372445Sassar=head1 NAME
472445Sassar
5233294SstasSSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup - obtain state information TLS/SSL I/O operation
672445Sassar
772445Sassar=head1 SYNOPSIS
872445Sassar
9233294Sstas #include <openssl/ssl.h>
1072445Sassar
1172445Sassar int SSL_want(SSL *ssl);
12233294Sstas int SSL_want_nothing(SSL *ssl);
1372445Sassar int SSL_want_read(SSL *ssl);
1472445Sassar int SSL_want_write(SSL *ssl);
1572445Sassar int SSL_want_x509_lookup(SSL *ssl);
16233294Sstas
1772445Sassar=head1 DESCRIPTION
1872445Sassar
1972445SassarSSL_want() returns state information for the SSL object B<ssl>.
20233294Sstas
2172445SassarThe other SSL_want_*() calls are shortcuts for the possible states returned
2272445Sassarby SSL_want().
2372445Sassar
2472445Sassar=head1 NOTES
2572445Sassar
2672445SassarSSL_want() examines the internal state information of the SSL object. Its
2772445Sassarreturn values are similar to that of L<SSL_get_error(3)|SSL_get_error(3)>.
2872445SassarUnlike L<SSL_get_error(3)|SSL_get_error(3)>, which also evaluates the
2972445Sassarerror queue, the results are obtained by examining an internal state flag
3072445Sassaronly. The information must therefore only be used for normal operation under
3172445Sassarnon-blocking I/O. Error conditions are not handled and must be treated
3272445Sassarusing L<SSL_get_error(3)|SSL_get_error(3)>.
33233294Sstas
3472445SassarThe result returned by SSL_want() should always be consistent with
3572445Sassarthe result of L<SSL_get_error(3)|SSL_get_error(3)>.
3672445Sassar
3772445Sassar=head1 RETURN VALUES
38178825Sdfr
39178825SdfrThe following return values can currently occur for SSL_want():
40233294Sstas
41233294Sstas=over 4
42178825Sdfr
43178825Sdfr=item SSL_NOTHING
44233294Sstas
45178825SdfrThere is no data to be written or to be read.
46178825Sdfr
47178825Sdfr=item SSL_WRITING
48178825Sdfr
49178825SdfrThere are data in the SSL buffer that must be written to the underlying
50178825SdfrB<BIO> layer in order to complete the actual SSL_*() operation.
51178825SdfrA call to L<SSL_get_error(3)|SSL_get_error(3)> should return
52178825SdfrSSL_ERROR_WANT_WRITE.
53178825Sdfr
54178825Sdfr=item SSL_READING
55178825Sdfr
5672445SassarMore data must be read from the underlying B<BIO> layer in order to
5772445Sassarcomplete the actual SSL_*() operation.
5872445SassarA call to L<SSL_get_error(3)|SSL_get_error(3)> should return
5972445SassarSSL_ERROR_WANT_READ.
6072445Sassar
6172445Sassar=item SSL_X509_LOOKUP
62178825Sdfr
63178825SdfrThe operation did not complete because an application callback set by
6472445SassarSSL_CTX_set_client_cert_cb() has asked to be called again.
65233294SstasA call to L<SSL_get_error(3)|SSL_get_error(3)> should return
66178825SdfrSSL_ERROR_WANT_X509_LOOKUP.
6772445Sassar
68233294Sstas=back
69178825Sdfr
7072445SassarSSL_want_nothing(), SSL_want_read(), SSL_want_write(), SSL_want_x509_lookup()
71233294Sstasreturn 1, when the corresponding condition is true or 0 otherwise.
72178825Sdfr
73178825Sdfr=head1 SEE ALSO
74178825Sdfr
7572445SassarL<ssl(3)|ssl(3)>, L<err(3)|err(3)>, L<SSL_get_error(3)|SSL_get_error(3)>
76233294Sstas
77178825Sdfr=cut
7872445Sassar