diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2019-09-04 14:25:09 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2019-09-04 14:25:25 +0200 |
commit | 68f3283bf4e29a4d4d147e46e02022a98899fb9b (patch) | |
tree | 0ee9ee433e93a1c2c1e3c2936ffdadcbba5f4cfd /tdeio | |
parent | 97bedf2ead7d64321c50fcaf4fe103fa4c3a2cae (diff) | |
download | tdelibs-68f3283bf4e29a4d4d147e46e02022a98899fb9b.tar.gz tdelibs-68f3283bf4e29a4d4d147e46e02022a98899fb9b.zip |
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 a2ad929640f62ee1f854564366ce1cd8547de455)
Diffstat (limited to 'tdeio')
-rw-r--r-- | tdeio/kssl/kopenssl.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tdeio/kssl/kopenssl.cc b/tdeio/kssl/kopenssl.cc index 9c6d47ad4..0fa4e27b4 100644 --- a/tdeio/kssl/kopenssl.cc +++ b/tdeio/kssl/kopenssl.cc @@ -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); |