summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2010-11-18 19:10:08 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2010-11-18 19:10:08 +0100
commiteb208d36d466a1725e20e0a7aef39b1114b99e78 (patch)
tree9df41891559db44b0a9723a6d93ad5961ffd2204
parent4b519cf51d02daacb388eb90bd0c5930145d7a0d (diff)
parentf20c2f0d6b42f652f39c0082237c3f8d69752ec9 (diff)
downloadopenvpn-eb208d36d466a1725e20e0a7aef39b1114b99e78.tar.gz
openvpn-eb208d36d466a1725e20e0a7aef39b1114b99e78.tar.xz
openvpn-eb208d36d466a1725e20e0a7aef39b1114b99e78.zip
Merge branch 'bugfix2.1' into beta2.2
-rw-r--r--ssl.c4
-rw-r--r--win/build_all.py71
2 files changed, 58 insertions, 17 deletions
diff --git a/ssl.c b/ssl.c
index 93eed18..e7fd071 100644
--- a/ssl.c
+++ b/ssl.c
@@ -1091,13 +1091,13 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
msg (D_HANDSHAKE, "VERIFY OK: depth=%d, %s", ctx->error_depth, subject);
session->verified = true;
- free (subject);
+ OPENSSL_free (subject);
argv_reset (&argv);
return 1; /* Accept connection */
err:
ERR_clear_error ();
- free (subject);
+ OPENSSL_free (subject);
argv_reset (&argv);
return 0; /* Reject connection */
}
diff --git a/win/build_all.py b/win/build_all.py
index 92d2bf4..dec3a78 100644
--- a/win/build_all.py
+++ b/win/build_all.py
@@ -1,18 +1,59 @@
-from config_all import main as config_all
-from build import main as build_openvpn
-from build_ddk import main as build_ddk
-from sign import main as sign
-from make_dist import main as make_dist
-
-def main(config):
- config_all(config)
- build_openvpn()
- build_ddk(config, 'tap', 'all')
- build_ddk(config, 'tapinstall', 'all')
- sign(config, 'all')
- make_dist(config)
-
-# if we are run directly, and not loaded as a module
+import getopt, sys
+from config_all import main as config_all
+from build import main as build_openvpn
+from build_ddk import main as build_ddk
+from make_dist import main as make_dist
+
+def Usage():
+ '''Show usage information'''
+ print "Usage: build_all.py [OPTIONS]..."
+ print "Build OpenVPN using Visual Studio tools"
+ print
+ print " -h, --help Show this help"
+ print " -u, --unsigned Do not sign the TAP drivers"
+ sys.exit(1)
+
+def main(config):
+
+ # Do a signed build by default
+ signedBuild=True
+
+ # Parse the command line argument(s)
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], "hu", ["help", "unsigned"])
+ except getopt.GetoptError:
+ Usage()
+
+ for o, a in opts:
+ if o in ("-h","--help"):
+ Usage()
+ if o in ("-u", "--unsigned"):
+ signedBuild=False
+
+
+ # Check if the SignTool module is present. This avoids ImportErrors popping
+ # up annoyingly _after_ the build.
+ if signedBuild:
+ try:
+ from signtool import SignTool
+ except (ImportError):
+ print "ERROR: SignTool python module not found! Can't do a signed build."
+ sys.exit(1)
+ else:
+ print "Doing an unsigned build as requested"
+
+ # Start the build
+ config_all(config)
+ build_openvpn()
+ build_ddk(config, 'tap', 'all')
+ build_ddk(config, 'tapinstall', 'all')
+
+ if signedBuild:
+ sign(config, 'all')
+
+ make_dist(config)
+
+# if we are run directly, and not loaded as a module
if __name__ == "__main__":
from wb import config
main(config)