summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2001-11-29 22:08:49 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2001-11-29 22:08:49 +0000
commit2eefaec06db98381b15fdf0c9833175d8f910b9b (patch)
treecc6a660c17e817be43abbe88d7cf358452d62ba8
parentf692fe38bbddaaf79137637a682bf6d39331ed65 (diff)
fix protocol error: send 'failed' message instead of a 2nd challenge
(happens if the same key is in authorized_keys twice). reported Ralf_Meister@genua.de; ok djm@
-rw-r--r--usr.bin/ssh/auth-rsa.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/ssh/auth-rsa.c b/usr.bin/ssh/auth-rsa.c
index 701d8bd5317..61aa64349da 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.44 2001/07/23 18:14:58 stevesk Exp $");
+RCSID("$OpenBSD: auth-rsa.c,v 1.45 2001/11/29 22:08:48 markus Exp $");
#include <openssl/rsa.h>
#include <openssl/md5.h>
@@ -240,7 +240,11 @@ auth_rsa(struct passwd *pw, BIGNUM *client_n)
/* Wrong response. */
verbose("Wrong response to RSA authentication challenge.");
packet_send_debug("Wrong response to RSA authentication challenge.");
- continue;
+ /*
+ * Break out of the loop. Otherwise we might send
+ * another challenge and break the protocol.
+ */
+ break;
}
/*
* Correct response. The client has been successfully