+ ffc_params_set0_pqg(&dh->params, p, q, g);
+ dh->params.nid = NID_undef;
+ /*
+ * 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);