1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
|
if (send_ret == CACKEY_PCSC_E_RETRY) {
CACKEY_DEBUG_PRINTF("ADPU Sending failed, retrying read buffer");
return(cackey_get_data(slot, buffer, init_count, oid));
}
if (send_ret != CACKEY_PCSC_S_OK) {
if (respcode == 0x6A86) {
/* XXX TODO PIV */
}
CACKEY_DEBUG_PRINTF("cackey_send_apdu() failed, returning in failure");
return(-1);
}
offset += count;
|
<
<
<
<
|
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
|
if (send_ret == CACKEY_PCSC_E_RETRY) {
CACKEY_DEBUG_PRINTF("ADPU Sending failed, retrying read buffer");
return(cackey_get_data(slot, buffer, init_count, oid));
}
if (send_ret != CACKEY_PCSC_S_OK) {
CACKEY_DEBUG_PRINTF("cackey_send_apdu() failed, returning in failure");
return(-1);
}
offset += count;
|
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
|
/* We must remove the "7C" tag to get to the signature */
switch (id_type) {
case CACKEY_ID_TYPE_PIV:
if (outbuf[0] != 0x7C) {
CACKEY_DEBUG_PRINTF("Response from PIV for GENERATE AUTHENTICATION was not a 0x7C tag, returning in failure");
return(-1);
}
/* XXX TODO PIV */
memmove(outbuf, outbuf + 8, retval - 8);
retval -= 8;
break;
case CACKEY_ID_TYPE_CAC:
|
<
|
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
|
/* We must remove the "7C" tag to get to the signature */
switch (id_type) {
case CACKEY_ID_TYPE_PIV:
if (outbuf[0] != 0x7C) {
CACKEY_DEBUG_PRINTF("Response from PIV for GENERATE AUTHENTICATION was not a 0x7C tag, returning in failure");
return(-1);
}
/* XXX TODO PIV */
memmove(outbuf, outbuf + 8, retval - 8);
retval -= 8;
break;
case CACKEY_ID_TYPE_CAC:
|