> Hi All,
>
> Does anybody here use Cyberflex Access cards with OCF?
>
> If so, could you help me with the doubt below?
>
> In the Cyberflex Access card we have the idea of identity such as AUT0,
> AUT1, etc. In OCF to verify a Card Holder we must use the sendVerifyCommand.
> Now what do I do to verify a identity using OCF?? In CyberflexAccess we have
> the VerifyKey command (00, 2A, 00, Key_NUMBER, Len, Key).
Hi,
To do so, you can build a CardService containing these two functions:
private ResponseAPDU sendAPDU(byte apdu[]) throws CardTerminalException {
CommandAPDU commandAPDU = new CommandAPDU(apdu);
System.out.println(commandAPDU);
ResponseAPDU responseAPDU = getCardChannel().sendCommandAPDU(commandAPDU);
System.out.print("Status Word:" + Integer.toHexString(responseAPDU.sw())+"\n");
return (responseAPDU);
}
public void verifyKey() {
byte[] verapdu = //a byte array containing (00, 2A, 00, Key_NUMBER, Len, Key)
ResponseAPDU resapdu;
try {
allocateCardChannel();
resapdu = sendAPDU(verapdu);
} catch (Exception e) {e.printStackTrace();
} finally {releaseCardChannel();}
}
Hope this helps,
Emiliano Ida'
***************************************************************
Linux Smart Card Developers - M.U.S.C.L.E.
(Movement for the Use of Smart Cards in a Linux Environment)
http://www.linuxnet.com/smartcard/index.html
***************************************************************