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 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# Build the libpcsc we need
function buildPCSC() {
local version url pkg sha256 configure_extra
local archive workdir
pkg='nacl-libpcsc'
version='179983e00b5ed8a8fead5d2f9bb35f5304716041'
url="https://chiselapp.com/user/rkeene/repository/nacl-libpcsc/tarball/nacl-libpcsc-${version}.tar.gz?uuid=${version}"
sha256='-'
archive="archive/${pkg}-${version}.tar.gz"
workdir="workdir-${RANDOM}${RANDOM}${RANDOM}${RANDOM}.build"
download "${url}" "${archive}" "${sha256}" || return 1
|
| |
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
# Build the libpcsc we need
function buildPCSC() {
local version url pkg sha256 configure_extra
local archive workdir
pkg='nacl-libpcsc'
version='a72d1992e9e7d70c885d3b34f9b75317fa8671ef'
url="https://chiselapp.com/user/rkeene/repository/nacl-libpcsc/tarball/nacl-libpcsc-${version}.tar.gz?uuid=${version}"
sha256='-'
archive="archive/${pkg}-${version}.tar.gz"
workdir="workdir-${RANDOM}${RANDOM}${RANDOM}${RANDOM}.build"
download "${url}" "${archive}" "${sha256}" || return 1
|
Modified build/chrome/cackey-chrome-plugin.cc from [06cf85fd98] to [f5c7563579].
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
..
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
virtual ~CACKeyInstance() {} virtual void HandleMessageThread(pp::VarDictionary *message, pp::Var *messagePlain) { cackey_chrome_returnType signRet; char *pinPrompt = NULL; const char *pin; const char *smartcardManagerAppId = NULL; unsigned char buffer[8192]; struct cackey_certificate *certificates, incomingCertificateCACKey; struct cackey_reader *readers; pp::VarDictionary *reply, *readerInfo; pp::VarArray certificatesPPArray, readersPPArray; pp::VarArrayBuffer *certificateContents, *incomingCertificateContents, *incomingData, *outgoingData; pp::Var command; ................................................................................ /* * Do the thing we are being asked to do */ reply = new pp::VarDictionary(); if (command.AsString() == "init") { if (message->HasKey("smartcardManagerAppId")) { smartcardManagerAppId = strdup(message->Get("smartcardManagerAppId").AsString().c_str()); } pcscNaClInit(this, corePointer, smartcardManagerAppId, "CACKey"); if (smartcardManagerAppId) { free((void *) smartcardManagerAppId); } reply->Set("status", "success"); } else if (command.AsString() == "listcertificates") { numCertificates = cackey_chrome_listCertificates(&certificates); certificatesPPArray.SetLength(numCertificates); |
<
<
<
<
<
|
<
<
<
<
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
..
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
virtual ~CACKeyInstance() {}
virtual void HandleMessageThread(pp::VarDictionary *message, pp::Var *messagePlain) {
cackey_chrome_returnType signRet;
char *pinPrompt = NULL;
const char *pin;
unsigned char buffer[8192];
struct cackey_certificate *certificates, incomingCertificateCACKey;
struct cackey_reader *readers;
pp::VarDictionary *reply, *readerInfo;
pp::VarArray certificatesPPArray, readersPPArray;
pp::VarArrayBuffer *certificateContents, *incomingCertificateContents, *incomingData, *outgoingData;
pp::Var command;
................................................................................
/*
* Do the thing we are being asked to do
*/
reply = new pp::VarDictionary();
if (command.AsString() == "init") {
pcscNaClInit(this, corePointer);
reply->Set("status", "success");
} else if (command.AsString() == "listcertificates") {
numCertificates = cackey_chrome_listCertificates(&certificates);
certificatesPPArray.SetLength(numCertificates);
|
Modified build/chrome/cackey.js from [94fd0f8405] to [3d7abfb5db].
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
/* * Initialize CACKey with the correct handle to talk to the Google Smartcard Manager App */ cackeyHandle.postMessage( { "target": "cackey", "command": "init", "smartcardManagerAppId": "khpfeaanjngmcnplbdlpegiifgpfgdco" } ); /* * Initialize the PCSC NaCl interface */ new GoogleSmartCard.NaclModule(cackeyHandle); cackeyPCSCHandle = new GoogleSmartCard.PcscLiteClient.NaclClientBackend(cackeyHandle.messageChannel, "CACKey", "khpfeaanjngmcnplbdlpegiifgpfgdco"); console.log("[cackey] cackeyInitPCSC() complete"); return; } /* |
| < | > > | > > |
714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 |
/* * Initialize CACKey with the correct handle to talk to the Google Smartcard Manager App */ cackeyHandle.postMessage( { "target": "cackey", "command": "init" } ); /* * Initialize the PCSC NaCl interface */ cackeyPCSCHandle = new GoogleSmartCard.PcscLiteClient.NaclClientBackend( null, "CACKey", "khpfeaanjngmcnplbdlpegiifgpfgdco", cackeyHandle ); console.log("[cackey] cackeyInitPCSC() complete"); return; } /* |