MCPcopy
hub / github.com/electerm/electerm / publicKeyMatchesCtx

Function publicKeyMatchesCtx

test/unit-ci/session-ssh-agent.spec.js:57–62  ·  view source on GitHub ↗
(ctx, publicKeyPem)

Source from the content-addressed store, hash-verified

55}
56
57function publicKeyMatchesCtx (ctx, publicKeyPem) {
58 return Buffer.compare(
59 parseKey(publicKeyPem).getPublicSSH(),
60 ctx.key.data
61 ) === 0
62}
63
64function runCommand (command, args, options = {}) {
65 const result = spawnSync(command, args, { encoding: 'utf8', ...options })

Callers 1

startServerFunction · 0.85

Calls 1

parseKeyFunction · 0.70

Tested by

no test coverage detected