Skip to content

Commit

Permalink
Avoid 6282 reply for a successful operation
Browse files Browse the repository at this point in the history
Change-Id: I5d4d3103692fc6db51f13fc5338360289c26af9a
  • Loading branch information
martinpaljak committed Apr 18, 2019
1 parent 49f7669 commit 31cb527
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libopensc/card-esteid2018.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,10 @@ static int esteid_compute_signature(sc_card_t *card, const u8 *data, size_t data

switch (env->key_ref[0]) {
case 1: /* authentication key */
sc_format_apdu_ex(card, &apdu, 0x88, 0, 0, sbuf, datalen, out, MIN(256, outlen));
sc_format_apdu_ex(card, &apdu, 0x88, 0, 0, sbuf, datalen, out, MIN(256, MIN(SIGNATURE_PAYLOAD_SIZE * 2, outlen)));
break;
default:
sc_format_apdu_ex(card, &apdu, 0x2A, 0x9E, 0x9A, sbuf, datalen, out, MIN(256, outlen));
sc_format_apdu_ex(card, &apdu, 0x2A, 0x9E, 0x9A, sbuf, datalen, out, MIN(256, MIN(SIGNATURE_PAYLOAD_SIZE * 2, outlen)));
}

SC_TRANSMIT_TEST_RET(card, apdu, "PSO CDS/INTERNAL AUTHENTICATE failed");
Expand Down

0 comments on commit 31cb527

Please sign in to comment.