Diff

Differences From Artifact [64d4505a46]:

To Artifact [84da4e7494]:


  1160   1160   			CACKEY_DEBUG_PRINTF("Throwing away %lu bytes, nowhere to put them!", (unsigned long) recv_len);
  1161   1161   		}
  1162   1162   	}
  1163   1163   
  1164   1164   	if (major_rc == 0x61) {
  1165   1165   		/* We need to READ */
  1166   1166   		CACKEY_DEBUG_PRINTF("Buffer read required");
         1167  +
         1168  +		if (minor_rc == 0x00) {
         1169  +			CACKEY_DEBUG_PRINTF("Read of 0 bytes is a no-op, returning in success.");
         1170  +
         1171  +			return(CACKEY_PCSC_S_OK);
         1172  +		}
  1167   1173   
  1168   1174   		pcsc_getresp_ret = cackey_send_apdu(slot, GSCIS_CLASS_ISO7816, GSCIS_INSTR_GET_RESPONSE, 0x00, 0x00, 0, NULL, minor_rc, respcode, respdata, &tmp_respdata_len);
  1169   1175   		if (pcsc_getresp_ret != CACKEY_PCSC_S_OK) {
  1170   1176   			CACKEY_DEBUG_PRINTF("Buffer read failed!  Returning in failure");
  1171   1177   
  1172   1178   			/* End Smartcard Transaction */
  1173   1179   			cackey_end_transaction(slot);