geoffreyblake commented on a change in pull request #97:
URL: https://github.com/apache/commons-crypto/pull/97#discussion_r413105005
##########
File path: src/test/java/org/apache/commons/crypto/cipher/OpenSslCipherTest.java
##########
@@ -136,6 +137,15 @@ public void testInvalidIV() throws Exception {
cipher.init(OpenSsl.ENCRYPT_MODE, KEY, new IvParameterSpec(invalidIV));
}
+ @Test(expected = InvalidAlgorithmParameterException.class, timeout =
120000)
+ public void testInvalidIVClass() throws Exception {
+ final OpenSsl cipher = OpenSsl.getInstance("AES/CTR/NoPadding");
+ Assert.assertNotNull(cipher);
+
+ cipher.init(OpenSsl.ENCRYPT_MODE, KEY, new GCMParameterSpec(IV.length,
IV));
+ Assert.fail("Should have caught an
InvalidAlgorithmParameterException");
Review comment:
Fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]