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()));