|
OpenVPN
|
#include "basic.h"

Go to the source code of this file.
Data Structures | |
| struct | _query_user |
| Configuration setup for declaring what kind of information to ask a user for. More... | |
Macros | |
| #define | QUERY_USER_NUMSLOTS 10 |
Functions | |
| void | query_user_clear (void) |
| Wipes all data put into all of the query_user structs. | |
| void | query_user_add (char *prompt, char *resp, int resp_len, bool echo) |
| Adds an item to ask the user for. | |
| bool | query_user_exec_builtin (void) |
| Loop through configured query_user slots, using the built-in method for querying the user. | |
| static bool | query_user_exec (void) |
| Wrapper function enabling query_user_exec() if no alternative methods have been enabled. | |
| static bool | query_user_SINGLE (char *prompt, char *resp, int resp_len, bool echo) |
| A plain "make Gert happy" wrapper. | |
Variables | |
| struct _query_user | query_user [] |
| Global variable, declared in console.c. | |
| void query_user_add | ( | char * | prompt, |
| char * | resp, | ||
| int | resp_len, | ||
| bool | echo | ||
| ) |
Adds an item to ask the user for.
| prompt | Prompt to display to the user |
| resp | String containing the user response |
| resp_len | Length of the response string |
| echo | Should the user input be echoed to the user? If False, input will be masked |
Definition at line 56 of file console.c.
References ASSERT, _query_user::echo, i, _query_user::prompt, query_user, QUERY_USER_NUMSLOTS, _query_user::response, and _query_user::response_len.
Referenced by get_user_pass_cr(), and query_user_SINGLE().
| void query_user_clear | ( | void | ) |
Wipes all data put into all of the query_user structs.
Definition at line 44 of file console.c.
References CLEAR, i, query_user, and QUERY_USER_NUMSLOTS.
Referenced by get_user_pass_cr(), and query_user_SINGLE().
|
inlinestatic |
Wrapper function enabling query_user_exec() if no alternative methods have been enabled.
Definition at line 103 of file console.h.
References query_user_exec_builtin().
Referenced by get_user_pass_cr(), and query_user_SINGLE().
| bool query_user_exec_builtin | ( | void | ) |
Loop through configured query_user slots, using the built-in method for querying the user.
This method uses the console/TTY directly.
Loop through configured query_user slots, using the built-in method for querying the user.
Default method for querying user using default stdin/stdout on a console. This needs to be available as a backup interface for the alternative implementations in case they cannot query through their implementation specific methods.
If no alternative implementation is declared, a wrapper in console.h will ensure query_user_exec() will call this function instead.
Definition at line 280 of file console_builtin.c.
References get_console_input(), i, query_user, QUERY_USER_NUMSLOTS, and _query_user::response.
Referenced by query_user_exec(), test_get_user_pass_authfile_file(), test_get_user_pass_authfile_stdin(), test_get_user_pass_authfile_stdin_assertions(), test_get_user_pass_dynamic_challenge(), test_get_user_pass_inline_creds(), test_get_user_pass_inline_creds_assertions(), test_get_user_pass_needok(), and test_get_user_pass_static_challenge().
|
inlinestatic |
A plain "make Gert happy" wrapper.
Same arguments as query_user_add()
FIXME/TODO: Remove this when refactoring the complete user query process to be called at start-up initialization of OpenVPN.
Definition at line 118 of file console.h.
References _query_user::echo, _query_user::prompt, query_user_add(), query_user_clear(), and query_user_exec().
Referenced by get_user_pass_cr().
|
extern |
Global variable, declared in console.c.
Definition at line 40 of file console.c.
Referenced by query_user_add(), query_user_clear(), query_user_exec_builtin(), test_get_user_pass_authfile_file(), test_get_user_pass_authfile_stdin(), test_get_user_pass_authfile_stdin_assertions(), test_get_user_pass_dynamic_challenge(), test_get_user_pass_inline_creds(), test_get_user_pass_needok(), and test_get_user_pass_static_challenge().