Skip to content

Commit

Permalink
remove tests since SoftHSM2 does not support SHA3 (yet)
Browse files Browse the repository at this point in the history
  • Loading branch information
jls5177 committed Jun 13, 2019
1 parent 7821a35 commit b760446
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions rsa_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ func testRsaSigning(t *testing.T, key crypto.Signer, nbits int, native bool) {
t.Run("SHA256", func(t *testing.T) { testRsaSigningPKCS1v15(t, key, crypto.SHA256) })
t.Run("SHA384", func(t *testing.T) { testRsaSigningPKCS1v15(t, key, crypto.SHA384) })
t.Run("SHA512", func(t *testing.T) { testRsaSigningPKCS1v15(t, key, crypto.SHA512) })
t.Run("SHA3-224", func(t *testing.T) { testRsaSigningPKCS1v15(t, key, crypto.SHA3_224) })
t.Run("SHA3-256", func(t *testing.T) { testRsaSigningPKCS1v15(t, key, crypto.SHA3_256) })
t.Run("SHA3-384", func(t *testing.T) { testRsaSigningPKCS1v15(t, key, crypto.SHA3_384) })
t.Run("SHA3-512", func(t *testing.T) { testRsaSigningPKCS1v15(t, key, crypto.SHA3_512) })
t.Run("PSSSHA1", func(t *testing.T) { testRsaSigningPSS(t, key, crypto.SHA1, native) })
t.Run("PSSSHA224", func(t *testing.T) { testRsaSigningPSS(t, key, crypto.SHA224, native) })
t.Run("PSSSHA256", func(t *testing.T) { testRsaSigningPSS(t, key, crypto.SHA256, native) })
Expand All @@ -128,16 +124,6 @@ func testRsaSigning(t *testing.T, key crypto.Signer, nbits int, native bool) {
t.Skipf("key too smol for SHA512 with sLen=hLen")
}
})
t.Run("PSSSHA3-224", func(t *testing.T) { testRsaSigningPSS(t, key, crypto.SHA3_224, native) })
t.Run("PSSSHA3-256", func(t *testing.T) { testRsaSigningPSS(t, key, crypto.SHA3_256, native) })
t.Run("PSSSHA3-384", func(t *testing.T) { testRsaSigningPSS(t, key, crypto.SHA3_384, native) })
t.Run("PSSSHA3-512", func(t *testing.T) {
if nbits > 1024 {
testRsaSigningPSS(t, key, crypto.SHA3_512, native)
} else {
t.Skipf("key too smol for SHA512 with sLen=hLen")
}
})
}

func testRsaSigningPKCS1v15(t *testing.T, key crypto.Signer, hashFunction crypto.Hash) {
Expand Down Expand Up @@ -206,16 +192,6 @@ func testRsaEncryption(t *testing.T, key crypto.Decrypter, nbits int, native boo
t.Skipf("key too small for SHA512")
}
})
t.Run("OAEPSHA3-224", func(t *testing.T) { testRsaEncryptionOAEP(t, key, crypto.SHA3_224, []byte{}, native) })
t.Run("OAEPSHA3-256", func(t *testing.T) { testRsaEncryptionOAEP(t, key, crypto.SHA3_256, []byte{}, native) })
t.Run("OAEPSHA3-384", func(t *testing.T) { testRsaEncryptionOAEP(t, key, crypto.SHA3_384, []byte{}, native) })
t.Run("OAEPSHA3-512", func(t *testing.T) {
if nbits > 1024 {
testRsaEncryptionOAEP(t, key, crypto.SHA3_512, []byte{}, native)
} else {
t.Skipf("key too small for SHA512")
}
})
}

func testRsaEncryptionPKCS1v15(t *testing.T, key crypto.Decrypter) {
Expand Down

0 comments on commit b760446

Please sign in to comment.