Author: markt Date: Thu Dec 17 20:45:03 2015 New Revision: 1720648 URL: http://svn.apache.org/viewvc?rev=1720648&view=rev Log: More refactoring to take account of OpenSSL giving equal preference to some ciphers.
Modified: tomcat/trunk/test/org/apache/tomcat/util/net/openssl/ciphers/TestOpenSSLCipherConfigurationParser.java 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=1720648&r1=1720647&r2=1720648&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 Thu Dec 17 20:45:03 2015 @@ -669,17 +669,24 @@ public class TestOpenSSLCipherConfigurat // checks that the Parser produces a cipher list that is consistent with // OpenSSL's preference order by confirming that running through OPenSSL // does not change the order. - String parserOrderedExpression = listToString(jsseCipherListFromParser, ':'); - Assert.assertEquals(TesterOpenSSL.getOpenSSLCiphersAsExpression( - parserOrderedExpression), parserOrderedExpression); + String parserOrderedExpression = listToString(jsseCipherListFromParser, ','); + Assert.assertEquals( + listToString(OpenSSLCipherConfigurationParser.parseExpression( + parserOrderedExpression), ','), + parserOrderedExpression); } private String listToString(List<String> list, char separator) { StringBuilder sb = new StringBuilder(); + boolean first = true; for (String entry : list) { + if (first) { + first = false; + } else { + sb.append(separator); + } sb.append(entry); - sb.append(separator); } return sb.toString(); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org