Skip to main content

Openvpn "Error opening file"

Chased down oddities in openvpn on Windows... This patch (against svn/trunk) proved rather useful:

--- ssl.c       (revision 2435)
+++ ssl.c       (working copy)
@@ -1097,8 +1097,9 @@
char password[256];

/* Load the PKCS #12 file */
+      errno = 0;
if (!(fp = fopen(options->pkcs12_file, "rb")))
-        msg (M_SSLERR, "Error opening file %s", options->pkcs12_file);
+        msg (M_SSLERR, "Error opening file %s %s", options->pkcs12_file, errno != 0 ? strerror(errno) : "");
p12 = d2i_PKCS12_fp(fp, NULL);
fclose (fp);
if (!p12) msg (M_SSLERR, "Error reading PKCS#12 file %s", options->pkcs12_file);

Comments

Comments powered by Disqus