set IDENT [lindex $argv 0] set CERT [lindex $argv 1] set ALGO [lindex $argv 2] set timeout 120 spawn target/debug/oct admin --card "$IDENT" generate --output "$CERT" --userid test@example.org "$ALGO" expect "Enter Admin PIN:" send -- "12345678\r" expect "Enter User PIN:" send -- "123456\r" expect " Generate subkey for Signing" expect " Generate subkey for Decryption" expect " Generate subkey for Authentication" expect eof spawn sh tests/enc.sh "$CERT" enc.msg expect eof spawn target/debug/oct decrypt --card "$IDENT" enc.msg expect "Enter User PIN:" send -- "123456\r" expect "hello" expect eof spawn sh tests/sig-inl.sh "$IDENT" inline.sig expect "Enter User PIN:" send -- "123456\r" expect eof spawn sh tests/ver-inl.sh inline.sig "$CERT" expect "hi there" expect eof spawn sh tests/sig-det.sh "$IDENT" "detached.sig" expect "Enter User PIN:" send -- "123456\r" expect eof spawn sh tests/ver-det.sh detached.sig "$CERT" expect -re {mode:binary} expect eof