@@ -1730,7 +1730,7 @@ index bdd6d85c69..c6999a4a1f 100644
17301730 if err != nil {
17311731 return nil, err
17321732diff --git a/src/crypto/rsa/rsa_test.go b/src/crypto/rsa/rsa_test.go
1733- index e4484540c1..e55b8c70ff 100644
1733+ index b994daec19..4b7427e1ae 100644
17341734--- a/src/crypto/rsa/rsa_test.go
17351735+++ b/src/crypto/rsa/rsa_test.go
17361736@@ -8,7 +8,7 @@ import (
@@ -1788,9 +1788,9 @@ index e4484540c1..e55b8c70ff 100644
17881788 n := new(big.Int)
17891789 for i, test := range testEncryptOAEPData {
17901790 n.SetString(test.modulus, 16)
1791- - if boring.Enabled && !boringtest.Supports(t, "RSA1024") && n.BitLen() < 2048 {
1792- + if boring.Enabled() && !boringtest.Supports(t, "RSA1024") && n.BitLen() < 2048 {
1793- t.Logf ("skipping encryption tests with BoringCrypto: too short key: %d", n.BitLen() )
1791+ - if boring.Enabled {
1792+ + if boring.Enabled() {
1793+ t.Log ("skipping test in FIPS mode due to short keys and unpadded RSA operations not allowed with FIPS" )
17941794 continue
17951795 }
17961796@@ -694,7 +694,7 @@ func TestDecryptOAEP(t *testing.T) {
@@ -2079,7 +2079,7 @@ index 140b1a3dd8..fe6fa96d28 100644
20792079 }
20802080 }
20812081diff --git a/src/crypto/tls/boring_test.go b/src/crypto/tls/boring_test.go
2082- index 8ddd2526c7..5b041ef1d3 100644
2082+ index 7bfe3f9417..49702f59ba 100644
20832083--- a/src/crypto/tls/boring_test.go
20842084+++ b/src/crypto/tls/boring_test.go
20852085@@ -2,14 +2,14 @@
@@ -2108,7 +2108,25 @@ index 8ddd2526c7..5b041ef1d3 100644
21082108 test("VersionTLS13", VersionTLS13, "client offered only unsupported versions")
21092109 } else {
21102110 test("VersionTLS13", VersionTLS13, "")
2111- @@ -388,7 +388,7 @@ func TestBoringCertAlgs(t *testing.T) {
2111+ @@ -238,7 +238,7 @@ func TestBoringServerSignatureAndHash(t *testing.T) {
2112+
2113+ clientConfig := testConfig.Clone()
2114+
2115+ - if boring.Enabled {
2116+ + if boring.Enabled() {
2117+ serverConfig.Rand = boring.RandReader
2118+ clientConfig.Rand = boring.RandReader
2119+ }
2120+ @@ -369,7 +369,7 @@ func TestBoringCertAlgs(t *testing.T) {
2121+ serverConfig.Certificates = []Certificate{{Certificate: list, PrivateKey: key}}
2122+ serverConfig.BuildNameToCertificate()
2123+
2124+ - if boring.Enabled {
2125+ + if boring.Enabled() {
2126+ serverConfig.Rand = boring.RandReader
2127+ clientConfig.Rand = boring.RandReader
2128+ }
2129+ @@ -400,13 +400,13 @@ func TestBoringCertAlgs(t *testing.T) {
21122130 serverConfig := testConfig.Clone()
21132131 serverConfig.ClientCAs = pool
21142132 serverConfig.ClientAuth = RequireAndVerifyClientCert
@@ -2117,7 +2135,14 @@ index 8ddd2526c7..5b041ef1d3 100644
21172135 serverConfig.Certificates[0].Certificate = [][]byte{testRSA2048Certificate}
21182136 serverConfig.Certificates[0].PrivateKey = testRSA2048PrivateKey
21192137 serverConfig.BuildNameToCertificate()
2120- @@ -415,8 +415,8 @@ func TestBoringCertAlgs(t *testing.T) {
2138+ }
2139+
2140+ - if boring.Enabled {
2141+ + if boring.Enabled() {
2142+ serverConfig.Rand = boring.RandReader
2143+ clientConfig.Rand = boring.RandReader
2144+ }
2145+ @@ -432,8 +432,8 @@ func TestBoringCertAlgs(t *testing.T) {
21212146 // exhaustive test with computed answers.
21222147 r1pool := x509.NewCertPool()
21232148 r1pool.AddCert(R1.cert)
@@ -2128,7 +2153,7 @@ index 8ddd2526c7..5b041ef1d3 100644
21282153 fipstls.Force()
21292154 testServerCert(t, "basic (fips)", r1pool, L2_I.key, [][]byte{L2_I.der, I_R1.der}, false)
21302155 testClientCert(t, "basic (fips, client cert)", r1pool, L2_I.key, [][]byte{L2_I.der, I_R1.der}, false)
2131- @@ -437 ,7 +437 ,7 @@ func TestBoringCertAlgs(t *testing.T) {
2156+ @@ -454 ,7 +454 ,7 @@ func TestBoringCertAlgs(t *testing.T) {
21322157 leaf = L2_I
21332158 }
21342159 for i := 0; i < 64; i++ {
@@ -2137,7 +2162,7 @@ index 8ddd2526c7..5b041ef1d3 100644
21372162 reachableFIPS := map[string]bool{leaf.parentOrg: leaf.fipsOK}
21382163 list := [][]byte{leaf.der}
21392164 listName := leaf.name
2140- @@ -445 ,7 +445 ,7 @@ func TestBoringCertAlgs(t *testing.T) {
2165+ @@ -462 ,7 +462 ,7 @@ func TestBoringCertAlgs(t *testing.T) {
21412166 if cond != 0 {
21422167 list = append(list, c.der)
21432168 listName += "," + c.name
@@ -2146,7 +2171,7 @@ index 8ddd2526c7..5b041ef1d3 100644
21462171 reachable[c.parentOrg] = true
21472172 }
21482173 if reachableFIPS[c.org] && c.fipsOK {
2149- @@ -469 ,7 +469 ,7 @@ func TestBoringCertAlgs(t *testing.T) {
2174+ @@ -486 ,7 +486 ,7 @@ func TestBoringCertAlgs(t *testing.T) {
21502175 if cond != 0 {
21512176 rootName += "," + c.name
21522177 pool.AddCert(c.cert)
0 commit comments