lock: use openssl instead of gpg

This commit is contained in:
Fernando Schauenburg 2025-03-07 20:57:18 +01:00
parent 9df850751b
commit b5b528603d

View file

@ -9,11 +9,7 @@ error() {
[ -n "$1" ] || error "input file missing"
[ -r "$1" ] || error "can't read input file"
# shellcheck disable=SC2016 # I don't want $(tty) to be expanded
printf '#!/bin/sh
GPG_TTY=$(tty)
export GPG_TTY
base64 -d <<EOF | gpg -d
openssl enc -d -aes256 -pbkdf2 -base64 <<EOF
%s
EOF
' "$(gpg -c --cipher-algo AES256 -o - -- "$1" | base64)"
EOF' "$(openssl enc -aes256 -pbkdf2 -base64 -in "$1")"