Author: markt
Date: Thu Jul 31 20:19:21 2014
New Revision: 1614999

URL: http://svn.apache.org/r1614999
Log:
More alias tests.
Align behaviour for RSA alias with OpenSSL.
Despite what the docs say, RSA is equivalent to kRSA. I've double checked this 
with the 'official' Windows binary, the binary that ships tc native and the 
latest FreeBSD version.

Modified:
    
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/openssl/OpenSSLCipherConfigurationParser.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/java/org/apache/tomcat/util/net/jsse/openssl/OpenSSLCipherConfigurationParser.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/jsse/openssl/OpenSSLCipherConfigurationParser.java?rev=1614999&r1=1614998&r2=1614999&view=diff
==============================================================================
--- 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/openssl/OpenSSLCipherConfigurationParser.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/util/net/jsse/openssl/OpenSSLCipherConfigurationParser.java
 Thu Jul 31 20:19:21 2014
@@ -120,7 +120,8 @@ public class OpenSSLCipherConfigurationP
      */
     private static final String aRSA = "aRSA";
     /**
-     * Cipher suites using RSA for key exchange or for authentication.
+     * Cipher suites using RSA for key exchange
+     * Despite what the docs say, RSA is equivalent to kRSA.
      */
     private static final String RSA = "RSA";
     /**
@@ -389,7 +390,8 @@ public class OpenSSLCipherConfigurationP
         addListAlias(aNULL, filterByAuthentication(all, 
Collections.singleton(Authentication.aNULL)));
         addListAlias(kRSA, filterByKeyExchange(all, 
Collections.singleton(KeyExchange.RSA)));
         addListAlias(aRSA, filterByAuthentication(all, 
Collections.singleton(Authentication.RSA)));
-        addListAlias(RSA, filter(all, null, 
Collections.singleton(KeyExchange.RSA), 
Collections.singleton(Authentication.RSA), null, null, null));
+        // Despite what the docs say, RSA is equivalent to kRSA
+        aliases.put(RSA, aliases.get(kRSA));
         addListAlias(kEDH, filterByKeyExchange(all, 
Collections.singleton(KeyExchange.EDH)));
         addListAlias(kDHE, filterByKeyExchange(all, 
Collections.singleton(KeyExchange.EDH)));
         Set<Cipher> edh = filterByKeyExchange(all, 
Collections.singleton(KeyExchange.EDH));

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=1614999&r1=1614998&r2=1614999&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
 Thu Jul 31 20:19:21 2014
@@ -24,14 +24,14 @@ import org.junit.Test;
 public class TestOpenSSLCipherConfigurationParser {
 
     @Test
-    public void testENull() throws Exception {
-        testSpecification("eNULL");
+    public void testANull() throws Exception {
+        testSpecification("aNULL");
     }
 
 
     @Test
-    public void testANull() throws Exception {
-        testSpecification("aNULL");
+    public void testeNull() throws Exception {
+        testSpecification("eNULL");
     }
 
 
@@ -59,6 +59,30 @@ public class TestOpenSSLCipherConfigurat
     }
 
 
+    @Test
+    public void testExport() throws Exception {
+        testSpecification("EXPORT");
+    }
+
+
+    @Test
+    public void testRsa() throws Exception {
+        testSpecification("RSA");
+    }
+
+
+    @Test
+    public void testARsa() throws Exception {
+        testSpecification("aRSA");
+    }
+
+
+    @Test
+    public void testKRsa() throws Exception {
+        testSpecification("kRSA");
+    }
+
+
     private void testSpecification(String specification) throws Exception {
         // Filter out cipher suites that OpenSSL does not implement
         String parserSpecification = "" + specification;

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=1614999&r1=1614998&r2=1614999&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 
Thu Jul 31 20:19:21 2014
@@ -66,7 +66,13 @@ public class TesterOpenSSL {
                     Cipher.SSL_CK_RC2_128_CBC_EXPORT40_WITH_MD5,
                     Cipher.SSL_FORTEZZA_DMS_WITH_NULL_SHA,
                     Cipher.SSL_FORTEZZA_DMS_WITH_FORTEZZA_CBC_SHA,
-                    Cipher.SSL_FORTEZZA_DMS_WITH_RC4_128_SHA)));
+                    Cipher.SSL_FORTEZZA_DMS_WITH_RC4_128_SHA,
+                    Cipher.TLS_DHE_DSS_EXPORT1024_WITH_DES_CBC_SHA,
+                    Cipher.TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA,
+                    Cipher.TLS_RSA_EXPORT1024_WITH_RC2_CBC_56_MD5,
+                    Cipher.TLS_DHE_DSS_EXPORT1024_WITH_RC4_56_SHA,
+                    Cipher.TLS_RSA_EXPORT1024_WITH_RC4_56_SHA,
+                    Cipher.TLS_RSA_EXPORT1024_WITH_RC4_56_MD5)));
 
     static {
         String versionString = null;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to