diff options
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) |
