blob: 08d35902301b3ec27d8b712b1cc9821dd5d6c6e6 [file] [log] [blame]
Damien Miller8b9cde72003-01-22 17:53:16 +11001# $OpenBSD: keygen-change.sh,v 1.2 2002/07/16 09:15:55 markus Exp $
2# Placed in the Public Domain.
3
4tid="change passphrase for key"
5
6S1="secret1"
7S2="2secret"
8
9for 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
23done