summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
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));