Skip to content

Commit e55b381

Browse files
committed
slowly re-add everything that was removed, but now conditional
1 parent 7aa2a32 commit e55b381

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/_cffi_src/openssl/crypto.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@
6060
6161
/* this is a macro in 1.1.0 */
6262
void OPENSSL_free(void *);
63+
64+
/* This was removed in 1.1.0 */
65+
void CRYPTO_lock(int, int, const char *, int);
6366
"""
6467

6568
CUSTOMIZATIONS = """
@@ -92,6 +95,7 @@
9295
static const long CRYPTO_UNLOCK = 0;
9396
static const long CRYPTO_READ = 0;
9497
static const long CRYPTO_LOCK_SSL = 0;
98+
void (*CRYPTO_lock)(int, int, const char *, int) = NULL;
9599
#else
96100
static const long Cryptography_HAS_LOCKING_CALLBACKS = 1;
97101
#endif

src/cryptography/hazmat/bindings/openssl/_conditional.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,5 +417,6 @@
417417
"CRYPTO_UNLOCK",
418418
"CRYPTO_READ",
419419
"CRYPTO_LOCK_SSL",
420+
"CRYPTO_lock",
420421
]
421422
}

0 commit comments

Comments
 (0)