Frage

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

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top