You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2016/03/09 11:33:58 UTC
svn commit: r1734214 - in /tomcat/trunk:
java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
Author: markt
Date: Wed Mar 9 10:33:58 2016
New Revision: 1734214
URL: http://svn.apache.org/viewvc?rev=1734214&view=rev
Log:
Add some missing aliases and associated tests
Modified:
tomcat/trunk/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
tomcat/trunk/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
Modified: tomcat/trunk/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java?rev=1734214&r1=1734213&r2=1734214&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/openssl/ciphers/OpenSSLCipherConfigurationParser.java Wed Mar 9 10:33:58 2016
@@ -192,6 +192,10 @@ public class OpenSSLCipherConfigurationP
*/
private static final String AECDH = "AECDH";
/**
+ * Cipher suites using DSS for key exchange
+ */
+ private static final String DSS = "DSS";
+ /**
* Cipher suites using DSS authentication, i.e. the certificates carry DSS keys.
*/
private static final String aDSS = "aDSS";
@@ -256,6 +260,10 @@ public class OpenSSLCipherConfigurationP
*/
private static final String AESCCM = "AESCCM";
/**
+ * AES in Counter with CBC-MAC Mode and 8-byte authentication (CCM8).
+ */
+ private static final String AESCCM8 = "AESCCM8";
+ /**
* Cipher suites using 128 bit CAMELLIA.
*/
private static final String CAMELLIA128 = "CAMELLIA128";
@@ -268,6 +276,10 @@ public class OpenSSLCipherConfigurationP
*/
private static final String CAMELLIA = "CAMELLIA";
/**
+ * Cipher suites using CHACHA20.
+ */
+ private static final String CHACHA20 = "CHACHA20";
+ /**
* Cipher suites using triple DES.
*/
private static final String TRIPLE_DES = "3DES";
@@ -356,6 +368,17 @@ public class OpenSSLCipherConfigurationP
* Cipher suites using pre-shared keys (PSK).
*/
private static final String PSK = "PSK";
+ /**
+ * Cipher suites using PSK authentication.
+ */
+ private static final String aPSK = "aPSK";
+ /**
+ * Cipher suites using PSK key 'exchange'.
+ */
+ private static final String kPSK = "kPSK";
+ private static final String kRSAPSK = "kRSAPSK";
+ private static final String kECDHEPSK = "kECDHEPSK";
+ private static final String kDHEPSK = "kDHEPSK";
private static final String DEFAULT = "DEFAULT";
private static final String COMPLEMENTOFDEFAULT = "COMPLEMENTOFDEFAULT";
@@ -442,7 +465,7 @@ public class OpenSSLCipherConfigurationP
eecdh.removeAll(filterByAuthentication(allCiphers, Collections.singleton(Authentication.aNULL)));
addListAlias(EECDH, eecdh);
addListAlias(aDSS, filterByAuthentication(allCiphers, Collections.singleton(Authentication.DSS)));
- aliases.put("DSS", aliases.get(aDSS));
+ aliases.put(DSS, aliases.get(aDSS));
addListAlias(aDH, filterByAuthentication(allCiphers, Collections.singleton(Authentication.DH)));
Set<Cipher> aecdh = filterByKeyExchange(allCiphers, Collections.singleton(KeyExchange.EECDH));
addListAlias(AECDH, filterByAuthentication(aecdh, Collections.singleton(Authentication.aNULL)));
@@ -467,9 +490,11 @@ public class OpenSSLCipherConfigurationP
addListAlias(AES, filterByEncryption(allCiphers, new HashSet<>(Arrays.asList(Encryption.AES128, Encryption.AES128CCM, Encryption.AES128CCM8, Encryption.AES128GCM, Encryption.AES256, Encryption.AES256CCM, Encryption.AES256CCM8, Encryption.AES256GCM))));
addListAlias(AESGCM, filterByEncryption(allCiphers, new HashSet<>(Arrays.asList(Encryption.AES128GCM, Encryption.AES256GCM))));
addListAlias(AESCCM, filterByEncryption(allCiphers, new HashSet<>(Arrays.asList(Encryption.AES128CCM, Encryption.AES128CCM8, Encryption.AES256CCM, Encryption.AES256CCM8))));
+ addListAlias(AESCCM8, filterByEncryption(allCiphers, new HashSet<>(Arrays.asList(Encryption.AES128CCM8, Encryption.AES256CCM8))));
addListAlias(CAMELLIA, filterByEncryption(allCiphers, new HashSet<>(Arrays.asList(Encryption.CAMELLIA128, Encryption.CAMELLIA256))));
addListAlias(CAMELLIA128, filterByEncryption(allCiphers, Collections.singleton(Encryption.CAMELLIA128)));
addListAlias(CAMELLIA256, filterByEncryption(allCiphers, Collections.singleton(Encryption.CAMELLIA256)));
+ addListAlias(CHACHA20, filterByEncryption(allCiphers, Collections.singleton(Encryption.CHACHA20POLY1305)));
addListAlias(TRIPLE_DES, filterByEncryption(allCiphers, Collections.singleton(Encryption.TRIPLE_DES)));
addListAlias(DES, filterByEncryption(allCiphers, Collections.singleton(Encryption.DES)));
addListAlias(RC4, filterByEncryption(allCiphers, Collections.singleton(Encryption.RC4)));
@@ -488,6 +513,11 @@ public class OpenSSLCipherConfigurationP
addListAlias(GOST94, filterByMessageDigest(allCiphers, Collections.singleton(MessageDigest.GOST94)));
addListAlias(GOST89MAC, filterByMessageDigest(allCiphers, Collections.singleton(MessageDigest.GOST89MAC)));
addListAlias(PSK, filter(allCiphers, null, new HashSet<>(Arrays.asList(KeyExchange.PSK, KeyExchange.RSAPSK, KeyExchange.DHEPSK, KeyExchange.ECDHEPSK)), Collections.singleton(Authentication.PSK), null, null, null));
+ addListAlias(aPSK, filterByAuthentication(allCiphers, Collections.singleton(Authentication.PSK)));
+ addListAlias(kPSK, filterByKeyExchange(allCiphers, Collections.singleton(KeyExchange.PSK)));
+ addListAlias(kRSAPSK, filterByKeyExchange(allCiphers, Collections.singleton(KeyExchange.RSAPSK)));
+ addListAlias(kECDHEPSK, filterByKeyExchange(allCiphers, Collections.singleton(KeyExchange.ECDHEPSK)));
+ addListAlias(kDHEPSK, filterByKeyExchange(allCiphers, Collections.singleton(KeyExchange.DHEPSK)));
addListAlias(KRB5, filter(allCiphers, null, Collections.singleton(KeyExchange.KRB5), Collections.singleton(Authentication.KRB5), null, null, null));
addListAlias(aSRP, filterByAuthentication(allCiphers, Collections.singleton(Authentication.SRP)));
addListAlias(kSRP, filterByKeyExchange(allCiphers, Collections.singleton(KeyExchange.SRP)));
Modified: tomcat/trunk/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java?rev=1734214&r1=1734213&r2=1734214&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java (original)
+++ tomcat/trunk/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java Wed Mar 9 10:33:58 2016
@@ -222,6 +222,12 @@ public class TestOpenSSLCipherConfigurat
@Test
+ public void testDSS() throws Exception {
+ testSpecification("DSS");
+ }
+
+
+ @Test
public void testaDSS() throws Exception {
testSpecification("aDSS");
}
@@ -336,6 +342,18 @@ public class TestOpenSSLCipherConfigurat
@Test
+ public void testAESCCM() throws Exception {
+ testSpecification("AESCCM");
+ }
+
+
+ @Test
+ public void testAESCCM8() throws Exception {
+ testSpecification("AESCCM8");
+ }
+
+
+ @Test
public void testCAMELLIA128() throws Exception {
testSpecification("CAMELLIA128");
}
@@ -354,6 +372,12 @@ public class TestOpenSSLCipherConfigurat
@Test
+ public void testCHACHA20() throws Exception {
+ testSpecification("CHACHA20");
+ }
+
+
+ @Test
public void test3DES() throws Exception {
testSpecification("3DES");
}
@@ -461,6 +485,36 @@ public class TestOpenSSLCipherConfigurat
}
+ @Test
+ public void testaPSK() throws Exception {
+ testSpecification("aPSK");
+ }
+
+
+ @Test
+ public void testkPSK() throws Exception {
+ testSpecification("kPSK");
+ }
+
+
+ @Test
+ public void testkRSAPSK() throws Exception {
+ testSpecification("kRSAPSK");
+ }
+
+
+ @Test
+ public void testkECDHEPSK() throws Exception {
+ testSpecification("kECDHEPSK");
+ }
+
+
+ @Test
+ public void testkDHEPSK() throws Exception {
+ testSpecification("kDHEPSK");
+ }
+
+
@Test
public void testPSK() throws Exception {
testSpecification("PSK");
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org