Diff

Differences From Artifact [0661f619de]:

To Artifact [2007da4548]:


  3463   3463   	if (getenv("CACKEY_NO_EXTRA_CERTS") != NULL) {
  3464   3464   		num_dod_certs = 0;
  3465   3465   	} else {
  3466   3466   		num_dod_certs = sizeof(extra_certs) / sizeof(extra_certs[0]);
  3467   3467   	}
  3468   3468   
  3469   3469   	if (slot->internal) {
  3470         -		num_ids = num_dod_certs;
         3470  +		num_ids = num_dod_certs * 3;
  3471   3471   
  3472   3472   		if (num_ids != 0) {
  3473   3473   			identities = malloc(num_ids * sizeof(*identities));
  3474   3474   
  3475   3475   			cackey_read_dod_identities(identities, 0, num_dod_certs);
  3476   3476   		} else {
  3477   3477   			identities = NULL;
................................................................................
  3484   3484   
  3485   3485   	pcsc_identities = cackey_read_certs(slot, NULL, &num_certs);
  3486   3486   	if (pcsc_identities != NULL) {
  3487   3487   		/* Convert number of Certs to number of objects */
  3488   3488   		num_ids = (CKO_PRIVATE_KEY - CKO_CERTIFICATE + 1) * num_certs;
  3489   3489   
  3490   3490   		if (include_extra_certs) {
  3491         -			num_ids += num_dod_certs;
         3491  +			num_ids += num_dod_certs * 3;
  3492   3492   		}
  3493   3493   
  3494   3494   		identities = malloc(num_ids * sizeof(*identities));
  3495   3495   
  3496   3496   		/* Add certificates, public keys, and private keys from the smartcard */
  3497   3497   		id_idx = 0;
  3498   3498   		for (cert_idx = 0; cert_idx < num_certs; cert_idx++) {