diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-08-13 09:38:01 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-08-13 09:38:01 +0000 |
commit | 2f19e8e81a42b495108b31133e37917ffd0620a8 (patch) | |
tree | e0ecc668b56a00aa952c5fc1dcef8c899d1e514b /BKUApplet/src/main/java/at | |
parent | 64449826ffa8f630b869f40da5d67490570578a5 (diff) | |
download | mocca-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/main/java/at')
-rw-r--r-- | BKUApplet/src/main/java/at/gv/egiz/bku/online/applet/AppletSecureViewer.java | 13 |
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); } } |