summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-02-22 11:00:19 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-28 16:02:29 (GMT)
commit0e4f068273ecaa2be24a046812893698a06481bc (patch)
tree9c3b7dbd3609a866c2123ea0c5a539b5c49d67dd /Swiften/SConscript
parenteca0f020873f7620c5125101113e2c1eb25b273e (diff)
downloadswift-contrib-0e4f068273ecaa2be24a046812893698a06481bc.zip
swift-contrib-0e4f068273ecaa2be24a046812893698a06481bc.tar.bz2
Make Swift more usable in a FIPS-140 environment
Don't allow DIGEST-MD5 when Windows is set to FIPS mode. Use platform-provided hashing for SHA1.
Diffstat (limited to 'Swiften/SConscript')
-rw-r--r--Swiften/SConscript7
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/SConscript b/Swiften/SConscript
index 258b566..ecf32ef 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -193,7 +193,6 @@ if env["SCONS_STAGE"] == "build" :
"Session/BasicSessionStream.cpp",
"Session/BOSHSessionStream.cpp",
"StringCodecs/Base64.cpp",
- "StringCodecs/SHA1.cpp",
"StringCodecs/SHA256.cpp",
"StringCodecs/MD5.cpp",
"StringCodecs/Hexify.cpp",
@@ -230,7 +229,13 @@ if env["SCONS_STAGE"] == "build" :
"QA",
])
+
myenv = swiften_env.Clone()
+ if myenv["PLATFORM"] == "win32":
+ sources.append("StringCodecs/SHA1_Windows.cpp")
+ else:
+ sources.append("StringCodecs/SHA1.cpp")
+
if myenv["PLATFORM"] != "darwin" and myenv["PLATFORM"] != "win32" and myenv.get("HAVE_GCONF", 0) :
env.MergeFlags(env["GCONF_FLAGS"])
if ARGUMENTS.get("swiften_dll", False) :