pub unsafe fn ykpiv_unblock_pin(
    state: *mut YubiKey,
    puk: *const c_char,
    puk_len: usize,
    new_pin: *const c_char,
    new_pin_len: usize,
    tries: *mut i32,
) -> ErrorKind {
    let mut res = ErrorKind::GenericError;

    if _ykpiv_begin_transaction(state) != ErrorKind::Ok {
        return ErrorKind::PcscError;
    }

    if _ykpiv_ensure_application_selected(state) == ErrorKind::Ok {
        res = _ykpiv_change_pin(state, 1, puk, puk_len, new_pin, new_pin_len, tries);
    }

    _ykpiv_end_transaction(state);
    res
}
/// Unblock a Personal Identification Number (PIN) using a previously
/// configured PIN Unblocking Key (PUK).
Unblock a Personal Identification Number (PIN) using a previously
configured PIN Unblocking Key (PUK).
Unblock a Personal Identification Number ( PIN ) using a previously configured PIN Unblocking Key ( PUK ) .
pub unsafe fn ykpiv_unblock_pin(
    state: *mut YubiKey,
    puk: *const c_char,
    puk_len: usize,
    new_pin: *const c_char,
    new_pin_len: usize,
    tries: *mut i32,
) -> ErrorKind {
    let mut res = ErrorKind::GenericError;
    if _ykpiv_begin_transaction(state) != ErrorKind::Ok {
        return ErrorKind::PcscError;
    }
    if _ykpiv_ensure_application_selected(state) == ErrorKind::Ok {
        res = _ykpiv_change_pin(state, 1, puk, puk_len, new_pin, new_pin_len, tries);
    }
    _ykpiv_end_transaction(state);
    res
}
pub unsafe fn ykpiv_unblock_pin ( state : * mut YubiKey , puk : * const c_char , puk_len : usize , new_pin : * const c_char , new_pin_len : usize , tries : * mut i32 , ) -> ErrorKind { let mut res = ErrorKind :: GenericError ; if _ykpiv_begin_transaction ( state ) != ErrorKind :: Ok { return ErrorKind :: PcscError ; } if _ykpiv_ensure_application_selected ( state ) == ErrorKind :: Ok { res = _ykpiv_change_pin ( state , 1 , puk , puk_len , new_pin , new_pin_len , tries ) ; } _ykpiv_end_transaction ( state ) ; res }
Unblock a Personal Identification Number (PIN) using a previously
configured PIN Unblocking Key (PUK).
Unblock a Personal Identification Number ( PIN ) using a previously configured PIN Unblocking Key ( PUK ) .
state
*mut YubiKey
puk
*const c_char
puk_len
usize
new_pin
*const c_char
new_pin_len
usize
tries
*mut i32