Package com.io7m.idstore.tls
Class IdTLSContext
java.lang.Object
com.io7m.idstore.tls.IdTLSContext
Functions to create custom SSL contexts.
-
Method Summary
Modifier and TypeMethodDescriptioncontext()
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.toString()
-
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 contextkeyStoreConfiguration
- The key storetrustStoreConfiguration
- The trust store- Returns:
- A new SSL context
- Throws:
IOException
- On I/O errorsGeneralSecurityException
- On security errors
-
toString
-
reload
Reload the key stores and associated SSL context.- Throws:
IOException
- On I/O errorsGeneralSecurityException
- On security errors
-
context
- Returns:
- The SSL context
-