summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2018-02-15 19:55:59 +0000
committerschwarze <>2018-02-15 19:55:59 +0000
commitf46aa16c43bee0c979a780cca5275c5551c5c4e5 (patch)
tree651e50209da1e4dd352d9be060b8f9de9eaf9c32
parentee3577981b0dcbd91616ce9fcdc88b8a9ad98dc9 (diff)
downloadopenbsd-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.385
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
295returns the built-in UI method (note: not the default one, since 295returns the built-in UI method (note: not necessarily the default one,
296the default can be changed. 296since the default can be changed.
297See further on). 297See further on).
298This method is the most machine/OS dependent part of OpenSSL and 298This method is the most machine/OS dependent part of OpenSSL and
299normally generates the most problems when porting. 299normally generates the most problems when porting.
@@ -381,7 +381,7 @@ whatever string and may include encodings that will be processed by the
381other method functions. 381other method functions.
382.Pp 382.Pp
383.Fn UI_add_user_data 383.Fn UI_add_user_data
384adds a piece of memory for the method to use at any time. 384adds a user data pointer for the method to use at any time.
385The builtin UI method doesn't care about this info. 385The builtin UI method doesn't care about this info.
386Note that several calls to this function doesn't add data - 386Note that several calls to this function doesn't add data -
387the previous blob is replaced with the one given as argument. 387the 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
420changes the default UI method to the one given. 420changes the default UI method to the one given.
421This function is not thread-safe and should not be called at the
422same time as other OpenSSL functions.
421.Pp 423.Pp
422.Fn UI_get_default_method 424.Fn UI_get_default_method
423returns a pointer to the current default UI method. 425returns 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
430changes the UI method associated with a given 432changes the UI method associated with a given
431.Fa ui . 433.Fa ui .
434.Sh RETURN VALUES
435.Fn UI_new
436and
437.Fn UI_new_method
438return a valid
439.Vt UI
440structure or
441.Dv NULL
442if 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 ,
453and
454.Fn UI_dup_error_string
455return a positive number on success or a number
456less than or equal to zero otherwise.
457.Pp
458.Fn UI_construct_prompt
459and
460.Fn UI_get0_result
461return a string or
462.Dv NULL
463if an error occurred.
464.Pp
465.Fn UI_add_user_data
466and
467.Fn UI_get0_user_data
468return a pointer to the user data that was contained in
469.Fa ui
470before the call.
471In particular,
472.Dv NULL
473is a valid return value.
474.Pp
475.Fn UI_process
476returns 0 on success or a negative value on error.
477.Pp
478.Fn UI_ctrl
479returns a mask on success or \-1 on error.
480.Pp
481.Fn UI_get_default_method
482and
483.Fn UI_OpenSSL
484always return a pointer to a valid
485.Vt UI_METHOD
486structure.
487.Pp
488.Fn UI_get_method
489and
490.Fn UI_set_method
491return a pointer to the
492.Vt UI_METHOD
493structure that is installed in
494.Fa ui
495after the call.
496The OpenSSL documentation says that they can fail and return
497.Dv NULL ,
498but currently, this can only happen when and after
499.Fn UI_set_method
500is called with an explicit
501.Dv NULL
502argument.
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 ,