Diff

Differences From Artifact [e9059b3fc8]:

To Artifact [6206331092]:


  3224   3224   }
  3225   3225   
  3226   3226   static struct cackey_identity *cackey_read_identities(struct cackey_slot *slot, unsigned long *ids_found) {
  3227   3227   	struct cackey_pcsc_identity *pcsc_identities;
  3228   3228   	struct cackey_identity *identities;
  3229   3229   	unsigned long num_ids, id_idx, curr_id_type;
  3230   3230   	unsigned long num_certs, num_extra_certs, cert_idx;
         3231  +	int include_extra_certs = 1;
  3231   3232   
  3232   3233   	CACKEY_DEBUG_PRINTF("Called.");
  3233   3234   
  3234         -	num_extra_certs = sizeof(extra_certs) / sizeof(extra_certs[0]);
         3235  +	if (getenv("CACKEY_NO_EXTRA_CERTS") != NULL) {
         3236  +		CACKEY_DEBUG_PRINTF("Asked not to include extra (DoD) certificates");
         3237  +
         3238  +		include_extra_certs = 0;
         3239  +	}
         3240  +
         3241  +	if (include_extra_certs) {
         3242  +		num_extra_certs = sizeof(extra_certs) / sizeof(extra_certs[0]);
         3243  +
         3244  +		CACKEY_DEBUG_PRINTF("Including %i DoD Certificates as objects on this token", num_extra_certs);
         3245  +	} else {
         3246  +		num_extra_certs = 0;
         3247  +	}
  3235   3248   
  3236   3249   	if (ids_found == NULL) {
  3237   3250   		CACKEY_DEBUG_PRINTF("Error.  ids_found is NULL");
  3238   3251   
  3239   3252   		return(NULL);
  3240   3253   	}
  3241   3254