From a1d6d8cad21acf6366b3e4348ff22767f86e371b Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Thu, 3 Nov 2022 15:10:15 +0100 Subject: [PATCH] openpgp-card-sequoia: add comments to url fns --- openpgp-card-sequoia/src/lib.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openpgp-card-sequoia/src/lib.rs b/openpgp-card-sequoia/src/lib.rs index e33ad95..f2284b5 100644 --- a/openpgp-card-sequoia/src/lib.rs +++ b/openpgp-card-sequoia/src/lib.rs @@ -430,6 +430,10 @@ impl<'a> Card> { // --- URL (5f50) --- + /// Get "hardholder" URL from the card. + /// + /// "The URL should contain a link to a set of public keys in OpenPGP format, related to + /// the card." pub fn url(&mut self) -> Result { Ok(String::from_utf8_lossy(&self.state.opt.url()?).to_string()) } @@ -763,6 +767,10 @@ impl Card> { self.card().set_sex(sex) } + /// Set "hardholder" URL on the card. + /// + /// "The URL should contain a link to a set of public keys in OpenPGP format, related to + /// the card." pub fn set_url(&mut self, url: &str) -> Result<(), Error> { if url.chars().any(|c| !c.is_ascii()) { return Err(Error::InternalError("Invalid char in url".into()));