summaryrefslogtreecommitdiff
path: root/BKUApplet/src
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2013-08-13 09:38:01 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2013-08-13 09:38:01 +0000
commit2f19e8e81a42b495108b31133e37917ffd0620a8 (patch)
treee0ecc668b56a00aa952c5fc1dcef8c899d1e514b /BKUApplet/src
parent64449826ffa8f630b869f40da5d67490570578a5 (diff)
downloadmocca-2f19e8e81a42b495108b31133e37917ffd0620a8.tar.gz
mocca-2f19e8e81a42b495108b31133e37917ffd0620a8.tar.bz2
mocca-2f19e8e81a42b495108b31133e37917ffd0620a8.zip
RipeMD-160 fix for AppletSecureViewer
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1190 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUApplet/src')
-rw-r--r--BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java13
1 files changed, 10 insertions, 3 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 6385860b..ca93aa50 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
@@ -36,7 +36,9 @@ import at.gv.egiz.stal.signedinfo.ReferenceType;
import at.gv.egiz.stal.signedinfo.SignedInfoType;
import java.awt.event.ActionListener;
import java.security.DigestException;
-import java.security.MessageDigest;
+
+import iaik.me.security.CryptoException;
+import iaik.me.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -227,12 +229,17 @@ public class AppletSecureViewer implements SecureViewer {
} else if ("http://www.w3.org/2001/04/xmldsig-more#md5".equals(mdAlg)) {
mdAlg = "MD5";
} else if ("http://www.w3.org/2001/04/xmlenc#ripemd160".equals(mdAlg)) {
- mdAlg = "RipeMD-160";
+ mdAlg = "RIPEMD160";
} else {
throw new NoSuchAlgorithmException("Failed to verify digest value: unsupported digest algorithm " + mdAlg);
}
- MessageDigest md = MessageDigest.getInstance(mdAlg);
+ MessageDigest md;
+ try {
+ md = MessageDigest.getInstance(mdAlg);
+ } catch (CryptoException e) {
+ throw new NoSuchAlgorithmException(e);
+ }
return md.digest(hashDataInput);
}
}