diff --git a/tss-esapi/examples/hmac.rs b/tss-esapi/examples/hmac.rs index 1c6c5ee8..10f4988a 100644 --- a/tss-esapi/examples/hmac.rs +++ b/tss-esapi/examples/hmac.rs @@ -27,7 +27,7 @@ fn main() { // tpm resource manager. let mut context = Context::new( TctiNameConf::from_environment_variable() - .expect("Failed to get TCTI / TPM2TOOLS_TCTI from environment"), + .expect("Failed to get TCTI / TPM2TOOLS_TCTI from environment. Try `export TCTI=device:/dev/tpmrm0`"), ) .expect("Failed to create Context"); @@ -138,7 +138,7 @@ fn main() { .unwrap(); // Perform the HMAC. let r = ctx.hmac( - hmac_key.clone().into(), + hmac_key.into(), input_data.clone(), HashingAlgorithm::Sha256, );