27025e
From 16c1bd61384e993fef13d7be88fdd34551a2b3ce Mon Sep 17 00:00:00 2001
27025e
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
27025e
Date: Wed, 23 Jan 2019 20:12:51 +0100
27025e
Subject: [PATCH] Use custom random generator only for bind build
27025e
27025e
Do not test random entropy on startup when used by DHCP. On most cases
27025e
random entropy is not even used by DHCP. In cases it is (LDAP SSL), fail
27025e
whenever it is not available.
27025e
27025e
Resolves: rhbz#1668682
27025e
---
27025e
 lib/dns/openssl_link.c | 2 ++
27025e
 1 file changed, 2 insertions(+)
27025e
27025e
diff --git a/lib/dns/openssl_link.c b/lib/dns/openssl_link.c
27025e
index 91e87d0..2551b0a 100644
27025e
--- a/lib/dns/openssl_link.c
27025e
+++ b/lib/dns/openssl_link.c
27025e
@@ -289,6 +289,7 @@ dst__openssl_init(const char *engine) {
27025e
 #endif
27025e
 #endif /* !defined(OPENSSL_NO_ENGINE) */
27025e
 
27025e
+#ifdef ISC_PLATFORM_USETHREADS
27025e
 	/* Protect ourselves against unseeded PRNG */
27025e
 	if (RAND_status() != 1) {
27025e
 		FATAL_ERROR(__FILE__, __LINE__,
27025e
@@ -296,6 +297,7 @@ dst__openssl_init(const char *engine) {
27025e
 			    "cannot be initialized (see the `PRNG not "
27025e
 			    "seeded' message in the OpenSSL FAQ)");
27025e
 	}
27025e
+#endif /* ISC_PLATFORM_USETHREADS */
27025e
 
27025e
 	return (ISC_R_SUCCESS);
27025e
 
27025e
-- 
27025e
2.20.1
27025e