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,)