/// Create the utility command that, when called, reads the public key from
/// the USB HSM.
Create the utility command that, when called, reads the public key from
the USB HSM.
Create the utility command that when called reads the public key from the USB HSM .
pub fn read_public_key(hsm_slot: Option<&str>, key_id: Option<&str>) -> Self {
        Self::new(
            "pkcs11-tool".to_string(),
            vec![
                "--read-object",         // operation
                "--slot",                //
                hsm_slot.unwrap_or("0"), // default: 0
                "--type",                //
                "pubkey",                // type
                "--id",                  //
                key_id.unwrap_or("01"),  // default: 01
            ]
            .into_iter()
            .map(|s| s.to_string())
            .collect::<Vec<_>>(),
        )
    }
pub fn read_public_key ( hsm_slot : Option < & str > , key_id : Option < & str > ) -> Self { Self :: new ( " " . to_string ( ) , vec ! [ " " // operation " " hsm_slot unwrap_or ( " " ) // default: 0 " " " " // type " " key_id unwrap_or ( " " ) // default: 01 ] . into_iter ( ) . map ( | s | s . to_string ( ) ) . collect :: < Vec < _ > > ( ) , ) }
Create the utility command that, when called, reads the public key from
the USB HSM.
Create the utility command that when called reads the public key from the USB HSM .
hsm_slot
Option<&str>
key_id
Option<&str>