summaryrefslogtreecommitdiff
path: root/smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-12-14 18:09:17 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2010-12-14 18:09:17 +0000
commit18c4cd1c0a5665dde4bf6540fc0e5c9c03ea1833 (patch)
treed9364a7b8bb86f1d5fc4981740121ca52fc113c8 /smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java
parente7d3260341eb97ca63d031aaa86dc1c0fa0fff83 (diff)
downloadmocca-18c4cd1c0a5665dde4bf6540fc0e5c9c03ea1833.tar.gz
mocca-18c4cd1c0a5665dde4bf6540fc0e5c9c03ea1833.tar.bz2
mocca-18c4cd1c0a5665dde4bf6540fc0e5c9c03ea1833.zip
activation
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@853 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java')
-rw-r--r--smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java b/smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java
index d3035c8a..5a184680 100644
--- a/smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java
+++ b/smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java
@@ -133,7 +133,7 @@ public class PKCS15Test {
// resp = basicChannel.transmit(cmdAPDU);
// }
// }
-
+
System.out.println("SELECT DF.CIA");
// cmdAPDU = new CommandAPDU(0x00, 0xA4, 0x04, 0x00, new byte[] { (byte) 0xE8, (byte) 0x28, (byte) 0xBD, (byte) 0x08, (byte) 0x0F }, 256);
cmdAPDU = new CommandAPDU(0x00, 0xA4, 0x04, 0x00, new byte[] { (byte) 0xA0, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x63,(byte) 0x50,(byte) 0x4B,(byte) 0x43,(byte) 0x53,(byte) 0x2D,(byte) 0x31,(byte) 0x35 }, 256);
@@ -161,7 +161,7 @@ public class PKCS15Test {
// }
- System.out.println("SELECT EF 0x0b 0X02");
+ System.out.println("SELECT EF 0x0b 0x02");
cmdAPDU = new CommandAPDU(0x00, 0xA4, 0x02, 0x00, new byte[] { (byte) 0x0B,(byte) 0x02 }, 256);
System.out.println(" cmd apdu " + toString(cmdAPDU.getBytes()));
resp = basicChannel.transmit(cmdAPDU);
@@ -542,9 +542,12 @@ public class PKCS15Test {
// resp = basicChannel.transmit(cmdAPDU);
// System.out.println(" -> " + toString(resp.getBytes()) + "\n");
+ int i = 1;
byte[] dst = new byte[] {
- // key 0x81?
- (byte) 0x84, (byte) 0x01, (byte) 0x81,
+ // 3 byte keyRef (key number 1)
+// (byte) 0x84, (byte) 0x03, (byte) 0x80, (byte) 0x01, (byte) 0xff,
+ // 1 byte keyRef (key number 1)
+ (byte) 0x84, (byte) 0x01, (byte) (0x80 | (i & 0x7f)),
//RSA Authentication
(byte) 0x89, (byte) 0x02, (byte) 0x23, (byte) 0x13
};
@@ -1085,8 +1088,8 @@ public class PKCS15Test {
System.out.println("manually running pkcs15 test...");
PKCS15Test test = new PKCS15Test();
test.setUp();
- test.getEFDIR();
-// test.sign();
+// test.getEFDIR();
+ test.sign();
// test.selectAndRead();
} catch (Exception ex) {
ex.printStackTrace();