Package org.apache.ofbiz.base.util
Class SSLUtil
java.lang.Object
org.apache.ofbiz.base.util.SSLUtil
KeyStoreUtil - Utilities for setting up SSL connections with specific client certificates
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
static int
static HostnameVerifier
getHostnameVerifier
(int level) static KeyManager[]
static KeyManager[]
getKeyManagers
(KeyStore ks, String password, String alias) static SSLContext
getSSLContext
(String alias, boolean trustAny) static SSLContext
getSSLContext
(KeyStore ks, String password, String alias, boolean trustAny) static SSLServerSocketFactory
getSSLServerSocketFactory
(String alias) static SSLServerSocketFactory
getSSLServerSocketFactory
(KeyStore ks, String password, String alias) static SSLSocketFactory
static SSLSocketFactory
getSSLSocketFactory
(String alias, boolean trustAny) static SSLSocketFactory
getSSLSocketFactory
(KeyStore ks, String password, String alias) static TrustManager[]
static TrustManager[]
static boolean
isClientTrusted
(X509Certificate[] chain, String authType) static void
-
Method Details
-
getHostCertNoCheck
public static int getHostCertNoCheck() -
getHostCertMinCheck
public static int getHostCertMinCheck() -
isClientTrusted
-
getKeyManagers
public static KeyManager[] getKeyManagers() throws IOException, GeneralSecurityException, GenericConfigException -
getTrustAnyManagers
-
getKeyManagers
public static KeyManager[] getKeyManagers(KeyStore ks, String password, String alias) throws GeneralSecurityException - Throws:
GeneralSecurityException
-
getTrustManagers
-
getSSLSocketFactory
public static SSLSocketFactory getSSLSocketFactory(KeyStore ks, String password, String alias) throws IOException, GeneralSecurityException, GenericConfigException -
getSSLContext
public static SSLContext getSSLContext(KeyStore ks, String password, String alias, boolean trustAny) throws IOException, GeneralSecurityException, GenericConfigException -
getSSLSocketFactory
public static SSLSocketFactory getSSLSocketFactory(String alias, boolean trustAny) throws IOException, GeneralSecurityException, GenericConfigException -
getSSLContext
public static SSLContext getSSLContext(String alias, boolean trustAny) throws IOException, GeneralSecurityException, GenericConfigException -
getSSLSocketFactory
public static SSLSocketFactory getSSLSocketFactory() throws IOException, GeneralSecurityException, GenericConfigException -
getSSLServerSocketFactory
public static SSLServerSocketFactory getSSLServerSocketFactory(KeyStore ks, String password, String alias) throws IOException, GeneralSecurityException, GenericConfigException -
getSSLServerSocketFactory
public static SSLServerSocketFactory getSSLServerSocketFactory(String alias) throws IOException, GeneralSecurityException, GenericConfigException -
getHostnameVerifier
-
loadJsseProperties
public static void loadJsseProperties()
-