summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2015-01-03 22:21:21 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2015-01-03 22:21:21 (GMT)
commitbc26646505efa997ed28a381b82f3f1b89a875e4 (patch)
tree45ad7addf7d06bb1e79490a0623fdf3ea57d31bf /Modules
parent5e8430d02c9ccd97199816516345c24c99ddc30c (diff)
downloadcpython-bc26646505efa997ed28a381b82f3f1b89a875e4.zip
cpython-bc26646505efa997ed28a381b82f3f1b89a875e4.tar.gz
cpython-bc26646505efa997ed28a381b82f3f1b89a875e4.tar.bz2
Issue #23143: Remove compatibility with OpenSSLs older than 0.9.8.
(now the hashlib module)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_hashopenssl.c12
1 files changed, 0 insertions, 12 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index 6a2a9af..1566b18 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -31,10 +31,6 @@
#define HASH_OBJ_CONSTRUCTOR 0
#endif
-/* Minimum OpenSSL version needed to support sha224 and higher. */
-#if defined(OPENSSL_VERSION_NUMBER) && (OPENSSL_VERSION_NUMBER >= 0x00908000)
-#define _OPENSSL_SUPPORTS_SHA2
-#endif
typedef struct {
PyObject_HEAD
@@ -56,12 +52,10 @@ static PyTypeObject EVPtype;
DEFINE_CONSTS_FOR_NEW(md5)
DEFINE_CONSTS_FOR_NEW(sha1)
-#ifdef _OPENSSL_SUPPORTS_SHA2
DEFINE_CONSTS_FOR_NEW(sha224)
DEFINE_CONSTS_FOR_NEW(sha256)
DEFINE_CONSTS_FOR_NEW(sha384)
DEFINE_CONSTS_FOR_NEW(sha512)
-#endif
static EVPobject *
@@ -798,12 +792,10 @@ generate_hash_name_list(void)
GEN_CONSTRUCTOR(md5)
GEN_CONSTRUCTOR(sha1)
-#ifdef _OPENSSL_SUPPORTS_SHA2
GEN_CONSTRUCTOR(sha224)
GEN_CONSTRUCTOR(sha256)
GEN_CONSTRUCTOR(sha384)
GEN_CONSTRUCTOR(sha512)
-#endif
/* List of functions exported by this module */
@@ -815,12 +807,10 @@ static struct PyMethodDef EVP_functions[] = {
#endif
CONSTRUCTOR_METH_DEF(md5),
CONSTRUCTOR_METH_DEF(sha1),
-#ifdef _OPENSSL_SUPPORTS_SHA2
CONSTRUCTOR_METH_DEF(sha224),
CONSTRUCTOR_METH_DEF(sha256),
CONSTRUCTOR_METH_DEF(sha384),
CONSTRUCTOR_METH_DEF(sha512),
-#endif
{NULL, NULL} /* Sentinel */
};
@@ -877,11 +867,9 @@ PyInit__hashlib(void)
/* these constants are used by the convenience constructors */
INIT_CONSTRUCTOR_CONSTANTS(md5);
INIT_CONSTRUCTOR_CONSTANTS(sha1);
-#ifdef _OPENSSL_SUPPORTS_SHA2
INIT_CONSTRUCTOR_CONSTANTS(sha224);
INIT_CONSTRUCTOR_CONSTANTS(sha256);
INIT_CONSTRUCTOR_CONSTANTS(sha384);
INIT_CONSTRUCTOR_CONSTANTS(sha512);
-#endif
return m;
}