f8920f5973dfe15db8f2a39070cc0966adb29102
[gnus] / lisp / tests / gnustest-mml-sec.README
1 * Prerequisites
2 I tested against Emacs versions 24.3 (precompiled on my system, with Gnus
3 v5.13) and 25.0.50 (compiled from git source, with the included v5.13 and with
4 Ma Gnus v0.14).
5 In general, I recommend that you use GnuPG version 1.x for tests.  Obviously,
6 for gpgsm you need 2.x, which works for me with 2.0.x but not 2.1.x; see
7 mml-secure-run-tests-with-gpg2 in gnustest-mml-sec.el.  When running tests
8 with different versions of GnuPG make sure that proper versions of gpg-agent
9 are running (kill all prior to testing, if in doubt).
10
11
12 * Test keys
13 The subdirectory mml-gpghome contains OpenPGP and S/MIME test keyrings for
14 GnuPG’s gpg and gpgsm commands.  In addition, it contains a file
15 gpg-agent.conf where all options are commented out.  In particular, by
16 activating the debug settings one can verify whether the correct version of
17 gpg-agent is running and whether pinentry problems arise with the current
18 setup.
19
20 Most keys in the test keyrings come with empty passphrases, while the keys
21 associated with the user ID “No Expiry two UIDs” have the passphrase
22 “Passphrase”.  You can see all public keys and user IDs as follows:
23 $ gpg --homedir ./mml-gpghome --fingerprint -k --list-options show-unusable-subkeys,show-unusable-uids
24 $ gpgsm --homedir ./mml-gpghome -k
25
26
27 * Running tests
28 To run all tests:
29 $ cd <path-to-gnus/lisp/test>
30 $ emacs -Q -batch -L .. -l gnustest-mml-sec.el -f mml-secure-run-tests
31
32 However, in the above case gpgsm will ask for passphrases, even empty ones.
33 To omit those tests:
34 $ emacs -Q -batch -L .. -l gnustest-mml-sec.el -f mml-secure-run-tests-without-smime
35
36 To run all tests with epg-gpg-program set to "gpg2":
37 $ emacs -Q -batch -L .. -l gnustest-mml-sec.el -f mml-secure-run-tests-with-gpg2
38
39 To check an issue with truncation of y-or-n-p questions:
40 $ emacs -Q -L .. -l gnustest-mml-sec.el -f mml-secure-select-preferred-keys-todo
41 Then mark one or two keys and select “OK”.  The following question should be
42 truncated.  Answer “n” to avoid storage of that choice in your ~/.emacs.
43
44 To see that question entirely (outside an encryption context):
45 $ emacs -Q -L .. -l gnustest-mml-sec.el -f mml-secure-select-preferred-keys-ok