]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
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 dff82086126d681cca83c8054a2264e8367efa5f..8f225d82534b5085daab1f014a9e4651dbde63b5 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 5bce7fb4c21d7a9dfaa6e7e0a220fe57bc7ad8e0..cf77acd81beda8b79c1df5b607626c57975b3506 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;