Latest update.
This commit is contained in:
+10
-5
@@ -211,11 +211,16 @@ int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
|
||||
|
||||
ffc_params_set0_pqg(&dh->params, p, q, g);
|
||||
dh->params.nid = NID_undef;
|
||||
DH_get_nid(dh); /* Check if this is a named group and cache it */
|
||||
|
||||
if (q != NULL)
|
||||
dh->length = BN_num_bits(q);
|
||||
|
||||
/*
|
||||
* Check if this is a named group. If it finds a named group then the
|
||||
* 'q' and 'length' value are either already set or are set by the
|
||||
* call.
|
||||
*/
|
||||
if (DH_get_nid(dh) == NID_undef) {
|
||||
/* If its not a named group then set the 'length' if q is not NULL */
|
||||
if (q != NULL)
|
||||
dh->length = BN_num_bits(q);
|
||||
}
|
||||
dh->dirty_cnt++;
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user