aboutsummaryrefslogtreecommitdiff
path: root/options.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-08 18:29:38 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2005-12-08 18:29:38 +0000
commitc959fc742eb10c516261765718a761536b0b8f4a (patch)
tree6cc92545c1c6df6338ad6ab07b6619e094e36f93 /options.c
parentFixed some gcc 4 warnings in misc.c. (diff)
downloadopenvpn-c959fc742eb10c516261765718a761536b0b8f4a.tar.xz
Inline file capability now works for
--secret and --tls-auth. For example: <secret> [ascii key data] </secret> git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@844 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r--options.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/options.c b/options.c
index 72e2f4f..9e38da6 100644
--- a/options.c
+++ b/options.c
@@ -4538,9 +4538,26 @@ add_option (struct options *options,
VERIFY_PERMISSION (OPT_P_GENERAL);
options->show_engines = true;
}
+ else if (streq (p[0], "key-direction") && p[1])
+ {
+ int key_direction;
+
+ key_direction = ascii2keydirection (msglevel, p[1]);
+ if (key_direction >= 0)
+ options->key_direction = key_direction;
+ else
+ goto err;
+ }
else if (streq (p[0], "secret") && p[1])
{
VERIFY_PERMISSION (OPT_P_GENERAL);
+#if ENABLE_INLINE_FILES
+ if (streq (p[1], INLINE_FILE_TAG) && p[2])
+ {
+ options->shared_secret_file_inline = p[2];
+ }
+ else
+#endif
if (p[2])
{
int key_direction;
@@ -4889,6 +4906,13 @@ add_option (struct options *options,
else if (streq (p[0], "tls-auth") && p[1])
{
VERIFY_PERMISSION (OPT_P_GENERAL);
+#if ENABLE_INLINE_FILES
+ if (streq (p[1], INLINE_FILE_TAG) && p[2])
+ {
+ options->tls_auth_file_inline = p[2];
+ }
+ else
+#endif
if (p[2])
{
int key_direction;