src/com/makina/security/OpenFIPS201/PIV.java
public void verifyResetStatus(byte id) {

        // The security status of the key reference
        // specified in P2 shall be set to FALSE and the retry counter associated with the key
        // reference shall remain unchanged.

        OwnerPIN pin = null;

        switch (id) {

        case ID_KEY_GLOBAL_PIN:

            // Make sure FEATURE_PIN_GLOBAL_ENABLED is set
            if (!Config.FEATURE_PIN_GLOBAL_ENABLED) ISOException.throwIt(SW_REFERENCE_NOT_FOUND);
            pin = cspPIV.globalPIN;
            break;

        case ID_KEY_PIN:
            // Make sure FEATURE_PIN_CARD_ENABLED is set
            if (!Config.FEATURE_PIN_CARD_ENABLED) ISOException.throwIt(SW_REFERENCE_NOT_FOUND);
            pin = cspPIV.cardPIN;
            break;

        default:
            ISOException.throwIt(SW_REFERENCE_NOT_FOUND);
        }

        // Reset the requested PIN
        pin.reset();

        // Reset the PIN ALWAYS flag
        cspPIV.setPINAlways(false);
    }
/**
     * Implements the variant of the 'VERIFY' command that resets the authentication state of
     * the requested PIN
     * 
     * @param id The requested PIN reference
     */
Implements the variant of the 'VERIFY' command that resets the authentication state of
the requested PIN

@param id The requested PIN reference
Implements the variant of the ' VERIFY ' command that resets the authentication state of the requested PIN @param id The requested PIN reference
public void verifyResetStatus(byte id) {
        OwnerPIN pin = null;
        switch (id) {
        case ID_KEY_GLOBAL_PIN:
            if (!Config.FEATURE_PIN_GLOBAL_ENABLED) ISOException.throwIt(SW_REFERENCE_NOT_FOUND);
            pin = cspPIV.globalPIN;
            break;
        case ID_KEY_PIN:
            if (!Config.FEATURE_PIN_CARD_ENABLED) ISOException.throwIt(SW_REFERENCE_NOT_FOUND);
            pin = cspPIV.cardPIN;
            break;
        default:
            ISOException.throwIt(SW_REFERENCE_NOT_FOUND);
        }
        pin.reset();
        cspPIV.setPINAlways(false);
    }
public void verifyResetStatus ( byte id ) { OwnerPIN pin = null ; switch ( id ) { case ID_KEY_GLOBAL_PIN : if ( ! Config . FEATURE_PIN_GLOBAL_ENABLED ) ISOException . throwIt ( SW_REFERENCE_NOT_FOUND ) ; pin = cspPIV . globalPIN ; break ; case ID_KEY_PIN : if ( ! Config . FEATURE_PIN_CARD_ENABLED ) ISOException . throwIt ( SW_REFERENCE_NOT_FOUND ) ; pin = cspPIV . cardPIN ; break ; default : ISOException . throwIt ( SW_REFERENCE_NOT_FOUND ) ; } pin . reset ( ) ; cspPIV . setPINAlways ( false ) ; }
Implements the variant of the 'VERIFY' command that resets the authentication state of
 the requested PIN
Implements the variant of the ' VERIFY ' command that resets the authentication state of the requested PIN
// The security status of the key reference // specified in P2 shall be set to FALSE and the retry counter associated with the key // reference shall remain unchanged. // Make sure FEATURE_PIN_GLOBAL_ENABLED is set // Make sure FEATURE_PIN_CARD_ENABLED is set // Reset the requested PIN // Reset the PIN ALWAYS flag