| Code with Finding: |
class PassportApduService {
/**
* Sends a <code>SELECT FILE</code> command to the passport.
* Secure messaging will be applied to the command and response
* apdu.
*
* @param wrapper the secure messaging wrapper to use.
* @param fid the file to select.
*/
public void sendSelectFile(SecureMessagingWrapper wrapper, short fid)
throws IOException {
Apdu capdu = createSelectFileAPDU(fid);
if (wrapper != null) {
capdu.wrapWith(wrapper);
}
byte[] rapdu = sendAPDU(capdu);
if (wrapper != null) {
rapdu = wrapper.unwrap(rapdu, rapdu.length);
}
}
}
|