summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2014-07-17 00:12:03 +0000
committerdjm <djm@openbsd.org>2014-07-17 00:12:03 +0000
commit2c447920bb4b8fe45f8c90ba18915ebb271e15be (patch)
tree83c431a61bb33a0ac1d97b48cbd846be8ef8c8cf
parentifdef SYS_sendsyslog so this will compile without patching on -stable (diff)
downloadwireguard-openbsd-2c447920bb4b8fe45f8c90ba18915ebb271e15be.tar.xz
wireguard-openbsd-2c447920bb4b8fe45f8c90ba18915ebb271e15be.zip
silence "incorrect passphrase" error spam; reported and ok dtucker@
-rw-r--r--usr.bin/ssh/key.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c
index a64ff815a0d..f494f9ef5ce 100644
--- a/usr.bin/ssh/key.c
+++ b/usr.bin/ssh/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
*/
@@ -382,7 +382,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));
@@ -402,7 +403,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));