aboutsummaryrefslogtreecommitdiffstats
path: root/g10 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* * packet.h, tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record),David Shaw2003-01-065-93/+178
| | | | | | | | | | | | 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.
* * keylist.c (print_capabilities): Show 'D' for disabled keys inDavid Shaw2003-01-063-3/+21
| | | | | | | capabilities section. * trustdb.c (is_disabled): Remove incorrect comment.
* * import.c (import_one): Only do the work to create the status display forDavid Shaw2003-01-034-10/+27
| | | | | | | | | | | 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.
* * keydb.c (keydb_add_resource): Don't assume that try_make_homedirWerner Koch2003-01-023-15/+46
| | | | | | | | terminates but check again for the existence of the directory and continue then. * openfile.c (copy_options_file): Print a warning if the skeleton file has active options.
* * getkey.c (merge_selfsigs_main), main.h, sig-check.cDavid Shaw2002-12-294-13/+29
| | | | | | | | (check_key_signature2): Pass the ultimately trusted pk directly to check_key_signature2 to avoid going through the key selection mechanism. This prevents a deadly embrace when two keys without selfsigs each sign the other.
* * keyserver.c (keyserver_refresh): Don't print the "refreshing..." line ifDavid Shaw2002-12-273-7/+26
| | | | | | | | there are no keys to refresh or if there is no keyserver set. * getkey.c (merge_selfsigs_main): Any valid user ID should make a key valid, not just the last one. This also fixes Debian bug #174276.
* fixed type problemStefan Bellon2002-12-272-1/+5
|
* * keyedit.c (keyedit_menu, menu_revuid): Add "revuid" feature to revoke aDavid Shaw2002-12-272-7/+146
| | | | | | user ID. This is the same as issuing a revocation for the self-signature, but a much simpler interface to do it.
* * keydb.h, getkey.c (key_byname): Flag to enable or disable includingDavid Shaw2002-12-2610-16/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-22 Timo Schulz <[email protected]>Timo Schulz2002-12-224-0/+38
| | | | | | | | | | * 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.
* * pkclist.c (do_we_trust): Tweak language to refer to the "namedDavid Shaw2002-12-136-25/+59
| | | | | | | | | | | | | | | | | | | | 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.
* * tdbio.c (tdbio_read_record, tdbio_write_record): Compact theDavid Shaw2002-12-115-15/+46
| | | | | | | | | | | | | | | 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.
* fixed typoStefan Bellon2002-12-062-1/+6
|
* * g10.c: New options --[no-]mangle-dos-filenames.Werner Koch2002-12-054-70/+97
| | | | | | | * options.h (opt): Added mangle-dos-filenames. * openfile.c (open_outfile) [USE_ONLY_8DOT3]: Truncate the filename only when this option is set; this is the default.
* * main.h, keyedit.c, keygen.c: Back out previous (2002-12-01) change.David Shaw2002-12-047-78/+104
| | | | | | | | | | | | | | | | | | | | | | | | Minimal isn't always best. * sign.c (update_keysig_packet): Use the current time rather then a modification of the original signature time. Make sure that this doesn't cause a time warp. * keygen.c (keygen_add_key_expire): Properly handle a key expiration date in the past (use a duration of 0). * keyedit.c (menu_expire): Use update_keysig_packet so any sig subpackets are maintained during the update. * build-packet.c (build_sig_subpkt): Mark sig expired or unexpired when the sig expiration subpacket is added. (build_sig_subpkt_from_sig): Handle making an expiration subpacket from a sig that has already expired (use a duration of 0). * packet.h, sign.c (update_keysig_packet), keyedit.c (menu_set_primary_uid, menu_set_preferences): Add ability to issue 0x18 subkey binding sigs to update_keysig_packet and change all callers.
* * trustdb.c (validate_keys): Show trust parameters when building trustdb,David Shaw2002-12-043-27/+42
| | | | | | | | | 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.
* * tdbio.h, tdbio.c (tdbio_read_record, tdbio_write_record): Store trustDavid Shaw2002-12-045-9/+51
| | | | | | | | | | | | 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.
* * options.h, g10.c (main), encode.c (write_pubkey_enc_from_list),David Shaw2002-12-0310-37/+74
| | | | | | | | | | | | | | | pkclist.c (algo_available), revoke.c (gen_revoke): Add --pgp8 mode. This is basically identical to --pgp7 in all ways except that signing subkeys, v4 data sigs (including expiration), and SK comments are allowed. * getkey.c (finish_lookup): Comment. * main.h, keylist.c (reorder_keyblock), keyedit.c (keyedit_menu): Reorder user ID display in the --edit-key menu to match that of the --list-keys display. * g10.c (add_notation_data): Fix initialization.
* * keyedit.c (menu_expire): Don't lose key flags when changing theDavid Shaw2002-12-015-20/+71
| | | | | | | | | | | | | | 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.
* no RISC OS filetype needed for nooutputStefan Bellon2002-11-252-15/+25
|
* * main.h, misc.c (default_cipher_algo, default_compress_algo): New.David Shaw2002-11-256-23/+50
| | | | | | | | | | | | Return the default algorithm by trying --cipher-algo/--compress-algo, then the first item in the pref list, then s2k-cipher-algo or ZIP. * sign.c (sign_file, sign_symencrypt_file), encode.c (encode_simple, encode_crypt): Call default_cipher_algo and default_compress_algo to get algorithms. * g10.c (main): Allow pref selection for compress algo with --openpgp.
* * mainproc.c (proc_encrypted): Use --s2k-digest-algo for passphraseDavid Shaw2002-11-252-1/+4
| | | | | mangling rather than --digest-algo.
* * sign.c (hash_for): If --digest-algo is not set, butDavid Shaw2002-11-252-8/+38
| | | | | | | | --personal-digest-preferences is, then use the first hash algorithm in the personal list. If the signing algorithm is DSA, then use the first 160-bit hash algorithm in the personal list. If --pgp2 is set and it's a v3 RSA key, use MD5.
* * g10.c (main), keydb.c (keydb_add_resource, keydb_locate_writable):David Shaw2002-11-253-10/+16
| | | | | | Rename --default-keyring as --primary-keyring. Stefan wins the naming contest.
* * g10.c (add_notation_data): Disallow notation names that do not contain aDavid Shaw2002-11-244-8/+37
| | | | | | | | | | | '@', unless --expert is set. This is to help prevent people from polluting the (as yet unused) IETF namespace. * main.h: Comments about default algorithms. * photoid.c (image_type_to_string): Comments about 3-letter file extensions.
* * encode.c (encode_simple), passphrase.c (passphrase_to_dek), sign.cDavid Shaw2002-11-244-8/+9
| | | | | | (sign_symencrypt_file): Use --s2k-digest-algo for passphrase mangling rather than --digest-algo.
* * keygen.c (keygen_set_std_prefs): Properly handle an empty preferenceDavid Shaw2002-11-213-30/+40
| | | | | | | | string. * misc.c (string_to_compress_algo): "none" is a bad choice since it conflicts with the "none" in setpref.
* * g10.c (main): Allow compression algorithm names as the argument toDavid Shaw2002-11-153-4/+43
| | | | | | | | | --compress-algo. The old algorithm names still work for backwards compatibility. * misc.c (string_to_compress_algo): Allow "none" as an alias for "uncompressed".
* fixed type incompatibilityStefan Bellon2002-11-132-1/+6
|
* * encode.c (encode_simple): Make sure that files larger than about 4G useDavid Shaw2002-11-136-27/+102
| | | | | | | | | | | | | | | | | | | 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.
* * exec.c [__CYGWIN32__]: Keep cygwin separate from Mingw32; we don't needDavid Shaw2002-11-136-15/+28
| | | | | | | | | | | | | | | 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.
* * keyedit.c (show_key_with_all_names_colon): Make --with-colons --editDavid Shaw2002-11-135-41/+90
| | | | | | | | | | | | | | | | display match the validity and trust of --with-colons --list-keys. * passphrase.c (agent_send_all_options): Fix compile warning. * keylist.c (list_keyblock_colon): Validity for subkeys should match that of the primary key, and not that of the last user ID. * getkey.c (merge_selfsigs): Revoked/expired/invalid primary keys carry these facts onto all their subkeys, but only after the subkey has a chance to be marked valid. This is to fix an incorrect "invalid public key" error verifying a signature made by a revoked signing subkey, with a valid unrevoked primary key.
* * passphrase.c (agent_send_all_options): Use tty_get_ttyname toWerner Koch2002-11-092-2/+7
| | | | | get the default ttyname.
* * keyring.h, keyring.c (keyring_register_filename): Return the pointer ifDavid Shaw2002-11-086-29/+89
| | | | | | | | | | a given keyring is registered twice. * keydb.h, keydb.c (keydb_add_resource): Use flags to indicate a default keyring. (keydb_locate_writable): Prefer the default keyring if possible. * g10.c (main): Add --default-keyring option.
* * options.h, g10.c (main), trustdb.c (ask_ownertrust): AddDavid Shaw2002-11-074-6/+35
| | | | | | | | --force-ownertrust option for debugging purposes. This allows setting a whole keyring to a given trust during an --update-trustdb. Not for normal use - it's just easier than hitting "4" all the time to test a large trustdb.
* * pubkey-enc.c (get_session_key): With hidden recipients or try a givenDavid Shaw2002-11-066-13/+57
| | | | | | | | | | | | | | | passphrase against all secret keys rather than trying all secret keys in turn. Don't if --try-all-secrets or --status-fd is enabled. * passphrase.c (passphrase_to_dek): Mode 1 means do a regular passphrase query, but don't prompt with the key info. * seckey-cert.c (do_check, check_secret_key): A negative ask count means to enable passphrase mode 1. * keydb.h, getkey.c (enum_secret_keys): Add flag to include secret-parts-missing keys (or not) in the list.
* * keyserver.c (keyserver_search_prompt): When --with-colons is enabled,David Shaw2002-11-052-8/+16
| | | | | | don't try and fit the search output to the screen size - just dump the whole list.
* * keyserver.c (keyserver_search_prompt): When --with-colons is enabled,David Shaw2002-11-052-3/+27
| | | | | just dump the raw keyserver protocol to stdout and don't print the menu.
* * trustdb.c (trust_model_string, check_trustdb, update_trustdb,David Shaw2002-11-042-23/+54
| | | | | | | validate_one_keyblock): It's not clear what a trustdb rebuild or check means with a trust model other than "classic" or "openpgp", so disallow this.
* * options.h, g10.c (main): Add --trust-model option. Current models areDavid Shaw2002-11-037-16/+45
| | | | | | | | | | | | | | "openpgp" which is classic+trustsigs, "classic" which is classic only, and "always" which is the same as the current option --always-trust (which still works). Default is "openpgp". * trustdb.c (validate_one_keyblock): Use "openpgp" trust model to enable trust sigs. * gpgv.c (main), mainproc.c (check_sig_and_print), pkclist.c (do_we_trust, do_we_trust_pre, check_signatures_trust): Use new --trust-model option in place of --always-trust.
* * keyedit.c (sign_mk_attrib, trustsig_prompt, sign_uids, keyedit_menu):David Shaw2002-11-034-39/+191
| | | | | | | | | | | Prompt for and create a trust signature with "tsign". This is functional, but needs better UI text. * build-packet.c (build_sig_subpkt): Able to build trust and regexp subpackets. * pkclist.c (do_edit_ownertrust): Comment.
* * keygen.c (set_one_pref, keygen_set_std_prefs): Allow using the fullDavid Shaw2002-11-035-85/+130
| | | | | | | | | | | algorithm name (CAST5, SHA1) rather than the short form (S3, H2). * main.h, keygen.c (keygen_get_std_prefs), keyedit.c (keyedit_menu): Return and use a fake uid packet rather than a string since we already have a nice parser/printer in keyedit.c:show_prefs. * main.h, misc.c (string_to_compress_algo): New.
* * g10.c (main): Add --no-throw-keyid.David Shaw2002-11-016-12/+69
| | | | | | | | | | * keydb.h, encode.c (write_pubkey_enc_from_list), g10.c (main), pkclist.c (build_pk_list): Add --hidden-recipient (-R) and --hidden-encrypt-to, which do a single-user variation on --throw-keyid. The "hide this key" flag is carried in bit 0 of the pk_list flags field. * keyserver.c (parse_keyrec): Fix shadowing warning.
* added RISC OS module loading supportStefan Bellon2002-10-316-13/+37
|
* * build-packet.c (do_plaintext), encode.c (encode_sesskey, encode_simple,David Shaw2002-10-314-5/+12
| | | | | | | encode_crypt), sign.c (write_plaintext_packet): Use wipememory() instead of memset() to wipe sensitive memory as the memset() might be optimized away.
* * trustdb.c (check_regexp): Modern regexps require REG_EXTENDED.David Shaw2002-10-302-1/+5
|
* * packet.h, trustdb.h, trustdb.c (trust_string): New. Return a stringDavid Shaw2002-10-309-37/+334
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* * keyedit.c (print_and_check_one_sig, show_key_and_fingerprint,David Shaw2002-10-297-11/+56
| | | | | | | | | | | | | 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).
* tidied RISC OS filetype supportStefan Bellon2002-10-295-52/+45
|
* filetype support for RISC OSStefan Bellon2002-10-284-8/+66
|