From 9fd22ffa77f805baa3f96ca65353737b33e3dc71 Mon Sep 17 00:00:00 2001 From: msetina Date: Sun, 17 Mar 2024 02:49:05 +0100 Subject: [PATCH] Update verifier.py for public_key overwrite (#245) --- signxml/verifier.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/signxml/verifier.py b/signxml/verifier.py index 7f43c5a..41a88f9 100644 --- a/signxml/verifier.py +++ b/signxml/verifier.py @@ -503,8 +503,8 @@ def _check_key_value_matches_cert_public_key(self, key_value, public_key, signat ): ec_key_value = self._find(key_value, "dsig11:ECKeyValue") named_curve = self._find(ec_key_value, "dsig11:NamedCurve") - public_key = self._find(ec_key_value, "dsig11:PublicKey") - key_data = b64decode(public_key.text)[1:] + pub_key = self._find(ec_key_value, "dsig11:PublicKey") + key_data = b64decode(pub_key.text)[1:] x = bytes_to_long(key_data[: len(key_data) // 2]) y = bytes_to_long(key_data[len(key_data) // 2 :]) curve_class = self.known_ecdsa_curves[named_curve.get("URI")]