summaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2021-09-09 09:12:22 +0200
committerTomas Mraz <tomas@openssl.org>2021-09-10 12:07:36 +0200
commit49ca3979f903334e192e75eeafb371824d1c14f6 (patch)
tree9bb99f7ac47bad595ef06de1cf36422db66a1c40 /crypto/dh
parent1dc15a3330434ef1f79921a2d97c585048dcf05e (diff)
dh_ameth: Fix dh_cmp_parameters to really compare the params
This is legacy DH PKEY only code. Fixes #16562 Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/16568) (cherry picked from commit cf1a231d44db81f8565ecae5498a4f1f6f0168c9)
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh_ameth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dh/dh_ameth.c b/crypto/dh/dh_ameth.c
index 0e577177ec..38d8e7a38f 100644
--- a/crypto/dh/dh_ameth.c
+++ b/crypto/dh/dh_ameth.c
@@ -311,7 +311,7 @@ static int dh_security_bits(const EVP_PKEY *pkey)
static int dh_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b)
{
- return ossl_ffc_params_cmp(&a->pkey.dh->params, &a->pkey.dh->params,
+ return ossl_ffc_params_cmp(&a->pkey.dh->params, &b->pkey.dh->params,
a->ameth != &ossl_dhx_asn1_meth);
}