diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-04-15 22:04:52 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2013-04-15 22:04:52 +0000 |
commit | d59db1aa6cd1aab251d83132ef2d4c9e45e03252 (patch) | |
tree | 178f85e64df36d0e75e35a73acdf6fd904d9fd0a /smcc/src/main/java/at | |
parent | 9ac9af9d577dde79fd3f177024d64bd359cab8ff (diff) | |
download | mocca-d59db1aa6cd1aab251d83132ef2d4c9e45e03252.tar.gz mocca-d59db1aa6cd1aab251d83132ef2d4c9e45e03252.tar.bz2 mocca-d59db1aa6cd1aab251d83132ef2d4c9e45e03252.zip |
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
Diffstat (limited to 'smcc/src/main/java/at')
-rw-r--r-- | smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java | 7 | ||||
-rw-r--r-- | smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java | 7 |
2 files changed, 8 insertions, 6 deletions
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); } |