https://github.com/vletoux/gidsapplet
Generic Identity Device Specification Applet
https://github.com/vletoux/gidsapplet
Last synced: about 1 year ago
JSON representation
Generic Identity Device Specification Applet
- Host: GitHub
- URL: https://github.com/vletoux/gidsapplet
- Owner: vletoux
- License: gpl-3.0
- Created: 2016-01-10T09:00:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-12-28T18:55:30.000Z (over 2 years ago)
- Last Synced: 2025-02-27T17:46:08.710Z (over 1 year ago)
- Language: Java
- Size: 1.14 MB
- Stars: 105
- Watchers: 15
- Forks: 38
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GidsApplet
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](https://www.mysmartlogon.com/generic-identity-device-specification-gids-smart-card/) 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](https://www.mysmartlogon.com/generic-identity-device-specification-gids-smart-card/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](https://github.com/vletoux/GidsApplet/releases)
## Installation on the smart card
Install the CAP-file (GidsApplet.cap) to your Java Card smartcard (e.g. with [GlobalPlatformPro](https://github.com/martinpaljak/GlobalPlatformPro)).
The release section includes compiled version of the applet.
Most of the time, the applet can be installed with the command:
```sh
gp --install GidsApplet.cap --default
```
Some cards require additional switch like for G&D `-emv` or Gemalto `-visa2 -key`. See this [page](https://github.com/martinpaljak/GlobalPlatformPro/tree/master/docs/TestedCards) 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](https://github.com/martinpaljak/ant-javacard).
The continuous integration platform script ([.travis.yml](.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](https://marketplace.visualstudio.com/items?itemName=nickheap.vscode-ant)
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](http://msdn.microsoft.com/en-us/library/windows/hardware/dn642100%28v=vs.85%29.aspx)
* [minidriver specification](http://msdn.microsoft.com/en-us/library/windows/hardware/dn631754%28v=vs.85%29.aspx) (for card initialization)