3 gpg_version=$(gpg --version 2>&1)
5 say "You do not seem to have gpg installed"
7 # As said here: http://www.gnupg.org/documentation/faqs.html#q6.19
8 # the gpg version 1.0.6 didn't parse trust packets correctly, so for
9 # that version, creation of signed tags using the generated key fails.
10 case "$gpg_version" in
12 say "Your version of gpg (1.0.6) is too buggy for testing"
16 # * Type DSA and Elgamal, size 2048 bits, no expiration date,
17 # name and email: C O Mitter <committer@example.com>
18 # * Type RSA, size 2048 bits, no expiration date,
19 # name and email: Eris Discordia <discord@example.net>
20 # No password given, to enable non-interactive operation.
21 # To generate new key:
22 # gpg --homedir /tmp/gpghome --gen-key
23 # To write armored exported key to keyring:
24 # gpg --homedir /tmp/gpghome --export-secret-keys \
25 # --armor 0xDEADBEEF >> lib-gpg/keyring.gpg
26 # To export ownertrust:
27 # gpg --homedir /tmp/gpghome --export-ownertrust \
28 # > lib-gpg/ownertrust
30 chmod 0700 ./gpghome &&
31 GNUPGHOME="$(pwd)/gpghome" &&
33 gpg --homedir "${GNUPGHOME}" 2>/dev/null --import \
34 "$TEST_DIRECTORY"/lib-gpg/keyring.gpg &&
35 gpg --homedir "${GNUPGHOME}" 2>/dev/null --import-ownertrust \
36 "$TEST_DIRECTORY"/lib-gpg/ownertrust &&
42 if test_have_prereq GPG &&
43 echo | gpg --homedir "${GNUPGHOME}" -b --rfc1991 >/dev/null 2>&1
45 test_set_prereq RFC1991
50 /^-----END PGP/ and $in_pgp = 0;
52 /^-----BEGIN PGP/ and $in_pgp = 1;