|
9 | 9 | """ |
10 | 10 |
|
11 | 11 | TYPES = """ |
| 12 | +static const long Cryptography_HAS_LOCKING_CALLBACKS; |
| 13 | +
|
12 | 14 | typedef ... CRYPTO_THREADID; |
13 | 15 |
|
14 | 16 | static const int SSLEAY_VERSION; |
|
28 | 30 | static const int CRYPTO_LOCK; |
29 | 31 | static const int CRYPTO_UNLOCK; |
30 | 32 | static const int CRYPTO_READ; |
31 | | -static const int CRYPTO_WRITE; |
32 | 33 | static const int CRYPTO_LOCK_SSL; |
33 | 34 | """ |
34 | 35 |
|
|
38 | 39 | int CRYPTO_is_mem_check_on(void); |
39 | 40 | void CRYPTO_mem_leaks(struct bio_st *); |
40 | 41 | void CRYPTO_cleanup_all_ex_data(void); |
41 | | -int CRYPTO_num_locks(void); |
42 | | -void CRYPTO_set_locking_callback(void(*)(int, int, const char *, int)); |
43 | | -void (*CRYPTO_get_locking_callback(void))(int, int, const char *, int); |
44 | | -void CRYPTO_lock(int, int, const char *, int); |
45 | 42 |
|
46 | 43 | """ |
47 | 44 |
|
48 | 45 | MACROS = """ |
| 46 | +/* as of 1.1.0 OpenSSL does its own locking *angelic chorus*. These functions |
| 47 | + have become macros that are no ops */ |
| 48 | +int CRYPTO_num_locks(void); |
| 49 | +void CRYPTO_set_locking_callback(void(*)(int, int, const char *, int)); |
| 50 | +void (*CRYPTO_get_locking_callback(void))(int, int, const char *, int); |
| 51 | +
|
49 | 52 | /* SSLeay was removed in 1.1.0 */ |
50 | 53 | unsigned long SSLeay(void); |
51 | 54 | const char *SSLeay_version(int); |
|
57 | 60 |
|
58 | 61 | /* this is a macro in 1.1.0 */ |
59 | 62 | void OPENSSL_free(void *); |
| 63 | +
|
| 64 | +/* This was removed in 1.1.0 */ |
| 65 | +void CRYPTO_lock(int, int, const char *, int); |
60 | 66 | """ |
61 | 67 |
|
62 | 68 | CUSTOMIZATIONS = """ |
|
83 | 89 | # define OPENSSL_PLATFORM SSLEAY_PLATFORM |
84 | 90 | # define OPENSSL_DIR SSLEAY_DIR |
85 | 91 | #endif |
| 92 | +#if !defined(CRYPTO_LOCK) |
| 93 | +static const long Cryptography_HAS_LOCKING_CALLBACKS = 0; |
| 94 | +static const long CRYPTO_LOCK = 0; |
| 95 | +static const long CRYPTO_UNLOCK = 0; |
| 96 | +static const long CRYPTO_READ = 0; |
| 97 | +static const long CRYPTO_LOCK_SSL = 0; |
| 98 | +void (*CRYPTO_lock)(int, int, const char *, int) = NULL; |
| 99 | +#else |
| 100 | +static const long Cryptography_HAS_LOCKING_CALLBACKS = 1; |
| 101 | +#endif |
86 | 102 | """ |
0 commit comments