I need to retrieve a Certificate contained in a SmartCard ISO 7816 compatible. So far I've been able to verify the PIN using APDU commands but I need some pointers for retrieving the certificate. I've tried the following SELECT APDU which should select the first file (as I understand):
ResponseAPDU resp = ch.transmit( new CommandAPDU(0X00, 0XA4, 0X00, 0X90, new byte[]{0x54, 0x01}) );
However this produces '6a82' which is File Not Found. Do I need to provide a file name for it ? Actually I know the certificate name but obviously in String format. Is there a generic APDU command which retrieves the first file contained on the Smart Card ?
Thanks!