aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* gpgparsemail: Allow weirdly-mixed pkcs7 signatures.Daniel Kahn Gillmor2016-02-181-17/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * tools/gpgparsemail.c: Add and check info->signing_protocol_2. -- Some mailers in the wild will generate messages that have the a weird structure where they use the x- prefix in one part and drop it in another. For example, the main MIME part as a whole has: Content-Type: multipart/signed; protocol="application/x-pkcs7-signature" but the signature sub-part has: Content-Type: application/pkcs7-signature (or vice versa, where the x- prefix is in the sub-part but not the protocol= section on the main MIME object) This change also avoids allocating strings for these comparisons, since the const strings in question are already available in the built executable, and no dynamic labels are needed. === - 2 lines reformatted to keep them below 90 cols. - wk
* gpg: Clean up dangling agent_open and agent_closed declarations.Daniel Kahn Gillmor2016-02-182-4/+1
| | | | | | | | | | | | | | * g10/keydb.h: Remove agent_open, agent_close declarations/ * g10/migrate.c: #include <unistd.h> for access() -- agent_open() is only defined statically in common/simple-pw-query.c, it is neither used nor referenced anywhere else. agent_close doesn't exist anywhere. The removal of these declarations removes an unecessary inclusion of libassuan.h. migrate.c was relying on keydb.h -> libassuan.h -> unistd.h for the declaration of access(), so we now handle that explicitly instead.
* w32: Make scdaemon build again due to libusb problem.Werner Koch2016-02-161-1/+7
| | | | | | | | | | | * configure.ac: Add hack to disable libusb for Windows. Also use $host instead of $target in the switch -- The new test for libusb does not support cross-compiling. As a quick workaround we disable libusb for Windows because we can't use it anyway. Signed-off-by: Werner Koch <[email protected]>
* w32: Do not error out if gpgconf is not installed.Werner Koch2016-02-161-3/+1
| | | | | | | | | | | * common/homedir.c (check_portable_app): Remove error message. -- It is sometimes useful to install just gpgv and no other parts. Our test for a portable application returned an error if gpgconf is not installed. That error is not required but was merely a debug aid. Signed-off-by: Werner Koch <[email protected]>
* gpg: Make ASCII armor decoding more robust to encoding errors.Neal H. Walfield2016-02-161-0/+18
| | | | | | | | | | * g10/armor.c (radix64_read): If the = is followed by the string "3D", check if the following four characters are valid radix 64 and are followed by a new line. If so, warn and ignore the '3D'. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2250
* doc: Add a gnupg-module-overview picture.Werner Koch2016-02-163-15/+939
| | | | | | | | | | | | | | | | | | | | | | * doc/gnupg-module-overview.svg: New. * doc/debugging.texi (Component interaction): New. * doc/Makefile.am (EXTRA_DIST): Add PNG and PDF versions of gnupg-module-overview.svg. Remove two eps files. (BUILT_SOURCES): Add gnupg-module-overview.pdf and .png. Remove gnupg-card-architecture.epsl (gnupg_TEXINFOS): Add gnupg-module-overview.svg (gnupg.dvi): New. (DISTCLEANFILES): Remove build eps files. -- Many thanks to Emanuel Schütze for helping with the redesign of the module overview. The original file has been used by mere for years in talks but was never a proper part of GnuPG. The EPS files have been removed due to their size. Thus to build the "dvi" target the convert tool is required. Signed-off-by: Werner Koch <[email protected]>
* common, g10: Fix indentation to silence GCC-6.NIIBE Yutaka2016-02-153-17/+17
| | | | | | | | | | * common/iobuf.c (iobuf_ioctl): Fix. * g10/encrypt.c (encrypt_filter): Likewise. * g10/keyring.c (prepare_search): Likewise. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* dirmngr: fix for memory alignment.NIIBE Yutaka2016-02-151-6/+14
| | | | | | | | | * dirmngr/dns-stuff.c (get_dns_cert): Cast through void *. (getsrv, get_dns_cname): Make sure it's aligned for HEADER. -- Signed-off-by: NIIBE Yutaka <[email protected]>
* Put asterisks in front of two function descriptions.Werner Koch2016-02-141-9/+9
| | | | | | | -- This helps visual impaired hackers to easier read comments and also helps use when looking at a printout.
* gpg: Add hidden key-edit subcommand "change-usage".Werner Koch2016-02-143-11/+146
| | | | | | | | | | | | * g10/keyedit.c (cmdCHANGEUSAGE): New. (cmds): Add command "change-usage". (keyedit_menu): Handle that command. (menu_changeusage): New. * g10/keygen.c (keygen_add_key_flags): New. (ask_key_flags): Add optional arg current. -- Signed-off-by: Werner Koch <[email protected]>
* gpg: Improve API documentation.Neal H. Walfield2016-02-143-13/+24
| | | | | | | | | | * g10/seskey.c (make_session_key): Improve documentation. (encode_session_key): Improve documentation. * g10/encrypt.c (encrypt_seskey): Remove gratuitous initialization. * g10/dek.h (DEK): Improve documenation. -- Signed-off-by: Neal H. Walfield <[email protected]>
* gpg: Fix calc_header_length when LEN is 0 and improve documentation.Neal H. Walfield2016-02-141-4/+8
| | | | | | | | | * g10/build-packet.c (calc_header_length): Return the correct haeder size when LEN is 0. Fix documentation. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2240
* gpg: Fix format_keyid when dynamically allocating the buffer.Neal H. Walfield2016-02-142-3/+6
| | | | | | | | * g10/keyid.c (format_keyid): Return a char *, not a const char *. If BUFFER is NULL, then set LEN to the static buffer's size. -- Signed-off-by: Neal H. Walfield <[email protected]>
* common: Fix comment.Neal H. Walfield2016-02-141-1/+1
| | | | | | | * common/iobuf.c (iobuf_flush_temp): Fix comment. -- Signed-off-by: Neal H. Walfield <[email protected]>
* g13: Require a confirmation before g13 is used for DM-Crypt.Werner Koch2016-02-133-1/+27
| | | | | | | | * g13/g13-syshelp.c (g13_syshelp_i_know_what_i_am_doing): * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Call it. (sh_dmcrypt_mount_container): Call it. Signed-off-by: Werner Koch <[email protected]>
* g13: Second chunk of code to support dm-crypt.Werner Koch2016-02-1318-121/+951
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g13/be-dmcrypt.c, g13/be-dmcrypt.h: New. * g13/Makefile.am (g13_SOURCES): Add them. * g13/backend.c: Include be-dmcrypt.h and call-syshelp.h. (no_such_backend): Rename to _no_such_backend and provide replacement macro. (be_is_supported_conttype): Support DM-Crypt. (be_take_lock_for_create): Call set_segvice for DM-Crypt. (be_create_new_keys): Make it a dummy for DM-Crypt. (be_create_container): Call be_dmcrypt_create_container. (be_mount_container): call be_dmcrypt_mount_container. * g13/g13-syshelp.c (main): Enable verbose mode. * g13/g13tuple.c (get_tupledesc_data): New. * g13/g13tuple.h (unref_tupledesc): New. * g13/g13.h (server_control_): Add field "recipients". * g13/g13.c (main): Fix setting of recipients via cmdline. (g13_deinit_default_ctrl): Release recipients list. (g13_request_shutdown): New. Replace all direct update of shutdown_pending by calls this function. * g13/server.c (server_local_s): Remove field recipients which is now part of CTRL. (reset_notify, cmd_recipient, cmd_create): Adjust for this change. * g13/create.c (encrypt_keyblob): Rename to g13_encrypt_keyblob. (g13_create_container): Support DM-Crypt. * g13/mount.c (parse_header): Allow for meta data copies. (g13_mount_container): Support DM-Crypt. * g13/sh-cmd.c (cmd_create): Make it work. (cmd_mount): New. * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Make it work. (sh_dmcrypt_mount_container): New. -- With this patch we can now create an encrypted partition and partly mount it (i.e. setup keys and create the mapped device). We do not yet create a file system or mount that file system Signed-off-by: Werner Koch <[email protected]>
* g13: Improve dump_keyblob.Werner Koch2016-02-133-38/+88
| | | | | | | | | | | | * g13/g13tuple.c: Include keyblob.h. (find_tuple_uint): Factor code out to ... (convert_uint): new. (all_printable): New. * g13/mount.c (dump_keyblob: Move and rename to ... * g13/g13tuple.c (dump_tupledesc): here. Revamp and pretyy print uint values. Signed-off-by: Werner Koch <[email protected]>
* g13: Define 3 new tags.Werner Koch2016-02-131-1/+11
| | | | | | | | * g13/keyblob.h (KEYBLOB_TAG_CONT_NSEC): New. (KEYBLOB_TAG_ENC_NSEC): New. (KEYBLOB_TAG_ENC_OFF): New. Signed-off-by: Werner Koch <[email protected]>
* g13: Rename utils.c to g13tuple.cWerner Koch2016-02-1310-20/+24
| | | | | | | | | * g13/utils.c: Rename to g13tuple.c. * g13/utils.h: Rename to g13tuple.h. Change all users. * g13/Makefile.am: Adjust accordingly -- Signed-off-by: Werner Koch <[email protected]>
* g13: Add functions to handle uint in a keyblob.Werner Koch2016-02-134-4/+318
| | | | | | | | | | | * g13/utils.c (append_tuple_uint): New. (find_tuple_uint): New. * g13/t-utils.c: New. * g13/Makefile.am (noinst_PROGRAMS, TESTS): New. (module_tests, t_common_ldadd): New. (t_utils_SOURCES, t_utils_LDADD): New. Signed-off-by: Werner Koch <[email protected]>
* g13: Re-factor high level create code.Werner Koch2016-02-133-28/+64
| | | | | | | * g13/create.c (g13_create_container): Factor some code out to ... * g13/backend.c (be_take_lock_for_create): new. Signed-off-by: Werner Koch <[email protected]>
* g13: Return an error for non-existing device.Werner Koch2016-02-131-3/+7
| | | | | | * g13/sh-cmd.c (cmd_device): Set ERR. Signed-off-by: Werner Koch <[email protected]>
* g13: Fix releasing of a syshelp context.Werner Koch2016-02-131-2/+7
| | | | | | * g13/call-syshelp.c (call_syshelp_release): Allow a NULL arg. Signed-off-by: Werner Koch <[email protected]>
* g13: Switch over to common/exectool.c.Werner Koch2016-02-135-313/+6
| | | | | | | | | | | | | | | | * g13/sh-exectool.c: Remove. It has been replaced by common/exectool.c. * g13/Makefile.am (g13_syshelp_SOURCES): Remove sh-exectool.c * g13/sh-blockdev.c: Include exectool.h. Change sh_exec_tool to gnupg_exec-tool. * g13/sh-dmcrypt.c: Ditto. -- With commit 2ae07f826aa551db8adf714158fce962790a6b54 the exectool code was moved from a g13 feature branch to common/ so that it could be used by gpgtar. With this patch we finally remove the original code and use the one in common/. Signed-off-by: Werner Koch <[email protected]>
* common: Make gnupg_exec_tool conform to spec.Werner Koch2016-02-131-9/+18
| | | | | | | | * common/exectool.c (gnupg_exec_tool): Allocate extra byte. Allow zero length read. Append hidden byte. Release memory on error. -- Signed-off-by: Werner Koch <[email protected]>
* g13: First chunk of code to support dm-crypt.Werner Koch2016-02-1314-9/+2489
| | | | | | | | | | | | | | | | | | | | | | | | | * g13/call-syshelp.c, g13/call-syshelp.h: New. * g13/g13-syshelp.c, g13/g13-syshelp.h: New. * g13/sh-cmd.c: New. * g13/sh-blockdev.c: New. * g13/sh-exectool.c: New. * g13/sh-dmcrypt.c: New. * g13/Makefile.am (sbin_PROGRAMS): Add g13-syshelp.c (g13_syshelp_SOURCES): New. (g13_syshelp_LDADD): New. * g13/g13.c (opts): Add option --type. (g13_deinit_default_ctrl): New. (main): Implement that option. Call g13_deinit_default_ctrl. * g13/g13.h (struct call_syshelp_s): New declaration. (server_control_s): Add field syshelp_local. * g13/keyblob.h (KEYBLOB_TAG_CREATED): New. (KEYBLOB_TAG_ALGOSTR): New. (KEYBLOB_TAG_HDRCOPY): New. * g13/backend.c (be_parse_conttype_name): New. (be_get_detached_name): Add CONTTYPE_DM_CRYPT. Signed-off-by: Werner Koch <[email protected]>
* tests: Remove some harmless warnings in regression tests.Werner Koch2016-02-131-1/+0
| | | | | | * tests/openpgp/gpg-agent.conf.tmpl: Remove --use-standard-socket. Signed-off-by: Werner Koch <[email protected]>
* common: Change simple_query to ignore status messages.Neal H. Walfield2016-02-121-28/+67
| | | | | | | | * common/simple-pwquery.c (simple_query): Ignore status messages. -- Signed-off-by: Neal H. Walfield <[email protected]> GnuPG-bug-id: 2229
* g10: Make sure to have the directory for trustdb.NIIBE Yutaka2016-02-121-56/+62
| | | | | | | | | | | | | * g10/tdbio.c (tdbio_set_dbname): Return earlier if !CREATE. Check the directory and create it if none before calling take_write_lock. -- Thanks to Marc Deslauriers for the bug report and his patch. GnuPG-bug-id: 2246 Signed-off-by: NIIBE Yutaka <[email protected]>
* doc: Note that rngd can also be used to quickly generate insecure keys.Neal H. Walfield2016-02-021-1/+7
| | | | | | | | | * doc/gpg-agent.texi (Agent Options): Add comment to the description of --debug-quick-random that rngd can also be used to quickly generate key. -- Signed-off-by: Neal H. Walfield <[email protected]>
* scd: Fix size_t/int mismatch in libusbWerner Koch2016-01-271-3/+5
| | | | | | | | * scd/ccid-driver.c (bulk_in, abort_cmd, ccid_poll): Change msglen to int. -- Signed-off-by: Werner Koch <[email protected]>
* scd: Fix detection of libusb.Werner Koch2016-01-271-5/+9
| | | | | | | | | | | * configure.ac (HAVE_LIBUSB): Clear if no header file was found. (LIBUSB_LIBS): Ditto. -- This allows to use commit d0d9708 when libusb is installed without the header files. Signed-off-by: Werner Koch <[email protected]>
* gpg: Shorten the --tofu-policy help textWerner Koch2016-01-271-1/+1
| | | | | | | | | | -- Using "help" as value lists the options. Not having the current options in the help text also makes it easier to keep translations clean. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Build fix for FreeBSD (EAI macros)Werner Koch2016-01-271-0/+4
| | | | | | | | | * dirmngr/dns-stuff.c (map_eai_to_gpg_error): Map EAI_NODATA and EAI_ADDRFAMILY only if defined. -- Reported-by: Christoph Moench-Tegeder <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* doc: Typo fixesIneiev2016-01-272-4/+4
| | | | --
* scd: Migrate to new API of libusb 1.0.NIIBE Yutaka2016-01-273-186/+193
| | | | | | | | | | * configure.ac (LIBUSB_CPPFLAGS): New. * scd/Makefile.am (AM_CPPFLAGS): Add LIBUSB_CPPFLAGS. * scd/ccid-driver.c: Use libusb 1.0 API. -- Changes are straightforward, not use any new features. Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2016-01-262-1/+5
| | | | --
* Release 2.1.11gnupg-2.1.11Werner Koch2016-01-261-1/+45
|
* po: Auto-updateWerner Koch2016-01-2625-4669/+13909
| | | | --
* po: Update Czech translationPetr Pisar2016-01-261-232/+146
| | | | --
* Update copyright years.Werner Koch2016-01-265-12/+12
| | | | --
* po: Update German translationWerner Koch2016-01-261-11/+29
| | | | --
* gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32Andre Heinecke2016-01-263-15/+62
| | | | | | | | | | | | | | | | | | | | | * common/utf8conv.c (wchar_to_utf8): Factor code out to ... (wchar_to_cp): new. (utf8_to_wchar): Factor code out to ... (cp_to_wchar): new. (wchar_to_native): New. (native_to_wchar): New. * tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar. (scan_directory): Use wchar_to_native. -- Gpgtar needs to handle filenames in the local 8 bit encoding on Windows as it uses the 8 bit file io functions. GnuPG-bug-id: 1624, 1746 Patch from bug 1624 modified to fit into GnuPG 2.1 by wk. Signed-off-by: Werner Koch <[email protected]>
* g10: Fix segfault on unsupported curve.NIIBE Yutaka2016-01-261-8/+4
| | | | | | | | | * g10/call-agent.c (learn_status_cb): Don't use NULL for strcmp. -- With libgcrypt not supporting cv25519, gpg segfaults. Signed-off-by: NIIBE Yutaka <[email protected]>
* sm: small fix for GCC 6.NIIBE Yutaka2016-01-261-1/+1
| | | | | | | | | | * sm/export.c (insert_duptable): Use unsigned 0. -- We can silence message with -Wshift-negative-value. Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Print PROGRESS status lines during key generation.Werner Koch2016-01-251-11/+10
| | | | | | | | | | * g10/call-agent.c (cache_nonce_status_cb): Rewrite by using has_leading_keyword. Handle PROGRESS lines. -- GnuPG-bug-id: 1415 Co-authored-by: Daiki Ueno <[email protected]> Signed-off-by: Werner Koch <[email protected]>
* agent: Send PROGRESS status lines to the client.Werner Koch2016-01-253-0/+134
| | | | | | | | | | | | | | | * agent/gpg-agent.c (struct progress_dispatch_s): New. (progress_dispatch_list): New. (main): Register libgcrypt pogress handler. (agent_libgcrypt_progress_cb): New. (agent_set_progress_cb): New. (unregister_progress_cb): New. (agent_deinit_default_ctrl): Call unregister. * agent/command.c (progress_cb): New. (start_command_handler): Register progress callback. -- Signed-off-by: Werner Koch <[email protected]>
* speedo: Allow use of SHA-256 checksumsWerner Koch2016-01-253-3/+74
| | | | | | | | | | | * build-aux/getswdb.sh: Add option --find-sha256sum. * build-aux/speedo.mk (libgpg_error_sha2): New var. Also for all other packages. (SHA2SUM): New. (SETVARS, SETVARS_W64): Prefer sha256sum over sha1sum. (installer-from-source): Create swdb fragment. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Indicate that serial numbers are hexadecimal.Werner Koch2016-01-223-9/+16
| | | | | | | | | | * dirmngr/misc.c (hexify_data): Add arg with_prefix. Adjust all callers. * dirmngr/crlcache.c (cache_isvalid): Print "0x" in front of the S/N. -- GnuPG-bug-id: 1147 Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Provide the keyserver pool name even if there is no CNAME.Werner Koch2016-01-221-2/+2
| | | | | | | | | | | * dirmngr/ks-engine-hkp.c (map_host): Fix setting of r_poolname. -- map_host is intended to return the name of the pool as an additional information. However this broke some time ago and a pool name was only retrained if the pool name was retrieved from a DNS CNAME. Signed-off-by: Werner Koch <[email protected]>