public class SecurityUtil
extends java.lang.Object
| Constructor and Description |
|---|
SecurityUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkTrustedCertsFile()
Checks the user's home directory to see if the trusted.certs file exists.
|
static java.security.KeyStore |
getCacertsKeyStore()
Returns the keystore associated with the JDK cacerts file,
or null otherwise.
|
static java.lang.String |
getCN(java.lang.String principal)
Extracts the CN field from a Certificate principal string.
|
static java.security.KeyStore |
getSystemCertStore()
Returns the keystore associated with the system certs file,
or null otherwise.
|
static java.lang.String |
getTrustedCertsFilename() |
static char[] |
getTrustedCertsPassword() |
static java.security.KeyStore |
getUserKeyStore()
Returns the keystore associated with the user's trusted.certs file,
or null otherwise.
|
public static java.lang.String getTrustedCertsFilename()
throws java.lang.Exception
java.lang.Exceptionpublic static char[] getTrustedCertsPassword()
public static java.lang.String getCN(java.lang.String principal)
public static boolean checkTrustedCertsFile()
throws java.lang.Exception
java.lang.Exceptionpublic static java.security.KeyStore getUserKeyStore()
throws java.lang.Exception
java.lang.Exceptionpublic static java.security.KeyStore getCacertsKeyStore()
throws java.lang.Exception
java.lang.Exceptionpublic static java.security.KeyStore getSystemCertStore()
throws java.lang.Exception
java.lang.Exception