summaryrefslogtreecommitdiff
path: root/smcc/src/main/java/at/gv/egiz
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-08-02 16:24:12 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2012-08-02 16:24:12 +0000
commitb00df309176fa38e49fea0571157dc0a5243b471 (patch)
tree79fd5b1966504223a65d96a64f57670296404279 /smcc/src/main/java/at/gv/egiz
parent41167a7728455754cba90461fff791fc8f7adc7c (diff)
downloadmocca-b00df309176fa38e49fea0571157dc0a5243b471.tar.gz
mocca-b00df309176fa38e49fea0571157dc0a5243b471.tar.bz2
mocca-b00df309176fa38e49fea0571157dc0a5243b471.zip
Correct MD name for SHA-256
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1128 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smcc/src/main/java/at/gv/egiz')
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java4
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/CypriotEID.java2
-rw-r--r--smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java4
3 files changed, 5 insertions, 5 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 fed044ab..f3efcf79 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/ACOSCard.java
@@ -305,12 +305,12 @@ PINMgmtSignatureCard {
&& appVersion >= 2
&& "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha256".equals(alg)) {
dst.write((byte) 0x44); // SHA-256/ECC
- md = MessageDigest.getInstance("SHA256");
+ md = MessageDigest.getInstance("SHA-256");
} else if (KeyboxName.CERTIFIED_KEYPAIR.equals(keyboxName)
&& appVersion >= 2
&& "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256".equals(alg)) {
dst.write((byte) 0x41); // SHA-256 with padding according to PKCS#1
- md = MessageDigest.getInstance("SHA256");
+ md = MessageDigest.getInstance("SHA-256");
} else if (KeyboxName.SECURE_SIGNATURE_KEYPAIR.equals(keyboxName)
&& "http://www.w3.org/2007/05/xmldsig-more#ecdsa-ripemd160".equals(alg)) {
dst.write((byte) 0x14); // No RIPEMD support - use SHA-1/ECC
diff --git a/smcc/src/main/java/at/gv/egiz/smcc/CypriotEID.java b/smcc/src/main/java/at/gv/egiz/smcc/CypriotEID.java
index 9b78ed57..d6df8459 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/CypriotEID.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/CypriotEID.java
@@ -150,7 +150,7 @@ public class CypriotEID extends AbstractSignatureCard implements
&& "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
.equals(alg)) {
AlgID = (byte) 0x41; // SHA-256 with padding according to PKCS#1
- md = MessageDigest.getInstance("SHA256");
+ md = MessageDigest.getInstance("SHA-256");
} else {
throw new SignatureCardException(
"Card does not support signature algorithm " + alg
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 8cbe314b..5d5e1d42 100644
--- a/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java
+++ b/smcc/src/main/java/at/gv/egiz/smcc/STARCOSCard.java
@@ -405,7 +405,7 @@ public class STARCOSCard extends AbstractSignatureCard implements PINMgmtSignatu
dst.write(new byte[] {(byte) 0x80, (byte) 0x01, (byte) 0x04});
// hash template
ht = new byte[] {(byte) 0x80, (byte) 0x01, (byte) 0x40};
- md = MessageDigest.getInstance("SHA256");
+ md = MessageDigest.getInstance("SHA-256");
} else if (version >= 1.2 && "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256".equals(alg)) {
// local key ID '03' version '00'
dst.write(new byte[] {(byte) 0x03, (byte) 0x00});
@@ -413,7 +413,7 @@ public class STARCOSCard extends AbstractSignatureCard implements PINMgmtSignatu
dst.write(new byte[] {(byte) 0x80, (byte) 0x01, (byte) 0x02});
// hash template
ht = new byte[] {(byte) 0x80, (byte) 0x01, (byte) 0x40};
- md = MessageDigest.getInstance("SHA256");
+ md = MessageDigest.getInstance("SHA-256");
} else if ("http://www.w3.org/2007/05/xmldsig-more#ecdsa-ripemd160".equals(alg)) {
// local key ID '02' version '00'
dst.write(new byte[] {(byte) 0x02, (byte) 0x00});