Diff

Differences From Artifact [6f86c48f0e]:

To Artifact [13b6e88e7c]:


  3956   3956   }
  3957   3957   
  3958   3958   static struct cackey_identity *cackey_read_identities(struct cackey_slot *slot, unsigned long *ids_found) {
  3959   3959   	struct cackey_pcsc_identity *pcsc_identities;
  3960   3960   	struct cackey_identity *identities;
  3961   3961   	unsigned long num_ids, id_idx, curr_id_type;
  3962   3962   	unsigned long num_certs, num_dod_certs, cert_idx;
  3963         -	int include_extra_certs = 0;
         3963  +	int include_extra_certs = 0, include_dod_certs;
  3964   3964   
  3965   3965   	CACKEY_DEBUG_PRINTF("Called.");
  3966   3966   
  3967   3967   	if (ids_found == NULL) {
  3968   3968   		CACKEY_DEBUG_PRINTF("Error.  ids_found is NULL");
  3969   3969   
  3970   3970   		return(NULL);
................................................................................
  3978   3978   		include_extra_certs = 1;
  3979   3979   	}
  3980   3980   
  3981   3981   	if (getenv("CACKEY_NO_DOD_CERTS_ON_HW_SLOTS") != NULL) {
  3982   3982   		include_extra_certs = 0;
  3983   3983   	}
  3984   3984   
         3985  +#ifdef CACKEY_NO_EXTRA_CERTS
         3986  +	if (getenv("CACKEY_EXTRA_CERTS") != NULL) {
         3987  +		include_dod_certs = 1;
         3988  +	} else {
         3989  +		include_dod_certs = 0;
         3990  +	}
         3991  +#else
  3985   3992   	if (getenv("CACKEY_NO_EXTRA_CERTS") != NULL) {
  3986         -		num_dod_certs = 0;
         3993  +		include_dod_certs = 0;
  3987   3994   	} else {
         3995  +		include_dod_certs = 1;
         3996  +	}
         3997  +#endif
         3998  +
         3999  +	if (include_dod_certs) {
  3988   4000   		num_dod_certs = sizeof(extra_certs) / sizeof(extra_certs[0]);
         4001  +	} else {
         4002  +		num_dod_certs = 0;
  3989   4003   	}
  3990   4004   
  3991   4005   	if (slot->internal) {
  3992   4006   		num_ids = cackey_read_dod_identities(NULL, num_dod_certs);
  3993   4007   
  3994   4008   		if (num_ids != 0) {
  3995   4009   			identities = malloc(num_ids * sizeof(*identities));