ok2c commented on code in PR #513:
URL: 
https://github.com/apache/httpcomponents-core/pull/513#discussion_r1913630696


##########
httpcore5-testing/src/test/java/org/apache/hc/core5/testing/SSLTestContexts.java:
##########
@@ -40,30 +40,47 @@
 import org.apache.hc.core5.ssl.SSLContextBuilder;
 
 public final class SSLTestContexts {
-
     public static SSLContext createServerSSLContext() {
+        return createServerSSLContext(null);
+    }
+
+    public static SSLContext createServerSSLContext(final String protocol) {
         final URL keyStoreURL = SSLTestContexts.class.getResource("/test.p12");
         final String storePassword = "nopassword";
         try {
-            return SSLContextBuilder.create()
+            SSLContextBuilder sslContextBuilder = SSLContextBuilder.create()
                     .setKeyStoreType("pkcs12")
                     .loadTrustMaterial(keyStoreURL, 
storePassword.toCharArray())
-                    .loadKeyMaterial(keyStoreURL, storePassword.toCharArray(), 
storePassword.toCharArray())
-                    .build();
+                    .loadKeyMaterial(keyStoreURL, storePassword.toCharArray(), 
storePassword.toCharArray());
+
+            if (protocol != null) {
+                sslContextBuilder = sslContextBuilder.setProtocol(protocol);

Review Comment:
   @reta It should be OK to pass `null`  to `#setProtocol`



##########
httpcore5-testing/src/test/java/org/apache/hc/core5/testing/nio/H2CoreTransportTest.java:
##########
@@ -55,11 +55,15 @@ abstract class H2CoreTransportTest extends 
HttpCoreTransportTest {
     private final H2AsyncRequesterResource clientResource;
 
     public H2CoreTransportTest(final URIScheme scheme) {
+        this(scheme, null);
+    }
+
+    public H2CoreTransportTest(final URIScheme scheme, final String protocol) {

Review Comment:
   @reta Can we give the variable a  better name to make it clearer what 
protocol it is? `tlsVersion` or `tlsProtocol` maybe?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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

Reply via email to