From 3e0e8f884f1ed37e120beeb57aa7cd79e3c145a0 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 11 Aug 1998 17:29:34 +0000 Subject: bug fix release --- checks/genkey1024.test | 122 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 79 insertions(+), 43 deletions(-) (limited to 'checks/genkey1024.test') diff --git a/checks/genkey1024.test b/checks/genkey1024.test index faaea2d1b..ee282b28e 100755 --- a/checks/genkey1024.test +++ b/checks/genkey1024.test @@ -2,59 +2,95 @@ . defs.inc || exit 3 -info "This expect script does not yet work" -info "Please, all those expect gurus, can you help me with it?" -exit 0 - expect - < = key expires in n days\r + w = key expires in n weeks\r + m = key expires in n months\r + y = key expires in n years\r +Key is valid for? (0) " { send -- "1\r" } + timeout { exit 1 } } +expect { + -exact "1\r +\r \rKey expires at " { } + timeout { exit 1 } } +expect { + -re "(.*)\r +" {} + timeout { exit 1 } } +expect { + -exact "Is this correct (y/n)? " { send -- "y\r" } + timeout { exit 1 } } +expect { + -exact "y\r +\r \r\r You need a User-ID to identify your key; the software constructs the user id\r from Real Name, Comment and Email Address in this form:\r - \"Heinrich Heine (Der Dichter) \"\r + \"Heinrich Heine (Der Dichter) \"\r \r -Real name: " -send -- "Harry H.\r" -expect -exact "Harry H.\r -\r \rEmail address: " -send -- "hh@ddorf.de\r" -expect -exact "hh@ddorf.de\r -\r \rComment: " -send -- "a test\r" -expect -exact "a test\r -\r \rYou selected this USER-ID:\r +Real name: " { send -- "Harry H.\r" } + timeout { exit 1 } } +expect { + -exact "Harry H.\r +\r \rEmail address: " { send -- "hh@ddorf.de\r" } + timeout { exit 1 } } +expect { + -exact "hh@ddorf.de\r +\r \rComment: " { send -- "a test\r" } + timeout { exit 1 } } +expect { + -exact "a test\r +\r \rYou selected this USER-ID:\r \"Harry H. (a test) (INSECURE!)\"\r \r -Edit (N)ame, (C)omment, (E)mail or (O)kay? " -send -- "o\r" -expect -exact "o\r -\r \rYou need a Passphrase to protect your secret key.\r +Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? " { send -- "o\r" } + timeout { exit 1 } } +expect { + -exact "o\r +\r \rYou need a Passphrase to protect your secret key.\r \r -Enter pass phrase: " -send -- "abc\r" -expect -ex "abc\r\n" -expect -ex "\r \rRepeat pass phrase:\ " -send -- "abc\r" -expect -ex "abc\r\n" -expect { - -ex "public and secret key created and signed.\r" - eof abort +Enter pass phrase: " { sleep 1; send -- "abc\r" } + timeout { exit 1 } } +expect { + -ex "\r \rRepeat pass phrase: " { sleep 1; send -- "abc\r" } + timeout { exit 1 } } +expect { + -ex "\r \rWe need to generate a lot of random bytes. It is a good idea to perform\r +some other action (work in another window, move the mouse, utilize the\r +network and the disks) during the prime generation; this gives the random\r +number generator a better chance to gain enough entropy.\r" {} + timeout { exit 1 } } +set timeout 120 +expect { + -ex "public and secret key created and signed.\r" { exit 0 } + eof { exit 1 } } +exit 1 EOF -- cgit v1.2.3