Skip to content

Commit 4b37461

Browse files
ycombinatorSyedowais312
authored andcommitted
[fips140][configtls.TestTPM_tpmCertificate_errors] Skip test if GODEBUG=fips140=only is set (open-telemetry#14255)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description In open-telemetry#14225, we skipped the `configtls.TestTPM_loadCertificate` unit test if the tests were run with `GODEBUG=fips140=only`. Otherwise, the unit test failed with a `panic: crypto/cipher: use of CFB is not allowed in FIPS 140-only mode` error. Turns out there was a second unit test in the same package that needed skipping for the same reason: `configtls.TestTPM_tpmCertificate_errors`. This PR skips it too. <!-- Issue number if applicable --> #### Link to tracking issue Follow up to open-telemetry#14225
1 parent fdb5521 commit 4b37461

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

config/configtls/tpm_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ func TestTPM_loadCertificate_error(t *testing.T) {
101101
}
102102

103103
func TestTPM_tpmCertificate_errors(t *testing.T) {
104+
testutil.SkipIfFIPSOnly(t, "use of CFB is not allowed in FIPS 140-only mode")
104105
tpm, err := simulator.OpenSimulator()
105106
require.NoError(t, err)
106107
defer tpm.Close()

0 commit comments

Comments
 (0)