github-af / SmartPGP

SmartPGP is a JavaCard implementation of the OpenPGP card specifications
GNU General Public License v2.0
227 stars 47 forks source link

Factory reset does not work when APDUs are received over a logical channel #35

Closed stelian42 closed 3 years ago

stelian42 commented 3 years ago

I've discovered this while porting OpenKeyChain in order to use SmartPGP installed inside the secure element of an Android tablet.

Android OMAPI uses logical channels for communication, and SmartPGP mishandles the CLA byte encoding.

This is fixed by pull request #34

af-anssi commented 3 years ago

I cherry-picked your commit 48ba623b9dba95b912914115e35576874bb2f348 to push it in the javacard-3.0.1 branch as your fix also applies to this version. Thank you for your contribution. I