summaryrefslogtreecommitdiff
path: root/BKUApplet
diff options
context:
space:
mode:
Diffstat (limited to 'BKUApplet')
-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);
}
}