Check-in [b7f98935cd]
Overview
Comment:Added additional debugging output
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | piv
Files: files | file ages | folders
SHA1:b7f98935cddfe98533346e69ef88f9c768810af3
User & Date: rkeene on 2013-01-15 21:00:19
Other Links: manifest | tags
Context
2013-01-15
21:12
Updated to label PIV keys with their types. Removed extraneous debugging output check-in: e2ba3f7684 user: rkeene tags: piv
21:00
Added additional debugging output check-in: b7f98935cd user: rkeene tags: piv
19:15
Added "Common Policy" root CA check-in: 69efc196d7 user: rkeene tags: piv
Changes

Modified cackey.c from [cc302eaf9b] to [a01b1ce264].

  1233   1233   
  1234   1234   		slot->pcsc_card_connected = 1;
  1235   1235   		slot->transaction_depth = 0;
  1236   1236   		slot->transaction_need_hw_lock = 0;
  1237   1237   		slot->protocol = protocol;
  1238   1238   	}
  1239   1239   
         1240  +	CACKEY_DEBUG_PRINTF("Returning in success");
         1241  +
  1240   1242   	return(CACKEY_PCSC_S_OK);
  1241   1243   }
  1242   1244   
  1243   1245   /*
  1244   1246    * SYNPOSIS
  1245   1247    *     cackey_ret cackey_begin_transaction(struct cackey_slot *slot);
  1246   1248    *
................................................................................
  3110   3112   	pcsc_connect_ret = cackey_connect_card(slot);
  3111   3113   	if (pcsc_connect_ret != CACKEY_PCSC_S_OK) {
  3112   3114   		CACKEY_DEBUG_PRINTF("Unable to connect to card, returning token absent");
  3113   3115   
  3114   3116   		return(CACKEY_PCSC_E_TOKENABSENT);
  3115   3117   	}
  3116   3118   
         3119  +	CACKEY_DEBUG_PRINTF("Calling SCardStatus() to determine card status");
         3120  +
  3117   3121   	atr_len = sizeof(atr);
  3118   3122   	status_ret = SCardStatus(slot->pcsc_card, NULL, &reader_len, &state, &protocol, atr, &atr_len);
  3119   3123   
  3120   3124   	if (status_ret == SCARD_E_INVALID_HANDLE) {
  3121   3125   		CACKEY_DEBUG_PRINTF("SCardStatus() returned SCARD_E_INVALID_HANDLE, marking is not already connected and trying again");
  3122   3126   		cackey_mark_slot_reset(slot);
  3123   3127   
  3124   3128   		pcsc_connect_ret = cackey_connect_card(slot);
  3125   3129   		if (pcsc_connect_ret != CACKEY_PCSC_S_OK) {
  3126   3130   			CACKEY_DEBUG_PRINTF("Unable to connect to card, returning token absent");
  3127   3131   
  3128   3132   			return(CACKEY_PCSC_E_TOKENABSENT);
  3129   3133   		}
         3134  +
         3135  +		CACKEY_DEBUG_PRINTF("Calling SCardStatus() again");
  3130   3136   
  3131   3137   		atr_len = sizeof(atr);
  3132   3138   		status_ret = SCardStatus(slot->pcsc_card, NULL, &reader_len, &state, &protocol, atr, &atr_len);
  3133   3139   	}
  3134   3140   
  3135   3141   	if (status_ret != SCARD_S_SUCCESS) {
  3136   3142   		cackey_mark_slot_reset(slot);