diff options
Diffstat (limited to 'src/lib/libcrypto/man/BIO_should_retry.3')
-rw-r--r-- | src/lib/libcrypto/man/BIO_should_retry.3 | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/lib/libcrypto/man/BIO_should_retry.3 b/src/lib/libcrypto/man/BIO_should_retry.3 index c06e907235..f512e08b89 100644 --- a/src/lib/libcrypto/man/BIO_should_retry.3 +++ b/src/lib/libcrypto/man/BIO_should_retry.3 | |||
@@ -1,6 +1,6 @@ | |||
1 | .\" $OpenBSD: BIO_should_retry.3,v 1.2 2016/11/06 15:52:50 jmc Exp $ | 1 | .\" $OpenBSD: BIO_should_retry.3,v 1.3 2016/11/07 15:52:47 jmc Exp $ |
2 | .\" | 2 | .\" |
3 | .Dd $Mdocdate: November 6 2016 $ | 3 | .Dd $Mdocdate: November 7 2016 $ |
4 | .Dt BIO_SHOULD_RETRY 3 | 4 | .Dt BIO_SHOULD_RETRY 3 |
5 | .Os | 5 | .Os |
6 | .Sh NAME | 6 | .Sh NAME |
@@ -9,6 +9,7 @@ | |||
9 | .Nm BIO_should_write , | 9 | .Nm BIO_should_write , |
10 | .Nm BIO_should_io_special , | 10 | .Nm BIO_should_io_special , |
11 | .Nm BIO_retry_type , | 11 | .Nm BIO_retry_type , |
12 | .Nm BIO_should_retry , | ||
12 | .Nm BIO_get_retry_BIO , | 13 | .Nm BIO_get_retry_BIO , |
13 | .Nm BIO_get_retry_reason | 14 | .Nm BIO_get_retry_reason |
14 | .Nd BIO retry functions | 15 | .Nd BIO retry functions |
@@ -58,8 +59,8 @@ is true if the cause of the condition is that a BIO needs to read data. | |||
58 | is true if the cause of the condition is that a BIO needs to write data. | 59 | is true if the cause of the condition is that a BIO needs to write data. |
59 | .Pp | 60 | .Pp |
60 | .Fn BIO_should_io_special | 61 | .Fn BIO_should_io_special |
61 | is true if some "special" condition, that is a reason other than | 62 | is true if some "special" condition |
62 | reading or writing, is the cause of the condition. | 63 | (i.e. a reason other than reading or writing) is the cause of the condition. |
63 | .Pp | 64 | .Pp |
64 | .Fn BIO_retry_type | 65 | .Fn BIO_retry_type |
65 | returns a mask of the cause of a retry condition consisting of the values | 66 | returns a mask of the cause of a retry condition consisting of the values |
@@ -82,7 +83,7 @@ depends on the type of BIO that resulted in this condition. | |||
82 | returns the reason for a special condition | 83 | returns the reason for a special condition |
83 | if passed the relevant BIO, for example as returned by | 84 | if passed the relevant BIO, for example as returned by |
84 | .Fn BIO_get_retry_BIO . | 85 | .Fn BIO_get_retry_BIO . |
85 | .Sh NOTES | 86 | .Pp |
86 | If | 87 | If |
87 | .Fn BIO_should_retry | 88 | .Fn BIO_should_retry |
88 | returns false, then the precise "error condition" depends on | 89 | returns false, then the precise "error condition" depends on |
@@ -114,7 +115,7 @@ or avoid this situation by setting | |||
114 | .Dv SSL_MODE_AUTO_RETRY | 115 | .Dv SSL_MODE_AUTO_RETRY |
115 | on the underlying SSL structure. | 116 | on the underlying SSL structure. |
116 | .Pp | 117 | .Pp |
117 | While an application may retry a failed non blocking call immediately, | 118 | While an application may retry a failed non-blocking call immediately, |
118 | this is likely to be very inefficient because the call will fail | 119 | this is likely to be very inefficient because the call will fail |
119 | repeatedly until data can be processed or is available. | 120 | repeatedly until data can be processed or is available. |
120 | An application will normally wait until the necessary condition | 121 | An application will normally wait until the necessary condition |
@@ -127,7 +128,7 @@ is true then a call to | |||
127 | .Xr select 2 | 128 | .Xr select 2 |
128 | may be made to wait until data is available | 129 | may be made to wait until data is available |
129 | and then retry the BIO operation. | 130 | and then retry the BIO operation. |
130 | By combining the retry conditions of several non blocking BIOs in a single | 131 | By combining the retry conditions of several non-blocking BIOs in a single |
131 | .Xr select 2 | 132 | .Xr select 2 |
132 | call it is possible to service several BIOs in a single thread, | 133 | call it is possible to service several BIOs in a single thread, |
133 | though the performance may be poor if SSL BIOs are present because | 134 | though the performance may be poor if SSL BIOs are present because |
@@ -136,12 +137,12 @@ long delays can occur during the initial handshake process. | |||
136 | It is possible for a BIO to block indefinitely if the underlying I/O | 137 | It is possible for a BIO to block indefinitely if the underlying I/O |
137 | structure cannot process or return any data. | 138 | structure cannot process or return any data. |
138 | This depends on the behaviour of the platforms I/O functions. | 139 | This depends on the behaviour of the platforms I/O functions. |
139 | This is often not desirable: one solution is to use non blocking I/O | 140 | This is often not desirable: one solution is to use non-blocking I/O |
140 | and use a timeout on the | 141 | and use a timeout on the |
141 | .Xr select 2 | 142 | .Xr select 2 |
142 | (or equivalent) call. | 143 | (or equivalent) call. |
143 | .Sh BUGS | 144 | .Sh BUGS |
144 | The OpenSSL ASN1 functions cannot gracefully deal with non blocking I/O: | 145 | The OpenSSL ASN.1 functions cannot gracefully deal with non-blocking I/O: |
145 | they cannot retry after a partial read or write. | 146 | they cannot retry after a partial read or write. |
146 | This is usually worked around by only passing the relevant data to ASN1 | 147 | This is usually worked around by only passing the relevant data to ASN.1 |
147 | functions when the entire structure can be read or written. | 148 | functions when the entire structure can be read or written. |