From 36ca50bbd96c6964d74784a8964a0b46b7165427 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Mon, 30 Jun 2014 12:54:40 +0000 Subject: suppress spurious error message when loading key with a passphrase; reported by kettenis@ ok markus@ --- usr.bin/ssh/key.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c index c5a69348c41..55271c7bcac 100644 --- a/usr.bin/ssh/key.c +++ b/usr.bin/ssh/key.c @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.118 2014/06/24 01:13:21 djm Exp $ */ +/* $OpenBSD: key.c,v 1.119 2014/06/30 12:54:39 djm Exp $ */ /* * placed in the public domain */ @@ -417,7 +417,8 @@ key_load_private_type(int type, const char *filename, const char *passphrase, if ((r = sshkey_load_private_type(type, filename, passphrase, &ret, commentp, perm_ok)) != 0) { fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR); - if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) + if ((r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) || + (r == SSH_ERR_KEY_WRONG_PASSPHRASE)) debug("%s: %s", __func__, ssh_err(r)); else error("%s: %s", __func__, ssh_err(r)); -- cgit v1.2.3