aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* build: Increase libassuan min version to 2.5.0Kristian Fiskerstrand2017-12-221-1/+1
| | | | | | | | | | | -- assuan_sock_set_system_hooks is used unconditionally in gnupg since commit 9f641430dcdecbd7ee205d407cb19bb4262aa95d, and as such it requires libassuan 2.5.0 (function introduced in commit 90dc81682b13a7cf716a8a26b891051cbd4b0caf) For a detailed description see: https://lists.gnupg.org/pipermail/gnupg-devel/2017-December/033323.html
* kbx: Simplify by removing custom memory functions.Werner Koch2017-12-226-126/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * kbx/keybox-util.c (keybox_set_malloc_hooks): Remove. (_keybox_malloc, _keybox_calloc, keybox_realloc) (_keybox_free): Remove. (keybox_file_rename): Remove. Was not used. * sm/gpgsm.c (main): Remove call to keybox_set_malloc_hooks. * kbx/kbxutil.c (main): Ditto. * kbx/keybox-defs.h: Remove all separate includes. Include util.h. remove convenience macros. * common/logging.h (return_if_fail): New. Originally from keybox-defs.h but now using log_debug. (return_null_if_fail): Ditto. (return_val_if_fail): Ditto. (never_reached): Ditto. -- Originally the KBX code was written to allow standalone use. However this required lot of ugliness like separate memory allocators and such. It also precludes the use of some standard functions from common due to their use of the common gnupg malloc functions. Dropping all that makes things easier. Minor disadvantages: the kbx call done for gpg will now use gcry malloc fucntions and not the standard malloc functions. This might be a bit slower but removing them even fixes a possible bug in keybox_tmp_names which is used in gpg and uses gpg's xfree which is actually gcry_free. Signed-off-by: Werner Koch <[email protected]>
* common: Use larger buffer for homedir in case of 64 bit UIDs.Werner Koch2017-12-201-1/+1
| | | | | | | | | | | | | | * common/homedir.c (_gnupg_socketdir_internal): Enlarge PREFIX by 6 bytes for "/gnupg". -- The temporary buffer was to short for the extra "/gnupg". However the 20 bytes for the UID is large enough for all 32 bit UIDs and would only fail (detected) if a 64 bit UID is used. Fixes-commit: 17efcd2a2acdc3b7f00711272aa51e5be2476921 Reported-by: Rainer Perske. Signed-off-by: Werner Koch <[email protected]>
* Post release updatesWerner Koch2017-12-202-1/+5
| | | | --
* Release 2.2.4gnupg-2.2.4Werner Koch2017-12-201-1/+30
|
* po: Auto-updateWerner Koch2017-12-201-12/+21
| | | | --
* po: Update Czech translationPetr Pisar2017-12-191-763/+548
| | | | Signed-off-by: Werner Koch <[email protected]>
* po: Update Russian translationIneiev2017-12-191-4/+3
|
* wks: New server options --check, --with-dir, with-file.Werner Koch2017-12-192-17/+215
| | | | | | | | | | | | | | * tools/gpg-wks-server.c (aCheck, oWithDir, oWithFile): New const. (opts): New options --check, --with-dir, and --with-file. (main): Call command_check_key. (command_list_domains): Implement option --with-dir. (fname_from_userid): New. (command_check_key): New. (command_remove_key): Implement existsing command. (command_revoke_key): Call command_remove_key as a simple implementation. Signed-off-by: Werner Koch <[email protected]>
* po: Auto-updateWerner Koch2017-12-1926-105/+93
| | | | | | -- Mainly due to removed translations in debug messages.
* po: Fix a string in de and nl. Mark a string in ro and sk fuzzy.Werner Koch2017-12-194-6/+8
| | | | | | | | | | | | | | | | | -- These wrong translations are propably due to accidently removing a fuzzy mark. A German translation (gpgsm audit feature) was actually reversed. A Dutch translation has an unused ": %s" at the end. I am not 100% of the Romanian and Slovak strings, thus I marked them as fuzzy. GnuPG-bug-id: 3619 Signed-off-by: Werner Koch <[email protected]>
* conf: New option --status-fd.Werner Koch2017-12-185-18/+137
| | | | | | | | | | | | | | * tools/gpgconf.c (oStatusFD): New const. (opts): New option --status-fd. (statusfp): New var. (set_status_fd): New. (gpgconf_write_status): New. (gpgconf_failure): New. (main): Set status fd and replace exit by gpgconf_failure. * tools/gpgconf-comp.c: Repalce exit by gpgconf_failure. (gc_process_gpgconf_conf): Print a few warning status messages. Signed-off-by: Werner Koch <[email protected]>
* gpgconf: Show --compliance in expert mode.Werner Koch2017-12-181-2/+2
| | | | | | | * tools/gpgconf-comp.c (gc_options_gpg): Set compliance to expert. (gc_options_gpgsm): Ditto. Signed-off-by: Werner Koch <[email protected]>
* sm: Allow explicit setting of the default --compliance=gnupgWerner Koch2017-12-183-4/+8
| | | | | | | | | | * sm/gpgsm.c (main): Allow setting of the default compliance. * tools/gpgconf-comp.c (gc_options_gpgsm): Add "compliance". -- This is required so that we can use this option in in gpgconf.conf. Signed-off-by: Werner Koch <[email protected]>
* po: Update Japanese translation.NIIBE Yutaka2017-12-181-7/+6
| | | | | | | | | | | | | | * po/ja.po: Fix message with no "%s". -- Backport of master commit from: 77e2fcb4ffbad8577a2cf41f17bf92dec6a93ad8 The wrong message caused segmentation fault for key generation when no expiration is specified. GnuPG-bug-id: 3619 Signed-off-by: NIIBE Yutaka <[email protected]>
* gpg: Print a warning for too much data encrypted with 3DES et al.Werner Koch2017-12-132-5/+26
| | | | | | | | | | | | | | | * g10/filter.h (cipher_filter_context_t): Remove unused filed 'create_mdc'. Turn field 'header' into a bit field. Add new fields 'short_blklen_warn' and 'short_blklen_count'. * g10/cipher.c (write_header): Print a warning if MDC is not used. (cipher_filter): Print a warning for long messages encrypted with a short block length algorithm. -- Note that to test this warning in a reliable way compression needs to be disabled. Signed-off-by: Werner Koch <[email protected]>
* gpg: Simplify cipher:write_header.Werner Koch2017-12-131-6/+2
| | | | | | * g10/cipher.c (write_header): Use write_status_printf. Signed-off-by: Werner Koch <[email protected]>
* indent: Re-indent g10/cipher.cWerner Koch2017-12-131-103/+109
| | | | --
* gpg: Simplify default_recipient().Werner Koch2017-12-131-27/+22
| | | | | | | | | | | * g10/pkclist.c (default_recipient): Use hexfingerprint. -- Note that on malloc failure this function now returns NULL instead of terminating the process. However, under memory pressure any function called latter will very likely fail as well. Signed-off-by: Werner Koch <[email protected]>
* gpg: Return an error from hexfingerprint on malloc error.Werner Koch2017-12-135-33/+92
| | | | | | | * g10/keyid.c (hexfingerprint): Return NULL on malloc failure. Chnage all callers. Signed-off-by: Werner Koch <[email protected]>
* gpg: Remove some xmallocs.Werner Koch2017-12-131-7/+26
| | | | | | | | | | * g10/getkey.c (get_pubkeys): Do not use xmalloc. -- We eventually need to get rid of all xmallocs so that gpg won't fail easily when we make more use of the s server mode. Signed-off-by: Werner Koch <[email protected]>
* indent: Re-indent get_pubkeys.Werner Koch2017-12-131-59/+48
| | | | --
* gpg: default-preference-list: prefer SHA512.Daniel Kahn Gillmor2017-12-121-10/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * g10/keygen.c (keygen_set_std_prefs): when producing default internal personal-digest-preferences, keep the same order. When publishing external preferences, state preference for SHA512 first. -- SHA-512 has a wider security margin than SHA-256. It is also slightly faster on most of the architectures on which GnuPG runs today. New keys should publish defaults that indicate we prefer the stronger, more performant digest. Specifically, this changes --default-preference-list from: SHA256 SHA384 SHA512 SHA224 to: SHA512 SHA384 SHA256 SHA224 This patch deliberately avoids touching --personal-digest-preferences (which itself would affect the default of --digest-algo and --cert-digest-algo), so that public-facing cleartext signatures and identity certifications will continue to be made with SHA256 by default. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* Change backlog from 5 to 64 and provide option --listen-backlog.Werner Koch2017-12-126-7/+53
| | | | | | | | | | | | | | * agent/gpg-agent.c (oListenBacklog): New const. (opts): New option --listen-backlog. (listen_backlog): New var. (main): Parse new options. (create_server_socket): Use var instead of 5. * dirmngr/dirmngr.c: Likewise. * scd/scdaemon.c: Likewise. -- GnuPG-bug-id: 3473 Signed-off-by: Werner Koch <[email protected]>
* build: New configure option --enable-run-gnupg-user-socket.Werner Koch2017-12-122-2/+28
| | | | | | | | | | | | | * configure.ac: (USE_RUN_GNUPG_USER_SOCKET): New ac_define. * common/homedir.c (_gnupg_socketdir_internal): Add extra directories. -- This allows to build GnuPG with an extra socketdir below /run. See https://lists.gnupg.org/pipermail/gnupg-devel/2017-November/033250.html for a longer explanation why this is sometimes useful. Suggested-by: Rainer Perske Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Check for WKD support at session endWerner Koch2017-12-114-27/+63
| | | | | | | | | | | | | | | | | | | | | | | | | * dirmngr/domaininfo.c (insert_or_update): Copy the name. * dirmngr/misc.c (copy_stream): Allow arg OUT to be NULL. * dirmngr/server.c (set_error): Protect CTX. (dirmngr_status): Protect against missing ASSUAN_CTX. (dirmngr_status_help): Ditto. (dirmngr_status_printf): Ditto. (cmd_wkd_get): Factor code out to ... (proc_wkd_get): new func. Support silent operation with no CTX. (task_check_wkd_support): New. -- This finalizes the feature to efficiently cache WKD checks. If a standard WKD query returns no data, we queue a test to be run after the end of the session (so that we do not delay the calling client). This check tests whether the server responsible for the queried address has WKD at all enabled. The test is done by checking whether the "policy" file exists. We do not check the "submission-address" file because that is not necessary for the web key operation. The policy file is now required. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit d4e2302d8f4a1ff52d56da4f8e3a5d1c6303822d)
* dirmngr: Add a background task framework.Werner Koch2017-12-115-12/+305
| | | | | | | | | | | | | | | | | | | | | | * dirmngr/workqueue.c: New. * dirmngr/Makefile.am (dirmngr_SOURCES): Add new file. * dirmngr/server.c (server_local_s): New field session_id. (cmd_wkd_get): Add a task. (task_check_wkd_support): New stub function. (cmd_getinfo): New sub-commands "session_id" and "workqueue". (start_command_handler): Add arg session_id and store it in SERVER_LOCAL. (dirmngr_status_helpf): New. * dirmngr/dirmngr.h (wqtask_t): New type. * dirmngr/dirmngr.c (main): Pass 0 as session_id to start_command_handler. (start_connection_thread): Introduce a session_id and pass it to start_command_handler. Run post session tasks. (housekeeping_thread): Run global workqueue tasks. -- Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 96a4fbecd1acf946dcde20bef4752c539dae196b)
* dirmngr: Limit the number of cached domains for WKD.Werner Koch2017-12-111-8/+54
| | | | | | | | | * dirmngr/domaininfo.c (MAX_DOMAINBUCKET_LEN): New. (insert_or_update): Limit the length of a bucket chain. (domaininfo_print_stats): Print just one summary line. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 26f08343fbccdbaa177c3507a3c5e24a5cf94a2d)
* dirmngr: Keep track of domains used for WKD queriesWerner Koch2017-12-115-0/+302
| | | | | | | | | | | | | | | | * dirmngr/domaininfo.c: New file. * dirmngr/Makefile.am (dirmngr_SOURCES): Add file. * dirmngr/server.c (cmd_wkd_get): Check whether the domain is already known and tell domaininfo about the results. -- This adds a registry for domain information to eventually avoid useless queries for domains which do not support WKD. The missing part is a background task to check whether a queried domain supports WKD at all and to expire old entries. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 65038e6852185c20413d8f6602218ee636413b77)
* doc: Typo fixWerner Koch2017-12-111-1/+1
| | | | --
* Revert: build: Do not define logging.h constants for ...Werner Koch2017-12-081-17/+9
| | | | | | | | | | --- This reverts commit 2fedf8583bcc493f587c90bc9632d25dfd10bd10. We better solve this on the libgpg-error side. Signed-off-by: Werner Koch <[email protected]>
* doc: Fix DijkstraWerner Koch2017-12-082-2/+3
| | | | | | | -- Edsger Wybe Dijkstra (1930 --2002) - Dutch computer scientist
* agent: Fix description of shadow format.NIIBE Yutaka2017-12-083-3/+3
| | | | | | | | | | * agent/keyformat.txt, agent/protect.c, agent/t-protect.c: Fix. -- https://lists.gnupg.org/pipermail/gnupg-devel/2015-April/029680.html Signed-off-by: NIIBE Yutaka <[email protected]>
* speedo,w32: Disable FLTK pinentry.Werner Koch2017-12-071-1/+4
| | | | --
* build: Do not define logging.h constants for libgpg-error dev versions.Werner Koch2017-12-071-9/+17
| | | | | | | | | | | | | | | | | * common/logging.h [GPGRT_LOG_WITH_PREFIX]: Do not define the log constants. -- logging.h uses constants we plan to use for future versions of libgpg-error. My dev version already has the logging functions and thus I run into a conflict. This patch protects against this and make the GnuPG work with later libgpg-error versions. It was not the best idea to use constants from a planned libgpg-error in the first place. The actual problem are the enums, the macros won't harm. Signed-off-by: Werner Koch <[email protected]>
* agent: Change intialization of assuan socket system hooks.NIIBE Yutaka2017-12-071-1/+2
| | | | | | | | | | | | | | | | * agent/gpg-agent.c (initialize_modules): Add hook again. (main): Remove setting of the system houk but add scoket system hook setting after assuan initialization. -- Thread initialization is better to be deferred after fork (in case of UNIX). assuan_sock_init should be earlier. Thus, we need to change system hooks for assuan_sock_* interface. Or else, on Windows, it may cause hang on server. Updates-commit: 1524ba9656f0205d8c6ef504f773b832a7a12ab9 GnuPG-bug-id: 3378 Signed-off-by: Werner Koch <[email protected]>
* agent: Set assuan system hooks before call of assuan_sock_init.NIIBE Yutaka2017-12-061-1/+1
| | | | | | | | | | | | | | | * agent/gpg-agent.c (initialize_modules): Move assuan_set_system_hooks. (main): ... here, just before assuan_sock_init. -- In Assuan, global variable SOCK_CTX is used internally, which is initialized by assuan_sock_init. When initialized, system hooks are copied into SOCK_CTX structure. Thus, system hooks should be set, before the call of assuan_sock_init. GnuPG-bug-id: 3378 Signed-off-by: NIIBE Yutaka <[email protected]>
* g10: Fix regexp sanitization.NIIBE Yutaka2017-12-041-1/+5
| | | | | | | | | | | | | | | | | | | | | | * g10/trustdb.c (sanitize_regexp): Only escape operators. -- Backport from master commit: ccf3ba92087e79abdeaa0208795829b431c6f201 To sanitize a regular expression, quoting by backslash should be only done for defined characters. POSIX defines 12 characters including dot and backslash. Quoting other characters is wrong, in two ways; It may build an operator like: \b, \s, \w when using GNU library. Case ignored match doesn't work, because quoting lower letter means literally and no much to upper letter. GnuPG-bug-id: 2923 Co-authored-by: Damien Goutte-Gattat <[email protected]> Signed-off-by: NIIBE Yutaka <[email protected]>
* doc: clarify that --encrypt refers to public key encryptionDaniel Kahn Gillmor2017-11-301-5/+7
| | | | | | | | | | | -- A simple read of gpg(1) is ambiguous about whether --encrypt could be for either symmetric or pubkey encryption. Closer inference suggests that --encrypt is about pubkey encryption only. Make that clearer on a first read. Signed-off-by: Daniel Kahn Gillmor <[email protected]>
* gpg: Do not read from uninitialized memory with --list-packets.Werner Koch2017-11-261-0/+6
| | | | | | | | | | | | | | | | | | * g10/parse-packet.c (parse_plaintext): Fill up the allocated NAME. -- This actually does not harm because we merely display a buffer allocated by ourselves. However, we better tell Valgrind about it so that we don't need to track this thing down ever again. Test using a corrupted literal data packet: echo cb 0a 75 ff 59 ae 90 d5 74 65 73 74 | \ undump |\ valgrind gpg --list-packets >/dev/null Reported-by: Sebastian Schinzel Signed-off-by: Werner Koch <[email protected]>
* agent: New option --auto-expand-secmem.Werner Koch2017-11-242-0/+22
| | | | | | | | | | | | * agent/gpg-agent.c (oAutoExpandSecmem): New enum value. (opts): New option --auto-expand-secmem. (main): Implement that option. -- Note that this option has an effect only if Libgcrypt >= 1.8.2 is used. GnuPG-bug-id: 3530
* build: Update distsigkey.gpgWerner Koch2017-11-221-0/+0
| | | | --
* gpg: Fix memory leaking for long inputs via --command-fd.Werner Koch2017-11-221-1/+7
| | | | | | | | | | | * g10/cpr.c (do_get_from_fd): Free the old buffer. -- If the received input is longer than 200 characters we used to leak the previous allocated buffer. GnuPG-bug-id: 3528 Signed-off-by: Werner Koch <[email protected]>
* scd: Enable card removal check after select_application.NIIBE Yutaka2017-11-214-12/+18
| | | | | | | | | | | | | | | | | | | | | | * scd/apdu.c (open_ccid_reader): Fix error handling of ccid_get_atr. * scd/app.c (select_application): Always kick the loop if new APP. * scd/ccid-driver.c (ccid_open_usb_reader): Don't setup at open. (ccid_slot_status): Setup interrupt transfer when !ON_WIRE. -- We can use the interrupt transfer to be notified about card status change. In this case, we don't need to issue PC_to_RDR_GetSlotStatus command. This change improve the setup the notification; it should be done after registration of APP. When the setup is done just after opening the USB connection (before issuing PC_to_RDR_IccPowerOn), a reader might notifies about no card availability (because of not yet powered on), even though the card is ready to be powered on. GnuPG-bug-id: 3508 Signed-off-by: NIIBE Yutaka <[email protected]>
* Post release updatesWerner Koch2017-11-202-1/+5
| | | | --
* Release 2.2.3gnupg-2.2.3Werner Koch2017-11-202-9/+26
|
* build: Use -Werror only for the check.Werner Koch2017-11-201-1/+1
| | | | | | | | | | | | * configure.ac: Do not add -Werror to mycflags. -- On Windows and possible also on other platforms we expect to a get a few errors or warnins. Thus we can't use -Werror by default. This is why we have a separate configure options --enable-werror ;-). Fixes-commit: 3ecd1a41be7c880976987d13e88342c98f37e064 Signed-off-by: Werner Koch <[email protected]>
* gpg-agent: Avoid getting stuck in shutdown pending state.Werner Koch2017-11-201-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | * agent/gpg-agent.c (handle_connections): Always check inotify fds. -- I noticed a gpg-agent processed, probably in shutdown_pending state, which was selecting on only these two inotify fds. The select returned immediately but because we did not handle the fds in shutdown_pending state they were not read and the next select call returned one of them immediately again. Actually that should not hanppen because the if (active_connections == 0) break; /* ready */ should have terminated the loop. For unknown reasons (maybe be just a connection thread terminated in a gdb session) that did not happen. By moving the check outside of the shutdown_pending condition and closing the fd after they have been triggered the code should be more robust. Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 5d83eb9226c0ce608ec284d8c9bc22ce84a00c25)
* agent: Use clock or clock_gettime for calibration.NIIBE Yutaka2017-11-202-6/+10
| | | | | | | | | | | | | | | | | | * agent/protect.c (calibrate_get_time): Use clock or clock_gettime. -- For calibration, clock(3) is better than times(3) among UNIXen. Tested on NetBSD 7.1 and FreeBSD 11.1, using QEMU. Thanks to Damien Goutte-Gattat for the information of use of CLOCKS_PER_SEC; The old code with times(3) is not 100% correct, in terms of POSIX. It should have used sysconf (_SC_CLK_TCK) instead of CLOCKS_PER_SEC. CLOCKS_PER_SEC is specifically for clock(3). GnuPG-bug-id: 3056, 3276, 3472 Signed-off-by: NIIBE Yutaka <[email protected]> (cherry picked from commit 380bce13d94ff03c96e39ac1d834f382c5c730a1)
* build: Check -Wlogical-op flag availability with -Werror.NIIBE Yutaka2017-11-201-3/+11
| | | | | | | | | | * configure.ac: Use -Werror. -- Using clang, -Wlogical-op doesn't fail but generates warning. Signed-off-by: NIIBE Yutaka <[email protected]>