From: Aram Sargsyan Date: Sat, 25 Sep 2021 14:03:27 +0000 (+0000) Subject: Fix a bug when comparing two RSA keys X-Git-Tag: v9.17.20~20^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=930e4f52a56d501ae0deefa948d7f4b6bd5d8995;p=thirdparty%2Fbind9.git Fix a bug when comparing two RSA keys When comparing different parameters of two RSA keys there is a typo which causes the "p" prime factors to not being compared. Fix the typo. --- diff --git a/lib/dns/opensslrsa_link.c b/lib/dns/opensslrsa_link.c index f378abf420f..91f62081857 100644 --- a/lib/dns/opensslrsa_link.c +++ b/lib/dns/opensslrsa_link.c @@ -406,7 +406,7 @@ opensslrsa_compare(const dst_key_t *key1, const dst_key_t *key2) { } RSA_get0_factors(rsa1, &p1, &q1); RSA_get0_factors(rsa2, &p2, &q2); - status = BN_cmp(d1, d2) || BN_cmp(p1, p1) || BN_cmp(q1, q2); + status = BN_cmp(d1, d2) || BN_cmp(p1, p2) || BN_cmp(q1, q2); if (status != 0) { return (false);