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 String
FILENAME
the name of the props file.static String
HOSTNAME_VERIFIER
The hostname verifier.protected static Properties
m_Properties
the properties.static String
TRUST_MANAGER
The trust manager.
-
Constructor Summary
Constructors Constructor Description SSLHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static HostnameVerifier
getHostnameVerifier()
Returns the hostname verifier.static Properties
getProperties()
Returns the underlying properties.static X509TrustManager
getTrustManager()
Returns the trust manager.static boolean
initialize()
Initializes the SSL context.static boolean
writeProperties()
Writes the specified properties to disk.static boolean
writeProperties(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
-
-