Package com.io7m.idstore.tls

# Class IdTLSContext

java.lang.Object
com.io7m.idstore.tls.IdTLSContext

public final class IdTLSContext extends Object
Functions to create custom SSL contexts.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SSLContext`
  `context()`
  `static IdTLSContext`
  `create(String user, IdTLSStoreConfiguration keyStoreConfiguration, IdTLSStoreConfiguration trustStoreConfiguration)`
  Create a new SSL context using the given keystore and truststore.
  `void`
  `reload()`
  Reload the key stores and associated SSL context.
  `String`
  `toString()`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### create

    public static IdTLSContext create(String user, IdTLSStoreConfiguration keyStoreConfiguration, IdTLSStoreConfiguration trustStoreConfiguration) throws IOException, GeneralSecurityException
    Create a new SSL context using the given keystore and truststore.
    Parameters:
      `user` - The part of the application creating the context
      `keyStoreConfiguration` - The key store
      `trustStoreConfiguration` - The trust store
    Returns:
      A new SSL context
    Throws:
      `IOException` - On I/O errors
      `GeneralSecurityException` - On security errors

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### reload

    public void reload() throws IOException, GeneralSecurityException
    Reload the key stores and associated SSL context.
    Throws:
      `IOException` - On I/O errors
      `GeneralSecurityException` - On security errors

  - ### context

    public SSLContext context()
    Returns:
      The SSL context