diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2000-11-14 23:42:41 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2000-11-14 23:42:41 +0000 |
commit | b0acbb161007922cc4f3a8d8f10889cf65e488f0 (patch) | |
tree | ae6f43bad92ab795e9be9b564b32e8707327b7d5 /usr.bin | |
parent | 8ab39446f715fe46cc5f457c3c652fbf776d8e35 (diff) |
parse options only if key matches; fixes some confusing messages seen by the client
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/auth-rsa.c | 14 |
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)) { |