SSL_want.pod 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. =pod
  2. =head1 NAME
  3. SSL_want, SSL_want_nothing, SSL_want_read, SSL_want_write, SSL_want_x509_lookup - obtain state information TLS/SSL I/O operation
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. int SSL_want(const SSL *ssl);
  7. int SSL_want_nothing(const SSL *ssl);
  8. int SSL_want_read(const SSL *ssl);
  9. int SSL_want_write(const SSL *ssl);
  10. int SSL_want_x509_lookup(const SSL *ssl);
  11. =head1 DESCRIPTION
  12. SSL_want() returns state information for the SSL object B<ssl>.
  13. The other SSL_want_*() calls are shortcuts for the possible states returned
  14. by SSL_want().
  15. =head1 NOTES
  16. SSL_want() examines the internal state information of the SSL object. Its
  17. return values are similar to that of L<SSL_get_error(3)|SSL_get_error(3)>.
  18. Unlike L<SSL_get_error(3)|SSL_get_error(3)>, which also evaluates the
  19. error queue, the results are obtained by examining an internal state flag
  20. only. The information must therefore only be used for normal operation under
  21. non-blocking I/O. Error conditions are not handled and must be treated
  22. using L<SSL_get_error(3)|SSL_get_error(3)>.
  23. The result returned by SSL_want() should always be consistent with
  24. the result of L<SSL_get_error(3)|SSL_get_error(3)>.
  25. =head1 RETURN VALUES
  26. The following return values can currently occur for SSL_want():
  27. =over 4
  28. =item SSL_NOTHING
  29. There is no data to be written or to be read.
  30. =item SSL_WRITING
  31. There are data in the SSL buffer that must be written to the underlying
  32. B<BIO> layer in order to complete the actual SSL_*() operation.
  33. A call to L<SSL_get_error(3)|SSL_get_error(3)> should return
  34. SSL_ERROR_WANT_WRITE.
  35. =item SSL_READING
  36. More data must be read from the underlying B<BIO> layer in order to
  37. complete the actual SSL_*() operation.
  38. A call to L<SSL_get_error(3)|SSL_get_error(3)> should return
  39. SSL_ERROR_WANT_READ.
  40. =item SSL_X509_LOOKUP
  41. The operation did not complete because an application callback set by
  42. SSL_CTX_set_client_cert_cb() has asked to be called again.
  43. A call to L<SSL_get_error(3)|SSL_get_error(3)> should return
  44. SSL_ERROR_WANT_X509_LOOKUP.
  45. =back
  46. SSL_want_nothing(), SSL_want_read(), SSL_want_write(), SSL_want_x509_lookup()
  47. return 1, when the corresponding condition is true or 0 otherwise.
  48. =head1 SEE ALSO
  49. L<ssl(3)|ssl(3)>, L<err(3)|err(3)>, L<SSL_get_error(3)|SSL_get_error(3)>
  50. =cut