openpgp-card-sequoia: expose login_data getter/setter
This commit is contained in:
parent
5f00bc87aa
commit
00345fff2c
1 changed files with 7 additions and 0 deletions
|
@ -435,6 +435,9 @@ impl<'a> Card<Transaction<'a>> {
|
||||||
// --- optional private DOs (0101 - 0104) ---
|
// --- optional private DOs (0101 - 0104) ---
|
||||||
|
|
||||||
// --- login data (5e) ---
|
// --- login data (5e) ---
|
||||||
|
pub fn login_data(&mut self) -> Result<String, Error> {
|
||||||
|
Ok(String::from_utf8_lossy(&self.state.opt.login_data()?).to_string())
|
||||||
|
}
|
||||||
|
|
||||||
// --- URL (5f50) ---
|
// --- URL (5f50) ---
|
||||||
|
|
||||||
|
@ -775,6 +778,10 @@ impl Card<Admin<'_, '_>> {
|
||||||
self.card().set_sex(sex)
|
self.card().set_sex(sex)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn set_login_data(&mut self, login_data: &str) -> Result<(), Error> {
|
||||||
|
self.card().set_login(login_data.as_bytes())
|
||||||
|
}
|
||||||
|
|
||||||
/// Set "hardholder" URL on the card.
|
/// Set "hardholder" URL on the card.
|
||||||
///
|
///
|
||||||
/// "The URL should contain a link to a set of public keys in OpenPGP format, related to
|
/// "The URL should contain a link to a set of public keys in OpenPGP format, related to
|
||||||
|
|
Loading…
Reference in a new issue