Apache/2.4.7 (Ubuntu) Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) safemode : OFF MySQL: ON | Perl: ON | cURL: OFF | WGet: ON > / lib / cryptsetup / scripts / | server ip : 172.67.156.115 your ip : 172.69.7.142 H O M E |
Filename | /lib/cryptsetup/scripts/decrypt_gnupg |
Size | 576 |
Permission | rwxr-xr-x |
Owner | root : root |
Create time | 27-Apr-2025 10:01 |
Last modified | 02-Nov-2013 01:50 |
Last accessed | 05-Jul-2025 18:09 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
#!/bin/sh
decrypt_gpg () {
echo "Performing GPG key decryption ..." >&2
if ! /lib/cryptsetup/askpass "Enter passphrase for key $1: " | \
/usr/bin/gpg -q --batch --no-options --no-mdc-warning \
--no-random-seed-file --no-default-keyring \
--keyring /dev/null --secret-keyring /dev/null \
--trustdb-name /dev/null --passphrase-fd 0 --decrypt $1; then
return 1
fi
return 0
}
if [ ! -x /usr/bin/gpg ]; then
echo "$0: /usr/bin/gpg is not available" >&2
exit 1
fi
if [ -z "$1" ]; then
echo "$0: missing key as argument" >&2
exit 1
fi
decrypt_gpg "$1"
exit $?
decrypt_gpg () {
echo "Performing GPG key decryption ..." >&2
if ! /lib/cryptsetup/askpass "Enter passphrase for key $1: " | \
/usr/bin/gpg -q --batch --no-options --no-mdc-warning \
--no-random-seed-file --no-default-keyring \
--keyring /dev/null --secret-keyring /dev/null \
--trustdb-name /dev/null --passphrase-fd 0 --decrypt $1; then
return 1
fi
return 0
}
if [ ! -x /usr/bin/gpg ]; then
echo "$0: /usr/bin/gpg is not available" >&2
exit 1
fi
if [ -z "$1" ]; then
echo "$0: missing key as argument" >&2
exit 1
fi
decrypt_gpg "$1"
exit $?