Fix yubikey pin lengths other than 6

Closes #883
This commit is contained in:
Vincent Breitmoser 2014-09-24 02:58:38 +02:00
parent 425cea41f2
commit 5604deaca0

View File

@ -202,7 +202,7 @@ public class NfcActivity extends ActionBarActivity {
+ "20" // INS + "20" // INS
+ "00" // P1 + "00" // P1
+ "82" // P2 (PW1) + "82" // P2 (PW1)
+ "06" // Lc TODO should be length of PIN? + String.format("%02d", mPin.length()) // Lc
+ Hex.toHexString(mPin.getBytes()); + Hex.toHexString(mPin.getBytes());
if ( ! card(login).equals(accepted)) { // login if ( ! card(login).equals(accepted)) { // login
toast("Wrong PIN!"); toast("Wrong PIN!");