├── GP-Specification-License-Agreement.pdf ├── README.md ├── org.globalplatform-1.0 ├── Readme.txt ├── exports │ └── org │ │ └── globalplatform │ │ └── javacard │ │ └── globalplatform.exp └── gpapi-globalplatform.jar ├── org.globalplatform-1.1 ├── Readme.txt ├── exports │ └── org │ │ └── globalplatform │ │ └── javacard │ │ └── globalplatform.exp └── gpapi-globalplatform.jar ├── org.globalplatform-1.2 ├── Readme.txt ├── exports │ └── org │ │ └── globalplatform │ │ └── javacard │ │ └── globalplatform.exp └── gpapi-globalplatform.jar ├── org.globalplatform-1.3 ├── exports │ └── org │ │ └── globalplatform │ │ └── javacard │ │ └── globalplatform.exp └── gpapi-globalplatform.jar ├── org.globalplatform-1.4 ├── Readme.txt └── org │ └── globalplatform │ ├── Application.java │ ├── Authority.java │ ├── CVM.java │ ├── GPRegistryEntry.java │ ├── GPSystem.java │ ├── GlobalService.java │ ├── HTTPAdministration.java │ ├── HTTPReportListener.java │ ├── Personalization.java │ ├── SecureChannel.java │ ├── SecureChannelx.java │ ├── SecureChannelx2.java │ ├── contactless │ ├── CLApplet.java │ ├── CLAppletEvent.java │ ├── CRELApplication.java │ ├── CRSApplication.java │ ├── GPCLRegistryEntry.java │ ├── GPCLSystem.java │ ├── javacard │ │ └── contactless.exp │ └── package-info.java │ ├── javacard │ └── globalplatform.exp │ └── package-info.java ├── org.globalplatform-1.5 ├── Readme.txt ├── exports │ └── org │ │ └── globalplatform │ │ └── javacard │ │ └── globalplatform.exp └── gpapi-globalplatform.jar ├── org.globalplatform-1.6 ├── README.TXT ├── exports │ └── org │ │ └── globalplatform │ │ └── javacard │ │ └── globalplatform.exp └── gpapi-globalplatform.jar ├── org.globalplatform-1.7 ├── README.TXT ├── exports │ └── org │ │ └── globalplatform │ │ └── javacard │ │ └── globalplatform.exp └── gpapi-globalplatform.jar ├── org.globalplatform.contactless-1.0 ├── Readme.txt ├── exports │ └── org │ │ └── globalplatform │ │ └── contactless │ │ └── javacard │ │ └── contactless.exp └── gpapi-contactless.jar ├── org.globalplatform.contactless-1.1 ├── README.TXT ├── exports │ └── org │ │ └── globalplatform │ │ └── contactless │ │ └── javacard │ │ └── contactless.exp └── gpapi-contactless.jar ├── org.globalplatform.contactless-1.2 ├── README.TXT ├── exports │ └── org │ │ └── globalplatform │ │ └── contactless │ │ └── javacard │ │ └── contactless.exp └── gpapi-contactless.jar ├── org.globalplatform.contactless-1.3 ├── README.TXT ├── exports │ └── org │ │ └── globalplatform │ │ └── contactless │ │ └── javacard │ │ └── contactless.exp └── gpapi-contactless.jar ├── org.globalplatform.contactless-1.4 ├── README.TXT ├── exports │ └── org │ │ └── globalplatform │ │ └── contactless │ │ └── javacard │ │ └── contactless.exp └── gpapi-contactless.jar ├── org.globalplatform.filesystem-1.0 ├── exports │ └── org │ │ └── globalplatform │ │ └── filesystem │ │ └── javacard │ │ └── filesystem.exp └── gpapi-filesystem.jar ├── org.globalplatform.privacy-1.0 ├── exports │ └── org │ │ └── globalplatform │ │ └── privacy │ │ └── javacard │ │ └── privacy.exp └── gpapi-privacy.jar ├── org.globalplatform.securechannel-1.1 ├── exports │ └── org │ │ └── globalplatform │ │ └── securechannel │ │ └── javacard │ │ └── securechannel.exp └── gpapi-scp.jar ├── org.globalplatform.securechannel.provider-1.1 ├── exports │ └── org │ │ └── globalplatform │ │ └── provider │ │ └── javacard │ │ └── provider.exp └── gpapi-scp-provider.jar ├── org.globalplatform.upgrade-1.0 ├── README.TXT ├── exports │ └── org │ │ └── globalplatform │ │ └── upgrade │ │ └── javacard │ │ └── upgrade.exp └── gpapi-upgrade.jar └── org.globalplatform.upgrade-1.1 ├── README.TXT ├── exports └── org │ └── globalplatform │ └── upgrade │ └── javacard │ └── upgrade.exp └── gpapi-upgrade.jar /GP-Specification-License-Agreement.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/GP-Specification-License-Agreement.pdf -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Export files for GlobalPlatform APIs 2 | 3 | The GlobalPlatform APIs are JavaCard extensions specified by various [GlobalPlatform](https://globalplatform.org/) specifications. 4 | 5 | This repository contains the export files for all versions of the various APIs. 6 | 7 | It has been created as a dependency submodule for packages using these APIs. 8 | 9 | ### License 10 | 11 | The files distributed here are the intellectual property of GlobalPlatform. 12 | 13 | They may be used only as per the provided [license agreement](GP-Specification-License-Agreement.pdf). 14 | 15 | We redistribute these files as they are a necessary component for building applications using GlobalPlatform APIs. 16 | 17 | ### Version Table 18 | 19 | The following table might give an indication as to which version of respective APIs you need. 20 | 21 | | Version | Released | Features | GP API | CL API | UP API | 22 | | ------- | ------------- | -------------------------------------------------------- | ------ | ------- | ------- | 23 | | 2.3.1 | March 2018 | SCP02 deprecated | 1.6 | 1.2/1.3 | 1.0/1.1 | 24 | | 2.3 | October 2015 | Introduction of software upgrade mechanism | 1.6 | 1.2/1.3 | 1.0/1.1 | 25 | | 2.2.1 | January 2011 | Introduction of confidential card content management | 1.5 | 1.1/1.2 | | 26 | | 2.2+C | February 2010 | New amendment C: Contactless services and API | 1.4 | 1.0 | | 27 | | 2.2+B | June 2009 | New amendment B: Application management via HTTP | 1.3 | | | 28 | | 2.2+A | January 2009 | New amendment A: Errata and precisions | 1.2 | | | 29 | | 2.2 | March 2006 | Applet personalization, Feature lockdown, Memory limits | 1.1 | | | 30 | | 2.1.1 | March 2003 | Logical channels, Improved SCP cryptography | 1.0 | | | 31 | | 2.1 | June 2001 | GP API, GP version recognition, ExM listing in registry | 1.0 | | | 32 | | 2.0.1 | April 2000 | Uses the old VISA OpenPlatform on-card API | | | | 33 | 34 | -------------------------------------------------------------------------------- /org.globalplatform-1.0/Readme.txt: -------------------------------------------------------------------------------- 1 | March 7, 2002 2 | 3 | Modified the globalplatform.opt to reflect the newly assigned GlobalPlatform AID i.e. 4 | 0xA0:0x00:0x00:0x01:051:0x00 5 | Used my own environment to generate new .exp and .jca file. 6 | Manually modified globalplatform_exp.tex to reflect new AID. 7 | 8 | October 9, 2001 9 | 10 | Modified the source code so that the CVM interface is now part of the package 11 | org.globalpatform. Removed the package org.globalplatformx 12 | Changed the AID so that it is now 'GPPKGEXP01' correctly in hex. (This is still 13 | temporary). 14 | Introduced a Makefile with targets 'classes', 'exportfile', and 'docs'. 15 | 16 | 17 | ---------------- 18 | 19 | 20 | August 21, 2001 21 | 22 | This zip contains the files used to generate template export files for Open Platform 2.1. 23 | The AID used are of the form 'GPPKGEXP01' and 'GPPKGEXP02' 24 | 25 | AID used Export File 26 | 0x71:0x80:0x80:0x75:0x71:0x69:0x88:0x80:0x48:0x49 org\globalplatform\javacard\globalplatform.exp 27 | 0x71:0x80:0x80:0x75:0x71:0x69:0x88:0x80:0x48:0x4A org\globalplatformx\javacard\globalplatformx.exp 28 | 29 | I have also included the original java files and the config files used for the converter v1.1. (.opt extensions) 30 | converter -config org\globalplatform\globalplatform.opt 31 | converter -config org\globalplatformx\globalplatformx.opt 32 | -------------------------------------------------------------------------------- /org.globalplatform-1.0/exports/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.0/exports/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.0/gpapi-globalplatform.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.0/gpapi-globalplatform.jar -------------------------------------------------------------------------------- /org.globalplatform-1.1/Readme.txt: -------------------------------------------------------------------------------- 1 | March 24, 2006 2 | 3 | New export file is generated with GlobalPlatform AID i.e. 4 | 0xA0:0x00:0x00:0x01:051:0x00 5 | Version 1.1 6 | used -exportmap with org.globalplatform export file version 1.0 7 | Used my own environment to generate .exp and .jca file: 8 | 9 | java_card_kit-2_2_1 10 | j2sdk1.4.1_02 11 | 12 | -------------------------------------------------------------------------------- /org.globalplatform-1.1/exports/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.1/exports/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.1/gpapi-globalplatform.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.1/gpapi-globalplatform.jar -------------------------------------------------------------------------------- /org.globalplatform-1.2/Readme.txt: -------------------------------------------------------------------------------- 1 | January 16, 2009 2 | 3 | New export file is generated with GlobalPlatform AID i.e. 4 | 0xA0:0x00:0x00:0x01:051:0x00 5 | Version 1.2 6 | used -exportmap with org.globalplatform export file version 1.1 7 | Used my own environment to generate .exp: 8 | 9 | java_card_kit-2_2_1 10 | j2sdk1.4.1_02 11 | 12 | -------------------------------------------------------------------------------- /org.globalplatform-1.2/exports/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.2/exports/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.2/gpapi-globalplatform.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.2/gpapi-globalplatform.jar -------------------------------------------------------------------------------- /org.globalplatform-1.3/exports/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.3/exports/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.3/gpapi-globalplatform.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.3/gpapi-globalplatform.jar -------------------------------------------------------------------------------- /org.globalplatform-1.4/Readme.txt: -------------------------------------------------------------------------------- 1 | March, 2010 2 | 3 | Export file for package 'org.globalplatform' is generated with 4 | AID: 0xA0:0x00:0x00:0x01:051:0x00 5 | Version: 1.4 6 | Backward Compatibility: Version 1.3 7 | 8 | Export file for package 'org.globalplatform.contactless' is generated with 9 | AID: 0xA0:0x00:0x00:0x01:051:0x02 10 | Version: 1.0 11 | Backward Compatibility: N/A 12 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/Application.java: -------------------------------------------------------------------------------- 1 | 2 | package org.globalplatform; 3 | 4 | import javacard.framework.Shareable; 5 | 6 | /** 7 | * This defines the interface that represents an applet method accessible through the OPEN to 8 | * the application's associated Security Domain. This interface must be implemented by the Applet 9 | * class that will use the additional functionality allowing a Security Domain to pass data to the 10 | * applet. 11 | */ 12 | 13 | public interface Application extends Shareable 14 | { 15 | 16 | /** 17 | * This method processes application specific data received from another entity on the card. 18 | * If this other entity is the Application's associated Security Domain, this data is the 19 | * APDU buffer. 20 | *

Notes:

33 | * @param baBuffer the source byte array containing the data expected by the applet. This buffer must be global. 34 | * @param sOffset starting offset of data within source byte array. 35 | * @param sLength length of data. 36 | */ 37 | public abstract void processData(byte[] baBuffer, short sOffset, short sLength); 38 | 39 | } 40 | 41 | 42 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/Authority.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/Authority.java -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/CVM.java: -------------------------------------------------------------------------------- 1 | 2 | package org.globalplatform; 3 | 4 | import javacard.framework.*; 5 | 6 | /** 7 | *This defines the interface of a Global Services Application implementing one or more Cardholder Verification 8 | *Methods. This class offers basic Cardholder Verification Method services (e.g. CVM verification, CVM state 9 | *interrogation) to any of the Applications present on the card, while some of the services (e.g. unblock CVM, change 10 | *CVM value) are restricted to Applications with the privilege to change the CVM values. Prior to using this interface, 11 | *an Application is required to obtain a handle to the CVM services. The CVM application shall expose the 12 | *GlobalService interface object(s) through applet.getShareableInterfaceObject() according to this specification. 13 | */ 14 | 15 | public interface CVM extends Shareable 16 | { 17 | 18 | /** 19 | * The CVM value comparison was successful. 20 | */ 21 | public static final short CVM_SUCCESS = 0; 22 | 23 | /** 24 | * The CVM value comparison failed. 25 | */ 26 | public static final short CVM_FAILURE = -1; 27 | 28 | /** 29 | * The CVM value is formatted as ASCII bytes. 30 | *

Note:

34 | */ 35 | public static final byte FORMAT_ASCII = (byte) 0x01; 36 | 37 | /** 38 | * The CVM value is formatted as numerical digits, coded on a nibble (4 bits) and left justified. 39 | *

Note:

45 | */ 46 | public static final byte FORMAT_BCD = (byte) 0x02; 47 | 48 | /** 49 | * The CVM value is formatted as hexadecimal (binary) data. 50 | *

Note:

54 | */ 55 | public static final byte FORMAT_HEX = (byte) 0x03; 56 | 57 | /** 58 | * This method indicates whether the CVM is present and activated. 59 | * If active the CVM could be in any one of the following states: ACTIVE, INVALID_SUBMISSION, 60 | * VALIDATED or BLOCKED. 61 | * @return true if the CVM state is (at least) ACTIVE, false otherwise. 62 | */ 63 | public boolean isActive(); 64 | 65 | /** 66 | * This method indicates whether an attempt has been made to compare the CVM value. 67 | *

Note:

71 | * @return true if the CVM state is (at least) SUBMITTED, false otherwise. 72 | */ 73 | public boolean isSubmitted(); 74 | 75 | /** 76 | * This method indicates whether a successful comparison of the CVM value has occurred (CVM state 77 | * of VALIDATED). 78 | * @return true if the CVM state is VALIDATED, false otherwise. 79 | */ 80 | public boolean isVerified(); 81 | 82 | /** 83 | * This method indicates whether the CVM is currently BLOCKED. 84 | * @return true if the CVM state is BLOCKED, false otherwise. 85 | */ 86 | public boolean isBlocked(); 87 | 88 | /** 89 | * This method returns the number of tries remaining for the CVM. 90 | * This indicates the number of times the CVM value can be incorrectly presented prior 91 | * to the CVM reaching the state of BLOCKED. 92 | * @return Tries remaining. 93 | */ 94 | public byte getTriesRemaining(); 95 | 96 | /** 97 | * This method changes the CVM value. 98 | *

Notes:

109 | *

110 | * @param baBuffer the source byte array containing the CVM value. This buffer must be global. 111 | * @param sOffset the offset of the CVM value within source byte array. 112 | * @param bLength the length of the CVM value. 113 | * @param bFormat the format of the CVM value. 114 | * @return true if the CVM value was changed, false otherwise. 115 | */ 116 | public boolean update(byte[] baBuffer, short sOffset, byte bLength, byte bFormat); 117 | 118 | /** 119 | * This method resets the CVM state to ACTIVE. 120 | *

Notes:

124 | *

125 | * @return true if the CVM state was reset, false otherwise. 126 | */ 127 | public boolean resetState(); 128 | 129 | /** 130 | * This method sets the CVM state to BLOCKED. 131 | *

Notes:

134 | *

135 | * @return true if the CVM state was set to BLOCKED, false otherwise. 136 | */ 137 | public boolean blockState(); 138 | 139 | /** 140 | * This method resets the CVM state from BLOCKED to ACTIVE. 141 | *

Notes:

146 | *

147 | * @return true if the CVM state was reset to ACTIVE, false otherwise. 148 | */ 149 | public boolean resetAndUnblockState(); 150 | 151 | /** 152 | * This method sets the maximum number of tries for the CVM. 153 | *

Notes:

161 | *

162 | * @param bTryLimit the maximum number of tries for the CVM. 163 | * @return true if the maximum number of tries was set, false otherwise. 164 | */ 165 | public boolean setTryLimit(byte bTryLimit); 166 | 167 | /** 168 | * This method compares the stored CVM value with the one passed as parameter. 169 | *

Notes:

195 | *

196 | * @param baBuffer the source byte array containing the submitted CVM value. This buffer must be global. 197 | * @param sOffset the offset of the submitted CVM value within source byte array. 198 | * @param bLength the length of the submitted CVM value. 199 | * @param bFormat the format of the submitted CVM value. 200 | * @return value indicating whether the comparison was successful or not. Values other than CVM_SUCCESS (0) or 201 | * CVM_FAILURE (-1) are Reserved for Future Use. 202 | */ 203 | public short verify(byte[] baBuffer, short sOffset, byte bLength, byte bFormat); 204 | } 205 | 206 | 207 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/GPRegistryEntry.java: -------------------------------------------------------------------------------- 1 | 2 | package org.globalplatform; 3 | 4 | import javacard.framework.*; 5 | 6 | /** 7 | * This defines the interface corresponding to the GPRegistryEntry of a single Application. 8 | * The Global Service Application uses this interface to check the validity of the request presented 9 | * by an on-card entity. 10 | * Prior to using this interface, an Application is required to obtain a handle to the GPRegistryEntry of an 11 | * Application by invoking the GPSystem.getRegistryEntry() method. 12 | * 13 | */ 14 | 15 | public interface GPRegistryEntry extends Shareable 16 | { 17 | 18 | /** 19 | * Privilege indicating Authorized Management (0x09). 20 | */ 21 | public static final byte PRIVILEGE_AUTHORIZED_MANAGEMENT = (byte) 0x09; 22 | 23 | /** 24 | * Privilege indicating Card Lock (0x03). 25 | */ 26 | public static final byte PRIVILEGE_CARD_LOCK = (byte) 0x03; 27 | 28 | /** 29 | * Privilege indicating Card Reset (0x05). 30 | */ 31 | public static final byte PRIVILEGE_CARD_RESET = (byte) 0x05; 32 | 33 | /** 34 | * Privilege indicating Card Terminate (0x04). 35 | */ 36 | public static final byte PRIVILEGE_CARD_TERMINATE = (byte) 0x04; 37 | 38 | /** 39 | * Privilege indicating CVM Management (0x06). 40 | */ 41 | public static final byte PRIVILEGE_CVM_MANAGEMENT = (byte) 0x06; 42 | 43 | /** 44 | * Privilege indicating DAP verification (0x01). 45 | */ 46 | public static final byte PRIVILEGE_DAP_VERIFICATION = (byte) 0x01; 47 | 48 | /** 49 | * Privilege indicating Delegated Management (0x02). 50 | */ 51 | public static final byte PRIVILEGE_DELEGATED_MANAGEMENT = (byte) 0x02; 52 | 53 | /** 54 | * Privilege indicating Final Application (0x0E). 55 | */ 56 | public static final byte PRIVILEGE_FINAL_APPLICATION = (byte) 0x0E; 57 | 58 | /** 59 | * Privilege indicating Global Delete (0x0B). 60 | */ 61 | public static final byte PRIVILEGE_GLOBAL_DELETE = (byte) 0x0B; 62 | 63 | /** 64 | * Privilege indicating Global Lock (0x0C). 65 | */ 66 | public static final byte PRIVILEGE_GLOBAL_LOCK = (byte) 0x0C; 67 | 68 | /** 69 | * Privilege indicating Global Registry (0x0D). 70 | */ 71 | public static final byte PRIVILEGE_GLOBAL_REGISTRY = (byte) 0x0D; 72 | 73 | /** 74 | * Privilege indicating Global Service (0x0F). 75 | */ 76 | public static final byte PRIVILEGE_GLOBAL_SERVICE = (byte) 0x0F; 77 | 78 | /** 79 | * Privilege indicating Mandated DAP verification privilege (0x07). 80 | */ 81 | public static final byte PRIVILEGE_MANDATED_DAP = (byte) 0x07; 82 | 83 | /** 84 | * Privilege indicating Receipt Generation (0x10). 85 | */ 86 | public static final byte PRIVILEGE_RECEIPT_GENERATION = (byte) 0x10; 87 | 88 | /** 89 | * Privilege indicating application is a Security Domain (0x00). 90 | */ 91 | public static final byte PRIVILEGE_SECURITY_DOMAIN = (byte) 0x00; 92 | 93 | /** 94 | * Privilege indicating Token Verification (0x0A). 95 | */ 96 | public static final byte PRIVILEGE_TOKEN_VERIFICATION = (byte) 0x0A; 97 | 98 | /** 99 | * Privilege indicating Trusted Path (0x08). 100 | */ 101 | public static final byte PRIVILEGE_TRUSTED_PATH = (byte) 0x08; 102 | /** 103 | * Privilege indicating Ciphered Load File Data Block (0x11). 104 | */ 105 | public static final byte PRIVILEGE_CIPHERED_LOAD_FILE_DATA_BLOCK = (byte) 0x11; 106 | 107 | /** 108 | * This method allows a Global Services Application (e.g. a CVM Application) to deregister a service name. 109 | *

Notes:

114 | * @param sServiceName the unique service name to deregister. 115 | * @exception ISOException with the following reason code: 116 | *
  • ISO7816.SW_CONDITIONS_NOT_SATISFIED 117 | */ 118 | public void deregisterService(short sServiceName) throws ISOException; 119 | 120 | /** 121 | * This method returns the Application's AID registered in the current GlobalPlatform Registry's entry. 122 | *

    Notes:

    127 | * @return the AID object. 128 | */ 129 | public AID getAID(); 130 | 131 | /** 132 | * This method returns all the Privileges bytes registered in the current GlobalPlatform registry entry. 133 | * @param baBuffer The byte array where Privileges bytes are to be stored. 134 | * @param sOffset The offset in baBuffer at which to begin the Privileges bytes. 135 | * @return sOffset + Length of the Privileges. 136 | * @exception ArrayIndexOutOfBoundsException
  • if storing the Privileges bytes would 137 | * cause access outside array bounds or the sOffset is negative. 138 | */ 139 | public short getPrivileges(byte[] baBuffer, short sOffset) throws ArrayIndexOutOfBoundsException; 140 | 141 | /** 142 | * This method returns the Life Cycle State registered in the current GlobalPlatform Registry entry. 143 | * @return The Life Cycle State as defined in section 11.11. 144 | */ 145 | public byte getState(); 146 | 147 | /** 148 | * This method allows to verify if the entity whose AID is provided in the input parameters is registered 149 | * as the associated Security Domain of this GPRegistryEntry. 150 | *

    Notes:

    154 | * @param SDAID object of the investigated Security Domain. 155 | * @return True if the GP Registry references the Security Domain as being associated with this GPRegistryEntry, or 156 | * False otherwise 157 | */ 158 | public boolean isAssociated(AID SDAID); 159 | 160 | /** 161 | * This method allows an Application (e.g. a CVM Application) to verify if a given Privilege is registered 162 | * in this GPRegistryEntry (e.g. check the CVM Management privilege of another Application invoking 163 | * the CVM.update() method). 164 | * @param bPrivilege the privilege number to verify, as defined in Table 6-1. 165 | * @return True if at least the referenced Privilege is registered in the GP Registry entry, or 166 | * False if the referenced Privilege is not registered in the GP Registry entry. 167 | */ 168 | public boolean isPrivileged(byte bPrivilege); 169 | 170 | /** 171 | * This method allows a Global Services Application (e.g. a CVM Application) to register a unique service 172 | * identifier within the GlobalPlatform Registry. 173 | *

    Notes:

    181 | * @param sServiceName the unique service name to register. 182 | * @exception ISOException with the following reason code: 183 | *
  • ISO7816.SW_CONDITIONS_NOT_SATISFIED 184 | */ 185 | public void registerService(short sServiceName) throws ISOException; 186 | 187 | /** 188 | * This method allows the Life Cycle state of this GPRegistryEntry to be transitioned to the 189 | * requested target state. 190 | *

    Notes:

    199 | * @param bState the target state for this GPRegistryEntry. 200 | * @return True if the transition is successful, or 201 | * False otherwise. 202 | */ 203 | public boolean setState(byte bState); 204 | } 205 | 206 | 207 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/GPSystem.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/GPSystem.java -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/GlobalService.java: -------------------------------------------------------------------------------- 1 | 2 | package org.globalplatform; 3 | 4 | import javacard.framework.*; 5 | 6 | /** 7 | * This defines the interface for requesting a Global Services Application to provide its actual service 8 | * interface. The Global Services Application uses this interface to check the validity of the request 9 | * presented by an on-card entity. 10 | * Prior to using this interface, an Application is required to obtain a handle to the Global Services 11 | * Application by invoking the GPSystem.getService() method. 12 | * 13 | */ 14 | 15 | public interface GlobalService extends Shareable 16 | { 17 | 18 | /** 19 | * Key Access indicating key may be used by the Security Domain and any associated application (0x00). 20 | */ 21 | public static final byte KEY_ACCESS_ANY = (byte) 0x00; 22 | 23 | /** 24 | * Key Access indicating key may be used by the Security Domain but not by any associated 25 | * application (0x01). 26 | */ 27 | public static final byte KEY_ACCESS_SECURITY_DOMAIN = (byte) 0x01; 28 | 29 | /** 30 | * Key Access indicating key may be used by any associated application but not by the 31 | * Security Domain (0x02). 32 | */ 33 | public static final byte KEY_ACCESS_APPLICATION = (byte) 0x02; 34 | 35 | /** 36 | * Key type indicating AES (0x88). 37 | */ 38 | public static final byte KEY_TYPE_AES = (byte) 0x88; 39 | 40 | /** 41 | * Key type indicating Triple DES reserved for specific implementations (0x81). 42 | */ 43 | public static final byte KEY_TYPE_3DES = (byte) 0x81; 44 | 45 | /** 46 | * Key type indicating Triple DES in CBC mode (0x82). 47 | */ 48 | public static final byte KEY_TYPE_3DES_CBC = (byte) 0x82; 49 | 50 | /** 51 | * Key type indicating DES with ECB/CBC implicitly known (0x80). 52 | */ 53 | public static final byte KEY_TYPE_DES = (byte) 0x80; 54 | 55 | /** 56 | * Key type indicating DES in CBC mode (0x84). 57 | */ 58 | public static final byte KEY_TYPE_DES_CBC = (byte) 0x84; 59 | 60 | /** 61 | * Key type indicating DES in ECB mode (0x83). 62 | */ 63 | public static final byte KEY_TYPE_DES_ECB = (byte) 0x83; 64 | 65 | /** 66 | * Key type indicating extended key format (0xFF). 67 | */ 68 | public static final byte KEY_TYPE_EXTENDED = (byte) 0xFF; 69 | 70 | /** 71 | * Key type indicating HMAC SHA1, length of HMAC implicitly known (0x90). 72 | */ 73 | public static final byte KEY_TYPE_HMAC_SHA1 = (byte) 0x90; 74 | 75 | /** 76 | * Key type indicating HMAC SHA1, length of HMAC is 160 bits (0x91). 77 | */ 78 | public static final byte KEY_TYPE_HMAC_SHA1_160 = (byte) 0x91; 79 | 80 | /** 81 | * Key type indicating RSA Private Key Chinese Remainder p component (0xA4). 82 | */ 83 | public static final byte KEY_TYPE_RSA_PRIVATE_CRT_P = (byte) 0xA4; 84 | 85 | /** 86 | * Key type indicating RSA Private Key Chinese Remainder q component (0xA5). 87 | */ 88 | public static final byte KEY_TYPE_RSA_PRIVATE_CRT_Q = (byte) 0xA5; 89 | 90 | /** 91 | * Key type indicating RSA Private Key Chinese Remainder pq component (0xA6). 92 | */ 93 | public static final byte KEY_TYPE_RSA_PRIVATE_CRT_PQ = (byte) 0xA6; 94 | 95 | /** 96 | * Key type indicating RSA Private Key Chinese Remainder dp1 component (0xA7). 97 | */ 98 | public static final byte KEY_TYPE_RSA_PRIVATE_CRT_DP1 = (byte) 0xA7; 99 | 100 | /** 101 | * Key type indicating RSA Private Key Chinese Remainder dq1 component (0xA8). 102 | */ 103 | public static final byte KEY_TYPE_RSA_PRIVATE_CRT_DQ1 = (byte) 0xA8; 104 | 105 | /** 106 | * Key type indicating RSA Private exponent (0xA3). 107 | */ 108 | public static final byte KEY_TYPE_RSA_PRIVATE_EXPONENT = (byte) 0xA3; 109 | 110 | /** 111 | * Key type indicating RSA Private Key modulus (0xA2). 112 | */ 113 | public static final byte KEY_TYPE_RSA_PRIVATE_MODULUS = (byte) 0xA2; 114 | 115 | /** 116 | * Key type indicating RSA Public Key exponent (0xA0). 117 | */ 118 | public static final byte KEY_TYPE_RSA_PUBLIC_EXPONENT = (byte) 0xA0; 119 | 120 | /** 121 | * Key type indicating RSA Public Key modulus (0xA1). 122 | */ 123 | public static final byte KEY_TYPE_RSA_PUBLIC_MODULUS = (byte) 0xA1; 124 | 125 | /** 126 | * Key usage indicating computation and decipherment (0x40). 127 | */ 128 | public static final byte KEY_USAGE_COMPUTATION_DECIPHERMENT = (byte) 0x40; 129 | 130 | /** 131 | * Key usage indicating sensitive data confidentiality (0x08). 132 | */ 133 | public static final byte KEY_USAGE_CONFIDENTIALITY = (byte) 0x08; 134 | 135 | /** 136 | * Key usage indicating cryptographic authorization (0x01). 137 | */ 138 | public static final byte KEY_USAGE_CRYPTOGRAPHIC_AUTHORIZATION = (byte) 0x01; 139 | 140 | /** 141 | * Key usage indicating cryptographic checksum e.g. MAC (0x04). 142 | */ 143 | public static final byte KEY_USAGE_CRYPTOGRAPHIC_CHECKSUM = (byte) 0x04; 144 | 145 | /** 146 | * Key usage indicating Digital Signature (0x02). 147 | */ 148 | public static final byte KEY_USAGE_DIGITAL_SIGNATURE = (byte) 0x02; 149 | 150 | /** 151 | * Key usage indicating Secure Messaging in command data field (0x10). 152 | */ 153 | public static final byte KEY_USAGE_SM_COMMAND = (byte) 0x10; 154 | 155 | /** 156 | * Key usage indicating Secure Messaging in response data field (0x20). 157 | */ 158 | public static final byte KEY_USAGE_SM_RESPONSE = (byte) 0x20; 159 | 160 | /** 161 | * Key usage indicating verification and encipherment (0x80). 162 | */ 163 | public static final byte KEY_USAGE_VERIFICATION_ENCIPHERMENT = (byte) 0x80; 164 | 165 | /** 166 | * This method returns a handle to the requested service interface of a Global Services Application. 167 | *

    Note:

    177 | * @param clientRegistryEntry the GP Registry entry reference of the requesting on-card entity. 178 | * @param sServiceName the requested service name. 179 | * @param baBuffer the source byte array containing additional parameters of the service request. 180 | * @param sOffset offset of the additional request parameters within the source byte array. 181 | * @param sLength length of the additional request parameters. 182 | * @return the specific service interface reference or null. 183 | * @exception ISOException with the following reason codes: 184 | *
  • ISO7816.SW_CONDITIONS_NOT_SATISFIED 185 | *
  • ISO7816.SW_SECURITY_STATUS_NOT_SATISFIED 186 | */ 187 | 188 | public Shareable getServiceInterface(GPRegistryEntry clientRegistryEntry, short sServiceName, byte[ ] baBuffer, short sOffset, short sLength) throws ISOException; 189 | } 190 | 191 | 192 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/HTTPAdministration.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/HTTPAdministration.java -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/HTTPReportListener.java: -------------------------------------------------------------------------------- 1 | package org.globalplatform; 2 | 3 | import javacard.framework.Shareable; 4 | /** 5 | * An applet may implement this interface in order to receive notification on HTTPAdministration request processing. 6 | * 7 | *

    8 | * Such an applet shall expose the HTTPReportListener interface object(s) through 9 | * {@link javacard.framework.Applet#getShareableInterfaceObject(javacard.framework.AID, byte)} 10 | * only if the client AID is null, and the parameter is set to {@link GPSystem#FAMILY_HTTP_REPORT}. 11 | *

    12 | */ 13 | 14 | public interface HTTPReportListener extends Shareable { 15 | /** 16 | * Constant notifying that HTTPAdministration session End successfully 17 | */ 18 | public final static short HTTP_SESSION_NO_ERROR=0x0001; 19 | /** 20 | * Constant notifying that the HTTPAdministartion session fails. 21 | * The retry policy of the session is exhausted and the administration session request is aborted. 22 | */ 23 | public final static short HTTP_SESSION_ERROR=(short) 0x8001; 24 | 25 | /** 26 | * Notifies the applet that the requested HTTPAdministrationSession has been successfully completed or not. 27 | *

    28 | * The OPEN notify the Applet when the HTTPAdministrationSession end or when retry policy is exhausted. 29 | * 30 | * @param status With following meaning 31 | *

  • HTTP_SESSION_NO_ERROR: HTTPAdministration session End
  • 32 | *
  • HTTP_SESSION_ERROR: retry policy of the HTTPAdministration session is exhausted
  • 33 | */ 34 | public void httpAdministationSessionReport(short status); 35 | 36 | } -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/Personalization.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/Personalization.java -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/SecureChannel.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/SecureChannel.java -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/SecureChannelx.java: -------------------------------------------------------------------------------- 1 | 2 | package org.globalplatform; 3 | 4 | /** 5 | * This defines an interface which extends SecureChannel Interface and includes a supplementary method. See 6 | * SecureChannel interface for a description of the underlying interface. Prior to using this interface, an Application is 7 | * required to obtain a handle to its associated Security Domain's SecureChannelx interface object by invoking the 8 | * GPSystem.getSecureChannel() method and casting the returned object to type SecureChannelx. 9 | * The SecureChannelx Interface shall be implemented by a Security Domain compliant to this version of the 10 | * specification and the corresponding object reference shall be exposed through the 11 | * GPSystem.getSecureChannel() method. 12 | * @see SecureChannel 13 | */ 14 | 15 | public interface SecureChannelx extends SecureChannel 16 | { 17 | 18 | /** 19 | *

    20 | * This method updates the Current Security Level for all subsequent invocations of wrap() and unwrap() 21 | * methods, except when Secure Channel is not active or was aborted during the same Application session. 22 | * Current Security Level is coded as a bit-map according to table 10-1. The current Security Level cannot be set 23 | * below the compulsory Session Security Level, buty only equal or above. The Current Security Level may be 24 | * increased or decreased during a Secure Channel Session as long as it is at least equal to the compulsory Session 25 | * Security Level. 26 | *

    Notes:

    30 | * @param bSecurityLevel
  • the Current Security Level to be set.
  • 31 | * @exception ISOException with the following reason codes (other security mechanism 32 | * related status words may be returned): 34 | */ 35 | 36 | public void setSecurityLevel(byte bSecurityLevel); 37 | } 38 | 39 | 40 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/SecureChannelx2.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/SecureChannelx2.java -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/CLApplet.java: -------------------------------------------------------------------------------- 1 | package org.globalplatform.contactless; 2 | 3 | import javacard.framework.Shareable; 4 | 5 | /** 6 | * An applet may implement this interface so that it can be 7 | * notified by the OPEN of changes occurring to its associated registry entry (parameters and/or life cycle). 8 | *

    9 | * The applet will not receive notification of events generated by itself. 10 | *

    11 | * Such an applet shall expose the CLApplet interface object(s) through 12 | * {@link javacard.framework.Applet#getShareableInterfaceObject(javacard.framework.AID, byte)} 13 | * only if the client AID is null, and the parameter is set to {@link GPCLSystem#GPCL_CL_APPLICATION}. 14 | */ 15 | 16 | public interface CLApplet extends Shareable 17 | { 18 | /** 19 | * Applet receives notification on event affecting its registry entry. 20 | *

    21 | * If the Applet implementing the CLApplet returns from the notification 22 | * and initiated transaction in progress, then the OPEN automatically aborts the 23 | * transaction. 24 | * 25 | * @param event ({@link CLAppletEvent}) affecting the target application 26 | * 27 | */ 28 | public void notifyCLEvent(short event); 29 | } 30 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/CLAppletEvent.java: -------------------------------------------------------------------------------- 1 | package org.globalplatform.contactless; 2 | 3 | 4 | /** 5 | * Definition of contactless events. 6 | * 7 | * These events shall be used to notify current state, or state change request in the following methods:

    13 | */ 14 | public interface CLAppletEvent { 15 | 16 | /** 17 | * Constant notifying that the applet is now NON ACTIVATABLE on the contactless interface. 18 | */ 19 | public static final short EVENT_NON_ACTIVATABLE = (short) 0x81; 20 | /** 21 | * Constant notifying that the applet is now ACTIVATED on the contactless interface. 22 | */ 23 | public static final short EVENT_ACTIVATED = (short) 0x02; 24 | /** 25 | * Constant notifying that the applet is now DEACTIVATED on the contactless interface. 26 | */ 27 | public static final short EVENT_DEACTIVATED = (short) 0x82; 28 | /** 29 | * Constant notifying that the URI associated with the applet has changed. 30 | */ 31 | public final static short EVENT_URI=(short)0x04; 32 | /** 33 | * Constant notifying that discretionary data has changed. 34 | */ 35 | public final static short EVENT_DISCRETIONARY_DATA=(short)0x05; 36 | /** 37 | * Constant notifying that the LOGO of the applet has changed. 38 | */ 39 | public final static short EVENT_LOGO=(short)0x06; 40 | /** 41 | * Constant notifying that applet's Type A Protocol Data have changed. 42 | */ 43 | public final static short EVENT_PROTOCOL_DATA_TYPE_A=(short)0x07; 44 | /** 45 | * Constant notifying that applet's Type B Protocol Data have changed. 46 | */ 47 | public final static short EVENT_PROTOCOL_DATA_TYPE_B=(short)0x08; 48 | /** 49 | * Constant notifying that applet's Type F Protocol Data have changed. 50 | */ 51 | public final static short EVENT_PROTOCOL_DATA_TYPE_F=(short)0x09; 52 | /** 53 | * Constant notifying that applet's supported protocol types have changed. 54 | */ 55 | public final static short EVENT_IMPLICIT_SELECTION_PROTOCOLS=(short)0x0B; 56 | 57 | /** 58 | * Constant notifying that applet's Family Identifier has changed. 59 | */ 60 | public final static short EVENT_FAMILY_IDENTIFIER=(short)0x0C; 61 | 62 | /** 63 | * Constant notifying that continuous processing is now enabled. 64 | */ 65 | public final static short EVENT_CONTINUOUS_PROCESS_ON=(short)0x0D; 66 | /** 67 | * Constant notifying that continuous processing is now disabled. 68 | */ 69 | public final static short EVENT_CONTINUOUS_PROCESS_OFF=(short)0x8D; 70 | 71 | /** 72 | * Constant notifying that a CREL application has been added to a CREL Application AID List 73 | */ 74 | public final static short EVENT_CREL_ADDED=(short)0x0E; 75 | /** 76 | * Constant notifying that a CREL application has been removed from a CREL Application AID List 77 | */ 78 | public final static short EVENT_CREL_REMOVED =(short) 0x8E; 79 | /** 80 | * Constant notifying that the applet has joined a Group. 81 | */ 82 | public final static short EVENT_GROUP_MEMBER_ADDED=(short)0x0F; 83 | /** 84 | * Constant notifying that the applet has left a Group. 85 | */ 86 | public final static short EVENT_GROUP_MEMBER_REMOVED=(short)0x8F; 87 | /** 88 | * Constant notifying that the applet has been installed but not selectable. 89 | */ 90 | public static final short EVENT_INSTALLED = (short) 0x11; 91 | /** 92 | * Constant notifying that the applet is selectable.. 93 | */ 94 | public static final short EVENT_SELECTABLE = (short) 0x12; 95 | /** 96 | * Constant notifying that the applet was locked. 97 | */ 98 | public static final short EVENT_LOCKED = (short) 0x13; 99 | /** 100 | * Constant notifying that the applet was unlocked. 101 | */ 102 | public static final short EVENT_UNLOCKED = (short) 0x93; 103 | /** 104 | * Constant notifying that the applet was deleted. 105 | */ 106 | public static final short EVENT_DELETED = (short) 0x14; 107 | 108 | 109 | } 110 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/CRELApplication.java: -------------------------------------------------------------------------------- 1 | package org.globalplatform.contactless; 2 | 3 | 4 | import javacard.framework.Shareable; 5 | 6 | /** 7 | * A CREL Application is an application associated to one or several 8 | * Applications.

    9 | * 10 | * This interface shall be implemented by CREL applications so that they can be 11 | * notified by the OPEN of changes occurring to their associated contactless 12 | * applets (parameters and/or life cycle).

    13 | * 14 | * The CREL application shall expose the CRELApplication interface object(s) through 15 | * {@link javacard.framework.Applet#getShareableInterfaceObject(javacard.framework.AID, byte)} 16 | * only if the client AID is null and the parameter is set to {@link GPCLSystem#GPCL_CREL_APPLICATION}. 17 | * 18 | * A CREL Application shall not be notified when it is the originator of an event. 19 | * 20 | */ 21 | public interface CRELApplication extends Shareable 22 | { 23 | /** 24 | * Notifies the CREL Application that the applet associated with specified 25 | * GPCLRegistryEntry was updated according to specified event. 26 | *

    27 | * In case of EVENT_DELETED the target GPCLRegistryEntry shall only be used to retrieve the AID; 28 | * other methods will fail and throw an javacard.framework.SystemException 29 | *

    30 | * If the Applet implementing the CRELApplication interface returns 31 | * from the notification and initiated transaction in progress,then 32 | * the OPEN automatically aborts the transaction. 33 | * 34 | * @param target the GPCLRegistryEntry of the Application whose state or data were updated 35 | * @param event event ({@link CLAppletEvent}) affecting the target application 36 | * 37 | * 38 | */ 39 | public void notifyCLEvent(GPCLRegistryEntry target, short event); 40 | 41 | } 42 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/CRSApplication.java: -------------------------------------------------------------------------------- 1 | package org.globalplatform.contactless; 2 | 3 | import org.globalplatform.GPRegistryEntry; 4 | 5 | /** 6 | * This interface allows processing state change requests for applets 7 | * participating to the contactless front end. 8 | *

    9 | * The CRS application shall expose the CRSApplication interface object(s) through 10 | * {@link javacard.framework.Applet#getShareableInterfaceObject(javacard.framework.AID, byte)} 11 | * only if the client AID is null, and the parameter is set to {@link GPCLSystem#GPCL_CRS_APPLICATION}. 12 | */ 13 | public interface CRSApplication extends CRELApplication{ 14 | 15 | /** 16 | * Called by the OPEN for each activation requested by an Application that does not have 17 | * the Self-Activation Privilege. 18 | *

    19 | * The CRS Application shall use GPCLRegistryEntry to change the life 20 | * cycle state of the requesting applet. 21 | *

    22 | * If the Applet implementing the CRSApplication interface returns 23 | * from the notification and initiated transaction in progress,then 24 | * the OPEN automatically aborts the transaction. 25 | * 26 | * @param requester the GPRegistryEntry of the applet requesting the change 27 | * @param target the GPCLRegistryEntry of the contactless applet to update 28 | * @param event requested change:

    31 | * 32 | * @return true if transition success, false otherwise. 33 | */ 34 | public boolean processCLRequest(GPRegistryEntry requester, GPCLRegistryEntry target, short event); 35 | 36 | } -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/GPCLRegistryEntry.java: -------------------------------------------------------------------------------- 1 | package org.globalplatform.contactless; 2 | 3 | import javacard.framework.AID; 4 | import javacard.framework.ISOException; 5 | 6 | import org.globalplatform.GPRegistryEntry; 7 | 8 | /** 9 | * Defines methods that manage the GlobalPlatform registry extension on contactless interface 10 | * for an applet. 11 | *

    12 | * The caller shall use {@link GPCLSystem#getGPCLRegistryEntry(AID)} to 13 | * retrieve an OPEN owned interface object. 14 | *

    15 | * All GPRegistryEntry of Application installed will be extended by this interface. 16 | *

    17 | * When the application represented by a {@link GPCLRegistryEntry} object is deleted, 18 | * and Logically Deleted with References, then this {@link GPCLRegistryEntry} object shall be 19 | * disabled and all its methods shall throw an javacard.framework.SystemException 20 | * with reason code SystemException.ILLEGAL_USE. 21 | *

    22 | * The OPEN shall ensure that this {@link GPCLRegistryEntry} object can never be re-enabled, 23 | * even if an application with the same AID as the deleted application 24 | * (previously bound to this {@link GPCLRegistryEntry} object) is installed. 25 | * An application holding a reference to a disabled {@link GPCLRegistryEntry} object 26 | * should release it, as it has become useless and will only throw exceptions. 27 | *

    28 | * Note: Developer shall pay attention of {@link CRELApplication} , {@link CLApplet} and {@link CRSApplication} 29 | * notifications when using the service interface. Thus it is strongly recommended do not call 30 | * service provided by this interface under transaction. 31 | * 32 | * 33 | * @see GPCLSystem#getGPCLRegistryEntry(AID) 34 | */ 35 | public interface GPCLRegistryEntry extends GPRegistryEntry 36 | { 37 | /** 38 | * Contactless Activation privilege (18). 39 | * This privilege allows

    45 | */ 46 | public final static byte PRIVILEGE_CONTACTLESS_ACTIVATION = (byte) 18; 47 | 48 | /** 49 | * Self Activation privilege (19). This privilege 50 | * allows an Applet to transition to ACTIVATED on the Contactless interface. 51 | */ 52 | public final static byte PRIVILEGE_CONTACTLESS_SELF_ACTIVATION = (byte) 19; 53 | 54 | /** 55 | * Constant used to change the state of an applet to NON ACTIVATABLE over the 56 | * contactless interface. When applet is NON ACTIVATABLE, it is also 57 | * implicitly DEACTIVATED. 58 | */ 59 | public static final byte STATE_CL_NON_ACTIVATABLE = (byte) 0x80; 60 | 61 | /** 62 | * Constant used to activate an applet on the contactless interface. 63 | * An applet that is currently NON ACTIVATABLE can not be ACTIVATED. 64 | */ 65 | public static final byte STATE_CL_ACTIVATED = (byte) 0x01; 66 | 67 | /** 68 | * Constant used to deactivate an applet on the contactless interface. 69 | */ 70 | public static final byte STATE_CL_DEACTIVATED = (byte) 0x00; 71 | 72 | /** 73 | * Changes the contactless life cycle state of the applet associated with 74 | * this GPCLRegistryEntry. 75 | *

    76 | * When this entry is a group member and is in {@link #STATE_CL_NON_ACTIVATABLE} state 77 | * then this entry follows the activation state of the Head Application when 78 | * state transition of this entry is to {@link #STATE_CL_ACTIVATED} or 79 | * to {@link #STATE_CL_DEACTIVATED}. 80 | *

    81 | * Only the application associated to this entry may transition to the 82 | * {@link #STATE_CL_NON_ACTIVATABLE} state. 83 | *

    84 | * The application associated to this entry, or 85 | * the Application with the {@link #PRIVILEGE_CONTACTLESS_ACTIVATION} privilege, or 86 | * CREL Applications registered in the investigated applet's CREL list may transition 87 | * this entry to the {@link #STATE_CL_DEACTIVATED} 88 | *

    89 | * When the state transition of this entry is to {@link #STATE_CL_ACTIVATED}, the caller must have 90 | *

    101 | *

    102 | * The OPEN is responsible to notify all Application(s) implementing {@link CRELApplication#notifyCLEvent(GPCLRegistryEntry, short)}. 103 | * If the Application associated to this entry, implements the interface {@link CLApplet} and 104 | * the Application is not at the origin of the request then 105 | * OPEN shall notify the application by calling {@link CLApplet#notifyCLEvent(short)} 106 | * 107 | *

    108 | * It shall be supported to change the activation state of a contactless 109 | * applet irrespective of the state of the contactless front end in the handset. 110 | * When the contactless functionality is enabled the OPEN shall ensure that 111 | * the contactless front end is provisioned so that it reflects the 112 | * configuration of the contactless applets in the OPEN. 113 | *

    114 | * 115 | * @param state requested Availability state on Contactless interface 116 | * The possible state are 117 | *

  • {@link #STATE_CL_ACTIVATED} 118 | *
  • {@link #STATE_CL_DEACTIVATED} 119 | *
  • {@link #STATE_CL_NON_ACTIVATABLE} 120 | * 121 | * @return the resulting Availablity state on Contactless interface. 122 | * 123 | * @throws ISOException with reason 124 | *
      125 | *
    • ISO7816.SW_CONDITIONS_NOT_SATISFIED if 126 | * the caller does not have enough privileges. 127 | *
    • ISO7816.SW_WRONG_DATA if the application 128 | * cannot be activated on the contactless interface because of 129 | * conflicting RF parameters. 130 | *
    • ISO7816.SW_CONDITIONS_NOT_SATISFIED 131 | * if the requested Availability state transition is not valid. 132 | *
    133 | * 134 | * @see GPRegistryEntry 135 | */ 136 | public byte setCLState(byte state); 137 | 138 | /** 139 | * This method returns the contactless life cycle state of application. 140 | * 141 | * @return byte value of contactless state 142 | *
  • {@link #STATE_CL_ACTIVATED} 143 | *
  • {@link #STATE_CL_DEACTIVATED} 144 | *
  • {@link #STATE_CL_NON_ACTIVATABLE} 145 | */ 146 | public byte getCLState(); 147 | 148 | /** 149 | * The requested information is an URI. 150 | */ 151 | public final static short INFO_URI=(short)0x04; 152 | /** 153 | * The requested information is discretionary data. 154 | */ 155 | public final static short INFO_DISCRETIONARY_DATA=(short)0x05; 156 | /** 157 | * The requested information is a LOGO. 158 | */ 159 | public final static short INFO_LOGO=(short)0x06; 160 | /** 161 | * The requested information is the PROTOCOL_DATA_TYPE_A. 162 | */ 163 | public final static short INFO_PROTOCOL_DATA_TYPE_A=(short)0x07; 164 | /** 165 | * The requested information is the PROTOCOL_DATA_TYPE_B. 166 | */ 167 | public final static short INFO_PROTOCOL_DATA_TYPE_B=(short)0x08; 168 | /** 169 | * The requested information is the PROTOCOL_DATA_TYPE_F. 170 | */ 171 | public final static short INFO_PROTOCOL_DATA_TYPE_F=(short)0x09; 172 | 173 | /** 174 | * The Application family identifier is a short value. 175 | *
      176 | *
    • MSB byte 1 set to 00 the LSB byte holds the AFI as defined 177 | * in table 12 of ISO/IEC 14443-3. 178 | *
    • Other values of are reserved for proprietary use. 179 | */ 180 | public final static short INFO_FAMILY_IDENTIFIER=(short)0x0B; 181 | 182 | /** 183 | * The supported protocol Type A, Type B or / and Type F. 184 | * 185 | *

      Encoding of this information is a sequence of bytes 186 | * representing the value(s) of one or more of the following constants. 187 | *

    • {@link #IMPLICIT_SELECTION_TYPE_A} 188 | *
    • {@link #IMPLICIT_SELECTION_TYPE_B} 189 | *
    • {@link #IMPLICIT_SELECTION_TYPE_F} 190 | * 191 | * If the sequence is empty, the application can be implicity selected 192 | * using any of these protocol types (see definition of TLV "Assigned 193 | * Protocol for Implicit Selection"). 194 | */ 195 | public final static short INFO_IMPLICIT_SELECTION_PROTOCOLS=(short)0x0C; 196 | /** 197 | * The Application continuous processing is a Byte value 1 Continuous Processing 0 Interleave Processing 198 | */ 199 | public final static short INFO_CONTINUOUS_PROCESS=(short)0x0D; 200 | /** 201 | * The GPCLentry update counter. 202 | * Each time a {@link GPCLRegistryEntry} information is updated this counter is incremented. 203 | * Used to synchronize the CRS/CREL application list. 204 | */ 205 | public final static short INFO_COUNTER_UPDATE=(short)0x0E; 206 | /** 207 | * The GPCLRegistryEntry display on off requirement. 208 | * Used to know if the application can work in display off mode. 209 | *
    • Byte value 1 can work when Display OFF 210 | *
    • Byte value 0 can not work when display OFF 211 | */ 212 | public final static short INFO_DISPLAY_REQUIREMENT=(short)0x0F; 213 | 214 | /** 215 | * Constant indicating that the application supports contactless protocol Type A for implicit selection 216 | */ 217 | public static final byte IMPLICIT_SELECTION_TYPE_A = (byte)0x81; 218 | 219 | /** 220 | * Constant indicating that the application supports contactless protocol Type B for implicit selection 221 | */ 222 | public static final byte IMPLICIT_SELECTION_TYPE_B = (byte)0x82; 223 | 224 | /** 225 | * Constant indicating that the application supports contactless protocol Type F for implicit selection 226 | */ 227 | public static final byte IMPLICIT_SELECTION_TYPE_F = (byte)0x84; 228 | 229 | /** 230 | * Returns the contents of the Application Information entry in the GlobalPlatform registry. 231 | * 232 | * @param buffer where requested information shall be written. For the coding of the data 233 | * see the documentation of the constants INFO_XX. 234 | * 235 | * @param offset within buffer, where requested information shall be written. 236 | * 237 | * @param info is any constant with name INFO_XX which is defined in this interface. 238 | * 239 | * @return (offset + length of data written in buffer) 240 | * 241 | * @throws ISOException with reason 242 | *
        243 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED if the caller 244 | *
          245 | *
        • is not the Application itself, and 246 | *
        • does not have the {@link #PRIVILEGE_GLOBAL_REGISTRY} privilege, and 247 | *
        • is not a Security Domain that is directly or indirectly associated to the 248 | * Application identified by this entry, and 249 | *
        • is not a CREL Application registered in the CREL list of the Application 250 | * identified by this entry. 251 | *
        252 | *
      • ISO7816.SW_WRONG_DATA if the value of info is unknown. 253 | *
      • ISO7816.SW_RECORD_NOT_FOUND if the info is not present. 254 | *
      255 | * @throws ArrayIndexOutOfBoundsException 256 | * if storing the Application Information bytes would cause 257 | * access outside array bounds or the offset is 258 | * negative. 259 | * @throws NullPointerException 260 | * if buffer is null 261 | */ 262 | public short getInfo(byte[] buffer, short offset, short info); 263 | 264 | /** 265 | * Update the contents of the Information associated to this {@link GPCLRegistryEntry}. 266 | * 267 | * @param buffer contains the updated information. For the coding of the data 268 | * see the documentation of the constants INFO_XX. 269 | * @param offset within buffer, where updated information can be found 270 | * @param length of the updated information 271 | * @param info is any constant with name INFO_XX which is defined in this interface. 272 | * 273 | * @return (offset + length) 274 | * 275 | * @throws ISOException with reason 276 | *
        277 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED if the caller is not 278 | *
          279 | *
        • the Associated Security Domain 280 | *
        • or the Application itself
        • 281 | *
        282 | *
      • ISO7816.SW_WRONG_DATA if the value of info is unknown. 283 | *
      284 | * 285 | * @throws ArrayIndexOutOfBoundsException 286 | * if storing the Application Information bytes would cause 287 | * access outside array bounds or the offset is 288 | * negative. 289 | * @throws NullPointerException 290 | * if buffer is null 291 | */ 292 | public short setInfo(byte[] buffer, short offset,short length, short info); 293 | 294 | /** 295 | * This method allows iteration over the currently activated contactless applets that would 296 | * conflict if the applet associated with this entry was activated. 297 | *

      298 | * 299 | * @param oEntry 300 | *

    • if oEntry is null, this method returns the first Entry representing the first conflicting application. 301 | *
    • If the list is empty, the method shall return null. 302 | *
    • If oEntry is not null, and represents a conflicting application, 303 | * this method retrieves the next conflicting application following oEntry, otherwise it shall return null. 304 | *
    • If oEntry points to the last conflicting application, the method shall return null. 305 | * 306 | * @return the reference to the contactless application which would cause a 307 | * conflict. The value null is returned if no 308 | * contactless application is conflicting or the end of the list 309 | * has been reached. 310 | * 311 | * @throws ISOException with reason 312 | *
        313 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED if 314 | * caller does not have the {@link #PRIVILEGE_CONTACTLESS_ACTIVATION} privilege. 315 | *
      316 | */ 317 | public GPCLRegistryEntry getNextConflictingApplication(GPCLRegistryEntry oEntry); 318 | 319 | /** 320 | * Associates the GPCLRegistryEntry to which this GPCLRegistryEntry delegates its 321 | * information parameters (i.e. head application). 322 | * 323 | * @param oHead Head Application's AID 324 | * 325 | * @throws ISOException with reason 326 | *
        327 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED 328 | *
          329 | *
        • if the caller is not the Application itself or 330 | *
        • is associated to another Head Application or 331 | *
        • is a Head application 332 | *
        333 | *
      334 | */ 335 | public void joinGroup(AID oHead); 336 | 337 | /** 338 | * Retrieves the list of application grouped with this Head Application. 339 | * 340 | * @param oEntry search 341 | *
        342 | *
      • If this does not reference a Head Application, this method returns null. 343 | * Otherwise, 344 | *
      • if oEntry is null, this method returns the first Entry representing the first member of the Application Group. 345 | *
      • If the list is empty, the method shall return null. 346 | *
      • If oEntry is not null, and is a member of the group, this method retrieves the next Entry following 347 | * oEntry belonging to the same Application Group, otherwise it shall return null. 348 | *
      • If oEntry points to the last member of the group, the method shall return null. 349 | *
      • The caller must have the {@link #PRIVILEGE_CONTACTLESS_ACTIVATION} Contactless Activation 350 | *
      351 | * @return the Entry that is part of the group or null if no group or end of group list 352 | * 353 | * @throws ISOException with reason 354 | *
        355 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED 356 | *
          357 | *
        • if the caller has not {@link #PRIVILEGE_CONTACTLESS_ACTIVATION} and 358 | *
        • is not a CRELApplication associated to this entry
        • 359 | *
        360 | *
      361 | */ 362 | public GPCLRegistryEntry getNextGroupMember(GPCLRegistryEntry oEntry); 363 | 364 | /** 365 | * This method is used to add an AID to the Group Authorization list. 366 | * 367 | * @param baAID contains the AID value to manage 368 | * @param offsetAID start offset of the AID value 369 | * @param lengthAID length of the AID value 370 | * 371 | * @throws ISOException with reason 372 | *
        373 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED 374 | *
          375 | *
        • if the caller application is already associated to a Head Application, or 376 | *
        • if the caller application is neither the application itself or the associated Security Domain. 377 | *
        378 | *
      379 | */ 380 | public void addToGroupAuthorizationList(byte[]baAID, short offsetAID, short lengthAID); 381 | /** 382 | * This method is used to remove an AID from the Group Authorization list. 383 | * 384 | * @param baAID contains the AID value to removed 385 | * @param offsetAID start offset of the AID value 386 | * @param lengthAID length of the AID value 387 | * 388 | * @throws ISOException with reason 389 | *
    • ISO7816.SW_CONDITION_NOT_SATISFIED if the caller application is 390 | * neither the application itself or the associated Security Domain. 391 | */ 392 | public void removeFromGroupAuthorizationList(byte[]baAID, short offsetAID, short lengthAID); 393 | 394 | /** 395 | * Manage the GlobalPlatform registry order for partial selection priority. 396 | * If this GPCLentry is a head of a group, group members are moved in the same 397 | * order. 398 | * @param TopBottom 399 | *
        400 | *
      • true: the GPRegistryEntry of this entry, becomes 401 | * the first selected on partial selection. 402 | *
      • false:the GPRegistryEntry of this entry becomes 403 | * the last selected on partial selection. 404 | *
      405 | * 406 | * @throws ISOException with reason 407 | *
        408 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED if the caller has not {@link #PRIVILEGE_CONTACTLESS_ACTIVATION}
      • 409 | *
      410 | */ 411 | public void setPartialSelectionOrder(boolean TopBottom); 412 | 413 | /** 414 | * Retrieve the list of CREL applications referenced by this GPCLRegistryEntry 415 | * 416 | * @param oEntry search 417 | *
        418 | *
      • if oEntry is null, this method returns the first Entry representing the first CRELApplication. 419 | *
      • If the list is empty, the method shall return null. 420 | *
      • If oEntry is not null, and represents a {@link CRELApplication} CRELApplication reference by this GPCLRegistryEntry, 421 | * this method retrieves the next Entry following oEntry referenced by this , otherwise it shall return null. 422 | *
      • If oEntry points to the last CRELApplication's GPCLRegistryEntry, the method shall return null. 423 | *
      424 | * 425 | * @return 426 | *
        427 | *
      • next entry referencing a CREL application. 428 | *
      • null, if no more entry. 429 | *
      430 | * @throws ISOException with reason 431 | *
        432 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED if the caller has not {@link #PRIVILEGE_CONTACTLESS_ACTIVATION}
      • 433 | *
      434 | */ 435 | public GPCLRegistryEntry getNextCRELApplication(GPCLRegistryEntry oEntry); 436 | 437 | /** 438 | * This method add an AID to the CREL Application list referenced by this GPCLRegistryEntry 439 | * 440 | * @param baAID contains the CREL Application's AID value to manage 441 | * @param offsetAID start offset of the CREL Application's AID value 442 | * @param lengthAID length of the AID value 443 | * 444 | * @throws ISOException with reason 445 | *
        446 | *
      • ISO7816.SW_CONDITION_NOT_SATISFIED if 447 | *
          448 | *
        • is not the Security Domain directly associated with the applet being investigated, and 449 | *
        • is not the investigated applet itself. 450 | *
        451 | *
      452 | */ 453 | public void addToCRELApplicationList(byte[]baAID, short offsetAID, short lengthAID); 454 | 455 | /** 456 | * This method removes an AID from the CREL Application list referenced by this GPCLRegistryEntry 457 | * 458 | * @param baAID contains the CREL Application's AID value to manage 459 | * @param offsetAID start offset of the CREL Application's AID value 460 | * @param lengthAID length of the AID value 461 | * 462 | * @throws ISOException with reason 463 | *
        464 | *
      • ISO7816.SW_CONDITIONS_NOT_SATISFIED if 465 | *
          466 | *
        • is not the Security Domain directly associated with the applet being investigated, and 467 | *
        • is not the investigated applet itself. 468 | *
        469 | *
      470 | */ 471 | public void removeFromCRELApplicationList(byte[]baAID, short offsetAID, short lengthAID); 472 | 473 | /** 474 | * Retrieve the list of applications that reference this CRELApplication's GPCLRegistryEntry 475 | * 476 | * @param oEntry search 477 | *
        478 | *
      • if oEntry is null, this method returns the first Entry representing the first GPCLRegistryEntry, that references this CRELApplication 479 | *
      • If the list is empty, the method shall return null. 480 | *
      • If oEntry is not null, and represents a GPCLRegistryEntry that references this CRELApplication 481 | * this method retrieves the next Entry following oEntry referencing this CRELApplication, otherwise it shall return null. 482 | *
      • If oEntry points to the last CRELApplication's GPCLRegistryEntry, the method shall return null. 483 | *
      • The caller shall implement CRELApplication interface. 484 | *
      485 | * @return 486 | *
        487 | *
      • next entry referencing this CRELApplication. 488 | *
      • null, if no more entry. 489 | *
      490 | * @throws ISOException with reason 491 | *
        492 | *
      • ISO7816.SW_CONDITION_NOT_STATISFIED 493 | * if the caller does not implement CRELApplication interface.
      • 494 | *
      495 | */ 496 | public GPCLRegistryEntry getNextReferencingApplication(GPCLRegistryEntry oEntry); 497 | 498 | /** 499 | * Does this {@link GPCLRegistryEntry} represents a group's Head. 500 | * 501 | * @return true true if this Application is a Group Head, 502 | * false otherwise. 503 | * 504 | * @throws ISOException with reason 505 | *
    • ISO7816.SW_CONDITIONS_NOT_SATISFIED if 506 | * the caller has not {@link GPRegistryEntry#PRIVILEGE_GLOBAL_REGISTRY} 507 | */ 508 | public boolean isGroupHead(); 509 | /** 510 | * Does this {@link GPCLRegistryEntry} represents a group's Member. 511 | * 512 | * @return true is this Application is a if this Application is a Group Member, 513 | * false if this is a standalone Application. 514 | * 515 | * @throws ISOException with reason 516 | *
        517 | *
      • ISO7816.SW_CONDITIONS_NOT_SATISFIED if 518 | * the caller has not {@link GPRegistryEntry#PRIVILEGE_GLOBAL_REGISTRY} 519 | *
      520 | */ 521 | public boolean isGroupMember(); 522 | 523 | } 524 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/GPCLSystem.java: -------------------------------------------------------------------------------- 1 | package org.globalplatform.contactless; 2 | 3 | import javacard.framework.AID; 4 | 5 | /** 6 | * 7 | * The GPCLSystem class exposes a subset of the behavior of the CRS (OPEN extension) 8 | * to other on-card components. 9 | * The class is composed of static methods visible to all applets importing the 10 | * org.globalplatform.contactless package. 11 | * 12 | * Static methods are provided to: 13 | *
        14 | *
      • Retrieve Contactless Registry Objects 15 | *
      • Configure access to ISO 14443 interface 16 | *
      • Set Volatile Priority 17 | *
      • Retrieve the OPEN's Default and Current Protocol Parameters 18 | *
          19 | *
        • Default Protocol Parameter, 20 | *
        • Current Protocol Parameters, 21 | *
        22 | *
      23 | */ 24 | public class GPCLSystem { 25 | 26 | private GPCLSystem() { 27 | // empty 28 | } 29 | 30 | /** 31 | * The OPEN uses this identifier to retrieve the {@link CLApplet} interface implemented by an applet. 32 | */ 33 | public static final byte GPCL_CL_APPLICATION=(byte)0x86; 34 | /** 35 | * The OPEN uses this identifier to retrieve the {@link CRSApplication} interface implemented by an applet. 36 | */ 37 | public static final byte GPCL_CRS_APPLICATION=(byte)0x84; 38 | /** 39 | * The OPEN uses this identifier to retrieve the {@link CRELApplication} interface implemented by an applet. 40 | */ 41 | public static final byte GPCL_CREL_APPLICATION=(byte)0x85; 42 | 43 | /** 44 | * Gets a reference to a {@link GPCLRegistryEntry} interface. 45 | * 46 | * If no AID is input (i.e. entry is null), 47 | * this method provides the {@link GPCLRegistryEntry} of the 48 | * requesting applet. 49 | * 50 | *

      51 | * Contactless applets are those applets that have access to the contactless interface. 52 | * 53 | * @param oAIDidentifies the applet for which the GPCLRegistryEntry interface should be 54 | * retrieved, or null. 55 | * 56 | * @return the GPCLRegistryEntry interface object, or 57 | * null 58 | *

    • if there is no applet with the specified entry or, 59 | *
    • if the caller 60 | *
        61 | *
      • has not GLOBAL_REGISTRY privilege, and 62 | *
      • is not the Security Domain directly or indirectly associated with the applet being investigated, and 63 | *
      • is not the investigated applet itself, and 64 | *
      • is a not CREL Application registered in the investigated applet's CREL list 65 | *
      66 | */ 67 | public static GPCLRegistryEntry getGPCLRegistryEntry(AID oAID) { 68 | return null; 69 | } 70 | /** 71 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 72 | * to look for all Contactless applications that belong to any family 73 | */ 74 | public static final short AFI_ANY = (short)0x0000; 75 | /** 76 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 77 | * to look for applications that belong to the Transport family 78 | */ 79 | public static final short AFI_TRANSPORT=(short)0x10; 80 | /** 81 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 82 | * to look for applications that belong to the Financial family 83 | */ 84 | public static final short AFI_FINANCIAL=(short)0x20; 85 | /** 86 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 87 | * to look for applications that belong to the Identification family 88 | */ 89 | public static final short AFI_IDENTIFICATION=(short)0x30; 90 | /** 91 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 92 | * to look for applications that belong to the Telecommunication family 93 | */ 94 | public static final short AFI_TELECOMMUNICATION=(short)0x40; 95 | /** 96 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 97 | * to look for applications that belong to the Medical family 98 | */ 99 | public static final short AFI_MEDICAL=(short)0x50; 100 | /** 101 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 102 | * to look for applications that belong to the Multimedia family 103 | */ 104 | public static final short AFI_MULTIMEDIA=(short)0x60; 105 | /** 106 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 107 | * to look for applications that belong to the Gaming family 108 | */ 109 | public static final short AFI_GAMING=(short)0x70; 110 | /** 111 | * Constant to use with {@link #getNextGPCLRegistryEntry(GPCLRegistryEntry, short)} 112 | * to look for applications that belong to the Data Storage family 113 | */ 114 | public static final short AFI_DATA_STORAGE=(short)0x80; 115 | /** 116 | * Looks up contactless applets belonging to a particular application family. 117 | * 118 | * The OPEN maintains an internal list of contactless applets. This method 119 | * returns the GPCLRegistryEntry object for the next contactless applet that 120 | * matches the search criteria. 121 | *

      122 | * Contactless applets are those applets that have access to the contactless interface. 123 | *

      124 | *

        125 | *
      • Application with GLOBAL_REGISTRY privilege can iterate over all application 126 | *
      • A CREL Application can only iterate over its referencing Applications. 127 | *
      • Security Domain can only iterate on its directly or indirectly associated Application(s) 128 | * unless it has the GLOBAL_REGISTRY privilege. 129 | *
      130 | * @param oEntry 131 | *
        132 | *
      • if oEntry is null, this method returns the first Entry matching the specified family. 133 | *
      • If the list is empty, the method shall return null. 134 | *
      • If oEntry is not null, and represents an application matching the specified family, 135 | * this method retrieves the next application matching the specified family, otherwise it shall return null. 136 | *
      • If oEntry points to the last application matching the specified family, the method shall return null. 137 | *
      138 | * @param sFamily the Family Identifier to look for. 139 | * 140 | * @return the reference to the GPCLRegistryEntry interface object of the contactless applet matching the search 141 | * criteria; null is returned if no application is matching or the end of the list is reached. 142 | * 143 | * @throws ISOException with reason 144 | *
        145 | *
      • ISO7816.SW_CONDITIONS_NOT_SATISFIED if 146 | *
          147 | *
        • the caller has not GLOBAL_REGISTRY privilege, and 148 | *
        • the caller is not a Security Domain or is a Security Domain but the oEntry is not 149 | * directly or indirectly associated with this Security Domain, and 150 | *
        • the caller is not a CREL Application, or is a CRELApplication but the oEntry is not 151 | * referencing this CREL Application. 152 | *
        153 | *
      154 | * 155 | * @see AFI_ANY 156 | * @see AFI_TRANSPORT 157 | * @see AFI_TELECOMMUNICATION 158 | * @see AFI_MULTIMEDIA 159 | * @see AFI_MEDICAL 160 | * @see AFI_IDENTIFICATION 161 | * @see AFI_GAMING 162 | * @see AFI_FINANCIAL 163 | * @see AFI_DATA_STORAGE 164 | */ 165 | public static GPCLRegistryEntry getNextGPCLRegistryEntry(GPCLRegistryEntry oEntry, short sFamily) { 166 | return null; 167 | } 168 | 169 | 170 | /** 171 | * Sets up or discards the volatile priority. 172 | * 173 | * @param oEntry 174 | *
        175 | *
      • null value discards the volatile priority
      • 176 | *
      • The GPCLRegistryEntry to set in the volatile priority 177 | * If the GPCLentry identifies a Head of a group 178 | * all applications of this group are part of the volatile priority 179 | * in the same order as in the GlobalPlatform registry.
      • 180 | *
      181 | * @exception ISOException with reason 182 | *
        183 | *
      • ISO7816.SW_CONDITION_NOT_STATISFIED 184 | * if the caller has not {@link GPCLRegistryEntry#PRIVILEGE_CONTACTLESS_ACTIVATION}
      • 185 | *
      186 | */ 187 | public static void setVolatilePriority(GPCLRegistryEntry oEntry){ 188 | 189 | } 190 | /** 191 | * The requested information is the DEFAULT_PROTOCOL_DATA_TYPE_A. 192 | */ 193 | public final static short CARD_INFO_DEFAULT_PROTOCOL_DATA_TYPE_A=(short)0x01; 194 | /** 195 | * The requested information is the DEFAULT_PROTOCOL_DATA_TYPE_B. 196 | */ 197 | public final static short CARD_INFO_DEFAULT_PROTOCOL_DATA_TYPE_B=(short)0x02; 198 | /** 199 | * The requested information is the DEFAULT_PROTOCOL_DATA_TYPE_F. 200 | */ 201 | public final static short CARD_INFO_DEFAULT_PROTOCOL_DATA_TYPE_F=(short)0x03; 202 | /** 203 | * The requested information is the CURRENT_PROTOCOL_DATA_TYPE_A. 204 | */ 205 | public final static short CARD_INFO_CURRENT_PROTOCOL_DATA_TYPE_A=(short)0x04; 206 | /** 207 | * The requested information is the CURRENT_PROTOCOL_DATA_TYPE_B. 208 | */ 209 | public final static short CARD_INFO_CURRENT_PROTOCOL_DATA_TYPE_B=(short)0x05; 210 | /** 211 | * The requested information is the CURRENT_PROTOCOL_DATA_TYPE_F. 212 | */ 213 | public final static short CARD_INFO_CURRENT_PROTOCOL_DATA_TYPE_F=(short)0x06; 214 | 215 | /** 216 | * The Card GPCLentry update counter. 217 | * Each time a {@link GPCLRegistryEntry} information is updated this counter is incremented. 218 | * Used to synchronize the CRS/CREL application list. 219 | */ 220 | public final static short CARD_INFO_COUNTER_UPDATE=0x07; 221 | 222 | /** 223 | * Retrieve the OPEN's conctactless parameters. 224 | * 225 | * @param buffer where requested information shall be written 226 | * @param offset within buffer, where requested information shall be written 227 | * @param info any CARD_INFO_XX constant. 228 | * 229 | * @return (offset + length of data written in buffer) 230 | * 231 | * @throws ArrayIndexOutOfBoundsException 232 | * if storing the Application Information bytes would cause access 233 | * outside array bounds or the offset is negative. 234 | * 235 | * @throws NullPointerException 236 | * if buffer is null 237 | */ 238 | public static short getCardCLInfo(byte[] buffer,short offset,short info){ 239 | return offset; 240 | } 241 | 242 | /** 243 | * This constant is used with {@link #setCommunicationInterface(short, boolean)} 244 | * to manage a ISO14443 based communication interface. 245 | */ 246 | public final static short GPCL_INTERFACE_ISO14443=(short)0x01; 247 | /** 248 | * This method allows switching ON or switching OFF the ISO 14443 interface at GlobalPlatform card level. 249 | * The technical implementation for switching an interface is configuration dependent. 250 | * 251 | * @param sInterface the interface identifier: GPCL_INTERFACE_ISO14443. 252 | * 253 | * @param onOff true to switch ON, false to switch OFF 254 | * 255 | * @exception ISOException with reason 256 | *
        257 | *
      • ISO7816.SW_CONDITION_NOT_STATISFIED if the caller has not 258 | * {@link GPCLRegistryEntry#PRIVILEGE_CONTACTLESS_ACTIVATION} when managing the {@link #GPCL_INTERFACE_ISO14443} 259 | *
      • ISO7816.SW_WRONG_DATAif sInterface identifier does not exist. 260 | *
      261 | */ 262 | public static void setCommunicationInterface(short sInterface,boolean onOff){ 263 | 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/javacard/contactless.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/contactless/javacard/contactless.exp -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/contactless/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Package Version = 1.0 3 | */ 4 | package org.globalplatform.contactless; 5 | 6 | -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.4/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.4/org/globalplatform/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Package Version = 1.4 3 | */ 4 | package org.globalplatform; 5 | 6 | -------------------------------------------------------------------------------- /org.globalplatform-1.5/Readme.txt: -------------------------------------------------------------------------------- 1 | December 2010 2 | 3 | Export file for package 'org.globalplatform' is generated with 4 | AID: 0xA0:0x00:0x00:0x01:051:0x00 5 | Version: 1.5 6 | Backward Compatibility: Version 1.4 7 | -------------------------------------------------------------------------------- /org.globalplatform-1.5/exports/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.5/exports/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.5/gpapi-globalplatform.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.5/gpapi-globalplatform.jar -------------------------------------------------------------------------------- /org.globalplatform-1.6/README.TXT: -------------------------------------------------------------------------------- 1 | Export file for package 'org.globalplatform' is generated with 2 | AID: 0xA0:0x00:0x00:0x01:051:0x00 3 | Version: 1.6 4 | Backward Compatibility: Version 1.5 5 | -------------------------------------------------------------------------------- /org.globalplatform-1.6/exports/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.6/exports/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.6/gpapi-globalplatform.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.6/gpapi-globalplatform.jar -------------------------------------------------------------------------------- /org.globalplatform-1.7/README.TXT: -------------------------------------------------------------------------------- 1 | Export file for package 'org.globalplatform' is generated with 2 | AID: 0xA0:0x00:0x00:0x01:0x51:0x00 3 | Version: 1.7 4 | Backward Compatibility: Version 1.6 5 | -------------------------------------------------------------------------------- /org.globalplatform-1.7/exports/org/globalplatform/javacard/globalplatform.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.7/exports/org/globalplatform/javacard/globalplatform.exp -------------------------------------------------------------------------------- /org.globalplatform-1.7/gpapi-globalplatform.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform-1.7/gpapi-globalplatform.jar -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.0/Readme.txt: -------------------------------------------------------------------------------- 1 | February 2010 2 | 3 | Export file for package 'org.globalplatform.contactless' is generated with 4 | AID: 0xA0:0x00:0x00:0x01:051:0x02 5 | Version: 1.0 6 | -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.0/exports/org/globalplatform/contactless/javacard/contactless.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.0/exports/org/globalplatform/contactless/javacard/contactless.exp -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.0/gpapi-contactless.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.0/gpapi-contactless.jar -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.1/README.TXT: -------------------------------------------------------------------------------- 1 | November 2011 2 | 3 | Export file for package 'org.globalplatform.contactless' is generated with 4 | AID: 0xA0:0x00:0x00:0x01:051:0x02 5 | Version: 1.1 6 | Backward Compatibility: 1.0 7 | -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.1/exports/org/globalplatform/contactless/javacard/contactless.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.1/exports/org/globalplatform/contactless/javacard/contactless.exp -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.1/gpapi-contactless.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.1/gpapi-contactless.jar -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.2/README.TXT: -------------------------------------------------------------------------------- 1 | Export file for package 'org.globalplatform.contactless' is generated with 2 | AID: 0xA0:0x00:0x00:0x01:051:0x02 3 | Version: 1.2 4 | Backward Compatibility: 1.1 5 | -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.2/exports/org/globalplatform/contactless/javacard/contactless.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.2/exports/org/globalplatform/contactless/javacard/contactless.exp -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.2/gpapi-contactless.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.2/gpapi-contactless.jar -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.3/README.TXT: -------------------------------------------------------------------------------- 1 | Export file for package 'org.globalplatform.filesystem' is generated with 2 | AID: 0xA0:0x00:0x00:0x01:0x51:0x02 3 | Version: 1.3 4 | Backward Compatibility: 1.2 5 | -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.3/exports/org/globalplatform/contactless/javacard/contactless.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.3/exports/org/globalplatform/contactless/javacard/contactless.exp -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.3/gpapi-contactless.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.3/gpapi-contactless.jar -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.4/README.TXT: -------------------------------------------------------------------------------- 1 | Export file for package 'org.globalplatform.contactless' is generated with 2 | AID: 0xA0:0x00:0x00:0x01:0x51:0x02 3 | Version: 1.4 4 | Backward Compatibility: 1.3 5 | -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.4/exports/org/globalplatform/contactless/javacard/contactless.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.4/exports/org/globalplatform/contactless/javacard/contactless.exp -------------------------------------------------------------------------------- /org.globalplatform.contactless-1.4/gpapi-contactless.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.contactless-1.4/gpapi-contactless.jar -------------------------------------------------------------------------------- /org.globalplatform.filesystem-1.0/exports/org/globalplatform/filesystem/javacard/filesystem.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.filesystem-1.0/exports/org/globalplatform/filesystem/javacard/filesystem.exp -------------------------------------------------------------------------------- /org.globalplatform.filesystem-1.0/gpapi-filesystem.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.filesystem-1.0/gpapi-filesystem.jar -------------------------------------------------------------------------------- /org.globalplatform.privacy-1.0/exports/org/globalplatform/privacy/javacard/privacy.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.privacy-1.0/exports/org/globalplatform/privacy/javacard/privacy.exp -------------------------------------------------------------------------------- /org.globalplatform.privacy-1.0/gpapi-privacy.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.privacy-1.0/gpapi-privacy.jar -------------------------------------------------------------------------------- /org.globalplatform.securechannel-1.1/exports/org/globalplatform/securechannel/javacard/securechannel.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.securechannel-1.1/exports/org/globalplatform/securechannel/javacard/securechannel.exp -------------------------------------------------------------------------------- /org.globalplatform.securechannel-1.1/gpapi-scp.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.securechannel-1.1/gpapi-scp.jar -------------------------------------------------------------------------------- /org.globalplatform.securechannel.provider-1.1/exports/org/globalplatform/provider/javacard/provider.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.securechannel.provider-1.1/exports/org/globalplatform/provider/javacard/provider.exp -------------------------------------------------------------------------------- /org.globalplatform.securechannel.provider-1.1/gpapi-scp-provider.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.securechannel.provider-1.1/gpapi-scp-provider.jar -------------------------------------------------------------------------------- /org.globalplatform.upgrade-1.0/README.TXT: -------------------------------------------------------------------------------- 1 | Export file for package 'org.globalplatform.upgrade' is generated with 2 | AID: 0xA0:0x00:0x00:0x01:0x51:0x07 3 | Version: 1.0 4 | Backward Compatibility: N/A 5 | -------------------------------------------------------------------------------- /org.globalplatform.upgrade-1.0/exports/org/globalplatform/upgrade/javacard/upgrade.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.upgrade-1.0/exports/org/globalplatform/upgrade/javacard/upgrade.exp -------------------------------------------------------------------------------- /org.globalplatform.upgrade-1.0/gpapi-upgrade.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.upgrade-1.0/gpapi-upgrade.jar -------------------------------------------------------------------------------- /org.globalplatform.upgrade-1.1/README.TXT: -------------------------------------------------------------------------------- 1 | Export file for package 'org.globalplatform.upgrade' is generated with 2 | AID: 0xA0:0x00:0x00:0x01:0x51:0x07 3 | Version: 1.1 4 | Backward Compatibility: 1.0 5 | -------------------------------------------------------------------------------- /org.globalplatform.upgrade-1.1/exports/org/globalplatform/upgrade/javacard/upgrade.exp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.upgrade-1.1/exports/org/globalplatform/upgrade/javacard/upgrade.exp -------------------------------------------------------------------------------- /org.globalplatform.upgrade-1.1/gpapi-upgrade.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OpenJavaCard/globalplatform-exports/13284a6afc8f6ed6905059172645c1e0e175953a/org.globalplatform.upgrade-1.1/gpapi-upgrade.jar --------------------------------------------------------------------------------