diff options
Diffstat (limited to 'cmd/clef/docs/qubes')
-rw-r--r-- | cmd/clef/docs/qubes/clef_qubes_http.png | bin | 0 -> 14302 bytes | |||
-rw-r--r-- | cmd/clef/docs/qubes/clef_qubes_qrexec.png | bin | 0 -> 20261 bytes | |||
-rw-r--r-- | cmd/clef/docs/qubes/qrexec-example.png | bin | 0 -> 19109 bytes | |||
-rw-r--r-- | cmd/clef/docs/qubes/qubes-client.py | 23 | ||||
-rw-r--r-- | cmd/clef/docs/qubes/qubes.Clefsign | 16 | ||||
-rw-r--r-- | cmd/clef/docs/qubes/qubes_newaccount-1.png | bin | 0 -> 25142 bytes | |||
-rw-r--r-- | cmd/clef/docs/qubes/qubes_newaccount-2.png | bin | 0 -> 42747 bytes |
7 files changed, 39 insertions, 0 deletions
diff --git a/cmd/clef/docs/qubes/clef_qubes_http.png b/cmd/clef/docs/qubes/clef_qubes_http.png Binary files differnew file mode 100644 index 000000000..a641e1987 --- /dev/null +++ b/cmd/clef/docs/qubes/clef_qubes_http.png diff --git a/cmd/clef/docs/qubes/clef_qubes_qrexec.png b/cmd/clef/docs/qubes/clef_qubes_qrexec.png Binary files differnew file mode 100644 index 000000000..f57fc8933 --- /dev/null +++ b/cmd/clef/docs/qubes/clef_qubes_qrexec.png diff --git a/cmd/clef/docs/qubes/qrexec-example.png b/cmd/clef/docs/qubes/qrexec-example.png Binary files differnew file mode 100644 index 000000000..0d86fde19 --- /dev/null +++ b/cmd/clef/docs/qubes/qrexec-example.png diff --git a/cmd/clef/docs/qubes/qubes-client.py b/cmd/clef/docs/qubes/qubes-client.py new file mode 100644 index 000000000..93a74b899 --- /dev/null +++ b/cmd/clef/docs/qubes/qubes-client.py @@ -0,0 +1,23 @@ +""" +This implements a dispatcher which listens to localhost:8550, and proxies +requests via qrexec to the service qubes.EthSign on a target domain +""" + +import http.server +import socketserver,subprocess + +PORT=8550 +TARGET_DOMAIN= 'debian-work' + +class Dispatcher(http.server.BaseHTTPRequestHandler): + def do_POST(self): + post_data = self.rfile.read(int(self.headers['Content-Length'])) + p = subprocess.Popen(['/usr/bin/qrexec-client-vm',TARGET_DOMAIN,'qubes.Clefsign'],stdin=subprocess.PIPE, stdout=subprocess.PIPE) + output = p.communicate(post_data)[0] + self.wfile.write(output) + + +with socketserver.TCPServer(("",PORT), Dispatcher) as httpd: + print("Serving at port", PORT) + httpd.serve_forever() + diff --git a/cmd/clef/docs/qubes/qubes.Clefsign b/cmd/clef/docs/qubes/qubes.Clefsign new file mode 100644 index 000000000..9b5af7b4f --- /dev/null +++ b/cmd/clef/docs/qubes/qubes.Clefsign @@ -0,0 +1,16 @@ +#!/bin/bash + +SIGNER_BIN="/home/user/tools/clef/clef" +SIGNER_CMD="/home/user/tools/gtksigner/gtkui.py -s $SIGNER_BIN" + +# Start clef if not already started +if [ ! -S /home/user/.clef/clef.ipc ]; then + $SIGNER_CMD & + sleep 1 +fi + +# Should be started by now +if [ -S /home/user/.clef/clef.ipc ]; then + # Post incoming request to HTTP channel + curl -H "Content-Type: application/json" -X POST -d @- http://localhost:8550 2>/dev/null +fi diff --git a/cmd/clef/docs/qubes/qubes_newaccount-1.png b/cmd/clef/docs/qubes/qubes_newaccount-1.png Binary files differnew file mode 100644 index 000000000..598dbbee7 --- /dev/null +++ b/cmd/clef/docs/qubes/qubes_newaccount-1.png diff --git a/cmd/clef/docs/qubes/qubes_newaccount-2.png b/cmd/clef/docs/qubes/qubes_newaccount-2.png Binary files differnew file mode 100644 index 000000000..cd762a193 --- /dev/null +++ b/cmd/clef/docs/qubes/qubes_newaccount-2.png |