summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-01-15 12:43:44 (GMT)
committerTobias Markmann <tm@ayena.de>2018-02-02 08:56:47 (GMT)
commit9e2eee27d47ff1523677eb3881b4edcf66d7c0db (patch)
treec354e42f8b5314e1727da4aa8d9a248311e4242a /BuildTools
parent9eaa75b907a515a65ccb2002632fbf2f30c5aee8 (diff)
downloadswift-9e2eee27d47ff1523677eb3881b4edcf66d7c0db.zip
swift-9e2eee27d47ff1523677eb3881b4edcf66d7c0db.tar.bz2
Add support for extracting certificate chain from PEM string
Add PrivateKey class to simply encapsulate arbitrary private key data and the corresponding password. This enables easy unit testing by loading the certificate and key from within a test case. Test-Information: Added unit tests for certificate and key generated by OpenSSL. Tested on macOS 10.13.2 with OpenSSL. Change-Id: I1c9ffc3c70f61af65c4f1c48670badaf74b672b7
Diffstat (limited to 'BuildTools')
-rw-r--r--BuildTools/SCons/SConstruct9
1 files changed, 6 insertions, 3 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 2c2d629..bef388a 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -548,6 +548,10 @@ conf.Finish()
if env["qt"] :
env["QTDIR"] = env["qt"]
+if env["PLATFORM"] == "win32" :
+ systemIncludeFlag = "/I"
+else:
+ systemIncludeFlag = "-isystem"
################################################################################
# TLS backend selection
@@ -577,9 +581,9 @@ elif env.get("tls_backend") == "openssl" :
openssl_include = env.get("openssl_include")
openssl_libdir = env.get("openssl_libdir")
if openssl_include:
- openssl_flags = {"CPPPATH":[openssl_include]}
+ openssl_flags = { "CPPFLAGS": [systemIncludeFlag + openssl_include]}
else:
- openssl_flags = { "CPPPATH": [os.path.join(openssl_prefix, "include")] }
+ openssl_flags = { "CPPFLAGS": [systemIncludeFlag + os.path.join(openssl_prefix, "include")] }
if openssl_libdir:
openssl_flags["LIBPATH"] = [openssl_libdir]
env["OPENSSL_DIR"] = openssl_prefix
@@ -780,4 +784,3 @@ print
if not GetOption("help") and not env.get("HAVE_OPENSSL", 0) and not env.get("HAVE_SCHANNEL", 0) and not env.get("HAVE_SECURETRANSPORT", 0):
print "Error: A working TLS backend is required. Please check the documentation for more information."
Exit(1)
-