Skip to content

Commit 7f9ab72

Browse files
committed
crypto/internal/fips140: update frozen module version to "v1.0.0"
We are re-sealing the .zip file anyway for another reason, might as well take the opportunity to fix the "v1.0" mistake. Note that the actual returned version change will happen when re-sealing the .zip, as the latest mkzip.go will inject "v1.0.0" instead of "v1.0". This reapplies CL 701518, reverted in CL 702255. Change-Id: Ib5b3721bda35c32dd48293b3d1193c12661662dd Reviewed-on: https://go-review.googlesource.com/c/go/+/702316 Reviewed-by: Roland Shoemaker <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> TryBot-Bypass: Filippo Valsorda <[email protected]>
1 parent fb5719c commit 7f9ab72

File tree

4 files changed

+3
-8
lines changed

4 files changed

+3
-8
lines changed

src/crypto/internal/cryptotest/hash.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type MakeHash func() hash.Hash
2020
// TestHash performs a set of tests on hash.Hash implementations, checking the
2121
// documented requirements of Write, Sum, Reset, Size, and BlockSize.
2222
func TestHash(t *testing.T, mh MakeHash) {
23-
if boring.Enabled || fips140.Version() == "v1.0" {
23+
if boring.Enabled || fips140.Version() == "v1.0.0" {
2424
testhash.TestHashWithoutClone(t, testhash.MakeHash(mh))
2525
return
2626
}

src/crypto/internal/fips140/fips140.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func Name() string {
6767
return "Go Cryptographic Module"
6868
}
6969

70-
// Version returns the formal version (such as "v1.0") if building against a
70+
// Version returns the formal version (such as "v1.0.0") if building against a
7171
// frozen module with GOFIPS140. Otherwise, it returns "latest".
7272
func Version() string {
7373
// This return value is replaced by mkzip.go, it must not be changed or

src/crypto/internal/fips140test/fips_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ func TestVersion(t *testing.T) {
7474
continue
7575
}
7676
exp := setting.Value
77-
if exp == "v1.0.0" {
78-
// Unfortunately we enshrined the version of the first module as
79-
// v1.0 before deciding to go for full versions.
80-
exp = "v1.0"
81-
}
8277
if v := fips140.Version(); v != exp {
8378
t.Errorf("Version is %q, expected %q", v, exp)
8479
}

src/crypto/rsa/rsa_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1246,7 +1246,7 @@ func TestModifiedPrivateKey(t *testing.T) {
12461246
})
12471247

12481248
t.Run("D+2", func(t *testing.T) {
1249-
if fips140.Version() == "v1.0" {
1249+
if fips140.Version() == "v1.0.0" {
12501250
t.Skip("This was fixed after v1.0.0")
12511251
}
12521252
testModifiedPrivateKey(t, func(k *PrivateKey) {

0 commit comments

Comments
 (0)