diff options
author | tb <> | 2024-05-22 09:34:40 +0000 |
---|---|---|
committer | tb <> | 2024-05-22 09:34:40 +0000 |
commit | 0a2d291c9d2adec9b199b34a3c0624ac6bfca6a0 (patch) | |
tree | cebeaef03b83d01b09752717833b37ddca350964 /src/lib | |
parent | b7956943c16107aec663bfac7e06f0c4c52c4bba (diff) | |
download | openbsd-0a2d291c9d2adec9b199b34a3c0624ac6bfca6a0.tar.gz openbsd-0a2d291c9d2adec9b199b34a3c0624ac6bfca6a0.tar.bz2 openbsd-0a2d291c9d2adec9b199b34a3c0624ac6bfca6a0.zip |
Fix incorrect X509v3_get_ext_by_NID(3) return values
This error comes from upstream, where it is still wrong.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/X509v3_get_ext_by_NID.3 | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/src/lib/libcrypto/man/X509v3_get_ext_by_NID.3 b/src/lib/libcrypto/man/X509v3_get_ext_by_NID.3 index 54e4b583f7..640a72a135 100644 --- a/src/lib/libcrypto/man/X509v3_get_ext_by_NID.3 +++ b/src/lib/libcrypto/man/X509v3_get_ext_by_NID.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509v3_get_ext_by_NID.3,v 1.13 2021/07/12 14:54:00 schwarze Exp $ | 1 | .\" $OpenBSD: X509v3_get_ext_by_NID.3,v 1.14 2024/05/22 09:34:40 tb Exp $ |
2 | .\" full merge up to: OpenSSL fd38836b Jun 20 15:25:43 2018 +0100 | 2 | .\" full merge up to: OpenSSL fd38836b Jun 20 15:25:43 2018 +0100 |
3 | .\" | 3 | .\" |
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
@@ -48,7 +48,7 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 50 | .\" |
51 | .Dd $Mdocdate: July 12 2021 $ | 51 | .Dd $Mdocdate: May 22 2024 $ |
52 | .Dt X509V3_GET_EXT_BY_NID 3 | 52 | .Dt X509V3_GET_EXT_BY_NID 3 |
53 | .Os | 53 | .Os |
54 | .Sh NAME | 54 | .Sh NAME |
@@ -248,7 +248,7 @@ from | |||
248 | The index | 248 | The index |
249 | .Fa loc | 249 | .Fa loc |
250 | can take any value from 0 to | 250 | can take any value from 0 to |
251 | .Fn X509_get_ext_count x No - 1 . | 251 | .Fn X509_get_ext_count x No \- 1 . |
252 | The returned extension is an internal pointer which must not be | 252 | The returned extension is an internal pointer which must not be |
253 | freed up by the application. | 253 | freed up by the application. |
254 | .Pp | 254 | .Pp |
@@ -265,9 +265,9 @@ The search starts from the extension after | |||
265 | .Fa lastpos | 265 | .Fa lastpos |
266 | or from the beginning if | 266 | or from the beginning if |
267 | .Fa lastpos | 267 | .Fa lastpos |
268 | is -1. | 268 | is \-1. |
269 | If the extension is found, its index is returned; otherwise, -1 is | 269 | If the extension is found, its index is returned; otherwise, a negative |
270 | returned. | 270 | value is returned. |
271 | .Pp | 271 | .Pp |
272 | .Fn X509v3_get_ext_by_critical | 272 | .Fn X509v3_get_ext_by_critical |
273 | is similar to | 273 | is similar to |
@@ -300,7 +300,7 @@ at position | |||
300 | .Fa loc . | 300 | .Fa loc . |
301 | If | 301 | If |
302 | .Fa loc | 302 | .Fa loc |
303 | is -1, the new extension is added to the end. | 303 | is \-1, the new extension is added to the end. |
304 | If | 304 | If |
305 | .Pf * Fa x | 305 | .Pf * Fa x |
306 | is | 306 | is |
@@ -358,7 +358,7 @@ These search functions start from the extension | |||
358 | .Em after | 358 | .Em after |
359 | the | 359 | the |
360 | .Fa lastpos | 360 | .Fa lastpos |
361 | parameter, so it should initially be set to -1. | 361 | parameter, so it should initially be set to \-1. |
362 | If it is set to 0, the initial extension will not be checked. | 362 | If it is set to 0, the initial extension will not be checked. |
363 | .Sh RETURN VALUES | 363 | .Sh RETURN VALUES |
364 | .Fn X509v3_get_ext_count | 364 | .Fn X509v3_get_ext_count |
@@ -378,7 +378,14 @@ if an error occurs. | |||
378 | .Fn X509v3_get_ext_by_OBJ , | 378 | .Fn X509v3_get_ext_by_OBJ , |
379 | and | 379 | and |
380 | .Fn X509v3_get_ext_by_critical | 380 | .Fn X509v3_get_ext_by_critical |
381 | return the extension index or -1 if an error occurs. | 381 | return the extension index or \-1 if an error occurs. |
382 | In addition | ||
383 | .Fn X509v3_get_ext_by_NID | ||
384 | returns \-2 if | ||
385 | .Xr OBJ_nid2obj 3 | ||
386 | fails, which happens if | ||
387 | .Fa nid | ||
388 | has no corresponding table object. | ||
382 | .Pp | 389 | .Pp |
383 | .Fn X509v3_add_ext | 390 | .Fn X509v3_add_ext |
384 | returns a stack of extensions or | 391 | returns a stack of extensions or |
@@ -388,6 +395,7 @@ on error. | |||
388 | .Fn X509_add_ext | 395 | .Fn X509_add_ext |
389 | returns 1 on success or 0 on error. | 396 | returns 1 on success or 0 on error. |
390 | .Sh SEE ALSO | 397 | .Sh SEE ALSO |
398 | .Xr OBJ_nid2obj 3 , | ||
391 | .Xr X509_CRL_new 3 , | 399 | .Xr X509_CRL_new 3 , |
392 | .Xr X509_EXTENSION_new 3 , | 400 | .Xr X509_EXTENSION_new 3 , |
393 | .Xr X509_new 3 , | 401 | .Xr X509_new 3 , |