6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6239117
27 * @summary test logical channels work
28 * @author Andreas Sterbenz
29 * @modules java.smartcardio/javax.smartcardio
30 * @run main/manual TestChannel
31 */
32
33 // This test requires special hardware.
34
35 import javax.smartcardio.Card;
36 import javax.smartcardio.CardChannel;
37 import javax.smartcardio.CardTerminal;
38 import javax.smartcardio.CommandAPDU;
39
40 public class TestChannel extends Utils {
41
42 static final byte[] c1 = parse("00 A4 04 00 07 A0 00 00 00 62 81 01 00");
43 static final byte[] r1 = parse("07:a0:00:00:00:62:81:01:04:01:00:00:24:05:00:0b:04:b0:55:90:00");
44 // static final byte[] r1 = parse("07 A0 00 00 00 62 81 01 04 01 00 00 24 05 00 0B 04 B0 25 90 00");
45
46 static final byte[] openChannel = parse("00 70 00 00 01");
47 static final byte[] closeChannel = new byte[] {0x01, 0x70, (byte)0x80, 0};
48
49 public static void main(String[] args) throws Exception {
50 CardTerminal terminal = getTerminal(args);
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 6239117 8167512
27 * @summary test logical channels work
28 * @author Andreas Sterbenz
29 * @modules java.smartcardio/javax.smartcardio
30 * @run main/manual TestChannel
31 * @run main/othervm/manual/java.security.policy==test.policy TestChannel
32 */
33
34 // This test requires special hardware.
35
36 import javax.smartcardio.Card;
37 import javax.smartcardio.CardChannel;
38 import javax.smartcardio.CardTerminal;
39 import javax.smartcardio.CommandAPDU;
40
41 public class TestChannel extends Utils {
42
43 static final byte[] c1 = parse("00 A4 04 00 07 A0 00 00 00 62 81 01 00");
44 static final byte[] r1 = parse("07:a0:00:00:00:62:81:01:04:01:00:00:24:05:00:0b:04:b0:55:90:00");
45 // static final byte[] r1 = parse("07 A0 00 00 00 62 81 01 04 01 00 00 24 05 00 0B 04 B0 25 90 00");
46
47 static final byte[] openChannel = parse("00 70 00 00 01");
48 static final byte[] closeChannel = new byte[] {0x01, 0x70, (byte)0x80, 0};
49
50 public static void main(String[] args) throws Exception {
51 CardTerminal terminal = getTerminal(args);
|