- case CL_SENT_AUTH: /* receive challenge and rc4 keys */
- ct->loaded = 0;
- t->error = client_recv_buffer(ct);
- if (t->error < 0)
- goto err;
- PARA_INFO_LOG("<-- [challenge] (%d bytes)\n", t->error);
- /* decrypt challenge/rc4 buffer */
- t->error = para_decrypt_buffer(ct->key_file, crypt_buf,
- (unsigned char *)ct->buf, t->error);
- if (t->error < 0)
- goto err;
- ct->status = CL_RECEIVED_CHALLENGE;
- RC4_set_key(&ct->rc4c.send_key, RC4_KEY_LEN,
- crypt_buf + CHALLENGE_SIZE);
- RC4_set_key(&ct->rc4c.recv_key, RC4_KEY_LEN,
- crypt_buf + CHALLENGE_SIZE + RC4_KEY_LEN);
- return;
- case CL_RECEIVED_CHALLENGE:
+ case CL_SENT_AUTH:
+ /*
+ * Receive challenge and session keys, decrypt the challenge and
+ * send back the hash of the decrypted challenge.
+ */