=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/Attic/key.c,v retrieving revision 1.119 retrieving revision 1.120 diff -u -r1.119 -r1.120 --- src/usr.bin/ssh/Attic/key.c 2014/06/30 12:54:39 1.119 +++ src/usr.bin/ssh/Attic/key.c 2014/07/09 03:02:15 1.120 @@ -1,4 +1,4 @@ -/* $OpenBSD: key.c,v 1.119 2014/06/30 12:54:39 djm Exp $ */ +/* $OpenBSD: key.c,v 1.120 2014/07/09 03:02:15 djm Exp $ */ /* * placed in the public domain */ @@ -343,7 +343,8 @@ if ((r = sshkey_load_cert(filename, &ret)) != 0) { fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR); - if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) + /* Old authfile.c ignored all file errors. */ + if (r == SSH_ERR_SYSTEM_ERROR) debug("%s: %s", __func__, ssh_err(r)); else error("%s: %s", __func__, ssh_err(r)); @@ -361,7 +362,8 @@ if ((r = sshkey_load_public(filename, &ret, commentp)) != 0) { fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR); - if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) + /* Old authfile.c ignored all file errors. */ + if (r == SSH_ERR_SYSTEM_ERROR) debug("%s: %s", __func__, ssh_err(r)); else error("%s: %s", __func__, ssh_err(r)); @@ -379,7 +381,8 @@ if ((r = sshkey_load_private(path, passphrase, &ret, commentp)) != 0) { fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR); - if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) + /* Old authfile.c ignored all file errors. */ + if (r == SSH_ERR_SYSTEM_ERROR) debug("%s: %s", __func__, ssh_err(r)); else error("%s: %s", __func__, ssh_err(r)); @@ -398,7 +401,8 @@ if ((r = sshkey_load_private_cert(type, filename, passphrase, &ret, perm_ok)) != 0) { fatal_on_fatal_errors(r, __func__, SSH_ERR_LIBCRYPTO_ERROR); - if (r == SSH_ERR_SYSTEM_ERROR && errno == ENOENT) + /* Old authfile.c ignored all file errors. */ + if (r == SSH_ERR_SYSTEM_ERROR) debug("%s: %s", __func__, ssh_err(r)); else error("%s: %s", __func__, ssh_err(r)); @@ -417,7 +421,8 @@ 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) || + /* Old authfile.c ignored all file errors. */ + if (r == SSH_ERR_SYSTEM_ERROR || (r == SSH_ERR_KEY_WRONG_PASSPHRASE)) debug("%s: %s", __func__, ssh_err(r)); else