[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
personal/stbuehler/fix-fdevent
Rosen Penev 4 years ago committed by Glenn Strauss
parent 6dcdc1af18
commit bc91bbd0c6
  1. 2
      src/rand.c

@ -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));
}

Loading…
Cancel
Save