MCPcopy Create free account
hub / github.com/apache/cloudstack / serverVerify

Function serverVerify

systemvm/agent/noVNC/app/ui.js:1279–1290  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

1277 * ------v------*/
1278
1279 async serverVerify(e) {
1280 const type = e.detail.type;
1281 if (type === 'RSA') {
1282 const publickey = e.detail.publickey;
1283 let fingerprint = await window.crypto.subtle.digest("SHA-1", publickey);
1284 // The same fingerprint format as RealVNC
1285 fingerprint = Array.from(new Uint8Array(fingerprint).slice(0, 8)).map(
1286 x => x.toString(16).padStart(2, '0')).join('-');
1287 document.getElementById('noVNC_verify_server_dlg').classList.add('noVNC_open');
1288 document.getElementById('noVNC_fingerprint').innerHTML = fingerprint;
1289 }
1290 },
1291
1292 approveServer(e) {
1293 e.preventDefault();

Callers

nothing calls this directly

Calls 6

mapMethod · 0.80
sliceMethod · 0.80
addMethod · 0.65
digestMethod · 0.45
joinMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected