summaryrefslogtreecommitdiffstats
path: root/misc.h
diff options
context:
space:
mode:
authorDavid Sommerseth <davids@redhat.com>2011-08-24 13:06:39 +0200
committerDavid Sommerseth <davids@redhat.com>2011-08-24 13:06:39 +0200
commit20fc33707eab708dfd7e8ffcf2eea0f8362b10b3 (patch)
tree7f60234df8fc0e073cf40ea25361d1e3f35bed50 /misc.h
parent3b75dec3e32e7d838ed56be5667d1cf3ac4cef18 (diff)
parent576dc96ca1ef1badb651e05ac694f07c91e02518 (diff)
downloadopenvpn-20fc33707eab708dfd7e8ffcf2eea0f8362b10b3.tar.gz
openvpn-20fc33707eab708dfd7e8ffcf2eea0f8362b10b3.tar.xz
openvpn-20fc33707eab708dfd7e8ffcf2eea0f8362b10b3.zip
Merge branch 'svn-merger'
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc.h b/misc.h
index 7681c00..b2e6f91 100644
--- a/misc.h
+++ b/misc.h
@@ -278,8 +278,19 @@ struct auth_challenge_info {
struct auth_challenge_info *get_auth_challenge (const char *auth_challenge, struct gc_arena *gc);
+/*
+ * Challenge response info on client as pushed by server.
+ */
+struct static_challenge_info {
+# define SC_ECHO (1<<0) /* echo response when typed by user */
+ unsigned int flags;
+
+ const char *challenge_text;
+};
+
#else
struct auth_challenge_info {};
+struct static_challenge_info {};
#endif
bool get_console_input (const char *prompt, const bool echo, char *input, const int capacity);
@@ -295,6 +306,10 @@ bool get_console_input (const char *prompt, const bool echo, char *input, const
#define GET_USER_PASS_NEED_STR (1<<5)
#define GET_USER_PASS_PREVIOUS_CREDS_FAILED (1<<6)
+#define GET_USER_PASS_DYNAMIC_CHALLENGE (1<<7) /* CRV1 protocol -- dynamic challenge */
+#define GET_USER_PASS_STATIC_CHALLENGE (1<<8) /* SCRV1 protocol -- static challenge */
+#define GET_USER_PASS_STATIC_CHALLENGE_ECHO (1<<9) /* SCRV1 protocol -- echo response */
+
bool get_user_pass_cr (struct user_pass *up,
const char *auth_file,
const char *prefix,