Reset PW3 validation directly in modifyPw3Pin

This commit is contained in:
Dominik Schürmann
2017-11-05 19:10:59 +01:00
parent 2cf3e27e51
commit da186ca49f
2 changed files with 2 additions and 5 deletions

View File

@@ -209,10 +209,6 @@ public class SecurityTokenConnection {
}
}
public void resetPw3Validation() {
mPw3Validated = false;
}
@VisibleForTesting
void determineTokenType() throws IOException {
tokenType = mTransport.getTokenTypeIfAvailable();
@@ -291,6 +287,8 @@ public class SecurityTokenConnection {
CommandApdu changePin = commandFactory.createChangePw3Command(pin, newAdminPin);
ResponseApdu response = communicate(changePin);
mPw3Validated = false;
if (!response.isSuccess()) {
throw new CardException("Failed to change PIN", response.getSw());
}