Closed GoogleCodeExporter closed 9 years ago
What's the exception you're getting? Can you write its stack trace?
Original comment by luis.fgoncalv
on 29 Jan 2012 at 3:10
Running your code got me one exception related to SigningCertificate property
validation. I was using the "my" directory (of XAdES4j tests) as cert store
directory, supplied to your XAdESSignatureEvaluator constructor. I looked into
your code and the certificates on that directory are being added to a trust
anchors key store. This means that the signing certificate itself was also
added. On verification, the certificate chain will contain only the signing
cert because it is trust anchor. Then the property verification fails because
the property contains more certificate references than those on the
certification chain.
I haven't tested the version without namespaces, but fixing the problem above
made the verification succeed.
I think there's nothing wrong on the lib here. Can you double check?
Original comment by luis.fgoncalv
on 29 Jan 2012 at 3:20
Ok, the behavior I described on the previous comment does happen but I actually
made another change first. Your code didn't have
dbFactory.setNamespaceAware(true) on the getDocument method prior to the sign
operation.
Original comment by luis.fgoncalv
on 29 Jan 2012 at 6:13
Original comment by luis.fgoncalv
on 29 Jan 2012 at 6:19
Thanks Luis, that was the problem. By adding the setNamespaceAware(true) line
it solved the problem.
Many thanks again, this issue can now be closed.
Original comment by r...@nmi.uk.com
on 1 Feb 2012 at 11:29
Original comment by luis.fgoncalv
on 1 Feb 2012 at 11:32
Original issue reported on code.google.com by
r...@nmi.uk.com
on 7 Dec 2011 at 2:49Attachments: