Author: markt
Date: Tue Aug 11 14:38:12 2015
New Revision: 1695311
URL: http://svn.apache.org/r1695311
Log:
Add back ability to disabled tests because the buildbot slave has an ancient
(patched, but still ancient) OpenSSL version that expects different ciphers to
be present.
Modified:
tomcat/trunk/build.xml
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TesterOpenSSL.java
Modified: tomcat/trunk/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1695311&r1=1695310&r2=1695311&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Tue Aug 11 14:38:12 2015
@@ -1449,7 +1449,6 @@
<sysproperty key="tomcat.test.accesslog" value="${test.accesslog}" />
<sysproperty key="tomcat.test.reports" value="${test.reports}" />
<sysproperty key="tomcat.test.openssl.path"
value="${test.openssl.path}" />
- <sysproperty key="tomcat.test.openssl.version"
value="${test.openssl.version}" />
<sysproperty key="tomcat.test.relaxTiming" value="${test.relaxTiming}"
/>
<!-- File for Cobertura to write coverage results to -->
<sysproperty key="net.sourceforge.cobertura.datafile"
file="${cobertura.datafile}" />
Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java?rev=1695311&r1=1695310&r2=1695311&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestCipher.java
Tue Aug 11 14:38:12 2015
@@ -23,10 +23,17 @@ import java.util.List;
import java.util.Set;
import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
import org.junit.Test;
public class TestCipher {
+ @Before
+ public void checkVersion() {
+ Assume.assumeTrue(TesterOpenSSL.TESTS_ENABLED);
+ }
+
/*
* Checks that every cipher suite returned by OpenSSL is mapped to at least
* one cipher suite that is recognised by JSSE or is a cipher suite known
Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java?rev=1695311&r1=1695310&r2=1695311&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
(original)
+++
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
Tue Aug 11 14:38:12 2015
@@ -19,11 +19,18 @@ package org.apache.tomcat.util.net.jsse.
import java.util.List;
import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class TestOpenSSLCipherConfigurationParser {
+ @Before
+ public void checkVersion() {
+ Assume.assumeTrue(TesterOpenSSL.TESTS_ENABLED);
+ }
+
@Test
public void testDEFAULT() throws Exception {
// EXPORT was removed from DEFAULT in 1.1.0 but we prefer the old
Modified:
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TesterOpenSSL.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TesterOpenSSL.java?rev=1695311&r1=1695310&r2=1695311&view=diff
==============================================================================
---
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TesterOpenSSL.java
(original)
+++
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TesterOpenSSL.java
Tue Aug 11 14:38:12 2015
@@ -29,14 +29,19 @@ import org.apache.tomcat.util.http.fileu
public class TesterOpenSSL {
+ // These tests can be disabled (e.g. on CI systems with old OpenSSL
versions
+ // by specifying an invalid path to the openssl binary).
+ public static boolean TESTS_ENABLED;
+
public static final int VERSION;
public static final Set<Cipher> OPENSSL_UNIMPLEMENTED_CIPHERS;
static {
- // Note: The tests are configured for the OpenSSL 1.1.0 development
- // branch. Running with a different version is likely to trigger
- // failures.
+ // Note: The following lists are intended to be aligned with the most
+ // recent release of each OpenSSL release branch. Running the
unit
+ // tests with earlier releases is likely to result in failures.
+
String versionString = null;
try {
versionString = executeOpenSSLCommand("version");
@@ -54,14 +59,12 @@ public class TesterOpenSSL {
} else if (versionString.startsWith("OpenSSL 0.9.8")) {
VERSION = 908;
} else {
- // Unknown OpenSSL version
- throw new IllegalStateException("Unknown OpenSSL version " +
versionString);
+ VERSION = -1;
}
- HashSet<Cipher> unimplemented = new HashSet<>();
+ TESTS_ENABLED = (VERSION != -1);
- // Note: The following lists are intended to be aligned with the most
- // recent release of each OpenSSL release branch
+ HashSet<Cipher> unimplemented = new HashSet<>();
// These have been removed from all supported versions.
unimplemented.add(Cipher.TLS_DHE_DSS_WITH_RC4_128_SHA);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]