blob: d2f7a57b1ffff57ef7b694239bb58ee6ce116988 (
plain)
1
2
3
4
5
6
7
8
9
|
#!@zsh@/bin/zsh
NOTMUCH_TCP=${NOTMUCH_TCP:-2010}
HOST=${HOST:-$(@nettools@/bin/hostname -s)}
NOTMUCH_HOST=${NOTMUCH_HOST:-odin.asgard.yggdrasil}
cd ~/.notmuch-tcp
@socat@/bin/socat STDIO,ignoreeof openssl:${NOTMUCH_HOST}:${NOTMUCH_TCP},verify=1,cafile=ca.pem,certificate=${HOST}.pem,key=${HOST}.key <<(print "${(@q)@}"; inp=$(cat 2>&- || echo ""); printf "%d\n" $(@coreutils@/bin/wc -c <<<"${inp}"); @coreutils@/bin/cat <<<"${inp}")
|