Clean up some of the management key code (#584)

* mgm: Move TDES weak key checking code into a submodule
* piv: Extract management key algorithm into a separate enum
* mgm: Check management key algorithm when fetching from Yubikey
This commit is contained in:
Jack Grigg
2025-02-11 19:19:53 +00:00
committed by GitHub
parent 19e1cccfec
commit 235eb6215e
7 changed files with 189 additions and 102 deletions
+6
View File
@@ -82,6 +82,12 @@ impl Apdu {
self
}
/// Set this APDU's second parameter only
pub(crate) fn p2(&mut self, value: u8) -> &mut Self {
self.p2 = value;
self
}
/// Set both parameters for this APDU
pub fn params(&mut self, p1: u8, p2: u8) -> &mut Self {
self.p1 = p1;