summaryrefslogtreecommitdiffstats
path: root/packet.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-11-16 13:37:16 +1100
committerDamien Miller <djm@mindrot.org>1999-11-16 13:37:16 +1100
commit7e8e820153a620ab1dcd81857a7de0969c41d043 (patch)
tree226cc4185feae97f4069ad60b4c18d259aa5df2f /packet.c
parent4874c79a3a05fc18678d7a85d7091f5139630fac (diff)
- Merged OpenBSD CVS changes:
- [auth-rh-rsa.c auth-rsa.c authfd.c authfd.h hostfile.c mpaux.c] [mpaux.h ssh-add.c ssh-agent.c ssh.h ssh.c sshd.c] the keysize of rsa-parameter 'n' is passed implizit, a few more checks and warnings about 'pretended' keysizes. - [cipher.c cipher.h packet.c packet.h sshd.c] remove support for cipher RC4 - [ssh.c] a note for legay systems about secuity issues with permanently_set_uid(), the private hostkey and ptrace() - [sshconnect.c] more detailed messages about adding and checking hostkeys
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c29
1 files changed, 5 insertions, 24 deletions
diff --git a/packet.c b/packet.c
index 6dfd492a..9c2a4f86 100644
--- a/packet.c
+++ b/packet.c
@@ -15,7 +15,7 @@ with the other side. This same code is used both on client and server side.
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.2 1999/11/08 05:15:55 damien Exp $");
+RCSID("$Id: packet.c,v 1.3 1999/11/16 02:37:16 damien Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -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. */