summaryrefslogtreecommitdiffstats
path: root/g10/g10.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* * options.h, mainproc.c (symkey_decrypt_seskey), keyserver.c (structDavid Shaw2004-05-101-4/+4
| | | | | | keyrec, parse_keyrec, keyserver_search_prompt), keyedit.c (keyedit_menu), g10.c (add_keyserver_url, add_policy_url): Fix some compiler warnings.
* * keyedit.c (keyedit_menu, menu_set_keyserver_url): Allow passingDavid Shaw2004-05-081-2/+2
| | | | | | | | | | preferred keyserver on "keyserver" command line. Sanity check keyserver URL before accepting it. * keyserver-internal.h, g10.c (main), keyserver.c (parse_keyserver_uri): Add an option to require the scheme:// and change all callers. (free_keyserver_spec): Make public.
* * keylist.c (show_notation): Use bits to select which sort of notation toDavid Shaw2004-05-051-1/+7
| | | | | | | | | | show. Don't allow a not-shown notation to prevent us from issuing the proper --status-fd message. * options.h, g10.c (main): Add show-std/standard-notations and show-user-notations. show-notations is both. Default is to show standard notations only during verify. Change all callers.
* A bunch of changes for the openpgp card.Werner Koch2004-04-271-0/+8
|
* * options.h, g10.c (main): Add keyserver-option honor-keyserver-url.David Shaw2004-04-191-2/+9
| | | | | | | | | | | | | | | | | | parse_keyserver_options now returns a success code. * keyserver.c (parse_keyserver_options): Return error on failure to parse. Currently there is no way to fail as any unrecognized options get saved to be sent to the keyserver plugins later. Check length of keyserver option tokens since with =arguments we must only match the prefix. (free_keyserver_spec): Moved code from parse_keyserver_url. (keyserver_work, keyserver_spawn): Pass in a struct keyserver_spec rather than using the global keyserver option. (calculate_keyid_fpr): New. Fills in a KEYDB_SEARCH_DESC for a key. (keyidlist): New implementation using get_pubkey_bynames rather than searching the keydb directly. If honor-keyserver-url is set, make up a keyserver_spec and try and fetch that key directly. Do not include it in the returned keyidlist in that case.
* * plaintext.c (handle_plaintext): Accept 'u' as a plaintext mode thatDavid Shaw2004-04-161-0/+3
| | | | | | | | | | | | | | | | | | requires end of line conversion. This is being considered for a UTF8 text packet. If this doesn't take place, no major harm done. If it does take place, we'll get a jump on starting the changeover. * g10.c (main): --no-use-embedded-filename. * build-packet.c (calc_plaintext, do_plaintext): Do not create illegal (packet header indicates a size larger than the actual packet) encrypted data packets when not compressing and using a filename longer than 255 characters. * keyedit.c (no_primary_warning): Cleanup. (menu_expire): Don't give primary warning for subkey expiration changes. These cannot reorder primaries.
* * options.h, keyserver.c (parse_keyserver_options): Remove duplicate codeDavid Shaw2004-04-151-5/+7
| | | | | | | | | 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/+3
| | | | | | | 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
|
* * options.h, g10.c (main), compress-bz2.c (init_uncompress): RenameDavid Shaw2004-03-251-5/+5
| | | | | | --bzip2-compress-lowmem to --bzip2-decompress-lowmem since it applies to decompression, not compression.
* * trustdb.c (update_min_ownertrust, validate_keys): Do not use keystrDavid Shaw2004-03-201-1/+1
| | | | | | | | | | | | | | | 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.
* * revoke.c (export_minimal_pk), export.c (do_export_stream), passphrase.cDavid Shaw2004-03-051-10/+2
| | | | | | | | | | | (passphrase_to_dek), keyserver.c (print_keyrec): A few more places to use --keyid-format. * options.h, g10.c (main), export.c (parse_export_options, do_export_stream): Remove --export-all and the "include-non-rfc" export-option as they are no longer meaningful with the removal of v3 Elgamal keys.
* * options.h, g10.c (main), mainproc.c (check_sig_and_print): RemoveDavid Shaw2004-03-031-1/+0
| | | | | | verify-option show-long-keyids and replace with the more general keyid-format.
* * options.h, g10.c (main): Add a more flexible --keyid-format option toDavid Shaw2004-03-031-1/+15
| | | | | | | | | | | | replace the list-option (and eventually verify-option) show-long-keyids. The format can be short, long, 0xshort, and 0xlong. * keydb.h, keyid.c (keystr, keystrlen): New functions to generate a printable keyid. * keyedit.c (print_and_check_one_sig, show_key_with_all_names), keylist.c (list_keyblock_print): Use new keystr() function here to print keyids.
* * plaintext.c: Copyright.David Shaw2004-02-251-13/+20
| | | | | | | | | | | | | | * encode.c (encode_simple): Show cipher with --verbose. * options.h, g10.c (main), keyedit.c (sign_keys): Add --ask-cert-level option to enable cert level prompts during sigs. Defaults to on. Simplify --default-cert-check-level to --default-cert-level. If ask-cert-level is off, or batch is on, use the default-cert-level as the cert level. * options.h, g10.c (main), trustdb.c (mark_usable_uid_certs): Simplify --min-cert-check-level to --min-cert-level.
* * options.h, g10.c (main), trustdb.c (mark_usable_uid_certs): AddDavid Shaw2004-02-231-4/+10
| | | | | | --min-cert-check-level option to specify minimum cert check level. Defaults to 2 (so 0x11 sigs are ignored). 0x10 sigs cannot be ignored.
* * options.h, g10.c (main), plaintext.c (handle_plaintext): AddDavid Shaw2004-02-191-0/+3
| | | | | --max-output option to help people deal with decompression bombs.
* * keyserver.c (argsep): Move to misc.c.David Shaw2004-02-141-19/+19
| | | | | | | * 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.
* * main.h, keyedit.c (keyedit_menu): Remove sign_mode and enhance the moreDavid Shaw2004-02-121-25/+29
| | | | | | | | general command list functionality to replace it. * g10.c (main): Use the general command functionality to implement --sign-key, --lsign-key, --nrsign-key, and --nrlsign-key.
* * options.h, g10.c (main), keylist.c (list_keyblock_print): AddDavid Shaw2004-02-111-0/+2
| | | | | | "show-unusable-subkeys" list-option to show revoked and/or expired subkeys.
* * keygen.c (keygen_set_std_prefs): Build the default preferences list atDavid Shaw2004-02-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | runtime as it properly handles algorithms disabled at build or run time. * getkey.c (merge_selfsigs_main): Properly handle expired user IDs when the expired self-sig is not the only self-sig. * misc.c (compress_algo_to_string): Return NULL on failure like all of the other xxxx_algo_to_string() functions. * mainproc.c (list_node): Minor spacing tweak to match --list-keys output. * keylist.c (list_keyblock_print), mainproc.c (list_node): Mark revoked subkeys as revoked. Requested by Matthew Wilcox. Revoked overrides expiration when both apply. * keyedit.c (show_prefs): Use compress algo constants. (show_basic_key_info): Make revoked and expired tags translatable. * g10.c (rm_group): Properly ungroup from a list of groups.
* * g10.c (main, rm_group): Add --ungroup command to remove a particularDavid Shaw2004-01-301-7/+55
| | | | | | | | | | | | group. (add_group): When adding a group with the same name as an already existing group, merge the two groups. (list_config): Show an error message when listing a config item that doesn't exist. (main): Replace -z0 trick for no compression. * packet.h, keyedit.c (show_key_with_all_names_colon), keylist.c (list_keyblock_colon), mainproc.c (list_node, proc_tree): Minor cleanup to remove local_id, which is no longer used.
* * mainproc.c (list_node): Show sigs with --verbose.David Shaw2004-01-241-0/+26
| | | | | | | | | * options.h, g10.c (set_screen_dimensions): New function to look at COLUMNS and LINES. * keyserver.c (parse_keyrec, keyserver_search_prompt), keyedit.c (print_and_check_one_sig): Use new screen dimension variables.
* * g10.c (list_config): New function to dump config options to stdout.David Shaw2004-01-221-13/+155
| | | | | | | | | Currently requires --with-colons. (collapse_args): New function to turn argc/argv into a single string. (main): Use it here to pass list_config() more than one argument as a single string. (print_algo_numbers): Helper to print algorithm number for --list-config "pubkey", "cipher", "hash"/"digest", and "compress" config options.
* * g10.c (main), keydb.h, keydb.c (keydb_rebuild_caches), keyring.h,David Shaw2004-01-201-1/+1
| | | | | | | | | | | keyring.c (keyring_rebuild_cache): Add "noisy" flag so cache rebuilds can remain noisy when called for itself, and quiet when called as part of the trustdb rebuild. * trustdb.c (validate_keys): Rebuild the sig caches before building the trustdb. Note that this is going to require some architectual re-thinking, as it is agonizingly slow.
* * options.h, g10.c (main), import.c (parse_import_options, import_one,David Shaw2003-12-311-1/+5
| | | | | | import_secret_one), keyserver.c (keyserver_refresh): Change --merge-only to --import-option merge-only. Deprecate --merge-only.
* * options.h, g10.c (main), keyserver.c (keyserver_opts,David Shaw2003-12-281-3/+2
| | | | | | | parse_keyserver_uri): honor-http-proxy is no longer an option since we can do the same thing with http-proxy with no arguments. Also remove broken-http-proxy since it can be better handled in the HTTP helper.
* cleaned up RISC OS code and removed lots of unnecessary stuffStefan Bellon2003-12-281-5/+0
|
* * 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.
* * g10.c (strusage, main): Show development version warning in --versionDavid Shaw2003-12-041-7/+25
| | | | | | output. (main): Set --bzip2-compress-level to the default value at startup. Remove --emulate-checksum-bug noop.
* * options.h, g10.c (main), main.h, seskey.c (do_encode_md,David Shaw2003-12-041-5/+0
| | | | | | | encode_md_value), sig-check.c (do_check), sign.c (do_sign): Remove --emulate-md-encode-bug as it only applied to Elgamal signatures, which are going away.
* * options.h, g10.c (main), compress-bz2.c (init_uncompress): AddDavid Shaw2003-11-181-0/+3
| | | | | | --bz2-compress-lowmem to set bzlib "small" flag for low memory (but slow) decompression.
* * compress.c (init_compress): Remove compress level 10 trick, since it isDavid Shaw2003-11-161-1/+1
| | | | | | | | | | no longer needed. * g10.c: Fix typoed option name. * compress-bz2.c (init_compress): Compression level 0 is not meaningful for bzip2.
* * options.h, g10.c (main), compress.c (init_compress), compress-bz2.cDavid Shaw2003-11-151-22/+27
| | | | | | (init_compress): Add --compress-level and --bzip2-compress-level. -z sets them both. Change various callers.
* * options.h, g10.c, keyedit.c, keylist.c, mainproc.c: Clarify theDavid Shaw2003-11-141-25/+25
| | | | | plurarility (or not) of various list and verify options.
* * g10.c (main): Add --symmetric --sign --encrypt.David Shaw2003-11-131-1/+34
| | | | | | | | | | | | * main.h, encode.c (setup_symkey): New. Prompt for a passphrase and create a DEK for symmetric encryption. (write_symkey_enc): New. Write out symmetrically encrypted session keys. (encode_crypt, encrypt_filter): Use them here here when creating a message that can be decrypted with a passphrase or a pk. * sign.c (sign_file): Call setup_symkey if we are doing a --symmetric --sign --encrypt.
* * mainproc.c (proc_symkey_enc): Don't show algorithm information whenDavid Shaw2003-11-101-0/+5
| | | | | | | | --quiet is set. Suggested by Duncan Harris. Also don't fail with BUG() when processing a --symmetric message with a cipher we don't have. * g10.c: Alias --personal-xxx-prefs to --personal-xxx-preferences.
* * trustdb.h, trustdb.c (register_trusted_keyid): New. Adds a keyid to theDavid Shaw2003-11-011-4/+6
| | | | | | | | | | | | | | | | | | | | list of ultimately trusted keys. * keygen.c (do_generate_keypair): Use it here so that the ultimate ownertrust happens before the trustdb (might be) rebuilt. Also fix an error where the newly generated pk is thought to be a subkey by the trustdb. * g10.c (main): Fix --export-all do actually do something different than --export. * pkclist.c (build_pk_list): Show all recipients rather than showing each recipient as they are added. * mainproc.c (proc_symkey_enc, proc_encrypted): Keep a count of the number of passphrases that can decrypt a symmetric or mixed symmetric/pk message and include it in the list of keys shown to the user.
* * misc.c (compress_algo_to_string, string_to_compress_algo,David Shaw2003-10-311-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* * g10.c (main): Enhance the version-specific config file code to try forDavid Shaw2003-10-261-7/+27
| | | | | more specific matches before giving up (e.g. 1.3.3-cvs, 1.3.3, 1.3, 1).
* * g10.c (main): Add --symmetric --encrypt command. This generates aDavid Shaw2003-10-261-3/+31
| | | | | | | | | | | | | | | | | | | | | message that can be decrypted via a passphrase or public key system. * main.h, encode.c (encode_seskey): Allow passing in an already-created session key dek. (encode_simple): Use the actual symmetric cipher when encrypting a session key for a symmetric message. (encode_crypt): Add a flag to trigger a hybrid mode that can be decrypted via a passphrase or a pk. Change all callers. * mainproc.c (symkey_decrypt_sesskey): There is no way to tell the difference here between a bad passphrase and a cipher algorithm that we don't have, so use a error message that makes that clear. Use the actual list of ciphers when checking whether a cipher is invalid. Return error if the decrypted cipher algorithm is invalid. (proc_symkey_enc): In a mixed passphrase/pk message, if a valid dek already exists from decrypting via pk, do not try to process the passphrase. (proc_symkey_enc): Indicate when we're decrypting a session key as opposed to decrypting data. If a passphrase is invalid, discard the dek so we'll keep trying.
* * g10.c (main) [ENABLE_CARD_SUPPORT]: Add a default forWerner Koch2003-10-251-0/+8
| | | | | | | --pcsc-driver. * cardglue.c (learn_status_cb): Fixed faulty use of !space.
* * passphrase.c (ask_passphrase): Add optional promptid arg.Werner Koch2003-10-211-1/+1
| | | | | | | | | | | | | | | | | | | Changed all callers. * cardglue.c (pin_cb): Use it here, so the machine interface can tell whether the Admin PIN is requested. * cardglue.c (agent_scd_checkpin): New. * misc.c (openpgp_pk_algo_usage): Added AUTH usage. * app-openpgp.c (check_against_given_fingerprint): New. Factored out that code elsewhere. (do_check_pin): New. * card-util.c (card_edit): New command "passwd". Add logic to check the PIN in advance. (card_status): Add new args to return the serial number. Changed all callers.
* * import.c (import_one): Show the keyid when giving the Elgamal slowDavid Shaw2003-10-151-1/+4
| | | | | | | | import warning. * g10.c (main): Older versions used --comment "" to indicate no comment. Don't add an empty comment.
* * cardglue.c (card_close): New.Werner Koch2003-10-101-0/+3
| | | | | | | | | * ccid-driver.c (ccid_close_reader): New. * apdu.c (close_ccid_reader, close_ct_reader, close_csc_reader) (close_osc_reader, apdu_close_reader): New. Not all are properly implemented yet. * g10.c (g10_exit): Use close_card.
* * primegen.c (gen_prime): Bail out if we try to generate a primeWerner Koch2003-10-101-1/+1
| | | | | | | with less than 16 bits. Include i18n.h. * POTFILES.in (cipher/primegen.c): Added.
* * g10.c (main): Give a deprecated option warning for --show-keyring,David Shaw2003-10-101-2/+30
| | | | | | | | | | | --show-photos, --show-policy-url, --show-notation, and their respective no- forms. * options.skel: Remove show-photos and replace with list/verify-options show-photos. Remove no-mangle-dos-filenames. * misc.c (parse_options): Allow for incomplete (but unambiguous) options.
* * cardglue.c (pin_cb): Detect whether an admin or regular PIN isWerner Koch2003-10-081-3/+4
| | | | | | | | | | | | | | | | | | | | requested. (genkey_status_cb): New. (agent_scd_genkey): Implemented. * keygen.c (generate_keypair): New arg CARD_SERIALNO and prepare parameters for on card key generation. Changed all callers. (do_generate_keypair): Add new arg card and merged casrd specific changes from 1.9. (proc_parameter_file): New arg card, apss it down to do_generate_keypair and changed all callers. (gen_card_key): New. * g10.c: Include cardclue.h. (main): s/app_set_default_reader_port/card_set_reader_port/. * cardglue.c (card_set_reader_port): New to address include file issues.
* * g10.c (main): Add --no-groups to zero --group list.David Shaw2003-10-011-6/+22
| | | | | | | | | | | | | | * encode.c (encode_simple): Allow for 32 bytes (256 bits) of symmetrically encrypted session key. Use --s2k-cipher-algo to choose cipher, rather than the default cipher. * parse-packet.c (parse_subkeyenc): Give a warning if an symmetrically encrypted session key is seen without salt. Show in --list-packets if a symetrically encrypted session key is present. * pubkey-enc.c (get_it): Always show cipher-not-in-prefs warning unless --quiet is set. Use text name of cipher in warning.
* * options.h, g10.c (main), mainproc.c (check_sig_and_print): AddDavid Shaw2003-09-301-0/+1
| | | | | --verify-option show-unusable-uids.