Differences From Artifact [84da4e7494]:
- File cackey.c — part of check-in [45212cc4ca] at 2010-05-17 19:53:33 on branch trunk — Updated to treat a request of read of 0 bytes as a no-op. (user: rkeene, size: 148532) [annotate] [blame] [check-ins using]
To Artifact [c23e82a84b]:
- File
cackey.c
— part of check-in
[f276873873]
at
2010-05-17 20:20:16
on branch trunk
— Updated to not set "Le" when asking to sign/decrypt (discovered from
ActivClient APDU dump)
Reverted last commit where reads of 0 bytes were converted to no-ops (user: rkeene, size: 148354) [annotate] [blame] [check-ins using]
︙ | |||
1161 1162 1163 1164 1165 1166 1167 | 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 | - - - - - - | } } if (major_rc == 0x61) { /* We need to READ */ CACKEY_DEBUG_PRINTF("Buffer read required"); |
︙ | |||
1854 1855 1856 1857 1858 1859 1860 | 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 | - - - - - - | if (buflen > 255) { CACKEY_DEBUG_PRINTF("Error. buflen is greater than 255 (buflen = %lu)", (unsigned long) buflen); return(-1); } |
︙ | |||
1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 | 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 | + + | cackey_select_file(slot, identity->pcsc_identity->file); tmpbuf_s = tmpbuf; while (tmpbuflen) { if (tmpbuflen > 245) { bytes_to_send = 245; p1 = 0x80; le = 0x00; } else { bytes_to_send = tmpbuflen; p1 = 0x00; le = 0x00; } send_ret = cackey_send_apdu(slot, GSCIS_CLASS_GLOBAL_PLATFORM, GSCIS_INSTR_SIGNDECRYPT, p1, 0x00, bytes_to_send, tmpbuf, le, &respcode, outbuf, &outbuflen); if (send_ret != CACKEY_PCSC_S_OK) { CACKEY_DEBUG_PRINTF("ADPU Sending Failed -- returning in error."); if (respcode == 0x6982) { |
︙ |