aboutsummaryrefslogtreecommitdiffstats
path: root/g10/tdbio.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-06-05Change all quotes in strings and comments to the new GNU standard.Werner Koch1-10/+10
The asymmetric quotes used by GNU in the past (`...') don't render nicely on modern systems. We now use two \x27 characters ('...'). The proper solution would be to use the correct Unicode symmetric quotes here. However this has the disadvantage that the system requires Unicode support. We don't want that today. If Unicode is available a generated po file can be used to output proper quotes. A simple sed script like the one used for en@quote is sufficient to change them. The changes have been done by applying sed -i "s/\`\([^'\`]*\)'/'\1'/g" to most files and fixing obvious problems by hand. The msgid strings in the po files were fixed with a similar command.
2012-01-20Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)David Shaw1-6/+12
* 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-09-28Add a flag parameter to dotlock_create.Werner Koch1-3/+3
This allows us to extend this function in the future.
2011-09-23Renamed the lock functions.Werner Koch1-12/+12
Also cleaned up the dotlock code for easier readability.
2011-07-29Do not print read-only trustdb warning with --quiet.Werner Koch1-1/+1
This is only a warning and gpg would anyway print an error message if it tries to write to the trustdb.
2011-02-04Nuked almost all trailing white space.post-nuke-of-trailing-wsWerner Koch1-4/+3
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.
2010-12-09Change last change. Does now work.Werner Koch1-3/+18
2010-12-09Change dirmngr timer under W32CE.Werner Koch1-0/+17
Fix trustdb open problem under W32CE.
2010-04-01Use gpg_err_set_errno to assign values to ERRNO.Werner Koch1-1/+1
2009-12-15Fix bug#1162: error creating home directoryWerner Koch1-1/+2
2009-09-23s/DOTLOCK/dotlock_t/.Werner Koch1-1/+1
Add some stuff for g13.
2009-07-22Print verbose instructions in case of a corrupted trustdb.Werner Koch1-4/+3
2008-08-01Fix !EROFS bug.Werner Koch1-1/+2
Doc updates
2008-03-26Last minute cleanups.gnupg-2.0.9Werner Koch1-6/+6
2008-01-30W32 fix for trustdb creation.Werner Koch1-3/+14
2007-11-19Started to implement the audit log feature.Werner Koch1-1/+1
Pass PINENTRY_USER_DATA and XAUTHORITY to Pinentry. Improved support for the quality bar. Minor internal restructuring. Translation fixes.
2007-07-04Changed to GPLv3.Werner Koch1-4/+2
Removed intl/.
2006-09-14Take advantage of newer gpg-error features.Werner Koch1-6/+6
2006-04-19Continued with merging.Werner Koch1-3/+0
Still does not build.
2006-04-19Merged with gpg 1.4.3 code. Werner Koch1-229/+96
The gpg part does not yet build.
2005-07-27Converted all m_free to xfree etc.Werner Koch1-9/+9
2005-07-18* tdbio.c (open_db): Check for EROFS. Suggested by Bryce Nichols.Werner Koch1-1/+5
* ttyio.c (do_get): Move printing of the prompt after disabling echo. Suggested by Scott Worley.
2005-05-31Updated FSF street address and preparations for a release candidate.Werner Koch1-1/+2
2004-10-14* misc.c (is_secured_filename): New.Werner Koch1-10/+15
* keydb.c (maybe_create_keyring) * tdbio.c (tdbio_set_dbname) * plaintext.c (handle_plaintext) * openfile.c (copy_options_file, open_outfile) * exec.c (exec_write) * keygen.c (do_generate_keypair, gen_card_key_with_backup) * sign.c (sign_file, clearsign_file) * keyring.c (create_tmp_file, do_copy): Check for secured files before creating them. * keygen.c (print_status_key_created): s/unsigned char/byte/ due to a strange typedef for RISC OS. Noted by Stefan.
2004-10-13Added SELInux hacks and did some cleanups.Werner Koch1-0/+1
2003-12-30* misc.c (pull_in_libs): Dead code. Removed.David Shaw1-12/+8
* sig-check.c (check_revocation_keys): Comments. * getkey.c (merge_selfsigs_main): Don't bother to check designated revoker sigs if the key is already revoked. * packet.h, getkey.c (merge_selfsigs_main): New "maybe_revoked" flag on PKs. It is set when there is a revocation signature from a valid revocation key, but the revocation key is not present to verify the signature. * pkclist.c (check_signatures_trust): Use it here to give a warning when showing key trust. * compress-bz2.c: Include stdio.h. Solaris 9 has a very old bzip2 library and we can at least guarantee that it won't fail because of the lack of stdio.h. * tdbio.c: Fixed format string bugs related to the use of DB_NAME. Reported by Florian Weimer.
2003-12-17* card-util.c (print_name): Fixed bad format string usage.Werner Koch1-14/+17
(print_isoname): Ditto. * trustdb.c (check_regexp): s/exp/expr/. * keyedit.c (trustsig_prompt): Removed a "> 255" term; it is always false due to the data type. * passphrase.c (agent_get_passphrase): Use xasprintf and avoid non-literal format strings. * tdbio.c (upd_hashtable, drop_from_hashtable, lookup_hashtable): Fixed log_error format string bugs. Kudos to the now working gcc-3.3 -Wformat-nonliteral and Florian Weimer's investigations in gnupg 1.2.3.
2003-09-23Merged most of David Shaw's changes in 1.3 since 2003-06-03.Werner Koch1-0/+5
2003-07-10* parse-packet.c (parse_signature): No need to reserve 8 bytes for theDavid Shaw1-2/+4
unhashed signature cache any longer. * misc.c (pct_expando): Add two new expandos - signer's fingerprint (%g), and signer's primary fingerprint (%p). * Makefile.am: Include W32LIBS where appropriate. * g10.c (main): Add --rfc2440 alias for --openpgp since in a few months, they won't be the same thing. * keyserver.c (parse_keyserver_uri): Accept "http" as an alias for "hkp", since it is occasionally written that way. (keyserver_spawn): Use ascii_isspace to avoid locale issues. * keygen.c (ask_user_id): Make --allow-freeform-uid apply to the email field as well as the name field, and allow mixing fields when it is set. * options.skel: Use subkeys.pgp.net as the default keyserver. * trustdb.c (validate_one_keyblock): Certifications on revoked or expired uids do not count in the web of trust. * signal.c (init_one_signal, pause_on_sigusr, do_block): Only use sigprocmask() if we have sigset_t, and only use sigaction() if we have struct sigaction. This is for Forte c89 on Solaris which seems to define only the function call half of the two pairs by default. (pause_on_sigusr): Typo. (do_block): If we can't use sigprocmask() and sigset_t, try to get the number of signals from NSIG as well as MAXSIG, and if we can't, fail with an explanation. * signal.c, tdbio.c: Comment out the transaction code. It was not used in this version, and was causing some build problems on quasi-posix platforms (Solaris and Forte c89). * keylist.c (list_keyblock_colon): Don't include validity values when listing secret keys since they can be incorrect and/or misleading. This is a temporary kludge, and will be handled properly in 1.9/2.0. * mainproc.c (check_sig_and_print): Only show the "key available from" preferred keyserver line if the key is not currently present. * keyedit.c (sign_uids): Do not sign expired uids without --expert (same behavior as revoked uids). Do not allow signing a user ID without a self-signature. --expert overrides. Add additional prompt to the signature level question. (menu_expire): When changing expiration dates, don't replace selfsigs on revoked uids since this would effectively unrevoke them. There is also no point in replacing expired selfsigs. This is bug #181 * g10.c (add_notation_data): Make sure that only ascii is passed to iscntrl. Noted by Christian Biere. * getkey.c (classify_user_id2): Replaced isspace by spacep * keygen.c (ask_user_id): Ditto. (get_parameter_algo): Ditto. * keyedit.c (keyedit_menu): Ditto. * tdbdump.c (import_ownertrust): Ditto. s/isxdigit/hexdigitp/. * revoke.c (ask_revocation_reason): * keyserver.c (keyserver_spawn): Dito.
2003-06-27Key generation and signing using the OpenPGP card does rudimentary work.Werner Koch1-2/+3
2003-06-18Finished the bulk of changes for gnupg 1.9. This included switchingWerner Koch1-64/+67
to libgcrypt functions, using shared error codes from libgpg-error, replacing the old functions we used to have in ../util by those in ../jnlib and ../common, renaming the malloc functions and a couple of types. Note, that not all changes are listed below becuause they are too similar and done at far too many places. As of today the code builds using the current libgcrypt from CVS but it is very unlikely that it actually works.
2003-06-05This commit was manufactured by cvs2svn to create branchRepo Admin1-0/+1624
'GNUPG-1-9-BRANCH'.
2003-05-01* tdbio.c (create_version_record): Only create new trustdbs withDavid Shaw1-1/+4
TM_CLASSIC or TM_PGP. * trustdb.h, trustdb.c (trust_string, get_ownertrust_string, get_validity_string, ask_ownertrust, validate_keys), pkclist.c (do_edit_ownertrust): Rename trust_string to trust_value_to_string for naming consistency. * trustdb.h, trustdb.c (string_to_trust_value): New function to translate a string to a trust value. * g10.c (main): Use string_to_trust_value here for --force-ownertrust. * options.h, g10.c (main), trustdb.c (trust_model_string, init_trustdb, check_trustdb, update_trustdb, get_validity, validate_one_keyblock): An "OpenPGP" trust model is misleading since there is no official OpenPGP trust model. Use "PGP" instead.
2003-04-26* sign.c (do_sign): Show the hash used when making a signature in verboseDavid Shaw1-0/+12
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-12* tdbio.c (tdbio_set_dbname): Fix assertion failure withDavid Shaw1-3/+12
non-fully-qualified trustdb names.
2003-01-06* packet.h, tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record),David Shaw1-0/+4
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-11* tdbio.c (tdbio_read_record, tdbio_write_record): Compact theDavid Shaw1-4/+4
RECTYPE_TRUST records a bit. * g10.c (main): Comment out --list-trust-path until it can be implemented. * import.c (import_one): Warn when importing an Elgamal primary that this may take some time (to verify self-sigs). (chk_self_sigs): Try and cache all self-sigs so the keyblock is written to the keyring with a good rich cache. * keygen.c (ask_algo): Make the Elgamal sign+encrypt warning stronger, and remove the RSA sign+encrypt warning.
2002-12-04* trustdb.c (validate_keys): Show trust parameters when building trustdb,David Shaw1-26/+15
and make sure that the version record update was successful. (init_trustdb): If the current parameters aren't what was used for building the trustdb, the trustdb is invalid. * tbio.c (tdbio_db_matches_options): Update to work with new trustdbs.
2002-12-04* tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record): Store trustDavid Shaw1-8/+35
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-11-13* exec.c [__CYGWIN32__]: Keep cygwin separate from Mingw32; we don't needDavid Shaw1-2/+2
it here as it behaves more like a Posix system. From Werner on stable branch. * passphrase.c (agent_get_passphrase): Ditto. From Werner on stable branch. * tdbio.c (MY_O_BINARY): Need binary mode with Cygwin. From Werner on stable branch. * g10.c, gpgv.c (main) [__CYGWIN32__]: Don't get the homedir from the registry. From Werner on stable branch.
2002-10-29* keyedit.c (print_and_check_one_sig, show_key_and_fingerprint,David Shaw1-0/+2
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-1578/+0
'GNUPG-1-9-BRANCH'.
2002-09-11* g10.c, options.h: Removed option --emulate-checksum-bug.Werner Koch1-10/+14
* misc.c (checksum_u16_nobug): Removed. (checksum_u16): Removed the bug emulation. (checksum_mpi): Ditto. (checksum_mpi_counted_nbits): Removed and replaced all calls with checksum_mpi. * parse-packet.c (read_protected_v3_mpi): New. (parse_key): Use it here to store it as an opaque MPI. * seckey-cert.c (do_check): Changed the v3 unprotection to the new why to store these keys. (protect_secret_key): Likewise. * build-packet.c (do_secret_key): And changed the writing.
2002-08-08* tdbio.c (tdbio_set_dbname): Create new trustdbs with user-onlyDavid Shaw1-0/+3
permissions.
2002-08-07* keyedit.c (menu_revsig): Properly show a uid is revoked withoutDavid Shaw1-2/+0
restarting gpg. This is Debian bug 124219, though their supplied patch will not do the right thing. * main.h, tdbio.c (tdbio_set_dbname), misc.c (removed check_permissions), keydb.c (keydb_add_resource), g10.c (main, check_permissions): Significant reworking of the permission check mechanism. The new behavior is to check everything in the homedir by checking the homedir itself. If the user wants to put (possibly shared) keyrings outside the homedir, they are not checked. The options file and any extension files are checked wherever they are, as well as their enclosing directories. This is Debian bug 147760.
2002-06-29Update head to match stable 1.0David Shaw1-554/+375
2000-07-14See ChangeLog: Fri Jul 14 19:38:23 CEST 2000 Werner KochWerner Koch1-17/+5
2000-01-27See ChangeLog: Thu Jan 27 18:00:44 CET 2000 Werner KochWerner Koch1-57/+57
2000-01-24See ChangeLog: Mon Jan 24 13:04:28 CET 2000 Werner KochWerner Koch1-7/+7
1999-09-06See ChangeLog: Mon Sep 6 19:59:08 CEST 1999 Werner KochWerner Koch1-4/+5