From e9ecfea4cf7e73d6e9964137b6eb93a366ed0027 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Sat, 15 Jan 2022 00:41:11 +0100 Subject: [PATCH] Debug print card "status" before reading ARD --- pcsc/src/lib.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pcsc/src/lib.rs b/pcsc/src/lib.rs index 7228e23..547e407 100644 --- a/pcsc/src/lib.rs +++ b/pcsc/src/lib.rs @@ -274,9 +274,23 @@ impl PcscClient { e ); } else { - log::debug!("4b"); + log::debug!( + "4b: opened the OpenPGP application, will read ARD" + ); // successfully opened the OpenPGP application + // -- debug: status -- + drop(txc); + let stat = tx.status2_owned().map_err(|e| { + Error::Smartcard(SmartcardError::Error(format!( + "{:?}", + e + ))) + })?; + log::debug!("4b card status: {:x?}", stat); + let mut txc = PcscTxClient::new(&mut tx, None); + // -- /debug: status -- + if let Some(ident) = ident { let ard = PcscTxClient::application_related_data( &mut txc,