Check-in [1578fc80e7]
Overview
Comment:Added start of Chrome javascript module
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1578fc80e774f2dbb6d2da5b207a6121b95fb997
User & Date: rkeene on 2016-02-04 18:23:40
Other Links: manifest | tags
Context
2016-02-04
22:51
More work towards a prototypical CACKey JavaScript file check-in: 7fc78ce33e user: rkeene tags: trunk
18:23
Added start of Chrome javascript module check-in: 1578fc80e7 user: rkeene tags: trunk
18:07
Create a native manifest for CACKey on Chrome and other fixups check-in: b0a1326758 user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [b482ef6532] to [b9df6af430].

19
20
21
22
23
24
25
26
27
28


libcackey.syms
build/certs
test
test-afl
test-afl.data
build/chrome/archive
build/chrome/workdir-*
build/chrome/libcackey.a
build/chrome/cackey-chrome.o
build/chrome/cackey-chrome.pexe









|

|
>
>
19
20
21
22
23
24
25
26
27
28
29
30
libcackey.syms
build/certs
test
test-afl
test-afl.data
build/chrome/archive
build/chrome/workdir-*
build/chrome/lib
build/chrome/cackey-chrome.o
build/chrome/cackey-chrome-init.o
build/chrome/cackey.pexe
build/chrome/cackey.nmf

Added build/chrome/cackey.js version [dc0fd6eff0].































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/*
 * CACKey ChromeOS chrome.certificateProvider Implementation
 */

function onCertificatesRejected(rejectedCerts) {
	// If certificates were rejected by the API, log an error, for example.
	console.error(rejectedCerts.length + ' certificates were rejected.');
	return;
}

function cackeyListCertificates(chromeCallback) {
	var certificates = [];

	certificates.push(
		{
			certificate: new UInt8Array(),
			supportedHashes: ['SHA1', 'SHA256']
		}
	);

	chromeCallback(certificates,
		function(rejectedCerts) {
			if (chrome.runtime.lastError) {
				return;
			}

			if (rejectedCerts.length !== 0) {
				onCertificatesRejected(rejectedCerts);
			}

			return;
		}
	);

	return;
}

function cackeySignMessage(signRequest, chromeCallback) {
	/* XXX:TODO: Implement this */
	chromeCallback();

	return;
}

/* Register listeners with Chrome */
chrome.certificateProvider.onCertificatesRequested.addListener(cackeyListCertificates);
chrome.certificateProvider.onSignDigestRequested.addListener(cackeySignMessage);