aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* agent: Replace some sprintf.Werner Koch2014-12-023-18/+8
| | | | | | | | | * agent/call-scd.c (agent_card_pksign): Replace sprintf by bin2hex. * agent/command-ssh.c (ssh_identity_register): Ditto. * agent/pkdecrypt.c (agent_pkdecrypt): Replace sprintf by put_membuf_printf. Signed-off-by: Werner Koch <[email protected]>
* tools: Improve watchgnupg portability.Werner Koch2014-12-012-1/+4
| | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Check for sys.select.h * tools/watchgnupg.c: Include it. -- It seems http://www.musl-libc.org/ is quite limited and requires the use sys/select.h instead of unistd.h et al.
* gpg: Fix export bug using exact search with only one key in the keybox.Werner Koch2014-12-013-1/+7
| | | | | | | | * g10/export.c (do_export_stream): Disable caching. * g10/keyserver.c (keyidlist): Ditto. -- GnuPG-bug-id: 1774
* scd: Implement socket redirection.Werner Koch2014-12-012-27/+69
| | | | | | | | | | | | * scd/scdaemon.c (ENAMETOOLONG): New. (redir_socket_name): New. (cleanup): Take care of a redirected socket. (main): Pass redir_socket_name to create_server_socket. (create_socket_name): Remove superfluous length check. (create_server_socket): Add arg r_redir_name and implement redirection. Replace assert for older Assuan by an error message. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Implement socket redirection.Werner Koch2014-12-011-12/+48
| | | | | | | | | | * dirmngr/dirmngr.c (ENAMETOOLONG): new. (redir_socket_name): New. (main): Add Assuan socket redirection. (cleanup): Adjust cleanup for redirection. -- Signed-off-by: Werner Koch <[email protected]>
* agent: Fix compile problem for old Libassuan.Werner Koch2014-12-011-1/+0
| | | | --
* agent: Implement socket redirection.Werner Koch2014-11-281-38/+86
| | | | | | | | | | | * agent/gpg-agent.c (ENAMETOOLONG): New. (redir_socket_name, redir_socket_name_extra) (redir_socket_name_ssh): New. (remove_socket): Take care of the redir names. (main): Pass the redir names to create_server_socket. (create_socket_name): Remove length check - that is anyway done later. (create_server_socket): Add arg r_redir_name and implement redirection if Libassuan is at least 2.14.
* gpg: Change another BUG() call to a regular error message.Werner Koch2014-11-281-6/+11
| | | | | | * g10/mainproc.c (proc_tree): Replace BUG by a proper error messages. Signed-off-by: Werner Koch <[email protected]>
* Add option --no-autostart.Werner Koch2014-11-2811-8/+81
| | | | | | | | | | | | | | * g10/gpg.c: Add option --no-autostart. * sm/gpgsm.c: Ditto. * g10/options.h (opt): Add field autostart. * sm/gpgsm.h (opt): Ditto. * g10/call-agent.c (start_agent): Print note if agent was not autostarted. * sm/call-agent.c (start_agent): Ditto. * g10/call-dirmngr.c (create_context): Likewise. * sm/call-dirmngr.c (start_dirmngr_ext): Ditto. Signed-off-by: Werner Koch <[email protected]>
* gpg-agent: Add restricted connection feature.Мирослав Николић2014-11-276-145/+312
| | | | | | | | | | | | | | | | | | | | | | | * agent/agent.h (opt): Add field extra_socket. (server_control_s): Add field restricted. * agent/command.c: Check restricted flag on many commands. * agent/gpg-agent.c (oExtraSocket): New. (opts): Add option --extra-socket. (socket_name_extra): New. (cleanup): Cleanup that socket name. (main): Implement oExtraSocket. (create_socket_name): Add arg homedir and change all callers. (create_server_socket): Rename arg is_ssh to primary and change callers. (start_connection_thread): Take ctrl as arg. (start_connection_thread_std): New. (start_connection_thread_extra): New. (handle_connections): Add arg listen_fd_extra and replace the connection starting code by parameterized loop. * common/asshelp.c (start_new_gpg_agent): Detect the use of the restricted mode and don't fail on sending the pinentry environment. * common/util.h (GPG_ERR_FORBIDDEN): New.
* agent: Make auditing of the option list easier.Мирослав Николић2014-11-271-73/+81
| | | | * agent/gpg-agent.c (opts): Use ARGPARSE_ macros.
* dirmngr: Only report hkps scheme when availableKristian Fiskerstrand2014-11-261-1/+9
| | | | | | | | | | | | | | | | * dirmngr/ks-engine-hkp.c (ks_hkp_help): Make use of TLS macros. -- Only report support for the hkps scheme when GnuPG / dirmngr has been built with a TLS library. This helps debuging and enable the user to detect whether support for hkps is included by doing a `gpg-connect-agent --dirmngr 'keyserver --help' /bye`. Currently hkps will be listed as a supported scheme but trying to add a keyserver using it will silently fail. As a digression, https is never listed as a valid scheme.
* gpg: Change a bug() call to a regular error message.Werner Koch2014-11-261-1/+6
| | | | | | | | | * g10/decrypt-data.c (decrypt_data): Return an error code instead of calling BUG(). -- This code path can be triggered by fuzzing gpg and thus with some likeness also by corrupt messages for other reasons.
* Fix buffer overflow in openpgp_oid_to_str.Werner Koch2014-11-252-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | * common/openpgp-oid.c (openpgp_oid_to_str): Fix unsigned underflow. * common/t-openpgp-oid.c (BADOID): New. (test_openpgp_oid_to_str): Add test cases. -- The code has an obvious error by not considering invalid encoding for arc-2. A first byte of 0x80 can be used to make a value of less then 80 and we then subtract 80 from that value as required by the OID encoding rules. Due to the unsigned integer this results in a pretty long value which won't fit anymore into the allocated buffer. The fix is obvious. Also added a few simple test cases. Note that we keep on using sprintf instead of snprintf because managing the remaining length of the buffer would probably be more error prone than assuring that the buffer is large enough. Getting rid of sprintf altogether by using direct conversion along with membuf_t like code might be possible. Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]> Ported from libksba commit f715b9e156dfa99ae829fc694e5a0abd23ef97d7
* build: Require libgpg-error 1.16.Werner Koch2014-11-241-1/+1
| | | | | | | -- 1.15 has a bug which will lead to a segv when sending keys. Better updated the requirements to avoid bug reports.
* gpg: Fix use of uninit.value in listing sig subpkts.Werner Koch2014-11-241-1/+5
| | | | | | | | | | | | | * g10/parse-packet.c (dump_sig_subpkt): Print regex subpacket sanitized. -- We may not use "%s" to print an arbitrary buffer. At least "%.*s" should have been used. However, it is in general preferable to escape control characters while printf user data. Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix off-by-one read in the attribute subpacket parser.Werner Koch2014-11-241-2/+10
| | | | | | | | | * g10/parse-packet.c (parse_attribute_subpkts): Check that the attribute packet is large enough for the subpacket type. -- Reported-by: Hanno Böck Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix batch generation of ECC keys.Werner Koch2014-11-241-0/+8
| | | | | | | | | | | | * g10/keygen.c (get_parameter_algo): Map ECC algorithm strings directly. -- Interactive generation of the keys uses the OpenPGP algorithms numbers but batch generation allows the use of strings. Reported-by: Gaetan Bisson. Signed-off-by: Werner Koch <[email protected]>
* doc: Update dirmngr.texiWerner Koch2014-11-241-57/+82
| | | | --
* Distinguish between ARGPARSE_AMBIGUOUS_{OPTION,COMMAND}Daniel Kahn Gillmor2014-11-241-1/+1
| | | | | | | | | | | * common/argparse.c (initialize): Use correct value. -- This avoids a dead path in the argparse code. It's not clear that this is needed, however, since ARGPARSE_AMBIGUOUS_COMMAND is never actually used in the code. Another approach would be to trim out ARGPARSE_AMBIGUOUS_COMMAND entirely.
* gpg: Refer to --throw-keyids instead of --throw-keyidDaniel Kahn Gillmor2014-11-241-1/+1
| | | | | | | | * g10/encrypt.c: adjust error message -- The full option name is --throw-keyids, so we should refer to it consistently.
* speedo: Distribute installer graphics.Werner Koch2014-11-241-0/+2
| | | | --
* Update NEWSWerner Koch2014-11-211-0/+22
| | | | --
* gpg: Track number of skipped v3 keys on import.Werner Koch2014-11-212-15/+53
| | | | | | | | | * g10/import.c (stats_s): Add field v3keys. (import): Update this field. (import_print_stats): Print v3 key count. (read_block): Skip v3 keys and return a count for them. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix regression in parse_key.Werner Koch2014-11-211-3/+6
| | | | | | | * g10/parse-packet.c (parse): Better return just the gpg_err_code. (parse_key): Return the error code. Signed-off-by: Werner Koch <[email protected]>
* speedo: Add simple logos to the installer.Werner Koch2014-11-216-24/+39
| | | | | | | | | | | | * build-aux/speedo/w32/README.txt: Include GnuPG Readme. * build-aux/speedo/w32/gnupg-logo-150x57.bmp: New. * build-aux/speedo/w32/gnupg-logo-164x314.bmp: New. * build-aux/speedo/w32/inst.nsi: Add logos. * build-aux/speedo.mk ($(bdir)/NEWS.tmp): Extract news items. -- The welcome page logo is basically a placeholder until someone has created a pretty one.
* speedo: Add libadns to the Windows installer.Werner Koch2014-11-201-0/+15
| | | | --
* gpg: Fix hash detection for ECDSA.Werner Koch2014-11-201-4/+3
| | | | | | | | | | | | | * g10/sign.c (sign_file): Use DSA or ECDSA and not DSA|EdDSA. -- This error was introduced with commit b7f8dec6325f1c80640f878ed3080bbc194fbc78 while separating EdDSA from ECDSA. Found due to a related bug report from Brian Minton. Signed-off-by: Werner Koch <[email protected]>
* Fix linker problem on OS X.Werner Koch2014-11-201-3/+6
| | | | | | | | * common/init.c (default_errsource): Move to the .data segmemt. -- See mails starting at http://lists.gnupg.org/pipermail/gnupg-devel/2014-November/029089.html
* gpg-connect-agent: Add convenience option --uiserver.Werner Koch2014-11-191-0/+10
|
* po: Update German translation.Werner Koch2014-11-191-11/+13
| | | | --
* Comment typo fixes.Werner Koch2014-11-192-3/+3
| | | | --
* Add "gpgconf --kill dirmngr" and avoid useless launch before a kill.Werner Koch2014-11-199-35/+88
| | | | | | | | | | | | | | * common/asshelp.c (start_new_gpg_agent): Add arg autostart. Change all callers to use 1 for it. (start_new_dirmngr): Ditto. * tools/gpg-connect-agent.c: Add option --no-autostart. (main): Default autostart to 1. (start_agent): Implement no-autostart. * tools/gpgconf-comp.c (gpg_agent_runtime_change): Use --no-autostart. (scdaemon_runtime_change): Ditto. (dirmngr_runtime_change): New. Signed-off-by: Werner Koch <[email protected]>
* common: Change a string to a simlar one to ease translation.Werner Koch2014-11-191-1/+1
| | | | --
* po: Update Ukrainian translation.Werner Koch2014-11-191-117/+65
| | | | --
* po: Copied missing translations from the 2.0 branch.Werner Koch2014-11-1925-38360/+61681
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * po/LINGUAS: Add new translations. -- Note that be.ru and pt_BR.po have not been copied because they have way too less translated strings (74, 290 out of 2054). The current stats are: ca.po: 464 translated, 1024 fuzzy translations, 566 untranslated. cs.po: 1719 translated, 317 fuzzy translations, 18 untranslated. da.po: 1468 translated, 444 fuzzy translations, 142 untranslated. de.po: 2052 translated, 1 fuzzy translation, 1 untranslated message. el.po: 460 translated, 1025 fuzzy translations, 569 untranslated. eo.po: 331 translated, 1109 fuzzy translations, 614 untranslated. es.po: 1455 translated, 461 fuzzy translations, 138 untranslated. et.po: 460 translated, 1025 fuzzy translations, 569 untranslated. fi.po: 460 translated, 1025 fuzzy translations, 569 untranslated. fr.po: 2052 translated, 1 fuzzy translation, 1 untranslated message. gl.po: 458 translated, 1044 fuzzy translations, 552 untranslated. hu.po: 460 translated, 1025 fuzzy translations, 569 untranslated. id.po: 460 translated, 1025 fuzzy translations, 569 untranslated. it.po: 460 translated, 1025 fuzzy translations, 569 untranslated. ja.po: 2022 translated, 23 fuzzy translations, 9 untranslated. nb.po: 684 translated, 635 fuzzy translations, 735 untranslated. pl.po: 1469 translated, 443 fuzzy translations, 142 untranslated. pt.po: 400 translated, 1057 fuzzy translations, 597 untranslated. ro.po: 874 translated, 726 fuzzy translations, 454 untranslated. ru.po: 1257 translated, 478 fuzzy translations, 319 untranslated. sk.po: 460 translated, 1025 fuzzy translations, 569 untranslated. sv.po: 1452 translated, 458 fuzzy translations, 144 untranslated. tr.po: 1386 translated, 494 fuzzy translations, 174 untranslated. uk.po: 2016 translated, 27 fuzzy translations, 11 untranslated. zh_CN.po: 927 translated, 690 fuzzy translations, 437 untranslated. zh_TW.po: 1471 translated, 447 fuzzy translations, 136 untranslated.
* po: Update Japanese Translation.NIIBE Yutaka2014-11-181-9/+12
| | | | | | -- Fixing previous commit.
* po: Update Japanese Translation.NIIBE Yutaka2014-11-181-242/+52
| | | | --
* gpg: Fix a NULL-deref for invalid input data.Werner Koch2014-11-171-3/+8
| | | | | | | | | * g10/mainproc.c (proc_encrypted): Take care of canceled passpharse entry. -- GnuPG-bug-id: 1761 Signed-off-by: Werner Koch <[email protected]>
* speedo: Install -dev files for the libraries.Werner Koch2014-11-131-0/+38
| | | | --
* po: Auto-update.Werner Koch2014-11-134-12/+48
| | | | --
* gpg: Make the use of "--verify FILE" for detached sigs harder.Werner Koch2014-11-135-51/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/openfile.c (open_sigfile): Factor some code out to ... (get_matching_datafile): new function. * g10/plaintext.c (hash_datafiles): Do not try to find matching file in batch mode. * g10/mainproc.c (check_sig_and_print): Print a warning if a possibly matching data file is not used by a standard signatures. -- Allowing to use the abbreviated form for detached signatures is a long standing bug which has only been noticed by the public with the release of 2.1.0. :-( What we do is to remove the ability to check detached signature in --batch using the one file abbreviated mode. This should exhibit problems in scripts which use this insecure practice. We also print a warning if a matching data file exists but was not considered because the detached signature was actually a standard signature: gpgv: Good signature from "Werner Koch (dist sig)" gpgv: WARNING: not a detached signature; \ file 'gnupg-2.1.0.tar.bz2' was NOT verified! We can only print a warning because it is possible that a standard signature is indeed to be verified but by coincidence a file with a matching name is stored alongside the standard signature. Reported-by: Simon Nicolussi (to gnupg-users on Nov 7) Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix a missing LF in debug output.Werner Koch2014-11-131-0/+2
| | | | | | * g10/kbnode.c (dump_kbnode): Print a LF. Signed-off-by: Werner Koch <[email protected]>
* gpg: Re-indent two files.Werner Koch2014-11-132-1051/+1153
| | | | --
* gpg: Remove PGP-2 related cruft.Werner Koch2014-11-136-52/+11
| | | | | | | | | | | | | | | | | | | | * g10/armor.c (parse_hash_header,carmor_filter): Ignore MD5 in hash header. (fake_packet): Remove pgp-2 workaround for white space stripping. * g10/filter.h (armor_filter_context_t): Remove field pgp2mode. * g10/options.h (opt): Remove field pgp2_workarounds. * g10/gpg.c (main): Do not set this field. * g10/gpgv.c (main): Ditto. * g10/mainproc.c (proc_encrypted): Use SHA-1 as fallback s2k hash algo. Using MD5 here is useless. (proc_plaintext): Remove PGP-2 related woraround (proc_tree): Remove another workaround but keep the one for PGP-5. -- The removed code was either not anymore used or its use would have caused an error message later anyway. Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve perceived speed of secret key listings.Werner Koch2014-11-121-0/+2
| | | | | | * g10/keylist.c (list_keyblock): Flush stdout for secret keys. Signed-off-by: Werner Koch <[email protected]>
* gpg: Fix regression in --refresh-keysWerner Koch2014-11-122-20/+89
| | | | | | | | | | | | | | | | * g10/keyserver.c (keyserver_get): Factor all code out to ... (keyserver_get_chunk): new. Extimate line length. (keyserver_get): Split up requests into chunks. -- Note that refreshing all keys still requires way to much memory because we build an in-memory list of all keys first. It is required to first get a list of all keys to avoid conflicts while updating the key store in the process of receiving keys. A better strategy would be a background process and tracking the last update in the key store. GnuPG-bug-id: 1755 Signed-off-by: Werner Koch <[email protected]>
* gpg: Add import options "keep-ownertrust".Werner Koch2014-11-123-2/+22
| | | | | | | | | | | | * g10/options.h (IMPORT_KEEP_OWNERTTRUST): New. * g10/import.c (parse_import_options): Add "keep-ownertrust". (import_one): Act upon new option. -- This option is in particular useful to convert from a pubring.gpg to the new pubring.kbx in GnuPG 2.1 or vice versa: gpg1 --export | gpg2 --import-options keep-ownertrust --import
* Remove use of gnulib (part 2)Werner Koch2014-11-1110-15/+177
| | | | | | | | | | | | | | | | * configure.ac (strpbrk): Add to AC_CHECK_FUNCS. (gl_EARLY): Remove. * common/stringhelp.c (strpbrk) [!HAVE_STRPBRK]: New. * common/sysutils.c (gnupg_mkdtemp): New. Based on code from glibc-2.6. (gnupg_setenv): Rewrite. (gnupg_unsetenv): Rewrite. * g10/exec.c: Include sysutils.h and replace mkdtemp by gnupg_mkdtemp. * g13/be-encfs.c: Ditto. * g13/mount.c: Ditto. * tools/symcryptrun.c (confucius_mktmpdir): Ditto. Signed-off-by: Werner Koch <[email protected]>
* Remove use of gnulib (part 1)Werner Koch2014-11-1148-2824/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gl/: Remove entire tree. * configure.ac: Remove gnulib tests and the gl/ Makefile. (setenv): Add to AC_CHECK_FUNCS. * autogen.rc (extra_aclocal_flags): Set to empty. * Makefile.am (ACLOCAL_AMFLAGS): Remove -I gl/m4 (SUBDIRS): Remove gl/. * agent/Makefile.am (common_libs): Remove ../gl/gnulib.a * common/Makefile.am (t_common_ldadd): Ditto. * dirmngr/Makefile.am (dirmngr_LDADD): Ditto. (dirmngr_ldap_LDADD, dirmngr_client_LDADD): Ditto. * g10/Makefile.am (needed_libs): Ditto. * g13/Makefile.am (g13_LDADD): Ditto. * kbx/Makefile.am (kbxutil_LDADD): Ditto. ($(PROGRAMS)): Ditto. * scd/Makefile.am (scdaemon_LDADD): Ditto. * sm/Makefile.am (common_libs): Ditto. * tools/Makefile.am (common_libs, commonpth_libs): Ditto. * agent/gpg-agent.c: Remove "mkdtemp.h" * g10/exec.c: Ditto. * scd/scdaemon.c: Ditto. * tools/symcryptrun.c: Ditto. * common/sysutils.c: Remove "setenv.h" * common/t-timestuff.c: Use putenv if setenv is not available. -- gnulib has always been a cause of trouble in GnuPG because we used only a very few functions and the complex include machinery of gnulib is quite complex and the cause for many build problems for example on OS X. This is not gnulib's fault but due to our limited use of gnulib and that we only rarely update the gnulib code to avoid regressions. In part two we will address the functions mkdtemp setenv unsetenv strpbrk which may bot be implemented on all platforms. They are not required on a libc based system. Signed-off-by: Werner Koch <[email protected]>