Check-in [1a6c58edd1]
Overview
Comment:ChromeOS: Added basic UI page that shows certificates
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1a6c58edd1323c85a5116bd6f6f6252e0ecb85d0
User & Date: rkeene on 2016-02-28 22:37:40
Original Comment: Added basic UI page that shows certificates
Other Links: manifest | tags
Context
2016-02-29
04:32
ChromeOS: Added certificate usage information to bare UI check-in: 833f48f854 user: rkeene tags: trunk
2016-02-28
22:37
ChromeOS: Added basic UI page that shows certificates check-in: 1a6c58edd1 user: rkeene tags: trunk
22:12
ChromeOS: Delayed PCSC initialization even further until we receieved positive confirmation that initialization completed check-in: bdb2e8cfb1 user: rkeene tags: trunk
Changes

Modified .fossil-settings/ignore-glob from [4b8f0a7c61] to [3575c07556].

30
31
32
33
34
35
36

build/chrome/cackey.pexe
build/chrome/cackey.bc
build/chrome/cackey.nmf
build/chrome/cackey.zip
build/chrome/test
build/chrome/google-pcsc.js
build/chrome/manifest.json








>
30
31
32
33
34
35
36
37
build/chrome/cackey.pexe
build/chrome/cackey.bc
build/chrome/cackey.nmf
build/chrome/cackey.zip
build/chrome/test
build/chrome/google-pcsc.js
build/chrome/manifest.json
build/chrome/jsrsasign.js

Modified build/chrome/Makefile from [477397fafe] to [7468d6c1f8].

28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ifeq (,${NACL_SDK_ROOT})
$(error "Please set NACL_SDK_ROOT")
endif
export NACL_SDK_ROOT

all: cackey.zip

cackey.zip: $(CACKEY_EXECUTABLES) cackey.nmf manifest.json cackey.js google-pcsc.js pin.html pin.js pin-icon.png icon.png ui.html
	rm -f cackey.zip
	zip cackey.zip.new $^
	mv cackey.zip.new cackey.zip

cackey.bc: cackey-chrome-pkcs11.o cackey-chrome-plugin.o lib/libcackey.a lib/libpcsc.a lib/libz.a
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o cackey.bc.new cackey-chrome-pkcs11.o cackey-chrome-plugin.o $(LIBS)
	mv cackey.bc.new cackey.bc







|







28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ifeq (,${NACL_SDK_ROOT})
$(error "Please set NACL_SDK_ROOT")
endif
export NACL_SDK_ROOT

all: cackey.zip

cackey.zip: $(CACKEY_EXECUTABLES) cackey.nmf manifest.json cackey.js google-pcsc.js pin.html pin.js pin-icon.png icon.png ui.html ui.js jsrsasign.js
	rm -f cackey.zip
	zip cackey.zip.new $^
	mv cackey.zip.new cackey.zip

cackey.bc: cackey-chrome-pkcs11.o cackey-chrome-plugin.o lib/libcackey.a lib/libpcsc.a lib/libz.a
	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o cackey.bc.new cackey-chrome-pkcs11.o cackey-chrome-plugin.o $(LIBS)
	mv cackey.bc.new cackey.bc
85
86
87
88
89
90
91





92
93
94
95
96
97
98
	mv include/PCSC/pcsc-nacl.h.new include/PCSC/pcsc-nacl.h

manifest.json: manifest.json.in ../../configure.ac
	rm -f manifest.json.new
	sed 's/@PACKAGE_VERSION@/$(shell sed '/^AC_INIT/ {s@.*, @@;s@[^0-9\.].@@g;p};d' ../../configure.ac)/g' manifest.json.in > manifest.json.new
	mv manifest.json.new manifest.json






test: cackey-chrome-pkcs11.c cackey-chrome-test.c ../../cackey.c Makefile
	gcc -g3 -ggdb3 -Wall -I. -I../../pkcs11 -I/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/include -I/opt/appfs/rkeene.org/pcsc-lite/platform/latest/include/PCSC -DHAVE_WINTYPES_H=1 -DHAVE_PCSCLITE_H=1 -DHAVE_WINSCARD_H=1 -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_PTHREAD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDIO_H=1 -DHAVE_ZLIB_H -DHAVE_LIBZ -DCACKEY_DEBUG=1 -o test cackey-chrome-pkcs11.c cackey-chrome-test.c ../../cackey.c -L/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/lib -lz -L/opt/appfs/rkeene.org/pcsc-lite/platform/latest/lib -lpcsclite -L/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib -lc -lpthread -Wl,-R,/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/lib -Wl,-R,/opt/appfs/rkeene.org/pcsc-lite/platform/latest/lib -Wl,-R,/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib -Wl,-dynamic-linker,/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib/ld-linux-x86-64.so.2

cackey-chrome-pkcs11.o: cackey-chrome-pkcs11.c cackey-chrome.h
cackey-chrome-plugin.o: cackey-chrome-plugin.cc cackey-chrome.h include/PCSC/pcsc-nacl.h

clean:







>
>
>
>
>







85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
	mv include/PCSC/pcsc-nacl.h.new include/PCSC/pcsc-nacl.h

manifest.json: manifest.json.in ../../configure.ac
	rm -f manifest.json.new
	sed 's/@PACKAGE_VERSION@/$(shell sed '/^AC_INIT/ {s@.*, @@;s@[^0-9\.].@@g;p};d' ../../configure.ac)/g' manifest.json.in > manifest.json.new
	mv manifest.json.new manifest.json

jsrsasign.js:
	wget --no-check-certificate -O jsrsasign.js.new 'https://github.com/kjur/jsrsasign/raw/2989e2cdc29219f5fb1743dffd9cee93b7090832/jsrsasign-latest-all-min.js'
	test "`openssl sha256 jsrsasign.js.new | sed 's@.*= *@@'`" = '99b041bccc846f03623ce52f5932bd3ff282a064e7077a4ad1c600fc70c1176b'
	mv jsrsasign.js.new jsrsasign.js

test: cackey-chrome-pkcs11.c cackey-chrome-test.c ../../cackey.c Makefile
	gcc -g3 -ggdb3 -Wall -I. -I../../pkcs11 -I/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/include -I/opt/appfs/rkeene.org/pcsc-lite/platform/latest/include/PCSC -DHAVE_WINTYPES_H=1 -DHAVE_PCSCLITE_H=1 -DHAVE_WINSCARD_H=1 -DHAVE_STDINT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDLIB_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_PTHREAD_H=1 -DHAVE_LIMITS_H=1 -DHAVE_STDIO_H=1 -DHAVE_ZLIB_H -DHAVE_LIBZ -DCACKEY_DEBUG=1 -o test cackey-chrome-pkcs11.c cackey-chrome-test.c ../../cackey.c -L/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/lib -lz -L/opt/appfs/rkeene.org/pcsc-lite/platform/latest/lib -lpcsclite -L/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib -lc -lpthread -Wl,-R,/opt/appfs/core.appfs.rkeene.org/zlib/platform/latest/lib -Wl,-R,/opt/appfs/rkeene.org/pcsc-lite/platform/latest/lib -Wl,-R,/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib -Wl,-dynamic-linker,/opt/appfs/core.appfs.rkeene.org/glibc/platform/latest/lib/ld-linux-x86-64.so.2

cackey-chrome-pkcs11.o: cackey-chrome-pkcs11.c cackey-chrome.h
cackey-chrome-plugin.o: cackey-chrome-plugin.cc cackey-chrome.h include/PCSC/pcsc-nacl.h

clean:
106
107
108
109
110
111
112

113
114
	rm -f lib/libcackey.a lib/libpcsc.a lib/libz.a
	-rmdir lib
	rm -f include/PCSC/pcsc-nacl.h
	-rmdir include/PCSC
	-rmdir include
	rm -f google-pcsc.js
	rm -rf workdir-*


.PHONY: all clean distclean







>


111
112
113
114
115
116
117
118
119
120
	rm -f lib/libcackey.a lib/libpcsc.a lib/libz.a
	-rmdir lib
	rm -f include/PCSC/pcsc-nacl.h
	-rmdir include/PCSC
	-rmdir include
	rm -f google-pcsc.js
	rm -rf workdir-*
	rm -f jsrsasign.js jsrsasign.js.new

.PHONY: all clean distclean

Modified build/chrome/ui.html from [b2f6c09e6c] to [22195d78ea].

1
2
3


4
5
6
7
8
9
10
11
12
13
14
15
<html>
	<head>
		<title>CACKey</title>


	</head>
	<body>
		<h1>CACKey for Chrome</h1>
		<div>Currently there is no UI for this application</div>
		<div>
			CACKey provides certificates to Chrome without further
			user interaction.  You may have to open the "Smartcard
			Manager App" or "Smartcard Connector" application and
			select an appropriate USB smartcard reader.
		</div>
	</body>
</html>



>
>



<
<
|
<
<
<
<


1
2
3
4
5
6
7
8


9




10
11
<html>
	<head>
		<title>CACKey</title>
		<script type="text/javascript" src="jsrsasign.js"></script>
		<script type="text/javascript" src="ui.js"></script>
	</head>
	<body>
		<h1>CACKey for Chrome</h1>


		<div>Certificates: <span id="certificates"></span></div>




	</body>
</html>

Added build/chrome/ui.js version [f3ee58ea69].































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
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
var globalCerts = null;

function displayCerts(htmlObject, certs) {
	var html = "";
	var idx;
	var cert;
	var certObj;

	certObj = new X509;

	html += "<ol>";

	for (idx = 0; idx < certs.length; idx++) {
		cert = certs[idx];

		certObj.hex = BAtohex(new Uint8Array(cert.certificate));

		html += "\t<li>" + certObj.getSubjectString() + "</li>";
	}

	html += "</ol>";

	delete certObj;

	htmlObject.innerHTML = html;
}
function updateCertificates(htmlObject) {
	var html = "";

	if (globalCerts == null) {
		htmlObject.innerHTML = "<i>Updating...</i>";
	} else {
		displayCerts(htmlObject, globalCerts);
	}

	parentWindow.cackeyListCertificates(function(certs) {
		globalCerts = certs;

		displayCerts(htmlObject, certs);
	});

	return;
}

setTimeout(function() {
	updateCertificates(document.getElementById('certificates'));
}, 1);