fix build against libressl

This commit is contained in:
John 2018-02-19 17:23:30 +01:00 committed by John Preston
parent 506b0806d6
commit 73c0c4507a
2 changed files with 3 additions and 1 deletions

View File

@ -289,7 +289,9 @@ namespace ThirdParty {
av_lockmgr_register(nullptr);
CRYPTO_cleanup_all_ex_data();
#ifndef LIBRESSL_VERSION_NUMBER
FIPS_mode_set(0);
#endif
ENGINE_cleanup();
CONF_modules_unload(1);
ERR_remove_state(0);

View File

@ -16,7 +16,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
namespace MTP {
namespace internal {
namespace {
#if OPENSSL_VERSION_NUMBER < 0x10100000L
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
// This is a key setter for compatibility with OpenSSL 1.0
int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) {