Package com.io7m.cardant.tls

# Class CATLSContext

java.lang.Object
com.io7m.cardant.tls.CATLSContext

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SSLContext`
  `context()`
  `static CATLSContext`
  `create(String user, CATLSStoreConfiguration keyStoreConfiguration, CATLSStoreConfiguration 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 CATLSContext create(String user, CATLSStoreConfiguration keyStoreConfiguration, CATLSStoreConfiguration 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