1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-11-01 20:18:44 +01:00
gnupg/tests/openpgp
Neal H. Walfield f77913e0ff g10: Add TOFU support.
* configure.ac: Check for sqlite3.
(SQLITE3_CFLAGS): AC_SUBST it.
(SQLITE3_LIBS): Likewise.
* g10/Makefile.am (AM_CFLAGS): Add $(SQLITE3_CFLAGS).
(gpg2_SOURCES): Add tofu.h and tofu.c.
(gpg2_LDADD): Add $(SQLITE3_LIBS).
* g10/tofu.c: New file.
* g10/tofu.h: New file.
* g10/options.h (trust_model): Define TM_TOFU and TM_TOFU_PGP.
(tofu_db_format): Define.
* g10/packet.h (PKT_signature): Add fields digest and digest_len.
* g10/gpg.c: Include "tofu.h".
(cmd_and_opt_values): Declare aTOFUPolicy, oTOFUDefaultPolicy,
oTOFUDBFormat.
(opts): Add them.
(parse_trust_model): Recognize the tofu and tofu+pgp trust models.
(parse_tofu_policy): New function.
(parse_tofu_db_format): New function.
(main): Initialize opt.tofu_default_policy and opt.tofu_db_format.
Handle aTOFUPolicy, oTOFUDefaultPolicy and oTOFUDBFormat.
* g10/mainproc.c (do_check_sig): If the signature is good, copy the
hash to SIG->DIGEST and set SIG->DIGEST_LEN appropriately.
* g10/trustdb.h (get_validity): Add arguments sig and may_ask.  Update
callers.
(tdb_get_validity_core): Add arguments sig and may_ask.  Update
callers.
* g10/trust.c (get_validity) Add arguments sig and may_ask.  Pass them
to tdb_get_validity_core.
* g10/trustdb.c: Include "tofu.h".
(trust_model_string): Handle TM_TOFU and TM_TOFU_PGP.
(tdb_get_validity_core): Add arguments sig and may_ask.  If
OPT.TRUST_MODEL is TM_TOFU or TM_TOFU_PGP, compute the TOFU trust
level.  Combine it with the computed PGP trust level, if appropriate.
* g10/keyedit.c: Include "tofu.h".
(show_key_with_all_names_colon): If the trust mode is tofu or
tofu+pgp, then show the trust policy.
* g10/keylist.c: Include "tofu.h".
(public_key_list): Also show the PGP stats if the trust model is
TM_TOFU_PGP.
(list_keyblock_colon): If the trust mode is tofu or
tofu+pgp, then show the trust policy.
* g10/pkclist.c: Include "tofu.h".
* g10/gpgv.c (get_validity): Add arguments sig and may_ask.
(enum tofu_policy): Define.
(tofu_get_policy): New stub.
(tofu_policy_str): Likewise.
* g10/test-stubs.c (get_validity): Add arguments sig and may_ask.
(enum tofu_policy): Define.
(tofu_get_policy): New stub.
(tofu_policy_str): Likewise.
* doc/DETAILS: Describe the TOFU Policy field.
* doc/gpg.texi: Document --tofu-set-policy, --trust-model=tofu,
--trust-model=tofu+pgp, --tofu-default-policy and --tofu-db-format.
* tests/openpgp/Makefile.am (TESTS): Add tofu.test.
(TEST_FILES): Add tofu-keys.asc, tofu-keys-secret.asc,
tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and tofu-EE37CF96-1.txt.
(CLEANFILES): Add tofu.db.
(clean-local): Add tofu.d.
* tests/openpgp/tofu.test: New file.
* tests/openpgp/tofu-2183839A-1.txt: New file.
* tests/openpgp/tofu-BC15C85A-1.txt: New file.
* tests/openpgp/tofu-EE37CF96-1.txt: New file.
* tests/openpgp/tofu-keys.asc: New file.
* tests/openpgp/tofu-keys-secret.asc: New file.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>.
2015-10-18 18:45:40 +02:00
..
privkeys tests: More OpenPGP test keys 2015-05-16 12:20:02 +02:00
samplekeys tests: Two new OpenPGP test keys from E2E. 2015-10-05 10:58:00 +02:00
4gb-packet.asc common: Don't incorrectly reject 4 GB - 1 sized packets. 2015-08-21 14:21:13 +02:00
4gb-packet.test tests: Silence the 5gb-packet test. 2015-09-10 18:12:22 +02:00
armdetach.test Ported changes from 1.4. 2007-10-25 09:06:21 +00:00
armdetachm.test Ported changes from 1.4. 2007-10-25 09:06:21 +00:00
armencrypt.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
armencryptp.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
armor.test Add unfinished gpgtar. 2010-06-07 13:33:02 +00:00
armsignencrypt.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
armsigs.test Ported changes from 1.4. 2007-10-25 09:06:21 +00:00
bug537-test.data.asc Fix for bug 537 2006-10-02 11:54:35 +00:00
bug894-test.asc Fix a bug in the ambigious name detection. 2008-03-20 15:31:43 +00:00
bug1223-bogus.asc Fix for bug 1223 2010-05-07 13:13:56 +00:00
bug1223-good.asc Fix for bug 1223 2010-05-07 13:13:56 +00:00
ChangeLog-2011 Generate the ChangeLog from commit logs. 2011-12-01 11:09:02 +01:00
clearsig.test gpg: Remove options --pgp2 and --rfc1991. 2014-08-14 11:03:55 +02:00
conventional-mdc.test gpg: Try hard to use MDC also for sign+symenc. 2015-10-12 09:31:44 +02:00
conventional.test tests: Speed up conventional encryption tests for gpg. 2014-10-13 11:45:34 +02:00
decrypt-dsa.test All tests work are again working 2010-10-14 16:34:31 +00:00
decrypt.test All tests work are again working 2010-10-14 16:34:31 +00:00
defs.inc tests: Speed up the genkey1024.test by using not so strong random. 2014-10-30 09:55:51 +01:00
detach.test Ported changes from 1.4. 2007-10-25 09:06:21 +00:00
detachm.test Ported changes from 1.4. 2007-10-25 09:06:21 +00:00
ecc.test tests: Re-enable OpenPGP ecc test. 2014-08-18 12:55:54 +02:00
encrypt-dsa.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
encrypt.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
encryptp.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
finish.test All tests work are again working 2010-10-14 16:34:31 +00:00
genkey1024.test All tests work are again working 2010-10-14 16:34:31 +00:00
gpg-agent.conf.tmpl Remove debug options 2010-10-14 16:36:47 +00:00
gpg.conf.tmpl gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
import.test gpg: Remove extra RSA import status line. 2014-10-13 15:08:58 +02:00
Makefile.am g10: Add TOFU support. 2015-10-18 18:45:40 +02:00
mds.test tests: Handle disabled algorithms. 2014-02-10 10:41:48 +01:00
mkdemodirs All tests work are again working 2010-10-14 16:34:31 +00:00
multisig.test All tests work are again working 2010-10-14 16:34:31 +00:00
pgp263-test.pub.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
pgp263-test.sec.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
pinentry.sh Remove debug code from regression test pinentry 2011-02-10 20:54:37 +01:00
plain-1-pgp.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
plain-1.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
plain-1o.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
plain-2.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
plain-2o.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
plain-3.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
plain-3o.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
pubdemo.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
pubring.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
pubring.pkr.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
seat.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
secdemo.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
secring.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
secring.skr.asc Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
signdemokey Migrated more stuff to doc/ 2006-08-21 20:20:23 +00:00
signencrypt-dsa.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
signencrypt.test gpg: Allow building without any trust model support. 2014-02-10 17:46:40 +01:00
sigs-dsa.test tests: Handle disabled algorithms. 2014-02-10 10:41:48 +01:00
sigs.test Do not mix test result with progress lines. 2012-04-05 20:36:04 +02:00
tofu-2183839A-1.txt g10: Add TOFU support. 2015-10-18 18:45:40 +02:00
tofu-BC15C85A-1.txt g10: Add TOFU support. 2015-10-18 18:45:40 +02:00
tofu-EE37CF96-1.txt g10: Add TOFU support. 2015-10-18 18:45:40 +02:00
tofu-keys-secret.asc g10: Add TOFU support. 2015-10-18 18:45:40 +02:00
tofu-keys.asc g10: Add TOFU support. 2015-10-18 18:45:40 +02:00
tofu.test g10: Add TOFU support. 2015-10-18 18:45:40 +02:00
verify.test Ported changes from 1.4. 2007-10-25 09:06:21 +00:00
version.test tests: Speed up the genkey1024.test by using not so strong random. 2014-10-30 09:55:51 +01:00