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