summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-07-12 16:22:23 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-07-12 16:22:23 +0000
commitc56e413e299db6d056cace62c200d0ff34774ccb (patch)
tree84e3b078c6da71ab2d147b8e16cf7d948b80493a
parent8a914179818004b0adf2959cf5359f49650b1712 (diff)
downloadmocca-c56e413e299db6d056cace62c200d0ff34774ccb.tar.gz
mocca-c56e413e299db6d056cace62c200d0ff34774ccb.tar.bz2
mocca-c56e413e299db6d056cace62c200d0ff34774ccb.zip
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
-rw-r--r--utils/src/main/java/at/gv/egiz/idlink/IdentityLinkFactory.java16
1 files changed, 11 insertions, 5 deletions
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<Reference> references = new ArrayList<Reference>();
// Reference #1