Page 1 of 1

Find a way to open a secure channel

Posted: Mon Dec 21, 2015 3:09 am
by KevinAli
I wrote an applet and it always returned "0x6982"(Security condition not satisfied).

Here is part of code:

Code: Select all

 byte[] header = {(byte)0x02, (byte)0x01, (byte)0x01}; 
    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    outputStream.write(header);
    outputStream.write(Value.SN.getBytes());
    byte[] excpectedRes = outputStream.toByteArray();

    ResponseAPDU answer = channel.transmit(new CommandAPDU(0x84, 0xCA, 0x02, 0x01, Value.Emptydata));
    nameTest = "Test Select Serial number " + answer.toString();
    CheckSW(0x90, 00, answer);
    CheckResult(excpectedRes, result);


After a hard search on the web, I find that I need to open a secure channel first. But where can I find a way to open the secure channel? Does anyone have clue about this? Thanks in advance

Re: Find a way to open a secure channel

Posted: Mon Dec 21, 2015 10:53 pm
by UNKNwYSHSA
You can send your APDU command with CLA = 0x80.
Because your current APDU command with CLA = 0x84 indicates that this command with secure messaging.
Wait your message.