]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - command.c
Remove rc4.h.
[paraslash.git] / command.c
index 34e6494f972e4fad90ea1dbdeeb2f878e3264ced..ece87e168a7e42b406526a9638ef5bf7126cd45c 100644 (file)
--- a/command.c
+++ b/command.c
@@ -26,7 +26,6 @@
 #include "list.h"
 #include "send.h"
 #include "vss.h"
-#include "rc4.h"
 #include "net.h"
 #include "daemon.h"
 #include "fd.h"
@@ -710,7 +709,7 @@ static void reset_signals(void)
  * calls this function.
  *
  * An RSA-based challenge/response is used to authenticate
- * the peer. It that authentication succeeds, a random RC4
+ * the peer. It that authentication succeeds, a random
  * session key is generated and sent back to the peer,
  * encrypted with its RSA public key.  From this point on,
  * all transfers are crypted with this session key.
@@ -730,7 +729,7 @@ __noreturn void handle_connect(int fd, const char *peername)
 {
        int ret, argc;
        char buf[4096];
-       unsigned char rand_buf[CHALLENGE_SIZE + 2 * RC4_KEY_LEN];
+       unsigned char rand_buf[CHALLENGE_SIZE + 2 * SESSION_KEY_LEN];
        unsigned char challenge_sha1[HASH_SIZE];
        struct user *u;
        struct server_command *cmd = NULL;
@@ -809,8 +808,8 @@ __noreturn void handle_connect(int fd, const char *peername)
        alarm(0);
        PARA_INFO_LOG("good auth for %s\n", u->name);
        /* init stream cipher keys with the second part of the random buffer */
-       scc.recv = sc_new(rand_buf + CHALLENGE_SIZE, RC4_KEY_LEN);
-       scc.send = sc_new(rand_buf + CHALLENGE_SIZE + RC4_KEY_LEN, RC4_KEY_LEN);
+       scc.recv = sc_new(rand_buf + CHALLENGE_SIZE, SESSION_KEY_LEN);
+       scc.send = sc_new(rand_buf + CHALLENGE_SIZE + SESSION_KEY_LEN, SESSION_KEY_LEN);
        ret = sc_send_buffer(&scc, PROCEED_MSG);
        if (ret < 0)
                goto net_err;