aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tofu.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* gpg: Streamline use of error messages in tofu.cWerner Koch2016-01-191-123/+134
| | | | | | | | * g10/tofu.c: Make use of print_further_info to reduce the number of different error messages to be translated. Also streamline some messages. Signed-off-by: Werner Koch <[email protected]>
* g10: Improve strings printed by tofu.c.Werner Koch2016-01-181-128/+132
| | | | | | | | | | | | | | | | | | | * g10/tofu.c: Include ttyio.h. Change many strings to help translating. Make use of ngettext wehere needed. (CONTROL_L): New. (TIME_AGO_UNIT_SMALL_NAME): Remove this and all similar *_NAME macros. (time_ago_unit): Remove. (get_trust): Use tty_prints and cpr_get only for the actual prompt. Add Ctrl-L hack. (show_statistics): Use two English strings for singular and plural. * po/POTFILES.in: Add tofu.c. -- These changes are required for proper translation. More to changes may be needed, though. Signed-off-by: Werner Koch <[email protected]>
* gpg: Avoid warnings about possible NULL deref.Werner Koch2016-01-071-0/+6
| | | | | | | | | | | | | * g10/getkey.c (cache_public_key): Protect deref of CE which actually can't happen. * g10/keygen.c (quickgen_set_para): s/sprintf/snprintf/. * g10/tofu.c (end_transaction, rollback_transaction): Allow NULL for DB. * g10/trustdb.c (update_min_ownertrust): Remove useless clearling of ERR. -- Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve documentation.Neal H. Walfield2015-12-021-2/+1
| | | | | | | * g10/tofu.c (initdb): Improve documentation. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Fix type mismatch resulting in a buffer overflow.Neal H. Walfield2015-12-021-1/+4
| | | | | | | | | | | * g10/tofu.c (record_binding): Change policy_old's type from an enum tofu_policy to a long: this variable is passed by reference and a long is expected. -- Signed-off-by: Neal H. Walfield <[email protected]> Reported-by: Justus Winter <[email protected]> Fixes-commit: f77913e
* gpg: Reflow long texts.Neal H. Walfield2015-11-231-4/+12
| | | | | | | | | | | * common/stringhelp.c (format_text): New function. * common/t-stringhelp.c (stresc): New function. (test_format_text): New function. Test format_text. * g10/tofu.c (get_trust): Use format_text to reflow long texts. (show_statistics): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]>
* Fix typos found using codespell.Justus Winter2015-11-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/cache.c: Fix typos. * agent/call-pinentry.c: Likewise. * agent/call-scd.c: Likewise. * agent/command-ssh.c: Likewise. * agent/command.c: Likewise. * agent/divert-scd.c: Likewise. * agent/findkey.c: Likewise. * agent/gpg-agent.c: Likewise. * agent/w32main.c: Likewise. * common/argparse.c: Likewise. * common/audit.c: Likewise. * common/audit.h: Likewise. * common/convert.c: Likewise. * common/dotlock.c: Likewise. * common/exechelp-posix.c: Likewise. * common/exechelp-w32.c: Likewise. * common/exechelp-w32ce.c: Likewise. * common/exechelp.h: Likewise. * common/helpfile.c: Likewise. * common/i18n.h: Likewise. * common/iobuf.c: Likewise. * common/iobuf.h: Likewise. * common/localename.c: Likewise. * common/logging.c: Likewise. * common/openpgp-oid.c: Likewise. * common/session-env.c: Likewise. * common/sexputil.c: Likewise. * common/sysutils.c: Likewise. * common/t-sexputil.c: Likewise. * common/ttyio.c: Likewise. * common/util.h: Likewise. * dirmngr/cdblib.c: Likewise. * dirmngr/certcache.c: Likewise. * dirmngr/crlcache.c: Likewise. * dirmngr/dirmngr-client.c: Likewise. * dirmngr/dirmngr.c: Likewise. * dirmngr/dirmngr_ldap.c: Likewise. * dirmngr/dns-stuff.c: Likewise. * dirmngr/http.c: Likewise. * dirmngr/ks-engine-hkp.c: Likewise. * dirmngr/ks-engine-ldap.c: Likewise. * dirmngr/ldap-wrapper.c: Likewise. * dirmngr/ldap.c: Likewise. * dirmngr/misc.c: Likewise. * dirmngr/ocsp.c: Likewise. * dirmngr/validate.c: Likewise. * g10/encrypt.c: Likewise. * g10/getkey.c: Likewise. * g10/gpg.c: Likewise. * g10/gpgv.c: Likewise. * g10/import.c: Likewise. * g10/keydb.c: Likewise. * g10/keydb.h: Likewise. * g10/keygen.c: Likewise. * g10/keyid.c: Likewise. * g10/keylist.c: Likewise. * g10/keyring.c: Likewise. * g10/mainproc.c: Likewise. * g10/misc.c: Likewise. * g10/options.h: Likewise. * g10/packet.h: Likewise. * g10/parse-packet.c: Likewise. * g10/pkclist.c: Likewise. * g10/pkglue.c: Likewise. * g10/plaintext.c: Likewise. * g10/server.c: Likewise. * g10/sig-check.c: Likewise. * g10/sqlite.c: Likewise. * g10/tdbio.c: Likewise. * g10/test-stubs.c: Likewise. * g10/tofu.c: Likewise. * g10/trust.c: Likewise. * g10/trustdb.c: Likewise. * g13/create.c: Likewise. * g13/mountinfo.c: Likewise. * kbx/keybox-blob.c: Likewise. * kbx/keybox-file.c: Likewise. * kbx/keybox-init.c: Likewise. * kbx/keybox-search-desc.h: Likewise. * kbx/keybox-search.c: Likewise. * kbx/keybox-update.c: Likewise. * scd/apdu.c: Likewise. * scd/app-openpgp.c: Likewise. * scd/app-p15.c: Likewise. * scd/app.c: Likewise. * scd/ccid-driver.c: Likewise. * scd/command.c: Likewise. * scd/iso7816.c: Likewise. * sm/base64.c: Likewise. * sm/call-agent.c: Likewise. * sm/call-dirmngr.c: Likewise. * sm/certchain.c: Likewise. * sm/gpgsm.c: Likewise. * sm/import.c: Likewise. * sm/keydb.c: Likewise. * sm/minip12.c: Likewise. * sm/qualified.c: Likewise. * sm/server.c: Likewise. * tools/gpg-check-pattern.c: Likewise. * tools/gpgconf-comp.c: Likewise. * tools/gpgkey2ssh.c: Likewise. * tools/gpgparsemail.c: Likewise. * tools/gpgtar.c: Likewise. * tools/rfc822parse.c: Likewise. * tools/symcryptrun.c: Likewise. Signed-off-by: Justus Winter <[email protected]>
* gpg: Use only one fingerprint formatting function.Werner Koch2015-11-141-50/+11
| | | | | | | | | | | | * g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): New. * g10/keyid.c (hexfingerprint): Add optional args BUFFER and BUFLEN. Change all callers. (format_hexfingerprint): New. * g10/keylist.c (print_fingerprint): Change to use hexfingerprint. * g10/tofu.c (fingerprint_format): Remove. Replace calls by format_hexfingerprint. Signed-off-by: Werner Koch <[email protected]>
* gpg: Simplify the tofu interface by using the public key packet.Werner Koch2015-11-131-28/+9
| | | | | | | | | | | | | | | | * g10/tofu.c (fingerprint_str): Remove. (tofu_register): Take a public key instead of a fingerprint as arg. Use hexfingerprint() to get a fpr from the PK. (tofu_get_validity): Ditto. (tofu_set_policy, tofu_get_policy): Simplify by using hexfingerprint. * g10/trustdb.c (tdb_get_validity_core): Pass the primary key PK to instead of the fingerprint to the tofu functions. -- This change has the advantage that we are not bound to a specific fingerprint length and will thus helps us to implement rfc4880bis. Signed-off-by: Werner Koch <[email protected]>
* gpg: Make trusted-key override for Tofu robust against swapped tofu.db.Werner Koch2015-11-131-19/+31
| | | | | | | | | | | | | | | * g10/tofu.c (get_trust): For the UTK check lookup the key by fingerprint. -- Extracting the keyid form the fingerprint is not a good idea because that only works for v4 keys. It is also better to first read the key and then extract the keyid from the actual available key. The entire trusted-key stuff should be reworked to make use of fingerprints. Signed-off-by: Werner Koch <[email protected]>
* gpg: Default to the flat TOFU DB format.Neal H. Walfield2015-11-101-2/+2
| | | | | | | | * g10/tofu.c (opendbs): If the TOFU DB format is set to auto and there is no TOFU DB, default to the flat format. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Change out of core error message.Werner Koch2015-11-031-19/+28
| | | | | | | | | | | | | | | * g10/tofu.c (fingerprint_str): Die with the error code returned by the failed function. (time_ago_str): Ditto. Do not make a comma translatable. (fingerprint_format): Use "%zu" for a size_t. -- Also wrapped some long strings. In general we should not use log_fatal or use xmalloc functions but properly return an error code and use xtrymalloc like functions. Signed-off-by: Werner Koch <[email protected]>
* gpg: Also show when the most recently signed message was observed.Neal H. Walfield2015-11-031-1/+23
| | | | | | | | | * g10/tofu.c (show_statistics): Also show when the most recently signed message was observed. -- Signed-off-by: Neal H. Walfield <[email protected]>. Suggested-by: MFPA <[email protected]>
* gpg: Split a utility function out of a large function.Neal H. Walfield2015-11-031-134/+157
| | | | | | | | | * g10/tofu.c (show_statistics): Break the time delta to string code into... (time_ago_str): ... this new function. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Fix message formatting.Neal H. Walfield2015-11-031-2/+2
| | | | | | | * g10/tofu.c (get_trust): Fix message formatting. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Don't store formatting fingerprints in the TOFU DB.Neal H. Walfield2015-11-031-77/+100
| | | | | | | | | | | | | | | | | * g10/tofu.c (fingerprint_pp): Split this function into... (fingerprint_str): ... this function... (fingerprint_format): ... and this function. (record_binding): Store the unformatted fingerprint in the DB. Only use the formatting fingerprint when displaying a message to the user. (get_trust): Likewise. (show_statistics): Likewise. (tofu_register): Likewise. (tofu_get_validity): Likewise. (tofu_set_policy): Likewise. (tofu_get_policy): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Change sqlite3_stepx to pass the sqlite3_stmt * to the callback.Neal H. Walfield2015-10-291-6/+31
| | | | | | | | | | | * g10/sqlite.h (enum sqlite_arg_type): Add SQLITE_ARG_BLOB. (sqlite3_stepx_callback): New declaration. (sqlite3_stepx): Change the callback's type to sqlite3_stepx_callback, which passes an additional parameter, the sqlite3_stmt *. Update users. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Move sqlite helper functions into their own file.Neal H. Walfield2015-10-291-223/+1
| | | | | | | | | | | | | | * g10/tofu.c (sqlite3_exec_printf): Move from here... * g10/sqlite.c (sqlite3_exec_printf): ... to this new file. Don't mark as static. * g10/tofu.c (sqlite3_stepx): Move from here... * g10/sqlite.c (sqlite3_stepx): ... to this new file. Don't mark as static. * g10/tofu.c (enum sqlite_arg_type): Move from here... * g10/sqlite.h (enum sqlite_arg_type): ... to this new file. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Make sure we only have a single SQL statement.Neal H. Walfield2015-10-261-1/+16
| | | | | | | | * g10/tofu.c (sqlite3_stepx): Make sure SQL only contains a single SQL statement. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: When the TOFU DB is in batch mode, periodically drop the locks.Neal H. Walfield2015-10-261-0/+30
| | | | | | | | | | | | * g10/tofu.c: Include <sched.h>. (batch_update_started): New variable. (begin_transaction): If we've been in batch mode for a while, then commit any extant batch transactions. (tofu_begin_batch_update): If we are not in batch mode, initialize batch_update_started. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Provide an interface to patch TOFU updates.Neal H. Walfield2015-10-231-53/+209
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/tofu.c (struct db): Rename begin_transaction to savepoint_batch. Rename end_transaction to savepoint_batch_commit. Update users. Remove field rollback. Add fields savepoint_inner and savepoint_inner_commit. Add field batch_update. (dump_cache): New function. (batch_update): New variable. (begin_transaction). New function. (end_transaction): New function. (rollback_transaction): New function. (tofu_begin_batch_update): New function. (tofu_end_batch_update): New function. (closedb): End any pending batch transaction. (closedbs): Assert that none of the DBs have a started batch transaction if we not in batch mode. (record_binding): Use the begin_transaction, end_transaction and rollback_transaction functions instead of including the SQL inline. Also start a batch mode transaction if we are using the flat format. (tofu_register): Use the begin_transaction, end_transaction and rollback_transaction functions instead of including the SQL inline. * g10/gpgv.c (tofu_begin_batch_update): New function. (tofu_end_batch_update): New function. * g10/test-stubs.c (tofu_begin_batch_update): New function. (tofu_end_batch_update): New function. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Cache prepared SQL queries and open DB connections.Neal H. Walfield2015-10-231-211/+518
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/tofu.c: Include <stdarg.h>. (prepares_saved) [DEBUG_TOFU_CACHE]: New variable. (queries) [DEBUG_TOFU_CACHE]: New variable. (struct db): Add fields prevp, begin_transaction, end_transaction, rollback, record_binding_get_old_policy, record_binding_update, record_binding_update2, get_policy_select_policy_and_conflict, get_trust_bindings_with_this_email, get_trust_gather_other_user_ids, get_trust_gather_other_keys, register_already_seen, and register_insert. [DEBUG_TOFU_CACHE]: Add field hits. (STRINGIFY): New macro. (STRINGIFY2): New macro. (enum sqlite_arg_type): New enum. (sqlite3_stepx): New function. (combined_db): Remove variable. (opendb): Don't cache the combined db. (struct dbs): New struct. Update users to use this as the head of the local DB list rather than overloading struct db. (unlink_db): New function. (link_db): New function. (db_cache): New variable. (db_cache_count): New variable. (DB_CACHE_ENTRIES): Define. (getdb): If the dbs specific cache doesn't include the DB, look at DB_CACHE. Only if that also doesn't include the DB open the corresponding DB. (closedb): New function. (opendbs): Don't open the combined DB. Just return an initialized struct dbs. (closedbs): Don't close the dbs specific dbs. Attach them to the front of DB_CACHE. If DB_CACHE contains more than DB_CACHE_ENTRIES, close enough dbs from the end of the DB_CACHE list such that DB_CACHE only contains DB_CACHE_ENTRIES. Don't directly close the dbs, instead use the new closedb function. [DEBUG_TOFU_CACHE]: Print out some statistics. (record_binding): Use sqlite3_stepx instead of sqlite3_exec or sqlite3_exec_printf. (get_policy): Likewise. (get_trust): Likewise. (tofu_register): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Return the DBs meta-handle rather than the sqlite3 handle.Neal H. Walfield2015-10-231-28/+28
| | | | | | | | * g10/tofu.c (getdb): Return a struct db * instead of an sqlite *. Update users. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: If a key is ultimate trusted, return that in the tofu model.Neal H. Walfield2015-10-211-2/+54
| | | | | | | | | | | | * g10/tofu.c (get_trust): If the policy is auto or none, check if the key is ultimately trusted. If so, return that. (tofu_register): If the key is ultimately trusted, don't show any statistics. (tofu_get_validity): Likewise. -- Signed-off-by: Neal H. Walfield <[email protected]> Suggested-by: Andre Heinecke <[email protected]>
* gpg: Make the tofu DB check and initialization atomic.Neal H. Walfield2015-10-211-14/+16
| | | | | | | | | * g10/tofu.c (initdb): Make the version check and the database initialization atomic. -- Signed-off-by: Neal H. Walfield <[email protected]> Co-authored-by: Andre Heinecke <[email protected]>
* gpg: Don't die immediately if the TOFU DB is locked.Neal H. Walfield2015-10-201-0/+4
| | | | | | | * g10/tofu.c (opendb): Don't die immediately if the DB is locked. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Improve output.Neal H. Walfield2015-10-201-4/+4
| | | | | | | | * g10/tofu.c (get_trust): Also show the binding when indicating a conflict occurred. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Synchronize translation template.Neal H. Walfield2015-10-201-1/+1
| | | | | | | * g10/tofu.c (show_statistics): Synchronize translation template. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: When showing conflicts, also show bindings with no recorded sigs.Neal H. Walfield2015-10-201-20/+34
| | | | | | | | | | * g10/tofu.c (signature_stats_collect_cb): If the time_ago column is NULL, then both time_ago and count should be 0. (get_trust): Reverse the direction of the join so that we also get statistics about bindings without any signatures. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Improve text.Neal H. Walfield2015-10-201-7/+9
| | | | | | | | * g10/tofu.c (show_statistics): Improve text. -- Signed-off-by: Neal H. Walfield <[email protected]> Suggested-by: Malte <[email protected]>
* gpg: Use the right variable to display the information.Neal H. Walfield2015-10-201-3/+4
| | | | | | | | | * g10/tofu.c (get_trust): Use the right variable to display the conflicting key. -- Signed-off-by: Neal H. Walfield <[email protected]> Reported-by: Andre Heinecke <[email protected]>
* gpg: Make failing to create a directory a soft error.Neal H. Walfield2015-10-201-1/+1
| | | | | | | | * g10/tofu.c (getdb): Don't exit if we can't create the directory. Just return an error. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Fix formatting.Neal H. Walfield2015-10-191-6/+6
| | | | | | | * g10/tofu.c (get_trust): Fix formatting. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Don't forget to free some memory.Neal H. Walfield2015-10-191-0/+1
| | | | | | | * g10/tofu.c (tofu_register): Free SIG_DIGEST before returning. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: If a conflict occurs in batch mode, record that.Neal H. Walfield2015-10-191-6/+20
| | | | | | | | | * g10/tofu.c (get_trust): If a conflict occurs when MAY_ASK is false, set conflict to the key. When prompting the user, don't show the conflicting key if the conflicting key is the current key. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Silence two more warnings.Werner Koch2015-10-181-2/+2
| | | | | | | | * g10/trustdb.c (tdb_get_validity_core): Silence a warning. * g10/tofu.c (tofu_register): Move SIG_DIGEST computation to the top so that it is not uninitialized in case of an early error. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix harmless compiler warnings.Werner Koch2015-10-181-66/+64
| | | | | | | | | | | | | | * g10/tofu.h (_tofu_GET_POLICY_ERROR): New. This avoids warnings about undefined enum values in a switch. * g10/trustdb.h (_tofu_GET_TRUST_ERROR): New. * g10/tofu.c (TIME_AGO_FUTURE_IGNORE): Move to the top. (opendbs): Avoid compiler warning (use braces). (GET_POLICY_ERROR): Replace define by enum _tofu_GET_POLICY_ERROR. (get_policy): Remove assert. (GET_TRUST_ERROR): Replace by _tofu_GET_TRUST_ERROR macro. (show_statistics): Undef MIN_SECS et al. after use. Signed-off-by: Werner Koch <[email protected]>
* g10: Fix assert.Neal H. Walfield2015-10-181-1/+1
| | | | | | | * g10/tofu.c (get_trust): Fix assert. -- Signed-off-by: Neal H. Walfield <[email protected]>.
* g10: Add TOFU support.Neal H. Walfield2015-10-181-0/+2472
* 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 <[email protected]>.