org.globalplatform
Class GPSystem

java.lang.Object
  extended byorg.globalplatform.GPSystem

public class GPSystem
extends java.lang.Object

The GPSystem class exposes a subset of the behavior of the OPEN to the outside world. The OPEN implements and enforces a Card Issuer's security policy relating to these services. This OPEN class provides functionality at the same level as the JCRE, i.e. the "system" context with special privileges. This class is composed of static methods visible to all applets importing the globalplatform package.


Field Summary
static byte APPLICATION_INSTALLED
          The current applet context is in the Life Cycle State of INSTALLED (0x03).
static byte APPLICATION_LOCKED
          The current applet context is in the Life Cycle State of LOCKED (0x80).
static byte APPLICATION_SELECTABLE
          The current applet context is in the Life Cycle State of SELECTABLE (0x07).
static byte CARD_INITIALIZED
          The card is in the Life Cycle State of INITIALIZED (0x07).
static byte CARD_LOCKED
          The card is in the Life Cycle State of CARD_LOCKED (0x7F).
static byte CARD_OP_READY
          The card is in the Life Cycle State of OP_READY (0x01).
static byte CARD_SECURED
          The card is in the Life Cycle State of SECURED (0x0F).
static byte CARD_TERMINATED
          The card is in the Life Cycle State of TERMINATED (0xFF).
static byte CVM_GLOBAL_PIN
          Indicates that the CVM interface required is a Global PIN (0x11).
static byte FAMILY_CVM
          Indicates the family of the CVM Global Service Identifier (0x82).
static byte FAMILY_SECURE_CHANNEL
          Indicates the family of the Secure Channel Global Service Identifier (0x81).
static byte FAMILY_USSM
          Indicates the family of the USSM Global Service Identifier (0xA0).
static byte GLOBAL_SERVICE_IDENTIFIER
          Indicates the generic Global Service Identifier (0x80).
static byte SECURITY_DOMAIN_PERSONALIZED
          The Security Domain is in the Life Cycle State of PERSONALIZED (0x0F).
 
Constructor Summary
GPSystem()
           
 
Method Summary
static byte getCardContentState()
          This method returns the Life Cycle State of the current applet context.
static byte getCardState()
          This method returns the Life Cycle State of the card.
static CVM getCVM(byte bCVMIdentifier)
          This method returns a handle to the CVM interface.
static GPRegistryEntry getRegistryEntry(AID reqAID)
          This method returns a handle to the GPRegistryEntry interface.
static SecureChannel getSecureChannel()
          This method returns a handle to the SecureChannel interface.
static GlobalService getService(AID serverAID, short sServiceName)
          This method returns a handle to the GlobalService interface of a Global Service Application.
static boolean lockCard()
          This method locks the card.
static boolean setATRHistBytes(byte[] baBuffer, short sOffset, byte bLength)
          This method sets the historical bytes of the ATR (Answer To Reset) string.
static boolean setCardContentState(byte bState)
          This method sets the application specific Life Cycle State of the current applet context.
static boolean terminateCard()
          This method terminates the card.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

APPLICATION_INSTALLED

public static final byte APPLICATION_INSTALLED
The current applet context is in the Life Cycle State of INSTALLED (0x03).

Note:

See Also:
Constant Field Values

APPLICATION_SELECTABLE

public static final byte APPLICATION_SELECTABLE
The current applet context is in the Life Cycle State of SELECTABLE (0x07).

Note:

See Also:
Constant Field Values

SECURITY_DOMAIN_PERSONALIZED

public static final byte SECURITY_DOMAIN_PERSONALIZED
The Security Domain is in the Life Cycle State of PERSONALIZED (0x0F).

See Also:
Constant Field Values

CARD_OP_READY

public static final byte CARD_OP_READY
The card is in the Life Cycle State of OP_READY (0x01).

See Also:
Constant Field Values

CARD_INITIALIZED

public static final byte CARD_INITIALIZED
The card is in the Life Cycle State of INITIALIZED (0x07).

See Also:
Constant Field Values

CARD_SECURED

public static final byte CARD_SECURED
The card is in the Life Cycle State of SECURED (0x0F).

See Also:
Constant Field Values

CARD_LOCKED

public static final byte CARD_LOCKED
The card is in the Life Cycle State of CARD_LOCKED (0x7F).

See Also:
Constant Field Values

CARD_TERMINATED

public static final byte CARD_TERMINATED
The card is in the Life Cycle State of TERMINATED (0xFF).

See Also:
Constant Field Values

CVM_GLOBAL_PIN

public static final byte CVM_GLOBAL_PIN
Indicates that the CVM interface required is a Global PIN (0x11).

See Also:
Constant Field Values

APPLICATION_LOCKED

public static final byte APPLICATION_LOCKED
The current applet context is in the Life Cycle State of LOCKED (0x80).

See Also:
Constant Field Values

FAMILY_SECURE_CHANNEL

public static final byte FAMILY_SECURE_CHANNEL
Indicates the family of the Secure Channel Global Service Identifier (0x81).

See Also:
Constant Field Values

FAMILY_CVM

public static final byte FAMILY_CVM
Indicates the family of the CVM Global Service Identifier (0x82).

See Also:
Constant Field Values

FAMILY_USSM

public static final byte FAMILY_USSM
Indicates the family of the USSM Global Service Identifier (0xA0).

See Also:
Constant Field Values

GLOBAL_SERVICE_IDENTIFIER

public static final byte GLOBAL_SERVICE_IDENTIFIER
Indicates the generic Global Service Identifier (0x80).

See Also:
Constant Field Values
Constructor Detail

GPSystem

public GPSystem()
Method Detail

getCardContentState

public static byte getCardContentState()
This method returns the Life Cycle State of the current applet context.

Notes:

Returns:
the Life Cycle State of the current applet context.
See Also:
APPLICATION_INSTALLED, APPLICATION_SELECTABLE, SECURITY_DOMAIN_PERSONALIZED

getCardState

public static byte getCardState()
This method returns the Life Cycle State of the card.

Returns:
the Life Cycle State of the card
See Also:
CARD_OP_READY, CARD_INITIALIZED, CARD_SECURED, CARD_LOCKED, CARD_TERMINATED

getCVM

public static CVM getCVM(byte bCVMIdentifier)
This method returns a handle to the CVM interface.

Returns:
the CVM interface object reference.
See Also:
CVM_GLOBAL_PIN

getSecureChannel

public static SecureChannel getSecureChannel()
This method returns a handle to the SecureChannel interface.

Notes:

Returns:
the SecureChannel interface object reference.

lockCard

public static boolean lockCard()
This method locks the card.

Notes:

Returns:
true if card locked, false otherwise

terminateCard

public static boolean terminateCard()
This method terminates the card.

Notes:

Returns:
true if card terminated, false otherwise.

setATRHistBytes

public static boolean setATRHistBytes(byte[] baBuffer,
                                      short sOffset,
                                      byte bLength)
This method sets the historical bytes of the ATR (Answer To Reset) string. The sequence of bytes will be visible on a subsequent power-up or reset.

Notes:

Returns:
true if ATR bytes set, false otherwise.

setCardContentState

public static boolean setCardContentState(byte bState)
This method sets the application specific Life Cycle State of the current applet context. Application specific Life Cycle States range from 0x07 to 0x7F as long as the 3 low order bits are set.

Notes:

Returns:
true if the operation is successful, false otherwise.
See Also:
SECURITY_DOMAIN_PERSONALIZED

getRegistryEntry

public static GPRegistryEntry getRegistryEntry(AID reqAID)
This method returns a handle to the GPRegistryEntry interface.

Returns:
the GPRegistryEntry interface object reference.
See Also:
+--javacard.framework.AID

getService

public static GlobalService getService(AID serverAID,
                                       short sServiceName)
This method returns a handle to the GlobalService interface of a Global Service Application.

Returns:
the GlobalService interface object reference or null.
See Also:
+--javacard.framework.AID, GLOBAL_SERVICE_IDENTIFIER, FAMILY_CVM, FAMILY_SECURE_CHANNEL, FAMILY_USSM