summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordtucker <dtucker@openbsd.org>2014-07-22 01:18:50 +0000
committerdtucker <dtucker@openbsd.org>2014-07-22 01:18:50 +0000
commit1d94c35dbca2d09a31c911a625528922c6581c31 (patch)
treee3697c46f3c64f097ac6694ab66785b6a780a979
parentbetter match proposed syscall api (diff)
downloadwireguard-openbsd-1d94c35dbca2d09a31c911a625528922c6581c31.tar.xz
wireguard-openbsd-1d94c35dbca2d09a31c911a625528922c6581c31.zip
Prevent spam from key_load_private_pem during hostbased auth. ok djm@
-rw-r--r--usr.bin/ssh/key.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c
index f494f9ef5ce..50627f6f9f1 100644
--- a/usr.bin/ssh/key.c
+++ b/usr.bin/ssh/key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: key.c,v 1.121 2014/07/17 00:12:03 djm Exp $ */
+/* $OpenBSD: key.c,v 1.122 2014/07/22 01:18:50 dtucker Exp $ */
/*
* placed in the public domain
*/
@@ -445,7 +445,10 @@ key_load_private_pem(int fd, int type, const char *passphrase,
if ((r = sshkey_load_private_pem(fd, type, passphrase,
&ret, commentp)) != 0) {
fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
- error("%s: %s", __func__, ssh_err(r));
+ if (r == SSH_ERR_KEY_WRONG_PASSPHRASE)
+ debug("%s: %s", __func__, ssh_err(r));
+ else
+ error("%s: %s", __func__, ssh_err(r));
return NULL;
}
return ret;