aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Release 2.0.28gnupg-2.0.28Werner Koch2015-06-021-1/+16
|
* po: Auto-updateWerner Koch2015-06-0227-250/+1131
| | | | --
* po: Update Russian translationIneiev2015-06-021-115/+107
| | | | | | | | -- This pacth was missed for 2.0.27. I fixed a typo in the PO-Revision-Date. - wk
* po: Update the German translationWerner Koch2015-06-021-6/+36
| | | | --
* po: Fix a LF mismatch in ja.po.Werner Koch2015-06-021-2/+2
| | | | --
* agent: Make --allow-external-password-cache work.Werner Koch2015-06-022-14/+0
| | | | | | | | | | | * agent/call-pinentry.c (start_pinentry): Remove first instance of sending the option. -- That option to tell Pinentry about an external password cache was send twice and the first one unconditionally. Signed-off-by: Werner Koch <[email protected]>
* agent: Add strings for use by future Pinentry versions.Werner Koch2015-06-021-29/+35
| | | | | | | | | | | | | | * agent/call-pinentry.c (start_pinentry): Add more strings. -- We do this so that translations of these strings will be available at the time a pinentry implements features which require these strings. Signed-off-by: Werner Koch <[email protected]> This is a backport from master commit 02d5e1205489aa5027a87a64552eaf15984dc22d without the mode flag in the table.
* agent: Cleanup caching code for command GET_PASSPHRASE.Werner Koch2015-05-201-1/+1
| | | | | | | | | | | | * agent/command.c (cmd_get_passphrase): Read from the user cache. -- We used to read the passphrase with mode CACHE_MODE_NORMAL but we put it into the cache with CACHE_MODE_USER. However, agent_get_cache does not yet distinguish between them and thus this does not change anything. (backported from commit 23d2ef83cda644c6a83499f9327350d3371e8a17)
* agent: Backport changes from 2.1 to support an external password manager.Neal H. Walfield2015-05-1910-21/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * agent/agent.h (agent_askpin): Add arguments keyinfo and cache_mode. Update callers. (agent_get_passphrase): Likewise. (agent_clear_passphrase): New function. (opt): Add field allow_external_cache. * agent/call-pinentry.c (start_pinentry): Send "OPTION allow-external-password-cache" to the pinentry. (PINENTRY_STATUS_PASSWORD_FROM_CACHE): New constant. (pinentry_status_cb): New function. (agent_askpin): Add arguments keyinfo and cache_mode. If KEYINFO and CACHE_MODE describe a cachable key, then send SETKEYINFO to the pinentry. Pass PINENTRY_STATUS_CB to the "GETPIN" invocation. If the passphrase was incorrect and PINENTRY_STATUS_PASSWORD_FROM_CACHE is set, decrement PININFO->FAILED_TRIES. (agent_get_passphrase): Add arguments keyinfo and cache_mode. If KEYINFO and CACHE_MODE describe a cachable key, then send SETKEYINFO to the pinentry. (agent_clear_passphrase): New function. * agent/call-pinentry.c (start_pinentry): Act upon new var, allow_external_cache. * agent/command.c (cmd_clear_passphrase): Call agent_clear_passphrase. * agent/gpg-agent.c (oNoAllowExternalCache): New. (opts): Add option --no-allow-external-cache. (parse_rereadable_options): Set this option. -- Signed-off-by: Neal H. Walfield <[email protected]> Based on commits: 3a9305439b75ccd4446378d4fd87da087fd9c892 e201c20f25e7bed29088186c5f717d43047a0f4b d7293cb317acc40cc9e5189cef33fe9d8b47e62a 56b5c9f94f2e55d096be585ed061ccf1c9ec0de6 d3b5cad2346bd5747789dc62d7804fa5c15f4f3b 2180845959839705200e3172dbafc94b70b9007f
* g10: detects public key encryption packet error properly.NIIBE Yutaka2015-05-191-3/+3
| | | | | | | | | g10/mainproc.c (proc_pubkey_enc): Only allow relevant algorithms for encryption. -- (backport from 2.1 commit c771963140cad7c1c25349bcde27e427effc0058)
* g10: Improve handling of no corresponding public key.NIIBE Yutaka2015-05-191-0/+12
| | | | | | | | | | | | | | | | | * g10/getkey.c (get_seckey): Return G10ERR_NO_PUBKEY when it's not exact match. -- (ported from 1.4 commit b3fd30451a5464b124b0296afbc341cb98b3977c) In the situation of corrupted .gnupg/ where only private subkey is available but no corresponding public key of the subkey, the code returned public primary key which caused mysterious error (for a user). This fix detects an error earlier. GnuPG-bug-id: 1422 Debian-Bug-Id: #638619
* gpg-connect-agent: Fix quoting of internal percent+ function.Werner Koch2015-05-111-4/+4
| | | | | | | | | * tools/gpg-connect-agent.c (get_var_ext) <percent, percent+): Also escape '+'. -- GnuPG-bug-id: 1841 Signed-off-by: Werner Koch <[email protected]>
* scd: PC/SC reader selection by partial string match.NIIBE Yutaka2015-05-012-10/+21
| | | | | | | | | | | | | | | | | | * scd/apdu.c (open_pcsc_reader_direct): Partial string match. * scd/pcsc-wrapper.c (handle_open): Likewise. -- (backport from 2.1 commit 01a2a61bc4b34817c4216888265f65d59a33dad3) The card reader name by PC/SC service might include USB bus, which varies (on some platform like GNU/Linux). Thus, it's better to match partial string. Original patch was submitted by anstein. I changed it to fallback to the first reader if no match found. GnuPG-bug-id: 1618, 1930
* g10: fix cmp_public_key and cmp_secret_keys.NIIBE Yutaka2015-04-303-10/+18
| | | | | | | | | | * g10/free-packet.c (cmp_public_keys, cmp_secret_keys): Compare opaque data at the first entry of the array when it's unknown algo. * configure.ac (NEED_LIBGCRYPT_VERSION): Require 1.5.0. -- GnuPG-bug-id: 1962
* gpg: Emit status line NEWSIG before signature verification starts.Werner Koch2015-04-162-3/+5
| | | | | | | | | | * g10/mainproc.c (check_sig_and_print): Emit STATUS_NEWSIG. -- gpgsm does this for a long time but somehow it never made it into gpg. Signed-off-by: Werner Koch <[email protected]> (backported from 2.1 commit e7ddaad0fd2c8774a1d3367adfaa68014eaf65de)
* scd: better handling of extended APDU.NIIBE Yutaka2015-04-153-83/+87
| | | | | | | | | | | | | | | | | * scd/apdu.c (send_le): Bug fix for not append Z when lc<0&&le<0. * scd/app-common.h (struct app_ctx_s): Use bit fields for flags. * scd/ccid-driver.c (CCID_MAX_BUF): New. Only for OpenPGPcard. (struct ccid_driver_s): New field of max_ccid_msglen. Remove ifsd field. (parse_ccid_descriptor): Initialize max_ccid_msglen. (ccid_transceive_apdu_level): Implement sending extended APDU in chain of CCID message. -- With this patch, we won't need PC/SC library/service any more. GnuPG-bug-id: 1947 (backported from 2.1 commit 971d558e862db878a7310e06ed7116dbe36886ab)
* gpgparsemail: Fix last commit (3f2bdac)Werner Koch2015-04-151-1/+2
| | | | | | | | | | | | * tools/rfc822parse.c (parse_field): Replace break by goto. -- Brown paper bag bug: Changing an IF to a WHILE inside another loop requires to fix the inner break. Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]> (backported from 2.1 commit 9433661419043431a6cfc7d84c8450e0b2f6c353)
* gpgparsemail: Fix case of zero length continuation lines.Werner Koch2015-04-151-5/+8
| | | | | | | | | | | | | | | | | | | | * tools/rfc822parse.c (parse_field): Loop after continuation line. -- Using header lines like Name:[lf] [space][lf] [lf] resulted in running into the "(s2 = strchr (delimiters2, *s)" branch and inserting a new token for the empty continuation line. This also led to one byte read after the string which is what Hanno figured. The new code should handle empty continuation lines correct. Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]> (backported from 2.1 commit 3fbeba64a8bfb2b673230c124a3d616b6568fd2f)
* agent: Fix length test in sshcontrol parser.Werner Koch2015-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * agent/command-ssh.c (ssh_search_control_file): Check S before upcasing it. -- In contradiction to the comment we did not check the length of HEXGRIP and thus the GPG_ERR_INV_LENGTH was never triggered. Detected by Stack 0.3: bug: anti-simplify model: | %cmp8 = icmp ne i32 %i.0, 40, !dbg !986 --> false stack: - /home/wk/s/gnupg/agent/command-ssh.c:1226:0 ncore: 2 core: - /home/wk/s/gnupg/agent/command-ssh.c:1225:0 - buffer overflow - /home/wk/s/gnupg/agent/command-ssh.c:1225:0 - buffer overflow (backported from 2.1 commit 3529dd8bb5bafc4e02915648d5f409bd27a9cc37)
* scd: Fix possible NULL deref in apdu.cWerner Koch2015-04-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | * scd/apdu.c (control_pcsc_direct): Take care of BUFLEN being NULL. (control_pcsc_wrapped): Ditto. -- pcsc_vendor_specific_init calls the above with BUFFER and BUFLEN as NULL. Reported by Stack 0.3: bug: anti-dce model: | control_pcsc.exit77: %retval.0.i.i76 = phi i32 [ %rc.0.i.i.i73, \ %pcsc_error_to_sw.exit.i.i74 ], [ 0, %if.end.i.i75 ] %tobool198 = icmp ne i32 %retval.0.i.i76, 0, !dbg !728 br i1 %tobool198, label %if.then199, label %if.end200, !dbg !728 stack: - /home/wk/s/gnupg/scd/apdu.c:1882:0 ncore: 1 core: - /home/wk/s/gnupg/scd/apdu.c:1309:0 - buffer overflow (backported from 2.1 commit ef0a3abf7305133d071bf1a94a7f461082f9a9aa)
* po: Update Japanese translation.NIIBE Yutaka2015-04-151-9/+6
|
* gpg: Fix DoS while parsing mangled secret key packets.Werner Koch2015-04-051-7/+43
| | | | | | | | | | | | | | | * g10/parse-packet.c (parse_key): Check PKTLEN before calling mpi_read et al. -- Due to the missing length checks PKTLEN may turn negative. Because PKTLEN is an unsigned int the malloc in read_rest would try to malloc a too large number and terminate the process with "error reading rest of packet: Cannot allocate memory". Reported-by: Hanno Böck. Signed-off-by: Werner Koch <[email protected]> (backported from 2.1 commit d901efcebaefaf6eae4a9b9aa8f0c2c055d3518a)
* doc: Document the changed default algos for gpgsm.Werner Koch2015-03-251-2/+2
| | | | --
* sm: Change default algos to SHA256 (CSR) and AES128 (bulk encryption).Werner Koch2015-03-252-3/+3
| | | | | | | | * sm/certreqgen.c (create_request): Change default hash algo. * sm/gpgsm.c (main): Change default bulk cipher algo. -- Signed-off-by: Werner Koch <[email protected]>
* gpgtar: Fix extracting files with !(size % 512)Andre Heinecke2015-03-171-1/+5
| | | | | | | | | | | | | | | | | | * tools/gpgtar-extract.c (extract_regular): Handle size multiples of RECORDSIZE. -- If a hdr->size was a multiple of 512 the last record would not have been written and the files corrupted accordingly. GnuPG-bug-id: 1926 Signed-off-by: Andre Heinecke <[email protected]> Changed to use only if-else. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 6cbbb0bec98e1acefc4c7163cc41a507469db920)
* common: Check option arguments for a valid rangeWerner Koch2015-03-112-8/+47
| | | | | | | | | | | | | | * common/argparse.h (ARGPARSE_INVALID_ARG): New. * common/argparse.c: Include limits h and errno.h. (initialize): Add error strings for new error constant. (set_opt_arg): Add range checking. -- Signed-off-by: Werner Koch <[email protected]> [ This is a backport of 0d73a242cb53522669cf712b5ece7d1ed05d003a from master to STABLE-BRANCH-2-0 ] Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: New command --list-gcrypt-config.Werner Koch2015-03-111-0/+10
| | | | | | | * g10/gpg.c (aListGcryptConfig): New. (main): Implement command. Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove left-over debug message.Werner Koch2015-02-261-3/+0
| | | | * g10/armor.c (check_input): Remove log_debug.
* Post release updates.Werner Koch2015-02-182-1/+5
| | | | --
* Release 2.0.27gnupg-2.0.27Werner Koch2015-02-184-14/+36
|
* gpg: Remove an unused variable.Werner Koch2015-02-181-1/+0
| | | | * g10/import.c (import): Remove need_armor.
* po: Auto updateWerner Koch2015-02-1829-296/+847
| | | | --
* po: Update German translationWerner Koch2015-02-181-10/+32
|
* curl-shim: clean up varargsDaniel Kahn Gillmor2015-02-181-0/+2
| | | | | | | | | | | | | | | * keyserver/curl-shim.c (curl_easy_setopt) : ensure that va_end is called. -- stdarg(3) says: Each invocation of va_start() must be matched by a corresponding invocation of va_end() in the same function. Observed by Joshua Rogers <[email protected]> Debian-Bug-Id: #773475
* gpg: Print better diagnostics for keyserver operations.Werner Koch2015-02-185-22/+122
| | | | | | | | | | | | | | | | | | | | | | | * g10/armor.c (parse_key_failed_line): New. (check_input): Watch out for gpgkeys_ error lines. * g10/filter.h (armor_filter_context_t): Add field key_failed_code. * g10/import.c (import): Add arg r_gpgkeys_err. (import_keys_internal): Ditto. (import_keys_stream): Ditto. * g10/keyserver.c (keyserver_errstr): New. (keyserver_spawn): Detect "KEY " lines while sending. Get gpgkeys_err while receiving keys. (keyserver_work): Add kludge for better error messages. -- GnuPG-bug-id: 1832 Note that these changes can be backported to 1.4 but they don't make sense for 2.1 due to the removal of the keyserver helpers. The error reporting could be improved even more but given that this is an old GnuPG branch it is not justified to put too much effort into it. Signed-off-by: Werner Koch <[email protected]>
* keyserver: Show log prefix when not build with cURL.Werner Koch2015-02-131-0/+6
| | | | | | | * keyserver/ksutil.c (init_ks_options) [!HAVE_LIBCURL]: Set logging prefix. Signed-off-by: Werner Koch <[email protected]>
* Use inline functions to convert buffer data to scalars.Werner Koch2015-02-1220-275/+310
| | | | | | | | | | | | | | | | * include/host2net.h (buf16_to_ulong, buf16_to_uint): New. (buf16_to_ushort, buf16_to_u16): New. (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New. -- This fixes sign extension on shift problems. Hanno Böck found a case with an invalid read due to this problem. To fix that almost all uses of "<< 24" and "<< 8" are changed by this patch to use an inline function from host2net.h. (back ported from commit 2183683bd633818dd031b090b5530951de76f392) Signed-off-by: Werner Koch <[email protected]>
* build: Update standard build-aux files.Werner Koch2015-02-124-537/+332
| | | | --
* doc: Change remaining http links to gnupg.org to httpsWerner Koch2015-02-123-3/+3
| | | | | -- GnuPG-bug-id: 1830
* gpg: Prevent an invalid memory read using a garbled keyring.Werner Koch2015-02-121-3/+21
| | | | | | | | | | | | | | | | | | | | * g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet types. -- The keyring DB code did not reject packets which don't belong into a keyring. If for example the keyblock contains a literal data packet it is expected that the processing code stops at the data packet and reads from the input stream which is referenced from the data packets. Obviously the keyring processing code does not and cannot do that. However, when exporting this messes up the IOBUF and leads to an invalid read of sizeof (int). We now skip all packets which are not allowed in a keyring. Reported-by: Hanno Böck <[email protected]> (back ported from commit f0f71a721ccd7ab9e40b8b6b028b59632c0cc648)
* gpg: Fix a NULL-deref in export due to invalid packet lengths.Werner Koch2015-02-121-1/+2
| | | | | | | | | | * g10/build-packet.c (write_fake_data): Take care of a NULL stored as opaque MPI. -- Reported-by: Hanno Böck <[email protected]> (back ported from commit 0835d2f44ef62eab51fce6a927908f544e01cf8f)
* gpg: Fix a NULL-deref due to empty ring trust packets.Werner Koch2015-02-121-3/+5
| | | | | | | | | | * g10/parse-packet.c (parse_trust): Always allocate a packet. -- Reported-by: Hanno Böck <[email protected]> Signed-off-by: Werner Koch <[email protected]> (back ported from commit 39978487863066e59bb657f5fe4e8baab510da7e)
* kbx: Fix resource leak.Joshua Rogers2015-02-121-5/+32
| | | | | | | | | | | | | * kbx/keybox-update.c (blob_filecopy): Fix resource leak. On error return, 'fp' and 'newfp' was never closed. -- Signed-off-by: Joshua Rogers <[email protected]> [Log entry reformatted, and added more fixes - gniibe] (cherry picked from commit 7db6c82cec49b7c56c403a8ea98364086baf75f3)
* gpg: Limit the size of key packets to a sensible value.Werner Koch2015-02-121-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | * g10/parse-packet.c (MAX_KEY_PACKET_LENGTH): New. (MAX_UID_PACKET_LENGTH): New. (MAX_COMMENT_PACKET_LENGTH): New. (MAX_ATTR_PACKET_LENGTH): New. (parse_key): Limit the size of a key packet to 256k. (parse_user_id): Use macro for the packet size limit. (parse_attribute): Ditto. (parse_comment): Ditto. -- Without that it is possible to force gpg to allocate large amounts of memory by using a bad encoded MPI. This would be an too easy DoS. Another way to mitigate would be to change the MPI read function to allocate memory dynamically while reading the MPI. However, that complicates and possibly slows down the code. A too large key packet is in any case a sign for broken data and thus gpg should not use it. Reported-by: Hanno Böck GnuPG-bug-id: 1823 Signed-off-by: Werner Koch <[email protected]> (back ported from commit 382ba4b137b42d5f25a7e256bb7c053ee5ac7b64)
* Avoid double-close in unusual dotlock situations.Werner Koch2015-02-121-26/+32
| | | | | | | | | | | | | | | * jnlib/dotlock.c (create_dotlock): Avoid double close due to EINTR. -- close(2) says: close() should not be retried after an EINTR since this may cause a reused descriptor from another thread to be closed. (backported from commit 628b111fa679612e23c0d46505b1ecbbf091897d) Debian-Bug-Id: 773423 Signed-off-by: Werner Koch <[email protected]>
* gpg: Allow predefined names as answer to the keygen.algo prompt.Werner Koch2015-01-282-10/+40
| | | | | | | | * g10/keygen.c (ask_algo): Add list of strings. -- Signed-off-by: Werner Koch <[email protected]> (backported from commit b1d5ed6ac842469afcb84868d0f6641dc286a6c7)
* gpg: Print a warning if the subkey expiration may not be what you want.Werner Koch2015-01-261-1/+59
| | | | | | | | | | | | * g10/keyedit.c (subkey_expire_warning): New. keyedit_menu): Call it when needed. -- GnuPG-bug-id: 1715 The heuristic to detect a problem is not very advanced but it should catch the most common cases. (backported from commit ae3d1bbb65b65cf3c57bb14886be120f5e31635d)
* build: Update to gettext 0.19.3.Werner Koch2015-01-2615-1131/+1533
|
* build: Require automake 1.14.Werner Koch2015-01-264-16/+12
| | | | | | * Makefile.am (AUTOMAKE_OPTIONS): Move to ... * configure.ac (AM_INIT_AUTOMAKE): here. Add option serial-tests. * kbx/Makefile.am (INCLUDES): Remove. Include ../am/cmacros.
* po: Yet another update for Chinese (traditional)Jedi Lin2015-01-261-27/+31
|