Skip to content

Commit 62d12bd

Browse files
author
Roland Hedberg
committed
Applied proposal by jozef@github. Pull request 301.
Fixed test error at the same time.
1 parent f60a5b3 commit 62d12bd

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

src/saml2/sigver.py

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,27 +1539,11 @@ def _check_signature(self, decoded_xml, item, node_name=NODE_NAME,
15391539
for _, pem_file in certs:
15401540
try:
15411541
last_pem_file = pem_file
1542-
if origdoc is not None:
1543-
try:
1544-
if self.verify_signature(origdoc, pem_file,
1545-
node_name=node_name,
1546-
node_id=item.id,
1547-
id_attr=id_attr):
1548-
verified = True
1549-
break
1550-
except Exception:
1551-
if self.verify_signature(decoded_xml, pem_file,
1552-
node_name=node_name,
1553-
node_id=item.id,
1554-
id_attr=id_attr):
1555-
verified = True
1556-
break
1557-
else:
1558-
if self.verify_signature(decoded_xml, pem_file,
1559-
node_name=node_name,
1560-
node_id=item.id, id_attr=id_attr):
1561-
verified = True
1562-
break
1542+
if self.verify_signature(decoded_xml, pem_file,
1543+
node_name=node_name,
1544+
node_id=item.id, id_attr=id_attr):
1545+
verified = True
1546+
break
15631547
except XmlsecError as exc:
15641548
logger.error("check_sig: %s", exc)
15651549
pass

tests/test_41_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
FALSE_ASSERT_SIGNED = full_path("saml_false_signed.xml")
1818

19-
TIMESLACK = 40000000 # Roughly +- 24 month
19+
TIMESLACK = 62000000 # Roughly +- 24 month
2020

2121

2222
def _eq(l1, l2):

0 commit comments

Comments
 (0)