Overview
Comment: | Upgraded to latest nacl-libpcsc and started using the sightly cleaner interfaces |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: | 357cf7b22fa8e1f9dc29dc316d27e05e1a6b6332 |
User & Date: | rkeene on 2016-04-14 18:16:15 |
Other Links: | manifest | tags |
Context
2016-04-14
| ||
19:42 | Cleanup, more work towards a stable release check-in: d2b0a782d9 user: rkeene tags: trunk | |
18:16 | Upgraded to latest nacl-libpcsc and started using the sightly cleaner interfaces check-in: 357cf7b22f user: rkeene tags: trunk | |
17:07 | Updated to use NaCl libpcsc (in progress) check-in: c3e0c9025e user: rkeene tags: trunk | |
Changes
Modified build/chrome/build-deps from [faff128b75] to [630f1897fa].
172 172 173 173 # Build the libpcsc we need 174 174 function buildPCSC() { 175 175 local version url pkg sha256 configure_extra 176 176 local archive workdir 177 177 178 178 pkg='nacl-libpcsc' 179 - version='179983e00b5ed8a8fead5d2f9bb35f5304716041' 179 + version='a72d1992e9e7d70c885d3b34f9b75317fa8671ef' 180 180 url="https://chiselapp.com/user/rkeene/repository/nacl-libpcsc/tarball/nacl-libpcsc-${version}.tar.gz?uuid=${version}" 181 181 sha256='-' 182 182 183 183 archive="archive/${pkg}-${version}.tar.gz" 184 184 workdir="workdir-${RANDOM}${RANDOM}${RANDOM}${RANDOM}.build" 185 185 186 186 download "${url}" "${archive}" "${sha256}" || return 1
Modified build/chrome/cackey-chrome-plugin.cc from [06cf85fd98] to [f5c7563579].
30 30 31 31 virtual ~CACKeyInstance() {} 32 32 33 33 virtual void HandleMessageThread(pp::VarDictionary *message, pp::Var *messagePlain) { 34 34 cackey_chrome_returnType signRet; 35 35 char *pinPrompt = NULL; 36 36 const char *pin; 37 - const char *smartcardManagerAppId = NULL; 38 37 unsigned char buffer[8192]; 39 38 struct cackey_certificate *certificates, incomingCertificateCACKey; 40 39 struct cackey_reader *readers; 41 40 pp::VarDictionary *reply, *readerInfo; 42 41 pp::VarArray certificatesPPArray, readersPPArray; 43 42 pp::VarArrayBuffer *certificateContents, *incomingCertificateContents, *incomingData, *outgoingData; 44 43 pp::Var command; ................................................................................ 52 51 53 52 /* 54 53 * Do the thing we are being asked to do 55 54 */ 56 55 reply = new pp::VarDictionary(); 57 56 58 57 if (command.AsString() == "init") { 59 - if (message->HasKey("smartcardManagerAppId")) { 60 - smartcardManagerAppId = strdup(message->Get("smartcardManagerAppId").AsString().c_str()); 61 - } 62 - 63 - pcscNaClInit(this, corePointer, smartcardManagerAppId, "CACKey"); 64 - 65 - if (smartcardManagerAppId) { 66 - free((void *) smartcardManagerAppId); 67 - } 58 + pcscNaClInit(this, corePointer); 68 59 69 60 reply->Set("status", "success"); 70 61 } else if (command.AsString() == "listcertificates") { 71 62 numCertificates = cackey_chrome_listCertificates(&certificates); 72 63 73 64 certificatesPPArray.SetLength(numCertificates); 74 65
Modified build/chrome/cackey.js from [94fd0f8405] to [3d7abfb5db].
714 714 715 715 /* 716 716 * Initialize CACKey with the correct handle to talk to the Google Smartcard Manager App 717 717 */ 718 718 cackeyHandle.postMessage( 719 719 { 720 720 "target": "cackey", 721 - "command": "init", 722 - "smartcardManagerAppId": "khpfeaanjngmcnplbdlpegiifgpfgdco" 721 + "command": "init" 723 722 } 724 723 ); 725 724 726 725 /* 727 726 * Initialize the PCSC NaCl interface 728 727 */ 729 - new GoogleSmartCard.NaclModule(cackeyHandle); 730 - cackeyPCSCHandle = new GoogleSmartCard.PcscLiteClient.NaclClientBackend(cackeyHandle.messageChannel, "CACKey", "khpfeaanjngmcnplbdlpegiifgpfgdco"); 728 + cackeyPCSCHandle = new GoogleSmartCard.PcscLiteClient.NaclClientBackend( 729 + null, 730 + "CACKey", 731 + "khpfeaanjngmcnplbdlpegiifgpfgdco", 732 + cackeyHandle 733 + ); 731 734 732 735 console.log("[cackey] cackeyInitPCSC() complete"); 733 736 734 737 return; 735 738 } 736 739 737 740 /*