MCPcopy Create free account
hub / github.com/adobe/Marinus / displayCT

Function displayCT

web_server/public/javascripts/cert_search.js:104–118  ·  view source on GitHub ↗
(results)

Source from the content-addressed store, hash-verified

102}
103
104function displayCT(results) {
105 var displayHTML = "";
106 if (Array.isArray(results)) {
107 for (let i = 0; i < results.length; i++) {
108 displayHTML += create_h3("Certificate " + i.toString());
109 displayHTML += create_anchor("/api/v1.0/ct/download/" + results[i]['_id'], "Click to download the DER file") + "<br/";
110 displayHTML += '<div class="bg-light"><pre>' + results[i]['full_certificate'] + "</pre></div><br/><br/>";
111 }
112 document.getElementById("certDetails").innerHTML = displayHTML;
113 } else {
114 displayHTML = create_anchor("/api/v1.0/ct/download/" + results['_id'], "Click to download the DER file") + "<br/";
115 displayHTML += '<div class="bg-light"><pre>' + results['full_certificate'] + "</pre></div><br/>";
116 document.getElementById("certDetails").innerHTML = "<h3>Certificate</h3>" + displayHTML;
117 }
118}
119
120function get_details() {
121 var sha_hash = document.getElementById("search_input").value.trim().toLowerCase();

Callers

nothing calls this directly

Calls 2

create_h3Function · 0.85
create_anchorFunction · 0.85

Tested by

no test coverage detected