Added JavaCard stuff.
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -7,7 +7,6 @@ dist
|
||||
build
|
||||
eggs
|
||||
parts
|
||||
bin
|
||||
var
|
||||
sdist
|
||||
develop-eggs
|
||||
|
||||
6
bin/converter
Executable file
6
bin/converter
Executable file
@@ -0,0 +1,6 @@
|
||||
DIR=`dirname $0`
|
||||
|
||||
CLASSPATH=$DIR/../javacard/bin/converter.jar:$CLASSPATH
|
||||
JFLAGS="-classpath $CLASSPATH"
|
||||
|
||||
java $JFLAGS com.sun.javacard.converter.Converter "$@"
|
||||
4
bin/shadysim
Executable file
4
bin/shadysim
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
DIR=`dirname $0`
|
||||
python $DIR/../shadysim/shadysim.py $@
|
||||
BIN
javacard/api21_export_files/java/lang/javacard/lang.exp
Normal file
BIN
javacard/api21_export_files/java/lang/javacard/lang.exp
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
javacard/api21_export_files/javacardx/crypto/javacard/crypto.exp
Normal file
BIN
javacard/api21_export_files/javacardx/crypto/javacard/crypto.exp
Normal file
Binary file not shown.
BIN
javacard/api21_export_files/sim/access/javacard/access.exp
Normal file
BIN
javacard/api21_export_files/sim/access/javacard/access.exp
Normal file
Binary file not shown.
3272
javacard/api21_export_files/sim/access/javacard/access_exp.tex
Normal file
3272
javacard/api21_export_files/sim/access/javacard/access_exp.tex
Normal file
File diff suppressed because it is too large
Load Diff
BIN
javacard/api21_export_files/sim/toolkit/javacard/toolkit.exp
Normal file
BIN
javacard/api21_export_files/sim/toolkit/javacard/toolkit.exp
Normal file
Binary file not shown.
5946
javacard/api21_export_files/sim/toolkit/javacard/toolkit_exp.tex
Normal file
5946
javacard/api21_export_files/sim/toolkit/javacard/toolkit_exp.tex
Normal file
File diff suppressed because it is too large
Load Diff
BIN
javacard/bin/converter.jar
Normal file
BIN
javacard/bin/converter.jar
Normal file
Binary file not shown.
BIN
javacard/lib/api21.jar
Normal file
BIN
javacard/lib/api21.jar
Normal file
Binary file not shown.
BIN
javacard/lib/sim.jar
Executable file
BIN
javacard/lib/sim.jar
Executable file
Binary file not shown.
44
javacard/makefiles/applet-project.mk
Normal file
44
javacard/makefiles/applet-project.mk
Normal file
@@ -0,0 +1,44 @@
|
||||
BUILD_DIR = ./build
|
||||
BUILD_CLASSES_DIR = $(BUILD_DIR)/classes
|
||||
BUILD_JAVACARD_DIR = $(BUILD_DIR)/javacard
|
||||
JAVACARD_EXPORT_DIR = $(JAVACARD_SDK_DIR)/api21_export_files
|
||||
CLASSPATH = $(JAVACARD_SDK_DIR)/lib/api21.jar:$(JAVACARD_SDK_DIR)/lib/sim.jar
|
||||
JFLAGS = -target 1.1 -source 1.3 -g -d $(BUILD_CLASSES_DIR) -classpath $(CLASSPATH)
|
||||
JC = javac
|
||||
|
||||
.SUFFIXES: .java .class
|
||||
.java.class:
|
||||
mkdir -p $(BUILD_CLASSES_DIR)
|
||||
mkdir -p $(BUILD_JAVACARD_DIR)
|
||||
|
||||
$(JC) $(JFLAGS) $*.java
|
||||
|
||||
$(JAVACARD_SDK_DIR)/bin/converter \
|
||||
-d $(BUILD_JAVACARD_DIR) \
|
||||
-classdir $(BUILD_CLASSES_DIR) \
|
||||
-exportpath $(JAVACARD_EXPORT_DIR) \
|
||||
-applet $(APPLET_AID) $(APPLET_NAME) \
|
||||
$(PACKAGE_NAME) $(PACKAGE_AID) $(PACKAGE_VERSION)
|
||||
|
||||
default: classes
|
||||
|
||||
classes: $(SOURCES:.java=.class)
|
||||
|
||||
clean:
|
||||
$(RM) -rf $(BUILD_DIR)
|
||||
|
||||
install:
|
||||
$(eval CAP_FILE := $(shell find $(BUILD_JAVACARD_DIR) -name *.cap))
|
||||
$(eval MODULE_AID := $(shell echo $(APPLET_AID) | sed 's/0x//g' | sed 's/\://g'))
|
||||
$(eval INSTANCE_AID := $(shell echo $(APPLET_AID) | sed 's/0x//g' | sed 's/\://g'))
|
||||
python ../sim-tools/toorsimtool.py \
|
||||
--serial /dev/ttyUSB0 \
|
||||
-l $(CAP_FILE) \
|
||||
-i $(CAP_FILE) \
|
||||
--enable-sim-toolkit \
|
||||
--module-aid $(MODULE_AID) \
|
||||
--instance-aid $(INSTANCE_AID) \
|
||||
--nonvolatile-memory-required 0100 \
|
||||
--volatile-memory-for-install 0100 \
|
||||
--max-menu-entry-text 10 \
|
||||
--max-menu-entries 01
|
||||
0
toorsimtool.py → shadysim/shadysim.py
Normal file → Executable file
0
toorsimtool.py → shadysim/shadysim.py
Normal file → Executable file
Reference in New Issue
Block a user