From 9b656e7f40a3e0082681a63d2a2c0d4eea885906 Mon Sep 17 00:00:00 2001
From: Michael Tremer
Date: Tue, 22 May 2018 20:31:12 +0100
Subject: [PATCH] entropy: Don't show message for HWRNGs any more
We cannot reliably detect this with the new kernel
and therefore cannot show this.
Signed-off-by: Michael Tremer
---
html/cgi-bin/entropy.cgi | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/html/cgi-bin/entropy.cgi b/html/cgi-bin/entropy.cgi
index e5db5c212c..d7a9ca5d89 100644
--- a/html/cgi-bin/entropy.cgi
+++ b/html/cgi-bin/entropy.cgi
@@ -51,14 +51,9 @@ if ( $querry[0] ne~ "") {
# Check for hardware support.
my $message;
my $message_colour = $Header::colourred;
- if (&has_hwrng()) {
- $message = $Lang::tr{'system has hwrng'};
- $message_colour = $Header::colourgreen;
- } elsif (&has_rdrand()) {
+ if (&has_rdrand()) {
$message = $Lang::tr{'system has rdrand'};
$message_colour = $Header::colourgreen;
- } else {
- $message = $Lang::tr{'no hardware random number generator'};
}
my $rngd_status = "$Lang::tr{'stopped'} | ";
@@ -67,9 +62,13 @@ if ( $querry[0] ne~ "") {
}
&Header::openbox('100%', 'center', $Lang::tr{'hardware support'});
- print <$message
+ if ($message) {
+ print <$message
+EOF
+ }
+ print <
$Lang::tr{'service'} |
@@ -89,10 +88,6 @@ EOF
&Header::closepage();
}
-sub has_hwrng() {
- return (-c "/dev/hwrng");
-}
-
sub has_rdrand() {
open(FILE, "/proc/cpuinfo") or return 0;
my @cpuinfo = ;
--
2.39.2