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>
(cherry picked from commit a2ad929640)
r14.0.x
Slávek Banko 5 years ago
parent 97bedf2ead
commit 68f3283bf4
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