Skip to content

Commit

Permalink
Fix tests for checkPeerName
Browse files Browse the repository at this point in the history
  • Loading branch information
HoustonPutman committed Sep 12, 2023
1 parent f247a4a commit ab59a11
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -769,25 +769,25 @@ public void testGetDefaultSslContextFactory() {
System.clearProperty("javax.net.ssl.keyStoreType");
System.clearProperty("javax.net.ssl.trustStoreType");

System.setProperty("solr.jetty.ssl.verifyClientHostName", "true");
System.setProperty("solr.ssl.checkPeerName", "true");
System.setProperty("javax.net.ssl.keyStoreType", "foo");
System.setProperty("javax.net.ssl.trustStoreType", "bar");
SslContextFactory.Client sslContextFactory2 = Http2SolrClient.getDefaultSslContextFactory();
assertEquals("HTTPS", sslContextFactory2.getEndpointIdentificationAlgorithm());
assertEquals("foo", sslContextFactory2.getKeyStoreType());
assertEquals("bar", sslContextFactory2.getTrustStoreType());
System.clearProperty("solr.jetty.ssl.verifyClientHostName");
System.clearProperty("solr.ssl.checkPeerName");
System.clearProperty("javax.net.ssl.keyStoreType");
System.clearProperty("javax.net.ssl.trustStoreType");

System.setProperty("solr.jetty.ssl.verifyClientHostName", "false");
System.setProperty("solr.ssl.checkPeerName", "false");
System.setProperty("javax.net.ssl.keyStoreType", "foo");
System.setProperty("javax.net.ssl.trustStoreType", "bar");
SslContextFactory.Client sslContextFactory3 = Http2SolrClient.getDefaultSslContextFactory();
assertNull(sslContextFactory3.getEndpointIdentificationAlgorithm());
assertEquals("foo", sslContextFactory3.getKeyStoreType());
assertEquals("bar", sslContextFactory3.getTrustStoreType());
System.clearProperty("solr.jetty.ssl.verifyClientHostName");
System.clearProperty("solr.ssl.checkPeerName");
System.clearProperty("javax.net.ssl.keyStoreType");
System.clearProperty("javax.net.ssl.trustStoreType");
}
Expand Down

0 comments on commit ab59a11

Please sign in to comment.