public final class SslUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.security.KeyStore |
loadKeyStore(java.lang.String location,
PasswordConfig password)
Load a keystore into a KeyStore object.
|
static java.security.KeyStore |
loadKeyStore(java.lang.String location,
PasswordConfig password,
java.lang.String type) |
static void |
printKeyStore(java.lang.String type,
java.lang.String location,
PasswordConfig password)
Log the contents of a key store.
|
static void |
validateCertificateStore(java.lang.String type,
java.lang.String storeLocation,
PasswordConfig storePassword,
boolean performCertificateValidation)
This will try to load the keystore and throws an exception if invalid
|
static void |
validateCertificateStore(java.lang.String type,
java.lang.String storeLocation,
PasswordConfig storePassword,
java.lang.String storeType,
boolean performCertificateValidation) |
public static java.security.KeyStore loadKeyStore(java.lang.String location,
PasswordConfig password)
throws java.security.KeyStoreException,
java.io.IOException,
java.security.cert.CertificateException,
java.security.NoSuchAlgorithmException
location - the location of the keystore filepassword - the password of the keystore filejava.security.KeyStoreException - a key store exception if the format of the store was faultyjava.io.IOException - an io exception if the file could not be read correctlyjava.security.cert.CertificateException - a certificate exception if the certificate inside the
keystore was faultyjava.security.NoSuchAlgorithmException - a no such algorithm exception if the certificate uses an
unsupported algorithmpublic static java.security.KeyStore loadKeyStore(java.lang.String location,
PasswordConfig password,
java.lang.String type)
throws java.security.KeyStoreException,
java.io.IOException,
java.security.cert.CertificateException,
java.security.NoSuchAlgorithmException
java.security.KeyStoreExceptionjava.io.IOExceptionjava.security.cert.CertificateExceptionjava.security.NoSuchAlgorithmExceptionpublic static void printKeyStore(java.lang.String type,
java.lang.String location,
PasswordConfig password)
type - a human-readable keystore type (ie. "keystore" or "truststore")location - the location of the keystorepassword - the password of the keystorepublic static void validateCertificateStore(java.lang.String type,
java.lang.String storeLocation,
PasswordConfig storePassword,
boolean performCertificateValidation)
type - a human-readable keystore type (ie. "keystore" or "truststore")storeLocation - the location of the keystorestorePassword - the password of the keystorepublic static void validateCertificateStore(java.lang.String type,
java.lang.String storeLocation,
PasswordConfig storePassword,
java.lang.String storeType,
boolean performCertificateValidation)
Copyright © 2020 Axual B.V.. All rights reserved.