pub fn provision(&mut self, slot: &SlotId, subject: &str, alg: AlgorithmId, touch_policy: TouchPolicy, pin_policy: PinPolicy) -> Result<PublicKeyInfo> {
        let key_info = yubikey_piv::key::generate(&mut self.yk, *slot, alg, pin_policy, touch_policy)?;

        // Generate a self-signed certificate for the new key.
        Certificate::generate_self_signed(
            &mut self.yk,
            *slot,
            [0u8; 20],
            None,
            subject.to_string(),
            key_info,
        )?;

        self.configured(slot)
    }
/// This provisions the YubiKey with a new certificate generated on the device.
/// Only keys that are generate this way can use the attestation functionality.
This provisions the YubiKey with a new certificate generated on the device.
Only keys that are generate this way can use the attestation functionality.
This provisions the YubiKey with a new certificate generated on the device . Only keys that are generate this way can use the attestation functionality .
pub fn provision(&mut self, slot: &SlotId, subject: &str, alg: AlgorithmId, touch_policy: TouchPolicy, pin_policy: PinPolicy) -> Result<PublicKeyInfo> {
        let key_info = yubikey_piv::key::generate(&mut self.yk, *slot, alg, pin_policy, touch_policy)?;
        // Generate a self-signed certificate for the new key.
        Certificate::generate_self_signed(
            &mut self.yk,
            *slot,
            [0u8; 20],
            None,
            subject.to_string(),
            key_info,
        )?;
        self.configured(slot)
    }
pub fn provision ( & mut self , slot : & SlotId , subject : & str , alg : AlgorithmId , touch_policy : TouchPolicy , pin_policy : PinPolicy ) -> Result < PublicKeyInfo > { let key_info = yubikey_piv :: key :: generate ( & mut self . yk , * slot , alg , pin_policy , touch_policy ) ? ; // Generate a self-signed certificate for the new key. Certificate :: generate_self_signed ( & mut self . yk , * slot , [ 0u8 ; 20 ] , None , subject . to_string ( ) , key_info , ) ? ; self . configured ( slot ) }
This provisions the YubiKey with a new certificate generated on the device.
This provisions the YubiKey with a new certificate generated on the device .
&mut self
slot
&SlotId
subject
&str
alg
AlgorithmId
touch_policy
TouchPolicy
pin_policy
PinPolicy