net.cnri.dobj
Class DOSSLKeyManager

java.lang.Object
  extended by net.cnri.dobj.DOSSLKeyManager
All Implemented Interfaces:
javax.net.ssl.KeyManager, javax.net.ssl.X509KeyManager

public class DOSSLKeyManager
extends java.lang.Object
implements javax.net.ssl.X509KeyManager

This object is used to provide a private key for authentication to the other side of a secure socket connection.


Constructor Summary
DOSSLKeyManager(PKAuthentication auth)
           
DOSSLKeyManager(PKAuthentication auth, java.security.PublicKey pubKey)
           
 
Method Summary
 java.lang.String chooseClientAlias(java.lang.String[] keyTypes, java.security.Principal[] issuers, java.net.Socket socket)
           
 java.lang.String chooseServerAlias(java.lang.String keyType, java.security.Principal[] issuers, java.net.Socket socket)
           
 java.security.cert.X509Certificate[] getCertificateChain(java.lang.String alias)
           
 java.lang.String[] getClientAliases(java.lang.String keyType, java.security.Principal[] issuers)
           
 java.security.PrivateKey getPrivateKey(java.lang.String alias)
           
 java.lang.String[] getServerAliases(java.lang.String keyType, java.security.Principal[] issuers)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOSSLKeyManager

public DOSSLKeyManager(PKAuthentication auth)
                throws java.lang.Exception
Throws:
java.lang.Exception

DOSSLKeyManager

public DOSSLKeyManager(PKAuthentication auth,
                       java.security.PublicKey pubKey)
                throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

chooseClientAlias

public java.lang.String chooseClientAlias(java.lang.String[] keyTypes,
                                          java.security.Principal[] issuers,
                                          java.net.Socket socket)
Specified by:
chooseClientAlias in interface javax.net.ssl.X509KeyManager

chooseServerAlias

public java.lang.String chooseServerAlias(java.lang.String keyType,
                                          java.security.Principal[] issuers,
                                          java.net.Socket socket)
Specified by:
chooseServerAlias in interface javax.net.ssl.X509KeyManager

getServerAliases

public java.lang.String[] getServerAliases(java.lang.String keyType,
                                           java.security.Principal[] issuers)
Specified by:
getServerAliases in interface javax.net.ssl.X509KeyManager

getCertificateChain

public java.security.cert.X509Certificate[] getCertificateChain(java.lang.String alias)
Specified by:
getCertificateChain in interface javax.net.ssl.X509KeyManager

getClientAliases

public java.lang.String[] getClientAliases(java.lang.String keyType,
                                           java.security.Principal[] issuers)
Specified by:
getClientAliases in interface javax.net.ssl.X509KeyManager

getPrivateKey

public java.security.PrivateKey getPrivateKey(java.lang.String alias)
Specified by:
getPrivateKey in interface javax.net.ssl.X509KeyManager