Home | History | Annotate | Download | only in regress
      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
     24