Diff

Differences From Artifact [cc6681845c]:

To Artifact [94fd0f8405]:


   186    186    *
   187    187    * If an error occured, invoke the callback with no arguments.
   188    188    */
   189    189   function cackeyMessageIncoming(messageEvent) {
   190    190   	var nextFunction = null;
   191    191   	var chromeCallback = null;
   192    192   
          193  +		console.log("START MESSAGE");
          194  +		console.log(messageEvent.data);
          195  +		console.log("END MESSAGE");
   193    196   	if (messageEvent.data.target != "cackey") {
   194    197   		return;
   195    198   	}
   196    199   
   197    200   	if (GoogleSmartCard.IS_DEBUG_BUILD) {
   198    201   		console.log("START MESSAGE");
   199    202   		console.log(messageEvent.data);
................................................................................
   719    722   			"smartcardManagerAppId": "khpfeaanjngmcnplbdlpegiifgpfgdco"
   720    723   		}
   721    724   	);
   722    725   
   723    726   	/*
   724    727   	 * Initialize the PCSC NaCl interface
   725    728   	 */
   726         -	cackeyPCSCHandle = new GoogleSmartCard.PcscNacl(cackeyHandle);
          729  +	new GoogleSmartCard.NaclModule(cackeyHandle);
          730  +	cackeyPCSCHandle = new GoogleSmartCard.PcscLiteClient.NaclClientBackend(cackeyHandle.messageChannel, "CACKey", "khpfeaanjngmcnplbdlpegiifgpfgdco"); 
   727    731   
   728    732   	console.log("[cackey] cackeyInitPCSC() complete");
   729    733   
   730    734   	return;
   731    735   }
   732    736   
   733    737   /*
................................................................................
   812    816   	chrome.app.runtime.onLaunched.addListener(function() {
   813    817   		chrome.app.window.create('ui.html', {
   814    818   			"id": "cackeyUI",
   815    819   			"focused": true,
   816    820   			"innerBounds": {
   817    821   				"width": 350,
   818    822   				"minWidth": 350,
   819         -				"height": 135,
          823  +				"height": 136,
          824  +
   820    825   				"minHeight": 135
   821    826   			}
   822    827   		}, function(uiWindow) {
   823    828   			if (!uiWindow) {
   824    829   				return;
   825    830   			}
   826    831   
   827    832   			uiWindow.contentWindow.parentWindow = window;
   828    833   		});
   829    834   	});
   830    835   
   831         -	/*
   832         -	 * Register a handler for dealing with the PCSC port being disconnected
   833         -	 */
   834         -	oldOnPortDisconnectedFunction = GoogleSmartCard.Pcsc.prototype.onPortDisconnected_;
   835         -	GoogleSmartCard.Pcsc.prototype.onPortDisconnected_ = function() {
   836         -		oldOnPortDisconnectedFunction.apply(this);
   837         -
   838         -		cackeyInitPCSCCompleted("failure");
   839         -
   840         -		cackeyRestart();
   841         -
   842         -		return;
   843         -	};
   844         -
   845         -	/*
   846         -	 * Register a handler for dealing with the PCSC port being available
   847         -	 */
   848         -	oldPCSCInitializationCallback = GoogleSmartCard.PcscNacl.prototype.pcscInitializationCallback_;
   849         -	GoogleSmartCard.PcscNacl.prototype.pcscInitializationCallback_ = function(requestId, instanceId, instance, error) {
   850         -		oldPCSCInitializationCallback.apply(this, [requestId, instanceId, instance, error]);
   851         -
   852         -		return;
   853         -	};
   854         -
          836  +// Google got rid of all of the code we were using to interface with PCSC... 
          837  +// This needs to be rewritten to use the new interface
          838  +//
          839  +//	/*
          840  +//	 * Register a handler for dealing with the PCSC port being disconnected
          841  +//	 */
          842  +//	oldOnPortDisconnectedFunction = GoogleSmartCard.Pcsc.prototype.onPortDisconnected_;
          843  +//	GoogleSmartCard.Pcsc.prototype.onPortDisconnected_ = function() {
          844  +//		oldOnPortDisconnectedFunction.apply(this);
          845  +//
          846  +//		cackeyInitPCSCCompleted("failure");
          847  +//
          848  +//		cackeyRestart();
          849  +//
          850  +//		return;
          851  +//	};
          852  +//
          853  +//	/*
          854  +//	 * Register a handler for dealing with the PCSC port being available
          855  +//	 */
          856  +//	oldPCSCInitializationCallback = GoogleSmartCard.PcscNacl.prototype.pcscInitializationCallback_;
          857  +//	GoogleSmartCard.PcscNacl.prototype.pcscInitializationCallback_ = function(requestId, instanceId, instance, error) {
          858  +//		oldPCSCInitializationCallback.apply(this, [requestId, instanceId, instance, error]);
          859  +//
          860  +//		return;
          861  +//	};
          862  +//
   855    863   	/*
   856    864   	 * Initialize global state
   857    865   	 */
   858    866   	cackeyInitGlobalState();
   859    867   
   860    868   	return;
   861    869   }
   862    870   
   863    871   /* Initialize CACKey */
   864    872   cackeyAppInit();
   865    873   cackeyInit();