Search in sources :

Example 1 with VerifyApduCommand

use of es.gob.jmulticard.apdu.gemalto.VerifyApduCommand in project jmulticard by ctt-gob-es.

the class TuiR5 method verifyPin.

@Override
public void verifyPin(final PasswordCallback pinPc) throws ApduConnectionException, BadPinException {
    final VerifyApduCommand verifyPinApduCommand = new VerifyApduCommand(CLA, this.passwordCallback);
    final ResponseApdu verifyResponse = getConnection().transmit(verifyPinApduCommand);
    if (!verifyResponse.isOk()) {
        throw new BadPinException(verifyResponse.getStatusWord().getLsb() - (byte) 0xC0);
    }
}
Also used : BadPinException(es.gob.jmulticard.card.BadPinException) ResponseApdu(es.gob.jmulticard.apdu.ResponseApdu) VerifyApduCommand(es.gob.jmulticard.apdu.gemalto.VerifyApduCommand)

Aggregations

ResponseApdu (es.gob.jmulticard.apdu.ResponseApdu)1 VerifyApduCommand (es.gob.jmulticard.apdu.gemalto.VerifyApduCommand)1 BadPinException (es.gob.jmulticard.card.BadPinException)1