public final class SSLUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String[] |
getCiphersuites(List<String> cipherSuitesList,
String[] supportedCipherSuites,
FiltersType filters,
Logger log,
boolean exclude) |
static KeyManager[] |
getDefaultKeyStoreManagers(Logger log) |
static String |
getKeyPassword(String keyPassword,
Logger log) |
static String |
getKeystore(String keyStoreLocation,
Logger log) |
static String |
getKeystoreAlgorithm(String keyStoreMgrFactoryAlgorithm,
Logger log) |
static KeyManager[] |
getKeyStoreManagers(String keyStoreLocation,
String keyStoreType,
String keyStorePassword,
String keyPassword,
String keyStoreMgrFactoryAlgorithm,
String secureSocketProtocol,
Logger log) |
static String |
getKeystorePassword(String keyStorePassword,
Logger log) |
static String |
getKeystoreProvider(String keyStoreProvider,
Logger log) |
static String |
getKeystoreType(String keyStoreType,
Logger log) |
static String |
getKeystoreType(String keyStoreType,
Logger log,
String def) |
static boolean |
getRequireClientAuthentication(boolean isSetRequireClientAuthentication,
Boolean isRequireClientAuthentication,
Logger log) |
static String |
getSecureSocketProtocol(String secureSocketProtocol,
Logger log) |
static String[] |
getServerSupportedCipherSuites(SSLContext context) |
static SSLContext |
getSSLContext(String protocol,
KeyManager[] keyStoreManagers,
TrustManager[] trustStoreManagers) |
static String[] |
getSupportedCipherSuites(SSLContext context) |
static String |
getTrustStore(String trustStoreLocation,
Logger log) |
static String |
getTrustStoreAlgorithm(String trustStoreMgrFactoryAlgorithm,
Logger log) |
static TrustManager[] |
getTrustStoreManagers(boolean pkcs12,
String trustStoreType,
String trustStoreLocation,
String trustStoreMgrFactoryAlgorithm,
Logger log) |
static String |
getTrustStoreType(String trustStoreType,
Logger log) |
static boolean |
getWantClientAuthentication(boolean isSetWantClientAuthentication,
Boolean isWantClientAuthentication,
Logger log) |
protected static byte[] |
loadCACert(String fileName) |
protected static byte[] |
loadClientCredential(String fileName) |
static KeyManager[] |
loadKeyStore(KeyManagerFactory kmf,
KeyStore ks,
ByteArrayInputStream bin,
String keyStoreLocation,
String keyStorePassword,
Logger log) |
static void |
logUnSupportedPolicies(Object policy,
boolean client,
String[] unsupported,
Logger log) |
static boolean |
testAllDataHasSetupMethod(Object policy,
String[] unsupported,
String[] derivative) |
public static KeyManager[] getKeyStoreManagers(String keyStoreLocation, String keyStoreType, String keyStorePassword, String keyPassword, String keyStoreMgrFactoryAlgorithm, String secureSocketProtocol, Logger log) throws Exception
Exception
public static KeyManager[] getDefaultKeyStoreManagers(Logger log)
public static KeyManager[] loadKeyStore(KeyManagerFactory kmf, KeyStore ks, ByteArrayInputStream bin, String keyStoreLocation, String keyStorePassword, Logger log)
public static TrustManager[] getTrustStoreManagers(boolean pkcs12, String trustStoreType, String trustStoreLocation, String trustStoreMgrFactoryAlgorithm, Logger log) throws Exception
Exception
protected static byte[] loadClientCredential(String fileName) throws IOException
IOException
protected static byte[] loadCACert(String fileName) throws IOException
IOException
public static String getKeystoreAlgorithm(String keyStoreMgrFactoryAlgorithm, Logger log)
public static String getTrustStoreAlgorithm(String trustStoreMgrFactoryAlgorithm, Logger log)
public static SSLContext getSSLContext(String protocol, KeyManager[] keyStoreManagers, TrustManager[] trustStoreManagers) throws NoSuchAlgorithmException, KeyManagementException
public static String[] getSupportedCipherSuites(SSLContext context)
public static String[] getServerSupportedCipherSuites(SSLContext context)
public static String[] getCiphersuites(List<String> cipherSuitesList, String[] supportedCipherSuites, FiltersType filters, Logger log, boolean exclude)
public static String getSecureSocketProtocol(String secureSocketProtocol, Logger log)
public static boolean getRequireClientAuthentication(boolean isSetRequireClientAuthentication, Boolean isRequireClientAuthentication, Logger log)
public static boolean getWantClientAuthentication(boolean isSetWantClientAuthentication, Boolean isWantClientAuthentication, Logger log)
public static void logUnSupportedPolicies(Object policy, boolean client, String[] unsupported, Logger log)
Apache CXF