summaryrefslogtreecommitdiffstats
path: root/key.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2014-07-18 15:03:49 +1000
committerDamien Miller <djm@mindrot.org>2014-07-18 15:03:49 +1000
commitdad9a4a0b7c2b5d78605f8df28718f116524134e (patch)
treede8e8c43ecbc142a286686289f576de11e9aeeeb /key.c
parentf42f7684ecbeec6ce50e0310f80b3d6da2aaf533 (diff)
- djm@cvs.openbsd.org 2014/07/17 00:12:03
[key.c] silence "incorrect passphrase" error spam; reported and ok dtucker@
Diffstat (limited to 'key.c')
-rw-r--r--key.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/key.c b/key.c
index 70f4045c..a8532061 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.120 2014/07/09 03:02:15 djm Exp $ */
+/* $OpenBSD: key.c,v 1.121 2014/07/17 00:12:03 djm Exp $ */
/*
* placed in the public domain
*/
@@ -384,7 +384,8 @@ key_load_private(const char *path, const char *passphrase,
if ((r = sshkey_load_private(path, passphrase, &ret, commentp)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
/* Old authfile.c ignored all file errors. */
- if (r == SSH_ERR_SYSTEM_ERROR)
+ if (r == SSH_ERR_SYSTEM_ERROR ||
+ r == SSH_ERR_KEY_WRONG_PASSPHRASE)
debug("%s: %s", __func__, ssh_err(r));
else
error("%s: %s", __func__, ssh_err(r));
@@ -404,7 +405,8 @@ key_load_private_cert(int type, const char *filename, const char *passphrase,
&ret, perm_ok)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
/* Old authfile.c ignored all file errors. */
- if (r == SSH_ERR_SYSTEM_ERROR)
+ if (r == SSH_ERR_SYSTEM_ERROR ||
+ r == SSH_ERR_KEY_WRONG_PASSPHRASE)
debug("%s: %s", __func__, ssh_err(r));
else
error("%s: %s", __func__, ssh_err(r));