aboutsummaryrefslogtreecommitdiffstats
path: root/g10/gpg.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-08-17gpg: Add dummy option --with-subkey-fingerprint.Werner Koch1-0/+5
* g10/gpg.c (opts): Add dummy option. Signed-off-by: Werner Koch <[email protected]>
2016-08-09gpg: Avoid publishing the GnuPG version by defaultDaniel Kahn Gillmor1-1/+1
* g10/gpg.c (main): initialize opt.emit_version to 0 * doc/gpg.texi: document different default for --emit-version -- The version of GnuPG in use is not particularly helpful. It is not cryptographically verifiable, and it doesn't distinguish between significant version differences like 2.0.x and 2.1.x. Additionally, it leaks metadata that can be used to distinguish users from one another, and can potentially be used to target specific attacks if there are known behaviors that differ between major versions. It's probably better to take the more parsimonious approach to metadata production by default. (backport of master commit c9387e41db7520d176edd3d6613b85875bdeb32c) Signed-off-by: Daniel Kahn Gillmor <[email protected]>
2016-06-28g10: Fix --list-packets.NIIBE Yutaka1-2/+1
* g10/gpg.c (main): Call set_packet_list_mode after assignment of opt.list_packets. * g10/mainproc.c (do_proc_packets): Don't stop processing with --list-packets as the comment says. * g10/options.h (list_packets): Fix the comment. * g10/parse-packet.c: Fix the condition for opt.list_packets. -- (backport from 2.0 commit 4f336ed780cc2783395f3ff2b12b3ebb8e097f7b which is backport of master commit 52f65281f9743c42a48bf5a3354c9ab0ecdb681a) Debian-bug-id: 828109 Signed-off-by: NIIBE Yutaka <[email protected]>
2015-12-19gpg: Add option --weak-digest to gpg and gpgv.Daniel Kahn Gillmor1-0/+7
* g10/options.h: Add weak_digests linked list to opts. * g10/main.h: Declare weakhash linked list struct and additional_weak_digest() function to insert newly-declared weak digests into opts. * g10/misc.c: (additional_weak_digest): New function. (print_digest_algo_note): Check for deprecated digests. * g10/sig-check.c: (do_check): Reject all weak digests. * g10/gpg.c: Add --weak-digest option to gpg. * doc/gpg.texi: Document gpg --weak-digest option. * g10/gpgv.c: Add --weak-digest option to gpgv. * doc/gpgv.texi: Document gpgv --weak-digest option. -- gpg and gpgv treat signatures made over MD5 as unreliable, unless the user supplies --allow-weak-digests to gpg. Signatures over any other digest are considered acceptable. Despite SHA-1 being a mandatory-to-implement digest algorithm in RFC 4880, the collision-resistance of SHA-1 is weaker than anyone would like it to be. Some operators of high-value targets that depend on OpenPGP signatures may wish to require their signers to use a stronger digest algorithm than SHA1, even if the OpenPGP ecosystem at large cannot deprecate SHA1 entirely today. This changeset adds a new "--weak-digest DIGEST" option for both gpg and gpgv, which makes it straightforward for anyone to treat any signature or certification made over the specified digest as unreliable. This option can be supplied multiple times if the operator wishes to deprecate multiple digest algorithms, and will be ignored completely if the operator supplies --allow-weak-digests (as before). MD5 is always considered weak, regardless of any further --weak-digest options supplied. Signed-off-by: Daniel Kahn Gillmor <[email protected]> (this is a rough cherry-pick of applying the following commits to STABLE-BRANCH-1-4: 76afaed65e3b0ddfa4923cb577ada43217dd4b18 b98939812abf6c643c752ce7c325f98039a1a9e2 91015d021b3dcbe21ad0e580a4f34c523abf9e72 )
2015-12-19gpg: Reject signatures made with MD5.Werner Koch1-0/+7
* g10/gpg.c: Add option --allow-weak-digest-algos. (main): Set option also in PGP2 mode. * g10/options.h (struct opt): Add flags.allow_weak_digest_algos. * g10/sig-check.c (do_check): Reject MD5 signatures. * tests/openpgp/gpg.conf.tmpl: Add allow_weak_digest_algos. -- (cherry picked from commit f90cfe6b66269de0154d810c5cee1fe9a5af475c) Resolved conflicts: g10/gpg.c - adjust. tests/openpgp/defs.inc - no changes
2015-12-17gpg: Change default cipher for --symmetric from CAST5 to AES-128.Werner Koch1-5/+1
* g10/main.h (DEFAULT_CIPHER_ALGO): Change to AES or CAST5 or 3DES depending on configure options. * g10/gpg.c (main): Set opt.s2k_cipher_algo to DEFAULT_CIPHER_ALGO. -- (cherry picked from commit 57df1121c18b004dd763b35eabf7b51fc9e8ec38) Signed-off-by: Werner Koch <[email protected]>
2015-09-01Obsolete option --no-sig-create-check.Werner Koch1-3/+1
* cipher/rsa.c (rsa_sign): Verify after sign. * g10/gpg.c (opts): Make --no-sig-create-check a NOP. * g10/options.h (opt): Remove field "no_sig_create_check". * g10/sign.c (do_sign): Do check only for DSA. Signed-off-by: Werner Koch <[email protected]>
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.