From c4b2de2b0cff3c2cddfb8d569d3ee510e4425b3e Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Sun, 1 May 2022 15:33:58 +0200 Subject: [PATCH] Edit comments --- openpgp-card/src/lib.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/openpgp-card/src/lib.rs b/openpgp-card/src/lib.rs index bdbbc40..dac6c2f 100644 --- a/openpgp-card/src/lib.rs +++ b/openpgp-card/src/lib.rs @@ -195,20 +195,19 @@ impl<'a> DerefMut for dyn CardTransaction + Send + Sync + 'a { /// Information about the capabilities of a card. /// -/// This configuration can is used to determine e.g. if chaining or extended -/// length can be used when communicating with the card. +/// CardCaps is used to signal capabilities (chaining, extended length support, max +/// command/response sizes, max PIN lengths) of the current card to backends. /// -/// CardCaps data is used internally and can be used by card backends, it is unlikely to be -/// useful for users of this library. +/// CardCaps is not intended for users of this library. /// -/// (The information is retrieved from card metadata, specifically from -/// "Card Capabilities", "Extended length information" and "PWStatus") +/// (The information is gathered from the "Card Capabilities", "Extended length information" and +/// "PWStatus" DOs) #[derive(Clone, Copy, Debug)] pub struct CardCaps { - /// Extended Lc and Le fields + /// Does the card support extended Lc and Le fields? ext_support: bool, - /// Command chaining + /// Command chaining support? chaining_support: bool, /// Maximum number of bytes in a command APDU @@ -217,10 +216,10 @@ pub struct CardCaps { /// Maximum number of bytes in a response APDU max_rsp_bytes: u16, - /// Maximum length of pw1 + /// Maximum length of PW1 pw1_max_len: u8, - /// Maximum length of pw3 + /// Maximum length of PW3 pw3_max_len: u8, }