make code match comment
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user