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
3225
3226
3227
3228
3229
3230

3231
3232
3233







3234





3235
3236
3237
3238
3239
3240
3241
}

static struct cackey_identity *cackey_read_identities(struct cackey_slot *slot, unsigned long *ids_found) {
	struct cackey_pcsc_identity *pcsc_identities;
	struct cackey_identity *identities;
	unsigned long num_ids, id_idx, curr_id_type;
	unsigned long num_certs, num_extra_certs, cert_idx;


	CACKEY_DEBUG_PRINTF("Called.");








	num_extra_certs = sizeof(extra_certs) / sizeof(extra_certs[0]);






	if (ids_found == NULL) {
		CACKEY_DEBUG_PRINTF("Error.  ids_found is NULL");

		return(NULL);
	}








>



>
>
>
>
>
>
>
|
>
>
>
>
>







3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
}

static struct cackey_identity *cackey_read_identities(struct cackey_slot *slot, unsigned long *ids_found) {
	struct cackey_pcsc_identity *pcsc_identities;
	struct cackey_identity *identities;
	unsigned long num_ids, id_idx, curr_id_type;
	unsigned long num_certs, num_extra_certs, cert_idx;
	int include_extra_certs = 1;

	CACKEY_DEBUG_PRINTF("Called.");

	if (getenv("CACKEY_NO_EXTRA_CERTS") != NULL) {
		CACKEY_DEBUG_PRINTF("Asked not to include extra (DoD) certificates");

		include_extra_certs = 0;
	}

	if (include_extra_certs) {
		num_extra_certs = sizeof(extra_certs) / sizeof(extra_certs[0]);

		CACKEY_DEBUG_PRINTF("Including %i DoD Certificates as objects on this token", num_extra_certs);
	} else {
		num_extra_certs = 0;
	}

	if (ids_found == NULL) {
		CACKEY_DEBUG_PRINTF("Error.  ids_found is NULL");

		return(NULL);
	}