From 50e3d12f26731b43ffdf12d8283f21c04cdb70dc Mon Sep 17 00:00:00 2001 From: Heiko Schaefer Date: Mon, 1 May 2023 18:04:15 +0200 Subject: [PATCH] openpgp-card: Add activate_file() to CardTransaction --- openpgp-card/src/lib.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/openpgp-card/src/lib.rs b/openpgp-card/src/lib.rs index ee0f362..587b6c6 100644 --- a/openpgp-card/src/lib.rs +++ b/openpgp-card/src/lib.rs @@ -111,6 +111,13 @@ pub trait CardTransaction { apdu::send_command(self, select_openpgp, false)?.try_into() } + /// Activate file + fn activate_file(&mut self) -> Result, Error> { + log::info!("CardTransaction: activate_file"); + let activate_file = commands::activate_file(); + apdu::send_command(self, activate_file, false)?.try_into() + } + /// Get the "application related data" from the card. /// /// (This data should probably be cached in a higher layer. Some parts of