openpgp-card: Add activate_file() to CardTransaction

This commit is contained in:
Heiko Schaefer 2023-05-01 18:04:15 +02:00
parent 81ef12ffb2
commit 50e3d12f26
No known key found for this signature in database
GPG key ID: 4A849A1904CCBD7D

View file

@ -111,6 +111,13 @@ pub trait CardTransaction {
apdu::send_command(self, select_openpgp, false)?.try_into()
}
/// Activate file
fn activate_file(&mut self) -> Result<Vec<u8>, 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