diff --git a/tuf/client/updater.py b/tuf/client/updater.py index ccab75305b..9babe132eb 100755 --- a/tuf/client/updater.py +++ b/tuf/client/updater.py @@ -1385,7 +1385,7 @@ def _verify_root_self_signed(self, signable): signatures = signable['signatures'] signed = securesystemslib.formats.encode_canonical( signable['signed']).encode('utf-8') - validated = 0 + verified_sig_keyids = set() for signature in signatures: keyid = signature['keyid'] @@ -1403,9 +1403,9 @@ def _verify_root_self_signed(self, signable): valid_sig = securesystemslib.keys.verify_signature(key, signature, signed) if valid_sig: - validated = validated + 1 + verified_sig_keyids.add(keyid) - if validated >= threshold: + if len(verified_sig_keyids) >= threshold: return True return False