From f12b052d35d8f263b25110790596532fdd1aa60d Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Tue, 5 Sep 2023 00:00:00 +0200 Subject: [PATCH] openpgp-card-sequoia: drop security_support_template() in favor of digital_signature_count() --- openpgp-card-sequoia/src/lib.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/openpgp-card-sequoia/src/lib.rs b/openpgp-card-sequoia/src/lib.rs index 4536d58..57da32f 100644 --- a/openpgp-card-sequoia/src/lib.rs +++ b/openpgp-card-sequoia/src/lib.rs @@ -144,7 +144,7 @@ use openpgp_card::algorithm::{AlgoSimple, AlgorithmAttributes, AlgorithmInformat use openpgp_card::card_do::{ ApplicationIdentifier, CardholderRelatedData, ExtendedCapabilities, ExtendedLengthInfo, Fingerprint, HistoricalBytes, KeyGenerationTime, KeyInformation, KeySet, Lang, PWStatusBytes, - SecuritySupportTemplate, Sex, TouchPolicy, UserInteractionFlag, + Sex, TouchPolicy, UserInteractionFlag, }; use openpgp_card::crypto_data::PublicKeyMaterial; use openpgp_card::{Error, KeyType}; @@ -714,9 +714,13 @@ impl<'a> Card> { } } - /// Get security support template (contains the digital signature count). - pub fn security_support_template(&mut self) -> Result { - self.state.opt.security_support_template() + /// Get the current digital signature count (how many signatures have been issued by the card) + pub fn digital_signature_count(&mut self) -> Result { + Ok(self + .state + .opt + .security_support_template()? + .signature_count()) } /// SELECT DATA ("select a DO in the current template").