Fix warnings
Signed-off-by: Patrick Uiterwijk <patrick@puiterwijk.org>
This commit is contained in:
parent
f243c42828
commit
9068cd1c07
12
src/main.rs
12
src/main.rs
|
@ -33,7 +33,7 @@ fn perform_encrypt(cfg: TPM2Config, input: Vec<u8>) -> Result<()> {
|
||||||
None => "ecc",
|
None => "ecc",
|
||||||
Some(key_type) => key_type,
|
Some(key_type) => key_type,
|
||||||
};
|
};
|
||||||
let key_public = tpm_objects::get_key_public(&key_type, cfg.get_name_hash_alg())?;
|
let key_public = tpm_objects::get_key_public(key_type, cfg.get_name_hash_alg())?;
|
||||||
|
|
||||||
let mut ctx = utils::get_tpm2_ctx()?;
|
let mut ctx = utils::get_tpm2_ctx()?;
|
||||||
let key_handle = utils::get_tpm2_primary_key(&mut ctx, &key_public)?;
|
let key_handle = utils::get_tpm2_primary_key(&mut ctx, &key_public)?;
|
||||||
|
@ -275,8 +275,14 @@ fn main() -> Result<()> {
|
||||||
};
|
};
|
||||||
|
|
||||||
match mode {
|
match mode {
|
||||||
cli::ActionMode::Summary => return Ok(print_summary()),
|
cli::ActionMode::Summary => {
|
||||||
cli::ActionMode::Help => return Ok(print_help()),
|
print_summary();
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
|
cli::ActionMode::Help => {
|
||||||
|
print_help();
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue