summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcheck8
-rwxr-xr-xdec2
-rwxr-xr-xenc2
-rw-r--r--explain.html5
-rwxr-xr-xform.html12
m---------h0
-rw-r--r--index.nginx-debian.html25
-rw-r--r--msg2
-rw-r--r--msg.asc16
-rw-r--r--msg.signed18
-rw-r--r--multipartbin0 -> 7586 bytes
m---------multipart-parser-c0
-rw-r--r--pretty.css10
-rw-r--r--pubkey41
-rwxr-xr-xqr6
-rw-r--r--qr.pngbin0 -> 6382 bytes
-rwxr-xr-xsign2
-rwxr-xr-xupload9
-rwxr-xr-xupload.py22
-rwxr-xr-xverify3
20 files changed, 183 insertions, 0 deletions
diff --git a/check b/check
new file mode 100755
index 0000000..0dd9ab3
--- /dev/null
+++ b/check
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+echo 'Content-Type: text/html'
+echo
+
+cat pretty.css
+cat form.html
+cat explain.html
diff --git a/dec b/dec
new file mode 100755
index 0000000..9e34c8e
--- /dev/null
+++ b/dec
@@ -0,0 +1,2 @@
+#!/bin/sh
+zbarimg -q --raw qr.png
diff --git a/enc b/enc
new file mode 100755
index 0000000..951847c
--- /dev/null
+++ b/enc
@@ -0,0 +1,2 @@
+#!/bin/sh
+qrencode -l L -r pubkey -o qr.png
diff --git a/explain.html b/explain.html
new file mode 100644
index 0000000..1536430
--- /dev/null
+++ b/explain.html
@@ -0,0 +1,5 @@
+<p>
+The QR Code is the public key, transferred by camera.
+The Message is the original sent message.
+Verify that these match, and you know the identity matches.
+</p>
diff --git a/form.html b/form.html
new file mode 100755
index 0000000..653d74b
--- /dev/null
+++ b/form.html
@@ -0,0 +1,12 @@
+<form action="/upload" method="post" enctype="multipart/form-data">
+ <div style="float: left;">
+ <label for="pic">QR Code:</label>
+ <input type="file" id="pic" name="pic" accept="image/*">
+ </div>
+
+ <div style="float: right;">
+ <label for="msg">Message:</label>
+ <textarea id="msg" name="msg">Signed message here.</textarea>
+ </div>
+ <input type="submit" value="Does It Match?" style="float: center; margin-top: 2em;">
+</form>
diff --git a/h b/h
new file mode 160000
+Subproject 01bcfa89fc3b3b754e40a979a1fa983ba49fbae
diff --git a/index.nginx-debian.html b/index.nginx-debian.html
new file mode 100644
index 0000000..2ca3b95
--- /dev/null
+++ b/index.nginx-debian.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Welcome to nginx!</title>
+<style>
+ body {
+ width: 35em;
+ margin: 0 auto;
+ font-family: Tahoma, Verdana, Arial, sans-serif;
+ }
+</style>
+</head>
+<body>
+<h1>Welcome to nginx!</h1>
+<p>If you see this page, the nginx web server is successfully installed and
+working. Further configuration is required.</p>
+
+<p>For online documentation and support please refer to
+<a href="http://nginx.org/">nginx.org</a>.<br/>
+Commercial support is available at
+<a href="http://nginx.com/">nginx.com</a>.</p>
+
+<p><em>Thank you for using nginx.</em></p>
+</body>
+</html>
diff --git a/msg b/msg
new file mode 100644
index 0000000..ca0b51e
--- /dev/null
+++ b/msg
@@ -0,0 +1,2 @@
+Hello! I am interested in buying your kayaking gear.
+My name is Bob.
diff --git a/msg.asc b/msg.asc
new file mode 100644
index 0000000..239de74
--- /dev/null
+++ b/msg.asc
@@ -0,0 +1,16 @@
+-----BEGIN PGP MESSAGE-----
+
+owEBFQLq/ZANAwAKAVCXa+wHYwUJAaxOYgNtc2dnllfmSGVsbG8hIEkgYW0gaW50
+ZXJlc3RlZCBpbiBidXlpbmcgeW91ciBrYXlha2luZyBnZWFyLgpNeSBuYW1lIGlz
+IEJvYi4KiQGzBAABCgAdFiEEig3p6jDKFYI20pGpUJdr7AdjBQkFAmeWV+YACgkQ
+UJdr7AdjBQnRvwv+O/XrTcumHHIBsSwzPYyE+n7q1AMoUIanaWU36B9kmi9GCTOg
+JijP8VlK8HSR2jxJ37D5rFIs5Qz2Vk+IK2sFD+zb2kfY94liipC/5ZN9diPgbLX2
++bPYUAe4E/CJO5iJZGvJNu3Fq4j6W+IRg1X1/qHakZRGHRcT+03L2fF6cVcotnNq
+VlzGBCnMDLkw6e6xiRz2AiRRXLMF+PnVkbZJPfqPt1OjBrf3NBk2yClV1fUamMra
+M4YpH/B9WytgWLXAmZuBl8iQb1FFOdY9Kkhz826akmsIezSPlVcuHBwlTFOgnA+R
+ea/R0X1xef/d5LvyMDUZ9TDP25f86xPJwNORY5MoVUx3ItFBxEMzaAm2Axx//wEU
+6WTS4sGXSrWKdHkTtSwH5XSz7SzUiG8ApujRsCA0gYPrtVJhinTyUkGl/8Yvvom3
+iWxK2w/WgPWO5uNrGFGV8CS5jCn15d+PdN8N5brZOr4Jk5g8/6aFWoySuGTpvs8A
+MH/lMkop5sIlyUIx
+=l8IB
+-----END PGP MESSAGE-----
diff --git a/msg.signed b/msg.signed
new file mode 100644
index 0000000..aed85f3
--- /dev/null
+++ b/msg.signed
@@ -0,0 +1,18 @@
+Hello! I am interested in buying your kayaking gear.
+My name is Bob.
+-----BEGIN PGP MESSAGE-----
+
+owEBFQLq/ZANAwAKAVCXa+wHYwUJAaxOYgNtc2dnllfmSGVsbG8hIEkgYW0gaW50
+ZXJlc3RlZCBpbiBidXlpbmcgeW91ciBrYXlha2luZyBnZWFyLgpNeSBuYW1lIGlz
+IEJvYi4KiQGzBAABCgAdFiEEig3p6jDKFYI20pGpUJdr7AdjBQkFAmeWV+YACgkQ
+UJdr7AdjBQnRvwv+O/XrTcumHHIBsSwzPYyE+n7q1AMoUIanaWU36B9kmi9GCTOg
+JijP8VlK8HSR2jxJ37D5rFIs5Qz2Vk+IK2sFD+zb2kfY94liipC/5ZN9diPgbLX2
++bPYUAe4E/CJO5iJZGvJNu3Fq4j6W+IRg1X1/qHakZRGHRcT+03L2fF6cVcotnNq
+VlzGBCnMDLkw6e6xiRz2AiRRXLMF+PnVkbZJPfqPt1OjBrf3NBk2yClV1fUamMra
+M4YpH/B9WytgWLXAmZuBl8iQb1FFOdY9Kkhz826akmsIezSPlVcuHBwlTFOgnA+R
+ea/R0X1xef/d5LvyMDUZ9TDP25f86xPJwNORY5MoVUx3ItFBxEMzaAm2Axx//wEU
+6WTS4sGXSrWKdHkTtSwH5XSz7SzUiG8ApujRsCA0gYPrtVJhinTyUkGl/8Yvvom3
+iWxK2w/WgPWO5uNrGFGV8CS5jCn15d+PdN8N5brZOr4Jk5g8/6aFWoySuGTpvs8A
+MH/lMkop5sIlyUIx
+=l8IB
+-----END PGP MESSAGE-----
diff --git a/multipart b/multipart
new file mode 100644
index 0000000..c34938a
--- /dev/null
+++ b/multipart
Binary files differ
diff --git a/multipart-parser-c b/multipart-parser-c
new file mode 160000
+Subproject 772639cf10db6d9f5a655ee9b7eb20b815fab39
diff --git a/pretty.css b/pretty.css
new file mode 100644
index 0000000..f06d511
--- /dev/null
+++ b/pretty.css
@@ -0,0 +1,10 @@
+<head>
+<style>
+body {
+ width: 27em;
+ margin: auto;
+ margin-top: 2em;
+ font-size: 200%;
+}
+</style>
+</head>
diff --git a/pubkey b/pubkey
new file mode 100644
index 0000000..72b0e54
--- /dev/null
+++ b/pubkey
@@ -0,0 +1,41 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mQGNBGeVv4MBDACla+XtxBSyzIu/bOCyx+iXhnVcMYwJgEHTsaCCYnTP+g7V0VCj
+yBgkKM7kUgIlU7D76YBa7MNOoUN9W16zD4QpENQ3gqHD/lgts3d2RJJizYyS7sbA
+VCDdJXxpEecdaWn5JVjhGC3Vm6/r0IzytRodBxW+A72D21bH8FJkaPMTMb0awnLI
+rfuJRKnZgcI3zUmmPOnoghRselnhkaSlIDeYlH1w9qFN0BlFGErBi8n9GywLYtR8
+NlL1iKKA38u1EvdVNqWClfKVf5iwR9ZUX8Mpqp+h1SB7Ku6lNpdYeZhnu/NUBTWB
+s8t1JlPREey3tnND7q7zXgjiP5AGKT/6qYr+Ng8sEw1A5AVxx/Pvx1fVsPYhc0eb
+3cUvFx69Mw8mgjofR+EkH6+3UmsOy5R+Cl8K6aGewNp4ydOtq4P6ks09AUQb0P+K
+E1kijIuR//o5ulK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VgfDk8eLIfMzm/IXXTgpRvgPPbb1
+ydcNjmI66DbW0Ahp1CCHhPfqwVVwIAkzqJv+UsRZoOfTYozJvcre3C9wM4kWZ0J7
+Fw2tNTvZfEKgZNkNyCvcQtrDYok2YwD8YObMYLOP1JVO7C2no9T8Vz4sd4vSeXgu
+MQqhlZc8WKwSGV1rdSNuig7skfl7Mr16C7B2n/GrcgzV+ECff2J/sKZZ7fpFUqZh
+wTMAEQEAAYkBvAQYAQoAJhYhBIoN6eowyhWCNtKRqVCXa+wHYwUJBQJnlb+DAhsM
+BQkDwmcAAAoJEFCXa+wHYwUJyTAL/2gYaDNxPF4L6bw94g+0NT/CuGid/CZKZpEO
+X2Jukdd8IHMfGvEOPgy1m59uRTObHzkQmWugGjbQsWPmHMBhsApv8T+rdN9F9NyG
+ysXq9XZaOAwUCQril5xpfE49GwQWVTSWMdVpIigYpe5zBhrYzVNxXqocOlj698K1
+LDCyMq3CMxgOv9z8VaU4FSDB0C4OsfgVyiWGAIwsMo2EPJMCY0q422Rez/J2JXkb
+uv4CUkxNyAFDcluhH31s8KKftCYQgNSf6YV4Q7wvwjLtmZmdC5VoIn+eTuB1WJkg
+C70/U/9JYwWiVJJ7pyhEUBvju009xZ/JQxxWuGgKhKrZSkiOe5zf1qLdVNeZ5gzl
+KKFcCYQNDo2V/d2mTZmFR1/R0ZmSmc1jZrJeMP2XE0x2XN2gteaTEtjfLGM7VoUF
+n0nrHcK4cOhgNv7zZLEcyeMJrb76KxoPKsRxWGefhRUtgikSvHF+lpSSFZxKSDHF
+GWhFa/dxeR+a1Nt9FFSX3Ql2hee4tg==
+=ybce
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/qr b/qr
new file mode 100755
index 0000000..08c9239
--- /dev/null
+++ b/qr
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+echo 'Context-Type: image/png'
+echo
+
+cat qr.png
diff --git a/qr.png b/qr.png
new file mode 100644
index 0000000..e29fbee
--- /dev/null
+++ b/qr.png
Binary files differ
diff --git a/sign b/sign
new file mode 100755
index 0000000..da69dad
--- /dev/null
+++ b/sign
@@ -0,0 +1,2 @@
+gpg --sign --armor msg
+cat msg msg.asc > msg.signed
diff --git a/upload b/upload
new file mode 100755
index 0000000..4ac83e3
--- /dev/null
+++ b/upload
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+
+echo 'Content-Type: text/plain'
+echo
+echo Thanks.
+cat > multipart
+./upload.py
+
diff --git a/upload.py b/upload.py
new file mode 100755
index 0000000..d81a8f0
--- /dev/null
+++ b/upload.py
@@ -0,0 +1,22 @@
+#!/usr/bin/python3
+
+import python-multipart
+import sys
+import os
+
+fields = {}
+files = {}
+def on_field(field):
+ fields[field.field_name] = field.value
+def on_file(file):
+ files[file.field_name] = {'name': file.file_name, 'file_object': file.file_object}
+
+with open ("multipart", mode='rb') as file:
+ form = file.read()
+
+multipart_headers = {'Content-Type': os.environ['CONTENT_TYPE']}
+multipart_headers['Content-Length'] = os.environ['CONTENT_LENGTH']
+multipart.parse_form(multipart_headers, form, on_field, on_file)
+
+print(fields)
+print(files)
diff --git a/verify b/verify
new file mode 100755
index 0000000..5fbd9ef
--- /dev/null
+++ b/verify
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+gpg --verify msg.signed