summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2014-06-30 12:54:40 +0000
committerDamien Miller <djm@cvs.openbsd.org>2014-06-30 12:54:40 +0000
commit36ca50bbd96c6964d74784a8964a0b46b7165427 (patch)
treecc0533cbcbe8d3a8ed629d57f2e55baf0adba3cd /usr.bin
parent1efcd0cd94d84d1164c7f2aeb7c93bb54ce8141f (diff)
suppress spurious error message when loading key with a passphrase;
reported by kettenis@ ok markus@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/key.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c
index c5a69348c41..55271c7bcac 100644
--- a/usr.bin/ssh/key.c
+++ b/usr.bin/ssh/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.118 2014/06/24 01:13:21 djm Exp $ */
+/* $OpenBSD: key.c,v 1.119 2014/06/30 12:54:39 djm Exp $ */
/*
* placed in the public domain
*/
@@ -417,7 +417,8 @@ key_load_private_type(int type, const char *filename, const char *passphrase,
if ((r = sshkey_load_private_type(type, filename, passphrase,
&ret, commentp, perm_ok)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
- if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT)
+ if ((r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) ||
+ (r == SSH_ERR_KEY_WRONG_PASSPHRASE))
debug("%s: %s", __func__, ssh_err(r));
else
error("%s: %s", __func__, ssh_err(r));