summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2014-07-23 09:40:46 +1000
committerDarren Tucker <dtucker@zip.com.au>2014-07-23 09:40:46 +1000
commit820763efef2d19d965602533036c2b4badc9d465 (patch)
treef54c2b977a2c144424e243bb45609aeb0b08b4f4
parentc4ee219a66f3190fa96cbd45b4d11015685c6306 (diff)
- dtucker@cvs.openbsd.org 2014/07/22 01:18:50
[key.c] Prevent spam from key_load_private_pem during hostbased auth. ok djm@
-rw-r--r--ChangeLog4
-rw-r--r--key.c7
2 files changed, 9 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 47a541c39..b0e0f5fcc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,10 @@
6 error messages. 6 error messages.
7 - (dtucker) [regress/unittests/sshkey/test_{file,fuzz,sshkey}.c] Wrap ecdsa- 7 - (dtucker) [regress/unittests/sshkey/test_{file,fuzz,sshkey}.c] Wrap ecdsa-
8 specific tests inside OPENSSL_HAS_ECC. 8 specific tests inside OPENSSL_HAS_ECC.
9 - (dtucker) OpenBSD CVS Sync
10 - dtucker@cvs.openbsd.org 2014/07/22 01:18:50
11 [key.c]
12 Prevent spam from key_load_private_pem during hostbased auth. ok djm@
9 13
1020140721 1420140721
11 - OpenBSD CVS Sync 15 - OpenBSD CVS Sync
diff --git a/key.c b/key.c
index 84bbeae38..206076159 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.121 2014/07/17 00:12:03 djm Exp $ */ 1/* $OpenBSD: key.c,v 1.122 2014/07/22 01:18:50 dtucker Exp $ */
2/* 2/*
3 * placed in the public domain 3 * placed in the public domain
4 */ 4 */
@@ -447,7 +447,10 @@ key_load_private_pem(int fd, int type, const char *passphrase,
447 if ((r = sshkey_load_private_pem(fd, type, passphrase, 447 if ((r = sshkey_load_private_pem(fd, type, passphrase,
448 &ret, commentp)) != 0) { 448 &ret, commentp)) != 0) {
449 fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR); 449 fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR);
450 error("%s: %s", __func__, ssh_err(r)); 450 if (r == SSH_ERR_KEY_WRONG_PASSPHRASE)
451 debug("%s: %s", __func__, ssh_err(r));
452 else
453 error("%s: %s", __func__, ssh_err(r));
451 return NULL; 454 return NULL;
452 } 455 }
453 return ret; 456 return ret;