1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-06-28 02:12:46 +02:00
Commit Graph

262 Commits

Author SHA1 Message Date
David Shaw
a9b00b06d1 * options.h, import.c, keyserver-internal.h, g10.c, mainproc.c,
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 21:33:45 +00:00
David Shaw
2286674b9e * options.h: Encapsulate keyserver details. Change all callers. 2004-04-14 17:56:23 +00:00
David Shaw
80c8b0c3a4 * options.h, g10.c (main), compress-bz2.c (init_uncompress): Rename
--bzip2-compress-lowmem to --bzip2-decompress-lowmem since it applies to
decompression, not compression.
2004-03-25 22:43:51 +00:00
David Shaw
36a5e54e54 * trustdb.c (update_min_ownertrust, validate_keys): Do not use keystr
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-19 23:15:27 +00:00
David Shaw
1e01514529 * revoke.c (export_minimal_pk), export.c (do_export_stream), passphrase.c
(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.
2004-03-05 00:01:25 +00:00
David Shaw
c562c9e837 * options.h, g10.c (main), mainproc.c (check_sig_and_print): Remove
verify-option show-long-keyids and replace with the more general
keyid-format.
2004-03-03 20:54:03 +00:00
David Shaw
2d7fe1d3a1 * options.h, g10.c (main): Add a more flexible --keyid-format option to
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.
2004-03-03 05:47:51 +00:00
David Shaw
a84fe549da * plaintext.c: Copyright.
* 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.
2004-02-24 23:37:18 +00:00
David Shaw
643665c963 * options.h, g10.c (main), trustdb.c (mark_usable_uid_certs): Add
--min-cert-check-level option to specify minimum cert check level.
Defaults to 2 (so 0x11 sigs are ignored).  0x10 sigs cannot be ignored.
2004-02-23 04:00:51 +00:00
David Shaw
6c13b96a1d * options.h, g10.c (main), plaintext.c (handle_plaintext): Add
--max-output option to help people deal with decompression bombs.
2004-02-18 23:09:27 +00:00
David Shaw
c9aa5000d7 * keyserver.c (argsep): Move to misc.c.
* 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 05:03:45 +00:00
David Shaw
76f579b233 * main.h, keyedit.c (keyedit_menu): Remove sign_mode and enhance the more
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.
2004-02-12 18:32:09 +00:00
David Shaw
aa5f1940ff * options.h, g10.c (main), keylist.c (list_keyblock_print): Add
"show-unusable-subkeys" list-option to show revoked and/or expired
subkeys.
2004-02-11 13:46:23 +00:00
David Shaw
9842d84da0 * keygen.c (keygen_set_std_prefs): Build the default preferences list at
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.
2004-02-10 22:42:34 +00:00
David Shaw
0030198cad * g10.c (main, rm_group): Add --ungroup command to remove a particular
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.
2004-01-30 16:49:28 +00:00
David Shaw
385a19bd7b * mainproc.c (list_node): Show sigs with --verbose.
* 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.
2004-01-24 00:47:45 +00:00
David Shaw
f7447eabea * g10.c (list_config): New function to dump config options to stdout.
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.
2004-01-22 03:47:05 +00:00
David Shaw
0fb284ac24 * g10.c (main), keydb.h, keydb.c (keydb_rebuild_caches), keyring.h,
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.
2004-01-20 16:09:38 +00:00
David Shaw
2a785147be * options.h, g10.c (main), import.c (parse_import_options, import_one,
import_secret_one), keyserver.c (keyserver_refresh): Change --merge-only
to --import-option merge-only.  Deprecate --merge-only.
2003-12-31 04:58:52 +00:00
David Shaw
48238805b9 * options.h, g10.c (main), keyserver.c (keyserver_opts,
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.
2003-12-28 16:08:04 +00:00
Stefan Bellon
02ae08d6ef cleaned up RISC OS code and removed lots of unnecessary stuff 2003-12-28 14:12:16 +00:00
David Shaw
392e6da660 * main.h, misc.c (parse_options): Add a "noisy" flag to enable and disable
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-28 03:46:43 +00:00
David Shaw
189dea77ea * g10.c (strusage, main): Show development version warning in --version
output. (main): Set --bzip2-compress-level to the default value at
startup.  Remove --emulate-checksum-bug noop.
2003-12-04 04:58:12 +00:00
David Shaw
3c40fd65d6 * options.h, g10.c (main), main.h, seskey.c (do_encode_md,
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.
2003-12-04 04:34:08 +00:00
David Shaw
dcf747d620 * options.h, g10.c (main), compress-bz2.c (init_uncompress): Add
--bz2-compress-lowmem to set bzlib "small" flag for low memory (but slow)
decompression.
2003-11-18 02:52:35 +00:00
David Shaw
2e4ab6c669 * compress.c (init_compress): Remove compress level 10 trick, since it is
no longer needed.

* g10.c: Fix typoed option name.

* compress-bz2.c (init_compress): Compression level 0 is not meaningful
for bzip2.
2003-11-15 23:54:14 +00:00
David Shaw
995d712589 * options.h, g10.c (main), compress.c (init_compress), compress-bz2.c
(init_compress): Add --compress-level and --bzip2-compress-level.  -z sets
them both.  Change various callers.
2003-11-15 22:31:58 +00:00
David Shaw
80caf9957f * options.h, g10.c, keyedit.c, keylist.c, mainproc.c: Clarify the
plurarility (or not) of various list and verify options.
2003-11-14 05:06:19 +00:00
David Shaw
bc1e4357a9 * g10.c (main): Add --symmetric --sign --encrypt.
* 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.
2003-11-13 02:54:12 +00:00
David Shaw
5028edd538 * mainproc.c (proc_symkey_enc): Don't show algorithm information when
--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.
2003-11-10 04:33:13 +00:00
David Shaw
5c37fd90bf * trustdb.h, trustdb.c (register_trusted_keyid): New. Adds a keyid to the
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.
2003-11-01 01:13:16 +00:00
David Shaw
869c6bb7e4 * misc.c (compress_algo_to_string, string_to_compress_algo,
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-31 05:39:02 +00:00
David Shaw
ce4c9b6b5f * g10.c (main): Enhance the version-specific config file code to try for
more specific matches before giving up (e.g. 1.3.3-cvs, 1.3.3, 1.3, 1).
2003-10-26 15:49:44 +00:00
David Shaw
bb7986e9a6 * g10.c (main): Add --symmetric --encrypt command. This generates a
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.
2003-10-26 03:26:14 +00:00
Werner Koch
bc45e6e065 * g10.c (main) [ENABLE_CARD_SUPPORT]: Add a default for
--pcsc-driver.

* cardglue.c (learn_status_cb): Fixed faulty use of !space.
2003-10-25 14:17:24 +00:00
Werner Koch
441aeb85f2 * passphrase.c (ask_passphrase): Add optional promptid arg.
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.
2003-10-21 18:22:21 +00:00
David Shaw
6ad91b2b3a * import.c (import_one): Show the keyid when giving the Elgamal slow
import warning.

* g10.c (main): Older versions used --comment "" to indicate no comment.
Don't add an empty comment.
2003-10-14 23:30:14 +00:00
Werner Koch
5a0fbad9b3 * cardglue.c (card_close): New.
* 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.
2003-10-10 15:12:02 +00:00
Werner Koch
3cfffa8a4e * primegen.c (gen_prime): Bail out if we try to generate a prime
with less than 16 bits. Include i18n.h.

* POTFILES.in (cipher/primegen.c): Added.
2003-10-10 09:28:26 +00:00
David Shaw
40db05fb99 * g10.c (main): Give a deprecated option warning for --show-keyring,
--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.
2003-10-10 03:05:05 +00:00
Werner Koch
72c648c035 * cardglue.c (pin_cb): Detect whether an admin or regular PIN is
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.
2003-10-08 15:21:20 +00:00
David Shaw
b0fe35f60e * g10.c (main): Add --no-groups to zero --group list.
* 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.
2003-10-01 15:15:58 +00:00
David Shaw
cb772decc4 * options.h, g10.c (main), mainproc.c (check_sig_and_print): Add
--verify-option show-unusable-uids.
2003-09-30 21:16:36 +00:00
Werner Koch
e369270a65 * g10.c (main): New commands --card-edit, --card-status and
--change-pin.  New options --ctapi-driver, --pcsc-driver and
--disable-ccid
* options.h (DBG_CARD_IO): New.
* cardglue.c, cardclue.h: Enhanced.
* card-util.c: New. Taken from current the gnupg 1.9 branch.
* app-common.h, app-openpgp.c, iso7816.c, iso7816.h, apdu.c
* apdu.h, ccid-driver.c, ccid-driver.h: New.  Takem from the current
gnupg 1.9 branch withy minor changes to include directives.
* Makefile.am: Added these files.
2003-09-28 13:41:58 +00:00
David Shaw
e70e41612f * options.h, g10.c (main), keylist.c (list_keyblock_print): Add
"show-unusable-uids" list-option to show revoked and/or expired user IDs.
2003-09-25 04:03:11 +00:00
David Shaw
97dcb84cce * sign.c (mk_notation_policy_etc): Capitalize "URL".
* trustdb.c (validate_keys): Give a little more information while
rebuilding trustdb.

* pkclist.c (do_edit_ownertrust): Clarify "don't know".

* g10.c (main): Default to --no-mangle-dos-filenames.
2003-09-24 03:48:55 +00:00
David Shaw
b224756fbe * g10.c (main): Deprecate --default-comment in favor of --no-comments.
* options.h, g10.c (main), armor.c (armor_filter): Allow using --comment
multiple times to get multiple Comment: header lines. --no-comments resets
list.
2003-09-23 03:52:55 +00:00
David Shaw
eb18893c8c * g10.c (main): Trim --help to commonly used options. Remove -f. 2003-09-12 03:29:00 +00:00
David Shaw
405d9dfc59 * g10.c (main): Error out if --multifile is used with the commands that
don't support it yet (--sign, --clearsign, --detach-sign, --symmetric, and
--store).

* g10.c (main): Add --multifile as an alias to turn --encrypt into
--encrypt-files (plus --verify-files, --decrypt-files).

* encode.c (use_mdc), g10.c (main): Use RFC1991 and RFC2440 directly to
check for MDC usability.  Do not set the force_mdc or disable_mdc flags
since there is no point any longer.
2003-09-09 00:25:53 +00:00
David Shaw
fe0de7bcaa * armor.c (parse_hash_header, armor_filter), g10.c (print_hex, print_mds),
pkclist.c (algo_available): Drop TIGER/192 support.
2003-09-04 12:03:04 +00:00