(linenum→info "unix/slp.c:2238")

openssl/0.9.8g/doc/ssl/SSL_want.pod

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