The current code provides a workaround for the absence of RAND_status in
OpenSSL versions before 0.9.5. The comments in the code indicate these
versions have to be supported, but as these versions are now more than
20 years old, this no longer applies. Removing this support simplifies the
code and on the small chance that anyone is still using such old versions,
breaking their build will actually be doing them a favor given the known
issues with these OpenSSL versions.
---
 mutt_ssl.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/mutt_ssl.c b/mutt_ssl.c
index 6978e4e4..29733885 100644
--- a/mutt_ssl.c
+++ b/mutt_ssl.c
@@ -62,17 +62,7 @@
 #define DEVRANDOM "/dev/urandom"
 #endif
 
-/* This is ugly, but as RAND_status came in on OpenSSL version 0.9.5
- * and the code has to support older versions too, this is seemed to
- * be cleaner way compared to having even uglier #ifdefs all around.
- */
-#ifdef HAVE_RAND_STATUS
 #define HAVE_ENTROPY() (RAND_status() == 1)
-#else
-static int entropy_byte_count = 0;
-/* OpenSSL fills the entropy pool from /dev/urandom if it exists */
-#define HAVE_ENTROPY() (!access(DEVRANDOM, R_OK) || entropy_byte_count >= 16)
-#endif
 
 /* index for storing hostname as application specific data in SSL structure */
 static int HostExDataIndex = -1;
-- 
2.26.2

Reply via email to