Diff

Differences From Artifact [8a4e675e00]:

To Artifact [153c088fd4]:


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.readCertHex(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>";
		try {
			html += "\t\t\t<li>Usage: " + certObj.getExtKeyUsageString() + "</li>";
		} catch (_) {};
		html += "\t\t</ol>";
		html += "\t</li>";
	}

	html += "</ol>";

	delete certObj;





|

>
















>
>
>
>
>
>
>
>
>
>
>
>
>
>

|




|







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
48
49
50
51
52
var globalCerts = null;

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

	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.readCertHex(BAtohex(new Uint8Array(cert.certificate)));

		certTitle = certObj.getSubjectString();
		try {
			certObj.getExtSubjectAltName2().forEach(function(itemPair) {
				var itemName, itemValue;

				itemName = itemPair[0];
				itemValue = itemPair[1];

				if (itemName === "MAIL") {
					certTitle = itemValue;
				}
			});
		} catch (ignoredException) {};

		html += "\t<li>";
		html += "\t\t" + certTitle;
		html += "\t\t<ol type=\"a\">";
		html += "\t\t\t<li>Serial Number: " + certObj.getSerialNumberHex() + "</li>";
		try {
			html += "\t\t\t<li>Usage: " + certObj.getExtKeyUsageString() + "</li>";
		} catch (ignoredException) {};
		html += "\t\t</ol>";
		html += "\t</li>";
	}

	html += "</ol>";

	delete certObj;
118
119
120
121
122
123
124





125
126
127
128
129
130

131
132
133
134
135
136
137
	return;
}

function clearStatusInfo() {
	document.getElementById('certificates').innerHTML = '<i>Loading...</i>';
	document.getElementById('smartcard_readers').innerHTML = '<i>Loading...</i>';
	document.getElementById('certificate_provider').innerHTML = '<i>Loading...</i>';





}

function loadStatusInfo() {
	updateCertificates(document.getElementById('certificates'));
	updateSmartcardReaders(document.getElementById('smartcard_readers'));
	updateCertificateProvider(document.getElementById('certificate_provider'));

}

setTimeout(function() {
	loadStatusInfo();

	document.getElementById('reload').onclick = function() {
		clearStatusInfo();







>
>
>
>
>






>







133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
	return;
}

function clearStatusInfo() {
	document.getElementById('certificates').innerHTML = '<i>Loading...</i>';
	document.getElementById('smartcard_readers').innerHTML = '<i>Loading...</i>';
	document.getElementById('certificate_provider').innerHTML = '<i>Loading...</i>';
	document.getElementById('pin_caching_timeout').value = '';
	document.getElementById('ssh_agent_enabled').checked = false;
	document.getElementById('ssh_agent_keys').checked = false;
	document.getElementById('ssh_agent_certs').checked = false;
	document.getElementById('ssh_agent_certs_legacy').checked = false;
}

function loadStatusInfo() {
	updateCertificates(document.getElementById('certificates'));
	updateSmartcardReaders(document.getElementById('smartcard_readers'));
	updateCertificateProvider(document.getElementById('certificate_provider'));
	// updateOptions(getOptions());
}

setTimeout(function() {
	loadStatusInfo();

	document.getElementById('reload').onclick = function() {
		clearStatusInfo();