org.hardtokenmgmt.core.token
Class NetIdSetCos431Token

java.lang.Object
  extended by org.hardtokenmgmt.core.token.BaseToken
      extended by org.hardtokenmgmt.core.token.SetCos431InstantEIDToken
          extended by org.hardtokenmgmt.core.token.NetIdSetCos431Token
All Implemented Interfaces:
IToken

public class NetIdSetCos431Token
extends SetCos431InstantEIDToken

Implementation specific token class for SetCos 431 Instant eID cards using NetId pkcs11

Version:
$Id$
Author:
Philip Vendil 2008-05-20

Field Summary
 
Fields inherited from class org.hardtokenmgmt.core.token.BaseToken
MAXNUMOBJECTS, tokens
 
Fields inherited from interface org.hardtokenmgmt.core.token.IToken
KEYALG_RSA, KEYTYPE_ALL, KEYTYPE_AUTH, KEYTYPE_ENC, KEYTYPE_SIGN, OBJECTTYPE_DATA, PINTYPE_BASIC, PINTYPE_SIGN
 
Constructor Summary
NetIdSetCos431Token()
           
 
Method Summary
 void clearToken(java.lang.String[] pintypes, java.lang.String[] puks)
          Method to use with the Setec 431 cards.
 void removeCertificate(java.lang.String pintype, java.lang.String pin, java.lang.String basicpin, java.security.cert.X509Certificate cert)
          Method removing the specified certificate from the token.
 PINInfo unblockPIN(java.lang.String pintype, java.lang.String puk, java.lang.String newpin)
          Method that overloads the standard version and uses native calls instead.
 
Methods inherited from class org.hardtokenmgmt.core.token.SetCos431InstantEIDToken
downloadKeyStore, generatePUK, genKey, getPINLabel, getPrivateKeyLabel, getSupportedPINTypes, initToken, isInitialized, isTokenSupported, removeKey, requirePUKInDB
 
Methods inherited from class org.hardtokenmgmt.core.token.BaseToken
addObject, blockPIN, changePIN, checkPIN, clearCertificateCache, downloadCert, genPKCS10, getCertificate, getCertificates, getHardTokenSN, getKeyLabels, getObjects, getPINInfo, getSlotId, init, reInitToken, removeAllKeys, removeObject, unlockPIN
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetIdSetCos431Token

public NetIdSetCos431Token()
Method Detail

unblockPIN

public PINInfo unblockPIN(java.lang.String pintype,
                          java.lang.String puk,
                          java.lang.String newpin)
                   throws OperationNotSupportedException,
                          iaik.pkcs.pkcs11.TokenException
Method that overloads the standard version and uses native calls instead.

Specified by:
unblockPIN in interface IToken
Overrides:
unblockPIN in class BaseToken
Parameters:
pintype - one of the PINTYPE_ constants
puk - the PUK that should be used to unblock
newpin - the new PIN.
Returns:
a PINInfo object indicating the new status of the PIN
Throws:
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.
See Also:
IToken.unblockPIN(String, String, String)

clearToken

public void clearToken(java.lang.String[] pintypes,
                       java.lang.String[] puks)
                throws OperationNotSupportedException,
                       iaik.pkcs.pkcs11.TokenException
Method to use with the Setec 431 cards. It removes all dataobjects, then removes all Certificates then sets all pins to a default value defined in global.properties.

Specified by:
clearToken in interface IToken
Overrides:
clearToken in class SetCos431InstantEIDToken
Parameters:
pintypes - optional parameter used by some cards with non-erasable filesystem and needs the PUK code to erease some areas. Should contain an array of PINTYPE_contants or custom label strings
puks - optional parameter used by some cards with non-erasable filesystem and needs the PUK code to erease some areas.
Throws:
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.

removeCertificate

public void removeCertificate(java.lang.String pintype,
                              java.lang.String pin,
                              java.lang.String basicpin,
                              java.security.cert.X509Certificate cert)
                       throws OperationNotSupportedException,
                              iaik.pkcs.pkcs11.TokenException
Description copied from interface: IToken
Method removing the specified certificate from the token.

Specified by:
removeCertificate in interface IToken
Overrides:
removeCertificate in class BaseToken
Parameters:
pintype - of the PIN needed to unlock the token
pin - the pin to unlock (May not be required, then can null be used)
basicpin - pin to unlock the basic area, might be used for signature certificates
Throws:
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.
See Also:
IToken.removeCertificate(String, String, String, X509Certificate)