aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2018-06-15 07:31:50 +0200
committerDaniel Willmann <daniel@totalueberwachung.de>2019-09-03 20:11:48 +0200
commitf432b2ba9696fe965a3dc093a9bcdbc72eccb37d (patch)
tree5a15c323cf6e2ccc825f53c00484b9532bd95530 /tests
parentc46a4eba43facc98666c3ce0fbb6455823d87aca (diff)
pySim-prog: Add option for hex ADM keys
pySim-prog would implicitly try to use the raw or hex-escaped format depending on the length of the parameter, now there is the option "-A" to explicitly specify the hex-escaped ADM1 key. pysim-test.sh: Explicitly use the "-A" option to pass the hex adm1 key for wavemobile cards Change-Id: Id75a03482aa7f8cc3bdbb8d5967f1e8ab45c179a
Diffstat (limited to 'tests')
-rw-r--r--tests/Wavemobile-SIM.data.example2
-rwxr-xr-xtests/pysim-test.sh9
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/Wavemobile-SIM.data.example b/tests/Wavemobile-SIM.data.example
index e9ba965..bdf2d65 100644
--- a/tests/Wavemobile-SIM.data.example
+++ b/tests/Wavemobile-SIM.data.example
@@ -1,5 +1,5 @@
MCC=001
MNC=01
IMSI=001010000000102
-ADM=0123456789ABCDEF
+ADM_HEX=0123456789ABCDEF
diff --git a/tests/pysim-test.sh b/tests/pysim-test.sh
index 5af7a93..f97722d 100755
--- a/tests/pysim-test.sh
+++ b/tests/pysim-test.sh
@@ -156,9 +156,14 @@ function run_test {
OPC=FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
IMSI=001010000000001
ADM=00000000
+ ADM_OPT="-a"
- . "$CARD_NAME.data"
- python $PYSIM_PROG -p $I -t $CARD_NAME -o $OPC -k $KI -x $MCC -y $MNC -i $IMSI -s $ICCID -a $ADM
+ source "$CARD_NAME.data"
+ if [ -n "$ADM_HEX" ]; then
+ ADM_OPT="-A"
+ ADM=$ADM_HEX
+ fi
+ python $PYSIM_PROG -p $I -t $CARD_NAME -o $OPC -k $KI -x $MCC -y $MNC -i $IMSI -s $ICCID $ADM_OPT $ADM
check_card $I $CARD_NAME
echo ""
done