16 Nov
2026
16 Nov
'26
5:31 p.m.
The q parameter only constrains the private key range, which dh_generate_new_priv_key already handles via DH_get0_q. Remove the `|| q` check that was blocking DHX / FFDHE groups from using hardware acceleration. Signed-off-by: Weili Qian <qianweili@huawei.com> --- src/uadk_dh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uadk_dh.c b/src/uadk_dh.c index 5e7b6d9..d138805 100644 --- a/src/uadk_dh.c +++ b/src/uadk_dh.c @@ -862,7 +862,7 @@ static int uadk_e_dh_generate_key(DH *dh) goto exe_soft; DH_get0_pqg(dh, &p, &q, &g); - if (!p || !g || q) + if (!p || !g) return UADK_E_FAIL; /* Get session and prepare private key */ -- 2.43.0