aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * keyedit.c (keyedit_menu, menu_clean): Simplify clean options to justDavid Shaw2005-11-181-6/+4
| | | | | | | | | | | | | | "clean", and add "minimize". * import.c (parse_import_options): Make help text match the export versions of the options. * options.h, export.c (parse_export_options, do_export_stream): Reduce clean options to two: clean and minimize. * trustdb.h, trustdb.c (clean_one_uid): New function that joins uid and sig cleaning into one for a simple API outside trustdb.
* * trustdb.h, trustdb.c (clean_key): New function to handle keyDavid Shaw2005-11-121-33/+12
| | | | | | | | | | | cleaning from one convenient place. * options.h, import.c (parse_import_options, clean_sigs_from_all_uids, import_one): Reduce clean options to two: clean and minimize. * parse-packet.c (setup_user_id): Remove. (parse_user_id, parse_attribute): Just use xmalloc_clear instead.
* * options.h, import.c (parse_import_options, clean_sigs_from_all_uids,David Shaw2005-11-101-4/+8
| | | | | | import_one): Add import-minimal option. Similar to export-minimal, except it works on the way in.
* * trustdb.h, trustdb.c (clean_sigs_from_uid): Add flag to remove allDavid Shaw2005-11-101-1/+1
| | | | | | | | non-selfsigs from key during cleaning. Change all callers. * export.c (do_export_stream): Use it here so we don't need additional minimize code in the export path.
* * import.c (import_one): Do collapse_uids() before we do any cleaningDavid Shaw2005-11-021-5/+4
| | | | | | | | | | | | | | | so keyserver mangled keys with doubled user IDs can be properly cleaned - possibly sigs on the different user IDs cancel each other out. * import.c (parse_import_options), export.c (parse_export_options): List "xxx-clean" before the longer options so we don't end up with a partial match on the longer options. * trustdb.c (clean_uids_from_key): Return proper number of cleaned user IDs. Don't count user IDs as cleaned unless we actually delete something.
* * main.h, misc.c (parse_options): Add the ability to have helpDavid Shaw2005-09-141-12/+20
| | | | | | | | | strings in xxx-options commands. * keyserver.c (keyserver_opts), import.c (parse_import_options), export.c (parse_export_options), g10.c (parse_list_options, main): Add help strings to xxx-options.
* Converted all m_free to xfree etc.Werner Koch2005-07-271-27/+27
|
* Preparing a releaseWerner Koch2005-07-261-2/+1
|
* * gpg.sgml (http):Werner Koch2005-07-221-1/+2
| | | | | | * g10.c, options.h: New option --exit-on-status-write-error. * status.c (write_status_text): Make use of this option.
* * trustdb.c (clean_uids_from_key): Don't keep a valid selfsig aroundDavid Shaw2005-07-091-6/+7
| | | | | | | | | | | | | when compacting a uid. There is no reason to make an attacker's job easier - this way they only have a revocation which is useless in bringing the uid back. * keydb.h, kbnode.c (undelete_kbnode): Removed. No longer needed. * import.c (chk_self_sigs): Allow a uid revocation to be enough to allow importing a particular uid (no self sig needed). This allows importing compacted uids.
* * keygen.c (save_unprotected_key_to_card): Fix gcc4 warning.David Shaw2005-06-141-5/+25
| | | | | | | | | | * options.h, import.c (parse_import_options, import_one): Add import-clean-uids option to automatically compact unusable uids when importing. Like import-clean-sigs, this may nodify the local keyring. * trustdb.c (clean_uids_from_key): Only allow selfsigs to be a candidate for re-inclusion.
* * options.h, import.c (parse_import_options, clean_sigs_from_all_uids,David Shaw2005-06-121-6/+41
| | | | | | | | import_one): Add import-clean-sigs option to automatically clean a key when importing. Note that when importing a key that is already on the local keyring, the clean applies to the merged key - i.e. existing superceded or invalid signatures are removed.
* * options.h, import.c (parse_import_options, delete_inv_parts):David Shaw2005-06-101-25/+2
| | | | | import-unusable-sigs is now a noop.
* Updated FSF street address and preparations for a release candidate.Werner Koch2005-05-311-1/+2
|
* * trustdb.h, trustdb.c (trustdb_check_or_update): New. If the trustdbDavid Shaw2005-02-061-9/+6
| | | | | | | | | | | | | | is dirty and --interactive is set, do an --update-trustdb. If not interactive, do a --check_trustdb unless --no-auto-check-trustdb is set. * import.c (import_keys_internal): Moved from here. * keyserver.c (keyserver_refresh): Call it here after all refreshing has happened so that we don't rebuild after each preferred keyserver set of imports, but do one big rebuild at the end. This is Debian bug #293816, noted by Kurt Roeckx.
* * gpgv.c (tty_fprintf): New stub.Werner Koch2005-01-201-2/+231
| | | | | | | | | * card-util.c (card_status): Create asecret key stub on the fly and print more information about a card key. * import.c (pub_to_sec_keyblock, auto_create_card_key_stub): New. * getkey.c (get_seckeyblock_byfprint): New. * keylist.c (print_card_key_info): New.
* * Makefile.am: Use @LIBUSB@ instead of @LIBUSB_LIBS@David Shaw2005-01-031-0/+6
| | | | | * import.c (delete_inv_parts): Comments on import-unusable-sigs.
* * options.h, import.c (parse_import_options, delete_inv_parts): AddDavid Shaw2005-01-011-1/+20
| | | | | | | | | | import-unusable-sigs flag to enable importing unusable (currently: expired) sigs. * options.h, export.c (parse_export_options, do_export_stream): Add export-unusable-sigs flag to enable exporting unusable (currently: expired) sigs.
* * options.h, export.c (parse_export_options, do_export_stream), import.cDavid Shaw2004-11-261-5/+7
| | | | | | | (parse_import_options, import_keys_internal): Make the import-options and export-options distinct since they can be mixed together as part of keyserver-options.
* * export.c (do_export_stream) [ENABLE_SELINUX_HACKS]: Don't allowWerner Koch2004-10-141-0/+11
| | | | | | secret key export. * import.c (import_secret_one) [ENABLE_SELINUX_HACKS]: Likewise
* Added SELInux hacks and did some cleanups.Werner Koch2004-10-131-0/+6
|
* * main.h: Create S2K_DIGEST_ALGO macro so we do not need to always setDavid Shaw2004-09-241-5/+5
| | | | | | | | | | | opt.s2k_digest_algo. This helps fix a problem with PGP 2.x encrypted symmetric messages. Change all callers (encode.c, g10.c, keyedit.c, keygen.c, passphrase.c, sign.c). * armor.c, cardglue.c, getkey.c, import.c, keygen.c: Be consistent in some more quoted strings. Always use 'user ID', not 'user id', "quotes" for user IDs, etc.
* * card-util.c (fetch_url, card_edit): Use the pubkey URL stored on theDavid Shaw2004-09-111-1/+2
| | | | | | | | | | card to fetch an updated copy. Works with either straight URLs or HKP or LDAP keyservers. * keyserver-internal.h, keyserver.c (keyserver_import_fprint), import.c (revocation_present): Use a keyserver_spec so the caller can pass in whatever keyserver they like.
* * keydb.h, getkey.c (get_user_id_printable): Rename to get_user_id_nativeDavid Shaw2004-08-231-6/+6
| | | | | | | and remove the printable stuff since we're print-ifying valid utf8 characters. Change all callers in import.c, sign.c, keylist.c, and encode.c.
* * options.h, keyserver.c (parse_keyserver_options): Remove duplicate codeDavid Shaw2004-04-151-1/+2
| | | | | | | | | from parse_keyserver_options by calling the generic parse_options. * keyserver.c (keyserver_spawn, keyserver_refresh), g10.c (main), gpgv.c (main), mainproc.c (check_sig_and_print), import.c (revocation_present): Change all callers.
* * options.h, import.c, keyserver-internal.h, g10.c, mainproc.c,David Shaw2004-04-141-2/+2
| | | | | | | keyserver.c (parse_keyserver_uri): Parse keyserver URI into a structure. Cleanup for new "guess my keyserver" functionality, as well as refreshing via a preferred keyserver subpacket.
* * options.h: Encapsulate keyserver details. Change all callers.David Shaw2004-04-141-1/+1
|
* * trustdb.c (update_min_ownertrust, validate_keys): Do not use keystrDavid Shaw2004-03-191-0/+3
| | | | | | | | | | | | | | | functions in log_debug. * import.c (import_one): Try and collapse user IDs when importing a key for the first time. * keyedit.c (menu_addrevoker): Allow appointing a subkey as a designated revoker if the user forces it via keyid!, so long as the subkey can certify. Also use the proper date string when prompting for confirmation. * g10.c (main): Maintain ordering of multiple Comment lines. Requested by Peter Hyman.
* * import.c (check_prefs_warning, check_prefs): --keyid-format conversionDavid Shaw2004-03-151-228/+265
| | | | | | | and a little better text. (import_one, import_secret_one, import_revoke_cert, chk_self_sigs, delete_inv_parts, merge_blocks): Still more --keyid-format conversions.
* * keyserver.c (argsep): Move to misc.c.David Shaw2004-02-141-8/+8
| | | | | | | * main.h, misc.c (parse_options), export.c (parse_export_options), import.c (parse_import_options), g10.c (main): Use it here to allow for options with optional arguments. Change all callers.
* * import.c (check_prefs): Some language fixes. (sec_to_pub_keyblock,David Shaw2004-02-141-7/+15
| | | | | | import_secret_one): Without knowing the number of MPIs there are, we cannot try and sk-to-pk-ize a key.
* * import.c (check_prefs): New function to check preferences on a publicDavid Shaw2004-02-121-10/+144
| | | | | | | | | key to ensure that it does not advertise any that we cannot fulfill. Use the keyedit command list function to optionally rewrite the prefs. (import_one, import_secret_one): Use it here when importing a public key that we have the secret half of, or when importing a secret key that we have the public half of.
* * import.c (import_one): Do the revocation check even in the case when aDavid Shaw2004-02-121-7/+10
| | | | | | | key, a revocation key set in a direct key signature, and a revocation from that revocation key, all arrive piecemeal. Needless to say, this is pretty obscure.
* * options.h, g10.c (main), import.c (parse_import_options, import_one,David Shaw2003-12-311-12/+16
| | | | | | import_secret_one), keyserver.c (keyserver_refresh): Change --merge-only to --import-option merge-only. Deprecate --merge-only.
* * main.h, misc.c (parse_options): Add a "noisy" flag to enable and disableDavid Shaw2003-12-281-4/+4
| | | | | | | | | the messages about which option didn't match or matched ambiguously. Change all callers (g10.c, keyserver.c). * main.h, import.c (import_options), export.c (export_options): Pass the noisy flag through.
* * packet.h, build-packet.c (hash_public_key): Remove function ...David Shaw2003-12-111-4/+0
| | | | | | | | | | | | | | | | | | | | * keydb.h, keyid.c (hash_public_key, do_fingerprint_md): ... and make a new one here that shares code with the fingerprint calculations. This removes some duplicated functionality, and is also around 14% faster. (Every bit helps). * import.c (import_one): No longer need the Elgamal import warning. * getkey.c (get_pubkey_fast): This one is sort of obscure. get_pubkey_fast returns the primary key when requesting a subkey, so if a user has a key signed by a subkey (we don't do this, but used to), AND that key is not self-signed, AND the algorithm of the subkey in question is not present in GnuPG, AND the algorithm of the primary key that owns the subkey in question is present in GnuPG, then we will try and verify the subkey signature using the primary key algorithm and hit a BUG(). The fix is to not return a hit if the keyid is not the primary. All other users of get_pubkey_fast already expect a primary only.
* * misc.c (compress_algo_to_string, string_to_compress_algo,David Shaw2003-10-311-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | check_compress_algo): Add bzip2. * compress.c (compress_filter): Make static to help force the use of push_compress_filter. Remove default algorithm setting since that is done in push_compress_filter now. * main.h: Use named algorithm. * filter.h, compress.c (push_compress_filter, push_compress_filter2): New. Figure out which is the appropriate compression filter to use, and push it into place. * compress.c (handle_compressed), encode.c (encode_simple, encode_crypt), sign.c (sign_file, sign_symencrypt_file), import.c (read_block), export.c (do_export): Use push_compress_filter instead of pushing the compression filter ourselves. * compress-bz2.c: New. Bzlib versions of the compression filter routines. * Makefile.am: Include compress-bz2.c if bz2lib is available.
* * import.c (import_one): Show the keyid when giving the Elgamal slowDavid Shaw2003-10-141-2/+2
| | | | | | | | import warning. * g10.c (main): Older versions used --comment "" to indicate no comment. Don't add an empty comment.
* * gpgv.c: Remove extra semicolon (typo).David Shaw2003-08-211-55/+71
| | | | | | | | | | | | | | | | | | * options.skel: Note that keyserver.pgp.com isn't synchronized, and explain the roundrobin a bit better. * sig-check.c (check_key_signature2), import.c (import_one, import_revoke_cert, chk_self_sigs, delete_inv_parts, collapse_uids, merge_blocks): Make much quieter during import of slightly munged, but recoverable, keys. Use log_error for unrecoverable import failures. * keyring.c (keyring_rebuild_cache): Comment. * sign.c (mk_notation_and_policy): Making a v3 signature with notations or policy urls is an error, not an info (i.e. increment the errorcount). Don't print the notation or policy url to stdout since it can be mixed into the output stream when piping and munge the stream.
* * packet.h, sig-check.c (signature_check2, do_check, do_check_messages):David Shaw2003-08-131-23/+15
| | | | | | | | | | | | | | | | | | | Provide a signing-key-is-revoked flag. Change all callers. * status.h, status.c (get_status_string): New REVKEYSIG status tag for a good signature from a revoked key. * mainproc.c (do_check_sig, check_sig_and_print): Use it here. * import.c (import_revoke_cert, merge_blocks, merge_sigs): Compare actual signatures on import rather than using keyid or class matching. This does not change actual behavior with a key, but does mean that all sigs are imported whether they will be used or not. * parse-packet.c (parse_signature): Don't give "signature packet without xxxx" warnings for experimental pk algorithms. An experimental algorithm may not have a notion of (for example) a keyid (i.e. PGP's x.509 stuff).
* * import.c (import_keys_internal): Invalidate the cache so thatWerner Koch2003-06-081-1/+1
| | | | | | the file descriptor gets closed. Fixes bug reported by Juan F. Codagnone.
* * import.c (import_keys_internal): Invalidate the cache so thatWerner Koch2003-06-081-0/+2
| | | | | | the file descriptor gets closed. Fixes bug reported by Juan F. Codagnone.
* * main.h, misc.c (parse_options): New general option line parser. Fix theDavid Shaw2003-05-311-35/+2
| | | | | | | | | bug in the old version that did not handle report syntax errors after a valid entry. * import.c (parse_import_options), export.c (parse_export_options): Call it here instead of duplicating the code.
* * packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw2003-05-031-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (do_export_stream), import.c (remove_bad_stuff, import), parse-packet.c (dump_sig_subpkt, parse_one_sig_subpkt): Remove vestigal code for the old sig cache subpacket. This wasn't completely harmless as it caused subpacket 101 to disappear on import and export. * options.h, armor.c, cipher.c, g10.c, keyedit.c, pkclist.c, sign.c, encode.c, getkey.c, revoke.c: The current flags for different levels of PGP-ness are massively complex. This is step one in simplifying them. No functional change yet, just use a macro to check for compliance level. * sign.c (sign_file): Fix bug that causes spurious compression preference warning. * sign.c (clearsign_file): Fix bug that prevents proper warning message from appearing when clearsigning in --pgp2 mode with a non-v3 RSA key. * main.h, misc.c (compliance_option_string, compliance_string, compliance_failure), pkclist.c (build_pk_list), sign.c (sign_file, clearsign_file), encode.c (encode_crypt, write_pubkey_enc_from_list): New functions to put the "this message may not be usable...." warning in one place. * options.h, g10.c (main): Part two of the simplification. Use a single enum to indicate what we are compliant to (1991, 2440, PGPx, etc.) * g10.c (main): Show errors for failure in export, send-keys, recv-keys, and refresh-keys. * options.h, g10.c (main): Give algorithm warnings for algorithms chosen against the --pgpX and --openpgp rules. * keydb.h, pkclist.c (algo_available): Make TIGER192 invalid in --openpgp mode. * sign.c (sign_file), pkclist.c (algo_available): Allow passing a hint of 0.
* * import.c (import_revoke_cert): Remove ultimate trust when revoking anDavid Shaw2003-04-231-0/+7
| | | | | | | | | | | | | | | | | | ultimately trusted key. * keyedit.c (sign_uids): Allow replacing expired signatures. Allow duplicate signatures with --expert. * pkclist.c (check_signatures_trust): Don't display a null fingerprint when checking a signature with --always-trust enabled. * filter.h (progress_filter_context_t), progress.c (handle_progress), plaintext.c (ask_for_detached_datafile, hash_datafiles): Fix compiler warnings. Make "what" constant. * build-packet.c (do_plaintext): Do not create invalid literal packets with >255-byte names.
* * main.h, g10.c (main), import.c (parse_import_options,David Shaw2003-04-091-5/+6
| | | | | | | | | fix_pks_corruption): It's really PKS corruption, not HKP corruption. Keep the old repair-hkp-subkey-bug command as an alias. * g10.c (main): Rename --no-version to --no-emit-version for consistency. Keep --no-version as an alias.
* * keydb.h: Err on the side of making an unknown signature a SIG ratherDavid Shaw2003-03-241-0/+8
| | | | | | | | | | | | | | | | | | | than a CERT. * import.c (delete_inv_parts): Discard any key signatures that aren't key types (i.e. 0x00, 0x01, etc.) * g10.c (main): Add deprecated option warning for --list-ownertrust. Add --compression-algo alias for --compress-algo. Change --version output strings to match "showpref" strings, and make translatable. * status.c (do_get_from_fd): Accept 'y' as well as 'Y' for --command-fd boolean input. * trustdb.c: Fix typo (DISABLE_REGEXP -> DISABLE_REGEX) * keyedit.c (show_key_with_all_names_colon): Show no-ks-modify flag.
* * keyedit.c (menu_revuid): Properly handle a nonselfsigned uid on a v4 keyDavid Shaw2003-02-021-7/+3
| | | | | | | (treat as a v4 revocation). * import.c (print_import_check): Do not re-utf8 convert user IDs.
* * import.c (import_one): Only do the work to create the status display forDavid Shaw2003-01-031-1/+2
| | | | | | | | | | | interactive import if status is enabled. * keyring.c (keyring_search): skipfnc didn't work properly with non-keyid searches. Noted by Stefan Bellon. * getkey.c (merge_selfsigs_main): Remove some unused code and make sure that the pk selfsigversion member accounts for 1F direct sigs.
* fixed type problemStefan Bellon2002-12-271-1/+1
|