com.mle.security

MultiKeyStoreManager

Related Doc: package security

object MultiKeyStoreManager extends Log

Manages multiple different keystores/truststores for one JVM instance.

Removes the reliance on system properties to get SSL to work.

Usage: MultiKeyStoreManager.registerKeyStores(IKeystoreSettings) instead of:

sys.props("javax.net.ssl.keyStore") = keystorePath etc This class is not thread-safe. Note: Modules registering key/truststores using this object will trust all other truststores, in particular also truststores registered by other modules. Therefore, registering keystores like this is not recommended in multi-module applications unless no other option exists, since module A may inadvertedly trust a truststore registered by module B, which is hardly ever desired. A "module" is in this context something that uses truststores/keystores.

See also

http://stackoverflow.com/questions/1793979/registering-multiple-keystores-in-jvm for some early inspiration

Linear Supertypes
Log, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MultiKeyStoreManager
  2. Log
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  10. def getX509KeyManager(algorithm: String, kmFact: KeyManagerFactory): X509KeyManager

    Find a X509 key manager compatible with a particular algorithm

    Find a X509 key manager compatible with a particular algorithm

    algorithm
    kmFact
    returns
    Exceptions thrown

    NoSuchAlgorithmException

  11. def getX509TrustManager(algorithm: String, kmFact: TrustManagerFactory): X509TrustManager

  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. val log: Logger

    Attributes
    protected
    Definition Classes
    Log
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def newJvmKeyManager: X509KeyManager

  17. def newJvmTrustManager: X509TrustManager

  18. def newKeyManager(keyStore: Option[KeyStore], keyStorePass: Option[String]): X509KeyManager

    Build a key manager from a keystore.

    Build a key manager from a keystore.

    Pass None as arguments in order to get the default JVM key manager.

    keyStore

    the keystore with which to initialize the keystore manager

    keyStorePass
    returns

    a key manager

  19. def newKeyManager(keyStorePath: String, keyStorePass: String): X509KeyManager

  20. def newSslContext(keySettings: IKeystoreSettings): SSLContext

    Constructs an SSL context with the given key settings.

    Constructs an SSL context with the given key settings.

    The context will be initialized with a key/trust manager built from the given key settings in addition to the default JVM key/trust manager.

    keySettings

    key settings to initialize context with

    returns

    a new SSL context

  21. def newTrustManager(keyStore: Option[KeyStore]): X509TrustManager

    Pass None parameter to get the default JVM trust manager.

    Pass None parameter to get the default JVM trust manager.

    keyStore

    the truststore with which to initialize the trust manager

    returns

  22. def newTrustManager(trustStorePath: String, trustStorePass: String): X509TrustManager

  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  25. def registerKeyStores(keySettings: IKeystoreSettings): Unit

    Adds the given key settings to the SSL context.

    Adds the given key settings to the SSL context.

    Applications that wish to set SSL properties like javax.net.ssl.* can - instead of polluting system properties - register the key settings using this method.

    keySettings

    keystore/truststore info to add to the JVM

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toJksKeyStore(storePath: String, storePass: String): KeyStore

  28. def toString(): String

    Definition Classes
    AnyRef → Any
  29. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Log

Inherited from AnyRef

Inherited from Any

Ungrouped