public abstract class JavaImpl extends Object
Constructor and Description |
---|
JavaImpl() |
Modifier and Type | Method and Description |
---|---|
protected abstract Object |
buildKeyManagerFactory(KeyStore ks,
char[] pass) |
protected abstract Socket |
buildPlainSocket(SSL ssl,
String remoteHost,
int remotePort,
InetAddress localHost,
int localPort,
int connectTimeout) |
protected abstract RuntimeException |
buildRuntimeException(Exception cause) |
protected abstract SSLServerSocket |
buildServerSocket(SSL ssl) |
protected abstract SSLSocket |
buildSocket(SSL ssl) |
protected abstract SSLSocket |
buildSocket(SSL ssl,
String remoteHost,
int remotePort,
InetAddress localHost,
int localPort,
int connectTimeout) |
protected abstract SSLServerSocketFactory |
buildSSLServerSocketFactory(Object ssl) |
protected abstract SSLSocketFactory |
buildSSLSocketFactory(Object ssl) |
protected abstract Object |
buildTrustManagerFactory(KeyStore ks) |
protected abstract void |
checkTrusted(Object trustManager,
X509Certificate[] chain,
String authType) |
protected static Socket |
connect(Socket s,
SocketFactory sf,
String remoteHost,
int remotePort,
InetAddress localHost,
int localPort,
int timeout,
SSL ssl) |
protected abstract Socket |
connectSocket(Socket s,
SocketFactory sf,
String remoteHost,
int remotePort,
InetAddress localHost,
int localPort,
int timeout,
SSL ssl) |
static Socket |
createPlainSocket(SSL ssl,
String remoteHost,
int remotePort,
InetAddress localHost,
int localPort,
int connectTimeout) |
static SSLServerSocket |
createServerSocket(SSL ssl) |
static SSLSocket |
createSocket(SSL ssl) |
static SSLSocket |
createSocket(SSL ssl,
String remoteHost,
int remotePort,
InetAddress localHost,
int localPort,
int connectTimeout) |
static void |
downgrade() |
protected abstract void |
enabledProtocols(Object o,
String[] enabledProtocols) |
static String |
getIssuerX500(X509Certificate cert) |
static Object[] |
getKeyManagers(Object keyManagerFactory) |
static Certificate[] |
getPeerCertificates(SSLSession session) |
static SSLServerSocketFactory |
getSSLServerSocketFactory(Object sslContext) |
static SSLSocketFactory |
getSSLSocketFactory(Object sslContext) |
static String |
getSubjectX500(X509Certificate cert) |
static Object[] |
getTrustManagers(Object trustManagerFactory) |
abstract String |
getVersion() |
static Object |
init(SSL ssl,
TrustChain trustChain,
KeyMaterial keyMaterial) |
protected abstract Object |
initSSL(SSL ssl,
TrustChain tc,
KeyMaterial km) |
static boolean |
isJava13() |
static void |
load() |
static Object |
newKeyManagerFactory(KeyStore ks,
char[] password) |
static RuntimeException |
newRuntimeException(Exception cause) |
static Object |
newTrustManagerFactory(KeyStore ks) |
protected abstract String |
retrieveIssuerX500(X509Certificate cert) |
protected abstract Object[] |
retrieveKeyManagers(Object keyManagerFactory) |
protected abstract Certificate[] |
retrievePeerCerts(SSLSession sslSession) |
protected abstract String |
retrieveSubjectX500(X509Certificate cert) |
protected abstract Object[] |
retrieveTrustManagers(Object trustManagerFactory) |
static void |
setEnabledProtocols(Object o,
String[] enabledProtocols) |
static void |
setWantClientAuth(Object o,
boolean wantClientAuth) |
static void |
testTrust(Object trustManager,
X509Certificate[] chain,
String authType) |
static void |
uprade() |
protected abstract void |
wantClientAuth(Object o,
boolean wantClientAuth) |
public JavaImpl()
public static void downgrade()
public static boolean isJava13()
public static void uprade()
public abstract String getVersion()
protected abstract Object buildKeyManagerFactory(KeyStore ks, char[] pass) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException
protected abstract Object[] retrieveKeyManagers(Object keyManagerFactory)
protected abstract Object buildTrustManagerFactory(KeyStore ks) throws NoSuchAlgorithmException, KeyStoreException
protected abstract Object[] retrieveTrustManagers(Object trustManagerFactory)
protected abstract String retrieveSubjectX500(X509Certificate cert)
protected abstract String retrieveIssuerX500(X509Certificate cert)
protected abstract Certificate[] retrievePeerCerts(SSLSession sslSession) throws SSLPeerUnverifiedException
SSLPeerUnverifiedException
protected abstract SSLSocketFactory buildSSLSocketFactory(Object ssl)
protected abstract SSLServerSocketFactory buildSSLServerSocketFactory(Object ssl)
protected abstract SSLSocket buildSocket(SSL ssl) throws IOException
IOException
protected abstract SSLSocket buildSocket(SSL ssl, String remoteHost, int remotePort, InetAddress localHost, int localPort, int connectTimeout) throws IOException
IOException
protected abstract Socket buildPlainSocket(SSL ssl, String remoteHost, int remotePort, InetAddress localHost, int localPort, int connectTimeout) throws IOException
IOException
protected abstract Socket connectSocket(Socket s, SocketFactory sf, String remoteHost, int remotePort, InetAddress localHost, int localPort, int timeout, SSL ssl) throws IOException
IOException
protected abstract SSLServerSocket buildServerSocket(SSL ssl) throws IOException
IOException
protected abstract void wantClientAuth(Object o, boolean wantClientAuth)
protected abstract void enabledProtocols(Object o, String[] enabledProtocols)
protected abstract RuntimeException buildRuntimeException(Exception cause)
protected abstract Object initSSL(SSL ssl, TrustChain tc, KeyMaterial km) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, KeyManagementException, IOException
protected abstract void checkTrusted(Object trustManager, X509Certificate[] chain, String authType) throws CertificateException
CertificateException
public static Object init(SSL ssl, TrustChain trustChain, KeyMaterial keyMaterial) throws NoSuchAlgorithmException, KeyStoreException, CertificateException, KeyManagementException, IOException
public static RuntimeException newRuntimeException(Exception cause)
public static SSLSocketFactory getSSLSocketFactory(Object sslContext)
public static SSLServerSocketFactory getSSLServerSocketFactory(Object sslContext)
public static String getSubjectX500(X509Certificate cert)
public static String getIssuerX500(X509Certificate cert)
public static Object newKeyManagerFactory(KeyStore ks, char[] password) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException
public static Object[] getKeyManagers(Object keyManagerFactory)
public static Object newTrustManagerFactory(KeyStore ks) throws NoSuchAlgorithmException, KeyStoreException
public static Object[] getTrustManagers(Object trustManagerFactory)
public static SSLSocket createSocket(SSL ssl) throws IOException
IOException
public static SSLSocket createSocket(SSL ssl, String remoteHost, int remotePort, InetAddress localHost, int localPort, int connectTimeout) throws IOException
IOException
public static Socket createPlainSocket(SSL ssl, String remoteHost, int remotePort, InetAddress localHost, int localPort, int connectTimeout) throws IOException
IOException
protected static Socket connect(Socket s, SocketFactory sf, String remoteHost, int remotePort, InetAddress localHost, int localPort, int timeout, SSL ssl) throws IOException
IOException
public static SSLServerSocket createServerSocket(SSL ssl) throws IOException
IOException
public static void setWantClientAuth(Object o, boolean wantClientAuth)
public static void setEnabledProtocols(Object o, String[] enabledProtocols)
public static Certificate[] getPeerCertificates(SSLSession session) throws SSLPeerUnverifiedException
SSLPeerUnverifiedException
public static void testTrust(Object trustManager, X509Certificate[] chain, String authType) throws CertificateException
CertificateException
public static void load()