blob: 25ee2441454f4292d03d752ec8cfe55d9a93ce80 [file] [log] [blame]
#!/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