summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkus <markus@openbsd.org>2000-11-14 23:42:40 +0000
committermarkus <markus@openbsd.org>2000-11-14 23:42:40 +0000
commit958ee9b3b8c1f61a09a58bb7528bb2b3fa87deea (patch)
tree18cf0e52ff83f8295a55dd99df1f580a749c5ca8
parentcleanup EPSV/EPRT error handling. avoid possible memory leak (getaddrinfo). (diff)
downloadwireguard-openbsd-958ee9b3b8c1f61a09a58bb7528bb2b3fa87deea.tar.xz
wireguard-openbsd-958ee9b3b8c1f61a09a58bb7528bb2b3fa87deea.zip
parse options only if key matches; fixes some confusing messages seen by the client
-rw-r--r--usr.bin/ssh/auth-rsa.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/usr.bin/ssh/auth-rsa.c b/usr.bin/ssh/auth-rsa.c
index e8bfa16510c..72cb909d746 100644
--- a/usr.bin/ssh/auth-rsa.c
+++ b/usr.bin/ssh/auth-rsa.c
@@ -14,7 +14,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-rsa.c,v 1.32 2000/10/14 12:19:45 markus Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.33 2000/11/14 23:42:40 markus Exp $");
#include "rsa.h"
#include "packet.h"
@@ -231,12 +231,6 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
}
} else
options = NULL;
- /*
- * If our options do not allow this key to be used,
- * do not send challenge.
- */
- if (!auth_parse_options(pw, options, linenum))
- continue;
/* Parse the key from the line. */
if (!auth_rsa_read_key(&cp, &bits, pk->e, pk->n)) {
@@ -259,6 +253,12 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
file, linenum, BN_num_bits(pk->n), bits);
/* We have found the desired key. */
+ /*
+ * If our options do not allow this key to be used,
+ * do not send challenge.
+ */
+ if (!auth_parse_options(pw, options, linenum))
+ continue;
/* Perform the challenge-response dialog for this key. */
if (!auth_rsa_challenge_dialog(pk)) {