public final class SSLContextFactory extends Object
Utility class for creating SSLContext instances for use by a Netty stack.
| Modifier and Type | Method and Description |
|---|---|
static SSLEngine |
clientEngine(SSLContext theContext)
Create an SSLEngine for a SNARL Client
|
static SSLContext |
createSSLContext(String theKeyStorePath,
char[] theKeyStorePasswd,
String theTrustStorePath,
char[] theTrustStorePasswd)
Create a SSLContext w/ the default keystore type of
STORE_TYPE. |
static SSLContext |
createSSLContext(String theKeyStoreType,
String theKeyStorePath,
char[] theKeyStorePasswd,
String theTrustStoreType,
String theTrustStorePath,
char[] theTrustStorePasswd)
Create a SSLContext with the specified keystore type.
|
static String |
path(String theSegment,
String... theSegments) |
static SSLEngine |
serverEngine(SSLContext theContext)
Create an SSLEngine for a SNARL server
|
static URL |
validateResourceURL(String thePath) |
public static SSLEngine clientEngine(SSLContext theContext)
theContext - the client SSL contextpublic static SSLEngine serverEngine(SSLContext theContext)
theContext - the server SSL contextpublic static SSLContext createSSLContext(String theKeyStorePath, char[] theKeyStorePasswd, String theTrustStorePath, char[] theTrustStorePasswd) throws SSLException
STORE_TYPE. One of the keystore path or trust store path must be non-nulltheKeyStorePath - the location of the keystore, or null to create the context w/o a key storetheKeyStorePasswd - the keystore passwordtheTrustStorePath - the location of the trust store, or null to create the context w/o a trust storetheTrustStorePasswd - the trust store passwordSSLException - if there was an error creating the contextpublic static SSLContext createSSLContext(String theKeyStoreType, String theKeyStorePath, char[] theKeyStorePasswd, String theTrustStoreType, String theTrustStorePath, char[] theTrustStorePasswd) throws SSLException
theKeyStoreType - the keystore typetheKeyStorePath - the location of the keystore, or null to create the context w/o a key storetheKeyStorePasswd - the keystore passwordtheTrustStoreType - the trust store typetheTrustStorePath - the location of the trust store, or null to create the context w/o a trust storetheTrustStorePasswd - the trust store passwordSSLException - if there was an error creating the contextpublic static URL validateResourceURL(String thePath) throws KeyStoreException, MalformedURLException
Copyright © 2010-2016 Stardog Union. All Rights Reserved.