aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-02-27Release 1.4.19.gnupg-1.4.19Werner Koch1-3/+2
2014-10-03gpg: Add build and runtime support for larger RSA keysDaniel Kahn Gillmor1-1/+21
* configure.ac: Added --enable-large-secmem option. * g10/options.h: Add opt.flags.large_rsa. * g10/gpg.c: Contingent on configure option: adjust secmem size, add gpg --enable-large-rsa, bound to opt.flags.large_rsa. * g10/keygen.c: Adjust max RSA size based on opt.flags.large_rsa * doc/gpg.texi: Document --enable-large-rsa. -- Some older implementations built and used RSA keys up to 16Kib, but the larger secret keys now fail when used by more recent GnuPG, due to secure memory limitations. Building with ./configure --enable-large-secmem will make gpg capable of working with those secret keys, as well as permitting the use of a new gpg option --enable-large-rsa, which let gpg generate RSA keys up to 8Kib when used with --batch --gen-key. Debian-bug-id: 739424 Minor edits by wk. GnuPG-bug-id: 1732
2014-09-29Allow use of --debug-level=LEVEL without '='.Werner Koch1-1/+1
* g10/gpg.c (opts): Fix "debug-level".
2013-12-10Update config.{guess,sub} and some copyright notices.Werner Koch1-0/+1
* scripts/config.guess, scripts/config.sub: Update to version 2013-11-29. Signed-off-by: Werner Koch <[email protected]>
2013-11-27gpg: Change armor Version header to emit only the major version.Werner Koch1-2/+3
* g10/options.h (opt): Rename field no_version to emit_version. * g10/gpg.c (main): Init opt.emit_vesion to 1. Change --emit-version to bump up opt.emit_version. * g10/armor.c (armor_filter): Implement different --emit-version values. -- GnuPG-bug-id: 1572 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit e951782e937ce290be0d89d83e84b3daea997587) Resolved conflicts: NEWS g10/armor.c g10/gpg.c
2013-10-11gpg: Do not require a trustdb with --always-trust.Werner Koch1-5/+3
* g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE. * g10/trustdb.c (trustdb_args): Add field no_trustdb. (init_trustdb): Set that field. (revalidation_mark): Take care of a nonexistent trustdb file. (read_trust_options): Ditto. (get_ownertrust): Ditto. (get_min_ownertrust): Ditto. (update_ownertrust): Ditto. (update_min_ownertrust): Ditto. (clear_ownertrusts): Ditto. (cache_disabled_value): Ditto. (check_trustdb_stale): Ditto. (get_validity): Ditto. * g10/gpg.c (main): Do not create a trustdb with most commands for trust-model always. -- This slightly changes the semantics of most commands in that they won't create a trustdb if --trust-model=always is used. It just does not make sense to create a trustdb if there is no need for it. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 1a0eeaacd1bf09fe5125dbc3f56016bc20f3512e) Resolved conflicts: g10/gpg.c g10/tdbio.h g10/trustdb.c (indentation fixes)
2013-08-02gpg: No need to create a trustdb when encrypting with --always-trust.Werner Koch1-0/+6
* g10/gpg.c (main): Special case setup_trustdb for --encrypt. -- (back ported from commit 498b9a95dc65c43240835d64cc92d8fb43014d53) Signed-off-by: Werner Koch <[email protected]>
2012-12-15Fix potential heap corruption in "gpg -v --version"Werner Koch1-43/+39
* g10/gpg.c (build_list): Rewrite to cope with buffer overflow in certain locales. * util/membuf.c (put_membuf_str): New. (get_membuf): Make LEN optional. -- This fixes an obvious bug in locales where the translated string is longer than the original. The bug could be exhibited by using LANG=ru_RU.utf8 gpg -v --version. En passant we also removed the trailing white space on continued lines. Reported-by: Dmitry V. Levin" <ldv at altlinux.org>
2012-11-08Support the not anymore patented IDEA cipher algorithm.Werner Koch1-50/+8
* cipher/idea.c: New. Take from Libgcrypt master and adjust for direct use in GnuPG. * cipher/idea-stub.c: Remove. * cipher/Makefile.am: Add idea.c and remove idea-stub.c rules. * configure.ac: Remove idea-stub code. * g10/gpg.c (check_permissions): Remove code path for ITEM==2. (main): Make --load-extension a dummy option. * g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2 compatibility mode. * g10/misc.c (idea_cipher_warn): Remove. Also remove all callers. * g10/seckey-cert.c (do_check): Remove emitting of STATUS_RSA_OR_IDEA. * g10/status.c (get_status_string): Remove STATUS_RSA_OR_IDEA. * g10/status.h (STATUS_RSA_OR_IDEA): Remove. -- To keep the number of actually used algorithms low, we support IDEA only in a basically read-only way (unless --pgp2 is used during key generation). It does not make sense to suggest the use of this old 64 bit blocksize algorithm. However, there is old data available where it might be helpful to have IDEA available.
2012-08-24Fix typos spotted during translationsWerner Koch1-2/+2
* g10/gpg.c: uppercase after Syntax * util/secmem.c (print_warn): Update URL.
2012-01-10Replace file locking by the new portable dotlock code.Werner Koch1-2/+2
* include/dotlock.h: New. From current gnupg master. * util/dotlock.c: Ditto. Include util.h. The major changes done in master are: Factor Unix and W32 specific code out into specific functions. Define HAVE_POSIX_SYSTEM. Rearrange some functions. (disable_dotlock): Rename to dotlock_disable. (create_dotlock): Rename to dotlock_create and add a dummy arg. (destroy_dotlock): Rename to dotlock_destroy. (make_dotlock): Rename to dotlock_take. (release_dotlock): Rename to dotlock_release. (remove_lockfiles): Rename to dotlock_remove_lockfiles.
2012-01-10Update copyright years.Werner Koch1-1/+1
* util/argparse.c (default_strusage): Update printed copyright year.
2011-09-12On VMS use --batch by default if in batch mode.Werner Koch1-0/+12
This problem was identified and solved by Steven M. Schweda. Note that the vms specific code is not part of this repository. See http://antinode.info/dec/sw/gnupg.html for the VMS port.
2011-07-01Add pubkey letters e and E for ECC.Werner Koch1-39/+41
This does not mean we have any kind of ECC support now. It is merely to avoid printing a question mark for the algorithm. Trailing white space changes as usual.
2010-10-29* gpg.c (main): Do not provide a default forDavid Shaw1-6/+1
--personal-digest-preferences. This allows the usual digest selection algorithm to pick a digest based on recipient keys.
2010-06-01Ignore some GnuPG-2 only options.Werner Koch1-1/+8
2009-07-31* gpg.c (main): --pgp6 includes --disable-mdc.David Shaw1-0/+1
2009-07-23Parse EXTCAP lines from the card.Werner Koch1-4/+2
Change messages for a corrupt trustdb.
2009-07-21First set of changes to backport the new card code from 2.0.Werner Koch1-0/+1
For compatibility reasons a few new files had to be added. Also added estream-printf as this is now used in app-openpgp.c and provides a better and generic asprintf implementation than the hack we used for the W32 code in ttyio.c. Card code is not yet finished.
2009-06-05Remove Camellia restriction.David Shaw1-9/+1
2009-05-20Fix bug#1044.Werner Koch1-6/+14
2008-12-21* gpg.c (main): Properly handle UTF8 usernames with --sign-key and --lsign-key.David Shaw1-1/+1
2008-07-17Revert that last stupid setuid detection fix.Werner Koch1-1/+1
2008-02-092008-02-09 Marcus Brinkmann <[email protected]>Marcus Brinkmann1-44/+66
* gpg.c (main): New variable default_configname. Use it if save_configname is NULL (can happen if default configfile does not exist). Move default configname determination to ... (get_default_configname): ... this new function.
2007-12-14Fixed a regression in gpg_dermor.gnupg-1.4.8rc2Werner Koch1-0/+3
2007-11-28* gpg.c (print_algo_names): New. (list_config): Use it here for theDavid Shaw1-1/+35
"ciphername" and "digestname" config items so we can get a script-parseable list of the names.
2007-10-23Switched to GPLv3.Werner Koch1-4/+2
Updated gettext.
2007-10-23* gpg.c (main): Add --require-cross-certification toDavid Shaw1-2/+3
--openpgp/--rfc4880 mode.
2007-10-23* gpg.c (main): Disable --rfc2440-text and --force-v3-sigs by default.David Shaw1-9/+9
Enable --require-cross-certification by default. --openpgp (--rfc4880) is the same as --rfc2440 except with "--enable-dsa2 --no-rfc2440-text --escape-from-lines".
2007-10-17* options.h, gpg.c (main), misc.c (compliance_option_string): AddDavid Shaw1-1/+24
--rfc4880, and make --openpgp an alias to it. --rfc2440 now stands alone. For now, use the old 2440 defaults for 4880. * keyedit.c (keyedit_menu): Use compliance_option_string() instead of printing the compliance modes here.
2007-07-19* gpg.c (main): Fix typo. Noted by John Clizbe.David Shaw1-1/+1
2007-07-09Add an extra warning for Camellia.Werner Koch1-0/+8
Minor W32 fix Address change.
2007-04-16* gpg.c, pkclist.c: #include <strings.h> for strcasecmp if it isDavid Shaw1-2/+5
present. Note that autoconf protects us against a strings.h that cannot be used together with string.h.
2007-03-05Preparing 1.4.7gnupg-1.4.7Werner Koch1-4/+15
2007-02-01* main.h, keygen.c (ask_expire_interval, parse_expire_string): Pass inDavid Shaw1-2/+2
the time to use to calculate the expiration offset, rather than querying it internally. Change all callers.
2006-12-13Removed references to removed g10defs.h file.Werner Koch1-1/+0
2006-12-11Removed the use of g10defs.h.Werner Koch1-1/+1
This required some code cleanups and the introduction of a few accessor ducntions in mpi.
2006-12-03* options.h, gpg.c (main), passphrase.c (passphrase_to_dek): AddDavid Shaw1-0/+4
--passphrase-repeat option to control how many times gpg will re-prompt for a passphrase to ensure the user has typed it correctly. Defaults to 1.
2006-10-23New command --gpgconf-test.Werner Koch1-0/+6
2006-10-13* parse-packet.c (parse_symkeyenc): Show the unpacked as well as theDavid Shaw1-0/+32
packed s2k iteration count. * main.h, options.h, gpg.c (encode_s2k_iterations, main), passphrase.c (hash_passphrase): Add --s2k-count option to specify the number of s2k hash iterations.
2006-06-27do no use reopen_std under W32.Werner Koch1-2/+2
2006-06-22* options.h, gpg.c (main), keygen.c (keygen_upd_std_prefs,David Shaw1-0/+15
keygen_add_std_prefs, proc_parameter_file): Add --default-keyserver-url to specify a keyserver URL at key generation time, and "Keyserver:" keyword for doing the same through a batch file.
2006-05-23* gpg.c (reopen_std): New function to reopen fd 0, 1, or 2 if we areDavid Shaw1-0/+62
called with them closed. This is to protect our keyring/trustdb files from corruption if they get attached to one of the standard fds. Print a warning if possible that this has happened, and fail completely if we cannot reopen (should never happen). (main): Call it here.
2006-04-20* options.h, gpg.c (main): Add --enable-dsa2 and --disable-dsa2. DefaultsDavid Shaw1-0/+7
to disable. * pkclist.c (algo_available): If --enable-dsa2 is set, we're allowed to truncate hashes to fit DSA keys. * sign.c (match_dsa_hash): New. Return the best match hash for a given q size. (do_sign, hash_for, sign_file): When signing with a DSA key, if it has q==160, assume it is an old DSA key and don't allow truncation unless --enable-dsa2 is also set. q!=160 always allows truncation since they must be DSA2 keys. (make_keysig_packet): If the user doesn't specify a --cert-digest-algo, use match_dsa_hash to pick the best hash for key signatures.
2006-04-20* gpg.c (print_mds), armor.c (armor_filter, parse_hash_header): AddDavid Shaw1-3/+18
SHA-224. * sign.c (write_plaintext_packet), encode.c (encode_simple): Factor common literal packet setup code from here, to... * main.h, plaintext.c (setup_plaintext_name): Here. New. Make sure the literal packet filename field is UTF-8 encoded. * options.h, gpg.c (main): Make sure --set-filename is UTF-8 encoded and note when filenames are already UTF-8.
2006-04-09* getkey.c (parse_auto_key_locate): Fix dupe-removal code.David Shaw1-3/+8
* keyedit.c (menu_backsign): Allow backsigning even if the secret subkey doesn't have a binding signature. * armor.c (radix64_read): Don't report EOF when reading only a pad (=) character. The EOF actually starts after the pad. * gpg.c (main): Make --export, --send-keys, --recv-keys, --refresh-keys, and --fetch-keys follow their arguments from left to right. Suggested by Peter Palfrader.
2006-04-03About to release 1.4.3gnupg-1.4.3Werner Koch1-0/+2
2006-03-08* options.h, sign.c (mk_notation_policy_etc), gpg.c (add_notation_data):David Shaw1-60/+13
Use it here for the various notation commands. * packet.h, main.h, keygen.c (keygen_add_notations), build-packet.c (string_to_notation, sig_to_notation) (free_notation): New "one stop shopping" functions to handle notations and start removing some code duplication.
2006-03-08* options.h, mainproc.c (check_sig_and_print), gpg.c (main):David Shaw1-7/+9
pka-lookups, not pka-lookup. * options.h, gpg.c (main), keyedit.c [cmds], sig-check.c (signature_check2): Rename "backsign" to "cross-certify" as a more accurate name.
2006-03-07* options.h, gpg.c (main, parse_trust_model), pkclist.cDavid Shaw1-39/+9
(check_signatures_trust), mainproc.c (check_sig_and_print, pka_uri_from_sig), trustdb.c (init_trustdb): Some tweaks to PKA so that it is a verify-option now.