[core] Don't call RAND_cleanup with OpenSSL 1.1.x

RAND_cleanup is deprecated and does nothing with 1.1.x.

It also breaks with OpenSSL compiled with no deprecated APIs.
(-DOPENSSL_API_COMPAT=<version>)

github: closes #93
This commit is contained in:
Rosen Penev 2018-11-09 16:29:20 -08:00 committed by Glenn Strauss
parent 6dcdc1af18
commit bc91bbd0c6
1 changed files with 2 additions and 0 deletions

View File

@ -224,7 +224,9 @@ int li_rand_bytes (unsigned char *buf, int num)
void li_rand_cleanup (void)
{
#ifdef USE_OPENSSL_CRYPTO
#if OPENSSL_VERSION_NUMBER < 0x10100000L
RAND_cleanup();
#endif
#endif
safe_memclear(xsubi, sizeof(xsubi));
}