I need to verify an XML digital signature and as part of the process I need to extract the signer certificate from the signed file "Signature" element. Using the following methods:
NodeList nl = doc.getElementsByTagNameNS
(XMLSignat
ure.xmlNS,
"Signature
");
DOMValidateContext valContext = new DOMValidateContext(new KeyStoreKeySelector(), nl.item(0));
I need to use the KeyInfo contained in the XMLSignature element to create an X509Certificate to get the cerficiate details; serial number, validity, subject, issuer, etc. But have not been able to find how to do this.
Start Free Trial