make code match comment

This commit is contained in:
Love Hornquist Astrand
2010-10-12 04:27:13 +02:00
parent bf1f62b0a8
commit 8e24a897d7

View File

@@ -304,7 +304,7 @@ DH_check_pubkey(const DH *dh, const BIGNUM *pub_key, int *codes)
if (!BN_set_word(bn, 2))
goto out;
if (BN_cmp(bn, pub_key) == 0) {
if (BN_cmp(bn, dh->g) == 0) {
unsigned i, n = BN_num_bits(pub_key);
unsigned bits = 0;
@@ -312,7 +312,7 @@ DH_check_pubkey(const DH *dh, const BIGNUM *pub_key, int *codes)
if (BN_is_bit_set(pub_key, i))
bits++;
if (bits > 1) {
if (bits < 2) {
*codes |= DH_CHECK_PUBKEY_TOO_SMALL;
goto out;
}