Package

com.typesafe.sslconfig

ssl

Permalink

package ssl

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ssl
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. class AlgorithmChecker extends PKIXCertPathChecker

    Permalink

    Looks for disabled algorithms in the certificate.

    Looks for disabled algorithms in the certificate. This is because some certificates are signed with forgable hashes such as MD2 or MD5, so we can't be certain of their authenticity.

    This class is needed because the JDK 1.6 Algorithm checker doesn't give us any way to customize the list of disabled algorithms, and we need to be able to support that.

    Also note that we need to check the trust anchor for disabled key sizes, and the CertPath explicitly removes the trust anchor from the chain of certificates. This means we need to check the trust anchor explicitly in the through the CompositeTrustManager.

  2. case class AlgorithmConstraint(algorithm: String, constraint: Option[ExpressionSymbol] = None) extends Product with Serializable

    Permalink
  3. sealed abstract class ClientAuth extends AnyRef

    Permalink

    An SSLEngine can either demand, allow or ignore its peer’s authentication (via certificates), where Need will fail the handshake if the peer does not provide valid credentials, Want allows the peer to send credentials and verifies them if provided, and None disables peer certificate verification.

    An SSLEngine can either demand, allow or ignore its peer’s authentication (via certificates), where Need will fail the handshake if the peer does not provide valid credentials, Want allows the peer to send credentials and verifies them if provided, and None disables peer certificate verification.

    See the documentation for SSLEngine::setWantClientAuth for more information.

  4. class CompositeCertificateException extends CertificateException

    Permalink

    A certificate exception that contains underlying exceptions.

  5. class CompositeX509KeyManager extends X509ExtendedKeyManager

    Permalink

    A keymanager that wraps other X509 key managers.

  6. class CompositeX509TrustManager extends X509TrustManager

    Permalink

    A trust manager that is a composite of several smaller trust managers.

    A trust manager that is a composite of several smaller trust managers. It is responsible for verifying the credentials received from a peer.

  7. class ConfigSSLContextBuilder extends SSLContextBuilder

    Permalink

    Creates an SSL context builder from info objects.

  8. class DefaultHostnameVerifier extends HostnameVerifier

    Permalink

    Use the internal sun hostname checker as the hostname verifier.

    Use the internal sun hostname checker as the hostname verifier. Thanks to Kevin Locke.

    See also

    http://kevinlocke.name/bits/2012/10/03/ssl-certificate-verification-in-dispatch-and-asynchttpclient/

    sun.security.util.HostnameChecker

  9. class DefaultKeyManagerFactoryWrapper extends KeyManagerFactoryWrapper

    Permalink
  10. class DefaultTrustManagerFactoryWrapper extends TrustManagerFactoryWrapper

    Permalink
  11. class DisabledComplainingHostnameVerifier extends HostnameVerifier

    Permalink

    Add a disabled but complaining hostname verifier.

  12. case class Equal(x: Int) extends ExpressionSymbol with Product with Serializable

    Permalink
  13. sealed abstract class ExpressionSymbol extends AnyRef

    Permalink
  14. class FakeKeyStore extends AnyRef

    Permalink

    A fake key store

    A fake key store

    Was: play.core.server.ssl.FakeKeyStore

  15. class FileBasedKeyStoreBuilder extends KeyStoreBuilder

    Permalink

    Builds a keystore from a file containing PEM encoded certificates, using CertificateFactory internally.

    Builds a keystore from a file containing PEM encoded certificates, using CertificateFactory internally.

    See also

    java.security.cert.CertificateFactory

  16. class JavaSecurityDebugBuilder extends AnyRef

    Permalink

    See also

    http://docs.oracle.com/javase/8/docs/technotes/guides/security/certpath/CertPathProgGuide.html

  17. class JavaxNetDebugBuilder extends AnyRef

    Permalink

    A builder for setting the system property options in "javax.net.debug" and in "java.security.debug' (in the case of "certpath").

    A builder for setting the system property options in "javax.net.debug" and in "java.security.debug' (in the case of "certpath").

    See also

    http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/ReadDebug.html

    http://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#Debug

  18. case class KeyManagerConfig(algorithm: String = ..., keyStoreConfigs: Seq[KeyStoreConfig] = Nil) extends Product with Serializable

    Permalink

    The key manager config.

    The key manager config.

    algorithm

    The algoritm to use.

    keyStoreConfigs

    The key stores to use.

  19. trait KeyManagerFactoryWrapper extends AnyRef

    Permalink
  20. trait KeyStoreBuilder extends AnyRef

    Permalink
  21. case class KeyStoreConfig(storeType: String = KeyStore.getDefaultType, filePath: Option[String] = None, data: Option[String] = None, password: Option[String] = None) extends Product with Serializable

    Permalink

    Configuration for a keystore.

    Configuration for a keystore.

    A key store must either provide a file path, or a data String.

    storeType

    The store type. Defaults to the platform default store type (ie, JKS).

    filePath

    The path of the key store file.

    data

    The data to load the key store file from.

    password

    The password to use to load the key store file, if the file is password protected.

  22. case class LessThan(x: Int) extends ExpressionSymbol with Product with Serializable

    Permalink
  23. case class LessThanOrEqual(x: Int) extends ExpressionSymbol with Product with Serializable

    Permalink
  24. trait MonkeyPatcher extends AnyRef

    Permalink

  25. case class MoreThan(x: Int) extends ExpressionSymbol with Product with Serializable

    Permalink
  26. case class MoreThanOrEqual(x: Int) extends ExpressionSymbol with Product with Serializable

    Permalink
  27. case class NotEqual(x: Int) extends ExpressionSymbol with Product with Serializable

    Permalink
  28. case class SSLConfig(default: Boolean = false, protocol: String = "TLSv1.2", checkRevocation: Option[Boolean] = None, revocationLists: Option[Seq[URL]] = None, enabledCipherSuites: Option[Seq[String]] = None, enabledProtocols: Option[Seq[String]] = ..., disabledSignatureAlgorithms: Seq[String] = List("MD2", "MD4", "MD5"), disabledKeyAlgorithms: Seq[String] = ..., sslParametersConfig: SSLParametersConfig = SSLParametersConfig(), keyManagerConfig: KeyManagerConfig = KeyManagerConfig(), trustManagerConfig: TrustManagerConfig = TrustManagerConfig(), hostnameVerifierClass: Class[_ <: HostnameVerifier] = classOf[DefaultHostnameVerifier], secureRandom: Option[SecureRandom] = None, debug: SSLDebugConfig = SSLDebugConfig(), loose: SSLLooseConfig = SSLLooseConfig()) extends Product with Serializable

    Permalink

    The SSL configuration.

    The SSL configuration.

    default

    Whether we should use the default JVM SSL configuration or not.

    protocol

    The SSL protocol to use. Defaults to TLSv1.2.

    checkRevocation

    Whether revocation lists should be checked, if None, defaults to platform default setting.

    revocationLists

    The revocation lists to check.

    enabledCipherSuites

    If defined, override the platform default cipher suites.

    enabledProtocols

    If defined, override the platform default protocols.

    disabledSignatureAlgorithms

    The disabled signature algorithms.

    disabledKeyAlgorithms

    The disabled key algorithms.

    keyManagerConfig

    The key manager configuration.

    trustManagerConfig

    The trust manager configuration.

    hostnameVerifierClass

    The hostname verifier class.

    secureRandom

    The SecureRandom instance to use. Let the platform choose if None.

    debug

    The debug config.

    loose

    Loose configuratino parameters

  29. class SSLConfigParser extends AnyRef

    Permalink
  30. trait SSLContextBuilder extends AnyRef

    Permalink
  31. case class SSLDebugConfig(all: Boolean = false, ssl: Boolean = false, certpath: Boolean = false, ocsp: Boolean = false, record: Option[SSLDebugRecordOptions] = None, handshake: Option[SSLDebugHandshakeOptions] = None, keygen: Boolean = false, session: Boolean = false, defaultctx: Boolean = false, sslctx: Boolean = false, sessioncache: Boolean = false, keymanager: Boolean = false, trustmanager: Boolean = false, pluggability: Boolean = false) extends Product with Serializable

    Permalink

    SSL debug configuration.

  32. case class SSLDebugHandshakeOptions(data: Boolean = false, verbose: Boolean = false) extends Product with Serializable

    Permalink

    SSL handshake debugging options.

  33. case class SSLDebugRecordOptions(plaintext: Boolean = false, packet: Boolean = false) extends Product with Serializable

    Permalink

    SSL record debugging options.

  34. case class SSLLooseConfig(allowWeakCiphers: Boolean = false, allowWeakProtocols: Boolean = false, allowLegacyHelloMessages: Option[Boolean] = None, allowUnsafeRenegotiation: Option[Boolean] = None, disableHostnameVerification: Boolean = false, acceptAnyCertificate: Boolean = false) extends Product with Serializable

    Permalink

    Configuration for specifying loose (potentially dangerous) ssl config.

    Configuration for specifying loose (potentially dangerous) ssl config.

    allowWeakCiphers

    Whether weak ciphers should be allowed or not.

    allowWeakProtocols

    Whether weak protocols should be allowed or not.

    allowLegacyHelloMessages

    Whether legacy hello messages should be allowed or not. If None, uses the platform default.

    allowUnsafeRenegotiation

    Whether unsafe renegotiation should be allowed or not. If None, uses the platform default.

    disableHostnameVerification

    Whether hostname verification should be disabled.

    acceptAnyCertificate

    Whether any X.509 certificate should be accepted or not.

  35. case class SSLParametersConfig(clientAuth: ClientAuth = ClientAuth.Default, protocols: Seq[String] = Nil) extends Product with Serializable

    Permalink

    Carries values which will be later set on an SSLParameters object.

    Carries values which will be later set on an SSLParameters object.

    clientAuth

    see ClientAuth for detailed docs on ClientAuth modes

  36. class SimpleSSLContextBuilder extends SSLContextBuilder

    Permalink

    A simple SSL context builder.

    A simple SSL context builder. If the keyManagers or trustManagers are empty, then null is used in the init method. Likewise, if secureRandom is None then null is used.

  37. class StringBasedKeyStoreBuilder extends KeyStoreBuilder

    Permalink

    Builds a keystore from a string containing PEM encoded certificates, using CertificateFactory internally.

    Builds a keystore from a string containing PEM encoded certificates, using CertificateFactory internally.

    See also

    java.security.cert.CertificateFactory

  38. class SystemConfiguration extends AnyRef

    Permalink

    Configures global system properties on the JSSE implementation, if defined.

    Configures global system properties on the JSSE implementation, if defined.

    WARNING: This class sets system properties to configure JSSE code which typically uses static initialization on load. Because of this, if classes are loaded in BEFORE this code has a chance to operate, you may find that this code works inconsistently. The solution is to set the system properties on the command line explicitly (or in the case of "ocsp.enable", in the security property file).

  39. case class TrustManagerConfig(algorithm: String = ..., trustStoreConfigs: Seq[TrustStoreConfig] = Nil) extends Product with Serializable

    Permalink

    The trust manager config.

    The trust manager config.

    algorithm

    The algorithm to use.

    trustStoreConfigs

    The trust stores to use.

  40. trait TrustManagerFactoryWrapper extends AnyRef

    Permalink
  41. case class TrustStoreConfig(storeType: String = KeyStore.getDefaultType, filePath: Option[String], data: Option[String]) extends Product with Serializable

    Permalink

    Configuration for a trust store.

    Configuration for a trust store.

    A trust store must either provide a file path, or a data String.

    storeType

    The store type. Defaults to the platform default store type (ie, JKS).

    filePath

    The path of the key store file.

    data

    The data to load the key store file from.

Value Members

  1. object AlgorithmConstraintsParser extends RegexParsers

    Permalink

    Parser based on the jdk.certpath.disabledAlgorithm BNF.

    Parser based on the jdk.certpath.disabledAlgorithm BNF.

    See also

    http://sim.ivi.co/2011/07/java-se-7-release-security-enhancements.html

  2. object Algorithms

    Permalink

    This singleton object provides the code needed to check for minimum standards of an X.509 certificate.

    This singleton object provides the code needed to check for minimum standards of an X.509 certificate. Over 95% of trusted leaf certificates and 95% of trusted signing certificates use NIST recommended key sizes. Play supports Java 1.6, which does not have built in certificate strength checking, so we roll our own here.

    The default settings here are based off NIST SP 800-57, using Dates for Phasing out MD5-based signatures and 1024-bit moduli as a practical guide.

    Note that the key sizes are checked on root CA certificates in the trust store. As the Mozilla document says:

    The other concern that needs to be addressed is that of RSA1024 being too small a modulus to be robust against faster computers. Unlike a signature algorithm, where only intermediate and end-entity certificates are impacted, fast math means we have to disable or remove all instances of 1024-bit moduli, including the root certificates.

    Relevant key sizes:

    According to NIST SP 800-57 the recommended algorithms and minimum key sizes are as follows: Through 2010 (minimum of 80 bits of strength) FFC (e.g., DSA, D-H) Minimum: L=1024; N=160 IFC (e.g., RSA) Minimum: k=1024 ECC (e.g. ECDSA) Minimum: f=160 Through 2030 (minimum of 112 bits of strength) FFC (e.g., DSA, D-H) Minimum: L=2048; N=224 IFC (e.g., RSA) Minimum: k=2048 ECC (e.g. ECDSA) Minimum: f=224 Beyond 2030 (minimum of 128 bits of strength) FFC (e.g., DSA, D-H) Minimum: L=3072; N=256 IFC (e.g., RSA) Minimum: k=3072 ECC (e.g. ECDSA) Minimum: f=256

    Relevant signature algorithms:

    The known weak signature algorithms are "MD2, MD4, MD5".

    SHA-1 is considered too weak for new certificates, but is still allowed for verifying old certificates in the chain. The TLS and NIST'S Policy on Hash Functions blog post by one of the JSSE authors has more details, in particular the "Put it into practice" section.

  3. object Ciphers

    Permalink

    This class contains sets of recommended and deprecated TLS cipher suites.

    This class contains sets of recommended and deprecated TLS cipher suites.

    The JSSE list of cipher suites is different from the RFC defined list, with some cipher suites prefixed with "SSL_" instead of "TLS_". A full list is available from the SunJSSE provider list

    Please see https://www.playframework.com/documentation/current/CipherSuites for more details.

  4. object ClientAuth

    Permalink
  5. object CompositeCertificateException extends Serializable

    Permalink
  6. object KeystoreFormats

    Permalink
  7. object Protocols

    Permalink
  8. object SSLConfigFactory

    Permalink

    Factory for creating SSL config (for use from Java).

  9. implicit def arrayCertsToListCerts(chain: Array[Certificate]): List[Certificate]

    Permalink
  10. implicit def certResult2PKIXResult(result: CertPathValidatorResult): PKIXCertPathValidatorResult

    Permalink
  11. implicit def certificate2X509Certificate(cert: Certificate): X509Certificate

    Permalink
  12. package debug

    Permalink
  13. def debugChain(chain: Array[X509Certificate]): Seq[String]

    Permalink
  14. def foldRuntime[T](older: ⇒ T, newer: ⇒ T): T

    Permalink
  15. def foldVersion[T](run16: ⇒ T, runHigher: ⇒ T): T

    Permalink
  16. def isOpenJdk: Boolean

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped