Skip to content

Commit 6832f25

Browse files
Merge pull request #5135 from sensu/fips-1403-strict-with-go1.26
Fips 1403 strict with go1.26
2 parents d48061a + 206a8ca commit 6832f25

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/schedulerd/check_timer.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package schedulerd
22

33
import (
4-
"crypto/md5"
4+
"crypto/sha256"
55
"encoding/binary"
66

77
time "github.com/echlebek/timeproxy"
@@ -33,7 +33,8 @@ type IntervalTimer struct {
3333
func NewIntervalTimer(name string, interval uint) *IntervalTimer {
3434
// Calculate a check execution splay to ensure
3535
// execution is consistent between process restarts.
36-
sum := md5.Sum([]byte(name))
36+
// Using SHA-256 for FIPS 140-3 compliance.
37+
sum := sha256.Sum256([]byte(name))
3738
splay := binary.LittleEndian.Uint64(sum[:])
3839

3940
timer := &IntervalTimer{splay: splay}

0 commit comments

Comments
 (0)