diff options
author | Niels Provos <provos@cvs.openbsd.org> | 1999-10-18 01:54:19 +0000 |
---|---|---|
committer | Niels Provos <provos@cvs.openbsd.org> | 1999-10-18 01:54:19 +0000 |
commit | 5bc6af3d5152c91ad404c92e1e6ac18f0bab5387 (patch) | |
tree | c7c8afca9826fdd2af5d64bcbc5ca11e75863222 /usr.bin/ssh/sshd.c | |
parent | 27334e90900bb982f9ce8b1928d3b5bb92b1eedc (diff) |
the session key is only the least significant 256-bits, mask the rest away
Diffstat (limited to 'usr.bin/ssh/sshd.c')
-rw-r--r-- | usr.bin/ssh/sshd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/sshd.c b/usr.bin/ssh/sshd.c index b7abd939fcc..7ae3208e07d 100644 --- a/usr.bin/ssh/sshd.c +++ b/usr.bin/ssh/sshd.c @@ -18,7 +18,7 @@ agent connections. */ #include "includes.h" -RCSID("$Id: sshd.c,v 1.38 1999/10/17 23:11:24 dugsong Exp $"); +RCSID("$Id: sshd.c,v 1.39 1999/10/18 01:54:18 provos Exp $"); #include "xmalloc.h" #include "rsa.h" @@ -853,6 +853,7 @@ void do_connection(int privileged_port) /* Extract session key from the decrypted integer. The key is in the least significant 256 bits of the integer; the first byte of the key is in the highest bits. */ + BN_mask_bits(session_key_int, sizeof(session_key) * 8); assert(BN_num_bytes(session_key_int) == sizeof(session_key)); BN_bn2bin(session_key_int, session_key); |