]> andersk Git - openssh.git/blobdiff - packet.c
- Merged OpenBSD CVS changes:
[openssh.git] / packet.c
index 7a56c88f6776840366ffd16a496c16b9acf198ea..18692082a78d9d4601bd70ed4c32b304f97355eb 100644 (file)
--- a/packet.c
+++ b/packet.c
@@ -236,30 +236,11 @@ packet_decrypt(CipherContext *cc, void *dest, void *src,
 
 void
 packet_set_encryption_key(const unsigned char *key, unsigned int keylen,
-                         int cipher, int is_client)
+                         int cipher)
 {
-  cipher_type = cipher;
-  if (cipher == SSH_CIPHER_RC4)
-    {
-      if (is_client)
-       { /* In client: use first half for receiving, second for sending. */
-         cipher_set_key(&receive_context, cipher, key, keylen / 2, 0);
-         cipher_set_key(&send_context, cipher, key + keylen / 2, 
-                        keylen / 2, 1);
-       }
-      else
-       { /* In server: use first half for sending, second for receiving. */
-         cipher_set_key(&receive_context, cipher, key + keylen / 2, 
-                        keylen / 2, 0);
-         cipher_set_key(&send_context, cipher, key, keylen / 2, 1);
-       }
-    }
-  else
-    {
-      /* All other ciphers use the same key in both directions for now. */
-      cipher_set_key(&receive_context, cipher, key, keylen, 0);
-      cipher_set_key(&send_context, cipher, key, keylen, 1);
-    }
+  /* All other ciphers use the same key in both directions for now. */
+  cipher_set_key(&receive_context, cipher, key, keylen, 0);
+  cipher_set_key(&send_context, cipher, key, keylen, 1);
 }
 
 /* Starts constructing a packet to send. */
This page took 0.204766 seconds and 4 git commands to generate.