]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
dh_ameth: Fix dh_cmp_parameters to really compare the params
authorTomas Mraz <tomas@openssl.org>
Thu, 9 Sep 2021 07:12:22 +0000 (09:12 +0200)
committerTomas Mraz <tomas@openssl.org>
Fri, 10 Sep 2021 10:07:01 +0000 (12:07 +0200)
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)

crypto/dh/dh_ameth.c

index 0e577177ec4a81567e93f9a719eaa5ad2b61b8bc..38d8e7a38f610b5630127ddcbf2b9b819d21a339 100644 (file)
@@ -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);
 }