From dbbe4ed4c1ae6fe4822d6d11c2b82656425506f5 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Tue, 21 Sep 2021 16:49:47 +0200 Subject: [PATCH] Fix comparison of card ident (the test config shouldn't be case sensitive) --- card-functionality/src/cards.rs | 2 +- openpgp-card/src/card_do/application_id.rs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/card-functionality/src/cards.rs b/card-functionality/src/cards.rs index c6e0271..4f6c0a8 100644 --- a/card-functionality/src/cards.rs +++ b/card-functionality/src/cards.rs @@ -104,7 +104,7 @@ impl TestCard { let ard = ca.get_application_related_data()?; let app_id = ard.get_application_id()?; - if app_id.ident().as_str() == ident { + if app_id.ident().as_str() == ident.to_uppercase() { ca.init_caps(&ard)?; // println!("opened pcsc card {}", ident); diff --git a/openpgp-card/src/card_do/application_id.rs b/openpgp-card/src/card_do/application_id.rs index 9fe7dc5..0be8cf4 100644 --- a/openpgp-card/src/card_do/application_id.rs +++ b/openpgp-card/src/card_do/application_id.rs @@ -57,7 +57,8 @@ impl ApplicationIdentifier { } /// This ident is constructed as the concatenation of manufacturer - /// id, a colon, and the card serial (in hexadecimal representation). + /// id, a colon, and the card serial (in hexadecimal representation, + /// with uppercase hex digits). /// /// It is a more easily human-readable, shorter form of the full /// 16-byte AID ("Application Identifier").