mirror of
https://github.com/status-im/status-keycard.git
synced 2025-01-11 14:24:36 +00:00
add scripts to install on card and a smoke test
This commit is contained in:
parent
d977bac7f9
commit
9427ccf48c
11
README.md
Normal file
11
README.md
Normal file
@ -0,0 +1,11 @@
|
||||
# JavaCard Hardware Wallet
|
||||
|
||||
Currently just a skeleton for the hardware wallet.
|
||||
|
||||
The .gpshell files are meant to be fed to GPShell. The statuswallet_install.gpshell file is actually dependent on the
|
||||
target hw. Currently it assumes that the default VISA AID and keys for the ISD are used, but the version number is 2.
|
||||
|
||||
Other files will come and go until they are formalized as test scripts when we have a meaningful specification
|
||||
and implementation.
|
||||
|
||||
The project is built using Gradle with the [Fidesmo Javacard Gradle plugin](https://github.com/fidesmo/gradle-javacard).
|
10
scripts/statuswallet_install.gpshell
Normal file
10
scripts/statuswallet_install.gpshell
Normal file
@ -0,0 +1,10 @@
|
||||
mode_211
|
||||
enable_trace
|
||||
establish_context
|
||||
card_connect
|
||||
select -AID A000000003000000
|
||||
open_sc -security 1 -keyind 0 -keyver 2 -mac_key 404142434445464748494a4b4c4d4e4f -enc_key 404142434445464748494a4b4c4d4e4f -kek_key 404142434445464748494a4b4c4d4e4f
|
||||
send_apdu_nostop -sc 1 -APDU 80E400800E4F0C53746174757357616C6C6574
|
||||
install -file ../build/javacard/im/status/wallet/javacard/wallet.cap -AID 53746174757357616C6C6574417070 -instAID 53746174757357616C6C6574417070
|
||||
card_disconnect
|
||||
release_context
|
8
scripts/statuswallet_smoketest.gpshell
Normal file
8
scripts/statuswallet_smoketest.gpshell
Normal file
@ -0,0 +1,8 @@
|
||||
mode_211
|
||||
enable_trace
|
||||
establish_context
|
||||
card_connect
|
||||
select -AID 53746174757357616C6C6574417070
|
||||
send_apdu_nostop -APDU 80AA008000
|
||||
card_disconnect
|
||||
release_context
|
@ -15,6 +15,11 @@ public class WalletApplet extends Applet {
|
||||
}
|
||||
|
||||
public void process(APDU apdu) throws ISOException {
|
||||
if (selectingApplet()) {
|
||||
apdu.setIncomingAndReceive();
|
||||
return;
|
||||
}
|
||||
|
||||
ISOException.throwIt(ISO7816.SW_INS_NOT_SUPPORTED);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user