Fix SSL initialization for OpenSSL >= 1.1.

The first argument of the OPENSSL_init_ssl and OPENSSL_init_crypto
functions must be a 64-bit int, not a 32-bit int, as this caused
unpredictable OpenSSL behavior.

This resolves bug 3024.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/50/head
Slávek Banko 5 years ago
parent ec74ee4d12
commit a2ad929640
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -661,9 +661,9 @@ TDEConfig *cfg;
if (x) {
// OpenSSL >= 1.1
if (_cryptoLib) {
((int (*)(unsigned long, void*))x)(0, NULL);
((int (*)(unsigned long long, void*))x)(0, NULL);
x = GET_CRYPTOLIB_SYMBOL("OPENSSL_init_crypto");
if (x) ((int (*)(unsigned long, void*))x)(OPENSSL_INIT_ADD_ALL_CIPHERS
if (x) ((int (*)(unsigned long long, void*))x)(OPENSSL_INIT_ADD_ALL_CIPHERS
| OPENSSL_INIT_ADD_ALL_DIGESTS
| OPENSSL_INIT_LOAD_CONFIG,
NULL);

Loading…
Cancel
Save