Diff

Differences From Artifact [50fa54ae2c]:

To Artifact [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);