Fix comparison of card ident (the test config shouldn't be case sensitive)

This commit is contained in:
Heiko Schaefer 2021-09-21 16:49:47 +02:00
parent 5417fde8ca
commit dbbe4ed4c1
2 changed files with 3 additions and 2 deletions

View file

@ -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);

View file

@ -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").