Merge pull request #15 from dongcarl/patch-2

gpg_data.c: Clear correct bits for 0x4f tag.
This commit is contained in:
Cédric 2017-11-22 08:52:23 +00:00 committed by GitHub
commit 4fb1610360
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -282,7 +282,7 @@ int gpg_apdu_put_data(unsigned int ref) {
if (G_gpg_vstate.io_length != 4) { if (G_gpg_vstate.io_length != 4) {
THROW(SW_WRONG_LENGTH); THROW(SW_WRONG_LENGTH);
} }
G_gpg_vstate.work.io_buffer[G_gpg_vstate.io_offset] &= ~0x07; G_gpg_vstate.work.io_buffer[G_gpg_vstate.io_offset + 3] &= ~0x07;
nvm_write(&N_gpg_pstate->AID[10], &G_gpg_vstate.work.io_buffer[G_gpg_vstate.io_offset], 4); nvm_write(&N_gpg_pstate->AID[10], &G_gpg_vstate.work.io_buffer[G_gpg_vstate.io_offset], 4);
break; break;