adapt tests
This commit is contained in:
parent
ccb1c04c80
commit
404aef15a0
|
@ -135,7 +135,7 @@ public class WalletAppletCommandSet {
|
||||||
public boolean getPublicKeyDerivationSupport() throws CardException {
|
public boolean getPublicKeyDerivationSupport() throws CardException {
|
||||||
ResponseAPDU resp = getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
ResponseAPDU resp = getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
||||||
byte[] data = resp.getData();
|
byte[] data = resp.getData();
|
||||||
return data[data.length - 1] == 1;
|
return data[data.length - 1] != 0x00;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -296,21 +296,21 @@ public class WalletAppletTest {
|
||||||
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
||||||
assertEquals(0x9000, response.getSW());
|
assertEquals(0x9000, response.getSW());
|
||||||
byte[] data = response.getData();
|
byte[] data = response.getData();
|
||||||
assertTrue(Hex.toHexString(data).matches("a30c80010381010582010[0-1]83010[0-1]"));
|
assertTrue(Hex.toHexString(data).matches("a30c0201030201050101[0f][0f]0101[0f][0f]"));
|
||||||
|
|
||||||
response = cmdSet.verifyPIN("123456");
|
response = cmdSet.verifyPIN("123456");
|
||||||
assertEquals(0x63C2, response.getSW());
|
assertEquals(0x63C2, response.getSW());
|
||||||
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
||||||
assertEquals(0x9000, response.getSW());
|
assertEquals(0x9000, response.getSW());
|
||||||
data = response.getData();
|
data = response.getData();
|
||||||
assertTrue(Hex.toHexString(data).matches("a30c80010281010582010[0-1]83010[0-1]"));
|
assertTrue(Hex.toHexString(data).matches("a30c0201020201050101[0f][0f]0101[0f][0f]"));
|
||||||
|
|
||||||
response = cmdSet.verifyPIN("000000");
|
response = cmdSet.verifyPIN("000000");
|
||||||
assertEquals(0x9000, response.getSW());
|
assertEquals(0x9000, response.getSW());
|
||||||
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_APPLICATION);
|
||||||
assertEquals(0x9000, response.getSW());
|
assertEquals(0x9000, response.getSW());
|
||||||
data = response.getData();
|
data = response.getData();
|
||||||
assertTrue(Hex.toHexString(data).matches("a30c80010381010582010[0-1]83010[0-1]"));
|
assertTrue(Hex.toHexString(data).matches("a30c0201030201050101[0f][0f]0101[0f][0f]"));
|
||||||
|
|
||||||
// Check that key path is empty
|
// Check that key path is empty
|
||||||
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_KEY_PATH);
|
response = cmdSet.getStatus(WalletApplet.GET_STATUS_P1_KEY_PATH);
|
||||||
|
|
Loading…
Reference in New Issue