Index: build/chrome/ssh-agent.js ================================================================== --- build/chrome/ssh-agent.js +++ build/chrome/ssh-agent.js @@ -86,22 +86,10 @@ value: result, output: input.slice(info.value) }); } -function cackeySSHAgentEncodeTLV(tag, array) { - var result; - - result = []; - - result.push(tag & 0xff); - - result = result.concat(cackeySSHAgentEncodeLV(array)); - - return(result); -} - function cackeySSHAgentEncodeToUTF8Array(str) { var utf8 = []; if (typeof(str) === "string") { str = str.split("").map(function(c) { @@ -311,11 +299,11 @@ hashMethod = "SHA512"; data = await crypto.subtle.digest("SHA-512", new Uint8Array(data)); } else if ((flags & flagMeaning.SSH_AGENT_RSA_SHA2_256) == flagMeaning.SSH_AGENT_RSA_SHA2_256) { hashMethod = "SHA256"; data = await crypto.subtle.digest("SHA-256", new Uint8Array(data)); - } else if (flags == 1) { + } else if (flags == 0) { hashMethod = "SHA1"; data = await crypto.subtle.digest("SHA-1", new Uint8Array(data)); } else { console.info("[cackeySSH] Sign request with flags set to", flags, "which is unsupported, failing the request."); @@ -383,11 +371,13 @@ sshRequest = cackeySSHAgentCommands[sshRequestID]; } response = null; if (!sshRequest.name) { - console.log("[cackeySSH] Unsupported request: ", request, "; from: ", socket.sender.id); + if (goog.DEBUG) { + console.log("[cackeySSH] Unsupported request: ", request, "; from: ", socket.sender.id); + } } else { if (goog.DEBUG) { console.log("[cackeySSH] Request: ", sshRequest.name, "; from: ", socket.sender.id); }