diff options
-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); } |