From 420550ce75752e9b41f0779406576289bd7e3b37 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Thu, 29 Jul 2021 18:21:01 +0200 Subject: [PATCH] Print the underlying error when a key upload fails --- card-functionality/src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/card-functionality/src/main.rs b/card-functionality/src/main.rs index 545ea6e..c7400c3 100644 --- a/card-functionality/src/main.rs +++ b/card-functionality/src/main.rs @@ -425,11 +425,12 @@ fn main() -> Result<()> { print!("Upload key '{}'", key); let upload_res = run_test(&mut card, test_upload_keys, &[key]); - if let Err(TestError::KeyUploadError(s, _)) = upload_res { + if let Err(TestError::KeyUploadError(_file, err)) = &upload_res { // The card doesn't support this key type, so skip to the // next key - don't try to decrypt/sign for this key. - println!(" => Upload failed, skip tests"); + println!(" => Upload failed ({:?}), skip tests", err); + continue; }