org.hardtokenmgmt.core.logon
Class Pkcs11LogonManager

java.lang.Object
  extended by org.hardtokenmgmt.core.logon.Pkcs11LogonManager

public class Pkcs11LogonManager
extends java.lang.Object

Class responsible for managing the HTTPS logon communication with the WS service.

Version:
$Id$
Author:
Philip Vendil 3 feb 2008

Constructor Summary
Pkcs11LogonManager()
           
 
Method Summary
static java.security.cert.X509Certificate initializeAutoLogonHTTPSContext(long slotId, java.lang.String pkcs11Name, java.lang.String pIN, ILogonGUICallback logonGUICallback)
          A ToLiMa specific SSL context manager, used for the autologon page especially.
static void initializeHTTPSContext(IToken token, java.lang.String pIN, ILogonGUICallback logonGUICallback)
          A ToLiMa specific SSL context manager, using the specially written ToLiMa trust and key managers.
static boolean testConnection()
          Method used to test if HTTPS is configured correctly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Pkcs11LogonManager

public Pkcs11LogonManager()
Method Detail

initializeHTTPSContext

public static void initializeHTTPSContext(IToken token,
                                          java.lang.String pIN,
                                          ILogonGUICallback logonGUICallback)
A ToLiMa specific SSL context manager, using the specially written ToLiMa trust and key managers.

Parameters:
token - the IToken containing the admin certificate.
pIN - the PIN used to unlock the card
logonGUICallback - link to the GUI if a confirmation must be displayed.
Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.UnrecoverableKeyException
java.security.KeyManagementException

initializeAutoLogonHTTPSContext

public static java.security.cert.X509Certificate initializeAutoLogonHTTPSContext(long slotId,
                                                                                 java.lang.String pkcs11Name,
                                                                                 java.lang.String pIN,
                                                                                 ILogonGUICallback logonGUICallback)
A ToLiMa specific SSL context manager, used for the autologon page especially.

Parameters:
slotId - the slot containing the admin certificate.
pIN - the PIN used to unlock the card.
logonGUICallback - link to the GUI if a confirmation must be displayed.
Throws:
java.security.NoSuchAlgorithmException
java.security.KeyStoreException
java.security.UnrecoverableKeyException
java.security.KeyManagementException

testConnection

public static boolean testConnection()
Method used to test if HTTPS is configured correctly.

Returns:
true if connection was succesfull.