Check-in [3efa328414]
Overview
Comment:Fixed bug where DoD certs were overwriting random parts of memory causing strange bugs, fixes [b9306c2b35]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3efa3284148f7689f5dc82af3e8e7c84f31cf5e0
User & Date: rkeene on 2012-07-27 18:27:13
Original Comment: Fixed bug where DoD certs were overwriting random parts of memory causing strange bugs
Other Links: manifest | tags
References
2018-08-13
16:57 Closed ticket [b9306c2b35]: CACKey 0.6.7 causes applications to hang and crash plus 3 other changes artifact: 499af008d8 user: rkeene
2012-07-27
18:35 Fixed ticket [b9306c2b35]. artifact: 6bacdba8e5 user: rkeene
Context
2012-07-27
18:29
Removed extraneous parameter of cackey_read_dod_identities() check-in: e491e4b5f9 user: rkeene tags: trunk
18:27
Fixed bug where DoD certs were overwriting random parts of memory causing strange bugs, fixes [b9306c2b35] check-in: 3efa328414 user: rkeene tags: trunk
2012-07-25
14:14
Fixed typo in Mac OS X package LICENSE. check-in: e716dafc55 user: kvanals tags: trunk
Changes

Modified cackey.c from [0661f619de] to [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++) {