Overview
| Comment: | Start of Tcl-based SSH agent that uses JavaScript implementation | 
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive | 
| Timelines: | family | ancestors | descendants | both | trunk | 
| Files: | files | file ages | folders | 
| SHA1: | 
7336ecd46a2cb657e77314d477a1bde5 | 
| User & Date: | rkeene on 2019-06-08 22:18:11 | 
| Other Links: | manifest | tags | 
Context
| 
   2019-06-09 
 | ||
| 18:35 | Minor cleanup check-in: e4e500972a user: rkeene tags: trunk | |
| 
   2019-06-08 
 | ||
| 22:18 | Start of Tcl-based SSH agent that uses JavaScript implementation check-in: 7336ecd46a user: rkeene tags: trunk | |
| 22:17 | Use indexOf() instead of includes for backwards compatibility support check-in: 8b2206f04e user: rkeene tags: trunk | |
Changes
Modified .fossil-settings/ignore-glob from [3e95b51b2f] to [4e7947b3ab].
| ︙ | ︙ | |||
35 36 37 38 39 40 41  | build/chrome/cackey.nmf build/chrome/cackey.zip build/chrome/test build/chrome/google-pcsc.js build/chrome/manifest.json build/chrome/jsrsasign.js build/chrome/extra/*.png  | > >  | 35 36 37 38 39 40 41 42 43  | build/chrome/cackey.nmf build/chrome/cackey.zip build/chrome/test build/chrome/google-pcsc.js build/chrome/manifest.json build/chrome/jsrsasign.js build/chrome/extra/*.png build/tcl/ssh-agent-noasync.js build/tcl/tclkit  | 
Added build/tcl/Makefile version [04cbb3e324].
> > > > > > > > > > > >  | 1 2 3 4 5 6 7 8 9 10 11 12  | all: ssh-agent-noasync.js ssh-agent-noasync.js: ../chrome/ssh-agent.js cc -Dawait='' -Dasync='' -nostdinc -C -E -x c ../chrome/ssh-agent.js -o - | grep -v '^# ' > ssh-agent-noasync.js.new mv ssh-agent-noasync.js.new ssh-agent-noasync.js clean: rm -f ssh-agent-noasync.js.new ssh-agent-noasync.js distclean: clean .PHONY: all clean distclean  | 
Added build/tcl/chrome-emu.js version [cfc05731e7].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > >  | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29  | 
console = {
	log: function() {
		/* XXX:TODO: Logging */
	}
}
chrome = {
	runtime: {
		connectCallbacks: [],
		onConnectExternal: {
			addListener: function(callback) {
				if (!callback) {
					return;
				}
				chrome.runtime.connectCallbacks.push(callback)
			},
			removeListener: function(callback) {
				var idx;
				idx = chrome.runtime.connectCallbacks.indexOf(callback);
				if (idx == -1) {
					return;
				}
				chrome.runtime.connectCallbacks.splice(idx, 1);
			}
		}
	}
}
 | 
Added build/tcl/ssh-agent.tcl version [0cbe74a449].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >  | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33  | 
#! /home/rkeene/tmp/cackey/build/tcl/tclkit
package require duktape
package require tuapi
proc initSSHAgent {} {
	if {[info exists ::jsHandle]} {
		return
	}
	set chromeEmuJS [read [open chrome-emu.js]]
	set sshAgentJS [read [open ssh-agent-noasync.js]]
	set ::jsHandle [::duktape::init]
	::duktape::eval $::jsHandle $chromeEmuJS
	::duktape::eval $::jsHandle $sshAgentJS
	puts [::duktape::eval $::jsHandle {
		chrome.runtime.connectCallbacks[0]({
			sender: {
				id: "pnhechapfaindjhompbnflcldabbghjo"
			},
			onMessage: {
				addListener: function() {
					/* XXX:TODO */
				}
			}
		})
	}]
}
initSSHAgent
 |