diff options
Diffstat (limited to 'scripts/tps-enroll.sh')
-rwxr-xr-x | scripts/tps-enroll.sh | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/scripts/tps-enroll.sh b/scripts/tps-enroll.sh index 78c9212..73f9d44 100755 --- a/scripts/tps-enroll.sh +++ b/scripts/tps-enroll.sh @@ -1,18 +1,34 @@ #!/bin/sh +uid=$1 +cuid=$2 + +if [ "$cuid" == "" ]; then + #cuid=a00192030405060708c9 + 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=7888 -op=var_set name=ra_uri value=/nk_service +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_set cuid=$cuid msn=01020304 app_ver=6FBBC105 key_info=0101 major_ver=0 minor_ver=0 -op=token_set cuid=a00192030405060708c9 msn=01020304 app_ver=6FBBC105 key_info=0101 major_ver=0 minor_ver=0 op=token_set auth_key=404142434445464748494a4b4c4d4e4f op=token_set mac_key=404142434445464748494a4b4c4d4e4f op=token_set kek_key=404142434445464748494a4b4c4d4e4f -op=token_status -op=ra_enroll uid=testuser num_threads=1 pwd=Secret123 new_pin=Secret123 op=token_status +op=ra_enroll uid=$uid pwd=Secret123 new_pin=Secret123 num_threads=1 extensions=tokenType=userKey + +#op=token_status + op=exit EOF |