From 18c4cd1c0a5665dde4bf6540fc0e5c9c03ea1833 Mon Sep 17 00:00:00 2001 From: clemenso Date: Tue, 14 Dec 2010 18:09:17 +0000 Subject: activation git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@853 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/main/java/at/gv/egiz/smcctest/PKCS15Test.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'smccTest/src/main/java/at/gv/egiz/smcctest/PKCS15Test.java') 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(); -- cgit v1.2.3