aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/email/integration
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-03-24 11:29:14 +0100
committerAlex Auvolat <alex@adnab.me>2023-03-24 11:29:14 +0100
commit5cd69a9ba1c2f87d9a1e294f06b74945e745e475 (patch)
treef7c8eb63da349c22ed9216ecf088f2a6a14431de /cluster/prod/app/email/integration
parent6ffaa0ed91a6e2e4ecec6741677ad9307dcdbab2 (diff)
parent8e29ee3b0b2f1855a26bc45e5dc502f8aad8e266 (diff)
downloadnixcfg-wgautomesh.tar.gz
nixcfg-wgautomesh.zip
Merge branch 'main' into wgautomeshwgautomesh
Diffstat (limited to 'cluster/prod/app/email/integration')
-rw-r--r--cluster/prod/app/email/integration/README.md23
-rw-r--r--cluster/prod/app/email/integration/tls-tls-proxy.sh13
2 files changed, 36 insertions, 0 deletions
diff --git a/cluster/prod/app/email/integration/README.md b/cluster/prod/app/email/integration/README.md
new file mode 100644
index 0000000..d396277
--- /dev/null
+++ b/cluster/prod/app/email/integration/README.md
@@ -0,0 +1,23 @@
+# Email
+
+## TLS TLS Proxy
+
+Required for Android 7.0 that does not support elliptic curves.
+
+Generate a key:
+
+```bash
+openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout rsa.key -out rsa.crt -subj "/CN=imap.deuxfleurs.fr" -addext "subjectAltName=DNS:smtp.deuxfleurs.fr"
+```
+
+Run the command:
+
+```bash
+./integration/proxy.sh imap.deuxfleurs.fr:993 1993
+```
+
+Test it:
+
+```bash
+openssl s_client localhost:1993
+```
diff --git a/cluster/prod/app/email/integration/tls-tls-proxy.sh b/cluster/prod/app/email/integration/tls-tls-proxy.sh
new file mode 100644
index 0000000..afb7317
--- /dev/null
+++ b/cluster/prod/app/email/integration/tls-tls-proxy.sh
@@ -0,0 +1,13 @@
+#!/usr/bin/env bash
+UPSTREAM=$1
+PROXY_PORT=$2
+socat -dd \
+"openssl-listen:${PROXY_PORT},\
+reuseaddr,\
+fork,\
+cert=/tmp/tls-tls-proxy/rsa.crt,\
+key=/tmp/tls-tls-proxy/rsa.key,\
+verify=0,\
+bind=0.0.0.0" \
+"openssl:${UPSTREAM},\
+verify=0"