Make RSA keys larger than 512 bit work.
authorAndre Noll <maan@systemlinux.org>
Sat, 18 Jul 2009 09:30:24 +0000 (11:30 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 18 Jul 2009 09:30:24 +0000 (11:30 +0200)
This allows to use the 2048 bit keys which are necessary for paraslash-0.4.x also for
paraslash-0.3.5.

NEWS
client_common.c

diff --git a/NEWS b/NEWS
index dff8208..8f225d8 100644 (file)
--- 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"
index 5bce7fb..cf77acd 100644 (file)
@@ -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;