Skip to content

Commit a754081

Browse files
authored
Add another failure case for RSA PSS Opts (#464)
1 parent 384d71e commit a754081

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

attest/application_key_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,18 @@ func testKeySignErrors(t *testing.T, sim bool) {
483483
},
484484
digest: []byte("12345678901234567890123456789012"),
485485
},
486+
{
487+
name: "RSA2048-PSS-SHA256 - Mismatched Salt Length",
488+
keyOpts: &KeyConfig{
489+
Algorithm: RSA,
490+
Size: 2048,
491+
},
492+
signOpts: &rsa.PSSOptions{
493+
SaltLength: 16,
494+
Hash: crypto.SHA256,
495+
},
496+
digest: []byte("12345678901234567890123456789012"),
497+
},
486498
} {
487499
t.Run(test.name, func(t *testing.T) {
488500
var tpm *TPM

0 commit comments

Comments
 (0)