Check-in [b9bcff12a6]
Overview
Comment:Updated to support an environment variable named CACKEY_NO_EXTRA_CERTS to inhibit DoD certs from being presented
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:b9bcff12a6cd8ea3f24de26cd376233d1d404e12
User & Date: rkeene on 2012-04-26 01:10:29
Other Links: manifest | tags
Context
2012-04-26
01:53
CACKey 0.6.6 check-in: db27c32333 user: rkeene tags: trunk, 0.6.6
01:10
Updated to support an environment variable named CACKEY_NO_EXTRA_CERTS to inhibit DoD certs from being presented check-in: b9bcff12a6 user: rkeene tags: trunk
2012-04-21
01:14
Fixed issue with C_GetMechanismList rejecting valid buffer sizes check-in: dbd79de227 user: rkeene tags: trunk
Changes

Modified cackey.c from [e9059b3fc8] to [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