From d59db1aa6cd1aab251d83132ef2d4c9e45e03252 Mon Sep 17 00:00:00 2001 From: tkellner Date: Mon, 15 Apr 2013 22:04:52 +0000 Subject: Use ME MessageDigest for austrian cards (includes RIPEMD) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1180 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java | 7 ++++--- smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'smcc/src/main/java/at/gv/egiz') diff --git a/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java b/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java index a41e13d8..645570c0 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java @@ -28,8 +28,9 @@ import iaik.me.asn1.ASN1; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; + +import iaik.me.security.CryptoException; +import iaik.me.security.MessageDigest; import javax.smartcardio.Card; import javax.smartcardio.CardChannel; @@ -318,7 +319,7 @@ PINMgmtSignatureCard { } else { throw new SignatureCardException("Card does not support signature algorithm " + alg + "."); } - } catch (NoSuchAlgorithmException e) { + } catch (CryptoException e) { log.error("Failed to get MessageDigest.", e); throw new SignatureCardException(e); } diff --git a/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java b/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java index 10cfd2a8..77d28def 100644 --- a/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java +++ b/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java @@ -30,8 +30,9 @@ import at.gv.egiz.smcc.pin.gui.PINGUI; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; + +import iaik.me.security.CryptoException; +import iaik.me.security.MessageDigest; import javax.smartcardio.Card; import javax.smartcardio.CardChannel; @@ -434,7 +435,7 @@ public class STARCOSCard extends AbstractSignatureCard implements PINMgmtSignatu } else { throw new SignatureCardException("e-card version " + version + " does not support signature algorithm " + alg + "."); } - } catch (NoSuchAlgorithmException e) { + } catch (CryptoException e) { log.error("Failed to get MessageDigest.", e); throw new SignatureCardException(e); } -- cgit v1.2.3