From 0c7fae8ef998985de9c435640e5ba866fc368d35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sosth=C3=A8ne=20Gu=C3=A9don?= Date: Wed, 28 Sep 2022 17:44:01 +0200 Subject: [PATCH] openpgp-card-sequoia: Implement MANAGE SECURITY ENVIRONMENT command --- openpgp-card-sequoia/src/card.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/openpgp-card-sequoia/src/card.rs b/openpgp-card-sequoia/src/card.rs index f9c5cae..af48f31 100644 --- a/openpgp-card-sequoia/src/card.rs +++ b/openpgp-card-sequoia/src/card.rs @@ -349,6 +349,16 @@ impl<'a> Open<'a> { self.opt.algorithm_information() } + /// "MANAGE SECURITY ENVIRONMENT" + /// Make `key_ref` usable for the operation normally done by the key designated by `for_operation` + pub fn manage_security_environment( + &mut self, + for_operation: KeyType, + key_ref: KeyType, + ) -> Result<(), Error> { + self.opt.manage_security_environment(for_operation, key_ref) + } + /// Get "Attestation Certificate (Yubico)" pub fn attestation_certificate(&mut self) -> Result, Error> { self.opt.attestation_certificate()