aboutsummaryrefslogtreecommitdiffstats
path: root/g10 (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-10-04gpg: Print a "not found" message for an unknown key in --key-edit.Werner Koch1-0/+4
* g10/keyedit.c (keyedit_menu): Print message. -- GnuPG-bug-id: 1420 Signed-off-by: Werner Koch <[email protected]>
2013-10-04gpg: Kludge not to bail out on ECC if build with Libgcrypt 1.6.Werner Koch1-7/+36
* g10/misc.c (print_pubkey_algo_note): Map the algo. (openpgp_pk_test_algo, openpgp_pk_test_algo2): Ditto. (pubkey_get_npkey, pubkey_get_nskey, pubkey_get_nsig) (pubkey_get_nenc): Return 0 for ECC algorithms. -- Libgcrypt 1.6 features algorithm 18 (generic ECC). Because of the missing mapping and no real support for the OpenPGP ECC format, this led to parsing errors of ECC packets. We better better explicitly tell gpg that we ECC is not supported. Signed-off-by: Werner Koch <[email protected]>
2013-10-04gpg: Protect against rogue keyservers sending secret keys.Werner Koch3-10/+22
* g10/options.h (IMPORT_NO_SECKEY): New. * g10/keyserver.c (keyserver_spawn, keyserver_import_cert): Set new flag. * g10/import.c (import_secret_one): Deny import if flag is set. -- By modifying a keyserver or a DNS record to send a secret key, an attacker could trick a user into signing using a different key and user id. The trust model should protect against such rogue keys but we better make sure that secret keys are never received from remote sources. Suggested-by: Stefan Tomanek Signed-off-by: Werner Koch <[email protected]>
2013-10-04gpg: Allow setting of all zero key flagsDaniel Kahn Gillmor1-3/+0
* g10/keygen.c (do_add_key_flags): Do not check for empty key flags. (cherry picked from commit b693ec02c467696bf9d7324dd081e279f9965151)
2013-10-04gpg: Distinguish between missing and cleared key flags.Werner Koch1-1/+7
* include/cipher.h (PUBKEY_USAGE_NONE): New. * g10/getkey.c (parse_key_usage): Set new flag. -- We do not want to use the default capabilities (derived from the algorithm) if any key flags are given in a signature. Thus if key flags are used in any way, the default key capabilities are never used. This allows to create a key with key flags set to all zero so it can't be used. This better reflects common sense. (cherry picked from commit 4bde12206c5bf199dc6e12a74af8da4558ba41bf)
2013-10-04Remove trailing white space from some files.Daniel Kahn Gillmor2-216/+216
--
2013-10-04gpg: Limit the nesting level of I/O filters.Werner Koch1-30/+48
* common/iobuf.c (MAX_NESTING_FILTER): New. (iobuf_push_filter2): Limit the nesting level. * g10/mainproc.c (mainproc_context): New field ANY. Change HAVE_DATA and ANY_SIG_SIGN to bit fields of ANY. Add bit field UNCOMPRESS_FAILED. (proc_compressed): Avoid printing multiple Bad Data messages. (check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA. -- This is a more general fix for the nested compression packet bug. In particular this helps g10/import.c:read_block to stop pushing compression filters onto an iobuf stream. This patch also reduces the number of error messages for the non-import case. Signed-off-by: Werner Koch <[email protected]>
2013-10-02gpg: Fix bug with deeply nested compressed packets.Werner Koch1-9/+43
* g10/mainproc.c (MAX_NESTING_DEPTH): New. (proc_compressed): Return an error code. (check_nesting): New. (do_proc_packets): Check packet nesting depth. Handle errors from check_compressed. Signed-off-by: Werner Koch <[email protected]>
2013-08-30gpg: Use 2048 as the default keysize in batch mode.Werner Koch1-7/+7
* g10/keygen.c (gen_elg, gen_dsa, gen_rsa): Set default keysize to 2048. Signed-off-by: Werner Koch <[email protected]>
2013-08-19gpgv: Init Libgcrypt to avoid syslog warning.Werner Koch1-4/+13
* g10/gpgv.c (main): Check libgcrypt version and disable secure memory. -- GnuPG-bug-id: 1376 Signed-off-by: Werner Koch <[email protected]>
2013-08-06gpg: Remove legacy keyserver examples from the template conf file.Werner Koch1-9/+2
* g10/options.skel: Update.
2013-08-02gpg: No need to create a trustdb when encrypting with --always-trust.Werner Koch1-7/+20
* g10/gpg.c (main): Special case setup_trustdb for --encrypt. -- Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 498b9a95dc65c43240835d64cc92d8fb43014d53)
2013-05-07w32: Add icons and version information.Ian Abbott2-3/+56
* common/gnupg.ico: New. Take from artwork/gnupg-favicon-1.ico. * agent/gpg-agent-w32info.rc: New. * g10/gpg-w32info.rc: New. * scd/scdaemon-w32info.rc: New. * sm/gpgsm-w32info.rc: New. * tools/gpg-connect-agent-w32info.rc: New. * common/w32info-rc.h.in: New. * configure.ac (BUILD_REVISION, BUILD_FILEVERSION, BUILD_TIMESTAMP) (BUILD_HOSTNAME): New. (AC_CONFIG_FILES): Add w32info-rc.h. * am/cmacros.am (.rc.o): New rule. * agent/Makefile.am, common/Makefile.am, g10/Makefile.am * scd/Makefile.am, sm/Makefile.am, tools/Makefile.am: Add stuff to build resource files. Signed-off-by: Werner Koch <[email protected]>
2013-04-25Fix a typo and a wrong code indentation.Jedi1-2/+2
-- Reported-by: NIIBE Yutaka <[email protected]>
2013-04-23w32: Almost everywhere include winsock2.h before windows.h.Werner Koch4-106/+118
-- This is required by newer mingw toolchain versions which demand that winsock2.h is included before windows.h. Now, due to the use of socket definitions in pth.h we need to include winsock2.h also in pth.h, now pth.h is often included after an include of windows.h and thus the compiler spits out a warning. To avoid that we include winsock2.h at all places the compiler complains about.
2013-04-22Fix potential heap corruption in "gpg -v --version".Werner Koch1-43/+40
* g10/gpg.c (build_list): Rewrite to cope with buffer overflow in certain locales. -- 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> (cherry picked from commit e33e74e3a4b2b4a0341f933410ddd5db7a12515e) Note that this version uses utf8_charcount to get the indentation mostly right. Signed-off-by: Werner Koch <[email protected]>
2013-04-22Comment fixes.Werner Koch1-3/+3
-- Reported-by: Daniel Kahn Gillmor
2013-01-11gpg: Fix honoring --cert-digest-algo when recreating a certChristian Aistleitner1-0/+2
* g10/sign.c (update_keysig_packet): Override original signature's digest algo in hashed data and for hash computation.
2013-01-03gpg: Detect Keybox files and print a diagnostic.Werner Koch2-3/+35
* g10/keydb.c (KEYDB_RESOURCE_TYPE_KEYBOX): New. (keydb_add_resource): Handle scheme "gnupg-kbx:". Detect Keybox magic. Print wanrning note for Keybox. (keydb_new, keydb_release, keydb_get_resource_name) (lock_all, unlock_all, keydb_get_keyblock) (keydb_update_keyblock, keydb_insert_keyblock, keydb_delete_keyblock) (keydb_locate_writable, keydb_rebuild_caches, keydb_search_reset) (keydb_search2): Ignore Keybox type in switches. * g10/gpg.h (G10ERR_UNSUPPORTED): Map to correct gpg-error value. -- GnuPG 2.1 will support Keybox files in GPG and thus users might see weird error messages if they accidentally use a keybox file with 2.0. Better print a note here.
2013-01-03Remove trailing white space from some files.Werner Koch2-85/+85
--
2012-12-20gpg: Import only packets which are allowed in a keyblock.Werner Koch1-1/+22
* g10/import.c (valid_keyblock_packet): New. (read_block): Store only valid packets. -- A corrupted key, which for example included a mangled public key encrypted packet, used to corrupt the keyring. This change skips all packets which are not allowed in a keyblock. GnuPG-bug-id: 1455 (cherry-picked from commit 3a4b96e665fa639772854058737ee3d54ba0694e)
2012-12-19gpg: Make commit 258192d4 actually workWerner Koch1-2/+3
* g10/sign.c (update_keysig_packet): Use digest_algo.
2012-12-19gpg: Suppress "public key already present" in quiet mode.Werner Koch1-4/+6
* g10/pkclist.c (build_pk_list): Print two diagnostics only in non-quiet mode. -- (back-ported from commit 8325d616593187ff227853de0295e3269b96edcb)
2012-12-19Remove trailing white space from a fileWerner Koch1-62/+62
--
2012-11-29The keyserver search menu should honor --keyid-formatDavid Shaw1-5/+11
* keyserver.c (print_keyrec): Honor --keyid-format when getting back full fingerprints from the keyserver (the comment in the code was correct, the code was not).
2012-11-27Fix printing of ECC algo names in hkp keyserver listings.Werner Koch3-55/+72
* g10/misc.c (map_pk_openpgp_to_gcry): New. * g10/keyserver.c (print_keyrec): Map OpenPGP algorithm ids. -- Although we don't have support for ECC, we want to print a proper algorithm name in keyserver listings. This will only work while using a ECC enabled Libgcrypt. Problem reported by Kristian Fiskerstrand.
2012-11-06Allow decryption with card keys > 3072 bitWerner Koch1-8/+14
* scd/command.c (MAXLEN_SETDATA): New. (cmd_setdata): Add option --append. * g10/call-agent.c (agent_scd_pkdecrypt): Use new option for long data * scd/app-openpgp.c (struct app_local_s): Add field manufacturer. (app_select_openpgp): Store manufacturer. (do_decipher): Print a note for broken cards. -- Please note that I was not able to run a full test because I only have broken cards (S/N < 346) available.
2012-08-24Fix typos spotted during translationsDavid Prévot1-2/+2
agent/genkey.c: s/to to/to/ sm/*.c: s/failed to allocated/failed to allocate/ sm/certlist.c: s/should have not/should not have/ Consistency fix: * g10/gpg.c, kbx/kbxutil.c, sm/gpgsm.c: uppercase after Syntax
2012-08-24Actually show translators comments in PO filesDavid Prévot2-6/+6
2012-05-24Add provisions to build with Libgcrypt 1.6.Werner Koch5-73/+73
Replace gcry_md_start_debug by gcry_md_debug in all files. * agent/gpg-agent.c (fixed_gcry_pth_init): Use only if GCRY_THREAD_OPTION_VERSION is 0 * scd/scdaemon.c (fixed_gcry_pth_init): Ditto. -- Libgcrypt 1.6 will have some minor API changes. In particular some deprecated macros and functions will be removed. PTH will also be dropped in favor of a thread model neutral locking method.
2012-05-24Print the hash algorithm in colon mode key listing.Werner Koch1-9/+5
* g10/keylist.c (list_keyblock_colon): Print digest_algo.
2012-03-26Allow compressed data with algorithm 0.Werner Koch1-36/+34
* g10/mainproc.c (proc_compressed): Remove superfluous check for an algorithm number of 0. This is bug#1326.
2012-02-01Honor --cert-digest-algo when recreating a cert.David Shaw1-2/+7
* g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when recreating a cert. This is used by various things in --edit-key like setpref, primary, etc. Suggested by Christian Aistleitner.
2012-01-31gpg: Add a DECRYPTION_INFO status.Werner Koch1-21/+30
* common/status.h (STATUS_DECRYPTION_INFO): New. * g10/encr-data.c: Include status.h. (decrypt_data): Emit STATUS_DECRYPTION_INFO line. -- DECRYPTION_INFO <mdc_method> <sym_algo> Print information about the symmetric encryption algorithm and the MDC method. This will be emitted even if the decryption fails.
2012-01-20Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)David Shaw6-18/+34
* g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level * g10/trustdb.c (check_trustdb_stale): Request a rebuild if pending_check_trustdb is true (set when we detect a trustdb parameter has changed). * g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons listing for min_cert_level not matching. * g10/tdbio.c (tdbio_update_version_record, create_version_record, tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record, tdbio_write_record): Add a byte for min_cert_level in the tdbio version record.
2011-12-15Merge fix for issue 1331 from 1.4.David Shaw1-3/+2
* photoid.c (generate_photo_id): Check for the JPEG magic numbers instead of JFIF since some programs generate an EXIF header first.
2011-12-02Generate the ChangeLog from commit logs.Werner Koch2-13/+20
* scripts/gitlog-to-changelog: New script. Taken from gnulib. * scripts/git-log-fix: New file. * scripts/git-log-footer: New file. * scripts/git-hooks/commit-msg: New script. * autogen.sh: Install commit-msg hook for git. * doc/HACKING: Describe the ChangeLog policy. * ChangeLog: New file. * Makefile.am (EXTRA_DIST): Add new files. (gen-ChangeLog): New. (dist-hook): Run gen-ChangeLog. Rename all ChangeLog files to ChangeLog-2011.
2011-08-04Removed some set but unused variables.Werner Koch4-97/+100
2011-07-29Do not print read-only trustdb warning with --quiet.Werner Koch2-4/+8
This is only a warning and gpg would anyway print an error message if it tries to write to the trustdb.
2011-07-22Print the decoded iteration count with --list-packets.Werner Koch2-20/+27
Fixes bug#1355.
2011-07-07Allow generation of card keys up to 4096 bit.Werner Koch2-61/+121
This patch implementes a chunk mode to pass the key parameters from scdaemon to gpg. This allows to pass arbitrary long key paremeters; it is used for keys larger than 3072 bit.
2011-07-01Provide pubkey letters e and EWerner Koch2-20/+25
This is only to print those letters instead of a question mark. It does not mean ECC is or will be supported in this branch.
2011-06-13Fix a for a bug fix in the latest Libgcrypt.Werner Koch2-171/+177
* pkglue.c (mpi_from_sexp, pk_decrypt): Use GCRYMPI_FMT_USG for gcry_sexp_nth_mpi. This fixes a problem with a recent bug fix in Libgcrypt.
2011-01-10Fix bug#1307.Werner Koch4-8/+16
2010-10-29* pkclist.c (select_algo_from_prefs): Make sure the scores can'tDavid Shaw2-18/+44
overflow when picking an algorithm (not a security issue since we can't pick something not present in all preference lists, but we might pick something that isn't scored first choice). * pkclist.c (select_algo_from_prefs): Slightly improve the handling of MD5 in preference lists. Instead of replacing MD5 with SHA-1, just remove MD5 from the list altogether, and let the next-highest ranked algorithm be chosen.
2010-09-29Fix memory leakWerner Koch2-1/+3
2010-09-29Add missing space to Assuan commandWerner Koch3-8/+18
2010-09-28fix for bug1234.Werner Koch2-1/+5
2010-09-28Allow more hash algorithms with the OpenPGP card.Werner Koch2-2/+25
2010-09-24Fix bug 1285Werner Koch1-0/+3