Package jade.imtp.leap
Class SSLHelper
- java.lang.Object
-
- jade.imtp.leap.SSLHelper
-
public class SSLHelper extends Object
Helper class to deal with SSL related setup- Author:
- eduard
-
-
Field Summary
Fields Modifier and Type Field Description static ListsupportedKeysuse this to indicate which cipher suites we support
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SSLContextcreateContext()static SSLContextcreateContext(String keystore, String passphrase)static SSLContextcreateContextNoAuth()creates a SSLContext without a keystore or truststorestatic SSLContextcreateContextWithAuth()creates a SSLContext with a keystore, no truststore is usedstatic String[]getSupportedKeys()static booleanneedAuth()callsneedAuth(java.lang.String)with System.getProperty("javax.net.ssl.keyStore") as argumentstatic booleanneedAuth(String keystore)
-
-
-
Field Detail
-
supportedKeys
public static final List supportedKeys
use this to indicate which cipher suites we support
-
-
Method Detail
-
getSupportedKeys
public static String[] getSupportedKeys()
-
needAuth
public static boolean needAuth(String keystore)
- Parameters:
keystore-- Returns:
- true when filename arguments can be read
-
needAuth
public static boolean needAuth()
callsneedAuth(java.lang.String)with System.getProperty("javax.net.ssl.keyStore") as argument- Returns:
-
createContext
public static SSLContext createContext() throws ICPException
- Throws:
ICPException
-
createContext
public static SSLContext createContext(String keystore, String passphrase) throws ICPException
- Parameters:
keystore- will be used if javax.net.ssl.keyStore is not setpassphrase- will be used if javax.net.ssl.keyStorePassword is not set- Returns:
- Throws:
ICPException
-
createContextNoAuth
public static SSLContext createContextNoAuth() throws ICPException
creates a SSLContext without a keystore or truststore- Returns:
- Throws:
ICPException
-
createContextWithAuth
public static SSLContext createContextWithAuth() throws ICPException
creates a SSLContext with a keystore, no truststore is used- Returns:
- Throws:
ICPException
-
-