Apply some CR suggestions
This commit is contained in:
parent
f79f1609c8
commit
c12d62f309
|
@ -56,6 +56,7 @@ public class SecurityTokenHelper {
|
|||
private static final int MAX_APDU_NE_EXT = 65536;
|
||||
|
||||
private static final int APDU_SW_SUCCESS = 0x9000;
|
||||
private static final int APDU_SW1_RESPONSE_AVAILABLE = 0x61;
|
||||
|
||||
private static final int MASK_CLA_CHAINING = 1 << 4;
|
||||
|
||||
|
@ -530,7 +531,7 @@ public class SecurityTokenHelper {
|
|||
result.write(lastResponse.getData());
|
||||
|
||||
// Receive
|
||||
while (lastResponse.getSW1() == 0x61) {
|
||||
while (lastResponse.getSW1() == APDU_SW1_RESPONSE_AVAILABLE) {
|
||||
// GET RESPONSE ISO/IEC 7816-4 par.7.6.1
|
||||
CommandAPDU getResponse = new CommandAPDU(0x00, 0xC0, 0x00, 0x00, lastResponse.getSW2());
|
||||
lastResponse = mTransport.transceive(getResponse);
|
||||
|
|
|
@ -152,7 +152,7 @@ public class CcidTransceiver {
|
|||
}
|
||||
}
|
||||
|
||||
private byte getStatus(byte[] bytes) {
|
||||
private static byte getStatus(byte[] bytes) {
|
||||
return (byte) ((bytes[7] >> 6) & 0x03);
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ public class CcidTransceiver {
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isDataBlockNotReady(byte[] bytes) {
|
||||
private static boolean isDataBlockNotReady(byte[] bytes) {
|
||||
return getStatus(bytes) == 2;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,6 +32,9 @@
|
|||
<usb-device class="11" vendor-id="8352" product-id="16648"/>
|
||||
<!-- Nitrokey Storage-->
|
||||
<usb-device class="11" vendor-id="8352" product-id="16649"/>
|
||||
|
||||
<!--GNUK based device are not supported right now-->
|
||||
|
||||
<!-- Nitrokey Start-->
|
||||
<!--<usb-device class="11" vendor-id="8352" product-id="16913"/>-->
|
||||
<!-- Default GNUK vid/pid-->
|
||||
|
|
Loading…
Reference in a new issue