Added JavaCard stuff.

master
Eric Butler 10 years ago
parent 1ea9c1c433
commit febca32896
  1. 1
      .gitignore
  2. 5
      README.md
  3. 6
      bin/converter
  4. 4
      bin/shadysim
  5. BIN
      javacard/api21_export_files/java/lang/javacard/lang.exp
  6. BIN
      javacard/api21_export_files/javacard/framework/javacard/framework.exp
  7. BIN
      javacard/api21_export_files/javacard/security/javacard/security.exp
  8. BIN
      javacard/api21_export_files/javacardx/crypto/javacard/crypto.exp
  9. BIN
      javacard/api21_export_files/sim/access/javacard/access.exp
  10. 3272
      javacard/api21_export_files/sim/access/javacard/access_exp.tex
  11. BIN
      javacard/api21_export_files/sim/toolkit/javacard/toolkit.exp
  12. 5946
      javacard/api21_export_files/sim/toolkit/javacard/toolkit_exp.tex
  13. BIN
      javacard/bin/converter.jar
  14. BIN
      javacard/lib/api21.jar
  15. BIN
      javacard/lib/sim.jar
  16. 44
      javacard/makefiles/applet-project.mk
  17. 0
      shadysim/pySim/__init__.py
  18. 0
      shadysim/pySim/cards.py
  19. 0
      shadysim/pySim/commands.py
  20. 0
      shadysim/pySim/exceptions.py
  21. 0
      shadysim/pySim/transport/__init__.py
  22. 0
      shadysim/pySim/transport/pcsc.py
  23. 0
      shadysim/pySim/transport/serial.py
  24. 0
      shadysim/pySim/utils.py
  25. 0
      shadysim/shadysim.py

1
.gitignore vendored

@ -7,7 +7,6 @@ dist
build
eggs
parts
bin
var
sdist
develop-eggs

@ -1,2 +1,3 @@
sim-tools
=========
# Shadytel SIM Tools
Put README here.

@ -0,0 +1,6 @@
DIR=`dirname $0`
CLASSPATH=$DIR/../javacard/bin/converter.jar:$CLASSPATH
JFLAGS="-classpath $CLASSPATH"
java $JFLAGS com.sun.javacard.converter.Converter "$@"

@ -0,0 +1,4 @@
#!/bin/bash
DIR=`dirname $0`
python $DIR/../shadysim/shadysim.py $@

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -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
Loading…
Cancel
Save