org.apache.commons.ssl
Class Java14

java.lang.Object
  extended by org.apache.commons.ssl.JavaImpl
      extended by org.apache.commons.ssl.Java14

public final class Java14
extends JavaImpl

Since:
30-Jun-2006
Author:
Credit Union Central of British Columbia, www.cucbc.com, juliusdavies@cucbc.com

Field Summary
private static Java14 instance
           
 
Constructor Summary
private Java14()
           
 
Method Summary
protected  Object buildKeyManagerFactory(KeyStore ks, char[] password)
           
protected  Socket buildPlainSocket(SSL ssl, String remoteHost, int remotePort, InetAddress localHost, int localPort, int timeout)
           
protected  RuntimeException buildRuntimeException(Exception cause)
           
protected  SSLServerSocket buildServerSocket(SSL ssl)
           
protected  SSLSocket buildSocket(SSL ssl)
           
protected  SSLSocket buildSocket(SSL ssl, String remoteHost, int remotePort, InetAddress localHost, int localPort, int timeout)
           
protected  SSLServerSocketFactory buildSSLServerSocketFactory(Object ssl)
           
protected  SSLSocketFactory buildSSLSocketFactory(Object ssl)
           
protected  Object buildTrustManagerFactory(KeyStore ks)
           
protected  void checkTrusted(Object trustManager, X509Certificate[] chain, String authType)
           
protected  Socket connectSocket(Socket s, SocketFactory sf, String host, int remotePort, InetAddress localHost, int localPort, int timeout, SSL ssl)
           
protected  void enabledProtocols(Object o, String[] enabledProtocols)
           
static Java14 getInstance()
           
 String getVersion()
           
protected  Object initSSL(SSL ssl, TrustChain tc, KeyMaterial k)
           
protected  String retrieveIssuerX500(X509Certificate cert)
           
protected  Object[] retrieveKeyManagers(Object keyManagerFactory)
           
protected  Certificate[] retrievePeerCerts(SSLSession sslSession)
           
protected  String retrieveSubjectX500(X509Certificate cert)
           
protected  Object[] retrieveTrustManagers(Object trustManagerFactory)
           
protected  void wantClientAuth(Object o, boolean wantClientAuth)
           
 
Methods inherited from class org.apache.commons.ssl.JavaImpl
connect, createPlainSocket, createServerSocket, createSocket, createSocket, downgrade, getIssuerX500, getKeyManagers, getPeerCertificates, getSSLServerSocketFactory, getSSLSocketFactory, getSubjectX500, getTrustManagers, init, isJava13, load, newKeyManagerFactory, newRuntimeException, newTrustManagerFactory, setEnabledProtocols, setWantClientAuth, testTrust, uprade
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

private static Java14 instance
Constructor Detail

Java14

private Java14()
Method Detail

getInstance

public static Java14 getInstance()

getVersion

public final String getVersion()
Specified by:
getVersion in class JavaImpl

retrieveSubjectX500

protected final String retrieveSubjectX500(X509Certificate cert)
Specified by:
retrieveSubjectX500 in class JavaImpl

retrieveIssuerX500

protected final String retrieveIssuerX500(X509Certificate cert)
Specified by:
retrieveIssuerX500 in class JavaImpl

retrievePeerCerts

protected final Certificate[] retrievePeerCerts(SSLSession sslSession)
                                         throws SSLPeerUnverifiedException
Specified by:
retrievePeerCerts in class JavaImpl
Throws:
SSLPeerUnverifiedException

buildKeyManagerFactory

protected final Object buildKeyManagerFactory(KeyStore ks,
                                              char[] password)
                                       throws NoSuchAlgorithmException,
                                              KeyStoreException,
                                              UnrecoverableKeyException
Specified by:
buildKeyManagerFactory in class JavaImpl
Throws:
NoSuchAlgorithmException
KeyStoreException
UnrecoverableKeyException

buildTrustManagerFactory

protected final Object buildTrustManagerFactory(KeyStore ks)
                                         throws NoSuchAlgorithmException,
                                                KeyStoreException
Specified by:
buildTrustManagerFactory in class JavaImpl
Throws:
NoSuchAlgorithmException
KeyStoreException

retrieveKeyManagers

protected final Object[] retrieveKeyManagers(Object keyManagerFactory)
Specified by:
retrieveKeyManagers in class JavaImpl

retrieveTrustManagers

protected final Object[] retrieveTrustManagers(Object trustManagerFactory)
Specified by:
retrieveTrustManagers in class JavaImpl

buildSSLSocketFactory

protected final SSLSocketFactory buildSSLSocketFactory(Object ssl)
Specified by:
buildSSLSocketFactory in class JavaImpl

buildSSLServerSocketFactory

protected final SSLServerSocketFactory buildSSLServerSocketFactory(Object ssl)
Specified by:
buildSSLServerSocketFactory in class JavaImpl

buildRuntimeException

protected final RuntimeException buildRuntimeException(Exception cause)
Specified by:
buildRuntimeException in class JavaImpl

buildSocket

protected final SSLSocket buildSocket(SSL ssl)
                               throws IOException
Specified by:
buildSocket in class JavaImpl
Throws:
IOException

buildSocket

protected final SSLSocket buildSocket(SSL ssl,
                                      String remoteHost,
                                      int remotePort,
                                      InetAddress localHost,
                                      int localPort,
                                      int timeout)
                               throws IOException
Specified by:
buildSocket in class JavaImpl
Throws:
IOException

buildPlainSocket

protected final Socket buildPlainSocket(SSL ssl,
                                        String remoteHost,
                                        int remotePort,
                                        InetAddress localHost,
                                        int localPort,
                                        int timeout)
                                 throws IOException
Specified by:
buildPlainSocket in class JavaImpl
Throws:
IOException

connectSocket

protected final Socket connectSocket(Socket s,
                                     SocketFactory sf,
                                     String host,
                                     int remotePort,
                                     InetAddress localHost,
                                     int localPort,
                                     int timeout,
                                     SSL ssl)
                              throws IOException
Specified by:
connectSocket in class JavaImpl
Throws:
IOException

buildServerSocket

protected final SSLServerSocket buildServerSocket(SSL ssl)
                                           throws IOException
Specified by:
buildServerSocket in class JavaImpl
Throws:
IOException

wantClientAuth

protected final void wantClientAuth(Object o,
                                    boolean wantClientAuth)
Specified by:
wantClientAuth in class JavaImpl

enabledProtocols

protected final void enabledProtocols(Object o,
                                      String[] enabledProtocols)
Specified by:
enabledProtocols in class JavaImpl

checkTrusted

protected void checkTrusted(Object trustManager,
                            X509Certificate[] chain,
                            String authType)
                     throws CertificateException
Specified by:
checkTrusted in class JavaImpl
Throws:
CertificateException

initSSL

protected final Object initSSL(SSL ssl,
                               TrustChain tc,
                               KeyMaterial k)
                        throws NoSuchAlgorithmException,
                               KeyStoreException,
                               CertificateException,
                               KeyManagementException,
                               IOException
Specified by:
initSSL in class JavaImpl
Throws:
NoSuchAlgorithmException
KeyStoreException
CertificateException
KeyManagementException
IOException