From 396ce9d8c6d5862f9f544ca647b7afb8a1fb78fc Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Thu, 29 Jul 2021 18:19:50 +0200 Subject: [PATCH] Add a "test" that prints historical bytes, extended capabilities and extended length information. (This is used for debugging during development, not as an actual test) --- card-functionality/src/main.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/card-functionality/src/main.rs b/card-functionality/src/main.rs index bbc19e6..545ea6e 100644 --- a/card-functionality/src/main.rs +++ b/card-functionality/src/main.rs @@ -214,6 +214,24 @@ fn check_key_upload_algo_attrs() -> Result<()> { Ok(()) } +fn test_print_caps( + ca: &mut CardApp, + _param: &[&str], +) -> Result { + let ard = ca.get_app_data()?; + + let hist = CardApp::get_historical(&ard)?; + println!("hist: {:#?}", hist); + + let ecap = CardApp::get_extended_capabilities(&ard)?; + println!("ecap: {:#?}", ecap); + + let eli = CardApp::get_extended_length_information(&ard)?; + println!("eli: {:#?}", eli); + + Ok(vec![]) +} + fn test_upload_keys( ca: &mut CardApp, param: &[&str], @@ -380,6 +398,11 @@ fn main() -> Result<()> { for mut card in cards { println!("** Run tests on card {:?} **", card); + // println!("Caps"); + // let _ = run_test(&mut card, test_print_caps, &[])?; + // + // // continue; // only print caps + println!("Reset"); let _ = run_test(&mut card, test_reset, &[])?;