(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:
Love Hörnquist Åstrand
2006-10-20 06:56:57 +00:00
parent aa144a7ac6
commit c766b40350

View File

@@ -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)
{