summaryrefslogtreecommitdiff
path: root/bkucommon/src
diff options
context:
space:
mode:
Diffstat (limited to 'bkucommon/src')
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/STALSecurityProvider.java7
-rw-r--r--bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureMethod.java9
-rw-r--r--bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java2
3 files changed, 12 insertions, 6 deletions
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/STALSecurityProvider.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/STALSecurityProvider.java
index cdd8f111..0a2140c3 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/STALSecurityProvider.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/cms/STALSecurityProvider.java
@@ -27,6 +27,7 @@ import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALRequest;
import at.gv.egiz.stal.STALResponse;
import at.gv.egiz.stal.SignRequest;
+import at.gv.egiz.stal.SignRequest.SignedInfo;
import at.gv.egiz.stal.SignResponse;
public class STALSecurityProvider extends IaikProvider {
@@ -89,8 +90,10 @@ public class STALSecurityProvider extends IaikProvider {
SignRequest signRequest = new SignRequest();
signRequest.setKeyIdentifier(keyboxIdentifier);
log.debug("SignedAttributes: " + Util.toBase64String(signedAttributes));
- signRequest.setSignedInfo(signedAttributes);
- signRequest.setSignedInfoIsCMSSignedAttributes(true);
+ SignedInfo signedInfo = new SignedInfo();
+ signedInfo.setValue(signedAttributes);
+ signedInfo.setIsCMSSignedAttributes(true);
+ signRequest.setSignedInfo(signedInfo);
signRequest.setSignatureMethod(signatureMethod);
signRequest.setHashDataInput(hashDataInput);
return signRequest;
diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureMethod.java b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureMethod.java
index 51c6c805..1a6f6df9 100644
--- a/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureMethod.java
+++ b/bkucommon/src/main/java/at/gv/egiz/bku/slcommands/impl/xsect/STALSignatureMethod.java
@@ -25,6 +25,8 @@
package at.gv.egiz.bku.slcommands.impl.xsect;
+import iaik.xml.crypto.dsig.AbstractSignatureMethodImpl;
+
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -48,10 +50,9 @@ import at.gv.egiz.stal.STAL;
import at.gv.egiz.stal.STALRequest;
import at.gv.egiz.stal.STALResponse;
import at.gv.egiz.stal.SignRequest;
+import at.gv.egiz.stal.SignRequest.SignedInfo;
import at.gv.egiz.stal.SignResponse;
-import iaik.xml.crypto.dsig.AbstractSignatureMethodImpl;
-
public class STALSignatureMethod extends AbstractSignatureMethodImpl {
/**
@@ -99,7 +100,9 @@ public class STALSignatureMethod extends AbstractSignatureMethodImpl {
SignRequest signRequest = new SignRequest();
signRequest.setKeyIdentifier(keyboxIdentifier);
- signRequest.setSignedInfo(m.toByteArray());
+ SignedInfo signedInfo = new SignedInfo();
+ signedInfo.setValue(m.toByteArray());
+ signRequest.setSignedInfo(signedInfo);
signRequest.setHashDataInput(hashDataInputs);
List<STALResponse> responses =
diff --git a/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java b/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java
index 853505ce..61d0d480 100644
--- a/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java
+++ b/bkucommon/src/test/java/at/gv/egiz/stal/dummy/DummySTAL.java
@@ -137,7 +137,7 @@ public class DummySTAL implements STAL {
SignRequest signReq = (SignRequest) request;
Signature s = Signature.getInstance("SHA1withRSA");
s.initSign(privateKey);
- s.update(signReq.getSignedInfo());
+ s.update(signReq.getSignedInfo().getValue());
byte[] sigVal = s.sign();
SignResponse resp = new SignResponse();
resp.setSignatureValue(sigVal);