aboutsummaryrefslogtreecommitdiff
path: root/crypto.c
diff options
context:
space:
mode:
authorjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-12-25 02:33:34 +0000
committerjames <james@e7ae566f-a301-0410-adde-c780ea21d3b5>2008-12-25 02:33:34 +0000
commit1f4309ae8722dd6c19e7cc39c011eb7f715b87e2 (patch)
tree7f85273b72b2cc05e4113332ec231b8f137c51a5 /crypto.c
parentVersion 2.1_rc15b (diff)
downloadopenvpn-1f4309ae8722dd6c19e7cc39c011eb7f715b87e2.tar.xz
Fixed issue where SIGUSR1 restarts would fail if private
key was specified as an inline file. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3743 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'crypto.c')
-rw-r--r--crypto.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/crypto.c b/crypto.c
index d813f03..c9d6cdf 100644
--- a/crypto.c
+++ b/crypto.c
@@ -1158,8 +1158,11 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags)
error_filename, count, onekeylen, keylen);
}
- /* zero file read buffer */
- buf_clear (&in);
+ /* zero file read buffer if not an inline file */
+#if ENABLE_INLINE_FILES
+ if (!(flags & RKF_INLINE))
+#endif
+ buf_clear (&in);
if (key2->n)
warn_if_group_others_accessible (error_filename);