|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.jc.JCApplet
com.ibm.jc.OPApplet
com.ibm.jc.SecurityDomain
com.ibm.jc.CardManager
This class implements the off-card behavior of the Global Platform Card Manager which incorporates the Global Platform Environment, the Issuer Security Domain and the Cardholder Verification Methods.
| Field Summary | |
static int |
CM_LOCKED
Card Manager life cycle state |
static int |
CVM_BLOCK
CVM change operation: transition to BLOCKED state |
static int |
CVM_FORMAT_ASCII
CVM encoding format ASCII |
static int |
CVM_FORMAT_BCD
CVM encoding format BCD |
static int |
CVM_FORMAT_HEX
CVM encoding format HEX |
static int |
CVM_UNBLOCK
CVM change operation: transition to ACTIVE state |
static byte[] |
daid
default card manager AID |
static int |
GET_ALL
Mode flag to get Applets and Security Domains |
static int |
GET_APPLETS
Mode flag to get Applets only |
static int |
GET_SECURITY_DOMAINS
Mode flag to get Security Domains only |
static int |
INITIALIZED
Card Manager life cycle state |
static int |
NOT_AVAILABLE
Card Manager life cycle state |
static int |
OP_READY
Card Manager life cycle state |
static int |
SECURED
Card Manager life cycle state |
static int |
TERMINATED
Card Manager life cycle state |
| Fields inherited from class com.ibm.jc.SecurityDomain |
LOAD_ALL, LOAD_COMP, LOAD_DEBUG, LOAD_RND |
| Fields inherited from class com.ibm.jc.OPApplet |
ADD_NEW_KEYSET, APDU_BIG_MAC, APDU_CLR, APDU_CRMAC, APDU_CRMAC_ENC, APDU_ENC, APDU_MAC, APDU_MAC_START, APDU_RMAC, APDU_SUPER_MAC, APPLICATION_LCD, BLOCKED, CARD_TERMINATE_PRIV, CM_LCD, CM_LOCK_PRIV, GS_FIRST_ALL, GS_FORMAT_1, GS_FORMAT_2, GS_NEXT, icv, IMP_SELECTABLE_PRIV, INSTALLED, K_dek, K_ea, K_m, K_rm, Kkek, LOAD_FILE_LCD, LOAD_FILE_MODULE_LCD, LOCKED, LOGICALLY_DELETED, macSize, MANDATED_DAP_PRIV, MODIFY_KEYSET, msgMode, NO_PRIVS, NO_SESSION, PERSONALIZED, PIN_CHANGE_PRIV, REPLACE_KEYSET, ricv, rmbuf, SCP_01_05, SCP_01_15, SCP_02_04, SCP_02_05, SCP_02_0A, SCP_02_0B, SCP_02_14, SCP_02_15, SCP_02_1A, SCP_02_1B, SCP_UNDEFINED, scpMode, SD_DAP_PRIV, SD_DELEGATE_PRIV, SD_PRIV, SELECTABLE, SESSION_AUTH, SESSION_OK, sessionMode, VOP_201, VOP_211, VOP_NONE |
| Fields inherited from class com.ibm.jc.JCApplet |
apdu |
| Constructor Summary | |
CardManager()
|
|
CardManager(JCApplet app)
Create the off-card representation of the Card Manager. |
|
CardManager(JCard card,
byte[] aid)
Create the off-card representation of the Card Manager. |
|
CardManager(JCard card,
byte[] aid,
int aidBeg,
int aidLen)
Create the off-card representation of the Card Manager. |
|
CardManager(JCard card,
byte[] aid,
int aidBeg,
int aidLen,
byte state)
Create the off-card representation of the Card Manager. |
|
| Method Summary | |
void |
changeUnblockPIN(int tries,
byte[] pin)
Open Platform 2.0.1' PIN CHANGE/UNBLOCK command. |
void |
cvmBlockUnblock(int operation)
This command allowes to block/unblock the CVM. |
void |
cvmUpdate(byte[] pin,
int pinOff,
int pinLen,
int format,
int tryLimit)
This command updates the CVM value and/or the CVM try limit. |
void |
flush()
Flush secure channel parametes, resets the session state and flushes off-card cache of registry information. |
java.lang.Object[] |
getApplets(int mode,
int format,
boolean queryCard)
Returns Applets and/or Security Domains listed in the card registry. |
byte[] |
getCardProdLifeCycle()
Returns the Card Manager production life cycle (CPLC) data as returned in the select FCI. |
byte[] |
getFciDiscretionaryData()
Returns the FCI Discretionary data as returned in the select FCI. |
LoadFile[] |
getLoadFiles(int format,
boolean queryCard)
Returns Load Files listed in the card registry. |
int |
getMaxBlockLen()
Returns the maximum block (APDU payload) length. |
int[] |
getOSInfo()
Reads the card production life cycle info from the card and returns operating system information. |
int |
getPrivileges()
The Card Manager has no privileges associated. |
byte[] |
getSDManagementData()
Returns the Security Domain Management data as returned in the select FCI. |
int |
getState()
Returns the current Card Manager life cycle state. |
byte[] |
select()
Select the Card Manager (parital select possible). |
byte[] |
setAID(byte[] id,
boolean onCard)
Sets the AID of the Card Manager. |
void |
setMaxBlockLen(int len)
Sets the maximum block (APDU payload) length. |
byte[] |
storeAID(byte[] id,
int off,
int len,
boolean onCard)
Sets the AID of the Card Manager. |
void |
update()
Updates the life cycle state and the AID of the Card Manager cached off-card. |
| Methods inherited from class com.ibm.jc.SecurityDomain |
delete, deleteKeyObject, deleteObject, generateReceipt, installForExtradition, installForInstall, installForInstallAndMakeSelectable, installForLoad, installForMakeSelectable, installForPersonalization, load, verifyReceipt |
| Methods inherited from class com.ibm.jc.OPApplet |
beginRMACSession, deleteKey, endRMACSession, externalAuthenticate, getData, getKey, getKeys, getMaxPayload, getSCP, getSecurityLevel, getSessionMode, getSessionState, getStatus, getStatus, initializeUpdate, initializeUpdate, putData, putKey, send, sendAPDU, setKey, setSCP, setSecurityLevel, setStatus, storeData, storeKeyset, storePKDAPKey |
| Methods inherited from class com.ibm.jc.JCApplet |
equals, getAID, getCard, getTerminal, setAID, setCard, setHeader |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NOT_AVAILABLE
public static final int OP_READY
public static final int INITIALIZED
public static final int SECURED
public static final int CM_LOCKED
public static final int TERMINATED
public static final int CVM_FORMAT_HEX
public static final int CVM_FORMAT_ASCII
public static final int CVM_FORMAT_BCD
public static final int CVM_BLOCK
public static final int CVM_UNBLOCK
public static final int GET_APPLETS
public static final int GET_SECURITY_DOMAINS
public static final int GET_ALL
public static final byte[] daid
| Constructor Detail |
public CardManager(JCard card,
byte[] aid,
int aidBeg,
int aidLen,
byte state)
card - the JavaCard on which this Card Manager resides on.aid - the buffer containing the AID of the Card Manager.aidBeg - offset into aid.aidLen - the length of the Card Manager AID. This value must be
in the range [5;16].state - the life cycle state of the Card Manager.NOT_AVAILABLE,
OP_READY,
INITIALIZED,
SECURED,
CM_LOCKED,
TERMINATED
public CardManager(JCard card,
byte[] aid,
int aidBeg,
int aidLen)
card - the JavaCard on which this Card Manager resides on.aid - the buffer containing the AID of the Card Manager.aidBeg - offset into aidaidLen - the length of the Card Manager AID. This value must be
in the range [5;16].
public CardManager(JCard card,
byte[] aid)
card - the JavaCard on which this Card Manager resides on.aid - the buffer containing the AID of the Card Manager.public CardManager(JCApplet app)
app - CardManager object.OPAppletpublic CardManager()
| Method Detail |
public int getPrivileges()
getPrivileges in class OPAppletOPApplet.NO_PRIVS,
OPApplet.SD_PRIV,
OPApplet.SD_DAP_PRIV,
OPApplet.SD_DELEGATE_PRIV,
OPApplet.MANDATED_DAP_PRIV,
OPApplet.CM_LOCK_PRIV,
OPApplet.CARD_TERMINATE_PRIV,
OPApplet.IMP_SELECTABLE_PRIV,
OPApplet.PIN_CHANGE_PRIVpublic int getMaxBlockLen()
public void setMaxBlockLen(int len)
len - desired max. block length (should be in the range 32-255).public byte[] select()
select in class OPAppletJCException - if invalid response.getFciDiscretionaryData(),
getSDManagementData(),
getCardProdLifeCycle(),
getMaxBlockLen()public void cvmBlockUnblock(int operation)
operation - indicates whether the CVM shall be block or unblocked.
JCException - if parameters are invalid or the command failed.CVM_BLOCK,
CVM_UNBLOCK
public void cvmUpdate(byte[] pin,
int pinOff,
int pinLen,
int format,
int tryLimit)
pin - array holding the CVM value. If the CVM value is not to be
updated, this parameter can be null.pinOff - the offset into pin.pinLen - the CVM length in the range of 4-12. If the format is
CVM_FORMAT_HEX or CVM_FORMAT_ASCII
this parameter indicates the number of CVM value bytes in
pin. If the format is CVM_FORMAT_BCD
this parameter indicates the number of nibbles within
pin representing the CVM value. In the latter case
the least significant nibble might be unused if the CVM length
is odd.format - the CVM encoding format (e.g. CVM_FORMAT_HEX).tryLimit - the desired CVM try limit in the range of 1-15.
If this value is zero the CVM state is set to INACTIVE.
If this value is negative, the CVM try limit is not
updated.
JCException - if parameters are invalid or the command failed.CVM_FORMAT_HEX,
CVM_FORMAT_ASCII,
CVM_FORMAT_BCD
public void changeUnblockPIN(int tries,
byte[] pin)
tries - Max. false retry limit in case of a PIN change.pin - New PIN value to be set (ASCII digits in the range 0x30-0x39).
If null the PIN is unblocked
and the parameters are ignored.
JCException - if PIN or session state is invalid.public void flush()
flush in class OPAppletpublic int[] getOSInfo()
public LoadFile[] getLoadFiles(int format,
boolean queryCard)
format - formatqueryCard - if false the info comes from
the off-card cache, otherwise the
card is consulted.
null if
the card is empty.
JCException - if any error occurs.
public java.lang.Object[] getApplets(int mode,
int format,
boolean queryCard)
mode - defines whether Applets, Security
Domains or both are to be returned.format - formatqueryCard - if false the info comes from
the off-card cache, otherwise the
card is consulted.
OPApplet,
SecurityDomain, or both (depending on the
mode). If the card is empty null is returned.
JCException - if parameters are invalid or a GET
STATUS command fails.GET_APPLETS,
GET_SECURITY_DOMAINS,
GET_ALLpublic byte[] getCardProdLifeCycle()
null if not available.public byte[] getFciDiscretionaryData()
null if not available.public byte[] getSDManagementData()
null if not available.public void update()
JCException - if any error occurs.getState(),
com.jc.JCApplet.getAIDpublic int getState()
update() to update the cache).
getState in class OPAppletNOT_AVAILABLE,
OP_READY,
INITIALIZED,
SECURED,
CM_LOCKED,
TERMINATED,
update()
public byte[] setAID(byte[] id,
boolean onCard)
id - array holding the new AID (array is not copied).
If null, the default AID is set.onCard - if true, the AID is modified off-card and on-card,
otherwise the AID is only modified off-card.
storeAID(byte[], int, int, boolean)
public byte[] storeAID(byte[] id,
int off,
int len,
boolean onCard)
id - array holding the new AID. If null,
the default AID is set.off - offset into id.len - length of the new AId.onCard - if true, the AID is modified off-card and on-card,
otherwise the AID is only modified off-card.
setAID(byte[], boolean)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||