dot

packages and services management
Log | Files | Refs | README

commit 568386c2d5c5ea7345ef159d74aa8cf0b9aa882d
parent 43102aa60c64bafbbbcd634a7e0429ec876f1147
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sun,  2 Dec 2018 00:30:18 +0100

bin/gpg-httpfile-wkd: generate wkd entries for httpfile

Diffstat:
Abin/gpg-httpfile-wkd | 24++++++++++++++++++++++++
Dbin/gpg-wkd | 6------
2 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/bin/gpg-httpfile-wkd b/bin/gpg-httpfile-wkd @@ -0,0 +1,24 @@ +#!/usr/bin/env execlineb + +importas -D /var/www/plain wkd WKD + +forbacktickx -n -d "\n" x { + pipeline { gpg -k --with-wkd } + sed -rn "/^uid / { s/.*<([^>]*)>/\\1/; N; s/\\n//; s/@[^@]*$//; s/ +/ / p; }" +} +importas x x + +backtick -n x { heredoc 0 $x sed "s/ .*$//" } +importas mail x + +backtick -n x { heredoc 0 $x sed -r "s/^[^@]*@([^ ]+).*$/\\1/" } +importas domain x + +backtick -n x { heredoc 0 $x sed "s/^.* //" } +importas hash x + +if { mkdir -p ${wkd}/${domain}/:well-known/openpgpkey/hu } +if { touch ${wkd}/${domain}/:well-known/openpgpkey/hu/policy } + +redirfd -w 1 ${wkd}/${domain}/:well-known/openpgpkey/hu/${hash} +gpg --export ${mail} diff --git a/bin/gpg-wkd b/bin/gpg-wkd @@ -1,6 +0,0 @@ -#!/usr/bin/env execlineb - -forbacktickx -n x { - pipeline { gpg -k --with-wkd } - sed -rn "/^uid / { s/.*<([^>]*)>/\\1/; N; s/\\n//; s/^ *//; p; }" -}