o

akka.http.scaladsl.common

SSLContextFactory

object SSLContextFactory

Source
SSLContextFactory.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SSLContextFactory
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. def createSSLContextFromPem(certificatePath: Path, privateKeyPath: Path, trustedCaCertificatePaths: Option[Seq[Path]], secureRandom: Option[SecureRandom]): SSLContext

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file and possibly zero or more CA-certificate files to trust.

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file and possibly zero or more CA-certificate files to trust. All files must contain PEM encoded certificates or keys.

    Note that the paths are filesystem paths, not class path, certificate files packaged in the JAR cannot be loaded using this method.

    certificatePath

    Path to a PEM encoded certificate file

    privateKeyPath

    Path to a PEM encoded key file

    trustedCaCertificatePaths

    None to use the default system trust store, Some with one or more CA certificate paths to explicitly control exactly what CAs are trusted

    secureRandom

    a secure random to use for the SSL context or none to use a default instance API May Change

    Annotations
    @ApiMayChange()
  7. def createSSLContextFromPem(certificatePath: Path, privateKeyPath: Path, trustedCaCertificatePaths: Seq[Path]): SSLContext

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file but use the default JDK trust store.

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file but use the default JDK trust store. All files must contain PEM encoded certificates or keys.

    Note that the paths are filesystem paths, not class path, certificate files packaged in the JAR cannot be loaded using this method.

    API May Change

    Annotations
    @ApiMayChange()
  8. def createSSLContextFromPem(certificatePath: Path, privateKeyPath: Path): SSLContext

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file but use the default JDK trust store.

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file but use the default JDK trust store. All files must contain PEM encoded certificates or keys.

    Note that the paths are filesystem paths, not class path, certificate files packaged in the JAR cannot be loaded using this method.

    API May Change

    Annotations
    @ApiMayChange()
  9. def createSSLContextFromPem(config: Config): SSLContext

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file and zero or more CA-certificate files defined in config.

    Convenience factory for constructing an SSLContext out of a certificate file, a private key file and zero or more CA-certificate files defined in config.

    The provided Config is required to have the field certificate containing a path to a certificate file, private-key containing the path to a private key, and the key trusted-ca-certificates either with the value "system" to use the default JDK truststore or containing a list of zero to many paths to CA certificate files to explicitly list what CA certs to trust. All files must contain PEM encoded certificates or keys.

    Note that the paths are filesystem paths, not class path, certificate files packaged in the JAR cannot be loaded using this method.

    Example usage: createSSLContextFromPem(system.settings.config.getConfig("my-server"))

    API May Change

    Annotations
    @ApiMayChange()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. def refreshingSSLContextProvider(refreshAfter: FiniteDuration)(construct: () => SSLContext): () => SSLContext

    Keeps a created SSLContext around for a refreshAfter period, sharing it among connections, then creates a new context.

    Keeps a created SSLContext around for a refreshAfter period, sharing it among connections, then creates a new context. Actually constructing the SSLEngine is left to caller, to allow additional customization of the SSLEngine, for example to require client certificates in a server application.

    refreshAfter

    Keep a created context around this long, then recreate it

    construct

    A factory method to create the context when recreating is needed

    returns

    An SSLEngine provider function to use with Akka HTTP ConnectionContext.httpsServer() and ConnectionContext.httpsClient. API May Change

    Annotations
    @ApiMayChange()
  19. def refreshingSSLEngineProvider(refreshAfter: FiniteDuration)(construct: () => SSLContext): () => SSLEngine

    Keeps a created SSLContext around for a refreshAfter period, sharing it among connections, then creates a new context.

    Keeps a created SSLContext around for a refreshAfter period, sharing it among connections, then creates a new context. Useful for rotating certificates.

    refreshAfter

    Keep a created context around this long, then recreate it

    construct

    A factory method to create the context when recreating is needed

    returns

    An SSLEngine provider function to use with Akka HTTP ConnectionContext.httpsServer() and ConnectionContext.httpsClient. API May Change

    Annotations
    @ApiMayChange()
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped