diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-15 20:53:26 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 1999-11-15 20:53:26 +0000 |
commit | cdf893c82de47c89e39f0b6f6b5bd22eccfc1664 (patch) | |
tree | c40a03851018c4d29f6538fb42d0e1333f2e201a /usr.bin/ssh/mpaux.c | |
parent | a19cc305d68e393ccdca98f94032cbf60cd8d364 (diff) |
the keysize of rsa-parameter 'n' is passed implizit,
a few more checks and warnings about 'pretended' keysizes.
Diffstat (limited to 'usr.bin/ssh/mpaux.c')
-rw-r--r-- | usr.bin/ssh/mpaux.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/ssh/mpaux.c b/usr.bin/ssh/mpaux.c index c1ed36ca2ad..75a6cf30fb7 100644 --- a/usr.bin/ssh/mpaux.c +++ b/usr.bin/ssh/mpaux.c @@ -15,7 +15,7 @@ precision integers. */ #include "includes.h" -RCSID("$Id: mpaux.c,v 1.5 1999/11/11 23:46:09 markus Exp $"); +RCSID("$Id: mpaux.c,v 1.6 1999/11/15 20:53:24 markus Exp $"); #include <ssl/bn.h> #include "getput.h" @@ -26,15 +26,15 @@ RCSID("$Id: mpaux.c,v 1.5 1999/11/11 23:46:09 markus Exp $"); void compute_session_id(unsigned char session_id[16], unsigned char cookie[8], - unsigned int host_key_bits, BIGNUM *host_key_n, - unsigned int session_key_bits, BIGNUM *session_key_n) { + unsigned int host_key_bits = BN_num_bits(host_key_n); + unsigned int session_key_bits = BN_num_bits(session_key_n); unsigned int bytes = (host_key_bits + 7) / 8 + (session_key_bits + 7) / 8 + 8; unsigned char *buf = xmalloc(bytes); MD5_CTX md; - + BN_bn2bin(host_key_n, buf); BN_bn2bin(session_key_n, buf + (host_key_bits + 7 ) / 8); memcpy(buf + (host_key_bits + 7) / 8 + (session_key_bits + 7) / 8, |