Domanda

I want to sign an xml document usign XMl Digital Signature API in Java.

Is there any method to specify custom provider instead of JCE Provider

È stato utile?

Soluzione

If you want to use the Apache Santuario JSR-105 Provider (instead of Oracle's), you could use

String providerName = "org.apache.jcp.xml.dsig.internal.dom.XMLDSigRI"; XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM", (Provider) Class.forName(providerName).newInstance());

Caveat emptor http://santuario.apache.org/java150releasenotes.html#java_1_5_0_release_notes-JSR105providerhasbeenrenamed

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top