openpgp-card-sequoia: Implement MANAGE SECURITY ENVIRONMENT command

This commit is contained in:
Sosthène Guédon 2022-09-28 17:44:01 +02:00
parent 3ca6a514f4
commit 0c7fae8ef9
No known key found for this signature in database
GPG key ID: 36DA48A4C827B354

View file

@ -349,6 +349,16 @@ impl<'a> Open<'a> {
self.opt.algorithm_information() 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)" /// Get "Attestation Certificate (Yubico)"
pub fn attestation_certificate(&mut self) -> Result<Vec<u8>, Error> { pub fn attestation_certificate(&mut self) -> Result<Vec<u8>, Error> {
self.opt.attestation_certificate() self.opt.attestation_certificate()