From 82fe3aa13c2792a46c9053fb02f635ab0ce0723c Mon Sep 17 00:00:00 2001 From: Andrey Kislyuk Date: Sat, 23 Nov 2024 19:04:37 -0800 Subject: [PATCH] Save x509_cert after reassigning --- signxml/verifier.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/signxml/verifier.py b/signxml/verifier.py index a4083e1..97bcba8 100644 --- a/signxml/verifier.py +++ b/signxml/verifier.py @@ -369,7 +369,6 @@ def verify( self.config = expect_config if deprecated_kwargs: self.config = replace(expect_config, **deprecated_kwargs) - self.x509_cert = x509_cert self._parser = parser if x509_cert or cert_resolver: @@ -382,6 +381,8 @@ def verify( ) x509_cert = x509_cert.to_cryptography() # type: ignore[union-attr] + self.x509_cert = x509_cert + if id_attribute is not None: self.id_attributes = (id_attribute,)