aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-19 12:12:08 -0500
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-04-19 12:12:08 -0500
commita3652a8d3893d1f8f638613ae8b2198342b251ba (patch)
treece533f169f1e9185ad8f9ba52ec5616d48c9567c
parentcc17d36560e6a3f2db1305559f9e9cacd091a05a (diff)
downloadcryptography-a3652a8d3893d1f8f638613ae8b2198342b251ba.tar.gz
cryptography-a3652a8d3893d1f8f638613ae8b2198342b251ba.tar.bz2
cryptography-a3652a8d3893d1f8f638613ae8b2198342b251ba.zip
make the cms binding work properly on windows
-rw-r--r--cryptography/hazmat/bindings/openssl/cms.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cryptography/hazmat/bindings/openssl/cms.py b/cryptography/hazmat/bindings/openssl/cms.py
index 4888e5e3..a3760f2c 100644
--- a/cryptography/hazmat/bindings/openssl/cms.py
+++ b/cryptography/hazmat/bindings/openssl/cms.py
@@ -15,6 +15,11 @@ from __future__ import absolute_import, division, print_function
INCLUDES = """
#if !defined(OPENSSL_NO_CMS) && OPENSSL_VERSION_NUMBER >= 0x0090808fL
+// The next define should really be in the OpenSSL header, but it is missing.
+// Failing to include this on Windows causes compilation failures.
+#if defined(OPENSSL_SYS_WINDOWS)
+#include <windows.h>
+#endif
#include <openssl/cms.h>
#endif
"""