aboutsummaryrefslogtreecommitdiff
path: root/init.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-20 10:16:41 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-10-20 10:16:41 +0000
commitdd1047f52119bbe78bd0f2c9452c9965c4bdf0dc (patch)
tree1675b676ff3f477d365940dd8a39578fed97ef62 /init.c
parentChangeLog edit (diff)
downloadopenvpn-dd1047f52119bbe78bd0f2c9452c9965c4bdf0dc.tar.xz
Some changes to GET_USER_PASS_NEED_OK flag to
get_user_pass. (1) Allow an additional longer prompt string to be passed to the management interface client, in addition to the request type string. (2) Allow the management interface client to return a string, usually "ok" or "cancel" as the third argument to "needok" command. (3) Renamed "ok" command in management interface to "needok". (4) Edited management-notes.txt to reflect new needok feature. (5) See init.c:125 for new code example. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@694 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/init.c b/init.c
index 97d0660..156be8e 100644
--- a/init.c
+++ b/init.c
@@ -122,6 +122,20 @@ context_init_1 (struct context *c)
}
#endif
+#if 0 /* JYFIXME -- test get_user_pass with GET_USER_PASS_NEED_OK flag */
+ {
+ /*
+ * In the management interface, you can okay the request by entering "needok token-insertion-request ok"
+ */
+ struct user_pass up;
+ CLEAR (up);
+ strcpy (up.username, "Please insert your cryptographic token"); /* put the high-level message in up.username */
+ get_user_pass (&up, NULL, "token-insertion-request", GET_USER_PASS_MANAGEMENT|GET_USER_PASS_NEED_OK);
+ msg (M_INFO, "RET:%s", up.password); /* will return the third argument to management interface
+ 'needok' command, usually 'ok' or 'cancel'. */
+ }
+#endif
+
#if P2MP
/* Auth user/pass input */
if (c->options.auth_user_pass_file)