Check-in [833f48f854]
Overview
SHA1:833f48f8545683856fe5b3789a8e96b79bb50dab
Date: 2016-02-29 04:32:16
User: rkeene
Comment:ChromeOS: Added certificate usage information to bare UI
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2016-02-29
04:32
[30263e48a3] ChromeOS: Release 5 (user: rkeene, tags: trunk)
04:32
[833f48f854] ChromeOS: Added certificate usage information to bare UI (user: rkeene, tags: trunk)
2016-02-28
22:37
[1a6c58edd1] ChromeOS: Added basic UI page that shows certificates (user: rkeene, tags: trunk)
Changes

Modified build/chrome/ui.js from [f3ee58ea69] to [02acf47905].

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
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;







>
>
>
>
>
>



|






|
>
>
>
>
>
>







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

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

	if (certs.length == 0) {
		htmlObject.innerHTML = "<b>No certificates found</b>";

		return;
	}

	certObj = new X509;

	html += "<ol type=\"1\">";

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

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

		html += "\t<li>";
		html += "\t\t" + certObj.getSubjectString() + ":" + certObj.getSerialNumberHex();
		html += "\t\t<ol type=\"a\">";
		html += "\t\t\t<li>Serial Number: " + certObj.getSerialNumberHex() + "</li>";
		html += "\t\t\t<li>Usage: " + X509.getExtKeyUsageString(certObj.hex) + "</li>";
		html += "\t\t</ol>";
		html += "\t</li>";
	}

	html += "</ol>";

	delete certObj;

	htmlObject.innerHTML = html;