Author: markt
Date: Thu Jul 31 14:18:00 2014
New Revision: 1614901

URL: http://svn.apache.org/r1614901
Log:
Add a test that checks that the same specification (EXPORT40") results in the 
same cipher suites with OpenSSL and the new parser
Test is disabled as it currently fails.

Added:
    
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
   (with props)

Added: 
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=1614901&view=auto
==============================================================================
--- 
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
 (added)
+++ 
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
 Thu Jul 31 14:18:00 2014
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.tomcat.util.net.jsse.openssl;
+
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class TestOpenSSLCipherConfigurationParser {
+
+    @Test
+    @Ignore("Disabled as test currently fails")
+    public void testExport40() throws Exception {
+        testSpecification("EXPORT40");
+    }
+
+
+    private void testSpecification(String specification) throws Exception {
+        // Filter out cipher suites that OpenSSL does not implement
+        String parserSpecification = "" + specification;
+        String openSSLCipherList = 
TesterOpenSSL.getOpenSSLCiphersAsExpression(specification);
+        List<String> jsseCipherListFromOpenSSL =
+                
OpenSSLCipherConfigurationParser.parseExpression(openSSLCipherList);
+        List<String> jsseCipherListFromParser =
+                
OpenSSLCipherConfigurationParser.parseExpression(parserSpecification);
+
+        Assert.assertEquals(jsseCipherListFromOpenSSL, 
jsseCipherListFromParser);
+    }
+}

Propchange: 
tomcat/trunk/test/org/apache/tomcat/util/net/jsse/openssl/TestOpenSSLCipherConfigurationParser.java
------------------------------------------------------------------------------
    svn:eol-style = native



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

Reply via email to