This commit is contained in:
2026-06-13 15:20:52 -06:00
parent 255529e196
commit b5d5b77149
+6 -5
View File
@@ -7,6 +7,7 @@ IFS=$'\n\t'
unix_seconds=$(date +%s)
key_path="./.private_ed25519_${unix_seconds}"
attribution_keystore=".attribution_passphrase_${unix_seconds}"
signature_tag="file-integrity"
out_dir="./out"
inner_dir="$out_dir/contents"
@@ -54,7 +55,7 @@ run_cmd() {
reset() {
printf 'Autoshredding known artifacts...\n'
find . -maxdepth 1 -type f \( -name 'private_*' -o -name 'attribution_passphrase_*' -o -name '*.sha512' -o -name 'checksums*' -o -name '*.sig' -o -name '*.7z' -o -name 'anonymous_signer' \) -exec shred -uz {} +
find . -maxdepth 1 -type f \( -name '.private_*' -o -name '.attribution_passphrase_*' -o -name '*.sha512' -o -name 'checksums*' -o -name '*.sig' -o -name '*.7z' -o -name 'anonymous_signer' \) -exec shred -uz {} +
checkcode $?
if compgen -G 'private_*' >/dev/null 2>&1; then
@@ -99,7 +100,7 @@ reset() {
checkcode $?
find "$dir" -mindepth 1 -type d -exec srm -r -z -l '{}' + >/dev/null 2>&1 || true
find "$dir" -type f \( -name 'private_ed25519_*' -o -name 'attribution_passphrase_*' \) -exec shred -uz '{}' + >/dev/null 2>&1 || true
find "$dir" -type f \( -name '.private_*' -o -name '.attribution_*' \) -exec shred -uz '{}' + >/dev/null 2>&1 || true
find "$dir" -type f -exec chmod 600 '{}' +
checkcode $?
fi
@@ -222,7 +223,7 @@ read -n 1 -s -r -p "In another terminal/window, fill $inner_dir with whatever yo
printf '\n'
printf 'ssh-keygen: creating new key: %s...\n' "$key_path"
ssh-keygen -t ed25519 -C 'anonymous' -N '' -f "$key_path" # >/dev/null 2>&1
ssh-keygen -t ed25519 -C 'anonymous' -N '' -f "$key_path" >/dev/null 2>&1
checkcode $?
printf 'ssh-keygen: fixing permissions on %s and %s...\n' "$key_path" "${key_path}.pub"
@@ -334,8 +335,8 @@ unset keystore_passphrase_check
printf 'Archiving keys...\n'
set +u
shopt -s nullglob
private_files=(private_*)
passphrase_files=(attribution_passphrase_*)
private_files=(.private_*)
passphrase_files=(.attribution_*)
shopt -u nullglob
set -u
if [[ ${#private_files[@]} -eq 0 && ${#passphrase_files[@]} -eq 0 ]]; then