diff options
author | 2016-02-23 01:34:14 +0000 | |
---|---|---|
committer | 2016-02-23 01:34:14 +0000 | |
commit | 6b097ed2d9d5ae71c18124f36551b65a009ca1d6 (patch) | |
tree | 70199b5da6e41b20e0607a87c3d4f88aad3829e5 | |
parent | Document sendsyslog2(2) in man page. (diff) | |
download | wireguard-openbsd-6b097ed2d9d5ae71c18124f36551b65a009ca1d6.tar.xz wireguard-openbsd-6b097ed2d9d5ae71c18124f36551b65a009ca1d6.zip |
fix spurious error message when incorrect passphrase entered for
keys; reported by espie@ ok deraadt@
-rw-r--r-- | usr.bin/ssh/sshconnect2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c index 72cc49a949d..507ce7e7a06 100644 --- a/usr.bin/ssh/sshconnect2.c +++ b/usr.bin/ssh/sshconnect2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.238 2016/02/05 04:31:21 jsg Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.239 2016/02/23 01:34:14 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2008 Damien Miller. All rights reserved. @@ -1031,7 +1031,7 @@ identity_sign(struct identity *id, u_char **sigp, size_t *lenp, compat)); /* load the private key from the file */ if ((prv = load_identity_file(id)) == NULL) - return (-1); /* XXX return decent error code */ + return SSH_ERR_KEY_NOT_FOUND; ret = sshkey_sign(prv, sigp, lenp, data, datalen, alg, compat); sshkey_free(prv); return (ret); @@ -1117,7 +1117,8 @@ sign_and_send_pubkey(Authctxt *authctxt, Identity *id) ret = identity_sign(id, &signature, &slen, buffer_ptr(&b), buffer_len(&b), datafellows); if (ret != 0) { - error("%s: signing failed: %s", __func__, ssh_err(ret)); + if (ret != SSH_ERR_KEY_NOT_FOUND) + error("%s: signing failed: %s", __func__, ssh_err(ret)); free(blob); buffer_free(&b); return 0; |