X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=client_common.c;h=cf77acd81beda8b79c1df5b607626c57975b3506;hp=5bce7fb4c21d7a9dfaa6e7e0a220fe57bc7ad8e0;hb=0dd69d3988a677aeb8d0d3aea8364c664ac35fb9;hpb=343f3c63fc3a7f9ca4ba4163c9e4cf06cde8d0c3 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;