|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.hardtokenmgmt.core.token.BaseToken
org.hardtokenmgmt.core.token.SetCos431InstantEIDToken
public class SetCos431InstantEIDToken
A Base Token implementation that contains generic operations on token that can be reused by most token implementations
| 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 | |
|---|---|
SetCos431InstantEIDToken()
|
|
| Method Summary | |
|---|---|
void |
clearToken(java.lang.String[] pintypes,
java.lang.String[] puks)
Method to use with the Setec 431 cards. |
void |
downloadKeyStore(java.lang.String keytype,
java.lang.String pintype,
java.lang.String pin,
java.lang.String certLabel,
java.security.KeyStore keyStore,
java.lang.String keyStorePasswd)
Method that downloads a keystores key and certificate on the token. |
java.lang.String |
generatePUK(java.lang.String pintype)
Method that should generate the PUK code placed on the card for the specified PIN. |
void |
genKey(java.lang.String pintype,
java.lang.String pin,
java.lang.String basicpin,
java.lang.String keytype,
java.lang.String algorithm,
int keysize,
java.lang.String label)
Method that should generate a key on the card with the specified algorithm. |
protected java.lang.String |
getPINLabel(iaik.pkcs.pkcs11.Token token,
java.lang.String pintype)
Method that should return the label of the tokens virtual slot that is associated with the given pintype. |
protected java.lang.String |
getPrivateKeyLabel(java.lang.String keytype)
Method that should find the right key label given the keytype. |
java.lang.String[] |
getSupportedPINTypes()
Method that should return the tokens supported PIN types Either PINTYPE_ constants or customdefined labels |
void |
initToken(java.lang.String tokenlabel,
java.lang.String tokenserial,
java.lang.String[] pintypes,
java.lang.String[] pins,
java.lang.String[] puks)
The Setcos 431 cards are not ereasable so the have to be cleared in the same way as the clear method. |
protected boolean |
isInitialized(iaik.pkcs.pkcs11.Token token)
Method that should return true if the token is currently initialized. |
boolean |
isTokenSupported(iaik.pkcs.pkcs11.Token token)
Method used for knowing if an implementation supports the current token in process. |
void |
removeKey(java.lang.String pintype,
java.lang.String pin,
java.lang.String basicpin,
java.lang.String label)
Method removing a specified key from a card |
boolean |
requirePUKInDB()
Method determining if the token requires the PUK to be uploaded to DB prior to initialization This is mainly for tokens that cannot be reformatted. |
| 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, removeCertificate, removeObject, unblockPIN, unlockPIN |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SetCos431InstantEIDToken()
| Method Detail |
|---|
public boolean isTokenSupported(iaik.pkcs.pkcs11.Token token)
throws iaik.pkcs.pkcs11.TokenException
IToken
token - the current token inserted into the slot.
iaik.pkcs.pkcs11.TokenException - if a pkcs11 related problem occurspublic java.lang.String[] getSupportedPINTypes()
IToken
public void initToken(java.lang.String tokenlabel,
java.lang.String tokenserial,
java.lang.String[] pintypes,
java.lang.String[] pins,
java.lang.String[] puks)
throws OperationNotSupportedException,
iaik.pkcs.pkcs11.TokenException
tokenlabel - the label of the token, can be null if no token label should be set.tokenserial - the serial number that should be written to the card, only used if the card
supports the serial number to be set during initialization otherwise could null be used.pintypes - an array of PINTYPE_contants or custom label strings. Indicates which key that should have
which PIN and PUKpins - an array of pin codes used in the initialization, should be used
with the keytype array get hold of key to use.
be defined in the getKeyIndex type.puks - an array of puk codes for each PIN
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.
public void clearToken(java.lang.String[] pintypes,
java.lang.String[] puks)
throws OperationNotSupportedException,
iaik.pkcs.pkcs11.TokenException
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 stringspuks - optional parameter used by some cards with non-erasable filesystem and
needs the PUK code to erease some areas.
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.
protected java.lang.String getPrivateKeyLabel(java.lang.String keytype)
throws OperationNotSupportedException
BaseToken
getPrivateKeyLabel in class BaseTokenkeytype - the keytype to find
OperationNotSupportedException
protected java.lang.String getPINLabel(iaik.pkcs.pkcs11.Token token,
java.lang.String pintype)
throws OperationNotSupportedException,
iaik.pkcs.pkcs11.TokenException
BaseToken
getPINLabel in class BaseTokenOperationNotSupportedException
iaik.pkcs.pkcs11.TokenException
public void downloadKeyStore(java.lang.String keytype,
java.lang.String pintype,
java.lang.String pin,
java.lang.String certLabel,
java.security.KeyStore keyStore,
java.lang.String keyStorePasswd)
throws ObjectAlreadyExistsException,
OperationNotSupportedException,
iaik.pkcs.pkcs11.TokenException
IToken
downloadKeyStore in interface ITokendownloadKeyStore in class BaseTokenkeytype - one of the KEYTYPE_ constants or the label of the object for custom keyspintype - of the PIN needed to unlock the tokenpin - the pin to unlock (May not be required, then can null be used)certLabel - label the label used to mark the object on the token.keyStore - the java keystore to extract the keystore fromkeyStorePasswd - the passwordused to lock the keystore
ObjectAlreadyExistsException - if a certificate or key with the label already exists.
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.IToken.downloadKeyStore(String, String, String, String, KeyStore, String)
public void genKey(java.lang.String pintype,
java.lang.String pin,
java.lang.String basicpin,
java.lang.String keytype,
java.lang.String algorithm,
int keysize,
java.lang.String label)
throws ObjectAlreadyExistsException,
OperationNotSupportedException,
iaik.pkcs.pkcs11.TokenException
IToken
genKey in interface ITokengenKey in class BaseTokenpintype - one of the PINTYPE_ indicating the PIN that should protect the keypin - 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 keyskeytype - one of the KEYTYPE_ constants or the label of the object for custom keysalgorithm - one of the KEYALG_ constantskeysize - the size of the keylabel - a reference to the key to use.
ObjectAlreadyExistsException - if the keytype already exists.
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.IToken.genKey(String, String, String, String, String, int, String)
public void removeKey(java.lang.String pintype,
java.lang.String pin,
java.lang.String basicpin,
java.lang.String label)
throws OperationNotSupportedException,
iaik.pkcs.pkcs11.TokenException
IToken
removeKey in interface ITokenremoveKey in class BaseTokenpintype - of the PIN needed to unlock the tokenpin - 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 certificateslabel - of the key
OperationNotSupportedException - if this operation or some of it's parameters isn't supported
iaik.pkcs.pkcs11.TokenException - for other token related failures.IToken.removeKey(String, String, String, String)public boolean requirePUKInDB()
IToken
IToken.requirePUKInDB()
public java.lang.String generatePUK(java.lang.String pintype)
throws OperationNotSupportedException
IToken
OperationNotSupportedException - if this method isn't supported by this token.IToken.generatePUK(String)protected boolean isInitialized(iaik.pkcs.pkcs11.Token token)
BaseToken
isInitialized in class BaseToken
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||