]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix a bug when comparing two RSA keys
authorAram Sargsyan <aram@isc.org>
Sat, 25 Sep 2021 14:03:27 +0000 (14:03 +0000)
committerAram Sargsyan <aram@isc.org>
Wed, 27 Oct 2021 20:34:04 +0000 (20:34 +0000)
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.

lib/dns/opensslrsa_link.c

index f378abf420f14002461ab2c6ca77cd67ad4cd7df..91f62081857d1658bfcdd9cedc97bcba7e746ff0 100644 (file)
@@ -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);