LedgerHQ / app-openpgp

OpenPGP Card Application
Apache License 2.0
123 stars 21 forks source link

Get challenge crashes #63

Closed antonio-fr closed 3 years ago

antonio-fr commented 3 years ago

When sending a standard GET CHALLENGE command like [CLA=0, INS=0x84, P1=0, P2=0, Le=0x20] the app crashes and responds with the code 0x6F42. Watching the code, the GetChallenge command can work with the undocumented and non-standard P1=0x80 using P2 for length input. For example [CLA=0, INS=0x84, P1=0x80, P2=0x20, 0x00] is working. But it fails the same way with P2=0 : 6F42 response.

Actually, there are 2 issues :