pub fn list(context: &mut Context) -> Result<Vec<(NvPublic, Name)>> {
    context.execute_without_session(|ctx| {
        ctx.get_capability(
            CapabilityType::Handles,
            TPM2_NV_INDEX_FIRST,
            TPM2_PT_NV_INDEX_MAX,
        )
        .and_then(|(capability_data, _)| match capability_data {
            CapabilityData::Handles(tpm_handles) => Ok(tpm_handles),
            _ => Err(Error::local_error(WrapperErrorKind::WrongValueFromTpm)),
        })
        .and_then(|tpm_handles| {
            tpm_handles
                .iter()
                .map(|&tpm_handle| get_nv_index_info(ctx, NvIndexTpmHandle::try_from(tpm_handle)?))
                .collect()
        })
    })
}
/// Lists all the currently defined NV Indexes' names and public components
Lists all the currently defined NV Indexes' names and public components
Lists all the currently defined NV Indexes ' names and public components
pub fn list(context: &mut Context) -> Result<Vec<(NvPublic, Name)>> {
    context.execute_without_session(|ctx| {
        ctx.get_capability(
            CapabilityType::Handles,
            TPM2_NV_INDEX_FIRST,
            TPM2_PT_NV_INDEX_MAX,
        )
        .and_then(|(capability_data, _)| match capability_data {
            CapabilityData::Handles(tpm_handles) => Ok(tpm_handles),
            _ => Err(Error::local_error(WrapperErrorKind::WrongValueFromTpm)),
        })
        .and_then(|tpm_handles| {
            tpm_handles
                .iter()
                .map(|&tpm_handle| get_nv_index_info(ctx, NvIndexTpmHandle::try_from(tpm_handle)?))
                .collect()
        })
    })
}
pub fn list ( context : & mut Context ) -> Result < Vec < ( NvPublic , Name ) > > { context . execute_without_session ( | ctx | { ctx . get_capability ( CapabilityType :: Handles , TPM2_NV_INDEX_FIRST , TPM2_PT_NV_INDEX_MAX , ) . and_then ( | ( capability_data , _ ) | match capability_data { CapabilityData :: Handles ( tpm_handles ) => Ok ( tpm_handles ) , _ => Err ( Error :: local_error ( WrapperErrorKind :: WrongValueFromTpm ) ) , } ) . and_then ( | tpm_handles | { tpm_handles . iter ( ) . map ( | & tpm_handle | get_nv_index_info ( ctx , NvIndexTpmHandle :: try_from ( tpm_handle ) ? ) ) . collect ( ) } ) } ) }
Lists all the currently defined NV Indexes' names and public components
Lists all the currently defined NV Indexes ' names and public components
context
&mut Context
context
&mut Context