diff --git a/.gt/signing-key.public.asc b/.gt/signing-key.public.asc index 1af0893..8766c87 100644 --- a/.gt/signing-key.public.asc +++ b/.gt/signing-key.public.asc @@ -59,31 +59,30 @@ AGeerkJ3XN7/ttUFe6sa0vPxbJX+S8CApFzo2smKaL5B+S0UI92G4MvZXaS65i0u Ow5JSrpfZvvz1L6+6CEPKdTyC+S2HeLpUHzTFnQBFwZimO2wTrLeMQfoW5ZT75Vz 8FBqF9w01JC9hmsSA4n4MEsM3yvQTHkAVY4DoTEtlCJUK9kYWh6SorM3DpEQLVjh Xzw1QOiyOfzDQFP0l24440kaGEvP+w8809Rd0dNsSZXtbtMN/b6lgTKZ2xC37Zkh -Qvs6Hs5sx8Se83/Lyh8gO9At3U6amQz0bTzy3Pa3U3UpABEBAAGJBHIEGAEKACYW -IQQU5W1MPaI/rfVKQONrgrsr7O4ERwUCYrMlyAIbAgUJAeEzgAJACRBrgrsr7O4E -R8F0IAQZAQoAHRYhBJQHlYGGZpXeqdTJWJRf5hWQTlyFBQJisyXIAAoJEJRf5hWQ -TlyFTLIP/i44iSXGBT8gRncDddfPWEEWqjVl/W5q3VC1ow5FKEDk3Fe91/yU/iCN -0AMhmIFkAdZckZJAm5uRL04e2j3L3sHqbEcpXNDUzwSPR9zSwYDrk01b9QGhUFjV -vYmhvL6MfFquDaWttcllOAoRBt4SJDgBtY2mtTpZlH9OgJPHP4ROgxqRnCdvVIBS -JXRvCJxRTSVE+8xzjjTZULxDkzGUMBVv9UM/9PfFZOBvlO5py9iuVfX5rY9+/YV1 -n9XG5ZwZbYqi3K80R9NkNhiZLsLU9rXA0/OYEF6DhmepngxmYabdJTwH3dSXOKHS -6aXHrLH+n2xaKFlND6C8Mfe6tykWjCZPHYQntWiM/7S7+vgVYsE16ZKwUmRpu5B2 -zpK+bZLGgIDEm/f/an3l2qvUNf/NmQfJouBTMwUhDViYxOuqYKTkZOefofiY9fr2 -EGCwZ2jt25KR/J8Cec7FvJ9c6pWUAZNkVxfYs2EmXlp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fIloCfD98hb +o0W1dncCumf6ysyoI6cDUs1JSVa10we45GIW3LmSBgUpOBDqlg6iGSVeigu4Q3IT +sTKbPQZdLBaT3zTve7cLmhvAnCoeMZ9oSM+vL6byXGxog7hSCajVWcnQhB/jFqsW +kfysIT2WL8hOfolv5H9htLFBmILcKPlQnmuLCWpH6wg5tDEYd0dPEXM2Ba+84zts +7r2d5Kp7DSiqCe0qCxS8ZoVMlw0VQD6NGYWm2HHo64s0x3xDiXbzwGHfJIXStxoG +GE/c/KspLQqPdTPiOJ37Ym1XeO8yt/tO6jm04TC8FfhkTMkZTtKswotkery6uv7T +0u7l6fVcw67qTNi+ReIhqbBkZNajg60dPlLw +=oNyI -----END PGP PUBLIC KEY BLOCK----- - diff --git a/.gt/signing-key.public.asc.sig b/.gt/signing-key.public.asc.sig index 6aad2e7..cc52d00 100644 Binary files a/.gt/signing-key.public.asc.sig and b/.gt/signing-key.public.asc.sig differ diff --git a/README.md b/README.md index b78108b..c0905d4 100644 --- a/README.md +++ b/README.md @@ -107,6 +107,16 @@ Please have a look at [CONTRIBUTING.md](https://github.com/tegonal/github-commons/tree/main/.github/CONTRIBUTING.md) for further suggestions and guidelines. +## Extend expiration of signing-key + +Execute the following script, which will extend the sub-key 945FE615904E5C85 by one year and copies it to +src/gt/signing-key.public.asc and also signs it again with the key 4B78012139378220 and finally copies the files +to the .gt folder. + +```bash +./scripts/extend-expiration-signing-key.sh +``` + # License Most provided files are licensed under [Creative Commons Zero v1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/). diff --git a/scripts/extend-expiration-signing-key.sh b/scripts/extend-expiration-signing-key.sh new file mode 100755 index 0000000..f5e5527 --- /dev/null +++ b/scripts/extend-expiration-signing-key.sh @@ -0,0 +1,80 @@ +#!/usr/bin/env bash +# +# / /____ ___ ____ ___ ___ _/ / This file is provided to you by https://github.com/tegonal/github-commons +# / __/ -_) _ `/ _ \/ _ \/ _ `/ / Copyright 2022 Tegonal Genossenschaft +# \__/\__/\_, /\___/_//_/\_,_/_/ It is licensed under Creative Commons Zero v1.0 Universal +# /___/ Please report bugs and contribute back your improvements +# +# Version: v2.9.0-SNAPSHOT +################################### +set -euo pipefail +shopt -s inherit_errexit +unset CDPATH + +if ! [[ -v scriptsDir ]]; then + scriptsDir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" >/dev/null && pwd 2>/dev/null)" + readonly scriptsDir +fi + +if ! [[ -v projectDir ]]; then + projectDir="$(realpath "$scriptsDir/../")" + readonly projectDir +fi + +if ! [[ -v dir_of_github_commons ]]; then + dir_of_github_commons="$projectDir/src" + readonly dir_of_github_commons +fi + +if ! [[ -v dir_of_tegonal_scripts ]]; then + dir_of_tegonal_scripts="$scriptsDir/../lib/tegonal-scripts/src" + source "$dir_of_tegonal_scripts/setup.sh" "$dir_of_tegonal_scripts" +fi + +function extendExpirationSigningKey() { + local tmpDir + tmpDir=$(mktemp -d -t signing-key-XXXXXXXXXX) + local -r gpgDir="$tmpDir/gpg" + + trap '[[ -d "$tmpDir" ]] && rm -r "$tmpDir"' EXIT + + function setupTmpDir() { + ! [[ -d "$tmpDir" ]] && mkdir "$tmpDir" + mkdir "$gpgDir" + chmod 700 "$gpgDir" + } + + function importGpgViaClipboard() { + local -r keyId=$2 + echo "copy the private key of $keyId into your clipboard and press enter" + read -r + xclip -o -sel clipboard >"$tmpDir/$keyId.asc" + gpg --homedir "$gpgDir" --import "$tmpDir/$keyId.asc" + + gpg --homedir "$gpgDir" --list-secret-keys + } + + local -r signingKey="$dir_of_github_commons/gt/signing-key.public.asc" + local -r actualSig="$dir_of_github_commons/gt/signing-key.public.asc.actual_sig" + + setupTmpDir + gpg --homedir "$gpgDir" --import "$signingKey" + importGpgViaClipboard "$tmpDir" 6B82BB2BECEE0447 + printf "key 945FE615904E5C85\nexpire\n1y\nsave\n" | + gpg --homedir "$gpgDir" --batch --command-fd 0 --edit-key 6B82BB2BECEE0447 + gpg --homedir "$gpgDir" --export --armor 6B82BB2BECEE0447 >"$signingKey" + rm -r "$tmpDir" + + setupTmpDir + importGpgViaClipboard "$tmpDir" 4B78012139378220 + gpg --homedir "$gpgDir" --detach-sign -u 4B78012139378220 --output "$actualSig" "$signingKey" + rm -r "$tmpDir" + + "$scriptsDir/before-pr.sh" + + logSuccess "expiration date for %s updated and signed (%s) and copied to the .gt directory" "$signingKey" "$actualSig" + +} + +${__SOURCED__:+return} +extendExpirationSigningKey "$@" diff --git a/src/gt/signing-key.public.asc b/src/gt/signing-key.public.asc index 1af0893..8766c87 100644 --- a/src/gt/signing-key.public.asc +++ b/src/gt/signing-key.public.asc @@ -59,31 +59,30 @@ AGeerkJ3XN7/ttUFe6sa0vPxbJX+S8CApFzo2smKaL5B+S0UI92G4MvZXaS65i0u Ow5JSrpfZvvz1L6+6CEPKdTyC+S2HeLpUHzTFnQBFwZimO2wTrLeMQfoW5ZT75Vz 8FBqF9w01JC9hmsSA4n4MEsM3yvQTHkAVY4DoTEtlCJUK9kYWh6SorM3DpEQLVjh Xzw1QOiyOfzDQFP0l24440kaGEvP+w8809Rd0dNsSZXtbtMN/b6lgTKZ2xC37Zkh -Qvs6Hs5sx8Se83/Lyh8gO9At3U6amQz0bTzy3Pa3U3UpABEBAAGJBHIEGAEKACYW -IQQU5W1MPaI/rfVKQONrgrsr7O4ERwUCYrMlyAIbAgUJAeEzgAJACRBrgrsr7O4E -R8F0IAQZAQoAHRYhBJQHlYGGZpXeqdTJWJRf5hWQTlyFBQJisyXIAAoJEJRf5hWQ -TlyFTLIP/i44iSXGBT8gRncDddfPWEEWqjVl/W5q3VC1ow5FKEDk3Fe91/yU/iCN -0AMhmIFkAdZckZJAm5uRL04e2j3L3sHqbEcpXNDUzwSPR9zSwYDrk01b9QGhUFjV -vYmhvL6MfFquDaWttcllOAoRBt4SJDgBtY2mtTpZlH9OgJPHP4ROgxqRnCdvVIBS -JXRvCJxRTSVE+8xzjjTZULxDkzGUMBVv9UM/9PfFZOBvlO5py9iuVfX5rY9+/YV1 -n9XG5ZwZb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nMxbipqgcikQTK8nkWIHUJ1OAAbq5M68BX2aRaz1hvuEIxwk +MD3t8c5fJqH7WDBLOpsqi8V0MMHMXEeO+36MFZN/6gd7aOOIXKF9Ro7eJ/YL/qpb +am6ZNHUDIVtvUJX8YU2I5vW/4BNt1/WlH36lk+ssqILlaoxncGkhr2JITZjSyecd +EUaR64s9Z4MSzTu3gzRn0G/14gowjeLqqmbibxx076OOPXbbsp5OxfIloCfD98hb +o0W1dncCumf6ysyoI6cDUs1JSVa10we45GIW3LmSBgUpOBDqlg6iGSVeigu4Q3IT +sTKbPQZdLBaT3zTve7cLmhvAnCoeMZ9oSM+vL6byXGxog7hSCajVWcnQhB/jFqsW +kfysIT2WL8hOfolv5H9htLFBmILcKPlQnmuLCWpH6wg5tDEYd0dPEXM2Ba+84zts +7r2d5Kp7DSiqCe0qCxS8ZoVMlw0VQD6NGYWm2HHo64s0x3xDiXbzwGHfJIXStxoG +GE/c/KspLQqPdTPiOJ37Ym1XeO8yt/tO6jm04TC8FfhkTMkZTtKswotkery6uv7T +0u7l6fVcw67qTNi+ReIhqbBkZNajg60dPlLw +=oNyI -----END PGP PUBLIC KEY BLOCK----- - diff --git a/src/gt/signing-key.public.asc.actual_sig b/src/gt/signing-key.public.asc.actual_sig index 6aad2e7..cc52d00 100644 Binary files a/src/gt/signing-key.public.asc.actual_sig and b/src/gt/signing-key.public.asc.actual_sig differ