Add some missing OPENSSL_NO_DH guards.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/11582)
if (prm != NULL) {
if (prm->data_type != OSSL_PARAM_UTF8_STRING)
goto err;
+#ifndef OPENSSL_NO_DH
+ /*
+ * In a no-dh build we just go straight to err because we have no
+ * support for this.
+ */
if (!ffc_set_group_pqg(ffc, prm->data))
+#endif
goto err;
}
ffc->seed, ffc->seedlen))
return 0;
if (ffc->nid != NID_undef) {
+#ifndef OPENSSL_NO_DH
const char *name = ffc_named_group_from_uid(ffc->nid);
if (name == NULL
OSSL_PKEY_PARAM_FFC_GROUP,
name))
return 0;
+#else
+ /* How could this be? We should not have a nid in a no-dh build. */
+ return 0;
+#endif
}
return 1;
}
int ffc_params_prov_print(BIO *out, const FFC_PARAMS *ffc)
{
if (ffc->nid != NID_undef) {
+#ifndef OPENSSL_NO_DH
const char *name = ffc_named_group_from_uid(ffc->nid);
if (name == NULL)
if (ossl_prov_bio_printf(out, "GROUP: %s\n", name) <= 0)
goto err;
return 1;
+#else
+ /* How could this be? We should not have a nid in a no-dh build. */
+ goto err;
+#endif
}
if (!ossl_prov_print_labeled_bignum(out, "P: ", ffc->p))