Browse code

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

james authored on 2008/12/25 11:33:34
Showing 3 changed files
... ...
@@ -1158,8 +1158,11 @@ read_key_file (struct key2 *key2, const char *file, const unsigned int flags)
1158 1158
 	     error_filename, count, onekeylen, keylen);
1159 1159
     }
1160 1160
 
1161
-  /* zero file read buffer */
1162
-  buf_clear (&in);
1161
+  /* zero file read buffer if not an inline file */
1162
+#if ENABLE_INLINE_FILES
1163
+  if (!(flags & RKF_INLINE))
1164
+#endif
1165
+    buf_clear (&in);
1163 1166
 
1164 1167
   if (key2->n)
1165 1168
     warn_if_group_others_accessible (error_filename);
... ...
@@ -1680,7 +1680,7 @@ do_init_crypto_tls_c1 (struct context *c)
1680 1680
 				 flags);
1681 1681
 	}
1682 1682
 
1683
-#if ENABLE_INLINE_FILES
1683
+#if 0 /* was: #if ENABLE_INLINE_FILES --  Note that enabling this code will break restarts */
1684 1684
       if (options->priv_key_file_inline)
1685 1685
 	{
1686 1686
 	  string_clear (c->options.priv_key_file_inline);
... ...
@@ -1,5 +1,5 @@
1 1
 dnl define the OpenVPN version
2
-define(PRODUCT_VERSION,[2.1_rc15b])
2
+define(PRODUCT_VERSION,[2.1_rc15c])
3 3
 dnl define the TAP version
4 4
 define(PRODUCT_TAP_ID,[tap0901])
5 5
 define(PRODUCT_TAP_WIN32_MIN_MAJOR,[9])