diff options
Diffstat (limited to 'src/lib/libssl/doc/SSL_want.3')
| -rw-r--r-- | src/lib/libssl/doc/SSL_want.3 | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/src/lib/libssl/doc/SSL_want.3 b/src/lib/libssl/doc/SSL_want.3 new file mode 100644 index 0000000000..5f9d89ea92 --- /dev/null +++ b/src/lib/libssl/doc/SSL_want.3 | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | .Dd $Mdocdate: October 12 2014 $ | ||
| 2 | .Dt SSL_WANT 3 | ||
| 3 | .Os | ||
| 4 | .Sh NAME | ||
| 5 | .Nm SSL_want , | ||
| 6 | .Nm SSL_want_nothing , | ||
| 7 | .Nm SSL_want_read , | ||
| 8 | .Nm SSL_want_write , | ||
| 9 | .Nm SSL_want_x509_lookup | ||
| 10 | .Nd obtain state information TLS/SSL I/O operation | ||
| 11 | .Sh SYNOPSIS | ||
| 12 | .In openssl/ssl.h | ||
| 13 | .Ft int | ||
| 14 | .Fn SSL_want "const SSL *ssl" | ||
| 15 | .Ft int | ||
| 16 | .Fn SSL_want_nothing "const SSL *ssl" | ||
| 17 | .Ft int | ||
| 18 | .Fn SSL_want_read "const SSL *ssl" | ||
| 19 | .Ft int | ||
| 20 | .Fn SSL_want_write "const SSL *ssl" | ||
| 21 | .Ft int | ||
| 22 | .Fn SSL_want_x509_lookup "const SSL *ssl" | ||
| 23 | .Sh DESCRIPTION | ||
| 24 | .Fn SSL_want | ||
| 25 | returns state information for the | ||
| 26 | .Vt SSL | ||
| 27 | object | ||
| 28 | .Fa ssl . | ||
| 29 | .Pp | ||
| 30 | The other | ||
| 31 | .Fn SSL_want_* | ||
| 32 | calls are shortcuts for the possible states returned by | ||
| 33 | .Fn SSL_want . | ||
| 34 | .Sh NOTES | ||
| 35 | .Fn SSL_want | ||
| 36 | examines the internal state information of the | ||
| 37 | .Vt SSL | ||
| 38 | object. | ||
| 39 | Its return values are similar to those of | ||
| 40 | .Xr SSL_get_error 3 . | ||
| 41 | Unlike | ||
| 42 | .Xr SSL_get_error 3 , | ||
| 43 | which also evaluates the error queue, | ||
| 44 | the results are obtained by examining an internal state flag only. | ||
| 45 | The information must therefore only be used for normal operation under | ||
| 46 | non-blocking I/O. | ||
| 47 | Error conditions are not handled and must be treated using | ||
| 48 | .Xr SSL_get_error 3 . | ||
| 49 | .Pp | ||
| 50 | The result returned by | ||
| 51 | .Fn SSL_want | ||
| 52 | should always be consistent with the result of | ||
| 53 | .Xr SSL_get_error 3 . | ||
| 54 | .Sh RETURN VALUES | ||
| 55 | The following return values can currently occur for | ||
| 56 | .Fn SSL_want : | ||
| 57 | .Bl -tag -width Ds | ||
| 58 | .It .Dv SSL_NOTHING | ||
| 59 | There is no data to be written or to be read. | ||
| 60 | .It .Dv SSL_WRITING | ||
| 61 | There are data in the SSL buffer that must be written to the underlying | ||
| 62 | .Vt BIO | ||
| 63 | layer in order to complete the actual | ||
| 64 | .Fn SSL_* | ||
| 65 | operation. | ||
| 66 | A call to | ||
| 67 | .Xr SSL_get_error 3 | ||
| 68 | should return | ||
| 69 | .Dv SSL_ERROR_WANT_WRITE . | ||
| 70 | .It Dv SSL_READING | ||
| 71 | More data must be read from the underlying | ||
| 72 | .Vt BIO | ||
| 73 | layer in order to | ||
| 74 | complete the actual | ||
| 75 | .Fn SSL_* | ||
| 76 | operation. | ||
| 77 | A call to | ||
| 78 | .Xr SSL_get_error 3 | ||
| 79 | should return | ||
| 80 | .Dv SSL_ERROR_WANT_READ. | ||
| 81 | .It Dv SSL_X509_LOOKUP | ||
| 82 | The operation did not complete because an application callback set by | ||
| 83 | .Xr SSL_CTX_set_client_cert_cb 3 | ||
| 84 | has asked to be called again. | ||
| 85 | A call to | ||
| 86 | .Xr SSL_get_error 3 | ||
| 87 | should return | ||
| 88 | .Dv SSL_ERROR_WANT_X509_LOOKUP . | ||
| 89 | .El | ||
| 90 | .Pp | ||
| 91 | .Fn SSL_want_nothing , | ||
| 92 | .Fn SSL_want_read , | ||
| 93 | .Fn SSL_want_write , | ||
| 94 | and | ||
| 95 | .Fn SSL_want_x509_lookup | ||
| 96 | return 1 when the corresponding condition is true or 0 otherwise. | ||
| 97 | .Sh SEE ALSO | ||
| 98 | .Xr err 3 , | ||
| 99 | .Xr ssl 3 , | ||
| 100 | .Xr SSL_get_error 3 | ||
