Don't fail when the card doesn't support algo information.

This commit is contained in:
Heiko Schaefer 2021-08-26 20:57:50 +02:00
parent 3d1b166911
commit 9b321c5232

View file

@ -78,8 +78,11 @@ fn main() -> Result<(), Box<dyn Error>> {
let sst = oc.get_security_support_template()?; let sst = oc.get_security_support_template()?;
println!("sst {:x?}", sst); println!("sst {:x?}", sst);
let ai = oc.list_supported_algo()?; match oc.list_supported_algo() {
println!("ai {:#?}", ai); Ok(Some(ai)) => println!("algo information {:#?}", ai),
Ok(None) => println!(" no algo information found"),
Err(e) => println!(" error getting algo information: {:?}", e),
}
let algo = oc.get_algorithm_attributes(KeyType::Signing)?; let algo = oc.get_algorithm_attributes(KeyType::Signing)?;
println!("algo sig {:?}", algo); println!("algo sig {:?}", algo);