Skip to content

Commit

Permalink
add TestSupportsSignatureRSAPKCS1v15
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Dec 13, 2024
1 parent 41bb6ef commit 028b466
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions rsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,14 @@ func TestRSAEncryptDecryptOAEP_WrongLabel(t *testing.T) {
}
}

func TestSupportsSignatureRSAPKCS1v15(t *testing.T) {
// crypto.SHA256 should always be supported.
// Use it to test that the function works.
if !openssl.SupportsSignatureRSAPKCS1v15(crypto.SHA256) {
t.Error("crypto.SHA256 not supported")
}
}

func TestRSASignVerifyPKCS1v15(t *testing.T) {
priv, pub := newRSAKey(t, 2048)
// These are all the hashes supported by Go's crypto/rsa package
Expand Down

0 comments on commit 028b466

Please sign in to comment.