Skip to content

Commit

Permalink
Merge pull request #5 from Amnesic-Systems/fix-rng-comparison
Browse files Browse the repository at this point in the history
Ignore white space in comparison.
  • Loading branch information
NullHypothesis authored Oct 24, 2024
2 parents b11aaed + 1ad8c34 commit b31bdb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/system/system_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"log"
"net"
"os"
"strings"
"syscall"
"unsafe"

Expand Down Expand Up @@ -98,7 +99,7 @@ func HasSecureRNG() bool {
return false
}
log.Printf("Have RNG: %s", haveRNG)
return string(haveRNG) == wantRNG
return strings.TrimSpace(string(haveRNG)) == wantRNG
}

// HasSecureKernelVersion checks if the system is running a kernel version that
Expand Down

0 comments on commit b31bdb5

Please sign in to comment.