Awesome
GidsApplet
<!-- GidsApplet: A Java Card implementation of the GIDS (Generic Identity Device Specification) specification https://msdn.microsoft.com/en-us/library/windows/hardware/dn642100%28v=vs.85%29.aspx Copyright (C) 2016 Vincent Le Toux(vincent.letoux@mysmartlogon.com) SPDX-License-Identifier: GPL-3.0-or-later -->Generic Identity Device Specification (GIDS) smart card is the only PKI smart card whose driver is integrated on each Windows since Windows 7 SP1 and which can be used read and write. No Windows driver installation is required and this card can be used instantly.
My Smart Logon is providing free of charge a javacard applet to transform a java card into a GIDS smart card and its integration in OpenSC for other operating systems (Linux, MacOSX, …).
3 years of use without any bug reported!
General requirements
- Card requirements
- Java Card version 2.2.1 or above (see the list of tested cards)
- Implementation of the "requestObjectDeletion()"-mechanism of the Java Card API is recommended to be able to properly delete files.
- Requirements to use the card
- Windows 7 SP1 / 2008 R2 or later for the "minidriver"
- OpenSC (any platform) for pkcs11
Download
Download GidsApplet.cap
Installation on the smart card
Install the CAP-file (GidsApplet.cap) to your Java Card smartcard (e.g. with GlobalPlatformPro). The release section includes compiled version of the applet.
Most of the time, the applet can be installed with the command:
gp --install GidsApplet.cap --default
Some cards require additional switch like for G&D -emv
or Gemalto -visa2 -key
. See this page for more details.
MANY UNSUCCESSFUL GP COMMANDS (approx 10) CAN BRICK YOUR CARD. Contact your manufacturer for more information.
Building
General instructions
You can use the card SDK to build the applet or ant-javacard.
The continuous integration platform script (.travis.yml) can be executed to build the applet.
You will need to use JDK 11 to build.
Building using VSCode
Install VSCode
Copy the code to a directory. Make sure you are downloading the submodules inside the ext directory.
Aka run git submodule update --init --recursive
. If you download the source code as a .zip directly, the submodules will not be downloaded.
go to (https://aka.ms/vscode-java-installer-win) and run the installer to add the Coding Pack for java
Once VSCode reloaded, install a JDK
Select 11 Lts
and install it. Make sure JAVA_HOME will be populated.
Install the extension Ant Target Runner
Right click on the dist target on the Ant Target Runner at the bottom left and build
The applet will be built automatically
Note: the ant build script will automatically download the packages that are needed to build the code
Running unit tests
Click on the "Lab" icon to display the unit test section of VSCode
Select JUnit as the unit test framework
The JUnit package will be automatically downloaded, and that will fixes the missing JUnit imports in the code.
Known problems when building using VSCode
Getting a SDK mismatch
The ant complains about another SDK being used
Solution:
You can change the runtime version when compiling
You can also make sure that the JAVA_HOME environment variable points to the JDK 11. Here is a way to be sure that the variable is correctly set (don't forget to reboot vscode after any change).
The import javax.smartcardio cannot be resolved
The module java.smartcardio and javax.xml may not be found.
TODO: provide a step by step solution
Reference
- GIDS specification
- minidriver specification (for card initialization)