diff --git a/openpgp-card/src/card_do.rs b/openpgp-card/src/card_do.rs index 7b7086b..f4ad3a4 100644 --- a/openpgp-card/src/card_do.rs +++ b/openpgp-card/src/card_do.rs @@ -34,7 +34,6 @@ pub struct ApplicationRelatedData(pub(crate) Tlv); impl ApplicationRelatedData { /// Get application identifier (AID), ISO 7816-4 pub fn application_id(&self) -> Result { - // get from cached "application related data" let aid = self.0.find(&[0x4f].into()); if let Some(aid) = aid { @@ -46,7 +45,6 @@ impl ApplicationRelatedData { /// Get historical bytes pub fn historical_bytes(&self) -> Result { - // get from cached "application related data" let hist = self.0.find(&[0x5f, 0x52].into()); if let Some(hist) = hist { @@ -62,7 +60,6 @@ impl ApplicationRelatedData { /// Get extended length information (ISO 7816-4), which /// contains maximum number of bytes for command and response. pub fn extended_length_information(&self) -> Result, Error> { - // get from cached "application related data" let eli = self.0.find(&[0x7f, 0x66].into()); log::trace!("Extended length information: {:x?}", eli); @@ -88,7 +85,6 @@ impl ApplicationRelatedData { /// Get extended Capabilities pub fn extended_capabilities(&self) -> Result { - // FIXME: caching? let app_id = self.application_id()?; let version = app_id.version(); @@ -109,7 +105,6 @@ impl ApplicationRelatedData { /// Get algorithm attributes (for each key type) pub fn algorithm_attributes(&self, key_type: KeyType) -> Result { - // get from cached "application related data" let aa = self.0.find(&[key_type.algorithm_tag()].into()); if let Some(aa) = aa { @@ -124,7 +119,6 @@ impl ApplicationRelatedData { /// Get PW status Bytes pub fn pw_status_bytes(&self) -> Result { - // get from cached "application related data" let psb = self.0.find(&[0xc4].into()); if let Some(psb) = psb { @@ -143,7 +137,6 @@ impl ApplicationRelatedData { /// Fingerprint, per key type. /// Zero bytes indicate a not defined private key. pub fn fingerprints(&self) -> Result, Error> { - // Get from cached "application related data" let fp = self.0.find(&[0xc5].into()); if let Some(fp) = fp { @@ -157,6 +150,12 @@ impl ApplicationRelatedData { } } + // FIXME + // #[allow(dead_code)] + // fn ca_fingerprints() { + // unimplemented!() + // } + /// Generation dates/times of key pairs pub fn key_generation_times(&self) -> Result, crate::Error> { let kg = self.0.find(&[0xcd].into()); @@ -173,6 +172,31 @@ impl ApplicationRelatedData { )) } } + + // #[allow(dead_code)] + // fn key_information() { + // unimplemented!() + // } + // + // #[allow(dead_code)] + // fn uif_pso_cds() { + // unimplemented!() + // } + // + // #[allow(dead_code)] + // fn uif_pso_dec() { + // unimplemented!() + // } + // + // #[allow(dead_code)] + // fn uif_pso_aut() { + // unimplemented!() + // } + // + // #[allow(dead_code)] + // fn uif_attestation() { + // unimplemented!() + // } } /// Security support template (see spec pg. 24) diff --git a/openpgp-card/src/openpgp.rs b/openpgp-card/src/openpgp.rs index 90964dc..a74019a 100644 --- a/openpgp-card/src/openpgp.rs +++ b/openpgp-card/src/openpgp.rs @@ -85,36 +85,6 @@ impl<'a> OpenPgpTransaction<'a> { self.tx.application_related_data() } - // #[allow(dead_code)] - // fn ca_fingerprints() { - // unimplemented!() - // } - // - // #[allow(dead_code)] - // fn key_information() { - // unimplemented!() - // } - // - // #[allow(dead_code)] - // fn uif_pso_cds() { - // unimplemented!() - // } - // - // #[allow(dead_code)] - // fn uif_pso_dec() { - // unimplemented!() - // } - // - // #[allow(dead_code)] - // fn uif_pso_aut() { - // unimplemented!() - // } - // - // #[allow(dead_code)] - // fn uif_attestation() { - // unimplemented!() - // } - // --- login data (5e) --- /// Get URL (5f50)