diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-11-11 11:27:33 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-11-15 01:25:06 +0000 |
commit | 1342185e333cb8139b7a70b7fe43571bcc2716a7 (patch) | |
tree | 0e1cb8d3cfc437bd7cc3a97f2bdc472f54d95dbd /source4/heimdal/lib/hcrypto/dh.c | |
parent | 13fd22f61017124d2d4964db3e32c667d119b56c (diff) | |
download | samba-1342185e333cb8139b7a70b7fe43571bcc2716a7.tar.gz samba-1342185e333cb8139b7a70b7fe43571bcc2716a7.tar.bz2 samba-1342185e333cb8139b7a70b7fe43571bcc2716a7.zip |
s4:heimdal: import lorikeet-heimdal-201011102149 (commit 5734d03c20e104c8f45533d07f2a2cbbd3224f29)
Diffstat (limited to 'source4/heimdal/lib/hcrypto/dh.c')
-rw-r--r-- | source4/heimdal/lib/hcrypto/dh.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/heimdal/lib/hcrypto/dh.c b/source4/heimdal/lib/hcrypto/dh.c index 3ad37f87a7..43e1d6ac1b 100644 --- a/source4/heimdal/lib/hcrypto/dh.c +++ b/source4/heimdal/lib/hcrypto/dh.c @@ -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; } @@ -445,8 +445,8 @@ static const DH_METHOD dh_null_method = { dh_null_generate_params }; -extern const DH_METHOD _hc_dh_imath_method; -static const DH_METHOD *dh_default_method = &_hc_dh_imath_method; +extern const DH_METHOD _hc_dh_ltm_method; +static const DH_METHOD *dh_default_method = &_hc_dh_ltm_method; /** * Return the dummy DH implementation. |