summaryrefslogtreecommitdiff
path: root/regress/keygen-change.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-01-22 17:53:16 +1100
committerDamien Miller <djm@mindrot.org>2003-01-22 17:53:16 +1100
commit8b9cde784784949f9fdf0451f9da9030b76ca705 (patch)
tree9bf6279aa53922b3a251a5ca6d5f26c929a55251 /regress/keygen-change.sh
parente9b7d720c8de6c293a3632c1fbf02cfa9c542923 (diff)
- (djm) Sync regress with OpenBSD -current
Diffstat (limited to 'regress/keygen-change.sh')
-rw-r--r--regress/keygen-change.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/regress/keygen-change.sh b/regress/keygen-change.sh
new file mode 100644
index 00000000..08d35902
--- /dev/null
+++ b/regress/keygen-change.sh
@@ -0,0 +1,23 @@
+# $OpenBSD: keygen-change.sh,v 1.2 2002/07/16 09:15:55 markus Exp $
+# Placed in the Public Domain.
+
+tid="change passphrase for key"
+
+S1="secret1"
+S2="2secret"
+
+for t in rsa dsa rsa1; do
+ # generate user key for agent
+ trace "generating $t key"
+ rm -f $OBJ/$t-key
+ ${SSHKEYGEN} -q -N ${S1} -t $t -f $OBJ/$t-key
+ if [ $? -eq 0 ]; then
+ ${SSHKEYGEN} -p -P ${S1} -N ${S2} -f $OBJ/$t-key > /dev/null
+ if [ $? -ne 0 ]; then
+ fail "ssh-keygen -p failed for $t-key"
+ fi
+ else
+ fail "ssh-keygen for $t-key failed"
+ fi
+ rm -f $OBJ/$t-key $OBJ/$t-key.pub
+done