Remove the unused apdu from the select command

This commit is contained in:
Sosthène Guédon
2022-10-31 10:07:20 +01:00
parent e076633cc7
commit fd23a9fd42
2 changed files with 3 additions and 7 deletions
+1 -1
View File
@@ -9,7 +9,7 @@ where
T: client::Client + client::Ed255 + client::Tdes,
{
fn select(&mut self, apdu: &Command, reply: &mut response::Data) -> Result {
self.select(apdu, reply)
self.select(reply)
}
fn deselect(&mut self) {
+2 -6
View File
@@ -67,11 +67,7 @@ where
// The way apdu-dispatch currently works, this would deselect, resetting security indicators.
pub fn deselect(&mut self) {}
pub fn select<const R: usize>(
&mut self,
_aid: commands::Select<'_>,
reply: &mut Data<R>,
) -> Result {
pub fn select<const R: usize>(&mut self, reply: &mut Data<R>) -> Result {
use piv_types::Algorithms::*;
info!("selecting PIV maybe");
@@ -132,7 +128,7 @@ where
Command::Verify(verify) => self.verify(verify),
Command::ChangeReference(change_reference) => self.change_reference(change_reference),
Command::GetData(container) => self.get_data(container, reply),
Command::Select(aid) => self.select(aid, reply),
Command::Select(_aid) => self.select(reply),
_ => todo!(),
}
}