summaryrefslogtreecommitdiffstats
path: root/scripts/tps-format.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/tps-format.sh')
-rwxr-xr-xscripts/tps-format.sh25
1 files changed, 20 insertions, 5 deletions
diff --git a/scripts/tps-format.sh b/scripts/tps-format.sh
index 4e0d971..6f7be24 100755
--- a/scripts/tps-format.sh
+++ b/scripts/tps-format.sh
@@ -1,21 +1,36 @@
#!/bin/sh
+uid=$1
+cuid=$2
+
+if [ "$cuid" == "" ]; then
+ #cuid=a00192030405060708c9
+ #cuid=A7D05D2BA7D1AFB4E7C1
+ cuid=`hexdump -v -n "10" -e '1/1 "%02x"' /dev/urandom`
+fi
+
+echo $cuid
+
tpsclient <<EOF
op=var_set name=ra_host value=localhost
-op=var_set name=ra_port value=16080
+op=var_set name=ra_port value=8080
op=var_set name=ra_uri value=/tps/tps
op=var_list
-op=token_status
+#op=token_status
+
+op=token_set cuid=$cuid msn=01020304 app_ver=6FBBC105 key_info=0101 major_ver=0 minor_ver=0
+#op=token_set cuid=$cuid app_ver=6FBBC105 key_info=0101
-op=token_set cuid=a00192030405060708c9 app_ver=6FBBC105 key_info=0101
op=token_set auth_key=404142434445464748494a4b4c4d4e4f
op=token_set mac_key=404142434445464748494a4b4c4d4e4f
op=token_set kek_key=404142434445464748494a4b4c4d4e4f
+
op=token_status
-op=ra_format uid=test pwd=password num_threads=1 new_pin=password
+op=ra_format uid=$uid pwd=Secret123 new_pin=Secret123 num_threads=1 extensions=tokenType=userKey
+
+#op=token_status
-op=token_status
op=exit
EOF