diff options
Diffstat (limited to 'regress/keygen-change.sh')
-rw-r--r-- | regress/keygen-change.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/keygen-change.sh b/regress/keygen-change.sh new file mode 100644 index 000000000..08d359023 --- /dev/null +++ b/regress/keygen-change.sh | |||
@@ -0,0 +1,23 @@ | |||
1 | # $OpenBSD: keygen-change.sh,v 1.2 2002/07/16 09:15:55 markus Exp $ | ||
2 | # Placed in the Public Domain. | ||
3 | |||
4 | tid="change passphrase for key" | ||
5 | |||
6 | S1="secret1" | ||
7 | S2="2secret" | ||
8 | |||
9 | for t in rsa dsa rsa1; do | ||
10 | # generate user key for agent | ||
11 | trace "generating $t key" | ||
12 | rm -f $OBJ/$t-key | ||
13 | ${SSHKEYGEN} -q -N ${S1} -t $t -f $OBJ/$t-key | ||
14 | if [ $? -eq 0 ]; then | ||
15 | ${SSHKEYGEN} -p -P ${S1} -N ${S2} -f $OBJ/$t-key > /dev/null | ||
16 | if [ $? -ne 0 ]; then | ||
17 | fail "ssh-keygen -p failed for $t-key" | ||
18 | fi | ||
19 | else | ||
20 | fail "ssh-keygen for $t-key failed" | ||
21 | fi | ||
22 | rm -f $OBJ/$t-key $OBJ/$t-key.pub | ||
23 | done | ||