Diff

Differences From Artifact [ce38432e82]:

To Artifact [2e881e3150]:


  2449   2449   	}
  2450   2450   
  2451   2451   	if (!slot->slot_reset) {
  2452   2452   		if (slot->cached_certs) {
  2453   2453   			if (certs == NULL) {
  2454   2454   				certs = malloc(sizeof(*certs) * slot->cached_certs_count);
  2455   2455   				*count = slot->cached_certs_count;
  2456         -
  2457   2456   			} else {
  2458   2457   				if (*count > slot->cached_certs_count) {
  2459   2458   					*count = slot->cached_certs_count;
  2460   2459   				}
  2461   2460   			}
  2462   2461   
  2463   2462   			cackey_copy_certs(certs, slot->cached_certs, *count);
................................................................................
  3078   3077   				CACKEY_DEBUG_PRINTF("We recently had a PIV card, so we will attempt to authenticate using the PIV Application key reference");
  3079   3078   
  3080   3079   				key_reference = 0x80;
  3081   3080   				break;
  3082   3081   			default:
  3083   3082   				break;
  3084   3083   		}
         3084  +
         3085  +		cackey_free_certs(pcsc_identities, num_certs, 1);
  3085   3086   	}
  3086   3087   
  3087   3088   	/* Issue PIN Verify */
  3088   3089   	send_ret = cackey_send_apdu(slot, GSCIS_CLASS_ISO7816, GSCIS_INSTR_VERIFY, 0x00, key_reference, sizeof(cac_pin), cac_pin, 0x00, &response_code, NULL, NULL);
  3089   3090   
  3090   3091   	if (send_ret != CACKEY_PCSC_S_OK) {
  3091   3092   		if ((response_code & 0x63C0) == 0x63C0) {