Latest update.

This commit is contained in:
2020-03-08 13:10:50 +09:00
parent b412d79e8b
commit be29e7bcc6
274 changed files with 2778 additions and 763 deletions
+10 -5
View File
@@ -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;
}