aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-02-05 16:32:16 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2014-02-05 16:32:16 -0800
commit0f63388d7298981045a18304c94029a5eee873df (patch)
tree242ef14088c389736e14dd44a200f4037a7b54df
parent7248ebd1bd9963280c061f8b3604c0a2bbff01bb (diff)
downloadcryptography-0f63388d7298981045a18304c94029a5eee873df.tar.gz
cryptography-0f63388d7298981045a18304c94029a5eee873df.tar.bz2
cryptography-0f63388d7298981045a18304c94029a5eee873df.zip
Rewrite this to be more streamlined
-rw-r--r--cryptography/hazmat/bindings/openssl/osrandom_engine.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/cryptography/hazmat/bindings/openssl/osrandom_engine.py b/cryptography/hazmat/bindings/openssl/osrandom_engine.py
index 6bc95a0b..23f2e17a 100644
--- a/cryptography/hazmat/bindings/openssl/osrandom_engine.py
+++ b/cryptography/hazmat/bindings/openssl/osrandom_engine.py
@@ -149,9 +149,9 @@ static const char *Cryptography_osrandom_engine_id = "osrandom";
static const char *Cryptography_osrandom_engine_name = "osrandom_engine";
#if defined(_WIN32)
-""" + WIN32_CUSTOMIZATIONS + """
+%(WIN32_CUSTOMIZATIONS)s
#else
-""" + POSIX_CUSTOMIZATIONS + """
+%(POSIX_CUSTOMIZATIONS)s
#endif
/* This replicates the behavior of the OpenSSL FIPS RNG, which returns a
@@ -197,6 +197,9 @@ int Cryptography_add_osrandom_engine(void) {
return 1;
}
-"""
+""" % {
+ "WIN32_CUSTOMIZATIONS": WIN32_CUSTOMIZATIONS,
+ "POSIX_CUSTOMIZATIONS": POSIX_CUSTOMIZATIONS,
+}
CONDITIONAL_NAMES = {}