1
0
mirror of https://github.com/opencryptoki/opencryptoki.git synced 2026-10-24 05:39:17 +03:00
Files
opencryptoki/testcases/init_token.sh
2005-09-13 18:43:13 +00:00

60 lines
967 B
Bash
Executable File

#!/usr/bin/expect -f
set timeout 5
spawn pkcsconf -c [lindex $argv 0] -I
expect "Enter the SO PIN: "
sleep .1
send "87654321\r"
sleep .1
expect "label: "
sleep .1
send "ibmtest\r"
sleep .1
expect eof
spawn pkcsconf -c [lindex $argv 0] -P
expect "Enter the SO PIN: "
sleep .1
send "87654321\r"
sleep .1
expect "Enter the new SO PIN: "
sleep .1
send "76543210\r"
sleep .1
expect "Re-enter the new SO PIN: "
sleep .1
send "76543210\r"
sleep .1
expect eof
spawn pkcsconf -c [lindex $argv 0] -u
expect "Enter the SO PIN: "
sleep .1
send "76543210\r"
sleep .1
expect "Enter the new user PIN: "
sleep .1
send "12345678\r"
sleep .1
expect "Re-enter the new user PIN: "
sleep .1
send "12345678\r"
sleep .1
expect eof
spawn pkcsconf -c [lindex $argv 0] -p
expect "Enter user PIN: "
sleep .1
send "12345678\r"
sleep .1
expect "Enter the new user PIN: "
sleep .1
send "01234567\r"
sleep .1
expect "Re-enter the new user PIN: "
sleep .1
send "01234567\r"
sleep .1
expect eof