pub unsafe fn ykpiv_fetch_object(
    state: *mut YubiKey,
    object_id: i32,
    data: *mut u8,
    len: *mut usize,
) -> ErrorKind {
    let mut res = ErrorKind::Ok;

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

    if _ykpiv_ensure_application_selected(state) == ErrorKind::Ok {
        res = _ykpiv_fetch_object(state, object_id, data, len);
    }

    _ykpiv_end_transaction(state);
    res
}
/// Fetch an object from the YubiKey
Fetch an object from the YubiKey
Fetch an object from the YubiKey
pub unsafe fn ykpiv_fetch_object(
    state: *mut YubiKey,
    object_id: i32,
    data: *mut u8,
    len: *mut usize,
) -> ErrorKind {
    let mut res = ErrorKind::Ok;
    if _ykpiv_begin_transaction(state) != ErrorKind::Ok {
        return ErrorKind::PcscError;
    }
    if _ykpiv_ensure_application_selected(state) == ErrorKind::Ok {
        res = _ykpiv_fetch_object(state, object_id, data, len);
    }
    _ykpiv_end_transaction(state);
    res
}
pub unsafe fn ykpiv_fetch_object ( state : * mut YubiKey , object_id : i32 , data : * mut u8 , len : * mut usize , ) -> ErrorKind { let mut res = ErrorKind :: Ok ; if _ykpiv_begin_transaction ( state ) != ErrorKind :: Ok { return ErrorKind :: PcscError ; } if _ykpiv_ensure_application_selected ( state ) == ErrorKind :: Ok { res = _ykpiv_fetch_object ( state , object_id , data , len ) ; } _ykpiv_end_transaction ( state ) ; res }
Fetch an object from the YubiKey
Fetch an object from the YubiKey
state
*mut YubiKey
object_id
i32
data
*mut u8
len
*mut usize