1
0
Fork 0
cryptsetup/debian/scripts/decrypt_ssl
Daniel Baumann 74b680e410
Adding debian version 2:2.7.5-2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-21 10:45:48 +02:00

17 lines
347 B
Bash

#!/bin/sh
#
# Script to decrypt the key which is encrypted with openssl.
# See /usr/share/doc/cryptsetup/examples/gen-ssl-key to create such a key.
#
decrypt_ssl () {
echo "" >&2
echo "Decrypting ssl key $1..." >&2
if ! /usr/bin/openssl enc -aes-256-cbc -d -salt -in "$1" 2>/dev/null; then
return 1
fi
return 0
}
decrypt_ssl "$1"
exit $?