Github user tellison commented on a diff in the pull request:
https://github.com/apache/spark/pull/7043#discussion_r33361980
--- Diff: core/src/main/scala/org/apache/spark/SSLOptions.scala ---
@@ -102,6 +106,36 @@ private[spark] case class SSLOptions(
}
}
+ /*
+ * The supportedAlgorithms set is a subset of the enabledAlgorithms that
+ * are supported by the current Java security provider for this protocol.
+ */
+ private val supportedAlgorithms: Set[String] = {
+ var context: Option[SSLContext] = Some(SSLContext.getDefault)
--- End diff --
All you are missing is my inexperience in Scala! So how about something
like this?
```scala
var context: SSLContext = null
try {
context = SSLContext.getInstance(protocol.orNull)
context.init(null, null, null)
} catch {
case npe: NullPointerException =>
logDebug("No SSL protocol specified")
context = SSLContext.getDefault
case nsa: NoSuchAlgorithmException =>
logDebug(s"No support for requested SSL protocol ${protocol.get}")
context = SSLContext.getDefault
}
val providerAlgorithms =
context.getServerSocketFactory.getSupportedCipherSuites.toSet
```
---
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]