Skip to content

Commit c1bba9e

Browse files
author
Nick Thomas
committed
Generate hashCAFile with SHA256
In a FIPS environment, it's much easier to switch to SHA256 than it is to verify and explain that any particular use of MD5 is actually safe in-context. Signed-off-by: Nick Thomas <[email protected]>
1 parent 3ebd397 commit c1bba9e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/http_config.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ package config
1717

1818
import (
1919
"bytes"
20-
"crypto/md5"
20+
"crypto/sha256"
2121
"crypto/tls"
2222
"crypto/x509"
2323
"fmt"
@@ -533,7 +533,7 @@ func (t *tlsRoundTripper) getCAWithHash() ([]byte, []byte, error) {
533533
if err != nil {
534534
return nil, nil, err
535535
}
536-
h := md5.Sum(b)
536+
h := sha256.Sum256(b)
537537
return b, h[:], nil
538538

539539
}

0 commit comments

Comments
 (0)