aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2004-04-15* options.h, keyserver.c (parse_keyserver_options): Remove duplicate codeDavid Shaw1-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.
2004-04-14* options.h, import.c, keyserver-internal.h, g10.c, mainproc.c,David Shaw1-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.
2004-04-14* options.h: Encapsulate keyserver details. Change all callers.David Shaw1-1/+1
2004-03-19* trustdb.c (update_min_ownertrust, validate_keys): Do not use keystrDavid Shaw1-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.
2004-03-15* import.c (check_prefs_warning, check_prefs): --keyid-format conversionDavid Shaw1-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.
2004-02-14* keyserver.c (argsep): Move to misc.c.David Shaw1-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.
2004-02-14* import.c (check_prefs): Some language fixes. (sec_to_pub_keyblock,David Shaw1-7/+15
import_secret_one): Without knowing the number of MPIs there are, we cannot try and sk-to-pk-ize a key.
2004-02-12* import.c (check_prefs): New function to check preferences on a publicDavid Shaw1-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.
2004-02-12* import.c (import_one): Do the revocation check even in the case when aDavid Shaw1-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.
2003-12-31* options.h, g10.c (main), import.c (parse_import_options, import_one,David Shaw1-12/+16
import_secret_one), keyserver.c (keyserver_refresh): Change --merge-only to --import-option merge-only. Deprecate --merge-only.
2003-12-28* main.h, misc.c (parse_options): Add a "noisy" flag to enable and disableDavid Shaw1-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.
2003-12-11* packet.h, build-packet.c (hash_public_key): Remove function ...David Shaw1-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.
2003-10-31* misc.c (compress_algo_to_string, string_to_compress_algo,David Shaw1-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.
2003-10-14* import.c (import_one): Show the keyid when giving the Elgamal slowDavid Shaw1-2/+2
import warning. * g10.c (main): Older versions used --comment "" to indicate no comment. Don't add an empty comment.
2003-08-21* gpgv.c: Remove extra semicolon (typo).David Shaw1-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.
2003-08-13* packet.h, sig-check.c (signature_check2, do_check, do_check_messages):David Shaw1-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).
2003-06-08* import.c (import_keys_internal): Invalidate the cache so thatWerner Koch1-1/+1
the file descriptor gets closed. Fixes bug reported by Juan F. Codagnone.
2003-06-08* import.c (import_keys_internal): Invalidate the cache so thatWerner Koch1-0/+2
the file descriptor gets closed. Fixes bug reported by Juan F. Codagnone.
2003-05-31* main.h, misc.c (parse_options): New general option line parser. Fix theDavid Shaw1-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.
2003-05-03* packet.h, build-packet.c (build_sig_subpkt), export.cDavid Shaw1-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.
2003-04-23* import.c (import_revoke_cert): Remove ultimate trust when revoking anDavid Shaw1-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.
2003-04-09* main.h, g10.c (main), import.c (parse_import_options,David Shaw1-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.
2003-03-24* keydb.h: Err on the side of making an unknown signature a SIG ratherDavid Shaw1-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.
2003-02-02* keyedit.c (menu_revuid): Properly handle a nonselfsigned uid on a v4 keyDavid Shaw1-7/+3
(treat as a v4 revocation). * import.c (print_import_check): Do not re-utf8 convert user IDs.
2003-01-03* import.c (import_one): Only do the work to create the status display forDavid Shaw1-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.
2002-12-27fixed type problemStefan Bellon1-1/+1
2002-12-26* keydb.h, getkey.c (key_byname): Flag to enable or disable includingDavid Shaw1-1/+1
disabled keys. Keys specified via keyid (i.e. 0x...) are always included. * getkey.c (get_pubkey_byname, get_seckey_byname2, get_seckey_bynames), keyedit.c (keyedit_menu, menu_addrevoker): Include disabled keys in these functions. * pkclist.c (build_pk_list): Do not include disabled keys for -r or the key prompt. Do include disabled keys for the default key and --encrypt-to. * trustdb.h, trustdb.c (is_disabled): New skipfnc for skipping disabled keys. * gpgv.c (is_disabled): Stub. * keygen.c (keygen_add_key_expire): Properly handle updating a key expiration to a no-expiration value. * keyedit.c (enable_disable_key): Comment. * import.c (import_one): When in interactive mode and --verbose, don't repeat some key information twice.
2002-12-222002-12-22 Timo Schulz <[email protected]>Timo Schulz1-0/+27
* import.c (print_import_check): New. (import_one): Use it here. Use merge_keys_and_selfsig in the interactive mode to avoid wrong key information. * status.h: Add new status code. * status.c: Ditto.
2002-12-13* pkclist.c (do_we_trust): Tweak language to refer to the "namedDavid Shaw1-16/+24
user" rather than "owner". Noted by Stefan Bellon. * trustdb.h, trustdb.c (trustdb_pending_check): New function to check if the trustdb needs a check. * import.c (import_keys_internal): Used here so we don't rebuild the trustdb if it is still clean. (import_one, chk_self_sigs): Only mark trustdb dirty if the key that is being imported has any sigs other than self-sigs. Suggested by Adrian von Bidder. * options.skel: Include the required '=' sign in the sample 'group' option. Noted by Stefan Bellon. * import.c (chk_self_sigs): Don't try and check a subkey as if it was a signature.
2002-12-11* tdbio.c (tdbio_read_record, tdbio_write_record): Compact theDavid Shaw1-0/+10
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-01* keyedit.c (menu_expire): Don't lose key flags when changing theDavid Shaw1-0/+4
expiration date of a subkey. This is not the most optimal solution, but it is minimal change on the stable branch. * main.h, keygen.c (do_copy_key_flags): New function to copy key flags, if any, from one sig to another. (do_add_key_expire): New function to add key expiration to a sig. (keygen_copy_flags_add_expire): New version of keygen_add_key_expire that also copies key flags. (keygen_add_key_flags_and_expire): Use do_add_key_expire. * import.c (fix_hkp_corruption): Comment.
2002-11-13* encode.c (encode_simple): Make sure that files larger than about 4G useDavid Shaw1-4/+4
partial length encoding. This is required because OpenPGP allows only for 32 bit length fields. From Werner on stable branch. * getkey.c (get_pubkey_direct): Renamed to... (get_pubkey_fast): this and made extern. (get_pubkey_byfprint_fast): New. From Werner on stable branch. * keydb.h, import.c (import_one): Use get_pubkey_fast instead of get_pubkey. We don't need a merged key and actually this might lead to recursions. (revocation_present): Likewise for search by fingerprint. From Werner on stable branch. * g10.c (main): Try to create the trustdb even for non-colon-mode list-key operations. This is required because getkey needs to know whether a a key is ultimately trusted. From Werner on stable branch.
2002-10-30* packet.h, trustdb.h, trustdb.c (trust_string): New. Return a stringDavid Shaw1-1/+1
like "fully trusted", "marginally trusted", etc. (get_min_ownertrust): New. Return minimum ownertrust. (update_min_ownertrust): New. Set minimum ownertrust. (check_regexp): New. Check a regular epression against a user ID. (ask_ownertrust): Allow specifying a minimum value. (get_ownertrust_info): Follow the minimum ownertrust when returning a letter. (clear_validity): Remove minimum ownertrust when a key becomes invalid. (release_key_items): Release regexp along with the rest of the info. (validate_one_keyblock, validate_keys): Build a trust sig chain while validating. Call check_regexp for regexps. Use the minimum ownertrust if the user does not specify a genuine ownertrust. * pkclist.c (do_edit_ownertrust): Only allow user to select a trust level greater than the minimum value. * parse-packet.c (can_handle_critical): Can handle critical trust and regexp subpackets. * trustdb.h, trustdb.c (clear_ownertrusts), delkey.c (do_delete_key), import.c (import_one): Rename clear_ownertrust to clear_ownertrusts and have it clear the min_ownertrust value as well. * keylist.c (list_keyblock_print): Indent uid to match pub and sig.
2002-10-23* main.h, import.c (sec_to_pub_keyblock, import_secret_one,David Shaw1-4/+76
parse_import_options), g10.c (main): New import-option "convert-sk-to-pk" to convert a secret key into a public key during import. It is on by default.
2002-10-07* import.c (import_keys_internal): Missed one s/inp/inp2/.David Shaw1-1/+1
* keylist.c (print_capabilities): Properly indicate per-key capabilities of sign&encrypt primary keys that have secret-parts-missing (i.e. no capabilities at all) * mainproc.c (symkey_decrypt_sesskey): Fix compiler warning.
2002-10-04* import.c (import_keys_internal): s/inp/inp2/ to avoid shadowingWerner Koch1-3/+3
warning. * passphrase.c (agent_get_passphrase): Fixed signed/unsigned char problem in %-escaping. Noted by Ingo Kl�cker.
2002-10-02* import.c (import_secret_one): Check for an illegal (>110) protectionDavid Shaw1-0/+7
cipher when importing a secret key. * keylist.c (list_keyblock_print): Show a '#' for a secret-parts-missing key. * parse_packet.c (parse_key): Some comments. * revoke.c (gen_revoke): Remove some debugging code. * trustdb.c (verify_own_keys): Make trusted-key a non-deprecated option again. * seckey-cert.c (do_check): Don't give the IDEA warning unless the cipher in question is in fact IDEA.
2002-10-01* import.c (import_one): Make sure that a newly imported key starts with aDavid Shaw1-1/+9
clean ownertrust.
2002-09-24* import.c (import_keys_stream): Fix compiler type warning.David Shaw1-7/+7
* keyring.c (keyring_rebuild_cache), sig-check.c (check_key_signature2), import.c (import, chk_self_sigs): Minor language cleanups.
2002-09-23added fast-import to import-optionsStefan Bellon1-16/+16
2002-09-22avoid function cloneStefan Bellon1-47/+36
2002-09-21added trustdb update/check for stream import as wellStefan Bellon1-0/+12
2002-09-21trustdb checks/updates after importStefan Bellon1-1/+11
2002-09-10Cleanups and minor fixes.Werner Koch1-1/+1
2002-09-02* g10.c (main): Try to set a default character set. Print theWerner Koch1-0/+35
used one in verbosity level 3. * gpgv.c (main): Try to set a default character set. * status.c, status.h (STATUS_IMPORT_OK): New. * import.c (import_one,import_secret_one): Print new status.
2002-08-22* import.c (clean_subkeys, chk_self_sigs): Merge clean_subkeys intoDavid Shaw1-109/+82
chk_self_sigs. This improves efficiency as the same signatures are not checked multiple times. Clarify when a subkey is revoked (any revocation signature, even if it is dated before the binding signature). * getkey.c (merge_selfsigs_subkey): Subkey revocation comments. * keylist.c (list_one): Stats are only for public key listings. * g10.c (main), options.skel: Default should be include-revoked for keyserver operations.
2002-08-21* import.c (import_print_stats): Print new non_imported counterWerner Koch1-3/+9
which is currently not used becuase we terminate on errors.
2002-08-19* getkey.c (get_user_id_native): Renamed to ..Werner Koch1-19/+12
(get_user_id_printable): this. Filter out all dangerous characters. Checked all usages. (get_user_id_string_native): Renamed to.. (get_user_id_string_printable): this. Filter out all dangerous characters. Checked all usages. * keyedit.c (show_basic_key_info): New. * keylist.c (print_fingerprint): New mode 3. * import.c (import_one): Use new function to display the user ID.
2002-08-182002-08-16 Timo Schulz <[email protected]>Timo Schulz1-0/+17
* g10.c (main): enable opt.interactive. * import.c (import_one): Ask the user if the key shall be imported when the interactive mode is used. Useful to extract selected keys from a file.
2002-07-25* exec.c, export.c, import.c, keyedit.c, keyserver.c, misc.c: "Warning" ->David Shaw1-2/+2
"WARNING"