Don't fail to open the card when GET_FEATURE_REQUEST returns with an error (this is a problem when running on jcardsim).

This commit is contained in:
Heiko Schaefer 2021-12-10 17:51:21 +01:00
parent c643397989
commit 953ee58120
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -77,10 +77,11 @@ impl PcscClient {
/// Obtain and store feature lists from reader (pinpad functionality).
fn into_card_app(mut self) -> Result<CardApp> {
// Get Features from reader (pinpad verify/modify)
let feat = self.features()?;
for tlv in feat {
log::debug!("Found reader feature {:?}", tlv);
self.reader_caps.insert(tlv.tag().into(), tlv);
if let Ok(feat) = self.features() {
for tlv in feat {
log::debug!("Found reader feature {:?}", tlv);
self.reader_caps.insert(tlv.tag().into(), tlv);
}
}
// Get initalized CardApp