Diff

Differences From Artifact [8a4e675e00]:

To Artifact [153c088fd4]:


     1      1   var globalCerts = null;
     2      2   
     3      3   function displayCerts(htmlObject, certs) {
     4      4   	var html = "";
     5      5   	var idx;
     6         -	var cert;
            6  +	var cert, certTitle;
     7      7   	var certObj;
            8  +	var ignoredException;
     8      9   
     9     10   	if (certs.length == 0) {
    10     11   		htmlObject.innerHTML = "<b>No certificates found</b>";
    11     12   
    12     13   		return;
    13     14   	}
    14     15   
................................................................................
    17     18   	html += "<ol type=\"1\">";
    18     19   
    19     20   	for (idx = 0; idx < certs.length; idx++) {
    20     21   		cert = certs[idx];
    21     22   
    22     23   		certObj.readCertHex(BAtohex(new Uint8Array(cert.certificate)));
    23     24   
           25  +		certTitle = certObj.getSubjectString();
           26  +		try {
           27  +			certObj.getExtSubjectAltName2().forEach(function(itemPair) {
           28  +				var itemName, itemValue;
           29  +
           30  +				itemName = itemPair[0];
           31  +				itemValue = itemPair[1];
           32  +
           33  +				if (itemName === "MAIL") {
           34  +					certTitle = itemValue;
           35  +				}
           36  +			});
           37  +		} catch (ignoredException) {};
           38  +
    24     39   		html += "\t<li>";
    25         -		html += "\t\t" + certObj.getSubjectString() + ":" + certObj.getSerialNumberHex();
           40  +		html += "\t\t" + certTitle;
    26     41   		html += "\t\t<ol type=\"a\">";
    27     42   		html += "\t\t\t<li>Serial Number: " + certObj.getSerialNumberHex() + "</li>";
    28     43   		try {
    29     44   			html += "\t\t\t<li>Usage: " + certObj.getExtKeyUsageString() + "</li>";
    30         -		} catch (_) {};
           45  +		} catch (ignoredException) {};
    31     46   		html += "\t\t</ol>";
    32     47   		html += "\t</li>";
    33     48   	}
    34     49   
    35     50   	html += "</ol>";
    36     51   
    37     52   	delete certObj;
................................................................................
   118    133   	return;
   119    134   }
   120    135   
   121    136   function clearStatusInfo() {
   122    137   	document.getElementById('certificates').innerHTML = '<i>Loading...</i>';
   123    138   	document.getElementById('smartcard_readers').innerHTML = '<i>Loading...</i>';
   124    139   	document.getElementById('certificate_provider').innerHTML = '<i>Loading...</i>';
          140  +	document.getElementById('pin_caching_timeout').value = '';
          141  +	document.getElementById('ssh_agent_enabled').checked = false;
          142  +	document.getElementById('ssh_agent_keys').checked = false;
          143  +	document.getElementById('ssh_agent_certs').checked = false;
          144  +	document.getElementById('ssh_agent_certs_legacy').checked = false;
   125    145   }
   126    146   
   127    147   function loadStatusInfo() {
   128    148   	updateCertificates(document.getElementById('certificates'));
   129    149   	updateSmartcardReaders(document.getElementById('smartcard_readers'));
   130    150   	updateCertificateProvider(document.getElementById('certificate_provider'));
          151  +	// updateOptions(getOptions());
   131    152   }
   132    153   
   133    154   setTimeout(function() {
   134    155   	loadStatusInfo();
   135    156   
   136    157   	document.getElementById('reload').onclick = function() {
   137    158   		clearStatusInfo();