@Test public void testRename01() throws Exception { // EDH -> DHE LinkedHashSet<Cipher> result = OpenSSLCipherConfigurationParser.parse("EXP-EDH-DSS-DES-CBC-SHA"); LinkedHashSet<Cipher> expected = new LinkedHashSet<>(); expected.add(Cipher.TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA); Assert.assertEquals(expected, result); }
@Test public void testDefaultSort02() throws Exception { // Reproducing a failure observed on Gump with OpenSSL 1.1.x // ECHDE beats AES LinkedHashSet<Cipher> input = new LinkedHashSet<>(); input.add(Cipher.TLS_RSA_WITH_AES_256_CBC_SHA); input.add(Cipher.TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384); LinkedHashSet<Cipher> result = OpenSSLCipherConfigurationParser.defaultSort(input); LinkedHashSet<Cipher> expected = new LinkedHashSet<>(); expected.add(Cipher.TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384); expected.add(Cipher.TLS_RSA_WITH_AES_256_CBC_SHA); Assert.assertEquals(expected.toString(), result.toString()); }