Package adams.core.net
Class SSLHelper
- java.lang.Object
-
- adams.core.net.SSLHelper
-
public class SSLHelper extends Object
A helper class for SSL.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description static StringFILENAMEthe name of the props file.static StringHOSTNAME_VERIFIERThe hostname verifier.protected static Propertiesm_Propertiesthe properties.static StringTRUST_MANAGERThe trust manager.
-
Constructor Summary
Constructors Constructor Description SSLHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HostnameVerifiergetHostnameVerifier()Returns the hostname verifier.static PropertiesgetProperties()Returns the underlying properties.static X509TrustManagergetTrustManager()Returns the trust manager.static booleaninitialize()Initializes the SSL context.static booleanwriteProperties()Writes the specified properties to disk.static booleanwriteProperties(Properties props)Writes the specified properties to disk.
-
-
-
Field Detail
-
FILENAME
public static final String FILENAME
the name of the props file.- See Also:
- Constant Field Values
-
HOSTNAME_VERIFIER
public static final String HOSTNAME_VERIFIER
The hostname verifier.- See Also:
- Constant Field Values
-
TRUST_MANAGER
public static final String TRUST_MANAGER
The trust manager.- See Also:
- Constant Field Values
-
m_Properties
protected static Properties m_Properties
the properties.
-
-
Method Detail
-
getProperties
public static Properties getProperties()
Returns the underlying properties.- Returns:
- the properties
-
writeProperties
public static boolean writeProperties()
Writes the specified properties to disk.- Returns:
- true if successfully stored
-
writeProperties
public static boolean writeProperties(Properties props)
Writes the specified properties to disk.- Parameters:
props- the properties to write to disk- Returns:
- true if successfully stored
-
getHostnameVerifier
public static HostnameVerifier getHostnameVerifier()
Returns the hostname verifier.- Returns:
- the verifier
-
getTrustManager
public static X509TrustManager getTrustManager()
Returns the trust manager.- Returns:
- the trust manager
-
initialize
public static boolean initialize()
Initializes the SSL context.- Returns:
- true if successfully initialized
-
-