mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
4340. [port] Fix LibreSSL compatibility. [RT #40977]
This commit is contained in:
@@ -88,7 +88,7 @@ entropy_getpseudo(unsigned char *buf, int num) {
|
||||
return (result == ISC_R_SUCCESS ? 1 : -1);
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
static void
|
||||
entropy_add(const void *buf, int num, double entropy) {
|
||||
/*
|
||||
@@ -121,7 +121,7 @@ lock_callback(int mode, int type, const char *file, int line) {
|
||||
UNLOCK(&locks[type]);
|
||||
}
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
static unsigned long
|
||||
id_callback(void) {
|
||||
return ((unsigned long)isc_thread_self());
|
||||
@@ -187,7 +187,7 @@ dst__openssl_init(const char *engine) {
|
||||
if (result != ISC_R_SUCCESS)
|
||||
goto cleanup_mutexalloc;
|
||||
CRYPTO_set_locking_callback(lock_callback);
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
CRYPTO_set_id_callback(id_callback);
|
||||
#endif
|
||||
|
||||
@@ -287,7 +287,7 @@ dst__openssl_destroy(void) {
|
||||
CRYPTO_cleanup_all_ex_data();
|
||||
#endif
|
||||
ERR_clear_error();
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
|
||||
ERR_remove_state(0);
|
||||
#endif
|
||||
ERR_free_strings();
|
||||
|
Reference in New Issue
Block a user