diff options
-rw-r--r-- | .envrc | 12 | ||||
-rw-r--r-- | .gitignore | 10 | ||||
-rw-r--r-- | .reuse/templates/default.jinja2 | 12 | ||||
-rw-r--r-- | README.md | 16 | ||||
-rw-r--r-- | flake.lock.license | 9 | ||||
-rw-r--r-- | flake.nix | 9 | ||||
-rwxr-xr-x | scripts/mk_key.sh | 45 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license | 9 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/b-peetz.de/hu/policy.license | 9 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license | 9 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license | 9 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license | 9 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/sils.li/hu/policy.license | 9 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license | 9 | ||||
-rw-r--r-- | src/.well-known/openpgpkey/vhack.eu/hu/policy.license | 9 | ||||
-rw-r--r-- | stored_keys.md | 12 | ||||
-rw-r--r-- | treefmt.nix | 9 | ||||
-rwxr-xr-x | update.sh | 10 |
18 files changed, 195 insertions, 21 deletions
diff --git a/.envrc b/.envrc index 0f36b0a..f051440 100644 --- a/.envrc +++ b/.envrc @@ -1,10 +1,20 @@ #! /usr/bin/env sh +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. + use flake || use nix watch_file flake.nix PATH_add ./scripts if on_git_branch; then - echo && git status --short --branch + echo && git status --short --branch fi diff --git a/.gitignore b/.gitignore index b50689b..e7a3233 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,13 @@ +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. + # build /result diff --git a/.reuse/templates/default.jinja2 b/.reuse/templates/default.jinja2 index 906bd21..7e7162a 100644 --- a/.reuse/templates/default.jinja2 +++ b/.reuse/templates/default.jinja2 @@ -1,3 +1,15 @@ +{# +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. +#} + pgp-wkd - A web key directory for pgp-keys {% for copyright_line in copyright_lines %} diff --git a/README.md b/README.md index 486eafc..00f2826 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,15 @@ +<!-- +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. +--> + # GPG WKD setup > The source of the WKD at vhack.eu @@ -5,10 +17,12 @@ The directory structure follows the advanced way to implement the [WKD][1] specification. ## Current GPG-Keys: + These are listed in [the keys file](./stored_keys.md). Use the [mk_key](./scripts/mk_key.sh) script to add a key (see it's help for options). -## Reference +## Reference + All directories must also server a `policy` file. This can however be zero size. (source: [2]) diff --git a/flake.lock.license b/flake.lock.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/flake.lock.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/flake.nix b/flake.nix index 4090ae9..a6a49ce 100644 --- a/flake.nix +++ b/flake.nix @@ -1,3 +1,12 @@ +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. { description = "The source of the wkd at vhack.eu"; diff --git a/scripts/mk_key.sh b/scripts/mk_key.sh index 2c98cc8..1e38025 100755 --- a/scripts/mk_key.sh +++ b/scripts/mk_key.sh @@ -1,12 +1,22 @@ #!/usr/bin/env sh +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. + die() { - echo "$@"; - exit 1; + echo "$@" + exit 1 } help() { - cat << EOF + cat <<EOF A helper script to add an gpg key to the wkd. USAGE: @@ -30,9 +40,9 @@ EOF } add() { - key_id="$1"; - key_email="$2"; - key_hash="$3"; + key_id="$1" + key_email="$2" + key_hash="$3" cd "$(git rev-parse --show-toplevel)" || die "No source dir!" @@ -41,26 +51,23 @@ add() { full_key_id="$(gpg --list-keys --with-colons "$key_id" | awk -F: '/^uid:/ { print $10 }' | tail -n 1)" mkdir --parents "$dir" - gpg --no-armor --export "$key_id" > "$dir/$key_hash" && - - printf "%s%s%s%s\n" '`' "$dir/$key_hash" '`' " -> $full_key_id" >> stored_keys.md && - - echo "Key export done!"; + gpg --no-armor --export "$key_id" >"$dir/$key_hash" && + printf "%s%s%s%s\n" '`' "$dir/$key_hash" '`' " -> $full_key_id" >>stored_keys.md && + echo "Key export done!" } for arg in "$@"; do case "$arg" in - "--help" | "-h") - help; - exit 0; - ;; + "--help" | "-h") + help + exit 0 + ;; esac done - -key_id="$1"; -key_email="$2"; -key_hash="$3"; +key_id="$1" +key_email="$2" +key_hash="$3" shift 3 [ -z "$key_id" ] && die "No KEY_ID specified, see '--help'!" diff --git a/src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license b/src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/src/.well-known/openpgpkey/b-peetz.de/hu/policy.license b/src/.well-known/openpgpkey/b-peetz.de/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/b-peetz.de/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license b/src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/s-schoeffel.de/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license b/src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license b/src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/src/.well-known/openpgpkey/sils.li/hu/policy.license b/src/.well-known/openpgpkey/sils.li/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/sils.li/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license b/src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/vhack.eu/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@vhack.eu.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/src/.well-known/openpgpkey/vhack.eu/hu/policy.license b/src/.well-known/openpgpkey/vhack.eu/hu/policy.license new file mode 100644 index 0000000..877ea82 --- /dev/null +++ b/src/.well-known/openpgpkey/vhack.eu/hu/policy.license @@ -0,0 +1,9 @@ +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. diff --git a/stored_keys.md b/stored_keys.md index 19c384e..781168a 100644 --- a/stored_keys.md +++ b/stored_keys.md @@ -1,3 +1,15 @@ +<!-- +pgp-wkd - A web key directory for pgp-keys + +Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +SPDX-License-Identifier: CC-BY-SA-4.0 + +This file is part of pgp-wkd. + +You should have received a copy of the License along with this program. +If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. +--> + `./src/.well-known/openpgpkey/b-peetz.de/hu/bopqzgiaibk5g9s434j77phzb91hqmxb` -> Benedikt Peetz <benedikt.peetz@b-peetz.de> `./src/.well-known/openpgpkey/sils.li/hu/hsfxbue8h8afysdecgty3f5pfx4wcmt6@sils.li` -> Silas Schöffel <sils@sils.li> `./src/.well-known/openpgpkey/s-schoeffel.de/hu/zuwf9qt9nx9k7iihjcuk6h7tc7u6qtuu@s-schoeffel.de` -> Silas Schöffel <silas.schoeffel@s-schoeffel.de> diff --git a/treefmt.nix b/treefmt.nix index 1cbab40..292902b 100644 --- a/treefmt.nix +++ b/treefmt.nix @@ -1,3 +1,12 @@ +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. { treefmt-nix, pkgs, diff --git a/update.sh b/update.sh index 49216b8..fdfd9c3 100755 --- a/update.sh +++ b/update.sh @@ -1,3 +1,13 @@ #!/usr/bin/env sh +# pgp-wkd - A web key directory for pgp-keys +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: CC-BY-SA-4.0 +# +# This file is part of pgp-wkd. +# +# You should have received a copy of the License along with this program. +# If not, see <https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt>. + nix flake update |