Skip to content
Snippets Groups Projects
Commit 40640a76 authored by Martin Nilsson's avatar Martin Nilsson
Browse files

Subgroup order is calculated in Parameters if left out as an argument.

parent e25e11a1
No related branches found
No related tags found
No related merge requests found
...@@ -780,10 +780,9 @@ class KeyExchangeDHE ...@@ -780,10 +780,9 @@ class KeyExchangeDHE
SSL3_DEBUG_MSG("KE_DHE\n"); SSL3_DEBUG_MSG("KE_DHE\n");
Gmp.mpz p = input->get_bignum(); Gmp.mpz p = input->get_bignum();
Gmp.mpz g = input->get_bignum(); Gmp.mpz g = input->get_bignum();
Gmp.mpz order = [object(Gmp.mpz)]((p-1)/2); // FIXME: Is this correct?
temp_struct->put_bignum(p); temp_struct->put_bignum(p);
temp_struct->put_bignum(g); temp_struct->put_bignum(g);
dh_state = DHKeyExchange(Crypto.DH.Parameters(p, g, order)); dh_state = DHKeyExchange(Crypto.DH.Parameters(p, g));
dh_state->set_other(input->get_bignum()); dh_state->set_other(input->get_bignum());
temp_struct->put_bignum(dh_state->other); temp_struct->put_bignum(dh_state->other);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment