diff options
| author | schwarze <> | 2018-02-15 19:55:59 +0000 |
|---|---|---|
| committer | schwarze <> | 2018-02-15 19:55:59 +0000 |
| commit | f46aa16c43bee0c979a780cca5275c5551c5c4e5 (patch) | |
| tree | 651e50209da1e4dd352d9be060b8f9de9eaf9c32 | |
| parent | ee3577981b0dcbd91616ce9fcdc88b8a9ad98dc9 (diff) | |
| download | openbsd-f46aa16c43bee0c979a780cca5275c5551c5c4e5.tar.gz openbsd-f46aa16c43bee0c979a780cca5275c5551c5c4e5.tar.bz2 openbsd-f46aa16c43bee0c979a780cca5275c5551c5c4e5.zip | |
Merge the new RETURN VALUES section from Paul Yang,
OpenSSL commit 1f13ad31 Dec 25 17:50:39 2017 +0800,
with a number of fixes by me.
Also include three earlier, minor improvements from OpenSSL.
| -rw-r--r-- | src/lib/libcrypto/man/UI_new.3 | 85 |
1 files changed, 78 insertions, 7 deletions
diff --git a/src/lib/libcrypto/man/UI_new.3 b/src/lib/libcrypto/man/UI_new.3 index 2b0ce5b557..187f0f7c95 100644 --- a/src/lib/libcrypto/man/UI_new.3 +++ b/src/lib/libcrypto/man/UI_new.3 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | .\" $OpenBSD: UI_new.3,v 1.6 2017/03/26 00:06:10 schwarze Exp $ | 1 | .\" $OpenBSD: UI_new.3,v 1.7 2018/02/15 19:55:59 schwarze Exp $ |
| 2 | .\" OpenSSL UI_new.pod 5469600e Mar 11 00:51:53 2017 +0100 | 2 | .\" full merge up to: OpenSSL 78b19e90 Jan 11 00:12:01 2017 +0100 |
| 3 | .\" OpenSSL UI_new.pod 99d63d46 Oct 26 13:56:48 2016 -0400 | 3 | .\" selective merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 |
| 4 | .\" | 4 | .\" |
| 5 | .\" This file was written by Richard Levitte <levitte@openssl.org>. | 5 | .\" This file was written by Richard Levitte <levitte@openssl.org>. |
| 6 | .\" Copyright (c) 2001, 2016, 2017 The OpenSSL Project. All rights reserved. | 6 | .\" Copyright (c) 2001, 2016, 2017 The OpenSSL Project. All rights reserved. |
| @@ -49,7 +49,7 @@ | |||
| 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
| 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
| 51 | .\" | 51 | .\" |
| 52 | .Dd $Mdocdate: March 26 2017 $ | 52 | .Dd $Mdocdate: February 15 2018 $ |
| 53 | .Dt UI_NEW 3 | 53 | .Dt UI_NEW 3 |
| 54 | .Os | 54 | .Os |
| 55 | .Sh NAME | 55 | .Sh NAME |
| @@ -292,8 +292,8 @@ When done with this UI, it should be freed using | |||
| 292 | .Fn UI_free . | 292 | .Fn UI_free . |
| 293 | .Pp | 293 | .Pp |
| 294 | .Fn UI_OpenSSL | 294 | .Fn UI_OpenSSL |
| 295 | returns the built-in UI method (note: not the default one, since | 295 | returns the built-in UI method (note: not necessarily the default one, |
| 296 | the default can be changed. | 296 | since the default can be changed. |
| 297 | See further on). | 297 | See further on). |
| 298 | This method is the most machine/OS dependent part of OpenSSL and | 298 | This method is the most machine/OS dependent part of OpenSSL and |
| 299 | normally generates the most problems when porting. | 299 | normally generates the most problems when porting. |
| @@ -381,7 +381,7 @@ whatever string and may include encodings that will be processed by the | |||
| 381 | other method functions. | 381 | other method functions. |
| 382 | .Pp | 382 | .Pp |
| 383 | .Fn UI_add_user_data | 383 | .Fn UI_add_user_data |
| 384 | adds a piece of memory for the method to use at any time. | 384 | adds a user data pointer for the method to use at any time. |
| 385 | The builtin UI method doesn't care about this info. | 385 | The builtin UI method doesn't care about this info. |
| 386 | Note that several calls to this function doesn't add data - | 386 | Note that several calls to this function doesn't add data - |
| 387 | the previous blob is replaced with the one given as argument. | 387 | the previous blob is replaced with the one given as argument. |
| @@ -418,6 +418,8 @@ can be used again or not. | |||
| 418 | .Pp | 418 | .Pp |
| 419 | .Fn UI_set_default_method | 419 | .Fn UI_set_default_method |
| 420 | changes the default UI method to the one given. | 420 | changes the default UI method to the one given. |
| 421 | This function is not thread-safe and should not be called at the | ||
| 422 | same time as other OpenSSL functions. | ||
| 421 | .Pp | 423 | .Pp |
| 422 | .Fn UI_get_default_method | 424 | .Fn UI_get_default_method |
| 423 | returns a pointer to the current default UI method. | 425 | returns a pointer to the current default UI method. |
| @@ -429,6 +431,75 @@ returns the UI method associated with a given | |||
| 429 | .Fn UI_set_method | 431 | .Fn UI_set_method |
| 430 | changes the UI method associated with a given | 432 | changes the UI method associated with a given |
| 431 | .Fa ui . | 433 | .Fa ui . |
| 434 | .Sh RETURN VALUES | ||
| 435 | .Fn UI_new | ||
| 436 | and | ||
| 437 | .Fn UI_new_method | ||
| 438 | return a valid | ||
| 439 | .Vt UI | ||
| 440 | structure or | ||
| 441 | .Dv NULL | ||
| 442 | if an error occurred. | ||
| 443 | .Pp | ||
| 444 | .Fn UI_add_input_string , | ||
| 445 | .Fn UI_dup_input_string , | ||
| 446 | .Fn UI_add_verify_string , | ||
| 447 | .Fn UI_dup_verify_string , | ||
| 448 | .Fn UI_add_input_boolean , | ||
| 449 | .Fn UI_dup_input_boolean , | ||
| 450 | .Fn UI_add_info_string , | ||
| 451 | .Fn UI_dup_info_string , | ||
| 452 | .Fn UI_add_error_string , | ||
| 453 | and | ||
| 454 | .Fn UI_dup_error_string | ||
| 455 | return a positive number on success or a number | ||
| 456 | less than or equal to zero otherwise. | ||
| 457 | .Pp | ||
| 458 | .Fn UI_construct_prompt | ||
| 459 | and | ||
| 460 | .Fn UI_get0_result | ||
| 461 | return a string or | ||
| 462 | .Dv NULL | ||
| 463 | if an error occurred. | ||
| 464 | .Pp | ||
| 465 | .Fn UI_add_user_data | ||
| 466 | and | ||
| 467 | .Fn UI_get0_user_data | ||
| 468 | return a pointer to the user data that was contained in | ||
| 469 | .Fa ui | ||
| 470 | before the call. | ||
| 471 | In particular, | ||
| 472 | .Dv NULL | ||
| 473 | is a valid return value. | ||
| 474 | .Pp | ||
| 475 | .Fn UI_process | ||
| 476 | returns 0 on success or a negative value on error. | ||
| 477 | .Pp | ||
| 478 | .Fn UI_ctrl | ||
| 479 | returns a mask on success or \-1 on error. | ||
| 480 | .Pp | ||
| 481 | .Fn UI_get_default_method | ||
| 482 | and | ||
| 483 | .Fn UI_OpenSSL | ||
| 484 | always return a pointer to a valid | ||
| 485 | .Vt UI_METHOD | ||
| 486 | structure. | ||
| 487 | .Pp | ||
| 488 | .Fn UI_get_method | ||
| 489 | and | ||
| 490 | .Fn UI_set_method | ||
| 491 | return a pointer to the | ||
| 492 | .Vt UI_METHOD | ||
| 493 | structure that is installed in | ||
| 494 | .Fa ui | ||
| 495 | after the call. | ||
| 496 | The OpenSSL documentation says that they can fail and return | ||
| 497 | .Dv NULL , | ||
| 498 | but currently, this can only happen when and after | ||
| 499 | .Fn UI_set_method | ||
| 500 | is called with an explicit | ||
| 501 | .Dv NULL | ||
| 502 | argument. | ||
| 432 | .Sh SEE ALSO | 503 | .Sh SEE ALSO |
| 433 | .Xr des_read_pw 3 , | 504 | .Xr des_read_pw 3 , |
| 434 | .Xr UI_create_method 3 , | 505 | .Xr UI_create_method 3 , |
