rabbah commented on a change in pull request #5065:
URL: https://github.com/apache/openwhisk/pull/5065#discussion_r587027642



##########
File path: common/scala/src/main/scala/org/apache/openwhisk/common/Https.scala
##########
@@ -35,8 +33,16 @@ object Https {
     cs
   }
 
-  def connectionContext(httpsConfig: HttpsConfig, sslConfig: 
Option[AkkaSSLConfig] = None) = {
+  def httpsInsecureClient(context: SSLContext): HttpsConnectionContext =
+    ConnectionContext.httpsClient((host, port) => {
+      val engine = context.createSSLEngine(host, port)
+      engine.setUseClientMode(true)
+      // WARNING: this creates an SSL Engine without enabling endpoint 
identification/verification procedures
+      // Disabling host name verification is a very bad idea, please don't 
unless you have a very good reason to.

Review comment:
       Ah - thanks for the added clarification.

##########
File path: common/scala/src/main/scala/org/apache/openwhisk/common/Https.scala
##########
@@ -35,8 +33,16 @@ object Https {
     cs
   }
 
-  def connectionContext(httpsConfig: HttpsConfig, sslConfig: 
Option[AkkaSSLConfig] = None) = {
+  def httpsInsecureClient(context: SSLContext): HttpsConnectionContext =
+    ConnectionContext.httpsClient((host, port) => {
+      val engine = context.createSSLEngine(host, port)
+      engine.setUseClientMode(true)
+      // WARNING: this creates an SSL Engine without enabling endpoint 
identification/verification procedures
+      // Disabling host name verification is a very bad idea, please don't 
unless you have a very good reason to.

Review comment:
       Ah - thanks for the added clarification. I think this was/is needed for 
testing with self-signed certs.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to