summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorthe xhr <xhr@giessen.ccc.de>2021-08-24 21:22:29 +0200
committerthe xhr <xhr@giessen.ccc.de>2021-08-24 21:22:29 +0200
commitf224a3fe688bf2ae4c108d6b4359df4d8f03db99 (patch)
tree1d9d6fdce5671be7ae5754f51c6ef5b47bf7f0c1 /regress
parent0f9f2d04f9c340c761a9c900fac1c225b5a05419 (diff)
Initial commit of twind - a small and simple gemini daemon
Diffstat (limited to 'regress')
-rw-r--r--regress/Makefile13
-rw-r--r--regress/index.gmi22
-rwxr-xr-xregress/run_tests.sh134
-rwxr-xr-xregress/run_tests_fast.sh87
-rw-r--r--regress/twind.cert.pem17
-rw-r--r--regress/twind.csr.pem15
-rw-r--r--regress/twind.key.pem27
7 files changed, 315 insertions, 0 deletions
diff --git a/regress/Makefile b/regress/Makefile
new file mode 100644
index 0000000..369c090
--- /dev/null
+++ b/regress/Makefile
@@ -0,0 +1,13 @@
+BASEDIR= /var/twind/localhost/tests
+
+testdirs:
+ mkdir -p $(BASEDIR)
+ mkdir -p $(BASEDIR)/subdir
+
+testfiles:
+ echo "1e6b1c887c59a315edb7eb9a315fc84c" > $(BASEDIR)/index.gmi
+ echo "1e6b1c887c59a315edb7eb9a315fc84c" > $(BASEDIR)/subdir/index.gmi
+ echo "1e6b1c887c59a315edb7eb9a315fc84c" > $(BASEDIR)/subdir/test.gmi
+ ln -s index.gmi $(BASEDIR)/link.gmi
+
+all: testdir testfiles
diff --git a/regress/index.gmi b/regress/index.gmi
new file mode 100644
index 0000000..f031ec6
--- /dev/null
+++ b/regress/index.gmi
@@ -0,0 +1,22 @@
+# Ramblings about stuff I do or did
+
+Hi and welcome to my website. Actually, the first one since half a decade. Check out some articles I wrote in the last years. Mainly about BSD but you might find some other stuff as well.
+
+This site is a copy of my HTTP website on the same domain. I converted all content automatically and tried my best to get rid of all webisms. If you find errors please contact me.
+
+=> about.gmi About me
+=> bluetooth.gmi Playing Wireless Audio on OpenBSD
+=> contact.gmi How to contact me
+=> enchome.gmi Encrypted HOME directory on a second disk with OpenBSD
+=> mfs.gmi /tmp Partition on Memory Filesystem
+=> pinebookpro.gmi Install OpenBSD 6.7-current on a PineBook Pro 64
+=> sandbox.gmi How to run X Applications as another User
+=> talks.gmi Talks I gave over the years
+=> ttrss.gmi How to set up Tiny Tiny RSS on OpenBSD
+=> u2fandssh.gmi Using a U2F/FIDO key with OpenSSH
+=> vmm.gmi Running Virtual Machines with VMM on OpenBSD
+=> wireguard.gmi Creating a Wireguard VPN on OpenBSD
+
+This gemini site is powered by vger on OpenBSD.
+
+> $Id: index.gmi,v 1.3 2020/12/25 18:49:20 cvs Exp $
diff --git a/regress/run_tests.sh b/regress/run_tests.sh
new file mode 100755
index 0000000..f67db9f
--- /dev/null
+++ b/regress/run_tests.sh
@@ -0,0 +1,134 @@
+#!/usr/local/bin/bash
+
+HOST=${1:-"localhost"}
+
+PORT=1965
+
+check_status()
+{
+ local _status=$1
+ local _expected=$2
+ if [ "$_status" != "$_expected" ]; then
+ echo "[-] failure. Expected $_expected and got $_status"
+ fi
+}
+
+# Expect 20
+URL=""
+echo "[+] Testing ${HOST}"
+echo "gemini://${HOST}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 20
+}
+
+# Expect 51
+URL="reallynotexistent"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 51
+}
+
+# Expect 20
+URL="/"
+echo "[+] Testing ${HOST}${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 20
+}
+
+# Expect 20
+URL="index.gmi"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 20
+}
+
+# Expect 20
+URL="tests/"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 20
+}
+
+# Expect 20
+URL="tests/link.gmi"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 20
+ read -r line
+ check_status $line "1e6b1c887c59a315edb7eb9a315fc84c"
+}
+
+# Expect 20
+URL="tests/index.gmi"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 20
+ read -r line
+ check_status $line "1e6b1c887c59a315edb7eb9a315fc84c"
+}
+
+# Expect 20
+URL="tests/index.gmi"
+echo "[+] Testing ${HOST}:${PORT}/${URL}"
+echo "gemini://${HOST}:${PORT}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 20
+ read -r line
+ check_status $line "1e6b1c887c59a315edb7eb9a315fc84c"
+}
+
+# Expect 51
+URL="url%20encoded"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 51
+}
+
+# Expect 51
+URL="index.gemini"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 51
+}
+
+# Expect 51
+URL="../../../../../etc/pass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AAAAAAAA"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 59
+}
+
+# Expect 59
+URL="index.gmi"
+LHOST="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAA"
+echo "[+] Testing ${LHOST}/${URL}"
+echo "gemini://${LHOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null | { \
+ read -r status meta
+ check_status $status 59
+}
+
diff --git a/regress/run_tests_fast.sh b/regress/run_tests_fast.sh
new file mode 100755
index 0000000..021bad4
--- /dev/null
+++ b/regress/run_tests_fast.sh
@@ -0,0 +1,87 @@
+#!//bin/sh
+
+HOST=${1:-"localhost"}
+
+PORT=1965
+
+check_status()
+{
+ local _status=$1
+ local _expected=$2
+ if [ "$_status" != "$_expected" ]; then
+ echo "[-] failure. Expected $_expected and got $_status"
+ fi
+}
+
+# Expect 20
+URL=""
+echo "[+] Testing ${HOST}"
+echo "gemini://${HOST}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 51
+URL="reallynotexistent"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 20
+URL="/"
+echo "[+] Testing ${HOST}${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 20
+URL="index.gmi"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 20
+URL="tests/"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 20
+URL="tests/link.gmi"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 20
+URL="tests/index.gmi"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 20
+URL="tests/index.gmi"
+echo "[+] Testing ${HOST}:${PORT}/${URL}"
+echo "gemini://${HOST}:${PORT}/${URL}" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 51
+URL="url%20encoded"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 51
+URL="index.gemini"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 51
+URL="../../../../../etc/passwd"
+echo "[+] Testing ${HOST}/${URL}"
+echo "gemini://${HOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+# Expect 51
+URL="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+echo "[+] Testing ${LHOST}/${URL}"
+echo "gemini://${LHOST}/${URL}/" | openssl s_client -connect ${HOST}:${PORT} -crlf -ign_eof -quiet 2> /dev/null
+
+
diff --git a/regress/twind.cert.pem b/regress/twind.cert.pem
new file mode 100644
index 0000000..b36c758
--- /dev/null
+++ b/regress/twind.cert.pem
@@ -0,0 +1,17 @@
+-----BEGIN CERTIFICATE-----
+MIICpDCCAYwCCQCXPDqfUlk1aTANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAls
+b2NhbGhvc3QwHhcNMjEwODA3MTQ1ODM0WhcNMzEwODA1MTQ1ODM0WjAUMRIwEAYD
+VQQDDAlsb2NhbGhvc3QwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0
+z7Rl/S3VXPEnJNSF+FvO6QUvQEVFTkxgzIy46w8rv7/ADrPeGR5R9omyLISUyiEV
+G6feBtjKgdzbAOTxIoTb2s26CZvJOELpnXgtY8p+mNix9qBj6Ki+4k9LpsGPSM1F
++wtvs4WelboMysWno1Ii+krJfhftRTYvEqV1nQz5ADSj8Xpr45eMl+90z4J8JzyU
+zD4pBD56oz5zlVTU5i1K3ImfQ4aph8QmqVe/Lf2DNl1dGbYUmFVotKarjYvTa5WN
+ugfz8Qm9QPVVL8B088Y4wLNQuSEA1dh3sjaBa21/oCvTDZmXPLziovEYzjBDKvi3
+WSfziOMn2DdiOQws++LTAgMBAAEwDQYJKoZIhvcNAQELBQADggEBACno6n8YCfkw
+XujPUJu5yrc32rfO4eIedPO8ByzX7Qm8Bo3H87C5jEXzzdRICViHPllGZ7e4xE1p
+UtElH/QGdZ5H27Q6X1KFSilenSvBVpk1Fi5RlAKg4KLNKX6gaFqNHnpagfxuWJeC
+9NVoaYjwRB2qUy/FiMywX7NBjOe2MMHJ0qCdQOgNi69jBSHVCQFh88WE84UPFC0T
+BY21l3VRs84g9C9w8ED7T+z6duEhasJSGG4ieK2iST05hIFr5xACF9c02/p435n2
+ZVDePbTQQP0YfzAWIOAEUNumgORuRc+gKbQrfK8WHzV6/tGVdxMyaGl0Z7BLSoQ0
+9OvvlcAFo0w=
+-----END CERTIFICATE-----
diff --git a/regress/twind.csr.pem b/regress/twind.csr.pem
new file mode 100644
index 0000000..8b73ba8
--- /dev/null
+++ b/regress/twind.csr.pem
@@ -0,0 +1,15 @@
+-----BEGIN CERTIFICATE REQUEST-----
+MIICWTCCAUECAQAwFDESMBAGA1UEAwwJbG9jYWxob3N0MIIBIjANBgkqhkiG9w0B
+AQEFAAOCAQ8AMIIBCgKCAQEAtM+0Zf0t1VzxJyTUhfhbzukFL0BFRU5MYMyMuOsP
+K7+/wA6z3hkeUfaJsiyElMohFRun3gbYyoHc2wDk8SKE29rNugmbyThC6Z14LWPK
+fpjYsfagY+iovuJPS6bBj0jNRfsLb7OFnpW6DMrFp6NSIvpKyX4X7UU2LxKldZ0M
++QA0o/F6a+OXjJfvdM+CfCc8lMw+KQQ+eqM+c5VU1OYtStyJn0OGqYfEJqlXvy39
+gzZdXRm2FJhVaLSmq42L02uVjboH8/EJvUD1VS/AdPPGOMCzULkhANXYd7I2gWtt
+f6Ar0w2Zlzy84qLxGM4wQyr4t1kn84jjJ9g3YjkMLPvi0wIDAQABoAAwDQYJKoZI
+hvcNAQELBQADggEBADAesSaEFpLqjw/smvL4MZDq1BDbWwMlfoeI5Rw0ylhDoDNs
+yA19banjyidLMN4/QjPGziqrmI9QPYsMUzKDsCrvoOV4I6rEx2xE+TfuR1c0peFB
+CT/zdwvPfq82mbZO+oyL1dMh4Dzjv0cNg3DYU9ZH/+XC/r7YKNHiV1WPpmbF2yeW
+dMcFlHPc39fgl0Jhxh7iWAuf0jPTTH7Y1JhwtpIGaxBqFB9LDJOLGLAHT+Fkms+w
+2HIsQUCc+rXhWvxoFuO/TuN94dDs/mjQv+VgC0w22tSE7tOEjTwUUxygvHNSh0A5
+ctvSeJzP+rlhGMjwFzGkU2xc/vBpxV8W4l/OOew=
+-----END CERTIFICATE REQUEST-----
diff --git a/regress/twind.key.pem b/regress/twind.key.pem
new file mode 100644
index 0000000..c9d09bf
--- /dev/null
+++ b/regress/twind.key.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpAIBAAKCAQEAtM+0Zf0t1VzxJyTUhfhbzukFL0BFRU5MYMyMuOsPK7+/wA6z
+3hkeUfaJsiyElMohFRun3gbYyoHc2wDk8SKE29rNugmbyThC6Z14LWPKfpjYsfag
+Y+iovuJPS6bBj0jNRfsLb7OFnpW6DMrFp6NSIvpKyX4X7UU2LxKldZ0M+QA0o/F6
+a+OXjJfvdM+CfCc8lMw+KQQ+eqM+c5VU1OYtStyJn0OGqYfEJqlXvy39gzZdXRm2
+FJhVaLSmq42L02uVjboH8/EJvUD1VS/AdPPGOMCzULkhANXYd7I2gWttf6Ar0w2Z
+lzy84qLxGM4wQyr4t1kn84jjJ9g3YjkMLPvi0wIDAQABAoIBAAZnSLtH8SSaSwwY
+2NH5zr6QMBfRTeK7eCcBd4ZhBMOG4fKaUrJt7031zkCaJQPj+LH3rcVGNs1NNhYn
+fPQxRcVHhXuuNW815+DAK+5nl1dOcHY1Bs8jAT7pYueJ+1bovCRbVLdbA0NviAxF
+7iQWu6TzekySg6RqjBW0slls+3WiBfUM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