File: decrypt_gpg

package info (click to toggle)
cryptsetup 2%3A1.0.6-7
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 2,644 kB
  • ctags: 500
  • sloc: sh: 10,578; ansic: 4,114; xml: 471; makefile: 356; python: 90; perl: 44; sed: 16
file content (29 lines) | stat: -rw-r--r-- 347 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/sh

decrypt_gpg () {
	local key tries rc
	key="$1"
	tries=0
	rc=1

	echo "Performing GPG key decryption" >&2
	if /usr/bin/gpg -q --decrypt $key; then
		return 0
	else
		return 1
	fi
}

echo "gpg decryption not implemented yet" >&2
exit 1

if [ ! -x /usr/bin/gpg ]; then
	exit 1
fi

if [ -z "$1" ]; then
	exit 1
fi

decrypt_gpg "$1"
exit $?