diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-12-08 18:29:38 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2005-12-08 18:29:38 +0000 |
commit | c959fc742eb10c516261765718a761536b0b8f4a (patch) | |
tree | 6cc92545c1c6df6338ad6ab07b6619e094e36f93 /options.c | |
parent | Fixed some gcc 4 warnings in misc.c. (diff) | |
download | openvpn-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 'options.c')
-rw-r--r-- | options.c | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -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; |