aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tdbio.h (unfollow)
Commit message (Collapse)AuthorFilesLines
2024-03-04gpg: Prepare for a new export option export-realclean.Werner Koch1-1/+2
* g10/options.h (EXPORT_REALCLEAN): New. Also re-assign other values to keep them more in sync with the corresponding import values. * g10/export.c (parse_export_options): Add "export-realclean". (do_export_stream): Call clean_all_uids directly with the options arg. * g10/import.c (import_one_real): Change for direct use of options in clean_all_uids. * g10/key-clean.c (is_trusted_key_sig): New. Stub for now. (clean_sigs_from_uid): Re-purpose self_only to a general options arg. Implement EXPORT_REALCLEAN code path. (clean_one_uid): Re-purpose self_only to a general options arg. (clean_all_uids): Ditto. * g10/keyedit.c (keyedit_menu): Use EXPORT_MINIMAL instead of a simple flag. (menu_clean): Re-purpose self_only to a general options arg. * g10/keyid.c (fpr20_from_pk): Factor code out to .... (fpr20_from_fpr): new. Remove useless case for ARRAY being NULL. * g10/tdbio.c (tdbio_search_trust_byfpr): Add arg fprlen and use fpr20_from_fpr if needed. (tdbio_search_trust_bypk): Pass 20 for the fingerprint length. -- Note that this code has no function yet. Another patch will follow to extract the trusted-keys flag from the trustdb.
2021-11-13gpg: Remove stale ultimately trusted keys from the trustdb.Werner Koch1-0/+1
* g10/tdbdump.c (export_ownertrust): Skip records marked with the option --trusted-key. (import_ownertrust): Clear the trusted-key flag. * g10/tdbio.h (struct trust_record): Add field flags. * g10/tdbio.c (tdbio_dump_record): Improve output. (tdbio_read_record, tdbio_write_record): Handle flags. * g10/trustdb.c (verify_own_keys): Clear stale trusted-keys and set the flag for new --trusted-keys. (tdb_update_ownertrust): Add arg as_trusted_key. Update callers. -- GnuPG-bug-id: 5685 Signed-off-by: Werner Koch <[email protected]>
2018-03-26gpg: Pass CTRL arg to get_trusthashrec.Werner Koch1-2/+4
* g10/tdbio.c (get_trusthashrec): Add arg CTRL. (tdbio_search_trust_byfpr): Ditto. (tdbio_search_trust_bypk): Ditto. Signed-off-by: Werner Koch <[email protected]>
2017-03-31gpg: Pass CTRL to many more functions.Werner Koch1-6/+7
-- For proper operations as a server we need to avoid global variables. Thus we need to pass the session state CTRL to most functions. Quite a lot of changes but fortunately straightforward to do. Signed-off-by: Werner Koch <[email protected]>
2017-03-07Remove -I option to common.NIIBE Yutaka1-1/+1
* dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common. * g10/Makefile.am (AM_CPPFLAGS): Ditto. * g13/Makefile.am (AM_CPPFLAGS): Ditto. * kbx/Makefile.am (AM_CPPFLAGS): Ditto. * scd/Makefile.am (AM_CPPFLAGS): Ditto. * sm/Makefile.am (AM_CPPFLAGS): Ditto. * tools/Makefile.am (AM_CPPFLAGS): Ditto. * Throughout: Follow the change. Signed-off-by: NIIBE Yutaka <[email protected]>
2016-11-05Change all http://www.gnu.org in license notices to https://Werner Koch1-1/+1
--
2015-06-04gpg: Replace -1 by GPG_ERR_NOT_FOUND in tdbio.cWerner Koch1-2/+2
* g10/tdbio.c (lookup_hashtable): Return GPG_ERR_NOT_FOUND. * g10/tdbdump.c (import_ownertrust): Test for GPG_ERR_NOT_FOUND. * g10/trustdb.c (read_trust_record): Ditto. (tdb_get_ownertrust, tdb_get_min_ownertrust): Ditto. (tdb_update_ownertrust, update_min_ownertrust): Ditto. (tdb_clear_ownertrusts, update_validity): Ditto. (tdb_cache_disabled_value): Ditto. Signed-off-by: Werner Koch <[email protected]>
2015-02-19gpg: Replace remaining uses of stdio by estream.Werner Koch1-1/+1
* g10/sign.c (sign_file): Use log_printf instead of stderr. * g10/tdbdump.c (export_ownertrust): Use estream fucntions. (import_ownertrust): Ditto. * g10/tdbio.c (tdbio_dump_record): Ditto. Change arg to estream_t. -- Reported-by: Guilhem Moulin <[email protected]> Needed for unattended key edits with --status-fd, because since 2.1 status prompts are preceded by es_fflush (in cpr.c:do_get_from_fd) not fflush(3), so the standard output may not be flushed before each prompt. (Which breaks scripts using select(2) to multiplex between the standard and status outputs.) His patch only affected print_and_check_one_sig_colon() but there are many more places where stdio and estream are mixed. This patch now replaces most of them in g10/. At some places stdio is still used, but that is local to a function and should not have side effects. Signed-off-by: Werner Koch <[email protected]>
2014-03-07gpg: Do not require a trustdb with --always-trust.Werner Koch1-1/+1
* g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE. * g10/trustdb.c (trustdb_args): Add field no_trustdb. (init_trustdb): Set that field. (revalidation_mark): Take care of a nonexistent trustdb file. (read_trust_options): Ditto. (tdb_get_ownertrust): Ditto. (tdb_get_min_ownertrust): Ditto. (tdb_update_ownertrust): Ditto. (update_min_ownertrust): Ditto. (tdb_clear_ownertrusts): Ditto. (tdb_cache_disabled_value): Ditto. (tdb_check_trustdb_stale): Ditto. (tdb_get_validity_core): Ditto. * g10/gpg.c (main): Do not create a trustdb with most commands for trust-model always. -- This slightly changes the semantics of most commands in that they won't create a trustdb if --trust-model=always is used. It just does not make sense to create a trustdb if there is no need for it. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 1a0eeaacd1bf09fe5125dbc3f56016bc20f3512e) Resolved conflicts: NEWS g10/trustdb.c: Manually apply changes due to changed function names. Note that this also includes the fix for clear_ownertrust, see GnuPG-bug-id: 1622.
2012-01-20Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)David Shaw1-1/+2
* g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level * g10/trustdb.c (check_trustdb_stale): Request a rebuild if pending_check_trustdb is true (set when we detect a trustdb parameter has changed). * g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons listing for min_cert_level not matching. * g10/tdbio.c (tdbio_update_version_record, create_version_record, tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record, tdbio_write_record): Add a byte for min_cert_level in the tdbio version record.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-2/+2
We better do this once and for all instead of cluttering all future commits with diffs of trailing white spaces. In the majority of cases blank or single lines are affected and thus this change won't disturb a git blame too much. For future commits the pre-commit scripts checks that this won't happen again.
2009-07-22Print verbose instructions in case of a corrupted trustdb.Werner Koch1-0/+1
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-1/+2
The gpg part does not yet build.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+117
'GNUPG-1-9-BRANCH'.
2003-05-24* armor.c, g10.c, kbnode.c, misc.c, pkclist.c, sign.c, build-packet.c,David Shaw1-1/+1
getkey.c, keydb.c, openfile.c, plaintext.c, status.c, gpgv.c, keygen.c, options.h, sig-check.c, tdbio.h, encode.c, mainproc.c, parse-packet.c, signal.c, textfilter.c: Edit all preprocessor instructions to remove whitespace before the '#'. This is not required by C89, but there are some compilers out there that don't like it.
2003-04-26* sign.c (do_sign): Show the hash used when making a signature in verboseDavid Shaw1-0/+1
mode. * tdbio.h, tdbio.c (tdbio_read_model): New function to return the trust model used in a given trustdb. * options.h, g10.c (main), trustdb.c (init_trustdb, check_trustdb, update_trustdb): Use tdbio_read_model to implement an "auto" trust model which is set via the trustdb.
2003-01-06* packet.h, tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record),David Shaw1-1/+3
trustdb.c (update_validity): Store temporary full & marginal counts in the trustdb. (clear_validity, get_validity_counts): Return and clear temp counts. (store_validation_status): Keep track of which keyids have been stored. (validate_one_keyblock, validate_key_list): Use per-uid copies of the full & marginal counts so they can be recalled for multiple levels. (validate_keys): Only use unused keys for each new round. (reset_unconnected_keys): Rename to reset_trust_records, and only skip specifically excluded records.
2002-12-04* tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record): Store trustDavid Shaw1-0/+2
model in the trustdb version record. (tdbio_update_version_record): New function to update version record values during a trustdb check or update. (tdbio_dump_record): Show trust model in dump. * trustdb.c (validate_keys): Call tdbio_update_version_record on success so that the correct options are stored in the trustdb. * options.h: rearrange trust models so that CLASSIC is 0 and OPENPGP is 1.
2002-10-29* keyedit.c (print_and_check_one_sig, show_key_and_fingerprint,David Shaw1-0/+1
menu_addrevoker), keylist.c (list_keyblock_print, print_fingerprint): Show "T" or the trust depth for trust signatures, and add spaces to some strings to make room for it. * packet.h, parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt, parse_signature): Parse trust signature values. * tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record): Reserve a byte for the minimum ownertrust value (for use with trust signatures).
2002-10-19This commit was manufactured by cvs2svn to create branchRepo Admin1-111/+0
'GNUPG-1-9-BRANCH'.
2002-06-29Update head to match stable 1.0David Shaw1-114/+27
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-2/+3
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-3/+3
1999-06-29See ChangeLog: Tue Jun 29 21:44:25 CEST 1999 Werner KochWerner Koch1-2/+5
1999-03-17See ChangeLog: Wed Mar 17 13:09:03 CET 1999 Werner KochWerner Koch1-1/+1
1999-03-11See ChangeLog: Thu Mar 11 16:39:46 CET 1999 Werner KochWerner Koch1-5/+7
1999-02-10See ChangeLog: Wed Feb 10 17:15:39 CET 1999 Werner KochWerner Koch1-4/+6
1998-12-23See ChangeLog: Wed Dec 23 13:34:22 CET 1998 Werner KochWerner Koch1-3/+3
1998-11-13See ChangeLog ;-). Key validation should now be fasterWerner Koch1-1/+7
1998-10-25some random changesWerner Koch1-0/+4
1998-10-21Epxerimenta support for GDBM keyings.Werner Koch1-25/+8
1998-10-18Snapshot release 0.4.2V0-4-2Werner Koch1-1/+2
1998-10-16last local commitWerner Koch1-0/+1
1998-10-12backupWerner Koch1-7/+24
1998-10-07a new releaseV0-4-1Werner Koch1-2/+6
1998-08-05intermediate check inWerner Koch1-2/+6
1998-07-30started with shm coprocessesWerner Koch1-1/+3
1998-07-29edit-key is now completeWerner Koch1-10/+4
1998-07-21changed trustdb designWerner Koch1-7/+23
1998-07-15syncWerner Koch1-3/+7
1998-07-14syncWerner Koch1-33/+37
1998-07-09fixed severe exploitV0-3-2Werner Koch1-0/+150