From Fedora Directory Server
Return tool the CoolKey page.
Contents |
[edit]
General Prerequisites
You will need the following packages for your platform (Linux or Windows):
- JDK 1.3.1 available from http://java.sun.com/j2se/1.3/download.html.
- Select the 'Download' for the SDK (not the JRE).
- Accept the License.
- Select the appropriate version for your platform (Linux or Windows).
- Be sure to not where the JDK is installed.
- Javacard 2.2.1 available from http://java.sun.com/products/javacard/dev_kit.html.
- Select Javacard 2.2.1 Download
- Accept the License.
- Select the appropriate version for your platform (Linux or Windows).
- Again note where you install Javacard (In this case it's just a tar or zip file).
- Cyberflex Access SDK available from http://www.cyberflex.com/Products/sdk_4_1.html for purchase. You don't need the full toolkit, only the following files.
- Classlibrary/jc_api_212.jar
- Toolkit/PRGMaker/makeijc.jar
- Toolkit/PRGMaker/Export Files/java/lang/javacard/lang.exp
- Toolkit/PRGMaker/Export Files/javacard/framework/javacard/framework.exp
- Toolkit/PRGMaker/Export Files/javacard/security/javacard/security.exp
- Toolkit/PRGMaker/Export Files/javacardx/crypto/javacard/crypto.exp
- Toolkit/PRGMaker/Export Files/visa/openplatform/javacard/openplatform.exp
- Open Platform available from http://www.globalplatform.org/specifications/archived/card-tech-201.zip.
[edit]
Windows Prerequisites
A unix environment like MKS or cygwin. You will need a version of perl.
[edit]
Setup
- Install JDK 1.3.1, Javacard 2.2.
- Set the environment variable JAVA_HOME to the location of the JDK 1.3.1.
- On SELinux (like Fedora or RHEL) you will need to go to $(JAVA_HOME)/jre/lib/i386 and type chcon -t texrel_shlib_t *.so nativethread/libhpi.so.
- Set the environment variable JAVACARD_KIT_DIR to the location of Javacard 2.2.
- Install Cyberflex Access SDK. If you are on Linux you only need the following files:
- Classlibrary/jc_api_212.jar
- Toolkit/PRGMaker/makeijc.jar
- Toolkit/PRGMaker/Export Files/java/lang/javacard/lang.exp
- Toolkit/PRGMaker/Export Files/javacard/framework/javacard/framework.exp
- Toolkit/PRGMaker/Export Files/javacard/security/javacard/security.exp
- Toolkit/PRGMaker/Export Files/javacardx/crypto/javacard/crypto.exp
- Toolkit/PRGMaker/Export Files/visa/openplatform/javacard/openplatform.exp
- Set the environment variable SLB_JAVA_DIR to the location of the above files. On windows, after an install this is typically C:/Program Files/Schlumberger/Smart Cards and Terminals/Cyberflex Access Kits/v4 .
- Install Open Platform by unzipping card-tech-201.zip.
- Unzip op20iad6.zip in a known directory.
- Set OPEN_PLATFORM_DIR to that known directory.
[edit]
Building
In the root directory type:
make
The applet will be placed in .libs .
[edit]
Create your load files manually, without Axalto tools
- Use the converter tool from Java Card Development Kit 2.1.2
CardEdge.opt may look like this:
-out EXP JCA CAP -exportpath . -applet 0xa0:0x0:0x0:0x0:0x1:0x1 com.sun.javacard.samples.CardEdge.CardEdge com.sun.javacard.samples.CardEdge 0xa0:0x0:0x0:0x0:0x1 1.0
- (Mandatory for e-gate cards, see http://www.trusted-logic.com/down.php) java -jar captransf.jar lang.exp framework.exp security.exp cryto.exp -noint CardEdge.cap
- Unjar the generated *.cap file: jar xvf CardEdge.cap.transf
- Concatenate CAP files to one load file in reference order, see http://java.sun.com/products/javacard/specs.html:
- copy Header.cap + Directory.cap + Import.cap + Applet.cap + Class.cap + Method.cap + StaticField.cap + ConstantPool.cap + RefLocation.cap + Descriptor.cap CardEdge.bin
or with cat
- cat Header.cap Directory.cap Import.cap Applet.cap Class.cap Method.cap StaticField.cap ConstantPool.cap RefLocation.cap Descriptor.cap > CardEdge.bin
[edit]
To Do
Many of the prerequisite components are not FOSS, and many are older versions that are scheduled to be phased out. The following tasks would make this applet better for the community as a whole.
- Get the applet to build and run using a freely available java SDK like gcj or ibm's java sdk.
- An open source version of the javacard api.
- An open source version of the global platform api.
- An open source/free version of the Axalto tools.
