Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/2739#discussion_r18975459
  
    --- Diff: core/src/main/scala/org/apache/spark/SecurityManager.scala ---
    @@ -192,6 +196,44 @@ private[spark] class SecurityManager(sparkConf: 
SparkConf) extends Logging {
         )
       }
     
    +  private[spark] val sslOptions = SSLOptions.parse(ns = "ssl", conf = 
sparkConf)
    +
    +  private[spark] val (sslSocketFactory, hostnameVerifier) = if 
(sslOptions.enabled) {
    +    val trustStoreManagers =
    +      for (trustStore <- sslOptions.trustStore) yield {
    +        val ks = KeyStore.getInstance(KeyStore.getDefaultType)
    +        ks.load(FileUtils.openInputStream(sslOptions.trustStore.get),
    +          sslOptions.trustStorePassword.get.toCharArray)
    +
    +        val tmf = 
TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm)
    +        tmf.init(ks)
    +        tmf.getTrustManagers
    +      }
    +
    +    lazy val credulousTrustStoreManagers = Array({
    --- End diff --
    
    Why lazy if you're using it in the next few lines anyway? Also, shouldn't 
this be keyed off some option? Some people won't want to disable cert 
verification.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to