signxml icon indicating copy to clipboard operation
signxml copied to clipboard

XAdESVerifier verify CertDigest by index

Open msetina opened this issue 11 months ago • 4 comments

Fix for #246. I found out that if I have multiple certificates in cert parameter to sign, the digest check would fail. Since it was signed with signxml, it was strange. Looking at code I found a problem. This is the solution.

msetina avatar Mar 18 '24 17:03 msetina

Test suite fails for nonconformant-X_BE_CONN_10.xml. It has 2 X509Certificate nodes and 2 xades:Cert nodes. Previous code raised a InvalidDigest. The new code checks both Digests as OK as it compares by list index. By removing "nonconformant-X_BE_CONN_10": InvalidDigest, from test_xades_interop_examples error_conditions, test suit will finish with OK.

msetina avatar Mar 18 '24 21:03 msetina

Please add a PR description with the motivation for this change.

kislyuk avatar Mar 23 '24 21:03 kislyuk

Notice that test is changed as one was an error before and now it is not as Digests match.

msetina avatar Mar 23 '24 22:03 msetina

Thanks. I will take a look at that test case and see if this is the correct way to make it work.

kislyuk avatar Mar 24 '24 00:03 kislyuk