Command Line Tutorial, Advanced - martinpaljak/JCardEngine GitHub Wiki

Connecting Oracle Java Card Simulator to VSmartCard

Oracle Java Card Simulator runs only on Linux (x86) and Windows, and the PC/SC adapter is only available on Linux (x86).

If you have configured VSmartCard on your host, you can use jcard to connect to Oracle's Simulator from any platform supported by vsmartcard.

java -jar jcard.jar --passthrough-host 192.168.100.23

Running Oracle Java Card Simulator on Linux

# Export necessary variables
export JC_HOME_SIMULATOR=$HOME/jcsdksim
export LD_LIBRARY_PATH=$JC_HOME_SIMULATOR/runtime/bin
# Support legacy DES
export OPENSSL_MODULES=$JC_HOME_SIMULATOR/runtime/bin
# Configure simulator with default keys for GPPro
java -jar $JC_HOME_SIMULATOR/tools/Configurator.jar \
-binary $JC_HOME_SIMULATOR/runtime/bin/jcsl \
-force -verbose \
-SCP-keyset 30 404142434445464748494a4b4c4d4e4f 404142434445464748494a4b4c4d4e4f 404142434445464748494a4b4c4d4e4f

Now run the simulator (default port is 9025, which can be changed with -p=9025)

$JC_HOME_SIMULATOR/runtime/bin/jcsl

[!TIP] Run the simulator from screen or tmux to keep it running.

[!NOTE] Make sure that firewalls don't block connecting from remote hosts to simulator (ufw allow 9025/tcp) or tunnel traffic with SSH (ssh -L 9025:127.0.0.1:9025 [email protected])