|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object visa.openplatform.OPSystem
The OPSystem class exposes a subset of the behavior of the Card Manager to the outside world. It extends the functionality of the JCRE 2.1 API by providing card management services to applications. It implements and enforces a Card Issuer's security policies. This class provides the functionality of a runtime environment running at the JCRE ‘system’ (privileged) context. The details of the JCRE ‘system’ context implementation are left to the implementer. This class’s public interface is composed of static methods visible to all applets importing the openplatform package. This is a ‘singleton’ class (only one instance is created for the lifetime of the card).
Field Summary | |
static byte |
APPLET_BLOCKED
Application life cycle state indicating the application is BLOCKED. |
static byte |
APPLET_INSTALLED
Application life-cycle state indicating the application is INSTALLED. |
static byte |
APPLET_LOCKED
Application life-cycle state indicating the application is LOCKED. |
static byte |
APPLET_PERSONALIZED
Application life cycle state indicating the application is PERSONALIZED. |
static byte |
APPLET_SELECTABLE
Application life cycle state indicating the application is SELECTABLE. |
static byte |
CARD_INITIALIZED
Card Manager life cycle state indicating the Card Manager is INITIALIZED. |
static byte |
CARD_LOCKED
Card Manager life cycle state indicating the Card Manager is CM_LOCKED. |
static byte |
CARD_OP_READY
Card Manager life cycle state indicating the Card Manager is OP_READY. |
static byte |
CARD_SECURED
Card Manager life cycle state indicating the Card Manager is SECURED. |
static byte |
INITIALIZED
Deprecated. Use CARD_INITIALIZED |
static byte |
PACKAGE_LOADED
The executable load file life cycle state indicating the package is LOADED. |
Method Summary | |
static byte |
getCardContentState()
This method returns the life cycle state of the selected application. |
static byte |
getCardManagerState()
This method returns the current life cycle state for the Card Manager. |
static void |
getCPLCData(javacard.framework.APDU apdu,
short apdu_offset,
short cplc_offset,
short length)
This method returns the card's production life cycle data. |
static ProviderSecurityDomain |
getSecurityDomain()
This method returns the handle of the application’s associated Security Domain. |
static byte |
getTriesRemaining()
This method returns the PIN tries remaining for the Global PIN. |
static boolean |
lockCardManager()
This method allows an applet to lock the card. |
static boolean |
setATRHistBytes(byte[] buffer,
short bOffset,
byte bLength)
This method sets the historical bytes contained in the ATR (Answer To Reset). |
static boolean |
setCardContentState(byte state)
This is used by an application to transition its own life cycle state. |
static boolean |
setPin(javacard.framework.APDU apdu,
short offset)
This method is used to initialize the Card Global PIN. |
static boolean |
terminateCardManager()
This method allows an application to terminate the card. |
static boolean |
verifyPin(javacard.framework.APDU apdu,
short offset)
This method allows an application to check the validity of a PIN. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final byte APPLET_BLOCKED
public static final byte APPLET_PERSONALIZED
public static final byte APPLET_INSTALLED
public static final byte APPLET_SELECTABLE
public static final byte APPLET_LOCKED
public static final byte CARD_INITIALIZED
public static final byte INITIALIZED
CARD_INITIALIZED
public static final byte CARD_SECURED
public static final byte CARD_LOCKED
public static final byte CARD_OP_READY
public static final byte PACKAGE_LOADED
Method Detail |
public static byte getCardContentState()
APPLET_SELECTABLE
,
APPLET_PERSONALIZED
,
APPLET_BLOCKED
public static byte getCardManagerState()
CARD_INITIALIZED
,
CARD_OP_READY
,
CARD_SECURED
,
CARD_LOCKED
public static ProviderSecurityDomain getSecurityDomain()
public static byte getTriesRemaining()
public static boolean lockCardManager()
true
. The Card Manager
locates the AID of the selected application in the registry and
determines if the application has the required privilege.
true
if the CardManager locked, false
otherwise.public static boolean setATRHistBytes(byte[] buffer, short bOffset, byte bLength)
buffer
- Array containing the ATR historical bytes.bOffset
- Offset within the buffer where ATR historical bytes begin.bLength
- Length of the ATR historical bytes in the buffer.
true
if ATR bytes set, false
otherwise.public static boolean setCardContentState(byte state)
state
- transition to this state.
true
if the operation is successful,
false
otherwise.public static boolean setPin(javacard.framework.APDU apdu, short offset)
true
, otherwise false
.
apdu
- APDU objectoffset
- short Offset within an APDU buffer
true
if the operation is successful,
false
otherwise.public static boolean terminateCardManager()
true
,
otherwise false
.
true
if the operation is successful,
false
otherwise.public static boolean verifyPin(javacard.framework.APDU apdu, short offset)
true
if the supplied PIN matches the Card Global
PIN, and false
otherwise.public static void getCPLCData(javacard.framework.APDU apdu, short apdu_offset, short cplc_offset, short length)
apdu
- APDU objectapdu_offset
- Offset within an APDU buffercplc_offset
- Offset within the CPLC bufferlength
- length of the data to be placed into the buffer
javacard.framework.CardRuntimeException
- if decryption fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |