summaryrefslogtreecommitdiff
path: root/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2013-12-13 01:26:39 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2013-12-13 01:26:39 +0000
commitd311d0f7b7ef9ed5bc383d6744b7d61239aafbc1 (patch)
treeb48a211d1a907ad7af72027b2b2709ecd540b27c /BKUApplet/src/main/java/at/gv/egiz/bku/online/applet
parent8d597612c69c77982c981f711f549bc826b06fd8 (diff)
downloadmocca-d311d0f7b7ef9ed5bc383d6744b7d61239aafbc1.tar.gz
mocca-d311d0f7b7ef9ed5bc383d6744b7d61239aafbc1.tar.bz2
mocca-d311d0f7b7ef9ed5bc383d6744b7d61239aafbc1.zip
Extend STAL to support CMS SignedAttributes
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1262 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUApplet/src/main/java/at/gv/egiz/bku/online/applet')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java14
1 files changed, 9 insertions, 5 deletions
diff --git a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java
index ca93aa50..c6a2f72a 100644
--- a/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java
+++ b/BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java
@@ -196,12 +196,16 @@ public class AppletSecureViewer implements SecureViewer {
log.debug("Digesting reference " + signedRefId + " (" + mimeType + ";" + encoding + ")");
}
- byte[] hashDataInputDigest = digest(hdi, signedDigestAlg);
+ if (signedDigestAlg.startsWith("CMS:")) {
+ log.info("CMS signature - skip verifying hashdata for now");
+ } else {
+ byte[] hashDataInputDigest = digest(hdi, signedDigestAlg);
- log.debug("Comparing digest to claimed digest value for reference {}.", signedRefId);
- if (!Arrays.equals(hashDataInputDigest, signedDigest)) {
- log.error("Bad digest value for reference {}.", signedRefId);
- throw new DigestException("Bad digest value for reference " + signedRefId);
+ log.debug("Comparing digest to claimed digest value for reference {}.", signedRefId);
+ if (!Arrays.equals(hashDataInputDigest, signedDigest)) {
+ log.error("Bad digest value for reference {}.", signedRefId);
+ throw new DigestException("Bad digest value for reference " + signedRefId);
+ }
}
verifiedHashDataInputs.add(new ByteArrayHashDataInput(hdi, signedRefId, mimeType, encoding, filename));