diff options
author | djm <> | 2010-10-01 22:54:21 +0000 |
---|---|---|
committer | djm <> | 2010-10-01 22:54:21 +0000 |
commit | 829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2 (patch) | |
tree | e03b9f1bd051e844b971936729e9df549a209130 /src/lib/libcrypto/ui/ui_lib.c | |
parent | e6b755d2a53d3cac7a344dfdd6bf7c951cac754c (diff) | |
download | openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.gz openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.bz2 openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.zip |
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/ui/ui_lib.c')
-rw-r--r-- | src/lib/libcrypto/ui/ui_lib.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index ac0100808f..a8abc27064 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c | |||
@@ -693,6 +693,17 @@ int UI_method_set_closer(UI_METHOD *method, int (*closer)(UI *ui)) | |||
693 | return -1; | 693 | return -1; |
694 | } | 694 | } |
695 | 695 | ||
696 | int UI_method_set_prompt_constructor(UI_METHOD *method, char *(*prompt_constructor)(UI* ui, const char* object_desc, const char* object_name)) | ||
697 | { | ||
698 | if (method) | ||
699 | { | ||
700 | method->ui_construct_prompt = prompt_constructor; | ||
701 | return 0; | ||
702 | } | ||
703 | else | ||
704 | return -1; | ||
705 | } | ||
706 | |||
696 | int (*UI_method_get_opener(UI_METHOD *method))(UI*) | 707 | int (*UI_method_get_opener(UI_METHOD *method))(UI*) |
697 | { | 708 | { |
698 | if (method) | 709 | if (method) |
@@ -733,6 +744,14 @@ int (*UI_method_get_closer(UI_METHOD *method))(UI*) | |||
733 | return NULL; | 744 | return NULL; |
734 | } | 745 | } |
735 | 746 | ||
747 | char* (*UI_method_get_prompt_constructor(UI_METHOD *method))(UI*, const char*, const char*) | ||
748 | { | ||
749 | if (method) | ||
750 | return method->ui_construct_prompt; | ||
751 | else | ||
752 | return NULL; | ||
753 | } | ||
754 | |||
736 | enum UI_string_types UI_get_string_type(UI_STRING *uis) | 755 | enum UI_string_types UI_get_string_type(UI_STRING *uis) |
737 | { | 756 | { |
738 | if (!uis) | 757 | if (!uis) |