From 6a1bbf831f40903295c1831b779df7bbd81cb37c Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Sat, 16 May 2020 14:48:23 +0200 Subject: [PATCH] Woohoo! Filo's agent setup routine goes through! MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit % yubikey-agent -setup --really-delete-all-piv-keys Resetting YubiKey PIV applet... ๐Ÿ” The PIN is up to 8 numbers, letters, or symbols. ๐Ÿ‘† You'll need it once per session. โŒ The YubiKey gets locked if the wrong PIN is entered 3 times. Choose a new PIN: Repeat PIN: ๐Ÿงช Reticulating splines... โœ… Done! This YubiKey is secured and ready to go.๐Ÿค When the YubiKey blinks, touch it to authorize the login.๐Ÿ”‘ Here's your new shiny SSH public key:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBNAn1mgsUfJ0eA+cbvPcJBilynMKI9lIlpeZWMAHlZGe3dK62CxD5z7RQ/KdnXxQqQOP/qt1xdDOJDn3NjQrtRU= Next steps: ensure yubikey-agent is running via launchd/systemd/...,set the SSH_AUTH_SOCK environment variable, and test with "ssh-add -L" ๐Ÿ’ญ Remember: everything breaks, have a backup plan for when this YubiKey does. --- src/command.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/command.rs b/src/command.rs index d9aad04..18c973b 100644 --- a/src/command.rs +++ b/src/command.rs @@ -3,7 +3,7 @@ pub mod instruction; pub type Data = heapless_bytes::Bytes; -#[derive(Clone, Debug, PartialEq)] +#[derive(Clone, Debug, PartialEq, Eq)] pub struct Command { class: class::Class, instruction: instruction::Instruction, @@ -37,6 +37,10 @@ impl Command { &self.data } + pub fn data_mut(&mut self) -> &mut Data { + &mut self.data + } + pub fn expected(&self) -> usize { self.le }