I'm trying to validate a signature using xmlsec 1.4.1 and am getting the following error:

javax.xml.crypto.NoSuchMechanismException: Mechanism type DOM not available at javax.xml.crypto.dsig.XMLDSigSecurity.getEngineClassName(Unknown Source)
        at javax.xml.crypto.dsig.XMLDSigSecurity.getImpl(Unknown Source)
        at javax.xml.crypto.dsig.XMLDSigSecurity.getImpl(Unknown Source)
        at javax.xml.crypto.dsig.XMLSignatureFactory.findInstance

...

The code is:

NodeList nl = doc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
                        if (nl.getLength() == 0) {
                          throw new Exception("Cannot find Signature element");
                        }
                        
DOMValidateContext valContext = new DOMValidateContext(pk, nl.item(0));
                        XMLSignatureFactory factory = 
XMLSignatureFactory.getInstance("DOM");

...

Any ideas?


---
Nayan Hajratwala
http://agileshrugged.com
http://chikli.com
734.658.6032




Reply via email to