Skip to content

Commit ae094a1

Browse files
FiloSottilegopherbot
authored andcommitted
crypto/internal/fips140test: make entropy file pair names match
Change-Id: I6a6a69642d00e3994277d9b5631d1d7f18f3f356 Reviewed-on: https://go-review.googlesource.com/c/go/+/710055 Reviewed-by: Roland Shoemaker <[email protected]> Reviewed-by: Daniel McCarney <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Filippo Valsorda <[email protected]> Reviewed-by: Michael Pratt <[email protected]>
1 parent 941e591 commit ae094a1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/crypto/internal/fips140test/entropy_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ var flagNISTSP80090B = flag.Bool("nist-sp800-90b", false, "run NIST SP 800-90B t
3131

3232
func TestEntropySamples(t *testing.T) {
3333
cryptotest.MustSupportFIPS140(t)
34+
now := time.Now().UTC()
3435

3536
var seqSamples [1_000_000]uint8
3637
samplesOrTryAgain(t, seqSamples[:])
3738
seqSamplesName := fmt.Sprintf("entropy_samples_sequential_%s_%s_%s_%s_%s.bin", entropy.Version(),
38-
runtime.GOOS, runtime.GOARCH, *flagEntropySamples, time.Now().Format("20060102T150405Z"))
39+
runtime.GOOS, runtime.GOARCH, *flagEntropySamples, now.Format("20060102T150405Z"))
3940
if *flagEntropySamples != "" {
4041
if err := os.WriteFile(seqSamplesName, seqSamples[:], 0644); err != nil {
4142
t.Fatalf("failed to write samples to %q: %v", seqSamplesName, err)
@@ -50,7 +51,7 @@ func TestEntropySamples(t *testing.T) {
5051
copy(restartSamples[i][:], samples[:])
5152
}
5253
restartSamplesName := fmt.Sprintf("entropy_samples_restart_%s_%s_%s_%s_%s.bin", entropy.Version(),
53-
runtime.GOOS, runtime.GOARCH, *flagEntropySamples, time.Now().Format("20060102T150405Z"))
54+
runtime.GOOS, runtime.GOARCH, *flagEntropySamples, now.Format("20060102T150405Z"))
5455
if *flagEntropySamples != "" {
5556
f, err := os.Create(restartSamplesName)
5657
if err != nil {

0 commit comments

Comments
 (0)