From fd9cd6eabd4ae9e7e51e29dfd4446b7abcb2cdb0 Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Sun, 4 Jul 2021 01:03:09 +0200 Subject: [PATCH] Change set* commands to leave out 'Le', because no response data is expected. (The Floss-Card 3.4 rejects set* commands with "expected" response data) --- openpgp-card-sequoia/src/main.rs | 4 ++++ openpgp-card/src/lib.rs | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/openpgp-card-sequoia/src/main.rs b/openpgp-card-sequoia/src/main.rs index f046b38..fa031e4 100644 --- a/openpgp-card-sequoia/src/main.rs +++ b/openpgp-card-sequoia/src/main.rs @@ -94,16 +94,20 @@ fn main() -> Result<(), Box> { let res = oc_admin.set_name("Bar< Result { @@ -793,12 +793,12 @@ impl CardAdmin { } let put_lang = commands::put_lang(lang.as_bytes().to_vec()); - apdu::send_command(self.card(), put_lang, Le::Short, Some(self)) + apdu::send_command(self.card(), put_lang, Le::None, Some(self)) } pub fn set_sex(&self, sex: Sex) -> Result { let put_sex = commands::put_sex(sex.as_u8()); - apdu::send_command(self.card(), put_sex, Le::Short, Some(self)) + apdu::send_command(self.card(), put_sex, Le::None, Some(self)) } pub fn set_url(&self, url: &str) -> Result { @@ -811,7 +811,7 @@ impl CardAdmin { if url.len() < ec.max_len_special_do as usize { let put_url = commands::put_url(url.as_bytes().to_vec()); - apdu::send_command(self.card(), put_url, Le::Short, Some(self)) + apdu::send_command(self.card(), put_url, Le::None, Some(self)) } else { Err(anyhow!("URL too long").into()) }