This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new f459395 Skip GCM test when running on a JVM where GCM isn't available
f459395 is described below
commit f459395b59f8212265e142a42d19405e1abdb957
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jan 21 07:30:53 2020 +0000
Skip GCM test when running on a JVM where GCM isn't available
---
.../group/interceptors/TestEncryptInterceptor.java | 18 ++++++++++++++----
1 file changed, 14 insertions(+), 4 deletions(-)
diff --git
a/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java
b/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java
index a69a68b..c5fe3c8 100644
---
a/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java
+++
b/test/org/apache/catalina/tribes/group/interceptors/TestEncryptInterceptor.java
@@ -19,6 +19,7 @@ package org.apache.catalina.tribes.group.interceptors;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
+import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collection;
@@ -27,6 +28,7 @@ import org.hamcrest.core.IsNot;
import org.junit.AfterClass;
import org.junit.Assert;
+import org.junit.Assume;
import org.junit.Before;
import org.junit.FixMethodOrder;
import org.junit.Ignore;
@@ -268,10 +270,18 @@ public class TestEncryptInterceptor {
@Test
public void testGCM() throws Exception {
- src.setEncryptionAlgorithm("AES/GCM/PKCS5Padding");
- src.start(Channel.SND_TX_SEQ);
- dest.setEncryptionAlgorithm("AES/GCM/PKCS5Padding");
- dest.start(Channel.SND_TX_SEQ);
+ try {
+ src.setEncryptionAlgorithm("AES/GCM/PKCS5Padding");
+ src.start(Channel.SND_TX_SEQ);
+ dest.setEncryptionAlgorithm("AES/GCM/PKCS5Padding");
+ dest.start(Channel.SND_TX_SEQ);
+ } catch (ChannelException ce) {
+ Assume.assumeFalse("Skipping testGCM due to lack of JVM support",
+ ce.getCause() instanceof NoSuchAlgorithmException
+ && ce.getCause().getMessage().contains("GCM"));
+
+ throw ce;
+ }
String testInput = "The quick brown fox jumps over the lazy dog.";
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]