Check-in [150cbc7790]
Overview
Comment:Updated to copy type when copying pcsc_identities
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | piv
Files: files | file ages | folders
SHA1:150cbc779099e7331a6b6c670c34e7d80d7dd091
User & Date: rkeene on 2013-01-15 05:27:53
Other Links: manifest | tags
Context
2013-01-15
14:12
Merged in trunk check-in: 8f27214611 user: rkeene tags: piv
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
Changes

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

  2284   2284   	}
  2285   2285   
  2286   2286   	if (dest == NULL) {
  2287   2287   		dest = malloc(sizeof(*dest) * count);
  2288   2288   	}
  2289   2289   
  2290   2290   	for (idx = 0; idx < count; idx++) {
         2291  +		dest[idx].id_type = start[idx].id_type;
         2292  +
  2291   2293   		switch (dest[idx].id_type) {
  2292   2294   			case CACKEY_ID_TYPE_CAC:
  2293   2295   				memcpy(dest[idx].card.cac.applet, start[idx].card.cac.applet, sizeof(dest[idx].card.cac.applet));
  2294   2296   				dest[idx].card.cac.file = start[idx].card.cac.file;
  2295   2297   				break;
  2296   2298   			case CACKEY_ID_TYPE_PIV:
  2297   2299   				dest[idx].card.piv.key_id = start[idx].card.piv.key_id;
................................................................................
  2622   2624   	}
  2623   2625   
  2624   2626   	switch (id_type) {
  2625   2627   		case CACKEY_ID_TYPE_PIV:
  2626   2628   		case CACKEY_ID_TYPE_CAC:
  2627   2629   			break;
  2628   2630   		default:
  2629         -			CACKEY_DEBUG_PRINTF("Error.  identity->pcsc_identity is not a supported value.");
         2631  +			CACKEY_DEBUG_PRINTF("Error.  identity->pcsc_identity is not a supported value. Type is: 0x%lx (PIV = 0x%lx, CAC = 0x%lx)", (unsigned long) id_type, (unsigned long) CACKEY_ID_TYPE_PIV, (unsigned long) CACKEY_ID_TYPE_CAC);
  2630   2632   
  2631   2633   			return(-1);
  2632   2634   	}
  2633   2635   
  2634   2636   	/* Determine identity Key size */
  2635   2637   	if (identity->pcsc_identity->keysize < 0) {
  2636   2638   		identity->pcsc_identity->keysize = x509_to_keysize(identity->pcsc_identity->certificate, identity->pcsc_identity->certificate_len);