From: Andre Noll Date: Sat, 18 Jul 2009 09:30:24 +0000 (+0200) Subject: Make RSA keys larger than 512 bit work. X-Git-Tag: v0.3.5~25 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=aa5e4ed69209b7bed4f5c8d7596091c4b3286e51 Make RSA keys larger than 512 bit work. This allows to use the 2048 bit keys which are necessary for paraslash-0.4.x also for paraslash-0.3.5. --- diff --git a/NEWS b/NEWS index dff82086..8f225d82 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ NEWS - --log_color actually works - new ls option: -d (print dates as seconds after the epoch) - update to gengetopt 2.22.2 + - support for RSA keys of size > 512 bits ----------------------------------------- 0.3.4 (2009-05-07) "elliptic inheritance" diff --git a/client_common.c b/client_common.c index 5bce7fb4..cf77acd8 100644 --- a/client_common.c +++ b/client_common.c @@ -191,15 +191,15 @@ static void client_post_select(struct sched *s, struct task *t) t->error = client_recv_buffer(ct); if (t->error < 0) return; - if (t->error != 64) { + if (t->error < 64) { t->error = -E_INVALID_CHALLENGE; PARA_ERROR_LOG("received the following: %s\n", ct->buf); return; } - PARA_INFO_LOG("<-- [challenge]\n"); + PARA_INFO_LOG("<-- [challenge] (%d bytes)\n", t->error); /* decrypt challenge number */ t->error = para_decrypt_challenge(ct->key_file, &ct->challenge_nr, - (unsigned char *) ct->buf, 64); + (unsigned char *) ct->buf, t->error); if (t->error > 0) ct->status = CL_RECEIVED_CHALLENGE; return;