Skip to content

Commit

Permalink
one based index
Browse files Browse the repository at this point in the history
  • Loading branch information
msetina authored Mar 18, 2024
1 parent a1be6d9 commit badc8a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions signxml/xades/xades.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,9 @@ def _verify_cert_digests(self, verify_result: VerifyResult):
if signing_cert is not None and signing_cert_v2 is not None:
raise InvalidInput("Expected to find exactly one of xades:SigningCertificate or xades:SigningCertificateV2")
if signing_cert is not None:
self._verify_cert_digest(signing_cert, expect_cert=cert_from_key_info,idx=idx)
self._verify_cert_digest(signing_cert, expect_cert=cert_from_key_info,idx=idx+1)
elif signing_cert_v2 is not None:
self._verify_cert_digest(signing_cert_v2, expect_cert=cert_from_key_info,idx=idx)
self._verify_cert_digest(signing_cert_v2, expect_cert=cert_from_key_info,idx=idx+1)

def _verify_signature_policy(self, verify_result: VerifyResult, expect_signature_policy: XAdESSignaturePolicy):
signed_signature_props = self._find(verify_result.signed_xml, "xades:SignedSignatureProperties")
Expand Down

0 comments on commit badc8a8

Please sign in to comment.