Enum ProviderConfig

Source
pub enum ProviderConfig {
    MbedCrypto {
        name: Option<String>,
        key_info_manager: String,
    },
    Pkcs11 {
        name: Option<String>,
        key_info_manager: String,
        library_path: String,
        slot_number: Option<u64>,
        serial_number: Option<String>,
        user_pin: Option<String>,
        software_public_operations: Option<bool>,
        allow_export: Option<bool>,
    },
    Tpm {
        name: Option<String>,
        key_info_manager: String,
        tcti: String,
        owner_hierarchy_auth: String,
        endorsement_hierarchy_auth: Option<String>,
        skip_if_no_tpm: Option<bool>,
    },
    CryptoAuthLib {
        name: Option<String>,
        key_info_manager: String,
        device_type: String,
        iface_type: String,
        wake_delay: Option<u16>,
        rx_retries: Option<i32>,
        slave_address: Option<u8>,
        bus: Option<u8>,
        baud: Option<u32>,
        access_key_file_name: Option<String>,
    },
    TrustedService {
        name: Option<String>,
        key_info_manager: String,
    },
}
Expand description

Provider configuration structure For providers configs in Parsec config.toml we use a format similar to the one described in the Internally Tagged Enum representation where “provider_type” is the tag field. For details see: https://serde.rs/enum-representations.html

Variants§

§

MbedCrypto

Mbed Crypto provider configuration

Fields

§name: Option<String>

The name of the provider

§key_info_manager: String

Name of the Key Info Manager to use

§

Pkcs11

PKCS 11 provider configuration

Fields

§name: Option<String>

The name of the provider

§key_info_manager: String

Name of the Key Info Manager to use

§library_path: String

Path of the PKCS 11 library

§slot_number: Option<u64>

Slot number to use

§serial_number: Option<String>

Token serial number to use

§user_pin: Option<String>

User Pin

§software_public_operations: Option<bool>

Control whether public key operations are performed in software

§allow_export: Option<bool>

Control whether it is allowed for a key to be exportable

§

Tpm

TPM provider configuration

Fields

§name: Option<String>

The name of the provider

§key_info_manager: String

Name of the Key Info Manager to use

§tcti: String

TCTI to use with the provider

§owner_hierarchy_auth: String

Owner Hierarchy Authentication

§endorsement_hierarchy_auth: Option<String>

Endorsement Hierarchy Authentication Value

§skip_if_no_tpm: Option<bool>

Allows the service to still start without this provider if there is no TPM on the system. The priority list of providers will be as if this provider was commented out.

§

CryptoAuthLib

Microchip CryptoAuthentication Library provider configuration

Fields

§name: Option<String>

The name of the provider

§key_info_manager: String

Name of the Key Info Manager to use

§device_type: String

ATECC Device type

§iface_type: String

Interface type

§wake_delay: Option<u16>

Wake delay

§rx_retries: Option<i32>

Number of rx retries

§slave_address: Option<u8>

I2C slave address

§bus: Option<u8>

I2C bus

§baud: Option<u32>

I2C baud rate

§access_key_file_name: Option<String>

Access key configuration file name

§

TrustedService

Trusted Service provider configuration

Fields

§name: Option<String>

The name of the provider

§key_info_manager: String

Name of Key Info Manager to use

Implementations§

Source§

impl ProviderConfig

Source

pub fn key_info_manager(&self) -> &String

Get the name of the Key Info Manager in the provider configuration

Source

pub fn provider_id(&self) -> ProviderId

Get the Provider ID of the provider

Source

pub fn provider_name(&self) -> Result<String, Error>

Get the name of the Provider If there is not one set, use the default.

Trait Implementations§

Source§

impl Debug for ProviderConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ProviderConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Zeroize for ProviderConfig

Source§

fn zeroize(&mut self)

Zero out this object from memory using Rust intrinsics which ensure the zeroization operation is not “optimized away” by the compiler.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Free for T

Source§

unsafe fn free(ptr_ref: NonNull<T>)

Drops the content pointed by this pointer and frees it. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,