(dh_compute_key): fix signness test
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18645 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -173,7 +173,7 @@ dh_compute_key(unsigned char *shared, const BIGNUM * pub, DH *dh)
|
||||
BN2mpz(&peer_pub, pub);
|
||||
|
||||
/* check if peers pubkey is reasonable */
|
||||
if (MP_SIGN(&peer_pub) != 1
|
||||
if (MP_SIGN(&peer_pub) == MP_NEG
|
||||
|| mp_int_compare(&peer_pub, &p) >= 0
|
||||
|| mp_int_compare_value(&peer_pub, 1) <= 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user