From c56e413e299db6d056cace62c200d0ff34774ccb Mon Sep 17 00:00:00 2001 From: tkellner Date: Thu, 12 Jul 2012 16:22:23 +0000 Subject: Extend IdentityLinkFactory API + Add a new parameter "provider" in order to specify the security provider . that has to be used for the signature creation git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1101 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../main/java/at/gv/egiz/idlink/IdentityLinkFactory.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'utils/src') diff --git a/utils/src/main/java/at/gv/egiz/idlink/IdentityLinkFactory.java b/utils/src/main/java/at/gv/egiz/idlink/IdentityLinkFactory.java index 9cc44275..0672e6b4 100644 --- a/utils/src/main/java/at/gv/egiz/idlink/IdentityLinkFactory.java +++ b/utils/src/main/java/at/gv/egiz/idlink/IdentityLinkFactory.java @@ -298,11 +298,17 @@ public class IdentityLinkFactory { PrivateKey key) throws NoSuchAlgorithmException, InvalidAlgorithmParameterException, XMLSignatureException, MarshalException { - - XMLSignatureFactory signatureFactory = XMLSignatureFactory.getInstance(); - - KeyInfoFactory keyInfoFactory = KeyInfoFactory.getInstance(); - + + signIdentityLink(assertion, certificate, key, + XMLSignatureFactory.getInstance(), KeyInfoFactory.getInstance()); + } + + public void signIdentityLink(Element assertion, X509Certificate certificate, + PrivateKey key, XMLSignatureFactory signatureFactory, + KeyInfoFactory keyInfoFactory) throws NoSuchAlgorithmException, + InvalidAlgorithmParameterException, XMLSignatureException, + MarshalException { + List references = new ArrayList(); // Reference #1 -- cgit v1.2.3