Do not deselect applications if the application was not found#28
Do not deselect applications if the application was not found#28sosthene-nitrokey merged 1 commit intomainfrom
Conversation
|
Thanks. The section of 800-74-4 lists 4 cases. Since these cards can also have an openpgp applet, I am not familiar with rust, but does the change return "not found" for an unknown AID? 6A 82 |
From what I understand the previous behaviour was already correct for the case of selecting an existing AID.
Yes:
Yes, this does not change |
|
Looks good. I will be looking for the next firmware update to try it. |
| }; | ||
|
|
||
| self.current_aid = Some(aid); | ||
| let old_aid = mem::replace(&mut self.current_aid, Some(aid)); |
There was a problem hiding this comment.
nit: Can we use Option::replace instead? IMHO easier to read.
| let old_aid = mem::replace(&mut self.current_aid, Some(aid)); | |
| let old_aid = self.current_aid.replace(aid); |
There was a problem hiding this comment.
Good catch. Probably should be a clippy lint.
From NIST SP 800-73-4: