Check-in [eed54cb794]
Overview
Comment:Minor cleanup
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | piv
Files: files | file ages | folders
SHA1: eed54cb7940c5ac90f4068e66acc0b92f5183109
User & Date: rkeene on 2013-01-15 04:52:26
Other Links: branch diff | manifest | tags
Context
2013-01-15
05:27
Updated to copy type when copying pcsc_identities check-in: 150cbc7790 user: rkeene tags: piv
04:52
Minor cleanup check-in: eed54cb794 user: rkeene tags: piv
04:50
Corrected signature unpacking check-in: ea4c430c50 user: rkeene tags: piv
Changes

Modified cackey.c from [cdf2a50539] to [50fa54ae2c].

1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
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) {
		if (respcode == 0x6A86) {
/* XXX TODO PIV */
		}

		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
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: