Imported Upstream version 2.3.3
[platform/upstream/gpg2.git] / ChangeLog
1 2021-10-12  Werner Koch  <wk@gnupg.org>
2
3         Release 2.3.3.
4         + commit 9470d0338364b781d701ad8e81972c782b48aa2d
5
6
7         speedo: Put the keyboxd into the Windows installer.
8         + commit 10f52f9bf3bcc6cf29835c2f11ea91ab0d5e7cdc
9         * build-aux/speedo/w32/inst.nsi: Install keyboxd.
10         * Makefile.am (sign-release): Sign the wixlib only if generated.
11         * autogen.rc: Remove meanwhile obsolete option --with-regex.
12
13         tests: New way to make use of gpgconf.ctl in tests.
14         + commit bcd5feec0e916b864d004a47f36a41e2eba3b10e
15         * Makefile.am (all-local): New to setup symlinks.
16         (distclean-local): New.
17         * tests/Makefile.am: Remove the gpgconf related targets.  Just keep
18         gpgconf.ctl.in in EXTRA_DIST
19         * tests/cms/Makefile.am (GNUPG_BUILD_ROOT):
20         * tests/gpgme/Makefile.am (GPGSCM_PATH):
21         * tests/openpgp/Makefile.am (GNUPG_BUILD_ROOT):
22         * tests/pkits/Makefile.am (GNUPG_BUILD_ROOT):
23         * tests/tpm2dtests/defs.scm (tools): Revert to the former values.
24         * tests/openpgp/defs.scm (tools): Ditto.
25
26 2021-10-10  Werner Koch  <wk@gnupg.org>
27
28         Do not build keyxboxd if sqlite has been disabled.
29         + commit cf29c7dec0e845040a71aac383ee9f1dda901590
30         * configure.ac: Move clearing of build_keyboxd out of the conditional.
31
32 2021-10-06  Ingo Klöcker  <dev@ingo-kloecker.de>
33
34         common: Respect gpgconf.ctl when looking up translations.
35         + commit e99b9890c28dae491653279791e52771be866188
36         * common/i18n.c (i18n_init): Use gnupg_localedir() instead of LOCALEDIR.
37         (i18n_localegettext): Ditto.
38         * tools/gpgconf-comp.c (my_dgettext): Ditto.
39
40 2021-10-06  Werner Koch  <wk@gnupg.org>
41
42         dirmngr: New option --ignore-cert.
43         + commit 4b3e9a44b58e74b3eb4a59f88ee017fe7483a17d
44         * dirmngr/dirmngr.h (struct fingerprint_list_s): Add field binlen.
45         (opt): Add field ignored_certs.
46         * dirmngr/dirmngr.c: Add option --ignore-cert
47         (parse_rereadable_options): Handle that option.
48         (parse_ocsp_signer): Rename to ...
49         (parse_fingerprint_item): this and add two args.
50         * dirmngr/certcache.c (put_cert): Ignore all to be igored certs.
51         Change callers to handle the new error return.
52
53         dirmngr: Fix Let's Encrypt certificate chain validation.
54         + commit 68799378859739887549108bf765568ccbc328bc
55         * dirmngr/certcache.c (find_cert_bysubject): Return the first trusted
56         certififcate if any.
57
58 2021-10-05  NIIBE Yutaka  <gniibe@fsij.org>
59
60         agent,dirmngr,kbx,scd,tpm2d: Use gnupg_sleep.
61         + commit 3918fa1a9488d56040d43e4af1254f9564266513
62         * agent/findkey.c (unprotect): Use gnupg_sleep.
63         * agent/gpg-agent.c (handle_connections): Likewise.
64         * dirmngr/crlfetch.c (handle_connections): Likewise.
65         * kbx/keyboxd.c (handle_connections): Likewise.
66         * tpm2d/tpm3daemon.c (handle_connections): Likewise.
67         * scd/scdaemon.c (handle_connections): Likewise.
68         * scd/command.c (cmd_lock): Likewise.
69         * dirmngr/ldap-wrapper.c (ldap_reaper_thread): Likewise.
70         (ldap_wrapper_wait_connections): Use gnupg_usleep.
71
72         agent: Fix calibrate_get_time use of clock_gettime.
73         + commit eeb25df6f8fc1e3cf18ec5578445f8fc281e41bc
74         * agent/protect.c (USE_CLOCK_GETTIME): New macro.
75         (calibrate_get_time): Only use clock_gettime if USE_CLOCK_GETTIME.
76
77 2021-10-01  Werner Koch  <wk@gnupg.org>
78
79         tests: Use the new gpgconf.ctl based method.
80         + commit 84fcd8e6eb7e0786399e1f6461c3f60b0db2d070
81         * tests/openpgp/defs.scm:  We expect that stuff is now installed.
82         (tools): Fix the names.
83         (intsalled?, bin-prefix): Remove.
84         (tool-hardcoded): Simplify.
85         (gpg-conf'): Simplify.
86         (GNUPG_BUILDDIR): Do not anymore set this envvar.
87         * tests/tpm2dtests/defs.scm: Ditto.
88
89         build: Prepare for using installed versions for tests.
90         + commit 399ebf6d873d4178c1d527aa4df34bf16a76360e
91         * tests/gpgconf.ctl.in: New.
92         * tests/Makefile.am (EXTRA_DIST): Add new file.
93         (TESTINST_DIRS): New.
94         (clean-local): New.
95         (clean-local-testinst): New.
96         (check-recursive): New hook.
97         (bin/gpgconf.ctl): Run a test install.
98         * tests/cms/Makefile.am (TESTS_ENVIRONMENT): Set new envvar
99         GNUPG_BUILD_ROOT.
100         * tests/gpgme/Makefile.am (TESTS_ENVIRONMENT): Ditto.
101         * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Ditto.
102         * tests/pkits/Makefile.am (TESTS_ENVIRONMENT): Ditto.
103         * tests/tpm2dtests/Makefile.am (TESTS_ENVIRONMENT): Ditto.
104
105         common: Support gpgconf.ctl also for BSDs.
106         + commit dbe1b237a6525585b36ed84c8634d6436dddaad1
107         * common/homedir.c (MYPROC_SELF_EXE): New.
108         (unix_rootdir): Use it here.  Also support GNUPG_BUILD_ROOT as
109         fallback.
110
111         common: Add keyword sysconfdir to the optional gpgconf.ctl file.
112         + commit ec847cf17fa85b8684e88ccf04c6d4c75d59c3ba
113         * common/homedir.c (unix_rootdir): Add arg want_sysconfdir.
114         (gnupg_sysconfdir): Return it.
115
116 2021-09-30  NIIBE Yutaka  <gniibe@fsij.org>
117
118         kbx: Let it include keybox.h to avoid multiple typedefs.
119         + commit ca54d3f148933baac1f0243f76e4961abca285b1
120         * kbx/backend.h: Include keybox.h.
121
122 2021-09-29  NIIBE Yutaka  <gniibe@fsij.org>
123
124         gpg: Handle backsig for v5 signature.
125         + commit dd2e092339627c03cd0f506f3ef1be3e98d5ff83
126         * g10/getkey.c (merge_selfsigs_subkey): Check v5 signature correctly.
127
128         gpg: Ed448 and X448 are only for v5 (for subkey).
129         + commit 86cb04a23d2b0849cf684238d6d704aa45293214
130         * g10/keygen.c (generate_subkeypair): Specify
131         KEYGEN_FLAG_CREATE_V5_KEY for Ed448 or X448 key.
132
133 2021-09-28  NIIBE Yutaka  <gniibe@fsij.org>
134
135         kbx: A 20 byte fingerprint is right filled in version 2 blob.
136         + commit 08a3a4db27dcc3d50038cf5bdba94a6f0b548b01
137         * kbx/keybox-blob.c (create_blob_header): Fix creating FPR20 key
138         in blob with 32-byte fingerprint.
139
140         gpg: Skip the packet when not used for AEAD.
141         + commit cc6152b802f2ab0ceaf3abb20caef6f7d806ffa3
142         * g10/free-packet.c (free_packet): Add the case for case
143         PKT_ENCRYPTED_AEAD.
144
145 2021-09-20  Ingo Klöcker  <dev@ingo-kloecker.de>
146
147         build: Fix several "include file not found" problems.
148         + commit e2069d563283ab295858d33a250f229aab240f75
149         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add KSBA_CFLAGS.
150         * kbx/Makefile.am (libkeybox_a_CFLAGS, libkeybox509_a_CFLAGS): Add
151         NPTH_CFLAGS.
152         * tools/Makefile.am (gpgtar_CFLAGS, gpg_wks_server_CFLAGS,
153         gpg_wks_client_CFLAGS, gpg_pair_tool_CFLAGS): Add LIBGCRYPT_CFLAGS.
154
155 2021-09-20  giomba  <giomba@linux.it>
156
157         po: Fixed Italian translation for key expiration.
158         + commit 548ff0398353c106f4e361a46818cd1716b825b8
159         * po/it.po: Fix italian translation.
160
161 2021-09-17  Werner Koch  <wk@gnupg.org>
162
163         common: Support a gpgconf.ctl file under Unix.
164         + commit d4768bb982adb5c8410303334ee8d82ba0d71f3b
165         * common/homedir.c (unix_rootdir): New.
166         (gnupg_bindir): Use it.
167         (gnupg_libexecdir): Use it.
168         (gnupg_libdir): Use it.
169         (gnupg_datadir): Use it.
170         (gnupg_localedir): Use it.
171
172         common: New function substitute_envvars.
173         + commit 9c272dc245456d5403e3bd50553b4fdccb370e27
174         * common/stringhelp.c (substitute_envvars): New.  Based on code in
175         gpg-connect-agent.
176         * common/t-stringhelp.c: Include sysutils.h.
177         (test_substitute_envvars): New.
178
179 2021-09-14  Werner Koch  <wk@gnupg.org>
180
181         gpg: Print a warning when importing a bad cv25519 secret key.
182         + commit dbfb7f809b89cfe05bdacafdb91a2d485b9fe2e0
183         * g10/import.c (transfer_secret_keys): Add simple check.
184
185 2021-09-13  Werner Koch  <wk@gnupg.org>
186
187         common: New envvar GNUPG_EXEC_DEBUG_FLAGS.
188         + commit f2b01025c3da97068b699c1f51309e18730a4bdb
189         * common/exechelp-w32.c (gnupg_spawn_process_detached): Silence
190         breakaway messages and turn them again into debug messages.
191
192 2021-09-09  Werner Koch  <wk@gnupg.org>
193
194         sm: Add LotW support to the key listing.
195         + commit 255d4d5815d00f8d1b45d93cc617c49d375e891b
196         * sm/certdump.c (parse_dn_part): Translate OID to "Callsign"
197         * sm/keylist.c (oidtranstbl): Some more OIDs.
198
199 2021-09-08  Ingo Klöcker  <dev@ingo-kloecker.de>
200
201         build: Fix "ksba.h not found" problem.
202         + commit 08f227052fa3cc7089829a3b2ab8c4dda990b05b
203         * sm/Makefile.am (t_minip12_CFLAGS): Add KSBA_CFLAGS.
204
205 2021-09-07  Werner Koch  <wk@gnupg.org>
206
207         agent: Fix segv in GET_PASSPHRASE (regression)
208         + commit af3b1901549baa8fbe8140d9fa75a4a2b7a77a7e
209         * agent/command.c (cmd_get_passphrase): Do not deref PI.  PI is always
210         NULL.
211
212 2021-08-27  NIIBE Yutaka  <gniibe@fsij.org>
213
214         kbx: Fix checksum computation for no UBID entry on disk.
215         + commit 0b64c27446c6f17f9c108e0fa95639db12d376ff
216         * kbx/keybox-blob.c (create_blob_header): Fix the flag to match no
217         UBID entry,
218         (create_blob_finish): Fix the length of data to be hashed.
219
220         common: Fix put_membuf.
221         + commit f271c6916469c0054c143adb4cee0588866a2a61
222         * common/membuf.c (put_membuf): Allow NULL for the second arg.
223
224 2021-08-26  NIIBE Yutaka  <gniibe@fsij.org>
225
226         common: Fix get_signal_name for GNU/Linux.
227         + commit c4ba712736ddeda66055567874d573e79d22666b
228         * common/signal.c (get_signal_name): Use sigdescr_np if available.
229         * configure.ac: Check the function.
230
231 2021-08-24  Werner Koch  <wk@gnupg.org>
232
233         Release 2.3.2.
234         + commit 3bf8d7e1b7e0482f698b54a6975bdd9aa354244e
235
236
237         dirmngr: Change the default keyserver.
238         + commit 55b5928099bafbd5409d3377a42259c11e394cd0
239         * configure.ac (DIRMNGR_DEFAULT_KEYSERVER): Change to
240         keyserver.ubuntu.com.
241
242         * dirmngr/certcache.c (cert_cache_init): Disable default pool cert.
243         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
244         * dirmngr/http.c (http_session_new): Ditto.
245
246         * dirmngr/server.c (make_keyserver_item): Use a different mapping for
247         the gnupg.net names.
248
249 2021-08-24  NIIBE Yutaka  <gniibe@fsij.org>
250
251         gpg: Report the status of NO_SECKEY for decryption.
252         + commit 3ed5f566fc057975d0158bb637c72bd118aba7f8
253         * g10/mainproc.c (proc_encrypted): Fix the condition to report
254         NO_SECKEY even when the key was not considered by get_session_key.
255
256 2021-08-20  Werner Koch  <wk@gnupg.org>
257
258         wkd: Properly unescape the user-id from a key listing.
259         + commit 87d238de3d9d537cacc9dd3c6d954845203ea2cb
260         * tools/wks-util.c (append_to_uidinfo_list): Unescape UID.
261
262         wkd: Fix client issue with leading or trailing spaces in user-ids.
263         + commit b4345f7521cb4c3f4af7894f5d6d840fda85e82f
264         * common/recsel.c (recsel_parse_expr): Add flag -t.
265         * common/stringhelp.c: Remove assert.h.
266         (strtokenize): Factor code out to do_strtokenize.
267         (strtokenize_nt): New.
268         (do_strtokenize): Add arg trim to support the strtokenize_nt.
269         * common/t-stringhelp.c (test_strtokenize_nt): New test cases.
270
271         * tools/wks-util.c (wks_list_key): Use strtokenize_nt and the recsel
272         flag -t.
273
274 2021-08-20  NIIBE Yutaka  <gniibe@fsij.org>
275
276         scd: Don't release the context until list_finish for PC/SC.
277         + commit 1565baa93ae39a81c5b00ca4558cd24838b4ce54
278         * scd/apdu.c (apdu_dev_list_start): Increment PCSC.COUNT here.
279         (apdu_dev_list_finish): Decrement PCSC.COUNT.
280
281 2021-08-19  Werner Koch  <wk@gnupg.org>
282
283         gpg: Return SUCCESS/FAILURE status also for --card-edit/name.
284         + commit c1a23c3664753656bd4d22aafe0fb89d9bac5147
285         * g10/card-util.c (change_name): Call write_sc_op_status.
286
287 2021-08-18  Werner Koch  <wk@gnupg.org>
288
289         agent: Use the sysconfdir for a pattern file.
290         + commit 661c2ae96699e135294cfd98e1fbc385d35f5f0e
291         * agent/genkey.c (do_check_passphrase_pattern): Use make_filename.
292
293         agent: Ignore passphrase constraints for a generated passphrase.
294         + commit b89b1f35c29ceaebe39b31444936aa66c9297f2c
295         * agent/agent.h (PINENTRY_STATUS_PASSWORD_GENERATED): New.
296         (MAX_GENPIN_TRIES): Remove.
297         * agent/call-pinentry.c (struct entry_parm_s):
298         (struct inq_cb_parm_s): Add genpinhash and genpinhas_valid.
299         (is_generated_pin): New.
300         (inq_cb): Suppress constraints checking for a generated passphrase.
301         No more need for several tries to generate the passphrase.
302         (do_getpin): Store a generated passphrase/pin in the status field.
303         (agent_askpin): Suppress constraints checking for a generated
304         passphrase.
305         (agent_get_passphrase): Ditto.
306         * agent/command.c (cmd_get_passphrase): Ditto.
307
308         agent: Improve the GENPIN callback.
309         + commit 8ed79103474c17d8dce20c740fc9813ada5f79ac
310         * agent/call-pinentry.c (DEFAULT_GENPIN_BYTES): Replace by  ...
311         (DEFAULT_GENPIN_BITS): this and increase to 150.
312         (generate_pin): Make sure that we use at least 128 bits.
313
314         agent: Fix for zero length help string in pinentry hints.
315         + commit 9fb646660258c2842edd6662688eafbc8d751ba7
316         * agent/call-pinentry.c: Remove unused assert.h.
317         (inq_cb): Fix use use of assuan_end_confidential in case of nested
318         use.
319         (do_getpin): Ditto.
320         (setup_formatted_passphrase): Escape the help string.
321         (setup_enforced_constraints): Ignore empty help strings.
322
323         common,w32: Replace log_debug by log_info for InProcessJobs.
324         + commit 629f4a5cffb737454aaf6a5965cfb6d7b03796fc
325         * common/exechelp-w32.c (gnupg_spawn_process_detached): Use log_info.
326
327 2021-08-13  Werner Koch  <wk@gnupg.org>
328
329         agent: Make QT_QPA_PLATFORMTHEME=qt5ct work for the pient.
330         + commit 1305baf0994059f458b1d5ca28a355c12932fab3
331         * agent/call-pinentry.c (atfork_core): Pass DISPLAY.
332
333         agent: New option --check-sym-passphrase-pattern.
334         + commit 7c45a69eb988e9c0329d75900af0c5b1e47291b7
335         * agent/gpg-agent.c (oCheckSymPassphrasePattern): New.
336         (opts): Add --check-sym-passphrase-pattern.
337         (parse_rereadable_options): Set option.
338         (main): Return option info.
339         * tools/gpgconf-comp.c: Add new option.
340         * agent/agent.h (opt): Add var check_sym_passphrase_pattern.
341         (struct pin_entry_info_s): Add var constraints_flags.
342         (CHECK_CONSTRAINTS_NOT_EMPTY): New to replace a hardwired 1.
343         (CHECK_CONSTRAINTS_NEW_SYMKEY): New.
344         * agent/genkey.c (check_passphrase_pattern): Rename to ...
345         (do_check_passphrase_pattern): this to make code reading
346         easier. Handle the --check-sym-passphrase-pattern option.
347         (check_passphrase_constraints): Replace arg no_empty by a generic
348         flags arg.  Also handle --check-sym-passphrase-pattern here.
349         * agent/command.c (cmd_get_passphrase): In --newsymkey mode pass
350         CHECK_CONSTRAINTS_NEW_SYMKEY flag.
351         * agent/call-pinentry.c (struct entry_parm_s): Add constraints_flags.
352         (struct inq_cb_parm_s): New.
353         (inq_cb): Use new struct for parameter passing.  Pass flags to teh
354         constraints checking.
355         (do_getpin): Pass constraints flag down.
356         (agent_askpin): Take constrainst flag from the supplied pinentry
357         struct.
358
359 2021-08-12  Ingo Klöcker  <dev@ingo-kloecker.de>
360
361         agent: Make --pinentry-formatted-passphrase a simple flag.
362         + commit 99601778f4a9dc1c9fee792361c959f5e0732cfd
363         * agent/agent.h (opt): Change type of pinentry_formatted_passphrase
364         to int (as for other flags).
365         * agent/call-pinentry.c (setup_formatted_passphrase): Remove no longer
366         needed translated strings. Write option without value to Assuan
367         connection.
368         * agent/gpg-agent.c (opts): Use ARGPARSE_s_n for
369         oPinentryFormattedPassphrase.
370         (parse_rereadable_options): Set option to 1.
371
372 2021-08-11  Werner Koch  <wk@gnupg.org>
373
374         w32: Move socketdir to LCOAL_APPDATA.
375         + commit 0802cbb59b21e06e16b4fd8596934c5565e7f659
376         * common/homedir.c (is_gnupg_default_homedir): Use standard_homedir
377         instead of the constant which makes a difference on Windows.
378         (_gnupg_socketdir_internal) [W32]: Move the directory to LOCAL_APPDATA.
379         (gnupg_cachedir): Remove unsued function.
380
381         * common/sysutils.c (gnupg_rmdir): New.
382         * tools/gpgconf.c (main): s/rmdir/gnupg_rmdir/.
383
384         gpgconf,w32: Print more registry diagnostics with --list-dirs.
385         + commit 4cc534020669fa038f6a2107a55fe3b42fc065dc
386         * tools/gpgconf.c (list_dirs): Figure out classes with the key.
387
388 2021-08-10  Ingo Klöcker  <dev@ingo-kloecker.de>
389
390         agent: Add checkpin inquiry for pinentry.
391         + commit 5976d293ef9bd953b6e9c61a45ad1f4e85a2743c
392         * agent/call-pinentry.c (inq_cb): Handle checkpin inquiry.
393         (setup_enforced_constraints): New.
394         (agent_get_passphrase): Call setup_enforced_constraints if new
395         passphrase is requested.
396
397         agent: New option --pinentry-formatted-passphrase.
398         + commit bf20a80f68449cc83b67c53ba9a0a84c45827ac4
399         * agent/agent.h (opt): Add field pinentry_formatted_passphrase.
400         * agent/call-pinentry.c (setup_formatted_passphrase): New.
401         (agent_get_passphrase): Pass option to pinentry.
402         * agent/gpg-agent.c (oPinentryFormattedPassphrase): New.
403         (opts): Add option.
404         (parse_rereadable_options): Set option.
405
406 2021-08-05  NIIBE Yutaka  <gniibe@fsij.org>
407
408         build: Simplify for string.h and getopt.h.
409         + commit 29d58e9de7838bcf32e358602abd4ed4498566f8
410         * configure.ac (AC_CHECK_HEADERS): Remove string.h and getopt.h.
411         * dirmngr/ks-engine-ldap.c: Remove including getopt.h.
412         * tools/make-dns-cert.c: Likewise.
413
414         sm: Fix pwri.
415         + commit 100c954ab0d6df509df582cb22ef515171462654
416         * sm/decrypt.c (pwri_parse_pbkdf2): Use int for digest algo.
417         (pwri_decrypt): Use int for cipher algo and digest algo.
418
419         build: Remove duplication of AC_HEADER_TIME.
420         + commit 3f33c7ffcca09d4252d0418fdc2d31c0c8e486f4
421         * configure.ac: Have a single AC_HEADER_TIME.
422
423         build: Update checking headers.
424         + commit a89f13726d08413d4bddcb6afed402de1de9e4fd
425         * configure.ac (AC_CHECK_HEADERS): Remove pty.h utmp.h, util.h,
426         and libutil.h.
427
428 2021-08-02  Ingo Klöcker  <dev@ingo-kloecker.de>
429
430         common: Pass XDG_SESSION_TYPE and QT_QPA_PLATFORM envvars to pinentry.
431         + commit 94d18320b2b0bb5e3fa2023df8ac57078b2f6ecb
432         * common/session-env.c (stdenvnames): Add XDG_SESSION_TYPE and
433         QT_QPA_PLATFORM.
434
435 2021-07-29  Werner Koch  <wk@gnupg.org>
436
437         sm,w32: Fix Unicode problem on key box creation.
438         + commit 7cdd06af479298748c79357dcb36ca1ba4d36bb1
439         * sm/keydb.c (maybe_create_keybox): Replace access by gnupg_access
440
441         tools: Extend gpg-check-pattern.
442         + commit 73c03e02322880c740310207dd2151cfd843792e
443         * tools/gpg-check-pattern.c: Major rewrite.
444
445 2021-07-22  NIIBE Yutaka  <gniibe@fsij.org>
446
447         scd: Small clean up for card access.
448         + commit 5c8124b8b9554c7843feccf408648c9689bce243
449         * scd/app.c (app_get_challenge): Remove the check to ref_count.
450         * scd/command.c (send_client_notifications): Update comments.
451
452         scd: Fix direct use of card with no ctrl->card_ctx.
453         + commit 50ad29f9a72f5454067bd0ca34fc1a71ac06b831
454         * scd/app.c (maybe_switch_app): Remove check of ref_count.
455
456 2021-07-21  Ingo Klöcker  <dev@ingo-kloecker.de>
457
458         agent: Add translatable text for Caps Lock hint.
459         + commit b2a6e5b5169602052ae87d38588bdd3bd76fddad
460         * agent/call-pinentry.c (start_pinentry): Add new default text.
461
462 2021-07-21  NIIBE Yutaka  <gniibe@fsij.org>
463
464         scd: Fix access to list of cards (3/3).
465         + commit 0d6b4210cf31d1c3ca0e8b034537a158fe3caca8
466         * scd/app-common.h (card_reset): Simplify more.
467         (select_additional_application): Supply CARD.
468         (card_ref, card_unref): Remove.
469         (card_get, card_put): New.
470         * scd/app.c (card_reset): No locking/unlocking inside.
471         (app_switch_current_card): Fix comment.
472         (select_additional_application): No locking/unlocking inside.
473         (do_with_keygrip): New, unlocked version.
474         (card_get): New, with support of KEYGRIP.
475         (card_unref): Remove.
476         (card_put): New.
477         (app_write_learn_status, app_readcert: No locking/unlocking inside.
478         (app_readkey, app_getattr, app_setattr, app_sign, app_auth): Likewise.
479         (app_decipher, app_writecert, app_writekey): Likewise.
480         (app_genkey, app_get_challenge, app_change_pin): Likewise.
481         (app_check_pin, app_switch_active_app): Likewise.
482         * scd/command.c (do_reset): Use card_get/card_put.
483         (open_card_with_request): Use card_get/card_put, return CARD locked.
484         (cmd_serialno): Follow the change of open_card_with_request.
485         (cmd_switchapp): Use card_get/card_put.
486         (cmd_learn, cmd_readcert, cmd_readkey, cmd_pksign): Likewise.
487         (cmd_pkauth, cmd_pkdecrypt, cmd_getattr): Likewise.
488         (cmd_setattr, cmd_writecert, cmd_writekey): Likewise.
489         (cmd_genkey, cmd_random, cmd_passwd): Likewise.
490         (cmd_checkpin, cmd_getinfo, cmd_restart): Likewise.
491         (cmd_disconnect, cmd_apdu, cmd_devinfo): Likewise.
492
493         scd: Fix access to list of cards (2/3).
494         + commit b436fb6766b400167e5d57ff1116600bb496b04f
495         * scd/app-common.h (card_reset, select_application): Simplify.
496         * scd/app.c (card_reset, select_application): Simplify.
497         * scd/command.c (do_reset): Follow the change.
498         (open_card, open_card_with_request): Follow the change.
499
500         scd: Fix access to list of cards (1/3).
501         + commit 216945a80e7b6b9d366493fa43fc7e99c830d81c
502         * scd/app.c (card_list_lock): Use MRSW lock.
503         (lock_r_card_list, unlock_r_card_list): New.
504         (lock_w_card_list, unlock_w_card_list): New.
505         (app_dump_state, app_send_devinfo): Use the MRSW lock.
506         (select_application, app_switch_current_card): Likewise.
507         (scd_update_reader_status_file): Likewise.
508         (initialize_module_command, send_card_and_app_list): Likewise.
509         (app_do_with_keygrip, app_wait): Likewise.
510
511 2021-07-08  Werner Koch  <wk@gnupg.org>
512
513         kbx: Improve debugging of the search descriptions in keyboxd.
514         + commit b871824fefa114db931762243537663cc1095cfa
515         * kbx/frontend.c (dump_search_desc): New.
516         (kbxd_search): Actually log the search descriptions.
517
518         kbx: Fix keyboxd searching with multiple patterns.
519         + commit 101ba4f18aceb39c4d5f0e0a7e16e66827f8e612
520         * kbx/keybox-search-desc.h (struct keydb_search_desc): New flag
521         name_used.
522         * common/userids.c (classify_user_id): Set flag.
523         * kbx/kbxserver.c (struct search_backing_store_s): New.
524         (cmd_search): use a backing store for the const pointers.
525         (kbxd_start_command_handler): Release the backing store.
526
527 2021-07-06  NIIBE Yutaka  <gniibe@fsij.org>
528
529         scd: Detect external interference when PCSC_SHARED.
530         + commit 044e5a3c3801fde7fa3b26986825377016e73103
531         * scd/app-common.h (check_aid): New method.
532         * scd/app-openpgp.c (do_check_aid): New.
533         * scd/app-piv.c (do_check_aid): New.
534         * scd/app.c (check_external_interference): New.
535         (maybe_switch_app): Check interference to determine switching is
536         needed.
537
538 2021-06-29  Werner Koch  <wk@gnupg.org>
539
540         artwork: Explain the license for the logo.
541         + commit 5f78ae696c10df43c2b2fc29765e28b85caf5376
542
543
544 2021-06-25  Werner Koch  <wk@gnupg.org>
545
546         agent: Fix regression in agent_get_shadow_info_type.
547         + commit a6efde307f7beb199b543f78b61c317fa2708202
548         * agent/protect.c (agent_get_shadow_info_type): Return the correct
549         value.
550
551         gpg: Let --fetch-key return an exit code on failure.
552         + commit 9579c7786278b75d9c58b7c21b2f3c8bc7849810
553         * g10/keyserver.c (keyserver_fetch): Return an error code.
554         * g10/gpg.c (main) <aFetchKeys>: Return 1 in case of no data.
555
556 2021-06-23  NIIBE Yutaka  <gniibe@fsij.org>
557
558         scd:ccid: Handle LIBUSB_TRANSFER_OVERFLOW interrupt transfer.
559         + commit 25ae80b8eb6e9011049d76440ad7d250c1d02f7c
560         * scd/ccid-driver.c (intr_cb): Ignore LIBUSB_TRANSFER_OVERFLOW.
561
562 2021-06-22  Werner Koch  <wk@gnupg.org>
563
564         tools: Extend ccidmon to print T=1 APDUs.
565         + commit 2c6b62b3572fe43cb6b89ec5fb0bc62385a4b230
566         * tools/ccidmon.c (print_as_ascii): New.
567         (print_t1_block): New.
568         (print_p2r_xfrblock): Print APDUs
569         (print_r2p_datablock): Ditto.
570
571         tests: Cope with broken Libgcrypt versions.
572         + commit 5df658233a3a0c05fac0b4d4889f033ea0d0e034
573         * common/t-sexputil.c (test_ecc_uncompress): Ignore unknwon curve
574         errors.
575
576         w32: Add fallback in case the Windows console can't cope with Unicode.
577         + commit edfe9453be5f8ba374da0ab860be863d66965c56
578         * common/ttyio.c (w32_write_console): Fallback to WriteConsoleA on
579         error.
580
581         scd:p15: Prepare AODF parsing for other authentication types.
582         + commit e387cc97c82313457e4f79729a137e5871891bc1
583         * scd/app-p15.c (auth_type_t): New.
584         (struct aodf_object_s): Add field auth_type.
585         (read_ef_aodf): Distinguish between pin and authkey types.  Include
586         the authtype in the verbose mode diags.
587
588 2021-06-21  Werner Koch  <wk@gnupg.org>
589
590         dirmngr: Fix regression in KS_GET for mail address pattern.
591         + commit d5126efd895bc2af0a7e63dbf4aa782ce47ecc40
592         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Munge mail address pattern.
593         (ks_hkp_get): Allow for mail addresses.
594         -
595
596         Before the keyserver changes in 2.2.28 gpg passed dirmngr a pail
597         address as an exact pattern (e.g. "=foo@example.org").  Since 2.2.28
598         the mail address is detected gpg gpg and we see for example
599         "<foo@example.org>".  This patch fixes this to turn a mail address
600         into an exact match again.
601
602 2021-06-18  Werner Koch  <wk@gnupg.org>
603
604         scd:p15: Add pre-check for ascii-numeric PINs.
605         + commit 029924a46e08ffcda038d89f06abfb41c980a9ad
606         * scd/app-p15.c (verify_pin): acii-numerix is different than BCD.
607
608         scd:p15: Add basic support for AET JCOP cards.
609         + commit 544ec7872aed24c296ea34fac777eca287f7bb47
610         * scd/app-p15.c (CARD_TYPE_AET): New.
611         (cardtype2str): Add string.
612         (card_atr_list): Add corresponding ATR.
613         (app_local_s): New flag no_extended_mode.  Turn two other flags into
614         bit flags.
615         (select_ef_by_path): Hack to handle the 3FFF thing.
616         (readcert_by_cdf): Do not use etxended mode for AET.
617         (app_select_p15): Set no_extended_mode.
618
619         scd:p15: Handle cards with bad encoded path objects.
620         + commit 7a8545c91b09277b0833dc0e5881ba5d1c8dbca3
621         * scd/app-p15.c (read_ef_prkdf, read_ef_pukdf)
622         (read_ef_cdf, read_ef_aodf): Allow for a zero length path and
623         correctly skip unsupported auth types.
624
625         scd: Improve reading of binary records.
626         + commit 44f977d0e332e77fb8a775c4837c00118bbe08cb
627         * scd/iso7816.c (iso7816_read_binary_ext): Handle the 0x6a86 SW the
628         same as 6b00.
629         * scd/apdu.c (apdu_get_atr): Modify debug messages.
630         * scd/app-p15.c (app_select_p15): Print FCI on error.
631         (read_p15_info): Clean up diag in presence of debug options.
632
633 2021-06-17  NIIBE Yutaka  <gniibe@fsij.org>
634
635         scd: Fix RESET handling.
636         + commit 7718244168c948171ffd37d7e964cbcd172661c6
637         * scd/app.c (scd_update_reader_status_file): Clear ->reset_requested.
638
639 2021-06-16  NIIBE Yutaka  <gniibe@fsij.org>
640
641         dirmngr: Fix build with --disable-ldap.
642         + commit c6900f5723b4edc899aaea267ed599b5ad724142
643         * dirmngr/dirmngr.c (parse_rereadable_options) [USE_LDAP]:
644         Conditionalize.
645
646 2021-06-16  Werner Koch  <wk@gnupg.org>
647
648         sm: New option --ldapserver as an alias for --keyserver.
649         + commit 89df86157e3580aae7e391382f4a5451a192fc68
650         * sm/gpgsm.c (opts): Add option --ldapserver and make --keyserver an
651         alias.
652
653         dirmngr: Allow to pass no filter args to dirmngr_ldap.
654         + commit 14528ec66bd7dce28c7540fa9a34f35de54261c1
655         * dirmngr/dirmngr_ldap.c (main): Handle no args case.
656
657         dirmngr: Rewrite the LDAP wrapper tool.
658         + commit 864ea251983977b91a7f6ff5964e497cf4b208dc
659         * dirmngr/ldap-misc.c: New.
660         * dirmngr/ldap-misc.h: New.
661         * dirmngr/ks-engine-ldap.c: Include ldap-misc.h.
662         (ldap_err_to_gpg_err, ldap_to_gpg_err): Move to ldap-misc.c.
663         * dirmngr/ldap-wrapper.c (ldap_wrapper): Print list of args in debug
664         mode.
665         * dirmngr/server.c (lookup_cert_by_pattern): Handle GPG_ERR_NOT_FOUND
666         the saqme as GPG_ERR_NO_DATA.
667         * dirmngr/ldap.c (run_ldap_wrapper): Add args tls_mode and ntds.
668         Remove arg url.  Adjust for changes in dirmngr_ldap.
669         (url_fetch_ldap): Remove args host and port.  Parse the URL and use
670         these values to call run_ldap_wrapper.
671         (attr_fetch_ldap): Pass tls flags to run_ldap_wrapper.
672         (rfc2254_need_escape, rfc2254_escape): New.
673         (extfilt_need_escape, extfilt_escape): New.
674         (parse_one_pattern): Rename to ...
675         (make_one_filter): this.  Change for new dirmngr_ldap calling
676         convention.  Make issuer DN searching partly work.
677         (escape4url, make_url): Remove.
678         (start_cert_fetch_ldap): Change for new dirmngr_ldap calling
679         convention.
680         * dirmngr/dirmngr_ldap.c: Major rewrite.
681
682         * dirmngr/t-ldap-misc.c: New.
683         * dirmngr/t-support.h (DIM, DIMof): New.
684         * dirmngr/Makefile.am (dirmngr_ldap_SOURCES): Add ldap-misc.c
685         (module_tests) [USE_LDAP]: Add t-ldap-misc.
686         (t_ldap_parse_uri_SOURCES): Ditto.
687         (t_ldap_misc_SOURCES): New.
688
689         dirmngr: Remove useless code.
690         + commit bcb99315627ec38aa5c9fe097075a82bdc8a2043
691         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Remove the
692         password_param thing because we set the password directly without an
693         intermediate var.
694
695         dirmngr: Fix default port for our redefinition of ldaps.
696         + commit 58e4c82512a4b0828f78fc9f03dbcdbf77760b5c
697         * dirmngr/server.c (make_keyserver_item): Fix default port for ldaps.
698         Move a tmpstr out of the blocks.
699         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Improve diagnostics.
700
701         dirmngr: Use --ldaptimeout for OpenPGP LDAP keyservers.
702         + commit 3e05f99e8db5c4039d352d5bd9dde01ed9653f2f
703         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Use LDAP_OPT_TIMEOUT.
704
705         * dirmngr/dirmngr.c (main): Move --ldaptimeout setting to ...
706         (parse_rereadable_options): here.
707
708         dirmngr: New option --ldapserver.
709         + commit 52cf32ce2f904b2e6f53f406a90458f6ef148af9
710         * dirmngr/dirmngr.c (opts): Add option --ldapserver.
711         (ldapserver_list_needs_reset): New var.
712         (parse_rereadable_options): Implement option.
713         (main): Ignore dirmngr_ldapservers.conf if no --ldapserver is used.
714
715         * dirmngr/server.c (cmd_ldapserver): Add option --clear and list
716         configured servers if none are given.
717
718         dirmngr: Allow for non-URL specified ldap keyservers.
719         + commit eb3a629154de10a5414a5d2c2b9941ef8bf1eeaf
720         * dirmngr/server.c (cmd_ldapserver): Strip an optional prefix.
721         (make_keyserver_item): Handle non-URL ldap specs.
722         * dirmngr/dirmngr.h (struct ldap_server_s): Add fields starttls,
723         ldap_over_tls, and ntds.
724
725         * dirmngr/ldapserver.c (ldapserver_parse_one): Add for an empty host
726         string.  Improve error messages for the non-file case.  Support flags.
727         * dirmngr/ks-action.c (ks_action_help): Handle non-URL ldap specs.
728         (ks_action_search, ks_action_get, ks_action_put): Ditto.
729         * dirmngr/ks-engine-ldap.c: Include ldapserver.h.
730         (ks_ldap_help): Handle non-URL ldap specs.
731         (my_ldap_connect): Add args r_host and r_use_tls.  Rewrite to support
732         URLs and non-URL specified keyservers.
733         (ks_ldap_get): Adjust for changes in my_ldap_connect.
734         (ks_ldap_search): Ditto.
735         (ks_ldap_put): Ditto.
736
737         gpg,sm: Simplify keyserver spec parsing.
738         + commit bebc71d2291e93afb76792c5e210836857103c36
739         * common/keyserver.h: Remove.
740         * sm/gpgsm.h (struct keyserver_spec): Remove.
741         (opt): Change keyserver to a strlist_t.
742         * sm/gpgsm.c (keyserver_list_free): Remove.
743         (parse_keyserver_line): Remove.
744         (main): Store keyserver in an strlist.
745         * sm/call-dirmngr.c (prepare_dirmngr): Adjust for the strlist.  Avoid
746         an ambiguity in dirmngr by adding a prefix if needed.
747
748         * g10/options.h (struct keyserver_spec): Move definition from
749         keyserver.h to here.  Remove most fields.
750         * g10/keyserver.c (free_keyserver_spec): Adjust.
751         (cmp_keyserver_spec): Adjust.
752         (parse_keyserver_uri): Simplify.
753         (keyidlist): Remove fakev3 arg which does not make any sense because
754         we don't even support v3 keys.
755
756         dirmngr: Support pseudo URI scheme "opaque".
757         + commit 1c96f4d663c020167ed3d39e513751641dfc3567
758         * dirmngr/http.h (HTTP_PARSE_NO_SCHEME_CHECK): New.
759         * dirmngr/http.c (http_parse_uri): Use this flag.  Change all callers
760         to use the new macro for better readability.
761         (do_parse_uri): Add pseudo scheme "opaque".
762         (uri_query_value): New.
763
764 2021-06-11  Werner Koch  <wk@gnupg.org>
765
766         sm: Fix finding of issuer in use-keyboxd mode.
767         + commit 6b76693ff54297456b724ba53f7e6283e2a5a126
768         * sm/keydb.c (struct keydb_local_s): Add field saved_search_result.
769         (keydb_push_found_state): Implement for keyboxd.
770         (keydb_pop_found_state): Ditto.
771         (keydb_get_cert): Do not release the cert so that the function can be
772         used again to get the same cert.  This is the same behaviour as in
773         pubring.kbx mode.
774
775         * sm/certchain.c, sm/import.c: Improve some error messages.
776
777 2021-06-11  NIIBE Yutaka  <gniibe@fsij.org>
778
779         scd: Support clearing of Reset Code by ''.
780         + commit 4e02db75e3a1da9012176f2cfe1638c8c0129f6f
781         * scd/app-openpgp.c (do_change_pin): Allow null-string.
782
783 2021-06-09  Werner Koch  <wk@gnupg.org>
784
785         gpgtar,w32: Fix file size computation.
786         + commit 14e36bdbe1c39bc23e70db775e05319367ee8adb
787         * tools/gpgtar-create.c (fillup_entry_w32): Move parentheses.
788
789 2021-06-09  NIIBE Yutaka  <gniibe@fsij.org>
790
791         agent: Fix importing protected secret key.
792         + commit 7a80004d5407c6c48b21d57ba6edb8e5a2db4995
793         * agent/cvt-openpgp.c (do_unprotect): Only modify SKEY when it is
794         correctly decrypted.
795
796 2021-06-08  NIIBE Yutaka  <gniibe@fsij.org>
797
798         scd: Fix serial number detection for Yubikey 5.
799         + commit c3a9ee0b658887ca9baa4514187b17857fdf6586
800         * scd/app.c (app_new_register): Handle serial number correctly.
801
802 2021-06-07  NIIBE Yutaka  <gniibe@fsij.org>
803
804         scd: Fix READER-PORT option handling for PC/SC.
805         + commit ee5b6af370fbee1b08136e5dc384cf7996bcfc4c
806         * scd/apdu.c (apdu_open_reader): READERNO should be -1 when
807         READER-PORT is specified for PC/SC.
808
809 2021-06-04  NIIBE Yutaka  <gniibe@fsij.org>
810
811         agent: Appropriate error code for importing key with no passwd.
812         + commit 21ef425e222ddfa460b37dece63adb67ff2e4dd1
813         * agent/cvt-openpgp.c (convert_from_openpgp_main): Return
814         GPG_ERR_BAD_SECKEY.
815
816 2021-06-03  NIIBE Yutaka  <gniibe@fsij.org>
817
818         gpg: Support KEYGRIP search with traditional keyring.
819         + commit 9668ee097a1474299b8debecb1ee38620a327082
820         * g10/keyring.c (keyring_search): Handle KEYDB_SEARCH_MODE_KEYGRIP.
821
822 2021-06-02  Werner Koch  <wk@gnupg.org>
823
824         common: Allow for GCM decryption in de-vs mode.
825         + commit c17dac5ac3ccb374e5a1276d4bc9b444c390a4c5
826         * common/compliance.c (gnupg_cipher_is_allowed): Allow GCM for gpgsm
827         in decrypt mode.
828
829         * tests/cms/samplemsgs/pwri-sample.gcm.p7m: Remove duplicated authtag
830
831         sm: Support AES-GCM decryption.
832         + commit 4980fb3c6dde8c1dda975e8a36d6086c8456a631
833         * tests/cms/samplemsgs/: Add sample messages.
834         * sm/gpgsm.c (main): Use gpgrt_fcancel on decryption error.
835         * sm/decrypt.c (decrypt_gcm_filter): New.
836         (gpgsm_decrypt): Use this filter if requested.  Check authtag.
837
838 2021-05-28  Werner Koch  <wk@gnupg.org>
839
840         gpgconf: Make runtime changes with different homedir work.
841         + commit 31c0aa2ff37f662c6391885d61ffd46ec3062e5a
842         * tools/gpgconf-comp.c (dirmngr_runtime_change): Pass --homedir first.
843
844 2021-05-28  NIIBE Yutaka  <gniibe@fsij.org>
845
846         agent: Fix calling handle_pincache_put.
847         + commit 36f50b259cae0428264f4b7d60b82209e3dd8725
848         * agent/call-scd.c (padding_info_cb): Fix the argument.
849
850         scd: Fix zero-byte handling in ECC.
851         + commit 5b1806454c03b3b493222f405ffced80a5d430ad
852         * scd/app-openpgp.c (ecc_writekey): Don't remove zero-byte.
853
854 2021-05-27  NIIBE Yutaka  <gniibe@fsij.org>
855
856         gpg: Ed448 and X448 are only for v5 for --full-gen-key.
857         + commit 2b50f942672d9a2c325a818f21f69d3ee69255d3
858         * g10/keygen.c (generate_keypair): Set pVERSION = 5, pSUBVERSION = 5,
859         when it's Ed448 or X448.
860
861         build: _DARWIN_C_SOURCE should be 1.
862         + commit be81941e1aca75d9e1d0dd2e2b234ae6df53c05a
863         * configure.ac (*-apple-darwin*): Set _DARWIN_C_SOURCE 1.
864
865 2021-05-25  Werner Koch  <wk@gnupg.org>
866
867         gpg: Partial fix for Unicode problem in output files.
868         + commit 30563ea29705016b08ff04fd8a833940ea94e4e8
869         * g10/openfile.c (overwrite_filep): Use gnupg_access.
870
871 2021-05-21  Werner Koch  <wk@gnupg.org>
872
873         common: Annotate leaked memory in homedir.c.
874         + commit 260bbb4ab27eab0a8d4fb68592b0d1c20d80179c
875         * g10/trustdb.c (how_to_fix_the_trustdb): Use gnupg_homedir.
876         * common/homedir.c (standard_homedir): Annotate leaked memory.
877         (gnupg_daemon_rootdir): Ditto.
878         (gnupg_socketdir): Ditto.
879         (gnupg_sysconfdir): Ditto.
880         (gnupg_bindir): Ditto.
881         (gnupg_libdir): Ditto.
882         (gnupg_datadir): Ditto.
883         (gnupg_localedir): Ditto.
884         (gnupg_cachedir): Ditto.
885         (gpg_agent_socket_name): Ditto.
886         (dirmngr_socket_name): Ditto.
887         (keyboxd_socket_name): Ditto.
888         (get_default_pinentry_name): Ditto.
889         (gnupg_module_name): Ditto.
890         (default_homedir): Ditto.  Make static.
891
892 2021-05-20  Werner Koch  <wk@gnupg.org>
893
894         sm: Let --dump-cert --show-cert also print an OpenPGP fingerprint.
895         + commit 52bbdc731fd54ff6d2744d7aca8e48e2c2389cc9
896         * sm/keylist.c (list_cert_raw): Print the OpenPGP fpr.
897
898 2021-05-20  Jakub Jelen  <jjelen@redhat.com>
899
900         card: Intialize pointer to avoid double free.
901         + commit 98c52aeb31f4bf2604727aacad982fb51c04063f
902         * tools/gpg-card.c (cmd_salut): Initialize data pointer
903
904         scd: avoid memory leaks.
905         + commit 27e7bde12ee2b67425ae7011d976d2544c90fd9a
906         * scd/app-p15.c (send_certinfo): free labelbuf
907           (do_sign): goto leave instead of return
908         * scd/app-piv.c (do_sign): goto leave instead of return, fix typo in
909           variable name, avoid using uninitialized variables
910         * scd/command.c (cmd_genkey): goto leave instead of return
911
912         kbx: Avoid uninitialized read.
913         + commit fc5fac83b778f0ff61608c286448ab7fa14ccb2d
914         * kbx/kbx-client-util.c (datastream_thread): Initialize pointer
915         * kbx/keybox-dump.c (_keybox_dump_cut_records): free blob
916         * kbx/kbxserver.c (kbxd_start_command_handler): do not free passed ctrl
917         * kbx/keyboxd.c (check_own_socket): free sockname
918
919         g10: Avoid memory leaks.
920         + commit fa0771f609b5fcb104c64a11aefc501b7a91696d
921         * g10/call-agent.c (card_keyinfo_cb): free keyinfo.  Restructure to
922         avoid backward gotos.
923         * g10/keyedit.c (menu_set_keyserver_url): properly enclose the block
924         * g10/keygen.c (gen_card_key): free pk and pkt
925
926         dirmgr: Avoid double free.
927         + commit 25aa353bf833fdae1a96158b49daf7588ae3b109
928         * dirmgr/http.c (http_prepare_redirect): Avoid double free
929         * dirmgr/ocsp.c (check_signature): Initialize pointer
930
931         common: Avoid double-free.
932         + commit 4704d1ce4e1e2ba9f986fb221346eda5c97f947b
933         * common/name-value.c (do_nvc_parse): reset to null after ownership
934         change
935
936         agent: Fix memory leaks.
937         + commit 33a2362e566c0e0d7011abf2e5fa5704d7cb4206
938         * agent/call-daemon.c (daemon_start): free wctp
939         * agent/call-scd.c (agent_card_pksign): return error instead of noop
940         (card_keyinfo_cb): free keyinfo.  Restructure to avoid a goto backwards.
941         * agent/protect.c (agent_get_shadow_info_type): allocate only as a last
942         action.  Catch xtrymalloc failure.
943         (agent_is_tpm2_key): Free buf.
944
945         sm: Avoid memory leaks and double double-free.
946         + commit e6132bc9f41727ea1abe2d6298610223c11639a2
947         * sm/certcheck.c (extract_pss_params): Avoid double free
948         * sm/decrypt.c (gpgsm_decrypt): goto leave instead of return
949         * sm/encrypt.c (encrypt_dek): release s_pkey
950         * sm/server.c (cmd_export): free list
951         (do_listkeys): free lists
952
953         g10: Fix memory leaks.
954         + commit 2af7bb2295cda5377546cedd0c906a3cff4d2427
955         * g10/card-util.c (change_pin): free answer on errors
956           (ask_card_keyattr): free answer on error
957         * g10/cpr.c (do_get_from_fd): free string
958         * g10/gpg.c (check_permissions): free dir on weird error
959         * g10/import.c (append_new_uid): release knode
960         * g10/keyedit.c (menu_set_keyserver_url): free answer
961           (menu_set_keyserver_url): free user
962         * g10/keygen.c (print_status_key_not_created): move allocation after
963           sanity check
964           (ask_expire_interval): free answer
965           (card_store_key_with_backup): goto leave instaed of return
966         * g10/keyserver.c (parse_keyserver_uri): goto fail instead of return
967         * g10/revoke.c (gen_desig_revoke): release kdbhd
968           (gen_desig_revoke): free answer
969         * g10/tofu.c (ask_about_binding): free sqerr and response
970         * g10/trustdb.c (ask_ownertrust): free pk
971
972         dirmgr: clean up memory on error code paths.
973         + commit 0d2c1e9046faf102809bc65329c22b6cf8d62ea0
974         * dirmgr/crlcache.c (finish_sig_check): goto leave instead of return
975         * dirmgr/http.c (send_request): free authstr and proxy_authstr
976         * dirmgr/ldap.c (start_cert_fetch_ldap): free proxy
977         * dirmgr/ocsp.c (check_signature): release s_hash
978
979         agent: Avoid memory leaks in error code paths.
980         + commit a95ddffdcd58383cce93677be5e7e11c5c229a98
981         * agent/command.c (cmd_genkey): Use goto instead of return.
982         * agent/cvt-openpgp.c (convert_from_openpgp_main): Ditto.
983         * agent/genkey.c (agent_ask_new_passphrase): Fix typo to free correct
984         pointer
985         (agent_genkey): Release memory
986         * agent/gpg-agent.c (check_own_socket): Free sockname
987         * agent/protect-tool.c (read_key): Free buf.
988         (agent_askpin): Free passphrase
989
990 2021-05-19  Werner Koch  <wk@gnupg.org>
991
992         dirmngr: For KS_SEARCH return the fingerprint also with LDAP.
993         + commit a660e1060630e8d75ecb43abf69dbb73378c1df9
994         * dirmngr/ks-engine-ldap.c (extract_keys): Return the fingerprint if
995         available.
996         (ks_ldap_search): Ditto.
997         (extract_keys): Make sure to free the ldap values also in corner
998         cases.
999         (my_ldap_value_free): New.
1000         (ks_ldap_get): Ditto.
1001         (ks_ldap_search): Ditto.
1002         (my_ldap_connect): Ditto.
1003
1004         gpg: Improve speed of secret key listing.
1005         + commit 40da61b89b62dcb77847dc79eb159e885f52f817
1006         * agent/command.c (cmd_keyinfo): Factor some code out to ...
1007         (get_keyinfo_on_cards): ... new.
1008         (cmd_havekey): Add --list mode.
1009         * g10/gpg.h (struct server_control_s): Add new caching vars.
1010         * g10/gpg.c (gpg_deinit_default_ctrl): Release cache.
1011         * g10/call-agent.c (agent_probe_any_secret_key): Init and try to use
1012         the keygrip cache.
1013         (agent_genkey): Clear the cache.
1014         (agent_import_key): Ditto.
1015
1016         * g10/keylist.c (list_all, list_one): Pass ctrl to
1017         agent_probe_any_secret_key.
1018         * g10/getkey.c (lookup): Ditto.
1019
1020 2021-05-18  Werner Koch  <wk@gnupg.org>
1021
1022         gpg: Fix sending an OpenPGP key with umlaut to an LDAP keyserver.
1023         + commit b8e6e485ee0b3389992f5de4d717e2e9cca92a9e
1024         * g10/call-dirmngr.c (record_output): Rewrite.
1025
1026 2021-05-18  Ingo Klöcker  <dev@ingo-kloecker.de>
1027
1028         scd:p15: Fix logic for appending product name to MANUFACTURER.
1029         + commit 65bc5ea95e608869fe57dae43e201ed47b98f9fe
1030         * scd/app-p15.c (do_getattr): Append product name to MANUFACTURER if
1031         manufacturer_id does not already contain a bracket and if we have a
1032         product name.
1033
1034 2021-05-17  Werner Koch  <wk@gnupg.org>
1035
1036         gpg: Use a more descriptive prompt for symmetric decryption.
1037         + commit 6dfae2f402a702ccd7f2c585b28cb356e9f26a26
1038         * g10/keydb.h (GETPASSWORD_FLAG_SYMDECRYPT): New.
1039         (passphrase_to_dek_ext): Remove this obsolete prototype.
1040         * g10/passphrase.c (passphrase_get): Add arg flags.  Use new flag
1041         value.
1042         (passphrase_to_dek): Add arg flags and pass it on.
1043         * g10/mainproc.c (proc_symkey_enc): Use new flag.
1044
1045         * sm/decrypt.c (pwri_decrypt): Use "passphrase".
1046
1047         dirmngr: LDAP search by a mailbox now ignores revoked keys.
1048         + commit 1406f551f1e00a03eabf5b8bd3011bf6393ce318
1049         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Ignore revoked
1050         and disable keys in mail mode.
1051
1052         sm: Ask for the password for password based decryption (pwri)
1053         + commit eeb65d3bbd7d461694d30009631739735a2b9bad
1054         * sm/decrypt.c (pwri_decrypt): Add arg ctrl.  Ask for passphrase.
1055
1056         * sm/export.c (export_p12): Mark string as translatable.
1057         * sm/import.c (parse_p12): Ditto.
1058
1059 2021-05-14  Werner Koch  <wk@gnupg.org>
1060
1061         sm: Support decryption of password based encryption (pwri)
1062         + commit 02029f9eab87e9fd667829dfb083846275576398
1063         * sm/decrypt.c (pwri_parse_pbkdf2): New.
1064         (pwri_decrypt): New.
1065         (prepare_decryption): Support pwri.
1066         (gpgsm_decrypt): Test for PWRI.  Move IS_DE_VS flag to DFPARM.
1067
1068 2021-05-14  NIIBE Yutaka  <gniibe@fsij.org>
1069
1070         scd: Remove wrong assertion and add protection to PCSC.COUNT.
1071         + commit 58b330e935b9225d5a389c5d858a0e7304f573ad
1072         * scd/apdu.c (apdu_dev_list_finish): Fix for calling
1073         release_pcsc_context.
1074
1075 2021-05-12  Werner Koch  <wk@gnupg.org>
1076             Jakub Jelen  <jjelen@redhat.com>
1077
1078         agent: Use SHA-256 for SSH fingerprint by default.
1079         + commit 310b064f5271fe8566ebc996702ea1422875f425
1080         * agent/gpg-agent.c (parse_rereadable_options): Change default ssh
1081         fingerprint digest.
1082         (main): Ditto.
1083
1084 2021-05-11  Werner Koch  <wk@gnupg.org>
1085
1086         A few minor code cleanups and typo fixes.
1087         + commit 965bb0693c0df04e6dbd57a8b471944367cf6c4e
1088         * agent/command-ssh.c (ssh_handler_request_identities): Remove double
1089         check of ERR.
1090         * g10/getkey.c (get_pubkey_byname): Remove double use of break.
1091         * g10/pkglue.c (pk_encrypt): Handle possible NULL-ptr access due to
1092         failed malloc.
1093
1094 2021-05-11  NIIBE Yutaka  <gniibe@fsij.org>
1095
1096         gpg: Fix allocation for EXTRAHASH.
1097         + commit ac731dbbbd21f53d2f6bf69343e6bf553ebc9dad
1098         * g10/sign.c (clearsign_file): Fix the size to allocate.
1099
1100         scd: Serialize READER_TABLE access for PC/SC.
1101         + commit 32baa9acfb153004bdb2509f9516482b78f256a4
1102         * scd/apdu.c (apdu_dev_list_start): Remove locking READER_TABLE_LOCK.
1103         Don't increment PCSC.COUNT here.
1104         (apdu_dev_list_finish): Don't decrement PCSC.COUNT here.
1105         (apdu_open_reader): Protect access with READER_TABLE_LOCK.
1106
1107 2021-05-10  NIIBE Yutaka  <gniibe@fsij.org>
1108
1109         scd: Fix close_pcsc_reader.
1110         + commit ec5591dc4e1f1b0340b9043a410dc62b63a90416
1111         * scd/apdu.c (close_pcsc_reader): Don't touch .RDRNAME field.
1112         (apdu_dev_list_finish): Clear .RDRNAME field and replace call of
1113         close_pcsc_reader by release_pcsc_context.  Add assertion.
1114
1115         scd: Make sure releasing PC/SC context.
1116         + commit cccc9bd5db1f00c35dff192935e91d46cafb259f
1117         * scd/apdu.c (release_pcsc_context): New.
1118         (close_pcsc_reader): Use release_pcsc_context.  Add assertion.
1119         (apdu_dev_list_start): Replace call of close_pcsc_reader
1120         into release_pcsc_context, add condition.
1121
1122 2021-05-07  NIIBE Yutaka  <gniibe@fsij.org>
1123
1124         scd: Increment PCSC.COUNT correctly.
1125         + commit 0498ea8fbd57d0df3093301d551db6b287ccf622
1126         * scd/apdu.c (open_pcsc_reader): PCSC.COUNT should
1127         be incremented before possible call of close_pcsc_reader.
1128
1129         scd: Fix memory leak for RDRNAME and serialize access.
1130         + commit 5d1b41310682a599a16bcb95e18f56e62299059e
1131         * scd/apdu.c (close_pcsc_reader): Move locking to...
1132         (apdu_close_reader): ... here, as it's also needed for CCID driver.
1133         Free RDRNAME when closed.
1134
1135         scd: Fix declarations for PC/SC access.
1136         + commit 039aed9d401f3875eee0251d34be74de7a1daf84
1137         * scd/apdu.c (pcsc_begin_transaction, pcsc_transmit): Use HANDLE.
1138
1139 2021-05-06  NIIBE Yutaka  <gniibe@fsij.org>
1140
1141         scd: Recover the partial match for PORTSTR for PC/SC.
1142         + commit 53bdc6288f9b474e53f06088130e304cee41b12d
1143         * scd/apdu.c (apdu_open_reader): Allow partial match of
1144         PORTSTR again just like 2.2 does.
1145
1146         scd: When reader is specified, make sure only open once.
1147         + commit d6fe82d3d1699eb417f87b487048f95fee91e2cd
1148         * scd/apdu.c (apdu_open_reader): Make sure not to try multiple times,
1149         when PORTSTR is specified.
1150
1151 2021-04-29  Werner Koch  <wk@gnupg.org>
1152
1153         scd: Fix PC/SC removed card problem.
1154         + commit 8d81fd7c01e8dfacc719ff190f8e364014e32fdf
1155         * scd/apdu.c (pcsc_cancel): New.
1156         (pcsc_init): Load new function.
1157         (connect_pcsc_card): Use it after a removed card error.
1158
1159 2021-04-28  Werner Koch  <wk@gnupg.org>
1160
1161         scd: Fix problem with reader list becoming empty.
1162         + commit bb8e3996e44f4f057f0771b9b72c89feae00f1b1
1163         * scd/apdu.c (close_pcsc_reader): Do not decrement refcount if already
1164         zero.  Always release context if or becomes zero.
1165         (apdu_dev_list_start): Unlock prior to close_pcsc_reader.  For PC/SC
1166         increment the count.  Always release the lock.
1167         (apdu_dev_list_finish): No more unlocking.  Use close_pcsc_reader
1168         instead of code duplication.
1169
1170         * scd/apdu.c (pcsc_error_string): Add an error code.
1171         * scd/scdaemon.c (scd_kick_the_loop): Fix a diagnostic.
1172
1173 2021-04-27  Kirill Elagin  <kirelagin@gmail.com>
1174
1175         scd: Fix unblock PIN by a Reset Code with KDF.
1176         + commit f209d7d2db0e963a6ad1fa8c4f0c034ba0297842
1177         * scd/app-openpgp.c (do_change_pin): Use correct CHVNO=1 for
1178         pin2hash_if_kdf, for user's PIN.
1179
1180 2021-04-26  Werner Koch  <wk@gnupg.org>
1181
1182         gpg: Fix mailbox based search via AKL keyserver method.
1183         + commit 4fcfac6feb2a6c2b14883ba406afc917e8d4be42
1184         * g10/keyserver.c (keyserver_import_name): Rename to ...
1185         (keyserver_import_mbox): this.  And use mail search mode.
1186         * g10/getkey.c (get_pubkey_byname): Change the two callers.
1187
1188         gpg: Do not use import-clean for LDAP keyserver imports.
1189         + commit 99db4b0c7fd128ea5b2e251fe854bd57f6322238
1190         * g10/options.h (opts): New field expl_import_only.
1191         * g10/import.c (parse_import_options): Set it.
1192         * g10/keyserver.c (keyserver_get_chunk): Add special options for LDAP.
1193
1194 2021-04-25  Werner Koch  <wk@gnupg.org>
1195
1196         gpg: Auto import keys specified with --trusted-keys.
1197         + commit 100037ac0f558e8959fc065d4703c85c2962489e
1198         * g10/getkey.c (get_pubkey_with_ldap_fallback): New.
1199         * g10/trustdb.c (verify_own_keys): Use it.
1200
1201         scd:p15: Fix last commit and improve D-TRUST detection.
1202         + commit cc5aa68b6310bdeaa1102bb0d6a33420920648e7
1203         * scd/app-p15.c (read_p15_info): Improve D-TRUST card detection.
1204         (do_getattr): Fix faulty code for the last commit.  Append the product
1205         name to MANUFACTURER.
1206
1207         scd:p15: Shorten the displayed s/n of RSCS cards.
1208         + commit 21e3f750bd7dde2ae9ece01b1abdd1b47ba4fb04
1209         * scd/app-p15.c (get_dispserialno): Add dedicated handling for RSCS.
1210
1211 2021-04-23  Werner Koch  <wk@gnupg.org>
1212
1213         gpg: Replace an obsolete trustdb function.
1214         + commit 3cbc66410d62ad2f7e559095753a2385fe644d07
1215         * g10/trustdb.c (tdb_register_trusted_keyid): Make static.
1216         (tdb_register_trusted_key): Replace register_trusted_keyid by
1217         tdb_register_trusted_key.
1218         * g10/keygen.c (do_generate_keypair): Ditto.
1219         * g10/trust.c (register_trusted_keyid): Remove.
1220
1221         gpg: Allow decryption w/o public key but with correct card inserted.
1222         + commit 50293ec2ebf2a997dbad9a47166d694efcc0709a
1223         * agent/command.c (cmd_readkey): Add option --no-data and special
1224         handling for $SIGNKEYID and $AUTHKEYID.
1225         * g10/call-agent.c (agent_scd_getattr): Create shadow keys for KEY-FPR
1226         output.
1227         * g10/skclist.c (enum_secret_keys): Automagically get a missing public
1228         key for the current card.
1229
1230         agent: Require verbose level 2 for handler started/terminated notices.
1231         + commit 84c2d97cca76045bbe9d0598a10623d5d91e6530
1232         * agent/gpg-agent.c (do_start_connection_thread): Silence diags even
1233         more.
1234
1235 2021-04-23  NIIBE Yutaka  <gniibe@fsij.org>
1236
1237         tools: Fix for --disable-tpm2d.
1238         + commit 97ba94e52b2390f43fc1ac7db98e8ee7a37ddfb1
1239         * tools/gpgconf-comp.c: Conditionalize with BUILD_WITH_TPM2D.
1240
1241 2021-04-22  Werner Koch  <wk@gnupg.org>
1242
1243         scd: Fix PSO_CSV for 512 bit curves.
1244         + commit 9e24f2a45ce8038f662ec1a9893669e1d5604ec7
1245         * scd/iso7816.c (iso7816_pso_csv): Use BER-TLV instead of SIMPLE-TLV
1246
1247         tests: Make sure that the build keyboxd is used.
1248         + commit d36c4dc95b72b780375d57311bdf4ae842fd54fa
1249         * tests/openpgp/defs.scm (create-gpghome): Add keyboxd-program.
1250
1251 2021-04-21  Werner Koch  <wk@gnupg.org>
1252
1253         card: New option --shadow for command list.
1254         + commit 2fce99d73a6afc1a1a29041722a934bb81c7d739
1255         * tools/card-call-scd.c (scd_readkey): Add arg create_shadow.
1256         * tools/gpg-card.c (list_one_kinfo): Add arg create_shadow and pass it
1257         down to scd-readkey.  Change all callers to convey this arg.
1258         (cmd_list): Add option --shadow.
1259
1260         agent: Silence error messages for READKEY --card.
1261         + commit 8f2c9cb73538baab7da8107f2cceb2f6fc49642a
1262         * agent/command.c (cmd_readkey): Test for shadow key before creating
1263         it.
1264
1265         gpg: Allow fingerprint based lookup with --locate-external-key.
1266         + commit ec36eca08cdbf6653e7362e8e0e6c5f2c75b4a60
1267         * g10/keyserver.c (keyserver_import_fprint_ntds): New.
1268         * g10/getkey.c (get_pubkey_byname): Detect an attempt to search by
1269         fingerprint in no_local mode.
1270
1271         keyboxd: Fix searching for exact mail addresses.
1272         + commit f79e9540ca643b5cb912e7bfca2af56be428efed
1273         * kbx/kbxserver.c (cmd_search): Use the openpgp hack for calling
1274         classify_user_id.
1275         * kbx/backend-sqlite.c (run_select_statement): Remove angle brackets
1276         in exact addrspec mode.
1277         * g10/call-keyboxd.c (keydb_search): Do not duplicate the left angle
1278         bracket.
1279         * sm/keydb.c (keydb_search): Ditto.
1280
1281         gpg,sm: Ignore the log-file option from common.conf.
1282         + commit d153e4936e05ab3b15df3c092024d83ac9d6ca46
1283         * g10/gpg.c (main): Don't use the default log file from common.conf.
1284         * sm/gpgsm.c (main): Ditto.
1285
1286 2021-04-20  Werner Koch  <wk@gnupg.org>
1287
1288         Release 2.3.1.
1289         + commit cbbdb88627fe57ebf02b8b4bf9002d356e57e2e4
1290
1291
1292         Support log-file option from common.conf for all daemon.
1293         + commit 45918813f0599505e4f84bd44b09fb708b4e7f23
1294         * agent/gpg-agent.c: Include comopt.h.
1295         (main): Read log-file option from common.conf.
1296         (reread_configuration): Ditto.
1297         * dirmngr/dirmngr.c: Include comopt.h.
1298         (main): Read log-file option from common.conf.
1299         (reread_configuration): Ditto.
1300         * kbx/keyboxd.c: Include comopt.h.
1301         (main): Read log-file option from common.conf.
1302         (reread_configuration): Ditto.
1303         * scd/scdaemon.c: Include comopt.h.
1304         (main): Read log-file option from common.conf.
1305
1306         gpgconf: Fix a diagnostic output.
1307         + commit b657d6c3bd8103d40d511a3293313a891a26a9f5
1308         * tools/gpgconf-comp.c (gc_component_launch): Fix diagnostic.
1309         * doc/examples/common.conf: Fix example.
1310
1311         sm: New command --show-certs.
1312         + commit 51419d63415ae2aa029f8829099b6789b264edc5
1313         * sm/keylist.c (do_show_certs): New.
1314         (gpgsm_show_certs): New.
1315         * sm/gpgsm.c (aShowCerts): New.
1316         (opts): Add --show-certs.
1317         (main): Call gpgsm_show_certs.
1318
1319 2021-04-19  Werner Koch  <wk@gnupg.org>
1320
1321         build: Fix build problems on macOS for gpgsm tests and gpg-card.
1322         + commit 5fe60576d50f7c857d0a865a9630212422fa1ad1
1323         * tools/gpg-card.c: Include ctype.h.
1324         * sm/Makefile.am (t_common_ldadd): Add LIBICONV.
1325
1326 2021-04-19  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
1327
1328         build: Allow selection of TSS library.
1329         + commit 93c88d0af36b70a406997b40c49bfc14c17b4cd2
1330         * configure.ac: New option --with-tss to force the use of a
1331         specific TSS library.
1332
1333         gpg: Fix showpref to list AEAD feature.
1334         + commit 86f446fd446fcc7295ecf6b37a3f4cca45a165f1
1335         * g10/keyedit.c (show_prefs): Show 'AEAD' if flags.aead is set.
1336
1337 2021-04-19  Werner Koch  <wk@gnupg.org>
1338
1339         gpg,gpgsm: Move use-keyboxd to the new conf file common.conf.
1340         + commit d13c5bc244ce1daed285424d920171fc2bcd7290
1341         * common/comopt.c, common/comopt.h: New.
1342         * common/Makefile.am: Add them.
1343         * g10/gpg.c: Include comopt.h.
1344         (main): Also parse common.conf.
1345         * sm/gpgsm.c: Include comopt.h.
1346         (main): Set a flag for the --no-logfile option.  Parse common.conf.
1347
1348         * tools/gpgconf-comp.c (known_options_gpg): Remove "use-keyboxd", add
1349         pseudo option "use_keyboxd".
1350         (known_pseudo_options_gpg): Add pseudo option "use_keyboxd".
1351         (known_options_gpgsm): Remove "use-keyboxd".
1352
1353         * tests/openpgp/defs.scm (create-gpghome): Create common.conf.
1354
1355         * doc/examples/common.conf: New.
1356
1357 2021-04-16  Werner Koch  <wk@gnupg.org>
1358
1359         gpg: Lookup a missing public key of the current card via LDAP.
1360         + commit d7e707170fbe2956deb3d81e2802d21352079722
1361         * g10/getkey.c (get_seckey_default_or_card): Lookup a missing public
1362         key from the current card via LDAP.
1363         * g10/call-dirmngr.c: Include keyserver-intetnal.h.
1364         (gpg_dirmngr_ks_get): Rename arg quick into flags.  Take care of the
1365         new LDAP flag.
1366         * g10/keyserver-internal.h (KEYSERVER_IMPORT_FLAG_QUICK): New.
1367         Replace the use of the value 1 for the former quick arg.
1368         (KEYSERVER_IMPORT_FLAG_LDAP): New.
1369         * g10/keyserver.c (keyserver_get_chunk): Increase the reserved line
1370         length.
1371         * dirmngr/ks-action.c (ks_action_get): Add arg ldap_only.
1372         * dirmngr/server.c (cmd_ks_get): Add option --ldap.
1373
1374         scd:p15: Support attribute KEY-FPR.
1375         + commit 30f90fc8574be4c48ac8d3ff41479481414c0dee
1376         * scd/app-p15.c: Include openpgpdefs.h.
1377         (struct prkdf_object_s): Add fields have_keytime and ecdh_kdf.
1378         (read_p15_info): Set ecdh_kdf.
1379         (keygrip_from_prkdf): Flag that we have the keytime.
1380         (send_keypairinfo): Send the key time only if valid.
1381         (send_key_fpr_line): New.
1382         (send_key_fpr): New.
1383         (do_getattr): Add KEY-FPR.
1384
1385         common: New module to compute openpgp fingerprints.
1386         + commit 2f2bdd9c0894eb43f719da8b529b4c7a46f742a0
1387         * common/openpgp-fpr.c: New.
1388         * common/Makefile.am (common_sources): Add it.
1389
1390 2021-04-13  Werner Koch  <wk@gnupg.org>
1391
1392         gpg: Do not use self-sigs-only for LDAP keyserver imports.
1393         + commit 6c26e593df51475921410ac97e9227df6b258618
1394         * dirmngr/ks-engine-ldap.c (ks_ldap_get): Print a SOURCE status.
1395         * g10/options.h (opts): New field expl_import_self_sigs_only.
1396         * g10/import.c (parse_import_options): Set it.
1397         * g10/keyserver.c (keyserver_get_chunk): Add special options for LDAP.
1398
1399 2021-04-13  Jakub Jelen  <jjelen@redhat.com>
1400
1401         common: Fix memory leaks.
1402         + commit a16f726f9404f173705cc3bef71daee38d2c094b
1403         * common/name-value.c (do_nvc_parse): Free NAME.
1404         * common/recsel.c (recsel_parse_expr): Release SE_HEAD and EXPR_BUFFER.
1405
1406         kbx: Fix memory leak.
1407         + commit 51bbd99a3c9b09a78e766a312d97a1d40372c6cd
1408         * kbx/keybox-update.c (blob_filecopy): Goto leave instead of return.
1409
1410         tools: Fix memory leaks.
1411         + commit 4c8be54cc430bbebd41fd7c452ff4ff9e8ff2bd5
1412         * tools/gpgsplit.c (write_part): Free BLOB on error.
1413
1414         scd: Fix memory leaks.
1415         + commit 7cbe29c4fb4f593e194b6c25cb31633b4a6e0b2b
1416         * scd/apdu.c (apdu_dev_list_start): Free DL.
1417         * scd/app-nks.c (pubkey_from_pk_file): Fix typo in condition.
1418
1419         agent,kbx: Add LIBASSUAN_CLFAGS.
1420         + commit cd66b2eb0d34b135175899362e191fff81588608
1421         * agent/Makefile.am (gpg_preset_passphrase_CFLAGS, t_protect_CFLAGS):
1422         Add LIBASSUAN_CFLAGS.
1423         * kbx/Makefile.am (libkeybox_a_CFLAGS, libkeybox509_a_CFLAGS):
1424         Likewise.
1425
1426 2021-04-12  Werner Koch  <wk@gnupg.org>
1427
1428         scd:p15: Match private keys with certificates also by labels.
1429         + commit ecb9265b8dc03a153044e19be804d4c2d2caa4e8
1430         * scd/app-p15.c (cdf_object_from_label): New.
1431         (cdf_object_from_certid): Fallback to label matching.
1432         (read_p15_info): Ditto.
1433         (keygrip_from_prkdf): Ditto.  Replace duplicated code by a call to
1434         cdf_object_from_objid.
1435
1436 2021-04-08  Werner Koch  <wk@gnupg.org>
1437
1438         scd:nks: Handle APP_READKEY_FLAG_INFO.
1439         + commit 63320ba2f8147ee86f4406c9590f6b28cad4771d
1440         * scd/app-nks.c (keygripstr_from_pk_file): Fix ignored error.
1441         (get_nks_tag): New.
1442         (do_learn_status_core): Use it.  Make sure not to mange the
1443         KEYPAIRINFO line if no usage is known.
1444         (do_readkey): Output the KEYPAIRINFO for the keygrip case.
1445
1446         scd: Fix duplicate output of KEYPAIRINFO by readkey command.
1447         + commit 22fd48e48d007a0cba6c8a8f6ad6cb4fe7470534
1448         * scd/app-help.c (app_help_get_keygrip_string_pk): Make HEXKEYGRIP
1449         parm optional.
1450         * scd/command.c (do_readkey): Remove duplicate output of keypairinfo
1451         lines.
1452
1453 2021-04-08  NIIBE Yutaka  <gniibe@fsij.org>
1454
1455         gpg: Ed448 and X448 are only for v5.
1456         + commit 36355394d865f5760075e62267d70f7a7d5dd671
1457         * g10/keygen.c (parse_key_parameter_part): Generate with version 5
1458         packet, when it's Ed448 or X448.
1459
1460         scd: Fix CCID driver for SCM SPR332/SPR532.
1461         + commit ab66c4357595b8a10ca25fd735f439fe795919b2
1462         * scd/ccid-driver.c (ccid_vendor_specific_pinpad_setup): New.
1463         (ccid_vendor_specific_setup): Only send CLEAR_HALT.
1464         (ccid_transceive_secure): Each time, use send_escape_cmd.
1465
1466         common: Fix gnupg_wait_processes, by skipping invalid PID.
1467         + commit d82dae5d2229a30dbc78aadc4d544d30dac76a1c
1468         * common/exechelp-posix.c (gnupg_wait_processes): Skip invalid PID.
1469
1470 2021-04-07  Werner Koch  <wk@gnupg.org>
1471
1472         Release GnuPG 2.3.0.
1473         + commit c922a798a341261f1aafaf7c1c0217e4ce3e3acf
1474
1475
1476 2021-04-01  Werner Koch  <wk@gnupg.org>
1477
1478         gpgconf: Return a new pseudo option compliance_de_vs.
1479         + commit a78475fbb7b60ca96137fbe179d8b939cfe2cd89
1480         * tools/gpgconf-comp.c (known_pseudo_options_gpg): Add
1481         "compliance_de_vs".
1482         * g10/gpg.c (gpgconf_list): Returh that pseudo option.
1483
1484         common: Make the compliance check more robust.
1485         + commit 1d1ec1146c04415c7051af62e133459a4537c945
1486         * common/compliance.c (get_compliance_cache): New.
1487         (gnupg_rng_is_compliant): Use per mode cache.
1488         (gnupg_gcrypt_is_compliant): Ditto.
1489
1490         card: New flag --reread for LIST.
1491         + commit c727951a2440913bbab5b250c9bd2bb1d35ab0d7
1492         * tools/gpg-card.c (cmd_list): Add flag --reread.
1493         * tools/card-call-scd.c (scd_learn): New arg reread.
1494
1495         * tools/card-call-scd.c (release_card_info): Fix releasing of the new
1496         label var.
1497
1498         scd: New flag --reread for LEARN.
1499         + commit ff87f4e578f412332ae59fdab016f0a5304baaf9
1500         * scd/command.c (cmd_learn): Add flag --reread.
1501         * scd/app-common.h (struct app_ctx_s): New field need_reset.
1502         * scd/app.c (write_learn_status_core): Set need_reset if we notice an
1503         error after returning from a reread.  Change all callers of card
1504         functions to return GPG_ERR_CARD_RESET so that that app is not anymore
1505         used.
1506
1507         scd:p15: New flag APP_LEARN_FLAG_REREAD.
1508         + commit e17d3f866057543d142d63379fd4f4a36d79147f
1509         * scd/app-p15.c (do_deinit): Factor code out to ...
1510         (release_lists, release_tokeninfo): new.
1511         (read_ef_tokeninfo): Reset all data before reading.
1512         (read_p15_info): Ditto.
1513         (do_learn_status): Implement reread flag.
1514
1515 2021-03-31  Werner Koch  <wk@gnupg.org>
1516
1517         scd: Replace all assert macros by the log_assert macro.
1518         + commit 1c16878efd0bcf036f56abef93d64ac41ce9e95b
1519
1520
1521         build: Require automake 1.16.3.
1522         + commit 6ca540715139899137e1f86c7e1dcbd0288f15b3
1523         * configure.ac (min_automake_version): Bump to 1.16.3
1524
1525 2021-03-31  NIIBE Yutaka  <gniibe@fsij.org>
1526
1527         build: Update gpg-error.m4.
1528         + commit 8d6152a4cfd8a4cf176c01f99e1d49eeecab4367
1529         * m4/gpg-error.m4: Update from libgpg-error.
1530
1531 2021-03-30  Werner Koch  <wk@gnupg.org>
1532
1533         card: Print the key's label if available.
1534         + commit 0d6f276f61c583d776687029c715b1ee4280e4ed
1535         * tools/gpg-card.h (struct key_info_s): Add field 'label'.
1536         * tools/card-call-scd.c (learn_status_cb): Parse KEY-LABEL.
1537         (scd_learn): Always request KEY-LABEL.
1538         * tools/gpg-card.c (nullnone): New.
1539         (list_one_kinfo, list_card): Use it.  Print the label.
1540
1541         scd:p15: Return labels for keys and certificates.
1542         + commit 7f9126363265a6b6fe4223d68fc4e87678c4ddfc
1543         * scd/app-p15.c (send_certinfo): Extend certinfo.
1544         (do_getattr): Support KEY-LABEL.
1545
1546         scd:p15: For CardOS make use of ISO7816_VERIFY_NOT_NEEDED.
1547         + commit 651c07a7301c33229af051d83edbf898bae52e8b
1548         * scd/app-p15.c (verify_pin): Take care of verify status.
1549
1550         scd:p15: Return the creation time of the keys.
1551         + commit de4d3c99aa58ee06ae978d59e7e3aa7bace1c440
1552         * scd/app-p15.c (struct prkdf_object_s): Add keytime and keyalgostr.
1553         (keygrip_from_prkdf): Set them.
1554         (send_keypairinfo): Extend KEYPAIRINFO.
1555
1556 2021-03-30  NIIBE Yutaka  <gniibe@fsij.org>
1557
1558         build: Fix for make distcheck, no EPS support.
1559         + commit d1bac0a3be7081a4bfc7f813f9d626e1396ad5c1
1560         * Makefile.am (AM_DISTCHECK_DVI_TARGET): Specify 'pdf'.
1561         * doc/Makefile.am (EXTRA_DIST, BUILT_SOURCES): Remove EPS files.
1562         (gnupg.dvi): Remove.
1563
1564 2021-03-29  Werner Koch  <wk@gnupg.org>
1565
1566         scd:p15: Make RSA with SHA512 work with CardOS.
1567         + commit 592f48011790e30d4bcfd9093eb58b786c8c9a8b
1568         * scd/app-p15.c (do_sign): Rewrite.
1569
1570         agent: Skip unknown unknown ssh curves seen on cards.
1571         + commit 2d2391dfc25cfe160581b1bb4b4b8fc4764ac304
1572         * agent/command-ssh.c (ssh_handler_request_identities): Skip unknown
1573         curves.
1574
1575         scd:p15: Support ECDSA and ECDH for CardOS.
1576         + commit a494b29af9cc9c4c8c8323bae20e845d5a390448
1577         * scd/iso7816.c (iso7816_pso_csv): New.
1578         * scd/app-help.c (app_help_pubkey_from_cert): Uncompress a point if
1579         needed.
1580
1581         * scd/app-p15.c (CARD_PRODUCT_RSCS): New.
1582         (struct prkdf_object_s): Add fields is_ecc, token_label, and
1583         tokenflags.
1584         (do_deinit): Free new fields.
1585         (cardproduct2str): New.
1586         (read_ef_prkdf): Set new is_ecc flag.
1587         (read_ef_tokeninfo): Store some data and move Tokeninfo diags to ...
1588         (read_p15_info): here.  set the product info here after all data has
1589         been gathered.
1590         (send_keypairinfo): Chnage the way the gpgusage flags are used.
1591         (make_pin_prompt): If the token has a label and the current cert has
1592         no CN, show the label as holder info.
1593         (do_sign): Support ECDSA.  Take care of the gpgusage flags.
1594         (do_decipher): Support ECDH.  Take care of the gpgusage flags.
1595
1596         gpg: Allow ECDH with a smartcard returning just the x-ccordinate.
1597         + commit f129b0e97730b47d62482fba9599db39b526f3d2
1598         * g10/ecdh.c (extract_secret_x): Add extra safety check. Allow for
1599         x-only coordinate.
1600
1601 2021-03-28  Werner Koch  <wk@gnupg.org>
1602
1603         gpgconf: Do not i18n an empty string to the PO files meta data.
1604         + commit 18d884f8411a0ca263a8aa588bb49eb0dae9ee19
1605         * tools/gpgconf-comp.c (my_dgettext): Ignore empty strings.
1606
1607 2021-03-26  Werner Koch  <wk@gnupg.org>
1608
1609         tests: Make sure the built keyboxd is used by the tests.
1610         + commit a5e72b663b3649c939d32d6526b5e2b3347dedd9
1611         * tests/openpgp/defs.scm (tool): Add keyboxd.
1612         * tests/openpgp/setup.scm: Ditto.
1613
1614         gpgconf: Fix another argv overflow if --homedir is used.
1615         + commit 057131159b445d2d49392e95c677ad7b4cd4ae9c
1616         * tools/gpgconf-comp.c (gc_component_check_options): Increase array.
1617
1618         gpgconf: Fix argv overflow if --homedir is used.
1619         + commit d3d57a1bc88ece0c12c91f54b089482cce92c5a0
1620         * tools/gpgconf-comp.c (gc_component_launch): Fix crasg due to too
1621         small array.
1622         (gpg_agent_runtime_change): Fix error message.
1623         (scdaemon_runtime_change): Ditto.
1624         (tpm2daemon_runtime_change): Ditto.
1625         (dirmngr_runtime_change): Ditto.
1626         (keyboxd_runtime_change): Ditto.
1627
1628         agent: Add debug output for failed RSA signature verification.
1629         + commit 6de1ec3ba59fa54ab60b2923ba9caa77fc9d5281
1630         * agent/pksign.c (agent_pksign_do): Support ECC and DSA verification
1631         and print some debug info in the error case.
1632
1633         common: New function to uncompress an ECC public key.
1634         + commit 935765b451aadc63fbba763a4a00f4efa0254436
1635         * common/sexputil.c (ec2os): New.
1636         (uncompress_ecc_q_in_canon_sexp): New.
1637
1638         * common/t-sexputil.c (fail2): new.
1639         (test_ecc_uncompress): New.
1640         (main): Run new test.
1641
1642 2021-03-26  NIIBE Yutaka  <gniibe@fsij.org>
1643
1644         scd: Fix PC/SC error handling at apdu_dev_list_start.
1645         + commit d4e5979c630c2960cf1fd5796f1060419e71cb04
1646         * scd/apdu.c (PCSC_E_NO_READERS_AVAILABLE): Add.
1647         (pcsc_error_to_sw): Handle PCSC_E_NO_READERS_AVAILABLE.
1648         (apdu_dev_list_start): Return error correctly.
1649
1650 2021-03-24  Werner Koch  <wk@gnupg.org>
1651
1652         card: Add option --use-default-pin to command "login".
1653         + commit 73bad368dacf5334bf78af15b243d06fd1273849
1654         * tools/gpg-card.c (cmd_login): Add option.
1655
1656         scd:p15: Make $SIGNKEY et al determination more fault tolerant.
1657         + commit 964363e788210f96a471e31ffa8fd17b534c0aa8
1658         * scd/app-p15.c (do_getattr): Change how we use gpgUsage to figure out
1659         the keys to use.
1660
1661 2021-03-24  NIIBE Yutaka  <gniibe@fsij.org>
1662
1663         gpg: Fix v5 signature for clearsign.
1664         + commit 14ef703ad65850fa22d394c4d521ba602ff2cc8d
1665         * g10/sign.c (clearsign_file): Prepare EXTRAHASH.
1666
1667         gpg: Support ECDH with v5 key.
1668         + commit 90a5b4e648b3c8a6fe645df7e61654dfdb3548be
1669         * g10/ecdh.c (build_kdf_params): Use the first 20 octets.
1670         * g10/pkglue.c (pk_encrypt): Remove length check to 20.
1671         * g10/pubkey-enc.c (get_it): Likewise.
1672
1673 2021-03-23  Werner Koch  <wk@gnupg.org>
1674
1675         gpgconf: Fix listing of default_pubkey_algo.
1676         + commit a107b24ddb45c9eef432d456f302c1acea3af27c
1677         * tools/gpgconf-comp.c (known_options_gpg, known_options_gpgsm): No
1678         flags needed for pseudo options.
1679         (known_pseudo_options_gpg, known_pseudo_options_gpgsm): New.
1680         (gc_component): Add field known_pseudo_options.
1681         (struct read_line_wrapper_parm_s): New.
1682         (read_line_wrapper): New.
1683         (retrieve_options_from_program): Use read_line_wrapper to handle
1684         pseudo options.
1685
1686 2021-03-22  Werner Koch  <wk@gnupg.org>
1687
1688         kbxd: Group the options.
1689         + commit ed82ef91459f72b955f4e342ab88a7a0949c436b
1690         * kbx/keyboxd.h (opt): Remove unused field 'batch'.
1691         * kbx/keyboxd.c (opts): Remove --batch.  Add group descriptions.
1692
1693 2021-03-22  NIIBE Yutaka  <gniibe@fsij.org>
1694
1695         gpg: Support exporting Ed448 SSH key.
1696         + commit 1524a942b645d9facbedd9ed4a472e343838b6a1
1697         * common/openpgp-oid.c (oid_ed448, openpgp_oidbuf_is_ed448): New.
1698         (openpgp_oid_is_ed448): New.
1699         * common/util.h (openpgp_oid_is_ed448): New.
1700         * g10/export.c (export_one_ssh_key): Support Ed448 key.
1701
1702         gpg: Fix exporting SSH key.
1703         + commit 0b45c5a9941094bd4529c3bf5b1cb8ce2584b9a4
1704         * g10/export.c (export_one_ssh_key): Finish base 64 encoder before
1705         writing out the comment string.
1706
1707 2021-03-19  Werner Koch  <wk@gnupg.org>
1708
1709         card: Support OpenPGP.1 and OpenPGP.2 for readcert and writecert.
1710         + commit 475644e049436c49de7620a1539515479ad2aa4f
1711         * tools/gpg-card.c (cmd_writecert): Allow the other key references.
1712         (cmd_readcert): Ditto.
1713
1714         scd:openpgp: Allow reading and writing user certs for keys 1 and 2.
1715         + commit 37b1c5c2004c1147a13b388863aaa8f0caf7d71f
1716         * scd/iso7816.c (CMD_SELECT_DATA): New.
1717         (iso7816_select_data): New.
1718         * scd/app-openpgp.c (do_readcert): Allow OpenPGP.1 and OPENPGP.2
1719         (do_writecert): Ditto.
1720         (do_setattr): Add CERT-1 and CERT-2.
1721
1722         scd:openpgp: Rename an internal variable.
1723         + commit bbdb48ec0ddd99ce23fcba42949c00a2594fb9a5
1724         * scd/app-openpgp.c (struct app_local_s): s/extcap_v3/is_v3/.
1725         s/max_certlen_3/max_certlen.  Change users.
1726
1727         scd:openpgp: Small speedup reading card properties.
1728         + commit d5fb5983232cf4d60cf6aa00d0ae5a16cf948e19
1729         * scd/app-openpgp.c (struct app_local_s): Add new flag.
1730         (get_cached_data): Force chace use if flag is set.
1731         (app_select_openpgp): Avoid reading DO 6E multiple times.
1732
1733 2021-03-18  Werner Koch  <wk@gnupg.org>
1734
1735         scd:p15: Allow to use an auth object label with cmd CHECKPIN.
1736         + commit 85082a83c2c1bda50fe6b7aa2ac68cef4faca4c7
1737         * scd/app-p15.c (prepare_verify_pin): Allow for PRKDF to be NULL.
1738         (make_pin_prompt): Ditto.
1739         (verify_pin): Ditto.
1740         (do_check_pin): Allow using the Label to specify a PIN.
1741
1742         card: Print PIN descriptions and fix number of printed retry counters.
1743         + commit 1ac189f2df6cedab3a133baca69558fdf6a908d4
1744         * tools/gpg-card.h (struct card_info_s): Add fields nmaxlen, nchvinfo,
1745         and chvlabels.
1746         * tools/card-call-scd.c (release_card_info): Free chvlabels.
1747         (learn_status_cb): Parse CHV-LABEL.  Set nmaxlen and nchvinfo.
1748         * tools/gpg-card.c (list_retry_counter): Print CHV labels.
1749
1750         scd:p15: New attribute CHV-LABEL.
1751         + commit ef29a960bf06005c34093cd9a6bca5a202ed359a
1752         * scd/app-p15.c (parse_common_obj_attr): Map spaces in the lapel to
1753         underscores.
1754         (read_ef_aodf): Prettify printing of the type.
1755         (do_getattr): New attribute CHV-LABEL
1756         (do_learn_status): Emit CHV-LABEL.
1757         (verify_pin): Distinguish the PIN prompts.
1758
1759         agent: Simplify a function.
1760         + commit 26215cb211ad93ad9cc51fb4f8257b9e3c254a4e
1761         * agent/findkey.c (agent_public_key_from_file): Use a membuf instead
1762         of handcounting space.
1763
1764 2021-03-16  Werner Koch  <wk@gnupg.org>
1765
1766         scd:p15: Implement CHV-STATUS attribute.
1767         + commit bf1d7bc3697c7d650994ba94d3704af189594657
1768         * scd/command.c (send_status_direct): Return an error.
1769         * scd/app-p15.c (do_learn_status): Emit CHV-STATUS.
1770         (compare_aodf_objid): New.
1771         (do_getattr): Implement CHV-STATUS.
1772
1773         card: Generalize the CHV counter printing.
1774         + commit e4c2d7be22ffb47b41a3b6c1152bd75dceed74e2
1775         * tools/gpg-card.c (list_retry_counter): New.  Factored out from the
1776         other functions.
1777         (cmd_verify): Re-read the chv status.
1778
1779 2021-03-16  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
1780
1781         build: Check for the IBM TSS tools to run the tpm2d tests.
1782         + commit c0f50811fcf81e5ebe2df326342081cfdacfbbfc
1783         * configure.ac (TEST_LIBTSS): Make that conditional depend on the
1784         detection of tssstartup.
1785
1786         build: Fix distcheck when tpm2dtests are run.
1787         + commit ad481666ea6ef3743041ec6d043a3e6901ebab33
1788         * tests/tpm2dtests/Makefile.am (EXTRA_DIST): Distribute test files.
1789         (CLEANFILES): Make sure to remove log files.
1790
1791 2021-03-15  James Bottomley  <James.Bottomley@HansenPartnership.com>
1792
1793         tests:tpm2d: add missing start_sw_tpm.sh script.
1794         + commit a788f2e8306d80f7f3df34eb62ec7ce1a62d48e1
1795         * tests/tpm2dtests/start_sw_tpm.sh: New.
1796         * tests/tpm2dtests/Makefile.am: Add.
1797
1798 2021-03-15  Werner Koch  <wk@gnupg.org>
1799
1800         gpg: New option --no-auto-trust-new-key.
1801         + commit 1523b5f76f6e600c4f2d153b49a807ff2dc8d268
1802         * g10/gpg.c (oNoAutoTrustNewKey): New.
1803         (opts): Add --no-auto-trust-new-key.
1804         (main): Set it.
1805         * g10/options.h (opt): Add flags.no_auto_trust_new_key.
1806
1807         build: new option to disable building of tpm2daemon.
1808         + commit 8d6123faa8cae0bad6f82c9021e9ac6686b2f55d
1809         * configure.ac (build_tpmd): New configure option --disable-tpm2d
1810         (BUILD_WITH_TPM2D): New.
1811         * Makefile.am (tests): Use conditionally BUILD_TPM2D instead of
1812         HAVE_LIBTSS.
1813         * build-aux/speedo.mk (speedo_pkg_gnupg_configure) [W32]: Do not build
1814         tpm2d.
1815         * autogen.rc: Ditto.
1816
1817 2021-03-15  NIIBE Yutaka  <gniibe@fsij.org>
1818
1819         scd: Add handling of Ed448 key.
1820         + commit b743942a9719be59f1da67cd338248fe7ee5aeab
1821         * scd/app-openpgp.c (struct app_local_s): Add ecc.algo field.
1822         (send_key_attr): Use ecc.algo field.
1823         (ecc_read_pubkey): Use ecc.algo field.
1824         (ecc_writekey): Ed448 means EdDSA.
1825         (parse_algorithm_attribute): Set ecc.algo field from card.
1826         Add checking for Ed25519 for ECC_FLAG_DJB_TWEAK flag.
1827
1828         scd: Fix count_sos_bits handling.
1829         + commit f482e4bd121ff2862bfb53a82f1d5c2cf3524a10
1830         * scd/app-openpgp.c (count_sos_bits): Handle an exceptional case.
1831
1832         common: Fix the NBITS of Ed448in OIDTABLE.
1833         + commit 373b52e69a6ca609a663a0c4a018358fdf52dc7e
1834         common/openpgp-oid.c (oidtable): Ed448 uses 456-bit signature.
1835
1836 2021-03-12  Werner Koch  <wk@gnupg.org>
1837
1838         scd: New option --pcsc-shared.
1839         + commit 5732e7a8e97cebf8e850c472e644e2a9b040836f
1840         * scd/scdaemon.h (opt): Add field opcsc_shared.
1841         * scd/scdaemon.c (opcscShared): New.
1842         (opts): Add "--pcsc-shared".
1843         (main): Set flag.
1844         * scd/apdu.c (connect_pcsc_card): Use it.
1845         (pcsc_get_status): Take flag in account.
1846         * scd/app-openpgp.c (cache_pin): Bypass in shared mode.
1847         (verify_chv2: Do not auto verify chv1 in shared mode.
1848         * scd/app-piv.c (cache_pin): By pass caceh in shared mode.
1849
1850 2021-03-12  NIIBE Yutaka  <gniibe@fsij.org>
1851
1852         scd: Fix computing fingerprint for ECC with SOS.
1853         + commit 95156ef9bfb6a3a525454d50ae2f5b538ccbd774
1854         * scd/app-openpgp.c (count_sos_bits): New.  Count as sos_write does.
1855         (store_fpr): For ECC, use count_sos_bits.
1856
1857         gpg: Fix compute_fingerprint for ECC with SOS.
1858         + commit cfc1497efa8c98cf490f5efc9b280a6ec44514bd
1859         * g10/keyid.c (hash_public_key): Tweak NBITS just as sos_write does.
1860
1861 2021-03-11  Valtteri Vuorikoski  <vuori@notcom.org>
1862
1863         scd:piv: Improve APT parser compatibility.
1864         + commit 8cad11d13b15b0ef672545b06450dfbea1fef18e
1865         * scd/app-piv.c (app_select_piv): Allow for full AID.
1866
1867 2021-03-11  Werner Koch  <wk@gnupg.org>
1868
1869         gpg: New option --force-sign-key.
1870         + commit fe02ef04500c1b35cd27132fb99ac1961f555193
1871         * g10/gpg.c (oForceSignKey,opts): New option "--force-sign-key".
1872         (main): Set it.
1873         * g10/options.h (opt): New flag flags.force_sign_key.
1874         * g10/keyedit.c (sign_uids): Use new flag.
1875
1876 2021-03-11  James Bottomley via Gnupg-devel  <gnupg-devel@gnupg.org>
1877
1878         tpmd2: Add Support for the Intel TSS.
1879         + commit b9c560e3a400da83073b232ee12fae090b21d20c
1880         * configure.ac: Check for Intel TSS.
1881         * tpm2d/intel-tss.h: New.
1882         * tpm2d/tpm2.h (HAVE_INTEL_TSS): Use the Intel code.
1883
1884 2021-03-10  James Bottomley  <James.Bottomley@HansenPartnership.com>
1885
1886         tpm2d: add tests for the tpm2daemon.
1887         + commit 6720f1343aef9342127380b155c19e12c92d65ac
1888         * configure.ac: Detect TPM emulator and enable tests.
1889         * tests/tpm2dtests/: New test suite.
1890         * tests/Makefile.am: Run tests.
1891
1892         gpg: Add new command keytotpm to convert a private key to TPM format.
1893         + commit 92b601fceec7da64939591001dba94e202f6e6a0
1894         * agent/command.c (cmd_keytotpm): New.
1895         (agent/command.c): Register new command KEYTOTPM.
1896         * g10/call-agent.c (agent_keytotpm): New.
1897         * g10/keyedit.c (cmdKEYTOTPM): New command "keytotpm".
1898         (keyedit_menu): Implement.
1899
1900         agent: Add new shadow key type and functions to call tpm2daemon.
1901         + commit 1f995b9ba42b76c1d83b484e5362548a54a70dab
1902         * agent/call-tpm2d.c: New.
1903         * divert-tpm2.c: New.
1904         * agent/Makefile.am: Add new files.
1905         * agent/agent.h (DAEMON_TPM2D): New.  Add stub fucntions.
1906         * agent/call-daemon.c (GNUPG_MODULE_NAME_TPM2DAEMON): New.
1907         * agent/command.c (do_one_keyinfo): Handle tpmv2.
1908         * agent/gpg-agent.c (oTpm2daemonProgram): New.
1909         (opts): New option --tpm2daemon-program.
1910         (parse_rereadable_options): Handle option.
1911         * agent/pkdecrypt.c (agent_pkdecrypt): Divert to tpm2d.
1912         (agent_pksign_do): Ditto.
1913         ---
1914
1915         A new shadow key type: "tpm2-v1" is introduced signalling that the
1916         shadowed key is handled by the tpm2daemon.  A function to identify
1917         this type is introduced and diversions to the tpm2daemon functions are
1918         conditioned on this function for pkign and pkdecrypt where the same
1919         diversions to scd are currently done.  The (info) field of the
1920         shadowed key stores the actual TPM key.  The TPM key is encrypted so
1921         only the physical TPM it was created on can read it (so no special
1922         protection is required for the info filed), but if the (info) field
1923         becomes corrupt or damaged, the key will be lost (unlike the token
1924         case, where the key is actually moved inside the token).
1925
1926         Note, this commit adds handling for existing TPM format shadow keys,
1927         but there is still no way to create them.
1928
1929
1930         Additional changes:
1931         * Add ChangeLog entries.
1932         * Some minor indentation fixes.
1933         * agent/Makefile.am (gpg_agent_SOURCES): Change to make distcheck
1934           work.
1935         * agent/agent.h [!HAVE_LIBTSS]: Do not return -EINVAL but an
1936           gpg_error_t.  Mark args as unused.
1937         * agent/protect.c (agent_is_tpm2_key): Free BUF.
1938
1939         tpm2d: Add tpm2daemon code.
1940         + commit 62a7854816b8f3661fb41f05463289e5b96663ee
1941         * tpm2d: New directory.
1942         * Makefile.am (SUBDIRS): Add directory.
1943         * configure.ac: Detect libtss and decide whether to build tpm2d.
1944         * am/cmacros.am: Add a define.
1945         * util.h (GNUPG_MODULE_NAME_TPM2DAEMON): New.
1946         * common/homedir.c (gnupg_module_name): Add tpm2d.
1947         * common/mapstrings.c (macros): Add "TPM2DAEMON".
1948         * tools/gpgconf.h (GC_COMPONENT_TPM2DAEMON): New.
1949         * tools/gpgconf-comp.c (known_options_tpm2daemon): New.
1950         (gc_component): Add TPM2.
1951         (tpm2daemon_runtime_change): New.
1952         * tpm2d/Makefile.am: New.
1953         * tpm2d/command.c: New.
1954         * tpm2d/ibm-tss.h: New.
1955         * tpm2d/tpm2.c: New.
1956         * tpm2d/tpm2.h: New.
1957         * tpm2d/tpm2daemon.c: New.
1958         * tpm2d/tpm2daemon.h: New.
1959
1960         ---
1961         This commit adds and plumbs in a tpm2daemon to the build to mirror the
1962         operation of scdaemon.  The architecture of the code is that
1963         tpm2daemon.c itself is pretty much a clone of scd/scdaemon.c just with
1964         updated function prefixes (this argues there could be some further
1965         consolidation of the daemon handling code).  Note that although this
1966         commit causes the daemon to be built and installed, nothing actually
1967         starts it or uses it yet.
1968
1969         Command handling
1970         ----------------
1971
1972         command.c is copied from the command handler in scd.c except that the
1973         command implementation is now done in terms of tpm2 commands and the
1974         wire protocol is far simpler.  The tpm2daemon only responds to 4
1975         commands
1976
1977         IMPORT:    import a standard s-expression private key and export it to
1978                    TPM2 format.  This conversion cannot be undone and the
1979                    private key now can *only* be used by the TPM2.  To anyone
1980                    who gets hold of the private key now, it's just an
1981                    encrypted binary blob.
1982
1983         PKSIGN:    create a signature from the tpm2 key.  The TPM2 form private
1984                    key is retrieved by KEYDATA and the hash to be signed by
1985                    EXTRA.  Note there is no hash specifier because the tpm2
1986                    tss deduces the hash type from the length of the EXTRA
1987                    data.  This is actually a limitation of the tpm2 command
1988                    API and it will be interesting to see how this fares if the
1989                    tpm2 ever supports say sha3-256 hashes.
1990
1991         PKDECRYPT: decrypt (RSA case) or derive (ECC case) a symmetric key.
1992                    The tpm2 for private key is retrieved by KEYDATA and the
1993                    information used to create the symmetric key by EXTRA.
1994
1995         KILLTPM2D: stop the daemon
1996
1997         All the tpm2 primitives used by command.c are in tpm2.h and all the
1998         tpm2 specific gunk is confined to tpm2.c, which is the only piece of
1999         this that actually does calls into the tss library.
2000
2001
2002         Changes from James' patch:
2003
2004         - gpgconf: The displayed name is "TPM" and not "TPM2".  That
2005           string is used by GUIs and should be something the user
2006           understands.  For example we also use "network" instead
2007           of "Dirmngr".
2008         - Removed some commented includes.
2009         - Use 16 as emulation of GPG_ERR_SOURCE_TPM2.
2010         - Silenced a C90 compiler warning and flags unused parameters.
2011         - Removed "if HAVE_LIBS" from tpm2/Makefile.am and add missing
2012           files so that make distcheck works.
2013
2014 2021-03-10  Werner Koch  <wk@gnupg.org>
2015
2016         scd:p15: Support special extended usage flags for OpenPGP keys.
2017         + commit 08b5ac492afc6c6e7eaaa1f70d67c81cbda2c9be
2018         * scd/app-p15.c (struct gpgusage_flags_s): New.
2019         (struct prkdf_object_s): Add field gpgusage.
2020         (struct app_local_s): Add field any_gpgusage.
2021         (dump_gpgusage_flags): New.
2022         (read_p15_info): Parse athe gpgusage flags.
2023         (do_getattr): Take care of the gpgusage flags.
2024
2025 2021-03-08  Werner Koch  <wk@gnupg.org>
2026
2027         sm: Init nPth which might be used by some helper code.
2028         + commit a4021d9be4aeac7429bf6a8e9f336dbb62cacfc4
2029         * sm/gpgsm.c: Include npth.h.
2030         (main): Init nPth.
2031
2032         w32: Cleanup use of pid_t in call-daemon.
2033         + commit 33c492dcb955bff01fffae31fb7750f88e07b8ff
2034         * agent/call-daemon.c (struct wait_child_thread_parm_s) [W32]: Do not
2035         use HANDLE for pid_t.
2036         (wait_child_thread): Ditto.
2037
2038         w32: Change spawn functions to use Unicode version of CreateProcess.
2039         + commit cf2f6d8a3f0594c03c383b4989a3041e9c4536d7
2040         * common/exechelp-w32.c (gnupg_spawn_process): Change to use
2041         CreateProcessW.
2042         (gnupg_spawn_process_fd): Ditto.
2043         (gnupg_spawn_process_detached): Ditto.
2044         * g10/exec.c (w32_system): Ditto.
2045
2046 2021-03-08  NIIBE Yutaka  <gniibe@fsij.org>
2047
2048         scd: Fix for X448.
2049         + commit fc99f77b14b6c2cdfb547607651922c16863dcf0
2050         * scd/app-openpgp.c (do_decipher): Support with no prefix.
2051
2052 2021-03-05  Werner Koch  <wk@gnupg.org>
2053
2054         w32: Always use Unicode for console input and output.
2055         + commit 8c41b8aac3efb78178fe1eaf52d8d1bbc44941a8
2056         * common/init.c (_init_common_subsystems) [W32]: Set the codepage to
2057         UTF-8 for input and putput.  Switch gettext to UTF-8.
2058         * tools/gpgconf.c (main): Display the input and output codepage if
2059         they differ.
2060         * g10/gpg.c (utf8_strings) [W32]: Make sure this is always set.
2061
2062         w32: Free memory allocated by new function w32_write_console.
2063         + commit 31b708e268ebb725307856865f34a61670a35586
2064         * common/ttyio.c (w32_write_console): Free buffer.
2065
2066         common,w32: Allow Unicode input and output with the console.
2067         + commit f165c8a737cc968554c9d78932c69869456108ff
2068         * common/ttyio.c (do_get) [W32]: Use ReadConsoleW.
2069         (w32_write_console): New.
2070         (tty_printf, tty_fprintf) [W32]: Use new function.
2071
2072         common: Re-indent ttyio.c and remove EMX, RISCOS, and CE support.
2073         + commit 8622f53994249d8fb49a488cfe480ffbeb8cbfba
2074         * common/ttyio.c: Remove cruft like EMX and RISCOS support.  Translate
2075         a few strings.  Re-indent.
2076
2077 2021-03-04  Werner Koch  <wk@gnupg.org>
2078
2079         common: Rename w32-misc.c to w32-cmdline.c.
2080         + commit 7262d602d802c4a3840097d5de217fcfb9728b49
2081         * common/w32-misc.c: Rename to ....
2082         * common/w32-cmdline.c: this.
2083         * common/Makefile.am: Adjust.
2084
2085         common,w32: Implement globing of command line args.
2086         + commit 089c9439674e8ecbc64f0ba924e6fb447bbc2b9d
2087         * common/w32-misc.c [W32]: Include windows.h
2088         (struct add_arg_s): New.
2089         (add_arg): New.
2090         (glob_arg): New.
2091         (parse_cmdstring): Add arg argvflags and set it.
2092         (w32_parse_commandline): Add arg r_itemsalloced.  Add globing.
2093
2094         * common/init.c (prepare_w32_commandline): Mark glob created items as
2095         leaked.
2096
2097         * common/t-w32-cmdline.c : Include windows.h
2098         (test_all): Add simple glob test for Unix.
2099         (main): Add manual test mode for Windows.
2100
2101         common,w32: Refine the command line parsing for \ in quotes.
2102         + commit 20c60076866904187a09393de596deef286116f8
2103         * common/t-w32-cmdline.c (test_all): Add new test cases.
2104         * common/w32-misc.c (strip_one_arg): Add arg endquote.
2105         (parse_cmdstring): Take care of backslashes in quotes.
2106
2107         gpg: Prepare for globing with UTF-8.
2108         + commit 8e15506d6680bbee85bc01453da28fc90b4cb673
2109         * g10/gpg.c (_dowildcard): Remove.
2110         (my_strusage): Enable wildcards using our new system.
2111
2112         common: First take on handling Unicode command line args.
2113         + commit deb6c94362c0f179de1cac18707aad2f51a21e10
2114         * common/w32-misc.c: New.
2115         * common/t-w32-cmdline.c: New.
2116         * common/init.c: Include w32help.h.
2117         (prepare_w32_commandline): New.
2118         (_init_common_subsystems) [W32]: Call prepare_w32_commandline.
2119
2120         * common/Makefile.am (common_sources) [W32]: Add w32-misc.c
2121         (module_tests): Add t-w32-cmdline
2122         (t_w32_cmdline_LDADD): New.
2123
2124 2021-03-01  Nicolas Fella via Gnupg-devel  <gnupg-devel@gnupg.org>
2125
2126         gpg: Keep temp files when opening images via xdg-open.
2127         + commit be2da244565822ad1f268f84dc88a23e5aa8d26a
2128         * g10/photoid.c (get_default_photo_command): Change parameter for
2129         xdg-open.
2130
2131 2021-02-25  Werner Koch  <wk@gnupg.org>
2132
2133         scd:p15: Read out the access flags.
2134         + commit d51a5ca1084c69c0ed304126a7aaa0a648b2eba6
2135         * scd/app-p15.c (struct keyaccess_flags_s): New.
2136         (struct prkdf_object_s): Add field accessflags.
2137         (dump_keyusage_flags): New.
2138         (dump_keyaccess_flags): New.
2139         (parse_keyaccess_flags): New.
2140         (parse_common_key_attr): Return access flags.
2141         (read_ef_prkdf): Parse the access flags.  Allow for ECkeys.
2142         (read_ef_pukdf): Ditto.  Use new functions for printing.
2143         (read_p15_info): Use new fucntion for printing.
2144
2145         sm: Do not print certain issuer not found diags in quiet mode.
2146         + commit a170f0e73f38e474b6d4463433fe344eca865fa5
2147         * sm/certchain.c (find_up_dirmngr): Print one diagnostic only in
2148         verbose mode.  Do not print issuer not found diags in quiet mode.
2149         * sm/minip12.c (parse_bag_data): Add missing verbose condition.
2150
2151         sm: Fix issuer certificate look error due to legacy error code.
2152         + commit 473b83d1b9efe51fcca68708580597dddf3f50b7
2153         * sm/certchain.c (find_up): Get rid of the legacy return code -1 and
2154         chnage var name rc to err.
2155         (gpgsm_walk_cert_chain): Change var name rc to err.
2156         (do_validate_chain): Get rid of the legacy return code -1.
2157
2158 2021-02-24  Werner Koch  <wk@gnupg.org>
2159
2160         scd:p15: Get the label value of all objects for better diagnostics.
2161         + commit cfdaf2bcc85b3b6f16904006f239b400a3487ff8
2162         * scd/app-p15.c (struct cdf_object_s): Add fields authid, authidlen,
2163         and label.
2164         (struct prkdf_object_s): Add field label.
2165         (struct aodf_object_s): Ditto.
2166         (release_cdflist): Free new fields.
2167         (release_prkdflist): Free new field.
2168         (release_aodf_object): Ditto.
2169         (parse_common_obj_attr): Return the label.
2170         (read_ef_prkdf): Store the label.
2171         (read_ef_pukdf): Ditto.
2172         (read_ef_cdf): Use parse_common_obj_attr and store authid and label.
2173         Print them im verbose mode.
2174         (read_ef_aodf): Store the label and print it.
2175
2176         sm: Silence some output on --quiet.
2177         + commit 615d2e4fb15859320ea0ebec1bb457c692c57f0a
2178         * sm/encrypt.c (gpgsm_encrypt): Take care of --quiet.
2179         * sm/gpgsm.c: Include minip12.h.
2180         (set_debug): Call p12_set_verbosity.
2181         * sm/import.c (parse_p12): Dump keygrip only in debug mode.
2182         * sm/minip12.c (opt_verbose, p12_set_verbosity): New.
2183         (parse_bag_encrypted_data): Print info messages only in verbose mode.
2184
2185 2021-02-23  Werner Koch  <wk@gnupg.org>
2186
2187         scd:p15: Make it code work again for D-Trust cards.
2188         + commit 33aaa37e5bc0beb75305cdf9d8be850daccaee5e
2189         * scd/app-p15.c (select_and_read_binary): Allow to skip the select.
2190         (select_and_read_record): Return the statusword.  Silence error
2191         message for SW_FILE_STRUCT.
2192         (select_ef_by_path): Fix selection with a home_DF.
2193         (read_first_record): Fallback to read_binary for CardOS and return
2194         info about this.
2195         (read_ef_prkdf): Use info from read_first_record to decide whether to
2196         use record or binary mode.
2197         (read_ef_pukdf): Ditto.
2198         (read_ef_aodf): Ditto.
2199         (read_ef_cdf): Ditto.  New arg cdftype for diagnostics.
2200         (read_p15_info): Pass cdftype.
2201
2202         * scd/apdu.h (SW_FILE_STRUCT): New.
2203         * scd/apdu.c (apdu_strerror): Map that one to a string.
2204         * scd/iso7816.c (map_sw): and to a gpg-error.
2205
2206 2021-02-22  Werner Koch  <wk@gnupg.org>
2207
2208         scd: Fix readkey --info in case a readkey command is available.
2209         + commit 2490f4e8e1d1feecb44aefa79bd71f5f8b06c9a4
2210         * scd/command.c (do_readkey): Make --info also work if a readkey
2211         command is available.
2212
2213         * scd/app-p15.c (cdf_object_from_certid): Fix a but introduced with
2214         the previous commit.
2215
2216         scd:p15: Extract extended usage flagsand act upon them.
2217         + commit 488eaedc9a332d8164dea22e469354fc10b0a253
2218         * scd/app-p15.c: Add a couple of oid constants.
2219         (struct cdf_object_s): Replace fields image and imagelen by cert.
2220         (struct prkdf_object_s): Add extusage flags
2221         (send_keypairinfo): Use them.
2222         (cdf_object_from_certid): Factor parts out to ...
2223         (cdf_object_from_objid): new function.
2224         (read_ef_prkdf): Move info printing to ...
2225         (read_p15_info): here.  Fill the extusage flags.
2226         (readcert_by_cdf): Cache the ksba cert object instead of the binary
2227         cert.
2228         * scd/app.c (select_additional_application): Fix a log_debug call.
2229         (scd_update_reader_status_file): Ditto.
2230
2231         sm: Extend the list of known OIDs.
2232         + commit 4c9b509d2402f79668e502a9db5879280a4f683b
2233         * sm/keylist.c (oidtranstbl): Add a couple of OIDs and mark them for
2234         key usage.
2235
2236 2021-02-19  Werner Koch  <wk@gnupg.org>
2237
2238         build: Remove now obsolete HAVE_NEWER_LIBGCRYPT AM conditional.
2239         + commit 5573ab714b92f6ee899a816998e56e1238f4c573
2240         * configure.ac (HAVE_NEWER_LIBGCRYPT): Remove conditional.
2241         * tools/Makefile.am (gpg_pair_tool_SOURCES):  We build it always.
2242
2243         scd: Minor tweak for easier backporting.
2244         + commit 6d4280b13ddc928ff6bc41bdf482030f0f814fdb
2245         * scd/app-common.h (APP_CARD): New.  Use it in app-*.c to access
2246         app->card.
2247
2248 2021-02-18  Werner Koch  <wk@gnupg.org>
2249
2250         po: Change translatability of a fallback string.
2251         + commit 0be4861762c21ebfb4c2e28bb9a3e5cfbc08e1a9
2252         * agent/call-pinentry.c (setup_genpin): Do not make the fallback
2253         translatable.
2254
2255         speedo: Update w32 stuff from 2.2.
2256         + commit 919a969354d4021f2e64a948b4c224cd37323713
2257         * build-aux/speedo.mk: Update from 2.2.  Add target w32-msi-release.
2258         * build-aux/speedo/w32/inst.nsi: Fix location of doc files.
2259         * build-aux/speedo/w32/wixlib.wxs: Add gpg-card and fix a wrong name.
2260         * Makefile.am (release): Support a WITH_MSI variable.
2261         (wixlibfile): Improve copying to archive.
2262         (release): Use AMTAR instead of TAR.
2263
2264 2021-02-17  Werner Koch  <wk@gnupg.org>
2265
2266         dirmngr: Support new gpgNtds parameter in LDAP keyserver URLs.
2267         + commit ab7dc4b524c3e2ad5153acfdbfa879a9e62d2dbe
2268         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): Support a new gpgNtds
2269         extension.
2270         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Do ldap_init always with
2271         hostname - which is NULL and thus the same if not given.  Fix minor
2272         error in error code handling.
2273
2274 2021-02-16  NIIBE Yutaka  <gniibe@fsij.org>
2275
2276         build: Update gpg-error.m4 again.
2277         + commit 3fa1fa747b61867076e344c3eb07a66826c1983a
2278         * m4/gpg-error.m4: Update from libgpg-error.
2279
2280 2021-02-15  NIIBE Yutaka  <gniibe@fsij.org>
2281
2282         build: Update gpg-error.m4.
2283         + commit 985e85dc0e6c54aa465a2af610c5a04fc10649a0
2284         * m4/gpg-error.m4: Update from libgpg-error.
2285
2286 2021-02-12  NIIBE Yutaka  <gniibe@fsij.org>
2287
2288         build: Update gpg-error.m4.
2289         + commit e1e3f1db4660b5416828aeb636a7f767fadcc7a4
2290         * m4/gpg-error.m4: Update from libgpg-error.
2291
2292         build: Fix library dependency of g13 test program.
2293         + commit 83e0a9d6b990aa517bc338b578f7faf393ae1b0d
2294         * g13/Makefile.am (t_common_ldadd): Add GPG_ERROR_LIBS.
2295
2296 2021-02-10  Werner Koch  <wk@gnupg.org>
2297
2298         gpg: Do not allow old cipher algorithms for encryption.
2299         + commit 825dd7220ff6079cbe2d0df7fde93526c077fb6d
2300         * g10/gpg.c: New option --allow-old-cipher-algos.
2301         (set_compliance_option): Set --rfc4880bis explictly to SHA256 and
2302         AES256.  Allow old cipher algos for OpenPGP, rfc4880, and rfc2440.
2303         * g10/options.h (opt): Add flags.allow_old_cipher_algos.
2304         * g10/misc.c (print_sha1_keysig_rejected_note): Always print the note
2305         unless in --quiet mode.
2306         * g10/encrypt.c (setup_symkey): Disallow by default algos with a
2307         blocklengt < 128.
2308         (encrypt_crypt): Ditto.  Fallback by default to AES instead of 3DES.
2309         * g10/pkclist.c (algo_available): Take care of old cipher also.
2310         (select_algo_from_prefs): Use AES as implicit algorithm by default.
2311
2312         * tests/openpgp/defs.scm (create-gpghome): Set allow-old-cipher-algos.
2313
2314         Remove obsolete M4 macros.
2315         + commit 6e730c18816fbb3e074d93840396ed18f00ab7e2
2316         * m4/gnupg-pth.m4: Remove.
2317         * m4/libcurl.m4: Remove.
2318
2319         Require GpgRT version 1.41.
2320         + commit 2b75b256054427119a284792540243c3471267d4
2321         * configure.ac (NEED_GPG_ERROR_VERSION): Rename to NEED_GPGRT_VERSION
2322         and set to 1.41.
2323         * common/sysutils.c (gnupg_access): Remove code for older gpgrt
2324         versions.
2325         * kbx/backend-sqlite.c: Ditto.
2326         * sm/gpgsm.c (main): Ditto.
2327
2328 2021-02-09  Werner Koch  <wk@gnupg.org>
2329
2330         build: Make make distcheck work again.
2331         + commit f9e4dae08d7caed741d35916c46b8302e098d521
2332         * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4
2333
2334         tools: Remove the symcryptrun tool.
2335         + commit 209b7113f3493bd829ec5c90275ff95a273d9dd4
2336         * tools/symcryptrun.c: Remove.
2337         * tools/Makefile.am: Ditto.
2338         * doc/tools.texi: Remove man page.
2339         * configure.ac: Remove build option and tests used only by this tool.
2340         * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Do not build
2341         symcryptrun.
2342
2343 2021-02-05  NIIBE Yutaka  <gniibe@fsij.org>
2344
2345         gpg: Fix selection of key.
2346         + commit 390f597868a5b5934f21f81ebf6ff110b6792283
2347         * g10/getkey.c (pubkey_cmp): Handle the case of TRUST_EXPIRED.
2348
2349 2021-02-02  Werner Koch  <wk@gnupg.org>
2350
2351         gpg: Remove support for PKA.
2352         + commit 7f3ce66ec56a5aea6170b7eb1bda5626eb208c83
2353         * g10/gpg.c (oPrintPKARecords): Remove.
2354         (opts): Remove --print-pka-records.
2355         (main): Remove "pka-lookups","pka-trust-increase" and other PKA stuff.
2356         * g10/options.h (EXPORT_DANE_FORMAT): Remove.
2357         (VERIFY_PKA_LOOKUPS, VERIFY_PKA_TRUST_INCREASE): Remove.
2358         (KEYSERVER_HONOR_PKA_RECORD): Remove.
2359         * g10/packet.h (pka_info_t): Remove.
2360         (PKT_signature): Remove flags.pka_tried and pka_info.
2361         * g10/parse-packet.c (register_known_notation): Remove
2362         "pka-address@gnupg.org".
2363         * g10/pkclist.c (check_signatures_trust): Remove PKA stuff.
2364         * g10/call-dirmngr.c (gpg_dirmngr_get_pka): Remove.
2365         * g10/export.c (parse_export_options): Remove "export-pka".
2366         (do_export): Adjust for this.
2367         (write_keyblock_to_output): Ditto.
2368         (do_export_stream): Ditto.
2369         (print_pka_or_dane_records): Rename to ...
2370         (print_dane_records): this and remove two args. Remove PKA printing.
2371         * g10/free-packet.c (free_seckey_enc, cp_pka_info): Adjust for removed
2372         pka_info field.
2373         * g10/getkey.c (get_pubkey_byname): Make AKL_PKA a dummy.
2374         * g10/keyserver.c: Remove "honor-pka-record".
2375         (keyserver_import_pka): Remove.
2376         * g10/mainproc.c (get_pka_address): Remove.
2377         (pka_uri_from_sig): Remove.
2378         (check_sig_and_print): Remove code for PKA.
2379
2380         gpg: Remove more or less useless tool gpgcompose.
2381         + commit fde7d833573d358b2c5b5eb7d837bc27c6dcb3d1
2382         * g10/gpgcompose.c: Remove
2383
2384         gpg: Remove experimental feature to export w/o user-ids.
2385         + commit 3491faa3bb62c1c96c6dd5947516128b2a966535
2386         * g10/options.h (IMPORT_DROP_UIDS, EXPORT_DROP_UIDS): Remove.
2387         * g10/import.c (parse_import_options): Remove option import-drop-uids.
2388         (import_one_real): Remove drop uids code.
2389         (remove_all_uids): Remove function.
2390         * g10/export.c (parse_export_options): Remove option export-drop-uids.
2391         (do_export_one_keyblock): Remove drop uids code.
2392
2393         card: List keys of pkcs#15 cards.
2394         + commit a06c79b6143fc49e6f5169b8a9f53c691031d6ca
2395         * tools/gpg-card.c (list_p15): New.
2396         (list_card): Call it.
2397
2398         scd:p15: Read PuKDF and minor refactoring.
2399         + commit 0c080ed5791ecf1606d1c2fddc0c55362fd171d3
2400         * scd/app-p15.c (pukdf_object_t): New.
2401         (struct app_local_s): Add field public_key_info.
2402         (release_pukdflist): New.
2403         (select_and_read_record): No diagnostic in case of not_found.
2404         (read_first_record): New.  Factored out from the read_ef_ fucntions.
2405         (read_ef_pukdf): New.  Basically a copy of read_ef_prkdf for now.
2406         (read_p15_info): Also read the public keys.
2407
2408         (cardtype2str): New.
2409         (read_ef_tokeninfo): Print a string with the cardtype.
2410
2411 2021-02-01  Werner Koch  <wk@gnupg.org>
2412
2413         sm: Add a few OIDs and merge OID tables.
2414         + commit 0737dc8187a0eb9ca4661e2ad45954c718daa451
2415         * sm/keylist.c (OID_FLAG_KP): New.
2416         (key_purpose_map): Merge into ...
2417         (oidtranstbl): this.
2418         (get_oid_desc): New arg 'matchflag'.  Use function in place of direct
2419         access to key_purpose_map.
2420
2421 2021-01-28  Werner Koch  <wk@gnupg.org>
2422
2423         Include the library version in the compliance checks.
2424         + commit 90c514868ff5fcf6d39490d4874ac3a31ba9e85f
2425         * common/compliance.c (gnupg_gcrypt_is_compliant): New.
2426         (gnupg_rng_is_compliant): Also check library version.
2427         * g10/mainproc.c (proc_encrypted): Use new function.
2428         (check_sig_and_print): Ditto.
2429         * sm/decrypt.c (gpgsm_decrypt): Ditto.
2430         * sm/encrypt.c (gpgsm_encrypt): Ditto.
2431         * sm/verify.c (gpgsm_verify): Ditto
2432
2433 2021-01-27  Werner Koch  <wk@gnupg.org>
2434
2435         scd:p15: Make file selection more robust.
2436         + commit 1e197c29ed95d021f5693cd3652b6acb07d928ea
2437         * scd/app-p15.c: Include host2net.h.
2438         (DEFAULT_HOME_DF): New.
2439         (select_and_read_binary): Replace slot by app.  Change callers.  Use
2440         select_ef_by_path.
2441         (select_and_read_record): ditto.
2442         (select_ef_by_path): Make use use the home_df.
2443         (parse_certid): Adjust for always set home_df.
2444         (print_tokeninfo_tokenflags): Ditto.
2445         (app_select_p15): Take the home_df from the FCI returned by select.
2446
2447         scd: Define new status word.
2448         + commit 7620473cd007c074b0625a678caa6105a4c87142
2449         * scd/apdu.h (SW_NO_CURRENT_EF): New.
2450
2451         scd:p15: Factor the commonKeyAttributes parser out.
2452         + commit 5bcbc8cee310067aa3cc48665b0fb0595c64ae4d
2453         * scd/app-p15.c (read_ef_prkdf): Fix detection of unsupported key
2454          objects.  Factor some code out to ...
2455         (parse_common_key_attr): new.
2456
2457         gpg: Fix ugly error message for an unknown symkey algorithm.
2458         + commit b08418d22cc898c9d135217e07ca77f3daf3c9e9
2459         * g10/mainproc.c (proc_symkey_enc): Do not continue with an unknown
2460         algorithm.
2461
2462 2021-01-26  Werner Koch  <wk@gnupg.org>
2463
2464         scd:p15: Factor the commonObjectAttributes parser out.
2465         + commit fb84674d6c645a423b8ed9835437d25e4893e183
2466         * scd/app-p15.c (parse_common_obj_attr): New.
2467         (read_ef_prkdf): Use new function.
2468         (read_ef_aodf): Ditto.
2469
2470         scd:p15: First step towards real CardOS 5 support.
2471         + commit fc287c0552b0fe489c66bb493879f4330c34f287
2472         * scd/iso7816.c (iso7816_select_path): Add arg from_cdf.
2473         * scd/app-nks.c (do_readkey): Adjust for this change.
2474
2475         * scd/app-p15.c (CARD_TYPE_CARDOS_53): New.
2476         (IS_CARDOS_5): New.
2477         (card_atr_list): Add standard ATR for CardOS 5.3.
2478         (select_and_read_binary): Remove the fallback to record read hack.
2479         (select_and_read_record): New.
2480         (select_ef_by_path): Rework and support CardOS feature.
2481         (read_ef_prkdf): Use read record for CardOS.
2482         (read_ef_cdf): Ditto.
2483         (read_ef_aodf): Ditto.  Also fix bug in the detection of other
2484         unsupported attribute types.
2485         (verify_pin): Use IS_CARDOS_5 macro.
2486         (app_select_p15): Force direct method for CardOS.
2487
2488 2021-01-25  Werner Koch  <wk@gnupg.org>
2489
2490         agent: Support ssh-agent extensions for environment variables.
2491         + commit 224e26cf7b67f22bb0140133eac6b4ad24f3b1b7
2492         * common/session-env.c (session_env_list_stdenvnames): Extend to allow
2493         return all names as one string.
2494         * agent/command-ssh.c (SSH_REQUEST_EXTENSION): New.
2495         (SSH_RESPONSE_EXTENSION_FAILURE): New.
2496         (request_specs): Add handler for the extension command.
2497         (ssh_handler_extension): New.
2498
2499 2021-01-21  Werner Koch  <wk@gnupg.org>
2500
2501         scd:p15: Show the ATR as part of the TokenInfo diagnostics.
2502         + commit 60499d98940d4b7a1673b8584cafe0f7ac2901dd
2503         * scd/app-p15.c (read_ef_tokeninfo): Print the ATR in verbose mode.
2504
2505 2021-01-19  Werner Koch  <wk@gnupg.org>
2506
2507         Require Libgcrypt 1.9.
2508         + commit 9500432b7ae10d98b30c58de4357e2ffb93bf795
2509         * configure.ac: Require at least Libgcrypt 1.9.0.  Remove all
2510         GCRYPT_VERSION_NUMBER dependent code.
2511
2512 2021-01-12  Werner Koch  <wk@gnupg.org>
2513
2514         tools: Add option --clock to watchgnupg.
2515         + commit 93d5d7ea2a8b110b3ad88be25f2f67d706361e44
2516         * tools/watchgnupg.c (print_fd_and_time) [ENABLE_LOG_CLOCK]: Use
2517         clock_gettime.
2518         (print_version): New option --clock.
2519
2520 2021-01-11  Werner Koch  <wk@gnupg.org>
2521
2522         gpg,w32: Fix gnupg_remove.
2523         + commit b6967d31912912ad3c0a2ff6bf6eb9822a194562
2524         * common/sysutils.c (map_w32_to_errno): New.
2525         (gnupg_w32_set_errno): New.
2526         (gnupg_remove) [w32]: Set ERRNO
2527
2528 2021-01-06  Ingo Klöcker  <dev@ingo-kloecker.de>
2529
2530         I meant "SHA-2 digests" in the previous commit.
2531         + commit 7eef40cc1143fb19132786ebcca1c9a6c9a85e6e
2532
2533
2534         scd:nks: Add support for signing plain SHA-3 digests.
2535         + commit 8fe976d5b9a0f2902868737dd502c749565222a6
2536         * scd/app-nks.c (do_sign): Handle plain SHA-3 digests and verify
2537         encoding of ASN.1 encoded hashes.
2538
2539 2020-12-30  Werner Koch  <wk@gnupg.org>
2540
2541         wkd: Minor permission fix for created files.
2542         + commit c008e8d20e12c8845403ad7dad499f6a196ecc6a
2543         * tools/wks-util.c (wks_cmd_install_key): Don't set u+x on the file.
2544         (ensure_policy_file): No need to make the policy file group writable.
2545
2546 2020-12-21  Werner Koch  <wk@gnupg.org>
2547
2548         common: Remove superfluous debug output from dotlock.c.
2549         + commit fc0eaa9add3c9bc93d4404988be3e1eb8f88ffa2
2550         * common/dotlock.c (dotlock_create_unix): Remove debug output.
2551
2552         doc: Explain LDAP keyserver parameters.
2553         + commit e0cbb97925a109fee7c0a7450bcac120f2766ed2
2554
2555
2556 2020-12-18  Werner Koch  <wk@gnupg.org>
2557
2558         dirmngr: Do not block threads in LDAP keyserver calls.
2559         + commit 355e2992c043dd3241a9e838255f01418490ef33
2560         * dirmngr/ks-engine-ldap.c: Wrap some ldap calls.
2561
2562 2020-12-17  Werner Koch  <wk@gnupg.org>
2563
2564         gpg: New AKL method "ntds"
2565         + commit 4a3836e2b2f9a91995d5ce058820e1121298f548
2566         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Change the new
2567         support for KEYDB_SEARCH_MODE_MAIL.
2568         (ks_ldap_get): Add a debug.
2569         * g10/options.h (AKL_NTDS): New.
2570         * g10/keyserver.c (keyserver_import_ntds): New.
2571         (keyserver_get_chunk): Allow KEYDB_SEARCH_MODE_MAIL.
2572         * g10/getkey.c (parse_auto_key_locate): Support "ntds".
2573         (get_pubkey_byname): Ditto.
2574
2575         dirmngr: Support "ldap:///" for the current AD user.
2576         + commit 1194e4f7e2dff620e0da87f212f3a35f8021b142
2577         * dirmngr/http.h (struct parsed_uri_s): Add field ad_current.
2578         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): Set it.
2579         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Take care of ad_current.
2580
2581         dirmngr: Allow LDAP searches via fingerprint.
2582         + commit 2cadcce3e877c857bb8859574762b59b9c193b44
2583         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Add arg
2584         serverinfo and allow searching by fingerprint.
2585         (ks_ldap_get, ks_ldap_search): First connect then create teh filter.
2586
2587 2020-12-15  Werner Koch  <wk@gnupg.org>
2588
2589         dirmngr: Store all version 2 schema attributes.
2590         + commit a2434ccabdd1956876b44e05e07c3c3630c50f8f
2591         * g10/call-dirmngr.c (ks_put_inq_cb): Emit "fpr" records.
2592         * dirmngr/ks-engine-ldap.c (extract_attributes): Add args
2593         extract-state and schemav2.  Add data for the new schema version.
2594         remove the legacy code to handle UIDs in the "pub" line.
2595         (ks_ldap_put): Set new attributes for NTDS use the fingerprint as CN.
2596
2597 2020-12-14  Werner Koch  <wk@gnupg.org>
2598
2599         dirmngr: Support the new Active Directory schema.
2600         + commit e9ddd61fe979b1b8e1a4801f7f916d0222397245
2601         * dirmngr/ks-engine-ldap.c (SERVERINFO_): New constants.
2602         (my_ldap_connect): Relace args pgpkeyattrp and real_ldapp by a new
2603         serverinfo arg.  Set the new info flags.
2604         (ks_ldap_get): Adjust for change.
2605         (ks_ldap_search): Ditto.
2606         (ks_ldap_put): Ditto.  Replace xmalloc by xtrymalloc.  Change the DN
2607         for use with NTDS (aka Active Directory).
2608         * doc/ldap/gnupg-ldap-init.ldif (pgpSoftware): Update definition of
2609         pgpVersion.
2610         * doc/ldap/gnupg-ldap-ad-init.ldif: New.
2611         * doc/ldap/gnupg-ldap-ad-schema.ldif: New.
2612
2613         dirmngr: Do not store the useless pgpSignerID in the LDAP.
2614         + commit cc056eb534c1b8f7d1a90af3b9ecb9d6b2f322fa
2615         * dirmngr/ks-engine-ldap.c (extract_attributes): Do not store the
2616         pgpSignerID.
2617         * g10/call-dirmngr.c (ks_put_inq_cb): Do not emit sig records.
2618
2619         dirmngr: Fix adding keys to an LDAP server.
2620         + commit 37a899d0e4fd49512d522e7f6f86b6968309fece
2621         * dirmngr/ks-engine-ldap.c (ks_ldap_put): Extract attribites into
2622         addlist.
2623
2624 2020-12-11  NIIBE Yutaka  <gniibe@fsij.org>
2625
2626         scd:nks: Support READKEY with keygrip and for "NKS-IDLM" keyref.
2627         + commit 3b392630881350baabeba16fa760bad04be94d03
2628         * scd/app-nks.c (do_readkey): Allow KEYGRIP access.
2629         Support NKS-IDLM.XXXX keyref.
2630
2631         scd:nks: Factor out pubkey retrieval from keygrip handling.
2632         + commit b7c087375d84c31ab8a645cd81e6b1e6185cb30d
2633         * scd/app-nks.c (pubkey_from_pk_file): New.
2634         (keygripstr_from_pk_file): Use pubkey_from_pk_file.
2635
2636 2020-12-10  NIIBE Yutaka  <gniibe@fsij.org>
2637
2638         scd:nks: Add support of KEYGRIP for do_readcert.
2639         + commit 4020cd9d656264bec5e7fb5e45c5e06eff8656c3
2640         * scd/app-nks.c (do_readcert): Support KEYGRIP.
2641
2642         scd:nks: Factor out iteration over filelist.
2643         + commit 6c4365847666cefac73ccc743a99fac473da2186
2644         * scd/app-nks.c (iterate_over_filelist): New.
2645         (do_with_keygrip): Use iterate_over_filelist.
2646
2647 2020-12-09  Werner Koch  <wk@gnupg.org>
2648
2649         wks-client: Improve an error message.
2650         + commit c7c88648b71b8ce3a5507946afb91761fc6d931e
2651         * tools/gpg-wks-client.c (read_confirmation_request): Print trust
2652         letter.
2653
2654 2020-12-09  NIIBE Yutaka  <gniibe@fsij.org>
2655
2656         scd:ccid:spr532: Extend abort_cmd for initialization time.
2657         + commit a9aa30ed2c2c399c2baa6a5aa2624d8fdee6286f
2658         * scd/ccid-driver.c (abort_cmd): Add INIT argument to support
2659         synchronize until success, even ignoring timeout.
2660         (bulk_in): Normal use case of abort_cmd.
2661         (ccid_vendor_specific_init): Initial use case of abort_cmd.
2662
2663         scd:ccid: Call libusb_clear_halt in ccid_vendor_specific_setup.
2664         + commit f50373027222f28ab9d37843178a5d44cc1e3cc0
2665         * scd/ccid-driver.c (ccid_vendor_specific_setup): Only for SPR532,
2666         call libusb_clear_halt.
2667
2668         scd:ccid: Revert the addition of libusb_clear_halt for EP_INTR.
2669         + commit ffabc29d5eadfe81b9f62b7d4fe6e858b191354d
2670         * scd/ccid-driver.c (ccid_setup_intr): Don't call libusb_clear_halt.
2671
2672 2020-12-08  NIIBE Yutaka  <gniibe@fsij.org>
2673
2674         scd:yubikey: Fix support of Yubikey NEO.
2675         + commit 946555ea3ceb823b95ed13654ae4fd667daa4337
2676         * scd/app-openpgp.c (get_public_key): Yubikey NEO also has this issue.
2677
2678         agent: Allow decryption with card but no file.
2679         + commit eda3c688fc2e85c7cd63029cb9caf06552d203b4
2680         * agent/pkdecrypt.c (agent_pkdecrypt): Support decryption with card
2681         but without a stub key.
2682
2683         agent: Clean up the API of agent_pkdecrypt.
2684         + commit 9beab36dfa39106f6efd1bb89551a581bcf9df60
2685         * agent/agent.h (agent_pkdecrypt): Use gpg_error_t type.
2686         * agent/pkdecrypt.c (agent_pkdecrypt): Use gpg_error_t type.
2687
2688         agent: Allow pksign operation with card but no file.
2689         + commit cbb0e069f55bc45037bbd69d54ce23dae2af2ac6
2690         * agent/pksign.c (agent_pksign_do): Add support with no file.
2691
2692 2020-12-07  Ingo Klöcker  <dev@ingo-kloecker.de>
2693
2694         gpg: Make quick-gen-key with algo "card" work for keys without keytime.
2695         + commit 255d33d65126df00bc036580d0b32735d7178c8b
2696         * g10/keygen.c (quick_generate_keypair): Set pCARDKEY flag if algostr
2697         is "card" or "card/...".
2698
2699 2020-12-07  NIIBE Yutaka  <gniibe@fsij.org>
2700
2701         gpg,card: Allow no version information of Yubikey.
2702         + commit 1cd615afe3010d2c3919de489d7c9a78513c8694
2703         * g10/call-agent.c (learn_status_cb): Assume >= 2 when no version.
2704         * tools/card-call-scd.c (learn_status_cb): Likewise.
2705
2706 2020-12-03  NIIBE Yutaka  <gniibe@fsij.org>
2707
2708         scd:nks: Fix caching keygrip (more).
2709         + commit 87d2c579cc38c1d2787945650125fb0e0336652c
2710         * scd/app-nks.c (keygripstr_from_pk_file): Distinguish by APP_ID.
2711
2712         scd: Fix KEYINFO command with --data option.
2713         + commit 54b88ae4606265f3d51c1ca603dbf846f3dfd678
2714         * scd/command.c (cmd_keyinfo): Handle --data option correctly.
2715
2716         scd:openpgp: Fix writing ECC key to card.
2717         + commit a25c99b156ca9acaa7712e9c09a6df0a7a23c833
2718         * scd/app-openpgp.c (build_privkey_template): Adding another argument
2719         of ecc_d_fixed_len to handle variable-size MPI.
2720
2721 2020-12-02  Werner Koch  <wk@gnupg.org>
2722
2723         kbx: Better error message in case of a crippled Libgcrypt.
2724         + commit 63ed2054a1f3cfbdff5cda390952f10a512dab83
2725         * kbx/keybox-openpgp.c (keygrip_from_keyparm): Detect missing curve.
2726
2727 2020-12-01  Jens Meißner  <meissner@b1-systems.de>
2728
2729         doc: Add parameters for batch generation of ECC keys.
2730         + commit 4f9ac5dac093300ac18fd3732bffdd2a3fc38776
2731         * doc/gpg.texi: Add parameters for batch generation of ECC keys.
2732
2733 2020-11-30  Werner Koch  <wk@gnupg.org>
2734
2735         scd:nks: Minor additions to the basic IDLM application support.
2736         + commit 806547d9d243b26c2275fc00c645ee39d258b49b
2737         * scd/app-nks.c (filelist): Use special value -1 for IDLM pubkeys.
2738         (keygripstr_from_pk_file): Handle special value.
2739         (do_readcert): Ditto.
2740         (do_writecert): Ditto.
2741
2742 2020-11-27  Werner Koch  <wk@gnupg.org>
2743
2744         card: Let the APDU command prints a description of the status word.
2745         + commit ad469609b101fe6c1128135180fef8eae13279ff
2746         * tools/card-call-scd.c (scd_apdu_strerror): New.
2747         * tools/gpg-card.c (cmd_apdu): Print a description.
2748
2749         scd: New getinfo sub-command apdu_strerror.
2750         + commit 0e34683a6c4b037aa50ca0f97ddb9d5c4e499084
2751         * scd/apdu.c (apdu_strerror): Add missing status codes.
2752         * scd/command.c (cmd_getinfo): New sub-command apdu_strerror.
2753
2754         card: Netkey improvement for passwd.
2755         + commit 5804db1a13d2cf8f4010d1257c586bed978c3173
2756         * tools/gpg-card.c (cmd_passwd) [Netkey]: No Standard/QES menu if the
2757         card does not support it.  Print no error in cases the user canceled.
2758
2759 2020-11-27  NIIBE Yutaka  <gniibe@fsij.org>
2760
2761         scd:ccid-driver: Fix pinpad error handling for cancel/timeout.
2762         + commit bb591222c3c5cb1a1750b1b1dd26d0bc53b347cb
2763         * scd/apdu.h (SW_HOST_UI_CANCELLED, SW_HOST_UI_TIMEOUT): New.
2764         * scd/ccid-driver.h (CCID_DRIVER_ERR_UI_CANCELLED): New.
2765         (CCID_DRIVER_ERR_UI_TIMEOUT): New.
2766         * scd/ccid-driver.c (bulk_in): Handle PIN input cancel/timeout error.
2767         * scd/iso7816.c (map_sw): Support SW_HOST_UI_CANCELLED and
2768         SW_HOST_UI_TIMEOUT.
2769
2770 2020-11-26  Werner Koch  <wk@gnupg.org>
2771
2772         agent: Fix YK s/n and prettify the request card prompt for Yubikeys.
2773         + commit 7113263a00d8c9b09f0dfdb9590bfe2bab1bc776
2774         * agent/divert-scd.c (ask_for_card): Detect and re-format the Yubikey
2775         prompt.
2776         * scd/app.c (app_munge_serialno): Fix Yubikey s/n munging.
2777         (card_get_dispserialno): Ditto.
2778         * scd/app-openpgp.c (get_disp_serialno): Remove.
2779         (get_prompt_info): Use app_get_dispserialno.--
2780
2781         scd: Do not try to use a non-enabled app after card switching.
2782         + commit d784e763495c8d53e29a2debdd9c0e0578f15a6a
2783         * scd/app.c (app_dump_state): Also print the refcount.
2784         (maybe_switch_app): Make sure the app exists on the card.
2785
2786         scd: Add special serialno compare for OpenPGP cards.
2787         + commit 764c69a841abc1a4dff2fa86b4cd0b63ec737860
2788         * scd/app.c (is_same_serialno): New.
2789         (check_application_conflict): Use this.
2790         (select_application): Ditto.
2791         (app_switch_current_card): Ditto.
2792         * scd/app-openpgp.c (check_keyidstr): Ignore the card version and also
2793         compare case insensitive.
2794
2795 2020-11-26  NIIBE Yutaka  <gniibe@fsij.org>
2796
2797         gpg: Report an error for receiving key from agent.
2798         + commit 605ab99912ac632363d1b4378a710229e40ca99e
2799         * g10/export.c (do_export_one_keyblock): Report an error.
2800
2801         scd,nks: Fix caching keygrip.
2802         + commit 920154370834ad8d947aed19c9d914a27dde6baa
2803         * scd/app-nks.c (keygripstr_from_pk_file): Identify by cfid if
2804         available.
2805
2806 2020-11-25  Werner Koch  <wk@gnupg.org>
2807
2808         scd:p15: Print the internal card type.
2809         + commit 00037f499db830c75fee2111dfbef72fa11bd98a
2810         * scd/app-p15.c (read_ef_tokeninfo): Print the internal card type.
2811
2812         scd:p15: Improve support for some CardOS based cards.
2813         + commit c7b9a4ee439eca5a4bde4781f7d8983af3b9201e
2814         * scd/iso7816.c (iso7816_read_binary_ext): Add optional arg r_sw and
2815         change callers.
2816         (iso7816_read_record): Factor all code out to ...
2817         (iso7816_read_record_ext): new.
2818         * scd/app-p15.c (select_and_read_binary): Fallback to record reading.
2819         (read_ef_aodf): Clear EOF error.
2820
2821         scd: Rework the handling of the displayed serial number.
2822         + commit 3a8250c02031080c6c8eebd5dea03f5f87f9ddd7
2823         * scd/app.c (app_new_register): Call app_munge_serialno for Yubikeys.
2824         (app_munge_serialno): Handle Yubikey serial numbers.
2825         (card_get_serialno): Remove special Yubikey treatment.  Drop arg
2826         is_canonical.
2827         (app_get_serialno): Clear ERRNO on error.
2828         (card_get_dispserialno): New.  Also change formatting of Yubikey and
2829         OpenPGP numbers to match those printed on the card.
2830         (app_get_dispserialno): New.
2831         * scd/app-openpgp.c (do_getattr): Use app_get_dispserialno.
2832         (yubikey_get_serialno): Remove.
2833         * scd/app-piv.c (get_dispserialno): Remove.
2834         (do_getattr): Use app_get_dispserialno.
2835
2836 2020-11-25  NIIBE Yutaka  <gniibe@fsij.org>
2837
2838         scd: Fix an error return for READKEY.
2839         + commit c3a20c88fb30b0fc4ce50a01de97fae333003682
2840         * scd/command.c (cmd_readkey): Return when error.
2841
2842         scd,nks: Fix SEGV for learn for older card.
2843         + commit 006944b856ee2202905290e8a2f5523a7877d444
2844         * scd/app-nks.c (keygripstr_from_pk_file): Set algostr.
2845
2846 2020-11-20  NIIBE Yutaka  <gniibe@fsij.org>
2847
2848         gpg: Change API of agent_scd_serialno.
2849         + commit 777019faf0b8f10a897c3ee477d35f9b29f02224
2850         * g10/call-agent.c (agent_scd_serialno): Extend API to allow with
2851         R_SERIALNO == NULL.
2852         * g10/card-util.c (card_status): Use NULL for agent_scd_serialno.
2853         (factory_reset): Likewise.
2854         * g10/skclist.c (build_sk_list): Likewise.
2855
2856         Fix the previous comment changes help doc string.
2857         + commit cc8b99d18e26397028ca185e44d0886a94cc1bf6
2858         * scd/command.c (hlp_learn): Fix the doc string.
2859
2860 2020-11-19  Werner Koch  <wk@gnupg.org>
2861
2862         gpgconf: Also print revision of libksba.
2863         + commit 4070f302e4decc8d54d1305cbd30f6dab052ef7e
2864         * dirmngr/dirmngr.c (get_revision_from_blurb): Fix detection of empty
2865         string.
2866         (gpgconf_versions): Print ksba revision.
2867
2868 2020-11-19  NIIBE Yutaka  <gniibe@fsij.org>
2869
2870         agent: Fix creating shadow key on card key generation.
2871         + commit 8ddadbbdbbe20b9e87eb2bfa142577e26dae297e
2872         * agent/command.c (cmd_readkey): Fix handling --card option.
2873
2874         gpg: Fix --card-edit command.
2875         + commit e45455d3020ca8f21c54112b6dfb1cc9bd3f2623
2876         * g10/card-util.c (get_info_for_key_operation): Revert the change.
2877
2878 2020-11-18  NIIBE Yutaka  <gniibe@fsij.org>
2879
2880         build: Update to newer autoconf constructs.
2881         + commit d66fb3aa53a6c4a815fe35a15e3c61886c5df628
2882         * acinclude.m4 (GNUPG_CHECK_ENDIAN): Use AC_COMPILE_IFELSE instead of
2883         AC_TRY_COMPILE.  Use AC_RUN_IFELSE instead of AC_TRY_RUN.
2884         (GNUPG_BUILD_PROGRAM): Use AS_HELP_STRING instead of AC_HELP_STRING.
2885         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE.
2886         Use AS_HELP_STRING instead of AC_HELP_STRING.
2887         (AC_ISC_POSIX): Replace by AC_SEARCH_LIBS.
2888         (AC_TYPE_SIGNAL): Remove.
2889         * m4/isc-posix.m4: Remove.
2890         * m4/codeset.m4: Update from gnulib.
2891         * m4/gettext.m4: Update from gnulib.
2892         * m4/lcmessage.m4: Update from gnulib.
2893         * m4/socklen.m4: Update from gnulib.
2894         * m4/ldap.m4: Use AS_HELP_STRING instead of AC_HELP_STRING.
2895         Use AC_LINK_IFELSE instead of AC_TRY_LINK.
2896         Use AC_RUN_IFELSE instead of AC_TRY_RUN.
2897         * m4/gpg-error.m4: Update from libgpg-error.
2898         * m4/readline.m4: Update from libgpg-error.
2899         * m4/npth.m4: Update from npth.
2900         * m4/libassuan.m4: Update from libassuan.
2901         * m4/libgcrypt.m4: Update from libgcrypt.
2902         * m4/ksba.m4: Update from libksba.
2903         * m4/ntbtls.m4: Update from ntbtls.
2904         * common/signal.c [!HAVE_DOSISH_SYSTEM] (init_one_signal): Replace
2905         RETSIGTYPE to void.
2906         [!HAVE_DOSISH_SYSTEM] (got_fatal_signal, got_usr_signal): Likewise.
2907
2908         build: Use modern Autoconf check for types.
2909         + commit aeeb8e975dc740cb79954de7fec4fcfe902d3a42
2910         * common/types.h: Use HAVE_TYPE_BYTE, HAVE_USHORT_TYPEDEF,
2911         HAVE_ULONG_TYPEDEF, HAVE_U16_TYPEDEF, and HAVE_TYPE_U32.
2912         * configure.ac (byte, ushort, ulong, u16, u32): Use AC_CHECK_TYPES.
2913
2914 2020-11-13  Werner Koch  <wk@gnupg.org>
2915
2916         gpg: Fix the encrypt+sign hash algo preference selection for ECDSA.
2917         + commit e37c2e184448f64e285f925ab9636b5f21be99f7
2918         * g10/keydb.h (pref_hint): Change from union to struct and add field
2919         'exact'.  Adjust callers.
2920         * g10/pkclist.c (algo_available): Take care of the exact hint.
2921         * g10/sign.c (sign_file): Rework the hash detection from
2922         recipient prefs.
2923
2924 2020-11-12  Werner Koch  <wk@gnupg.org>
2925
2926         gpgconf: Yet another fix for --apply-profile.
2927         + commit e546cc78b75978a696298f2fcc072faeb7f69be4
2928         * tools/gpgconf.c (main): Use gnupg_homedir instead of
2929         default_homedir.  Check for existance of the directory.
2930
2931 2020-11-11  Werner Koch  <wk@gnupg.org>
2932
2933         w32: Replace some fopen by es_fopen.
2934         + commit d574213ce21c495d9432eeb5956e8857826876c6
2935         * agent/protect-tool.c (read_file): Replace fopen by es_fopen.
2936         * dirmngr/dirmngr-client.c (read_pem_certificate):  Ditto.
2937         (read_certificate): Ditto.
2938         * g10/keydb.c (rt_from_file): Ditto.
2939         * kbx/kbxutil.c (read_file): Ditto.
2940         * g10/plaintext.c (get_output_file) [__riscos__]: Remove code.
2941
2942 2020-11-11  NIIBE Yutaka  <gniibe@fsij.org>
2943
2944         gpg: Fix the previous commit.
2945         + commit dd2703096f3ee7f4b6b96e2b649daf85aa8d6030
2946         * g10/delkey.c (do_delete_key): Fix the condition for the error.
2947
2948 2020-11-10  NIIBE Yutaka  <gniibe@fsij.org>
2949
2950         gpg: In batch mode, delete-secret-key is not okay without --yes.
2951         + commit f9bbc751633f38f58fecb71c33aae735e9b30241
2952         * g10/delkey.c (do_delete_key): Emit an error when not --yes.
2953
2954         gpg: Fix agent_delete_key interaction.
2955         + commit 9854369a729b9fde43eac2e2f7154f5187378787
2956         * g10/call-agent.c (agent_delete_key): Set up CTX.
2957
2958 2020-11-09  Werner Koch  <wk@gnupg.org>
2959
2960         card: Run factory-reset in locked stated also in gpg-card.
2961         + commit 12fd10791f1dec4ec42810d7b92c69e1ae2327b9
2962         * tools/card-call-scd.c (scd_apdu): Add more pseudo APDUs.
2963         * tools/card-misc.c (send_apdu): Handle them.
2964         * tools/gpg-card.c (cmd_factoryreset): Use lock commands.
2965
2966         card: Run factory-reset in locked stated.
2967         + commit 8fb0d5e3c775f40e321689b35431d81425406237
2968         * scd/command.c (reset_notify): Add option --keep-lock.
2969         (do_reset): Add arg keep_lock.
2970         (cmd_lock): Send progress status.
2971         * g10/call-agent.c (agent_scd_apdu): Add more pseudo APDUs.
2972         * g10/card-util.c (send_apdu): Ditto.
2973         (factory_reset): Use lock commands.
2974
2975         gpg: Do not print rejected digest algo notes with --quiet.
2976         + commit e08e1d62d089a154ec5d7c80cd58e8e3b18d2d6b
2977         * g10/misc.c (print_digest_rejected_note): Do not print in quiet mode.
2978         (print_sha1_keysig_rejected_note): Ditto.
2979
2980 2020-11-09  NIIBE Yutaka  <gniibe@fsij.org>
2981
2982         gpg: Fix SOS handling when exporting SSH key with libgcrypt 1.8.
2983         + commit bf3a9377d147d8a83d9c71ca5a7284897c913951
2984         * g10/export.c (key_to_sshblob): Fix SOS correctly.
2985
2986         agent: Fix SOS handling with libgcrypt 1.8.
2987         + commit ba4f68416742eb241ec5490d16f88b0eb0bdc811
2988         * agent/cvt-openpgp.c (apply_protection): Handle opaque MPI.
2989
2990 2020-11-06  Werner Koch  <wk@gnupg.org>
2991
2992         agent: Minor tweaks to the new genpin inquiry.
2993         + commit c896112fa3f7f3289b5198bfac992160feb0ad0a
2994         * agent/call-pinentry.c (generate_pin): Use STRING random which is
2995         sufficient for a passphrase.
2996         (inq_cb): s/rc/err/.  Do not print two errors in case generate_pin
2997         fails.  Lowercase strings as per GNU standards.
2998         (setup_genpin): Fix translation test.
2999         (setup_qualitybar): Ditto.
3000
3001 2020-11-06  Andre Heinecke  <aheinecke@gnupg.org>
3002
3003         agent: Add genpin inquiry for pinentry.
3004         + commit 557ddbde32585c534626b57a595a2ccf28fd585e
3005         * agent/call-pinentry.c (agent_get_passphrase): Setup genpin.
3006         (do_getpin): Update with new name for inquire callback.
3007         (inq_quality): Rename to inq_cb and add genpin support.
3008         (inq_cb): Renamed form inq_quality.
3009         (generate_pin): New helper to generate a pin.
3010         (agent_askpin): Fix some typos.
3011         (setup_genpin): Provide new strings for pinentry.
3012
3013 2020-11-05  Ben Kibbey  <bjk@luxsci.net>
3014
3015         gpg: Add canceled status message.
3016         + commit 31e47dfad0f40e31e8b3113b933696e8e4105136
3017         * common/status.h (STATUS_CANCELED_BY_USER): New.
3018         * g10/passphrase.c (passphrase_to_dek): Send STATUS_CANCELED_BY_USER
3019         instead of STATUS_MISSING_PASSPHRASE when canceled is set.
3020
3021 2020-11-05  NIIBE Yutaka  <gniibe@fsij.org>
3022
3023         scd: Use lock_slot for apdu_send_direct.
3024         + commit f808012ac2cf67ec563da178d963f300a7f2564d
3025         * scd/apdu.c (apdu_send_direct): Use lock_slot.
3026
3027         scd: Internal CCID driver: Fix a race condition on close.
3028         + commit 484bafda4dbf5ffe9e7c41ef24fbc5bd791a3b32
3029         * scd/ccid-driver.c (ccid_require_get_status): For VENDOR_SCM reader,
3030         return 0 only at the initial call.
3031         (bulk_in): Don't detect an error for VENDOR_SCM reader, just kicking
3032         the loop, to invoke scd_update_reader_status_file, which calls
3033         ccid_slot_status again.
3034         (ccid_slot_status): Move the call of ccid_vendor_specific_setup to...
3035         (ccid_get_atr): ... here.
3036
3037 2020-11-04  Werner Koch  <wk@gnupg.org>
3038
3039         speedo,w32: Install gpg-check-pattern and example profiles.
3040         + commit f5a81953e172a7bb4d02f2dc0e398f379c39ec84
3041         * doc/examples/vsnfd.prf: Rename to VS-NfD.prf.
3042         * doc/examples/Automatic.prf: New.
3043         * doc/Makefile.am (examples): Adjust.
3044         * build-aux/speedo/w32/inst.nsi: Install gpg-check-pattern.exe and 3
3045         example files.
3046         * build-aux/speedo/w32/wixlib.wxs: Add new files.
3047
3048         g13: Include a now missing header file.
3049         + commit b7f4e2d71fe3dee680f834cfc3dd620352830147
3050         * g13/create.c: Include sysutuls.h
3051
3052         gpgconf: Make sure the homedir exists for --apply-profile.
3053         + commit 7d95f2e7e7a09e3d433d449b117e3470f9dd38c7
3054         * tools/gpgconf.c (main) <aApplyDefaults, aApplyProfile>: Create the
3055         standard home directory.
3056
3057         common: Fix duplicate implementation of try_make_homedir.
3058         + commit dabc314b71378f585fac2753149f3358e32ec621
3059         * g10/openfile.c (try_make_homedir): Move core of the code to ...
3060         * common/homedir.c (gnupg_maybe_make_homedir): new.
3061         * sm/keydb.c (try_make_homedir): Implement using new function.
3062
3063         * common/homedir.c: Include i18n.h.
3064         * po/POTFILES.in: Add common/homedir.c.
3065
3066 2020-11-04  Andre Heinecke  <aheinecke@gnupg.org>
3067
3068         w32: Add another pinentry search path.
3069         + commit c8f6f6bbc8b203e633d382aa84862807c1aeb3d1
3070         * common/homedir.c (get_default_pinentry_name): Try ../bin/pinentry.exe
3071
3072         w32: Add windows subsystem variant of gpgconf.
3073         + commit e2659f4bf603693c43af0444239bc52744291edc
3074         * tools/Makefile.am (gpgconf-w32): New target. Builds gpgconf with
3075         subsystem windows.
3076         * build-aux/speedo/w32/wixlib.wxs: Package it.
3077
3078 2020-11-03  Werner Koch  <wk@gnupg.org>
3079
3080         w32: Fix strftime problem on Windows.
3081         + commit e8aae18b997b3fdbfac86c644be94044aa67224d
3082         * common/gettime.c: Include locale.h.
3083         (asctimestamp): Increase buffer.  On Windows use setlocale.
3084
3085         gpg: Switch to AES256 for symmetric encryption in de-vs mode.
3086         + commit d1f2a6d9f71cf50318f4891c84aeedb975553896
3087         * g10/gpg.c (set_compliance_option): For AES256 and SHA256 in de-vs
3088         mode.
3089         * g10/encrypt.c (setup_symkey): Add extra compliance check.
3090         (encrypt_simple): Avoid printing a second error oncplinace failure.
3091
3092 2020-11-02  Werner Koch  <wk@gnupg.org>
3093
3094         gpg: Allow setting notations with the empty string as value.
3095         + commit e1bafa3574ccd56d9f8f8c1deb3d8fb9fd7025cc
3096         * g10/misc.c (pct_expando): Catch special case of the empty string.
3097         Also map a NULL to the empty string.
3098         * g10/photoid.c (show_photos): Make an empty string used as command
3099         fail.
3100
3101         build: Remove m4 macro defs which are not anymore used.
3102         + commit 6397cf5fbe3bbc1f616431b011f76e031a387d4c
3103         * configure.ac (GNUPG_FUNC_MKDIR_TAKES_ONE_ARG): Do not use.
3104         * acinclude.m4 (GNUPG_FUNC_MKDIR_TAKES_ONE_ARG): Remove unused macro
3105         defs.
3106         (GNUPG_CHECK_FAQPROG): Ditto.
3107         (GNUPG_CHECK_DOCBOOK_TO_TEXI): Ditto.
3108         (GNUPG_CHECK_MLOCK): Ditto.
3109
3110         gpg: Do not use weak digest algos if selected by recipient prefs.
3111         + commit 15746d60d492f5792e4a179ab0a08801b4049695
3112         * g10/misc.c (is_weak_digest): New.
3113         (print_digest_algo_note): Use it here.
3114         * g10/sig-check.c (check_signature_end_simple): Use it.
3115         * g10/sign.c (hash_for): Do not use recipient_digest_algo if it is in
3116         the least of weak digest algorithm.
3117
3118 2020-11-02  Ingo Klöcker  <dev@ingo-kloecker.de>
3119
3120         gpg: Fix iteration over signatures.
3121         + commit b004701adca89ba85f75e12a4d284297147fe4f2
3122         * g10/keyedit.c (keyedit_quick_revsig): Take signature of correct node
3123
3124 2020-11-02  NIIBE Yutaka  <gniibe@fsij.org>
3125
3126         kbx: Don't put zero-byte for ECC.
3127         + commit 8211d0bc3ba5ed15d0668050c08a6e28228b08a4
3128         * kbx/keybox-openpgp.c (parse_key): Only put zero for non-ECC.
3129
3130         gpg: Fix debug output for key_check_all_keysigs with opaque MPI.
3131         + commit 90c3d623ce37695a1eb29c0a7276b23490d14603
3132         * g10/key-check.c (key_check_all_keysigs): Handle opaque MPI.
3133
3134         gpg: Fix check_signature2 for opaque MPI.
3135         + commit 029ba6dc961c683d6683c97667d3c0e103738aa4
3136         * g10/sig-check.c (check_signature2): Handle the case of opaque MPI.
3137
3138         gpg: Change the API for checksum to use const qualifier.
3139         + commit 21d8927f794bd901b13feaaac6d31d463349a64f
3140         * g10/main.h (checksum): Use const.
3141         * g10/misc.c (checksum): Use const.
3142
3143         gpg: Fix counting buffer size in check_signature2.
3144         + commit 3151210e455f14848921fac838a5064749258d9f
3145         * g10/sig-check.c (check_signature2): Use GCRYMPI_FMT_PGP.
3146
3147 2020-10-30  NIIBE Yutaka  <gniibe@fsij.org>
3148
3149         gpg: Fix SOS handling with libgcrypt version <= 1.8.
3150         + commit 813e24108a139c8059dad8bc679b2ab76b807ed9
3151         * g10/misc.c (checksum_mpi): Don't depend new feature
3152         of gcry_mpi_print which supports opaque MPI.
3153
3154         gpg: Fix first zero-byte case for SOS handling.
3155         + commit dd4fb1c8f668f78fbcf5052e80c5c40d4cdad20c
3156         * g10/export.c (transfer_format_to_openpgp): Check the first byte.
3157         * g10/pkglue.c (sexp_extract_param_sos): Likewise.
3158
3159 2020-10-28  Werner Koch  <wk@gnupg.org>
3160
3161         gpg: New command --quick-revoke-sig.
3162         + commit 243f9176e799b2328f2e5bed93099bfc474fdc5a
3163         * g10/gpg.c (enum cmd_and_opt_values): Add aQuickRevSig.
3164         (opts): Add --quick-revoke-sig.
3165         (main): Implement.
3166         * g10/keyedit.c (quick_find_keyblock): Add arg 'want_secret' and
3167         adjust all callers.
3168         (keyedit_quick_revsig): new.
3169         * g10/revoke.c (get_default_sig_revocation_reason): New.
3170         * g10/keylist.c (cmp_signodes): Make global.
3171
3172 2020-10-27  Werner Koch  <wk@gnupg.org>
3173
3174         gpg: Sort the signatures in standard key listings.
3175         + commit 742e2729f4bcadfeb93260107462f4faa108d3b2
3176         * g10/gpg.c (parse_list_options): Add "sort-sigs".
3177         (main): Make it the default.
3178         * g10/options.h (LIST_SORT_SIGS): New.
3179         * g10/keylist.c (cmp_signodes): New.
3180         (list_keyblock_print): Sort signatures and factor signature printing
3181         code out to ...
3182         (list_signature_print): new.
3183
3184 2020-10-27  NIIBE Yutaka  <gniibe@fsij.org>
3185
3186         scd: Handle canonical serialno and app specific serialno differently.
3187         + commit e59d2b3632d8c778bd2c4375a1c3ba9c786c4360
3188         * scd/app-common.h (card_get_serialno): Add IS_CANONICAL arg.
3189         * scd/app.c (app_send_devinfo): Use app specific serialno.
3190         (card_get_serialno): Support two different cases.
3191         (app_get_serialno): Return app specific serialno.
3192         (send_serialno_and_app_status): Return canonical serialno.
3193         * scd/command.c (cmd_serialno): Return app specific serialno.
3194         (cmd_learn): Return canonical serialno.
3195
3196 2020-10-26  Werner Koch  <wk@gnupg.org>
3197
3198         g10: Make call to agent_scd_serialno more robust.
3199         + commit 0f780b1aebb1b1bde219401735a1c24c1f0a7978
3200         * g10/call-agent.c (agent_scd_serialno): Make sure that NULL is stored
3201         on error at r_serialno.
3202         * g10/card-util.c (card_status): Simplify freeing of seriaono.
3203         (factory_reset): Ditto.
3204
3205 2020-10-26  NIIBE Yutaka  <gniibe@fsij.org>
3206
3207         scd: Flush the cache when writing cert data object.
3208         + commit 8264b10d33e46d2caac2f2c38ccb5f764c31ad77
3209         * scd/app-piv.c (do_writecert): Flush the cache of the data object.
3210
3211         gpg: Fix double free on error.
3212         + commit a153d0f7691486efe0aadfb1e226544ae6d20ffd
3213         * g10/card-util.c (card_status): Check an error return.
3214
3215         gpg,tools: Fix detecting OpenPGP card by serialno.
3216         + commit 157f1de64e437cecd75335e9f4077ba9835e3da0
3217         * tools/gpg-card.c (list_openpgp): Use ->apptype to determine card's
3218         APP.
3219         * g10/card-util.c (get_info_for_key_operation): Likewise.
3220         (current_card_status): Even if its SERIALNO is not like OpenPGP card,
3221         it's OpenPGP card when app says so.
3222
3223         scd: Internal CCID driver thing only for SPR532.
3224         + commit 31def32eeed8cff705ca827e4bbc0bfcc80c512f
3225         * scd/ccid-driver.c (ccid_vendor_specific_setup): New.  Limit
3226         only for SPR532, excluding other readers by SCM.
3227         (ccid_slot_status): Use ccid_vendor_specific_setup.
3228
3229 2020-10-24  NIIBE Yutaka  <gniibe@fsij.org>
3230
3231         scd: Internal CCID driver limiting only for SPR532.
3232         + commit 3c6b5dfa2a2379a5f5eaa052f7dbc73462097425
3233         * scd/ccid-driver.c (ccid_vendor_specific_init): Only do that for
3234         SPR532.
3235
3236 2020-10-23  Werner Koch  <wk@gnupg.org>
3237
3238         common: Allow building with released libgpg-error.
3239         + commit 32f336d9555f18464d72a5068c290ab82ee92617
3240         * common/sysutils.c (gnupg_access) [W32]: Fix for older libgpgrt.
3241
3242 2020-10-23  NIIBE Yutaka  <gniibe@fsij.org>
3243
3244         scd: Handle Yubikey's multiple apps and serialno.
3245         + commit 2d4de4b6f06c87cd0f72b2a0d09950e1b50841b2
3246         * scd/app-common.h (yubikey_get_serialno): New.
3247         * scd/app-openpgp.c (yubikey_get_serialno): New.
3248         * scd/app.c (card_get_serialno): Use OpenPGP app's serialno,
3249         when it's enabled for Yubikey.
3250         (send_serialno_and_app_status): Use card_get_serialno, not
3251         directly accessing ->serialno.
3252
3253         scd: Use app_get_serialno for app_getattr.
3254         + commit c8cc35dd2c106d91a793667690c0b200560d5d2d
3255         * scd/app.c (app_getattr): Use app_get_serialno.
3256
3257         scd: Don't overwrite serialno for Yubikey.
3258         + commit 65c91e601ae93aee1a5fa399d4a5d4498ad76eda
3259         * scd/app-openpgp.c (app_select_openpgp): Keep ->serialno.
3260
3261         scd,openpgp: Use app_get_serialno function to get SERIALNO.
3262         + commit 41505f0ae544535b524a409d87aa2540607fc9a4
3263         * scd/app-openpgp.c (check_keyidstr): Don't directly access
3264         app->serialno, but use app_get_serialno.
3265         (do_with_keygrip): Likewise.
3266
3267 2020-10-21  Werner Koch  <wk@gnupg.org>
3268
3269         common: New functions gnupg_opendir et al.
3270         + commit 7e22e08e2ab09cd3c2317f5e80e8ee47d46eff4b
3271         * common/sysutils.h (struct gnupg_dirent_s): New.
3272         * common/sysutils.c: Include dirent.h.
3273         (struct gnupg_dir_s): New.
3274         (gnupg_opendir, gnupg_readdir, gnupg_closedir): New.  Change all
3275         callers of opendir, readdir, and closedir to use these functions.
3276
3277         w32: Make gnupg_remove and gnupg_rename_file Unicode aware.
3278         + commit 9a0197b6fe412cfc66b0cece521267180e454416
3279         * common/sysutils.c (w32_rename): New.
3280         (gnupg_rename_file) [W32]: Support Unicode.
3281         (gnupg_remove) [W32]: Support Unicode.  Drop Windows-CE support.
3282
3283 2020-10-20  Werner Koch  <wk@gnupg.org>
3284
3285         Replace all calls to stat by gnupg_stat.
3286         + commit 18e5dd7b03ced51611c9ba1345cf498a0aaf14a6
3287         * common/sysutils.c (gnupg_stat): New.
3288         * common/sysutils.h: Include sys/stat.h.
3289
3290         Replace most calls to open by a new wrapper.
3291         + commit 4dcef0e17836e8725c31a3b76f2bf7144345c808
3292         * common/sysutils.c (any8bitchar) [W32]: New.
3293         (gnupg_open): New.  Replace most calls to open by this.
3294         * common/iobuf.c (any8bitchar) [W32]: New.
3295         (direct_open) [W32]: Use CreateFileW if needed.
3296
3297         w32: Allow Unicode filenames for dotlock.
3298         + commit b47c355b18d9537ccc3dd3e80cc1825b018ecff7
3299         * common/dotlock.c (any8bitchar) [W32]: New.
3300         (dotlock_create_w32): Use strconcat and CreateFileW.
3301
3302         * common/t-dotlock.c: Source include dotlock.c and modify to allow
3303         manual testing on Windows.
3304
3305         Replace all calls to access by gnupg_access.
3306         + commit c94ee1386e0d5cdac51086c4d5b92de59c09c9b5
3307         * common/sysutils.c (gnupg_access): New.  Replace all calls to access
3308         by this wrapper.
3309         * common/homedir.c (w32_shgetfolderpath): Change to return UTF-8
3310         directory name.
3311         (standard_homedir): Adjust for change.
3312         (w32_commondir, gnupg_cachedir): Ditto.
3313
3314 2020-10-09  NIIBE Yutaka  <gniibe@fsij.org>
3315
3316         gpg,ecc: Fix SOS handling when receiving from agent.
3317         + commit 228836f79f64559c9582ac2d475e50af57684bf8
3318         * g10/export.c (transfer_format_to_openpgp): It's not simple opaque
3319         MPI, but SOS.
3320
3321         agent: Fix SEGV when debuging for cache enabled.
3322         + commit 33cb1655f1b7c597d1ebdcb38447648477e6ac9f
3323         * agent/cache.c (agent_get_cache): Avoid dereferencing NULL.
3324
3325 2020-10-05  Werner Koch  <wk@gnupg.org>
3326
3327         gpgsm: Fix detection of too old keyboxd.
3328         + commit 4eb9ce847825e8c6a07ce27d303c56233e85d007
3329         * sm/keydb.c (warn_version_mismatch): Add arg ctrl and pass on.
3330         (create_new_context): Pass ctrl to warn function.
3331
3332         dirmngr: Minor cleanup for better readability.
3333         + commit b258f8de7e9fc436d72c4d4ff8f98e9b86d2f3f5
3334         * dirmngr/ldap.c (start_default_fetch_ldap): Rename to
3335         start_cacert_fetch_ldap and remove arg attr.  Instead use
3336         "cACertificate" directly.
3337         * dirmngr/crlfetch.c (ca_cert_fetch): Change the only caller.
3338         (start_cert_fetch_ldap): Rename arg for clarity.
3339
3340         dirmngr: Add warning on the use of --add-servers.
3341         + commit 210575d8826ea61e4914e4b61eff7b875c972b85
3342         * tools/gpgconf-comp.c (known_options_dirmngr): Degrade add-servers to
3343         expert mode.
3344
3345         gpg: Switch to ed25519+cv25519 as default algo.
3346         + commit ff31dde456f32950f0df6c974b4c41f1d650d68f
3347         * g10/keygen.c (DEFAULT_STD_KEY_PARAM): Change to former future
3348         default ago.
3349         (ask_algo): Change default and also the way we indicate the default
3350         algo in the list of algos.
3351         (ask_curve): Indicate the default curve.
3352
3353         keyboxd: Fix duplicates when listing keys by uid.
3354         + commit 194034f813a09a0021e6aa82d64ea0693b37c8d0
3355         * kbx/backend-sqlite.c (struct be_sqlite_local_s): Add fields
3356         lastubid_valid and lastubid.
3357         (run_sql_prepare): Add optional extra2 arg and chage callers.
3358         (run_select_statement): Add an ORDER BY clause to most SELECTs.
3359         (be_sqlite_search): Skip duplicated keyblocks in a search.
3360
3361 2020-10-04  Werner Koch  <wk@gnupg.org>
3362
3363         build: Fix SENDMAIL define for a PATH with spaces.
3364         + commit 6c36b8bb23bb033aaae5f1dff3b38d8e0e44717c
3365         * configure.ac: Fix use of $PATH
3366
3367         (cherry picked from commit 77e416741abb0a871733bd46cbc81329859de96e)
3368
3369 2020-10-02  Werner Koch  <wk@gnupg.org>
3370
3371         gpgconf: New option --show-versions.
3372         + commit 357ad9ae29677c1676b56d2b81282e2f78ec8040
3373         * tools/gpgconf.c: Include exechelp.h.  New option --show-versions.
3374         (get_revision_from_blurb): New.
3375         (show_version_gnupg): New.
3376         (show_version_libgcrypt): New.
3377         (show_version_gpgrt): New.
3378         (show_versions_via_dirmngr): New.
3379         (show_versions): New.
3380         * tools/gpgconf-comp.c (GPGNAME): Remove unused macro.
3381         * dirmngr/dirmngr.c (main): New internal option --gpgconf-versions.
3382         (get_revision_from_blurb): New.
3383         (gpgconf_versions): New.
3384
3385         w32: Silence warning due to recent change of split_fields.
3386         + commit 371228a244232f2b74181e0aa3c44d698df840ce
3387         * common/compliance.c (gnupg_rng_is_compliant): Make fields const.
3388
3389         gpg: Fix parameter parsing form ed448.
3390         + commit e824e27d36021a868c855244d22c7d40a88a396e
3391         * g10/keygen.c (parse_key_parameter_part): Set algo also for 448.
3392
3393 2020-10-01  Andre Heinecke  <aheinecke@gnupg.org>
3394
3395         doc: Remove enable-extended-key-format in vsnfd.
3396         + commit d84862cf109c75ae30ed5e2531b4554083c6a558
3397         * doc/examples/vsnfd.prf: Remove enable-extended-key-format
3398
3399 2020-09-30  NIIBE Yutaka  <gniibe@fsij.org>
3400
3401         scd: Internal CCID driver: More fix for SPR532.
3402         + commit 920f258eb6018ecec1d63bad6a0fb0772f72affa
3403         * scd/ccid-driver.c (bulk_in): Handle the case of missing intr_cb.
3404
3405         scd: Report any error for LEARN command.
3406         + commit 862d9c6face9b4ad61f6e59bf1ba9b5f5d05c58c
3407         * scd/app-openpgp.c (do_learn_status): Report any error.
3408
3409 2020-09-29  NIIBE Yutaka  <gniibe@fsij.org>
3410
3411         scd: Internal CCID driver fix.
3412         + commit 1444203ca32ccfa4bd5097d2d49565c4055c620b
3413         * scd/ccid-driver.c (intr_cb): More useful debug output.
3414         (ccid_slot_status): Remove redundant condition.
3415
3416         scd: Internal CCID driver: Call libusb_clear_halt at ccid_setup_intr.
3417         + commit 6af978713e4c69d7814f47e709f1dfb3fe9076d1
3418         * scd/ccid-driver.c (ccid_setup_intr): Reset the endpoint.
3419         (ccid_vendor_specific_init): Don't call libusb_clear_halt.
3420
3421 2020-09-28  NIIBE Yutaka  <gniibe@fsij.org>
3422
3423         scd: Internal CCID driver: Fix a failure path.
3424         + commit d561c936a217627bc29aac628a8d01f7003dcd28
3425         * scd/ccid-driver.c (ccid_open_usb_reader): On error, call
3426         libusb_release_interface.
3427
3428         scd: Internal CCID: Handle LIBUSB_ERROR_TIMEOUT at ccid_get_atr.
3429         + commit b1e8072320c19246962beb6d67dc5784b5a72364
3430         * scd/ccid-driver.c (ccid_slot_status): Handle LIBUSB_ERROR_TIMEOUT.
3431
3432         scd: Internal CCID: Clear the handle after use.
3433         + commit c5e8ef3ab980012b64f5894f437e2ff568b02f43
3434         * scd/apdu.c (close_ccid_reader): Clear the handle.
3435         (open_ccid_reader): Likewise.
3436
3437         scd: Change handling of SPR532 card reader.
3438         + commit 684a52dffa8b7f79b26fe53b3ab10d7748a8fb37
3439         * scd/ccid-driver.c (ccid_vendor_specific_init): Put some workaround
3440         for SPR532 initialization.
3441         (ccid_slot_status): Send ESCape command after GetSlotStatus.
3442
3443 2020-09-25  Werner Koch  <wk@gnupg.org>
3444
3445         keyboxd: Make use of the config table.
3446         + commit f8fbd9e7346ee0c3b09271ec2cdb589282eae1c9
3447         * kbx/backend-sqlite.c (DATABASE_VERSION): New.
3448         (table_definitions): Make column name of table config unique.
3449         (create_or_open_database): Read and set the database version.
3450         (get_config_value, set_config_value): New.
3451
3452 2020-09-25  NIIBE Yutaka  <gniibe@fsij.org>
3453
3454         scd: For PC/SC, send the ESC command at init for SPR532 reader.
3455         + commit 93e3c97889120dd17d79b7c8dd04293553785c9b
3456         * scd/apdu.c (struct reader_table_s): Remove is_spr532.
3457         (pcsc_vendor_specific_init): Send the ESC command for SPR532.
3458         (pcsc_pinpad_verify, pcsc_pinpad_modify): Remove no_lc hack.
3459
3460         scd: For SPR532, submit the ESCape command at initialization.
3461         + commit 4fae55f8ee11b3f710524e5e8b8a91b159949f2d
3462         * scd/ccid-driver.c (ccid_vendor_specific_init): Submit the ESC
3463         command for VENDOR_SCM.
3464         (ccid_transceive_secure): Don't submit the ESC command every time.
3465
3466 2020-09-24  Werner Koch  <wk@gnupg.org>
3467
3468         gpg: New experimental import option "bulk-import"
3469         + commit d49a945b12d98fadd0d37f4e50b5e02799e16305
3470         * g10/options.h (IMPORT_BULK): New.
3471         * g10/import.c (parse_import_options): Add "bulk-import".
3472         * g10/call-keyboxd.c (in_transaction): New var.
3473         (gpg_keyboxd_deinit_session_data): Run a commit if in bulk import
3474         mode.
3475         (create_new_context): Run a begin transaction if in bulk import mode.
3476
3477         keyboxd: New command TRANSACTION.
3478         + commit c2b14f5d6852fb9efaca8aeec7961e9d036203e8
3479         * kbx/backend-sqlite.c (be_sqlite_rollback): New.
3480         (be_sqlite_commit): New.
3481         (be_sqlite_search): Take care of global transactions.
3482         (be_sqlite_store): Ditto.
3483         (be_sqlite_delete): Ditto.
3484         * kbx/frontend.c (kbxd_rollback, kbxd_commit): New.
3485         * kbx/keyboxd.h (opt): Add vars for transactions.
3486         * kbx/kbxserver.c (struct server_local_s): Add fields next_session and
3487         client_pid.
3488         (session_list): New var.
3489         (cmd_transaction): New.
3490         (register_commands): Register command.
3491         (kbxd_start_command_handler): Store pids and track sessions.  Do a
3492         final rollback.
3493
3494         tests: Integrate --use-keyboxd into the OpenPGP test suite.
3495         + commit b19a60c6f7e892635db9e22499a7a44087c86c41
3496         * tests/openpgp/all-tests.scm (all-tests): Replace extended-key-format
3497         mode with a new keyboxd mode.
3498         * tests/openpgp/defs.scm (create-gpghome): Ditto.
3499         * tests/openpgp/gpgv.scm: Adjust for keyboxd mode.
3500         * tests/openpgp/issue2419.scm: Fix to allow setting a log-file into
3501         gpg.conf for debugging.
3502
3503         keyboxd: Implement multiple search descriptions.
3504         + commit 25ad3c22d79d06c16a5fc652b0a6e3ffd99ad2b6
3505         * kbx/kbx-client-util.c (kbx_client_data_simple): New.
3506         * kbx/backend-sqlite.c (struct be_sqlite_local_s): Add field descidx.
3507         (be_sqlite_search): Use that.
3508         * g10/call-keyboxd.c (keydb_search): Implement multi mode.
3509
3510         keyboxd: Fix UDPATE keyblob SQL statement.
3511         + commit 1f89d50537b3b16165e921df60734ce6203650cb
3512         * kbx/backend-sqlite.c: Always use ?NNN for SQL parameters.
3513
3514         tests: Fix convenience function to run gpg.
3515         + commit 97798eec4b77470b3aecdbee9729fa76b8550dfe
3516         * tests/openpgp/defs.scm (pipe:gpg): Remove stray dash.
3517
3518         keyboxd: Remove unused variables.
3519         + commit 0ac003b4576392ca3e930304a98bbf8183ab5f8b
3520         * kbx/kbx-client-util.c (datastream_thread): No need to set PK_NO and
3521         UID_NO.
3522
3523         keyboxd: Integrate into gpgconf.
3524         + commit acaeba2dbdb9bbd68a823c671d5c3577fef5d26d
3525         * common/asshelp.c (lock_spawning): Use a dedicated name for keyboxd.
3526         * common/homedir.c (keyboxd_socket_name): New.
3527         (gnupg_module_name): Put keyboxd into libexecdir.
3528         * tools/gpgconf-comp.c (known_options_keyboxd): New.
3529         (gc_component): Add entry for keyboxd.
3530         (keyboxd_runtime_change): New.
3531         (gc_component_launch): Support keyboxd.
3532         * tools/gpgconf.c (list_dirs): Emit new item keyboxd-socket.
3533         (main): Also remove keyboxd socket.
3534
3535 2020-09-24  NIIBE Yutaka  <gniibe@fsij.org>
3536
3537         scd: Fix CCID internal driver for interrupt transfer.
3538         + commit 7cbb513a2dc150a90a30c53316970df2a439d494
3539         * scd/ccid-driver.c (intr_cb): Handle the case of multiple messages.
3540
3541 2020-09-22  Werner Koch  <wk@gnupg.org>
3542
3543         gpg: Set the found-by flags in the keyblock in keyboxd mode.
3544         + commit 183509756179fadd95d1cc740047b94dc16bb279
3545         * g10/keydb-private.h (struct keydb_handle_s): Add fields to return
3546         the ordinals of the last found blob.
3547         * g10/call-keyboxd.c (keydb_get_keyblock): Pass them to the keyblock
3548         parser.
3549
3550         sm: Fix returning of the ephemeral flag in keyboxd mode.
3551         + commit b810320b1bf76209dc1087cb91ca34232d9268c3
3552         * sm/keydb.c (search_status_cb): Skip over the ubid.
3553
3554         common: Fix name of keyboxd.
3555         + commit c81a7b09368a474de4e3572fbb527d1597408ab1
3556         * common/homedir.c (gnupg_module_name): Fix name.
3557
3558         keyboxd: Extend PUBKEY_INFO status line with an uid ordinal.
3559         + commit 0e892bda4e0bf9db9116d7d5585d4e7b0d2eae57
3560         * kbx/backend-sqlite.c (table_definitions): Add column UINO to
3561         userids.
3562         (be_sqlite_local_s): Add fields select_col_uidno and
3563         select_col_subkey.
3564         (run_select_statement): Also select subkey or uidno column.
3565         (be_sqlite_search): Return their values.
3566         (store_into_userid): Store the UIDNO.
3567         * kbx/backend-support.c (be_return_pubkey): Extend PUBKEY_INFO.
3568
3569         kbx: Add bounds check to detect corrupt keyboxes.
3570         + commit e0a312bfd646485ae8a0ae5e26720fc1667c5490
3571         * kbx/keybox-dump.c (_keybox_dump_blob): Fix the fixmes.
3572
3573 2020-09-21  Werner Koch  <wk@gnupg.org>
3574
3575         scd: Extend KEYPAIRINFO with an algorithm string.
3576         + commit 26da47ae53d51e16ae6867cd419ddbf124a94933
3577         * scd/app-openpgp.c (send_keypair_info): Emit the algo string as part
3578         of a KEYPAIRINFO.
3579         * scd/command.c (do_readkey): Ditto.
3580         * scd/app-piv.c (do_readkey): Ditto.
3581         * scd/app-nks.c (do_learn_status_core): Ditto.
3582         (struct fid_cache_s): Add field algostr.
3583         (flush_fid_cache): Release it.
3584         (keygripstr_from_pk_file): Fill it and add it to the cache.  Use a
3585         single exit label.
3586         * scd/app-help.c (app_help_get_keygrip_string_pk): Add new arg
3587         r_algostr.  Change all callers.
3588
3589         sm: Implement delete key in keyboxd mode.
3590         + commit c772770574ea2d337f8745ff304b1b8acd8a2e4c
3591         * sm/keydb.c (keydb_delete): Implement keyboxd mode.
3592         (keydb_update_cert): Disable unused function.
3593         * kbx/backend-sqlite.c (be_sqlite_delete): Delete from issuer.
3594
3595 2020-09-18  NIIBE Yutaka  <gniibe@fsij.org>
3596
3597         agent: Fix regression for access through the extra secket.
3598         + commit 8a84a71f3a58a3e943f238b70743cd6408477eba
3599         * agent/command.c (cmd_keyinfo): Allow KEYINFO command for one key.
3600         (cmd_scd): Allow SCD command to invoke GETINFO, GETATTR, and
3601         KEYINFO --list=encr sub commands.
3602
3603         common,agent,dirmngr,g10,tools: Fix split_fields API.
3604         + commit dfdcf14738976c6b236f4fa1c3b68af351024b3c
3605         * common/stringhelp.h (split_fields): Use const * for the strings in
3606         the ARRAY.
3607         (split_fields_colon): Likewise.
3608         * common/stringhelp.c (split_fields, split_fields_colon): Fix
3609         the implementation.
3610         * agent/call-scd.c, agent/command.c: Follow the change.
3611         * common/t-stringhelp.c, dirmngr/loadswdb.c: Likewise.
3612         * g10/call-agent.c, tools/card-call-scd.c: Likewise.
3613         * tools/card-yubikey.c, tools/gpg-card.c: Likewise.
3614         * tools/gpg-card.h, tools/gpg-wks-client.c: Likewise.
3615         * tools/gpgconf-comp.c, tools/gpgconf.c: Likewise.
3616         * tools/wks-util.c: Likewise.
3617
3618 2020-09-16  NIIBE Yutaka  <gniibe@fsij.org>
3619
3620         scd: Clear PIN cache when changing key attributes.
3621         + commit 8ff36630277f05fbe4e43c7d757eb90da8645e3f
3622         * scd/app-openpgp.c (change_keyattr): Clear all PINs.
3623
3624         scd: Clear caching PIN at KDF setup.
3625         + commit f4c07fc3d3c32e96d4306f6daa60b6de7fba7dc5
3626         * scd/app-openpgp.c (do_setattr): Clear PINs.
3627
3628         scd: Add better support for KDF feature.
3629         + commit 316a8cbc7523560d999e46eb524165db11682210
3630         * scd/app-openpgp.c (do_setattr): Handle kdf-seup "off" for Gnuk.
3631
3632         gpg,scd: Fix handling of KDF feature.
3633         + commit 8dfd0ebfd8cf2b6bcecbd91c8f7fad6db583aa5a
3634         * g10/card-util.c (kdf_setup): Fix the default value.
3635         * scd/app-openpgp.c (do_setattr): Support kdf-setup "off" by
3636         Zeitcontrol.  Make sure Gnuk and Yubikey work well.
3637
3638 2020-09-15  NIIBE Yutaka  <gniibe@fsij.org>
3639
3640         scd: Fix the use case of verify_chv2 by CHECKPIN.
3641         + commit 6e51f2044aebb885ea81dae259db1b7f477b1c44
3642         * scd/app-openpgp.c (verify_chv2): Call verify_a_chv with chvno=1
3643         when needed.
3644
3645 2020-09-11  Werner Koch  <wk@gnupg.org>
3646
3647         scd:piv: Avoid conflict when writing a cert.
3648         + commit fbc1b199fdc8fd9a4ab422f005b4eb521b594c5c
3649         * scd/app-piv.c (map_curve_name_to_oid): New.
3650         (my_cmp_public_key): New.
3651         (do_writecert): Replace simple memcmp by cmp_canon_sexp.
3652
3653         common: New function cmp_canon_sexp.
3654         + commit b6ba6a79ce9336f1b53f16f3d1190dd009fb166e
3655         * common/sexputil.c (cmp_canon_sexp): New.
3656         (cmp_canon_sexp_def_tcmp): New.
3657         * common/t-sexputil.c (test_cmp_canon_sexp): Add a simple test.
3658
3659         keyboxd: Implement lookup by short and long keyid.
3660         + commit 9a94db1f662a1c5973b57b25e25aeab1bc33250e
3661         * kbx/backend-sqlite.c: Change definition of column KID.
3662         (kid_from_mem): Remove.
3663         (kid_from_u32): Rewrite.
3664         (run_sql_bind_int64): Remove.
3665         (run_select_statement): Implement lookup by short keyid.  Fix lookup
3666         by long keyid.
3667         (store_into_fingerprint): Adjust kid arg.
3668
3669         keyboxd: Add ephemeral and revoked flag to the sqlite backend.
3670         + commit 616c60d93dfab27dde00e1489c6c51340ec93b6c
3671         * kbx/backend-support.c (be_return_pubkey): Add args is_ephemeral and
3672         is_revoked.  Adjust callers.
3673         * kbx/backend-sqlite.c: Alter table pubkey to add new columns.
3674         (run_select_statement): Add new column to all selects.
3675         (be_sqlite_search): Return the new flags.
3676
3677 2020-09-10  Andre Heinecke  <aheinecke@gnupg.org>
3678
3679         doc: Update and extend module overview.
3680         + commit d62797ebcc15ffac52664fe08759d18a92491ddc
3681         * doc/gnupg-module-overview.svg: Add examples of GPGME aware
3682         applications
3683
3684 2020-09-10  Werner Koch  <wk@gnupg.org>
3685
3686         sm: Implement initial support for keyboxd.
3687         + commit ed6ebb696e4063dc664d7ee74fc492025881c459
3688         * sm/gpgsm.h (MAX_FINGERPRINT_LEN): New.
3689         * sm/keydb.c (struct keydb_local_s): Change definition of
3690         search_result.
3691         (keydb_get_cert): Implement keyboxd mode.
3692         (keydb_get_flags): Temporary hack for keyboxd mode.  Needs to be
3693         fixed.
3694         (struct store_parm_s, store_inq_cb): New.
3695         (keydb_insert_cert): Implement keyboxd mode.
3696         (keydb_locate_writable): Make static.
3697         (keydb_search_reset): Implement keyboxd mode.
3698         (search_status_cb): New.
3699         (keydb_search): Implement keyboxd mode. Replace return code -1 by
3700         GPG_ERR_NOT_FOUND.
3701         (keydb_set_cert_flags): Replace return code -1 by GPG_ERR_NOT_FOUND.
3702         * sm/keylist.c (list_cert_colon): Adjust for replacement of -1 by
3703         GPG_ERR_NOT_FOUND.
3704         (list_internal_keys): Ditto.
3705         * sm/sign.c (add_certificate_list): Ditto.
3706         * sm/certchain.c (find_up_search_by_keyid): Ditto.
3707         (find_up_external, find_up, find_up_dirmngr): Ditto.
3708         (gpgsm_walk_cert_chain): Ditto.
3709         (get_regtp_ca_info): Ditto.
3710         * sm/certlist.c (gpgsm_add_to_certlist): Ditto.
3711         (gpgsm_find_cert): Ditto.
3712         * sm/delete.c (delete_one): Ditto.
3713         * sm/export.c (gpgsm_export): Ditto.
3714         (gpgsm_p12_export): Ditto.
3715         * sm/import.c (gpgsm_import_files): Ditto.
3716
3717         keyboxd: Add basic support for X.509.
3718         + commit c9677d416e6ff190c589af35b514a01a787085fb
3719         * kbx/keybox-blob.c (x509_email_kludge): Rename to ...
3720         (_keybox_x509_email_kludge): this and make global.
3721         * kbx/backend.h: Include ksba.h.
3722         * kbx/backend-support.c (be_get_x509_serial): New.
3723         (be_get_x509_keygrip): New.
3724         * kbx/backend-sqlite.c (table_definitions): New table 'issuers'.
3725         (run_select_statement): Implements modes ISSUER, ISSUER_SN, SUBJECT.
3726         (store_into_userid): Add arg override_mbox.
3727         (store_into_issuer): New.
3728         (be_sqlite_store): Implement x509 part.
3729
3730         keyboxd: Use D-lines instead of a separate thread.
3731         + commit 6fcc263c182fc49d9ba2d1bd7649b4af1e9f3e3a
3732         * kbx/kbx-client-util.c (kbx_client_data_new): Add arg 'dlines'.
3733         * g10/call-keyboxd.c (open_context): Set DLINES to true.
3734         * sm/keydb.c (open_context): Ditto.
3735
3736         keyboxd: Add options --openpgp and --x509 to SEARCH.
3737         + commit 29977e21d18188e16e50fee95a95e05fdbd97caf
3738         * kbx/keyboxd.h (struct server_control_s): Replace the two request
3739         objects by just one.  Add filter flags.
3740         * kbx/kbxserver.c (cmd_search): Add options --openpgp and --x509.
3741         (cmd_killkeyboxd): Do not return GPG_ERR_EOF.
3742         * kbx/frontend.c (kbxd_release_session_info): Adjust for the new
3743         request object.
3744         (kbxd_search, kbxd_store, kbxd_delete): Ditto.
3745         * kbx/backend-sqlite.c (struct be_sqlite_local_s): Add filter flags.
3746         (run_sql_prepare): Add optional arg 'extra'.  Change callers.
3747         (run_sql_bind_ntext): New.
3748         (run_sql_bind_text): Just call run_sql_bind_ntext.
3749         (run_select_statement): Add ctrl arg.  Implement the filter flags.
3750
3751         * g10/call-keyboxd.c (keydb_search): Use the --openpgp option.
3752
3753         gpg-connect-agent: Catch signals so that SIGPIPE is ignored.
3754         + commit 3cf9bb4d73cfe78d3d48734e7c8a65d9a98112a5
3755         * dirmngr/server.c (cmd_killdirmngr): Return 0.
3756         * tools/gpg-connect-agent.c (main): Catch signals.
3757
3758         dirmngr: Fix the pool keyserver case for a single host in the pool.
3759         + commit 5a87011c46b5b01659c3cbc3c7a04da94ae5ca9e
3760         * dirmngr/ks-engine-hkp.c (map_host): Set R_HOSTNAME also for
3761         localhost and if there is no pool.
3762
3763         dirmngr: Align the gnutls use of CAs with the ntbtls code.
3764         + commit faabc49797df43c4904b6230f83e8c6677e88b22
3765         * dirmngr/http.c (http_session_new) <gnutls>: Use only the special
3766         pool certificate for the default keyserver.
3767
3768 2020-09-10  NIIBE Yutaka  <gniibe@fsij.org>
3769
3770         scd: Flush KDF DO (0x00F9) when it's being set.
3771         + commit d4cb774ddd8830836c9c87a90db01f749ac8d67c
3772         * scd/app-openpgp.c (do_setattr): Call flush_cache_item always.
3773
3774 2020-09-09  Werner Koch  <wk@gnupg.org>
3775
3776         agent: Keep some permissions of private-keys-v1.d.
3777         + commit 8ed85ef3de9cdeee86e281a8b46be1bd49a36e7a
3778         * common/sysutils.c (modestr_to_mode): Re-implement.
3779         (gnupg_chmod): Support keeping of permissions.
3780
3781         kbx: Change X.509 S/N search definition.
3782         + commit adec6a84f6ee176764391da358ae150f92b1f1e4
3783         * kbx/keybox-search-desc.h (struct keydb_search_desc): Do not overload
3784         SNLLEN with a hex flag.  Add SNHEX.
3785         * kbx/keybox-search.c (keybox_search): Adjust.
3786         * common/userids.c (classify_user_id): Adjust.
3787         * sm/keydb.c (keydb_search_desc_dump): Adjust.
3788         * g10/keydb.c (keydb_search_desc_dump): Adjust.
3789
3790 2020-09-08  NIIBE Yutaka  <gniibe@fsij.org>
3791
3792         gpg,tools: Add handling of supported algorithms by a card.
3793         + commit 2bc1ec294422504e2d2e5d20716aba68f1c2b0d7
3794         * g10/call-agent.h (struct agent_card_info_s): Add supported_keyalgo.
3795         * g10/call-agent.c (learn_status_cb): Parse KEY-ATTR-INFO.
3796         (agent_release_card_info): Release supported_keyalgo.
3797         * tools/gpg-card.h (struct card_info_s): Add supported_keyalgo.
3798         * tools/card-call-scd.c (learn_status_cb): Parse KEY-ATTR-INFO.
3799         (release_card_info): Release supported_keyalgo.
3800
3801         scd: Add a workaround for Yubikey.
3802         + commit 0db9c83555b4a8a0c52f96e96ec20dbfd3d75272
3803         * scd/app-openpgp.c (get_public_key): Handle wrong code for Yubikey.
3804
3805 2020-09-07  NIIBE Yutaka  <gniibe@fsij.org>
3806
3807         scd: Fix handling 0x00FA to support OpenPGP card 3.4.
3808         + commit 270c49b8c6eaf99df7b417f9d0e45eba0acfb423
3809         * scd/app-openpgp.c (data_objects): It may be longer.
3810
3811 2020-09-04  Werner Koch  <wk@gnupg.org>
3812
3813         gpg: Initialize a parameter to silence valgrind.
3814         + commit 65eb1569809a3c42e8afb064f6194fac2e34a03a
3815         * g10/keygen.c (read_parameter_file): Initialize nline.
3816         * g10/textfilter.c (copy_clearsig_text): Initialize bufsize.
3817
3818 2020-09-04  NIIBE Yutaka  <gniibe@fsij.org>
3819
3820         scd: Support GET DATA response with no header for DO 0x00FA.
3821         + commit 43bbc25b0f57dec24412886ff46041e0b1f3de26
3822         * scd/app-openpgp.c (do_getattr): Support Gnuk, as well.
3823
3824         scd: Parse "Algorithm Information" data object in scdaemon.
3825         + commit eba2563dabbb4f61537900289fbe3ae113904733
3826         * scd/app-openpgp.c (data_objects): 0x00FA for binary data.
3827         (do_getattr): Parse the data and send it in status lines.
3828         (get_algorithm_attribute_string): New.
3829
3830 2020-09-03  Werner Koch  <wk@gnupg.org>
3831
3832         sm: New options to prepare the use of keyboxd.
3833         + commit 046f419f806036248c058c4bd44368f8596287b7
3834         * sm/Makefile.am (AM_CFLAGS): Add npth flags.
3835         (common_libs): Use npth version of the lib.
3836         (gpgsm_LDADD): Add npth libs.
3837         * sm/gpgsm.c (oUseKeyboxd, oKeyboxdProgram): New.
3838         (opts): New options --use-keyboxd and --keyboxd-program.
3839         (main): Set them.
3840         (gpgsm_deinit_default_ctrl): New.
3841         (main): Call it.
3842         * sm/server.c (gpgsm_server): Ditto.
3843         * sm/gpgsm.h (opt): Add fields use_keyboxd and keyboxd_program.
3844         (keydb_local_s): New type.
3845         (struct server_control_s): Add field keybd_local.
3846         * sm/keydb.c: Include assuan.h, asshelp.h, and kbx-client-util.h.
3847         (struct keydb_local_s): New.
3848         (struct keydb_handle): Add fields for keyboxd use.
3849         (gpgsm_keydb_deinit_session_data): New.
3850         (warn_version_mismatch): New.
3851         (create_new_context): New.
3852         (open_context): New.
3853         (keydb_new): Implement keyboxd mode.
3854         (keydb_release): Ditto.
3855         (keydb_get_resource_name): Ditto.
3856
3857         * sm/keydb.c: Add stub support for all other functions.
3858
3859         sm: Add arg ctrl to keydb_new.
3860         + commit a7d006293ec84532cc1972cd2f990198eadf1a1a
3861         * sm/keydb.c (keydb_new): Add arg and change all callers.
3862
3863 2020-09-03  NIIBE Yutaka  <gniibe@fsij.org>
3864
3865         scd: Add handling of "Algorithm Information" DO.
3866         + commit 90d0072165cc5c6888f14462392a211de0c4b232
3867         * cd/app-openpgp.c (data_objects): Add 0x00FA.
3868         (do_getattr): Add KEY-ATTR-INFO.
3869
3870 2020-09-02  Werner Koch  <wk@gnupg.org>
3871
3872         gpg: Fix segv importing certain keys.
3873         + commit 8ec9573e57866dda5efb4677d4454161517484bc
3874         * g10/key-check.c (key_check_all_keysigs): Initialize issuer.
3875
3876         keyboxd: Restructure client access code.
3877         + commit 497db0b5bcd688c4e2144ba167bd2ac485069d1b
3878         * kbx/kbx-client-util.c: New.
3879         * kbx/kbx-client-util.h: New.
3880         * kbx/Makefile.am (client_sources): New.
3881         * g10/keydb.c (parse_keyblock_image): Rename to keydb_parse_keyblock
3882         and make global.
3883         * g10/call-keyboxd.c: Include kbx-client-util.h.
3884         (struct keyboxd_local_s): Remove struct datastream.  Add field kcd.
3885         Remove per_session_init_done.
3886         (lock_datastream, unlock_datastream): Remove.
3887         (prepare_data_pipe, datastream_thread): Remove.
3888         (keydb_get_keyblock_do_parse): Remove.
3889         (gpg_keyboxd_deinit_session_data): Release the KCD object.
3890         (open_context): Use of kbx_client_data_new.
3891         (keydb_get_keyblock): Simplify.
3892         (keydb_search): Use kbx_client_data_cmd and _wait.
3893
3894         keyboxd: Fix user id based queries.
3895         + commit 4d839f5a8083e1ddd4767c838f56a4079f846c6d
3896         * kbx/backend-sqlite.c (run_select_statement): Add the missing join
3897         for user id bases queries.
3898
3899         common: New helper function gnupg_close_pipe.
3900         + commit 2042f5a4641f4e43137b7683077b4d733d216417
3901         * common/exechelp-posix.c (gnupg_close_pipe): New.
3902         * common/exechelp-w32.c (gnupg_close_pipe): New.
3903
3904 2020-09-01  Werner Koch  <wk@gnupg.org>
3905
3906         Use only one copy of the warn_server_mismatch function.
3907         + commit 2cd8bae23d7382588cf096df3eed83e02331a2bf
3908         * common/asshelp.c (warn_server_version_mismatch): New.  Actually a
3909         slightly modified version of warn_version_mismatch found in other
3910         modules.
3911         * common/status.c (gnupg_status_strings): New.
3912         * g10/cpr.c (write_status_strings2): New.
3913         * g10/call-agent.c (warn_version_mismatch): Use the new unified
3914         warn_server_version_mismatch function.
3915         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
3916         * g10/call-keyboxd.c (warn_version_mismatch): Ditto.
3917         * sm/call-agent.c (warn_version_mismatch): Ditto.
3918         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
3919         * tools/card-call-scd.c (warn_version_mismatch): Ditto.
3920
3921 2020-08-28  Werner Koch  <wk@gnupg.org>
3922
3923         sm: Fix a bug in the rfc2253 parser.
3924         + commit 16c1d8a14e98894408f30349cab68ff17ef6b35e
3925         * sm/certdump.c (parse_dn_part): Fix parser flaw.
3926
3927 2020-08-28  NIIBE Yutaka  <gniibe@fsij.org>
3928
3929         common: Fix fallback handling to utf-8.
3930         + commit 393dcdd61c3b2da00a97176c647d9bd1c908ceba
3931         * common/utf8conv.c (handle_iconv_error): Set NO_TRANSLATION.
3932
3933 2020-08-27  Werner Koch  <wk@gnupg.org>
3934
3935         scd: New option to APDU command to return the ATR as data.
3936         + commit a0a4744bd0640e587b33ec3dae819ec4054f0472
3937         * scd/command.c (cmd_apdu): Add new option --data-atr.
3938         * tools/gpg-card.c (cmd_apdu): Use that here.  Also fix the --exlen
3939         option and do not print the statusword in atr mode.
3940         * tools/card-call-scd.c (scd_apdu): Detect atr mode anddon't assume a
3941         status word.
3942
3943         scd: Fix reading of the ATR for card type detection.
3944         + commit 95b5a852e269e602ade6a07ed468e9072c247b8c
3945         * scd/app.c (app_new_register): Do not use apdu_get_slot.
3946
3947         dirmngr: Print the last alert message returned by NTBTLS.
3948         + commit 05358d73841149f64dc5d620f4b8855255e7f4da
3949         * dirmngr/http.c (send_request): Print the last TLS alert.
3950
3951 2020-08-27  NIIBE Yutaka  <gniibe@fsij.org>
3952
3953         scd: Add heuristics to identify cardtype.
3954         + commit 9f148360a2bf04672b43ef7cec48e21d44b06ae1
3955         * scd/app-common.h (cardtype_t): Add CARDTYPE_GNUK and
3956         CARDTYPE_ZEITCONTROL.
3957         * scd/app.c (strcardtype): Handle CARDTYPE_GNUK and
3958         CARDTYPE_ZEITCONTROL.
3959         (app_new_register): Detect Gnuk and Zeit Control implementation
3960         by examining its ATR string.
3961
3962         scd: Add condition for VERIFY with 0x82.
3963         + commit af189be481df02a77e088aa0a60a1fc02dfa12bf
3964         * scd/app-openpgp.c (verify_chv2): Check availability of keys in
3965         question.
3966
3967 2020-08-26  Werner Koch  <wk@gnupg.org>
3968
3969         build: Silence gcc warning -Wformat-zero-length.
3970         + commit 90a87d96eaf5b97cd53cb0ee0495b646be7b84bb
3971         * configure.ac: Avoid useless gcc warning.  We use an empty string
3972         quite often, for example in log_printhex.
3973
3974 2020-08-25  Werner Koch  <wk@gnupg.org>
3975
3976         gpg: Remove left over debug output from recent change.
3977         + commit fc1a1857551c05135d54e2e620e609fda59d5bca
3978         * g10/import.c (collapse_subkeys): Remove debug out.
3979
3980         examples: Simplify vsnfd.prf.
3981         + commit 40acc5ef3ef73494e67d88ea310503e5bf08bc36
3982         * doc/examples/vsnfd.prf: Remove default-new-key-algo option.
3983
3984         sm: Do not require a default keyring for --gpgconf-list.
3985         + commit e7677da479c4fb5abd0339de807b27c0f487d2e0
3986         * sm/gpgsm.c (main): No default keyring for gpgconf mode.
3987
3988         gpgconf: Silence warnings from parsing the options files.
3989         + commit ad1254b59d41e127879fc9f495d392316135b4a5
3990         * tools/gpgconf-comp.c (retrieve_options_from_program): Set verbose
3991         flag for the arg parser only in --verbose mode.
3992
3993         agent: Allow using --gogconf-list even if HOME does not exist.
3994         + commit b17846e4fd02f65b24ada306855fb110c56c5e73
3995         * agent/gpg-agent.c (main): Do not create directories in gpgconf mode.
3996
3997         gpgconf,w32: New debug command --show-codepages.
3998         + commit 32021dfa5bcaa056c18e4ec40fdcd0f8b7de382b
3999         * tools/gpgconf.c (aShowCodepages): New.
4000         (opts): New command --show-codepages.
4001         (main) [W32]: Implement
4002
4003         gpg: Collapse duplicate subkeys.
4004         + commit 633c1fea5f0dc4cb270c22ee41c24e1ec0706204
4005         * g10/options.h (IMPORT_COLLAPSE_UIDS): New.
4006         (IMPORT_COLLAPSE_SUBKEYS): New.
4007         * g10/gpg.c (main): Make them the default.
4008         * g10/import.c (parse_import_options): New import options
4009         "no-collapse-uids" and "no-collapse_subkeys".
4010         (collapse_subkeys): New.
4011         (import_one_real): Collapse subkeys and allow disabling the collapsing
4012         using the new options.
4013         (read_key_from_file_or_buffer): Always collapse subkeys.
4014         * g10/keyedit.c (fix_keyblock): Call collapse_subkeys.
4015
4016 2020-08-21  Werner Koch  <wk@gnupg.org>
4017
4018         gpgtar,w32: Handle Unicode file names.
4019         + commit 34e7703a962809921e83770f20f3eb66599265d1
4020         * tools/gpgtar.c (oUtf8Strings): New.
4021         (opts): Add option --utf8-strings.
4022         (parse_arguments): Set option.
4023         * tools/gpgtar.h (opt): Add field utf8strings.
4024         * tools/gpgtar-create.c (name_to_utf8): New.
4025         (fillup_entry_w32): Use that.
4026         (scan_directory): Ditto.
4027         (scan_directory) [W32]: Convert file name to utf8.
4028         (gpgtar_create): Convert pattern.
4029
4030         common: Use gpgrt functions for mkdir and chdir.
4031         + commit eec70e539e44c288068f26f190d52a5718fd3a10
4032         * common/sysutils.c (gnupg_mkdir): Divert to gpgrt_mkdir.
4033         (gnupg_chdir): Divert to gpgrt_chdir
4034
4035         common,w32: Do not assume the ANSI code during string conversion.
4036         + commit 5305ce17ff7a68ecc88c5ae8c4bec5897df6322f
4037         * common/utf8conv.c (get_w32_codepage): New.
4038         (wchar_to_native): Use instead oc CP_ACP.
4039         (native_to_wchar): Ditto.
4040
4041         common: Strip trailing CR,LF from w32_strerror.
4042         + commit 33fd55ca6f3efc50c260469179788e9f725ddc58
4043         * common/stringhelp.c (w32_strerror): Strip trailing CR,LF.
4044         * common/iobuf.c (iobuf_get_filelength): Use -1 and not 0 for the
4045         arg to w32_strerror.
4046
4047 2020-08-20  Werner Koch  <wk@gnupg.org>
4048
4049         gpgtar: Make --files-from and --null work as described.
4050         + commit e276f63e4a80e8d1cb1ba5621cedaeb0ccda956d
4051         * tools/gpgtar-create.c (gpgtar_create): Add args files_from and
4052         null_names.  Improve reading from a file.
4053         * tools/gpgtar.c: Make global vars static.
4054         (main): Remove tests for --files-from and --null option combinations.
4055         Pass option variables to gpgtar_create.
4056
4057         build: New configure option --disable-tests.
4058         + commit 32aac55875f324f8c3d85dad8483604eae65e3e8
4059         * configure.ac: Add option --disable-tests.  Print warnings in the
4060         summary.
4061         (DISABLE_TESTS): New am_conditional.
4062
4063         gpg: Fix regression for non-default --passphrase-repeat option.
4064         + commit b8c4dd902df34faa4d23efb2bb4ac222c8bbdbdb
4065         * agent/command.c (cmd_get_passphrase): Take care of --repeat with
4066         --newsymkey.
4067
4068 2020-08-19  Werner Koch  <wk@gnupg.org>
4069
4070         gpg,gpgsm: Record the creation time of a private key.
4071         + commit 4031c42bfd0135874a5b362df175de93a19f1b51
4072         * sm/call-agent.c (gpgsm_agent_genkey): Pass --timestamp option.
4073         (gpgsm_agent_import_key): Ditto.
4074         * g10/call-agent.c (agent_genkey): Add arg timestamp and pass it on.
4075         (agent_import_key): Ditto.
4076         * g10/import.c (transfer_secret_keys): Pass the creation date to the
4077         agent.
4078         * g10/keygen.c (common_gen): Ditto.
4079
4080 2020-08-19  NIIBE Yutaka  <gniibe@fsij.org>
4081
4082         gpg: Fix condition of string_to_aead_algo.
4083         + commit 1d66b518ca83e8d315283682b1e504f1e171a0b1
4084         * g10/misc.c (string_to_aead_algo): Only compare if not NULL.
4085
4086         dns: Fix memory use-after-free.
4087         + commit cc0d53905ce9306b51bace2682ae3d1d122c7881
4088         * dirmngr/dns.c (dns_res_stub): Fix RESCONF usage.
4089
4090         common: Fix iobuf.c.
4091         + commit f58d441bee7e93e6344f833acc1412b3be2f6818
4092         * common/iobuf.c (iobuf_cancel): Initialize DUMMY.
4093         (do_iobuf_fdopen): Initialize LEN.
4094         (iobuf_read_line): Fix the loop condition.
4095
4096         Silence compiler warnings.
4097         + commit f3e424d4e7273e60e69747ca4936149af7b6482a
4098         * common/openpgp-oid.c (map_openpgp_pk_to_gcry): Use cast for enum
4099         conversion.
4100         * dirmngr/dns-stuff.c (get_dns_srv): Use explicit conversion from
4101         int to float.
4102         * sm/gpgsm.c (parse_keyserver_line): Initialize ERR.
4103
4104         scd: Fix possible uninitialized variables.
4105         + commit 4fa0a65676a29cb53ee242caf13c393f7573c9a3
4106         * scd/app-openpgp.c (do_change_pin): Initialize resultlen2.
4107         (do_change_pin): Don't call wipe_and_free on the error path.
4108         Initialize bufferlen2.
4109
4110 2020-08-17  Werner Koch  <wk@gnupg.org>
4111
4112         agent: Allow to pass a timestamp to genkey and import.
4113         + commit 0da923a1240ac78d60c92cdd8488c4e405c3243b
4114         * agent/command.c (cmd_genkey): Add option --timestamp.
4115         (cmd_import_key): Ditto.
4116         * agent/genkey.c (store_key): Add arg timestamp and change callers.
4117         (agent_genkey): Ditto.
4118         * agent/findkey.c (write_extended_private_key): Add args timestamp and
4119         new key to write a Created line.
4120         (agent_write_private_key): Add arg timestamp.
4121         (agent_write_shadow_key): Ditto.
4122          agent/protect-tool.c (agent_write_private_key): Ditto as dummy arg.
4123
4124 2020-08-14  Werner Koch  <wk@gnupg.org>
4125
4126         Add --chuid to gpg, gpg-card, and gpg-connect-agent.
4127         + commit 6bcb609e1b2a507caa2e1a078178709d808b590b
4128         * g10/gpg.c (oChUid): New.
4129         (opts): Add --chuid.
4130         (main): Implement --chuid.  Delay setting of homedir until the new
4131         chuid is done.
4132         * sm/gpgsm.c (main): Delay setting of homedir until the new chuid is
4133         done.
4134         * tools/gpg-card.c (oChUid): New.
4135         (opts): Add --chuid.
4136         (changeuser): New helper var.
4137         (main): Implement --chuid.
4138         * tools/gpg-connect-agent.c (oChUid): New.
4139         (opts): Add --chuid.
4140         (main): Implement --chuid.
4141
4142 2020-08-13  Werner Koch  <wk@gnupg.org>
4143
4144         gpg: Ignore personal_digest_prefs for ECDSA keys.
4145         + commit 53d84f98157070f24dc861f1a75980474d074ddb
4146         * g10/sign.c (hash_for): Simplify hash algo selection for ECDSA.
4147
4148 2020-08-12  Werner Koch  <wk@gnupg.org>
4149
4150         scd: Log info about CCIDs with permission problems.
4151         + commit 2af884c64354182b1903d7a77df07e877f5ed7ba
4152         * scd/apdu.c (open_ccid_reader): Add arg r_cciderr.
4153         (apdu_open_reader): Print a note on EPERM of the USB device.
4154
4155         scd: Map some error codes from libusb to ccid-driver error codes.
4156         + commit 9a8d7e41bba1926158a21ebdda542241493ef983
4157         * scd/ccid-driver.h (CCID_DRIVER_ERR_USB_*): New error codes.
4158         * scd/apdu.h: New SW_HOST error codes.
4159         * scd/apdu.c (host_sw_string): Print them
4160         * scd/ccid-driver.c (map_libusb_error): New.
4161         (ccid_open_usb_reader, bulk_in, abort_cmd): Map libusb error codes.
4162         * scd/iso7816.c (map_sw): Map new codes to gpg-error.
4163
4164         common: Pass the WAYLAND_DISPLAY envvar along.
4165         + commit 3944430ffeaa032719fd82f8eaa118b3f326b8ed
4166         * common/session-env.c (stdenvnames): Add WAYLAND_DISPLAY.
4167
4168 2020-08-10  Werner Koch  <wk@gnupg.org>
4169
4170         scd:piv: Allow signing using PSS.
4171         + commit cbf203801e021e0f4d4143ecc92296ae7d0f0dd7
4172         * scd/app-piv.c (do_sign): Allow for PSS.
4173
4174         agent: Add option --pss to pksign to be used by smartcards.
4175         + commit bb096905b9ee1f5175efee1ab6c98045a26a2678
4176         * agent/command.c (cmd_sethash): Add option --pss and allow for
4177         --hash=null.
4178         * agent/agent.h (struct server_control_s): Add digest.is_pss and
4179         zero where needed.
4180         * agent/pksign.c (agent_pksign_do): Allow for PSS with cards.
4181         * scd/command.c (cmd_pksign): Add for --hash=none.
4182
4183 2020-08-07  NIIBE Yutaka  <gniibe@fsij.org>
4184
4185         gpg: Fix trustdb for v5key.
4186         + commit 373c975859a55f942276d6078f27ee33570bf2d5
4187         * g10/keydb.h (fpr20_from_pk): New.
4188         * g10/keyid.c (fpr20_from_pk): New.
4189         * g10/tdbio.c (tdbio_search_trust_byfpr): Use fpr20_from_pk.
4190         * g10/trustdb.c (keyid_from_fpr20): New.
4191         (verify_own_keys): Use keyid_from_fpr20.
4192         (tdb_update_ownertrust): Use fpr20_from_pk.
4193         (update_min_ownertrust): Likewise.
4194         (update_validity): Likewise.
4195
4196         gpg: Fix short key ID for v5key.
4197         + commit 20982bbd7539d2032f4d6249a2654c245445521d
4198         * g10/keyid.c (keyid_from_pk): Return keyid[0] for v5key.
4199         * g10/keyring.c (keyring_search): Handle short key ID for v5key.
4200
4201 2020-08-06  Werner Koch  <wk@gnupg.org>
4202
4203         gpgsm: New option --chuid.
4204         + commit 646a30fd394a739ef653556b1a7b2eeebda95951
4205         * sm/gpgsm.c (oChUid, opts): New option --chuid.
4206         (main): Implement option.
4207
4208         gpgconf: New option --chuid.
4209         + commit d10f45184c4482036c41f4818c84c0725a0c2c94
4210         * tools/gpgconf.c (oChUid, opts): New option --chuid.
4211         (main): Implement.
4212
4213         common: New helper function gnupg_chuid.
4214         + commit 8ff00ef0de871ca43076b00df4871c3165ced001
4215         * common/sysutils.c (try_set_envvar): New.
4216         (gnupg_chuid): New.
4217
4218 2020-08-06  NIIBE Yutaka  <gniibe@fsij.org>
4219
4220         kbx: Support v5key for short kid and long kid.
4221         + commit df531848a9618131921d584baba81c128f94de68
4222         * kbx/keybox-search.c (has_short_kid): Support v5key.
4223         (has_long_kid): Likewise.
4224
4225 2020-08-05  Werner Koch  <wk@gnupg.org>
4226
4227         gpg: Add level 16 to --gen-random.
4228         + commit d847f0651ab4304129145b55353501636b4e4728
4229         * g10/gpg.c (main): Add that hack.
4230
4231 2020-08-04  Werner Koch  <wk@gnupg.org>
4232
4233         sm: Also show the SHA-256 fingerprint.
4234         + commit e7d70923901eeb6a2c26445aee9db7e78f6f7f3a
4235         * sm/keylist.c (list_cert_colon): Emit a new "fp2" record.
4236         (list_cert_raw): Print the SHA2 fingerprint.
4237         (list_cert_std): Ditto.
4238
4239 2020-08-03  NIIBE Yutaka  <gniibe@fsij.org>
4240
4241         w32: Fix cast from intptr_t of _get_osfhandle.
4242         + commit 8e04cf969e95ccaa31bbaa7333938af1ea7476c6
4243         * common/exectool.c (gnupg_exec_tool_stream): Cast to unsigned long.
4244
4245 2020-07-31  NIIBE Yutaka  <gniibe@fsij.org>
4246
4247         agent: Fix coercion for pinentry_pid handling.
4248         + commit da3a4c54a8ce8a7dc442c70bda9b7eda22d43e57
4249         * agent/call-pinentry.c (start_pinentry): Don't use pid_t.
4250
4251         scd: Silence compiler warning.
4252         + commit 2a34a2afea5fcb5f4ed206afa110650db3dd7ef0
4253         * scd/app-openpgp.c (build_ecc_privkey_template): Fix allocation size.
4254
4255 2020-07-30  NIIBE Yutaka  <gniibe@fsij.org>
4256
4257         w32: Add NETLIBS for sm/t-minip12.
4258         + commit c1f81eb9fc2544a417ebc2ce19b04541525da684
4259         * sm/Makefile.am (t_minip12_LDADD): Add NETLIBS.
4260
4261         w32: More adding NETLIBS.
4262         + commit 5fa4427419c875e46d051ae6ed376d5ad6037401
4263         * common/Makefile.am (t_common_ldadd): Add $(NETLIBS).
4264
4265         w32: Add link to $(NETLIB) for -lws2_32.
4266         + commit d69f5570ee5e1b099e39fdf64e18add23ff5c815
4267         * dirmngr/Makefile.am (dirmngr_LDADD): Add $(NETLIBS).
4268         * sm/Makefile.am (gpgsm_LDADD): Ditto.
4269         * tools/Makefile.am (gpg_wks_client_LDADD): Ditto.
4270
4271 2020-07-27  NIIBE Yutaka  <gniibe@fsij.org>
4272
4273         kbx: Fix short KID and long KID handling for FPR32.
4274         + commit fa4a2bd7a1ba8d4bda5f9cec0826104f50142d4f
4275         * kbx/keybox-search.c (blob_cmp_fpr_part): For FPR32, it's
4276         the first part in the fingerprint.
4277
4278 2020-07-17  NIIBE Yutaka  <gniibe@fsij.org>
4279
4280         scd: Fix closing reader and reeleasing context in PC/SC.
4281         + commit daa2cec6a543f06a2e408d97a80a5041027f16a9
4282         * scd/apdu.c (close_pcsc_reader): Unlock the reader_table_lock.
4283         (apdu_dev_list_finish): Release the context when no readers.
4284
4285         Use gpgrt's new option parser for symcryptrun.
4286         + commit f484ac2b2d2ea176db1a70d961a778180147d9b2
4287         * tools/symcryptrun.c: Follow API change of the new option parser.
4288
4289         scd: PC/SC: Don't release the context when it's in use.
4290         + commit 46d185f60397f68830bfdfb99627b29aea5016f1
4291         * scd/apdu.c (close_pcsc_reader): Check if it's not in the loop.
4292
4293         gpg-card: Fix type of historyname.
4294         + commit 43000b0434b47a72608b41d67054ba42db21b699
4295         * tools/gpg-card.c (interactive_loop): Remove const qualifier.
4296
4297 2020-07-16  Werner Koch  <wk@gnupg.org>
4298
4299         gpg: Do not close stdout after --export-ssh-key.
4300         + commit 5c514a274ca8ac6be875818237e2e1bbc0c6a2a5
4301         * g10/export.c (export_ssh_key): Do not close stdout.
4302
4303 2020-07-16  NIIBE Yutaka  <gniibe@fsij.org>
4304
4305         common: Avoid undefined behavior of left shift operator.
4306         + commit 8abf065307ff4a7ea873fe59f76173bf17dac241
4307         * common/iobuf.c (block_filter): Handle an error earlier.
4308         Make sure it's unsigned.
4309
4310 2020-07-15  NIIBE Yutaka  <gniibe@fsij.org>
4311
4312         regexp: Import change from JimTcl.
4313         + commit 91cb46d948db234be1ea8092f5db9e14294f1b79
4314         * regexp/jimregexp.h, regexp/jimregexp.c: Fix from JimTcl.
4315
4316 2020-07-14  Werner Koch  <wk@gnupg.org>
4317
4318         agent: Fix regression with --newsymkey in loopback mode.
4319         + commit 0a6af6dc12998ef7b19673ad05d11e82f826de9d
4320         * agent/command.c (cmd_get_passphrase): Never repeat in loopback mode;
4321         same as with !OPT_NEWSYMKEY.
4322
4323 2020-07-13  NIIBE Yutaka  <gniibe@fsij.org>
4324
4325         dirmngr: Handle EAFNOSUPPORT at connect_server.
4326         + commit 109d16e8f644da97ed9c00e6f9010a53097f587a
4327         * dirmngr/http.c (connect_server): Skip server with EAFNOSUPPORT.
4328
4329 2020-07-10  NIIBE Yutaka  <gniibe@fsij.org>
4330
4331         gpg: For decryption, support use of a key with no 'encrypt' usage.
4332         + commit 31ae0718ba10c3b1b670ba6131b4995de24aa7a1
4333         * g10/pubkey-enc.c (get_session_key): Don't skip at no PUBKEY_USAGE_ENC.
4334         Emit information the key has no 'encrypt' usage.
4335
4336 2020-07-08  Werner Koch  <wk@gnupg.org>
4337
4338         Do not use the pinentry's qualitybar.
4339         + commit 999d25d47d45a0f594c84d51c041da0b24d68c5d
4340         * agent/genkey.c (agent_ask_new_passphrase): No qualitybar.
4341         * g10/call-agent.c (agent_get_passphrase): Ditto.
4342         * sm/call-agent.c (gpgsm_agent_ask_passphrase): Ditto.
4343
4344         gpg: Use integrated passphrase repeat entry also for -c.
4345         + commit a6a4bbf6debd925a23c22eea86a562f061fdfe6c
4346         * g10/call-agent.c (agent_get_passphrase): Add arg newsymkey.
4347         * g10/passphrase.c (passphrase_get): Add arg newsymkey.
4348         (passphrase_to_dek): Pass it on.
4349
4350         agent: New option --newsymkey for GET_PASSPHRASE.
4351         + commit eace4bbe1ded8b01f9ad52ebc1871f2fd13c3a08
4352         * agent/call-pinentry.c (agent_get_passphrase): Add arg pininfo.
4353         * agent/genkey.c (check_passphrase_constraints): New arg no_empty.
4354         * agent/command.c (reenter_passphrase_cmp_cb): New.
4355         (cmd_get_passphrase): Add option --newsymkey.
4356
4357 2020-07-07  Werner Koch  <wk@gnupg.org>
4358
4359         gpg: Fix flaw in symmetric algorithm selection in mixed mode.
4360         + commit 6864bba78e76a1ff72aec140ae9f4e752454c463
4361         * g10/encrypt.c (setup_symkey): Use default_cipher_algo function
4362         instead of the fallback s2k_cipher_algo.  Fix error code.
4363         (encrypt_simple): Use setup_symkey.
4364
4365 2020-07-03  Werner Koch  <wk@gnupg.org>
4366
4367         sm: Exclude rsaPSS from de-vs compliance mode.
4368         + commit 969abcf40cdfc65f3ee859c5e62889e1a8ccde91
4369         * common/compliance.h (PK_ALGO_FLAG_RSAPSS): New.
4370         * common/compliance.c (gnupg_pk_is_compliant): Add arg alog_flags and
4371         test rsaPSS.  Adjust all callers.
4372         (gnupg_pk_is_allowed): Ditto.
4373         * sm/misc.c (gpgsm_ksba_cms_get_sig_val): New wrapper function.
4374         (gpgsm_get_hash_algo_from_sigval): New.
4375         * sm/certcheck.c (gpgsm_check_cms_signature): Change type of sigval
4376         arg.  Add arg pkalgoflags.  Use the PK_ALGO_FLAG_RSAPSS.
4377         * sm/verify.c (gpgsm_verify): Use the new wrapper and new fucntion to
4378         also get the algo flags.  Pass algo flags along.
4379
4380 2020-07-02  Werner Koch  <wk@gnupg.org>
4381
4382         scd:nks: Implement writecert for the Signature card v2.
4383         + commit c1663c690b29d2dea8bc782c42de5eca08a24cc9
4384         * scd/iso7816.c (CMD_UPDATE_BINARY): New.
4385         (iso7816_update_binary): New.
4386         * scd/app-nks.c (do_deinit): Factor some code out to...
4387         (flush_fid_cache): new.
4388         (do_writecert): New.
4389         (app_select_nks): Register new handler.
4390
4391         dirmngr: Silence annoying warning for missing default ldap server file.
4392         + commit f55a05a69ba07eb2ed354a9275e71e94c5e362aa
4393         * dirmngr/dirmngr.c (parse_ldapserver_file): Add arg ignore_enoent.
4394         (main): Use that arg for the default file.
4395
4396         Support a history file in gpg-card and gpg-connect-agent.
4397         + commit d70b8769c888f42896ae3ef4972bf82e9b5a0c32
4398         * common/gpgrlhelp.c (read_write_history): New.
4399         (gnupg_rl_initialize): Register new function.
4400         * common/ttyio.c (my_rl_rw_history): New var.
4401         (tty_private_set_rl_hooks): Add arg read_write_history.
4402         (tty_read_history): New.
4403         (tty_write_history): New.
4404         * tools/gpg-card.c (HISTORYNAME): New.
4405         (oNoHistory): New enum value.
4406         (opts): New option --no-history.
4407         (cmd_history): New.
4408         (cmds): New command "history".
4409         (interactive_loop): Read and save the history.
4410         * tools/gpg-connect-agent.c (HISTORYNAME): New.
4411         (opts): New option --no-history.
4412         (main): Read and save the history.  New command /history.
4413
4414 2020-06-30  Werner Koch  <wk@gnupg.org>
4415
4416         scd:nks: Fix certificate read problem with TCOS signature card v2.
4417         + commit 07aef873ebc77241e9a2be225537319f6fc15a41
4418         * scd/app-nks.c (filelist): Add a dedicated key entry for ESIGN.
4419         (do_readcert): Test for the app_id.
4420
4421         scd: Change how the removed card flag is set.
4422         + commit 58b091df831f61c8d3551114f2480d36e73de2da
4423         * scd/command.c (cmd_serialno): Set/clear card removed flags for all
4424         connections using the current card.
4425
4426         card: Better detect removed cards.  Add TCOS PIN menu.
4427         + commit fb10b6cba43f4ed8675093ac25f461de4dacdce9
4428         * tools/card-call-scd.c (scd_change_pin): Add arg 'nullpin'.
4429         * tools/gpg-card.h (struct card_info_s): Add field 'card_removed'.
4430         * tools/gpg-card.c (fixup_scd_errors): New.
4431         (maybe_set_card_removed): New.
4432         (list_one_kinfo): Change type of first arg to get access to INFO.  Set
4433         card_removed flag.
4434         (list_all_kinfo): Improve label alignment.
4435         (cmd_list): Check that the current card is still available.
4436         (cmd_passwd): Add option --nullpin and menu to chnage TCOS PINs.
4437         (dispatch_command): Handle card_removed flag.
4438         (interactive_loop): Ditto.
4439
4440 2020-06-30  NIIBE Yutaka  <gniibe@fsij.org>
4441
4442         ecc: Support Ed448/X448 key generation.
4443         + commit 45398518fb76e2b859d2d48cf4cdbc11fbbda4fa
4444         * g10/keygen.c (ask_curve): Support Ed448/X448 keys.
4445         (generate_keypair): Support switch to X448 key.
4446
4447 2020-06-29  Werner Koch  <wk@gnupg.org>
4448
4449         scd: Shorten cardio debug output for all zeroes.
4450         + commit 9b6f574928546e6905a92c3e74d72478f1585c66
4451         * scd/apdu.c (all_zero_p): New.
4452         (send_le): Use it.
4453
4454         sm: Fix regression in Friday's commit.
4455         + commit 4f1c257c03667497d642930884b65c4f2245adbd
4456         * sm/gpgsm.c (main): Set ERR also for encrypt.
4457
4458 2020-06-26  Werner Koch  <wk@gnupg.org>
4459
4460         sm: Try not to output a partial new message after an error.
4461         + commit ccbb0cfeefed096a9841b6557d10eef12d55b721
4462         * sm/gpgsm.c (main) <aSign,aEncr>:  Uses gpgrt_fcancel on error.
4463
4464         sm: Print the serial number of a cert also in decimal.
4465         + commit 208a90197317fb9746ecf54a1d14acbeeddfbd18
4466         * sm/certdump.c: Include membuf.h.
4467         (gpgsm_print_serial_decimal): New.
4468         * sm/keylist.c (list_cert_raw): Print s/n also in decimal
4469         (list_cert_std): Ditto.
4470
4471 2020-06-25  Werner Koch  <wk@gnupg.org>
4472
4473         scd:nks: Fix remaining tries warning in --reset mode.
4474         + commit 2429e8559844e27de478d7e90834a714b3748834
4475         * scd/app-nks.c (do_change_pin): Chnage computaion of 'remaining'.
4476
4477         card: Add  password change menu for NKS cards.
4478         + commit 28c069db3bb5a1065de69bcc0435c8415df87e5b
4479         * tools/gpg-card.c (cmd_passwd): Add menu for NKS.  Add option
4480         --reset.
4481
4482         sm: Fix support verification of nistp521 signatures.
4483         + commit 17a25c14f1ed1199898ad618c17204eafd5524c1
4484         * sm/certcheck.c (do_encode_md): Fix obvious bug.
4485
4486 2020-06-24  James Bottomley  <James.Bottomley@HansenPartnership.com>
4487             Werner Koch  <wk@gnupg.org>
4488
4489         agent: separate out daemon handling infrastructure for reuse.
4490         + commit f541e1d95a91d4764c7ed0df10c293bfd493dd41
4491         * agent/call-scd.c: Factor re-usable code out to ...
4492         * agent/call-daemon.c: new.  Store infos in an array to allow for
4493         other backend daemons.
4494         * agent/Makefile.am (gpg_agent_SOURCES): Add new file.
4495         * agent/agent.h: Include assuan.h.
4496         (enum daemon_type): New.
4497         (opt): Replace scdaemon_program by daemon_program array.  Replace
4498         scd_local by a array d_local.  Change users accordingly.
4499
4500 2020-06-24  Werner Koch  <wk@gnupg.org>
4501
4502         gpgconf: Fix regression in --launch and --kill from March.
4503         + commit 2d8f060679bafed27909a5ad54b7f74a9f8dd51b
4504         * tools/gpgconf.h (gc_component_id_t): Align order with gc_component
4505         array.
4506
4507 2020-06-24  NIIBE Yutaka  <gniibe@fsij.org>
4508
4509         gpg,agent: Support Ed448 signing.
4510         + commit a763bb2580b0d586a80b8ccd3654f41e49604f4f
4511         * agent/pksign.c (do_encode_eddsa): First argument is NBITs,
4512         so that it can support Ed448, as well as Ed25519.
4513         (agent_pksign_do): Follow the change.
4514         * agent/sexp-secret.c (fixup_when_ecc_private_key): No fix-up needed
4515         for Ed448, it's only for classic curves.
4516         * common/openpgp-oid.c (oidtable): Add Ed448.
4517         * common/sexputil.c (get_pk_algo_from_key): Ed448 is only for EdDSA.
4518         * g10/export.c (match_curve_skey_pk): Ed448 is for EdDSA.
4519         * g10/keygen.c (gen_ecc): Support Ed448 with the name of "ed448".
4520         (ask_algo, parse_key_parameter_part): Handle "ed448".
4521         * g10/pkglue.c (pk_verify): Support Ed448.
4522         (pk_check_secret_key): Support Ed448.
4523         * g10/sign.c (hash_for): Defaults to SHA512 for Ed448.
4524         (make_keysig_packet): Likewise.
4525
4526 2020-06-23  NIIBE Yutaka  <gniibe@fsij.org>
4527
4528         ecc: Use "cv448" to specify key using X448.
4529         + commit c94eea15d6847c08d2d9ff1c7608953f25fea67d
4530         * common/openpgp-oid.c (oidtable): Use "cv448".
4531         (oid_cv448): Rename from oid_x448.
4532         (openpgp_oidbuf_is_cv448, openpgp_oid_is_cv448): Likewise.
4533         * common/util.h (openpgp_oid_is_cv448): Follow the change.
4534         * g10/ecdh.c (pk_ecdh_generate_ephemeral_key): Likewise.
4535         * g10/keygen.c (gen_ecc, ask_algo): Use "cv448".
4536         (parse_key_parameter_part): Likewise.
4537         * g10/pkglue.c (get_data_from_sexp): Fix for debug output.
4538
4539 2020-06-19  NIIBE Yutaka  <gniibe@fsij.org>
4540
4541         agent: Use get_pk_algo_from_key.
4542         + commit 4bdade5b0bea1816a2479c73abc71b41f09ba727
4543         * agent/findkey.c (key_parms_from_sexp, is_eddsa): Remove.
4544         (agent_pk_get_algo): Remove.
4545         * agent/pksign.c (agent_pksign_do): Use get_pk_algo_from_key.
4546
4547         agent: Clean up for getting info from SEXP.
4548         + commit d2e4aa5ee4c5128547cc45c2e1ac35fdc5c00f45
4549         * agent/agent.h (agent_is_dsa_key, agent_is_eddsa_key): Remove.
4550         (agent_pk_get_algo): New.
4551         * agent/findkey.c (agent_pk_get_algo): New.
4552         * agent/pksign.c (do_encode_dsa): Use generic GCRY_PK_ECC.
4553         (agent_pksign_do): Use agent_pk_get_algo.
4554
4555         agent: A little clean up.
4556         + commit abc6a3100a33122ba3673b578a2b364a6b45d252
4557         * agent/findkey.c (agent_is_eddsa_key): Remove dead case.
4558
4559 2020-06-17  Werner Koch  <wk@gnupg.org>
4560
4561         agent: Fix regression in 'd' fixup code for shadowed keys.
4562         + commit d1e1c622d55e783ae5bf601249598f0da8d5e688
4563         * agent/sexp-secret.c (fixup_when_ecc_private_key): Ignore shadowed
4564         keys.
4565
4566         sm: Support verification of nistp521 signatures.
4567         + commit 596212e71abf33b30608348b782c093dace83110
4568         * sm/certcheck.c (do_encode_md): Take care of nistp521.
4569
4570 2020-06-09  Werner Koch  <wk@gnupg.org>
4571
4572         gpg: Fix for new SOS changes when used with Libgcrypt < 1.8.6.
4573         + commit eeb599c9e261586a664430058b7cfad7025a503f
4574         * g10/free-packet.c (is_mpi_copy_broken): New.
4575         (my_mpi_copy): Mix gcry_mpi_copy.
4576
4577         gpg: Extend the TRUST_ status lines.
4578         + commit 96f1ed5468002330ea21d9ad32ac3b464bb40b1a
4579         * g10/pkclist.c (write_trust_status): Add arg mbox.
4580         (check_signatures_trust): Appenmd mbox to the status lines.
4581
4582 2020-06-09  NIIBE Yutaka  <gniibe@fsij.org>
4583
4584         gpg: Use bytes for ECDH.
4585         + commit da5e0bc31b4c6f16ed5ff9b35063f3b03eb7ff16
4586         * g10/ecdh.c (extract_secret_x): Use byte * instead of MPI.
4587         (prepare_ecdh_with_shared_point): Use char * instead of MPI.
4588         (pk_ecdh_encrypt_with_shared_point): Likewise.
4589         (pk_ecdh_decrypt): Likewise.
4590         * g10/pkglue.h (pk_ecdh_encrypt_with_shared_point, pk_ecdh_decrypt):
4591         Change declaration.
4592         * g10/pkglue.c (get_data_from_sexp): New.
4593         (pk_encrypt): Use get_data_from_sexp instead of get_mpi_from_sexp.
4594         Follow the change of pk_ecdh_encrypt_with_shared_point.
4595         * g10/pubkey-enc.c (get_it): Follow the change of pk_ecdh_decrypt.
4596
4597         gpg: Add X448 support.
4598         + commit e9760eb9e70b9804c988dafe01851f6600869d9e
4599         * common/openpgp-oid.c (oidtable): Add X448.
4600         (oid_x448,openpgp_oidbuf_is_x448,openpgp_oid_is_x448): New.
4601         * common/util.h (openpgp_oid_is_x448): New.
4602         * g10/ecdh.c (gen_k): Add handling of opaque MPI and support
4603         endianness.
4604         (pk_ecdh_generate_ephemeral_key): X448 requires opaque MPI.
4605         * g10/keygen.c (gen_ecc): Add support for X448.
4606         (ask_algo, parse_key_parameter_part): Likewise.
4607
4608         gpg,ecc: Handle external representation as SOS with opaque MPI.
4609         + commit f5bc94555458123f93d8b07816a68fb7485421e1
4610         * g10/pkglue.h (sexp_extract_param_sos): New.
4611         * g10/build-packet.c (sos_write): New.
4612         (do_key, do_pubkey_enc, do_signature): Use sos_write for ECC.
4613         * g10/export.c (cleartext_secret_key_to_openpgp): Use
4614         sexp_extract_param_sos.
4615         (transfer_format_to_openpgp): Use opaque MPI for ECC.
4616         * g10/keygen.c (ecckey_from_sexp): Use sexp_extract_param_sos.
4617         * g10/keyid.c (hash_public_key): Handle opaque MPI for SOS.
4618         * g10/parse-packet.c (sos_read): New.
4619         (parse_pubkeyenc,parse_signature,parse_key): Use sos_read for ECC.
4620         * g10/pkglue.c (sexp_extract_param_sos): New.
4621         (pk_verify): Handle opaque MPI for SOS.
4622         (pk_encrypt): Use sexp_extract_param_sos.
4623         * g10/seskey.c (encode_session_key): Use opaque MPI.
4624         * g10/sign.c (do_sign): Use sexp_extract_param_sos.
4625
4626 2020-06-08  Werner Koch  <wk@gnupg.org>
4627
4628         gpg: If possible TRUST values now depend on signer's UID or --sender.
4629         + commit 5c2080f4670a768787f5cb4ed5c32e0946837883
4630         * g10/mainproc.c (check_sig_and_print): Add failsafe check for PK.
4631         Pass KEYBLOCK down do check_signatures_trust.  Protect existsing error
4632         ocde in case the signature expired.
4633         * g10/pkclist.c (is_in_sender_list): New.
4634         (check_signatures_trust): Add args keyblock and pk.  Add new uid based
4635         checking code.
4636         * g10/test-stubs.c, g10/gpgv.c: Adjust stubs.
4637
4638 2020-06-08  NIIBE Yutaka  <gniibe@fsij.org>
4639
4640         agent: Fix the condition to detect leading 0x00 problem.
4641         + commit e2e5736842299ebfb8263b674d5cbfb9b784d70f
4642         * agent/sexp-secret.c (fixup_when_ecc_private_key): Use curve name
4643         to identify the issue.
4644
4645 2020-06-05  NIIBE Yutaka  <gniibe@fsij.org>
4646
4647         agent,ecc: Use of opaque MPI for ECC, fixup 'd'.
4648         + commit 47c1c329ed823a562185f86e98ac903605104f11
4649         * agent/Makefile.am: Add sexp-secret.c.
4650         * agent/agent.h: New function declarations.
4651         * agent/sexp-secret.c: New.
4652         * agent/findkey.c (agent_key_from_file): Use sexp_sscan_private_key.
4653         * agent/protect-tool.c (read_and_unprotect): Fix up private part,
4654         calling fixup_when_ecc_private_key.
4655
4656         agent: For ECC, use opaque MPI for key representation.
4657         + commit 2b118516240b4bddd34c68c23a99bea56682a509
4658         * agent/cvt-openpgp.c (scan_pgp_format): New with SOS support.
4659         (do_unprotect): Use scan_pgp_format, handle opaque MPI for ECC.
4660         (convert_from_openpgp_main): Use opaque MPI for ECC.
4661         (apply_protection): Set GCRYMPI_FLAG_USER1 flag for encrypted secret.
4662         (extract_private_key): Use "/qd" for ECC, opaque MPI.
4663
4664         agent,ssh: Tighten condition for EdDSA.
4665         + commit a7d46c78e242e72f6ff681f6fe56ffc4dcb74a18
4666         * agent/command-ssh.c (ssh_key_to_blob): Prepare for non-prefixed
4667         point representation of EdDSA.
4668
4669         agent: Remove duplicated code for EdDSA.
4670         + commit 2e988546c59ba25bf9e63521112c0c3c73b012f1
4671         * agent/command-ssh.c (ssh_receive_key): Curve is "Ed25519".
4672         Use sexp_key_construct always.
4673
4674         agent: Clean up do_encode_md.
4675         + commit 4c0b12f817f15862111a01493aaadce943410ee9
4676         * agent/pksign.c (do_encode_md): Directly use sexp_build.
4677
4678 2020-06-03  Werner Koch  <wk@gnupg.org>
4679
4680         doc: Minor enhancement for reproducibility.
4681         + commit 074ab108e768b2f946d789c1f3a7f14a65e07c52
4682         * doc/Makefile.am (defsincdate): In no repo mode and with
4683         SOURCE_DATE_EPOCH set, use that instead of blanking the date.
4684
4685         card: Improve openpgp key writing in "writecert".
4686         + commit 4f6e0e12cbd3444b9e6ea5e4b92ea5b3072a3e17
4687         * tools/card-keys.c (struct export_key_status_parm_s): New.
4688         (export_key_status_cb): New.
4689         (get_minimal_openpgp_key): New.
4690         * tools/gpg-card.c (cmd_writecert): Allow writing a keyblock directly
4691         from an existing gpg key.
4692
4693         gpg: Improve generation of keys stored on card (brainpool,cv25519).
4694         + commit 48251cf9a7d3776667342f4705ac3de89bd75534
4695         * g10/keygen.c (ask_key_flags_with_mask): Allow more than ECDH for
4696         legacy curves.
4697         (ask_algo): Tweak mapping of ECC to OpenPGP algos
4698         (parse_key_parameter_part): Ditto.
4699         (generate_subkeypair): Create the subkey with the time stored on the
4700         card.
4701
4702         sm: Fix recently introduced regression in CSR creation.
4703         + commit 7558128e16d7fc20b9c40bf7e150ca08bbb4467f
4704         * sm/certreqgen.c (create_request): Also set SIGKEYLEN.
4705
4706 2020-05-29  NIIBE Yutaka  <gniibe@fsij.org>
4707
4708         scd: Fix condition for C5 data object for newer Yubikey.
4709         + commit f3df8dbb696fed192501fa7f741c2e0e0936a3d5
4710         * scd/app-openpgp.c (compare_fingerprint): Relax the condition.
4711
4712 2020-05-28  Werner Koch  <wk@gnupg.org>
4713
4714         card: Allow to store and retrieve keyblocks in OpenPGP cards.
4715         + commit 2d9592e78f4978307e378e07d6c170a28000a494
4716         * tools/gpg-card.c: Include tlv.h.
4717         (cmd_writecert): Add option --openpgp.
4718         (cmd_readcert): Ditto.
4719
4720         card: New command "apdu"
4721         + commit ed0759f39be04dd6108237f5ed03c7cfd1cb4642
4722         * tools/card-call-scd.c (scd_apdu): Add optional arg 'options'.
4723         * tools/gpg-card.c (cmd_apdu): New.
4724         (enum cmdids): Add cmdAPDU.
4725         (dispatch_command): Add command "apdu".
4726         (interactive_loop): Ditto.
4727
4728 2020-05-27  Werner Koch  <wk@gnupg.org>
4729
4730         card: Update card info after "generate".
4731         + commit 94d31660c6db22c3b539f440994d286f687c273f
4732         * tools/gpg-card.c (cmd_generate): Re-read the card on success.
4733
4734         scd:openpgp: New KEY-STATUS attribute.
4735         + commit 21496761226c1020a98e3ec7dd2b9dd013d4386b
4736         * scd/app-openpgp.c (do_getattr): Return KEY-STATUS
4737
4738         card: Add command "bye"
4739         + commit 08310849a28071fbca761fa4ca18702b39092947
4740         * tools/gpg-card.c: Add command "bye" as alias for "quit".
4741         * tools/gpg-connect-agent.c (main): Add "/quit" as alias for "/bye"
4742
4743         card: Take care of removed and re-inserted cards.
4744         + commit 46a3de4b5acb37274ddd132499a3243e1f92b506
4745         * tools/gpg-card.c (cmd_list): Take care of the need_sn_cmd flag.
4746         (cmd_factoryreset): Clear that flag.
4747         (dispatch_command): Set flag after a reset and after a
4748         CARD_NOT_PRESENT error.
4749
4750 2020-05-26  Werner Koch  <wk@gnupg.org>
4751
4752         card: Implement UID command and print capabilities.
4753         + commit c2a47475ba0f6bd1de80e92dd91949501256025e
4754         * tools/card-call-scd.c (learn_status_cb): Return the full value for
4755         UIF.  Add info about SM, MCL3, and PD.
4756         * tools/gpg-card.h (struct card_info_s): Add corresponding fields.
4757         * tools/gpg-card.c (list_openpgp): Print capabilities.  Print the
4758         permanent flag for UIF.
4759         (cmd_uif): Implement.
4760
4761         scd:openpgp: Add attribute "UIF" for convenience.
4762         + commit 11f0700282c1eeaee8db6686c38aca0900271351
4763         * scd/app-openpgp.c (do_getattr): New attrubute "UIF".
4764         (do_learn_status): Use that.
4765
4766         scd: Fix Yubikey app switching problem.
4767         + commit 20090886706e2af6723ca11e292272fc00cffe07
4768         * scd/app.c (select_all_additional_applications_internal): Re-select
4769         first app.  Add arg 'ctrl'.
4770
4771 2020-05-22  NIIBE Yutaka  <gniibe@fsij.org>
4772
4773         gpg: Clean up ECDH code path (5).
4774         + commit 510bda7d3754801be18a592694578589fe503fb8
4775         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Now, it's only for
4776         encrytion.
4777         (pk_ecdh_decrypt): Use prepare_ecdh_with_shared_point and move decrypt
4778         code path in original pk_ecdh_encrypt_with_shared_point here.
4779         * g10/pkglue.h (pk_ecdh_encrypt_with_shared_point): Change API.
4780         * g10/pkglue.c (pk_encrypt): Follow the change.
4781
4782         gpg: Clean up ECDH code path (4).
4783         + commit 64d93271bfce1968ebe61324b900875dbd6dd2eb
4784         * g10/ecdh.c (prepare_ecdh_with_shared_point): New.
4785         (pk_ecdh_encrypt_with_shared_point): Fixing error paths for closing
4786         the cipher handle, use prepare_ecdh_with_shared_point.
4787
4788         gpg: Clean up ECDH code path (3).
4789         + commit 80c02d13d9994abae9e67c3554528352c621cd9b
4790         * g10/ecdh.c (derive_kek): New.
4791         (pk_ecdh_encrypt_with_shared_point): Use derive_kek.
4792
4793         gpg: Clean up ECDH code path (2).
4794         + commit a973d9113840282468015eb26f07f2b32f977d70
4795         * g10/ecdh.c (build_kdf_params): New.
4796         (pk_ecdh_encrypt_with_shared_point): Use build_kdf_params, and check
4797         things before extract_secret_x.
4798
4799         gpg: Clean up ECDH code path (1).
4800         + commit 960d37644cbbe2a234352d0bc58095e2b0371eec
4801         * g10/ecdh.c (extract_secret_x): New.
4802         (pk_ecdh_encrypt_with_shared_point): Use extract_secret_x.
4803
4804 2020-05-20  NIIBE Yutaka  <gniibe@fsij.org>
4805
4806         dirmngr: dns: Fix allocation of string buffer in stack.
4807         + commit 30eef28bc0f5deaa1b4b7f04293a6527524280a9
4808         * dirmngr/dns.h (dns_strsection, dns_strclass)
4809         (dns_strtype): Change APIs.
4810         * dirmngr/dns.c (dns_p_lines): Use __dst for dns_strsection.
4811         (dns_rr_print): Use __dst for dns_strclass and dns_strtype.
4812         (dns_trace_dump): Likewise.
4813         (dns_ai_print): Use __dst for dns_strtype.
4814         (dns_strsection): Add an argument __dst for storage.
4815         (dns_strclass, dns_strtype): Likewise.
4816         (parse_packet): Use __dst for dns_strsection.
4817         (send_query): Use __dst for dns_strtype.
4818         (isection): Use __dst for dns_strsection.
4819         (iclass): Use __dst for dns_strclass.
4820         (itype): Use __dst for dns_strtype.
4821
4822 2020-05-19  Werner Koch  <wk@gnupg.org>
4823
4824         sm: Create ECC certificates with AKI and SKI by default.
4825         + commit 44676819f2873705b78849e7b2fd22214b691642
4826         * sm/certreqgen.c (create_request): Create AKI and SKI by default.
4827
4828         common: New function to extract Q from an ECC key.
4829         + commit 3cd9dac7e0976643c6e4b6537cf363b2b12d422f
4830         * common/sexputil.c (get_ecc_q_from_canon_sexp): New.
4831
4832 2020-05-18  Werner Koch  <wk@gnupg.org>
4833
4834         sm: Support creation of EdDSA certificates.
4835         + commit 6dc3846d78192e393be73c16c72750734a9174d1
4836         * sm/misc.c (transform_sigval): Support EdDSA.
4837         * sm/certreqgen.c (create_request): Support EdDSA cert creation.
4838         * sm/certcheck.c (gpgsm_check_cert_sig): Map some ECC algo OIDs to
4839         hash algos.
4840         * sm/call-agent.c (struct sethash_inq_parm_s): New.
4841         (sethash_inq_cb): New.
4842         (gpgsm_agent_pksign): Add mode to pass plain data for EdDSA.
4843
4844         agent: Allow to use SETHASH for arbitrary data.
4845         + commit b18fb0264abdb6cb0a99ba0ba941dc9a6e35f74a
4846         * agent/agent.h (struct server_control_s): Add field digest.data.
4847         * agent/gpg-agent.c (agent_deinit_default_ctrl): Free that field.
4848         * agent/command.c (reset_notify): Ditto.
4849         (start_command_handler): ditto.
4850         (cmd_sethash): Add new option --inquire.
4851         * agent/call-scd.c (agent_card_pksign): For now return an error if
4852         inquire mode was used.
4853         * agent/command-ssh.c (ssh_handler_sign_request): Make sure
4854         digest.data is cleared.
4855         * agent/divert-scd.c (divert_pksign): Implement inquire mode.
4856         * agent/pksign.c (agent_pksign_do): Ditto.
4857
4858 2020-05-13  Werner Koch  <wk@gnupg.org>
4859
4860         sm: Support import and verification of EdDSA certificates.
4861         + commit b1694987bb6484405d41d34046a5290176feadd0
4862         * sm/certdump.c (gpgsm_get_serial): New.
4863         * sm/certcheck.c (gpgsm_check_cert_sig): Support EdDSA signatures.
4864
4865 2020-05-11  Werner Koch  <wk@gnupg.org>
4866
4867         sm: Support signing using ECDSA.
4868         + commit f44d395bdfec464b1e2a0a1aef39561e6e48a45c
4869         * sm/gpgsm.h (struct certlist_s): Add helper field pk_algo.
4870         * sm/sign.c (gpgsm_sign): Store the public key algo.  Take the hash
4871         algo from the curve.  Improve diagnostic output in verbose mode.
4872
4873 2020-05-08  Werner Koch  <wk@gnupg.org>
4874
4875         sm: Allow decryption using dhSinglePass-stdDH-sha1kdf-scheme.
4876         + commit 68b857df13c8a4e6cae5e3a29fd065bf90764547
4877         * sm/decrypt.c (ecdh_decrypt): Support
4878         dhSinglePass-stdDH-sha1kdf-scheme.  Factor key derive code out to ...
4879         (ecdh_derive_kek): new global function.  Allow for hashs shorter than
4880         the key.
4881         (hash_ecc_cms_shared_info): Make file-only.
4882         * sm/encrypt.c (ecdh_encrypt): Replace derive code by a call to the
4883         new ecdh_derive_kek.  Add test code to create data using
4884         dhSinglePass-stdDH-sha1kdf-scheme.
4885         * sm/gpgsm.h (opt): Add member force_ecdh_sha1kdf.
4886         * sm/gpgsm.c: Add option --debug-force-ecdh-sha1kdf.
4887
4888         sm: Print algorithm infos in data decryption mode.
4889         + commit 439c9b5cb55044f13d4af6563f4e791093d510b0
4890         * common/sexputil.c (cipher_mode_to_string): New.
4891         * sm/decrypt.c (prepare_decryption): Show cipher algo and mode.
4892         (gpgsm_decrypt): Show key algo and fingerprint
4893
4894         sm: Cleanup the use of GCRY_PK_ECC and GCRY_PK_ECDSA.
4895         + commit 34b628db4618a8712536aea695f934b0286e7b18
4896         * common/sexputil.c (pubkey_algo_to_string): New.
4897         * sm/certcheck.c (do_encode_md): Replace GCRY_PK_ECDSA by GCRY_PK_ECC.
4898         * sm/certreqgen-ui.c (check_keygrip): Add all ECC algorithms.
4899         * sm/gpgsm.c (our_pk_test_algo): Also allow EdDSA.
4900         * sm/verify.c (gpgsm_verify): Map ECC algo to ECDSA.  Use new pubkey
4901         algo name function
4902
4903         sm: Improve readability of the data verification output.
4904         + commit a759fa963a42e0652134130029217270b6d5d00b
4905         * sm/verify.c (gpgsm_verify): Print the used algorithms.
4906
4907 2020-05-07  Werner Koch  <wk@gnupg.org>
4908
4909         card: Allow listing of NKS cards.
4910         + commit 94966347452632f8140fae70f7fcbadcc2b81071
4911         * tools/card-call-scd.c (learn_status_cb): Always fill chvinfo.
4912         * tools/gpg-card.h (struct card_info_s): Increase size of chvinfo and
4913         chvmaxlen.
4914         * tools/gpg-card.c (list_nks): New.
4915         (print_a_version): Support single part version numbers.
4916         (list_card): Call list_nks.
4917
4918         scd:nks: Add framework to support IDKey cards.
4919         + commit 1f6a39092fe4b5f02bc4741a0a23d102d30f4063
4920         * scd/app-nks.c (NKS_APP_IDLM): New.
4921         (struct app_local_s): Replace NKS_VERSION by the global APPVERSION.
4922         (do_learn_status): Always send CHV-STATUS.
4923         (find_fid_by_keyref): Basic support for IDLM only use.
4924         (do_learn_status_core): Ditto.
4925         (do_readcert): Ditto.
4926         (verify_pin): Ditto.
4927         (parse_pwidstr): Ditto.
4928         (do_with_keygrip): Ditto.
4929         (switch_application): Ditto.
4930         (app_select_nks): Fallback to IDLM.
4931
4932         scd:nks: Get the PIN prompts right for the Signature Card.
4933         + commit aecc008acb64ebbb6c667c4a128af4e61da57f84
4934         * scd/app-nks.c (get_dispserialno): Move more to the top.
4935         (do_getattr): Add $DISPSERIALNO and SERIALNO.  Make CHV-STATUS work
4936         with NKS15.
4937         (verify_pin): Use dedicated min. PIN lengths.
4938         (parse_pwidstr): Support NKS15
4939
4940         sm: Print the key types as standard key algorithm strings.
4941         + commit 5c29d25e6c7c0a5a63ab4c46d4624217307adb78
4942         * sm/fingerprint.c (gpgsm_get_key_algo_info): Factor code out to ...
4943         (gpgsm_get_key_algo_info2): new.
4944         (gpgsm_pubkey_algo_string): New.
4945         * sm/keylist.c (list_cert_colon): Put curve into field 17
4946         (list_cert_raw): Print the unified key algotithm string instead of the
4947         algo and size.
4948         (list_cert_std): Ditto.
4949
4950         scd:nks: Support decryption using ECDH.
4951         + commit af45d884aa1c3eccbc6972a2e5197ece3fd1987a
4952         * scd/app-nks.c (struct fid_cache_s): Add field 'algo'.
4953         (keygripstr_from_pk_file): Add arg 'r_algo' to return the algo.
4954         (find_fid_by_keyref): Ditto.
4955         (get_dispserialno): New.
4956         (make_prompt): New.
4957         (verify_pin): Provide better prompts.
4958         (do_decipher): Support ECDH.
4959         (parse_pwidstr): Add hack tospecify any pwid..
4960         (do_change_pin): Support Signature Card V2.0 (NKS15) style NullPIN.
4961         Provide a better prompt.
4962
4963         sm: Support decryption of ECDH data using a smartcard.
4964         + commit ee6d29f1797e06977ae3d2edae9edc1165c6f144
4965         * sm/decrypt.c (ecdh_decrypt): Add arg nbits and detect bare secret.
4966         (prepare_decryption): Add arg nbits and pass on.
4967         (gpgsm_decrypt): Pass size of curve to prepare_decryption.
4968
4969 2020-05-05  Werner Koch  <wk@gnupg.org>
4970
4971         scd: Extend an internal function to also return the algo.
4972         + commit 314859d7e7de5010ca1e9d90b83acf3bc8493631
4973         * scd/app-help.c (app_help_get_keygrip_string_pk): Add optional arg
4974         r_algo.  Change all callers.
4975         (app_help_get_keygrip_string): Ditto.
4976
4977 2020-05-04  Werner Koch  <wk@gnupg.org>
4978
4979         scd:nks: Add do_with_keygrip and implement a cache.
4980         + commit 1e72a1a218490c0fc07811a02ddad6cc38913f77
4981         * scd/app-nks.c (struct fid_cache_s): New.
4982         (struct app_local_s): Add field 'fid_cache'.
4983         (do_deinit): Release the cache.
4984         (keygripstr_from_pk_file): Implement the cache.
4985         (find_fid_by_keyref): New
4986         (do_sign, do_decipher): Use new function.
4987         (do_with_keygrip): New.
4988
4989         sm: Support encryption using ECDH keys.
4990         + commit d5051e31a8fc07c339253c6b82426e0d0115a20a
4991         * sm/decrypt.c (hash_ecc_cms_shared_info): Make global.
4992         * sm/encrypt.c (ecdh_encrypt): New.
4993         (encrypt_dek): Add arg PK_ALGO and support ECDH.
4994         (gpgsm_encrypt): Pass PK_ALGO.
4995
4996 2020-04-27  Werner Koch  <wk@gnupg.org>
4997
4998         sm: Add support to export ECC private keys.
4999         + commit 5da6925a334c68d736804d8f19a684a678409d99
5000         * sm/minip12.c [TEST]: Remove test code.  Include util.h, tlv.h. and
5001         openpgpdefs.h.  Remove the class and tag constants and replace them by
5002         those from tlv.h.
5003         (builder_add_oid, builder_add_mpi): New.
5004         (build_key_sequence): Rename to ...
5005         (build_rsa_key_sequence): this.
5006         (build_ecc_key_sequence): New.
5007         (p12_build): Call RSA or ECC builder.
5008         (p12_raw_build): Ditto.
5009         * sm/export.c (gpgsm_p12_export): Use correct armor header for ECC.
5010         (sexp_to_kparms): Support ECC.
5011
5012         * sm/t-minip12.c: New to replace the former TEST code in minip12.h.
5013
5014 2020-04-24  Werner Koch  <wk@gnupg.org>
5015
5016         common: Add an easy to use DER builder.
5017         + commit 5ea878274ef51c819368f021c69c518b9aef6f82
5018         * common/tlv-builder.c: New.
5019         * common/tlv.c: Remove stuff only used by GnuPG 1.
5020         (put_tlv_to_membuf, get_tlv_length): Move to ...
5021         * common/tlv-builder.c: here.
5022         * common/tlv.h (tlv_builder_t): New.
5023
5024 2020-04-23  Werner Koch  <wk@gnupg.org>
5025
5026         sm: Support decryption of ECDH data.
5027         + commit 95d83cf906177fe9f00e88ae42d4c118c7db4371
5028         * sm/decrypt.c: Include tlv.h.
5029         (string_from_gcry_buffer): New.
5030         (hash_ecc_cms_shared_info): New.
5031         (ecdh_decrypt): New.
5032         (prepare_decryption): Support ECDH.  Add arg pk_algo.
5033         (gpgsm_decrypt): Lift some variables from an inner code block.
5034
5035         common: Add functions to help create DER objects.
5036         + commit 5d015b38eb9f828acf522fa89e4944f3b343678c
5037         * common/tlv.c (put_tlv_to_membuf): New.
5038         (get_tlv_length): New.
5039         * common/tlv.h: Include membuf.h.
5040
5041 2020-04-21  Werner Koch  <wk@gnupg.org>
5042
5043         sm: Support import of PKCS#12 encoded ECC private keys.
5044         + commit 8dfef5197af9f655697e0095c6613137d51c91e7
5045         * sm/minip12.c: Include ksba.h.
5046         (oid_pcPublicKey): New const.
5047         (parse_bag_data): Add arg 'r-curve'.  Support parsing of ECC private
5048         keys.
5049         (p12_parse): Add arg 'r_curve'.
5050         * sm/import.c (parse_p12): Support ECC import.
5051
5052 2020-04-17  Werner Koch  <wk@gnupg.org>
5053
5054         scd:nks: Allow retrieving certificates from a Signature Card v.20.
5055         + commit f05a32e5c9db7d0840c74fccc350a9e0ff5fb819
5056         * scd/app-nks.c: Major rework to support non-RSA cards.
5057
5058         scd: Detect missing card in "getinfo all_active_apps".
5059         + commit 3633ca6e21f7feb97b6690025614575bb6909f8b
5060         * scd/app.c (send_card_and_app_list): Detect no app case.
5061
5062 2020-04-16  Werner Koch  <wk@gnupg.org>
5063
5064         sm: Always allow authorityInfoAccess lookup if CRLs are also enabled.
5065         + commit bbb7edb8807b7d3c8bb5284d8fdf21adb67cd87d
5066         * sm/certchain.c (find_up): Disable external lookups in offline mode.
5067         Always allow AKI lookup if CRLs are also enabled.
5068
5069         sm: Lookup missing issuers first using authorityInfoAccess.
5070         + commit f5efbd5a1169ca7700f430a4a26ba086e603c887
5071         * sm/call-dirmngr.c (gpgsm_dirmngr_lookup): Add optional arg URL and
5072         adjust all callers.
5073         * sm/certchain.c (oidstr_caIssuers): New.
5074         (struct find_up_store_certs_s): Add additional fields.
5075         (find_up_store_certs_cb): Store the fingerprint.
5076         (find_up_via_auth_info_access): New.
5077         (find_up): Try the AIA URI first.
5078
5079         dirmngr: Allow http URLs with "LOOKUP --url"
5080         + commit 7f1be1ea524ee53d8c7b628e0305b61ebad4ab25
5081         * dirmngr/crlfetch.c (read_cert_via_http): New.
5082         (fetch_cert_by_url): Implement http scheme.
5083
5084         gpg: Make AEAD modes subject to compliance checks.
5085         + commit cec397e00240829495de2b487fe60d997d810c03
5086         * g10/decrypt-data.c (decrypt_data): Move aead algo detection up.
5087
5088 2020-04-15  Werner Koch  <wk@gnupg.org>
5089
5090         gpg: Fix broken setting of AEAD algo.
5091         + commit df0edaf91a220f8c6dffbfd1f795e229858b096b
5092         * g10/main.h (DEFAULT_AEAD_ALGO): Set to OCB.
5093
5094         sm,dirmngr: Restrict allowed parameters used with rsaPSS.
5095         + commit c0d5c673542b3d517c33fe1a9ab26bcda1a5a95f
5096         * sm/certcheck.c (extract_pss_params): Check the used PSS params.
5097         * dirmngr/crlcache.c (finish_sig_check): Ditto.
5098         * dirmngr/validate.c (check_cert_sig): Ditto.
5099
5100 2020-04-15  NIIBE Yutaka  <gniibe@fsij.org>
5101
5102         regexp: Fix generation of _unicode_mapping.c.
5103         + commit 50b320952e99ea20f9b77c6c501280fe37fd2598
5104         * configure.ac (AWK_HEX_NUMBER_OPTION): Detect GNU Awk.
5105         * regexp/Makefile.am: Use AWK_HEX_NUMBER_OPTION.
5106         * regexp/parse-unidata.awk: Don't use strtonum.
5107
5108 2020-04-14  Werner Koch  <wk@gnupg.org>
5109
5110         sm: Support rsaPSS verification also for CMS signatures.
5111         + commit 6c28d9343ea6df9cda1b69e77751a9e958eb3d70
5112         * sm/certcheck.c (gpgsm_check_cert_sig): Factor PSS parsing out to ...
5113         (extract_pss_params): new.
5114         (gpgsm_check_cms_signature): Implement PSS.
5115
5116 2020-04-09  Werner Koch  <wk@gnupg.org>
5117
5118         dirmngr: Support rsaPSS also in the general validate module.
5119         + commit ba34f1415366d91d1831d717ec310ddda33f9cc4
5120         * dirmngr/validate.c (hash_algo_from_buffer): New.
5121         (uint_from_buffer): New.
5122         (check_cert_sig): Support rsaPSS.
5123         * sm/certcheck.c (gpgsm_check_cert_sig): Fix small memory leak on
5124         error.
5125
5126         sm,dirmngr: Support rsaPSS signature verification.
5127         + commit b45ab0ca08f8d6f9831192210b9ab141f4e450cf
5128         * sm/certcheck.c (hash_algo_from_buffer): New.
5129         (uint_from_buffer): New.
5130         (gpgsm_check_cert_sig): Handle PSS.
5131         * dirmngr/crlcache.c (hash_algo_from_buffer): New.
5132         (uint_from_buffer): New.
5133         (start_sig_check): Detect PSS and extract hash algo.  New arg to
5134         return a PSS flag.
5135         (finish_sig_check): New arg use_pss.  Extract PSS args and use them.
5136         (crl_parse_insert): Pass use_pss flag along.
5137
5138         common: New function to map hash algo names.
5139         + commit 5d5b70ae0f515290a3d64daa1d687fe8c8477f76
5140         * common/sexputil.c (hash_algo_to_string): New.
5141
5142         scd:p15: Return a display S/N via Assuan.
5143         + commit bfedc760efdcf606da7c214e84d12a10ee4cbcc0
5144         * scd/app-p15.c (make_pin_prompt): Factor some code out to ...
5145         (get_dispserialno): this.
5146         (do_getattr): Use new fucntion for a $DISPSERIALNO.
5147
5148 2020-04-08  NIIBE Yutaka  <gniibe@fsij.org>
5149
5150         gpg: ECDH: Accept longer padding.
5151         + commit fd79cadf7ba5ce45dfb5e266975f58bf5c7ce145
5152         * g10/pubkey-enc.c (get_it): Remove check which mandates shorter
5153         padding.
5154
5155 2020-04-07  Werner Koch  <wk@gnupg.org>
5156
5157         scd:p15: Show a pretty PIN prompt.
5158         + commit 9ec8d984be4676126843d5aa7dfd0b7d71eff13c
5159         * scd/app-p15.c (struct prkdf_object_s): New fields common_name and
5160         serial_number.
5161         (release_prkdflist): Free them.
5162         (keygrip_from_prkdf): Parse cert and set them.
5163         (any_control_or_space): New.
5164         (make_pin_prompt): New.
5165         (verify_pin): Construct a pretty PIN prompt.
5166         (do_sign): Remove debug output.
5167
5168         scd: Return GPG_ERR_BAD_PIN on 0x63Cn status word.
5169         + commit f28795b615c3042f6eb7c9d941e232d0da50efbc
5170         * scd/iso7816.c (map_sw): Detect 0x63Cn status code.
5171
5172         scd: Factor common PIN status check out.
5173         + commit 60d018f6a91c4c90b8ecf13f88ac4256699f4007
5174         * scd/iso7816.h (ISO7816_VERIFY_ERROR): New.
5175         (ISO7816_VERIFY_NO_PIN): New.
5176         (ISO7816_VERIFY_BLOCKED): New.
5177         (ISO7816_VERIFY_NULLPIN): New.
5178         (ISO7816_VERIFY_NOT_NEEDED): New.
5179         * scd/iso7816.c (iso7816_verify_status): New.
5180         * scd/app-nks.c (get_chv_status): Use new function.
5181         * scd/app-piv.c (get_chv_status): Ditto.
5182         (verify_chv): Ditto.
5183
5184         scd:p15: Fix decrypt followed by sign problem for D-Trust cards.
5185         + commit 42ddcc87f4bca40d605d133b6cdb4e761a49a1c9
5186         * scd/iso7816.c (iso7816_select_mf): New.
5187         * scd/app-p15.c (card_product_t): New.
5188         (struct app_local_s): Add field 'card_product'.
5189         (read_ef_tokeninfo): Detect D-Trust card.
5190         (prepare_verify_pin): Switch to D-Trust AID.
5191         (do_decipher): Restore a SE for D-TRust cards.  Chnage the passing
5192         indicator to 0x81.
5193
5194 2020-04-06  NIIBE Yutaka  <gniibe@fsij.org>
5195
5196         tools: Use internal regexp routines.
5197         + commit 7ee2a9687da9560a5d17c7046c87c2f7a6733d5c
5198         * tools/gpg-check-pattern.c: Use jimregexp.h.
5199
5200 2020-04-03  Werner Koch  <wk@gnupg.org>
5201
5202         scd:p15: Emit MANUFACTURER, $ENCRKEYID, $SIGNKEYID.
5203         + commit aa60645b997d23ac2958f75fd349c1cd7b8af902
5204         * scd/app-p15.c (read_ef_tokeninfo): Store manufacturer_id.
5205         (do_getattr): Implement MANUFACTURER, $ENCRKEYID and $SIGNKEYID.
5206         (send_keypairinfo): Also print usage flags.
5207
5208         gpg,card: Use the new MANUFACTURER attribute.
5209         + commit 15352b0eac335e7993fcd7720106a3a7d22caae1
5210         * tools/gpg-card.h (struct card_info_s): Add manufacturer fields.
5211         * tools/card-call-scd.c (release_card_info): Release them.
5212         (learn_status_cb): Parse MANUFACTURER attribute.
5213         * tools/gpg-card.c (get_manufacturer): Remove.
5214         (list_card): Use the new attribute.
5215         * g10/call-agent.h (struct agent_card_info_s): Add manufacturer fields.
5216         * g10/call-agent.c (agent_release_card_info): Release them.
5217         (learn_status_cb): Parse MANUFACTURER attribute.
5218         * g10/card-util.c (get_manufacturer): Remove.
5219         (current_card_status): Use new attribute.
5220
5221         scd:openpgp: New attribute "MANUFACTURER".
5222         + commit 541a6a903e79c9146a379f5c6c0fb34e6c2b42c4
5223         * scd/app-openpgp.c (get_manufacturer): New..
5224         (do_getattr): Add new attribute "MANUFACTURER".
5225         (do_learn_status): Always print it.
5226
5227 2020-04-03  NIIBE Yutaka  <gniibe@fsij.org>
5228
5229         gpg: Add regular expression support.
5230         + commit ba247a114c75a84473c11c1484013b09fbb9bcd1
5231         * AUTHORS, COPYING.other: Update.
5232         * Makefile.am (SUBDIRS): Add regexp sub directory.
5233         * configure.ac (DISABLE_REGEX): Remove.
5234         * g10/Makefile.am (needed_libs): Add libregexp.a.
5235         * g10/trustdb.c: Remove DISABLE_REGEX support.
5236         * regexp/LICENSE, regexp/jimregexp.c, regexp/jimregexp.h,
5237           regexp/utf8.c, regexp/utf8.h: New from Jim Tcl.
5238         * regexp/UnicodeData.txt: New from Unicode.
5239         * regexp/Makefile.am, regexp/parse-unidata.awk: New.
5240         * tests/openpgp/Makefile.am: Remove DISABLE_REGEX support.
5241         * tools/Makefile.am: Remove DISABLE_REGEX support.
5242
5243 2020-04-02  Werner Koch  <wk@gnupg.org>
5244
5245         scd:p15: Implement do_with_keygrip and capabilities.
5246         + commit 61c5b0767fac4c2d7fe95cdbc6d0f0a94878c813
5247         * scd/app-p15.c (prepare_verify_pin): Allow use without an AODF.
5248         (verify_pin): Ditto.
5249         (do_with_keygrip): Implement capability restrictions.
5250
5251         scd:p15: Rename some variables and functions for clarity.
5252         + commit 8149742ddfea6c76898786cb7de7c92bbf8aab0a
5253         * scd/app-p15.c: Rename keyinfo to prkdf.
5254
5255         scd: Use Gcrypt usage constants for the do_with_keygrip capabilities.
5256         + commit 5b7b42e2b2b7ba7b88f89ff4b4ee7baf0eef2a04
5257         * scd/command.c (cmd_keyinfo): Use Gcrypt constants for CAP.
5258         * scd/app-openpgp.c (do_with_keygrip): Adjust for them.
5259         * scd/app-piv.c (do_with_keygrip): Ditto.
5260
5261 2020-04-02  NIIBE Yutaka  <gniibe@fsij.org>
5262
5263         scd: New command DEVINFO.
5264         + commit 2ccbcfec121f768574a59aa2ecff22d8b422d61b
5265         * scd/app.c (notify_cond): New condition variable.
5266         (app_send_devinfo, app_wait): New.
5267         (scd_update_reader_status_file): Kick NOTIFY_COND.
5268         (initialize_module_command): Initialize NOTIFY_COND.
5269         * scd/command.c (struct server_local_s):  Add watching_status.
5270         (cmd_devinfo): New.
5271         (register_commands): Add DEVINFO command.
5272         (send_client_notifications): Write status change to DEVINFO channel.
5273         * scd/scdaemon.h (app_wait, app_send_devinfo): New.
5274
5275 2020-04-01  Werner Koch  <wk@gnupg.org>
5276
5277         scd:p15: Cache the PIN.
5278         + commit 29f8f52bf8161c238c26389ab178caa98801234e
5279         * scd/app-p15.c (struct prkdf_object_s): Add flag pin_verified.
5280         (verify_pin): Make use of it.
5281
5282         scd:p15: Run a keygrip_from_prkdf before verify_pin.
5283         + commit 132d82c1582009013af5c7bdb17cbaaa8807c70e
5284         * scd/app-p15.c (do_sign): Move keygrip_from_prkdf before PIN
5285         verification.
5286         (do_decipher): Add keygrip_from_prkdf.
5287
5288         scd:p15: Support decryption with CardOS 5 cards.
5289         + commit ca4391399c690a45270cca30f03ac564c394c1f6
5290         * scd/app-p15.c (do_decipher): New.
5291
5292         scd:p15: Factor PIN verification out to a new function.
5293         + commit 375b1454875ff079efc122e33b1216b412eecfaf
5294         * scd/app-p15.c (do_sign): Factor code out to ...
5295         (prepare_verify_pin, verify_pin): new functions.
5296
5297         sm: Fix a warning in an es_fopencooie function.
5298         + commit c7ff8c59b9252f8f27cabee3fea503f06c7d46ff
5299         * sm/certdump.c (format_name_writer): Take care of a flush request.
5300
5301 2020-03-31  Werner Koch  <wk@gnupg.org>
5302
5303         scd:p15: Support signing with CardOS 5 cards.
5304         + commit 103c1576b73ed75b771a8ffd1c97628651b99797
5305         * scd/app-help.c (app_help_get_keygrip_string_pk): Add optional arg
5306         r_pkey and change all callers.
5307         (app_help_get_keygrip_string): Ditto.
5308         * scd/app-p15.c (struct cdf_object_s): Use bit flags
5309         (struct aodf_object_s): Ditto.  Add field 'fid'.
5310         (struct prkdf_object_s): Ditto.  Add fields keygrip, keyalgo, and
5311         keynbits.
5312         (parse_certid): Allow a keygrip instead of a certid aka keyref.
5313         (read_ef_aodf): Store the FID.
5314         (keygripstr_from_prkdf): Rename to ...
5315         (keygrip_from_prkdf): this.  Remove arg r_gripstr and implement cache.
5316         Change callers to directly use the values from the object.  Also store
5317         the algo and length of the key ion the object.
5318         (keyref_from_keyinfo): New. Factored out code.
5319         (do_sign): Support SHA-256 and >2048 bit RSA keys.
5320         (do_with_keygrip): New.
5321         (app_select_p15): Register new function.
5322
5323         scd:p15: Read certificates in extended mode.
5324         + commit 2bdd4fc7b6cfd9ac5410d20f1cee66567a6b24c5
5325         * scd/app-p15.c (readcert_by_cdf): Allow reading in extended mode.
5326
5327         scd: Add function for binary read in extended mode.
5328         + commit c9ad81070a2bb1116d3f096a440c43e57e6f933a
5329         * scd/iso7816.c (iso7816_read_binary): Factor code out to ...
5330         (iso7816_read_binary_ext): new function.  Add arg extended_mode.
5331
5332 2020-03-30  Werner Koch  <wk@gnupg.org>
5333
5334         scd:p15: Detect CardOS 5 cards and print some basic infos.
5335         + commit 8a68d497f1dd0b124318eb47db9da0c4b64c8b8b
5336         * scd/app-p15.c (read_ef_odf): Detect the home_DF on the fly.  Silence
5337         the garbage warning for null bytes.
5338         (print_tokeninfo_tokenflags): New.
5339         (read_ef_tokeninfo): Print manufacturer, label, and flags.
5340         (app_select_p15): No need to use the app_get_slot macro.
5341         (CARD_TYPE_CARDOS_50): New const.
5342         (card_atr_list): Detect CardOS 5.0
5343
5344         agent: Print an error if gpg-protect reads the extended key format.
5345         + commit c5c21a064671dc8e461434d19cbde67b89df25e2
5346         * agent/protect-tool.c (read_key): Detect simple extended key format.
5347
5348         sm: Fix possible NULL deref in error messages of --gen-key.
5349         + commit 9c5c7c6f602c84589cd5c93a85a27b416e744338
5350         * sm/certreqgen.c: Protect printing the liniernur in case of !R.
5351
5352 2020-03-27  Werner Koch  <wk@gnupg.org>
5353
5354         sm: Consider certificates w/o CRL DP as valid.
5355         + commit 0b583a555e75fbb9140310390a267febd3329a12
5356         * sm/certchain.c (is_cert_still_valid): Shortcut if tehre is no DP.
5357         * common/audit.c (proc_type_verify): Print "n/a" if a cert has no
5358         distribution point.
5359         * sm/gpgsm.h (opt): Add field enable_issuer_based_crl_check.
5360         * sm/gpgsm.c (oEnableIssuerBasedCRLCheck): New.
5361         (opts): Add option --enable-issuer-based-crl-check.
5362         (main): Set option.
5363
5364         scd:openpgp: Allow PKSIGN with keygrip also for OPENPGP.3.
5365         + commit 4c4999b8185ace55eb5f3a6fa7d3dc0a77267b63
5366         * scd/app-openpgp.c (check_keyidstr): Add optional arg r_use_auth to
5367         test also for OpenPGP.3.
5368         (do_sign): Enable that new mode.
5369
5370 2020-03-27  NIIBE Yutaka  <gniibe@fsij.org>
5371
5372         gpgsm: Fix the previous commit.
5373         + commit e06a8e3e87f044a5bf6ee06f92cc4fd2a0914863
5374
5375
5376 2020-03-26  NIIBE Yutaka  <gniibe@fsij.org>
5377
5378         gpgsm: Support key generation with ECC.
5379         + commit 49ea53b755f0fef468055a1493e790735908f865
5380         * sm/certreqgen.c (pKEYCURVE): New.
5381         (read_parameters): Add pKEYCURVE handling.
5382         (proc_parameters): Support ECC key generation.
5383
5384         gpgsm: Remove restriction of key generation (only RSA).
5385         + commit 238707db8b05a385af5419e606ea5110ace31d2b
5386         * sm/certreqgen.c (proc_parameters): Remove checking GCRY_PK_RSA.
5387
5388 2020-03-19  Werner Koch  <wk@gnupg.org>
5389
5390         gpgconf: Take care of --homedir when reading/updating options.
5391         + commit c1844ca7520f9a67bff85ee4fbf49c6725668289
5392         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Remove unused var.
5393         (scdaemon_runtime_change): Ditto.
5394         (dirmngr_runtime_change): Ditto.
5395         (gc_component_check_options): Pass --homedir if needed.
5396         (retrieve_options_from_program): Take care of --homedir.
5397
5398 2020-03-18  Werner Koch  <wk@gnupg.org>
5399
5400         gpg: Also allow a v5 fingerprint for --trusted-key.
5401         + commit 4287f89557b3bc9ab2876331e1bcb143d759fb47
5402         * g10/trustdb.c (tdb_register_trusted_key): Add case for 32 octet
5403         fingerprints.
5404
5405 2020-03-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
5406
5407         gpg: Update --trusted-key to accept fingerprint as well as long key id.
5408         + commit 810ea2cc684480c6aadceb2a10dd00f3fa67f2fb
5409         * g10/trustdb.c (tdb_register_trusted_key): accept fingerprint as well
5410         as long key ID.
5411         * doc/gpg.texi: document that --trusted-key can accept a fingerprint.
5412
5413 2020-03-18  Werner Koch  <wk@gnupg.org>
5414             gniibe@fsij.org
5415
5416         gpg: Fix key expiration and usage for keys created at the Epoch.
5417         + commit 161a098be6f9d50fb5f7e120baee81e75d6eb5ad
5418         * g10/getkey.c (merge_selfsigs_main): Take a zero key creation time in
5419         account.
5420
5421 2020-03-14  Werner Koch  <wk@gnupg.org>
5422
5423         gpgconf: Further simplify the gpgconf option processing.
5424         + commit 451cd1b3928172b312ca2597c3318e6e9e8be97d
5425         * common/gc-opt-flags.h (GC_OPT_FLAG_RUNTIME): Move to ...
5426         * tools/gpgconf-comp.c: here.
5427         (known_options_scdaemon): Remove "options".
5428         (known_options_dirmngr): Remove "options".
5429         (known_options_gpgsm): Remove "options".
5430         (known_options_gpg): Remove "options" and "keyserver".
5431         (struct gc_option_s): Rename active t gpgconf_list.
5432         (gc_component_list_options): Do not act upon active.
5433         (option_check_validity): Ditto.
5434         (is_known_option): Make it work correctly for unknown options.
5435         (retrieve_options_from_program): Use renamed flag gpgconf_list only to
5436         detect duplicated items from --gpgconf-list.  Do not set runtime.
5437         Only e set the options if set by --gpgconf-list; never clear them.
5438         * agent/gpg-agent.c: Simplify the --gpgconf-list output.
5439         * dirmngr/dirmngr.c: Ditto.
5440         * g10/gpg.c: Ditto.
5441         * kbx/keyboxd.c: Ditto.
5442         * scd/scdaemon.c: Ditto.
5443         * sm/gpgsm.c: Ditto.
5444         * tests/openpgp/gpgconf.scm: Use "compliance" instead of "keyserver"
5445         for the string arg test.
5446
5447         gpg: New option --auto-key-import.
5448         + commit 6b306f45f4fbe36b90cec4685aabb267a61e283f
5449         * g10/gpg.c (opts): New options --auto-key-import,
5450         --no-auto-key-import, and --no-include-key-block.
5451         (gpgconf_list): Add them.
5452         * g10/options.h (opt): Add field flags.auto_key_import.
5453         * g10/mainproc.c (check_sig_and_print): Use flag to enable that
5454         feature.
5455         * tools/gpgconf-comp.c: Give the new options a Basic config level.
5456
5457 2020-03-13  Werner Koch  <wk@gnupg.org>
5458
5459         gpg: Make use of the included key block in a signature.
5460         + commit 6a4443c8425fd548020553b22d5a16ffad98371f
5461         * g10/import.c (read_key_from_file): Rename to ...
5462         (read_key_from_file_or_buffer): this and add new parameters.  Adjust
5463         callers.
5464         (import_included_key_block): New.
5465         * g10/packet.h (PKT_signature): Add field flags.key_block.
5466         * g10/parse-packet.c (parse_signature): Set that flags.
5467         * g10/sig-check.c (check_signature2): Add parm forced_pk and change
5468         all callers.
5469         * g10/mainproc.c (do_check_sig): Ditto.
5470         (check_sig_and_print): Try the included key block if no key is
5471         available.
5472
5473         gpg: New option --include-key-block.
5474         + commit 865d485180240369a20d3be14d0c6499783df2b5
5475         * common/openpgpdefs.h (SIGSUBPKT_KEY_BLOCK): New.
5476         * g10/gpg.c (oIncludeKeyBlock): New.
5477         (opts): New option --include-key-block.
5478         (main): Implement.
5479         * g10/options.h (opt): New flag include_key_block.
5480         * g10/parse-packet.c (dump_sig_subpkt): Support SIGSUBPKT_KEY_BLOCK.
5481         (parse_one_sig_subpkt): Ditto.
5482         (can_handle_critical): Ditto.
5483         * g10/sign.c (mk_sig_subpkt_key_block): New.
5484         (write_signature_packets): Call it for data signatures.
5485
5486         gpg: Add property "fpr" for use by --export-filter.
5487         + commit 32493ce50ad880de7b548d7870c6040a8233a8f5
5488         * g10/export.c (push_export_filters): New.
5489         (pop_export_filters): New.
5490         (export_pubkey_buffer): Add args prefix and prefixlen.  Adjust
5491         callers.
5492         * g10/import.c (impex_filter_getval): Add property "fpr".
5493         * g10/main.h (struct impex_filter_parm_s): Add field hexfpr.
5494
5495 2020-03-12  Werner Koch  <wk@gnupg.org>
5496
5497         gpgconf: Rewrite the gpgconf-comp module.
5498         + commit b4f1159a5bd7b2799d7d35e883e0632ebf3339c8
5499         * tools/gpgconf.h (gc_component_t): Change type to ...
5500         (gc_component_id_t): this.
5501         (GC_COMPONENT_ANY): New, so that we can use that in gpgconf-comp.c
5502         directly.
5503         * tools/gpgconf-comp.c: Major rework.
5504
5505 2020-03-06  Werner Koch  <wk@gnupg.org>
5506
5507         gpg: Re-group the options in the --help output.
5508         + commit 41eb5108ce59244d961df43bbf73b8aa6e95e9cd
5509         * g10/gpg.c (opts): Change oLoadExtensions, oStrict, and oNoStrict to
5510         use ARGPARSE_ignore and remove the code in the option switch.
5511
5512         agent: Re-group the options in the --help output.
5513         + commit c693b7f4ade97357c33b410728bb741674255487
5514         * agent/gpg-agent.c (oGreeting): Remove non existant dummy option.
5515
5516         gpgconf: Support reading global options (part 2).
5517         + commit 4423e9dcde5e1a8d73ff7386942fe3c0c4b917fc
5518         * tools/gpgconf-comp.c: Remove all regular option descriptions.  They
5519         are now read in from the component.  Also remove a few meanwhile
5520         obsolete options.
5521         * agent/gpg-agent.c: Add option description which were only set in
5522         gpgconf-comp.c.
5523         * dirmngr/dirmngr.c: Ditto.
5524         * scd/scdaemon.c: Ditto.
5525         * sm/gpgsm.c: Ditto.
5526         * g10/gpg.c: Ditto.
5527
5528 2020-03-05  Werner Koch  <wk@gnupg.org>
5529
5530         gpgconf: Support reading global options (part 1).
5531         + commit d2425d1495f4fe4f5c3a79d7dc5571fda00849d8
5532         * tools/gpgconf.c (main): Set the coinfig directories.
5533         * tools/gpgconf-comp.c (gc_backend): Change the name of the config
5534         files.
5535         (struct gc_option): Add new field 'attr'.
5536         (retrieve_options_from_program): Rewrite to use gpgrt_argparser.
5537
5538 2020-03-04  Werner Koch  <wk@gnupg.org>
5539
5540         common: Add xreallocarray function.
5541         + commit 6fa1808cb7639f0f3745b78c4b7ce902e42b228c
5542         * common/miscellaneous.c (xreallocarray): New func.
5543         * common/util.h (xtryreallocarray): New macro.
5544
5545 2020-03-03  Werner Koch  <wk@gnupg.org>
5546
5547         gpgconf: Always use xmalloc.
5548         + commit 178b3772ff79148b496715da1b8ca5ba86caf2bc
5549         * tools/gpgconf-comp.c: Fix spelling of "cannot".  Use log_assert
5550         instead of a plain assert.
5551         (gc_percent_escape, percent_deescape): Fail on malloc error.
5552
5553 2020-02-28  NIIBE Yutaka  <gniibe@fsij.org>
5554
5555         scd: Fix the previous commit.
5556         + commit 19f70b5072b2ef80759ced83fe0dac9cf4dde830
5557         * scd/app-openpgp.c (do_setattr): Flush the KDF DO just before setting.
5558
5559         scd: Improve setattr for KDF.
5560         + commit 3ba7c9bcf7f19b0a308499fcf3dbbb15da38799a
5561         * scd/app-openpgp.c (do_setattr): For setting KDF DO, support standard
5562         OpenPGP card, which needs to update PIN.
5563
5564         scd: Fix pinpad handling when KDF enabled.
5565         + commit 11da441016222337284c519ff56aca34e3042373
5566         * scd/app-openpgp.c (do_getattr): Send the KDF DO information.
5567
5568 2020-02-25  Werner Koch  <wk@gnupg.org>
5569
5570         gpg: Re-enable versioned config files.
5571         + commit 79f2318aa5c54c57220aa73251635d21cee0ccfa
5572         * g10/gpg.c (main): Use ARGPARSE_FLAG_USERVERS.
5573
5574         gpg: Re-add checking of config file permissions.
5575         + commit 7e8f28653c1b4305758a61c064d793e32ba633d5
5576         * g10/gpg.c (main): Re-add permission checking of the user config
5577         file.  Re-add code to check against the SE-Linux secured file list.
5578         (get_default_configname): Remove unused func.
5579         * configure.ac (SAFE_VERSION, SAFE_VERSION_DOT)
5580         (SAFE_VERSION_DASH): Remove.
5581
5582 2020-02-22  Werner Koch  <wk@gnupg.org>
5583
5584         Use gpgrt's new option parser for the new keyboxd.
5585         + commit 833c04334a53530bd40d7dd815b6a0f1ffef296d
5586         * kbx/keyboxd.c: Switch to the new option parser and enable a global
5587         conf file.
5588
5589         agent,dirmngr: Re-read the user specified config file.
5590         + commit 941a48f9b12b4c470686321bf4fd58c23b6cf86d
5591         * agent/gpg-agent.c (reread_configuration): Use a two-part config
5592         file.
5593         * dirmngr/dirmngr.c (reread_configuration): Ditto.
5594
5595         Remove the now obsolete argparse code.
5596         + commit cdbe10b762f38449b86da69076209324b0c99982
5597         * tests/gpgscm/main.c: Switch to the new option parser.
5598         * common/argparse.c, common/argparse.h: Remove.
5599         * common/init.c (_init_common_subsystems): Do not call obsolete func.
5600         * common/Makefile.am (common_sources): Remove those files.
5601
5602 2020-02-21  Werner Koch  <wk@gnupg.org>
5603
5604         Use gpgrt's new option parser for the remaining daemons.
5605         + commit ba463128ce65a0f347643f7246a8e097c5be19f1
5606         * scd/scdaemon.c: Switch to the new option parser and enable a global
5607         conf file.
5608         * dirmngr/dirmngr.c: Ditto.
5609         * g13/g13.c: Ditto.
5610         * g13/g13-syshelp.c: Ditto.  Do not force verbose mode.
5611         * dirmngr/dirmngr_ldap.c: Switch to the new option parser.
5612         * dirmngr/dirmngr-client.c: Switch to the new option parser.
5613
5614         Use gpgrt's new option parser for the tools.
5615         + commit 3bc004decd289810bc1b6ad6fb8f47e45c770ce6
5616         * agent/preset-passphrase.c: Switch to the new option parser.
5617         * agent/protect-tool.c: Ditto.
5618         * kbx/kbxutil.c: Ditto.
5619         * tools/gpg-card.c: Ditto.
5620         * tools/gpg-check-pattern.c: Ditto.
5621         * tools/gpg-connect-agent.c: Ditto.
5622         * tools/gpg-pair-tool.c: Ditto.
5623         * tools/gpg-wks-client.c: Ditto.
5624         * tools/gpg-wks-server.c: Ditto.
5625         * tools/gpgconf.c: Ditto.
5626         * tools/gpgsplit.c: Ditto.
5627         * tools/gpgtar.c: Ditto.
5628
5629 2020-02-20  Werner Koch  <wk@gnupg.org>
5630
5631         Use gpgrt's new option parser for gpgc, gpgsm, and gpg-agent.
5632         + commit 2c823bd878fcdbcc4f6c34993e1d0539d9a6b237
5633         * g10/gpgv.c: Use new option parser.
5634         * sm/gpgsm.c: Ditto.
5635         * agent/gpg-agent.c: Ditto.
5636         (opts): Add option --no-options.
5637
5638         gpg: Use gpgrt's new option parser to provide a global conf file.
5639         + commit 0e8f6e2aa98c212442001036fb5178cd6cd8af59
5640         * common/util.h: Remove argparse.h.
5641         * common/argparse.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS.
5642         * configure.ac (GPGRT_ENABLE_ARGPARSE_MACROS): Define.
5643         * agent/gpg-agent.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS and include
5644         argparse.h.  Do this also for all main modules which use our option
5645         parser except for gpg.  Replace calls to strusage by calls to
5646         gpgrt_strusage everywhere.
5647
5648         * g10/gpg.c (opts): Change type to gpgrt_opt_t.  Flag oOptions and
5649         oNoOptions with ARGPARSE_conffile and ARGPARSE_no_conffile.
5650         (main): Change type of pargs to gpgrt_argparse_t.  Rework the option
5651         parser to make use of the new gpgrt_argparser.
5652
5653 2020-02-19  Werner Koch  <wk@gnupg.org>
5654
5655         card: New option --info for command list and select by s/n.
5656         + commit ee911df979e9b53787162367865ca24682adae6e
5657         * tools/gpg-card.c (cmd_list): add option --info.  Factor soem code
5658         out to ...
5659         (print_card_list): new.
5660
5661 2020-02-19  NIIBE Yutaka  <gniibe@fsij.org>
5662
5663         gpg: Fix default-key selection when card is available.
5664         + commit 41913d76f7db4a7dabab26c1bc439c96ad86712f
5665         * g10/getkey.c (get_seckey_default_or_card): Handle the case
5666         when card key is not suitable for requested usage.
5667
5668 2020-02-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
5669
5670         Spelling cleanup.
5671         + commit 0904b8ef348a52335c378bee6dc90a978885d66f
5672         No functional changes, just fixing minor spelling issues.
5673
5674         ---
5675
5676         Most of these were identified from the command line by running:
5677
5678           codespell \
5679             --ignore-words-list fpr,stati,keyserver,keyservers,asign,cas,iff,ifset \
5680             --skip '*.po,ChangeLog*,help.*.txt,*.jpg,*.eps,*.pdf,*.png,*.gpg,*.asc' \
5681             doc g13 g10 kbx agent artwork scd tests tools am common dirmngr sm \
5682             NEWS README README.maint TODO
5683
5684 2020-02-19  Nick Piper  <nick.piper@cgi.com>
5685
5686         doc: Correction of typo in documentation of KEY_CONSIDERED.
5687         + commit 0e1cbabc0ad4fe2ca9644fffb5cf27b1a8a1509f
5688
5689
5690 2020-02-17  NIIBE Yutaka  <gniibe@fsij.org>
5691
5692         scd: Disable pinpad if it's impossible by KDF DO.
5693         + commit 95c7498b76231d3297541172d878f6a26702539b
5694         * scd/app-openpgp.c (struct app_local_s): Add pinpad.disabled field.
5695         (do_getattr): Set pinpad.disabled field.
5696         (check_pinpad_request): Use the pinpad.disabled field.
5697         (do_setattr): Update pinpad.disabled field.
5698
5699 2020-02-15  Werner Koch  <wk@gnupg.org>
5700
5701         gpgsm: Fix import of some CR,LF ternminated certificates.
5702         + commit 6248739799fd4a877529089375e2a4103d33e6f4
5703         * common/ksba-io-support.c (base64_reader_cb): Detect the END tag and
5704         don't just rely on the padding chars.  This could happen only with
5705         CR+LF termnmated PEM files.  Also move the detection into the invalid
5706         character detection branch for a minor parser speedup.
5707
5708 2020-02-13  Werner Koch  <wk@gnupg.org>
5709
5710         build: New configure option --disable-keyboxd.
5711         + commit 6cac2bd0382eb7ed0d249f077522516e64fc1d8f
5712         * configure.ac: Add option --dsiable-keyboxd
5713         * kbx/Makefile.am: Do not build keyboxd in that case.
5714
5715         scd: Print the main app name also for not fully supported cards.
5716         + commit 11d917c7796dc748e2d798d327a045ba295994f4
5717         * scd/app.c (send_serialno_and_app_status): Add fallback.
5718
5719         card: Fix openpgp subkey listing.
5720         + commit e582d8f5b2c1bac8b6ccdfd6412b621a2584eb7f
5721         * tools/gpg-card.c (list_one_kinfo): Fix printing of the subkeys.
5722
5723         gpg: New option --full-timestrings.
5724         + commit 86312b920a1d5817903d7175e9c2109bcf521b7c
5725         * g10/options.h (opt): Add flags.full_timestrings.
5726         * g10/gpg.c (oFullTimestrings): New.
5727         (opts): New option.
5728         (main): Set new flag.
5729         * g10/keyid.c (dateonlystr_from_pk): New.
5730         (dateonlystr_from_sig): New.
5731         (datestr_from_pk): Divert to isotimestamp if requested.
5732         (datestr_from_sig): Ditto.
5733         (expirestr_from_pk): Ditto.
5734         (expirestr_from_sig): Ditto.
5735         (revokestr_from_pk): Ditto.
5736         * g10/import.c (impex_filter_getval): Use dateonlystr_from_sig and
5737         dateonlystr_from_pk.
5738
5739         gpg: Changes to allow direct key generation from an OpenPGP card.
5740         + commit 14ac350f868ca71492c20c7b682d0b55b4893c9c
5741         * g10/call-agent.h (struct keypair_info_s): Add fields keytime and
5742         usage.
5743         * g10/call-agent.c (struct keypairinfo_cb_parm_s): New.
5744         (scd_keypairinfo_status_cb): Rework to store parsed KEYPAIRINFO data.
5745         (agent_scd_keypairinfo): Change accordingly.
5746         (agent_scd_readkey): Add arg ctrl and change callers.  Change return
5747         arg from an strlist_t to a keypair_info_t.
5748         (readkey_status_cb): Use KEYPAIRINFO instead of KEY-TIME.
5749         * g10/keygen.c (pSUBKEYCREATIONDATE): New.
5750         (pAUTHKEYCREATIONDATE): New.
5751         (get_parameter_u32): Allow for new parameters.
5752         (do_create_from_keygrip): For card keys use direct scd call which does
5753         not create a stub file.
5754         (ask_algo): Rework to use the new keypair_info_t as return from
5755         agent_scd_keypairinfo.
5756         (parse_key_parameter_part): Likewise.  Also get and return the key
5757         creation time using a arg.
5758         (parse_key_parameter_string): New args r_keytime and r_subkeytime.
5759         (parse_algo_usage_expire): New arg r_keytime.
5760         (proc_parameter_file): Ignore the explict pCREATIONDATE for card keys.
5761         (quickgen_set_para): New arg keytime.
5762         (quick_generate_keypair): Get the keytimes and set the pCARDKEY flag.
5763         (generate_keypair): Likewise.
5764         (do_generate_keypair): Implement the cardkey with keytime thingy.
5765         (generate_subkeypair): Use the keytime parameters.
5766         * g10/keygen.c (pAUTHKEYCREATIONDATE): New.  Not yet set but may come
5767         handy later.
5768         (get_parameter_u32): Take care of that.
5769         (do_generate_keypair): For cardkeys sign with the current time.
5770
5771         card: Take the key creation time from the KEYPAIRINFO.
5772         + commit e63f8bee4044e0cc9ebc1f9c0f9f6b63660d45e8
5773         * tools/card-call-scd.c (learn_status_cb): Adjust for recent change.
5774
5775         scd:openpgp: Return key creation time as part of KEYPARIINFO.
5776         + commit 1ad84aabb410e56bea074b82a06fe32b2897b660
5777         * scd/app-openpgp.c (send_keypair_info): Reaturn the key creation time
5778         as part of a KEYPAIRINFO.
5779         (do_readkey): Do not return the KEY-TIME anymore.
5780
5781         agent: Allow signing with card key even without a stub key.
5782         + commit 638526d37fee0a1febac9d29fab384b913819fc9
5783         * agent/call-scd.c (agent_card_serialno): Allow NULL for R_SERIAL.
5784         (struct readkey_status_parm_s): New.
5785         (readkey_status_cb): New.
5786         (agent_card_readkey): Add optional arg R_KEYREF and change all
5787         callers.
5788         * agent/findkey.c (key_parms_from_sexp): Allow also a "public-key".
5789         * agent/divert-scd.c (ask_for_card): Allow for SHADOW_INFO being NULL.
5790         * agent/pksign.c (agent_pksign_do): Fallback to sign with an on-card
5791         if there is no stub key yet.  Create the stub key.  Also fixed a
5792         misnaming between s_pkey and s_skey.
5793
5794 2020-02-12  Werner Koch  <wk@gnupg.org>
5795
5796         gpg: Rename the struct card_key_info_s.
5797         + commit 8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc
5798         * g10/call-agent.h (struct card_key_info_s): Rename to ...
5799         (struct keypair_info_s): this.
5800         (keypair_info_t): New.  Use this everywhere instead of
5801         card_key_info_s.
5802         * g10/call-agent.c (agent_scd_free_keyinfo): Rename to ..
5803         (free_keypair_info): this.  Change all callers.
5804
5805         card: Fix parsing of the received card_list.
5806         + commit 125c959677d55a8cf663c2dc248a3fc6f9be50bb
5807         * tools/card-call-scd.c (scd_cardlist): Allow for SERIALNO without any
5808         apps.
5809
5810         card: List more info for an OpenPGP key.
5811         + commit 1abfce82bd525de2976c31b83bb0e67e33364e58
5812         * tools/gpg-card.h (struct pubkey_s): Add field created.
5813         * tools/card-keys.c (parse_key_record): Set that field.
5814         * tools/gpg-card.c (print_shax_fpr): Print the fingerprint without
5815         spaces for easier c+p.
5816         (list_one_kinfo): Print the actual used fingerprint and creation date
5817         from the keyblock.
5818
5819         card: New option --no-key-lookup.
5820         + commit 2c6092bc5d794ae36cbf2f6b62337dc23f57bf3e
5821         * tools/gpg-card.h (opt): Add var no_key_lookup.
5822         * tools/gpg-card.c (oNoKeyLookup): New const.
5823         (opts): New option --no-key-lookup.
5824         (list_one_kinfo): Add arg no_key_lookup and implement.
5825         (list_all_kinfo): Add arg no_key_lookup.
5826         (list_openpgp, list_piv, list_card): Ditto.
5827         (cmd_list): New option --no-key-lookup.
5828
5829 2020-02-11  Werner Koch  <wk@gnupg.org>
5830
5831         gpg: Improve key creation direct from the card.
5832         + commit 9c719c9c1ff34cc06a0fef2bfe29cfd7182753eb
5833         * g10/call-agent.c (readkey_status_cb): New.
5834         (agent_scd_readkey): Add new arg r_keytime and allow NULL for
5835         r_result.  Change all callers.
5836         (agent_readkey): Minor code reformatting.
5837         * g10/keygen.c (pCARDKEY): New.
5838         (struct para_data_s): Add u.bool.
5839         (get_parameter_bool): New.
5840         (do_create_from_keygrip): Add arg cardkey and make use of it.
5841         (ask_algo): Add args r_cardkey and r_keytime.  Read the keytime of the
5842         selected card key and return it.
5843         (generate_keypair): Store CARDKEY and KEYTIME.
5844         (do_generate_keypair): Pass CARDKEY to do_create_from_keygrip.
5845         (generate_subkeypair): Ditto.
5846
5847         scd:openpgp: Send a KEY-TIME status with READKEY.
5848         + commit 77ea916533c5ca918b17ce83f6cc1b1afbd31e55
5849         * scd/app-openpgp.c (retrieve_fprtime_from_card): New.
5850         (do_readkey): Send a KEY_TIME status.
5851
5852         card: First code to actually create openpgp keys.
5853         + commit 6bc7318ef55017e1aca6e52899fd0b223da7cfc1
5854         * tools/gpg-card.c (generate_all_openpgp_card_keys): Add demo key
5855         generation.
5856         (generate_key): Allow generatiing one OpenPGP key.
5857
5858         scd:openpgp: Optional allow for lowercase keyrefs.
5859         + commit 323548acd9defde0a8ea7d74c18cd4a1b339ff2e
5860         * scd/app-openpgp.c (do_readkey): Use case insensitive match of the
5861         keyref.
5862         (do_writekey, do_sign, do_auth, do_decipher): Ditto.
5863
5864         scd:openpgp: Allow auto-changing of the key attributes in genkey.
5865         + commit d7d75da50543bc7259c5a6e6367b58cbca7f1b7b
5866         * scd/app-openpgp.c (struct app_local_s): Add field keyalgo.
5867         (parse_algorithm_attribute): Store the new keyalgo field.
5868         (change_keyattr): Change info message.
5869         (change_keyattr_from_string): Rewrite to also accept a keyref and a
5870         keyalgo string.
5871         (do_genkey): Change the keyattr if a keyalgo string is given.
5872
5873         common: Extend the openpgp_curve_to_oid function.
5874         + commit 24095101a5069f15a9aea7512498ac436a76814a
5875         * common/openpgp-oid.c (openpgp_curve_to_oid): Add optional arg R_NBITS.
5876         Change all callers.
5877
5878 2020-02-10  Werner Koch  <wk@gnupg.org>
5879
5880         doc: Improve the warning section of the gpg man page.
5881         + commit 113a8288b85725f7726bb2952431deea745997d8
5882         * doc/gpg.texi: Update return valeu and warning sections.
5883
5884 2020-02-10  Werner Koch  <wk@gnupg.org>
5885             Tomáš Mráz
5886
5887         build: Always use EXTERN_UNLESS_MAIN_MODULE pattern.
5888         + commit 6aff8a132815a84bab69401c1e7de96ec549fbf2
5889         * common/util.h (EXTERN_UNLESS_MAIN_MODULE): Add the definion only
5890         here but now without the Norcroft-C.  Change all other places where it
5891         gets defined.
5892         * common/iobuf.h (iobuf_debug_mode): Declare unconditionally as
5893         extern.
5894         * common/iobuf.c (iobuf_debug_mode): Define it here.
5895         * agent/gpg-agent.c (INCLUDED_BY_MAIN_MODULE): Define here and also in
5896         all main modules of all other programs.
5897
5898         * g10/main.h: Put util.h before the local header files.
5899
5900 2020-02-10  Werner Koch  <wk@gnupg.org>
5901
5902         gpg: Make really sure that --verify-files always returns an error.
5903         + commit 5681b8eaa44005afdd30211b47e5fb1a799583dd
5904         * g10/verify.c (verify_files): Track the first error code.
5905
5906         card: Remove command "key-attr" and hack on "generate".
5907         + commit 438b7881ba0bf4e5fd8e5d5212601e5691f2aafe
5908         * tools/gpg-card.h (struct key_attr): Remove.
5909         (struct key_info_s): Remove key_attr.  Add keyalgo and keyalgo_id.
5910         * tools/card-call-scd.c (learn_status_cb): Rework the key-attr info.
5911         * tools/gpg-card.c (list_one_kinfo): Always show the algorithm; if
5912         there is no key show the key attributes instead.
5913         (list_openpgp): Do not print the "Key attributes".
5914         (generate_key): Factor the repalce key pormpt out to ...
5915         (ask_replace_keys): new.
5916         (generate_openpgp): Rename to generate_all_openpgp_card_keys and add
5917         an algo parameter.
5918         (generate_generic): Rename to generate_key.  Prepare generation of a
5919         single OpenPGP key.
5920         (cmd_generate): Revamp.
5921         (ask_card_rsa_keysize): Remove.
5922         (ask_card_keyattr): Remove.
5923         (do_change_keyattr): Remove.
5924         (cmd_keyattr): Remove.
5925         (enum cmdids): Remove cmdKEYATTR.
5926         (cmds): Ditto.
5927         (dispatch_command): Ditto.
5928         (interactive_loop): Ditto.
5929
5930         scd:openpgp: Let the genkey function also accept a full keyref.
5931         + commit fb6ff7ead7dff33541b595f3e8d5342f9c7a6d6c
5932         * scd/app-openpgp.c (send_key_attr): Use log_assert.
5933         (do_genkey): Allow prefix.
5934
5935         common: Extend the new get_keyalgo_string function.
5936         + commit 332a72f7340895e7db1e9c5f89046f722bb7465b
5937         * common/openpgp-oid.c (openpgp_oid_or_name_to_curve): New.
5938         (get_keyalgo_string): Use it.
5939
5940 2020-02-09  Werner Koch  <wk@gnupg.org>
5941
5942         common: Remove duplicated call to a function.
5943         + commit d1c518cdc9330c2dd4034efc544de0dd6ec73ea1
5944         * common/openpgp-oid.c (openpgp_oid_to_str): Remove duplicated call.
5945
5946         common: New function get_keyalgo_string.
5947         + commit 3a1fa13eedb969b561bae18cd3d7c2fb0b63d6ab
5948         * common/openpgp-oid.c (struct keyalgo_string_s): New.
5949         (keyalgo_strings): New.
5950         (keyalgo_strings_size, keyalgo_strings_used): New.
5951         (get_keyalgo_string): New.
5952
5953         common: Add OpenPGP<->Gcrypt pubkey id mapping functions.
5954         + commit 49c891a9bfac24a1d95e76d33d44a49426247777
5955         * g10/misc.c (map_pk_gcry_to_openpgp): Move to ...
5956         * common/openpgp-oid.c (map_gcry_pk_to_openpgp): here and rename.
5957         Change all 4 callers.
5958         (map_openpgp_pk_to_gcry): New.
5959
5960         card: Support brainpool curves in the generate command.
5961         + commit 9df9996b415ee671a0f22b6936745f829884eda2
5962         * tools/gpg-card.c (cmd_generate): Add brainpool curves and dummy name
5963         "help".
5964
5965 2020-02-03  Werner Koch  <wk@gnupg.org>
5966
5967         sm: New option --issuer-der for the listkey commands.
5968         + commit 2e5ab34496fe7e1b9bd2194ab59a58cf44ca9d1e
5969         * sm/server.c (do_listkeys): Implement new option.
5970
5971 2020-01-21  Werner Koch  <wk@gnupg.org>
5972
5973         dirmngr: Fix building w/o LDAP support.
5974         + commit d8973975e7636ec0f007575a0bede92147d835f8
5975         * dirmngr/Makefile.am: Conditionally build dirmngr_ldap.
5976
5977         gpg: Fix printing of keyring name (regression in master)
5978         + commit bf931299e846fa47bcabe3716ec82af7c3290ce5
5979         * g10/keydb.c (keydb_get_resource_name):
5980
5981 2020-01-20  Werner Koch  <wk@gnupg.org>
5982
5983         tools: Let watchgnupg determine the socket name via gpgconf.
5984         + commit e0d9181ad11aaf7e68231db4b3708978a9a52fd6
5985         * tools/watchgnupg.c: Include sys/wait.h.
5986         (GNUPG_DEF_COPYRIGHT_LINE): Add a default value for standalone
5987         building.
5988         (get_logname): New.
5989         (main): Use a default socket name and add option --homedir.
5990
5991 2020-01-17  Werner Koch  <wk@gnupg.org>
5992
5993         gpgconf,w32: Print a warning for a suspicious homedir.
5994         + commit 7f12fb55f9757cd68147eca8f162c85378538405
5995         * tools/gpgconf.c (list_dirs): Check whether the homedir has been
5996         taken from the registry.
5997
5998 2020-01-17  NIIBE Yutaka  <gniibe@fsij.org>
5999
6000         gpg: Prefer card key on use in multiple subkeys situation.
6001         + commit 8748c50bfaa8df2b1e59c301d15fd6b9ddbd9c47
6002         * g10/call-agent.c (keyinfo_status_cb): Parse more fields.
6003         (agent_probe_secret_key): Use KEYINFO and returns bigger value
6004         representing the preference.
6005         * g10/getkey.c (finish_lookup): For subkeys, select one
6006         by using value of agent_probe_secret_key.
6007
6008         gpg: Prepare enhancement of agent_probe_secret_key.
6009         + commit 853d5b7677ea01f65c9bc5160cd8509b62f486f7
6010         * g10/call-agent.c (agent_probe_secret_key): Change semantics of
6011         return value.
6012         * g10/call-agent.h (agent_probe_secret_key): Change comment.
6013         * g10/delkey.c (do_delete_key): Follow the change.
6014         * g10/getkey.c (get_seckey, parse_def_secret_key): Likewise.
6015         (finish_lookup, have_secret_key_with_kid): Likewise.
6016         * g10/gpgv.c (agent_probe_secret_key): Likewise.
6017         * g10/keyedit.c (keyedit_menu, quick_find_keyblock): Likewise.
6018         (show_key_with_all_names_colon): Likewise.
6019         * g10/revoke.c (gen_desig_revoke, gen_revoke): Likewise
6020         * g10/test-stubs.c (agent_probe_secret_key): Likewise.
6021
6022 2020-01-16  Werner Koch  <wk@gnupg.org>
6023
6024         card: Allow switching of cards and applications.
6025         + commit bd85f9232ad639d4acba443272147c4fc01b1b65
6026         * tools/card-call-scd.c (struct card_cardlist_parm_s): Add field
6027         with_apps.
6028         (card_cardlist_cb): Handle the new with_apps flag.
6029         (scd_switchcard): New.
6030         (scd_switchapp): New.
6031         (scd_applist): New.
6032         (scd_serialno): Pass --all also in --demand mode.
6033
6034         * tools/gpg-card.c (cmd_list): Simplify switching of cards.  Add
6035         switching of alls.  Print a list of apps per card.
6036
6037         scd: New commands SWITCHCARD and SWITCHAPP.
6038         + commit 718555874efcbad502112449c7d15025cb193628
6039         * scd/app.c: Include membuf.h.
6040         (app_switch_current_card): New.
6041         (send_card_and_app_list): Factor code out to ...
6042         (send_serialno_and_app_status): new.
6043         (app_send_card_list): New.
6044         (app_send_active_apps): New.
6045         (app_switch_active_app): New.
6046         * scd/command.c (cmd_switchcard): New.
6047         (cmd_switchapp): New.
6048         (register_commands): Register new commands.
6049         (cmd_getinfo): New sub-commands "active_apps" and "all_active_apps".
6050
6051         scd:piv: Remove debug code from a recent commit.
6052         + commit dd61164410ee185750d1aa55ee0e33dcab8f4542
6053         * scd/app-piv.c (ask_and_prepare_chv): here.
6054
6055         gpg: Print better debug info in case of broken sig subpackets.
6056         + commit 3ccad75d76b9c17b9495c48df8dd4be46d3b3105
6057         * g10/parse-packet.c (enum_sig_subpkt): Print a hexdump.
6058
6059 2020-01-16  NIIBE Yutaka  <gniibe@fsij.org>
6060
6061         gpg: Use "SCD KEYINFO" to get available card keys.
6062         + commit 8edd4b8b8cdcbdcf1986214d6d17cadb604ddf54
6063         * g10/skclist.c (enum_secret_keys): Don't use agent_scd_cardlist and
6064         agent_scd_serialno, but agent_scd_keyinfo.
6065
6066         gpg: Add agent_scd_keyinfo to retrieve available card keys.
6067         + commit 8240a70c31a8e1617de64c42168cf3299b85b39e
6068         * g10/call-agent.c (card_keyinfo_cb, agent_scd_free_keyinfo)
6069         (agent_scd_keyinfo): New.
6070         * g10/call-agent.h: Define new functions.
6071
6072         gpg: default-key: Simply don't limit by capability.
6073         + commit 1aa2a0a46dc19e108b79dc129a3b0c5576d14671
6074         * g10/getkey.c (parse_def_secret_key): Remove the check.
6075
6076 2020-01-15  NIIBE Yutaka  <gniibe@fsij.org>
6077
6078         gpg: Cert only key should be usable with --default-key.
6079         + commit 9287f9e87b215e79fdb7fb9dfdf2b47666e6ea2f
6080         * g10/getkey.c (parse_def_secret_key): Allow cert-only key.
6081
6082 2020-01-13  Werner Koch  <wk@gnupg.org>
6083
6084         scd: Make the PIN cache robust against wrongdoing of gpg-agent.
6085         + commit 2dd6b4b998dd6e156e2e75ede0f40fb768c69f40
6086         * scd/app-openpgp.c (struct app_local_s): New field pincache.
6087         (cache_pin): Set it.
6088         (pin_from_cache): Consult it.
6089         * scd/app-piv.c (struct app_local_s): New field pincache.
6090         (cache_pin): Set it.
6091         (pin_from_cache): Consult it.
6092
6093         scd:piv: Implement PIN cache.
6094         + commit 60502c3606ee425d07c84b175ab310368c12b0ad
6095         * scd/command.c (pincache_put): Add arg pinlen and change all callers
6096         to provide it.
6097         * scd/app-piv.c (cache_pin): New.
6098         (pin_from_cache): New.
6099         (ask_and_prepare_chv): Add args no_cache and r_unpaddedpinlen.  Take
6100         PIN from the cache.  Return the unpadded length.
6101         (verify_chv): Add arg ctrl.  Cache the PIN.
6102         (do_change_chv): Clear PIN cache.
6103
6104         agent: Avoid multiple calls to scd for KEYINFO.
6105         + commit 2e86cca7f4181310bebfd795c059369ba03a8d8b
6106         * agent/command.c (struct server_local_s): Add last_card_keyinfo.
6107         (eventcounter): Add maybe_key_change.
6108         (cmd_genkey, cmd_scd, cmd_import_key, cmd_delete_key): Bump new
6109         counter.
6110         (cmd_keyinfo): Cache the keyinfo from the card.
6111         (start_command_handler): Release the cache.
6112
6113         agent: Replace free by xfree in recently added code.
6114         + commit aaef0fc3a743d06012c4a7fd8caa80d969863cc9
6115         * agent/call-scd.c (agent_card_free_keyinfo): Use xfree.
6116
6117         gpg,sm: Avoid useless ASFW diagnostic in loopback mode.
6118         + commit 14aa797bb8f3f7d3f4ef66b8fcdac7439000b49a
6119         * common/sysutils.c (inhibit_set_foregound_window): New var.
6120         (gnupg_inhibit_set_foregound_window): New func.
6121         (gnupg_allow_set_foregound_window): Use var.
6122         * g10/gpg.c (main): Inhibit in loopback mode.
6123         * sm/gpgsm.c (main): Ditto.
6124
6125         scd: Fix memory leak in command READKEY.
6126         + commit 2b843be5ac9f37c9faf2d9ab720eafceb3d534ad
6127         * scd/command.c (cmd_readcert): Replace xstrdup by xtrystrdup.
6128         (cmd_readkey): Ditto.  Fix memory leak.
6129
6130         scd: Make SERIALNO --all work correctly and use it.
6131         + commit 0e48aa084921c77944d4802c86ac33c607c519af
6132         * scd/app.c (maybe_switch_app): Factor reselect code out to ...
6133         (run_reselect): new.
6134         (app_write_learn_status): Tweak diagnostics.
6135         (app_do_with_keygrip): Run reselect if a card has more than one
6136         switchable application.
6137
6138         * agent/call-scd.c (agent_card_serialno): Ditto.
6139         * tools/card-call-scd.c (start_agent): Use option --all with SERIALNO.
6140         (scd_serialno): Ditto.
6141
6142 2020-01-13  NIIBE Yutaka  <gniibe@fsij.org>
6143
6144         agent: handle SSH operation by KEYGRIP.
6145         + commit 15028627a1655b7ad1835fbd0a32cf30debe807a
6146         * agent/command-ssh.c (card_key_available): Supply KEYINFO argument.
6147         Call agent_card_readkey by KEYGRIP of KEYINFO.
6148         Don't use $AUTHKEYID, but IDSTR of KEYINFO.
6149         (ssh_handler_request_identities): Follow the change of
6150         card_key_available.
6151
6152         agent: Extend agent_card_getattr with KEYGRIP.
6153         + commit c31266716dd69fee7bd64cf1e33d7631cd328e72
6154         * agent/agent.h (struct card_key_info_s): KEYGRIP null terminated.
6155         (agent_card_getattr): Add KEYGRIP argument.
6156         * agent/call-scd.c (agent_card_getattr): Handle KEYGRIP argument.
6157         (card_keyinfo_cb): Make KEYGRIP null terminated.
6158         * agent/command.c (cmd_readkey): Follow the change.
6159
6160 2020-01-10  NIIBE Yutaka  <gniibe@fsij.org>
6161
6162         scd: Implement direct access by KEYGRIP for GETATTR and READKEY.
6163         + commit 0cfded4bb1484366c785c268f2fb1061c7be5fdb
6164         * scd/app-openpgp.c (do_readkey): Handle KEYGRIP access.
6165         * scd/command.c (do_readkey): New.
6166         (cmd_readkey): Use do_readkey supporting KEYGRIP access.
6167         (cmd_getattr): Supporting KEYGRIP access.
6168
6169 2020-01-09  Werner Koch  <wk@gnupg.org>
6170
6171         scd:openpgp: Implement PIN cache.
6172         + commit 63bda3aad8ec4163b0241f64e8b587d665d650c3
6173         * scd/app-openpgp.c (wipe_and_free, wipe_and_free_string): Use them
6174         everywere where we do a wipememory followed by a free.
6175         (pin2hash_if_kdf): Change interface.  The input PIN is not anymore
6176         changed.  Further there are no more assumptions about the length of
6177         the provided buffer.
6178         (cache_pin): Restructure.
6179         (chvno_to_keyref): New.
6180         (pin_from_cache): New.
6181         (verify_a_chv): Add arg CTRL.  Adjust for changed pin2hash_if_kdf.
6182         Chache and retrieve the PIN here.
6183         (verify_chv2): Do not cache the PIN here.
6184         (build_enter_admin_pin_prompt): Add arg 'r_remaining'.
6185         (verify_chv3): Adjust for changed pin2hash_if_kdf.  Implement the PIN
6186         cache.
6187         (do_change_pin): Clear the PIN cache.  Do not change the PIN here.
6188         Lots of adjustments to cope with the chnaged pin2hash_if_kdf.
6189         (do_sign): Do not cache the PIN here.
6190
6191         scd: Use a scdaemon internal key to protect the PIN cache IPC.
6192         + commit ce5a7fb72b599de592a087867768ac1f81fd2989
6193         * agent/call-scd.c (handle_pincache_put): Do not decrypt.
6194         (handle_pincache_get): New.
6195         (inq_needpin): Call it.
6196         * scd/command.c (set_key_for_pincache): New.
6197         (pincache_put): Restructure and set key.
6198         (pincache_get): Ditto.
6199
6200 2020-01-09  NIIBE Yutaka  <gniibe@fsij.org>
6201
6202         agent: SSH: SCD KEYINFO to list available keys.
6203         + commit 57b8ed61ab93dd5aa73159f6db8adeb83d54b85f
6204         * agent/agent.h (agent_card_cardlist): Remove.
6205         (agent_card_keyinfo): Add CAP argument.
6206         * agent/call-scd.c (card_cardlist_cb): Remove.
6207         (agent_card_cardlist): Remove.
6208         (agent_card_keyinfo): Support CAP constraint.
6209         * agent/command-ssh.c (card_key_list): Remove.
6210         (ssh_handler_request_identities): Use SCD KEYINFO command.
6211         * agent/command.c (cmd_keyinfo): Follow the API change.
6212         * agent/divert-scd.c (ask_for_card): Likewise.
6213
6214 2020-01-07  Werner Koch  <wk@gnupg.org>
6215
6216         scd: First changes to implement a PIN cache.
6217         + commit fbf97a7856bd2f80a1714f63417c59d6c604d333
6218         * scd/command.c (pincache_put): New.  Uses a dummy key for now.
6219         (pincache_get): New.
6220         * scd/app.c (select_application): Flush the PIN cache.
6221         (scd_update_reader_status_file): Ditto.
6222         (maybe_switch_app): Call the new prep_reselect function.
6223         (app_write_learn_status): Ditto.
6224         * scd/app-openpgp.c (cache_pin): New helper to cache a PIN.
6225         (verify_chv2): Call it.
6226         (verify_chv3): Call it.
6227         (clear_chv_status): Call it.
6228         (do_change_pin): Call it.
6229
6230         * scd/app-common.h (struct app_ctx_s): Add function 'prep_select'.
6231         * scd/app-openpgp.c (do_prep_reselect): New stub function.
6232         (app_select_openpgp): Set new stub function.
6233         * scd/app-piv.c (do_prep_reselect): New stub function.
6234         (app_select_piv): Set new stub function.
6235
6236         * scd/app-common.h (struct app_ctx_s): Add parameter ctrl to setattr,
6237         sign, auth, decipher, and check_pin.  Change all implementations and
6238         callers to pass such a parameter.
6239
6240         agent: First changes to support a PIN cache for scdaemon.
6241         + commit d5c00354bb02ae6cb2e3a72136a1a95cb2db7f3f
6242         * agent/agent.h (CACHE_MODE_PIN): New.
6243         * agent/cache.c (housekeeping): Special handling of new new mode.
6244         (agent_flush_cache): Ditto.  Add arg 'pincache_only' and change
6245         caller.
6246         (agent_put_cache): Support new mode.
6247         (agent_get_cache): Ditto.
6248         * agent/call-scd.c (wait_child_thread): Flush the entire PIN cache.
6249         (start_scd): Ditto.
6250         (agent_card_killscd): Ditto.
6251         (handle_pincache_put): New.  Uses a dummy encryption key for now.
6252         (pincache_put_cb): New.
6253         (inq_needpin): Prepare for PINCACHE_GET inquiry.
6254         (learn_status_cb): Handle the PINENTRY_PUT status line.
6255         (get_serialno_cb): Ditto
6256         (agent_card_pksign): Ditto.
6257         (padding_info_cb): Ditto.
6258         (agent_card_readcert): Ditto.
6259         (agent_card_readkey): Ditto.
6260         (agent_card_writekey): Ditto.
6261         (card_getattr_cb): Ditto.
6262         (card_cardlist_cb): Ditto.
6263         (card_keyinfo_cb): Ditto.
6264         (pass_status_thru): Ditto.
6265
6266         kbx: Make sure the tables are joined in a select.
6267         + commit 41a882443622fe08ebaa75bf358e83630bbb8631
6268         * kbx/backend-sqlite.c (run_select_statement): Join the tables.
6269
6270 2020-01-03  Werner Koch  <wk@gnupg.org>
6271
6272         scd: Minor fix for readibility.
6273         + commit c0625c15c1fb6d06202669eb8caff2710377952d
6274         * scd/command.c (open_card_with_request): Use NULL instead of
6275         APPTYPE_NULL.
6276
6277 2020-01-02  Werner Koch  <wk@gnupg.org>
6278
6279         kbx: Initial support for an SQLite backend.
6280         + commit f4da1455c7ab858ea9007d0813774c6d04cd4576
6281         * kbx/backend-sqlite.c: New.
6282         * kbx/Makefile.am (keyboxd_SOURCES): Add it.
6283         (keyboxd_CFLAGS, keyboxd_LDADD): Add SQLite flags.
6284         * kbx/backend.h (enum database_types): Add DB_TYPE_SQLITE.
6285         (be_sqlite_local_t): New typedef.
6286         (struct db_request_part_s): Add field besqlite.
6287         * kbx/backend-support.c (strdbtype): Add string for DB_TYPE_SQLITE.
6288         (be_generic_release_backend): Support SQLite.
6289         (be_release_request): Ditto.
6290         (be_find_request_part): Ditto.
6291         (is_x509_blob): Rename to ...
6292         (be_is_x509_blob): this and make global.
6293         * kbx/frontend.c (kbxd_set_database): Detect ".db" suffix and use that
6294         for SQLite.
6295         (kbxd_search): Support SQLite
6296         (kbxd_store): Ditto.
6297         (kbxd_delete): Ditto.
6298         * kbx/frontend.h (kbxd_store_modes): Move to ...
6299         * kbx/keyboxd.h (enum kbxd_store_modes): here.
6300         * kbx/keyboxd.c (main): USe pubring.db for now.  This is a temporary
6301         hack.
6302
6303         * kbx/backend-kbx.c (be_kbx_delete): Remove unused var cert.
6304
6305 2019-12-23  Werner Koch  <wk@gnupg.org>
6306
6307         gpg: Fix output of --with-secret if a pattern is given.
6308         + commit 59d49e4a0ac2ed27803507cb7d2c6af166527bd5
6309         * g10/keylist.c (list_one): Probe for a secret key in --with-secret
6310         mode.
6311
6312         kbx: Change keyboxd to work only with one database.
6313         + commit 8a556c23a29776b2b5aa1d563e779b6ae0139dff
6314         * kbx/frontend.c (the_database): New var.
6315         (db_desc_t): Remove.
6316         (kbxd_add_resource): Renamed to ...
6317         (kbxd_set_database): this.  Simplify.
6318         (kbxd_search): Change to use only one database.
6319         (kbxd_store): Ditto.
6320         (kbxd_delete): Ditto.
6321
6322 2019-12-19  NIIBE Yutaka  <gniibe@fsij.org>
6323
6324         scd: Enhance KEYINFO command to limit listing with capability.
6325         + commit b2a2df174b216881387ae849770d875cd74984c2
6326         * scd/app-common.h: Add CAPABILITY argument to the WITH_KEYGRIP.
6327         (app_do_with_keygrip): Likewise.
6328         * scd/app-openpgp.c (send_keyinfo_if_available): New.
6329         (do_with_keygrip): Support listing with CAPABILITY.
6330         * scd/app-piv.c (do_with_keygrip): Likewise.
6331         * scd/app.c (maybe_switch_app): Supply the argument.
6332         (app_do_with_keygrip): Add CAPABILITY argument.
6333         * scd/command.c (cmd_pksign, cmd_pkauth): Supply the argument.
6334         (cmd_pkdecrypt): Likewise.
6335         (cmd_keyinfo): Support listing with CAPABILITY.
6336
6337 2019-12-06  Werner Koch  <wk@gnupg.org>
6338
6339         sm: Add special case for expired intermediate certificates.
6340         + commit d246f317c04862cacfefc899c98da182ee2805a5
6341         * sm/gpgsm.h (struct server_control_s): Add field 'current_time'.
6342         * sm/certchain.c (find_up_search_by_keyid): Detect a corner case.
6343         Also simplify by using ref-ed cert objects in place of an anyfound
6344         var.
6345
6346         dirmngr: Tell gpg about WKD looks resulting from a cache.
6347         + commit 8a6ecc6ff52b9ec045e200cc200977707278f89c
6348         * dirmngr/server.c (proc_wkd_get): Print new NOTE status
6349         "wkd_cached_result".
6350         * g10/call-dirmngr.c (ks_status_cb): Detect this and print a not ein
6351         verbose mode.
6352
6353 2019-12-04  Werner Koch  <wk@gnupg.org>
6354
6355         gpg: Use AKL for angle bracketed mail address with -r.
6356         + commit 1abb39fdaf44c2477719fbea43ef8042d8b9033e
6357         * g10/getkey.c (get_pubkey_byname): Extend is_mbox checking.
6358         (get_best_pubkey_byname): Ditto.
6359
6360 2019-11-28  Werner Koch  <wk@gnupg.org>
6361
6362         gpg: Change the way v5 fingerprints are printed.
6363         + commit d2ff62dbdf891319e6db5850c6077c85e5eb784e
6364         * g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): Increase by one.
6365         * g10/keyid.c (format_hexfingerprint): Change v5 key formatting.
6366
6367         gpg: Implement insert, update, and delete via keyboxd.
6368         + commit 7244666926929f3b2475d8cab50db3ff620cdbe3
6369         * g10/call-keyboxd.c (struct store_parm_s): New.
6370         (store_inq_cb): New.
6371         (keydb_update_keyblock): Implement the keyboxd part.
6372         (keydb_insert_keyblock): Ditto.
6373         (keydb_delete_keyblock): Ditto.
6374         (keydb_search_reset): Clear ubid flag.  Also use the correct union
6375         member for building the search string.
6376
6377         kbx: Add new command DELETE.
6378         + commit 490e0cd0bab8d8d06ffdc5b8977964d5a76a8df0
6379         * kbx/kbxserver.c (cmd_delete): New.
6380         * kbx/frontend.c (kbxd_delete): New.
6381         * kbx/backend-kbx.c (be_kbx_delete): New.
6382
6383         kbx: Redefine the UBID which is now the primary fingerprint.
6384         + commit 915297705af6f1db74dacf0d6665b83eb0a58459
6385         * common/util.h (UBID_LEN): New.  Use it at all places.
6386         * kbx/keybox-blob.c (create_blob_finish): Do not write the UBID item.
6387         * kbx/keybox-dump.c (print_ubib): Remove.
6388         (_keybox_dump_blob): Do not print the now removed ubid flag.
6389         * kbx/keybox-search-desc.h (struct keydb_search_desc): Use constants
6390         for the size of the ubid and grip.
6391         * kbx/keybox-search.c (blob_cmp_ubid): New.
6392         (has_ubid): Make it a simple wrapper around blob_cmp_ubid.
6393         (keybox_get_data): Add arg 'r_ubid'.
6394
6395         * kbx/frontend.h (enum kbxd_store_modes): New.
6396         * kbx/kbxserver.c (cmd_store): Add new option --insert.
6397
6398         * kbx/backend-cache.c (be_cache_initialize): New.
6399         (be_cache_add_resource): Call it here.
6400         * kbx/backend-kbx.c (be_kbx_seek): Remove args 'fpr' and 'fprlen'.
6401         (be_kbx_search): Get the UBID from keybox_get_data.
6402         * kbx/backend-support.c (be_fingerprint_from_blob): Replace by ...
6403         (be_ubid_from_blob): new.  Change all callers.
6404
6405         * kbx/frontend.c (kbxd_add_resource): Temporary disable the cache but
6406         use the new cache init function.
6407         (kbxd_store): Replace arg 'only_update' by 'mode'.  Seek using the
6408         ubid.  Take care of the mode.
6409
6410 2019-11-27  Werner Koch  <wk@gnupg.org>
6411
6412         dirmngr: Replace no-strict-overflow pragma by wrapv pragma.
6413         + commit f59455d054a79068ebf480cd28f02993c1facf3b
6414         * dirmngr/dirmngr.c (time_for_housekeeping_p): Build with --fwrapv.
6415         Replace protecting macro.
6416
6417         gpg: Move a keydb function to another file.
6418         + commit 61f41cdce5b60b9df05d6531ab1b7aab84ada659
6419         * g10/keydb.c (build_keyblock_image): Move to ...
6420         * g10/build-packet.c (build_keyblock_image): here.
6421
6422 2019-11-26  Werner Koch  <wk@gnupg.org>
6423
6424         dirmngr: Rework of the LDAP code, part 1.
6425         + commit 264c15c72fe050f5e8d2f1cb2444a459df6fe99f
6426         * dirmngr/http.h (struct parsed_uri_s): Add flag is_ldap.
6427         * dirmngr/http.c (do_parse_uri): Set flag.  Do not error out for a
6428         missing slashes in an http scheme if NO_SCHEME_CHECK is active.
6429         * dirmngr/t-http.c (main): Print new flag.
6430         * dirmngr/ks-engine-ldap.c (ks_ldap_help): Use flag instead of
6431         checking the scheme.
6432         * dirmngr/ldap-parse-uri.c (ldap_uri_p): Re-implement using
6433         http_parse_uri.
6434         * dirmngr/t-ldap-parse-uri.c (main): Add option --verbose.
6435
6436         dirmngr: Make building with a TLS library mandatory.
6437         + commit 1009e4e5f71347a1fe194e59a9d88c8034a67016
6438         * configure.ac: Do not build dirmngr if no TLS is available.
6439         * dirmngr/http.c: Remove all uses of the USE_TLS macro.
6440
6441         doc: Fixed variable naming.
6442         + commit 8fb14d3b3f9c5c27ff8b9f0e7e7207ec388687ff
6443         * kbx/keybox.h: Fix naming of arguments.
6444         * scd/ccid-driver.c (print_error) [TEST]: Add missing break.  Note
6445         that this is anyway an impossible case.
6446
6447 2019-11-25  Werner Koch  <wk@gnupg.org>
6448
6449         agent: Improve --debug-pinentry diagnostics.
6450         + commit c8783b3a204b371d44b8953429652101cf2e4d1b
6451         * agent/call-pinentry.c (atfork_cb): Factor code out to ...
6452         (atfork_core): new.
6453
6454 2019-11-23  Werner Koch  <wk@gnupg.org>
6455
6456         wkd: Let --install-key write a template policy file.
6457         + commit 50cd1a58f3a612704a0056386e1d5cd7cb28d57d
6458         * tools/wks-util.c (ensure_policy_file): New.
6459         (wks_cmd_install_key): Call it.
6460
6461 2019-11-19  NIIBE Yutaka  <gniibe@fsij.org>
6462
6463         po: Apply removal of dirmngr/ldap-wrapper-ce.c.
6464         + commit 116dfb20013b73b950bbcee1d1f6c2a5d1d7ffdd
6465         * po/POTFILES.in: Update.
6466
6467 2019-11-18  Werner Koch  <wk@gnupg.org>
6468
6469         dirmngr,gpg: Better diagnostic in case of bad TLS certificates.
6470         + commit d9c7935188483dae381c12e7eef19072bbade4b3
6471         * doc/DETAILS: Specify new status code "NOTE".
6472         * dirmngr/ks-engine-http.c (ks_http_fetch): Print a NOTE status for a
6473         bad TLS certificate.
6474         * g10/call-dirmngr.c (ks_status_cb): Detect this status.
6475
6476         dirmngr: Forward http redirect warnings to gpg.
6477         + commit ae9acb8745c1654b446b3cd5b9322b235723d9cb
6478         * dirmngr/http.c: Include dirmngr-status.h
6479         (http_prepare_redirect): Emit WARNING status lines for redirection
6480         problems.
6481         * dirmngr/http.h: Include fwddecl.h.
6482         (struct http_redir_info_s): Add field ctrl.
6483         * dirmngr/ks-engine-hkp.c (send_request): Set it.
6484         * dirmngr/ks-engine-http.c (ks_http_fetch): Set it.
6485         * g10/call-dirmngr.c (ks_status_cb): Detect the two new warnings.
6486
6487 2019-11-15  NIIBE Yutaka  <gniibe@fsij.org>
6488
6489         scd,ccid: Fix detection of supported readers with pinpad.
6490         + commit 1cb9a831f6eedfa4c8950b8a7706ea77b74693f7
6491         * scd/ccid-driver.c (ccid_transceive_secure): When not supported,
6492         return CCID_DRIVER_ERR_NOT_SUPPORTED.
6493
6494 2019-11-12  Werner Koch  <wk@gnupg.org>
6495
6496         dirmngr: Use IPv4 or IPv6 interface only if available.
6497         + commit 12def3a84e0358528347107dc88cfe740a54941f
6498         * dirmngr/dns-stuff.c (cached_inet_support): New variable.
6499         (dns_stuff_housekeeping): New.
6500         (check_inet_support): New.
6501         * dirmngr/http.c (connect_server): Use only detected interfaces.
6502         * dirmngr/dirmngr.c (housekeeping_thread): Flush the new cache.
6503
6504 2019-11-12  Andre Heinecke  <aheinecke@gnupg.org>
6505
6506         dirmngr: Tune down err on missing ldapservers file.
6507         + commit 40daa0bc0bc87a521713d7dd1568f3874759a143
6508         * dirmngr/dirmngr.c (parse_ldapservers_file): Tune down error
6509         in case no such file exists.
6510
6511 2019-11-11  Werner Koch  <wk@gnupg.org>
6512
6513         dirmngr: Remove cruft from dirmngr_ldap.
6514         + commit 4c295646ba0e175743e6be13457308c1e6d21dd3
6515         * configure.ac (USE_LDAPWRAPPER): Remove ac_define and conditional.
6516         * dirmngr/Makefile.am: Remove USE_LDAPWRAPPER and considere true.
6517         * dirmngr/ldap-wrapper-ce.c: Remove.
6518         * dirmngr/ldap-wrapper.c: Remove USE_LDAPWRAPPER stuff. Minor chnages
6519         to debug output.
6520         * dirmngr/dirmngr_ldap.c: Remove USE_LDAPWRAPPER stuff.  Remove
6521         my_ldap macros.
6522         (fetch_ldap) [W32]: Use ldap_sslinit.
6523
6524         gpg: Forbid the creation of SHA-1 third-party key signatures.
6525         + commit dd18be979e138dd3712315ee390463e8ee1fe8c1
6526         * g10/sign.c (SIGNHINT_KEYSIG, SIGNHINT_SELFSIG): New.
6527         (do_sign): Add arg signhints and inhibit SHA-1 signatures.  Change
6528         callers to pass 0.
6529         (complete_sig): Add arg signhints and pass on.
6530         (make_keysig_packet, update_keysig_packet): Set signhints.
6531
6532         dirmngr: Rename an enum value for clarity.
6533         + commit eebd43d5b688e99131fcbf8f8292a485b91402a2
6534         * dirmngr/ldapserver.h: Rename LDAPSERVER_OPT.
6535
6536 2019-11-09  Werner Koch  <wk@gnupg.org>
6537
6538         gpgsm: Allow sepcification of ldaps servers.
6539         + commit 6e1c99bc397382f1ea2ba9d61a64328410adc95f
6540         * sm/gpgsm.h (struct keyserver_spec): Add field use_ldaps.
6541         * sm/gpgsm.c (parse_keyserver_line): Parse flags.
6542         * sm/call-dirmngr.c (prepare_dirmngr): Send ldaps flag to the dirmngr.
6543
6544         * dirmngr/dirmngr.h (struct ldap_server_s): Add field use_ldaps.
6545         * dirmngr/ldapserver.c (ldapserver_parse_one): Parse flags.
6546         * dirmngr/ldap.c (start_cert_fetch_ldap): Call wrapper with --tls.
6547
6548         * dirmngr/dirmngr_ldap.c: New option --tls.
6549         (fetch_ldap): Make use of that option.
6550
6551 2019-11-07  Werner Koch  <wk@gnupg.org>
6552
6553         gpg: Fix a potential loss of key sigs during import with self-sigs-only.
6554         + commit 6701a38f8e4a35ba715ad37743b8505bfd089541
6555         * g10/import.c (import_one_real): Don't do the final clean in the
6556         merge case.
6557
6558         gpg: Add option --allow-weak-key-signatures.
6559         + commit e624c41dbafd33af82c1153188d14de72fcc7cd8
6560         * g10/gpg.c (oAllowWeakKeySignatures): New.
6561         (opts): Add --allow-weak-key-signatures.
6562         (main): Set it.
6563         * g10/options.h (struct opt): Add flags.allow_weak_key_signatures.
6564         * g10/misc.c (print_sha1_keysig_rejected_note): New.
6565         * g10/sig-check.c (check_signature_over_key_or_uid): Print note and
6566         act on new option.
6567
6568         gpg: Print rfc4880bis note only in verbose mode.
6569         + commit f4047f56058cf9be2aa362fc439846ce930da8c7
6570         * g10/gpg.c (main): Change condition for an info diagnostic.
6571
6572 2019-11-06  Werner Koch  <wk@gnupg.org>
6573
6574         gpg: Remove an unused variable.
6575         + commit fd88b8847a371a2927f52afceeeb457b64cce162
6576         * g10/delkey.c (do_delete_key): here.
6577
6578         gpg: Do not require --batch when using --log-file.
6579         + commit 584b65ad7e937710a4fc6db42d6849bb3449d6ef
6580         * g10/gpg.c (main): Remove a long standing FIXME.
6581
6582 2019-10-28  NIIBE Yutaka  <gniibe@fsij.org>
6583
6584         scd,ccid: Fix GEMPC_EZIO handling.
6585         + commit c6702d77d936b3e9d91b34d8fdee9599ab94ee1b
6586         * scd/ccid-driver.c (ccid_transceive_secure): Fix for 08e6:34c2.
6587
6588 2019-10-17  NIIBE Yutaka  <gniibe@fsij.org>
6589
6590         gpg: More fix of get_best_pubkey_byname.
6591         + commit e2c2b0fb2d9b31fa1b61803d04919645a9149996
6592         * g10/getkey.c (get_best_pubkey_byname): Remove useless req_usage
6593         setting of CTX.
6594
6595         gpg: Fix two other cases in get_best_pubkey_byname.
6596         + commit 286d4c607574e91f590512a1385bb3320cf8da77
6597         * g10/getkey.c (pubkey_cmp): Handle a primary key with
6598         PUBKEY_USAGE_ENC, and make sure new key is for encryption.
6599         (get_best_pubkey_byname): Add comment for ranking.
6600
6601         doc: Fix documentation about --locate-keys.
6602         + commit 627a990f8e306d4f34bc503b303dc8b13616029e
6603         * doc/gpg.texi (--locate-keys): Remove mentioning signing keys.
6604
6605 2019-10-16  NIIBE Yutaka  <gniibe@fsij.org>
6606
6607         gpg: Fix get_best_pubkey_byname to consider the first match.
6608         + commit f2734381ae1431e395a0bed16df2f4d5d13aa2c5
6609         * g10/getkey.c (get_best_pubkey_byname): Always use PK0 to search
6610         by get_pubkey_byname.  Add initial call to pubkey_cmp to fill
6611         BEST at first before the loop.
6612
6613 2019-10-15  Werner Koch  <wk@gnupg.org>
6614
6615         gpg: Also delete key-binding signature when deleting a subkey.
6616         + commit d1bc12d1b66e0657969a8eb846bdcd9bee717a7c
6617         * g10/delkey.c (do_delete_key): Simplify and correct subkey deletion.
6618
6619 2019-10-15  NIIBE Yutaka  <gniibe@fsij.org>
6620
6621         gpg: Put the first key in candidates correctly.
6622         + commit 44604209c1cfe18532d13eda63d8c1f86a6e12ec
6623         * g10/getkey.c (get_best_pubkey_byname): After the call of
6624         get_pubkey_byname, set up CTX with KEYDB_SEARCH_MODE_LONG_KID to enter
6625         the loop.
6626
6627         scd,ccid: Add 08e6:34c2 (GEMPC_EZIO).
6628         + commit c933c15d587a1c0df3f4b3bf37d8d15164dd318f
6629         * scd/ccid-driver.c (ccid_transceive_secure): Add pinpad support
6630         for 08e6:34c2 which supports extended APDU exchange.
6631
6632 2019-10-09  NIIBE Yutaka  <gniibe@fsij.org>
6633
6634         gpg: The first key should be in candidates.
6635         + commit 7535f1d47a35e30f736f0e842844555f7a4a9841
6636         * g10/getkey.c (get_best_pubkey_byname): Handle the first key
6637         as the initial candidate for the selection.
6638
6639 2019-10-07  Werner Koch  <wk@gnupg.org>
6640
6641         kbx: Implement update for the STORE command.
6642         + commit f4bdf8e590877e9bfddfd19a4e4167f6531c9fb1
6643         * kbx/backend-kbx.c (be_kbx_update): New.
6644         * kbx/frontend.c (kbxd_store): Call it.
6645
6646 2019-10-07  NIIBE Yutaka  <gniibe@fsij.org>
6647
6648         gpg: Fix a memory leak in get_best_pubkey_byname.
6649         + commit e28572116fe4c586ba9d1e8f27389bf3f06e036b
6650         * g10/getkey.c (get_best_pubkey_byname): Free the public key parts.
6651
6652 2019-10-03  Werner Koch  <wk@gnupg.org>
6653
6654         gpg: Ignore all SHA-1 signatures in 3rd party key signatures.
6655         + commit 7d9aad63c4f1aefe97da61baf5acd96c12c0278e
6656         * g10/sig-check.c (check_signature_over_key_or_uid): No cut-off date
6657         and remove debug output.
6658
6659         gpg: Be prepared for chosen-prefix SHA-1 collisions in key signatures.
6660         + commit c4f2d9e3e1d77d2f1f168764fcdfed32f7d1dfc4
6661         * g10/sig-check.c (check_signature_over_key_or_uid): Reject cewrtain
6662         SHA-1 based signatures.
6663
6664 2019-10-01  Werner Koch  <wk@gnupg.org>
6665
6666         gpg: Read the UBID from the keybox and detect wrong blob type.
6667         + commit 63dbc817e7dcc6edc757281f09e1ca80500ab2d1
6668         * g10/keydb-private.h (struct keydb_handle_s): Add fields for UBID.
6669         * g10/call-keyboxd.c (search_status_cb): New.
6670         (keydb_search): Set new UBID fields.
6671
6672         kbx: Add first version of STORE command to keyboxd.
6673         + commit c7293a4d125c4675c86ecdee0f2f3186fc4bdaf7
6674         * kbx/Makefile.am (keyboxd_CFLAGS): -DKEYBOX_WITH_X509.
6675         (keyboxd_LDADD): Add libksba.
6676         * kbx/kbxserver.c (cmd_store): New.
6677         * kbx/frontend.c (kbxd_store): New.
6678         * kbx/backend-support.c (is_x509_blob): New.
6679         (be_fingerprint_from_blob): New.
6680         * kbx/backend-kbx.c (be_kbx_seek): Add args FPR and FPRLEN.
6681         (be_kbx_insert): New.
6682
6683         common: New function hex2fixedbuf.
6684         + commit 61765136cf92be2884603bc3fac020a1c6ed91f4
6685         * common/convert.c (hex2fixedbuf): New.
6686
6687 2019-09-30  Werner Koch  <wk@gnupg.org>
6688
6689         gpg: Fix --recv-key in case of a given fingerprint.
6690         + commit a605dbb430b1f73ef974ad54f74679dfc0eefb18
6691         * g10/keyserver.c (keyserver_retrieval_screener): Compare against
6692         actual length.
6693
6694         gpg: Fix expand GPG groups when resolving a key.
6695         + commit ec81c437e71b4c630a799ed29447cc5e3db162cd
6696         * g10/expand-group.c (expand_group): Add arg prepend_input.
6697         * g10/pkclist.c (build_pk_list): Adjust for it.
6698         * g10/getkey.c (key_byname): Keep the expanded names in the CTX and
6699         don't premature free them.
6700         (get_pubkey_byname): Append the namelist to the extra_list.
6701
6702 2019-09-27  Werner Koch  <wk@gnupg.org>
6703
6704         gpg: Fix a recently introduced printf format buglet.
6705         + commit b966a7c142ab6341f4149d55e2609dbb9914acec
6706         * g10/parse-packet.c (dump_sig_subpkt): Fix format error.
6707
6708         kbx: Fix error code return in keyboxd.
6709         + commit 8e574130482167dc7d2e2888cc80ad6584345e3d
6710         * kbx/frontend.c (kbxd_add_resource): Print a diagnostic on error.
6711         * kbx/backend-kbx.c (be_kbx_add_resource): Acttually returh the error
6712         code.
6713
6714         kbx: Store the UBIB in the blob.
6715         + commit 0af1c6447dc0f981ab7306e3bef520f37aded167
6716         * kbx/keybox-blob.c (create_blob_header): New blob flag UBIB.
6717         (create_blob_finish): Write the UBIB.
6718         * kbx/keybox-dump.c (print_ubib): New.
6719         (_keybox_dump_blob): Print UBIB flag.
6720         * kbx/keybox-search.c (has_ubid): Compare the stored UBIB if
6721         available.
6722
6723         kbx,gpg: Allow lookup using a UBID.
6724         + commit 4be79b5abeae82b9840e6aa93874f743e13c6df7
6725         * common/userids.c (classify_user_id): Detect UBIDs.
6726         * kbx/backend-cache.c (blob_table_put): Store the public key type.
6727         (be_cache_search): Add search mode for UBIDs.
6728         * kbx/backend.h (struct db_request_part_s): Add cache.seqno_ubid.
6729         * g10/keydb.c (keydb_search_desc_dump): Fix printing of keygrip.  Add
6730         ubid printing.
6731         * g10/call-keyboxd.c (keydb_search): Support search by UBID.
6732
6733         kbx: First take on a cache for the keyboxd.
6734         + commit 280e9c9cfac31ae5ac874c928eee063cc922e27e
6735         * kbx/backend.h (enum database_types): Add DB_TYPE_CACHE.
6736         (struct db_request_part_s): Add seqno fields.
6737         (struct db_request_s): Add infos for the cache backend.
6738         * kbx/backend-support.c (struct backend_handle_s): Add 'backend_id'.
6739         (strdbtype): Support DB_TYPE_CACHE.
6740         (be_generic_release_backend): Ditto.
6741         (be_find_request_part): New.
6742         (be_return_pubkey): New arg UBID and chnage status name.
6743         * kbx/backend-cache.c: New.
6744         * kbx/backend-kbx.c (be_kbx_init_request_part): New.
6745         (be_kbx_search): Factor some code out to a support function.
6746         (be_kbx_seek): New.
6747         * kbx/frontend.c (kbxd_add_resource): Support DB_TYPE_CACHE.
6748         (kbxd_search): Support the NEXR operation with the cache.
6749         * kbx/keybox-search-desc.h (KEYDB_SEARCH_MODE_UBID): New.
6750         (struct keydb_search_desc): Add field u.ubid.
6751         * kbx/keybox-search.c (has_ubid): New.
6752         (keybox_search): Support the UBID search.
6753
6754 2019-09-20  NIIBE Yutaka  <gniibe@fsij.org>
6755
6756         build: Build gpg-pair-tool only when there is newer libgcrypt.
6757         + commit bb5ed9fe1abfcbb6128325508366bc802eb576c5
6758         * configure.ac (HAVE_NEWER_LIBGCRYPT): New.
6759         * tools/Makefile.am: Conditionalize build of gpg-pair-tool.
6760
6761 2019-09-19  NIIBE Yutaka  <gniibe@fsij.org>
6762
6763         tools: Fix gpg-pair-tool to follow new API.
6764         + commit 7c81e5cb97c77244be164daf7a80e29f6b6e437b
6765
6766
6767         tools: Don't prepare G in gpg-pair-tool.
6768         + commit b928de70e072fce15d7bba39f370d32dd8b74095
6769         * tools/gpg-pair-tool.c (create_dh_keypair): Use NULL for G.
6770
6771         tools: Use new API of libgcrypt for gpg-pair-tool.
6772         + commit f22a00416149448172bf8110d466d65c87962cae
6773         * tools/gpg-pair-tool.c (create_dh_keypair): Just use
6774         gcry_random_bytes for secret.  Call gcry_ecc_mul_point
6775         with G to get the public key.
6776         (compute_master_secret): Use gcry_ecc_mul_point.
6777
6778 2019-09-17  NIIBE Yutaka  <gniibe@fsij.org>
6779
6780         scd,pcsc: Use HANDLE for context and card.
6781         + commit 49671b76eae2c7d1edb13ed927654d0c11d879f1
6782         * scd/apdu.c (HANDLE): New.
6783
6784 2019-09-12  NIIBE Yutaka  <gniibe@fsij.org>
6785
6786         scd: Remove old fallback logic from CCID to PC/SC.
6787         + commit 980d0234d31699e51051e0cc6002ad177b6e7136
6788         * scd/apdu.c (apdu_dev_list_start): Return an error on failure.
6789
6790         scd,pcsc: Support "reader-port" option for PC/SC reader.
6791         + commit 6d750fe7fc4224924f13ef578010a26cdbe0a67b
6792         * scd/apdu.c (apdu_open_reader): Skip use of a reader if it's not the
6793         one specified when it is specified.
6794
6795         scd,pcsc: Remove the restriction of no-scanning in PC/SC.
6796         + commit c569e49d1764d2573aec5684f9cee397bdd8ccb1
6797         * scd/apdu.h (app_open_reader): Remove the last argument.
6798         * scd/apdu.c (app_open_reader): Ditto.
6799         * scd/app.c (select_application): Don't supply APP_EMPTY.
6800
6801 2019-09-11  NIIBE Yutaka  <gniibe@fsij.org>
6802
6803         scd,pcsc: Fix examining the list of readers.
6804         + commit 92be4e87eec984a3f3737339c311761d2650c55a
6805         * scd/apdu.c (apdu_dev_list_start): Traverse the string+NUL carefully.
6806
6807         scd,pcsc: Fix for initializing PC/SC.
6808         + commit 441106cdf0fdd310e3b36370186849167db11345
6809         * scd/apdu.c (pcsc_init): Load it at first.
6810         (apdu_open_reader): Check for the CCID internal driver.
6811
6812         scd,pcsc: Support multiple card readers.
6813         + commit e8534f899915a039610973a84042cbe25a5e7ce2
6814         * scd/apdu.c (close_pcsc_reader, apdu_init): Clear pcsc.rdrname.
6815         (pcsc_init): Load of PC/SC module moved from ...
6816         (open_pcsc_reader): ... here.
6817         (apdu_dev_list_start): Add support for PC/SC.
6818         (apdu_dev_list_finish): Likewise.
6819         (apdu_open_reader): Likewise.
6820
6821         scd,pcsc: Use a single context.
6822         + commit 1080e91efd60cb41c2d6dbafaee810e5967a3161
6823         * scd/apdu.c (pcsc): New variable.
6824         (struct reader_table_s): Remove pcsc.context from member.
6825         (pcsc_get_status, connect_pcsc_card): Use pcsc.context.
6826         (close_pcsc_reader): Release pcsc.context here with reference count.
6827         (pcsc_init): New.
6828         (open_pcsc_reader): Don't call pcsc_establish_context here.  Call
6829         close_pcsc_reader instead of pcsc_release_context.
6830         (apdu_open_reader): Call pcsc_init if needed.
6831         (apdu_init): Initialize pcsc.count and pcsc.context.
6832
6833         scd: Clean up the structure for future fix of PC/SC.
6834         + commit f44aa290c1368a3119b2323664c0f356195c4206
6835         * scd/apdu.c (struct dev_list): Rename from ccid_table, with void*.
6836         (open_ccid_reader): Follow the change.
6837         (apdu_dev_list_start, apdu_dev_list_finish): Likewise.
6838         (apdu_open_reader): Likewise.
6839         * scd/ccid-driver.c (ccid_dev_scan): Use void *.
6840         (ccid_dev_scan_finish, ccid_get_BAI, ccid_open_usb_reader): Likewise.
6841         * scd/ccid-driver.h: Change the APIs.
6842
6843 2019-09-10  Werner Koch  <wk@gnupg.org>
6844
6845         gpg: First rough implementation of keyboxd access for key lookup.
6846         + commit ce9906b008c94c2aa4ac770a981d1e1e0b8aea47
6847         * g10/Makefile.am: Add nPth flags.
6848         * g10/gpg.c: Include npth.h.
6849         (gpg_deinit_default_ctrl): Deinit call-keyboxd local data.
6850         (main): Init nPth.
6851         * g10/keydb-private.h (struct keydb_handle_s): Add field 'kbl' and
6852         remove the search result and the assuan context.
6853         * g10/call-keyboxd.c (struct keyboxd_local_s): Add more fields.
6854         (lock_datastream, unlock_datastream): New.
6855         (gpg_keyboxd_deinit_session_data): Adjust for changed data structures.
6856         (prepare_data_pipe): New.
6857         (open_context): Return kbl instead of an Assuan context.  Init mutexes
6858         etc.
6859         (close_context): Merge into ...
6860         (keydb_release): here.  Adjust for changed data structures.
6861         (datastream_thread): New.
6862         (keydb_get_keyblock): Implement datastream stuff.
6863         (keydb_search): Ditto.
6864
6865         * common/asshelp.c (wait_for_sock): Add arg connect_flags.
6866         (start_new_service): Set FDPASSING flag for the keyboxd.
6867
6868         kbx: Allow fd-passing for the keyboxd.
6869         + commit 6c327b4dd6d8041b84f856ffc2a7d82b352d273f
6870         * kbx/kbxserver.c: Include host2net.h
6871         (struct server_local_s): Add field outstream.
6872         (prepare_outstream): New.
6873         (kbxd_writen): New.
6874         (kbxd_write_data_line): Write to file descrptor.  Disable the slow
6875         human reader friendly data line formatting.
6876         (cmd_search, cmd_next): Disable data logging.
6877         (kbxd_start_command_handler): Add OUTPUT command.
6878         * kbx/keyboxd.c (main): Enable log monitor.
6879
6880         common: Allow a readlimit for iobuf_esopen.
6881         + commit 2f0fdab8aabdf408495163ef99b2d4d111f74692
6882         * common/iobuf.c (file_es_filter_ctx_t): Add fields use_readlimit and
6883         readlimit.
6884         (file_es_filter): Implement them.
6885         (iobuf_esopen): Add new arg readlimit.
6886         * g10/decrypt-data.c (decrypt_data): Adjust for change.
6887         * g10/import.c (import_keys_es_stream): Ditto.
6888
6889 2019-09-10  Andre Heinecke  <aheinecke@gnupg.org>
6890
6891         doc: Fix distchek for generated eps file.
6892         + commit c69a37dcbdc8db47489fbf744f58bb61399d223f
6893         * doc/Makefile.am (EXTRA_DIST, BUILT_SOURCES): Add
6894         gnupg-module-overview.eps, gnupg-card-architecture.eps
6895         (DISTCLEANFILES): Remove them.
6896
6897 2019-09-09  Werner Koch  <wk@gnupg.org>
6898
6899         gpg: New option --use-keyboxd.
6900         + commit aba82684fe14289cf62b4694bc398f3a274b4762
6901         * g10/gpg.c (oUseKeyboxd,oKeyboxdProgram): New consts.
6902         (opts): New options --use-keyboxd and --keyboxd-program.
6903         (main): Implement them.
6904         * g10/keydb.c: Move some defs out to ...
6905         * g10/keydb-private.h: new file.
6906         * g10/keydb.c: prefix function names with "internal" and move original
6907         functions to ...
6908         * g10/call-keyboxd.c: new file.  Divert to the internal fucntion if
6909         --use-keyboxd is used.  Add a CTRL arg to most fucntions and change
6910         all callers.
6911         * g10/Makefile.am (common_source): Add new files.
6912         (noinst_PROGRAMS): Do bot build gpgcompose.
6913
6914         kbx: Fix keyboxd search first.
6915         + commit 5e00c1773d8fd44ba95b39a48e12b0ec94ac8cbe
6916         * kbx/kbxserver.c (cmd_next): Switch to mode next if needed.
6917
6918         kbx: Allow searching from start.
6919         + commit 1545b948e1c8e8fa4873d434fb790a88ed96091c
6920         * kbx/kbxserver.c (cmd_search): Detect empty pattern.
6921
6922 2019-09-06  Stephan Mueller  <smueller@chronox.de>
6923
6924         gpg: expand GPG groups when resolving a key.
6925         + commit e825aea2ba3529c333d7ec2c76e63998cb83d999
6926         * g10/expand-group.c: New
6927         * g10/pkclist.c: Extract expand_group and expand_id into expand-group.c.
6928         * g10/keydb.h: Add prototypes of expand_id and expand_group.
6929         * g10/getkey.c: Use expand_group before resolving key references.
6930         * g10/Makefile.am: Compile expand-group.c.
6931
6932 2019-09-06  Werner Koch  <wk@gnupg.org>
6933
6934         gpg: Make --quiet work on --send-keys.
6935         + commit d9c4c3776b8ec3261e13693e230dd480b1127b18
6936         * g10/keyserver.c (keyserver_put): Act upon --quiet.
6937
6938 2019-09-05  Werner Koch  <wk@gnupg.org>
6939
6940         gpg: Prepare parser for the new attestation certificates.
6941         + commit 209caaff66fbe96df144e6b1474435992e087fa4
6942         * common/openpgpdefs.h (SIGSUBPKT_ATTST_SIGS): New.
6943         * g10/keydb.h (IS_ATTST_SIGS): New.
6944         (IS_CERT): Include the new one.
6945         * g10/sign.c (mk_notation_policy_etc): Do not put notations into
6946         attestation key signatures.
6947         * g10/parse-packet.c (dump_sig_subpkt): Add new arg digest_algo.
6948         Print the attestation sigs.
6949         (parse_one_sig_subpkt): Support SIGSUBPKT_ATTST_SIGS.
6950         (can_handle_critical): Ditto.
6951         (enum_sig_subpkt): Pass digest algo to dump_sig_subpkt.
6952
6953         gpg: Rework the signature subpacket iteration function.
6954         + commit e1d9be730ca07e10a20df5ef60d7562030f10676
6955         * g10/parse-packet.c (enum_sig_subpkt): Replace first arg by two args
6956         so that the entire signature packet is available.  Change all callers.
6957         (parse_sig_subpkt): Ditto.
6958
6959         scd: Implement auto-switching between Yubikey apps.
6960         + commit 7febb4f2476742936b829424ad23df662b37f4b4
6961         * scd/app.c (apptype_from_keyref): New.
6962         (maybe_switch_app): Add arg 'keyref' and use this also for switching.
6963         Change all callers to pass a keyref if needed.
6964
6965         scd:openpgp: Avoid PIN caching issues after re-select.
6966         + commit 5d9eb060b764d45152edb266cd8a08f5724ad709
6967         * scd/app-openpgp.c (do_reselect): Clear PIN cache flags.
6968
6969         scd:piv: Allow the keygrip as alternative to a keyref.
6970         + commit 947b44e835dec5967d400a9391d8746fb3f759df
6971         * scd/app-piv.c (find_dobj_by_keyref): Allow the keygrip as input.
6972
6973         scd: Improve locking of app_do_with_keygrip.
6974         + commit c8d739a356d3dacdf63fa2d722d117401cf52caf
6975         * scd/app.c (app_do_with_keygrip): Lock once per card.
6976
6977         scd: New debug flag "app".
6978         + commit 4e701953fec6efb10aaf34373e648b1dcafba054
6979         * scd/scdaemon.h (DBG_APP_VALUE, DBG_APP): New.
6980         * scd/scdaemon.c (debug_flags): Add "app".
6981         * scd/app.c (xstrapptype): New.
6982         (app_readcert, app_readkey, app_getattr): Add debug output.
6983         (app_setattr, app_sign, app_auth): Ditto.
6984         (app_writecert, app_writekey, app_change_pin): Ditto.
6985         (app_check_pin): Ditto.
6986
6987 2019-09-05  NIIBE Yutaka  <gniibe@fsij.org>
6988
6989         agent: Fix ask_for_card to allow a key on multiple cards.
6990         + commit 9f39e0167d0642bcfb9bcabcbc7f8160b39a20ee
6991         * agent/divert-scd.c (ask_for_card): Don't use SERIALNO to select
6992         card, but use KEYGRIP.
6993
6994 2019-09-04  Werner Koch  <wk@gnupg.org>
6995
6996         scd: New sub-command cmd_has_option for GETINFO.
6997         + commit fed9c93e05af4aeeb2fe9af81200fc7a745f2dec
6998         * scd/command.c (cmd_getinfo): Add cmd_has_option sub-command.
6999
7000         scd: Add option --all to the SERIALNO command.
7001         + commit 9a0d8f2d8906d2f37c2755c4695b91c27c8acc2f
7002         * scd/command.c (cmd_serialno): Add option --all.
7003         (open_card_with_request): Implement that option.
7004         * scd/app.c (select_all_additional_applications_internal): New.
7005         (select_additional_application): Add mode to call new function.
7006
7007         scd: Fix Error checking in additioal app selection.
7008         + commit fa258379424c6d48538b054b8dc7c1ab5c2d4290
7009         * scd/app.c (select_additional_application): Return error for unknown
7010         NAME.
7011
7012         scd: Add option --multi to the LEARN command.
7013         + commit 5cf5a04bae03d622a42753735c60dfab3b24ade8
7014         * scd/app-common.h (APP_LEARN_FLAG_MULTI): New.
7015         * scd/command.c (cmd_learn): Add option --multi.
7016         * scd/app.c (app_write_learn_status): Factor some code out to ...
7017         (write_learn_status_core): new.
7018         (app_write_learn_status): Implement flag --multi.
7019
7020         scd: Use a macro for the flag parameter of learn_status.
7021         + commit 2cdea776cd6db13c8f4ff45c89bd3292f216b186
7022         * scd/app-common.h (APP_LEARN_FLAG_KEYPAIRINFO): New flag macro..
7023         * scd/command.c (cmd_learn): Pass that flag instead of a plain number.
7024         * scd/app-nks.c (do_learn_status_core): Use new flag.
7025         * scd/app-p15.c (do_learn_status): Ditto.
7026         * scd/app-piv.c (do_learn_status): Ditto.
7027         * scd/app-sc-hsm.c (do_learn_status): Ditto.
7028         * scd/app.c (app_write_learn_status): Ditto.
7029
7030 2019-08-23  Werner Koch  <wk@gnupg.org>
7031
7032         gpg,sm: Implement keybox compression run and release lock in gpgsm.
7033         + commit e64f0dfd72de548837f630bccd249a87451b89c5
7034         * g10/keydb.c (keydb_add_resource): Call keybox_compress.
7035         * sm/keydb.c (keydb_add_resource): Release the lock after a compress.
7036
7037         kbx: Include deleted records into the --stats output.
7038         + commit 5ef0d7a795cf2462314ea0cb72c7efa7243ab405
7039         * kbx/keybox-dump.c (_keybox_dump_file): Take deleted records in
7040         account.
7041
7042         kbx: Fix regression in compression trigger from July 18.
7043         + commit 30aaa4ba007210aa043c3d524415495a4d9fd17f
7044         * kbx/keybox-update.c (keybox_compress): Change condition back.
7045         Also use make_timestamp for CUT_TIME.
7046
7047         gpg: Allow --locate-external-key even with --no-auto-key-locate.
7048         + commit d058d80ed0d5edeff6d85108054b1dfd45ddad7d
7049         * g10/getkey.c (akl_empty_or_only_local): New.
7050         * g10/gpg.c (DEFAULT_AKL_LIST): New.
7051         (main): Use it here.
7052         (main) <aLocateExtKeys>: Set default AKL if none is set.
7053
7054         gpg: Silence some warning messages during -Kv.
7055         + commit d7aca1bef68589134b36395901b92496a7a37392
7056         * g10/options.h (glo_ctrl): Add flag silence_parse_warnings.
7057         * g10/keylist.c (list_all): Set that during secret key listsings.
7058         * g10/parse-packet.c (unknown_pubkey_warning): If new flag is set do
7059          not print info message normally emitted inh verbose mode.
7060         (can_handle_critical_notation, enum_sig_subpkt): Ditto.
7061         (parse_signature, parse_key, parse_attribute_subpkts): Ditto.
7062
7063         gpg: Do not show two informational diagnostics with quiet.
7064         + commit f14ddeb89c4519cd7ccf52c4595b93ab11ccbda1
7065         * g10/trustdb.c (verify_own_keys): Silence informational diagnostic.
7066
7067         gpgconf: Suggest the use of --gpgconf-test on --launch problems.
7068         + commit 2a45800b2f8043d2533403eaadf8736d15ad7017
7069         * tools/gpgconf-comp.c (gc_component_launch): Change suggestion.
7070
7071 2019-08-22  Werner Koch  <wk@gnupg.org>
7072
7073         gpg: Extend --quick-gen-key for creating keys from a card.
7074         + commit d3f5d8544fdb43082ff34b106122bbf0619a0ead
7075         * g10/keygen.c (parse_key_parameter_part): Add arg R_KEYGRIP and
7076         support the special algo "card".
7077         (parse_key_parameter_string): Add args R_KEYGRIP and R_SUBKEYGRIP.
7078         Handle the "card" algo.  Adjust callers.
7079         (parse_algo_usage_expire): Add arg R_KEYGRIP.
7080         (quickgen_set_para): Add arg KEYGRIP and put it into the parameter
7081         list.
7082         (quick_generate_keypair): Handle algo "card".
7083         (generate_keypair): Also handle the keygrips as returned by
7084         parse_key_parameter_string.
7085         (ask_algo): Support ed25519 from a card.
7086
7087 2019-08-22  NIIBE Yutaka  <gniibe@fsij.org>
7088
7089         gpg: Factor export_ssh_key.
7090         + commit 6f760e6eb0e8820d386b33c28cb14210adfc6aef
7091         * g10/export.c (export_one_ssh_key): Factor out.
7092         (export_ssh_key): Use export_one_ssh_key.
7093
7094         dns: Fix irrelevant use of tmpfile.
7095         + commit e00e68135c01351ed66fed3c4453a1b13c8d522f
7096         * dirmngr/dns.c (dns_trace_open): Don't use tmpfile.
7097
7098 2019-08-21  Werner Koch  <wk@gnupg.org>
7099
7100         gpg: In a list of card keys show the standard keys.
7101         + commit ce403c74dbc9c027b823910f22338269e625f76f
7102         * g10/keygen.c (ask_algo): Identify the standard keys.
7103
7104         scd:nks: Extend keypairinfo with usage flags.
7105         + commit 0d2c9ef29c1741845df2d56f0024f87eab42efb3
7106         * scd/app-nks.c (do_learn_status_core): Return usage.
7107
7108         (cherry picked from commit 0a9053eff0406c6799ee201013194200c0ed3487)
7109
7110         scd:nks: Support attributes $ENCRKEYID and $SIGNKEYID.
7111         + commit 671e54d62c39a9e196d13714cb67c2f3c38f2fa0
7112         * scd/app-nks.c (do_getattr): Add new attributes.
7113
7114         gpg: New option --use-only-openpgp-card.
7115         + commit c97c2e578dd173ef5e7916a3aa539b3a65a7d86d
7116         * g10/gpg.c (opts): Add option.
7117         (main): Set flag.
7118         * g10/options.h: Add flags.use_only_openpgp_card.
7119         * g10/call-agent.c (start_agent): Implement option.
7120
7121 2019-08-21  NIIBE Yutaka  <gniibe@fsij.org>
7122
7123         scd: Fix check_application_conflict.
7124         + commit 6fae96094c973be880919f3a7798ca69d9365b69
7125         * scd/scd/app.c (check_application_conflict): Compare APPTYPE.
7126
7127         scd: Fix selecting additional APP.
7128         + commit 8dc19d35e854264cfe503cdbb9e5ccafa9bc97d0
7129         * scd/app.c (select_additional_application_internal): Factor out.
7130         (select_additional_application): Getting the lock and call
7131         select_additional_application_internal, set current_apptype, then.
7132         (select_application): Call select_additional_application_internal
7133         for Yubikey.
7134
7135         scd: Fix how select_additional_application is called.
7136         + commit 4781c4a86608b57f9d1daf55b9b2970130fe6120
7137         * scd/app.c (check_application_conflict): Check against current APP.
7138         (select_additional_application): Update current_apptype of CTRL.
7139
7140         scd: Fix resetting CARD_CTX.
7141         + commit 09d000babb71990ef1b3f42017a67516bb994388
7142         * scd/app.c (deallocate_card): Don't call scd_clear_current_app.
7143         (card_reset): Reset ctrl->current_apptype.
7144         * scd/command.c (open_card_with_request): Likewise.
7145         (send_client_notifications): Likewise.
7146         (scd_clear_current_app): Remove.
7147
7148         scd: Fix switching to another APP.
7149         + commit d4f135c34b332f1f833617a7f1ef0bdbff5eb589
7150         * scd/app.c (select_additional_application): Initialize card of APP.
7151         Break after the selection.
7152         Don't free APP if success.
7153
7154 2019-08-20  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7155
7156         doc: fix minor spelling and tense errors.
7157         + commit b7793c3af32b2d99359022f805636953a50d8c68
7158         * doc/{gpg,gpgsm,wks}.texi: minor orthographic cleanup.
7159
7160         doc: clarify CARD event counter.
7161         + commit cba6e1bd7242e8b8c6822f4e93368cb315b5524b
7162         * doc/gpg-agent.texi: improve documentation of CARD entry in
7163         GETEVENTCOUNTER description.
7164
7165 2019-08-08  Andre Heinecke  <aheinecke@intevation.de>
7166
7167         speedo, w32: Add w32-wixlib target for MSI package.
7168         + commit 0b7088dc8035e8d5832c89085eea3b288de67710
7169         * Makefile.am (EXTRA_DIST): Add wixlib.wxs
7170         * build-aux/speedo.mk (w32-wixlib): New target.
7171         (w32-release): Build wixlib if WIXPREFIX is set.
7172         (help): Add documentation.
7173         * build-aux/speedo/w32/wixlib.wxs
7174
7175 2019-08-08  Werner Koch  <wk@gnupg.org>
7176
7177         build: Sign all Windows binaries.
7178         + commit 4964691861796ad6e7bd59dd553a617f68676b2b
7179         * build-aux/speedo.mk (AUTHENTICODE_SIGNHOST): New.
7180         (AUTHENTICODE_TOOL): New.
7181         (AUTHENTICODE_FILES): New.
7182         (installer): Sign listed files.
7183         (AUTHENTICODE_SIGNHOST): New macro.
7184         (sign-installer): Use that macro instead of direct use of osslsigncode.
7185
7186 2019-08-07  NIIBE Yutaka  <gniibe@fsij.org>
7187
7188         scd: Remove fallback mechanism to PC/SC.
7189         + commit 100642e776964219936e493315eb8b7c99742f41
7190         * scd/apdu.c [HAVE_LIBUSB] (apdu_open_reader): Simply let it fail.
7191
7192 2019-08-06  NIIBE Yutaka  <gniibe@fsij.org>
7193
7194         agent: Fix an error path of agent_get_confirmation.
7195         + commit bb82ad018a7bf93bd704cf44e51cd086e41a4ad5
7196         * agent/call-pinentry.c (agent_get_confirmation): Make sure
7197         unlock_pinentry is always called.
7198
7199 2019-08-06  Werner Koch  <wk@gnupg.org>
7200
7201         kbx: Add framework for the SEARCH command.
7202         + commit 5ea6250cc5761612d17ca4fb34eed096f26e2826
7203         * kbx/backend-kbx.c: New.
7204         * kbx/backend-support.c: New.
7205         * kbx/backend.h: New.
7206         * kbx/frontend.c: New.
7207         * kbx/frontend.h: New.
7208         * kbx/kbxserver.c: Implement SEARCH and NEXT command.
7209         * kbx/keybox-search-desc.h (enum pubkey_types): New.
7210         * kbx/keybox-search.c (keybox_get_data): New.
7211         * kbx/keyboxd.c (main): Add a standard resource.
7212
7213         kbx: Allow writing using a estream.
7214         + commit 1f980d23af8b818ed8246ec6bf13b9c61b963ec0
7215         * kbx/keybox-file.c (_keybox_write_header_blob): New optional arg
7216         stream.  Change callers.
7217
7218         tools: New option --keyboxd for gpg-connect-agent.
7219         + commit 0611f548bcd3c772084d6c3111dc88a09a67f65a
7220         * configure.ac: New option --keyboxd-pgm.
7221         (KEYBOXD_NAME, KEYBOXD_DISP_NAME): New ac_defines.
7222         * common/util.h: Add substitutes for new error codes.
7223         (GNUPG_MODULE_NAME_KEYBOXD): New.
7224         * common/homedir.c (gnupg_module_name): Support
7225         GNUPG_MODULE_NAME_KEYBOXD.
7226         * common/asshelp.c (SECS_TO_WAIT_FOR_KEYBOXD): New.
7227         (wait_for_sock): Support keyboxd.
7228         (start_new_service): Ditto.
7229         (start_new_keyboxd): New.
7230         * tools/gpg-connect-agent.c: New options --keyboxd and
7231         --keyboxd-program.
7232         (start_agent): Implement new option.
7233
7234 2019-08-06  NIIBE Yutaka  <gniibe@fsij.org>
7235
7236         common: Fix line break handling, finding a space.
7237         + commit f588dd8d1766de48c90a5501cf2d537f256d003e
7238         * common/name-value.c (assert_raw_value): Correctly find a space.
7239
7240         gpg: Don't report NO_SECKEY for valid key.
7241         + commit d8a49bbcd1b1d40ab0ddadac0dbb16a5d75c626e
7242         * g10/mainproc.c (proc_encrypted): Report status of STATUS_NO_SECKEY
7243         only when some error occurred.
7244
7245 2019-08-05  Werner Koch  <wk@gnupg.org>
7246
7247         common: Remove code duplication for service starting.
7248         + commit e22ebf357050f98558b428502a565fc3dc256932
7249         * common/homedir.c (gpg_agent_socket_name): New.
7250         * common/asshelp.c (start_new_service): New.  Based on
7251         start_new_gpg_agent.
7252         (start_new_gpg_agent): Divert to start_new_service.
7253         (start_new_dirmngr): Ditto.
7254
7255 2019-08-05  NIIBE Yutaka  <gniibe@fsij.org>
7256
7257         sm: Support AES-256 key.
7258         + commit ef2424144a070c9199e40424ec8d9b5a9919aa72
7259         * sm/decrypt.c (prepare_decryption): Handle a case for AES-256.
7260
7261 2019-08-02  Werner Koch  <wk@gnupg.org>
7262
7263         common: Change yet unused status_printf function.
7264         + commit d8a84594abe4be933756db07b987dc8bcd79c8b9
7265         * common/asshelp2.c (status_printf): Rename to status_no_printf.
7266         (status_printf): New.
7267
7268 2019-07-26  NIIBE Yutaka  <gniibe@fsij.org>
7269
7270         sm: Fix error checking of decryption result.
7271         + commit 15fe78184cc66ce6e657a6e949a522d7821f8a1c
7272         * sm/call-agent.c (gpgsm_agent_pkdecrypt): Fix condition.
7273
7274 2019-07-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7275
7276         gpg,gpgsm: Handle pkdecrypt responses with/without NUL terminators.
7277         + commit 3ba091ab8c93c87741a451f579d63dd500d7621d
7278         * g10/call-agent.c (agent_pkdecrypt): accept but do not require
7279         NUL-terminated data from the agent.
7280         * sm/call-agent.c (gpgsm_agent_pkdecrypt): accept but do not require
7281         NUL-terminated data from the agent.
7282
7283 2019-07-25  NIIBE Yutaka  <gniibe@fsij.org>
7284
7285         gpg: photoid: Use standard spawn API.
7286         + commit fd9e6ae22eb93aa5140b56e1b0fa14e6402d6099
7287         * g10/photoid.c (exec_write, exec_read, exec_finish): Remove.
7288         (setup_input_file): Rename from make_tempdir.
7289         (expand_args): Drop support of 'o' and 'O'.
7290         (fill_command_argv, run_with_pipe, create_temp_file) New.
7291         (show_photo): New with gnupg_spawn_process_fd and gnupg_wait_process.
7292         (show_photos): Call show_photo.
7293
7294         gpg: photoid: Move functions from exec.c.
7295         + commit c57c5004ec6cc7dc7b7a4f250516199a8a1e31fc
7296         * g10/exec.c (w32_system): Expose to public.
7297         (exec_write, exec_read, exec_finish, make_tempdir, expand_args): Move
7298         to photoid.c.
7299         * g10/exec.h: Likewise.
7300         * g10/photoid.c (exec_write, exec_read, exec_finish, make_tempdir)
7301         (expand_args): Move here.
7302
7303         scd: Handle CCID bwi of time extension.
7304         + commit 996c497a864d820af06333014b2c5f74d1054866
7305         * scd/ccid-driver.c (bulk_in): Increase timeout by the multiplier
7306         value as defined section 6.2.6 in CCID specification.
7307
7308         scd: Fix bBWI value.
7309         + commit 858dc9564326e65e6d8771af160d4513aea1e4eb
7310         * scd/ccid-driver.c (ccid_transceive_apdu_level): Use bBWI=0 for APDU
7311         level transfer.
7312         (ccid_transceive): Use bBWI=0 or the value returend by WTX for TPDU
7313         level transfer.
7314
7315 2019-07-24  NIIBE Yutaka  <gniibe@fsij.org>
7316
7317         common: Fix the previous commit.
7318         + commit 044379772fc5b0f39c6a36809722e702808b6ec3
7319         * common/asshelp.c [HAVE_W32_SYSTEM] (start_new_gpg_agent): Use
7320         gnupg_spawn_process_detached.
7321         (start_new_dirmngr): Likewise.
7322
7323         common: Use gnupg_spawn_process_fd to invoke gpg-agent/dirmngr.
7324         + commit b1c56cf9e2bb51abfd47747128bd2a6285ed1623
7325         * common/asshelp.c (start_new_gpg_agent): Call gnupg_spawn_process_fd
7326         and gnupg_wait_process.
7327         (start_new_dirmngr): Likewise.
7328
7329         common,w32: Fix cast from gnupg_fd_t to call _open_osfhandle.
7330         + commit a64411c607d5450e786c3207b9023394574c979b
7331         * common/sysutils.c (translate_sys2libc_fd): Use intptr_t.
7332         (gnupg_tmpfile): Likewise.
7333
7334 2019-07-23  NIIBE Yutaka  <gniibe@fsij.org>
7335
7336         gpg: A little clean up.
7337         + commit 7bfbb9fa7e7693cd7f19a8d130aa0a9a82825d5d
7338         * g10/keyserver.c: Don't include exec.h.
7339         * g10/photoid.c (image_type_to_string): It's constant.
7340         * g10/photoid.h (image_type_to_string): Likewise.
7341
7342 2019-07-22  NIIBE Yutaka  <gniibe@fsij.org>
7343
7344         scd: Error code map fix for older Yubikey.
7345         + commit 13bc0431ff1ce51246694208df611cc4561fb4b3
7346         * scd/iso7816.c (map_sw): Recognize 6A86.
7347
7348 2019-07-19  NIIBE Yutaka  <gniibe@fsij.org>
7349
7350         gpg: The option --passphrase= can be empty.
7351         + commit fcd766719a6e8f18f4be4c0f91e12aa157ca5506
7352         * g10/gpg.c (opts): Use ARGPARSE_o_s for oPassphrase to allow
7353         empty string.
7354
7355         card: Fix showing KDF object attribute.
7356         + commit 98f4eff7ffde106ae4f60739d1104282430ac14f
7357         * g10/call-agent.c (learn_status_cb): Parse the KDF DO.
7358         * g10/card-util.c (current_card_status): Show it correctly.
7359
7360         scd: Support "[CHV3]" attribute for keyid string.
7361         + commit 57565d5f975d3c00853bb49678d63ee8b896b741
7362         * scd/app-openpgp.c (check_keyidstr0: Relax the check.
7363
7364         card: Support disabling KDF functionality.
7365         + commit 9c0cd9d07546698ab66cedd06c503e6b698593f9
7366         * g10/card-util.c (kdf_setup): Can be "off".
7367
7368 2019-07-18  Werner Koch  <wk@gnupg.org>
7369
7370         kbx: Allow "gpgsm --faked-system-time" to kick off a compression run.
7371         + commit 824ca6f042dc69edaf67bf9d4e875be75babab00
7372         * kbx/keybox-update.c (keybox_compress): Use make_timestamp.
7373
7374 2019-07-18  NIIBE Yutaka  <gniibe@fsij.org>
7375
7376         gpg: More check for symmetric key encryption.
7377         + commit 44be675b759d27bac310c2de8bae1b7882a26b65
7378         * g10/dek.h (DEK): Use debugger friendly type of unsigned int.
7379         * g10/mainproc.c (symkey_decrypt_seskey): Add another check.
7380
7381 2019-07-16  NIIBE Yutaka  <gniibe@fsij.org>
7382
7383         doc: Fix description of the field 11.
7384         + commit 4195ce15f4942245a29ef20ace42ad0f27e82ffd
7385         * doc/DETAILS: Fix.
7386
7387         dirmngr: Don't add system CAs for SKS HKPS pool.
7388         + commit 75e0ec65170b7053743406e3f3b605febcf7312a
7389         * dirmngr/http.c [HTTP_USE_GNUTLS] (http_session_new): Clear
7390         add_system_cas.
7391
7392 2019-07-12  Werner Koch  <wk@gnupg.org>
7393
7394         scd: Remove useless GNUPG_SCD_MAIN_HEADER macro.
7395         + commit fb1c8978f57b8f92e2ea9d10afc1d133656c9706
7396         * scd/apdu.c (): Remove never set and useless macro.
7397         * scd/ccid-driver.c: Ditto.
7398         * scd/iso7816.c: Ditto.
7399
7400 2019-07-12  NIIBE Yutaka  <gniibe@fsij.org>
7401
7402         doc: Dependencies for figures are only for maintainers.
7403         + commit 58bab1a8784b0dbae70b5d74757cd56484292d1c
7404         * doc/Makefile.am [MAINTAINER_MODE] (.svg.eps, etc.): Enable only
7405         when maintainer-mode.
7406
7407         Fix a reference in comment.
7408         + commit 4e601c7643fcfa3d8babcce58daa4c6c6a42d338
7409         * common/openpgp-s2k.c: Fix.
7410
7411         gpg: Don't try decryption by session key when NULL.
7412         + commit 89303b9998ea30d87b4c60dd48097dbe5e986a89
7413         * g10/mainproc.c (proc_encrypted): Only call get_session_key when
7414         PKENC_LIST is not NULL.
7415         Return GPG_ERR_BAD_KEY, instead of GPG_ERR_NO_SECKEY, when
7416         it's encrypted only by symmetric key.
7417
7418 2019-07-11  NIIBE Yutaka  <gniibe@fsij.org>
7419
7420         agent: Relax the handling of pinentry error for keyboard grab.
7421         + commit 02d8b383833bac0382e910a2058b11b127acfd4d
7422         * agent/call-pinentry.c (start_pinentry): It's not fatal when
7423         pinentry doesn't support no-grab/grab option.
7424
7425         scd: Fix internal CCID driver, so that -DTEST works.
7426         + commit b31060425226b45deb21915bf5cd8b6ba62bd098
7427         * scd/ccid-driver.c: Support a test program by ccid-driver.
7428
7429         scd: Fix debug logging of the internal CCID driver.
7430         + commit 2536bf276189a474a3a1ca9716368cf5d991b0d6
7431         * scd/ccid-driver.c [GNUPG_MAJOR_VERSION] (DEBUGOUT): Use log_debug.
7432
7433         gpg: Fix getting User ID.
7434         + commit 29c7fb4053d207c163802642babbdbb6f885727e
7435         * g10/getkey.c (user_id_db): Remove, as no use anymore.
7436         (get_user_id_string): Use cache_get_uid_bykid.
7437         (get_user_id_byfpr): Use cache_get_uid_byfpr.
7438         * g10/objcache.c (cache_get_uid_byfpr): New.
7439         * g10/objcache.h (cache_get_uid_byfpr): New.
7440
7441 2019-07-10  NIIBE Yutaka  <gniibe@fsij.org>
7442
7443         gpg: Improve import slowness.
7444         + commit 33c17a8008c3ba3bb740069f9f97c7467f156b54
7445         * g10/import.c (read_block): Avoid O(N^2) append.
7446         (sec_to_pub_keyblock): Likewise.
7447
7448         gpg: Fix keyring retrieval.
7449         + commit a7a043e82555a9da984c6fb01bfec4990d904690
7450         * g10/keyring.c (keyring_get_keyblock): Avoid O(N^2) append.
7451
7452 2019-07-09  Werner Koch  <wk@gnupg.org>
7453
7454         gpg: Do not try the import fallback if the options are already used.
7455         + commit a29156d5a650702ad79fe11f45782bc4bc159c13
7456         * g10/import.c (import_one): Check options.
7457
7458         gpg: Fix regression in option "self-sigs-only".
7459         + commit eec150eca78a053193a0994a96482791b5da36be
7460         * g10/import.c (read_block): Make sure KEYID is availabale also on a
7461         pending packet.
7462
7463 2019-07-09  NIIBE Yutaka  <gniibe@fsij.org>
7464
7465         sm: Fix card access.
7466         + commit 37d758e5f2b5d07dc937098cf48096cf35ea61e4
7467         * sm/call-agent.c (gpgsm_scd_pksign): Cast to integer for %b.
7468
7469         scd: ccid-driver: Initial getting ATR more robustly.
7470         + commit c51a5685554a06e00ae1e99070b44613b2f8d417
7471         * scd/ccid-driver.c (send_power_off): New.
7472         (do_close_reader): Use send_power_off.
7473         (ccid_get_atr): Add error recovery.
7474
7475 2019-07-08  NIIBE Yutaka  <gniibe@fsij.org>
7476
7477         scd: Fix keygrip search.
7478         + commit 39c40e572c5632f836d089dce49224f947244bf2
7479         * scd/app.c (app_do_with_keygrip): Break the entire loop.
7480
7481 2019-07-05  Werner Koch  <wk@gnupg.org>
7482
7483         gpg: With --auto-key-retrieve prefer WKD over keyservers.
7484         + commit 96bf8f477805bae58cfb77af8ceba418ff8aaad9
7485         * g10/mainproc.c (check_sig_and_print): Print a hint on how to make
7486         use of the preferred keyserver.  Remove keyserver lookup just by the
7487         keyid.  Try a WKD lookup before a keyserver lookup.
7488
7489         wkd: Change client/server limit back to 64 KiB.
7490         + commit b0e8724b102535c27a8c973ec038d340858a8eb8
7491         * tools/wks-receive.c (decrypt_data): Change limit.
7492
7493 2019-07-05  NIIBE Yutaka  <gniibe@fsij.org>
7494
7495         sm: Return the last error for pubkey decryption.
7496         + commit 38b9da7de3350b1e56b85a058cdb1fdded78cf6d
7497         * sm/decrypt.c: Use TMP_RC for ksba_cms_get_issuer_serial,
7498         and return the last error when no key is available.
7499         Fix the error report with TMP_RC for second call of
7500         ksba_cms_get_issuer_serial.
7501
7502         gpg: Return the last error for pubkey decryption.
7503         + commit 6cc4119ec03be61c78189a0bec99372035289b91
7504         * g10/mainproc.c (proc_encrypted): Check ->result against -1.
7505         When c->dek == NULL, put GPG_ERR_NO_SECKEY only when not set.
7506         * g10/pubkey-enc.c (get_session_key): Set k->result by the result of
7507         get_it.
7508         When no secret key is available for some reasons, return the last
7509         specific error, if any.
7510
7511 2019-07-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7512
7513         dirmngr: fix handling of HTTPS redirections during HKP.
7514         + commit 064aeb14c9b869e114e9ec789526fad8da657230
7515         * dirmngr/ks-engine-hkp.c (send_request): Reinitialize HTTP session when
7516         following a HTTP redirection.
7517
7518 2019-07-04  Werner Koch  <wk@gnupg.org>
7519
7520         gpg: Add "self-sigs-only" and "import-clean" to the keyserver options.
7521         + commit 23c978640812d123eaffd4108744bdfcf48f7c93
7522         * g10/gpg.c (main): Change default.
7523
7524         gpg: Avoid printing false AKL error message.
7525         + commit 91a6ba32347a21c9029728eec96b8ff80f944629
7526         * g10/getkey.c (get_pubkey_byname): Add special traeatment for default
7527         and skipped-local.
7528
7529         gpg: New command --locate-external-key.
7530         + commit d00c8024e58822e0623b3fad99248ce68a8b7725
7531         * g10/gpg.c (aLocateExtKeys): New.
7532         (opts): Add --locate-external-keys.
7533         (main): Implement that.
7534         * g10/getkey.c (get_pubkey_byname): Implement GET_PUBKEY_NO_LOCAL.
7535         (get_best_pubkey_byname): Add arg 'mode' and pass on to
7536         get_pubkey_byname.  Change callers.
7537         * g10/keylist.c (public_key_list): Add arg 'no_local'.
7538         (locate_one): Ditto.  Pass on to get_best_pubkey_byname.
7539
7540         gpg: Make the get_pubkey_byname interface easier to understand.
7541         + commit 9980f81da765f88a65604ab083563bf15ccdb425
7542         * g10/keydb.h (enum get_pubkey_modes): New.
7543         * g10/getkey.c (get_pubkey_byname): Repalce no_akl by a mode arg and
7544         change all callers.
7545
7546 2019-07-03  Werner Koch  <wk@gnupg.org>
7547
7548         dirmngr: Avoid endless loop in case of HTTP error 503.
7549         + commit 8b113bb148f273524682252233b3c65954e1419e
7550         * dirmngr/ks-engine-hkp.c (SEND_REQUEST_EXTRA_RETRIES): New.
7551         (handle_send_request_error): Use it for 503 and 504.
7552         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Pass a new var for
7553         extra_tries.
7554
7555         dirmngr: Do not rewrite the redirection for the "openpgpkey" subdomain.
7556         + commit 37f0c55c7be3fc4912237f2bc72466aef6f8aa36
7557         * dirmngr/http.c (same_host_p): Consider certain subdomains to be the
7558         same.
7559
7560 2019-07-02  Peter Lebbing  <peter@digitalbrains.com>
7561
7562         Mention --sender in documentation.
7563         + commit cf92f7d96f83e5af7d2c232c8450c2c7d900ade8
7564
7565
7566 2019-07-01  Werner Koch  <wk@gnupg.org>
7567
7568         gpg: Fallback to import with self-sigs-only on too large keyblocks.
7569         + commit 3a403ab04eeb45f12b34f9d9c421dac93eaf2160
7570         * g10/import.c (import_one): Rename to ...
7571         (import_one_real): this.  Do not print and update stats on keyring
7572         write errors.
7573         (import_one): New.  Add fallback code.
7574
7575         gpg: New import and keyserver option "self-sigs-only"
7576         + commit 2e349bb6173789e0e9e42c32873d89c7bc36cea4
7577         * g10/options.h (IMPORT_SELF_SIGS_ONLY): New.
7578         * g10/import.c (parse_import_options): Add option "self-sigs-only".
7579         (read_block): Handle that option.
7580
7581         gpg: Make read_block in import.c more flexible.
7582         + commit 894b72d796c826b1c7e1df788e16874cd051e672
7583         * g10/import.c: Change arg 'with_meta' to 'options'.  Change callers.
7584
7585 2019-07-01  NIIBE Yutaka  <gniibe@fsij.org>
7586
7587         tools: gpgconf: Killing order is children-first.
7588         + commit 7c877f942a344e7778005840ed7f3e20ace12f4a
7589         * tools/gpgconf-comp.c (gc_component_kill): Reverse the order.
7590
7591 2019-06-28  NIIBE Yutaka  <gniibe@fsij.org>
7592
7593         agent: Close a dialog cleanly when gpg/ssh is killed for CONFIRM.
7594         + commit 374a0775546b6241ca2dd10836202c50300d8e91
7595         * agent/call-pinentry.c (watch_sock_start): Factor out
7596         from do_getpin.
7597         (watch_sock_end): Likewise.
7598         (do_getpin): Use those functions.
7599         (agent_get_confirmation): Likewise.
7600         (popup_message_thread): Likewise.
7601
7602 2019-06-25  Werner Koch  <wk@gnupg.org>
7603
7604         scd: Do not conflict if a card with another serialno is demanded.
7605         + commit 92ba831758cff0262504ac51e5df7a439844327c
7606         * scd/app.c (check_application_conflict): Add args to pass a serialno.
7607         * scd/command.c (open_card_with_request): Pass the serialno to
7608         check_application_conflict.
7609
7610         scd: Return a stable list with "getinfo card_list".
7611         + commit c8e62965bc90eabff5c4b7cb349bd8e41584c01b
7612         * scd/app.c (compare_card_list_items): New.
7613         (app_send_card_list): Sort the card objects by slot.
7614
7615         scd: Add an re-select mechanism to switch apps.
7616         + commit d803b3bb3c084b6bce4d2bd161db50dc45442e5b
7617         * scd/app-common.h (struct app_ctx_s): Add func ptr 'reselect'.
7618         * scd/app-piv.c (do_reselect): New.
7619         (app_select_piv): Move AID constant to file scope.
7620         * scd/app-openpgp.c (do_reselect): New.
7621         (app_select_openpgp): Move AID constant to file scope.
7622         * scd/app.c (apptype_from_name): New.
7623         (check_application_conflict): Check against all apps of the card.
7624         Always set current_apptype.
7625         (select_additional_application): New.
7626         (maybe_switch_app): New.
7627         (app_write_learn_status, app_readcert, app_readkey, app_getattr)
7628         (app_setattr, app_sign, app_auth, app_decipher, app_writecert)
7629         (app_writekey, app_genkey, app_change_pin, app_check_pin): Use it here.
7630         (app_do_with_keygrip): Force reselect on success.
7631         (app_new_register): Move setting of CURRENT_APPTYPE to ...
7632         (select_application): here so that it will be set to the requested
7633         card.
7634         * scd/command.c (open_card_with_request): Select additional
7635         application if possible.
7636
7637 2019-06-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7638
7639         spelling: Fix "synchronize"
7640         + commit d7d1ff45574ed935d07642964a529a358b11a1a7
7641
7642
7643 2019-06-21  Werner Koch  <wk@gnupg.org>
7644
7645         scd: Take the card look while running app->with_keygrip.
7646         + commit b304c006a3c9ba186fb2510859df7f02a0acad25
7647         * scd/app.c (app_do_with_keygrip): Lock the card.
7648
7649         scd: Take the lock earlier in the function dispatchers.
7650         + commit 0400a4eb1782e7a4aea5b04492c93939c6b9799a
7651         * scd/app.c: Chnage all function dispatcher.
7652
7653         scd: Add code to check whether app switching is possible.
7654         + commit 1b78e4951ed7a66ec71ca036e7680148a63143be
7655         * scd/app.c (check_conflict): Fold into ...
7656         (check_application_conflict): this and adjust callers.  Return a
7657         different error code if it is possible to switch apps.
7658
7659         scd: Track the currently selected app.
7660         + commit 91e2931caac9b914efa0a4524effaaa5948ebd00
7661         * scd/scdaemon.h (struct server_control_s): Add 'current_apptype'.
7662         * scd/command.c (scd_clear_current_app): New.
7663         * scd/app.c (app_new_register): Set it.
7664         (deallocate_card): Clear it.
7665
7666         scd: Simplify inclusion of app-common.h.
7667         + commit 43dcf93407d6d2b87b6e7db74fd05fd237495bfe
7668         * scd/scdaemon.h: Include app-common.h.  Remove inclusion of that
7669         header from all other files.
7670         (card_t, app_t): Move typedef to ...
7671         * scd/app-common.h: here.  Use them in the defs.
7672
7673         gpg: Very minor code cleanup.
7674         + commit 4256e9f0f1bf27ed2e93ca3890003ead208ef6df
7675         * g10/decrypt-data.c (decrypt_data): Remove superfluous test.
7676
7677         scd: Use enums for cardtype and apptype.
7678         + commit 9551275857c1f9a75fee5736fa6c3cf361364f22
7679         * scd/app-common.h (cardtype_t): New.
7680         (apptype_t): New.
7681         (struct card_ctx_s): Change type of cardtype.
7682         (struct app_ctx_s): Change type of apptype.  Adjust all users.
7683         * scd/app.c (struct app_priority_list_s): Add field apptype.
7684         (strcardtype): New.  Use as needed.
7685         (strapptype): New.  Use as needed.
7686
7687 2019-06-20  NIIBE Yutaka  <gniibe@fsij.org>
7688
7689         po: Update Japanese Translation.
7690         + commit 0ccb5ddef18f04b86855530838af4cbb9b8aa30b
7691
7692
7693         tools: Fix error handling for gpg-pair-tool.
7694         + commit d5287f43fd4def68901519a4c1d471b81ee86ed0
7695         * tools/gpg-pair-tool.c (read_message): Initialize ERR.
7696
7697 2019-06-19  Werner Koch  <wk@gnupg.org>
7698
7699         scd: Split data structures into app and card related objects.
7700         + commit 5a5288d051a551a1a8f169225e62572f6ee8cb10
7701         * scd/app-common.h (struct card_ctx_s): New.
7702         (struct app_ctx_s): Factor card specific fields out to card_ctx_s.
7703         (app_get_slot): New.
7704         * scd/scdaemon.h (card_t): New.
7705         (struct server_control_s): Rename field app_ctx to card_ctx and change
7706         all users.
7707         * scd/app-dinsig.c: Use app_get_slot and adjust for chang in card
7708         related fields.
7709         * scd/app-geldkarte.c: Ditto.
7710         * scd/app-nks.c: Ditto.
7711         * scd/app-openpgp.c: Ditto.
7712         * scd/app-p15.c: Ditto.
7713         * scd/app-sc-hsm.c: Ditto.
7714         * scd/app.c: Lost of changes to adjust for the changed data
7715         structures.  Change all callers.
7716         (app_list_lock): Rename to card_list_lock.
7717         (app_top): Remove.
7718         (card_top): New.
7719         (lock_app): Rename to lock_card and change arg type.
7720         (unlock_app): Rename to unlock_card.
7721         (app_dump_state): Print card and app info.
7722         (app_reset): Rename to card_reset.
7723         (app_new_register): Change for the new data structure.
7724         (deallocate_card): Dealloc card and all apps.
7725         (app_ref): Rename to card_ref.
7726         (app_unref): Rename to card_unref.
7727         (app_unref_locked): Rename to card_unref_locked.
7728         (card_get_serialno): New.
7729         * scd/command.c (cmd_pkdecrypt): Actually use the looked up card and
7730         former app object and not the standard one from the context.
7731
7732 2019-06-18  NIIBE Yutaka  <gniibe@fsij.org>
7733
7734         scd: KEYINFO: Send LF for --data.
7735         + commit c3dd53a65dc9ea2c4814e24079f0270c2fef14c6
7736         * scd/command.c (send_keyinfo): Send LF for --data.
7737
7738 2019-06-17  Werner Koch  <wk@gnupg.org>
7739
7740         scd:piv: Add the do_with_keygrip feature.
7741         + commit e900bf29737b3f7a09f749a271f2c5d7b59c49eb
7742         * scd/app-piv.c (do_with_keygrip): New.
7743         (app_select_piv): Register function.
7744
7745         scd: Add explict functions for 'app' reference counting.
7746         + commit c594dcfc93486cd26e193aa5c82bb8a8f30ab57b
7747         * scd/app.c (app_ref): New.
7748         (app_unref): New.
7749         (release_application): Renamed to ...
7750         (app_unref_locked): this and remove arg locked_already.  Change
7751         callers to use this or app_ref.
7752         * scd/command.c (open_card_with_request):
7753         (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): Use app_ref and app_unref
7754         instead of accessing the counter directly.
7755
7756         scd: Slight change to app->fnc.do_with_keygrip.
7757         + commit 70f7b262877b1e751d8557dc04a09a420e9d8a8f
7758         * scd/app-openpgp.c (do_with_keygrip): Return a real error code to
7759         avoid misinterpretation of the result.  Also fix the case for a too
7760         small buffer.
7761
7762         scd: Use the correct gpg for the v1.0 OpenPGP card hack.
7763         + commit 479c2775d5df64432c1bf64faae7f9abd3042850
7764         * scd/app-openpgp.c (get_public_key): Use gnupg_module_name instead of
7765         just "gpg".
7766
7767 2019-06-14  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7768
7769         fix up 6562de7475b21cd03c7b1a83a591fa563c589f5b.
7770         + commit 6e46862abd2c2e82f245e381c3f08c5829fb61e6
7771
7772
7773 2019-06-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7774
7775         doc/gpgsm: explain what "policy-file" refers to.
7776         + commit 6562de7475b21cd03c7b1a83a591fa563c589f5b
7777         A new user who sees "policy-file" and searches naively through the
7778         documentation to find it again won't be able to tell what this refers
7779         to, since "policies.txt" doesn't otherwise match the search string
7780         "policy".  This gives them a fighting chance at finding the
7781         documentation.
7782
7783 2019-06-07  NIIBE Yutaka  <gniibe@fsij.org>
7784
7785         gpgparsemail: Die on parse error, printing errno thing.
7786         + commit 1e9d61fb95e4813225a40f720231196abdb83992
7787         * tools/gpgparsemail.c (parse_message): Revert the change.
7788         * tools/rfc822parse.c (transition_to_body): Set ERRNO.
7789         (transition_to_header, insert_header): Likewise.
7790
7791 2019-06-06  NIIBE Yutaka  <gniibe@fsij.org>
7792
7793         scd: Bring back --card-timeout option as deprecated.
7794         + commit 72fe8d652fce6cb9104bb07ef0fb811cbab3303a
7795         * doc/scdaemon.texi (card-timeout): Add.
7796         * scd/scdaemon.c (main): Revert the change.
7797
7798         gpgparsemail: Die on parse error (not abort).
7799         + commit c13e459ffeffb8c5387c44b3c04bb92b7111a75b
7800         * tools/gpgparsemail.c (parse_message): Don't use ERRNO.
7801         * tools/rfc822parse.c (transition_to_body): Return -1.
7802         (transition_to_header, insert_header): Likewise.
7803
7804 2019-06-04  Werner Koch  <wk@gnupg.org>
7805
7806         sm: Print a better diagnostic for encryption certificate selection.
7807         + commit 9bf650db022b6b65bbfa74c311cdc3e6b73d3b44
7808         * sm/certlist.c (gpgsm_add_to_certlist): Add diagnostic and fold two
7809         similar branches.
7810
7811 2019-06-04  NIIBE Yutaka  <gniibe@fsij.org>
7812
7813         g10: Block signals in g10_exit.
7814         + commit 537fbe13af6a70e105982c4b69c1bcc3908ffb08
7815         * g10/gpg.c (g10_exit): Block all signals before calling
7816         emergency_cleanup.
7817
7818         agent: Allow TERM="".
7819         + commit 0076bef2026a87c4c0e05bad7d322638b1de3f37
7820         * agent/call-pinentry.c (start_pinentry): When TERM is none,
7821         don't send OPTION ttytype to pinentry.
7822
7823         agent: Add pinentry_loopback_confirm declaration.
7824         + commit 3a1bb0081087c0604ed681642114934ffe607fa1
7825         * agent/agent.h (pinentry_loopback_confirm): New.
7826
7827         scd: Remove unsupported --card-timeout option.
7828         + commit 4262933ef6f7530b4ad55646250a6763de9bf103
7829         * doc/scdaemon.texi (card-timeout): Remove.
7830         * scd/scdaemon.c (main): Remove oCardTimeout handling.
7831
7832         g10,agent: Support CONFIRM for --delete-key.
7833         + commit 20acc7c0226550530085a674ef1bb41ebfa39408
7834         * agent/call-pinentry.c (agent_get_confirmation): Add call of
7835         pinentry_loopback_confirm.
7836         (agent_popup_message_start): Likewise.
7837         (agent_popup_message_stop): Return if it's loopback mode.
7838         * agent/command.c (pinentry_loopback_confirm): New.
7839
7840         * g10/call-agent.c (default_inq_cb): Support "CONFIRM" inquery
7841         when PINENTRY_MODE_LOOPBACK mode.
7842         (confirm_status_cb): New.
7843         (agent_delete_key): Supply confirm_status_cb to set the description
7844         string for confirmation.
7845
7846         doc: Add a section for gpg-check-pattern.
7847         + commit eaf3b89d11156cc055644fc50761e1692e791e84
7848         * doc/Makefile.am: Add gpg-check-pattern.1.
7849         * doc/tools.texi (GPG-CHECK-PATTERN): New.
7850
7851 2019-06-03  Werner Koch  <wk@gnupg.org>
7852
7853         Return better error code for some getinfo IPC commands.
7854         + commit f2ac6742d403a5a95d84ac7cdcf8913c39297bcb
7855         * agent/command.c (cmd_getinfo): Return GPG_ERR_FALSE as boolean False.
7856         * g13/server.c (cmd_getinfo): Ditto.
7857         * sm/server.c (cmd_getinfo): Ditto.
7858
7859 2019-05-29  NIIBE Yutaka  <gniibe@fsij.org>
7860
7861         agent: Add A-flag for KEYINFO output for card.
7862         + commit 6790eaf9529209e36099d9520821a3b8ad02ccef
7863         * agent/command.c (do_one_keyinfo): Add ON_CARD argument to put
7864         A-flag.
7865         (cmd_keyinfo): Call agent_card_keyinfo to offer additional information
7866         if it's on card.
7867
7868 2019-05-28  Werner Koch  <wk@gnupg.org>
7869
7870         dirmngr: Allow for other hash algorithms than SHA-1 in OCSP.
7871         + commit 405f41007c35ef52bf85c7c2686dab01fdf2c950
7872         * dirmngr/ocsp.c (do_ocsp_request): Remove arg md.  Add args r_sigval,
7873         r_produced_at, and r_md.  Get the hash algo from the signature and
7874         create the context here.
7875         (check_signature): Allow any hash algo.  Print a diagnostic if the
7876         signature does not verify.
7877
7878         dirmngr: Improve finding OCSP cert.
7879         + commit 4699e294cc9e59f35262adca26ca291927acca9e
7880         * dirmngr/certcache.c (find_cert_bysubject): Add better debug output
7881         and try to locate by keyid.
7882
7883         agent: Make an MD encoding function more robust.
7884         + commit a2a90717466a88756bbdc6b11577cfee061fc1a8
7885         * agent/pksign.c (do_encode_md): Use ascii_tolower and avoid
7886         uninitalized TMP in the error case.
7887
7888 2019-05-28  NIIBE Yutaka  <gniibe@fsij.org>
7889
7890         agent: Remove unused agent_show_message.
7891         + commit 19415a265253a5ab72e79493d2f40c7e4441d81e
7892         * agent/call-pinentry.c (agent_show_message): Remove.
7893         * agent/genkey.c (take_this_one_anyway): Rename from
7894         take_this_one_anyway2.  Remove a dead path calling agent_show_message.
7895         (check_passphrase_constraints): Use take_this_one_anyway.
7896
7897 2019-05-27  Werner Koch  <wk@gnupg.org>
7898
7899         sm: Avoid confusing diagnostic for the default key.
7900         + commit 521e7d4644ed365ab2de3dfaa6c3728ca10ba79b
7901         * sm/certlist.c (cert_usage_p): Add arg 'silent' and change all
7902         callers.
7903         (gpgsm_cert_use_sign_p): Add arg 'silent' and pass to cert_usage_p.
7904         Change all callers.
7905         * sm/sign.c (gpgsm_get_default_cert): Set SILENT when calling
7906         gpgsm_cert_use_sign_p
7907
7908         gpg: Fixed i18n markup of some strings.
7909         + commit b6289af9738ddbc533defba0aefd950a9ca21ff1
7910         * g10/tofu.c: Removed some translation markups which either make no
7911         sense or are not possble.
7912
7913         gpg: Allow deletion of subkeys with --delete-[secret-]key.
7914         + commit cc6069ac6ecd57dcbb808f28d54fd9f89dc55014
7915         * common/userids.c (classify_user_id): Do not set the EXACT flag in
7916         the default case.
7917         * g10/export.c (exact_subkey_match_p): Make static,
7918         * g10/delkey.c (do_delete_key): Implement subkey only deleting.
7919
7920 2019-05-23  NIIBE Yutaka  <gniibe@fsij.org>
7921
7922         agent: Stop scdaemon after reload when disable_scdaemon.
7923         + commit 7158a5696dc84e1ebd2b523ab83a43a32423181d
7924         * agent/call-scd.c (agent_card_killscd): New.
7925         * agent/gpg-agent.c (agent_sighup_action): Call agent_card_killscd.
7926
7927         g10: Copy expiredate from primary key when marked expired.
7928         + commit 265e6d670682e661cec89657c3330b0b388ca0a7
7929         * g10/getkey.c (merge_selfsigs): Update ->expiredate of subkey.
7930
7931 2019-05-21  Werner Koch  <wk@gnupg.org>
7932
7933         gpg: Do not bail on an invalid packet in the local keyring.
7934         + commit 4c7d63cd5b02ebfd09933bebd1312e01958b3e20
7935         * g10/keydb.c (parse_keyblock_image): Treat invalid packet special.
7936
7937         gpg: Do not allow creation of user ids larger than our parser allows.
7938         + commit 156788a43c20e38cd52f4f725395aff2c72142ff
7939         * g10/parse-packet.c: Move max packet lengths constants to ...
7940         * g10/packet.h: ... here.
7941         * g10/build-packet.c (do_user_id): Return an error if too data is too
7942         large.
7943         * g10/keygen.c (write_uid): Return an error for too large data.
7944
7945         gpg: Unify the the use of the print_pubkey_info functions.
7946         + commit 126caa34bbdb36f40514643b9d6f5ead3240c735
7947         * g10/keylist.c (format_seckey_info): Remove.
7948         (print_pubkey_info, print_seckey_info): Remove.
7949         (format_key_info): New.
7950         (print_key_info): New.
7951         (print_key_info_log): New.
7952         * g10/card-util.c (current_card_status): Use print_key_info and remove
7953         the useless condition on KEYBLOCK.
7954         * g10/delkey.c (do_delete_key): Replace print_pubkey_info and
7955         print_seckey_info by print_key_info.
7956         * g10/keyedit.c (menu_addrevoker): Replace print_pubkey_info by
7957         print_key_info.
7958         * g10/pkclist.c (do_we_trust_pre): Ditto.
7959         * g10/revoke.c (gen_desig_revoke): Ditto.
7960         (gen_revoke): Ditto.  Also use print_key_info_log instead of separate
7961         functions.
7962
7963 2019-05-21  NIIBE Yutaka  <gniibe@fsij.org>
7964
7965         scd: Fix for SCARD_IO_REQUEST structure.
7966         + commit 1eb93d9229c54baa5f1b7ccf7d105d3692c51a4d
7967         * scd/apdu.c (struct pcsc_io_request_s): Use pcsc_dword_t for Windows.
7968
7969         agent: For SSH key, don't put NUL-byte at the end.
7970         + commit 479f7bf31ce405e558d844c3eb576b463a8697e5
7971         * agent/command-ssh.c (ssh_key_to_protected_buffer): Update
7972         the length by the second call of gcry_sexp_sprint.
7973
7974 2019-05-20  Werner Koch  <wk@gnupg.org>
7975             Matheus Afonso Martins Moreira
7976
7977         gpg: Do not delete any keys if --dry-run is passed.
7978         + commit 110a4550179fd1faeee8d2f17a33ed7807a397ae
7979         * g10/delkey.c (do_delete_key): Don't delete the keyblock on dry runs.
7980         Do not clear the ownertrust.  Do not let the agent delete the key.
7981
7982 2019-05-17  Werner Koch  <wk@gnupg.org>
7983
7984         gpg: Fix using --decrypt along with --use-embedded-filename.
7985         + commit 386bacd9741639d7f5e83c81628d3cad78407197
7986         * g10/options.h (opt): Add flags.dummy_outfile.
7987         * g10/decrypt.c (decrypt_message): Set this global flag instead of the
7988         fucntion local flag.
7989         * g10/plaintext.c (get_output_file): Ignore opt.output if that was
7990         used as a dummy option aslong with --use-embedded-filename.
7991
7992         gpg: Improve the photo image viewer selection.
7993         + commit 7e5847da0f3d715cb59d05adcd9107b460b6411b
7994         * g10/exec.c (w32_system): Add "!ShellExecute" special.
7995         * g10/photoid.c (get_default_photo_command): Use the new ShellExecute
7996         under Windows and fallbac to 'display' and 'xdg-open' in the Unix
7997         case.
7998         (show_photos): Flush stdout so that the output is shown before the
7999         image pops up.
8000
8001 2019-05-16  Werner Koch  <wk@gnupg.org>
8002
8003         kbx: Fix an endless loop under Windows due to an incomplete fix.
8004         + commit 6fc5df1e10129f3171d80cf731f310b9e8d97c26
8005         * kbx/keybox-search.c (keybox_search):  We need to seek to the last
8006         position in all cases not just when doing a NEXT.
8007
8008         gpgconf: Before --launch check that the config file is fine.
8009         + commit 50c2f76ae65d4ee793876865011fa97c85f38ac2
8010         * tools/gpgconf-comp.c (gc_component_launch): Check the conf file.
8011         * tools/gpgconf.c (gpgconf_failure): Call log_flush.
8012
8013         scd: Remove unused cruft from GnuPG 1.x.
8014         + commit 79c99921e35921140c83d7c101829d95f038f3da
8015         * scd/apdu.c: Remove code used only by GnuPG 1.
8016         * scd/app-openpgp.c: Ditto.
8017         * scd/ccid-driver.c: Ditto.
8018         * scd/iso7816.c: Ditto.
8019
8020 2019-05-16  NIIBE Yutaka  <gniibe@fsij.org>
8021
8022         agent,scd: Scan and load all public keys for availability.
8023         + commit dc35b25195e564affdea7969a7c4ea4e200ab45f
8024         * agent/divert-scd.c (ask_for_card): Scan by SERIALNO command.
8025         * scd/app-openpgp.c (do_with_keygrip): Make sure to load pubkey.
8026
8027 2019-05-15  NIIBE Yutaka  <gniibe@fsij.org>
8028
8029         agent: Support scdaemon operation using KEYGRIP.
8030         + commit 1091f22511e1a8259eb5c998f5c207ee95723a4a
8031         * agent/agent.h (struct card_key_info_s): New.
8032         (divert_pksign, divert_pkdecrypt): New API.
8033         * agent/call-scd.c (card_keyinfo_cb): New.
8034         (agent_card_free_keyinfo, agent_card_keyinfo): New.
8035         * agent/divert-scd.c (ask_for_card): Having GRIP argument,
8036         ask scdaemon with agent_card_keyinfo.
8037         (divert_pksign, divert_pkdecrypt): Ditto.
8038         * agent/pkdecrypt.c (agent_pkdecrypt): Supply GRIP.
8039         * agent/pksign.c (agent_pksign_do): Ditto.
8040
8041         scd: Don't put newline at the end of status.
8042         + commit 01730529f20882cd98882a61408e9bee960c86f1
8043         * scd/command.c (send_keyinfo): Remove newline.
8044
8045 2019-05-15  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8046
8047         gpg: enable OpenPGP export of cleartext keys with comments.
8048         + commit 392e59a3d487e174edcea570e69a0f946c55a19a
8049         * g10/export.c (cleartext_secret_key_to_openpgp): ignore trailing
8050         sublists in private-key S-expression.
8051
8052 2019-05-15  Werner Koch  <wk@gnupg.org>
8053
8054         gpgconf: Support --homedir for --launch.
8055         + commit a4be077abdbf286e3dcdeb0553ba0e74b7e2df5f
8056         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Simplify because
8057         gnupg_homedir already returns abd absolute name.
8058         (scdaemon_runtime_change): Ditto.
8059         (dirmngr_runtime_change): Ditto.
8060         (gc_component_launch): Support --homedir.
8061
8062         sm: Add a couple of debug calls to the keydb module.
8063         + commit 6e041b7b356c3adba714e98f4ecf0dd007375390
8064         * sm/gpgsm.h (DBG_CLOCK_VALUE, DBG_CLOCK): New.
8065         (DBG_LOOKUP_VALUE, DBG_LOOKUP): New.
8066         * sm/gpgsm.c: new debug flags "lookup" and "clock"
8067         * sm/keydb.c: Add log_clock calls to most functions.
8068         (keydb_search_desc_dump): New.
8069         (keydb_search) [DBG_LOOKUP]: Print descrh decription.
8070         * sm/keylist.c (list_cert_std): Flush FP in debug mode to better
8071         syncronize the output with the debug output
8072
8073 2019-05-15  NIIBE Yutaka  <gniibe@fsij.org>
8074
8075         scd: Fix return value for KEYINFO command.
8076         + commit 62c29af63203400947569c5965a8cf05a22fcd4c
8077         * scd/command.c (cmd_keyinfo): Return GPG_ERR_NOT_FOUND if none.
8078
8079 2019-05-14  Werner Koch  <wk@gnupg.org>
8080
8081         kbx: Fix deadlock in gpgsm on Windows due to a sharing violation.
8082         + commit 49b236af0ecbb6df67513feb4b63851f2e159ea2
8083         * kbx/keybox-init.c (keybox_lock) [W32]: Use _keybox_close_file
8084         instead of fclose so that a close is done if the file is opened by
8085         another handle.
8086         * kbx/keybox-search.c (keybox_search): Remember the last offset and
8087         use that in NEXT search mode if we had to re-open the file.
8088
8089         sm: Change keydb code to use the keybox locking.
8090         + commit 22e274f839f9a6c9a511648f29cae497f6492c97
8091         * kbx/keybox-init.c (keybox_lock): New arg TIMEOUT.  Change all
8092         callers to pass -1 when locking.
8093         * sm/keydb.c (struct resource_item): Remove LOCKANDLE.
8094         (struct keydb_handle): Add KEEP_LOCK.
8095         (keydb_add_resource): Use keybox locking instead of a separate dotlock
8096         for testing whether we can run a compress.
8097         (keydb_release): Reset KEEP_LOCK.
8098         (keydb_lock): Set KEEP_LOCK.
8099         (unlock_all): Take care of KEEP_LOCK.
8100         (lock_all): Use keybox_lock instead of dotlock fucntions.
8101         (keydb_delete): Remove arg UNLOCK.
8102         * sm/delete.c (delete_one): Adjust keydb_delete.  Due to the KEEP_LOCK
8103         the keydb_release takes care of unlocking.
8104
8105 2019-05-14  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8106
8107         agent: correct length for uri and comment on 64-bit big-endian platforms
8108         + commit 5651b2c460a7898027c1765c2063c302606b5f85
8109         * agent/findkey.c (agent_public_key_from_file): pass size_t as int to
8110         gcry_sexp_build_array's %b.
8111
8112 2019-05-14  Werner Koch  <wk@gnupg.org>
8113
8114         gpg: Do not print a hint to use the deprecated --keyserver option.
8115         + commit 7102d9b798b0985412007d3bf8b954959e4adec7
8116         * g10/keyserver.c (keyserver_search): Remove a specialized error
8117         message.
8118
8119 2019-05-14  NIIBE Yutaka  <gniibe@fsij.org>
8120
8121         g10: Fix possible null dereference.
8122         + commit 802a2aa300bad3d4385d17a2deeb0966da4e737d
8123         * g10/armor.c (armor_filter): Access ->d in the internal loop.
8124
8125 2019-05-13  Werner Koch  <wk@gnupg.org>
8126
8127         gpg: Change update_keysig_packet to replace SHA-1 by SHA-256.
8128         + commit 484d6ba5896acfa3dcf73d9536bcf5e006579b5f
8129         * g10/sign.c (update_keysig_packet): Convert digest algo when needed.
8130
8131         gpg: Cleanup use of make_keysig_packet.
8132         + commit d07666412d4317460c6f03b3ffd03edf4a715ef7
8133         * g10/sign.c (make_keysig_packet): Remove obsolete arg diegst_algo
8134         which was always passed as 0.  Change all callers.
8135
8136         * g10/gpgcompose.c (signature): Warn when trying to set a digest algo.
8137
8138 2019-05-13  NIIBE Yutaka  <gniibe@fsij.org>
8139
8140         build: Update m4/iconv.m4.
8141         + commit 1cd2aca03b8807c6f8e4929ace462bb606dcd53f
8142         * m4/iconv.m4: Update from gettext 0.20.1.
8143
8144 2019-05-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8145
8146         doc: correct documentation for gpgconf --kill.
8147         + commit 9662538be6afc8beee0f2654f9a8f234c5dac016
8148         * doc/tools.texi(gpgconf): Correct documentation for gpgconf --kill.
8149
8150 2019-05-07  Werner Koch  <wk@gnupg.org>
8151
8152         agent: If a Label is make sure that label is part of the prompt.
8153         + commit 69e0b080f06b66eee96327617c6fbffe8a88d586
8154         * agent/findkey.c (has_comment_expando): New.
8155         (agent_key_from_file): Modify DESC_TEXT.
8156
8157         agent: Allow the use of "Label:" in a key file.
8158         + commit 5388537806411c19ea84db8c4419f410be9ac616
8159         * agent/findkey.c (linefeed_to_percent0A): New.
8160         (read_key_file): Add optional arg 'keymeta' and change all callers.
8161         (agent_key_from_file): Prefer "Label:" over the comment for protected
8162         keys.
8163
8164         common: New functions nvc_delete_named and nvc_get_string.
8165         + commit b5985d0ca21ca376f22c050857bfda05592cebef
8166         * common/name-value.c (nvc_delete_named): New.
8167         (nvc_get_string): New.
8168
8169 2019-05-07  NIIBE Yutaka  <gniibe@fsij.org>
8170
8171         scd: Support direct use of app with PKSIGN/PKAUTH/PKDECRYPT.
8172         + commit c856ee7312c9eeb7d79a30189a49f70986420364
8173         * scd/command.c (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): When length
8174         of keyidstr is 40, it is considered as a keygrip for direct use.
8175
8176 2019-05-03  Werner Koch  <wk@gnupg.org>
8177
8178         agent: Put Token lines into the key files.
8179         + commit bdf252e76ada0056bec2ee7940255f32552328c5
8180         * agent/findkey.c (write_extended_private_key): Add args serialno and
8181         keyref.  Write a Token line if that does not yet exist.
8182         (agent_write_private_key): Add args serialno and keyref and change all
8183         callers.
8184         (agent_write_shadow_key): Skip leading spaces.
8185         * agent/keyformat.txt: Improve extended key format docs.
8186
8187         common: In private key mode write "Key:" always last in name-value.
8188         + commit c9fa28bfad297b17e76341ffb40383ce92da5d44
8189         * common/name-value.c (nvc_write): Take care of Key. Factor some code
8190         out to ...
8191         (write_one_entry): new.
8192
8193         gpg: Use just the addrspec from the Signer's UID.
8194         + commit bd6ecbb8f8e92fe4a7fed40fcf470eb83bda0927
8195         * g10/parse-packet.c (parse_signature): Take only rthe addrspec from a
8196         Signer's UID subpacket.
8197
8198 2019-04-30  Werner Koch  <wk@gnupg.org>
8199
8200         sm: Add yet inactive options to support authenticode.
8201         + commit 5f3864fb647237f862bbe7e26763dffa0e945202
8202         * sm/gpgsm.c (opts): New options --authenticode and --attribute.
8203         * sm/gpgsm.h (opt): Add vars authenticode and attribute_list.
8204         * sm/sign.c (add_signed_attribute): New but inactive.
8205         (gpgsm_sign): Use new options.
8206
8207 2019-04-29  Andre Heinecke  <aheinecke@gnupg.org>
8208
8209         common,w32: Breakaway detached childs when in job.
8210         + commit 03df28b18b92b3fd3d2ba1000903c088dc5b0fcf
8211         * common/exechelp-w32.c (gnupg_spawn_process_detached): Add
8212         CREATE_BREAKAWAY_FROM_JOB creation flag if required.
8213
8214 2019-04-25  NIIBE Yutaka  <gniibe@fsij.org>
8215
8216         scd: Add new command: KEYINFO.
8217         + commit 874bc970ba6ec243ff474ef090242e0f7be6a7bc
8218         * scd/app-common.h (struct app_ctx_s): Add with_keygrip function.
8219         * scd/app-openpgp.c (do_with_keygrip): New.
8220         * scd/app.c (app_do_with_keygrip): New.
8221         * scd/command.c (cmd_keyinfo): New.
8222         (send_keyinfo): New.
8223
8224 2019-04-23  NIIBE Yutaka  <gniibe@fsij.org>
8225
8226         po: Update Japanese Translation.
8227         + commit d5443b918dd3b8ccb3c4fdd8fe9d70d84aa312ff
8228
8229
8230         scd: Allow KEYGRIP as KEYIDSTR.
8231         + commit e769609cd3c12d2e26955538399172016f78d2d4
8232         * scd/app-openpgp.c (struct app_local_s): Add keygrip_str.
8233         (store_keygrip): New.
8234         (read_public_key): Call store_keygrip to hold keygrip.
8235         (get_public_key): Likewise.
8236         (send_keypair_info): Use stored keygrip_str.
8237         (check_keyidstr): Allow use of KEYGRIP.
8238         (do_check_pin): Allow use of KEYGRIP of signing slot.
8239
8240 2019-04-22  NIIBE Yutaka  <gniibe@fsij.org>
8241
8242         scd: Factor out a function to check keyidstr.
8243         + commit b0f0791e4ade845b2a0e2a94dbda4f3bf1ceb039
8244         * scd/app-openpgp.c (check_keyidstr): New.
8245         (do_sign, do_auth, do_decipher, do_check_pin): Use check_keyidstr.
8246
8247 2019-04-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8248
8249         gpgconf: correct capitalization of "Tor"
8250         + commit ea7d85ff658c000f5f469e0a869af0e512e8c59f
8251         * tools/gpgconf-comp.cb (gc_options_dirmngr): correct capitalization
8252         of Tor.
8253
8254 2019-04-18  Andre Heinecke  <aheinecke@intevation.de>
8255
8256         g10: Fix double free when locating by mbox.
8257         + commit e57954ed278cb5e6e725005b1ecaf7ce70006ce0
8258         * g10/getkey.c (get_best_pubkey_byname): Set new.uid always
8259         to NULL after use.
8260
8261 2019-04-17  NIIBE Yutaka  <gniibe@fsij.org>
8262
8263         g10: Fix a memory leak.
8264         + commit a861f9343d6e6d18064e4e54aeb914c5a10b2095
8265         * g10/import.c (import): Care PNDING_PKT on error.
8266
8267 2019-04-16  NIIBE Yutaka  <gniibe@fsij.org>
8268
8269         common: Fix AWK portability.
8270         + commit b6f0b0efa19e0434024bc16e246032b613fd448a
8271         * common/Makefile.am: Use pkg_namespace.
8272         * common/mkstrtable.awk: Use pkg_namespace.  Regexp fix.
8273
8274 2019-04-13  Werner Koch  <wk@gnupg.org>
8275
8276         gpg: New caching functions.
8277         + commit 64a5fd37271a3e454c0d59ac3500e1a1b232e4f7
8278         * g10/objcache.c: New.
8279         * g10/objcache.h: New.
8280         * g10/Makefile.am (common_source): Add them.
8281         * g10/gpg.c: Include objcache.h.
8282         (g10_exit): Call objcache_dump_stats.
8283         * g10/getkey.c: Include objcache.h.
8284         (get_primary_uid, release_keyid_list): Remove.
8285         (cache_user_id): Remove.
8286         (finish_lookup): Call the new cache_put_keyblock instead of
8287         cache_user_id.
8288         (get_user_id_string): Remove code for mode 2.
8289         (get_user_id): Implement using cache_get_uid_bykid.
8290
8291 2019-04-12  Werner Koch  <wk@gnupg.org>
8292
8293         gpg: Cache a once computed fingerprint in PKT_public_key.
8294         + commit 60f384592144de53c9a5f5e11d7f73ce863aa94f
8295         * g10/packet.h (PKT_public_key): Add fields fpr and fprlen.
8296         * g10/keyid.c (do_fingerprint_md): Remove.
8297         (compute_fingerprint): New.
8298         (keyid_from_pk): Simplify.
8299         (fingerprint_from_pk): Simplify.
8300         (hexfingerprint): Avoid using extra array.
8301
8302 2019-04-11  Werner Koch  <wk@gnupg.org>
8303
8304         gpg: Accept also armored data from the WKD.
8305         + commit 1b1f649deaeba963ed7240b27f848004db0b051f
8306         * g10/keyserver.c (keyserver_import_wkd): Clear NO_ARMOR.
8307
8308         gpg: Set a limit of 5 to the number of keys imported from the WKD.
8309         + commit 40595b57936e39ee2a4d58b1dd19edea7537a471
8310         * g10/import.c (import): Limit the number of considered keys to 5.
8311         (import_one): Return the first fingerprint in case of WKD.
8312
8313 2019-04-11  Andre Heinecke  <aheinecke@gnupg.org>
8314
8315         speedo,w32: Install gpg-card.exe.
8316         + commit b30351496dd3056462c8db25c03fed6d2aa00e9b
8317         * build-aux/speedo/w32/inst.nsi: Install gpg-card.exe
8318
8319 2019-04-05  Werner Koch  <wk@gnupg.org>
8320
8321         gpg: Fix printing of the user id during import.
8322         + commit ea32842d5c2e2d262d32791130d7eae5c8c3edcf
8323         * g10/getkey.c (struct keyid_list): Add field fprlen.
8324         (cache_user_id): Set and test it.
8325         (get_user_id_byfpr): Make static, add arg fprlen and use it.
8326         (get_user_id_byfpr_native): Add arg fprlen and change all callers.
8327
8328 2019-04-04  Werner Koch  <wk@gnupg.org>
8329
8330         scd:piv: Fix RSA decryption.
8331         + commit 958172cc3acb7172bc5e1fa76efafe26695ed402
8332         * scd/app-piv.c (do_decipher): Fixup leading zero byte.
8333
8334 2019-04-04  NIIBE Yutaka  <gniibe@fsij.org>
8335
8336         scd: Better handling of timeout and time extension.
8337         + commit f1cf799a37f320d33cae445c74f3fc1936dd9995
8338         * scd/ccid-driver.c (CCID_CMD_TIMEOUT_LONGER): Remove.
8339         (ccid_transceive): Don't use x4 blindly for bBWI, but use dynamically
8340         determined value.  Use value from variable wait_more for bulk_in.
8341         Set wait_more by the value of time extension request.
8342
8343 2019-04-03  Werner Koch  <wk@gnupg.org>
8344
8345         gpg: Improve the code to decrypt using PIV cards.
8346         + commit 2c9b68f28de1ce9a6a18d091caba01ddd4707774
8347         * g10/call-agent.c (agent_scd_keypairinfo): Add arg 'keyref'.
8348         * g10/keygen.c (ask_algo): Adjust.
8349         * g10/skclist.c (enum_secret_keys): Request the keyref directly.
8350
8351         scd: New options --info and --info-only for READKEY.
8352         + commit 679b8f1c045476bd6e0a1f1565379263143994ee
8353         * scd/command.c (cmd_readkey): New options --info and --info-only.
8354         * scd/app.c (app_readkey): New arg 'flags'.
8355         * scd/app-common.h (APP_READKEY_FLAG_INFO): New.
8356         (struct app_ctx_s): New args 'ctrl' and 'flags' for member readkey.
8357         Change all implementers.
8358         * scd/app-nks.c (do_readkey): Stub implementation of
8359         APP_READKEY_FLAG_INFO.
8360         * scd/app-openpgp.c (do_readkey): Implement APP_READKEY_FLAG_INFO.
8361         * scd/app-piv.c (do_readkey): Ditto.
8362
8363         gpg: Allow decryption using PIV cards.
8364         + commit ec6a6779236a89d4784a6bb7de0def9cc0f9e8a4
8365         * g10/call-agent.c (struct getattr_one_parm_s): New.
8366         (getattr_one_status_cb): New.
8367         (agent_scd_getattr_one): New.
8368         * g10/pubkey-enc.c (get_it): Allow the standard leading zero byte from
8369         pkcs#1.
8370         * g10/skclist.c (enum_secret_keys): Handle non-OpenPGP cards.
8371
8372         scd: New standard attributes $ENCRKEYID and $SIGNKEYID.
8373         + commit 2b1135cf920cf3d863813d60f032d476dcccfb58
8374         * g10/call-agent.c (agent_scd_keypairinfo): Use --keypairinfo.
8375         * sm/call-agent.c (gpgsm_agent_scd_keypairinfo): Ditto.
8376         * scd/app-openpgp.c (do_getattr): Add attributes "$ENCRKEYID" and
8377         "$SIGNKEYID".
8378         * scd/app-piv.c (do_getattr): Ditto.
8379
8380         gpg: Avoid endless loop if a card's serial number can't be read.
8381         + commit 1f688e0d1dba4dd7a311d416d06d654ed7b4290d
8382         * g10/skclist.c (enum_secret_keys): Move list forward on error.
8383
8384         card: Allow card selection with LIST.
8385         + commit bcca3acb87c36213fef9311236ea949d006f759c
8386         * tools/card-call-scd.c (start_agent): Request serialno only whean
8387         started.
8388         (scd_serialno): Allow NULL for r_serialno.
8389         * tools/gpg-card.c (cmd_factoryreset): Use changed scd_serialno.
8390         (cmd_list): New.
8391         (dispatch_command): Use cmd_list for cmdLIST.
8392         (interactive_loop): Ditto.
8393
8394         gpg: Print modern style key info for non-decryptable keys.
8395         + commit 2d3392c147a24e49ee4658d4a50fafd68599fba3
8396         * g10/mainproc.c (print_pkenc_list): Simplify.
8397
8398 2019-04-02  Werner Koch  <wk@gnupg.org>
8399
8400         gpg: Allow direct key generation from card with --full-gen-key.
8401         + commit a480182f9d7ec316648cb64248f7a0cc8f681bc3
8402         * g10/call-agent.c (agent_scd_readkey): New.
8403         * g10/keygen.c (ask_key_flags): Factor code out to ..
8404         (ask_key_flags_with_mask): new.
8405         (ask_algo): New mode 14.
8406
8407         common: Extend function pubkey_algo_string.
8408         + commit f952226043824cbbeb8517126b5266926121c4e8
8409         * common/sexputil.c (pubkey_algo_string): Add arg R_ALGOID.
8410         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Adjust.
8411         * tools/gpg-card.c (list_one_kinfo): Ditto.
8412
8413         dirmngr: Improve domaininfo cache update algorithm.
8414         + commit e100ace7f8a729bbe30d9f4ed157a7a229a04eb0
8415         * dirmngr/domaininfo.c (struct domaininfo_s): Add field keepmark.
8416         (insert_or_update): Implement new update algorithm.
8417
8418 2019-04-01  Werner Koch  <wk@gnupg.org>
8419
8420         sm: Show the usage flags when generating a key from a card.
8421         + commit 9ed1aa56c4bbf44e00b731d6807ada9e95c91bd7
8422         * g10/call-agent.c (scd_keypairinfo_status_cb): Also store the usage
8423         flags.
8424         * sm/call-agent.c (scd_keypairinfo_status_cb): Ditto.
8425         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Print the usage flags.
8426
8427         gpg: Prepare card code to allow other than OpenPGP cards.
8428         + commit e47524c34a2a9f53c2507f67a0b41b460cee78b7
8429         * g10/call-agent.c (start_agent): Use card app auto selection.
8430         * g10/card-util.c (current_card_status): Print the Application type.
8431         (card_status): Put empty line between card listings.
8432
8433         gpg: New card function agent_scd_keypairinfo.
8434         + commit 0fad61de159acf39e38a04f28f162f0beb0e77d6
8435         * g10/call-agent.c (scd_keypairinfo_status_cb)
8436         (agent_scd_keypairinfo): New.  Taken from gpgsm.
8437
8438         gpg: Remove two unused card related functions.
8439         + commit 334b16b868e771b983263ed20c200869e7e51198
8440         * g10/call-agent.c (inq_writekey_parms): Remove.
8441         (agent_scd_writekey): Remove.
8442         (agent_clear_pin_cache): Remove this stub.
8443
8444         gpg: Remove unused arg in a card related function.
8445         + commit 3a4534d82682f69788da3cf4a445e38fbaf6b98e
8446         * g10/call-agent.c (agent_scd_setattr): Remove unused arg serialno.
8447
8448 2019-03-29  Werner Koch  <wk@gnupg.org>
8449
8450         dirmngr: Better for error code for http status 413.
8451         + commit 21b674097442a54ae889a90d708639b257ba43db
8452         * dirmngr/ks-engine-hkp.c (send_request): New case for 413.
8453         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
8454         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
8455
8456 2019-03-28  Werner Koch  <wk@gnupg.org>
8457
8458         scd: New option --application-priority.
8459         + commit 97feef8ee94a5e1cb9daba82f108eb62122c7910
8460         * scd/scdaemon.c (oApplicationPriority): New.
8461         (opts): Add "application_priority".
8462         (main): Process option.
8463         * scd/app.c (app_update_priority_list): New.
8464         (get_supported_applications): Take apps from global list.
8465
8466         * tools/gpgconf-comp.c (gc_options_scdaemon): Add option.
8467
8468         card: For passwd add a PIV menu and make the OpenPGP menu optional.
8469         + commit 80c069b5e1ad6fbd547de59f332eb3fabb68c572
8470         * tools/gpg-card.c (get_selection): New.
8471         (cmd_passwd): Reworked.
8472
8473         card: Allow "yubikey disable" only for Yubikey-5 and later.
8474         + commit 2f761251c5730a9ad113fa58466addc9c2372da8
8475         * tools/card-yubikey.c (yubikey_commands): Add new arg INFO and test
8476         for Yubikey-5.
8477         * tools/gpg-card.c (cmd_yubikey): Pass info to yubikey_commands.
8478
8479 2019-03-27  Werner Koch  <wk@gnupg.org>
8480
8481         scd: Support reading the Yubikey 4 firmware version.
8482         + commit 5a3055eb722e61126748e83564e1bba42807d722
8483         * scd/app.c (app_new_register): Detect yk4 version numbers.
8484
8485 2019-03-27  Trevor Bentley  <trevor@yubico.com>
8486
8487         gpg: Don't use EdDSA algo ID for ECDSA curves.
8488         + commit 4324560b2c0bb76a1769535c383424a042e505ae
8489         * g10/keygen.c (ask_curve): Change algo ID to ECDSA if it changed from
8490         an EdDSA curve.
8491
8492 2019-03-26  Werner Koch  <wk@gnupg.org>
8493
8494         sm: Allow decryption even if expired other keys are configured.
8495         + commit aa58d2a49b3d416d9d6a0691a89f2bc8bc8649ad
8496         * sm/gpgsm.c (main): Add special handling for bad keys in decrypt
8497         mode.
8498
8499         agent: Allow other ssh fingerprint algos in KEYINFO.
8500         + commit 3c7a1f3aea7f6e8137a93ef2166ff329688f5445
8501         * agent/command.c (cmd_keyinfo): Allow for --ssh-fpr=ALGO.  Default to
8502         the standard algo.
8503
8504 2019-03-25  Werner Koch  <wk@gnupg.org>
8505
8506         wkd: New command --print-wkd-url for gpg-wks-client.
8507         + commit 70c97a862aa586c314a64190d1e489a272e552ea
8508         * tools/gpg-wks-client.c (aPrintWKDURL): New.
8509         (opts): Add option.
8510         (main): Implement.
8511         * tools/wks-util.c (wks_cmd_print_wkd_url): New.
8512
8513 2019-03-25  Andre Heinecke  <aheinecke@gnupg.org>
8514
8515         sm, w32: Translate logger and status fd to handles.
8516         + commit e4e0804ed123516fa00f8a876a862b2c6d34ba5c
8517         * sm/gpgsm.c (main): Call translate_sys2libc_fd_int to
8518         convert the FDs.
8519
8520 2019-03-25  NIIBE Yutaka  <gniibe@fsij.org>
8521
8522         libdns: Don't use _[A-Z] which are reserved names.
8523         + commit 8d1b5982138c104f3c50663738892fa110193059
8524         * dirmngr/dns.c: Use the identifiers of "*_instance" instead of
8525         reserved "_[A-Z]".
8526
8527 2019-03-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8528
8529         doc: fix formatting error.
8530         + commit b30528f48780c9917ec8ba3b3d163fba5c740d92
8531
8532
8533 2019-03-22  Werner Koch  <wk@gnupg.org>
8534
8535         wkd: New command --print-wkd-hash for gpg-wks-client.
8536         + commit e847cf1df7aa55ac2af7efd39ca05882258acbfe
8537         * tools/gpg-wks-client.c (aPrintWKDHash): New.
8538         (opts) : Add "--print-wkd-hash".
8539         (main): Implement that command.
8540         (proc_userid_from_stdin): New.
8541         * tools/wks-util.c (wks_fname_from_userid): Add option HASH_ONLY.
8542         (wks_cmd_print_wkd_hash): New.
8543
8544         scd: Refactor the app selection code.
8545         + commit 393269948c883afb770bb536f03045254d13b911
8546         * scd/app.c (app_priority_list): New.
8547
8548 2019-03-18  Andre Heinecke  <aheinecke@gnupg.org>
8549
8550         speedo: Fix installer build with NSIS-3.
8551         + commit b98799ce964df1743478dc3d0cc503f51c4b6733
8552         * build-aux/speedo.mk: Add charset for nsis 3.
8553
8554 2019-03-18  Werner Koch  <wk@gnupg.org>
8555
8556         gpg: Allow import of PGP desktop exported secret keys.
8557         + commit 5205512fc092c53c0a52c8379ef2a129ce6e58a9
8558         * g10/import.c (NODE_TRANSFER_SECKEY): New.
8559         (import): Add attic kludge.
8560         (transfer_secret_keys): Add arg only_marked.
8561         (resync_sec_with_pub_keyblock): Return removed seckeys via new arg
8562         r_removedsecs.
8563         (import_secret_one): New arg r_secattic.  Change to take ownership of
8564         arg keyblock.  Implement extra secret key import logic.  Factor some
8565         code out to ...
8566         (do_transfer): New.
8567         (import_matching_seckeys): New.
8568
8569 2019-03-15  Werner Koch  <wk@gnupg.org>
8570
8571         gpg: Avoid importing secret keys if the keyblock is not valid.
8572         + commit f799e9728bcadb3d4148a47848c78c5647860ea4
8573         * g10/keydb.h (struct kbnode_struct): Replace unused field RECNO by
8574         new field TAG.
8575         * g10/kbnode.c (alloc_node): Change accordingly.
8576         * g10/import.c (import_one): Add arg r_valid.
8577         (sec_to_pub_keyblock): Set tags.
8578         (resync_sec_with_pub_keyblock): New.
8579         (import_secret_one): Change return code to gpg_error_t.   Return an
8580         error code if sec_to_pub_keyblock failed.  Resync secret keyblock.
8581
8582         gpg: During secret key import print "sec" instead of "pub".
8583         + commit f64477db86568bdc28c313bfeb8b95d8edf05a3c
8584         * g10/keyedit.c (show_basic_key_info): New arg 'print_sec'.  Remove
8585         useless code for "sub" and "ssb".
8586         * g10/import.c (import_one): Pass FROM_SK to show_basic_key_info.  Do
8587         not print the first  keyinfo in FROM_SK mode.
8588         printing.
8589
8590         gpg: Simplify an interactive import status line.
8591         + commit f06b6fe47f56a15ac426665c3d9661d4b104696f
8592         * g10/cpr.c (write_status_printf): Escape CR and LF.
8593         * g10/import.c (print_import_check): Simplify by using
8594         write_status_printf and hexfingerprint.
8595
8596         gpg: Fix recently introduced use after free.
8597         + commit 3e1f3df6183b2ed2cadf2af2383063891e2c53bd
8598         * g10/mainproc.c (proc_plaintext): Do not use freed memory.
8599
8600 2019-03-14  Werner Koch  <wk@gnupg.org>
8601
8602         kbx: Unify the fingerprint search modes.
8603         + commit bdda31a26bc69b6ee72e964510db113645de76ef
8604         * kbx/keybox-search-desc.h (KEYDB_SEARCH_MODE_FPR16)
8605         (KEYDB_SEARCH_MODE_FPR20, KEYDB_SEARCH_MODE_FPR32): Remove.  Switch
8606         all users to KEYDB_SEARCH_MODE_FPR along with the fprlen value.
8607
8608         gpg: Make rfc4880bis the default.
8609         + commit caf4b3fc16e97eb175c46f45f5770d02becb862d
8610         * g10/gpg.c (set_compliance_option, main): Change CO_GNUPG to include
8611         rfc4880bis features.
8612         (main): Change rfc4880bis warning to a note.
8613
8614         gpg: Implement v5 keys and v5 signatures.
8615         + commit 01c87d4ce23bc9fc44ec5301c2c6bf2ce615c375
8616         * g10/build-packet.c (gpg_mpi_write): New optional arg
8617         R_NWRITTEN.  Allow NULL for OUT.  Change all callers.
8618         (do_key): Support v5 keys.
8619         (build_sig_subpkt_from_sig): Support 32 byte fingerprints.
8620         * g10/parse-packet.c (parse_signature): First try to set the keyid
8621         from the issuer fingerprint.
8622         (parse_key): Support v5 keys.
8623         (create_gpg_control): Better make sure to always allocate the static
8624         size of the struct in case future compilers print warnings.
8625         * g10/keyid.c (hash_public_key): Add v5 support.
8626         (keyid_from_pk): Ditto.
8627         (keyid_from_fingerprint): Ditto.
8628         (fingerprint_from_pk): Ditto.
8629         * g10/keygen.c (KEYGEN_FLAG_CREATE_V5_KEY): New.
8630         (pVERSION, pSUBVERSION): New.
8631         (add_feature_v5): New.
8632         (keygen_upd_std_prefs): Call it.
8633         (do_create_from_keygrip): Add arg keygen_flags and support the v5
8634         flag.
8635         (common_gen): Support the v5 flag.
8636         (parse_key_parameter_part): New flags v4 and v5.
8637         (parse_key_parameter_string): Add args for version and subversion.
8638         (read_parameter_file): New keywords "Key-Version" and
8639         "Subkey-Version".
8640         (quickgen_set_para): Add arg 'version'.
8641         (quick_generate_keypair, generate_keypair): Support version parms.
8642         (do_generate_keypair): Support v5 key flag.
8643         (generate_subkeypair): Ditto.
8644         (generate_card_subkeypair): Preparse for keyflags.
8645         (gen_card_key): Ditto.
8646         * g10/sig-check.c (check_signature2): Add args extrahash and
8647         extrahashlen.
8648         (check_signature_end): Ditto.
8649         (check_signature_end_simple): Ditto.  Use them.
8650         * g10/mainproc.c (proc_plaintext): Put extra hash infor into the
8651         control packet.
8652         (do_check_sig): Add args extrahas and extrahashlen and pass them on.
8653         (issuer_fpr_raw): Support 32 byte fingerprint.
8654         (check_sig_and_print): get extra hash data and pass it on.
8655
8656         kbx: Add support for 32 byte fingerprints.
8657         + commit f40e9d6a528521d12795e1a6cc15c849b216be92
8658         * common/userids.c (classify_user_id): Support 32 byte fingerprints.
8659         * kbx/keybox-search-desc.h (KEYDB_SEARCH_MODE_FPR32): New.
8660         (struct keydb_search_desc): Add field fprlen.
8661         * kbx/keybox-defs.h (struct _keybox_openpgp_key_info): Add field
8662         version and increase size of fpr to 32.
8663         * kbx/keybox-blob.c: Define new version 2 for PGP and X509 blobs.
8664         (struct keyboxblob_key): Add field fprlen and increase size of fpr.
8665         (pgp_create_key_part_single): Allow larger fingerprints.
8666         (create_blob_header): Implement blob version 2 and add arg want_fpr32.
8667         (_keybox_create_openpgp_blob): Detect the need for blob version 2.
8668         * kbx/keybox-search.c (blob_get_first_keyid): Support 32 byte
8669         fingerprints.
8670         (blob_cmp_fpr): Ditto.
8671         (blob_cmp_fpr_part): Ditto.
8672         (has_fingerprint): Add arg fprlen and pass on.
8673         (keybox_search): Support KEYDB_SEARCH_MODE_FPR32 and adjust for
8674         changed has_fingerprint.
8675         * kbx/keybox-openpgp.c (parse_key): Support version 5 keys.
8676         * kbx/keybox-dump.c (_keybox_dump_blob): Support blob version 2.
8677
8678         * g10/delkey.c (do_delete_key): Support KEYDB_SEARCH_MODE_FPR32.
8679         * g10/export.c (exact_subkey_match_p): Ditto.
8680         * g10/gpg.c (main): Ditto.
8681         * g10/getkey.c (get_pubkey_byfprint): Adjust for changed
8682         KEYDB_SEARCH_MODE_FPR.
8683         * g10/keydb.c (keydb_search_desc_dump): Support
8684         KEYDB_SEARCH_MODE_FPR32 and adjust for changed KEYDB_SEARCH_MODE_FPR.
8685         (keydb_search): Add new arg fprlen and change all callers.
8686         * g10/keyedit.c (find_by_primary_fpr): Ditto.
8687         * g10/keyid.c (keystr_from_desc): Ditto.
8688         * g10/keyring.c (keyring_search): Ditto.
8689         * g10/keyserver.c (print_keyrec): Ditto.
8690         (parse_keyrec): Ditto.
8691         (keyserver_export): Ditto.
8692         (keyserver_retrieval_screener): Ditto.
8693         (keyserver_import): Ditto.
8694         (keyserver_import_fprint): Ditto.
8695         (keyidlist): Ditto.
8696         (keyserver_get_chunk): Ditto.
8697
8698         * g10/keydb.c (keydb_search): Add new arg fprlen and change all
8699         callers.
8700
8701         * sm/keydb.c (keydb_search_fpr): Adjust for changed
8702         KEYDB_SEARCH_MODE_FPR.
8703
8704         gpg: Implemented latest rfc4880bis version 5 packet hashing.
8705         + commit a21ca3a1eff4722dea778cca4abe14a873ccebdf
8706         * configure.ac (AC_CHECK_SIZEOF): Test size_t.
8707         * g10/sig-check.c (check_signature_end_simple): Support v5 signatures
8708         as per current rfc4880bis.  For correctness also allow for N > 2^32.
8709         * g10/sign.c (pt_extra_hash_data_t): New.
8710         (hash_sigversion_to_magic): New arg EXTRAHASH.
8711         (write_plaintext_packet): New arg R_EXTRAHASH.
8712         (write_signature_packets): Pass EXTRAHASH.
8713         (sign_file): Ditto.
8714         (sign_symencrypt_file): Ditto.
8715
8716 2019-03-14  NIIBE Yutaka  <gniibe@fsij.org>
8717
8718         Fix the previous commit.
8719         + commit f199b627ce512c8495af5c9bd1c81127ccde3ca0
8720         * g10/ecdh.c (kek_params_table): Revert the change.
8721         * scd/app-openpgp.c (ecdh_params): Use CIPHER_ALGO_AES256
8722         for 384-bit key.
8723
8724 2019-03-13  NIIBE Yutaka  <gniibe@fsij.org>
8725
8726         g10: Fix symmetric cipher algo constant for ECDH.
8727         + commit af3efd149f555d36a455cb2ea311ff81caf5124c
8728         * g10/ecdh.c (kek_params_table): Use CIPHER_ALGO_AES192 for
8729         ECC strength 384, according to RFC-6637.
8730
8731 2019-03-11  Werner Koch  <wk@gnupg.org>
8732
8733         dirmngr: Avoid testing for Tor with --gpgconf-list.
8734         + commit 9f37e93dd741a5436ff412955628806ae84725ca
8735         * dirmngr/dirmngr.c (post_option_parsing): Do not call set_tor_mode.
8736         (dirmngr_sighup_action): Call it here.
8737         (main): Call it here unless in --gpgconf-list mode.
8738
8739 2019-03-07  Werner Koch  <wk@gnupg.org>
8740
8741         common: Minor rework of tty_get.
8742         + commit b7de105e0a836bd4d7bd558f8e699d88ab0cafec
8743         * common/ttyio.c (do_get): Re-indent and remove the checking for char
8744         values larger than 0xa0.  Use explicy control character checking.
8745
8746         dirmngr: Add CSRF protection exception for protonmail.
8747         + commit 134c3c16523b1a267ebdd2df6339240fd9e1e3b3
8748         * dirmngr/http.c (same_host_p): Add exception table.
8749
8750 2019-03-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8751
8752         gpgv: Improve documentation for keyring choices.
8753         + commit 096c2aa705f85289ff8b610da1dd9181e4c904fd
8754         * doc/gpgv.texi: Improve documentation for keyring choices
8755
8756 2019-03-06  Werner Koch  <wk@gnupg.org>
8757
8758         gpgtar: Make option -C work for archive creation.
8759         + commit b3a7a5140784b5a015107b5c5c73b15ae44e71dc
8760         * tools/gpgtar-create.c (gpgtar_create): Switch to the -C directory.
8761
8762         agent: Re-introduce --enable-extended-key-format.
8763         + commit 91ae3e7fb66271691f6fe507262a62fc7e2663a3
8764         * agent/gpg-agent.c (oEnableExtendedKeyFormat): Re-introduce.
8765         (parse_rereadable_options): Handle it in a special way.
8766         * agent/protect.c (agent_protect): Be safe and set use_ocb only to 1
8767         or 0.
8768         * tools/gpgconf-comp.c: Add --enable-extended-key-format again.
8769
8770         gpgtar: Improve error messages.
8771         + commit 72feb8fa8280aba674573a1afc955a92e8065242
8772         * tools/gpgtar.h (struct tarinfo_s): New.
8773         * tools/gpgtar.c (cmd, skip_crypto, files_from, null_names): Move
8774         global vars more to the top.
8775         (set_cmd): Rename 'cmd' to 'c'.
8776         * tools/gpgtar-list.c (parse_header): Add arg 'info' and improve error
8777         messages.
8778         (read_header): Add arg 'info' and update counter.
8779         (skip_data): Ditto.
8780         (gpgtar_list): Pass info object to read functions.
8781         (gpgtar_read_header): Add arg 'info'.
8782         * tools/gpgtar-extract.c (gpgtar_extract): add arg 'info' and pass on.
8783         (extract_regular): Add arg 'info' and update counter.
8784
8785         agent: Default to extended key format.
8786         + commit 05eff1f6623c272fcabd4e238842afc832710324
8787         * agent/gpg-agent.c (oDisableExtendedKeyFormat, oNoop): New.
8788         (oEnableExtendedKeyFormat): Remove.
8789         (opts): Make --enable-extended-key-format a dummy option.  Add
8790         disable-extended-key-format.
8791         (parse_rereadable_options): Implement oDisableExtendedKeyFormat.
8792
8793         card: Allow PEM encoded certificates in "writecert".
8794         + commit 4e1f04a4cd30859507218395e630e886801ae2b7
8795         * tools/gpg-card.c (cmd_writecert): Convert from base64.
8796
8797         card: Print the keyref also for non-initialized slots.
8798         + commit 772bba34ea089b3a00f0b1ea5138ba7422c95180
8799         * tools/gpg-card.c (list_one_kinfo): Add arg label_keyref and change
8800         callers.
8801
8802 2019-03-06  NIIBE Yutaka  <gniibe@fsij.org>
8803
8804         agent: Fix detection of exit of scdaemon.
8805         + commit 2abad7585a004586e27ead6ab8c9c57ce5ed1326
8806         * agent/call-scd.c (start_scd): Acquire START_SCD_LOCK for
8807         SCD_LOCAL_LIST.  Move common case code to fast path.
8808         Release START_SCD_LOCK before calling unlock_scd.
8809         When new CTX is allocated, clear INVALID flag.
8810         (agent_reset_scd): Serialize the access to SCD_LOCAL_LIST by
8811         START_SCD_LOCK.
8812
8813 2019-03-05  Werner Koch  <wk@gnupg.org>
8814
8815         card: Print card version.  Check for bad Yubikeys.
8816         + commit 8d4af54ddd039d47e9c4803559193fcca97f0a46
8817         * scd/app.c (app_new_register): Set card version for Yubikeys.
8818         (app_write_learn_status): Print CARDVERSION and APPVERSION.
8819         * tools/card-call-scd.c (learn_status_cb): Detect them.
8820         * tools/gpg-card.h (struct card_info_s): Add appversion and
8821         cardversion.
8822         * tools/gpg-card.c (list_openpgp): Remove version printing from serial
8823         number.
8824         (print_a_version): New.
8825         (list_card): Print card and app version.
8826         (cmd_generate): Do not allow broken Yubikeys.
8827
8828         scd: Rename a shared info field name.
8829         + commit 64caa6a08298119b10dc36ddd27b357cb47825b5
8830         * scd/app-piv.c (app_select_piv):
8831         * scd/app-common.h (struct app_ctx_s): Rename 'card_version' to
8832         'cardversion'.  Rename all users.  Add 'appversion'.
8833
8834         scd:piv: Implement import of private keys for Yubikeys.
8835         + commit e897e1e255ef9870dfd1639d6f4e97bdf4e83b34
8836         * scd/app-piv.c (concat_tlv_list): Add arg 'secure' and adjust
8837          callers.
8838         (writekey_rsa, writekey_ecc): New.
8839         (do_writekey): New.
8840         (do_writecert): Provide a better error message for an empty cert.
8841         (app_select_piv): Register do_writekey.
8842         * scd/iso7816.c (iso7816_send_apdu): New.
8843         * scd/app-common.h (APP_WRITEKEY_FLAG_FORCE): New.
8844         * agent/command.c (cmd_keytocard): Make the timestamp optional.
8845         * tools/card-call-scd.c (inq_writekey_parms): Remove.
8846         (scd_writekey): Rewrite.
8847         * tools/gpg-card.c (cmd_writekey): New.
8848         (enum cmdids): Add cmdWRITEKEY.
8849         (dispatch_command, interactive_loop): Call cmd_writekey.
8850
8851         gpg: Make invalid primary key algos obvious in key listings.
8852         + commit db87132b10664718b7db6ec1dad584b54d1fb265
8853         * g10/keylist.c (print_key_line): Print a warning for invalid algos.
8854
8855         agent: Minor change to the KEYTOCARD command.
8856         + commit bcc89a6df24c79690436340f65c7ab13c65c2c45
8857         * agent/command.c (cmd_keytocard): Make timestamp optional.  Use
8858         modern parser function.
8859         * agent/call-scd.c (agent_card_writekey): Rename an arg and for
8860         clarity return gpg_error_t instead of int.
8861         * agent/divert-scd.c (divert_writekey): Ditto.
8862
8863 2019-03-01  Werner Koch  <wk@gnupg.org>
8864
8865         sm: Print Yubikey attestation extensions with --dump-cert.
8866         + commit 86c241a8c9a952ea8007066b70b04f435e2e483e
8867         * sm/keylist.c (oidtranstbl): Add Yubikey OIDs.
8868         (OID_FLAG_HEX): New.
8869         (print_hex_extn): New.
8870         (list_cert_raw): Make use of that flag.
8871
8872         scd:piv: Add feature to read Yubikey attestation certificates.
8873         + commit 51df13d9ec8e89c4236e2f4a9ae3647963c30783
8874         * scd/app-piv.c (do_readcert): Add hack to read Yubikey attestaions.
8875
8876         scd:piv: Allow writecert to only write matching certs.
8877         + commit 696d4c290dd4945b693263721f606b5049b9569d
8878         * scd/app-piv.c (do_readkey): Read the key from the cert here instead
8879         of letting the upper layer do this.
8880         (do_writecert): Check that the cert matches the key and that a key has
8881         already been generated.
8882
8883         card: Remove the "admin" command.
8884         + commit 280baee72dcb0ca54ce99b524bc2125cbc38e0e4
8885         * tools/gpg-card.c (cmd_passwd): Remove arg allow_admin.
8886         (enum cmdids): Rename cmdAUTHENTICATE to cmdAUTH and cmdFACTORYRESET
8887         to cmdFACTRST.
8888         (cmds): Remove column 'admin_only'.
8889         (interactive_loop): Remove admin_only stuff.
8890
8891 2019-02-28  Werner Koch  <wk@gnupg.org>
8892
8893         sm: Don't mark a cert as de-vs compliant if it leads to SHA-1 sigs.
8894         + commit 2c75af9f65d15653ed1bc191f1098ae316607041
8895         * sm/keylist.c (print_compliance_flags): Also check the diges_also.
8896
8897 2019-02-27  NIIBE Yutaka  <gniibe@fsij.org>
8898
8899         agent: PKSIGN should return signature in same format for card.
8900         + commit 0173b249cfb7f02f94911ec759630d81f312e0bd
8901         * agent/pksign.c (agent_pksign_do):
8902
8903 2019-02-26  Werner Koch  <wk@gnupg.org>
8904
8905         scd: Simplify the app_readkey parameters.
8906         + commit c2235d994dbb1d7ddba20f89a7c02f4a27b0610c
8907         * scd/app-help.c (app_help_pubkey_from_cert): New.
8908         * scd/command.c (cmd_readkey): Refactor to use that new function and
8909         handle the --advanced flag only here.
8910         * scd/app.c (app_readkey): Remove parm advanced.
8911         * scd/app-common.h (struct app_ctx_s): Remove parm advanced from the
8912         readkey member.
8913         * scd/app-nks.c (do_readkey): Adjust for removed parm.
8914         * scd/app-piv.c (do_readkey): Ditto.
8915         * scd/app-openpgp.c (do_readkey): Ditto.
8916
8917         conf: New option --show-socket.
8918         + commit ac485b4f253ad6bbd2bc648650b56d60fc82f89d
8919         * tools/gpgconf-comp.c (gc_component_t): Move this enum to ...
8920         * tools/gpgconf.h: here.
8921         * tools/gpgconf.c (oShowSocket): New.
8922         (opts): Add new option.
8923         (main): Implement new option.
8924
8925 2019-02-26  NIIBE Yutaka  <gniibe@fsij.org>
8926
8927         libdns: Avoid using compound literals (8).
8928         + commit 371ae25f8f6f2d1ac030bf984bca479393a5ed43
8929         * dirmngr/dns.h (dns_quietinit): Remove.
8930         (dns_hints_i_new): Remove.
8931
8932         libdns: Avoid using compound literals (7).
8933         + commit d661acd483236d34720a4959fc816d05f89c2cb7
8934         * dirmngr/dns.h (DNS_OPTS_INIT, dns_opts): Remove.
8935         * dirmngr/dns-stuff.c (libdns_res_open): Use zero-ed, and initialized
8936         automatic variable for opts.
8937         * dirmngr/dns.c (send_query, resolve_query, resolve_addrinfo):
8938         Likewise.
8939
8940         libdns: Avoid using compound literals (6).
8941         + commit 6501e59d3685bb58753c9caea729a4b0eca3942a
8942         * dirmngr/dns.h (dns_rr_i_new): Remove.
8943         (dns_rr_i_init): Remove unused second argument.
8944         * dirmngr/dns.c (dns_p_dump, dns_hints_query, print_packet)
8945         (parse_packet): Use automatic variable for struct dns_rr_i.
8946         (dns_d_cname): No need to call dns_rr_i_init after memset 0.
8947         (dns_rr_i_init): Remove unused second argument.  Return nothing.
8948         * dirmngr/dns-stuff.c (resolve_addr_libdns, get_dns_cert_libdns)
8949         (getsrv_libdns): Follow the change of dns_rr_i_init.
8950
8951         libdns: Avoid using compound literals (5).
8952         + commit a1ccfe2b37847cce0db2fb94a7365c9fa501eda4
8953         * dirmngr/dns.h (dns_rr_foreach): Don't use dns_rr_i_new.
8954         Call dns_rr_grep with NULL.
8955         * dirmngr/dns.c (dns_rr_grep): Support NULL for error_.
8956
8957         libdns: Avoid using compound literals (4).
8958         + commit 7313a112f9c7ada61d24285313d2e2d069a672e8
8959         * dirmngr/dns.h (dns_d_new*): Remove.
8960         * dirmngr/dns.c (parse_packet): Use dns_d_init with automatic
8961         variable.
8962         (parse_domain): Likewise.
8963
8964         libdns: Avoid using compound literals (3).
8965         + commit 72efb7840258808cd892b90d871ea1cc1c31d7f5
8966         * dirmngr/dns.h (dns_p_new): Remove.
8967         * dirmngr/dns.c (dns_hosts_query): Use dns_p_init with automatic
8968         variable.
8969         (dns_hints_query, dns_res_glue, parse_packet, query_hosts)
8970         (send_query, show_hints, echo_port): Likewise.
8971
8972         libdns: Avoid using compound literals (2).
8973         + commit 455ef62d29a112de05897139716265d07e4c6ae3
8974         * dirmngr/dns.h (dns_strsection1, dns_strsection3): Remove.
8975         (dns_strclass1, dns_strclass3): Remove.
8976         (dns_strtype1, dns_strtype3): Remove.
8977         (dns_strsection, dns_strclass, dns_strtype): Directly use the
8978         function.
8979         * dirmngr/dns.c (dns_strsection): Use automatic variable.
8980         (dns_strclass, dns_strtype): Likewise.
8981
8982         libdns: Avoid using compound literals.
8983         + commit 1c405499388fd5bed0968ab5c6c5d1b3373537b9
8984         * dirmngr/dns.c (dns_inet_pton, dns_so_tcp_keep): Use automatic
8985         variables.
8986         (dns_poll, dns_send_nopipe): Likewise, adding const qualifier.
8987
8988 2019-02-25  Werner Koch  <wk@gnupg.org>
8989
8990         scd: PIV: Always require a PIN for signing with 9C.
8991         + commit a481d17432bf7cca19ca71b6aa5ccd9aee2b3baa
8992         * scd/app-piv.c (verify_chv): Add arg 'force'.
8993         (do_sign): Use force for 0x9c.
8994
8995         card: Rename gpg-card-tool to gpg-card.
8996         + commit 28de5c0ea53373c56a4405fe6b08d194682dd1de
8997         * tools/card-tool-keys.c: Rename to card-keys.c.
8998         * tools/card-tool-misc.c: Rename to card-misc.c.
8999         * tools/card-tool-yubikey.c: Rename to card-yubikey.c.
9000         * tools/card-tool.h: Rename to gpg-card.h.
9001         * tools/gpg-card-tool-w32info.rc: Rename to gpg-card-w32info.rc
9002         * doc/card-tool.texi: Rename top gpg-card.texi
9003
9004         agent: Fix for suggested Libgcrypt use.
9005         + commit a12c3a566e2e4b10bc02976a2819070877ee895c
9006         * agent/divert-scd.c (divert_pkdecrypt): Skip a flags parameter.
9007
9008 2019-02-25  NIIBE Yutaka  <gniibe@fsij.org>
9009
9010         gpgscm: Build well even if NDEBUG defined.
9011         + commit e140c6d4f581be1a60a34b67b16430452f3987e8
9012         * gpgscm/scheme.c (gc_reservation_failure): Fix adding ";".
9013         [!NDEBUG] (scheme_init_custom_alloc): Don't init seserved_lineno.
9014
9015 2019-02-22  NIIBE Yutaka  <gniibe@fsij.org>
9016
9017         scd: internal driver: Submit SET_INTERFACE control transfer.
9018         + commit 611faf1579a56925994d53eb08e1290a4b3958cf
9019         * scd/ccid-driver.c (ccid_open_usb_reader): Alway submit SET_INTERFACE
9020         control transfer.
9021
9022 2019-02-21  Werner Koch  <wk@gnupg.org>
9023
9024         sm: Fix certificate creation with key on card.
9025         + commit c1000c673814e552923cf1361346d7dfeee55608
9026         * sm/certreqgen.c (create_request): Fix for certmode.
9027
9028         card: Print usage info for each key.
9029         + commit 7317aeb3f448c98dcfa9c04f49b9a69d81c26776
9030         * tools/card-call-scd.c (learn_status_cb): Handle extended
9031         KEYPARIRINFO.
9032         * tools/card-tool.h (struct key_info_s): Add field 'usage'.
9033         * tools/gpg-card-tool.c (list_one_kinfo): Show usage flags.
9034
9035         scd: Extend KEYPAIRINFO by key usage info.
9036         + commit 5e21ef2d556ca65b7869bf16ab465f3511601e1e
9037         * scd/app-openpgp.c (send_keypair_info): Append usage string.
9038         * scd/app-piv.c (struct data_object_s): Remove column 'binary'.  Add
9039         column 'usage'.
9040         (dump_all_do): Adjust for removed 'binary'.
9041         (send_keypair_and_cert_info): Append usage string.
9042
9043         card: Print the keyref in the listing.
9044         + commit 3384ba6c1c421cfa674dbd8294dc655d7320534e
9045         * tools/gpg-card-tool.c (list_one_kinfo): Print the keyref.
9046
9047         scd: Don't let the "undefined" app cause a conflict error.
9048         + commit 5ecc7a02609dde65096ddb12e0ff8f6bce3b774a
9049         * scd/app.c (check_conflict): Ignore "undefined".
9050
9051         sm: Prepare algo mapping to handle values > 255.
9052         + commit d7a54ca461ad75e4fab77a2f1b25986c7637762a
9053         * sm/misc.c (transform_sigval): Allow for larger values of MDALGO and
9054         PKALGO.
9055
9056 2019-02-21  NIIBE Yutaka  <gniibe@fsij.org>
9057
9058         scd: Clear CHV status on timeout error.
9059         + commit 2013cb5ee667610de35f8b92c2f979f5caa09d4c
9060         * scd/app-openpgp.c (clear_chv_status): New.
9061         (do_change_pin): Use clear_chv_status.
9062         (do_sign): Call clear_chv_status on GPG_ERR_TIMEOUT.
9063         (do_auth, do_decipher): Likewise.
9064
9065         scd: Handle ack button timeout as GPG_ERR_TIMEOUT.
9066         + commit bd15aa34ab8ad10adbb7540a8845b4a2600437b6
9067         * scd/apdu.h (SW_ACK_TIMEOUT): New.
9068         * scd/iso7816.c (map_sw): Return GPG_ERR_TIMEOUT for SW_ACK_TIMEOUT.
9069
9070         tests: Add "disable-scdaemon" in gpg-agent.conf.
9071         + commit 64b7c6fd1945bc206cf56979633dfca8a7494374
9072         * tests/openpgp/defs.scm: Add "disable-scdaemon".  Remove
9073           "scdaemon-program".
9074         * tests/gpgme/gpgme-defs.scm, tests/gpgsm/gpgsm-defs.scm: Likewise.
9075         * tests/inittests, tests/pkits/inittests: Add "disable-scdaemon"
9076
9077 2019-02-19  NIIBE Yutaka  <gniibe@fsij.org>
9078
9079         agent: Terminate pinentry process gracefully, by watching socket.
9080         + commit c395f8315362793409be54aca630ce6e903ea984
9081         * agent/call-pinentry.c (watch_sock): New.
9082         (do_getpin): Spawn the watching thread.
9083
9084         agent: Minor change for pinentry status handling.
9085         + commit 99aa54323f97937613e02d8c2da91544e1fe7bcf
9086         * agent/call-pinentry.c (struct entry_parm_s): Add status.
9087         (do_getpin): Use param->status.
9088         (agent_askpin): Copy param->status. to pininfo.
9089
9090         agent: Factor out the getpin interaction.
9091         + commit ada797f477f923bee36d67c8e49f728ae7adb9e9
9092         * agent/call-pinentry.c (do_getpin): New.
9093         (agent_askpin, agent_get_passphrase): Use do_getpin.
9094
9095 2019-02-18  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
9096
9097         sm: Support generation of card-based ed25519 CSR.
9098         + commit 3cbdf896e6919333b5423001ab58c01a04363386
9099         * sm/call-agent.c (gpgsm_scd_pksign): Allow SHA512. Create proper
9100         S-expression for EdDSA signature.
9101         * sm/certreqgen.c (create_request): Force use of SHA512 when
9102         using a ed25519 key.
9103         * sm/misc.c (transform_sigval): Insert OID for ed25519.
9104
9105 2019-02-15  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
9106
9107         sm: Support generation of card-based ECDSA CSR.
9108         + commit 74e9b579ca273fc07be090bb5fb7800a97b1b452
9109         * sm/call-agent.c (gpgsm_scd_pksign): Identify type of signing key
9110         and format resulting S-expression accordingly.
9111         * sm/misc.c (transform_sigval): Support ECDSA signatures.
9112
9113 2019-02-14  Ingvar Hagelund  <ingvar@redpill-linpro.com>
9114
9115         po: Correct a simple typo in the Norwegian translation.
9116         + commit b89f1790e0b9f3196a2382a9b9ff5f461c58a449
9117
9118
9119 2019-02-13  Werner Koch  <wk@gnupg.org>
9120
9121         card: New command "yubikey".
9122         + commit 7e1cd2cd416f852fc039af310e3df1ce395d89a9
9123         * tools/card-tool-yubikey.c: New.
9124         * tools/Makefile.am (gpg_card_tool_SOURCES): Add it.
9125         * tools/card-call-scd.c (scd_apdu): Allow returning data.
9126         * tools/card-tool-misc.c (send_apdu): New.  Move from gpg-card-tool.c
9127         and let it return data.  Change all callers.
9128
9129         * tools/gpg-card-tool.c (cmd_writecert): Prepend the certref with the
9130         current application type.
9131         (cmd_yubikey): New.
9132
9133 2019-02-11  Werner Koch  <wk@gnupg.org>
9134
9135         scd: Implement decryption for PIV cards.
9136         + commit 43b14b4cc227311aa77b1fc1d9577c5f7d3eda86
9137         * scd/app-piv.c (do_decipher): New.
9138
9139         scd: For PIV cards used NO_AUTH instead of BAD_PIN.
9140         + commit b2838694402ce0cfc2ef70451bf0e6677b875ca9
9141         * common/util.h (GPG_ERR_NO_AUTH, GPG_ERR_BAD_AUTH): Add replacement
9142         codes for gpgrt < 1.36.
9143         * scd/app-piv.c (auth_adm_key):
9144         (do_genkey, do_writecert): Use better error codes.
9145
9146 2019-02-08  Werner Koch  <wk@gnupg.org>
9147
9148         scd: Implement RSA signing for PIV cards.
9149         + commit 53beea56afecde76f0f4ca93fc50ca59298a093e
9150         * scd/app-piv.c (concat_tlv_list): New.
9151         (get_key_algorithm_by_dobj): Rename args for clarity.
9152         (do_auth): factor all code out to ...
9153         (do_sign): new.  Implement RSA signing.
9154
9155         sm: In --gen-key with "key from card" show also the algorithm.
9156         + commit 0328976c94adc2c518c7a7763a35319a0000c5e2
9157         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Get and show algo.
9158
9159         common: Provide function to get public key algo names in our format.
9160         + commit 03bf8e967adb2dd13329ba1089deb419d49e55c0
9161         * tools/card-tool-misc.c (pubkey_algo_string): Move to  ...
9162         * common/sexputil.c (pubkey_algo_string): here.
9163
9164         card: Make "generate" work for PIV cards.
9165         + commit a1cb4a940f308ba21ecc002b044efccf0c547784
9166         * tools/card-call-scd.c (scd_genkey_cb): Make createtime optional.
9167         (scd_genkey_cb):  Ditto.  Add arg algo.
9168         * tools/gpg-card-tool.c (cmd_generate): Add options and factor card
9169         specific code out to ...
9170         (generate_openpgp, generate_generic): new functions.
9171
9172         scd: Allow generating ECC curves on PIV cards.
9173         + commit b349adc5c0d00d2fc405a45bd078f1580b5610cc
9174         * scd/app-piv.c (genkey_parse_ecc): New.
9175         (get_keygrip_by_tag): Call that one.
9176         (do_readkey): Call that one.
9177         * scd/command.c (cmd_genkey): Add option --algo.
9178
9179         common: New functions get_option_value and ascii_strupr.
9180         + commit e2f18023b3b3b7e55b35218f65e37448d1011172
9181         * common/server-help.c (get_option_value): New.
9182         * common/stringhelp.c (ascii_strupr): New.
9183
9184 2019-02-07  Werner Koch  <wk@gnupg.org>
9185
9186         card: Print the used algorithm of all keys.
9187         + commit b79bc877f2ad4d08e7de377cf4bf616b981b3c5f
9188         * tools/card-call-scd.c (scd_readkey): New.
9189         * tools/card-tool-misc.c (pubkey_algo_string): New.
9190         * tools/gpg-card-tool.c (list_one_kinfo): Print the algo.
9191
9192         card: Fix a NULL-ptr deref in key listings.
9193         + commit df6ba6dfd235fddb7645bc16573da1a6a7e6b49d
9194         * tools/card-tool-keys.c (get_matching_keys): Fix segv.
9195         * tools/gpg-card-tool.c (main): Init info.
9196
9197         scd: Store a new PIV public key in the certificate DO.
9198         + commit 5bf1212000f48243642ace0f708fd27446879b9e
9199         * scd/app-piv.c (struct genkey_result_s): Remove type and all users.
9200         (send_keypair_and_cert_info): Print certinfo only if we got a cert..
9201         (readcert_by_tag): Add arg r_mechanism and implement reading of public
9202         keys.
9203         (get_keygrip_by_tag): Use a public key to compute the keygrip.
9204         (do_readcert): Make sure to only return a certificate.
9205         (do_readkey): Read public key from the DO if a certificate is missing.
9206         (get_key_algorithm_by_dobj): Get the algorithm also from a public key.
9207         (does_key_exist): String changes.
9208         (do_genkey): Remove result caching and store public key in the DO.
9209
9210         card: Support reading and writing PIV certificates.
9211         + commit fcec5b40e589b2ef201efb89f22a952feb4a9069
9212         * scd/app-piv.c (add_tlv): New.
9213         (put_data): New.
9214         (do_writecert): New.
9215         (do_setattr): Remove usused special mode 0.
9216         * tools/gpg-card-tool.c (cmd_writecert): Allow other cards than
9217         OPENPGP.
9218         (cmd_readcert): Ditto.
9219
9220 2019-02-06  Werner Koch  <wk@gnupg.org>
9221
9222         scd: Add genkey command to app-piv (rsa-only)
9223         + commit b5b1f721582df9d0379cb68b4faeceed32a56e49
9224         * scd/app-piv.c (struct genkey_result_s): new.
9225         (struct app_local_s): add member genkey_results.
9226         (do_deinit): Free that one.
9227         (flush_cached_data): Extend to delete all items.
9228         (keyref_from_dobj): New.
9229         (do_readkey): New.
9230         (do_auth): Use keyref_from_dobj.
9231         (does_key_exist): New.
9232         (genkey_parse_rsa): New.
9233         (do_genkey): New.
9234
9235         scd: Make app_genkey and supporting ISO function more flexible.
9236         + commit 9a9cb0257aebb1480b999fdf9d90904083eb8e3c
9237         * scd/app.c (app_genkey): Add arg keytype.
9238         * scd/app-common.h (struct app_ctx_s): Fitto for the genkey member.
9239         * scd/command.c (cmd_genkey): Adjust for change.
9240         * scd/iso7816.c (do_generate_keypair): Replace arg read_only by new
9241         args p1 and p2.
9242         (iso7816_read_public_key): Adjust for this.
9243         (iso7816_generate_keypair): Add new args p1 and p2.
9244         * scd/app-openpgp.c (do_genkey): Adjust for changes.
9245
9246         scd: Fix parameter name of app_change_key.
9247         + commit c26af8ac263ea006ed32e110a09271e4bfbf1f37
9248         * scd/app-common.h (APP_GENKEY_FLAG_FORCE): New.
9249         * scd/app.c (app_change_pin): Rename arg reset_mode to flags and
9250         change from int to unsigned int.
9251
9252         scd: Implement PIN changing and unblocking for PIV cards.
9253         + commit e9e876cb5572670322aa1d3462d64c75c03974d9
9254         * scd/app-piv.c: Some refactoring
9255         (do_change_chv): Implement.
9256
9257 2019-02-05  Werner Koch  <wk@gnupg.org>
9258
9259         scd: Allow standard keyref scheme for app-openpgp.
9260         + commit 3231ecdafd71ac47b734469b07170756979ede72
9261         * scd/app-openpgp.c (do_change_pin): Allow prefixing the CHVNO with
9262         "OPENPGP."
9263         * tools/card-call-scd.c (scd_change_pin): Change API to use strings.
9264         * tools/gpg-card-tool.c (cmd_passwd): Adjust for change.
9265         (cmd_unblock): Ditto.
9266
9267 2019-01-31  Werner Koch  <wk@gnupg.org>
9268
9269         card: Implement non-interactive mode.
9270         + commit 1c0fa3e6f74692d5e9b5f08cda523f0fcec305eb
9271         * tools/card-tool.h (opt): Add field 'initialized'.
9272         * tools/card-call-scd.c (scd_learn): Set it.
9273         * tools/gpg-card-tool.c (main): Reworked.
9274         (dispatch_command): New.
9275
9276         card: New command 'authenticate'.
9277         + commit da383257404cde9689bc58259ef3f46e9903bf34
9278         * tools/card-tool-misc.c (hex_to_buffer): New.
9279         * tools/gpg-card-tool.c (get_data_from_file): Change to allow returning
9280         a string.
9281         (cmd_authenticate): New.
9282         (cmds): Add command "authenticate".
9283
9284         scd: Add DES authentication for PIV card.
9285         + commit 1d57450f3e71b198e66e155a8ebbfab452f58ffc
9286         * scd/app-piv.c (flush_cached_data): New.
9287         (auth_adm_key): New.
9288         (set_adm_key): New.
9289         (do_setattr): New.
9290         * scd/command.c (MAXLEN_SETATTRDATA): New.
9291         (cmd_setattr): Add an inquire option.
9292
9293 2019-01-30  Werner Koch  <wk@gnupg.org>
9294
9295         card: Cache the results from gpg and gpgsm.
9296         + commit 0107984f9f55f84e4842642bceefd2181ec09dab
9297         * tools/card-tool-keys.c (keyblock_cache): New var.
9298         (release_keyblock): Factor code out to a new do_release_keyblock.  Add
9299         a cache.
9300         (flush_keyblock_cache): New.
9301         (get_matching_keys): Use the cache.
9302         * tools/gpg-card-tool.c (cmds): Add command "reset".
9303         (interactive_loop): Implement reset.
9304
9305         card: Print matching OpenPGP and X.509 data.
9306         + commit 833f27a6a7e059e38bccaf360f05e72e4403545a
9307         * tools/card-tool-keys.c: New.
9308         * tools/Makefile.am (gpg_card_tool_SOURCES): Add file.
9309         * tools/card-tool.h (struct pubkey_s, pubkey_t): New.
9310         (struct userid_s, userid_t): New.
9311         (struct keyblock_s, keyblock_t): New.
9312         * common/util.h (GNUPG_PROTOCOL_): New const
9313         * tools/gpg-card-tool.c (aTest): Add temporary command.
9314         (list_one_kinfo): Print info from gpg and gpgsm.
9315
9316         gpg: Emit an ERROR status if no key was found with --list-keys.
9317         + commit 140fda8c61422ec055c3f7e214cc35706c4320dd
9318         * g10/keylist.c (list_one): Emit status line.
9319
9320         common: Add kludge to allow silencing gnupg_exec_tool_stream.
9321         + commit 1fd3d864b4eceaf45b33e754e5d832b7ccc0d17f
9322         * common/exectool.c (read_and_log_buffer_t): Take care of a --quiet
9323         argument.
9324         (gnupg_exec_tool_stream): Ditto.
9325
9326         gpg: Allow generating Ed25519 key from an existing key.
9327         + commit 346a98fabe03adf2e202e36fc2aa24b1c2571154
9328         * g10/misc.c (map_pk_gcry_to_openpgp): Add EdDSA mapping.
9329
9330         common: New function decode_c_string.
9331         + commit 6ecedd0b25b6b1a33be63b99f2a8256370000521
9332         * common/miscellaneous.c (decode_c_string): New.
9333
9334 2019-01-29  Werner Koch  <wk@gnupg.org>
9335
9336         gpg: Implement searching keys via keygrip.
9337         + commit c128667b3cba749dd14262e032d4c260a2b0acd3
9338         * kbx/keybox-defs.h (struct _keybox_openpgp_key_info): Add field grip.
9339         * kbx/keybox-openpgp.c (struct keyparm_s): New.
9340         (keygrip_from_keyparm): New.
9341         (parse_key): Compute keygrip.
9342         * kbx/keybox-search.c (blob_openpgp_has_grip): New.
9343         (has_keygrip): Call it.
9344
9345         common: Provide some convenient OpenPGP related constants.
9346         + commit f382984966a31a4cbe572bce5370590c5490ed1e
9347         * common/openpgpdefs.h (OPENPGP_MAX_NPKEY): New.
9348         (OPENPGP_MAX_NSKEY): New.
9349         (OPENPGP_MAX_NSIG): New.
9350         (OPENPGP_MAX_NENC): New.
9351         * g10/packet.h: Define PUBKEY_MAX using the new consts.
9352
9353         common: New helper functions for OpenPGP curve OIDs.
9354         + commit 4a1558d0c7190cf13d35385e47291a7aa121be3e
9355         * common/openpgp-oid.c (openpgp_oidbuf_to_str): Factor most code out
9356         to ...
9357         (openpgp_oidbuf_to_str): new.
9358         (openpgp_oidbuf_is_ed25519): New.
9359         (openpgp_oidbuf_is_cv25519): New.
9360
9361         card: Support factory reset for Yubikey PIV application.
9362         + commit 79bed504e51034d960fcb858fb643901cad85913
9363         * scd/app-common.h (struct app_ctx_s): Add field cardtype.
9364         * scd/app.c (app_new_register): Set cardtype for yubikey.
9365         (app_getattr): Add CARDTYPE.
9366         (app_write_learn_status): Emit new attribute.
9367         * scd/app-piv.c (do_getattr): Add CHV-USAGE.
9368         (do_learn_status): Emit it.
9369         * tools/card-tool.h (struct card_info_s): Add field cardtype.
9370         * tools/card-call-scd.c (learn_status_cb): Parse "CARDTYPE".
9371
9372         * tools/gpg-card-tool.c (list_piv): Print PIN usage policy.
9373         (list_card): Print card type.
9374         (cmd_factoryreset): Implement for Yubikey with PIV.
9375
9376         card: Print keyinfo for PIV cards.
9377         + commit 9325c92284bb346d11c3591bb2ea88095989361a
9378         * scd/app-piv.c (do_learn_status): Print CHV-STATUS.
9379         * tools/card-tool.h (struct card_info_s): Rename chvretry to chvinfo.
9380         * tools/card-call-scd.c (learn_status_cb): Depend CHV-STATUS on app
9381         type.
9382         * tools/gpg-card-tool.c (list_piv): New.
9383
9384         card: Make printing of key information more flexible.
9385         + commit 237880175f59d372011cd2e20bb49726eeccf058
9386         * tools/card-tool-misc.c: New.
9387         * tools/card-tool.h: Rewored data structures for key infos.
9388         * tools/gpg-card-tool.c: Ditto.
9389         * tools/card-call-scd.c: Ditto.
9390
9391 2019-01-28  NIIBE Yutaka  <gniibe@fsij.org>
9392
9393         agent: Clear bogus pinentry cache, when it causes an error.
9394         + commit 02a2633a7f0b7d91aa48ea615fb3a0edfd6ed6bb
9395         * agent/agent.h (PINENTRY_STATUS_*): Expose to public.
9396         (struct pin_entry_info_s): Add status.
9397         * agent/call-pinentry.c (agent_askpin): Clearing the ->status
9398         before the loop, let the assuan_transact set ->status.  When
9399         failure with PINENTRY_STATUS_PASSWORD_FROM_CACHE, it returns
9400         soon.
9401         * agent/findkey.c (unprotect): Clear the pinentry cache,
9402         when it causes an error.
9403
9404 2019-01-27  Werner Koch  <wk@gnupg.org>
9405
9406         card: Implement the bulk of OpenPGP stuff into gpg-card-tool.
9407         + commit 1c9251004592415b27988064ae20504dd1c37f57
9408         * tools/card-call-scd.c: New.
9409         * tools/card-tool.h: new.
9410         * tools/gpg-card-tool.c: Largely extended.
9411
9412 2019-01-26  Werner Koch  <wk@gnupg.org>
9413
9414         gpg: Fix just changed agent_get_s2k_count.
9415         + commit 54f88afba4564e62e51fe6e22beabbdee75f91ac
9416         * g10/call-agent.c (agent_get_s2k_count): Actually return the count.
9417
9418         gpg: Move S2K encoding function to a shared file.
9419         + commit ec13b1c562e34c0fcbc7b848ab6dc187b79cf2c1
9420         * g10/passphrase.c (encode_s2k_iterations): Move function to ...
9421         * common/openpgp-s2k.c: new file.  Remove default intialization code.
9422         * common/openpgpdefs.h (S2K_DECODE_COUNT): New to keep only one copy.
9423         * g10/call-agent.c (agent_get_s2k_count): Change to return the count
9424         and print an error.
9425         * agent/protect.c: Include openpgpdefs.h
9426         * g10/card-util.c (gen_kdf_data): Adjust for changes
9427         * g10/gpgcompose.c: Include call-agent.h.
9428         (sk_esk): Adjust for changes.
9429         * g10/passphrase (passphrase_to_dek): Adjust for changes.
9430         * g10/main.h (S2K_DECODE_COUNT): Remove macro.
9431
9432 2019-01-25  Werner Koch  <wk@gnupg.org>
9433
9434         scd: Improve app selection for app "undefined".
9435         + commit 0415b80227c52620bece3ae7502f38f24a23e59d
9436         * scd/app.c (app_new_register): Don't bail out early in undefined
9437         mode.
9438
9439         scd: Fix flushing of CA-FPR data objects.
9440         + commit c9f4c1f0de06672c6ae2b793d86cc001d131f9a6
9441         * scd/app-openpgp.c (do_setattr): Add new table item to flush a
9442         different tag.
9443
9444 2019-01-25  NIIBE Yutaka  <gniibe@fsij.org>
9445
9446         agent: Support --mode=ssh option for CLEAR_PASSPHRASE.
9447         + commit ae966bbe9b16ed68a51391afdde615339755e22d
9448         * agent/command.c (cmd_clear_passphrase): Add support for SSH.
9449
9450         dirmngr: Fix initialization of assuan's nPth hook.
9451         + commit 1f8817475f59ede3f28f57edc10ba56bbdd08b49
9452         * dirmngr/dirmngr.c (main): Move assuan_set_system_hooks to...
9453         (thread_init): ... here.
9454
9455 2019-01-24  Werner Koch  <wk@gnupg.org>
9456
9457         common: Extend function percent_data_escape.
9458         + commit 055f8854d3f49b8d06105d20f344f5ac10e4f6a6
9459         * common/percent.c (percent_data_escape): Add new args prefix and
9460         plus_escape.
9461         * agent/command.c (cmd_put_secret): Adjust for changed function
9462
9463         * common/t-percent.c (test_percent_data_escape): Extend test for the
9464         prefix.
9465         (test_percent_data_escape_plus): new test for the plus escaping.
9466
9467 2019-01-23  NIIBE Yutaka  <gniibe@fsij.org>
9468
9469         scd: Support PASSWD --clear for OpenPGP card.
9470         + commit fec75a3868da72196f76aca95c7ab07debb7dc04
9471         * scd/app-openpgp.c (do_change_pin): Implement handling
9472         APP_CHANGE_FLAG_CLEAR.
9473
9474 2019-01-22  Werner Koch  <wk@gnupg.org>
9475
9476         gpg: Stop early when trying to create a primary Elgamal key.
9477         + commit f97dc55ff1b041071bc3cbe98aa761bf77bb7ac8
9478         * g10/misc.c (openpgp_pk_test_algo2): Add extra check.
9479
9480         card-tool: Add skeleton for new tool.
9481         + commit e6d613711a327d63511601dd42aeff34e09ec95a
9482         * tools/gpg-card-tool.c: New.
9483         * tools/gpg-card-tool-w32info.rc: New.
9484         * tools/Makefile.am: Add new tool.
9485
9486         common: Add generic status print function.
9487         + commit 03cf23b43ec5fea8a355d3ba2200e86a8efc589b
9488         * common/status.c (gnupg_set_status_fd): New.
9489         (gnupg_status_printf): New.
9490         * po/Makevars (XGETTEXT_OPTIONS): Add gnupg-status_printf.
9491
9492 2019-01-21  Werner Koch  <wk@gnupg.org>
9493
9494         scd: Support CHV-STATUS and CHECKPIN for PIV.
9495         + commit fa9d703de5c70ae925e8ca6604073506f24d641a
9496         * scd/app-piv.c (parse_pin_keyref): New.
9497         (get_chv_status): New.
9498         (do_getattr): Add name CHV-STATUS.
9499         (verify_pin): Add arg keyref to support other PINs.
9500         (do_change_pin): New.  Right now limited to --clear.
9501         (do_check_pin): New.
9502         (app_select_piv): Register new commands.
9503
9504         scd: Add option --clear to PASSWD.
9505         + commit 29929e65521279eabc98a67c766fe485057405a9
9506         * scd/command.c (cmd_passwd): Add option --clear.
9507         (send_status_printf): New.
9508         * scd/app-common.h (APP_CHANGE_FLAG_CLEAR): New.
9509         * scd/app-nks.c (do_change_pin): Return an error if that option is
9510         used.
9511         * scd/app-openpgp.c (do_change_pin): Ditto.
9512
9513 2019-01-20  Werner Koch  <wk@gnupg.org>
9514
9515         scd: Add very basic support for PIV cards.
9516         + commit ec56996029d95d4bd26e1badfe207232270c6247
9517         * scd/app-piv.c: New.
9518         * scd/Makefile.am (card_apps): Add app-piv.c
9519         * scd/app.c (app_new_register): Try to get a Yubikey serial number.
9520         Detect the PIV application.
9521         (get_supported_applications): Add "piv".
9522
9523         scd: One new and one improved 7816 function.
9524         + commit 70bb5c7931598590b1acfae90bf4657f5911d2d3
9525         * scd/apdu.c (apdu_send_direct): New arg R_SW.
9526         * scd/command.c (cmd_apdu): Ditto.
9527         * scd/iso7816.c (iso7816_apdu_direct): New arg R_SW.
9528         (iso7816_general_authenticate): New.
9529         * scd/app-nks.c (get_chv_status, get_nks_version): Pass NULL for new
9530         arg.
9531
9532 2019-01-17  Werner Koch  <wk@gnupg.org>
9533
9534         ssh: Simplify the curve name lookup.
9535         + commit d93797c8a7892fe26672c551017468e9f8099ef6
9536         * agent/command-ssh.c (struct ssh_key_type_spec): Add field
9537         alt_curve_name.
9538         (ssh_key_types): Add some alternate curve names.
9539         (ssh_identifier_from_curve_name): Lookup also bey alternative names
9540         and return the canonical name.
9541         (ssh_key_to_blob): Simplify the ECDSA case by using gcry_pk_get_curve
9542         instead of the explicit mapping.
9543         (ssh_receive_key): Likewise.  Use ssh_identifier_from_curve_name to
9544         validate the curve name.  Remove the reverse mapping because since
9545         GnuPG-2.2 Libgcrypt 1.7 is required.
9546         (ssh_handler_request_identities): Log an error message.
9547
9548 2019-01-16  NIIBE Yutaka  <gniibe@fsij.org>
9549
9550         gpg: Report STATUS_NO_SECKEY when it is examined.
9551         + commit dafffa95b2317bcb80fff1fd6d2bc7b4e6b1e206
9552         * g10/packet.h (struct pubkey_enc_list): Add result.
9553         * g10/mainproc.c (proc_pubkey_enc): Initialize ->result.
9554         (proc_encrypted): Report STATUS_NO_SECKEY status.
9555         * g10/pubkey-enc.c (get_session_key): Set ->result.
9556
9557 2019-01-07  NIIBE Yutaka  <gniibe@fsij.org>
9558
9559         scd: Fix for USB INTERRUPT transfer.
9560         + commit 5ab3bc422a5cc1a646c168b547f2b6538b3a4ffa
9561         * scd/ccid-driver.c (intr_cb): When LIBUSB_TRANSFER_NO_DEVICE,
9562         just handle this event as failure.
9563
9564 2019-01-03  Werner Koch  <wk@gnupg.org>
9565
9566         scd: Add two variants to the set of ISO7816 functions.
9567         + commit 405feca2bdeeb620dc406667a702035a123ae848
9568         * scd/iso7816.c (iso7816_select_application_ext): New.
9569         (iso7816_get_data_odd): New.
9570
9571         scd: Support "READKEY --advanced" for all cards.
9572         + commit cca2b87e79cda212a33c13efdd2b2830295d2efe
9573         * scd/command.c (cmd_readkey): Reformat for advanced mode.
9574
9575 2018-12-18  Werner Koch  <wk@gnupg.org>
9576
9577         wks: Do not use compression for the encrypted data.
9578         + commit 70a8db0333e3c22403b3647f8b5f924f6dace719
9579         * tools/gpg-wks-client.c (encrypt_response): Add arg -z0.
9580         * tools/gpg-wks-server.c (encrypt_stream): Ditto.
9581
9582 2018-12-18  NIIBE Yutaka  <gniibe@fsij.org>
9583
9584         scd: Fix description string.
9585         + commit e6b7e0ff9990813ac9f11b2d9d92596d6379ebfe
9586         * scd/app-openpgp.c (data_objects): Capitalize the word for usage.
9587
9588 2018-12-17  Werner Koch  <wk@gnupg.org>
9589
9590         Silence a few compiler warnings new with gcc 8.
9591         + commit 40c307fa8d0e813f2aa57806f25b8b0063cc2be3
9592         * dirmngr/dns.c: Include gpgrt.h.  Silence -Warray-bounds also gcc.
9593         * tools/gpg-pair-tool.c (command_respond): Init two vars to silence
9594         gcc.
9595
9596 2018-12-12  NIIBE Yutaka  <gniibe@fsij.org>
9597
9598         card: Suppress error message by agent_scd_cardlist.
9599         + commit ebf775eb16fef27bd1f27319a5483d04dcf95a9a
9600         * g10/call-agent.c (agent_scd_cardlist): Add
9601         FLAG_FOR_CARD_SUPPRESS_ERRORS.
9602
9603 2018-12-11  Werner Koch  <wk@gnupg.org>
9604
9605         agent: Make the S2K calibration time runtime configurabe.
9606         + commit cbcc8c19541fe8407f3b6588fce1535c64cf6b25
9607         * agent/protect.c (s2k_calibration_time): New file global var.
9608         (calibrate_s2k_count): Use it here.
9609         (get_calibrated_s2k_count): Replace function static var by ...
9610         (s2k_calibrated_count): new file global var.
9611         (set_s2k_calibration_time): New function.
9612         * agent/gpg-agent.c (oS2KCalibration): New const.
9613         (opts): New option --s2k-calibration.
9614         (parse_rereadable_options): Parse that option.
9615
9616         dirmngr: Retry another server from the pool on 502, 503, 504.
9617         + commit 05ef6282784495a77f4faf76c0de5bc85dfecf06
9618         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Add arg
9619         http_status and handle it.
9620         (ks_hkp_search): Get http_status froms end_request and pass on to
9621         handle_send_request_error.
9622         (ks_hkp_get): Ditto.
9623         (ks_hkp_put): Ditto.
9624
9625         dirmngr: New function http_status2string.
9626         + commit dc61f4ecea5c9815cb00aeb25439978337c1fd64
9627         * dirmngr/http.c (http_status2string): New.
9628
9629         gpg: In search-keys return "Not found" instead of "No Data".
9630         + commit e7252ae57f3c9da557f23295268f74dd25fee3a1
9631         * g10/keyserver.c (keyserver_search): Check for NO_DATA.
9632
9633 2018-12-11  Tomi Leppänen  <tomi.leppanen@jolla.com>
9634
9635         tools: Use POSIX compatible arguments for find.
9636         + commit 2c35e67e3475ec38ff49953d79bd0f734d6db542
9637         * tools/addgnupghome (filelist): Remove bashism.
9638
9639 2018-12-05  NIIBE Yutaka  <gniibe@fsij.org>
9640
9641         g10: Fix print_pubkey_info new line output.
9642         + commit e154fba30ba0d5f29040a33f5c1b5c25b441b69f
9643         * g10/keylist.c (print_pubkey_info): Reverse the condition.
9644
9645 2018-12-04  Werner Koch  <wk@gnupg.org>
9646
9647         wks: Fix filter expression syntax flaw.
9648         + commit 0c36ec241d285545f286069843de4f663cd274a3
9649         * tools/wks-util.c (wks_get_key, wks_filter_uid): The filter
9650         expression needs a space before the value.
9651         (install_key_from_spec_file): Replace es_getline by es_read_line and
9652         remove debug output.
9653
9654         gpg: Prepare revocation keys for use with v5 keys.
9655         + commit c6e2ee020784de63edfa83c76095e086eae49eef
9656         * g10/packet.h (struct revocation_key): Add field 'fprlen'.
9657         * g10/parse-packet.c (parse_revkeys): Set fprlen and allow for v5
9658         keys.  Also fix reading of unitialized data at place where
9659         MAX_FINGERPRINT_LEN is used.
9660         * g10/revoke.c (gen_desig_revoke): Allow for v5 keys and use fprlen.
9661         Do an explicit compare to avoid reading unitialized data.
9662         * g10/sig-check.c (check_revocation_keys): Use the fprlen.
9663         * g10/getkey.c (merge_selfsigs_main): Do an explicit copy to avoid
9664         reading unitialized data.
9665         * g10/import.c (revocation_present): Use fprlen.
9666         * g10/keyedit.c (show_key_with_all_names): Use fprlen.
9667         (menu_addrevoker): Use fprlen.  Allow for v5 keys.
9668         * g10/keygen.c (keygen_add_revkey): Use fprlen.
9669         (parse_revocation_key): Allow for v5 keys.
9670         * g10/keyid.c (keyid_from_fingerprint): Allow for v5 keys.  Print a
9671         better error message in case of bogus fingerprints.
9672         * g10/keylist.c (print_revokers): Use fprlen.
9673
9674         wks: Allow reading of --install-key arguments from stdin.
9675         + commit ba46a359b9d6549b74ec8401ea39bad434d87564
9676         * tools/wks-util.c (install_key_from_spec_file): New.
9677         (wks_cmd_install_key): Call it.
9678         * tools/gpg-wks-client.c (main): Allow --install-key w/o arguments.
9679         * tools/gpg-wks-server.c (main): Ditto.
9680
9681         gpg: New list-option "show-only-fpr-mbox".
9682         + commit 0e8bf204791ebfd0c9a8e4b49fbadf998ec62e49
9683         * g10/gpg.c (parse_list_options): Add option "show-only-fpr-mbox".
9684         * g10/options.h (LIST_SHOW_ONLY_FPR_MBOX): New.
9685         * g10/keylist.c (list_keyblock_simple): New.
9686         (list_keyblock): Call it.
9687         (list_all): Do not print the keyring name in LIST_SHOW_ONLY_FPR_MBOX
9688         mode.
9689
9690         wks: Create sub-directories.
9691         + commit 73e5b0ec9b9ba5e04e55f8c42d81e23df7c3afe0
9692         * tools/wks-util.c (wks_compute_hu_fname): Stat and create directory
9693         if needed.
9694
9695         wks: Add new commands --install-key and --remove-key to the client.
9696         + commit 602b1909632925d5a2e0778c102d66109795c627
9697         * tools/gpg-wks-client.c (aInstallKey, aRemoveKey, oDirectory): New.
9698         (opts): Add "--install-key", "--remove-key" and "-C".
9699         (parse_arguments): Parse them.
9700         (main): Check that the given directory exists.  Implement the new
9701         commands.
9702
9703         wks: Move a few server functions to wks-util.
9704         + commit 99094c992c20dd22971beb3527cfda109cd1df89
9705         * tools/gpg-wks-server.c (write_to_file): Move to ...
9706         * tools/wks-util.c: here.
9707         * tools/gpg-wks-server.c (compute_hu_fname): Move to ...
9708         * tools/wks-util.c (wks_compute_hu_fname): here.
9709         * tools/gpg-wks-server.c (fname_from_userid): Move to ...
9710         * tools/wks-util.c (wks_fname_from_userid): here.
9711         * tools/gpg-wks-server.c (command_install_key): Move to ...
9712         * tools/wks-util.c (wks_cmd_install_key): here and change caller.
9713         * tools/gpg-wks-server.c (command_remove_key): Move to ...
9714         * tools/wks-util.c (wks_cmd_remove_key): here and change callers.
9715
9716 2018-12-04  NIIBE Yutaka  <gniibe@fsij.org>
9717
9718         build: Remove --with-*-prefix from configure_opts.
9719         + commit 802b23289cc9b43a56e5032c2681eb21d4014784
9720         * autogen.rc (configure_opts): Remove --with-*-prefix.
9721
9722 2018-12-01  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
9723
9724         g10/mainproc: disable hash contexts when --skip-verify is used.
9725         + commit 73e74de0e33bbb76300f96a4174024779047df06
9726         * g10/mainproc.c (proc_plaintext): Do not enable hash contexts when
9727         opt.skip_verify is set.
9728
9729         common/iobuf: fix memory wiping in iobuf_copy.
9730         + commit 654e353d9b20f10fa275e7ae10cc50480654f079
9731         * common/iobuf.c (iobuf_copy): Wipe used area of buffer instead of
9732         first sizeof(char*) bytes.
9733
9734         common/mischelp: use platform memory zeroing function for wipememory.
9735         + commit 2a650772b4e1c78a4fd20bc88433930e5551fe9c
9736         * common/mischelp.h (wipememory): Replace macro with function
9737         prototype.
9738         (wipememory2): Remove.
9739         * common/mischelp.c (wipememory): New.
9740         * configure.ac (AC_CHECK_FUNCS): Check for 'explicit_bzero'.
9741
9742 2018-11-30  Werner Koch  <wk@gnupg.org>
9743
9744         scd: Add strerror to new error message.
9745         + commit 3a90efb7cf13532cc82b45c11a7abdadfe0c81f1
9746         * agent/call-scd.c (wait_child_thread): Add %s.
9747
9748         gpg: Improve error message about failed keygrip computation.
9749         + commit cd64af003d4b6b46b69dbd575f73d53359ae0bcc
9750         * g10/keyid.c (keygrip_from_pk): Print the fingerprint on failure.
9751
9752 2018-11-28  NIIBE Yutaka  <gniibe@fsij.org>
9753
9754         scd: Serialize opening device by select_application.
9755         + commit 47106ac435e891ced67f0ad9bb6b2ee12098c880
9756         * scd/app.c (app_new_register): Don't lock APP_LIST_LOCK here.
9757         (select_application): Lock with APP_LIST_LOCK earlier.
9758
9759 2018-11-27  NIIBE Yutaka  <gniibe@fsij.org>
9760
9761         agent: Better serialization for scdaemon access.
9762         + commit 483e63f9b5faead819ddd28308902ef43bf298ab
9763         * agent/call-scd.c (unlock_scd): Move lock before accessing IN_USE.
9764         (wait_child_thread): Add log_info for Windows, and fixed log_error
9765         message.
9766
9767 2018-11-26  Andre Heinecke  <aheinecke@intevation.de>
9768
9769         w32: Fix linkage of gpg-pair-tool.
9770         + commit f12fcd907903742bde3ebb7ffef244c92d6d1611
9771         * tools/Makefile.am (gpg_pair_tool_LDADD): Add W32SOCKLIBS.
9772
9773 2018-11-26  NIIBE Yutaka  <gniibe@fsij.org>
9774
9775         agent: Have a thread to wait for the child process of scdaemon.
9776         + commit 40c7923ea881881a48de8f303b0870ec5910e13d
9777         * agent/call-scd.c (wait_child_thread): New.
9778         (start_scd): Create a thread for wait_child_thread.
9779         (agent_scd_check_aliveness): Remove.
9780
9781         agent: Defer calling assuan_release when it's still in use.
9782         + commit 9fb3f0f3f79e74166cce8e0781e97043f25890cc
9783         * agent/call-scd.c (struct scd_local_s): Remove LOCK, introduce IN_USE
9784         and INVALID flags.
9785         (unlock_scd): Call assuan_release when CTX is invalid.
9786         (start_scd): Set IN_USE.
9787         (agent_scd_check_aliveness): Don't call assuan_release when it's in use.
9788
9789         agent: Clean up SCDaemon management.
9790         + commit f45d6124696cc92ccdec09841b8182679c377997
9791         * agent/call-scd.c (struct scd_local_s): Remove ctrl_backlink.
9792         (start_scd): Don't assign to the field.
9793         (agent_scd_check_aliveness): Fix typo in comment.
9794
9795 2018-11-22  Werner Koch  <wk@gnupg.org>
9796
9797         dirmngr: Avoid possible CSRF attacks via http redirects.
9798         + commit fa1b1eaa4241ff3f0634c8bdf8591cbc7c464144
9799         * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
9800         (http_redir_info_t): New.
9801         * dirmngr/http.c (do_parse_uri): Set new fields.
9802         (same_host_p): New.
9803         (http_prepare_redirect): New.
9804         * dirmngr/t-http-basic.c: New test.
9805         * dirmngr/ks-engine-hkp.c (send_request): Use http_prepare_redirect
9806         instead of the open code.
9807         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
9808
9809 2018-11-16  Werner Koch  <wk@gnupg.org>
9810
9811         gpg: Start using OCB mode by default with Libgcrypt 1.9.
9812         + commit 1e700961ddf4c54ec5a03a697fe00d7eb606fdff
9813         * g10/main.h (GCRYPT_VERSION_NUMBER): Fix type in condition.
9814
9815 2018-11-15  NIIBE Yutaka  <gniibe@fsij.org>
9816
9817         card: Display UIF setting.
9818         + commit e955ca245ea08e68ae2397f1583c8728d72acbd8
9819         * g10/call-agent.h (agent_card_info_s): Add UIF fields.
9820         * g10/call-agent.c (learn_status_cb): Put UIF DOs info.
9821         * g10/card-util.c (current_card_status): Output for UIF.
9822
9823         scd: Make "learn" report about KDF data object.
9824         + commit 05d163aebc04db109ec5e004eb04a4b3796f6421
9825         * scd/app-openpgp.c (do_learn_status): Report KDF attr.
9826         * g10/card-util.c (current_card_status): Output KDF for with_colons.
9827
9828         card: Display if KDF is enabled or not.
9829         + commit a5542a4a702c2210facf58a98bc8d3d16089b6ab
9830         * g10/call-agent.h (kdf_do_enabled): New field.
9831         * g10/call-agent.c (learn_status_cb): Set kdf_do_enabled if available.
9832         * g10/card-util.c (current_card_status): Inform the availability.
9833
9834 2018-11-14  Werner Koch  <wk@gnupg.org>
9835
9836         Remove the gpg-zip script.
9837         + commit 8b8ea802ca071c911158cab0203245a16a69125c
9838         * tools/gpg-zip.in: Remove.
9839         * m4/tar-ustar.m4: Remove.
9840
9841 2018-11-14  NIIBE Yutaka  <gniibe@fsij.org>
9842
9843         agent: Simplify agent_popup_message_stop.
9844         + commit 804a77edd9472d44606641b7772550521e1ba271
9845         * agent/call-pinentry.c (agent_popup_message_stop): Just kill it.
9846
9847 2018-11-13  Werner Koch  <wk@gnupg.org>
9848
9849         dirmngr: Support the new WKD draft with the openpgpkey subdomain.
9850         + commit 914fa3be22bf8848a97a7dd405a040d6ef31e2fd
9851         * dirmngr/server.c (proc_wkd_get): Implement new openpgpkey subdomain
9852         method.
9853
9854 2018-11-13  NIIBE Yutaka  <gniibe@fsij.org>
9855
9856         build: Update libgcrypt.m4 and ntbtls.m4.
9857         + commit d58fe697acefd435ec01503dae574d6c99dfedae
9858         * m4/libgcrypt.m4: Update from master.
9859         * m4/ntbtls.m4: Update from master.
9860
9861 2018-11-12  Andre Heinecke  <aheinecke@intevation.de>
9862
9863         dirmngr: Add FLUSHCRLs command.
9864         + commit 678e4706ee614a6b7e543e2a80072d75405dd4db
9865         Summary:
9866         * dirmngr/crlcache.c (crl_cache_flush): Also deinit the cache.
9867         * dirmngr/server.c (hlp_flushcrls, cmd_flushcrls): New.
9868         (register_commands): Add FLUSHCRLS.
9869
9870 2018-11-12  Werner Koch  <wk@gnupg.org>
9871
9872         common: Prepare for parsing mail sub-addresses.
9873         + commit 6b9f772914624cc673ba26d49b6e3adc32dd7e0a
9874         * common/mbox-util.c (mailbox_from_userid): Add arg subaddress and
9875         implement.  Change all callers to pass false for it.
9876
9877         * common/t-mbox-util.c (run_mbox_no_sub_test): New.
9878         (run_filter): Add arg no_sub.
9879         (main): Call new test and add option --no-sub.
9880
9881 2018-11-11  Werner Koch  <wk@gnupg.org>
9882
9883         common: Add --filter option to t-mbox-util.
9884         + commit b3095c95ef9d2d76b49a6ad1b946fca590380dc9
9885         * common/t-mbox-util.c (run_filter): New.
9886         (main): Add option parser.
9887
9888 2018-11-09  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
9889
9890         g10/mainproc: avoid extra hash contexts when decrypting AEAD input.
9891         + commit b46382dd47731231ff49b59c486110a25e08e985
9892         * g10/mainproc.c (mainproc_context): New member
9893         'seen_pkt_encrypted_aead'.
9894         (release_list): Clear 'seen_pkt_encrypted_aead'.
9895         (proc_encrypted): Set 'seen_pkt_encrypted_aead'.
9896         (have_seen_pkt_encrypted_aead): New.
9897         (proc_plaintext): Do not enable extra hash contexts when decryption
9898         AEAD input.
9899
9900 2018-11-08  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
9901
9902         g10/armor: optimize radix64 to binary conversion.
9903         + commit 643ec7c642dc75191e712963d2bb460ac247e09b
9904         * g10/armor.c (asctobin): Larger look-up table for fast path.
9905         (initialize): Update 'asctobin' initialization.
9906         (radix64_read): Add fast path for radix64 to binary conversion.
9907
9908         g10/armor: optimize binary to radix64 conversion.
9909         + commit e8142cc69a2ae5a5d0a238bc9f88841067359af8
9910         * g10/armor.c (bintoasc): Change to read-only.
9911         (initialize): Use const pointer for 'bintoasc'.
9912         (armor_output_buf_as_radix64): New function for faster binary to
9913         radix64 conversion.
9914         (armor_filter): Use new conversion function.
9915
9916         g10/armor: use libgcrypt's CRC24 implementation.
9917         + commit e486d4f0259f27906d2c2869cc01b3aa31aaa0a6
9918         * g10/armor.c (CRCINIT, CRCPOLY, CRCUPDATE, crc_table): Remove.
9919         (new_armor_context): Open libgcrypt CRC24 context.
9920         (release_armor_context): Close CRC24 context.
9921         (initialize): Remove CRC table generation.
9922         (get_afx_crc): New.
9923         (check_input, fake_packet, radix64_read, armor_filter): Update to use
9924         CRC24 context.
9925         * g10/filter.h (armor_filter_context_t): Replace crc intermediate value
9926         with libgcrypt md context pointer.
9927
9928         common/iobuf: optimize iobuf_read_line.
9929         + commit 2b5718c1f76851160115f455c3a9383b04521347
9930         * common/iobuf.c (iobuf_read_line): Add fast path for finding '\n'
9931         character in buffer.
9932
9933         g10/armor: remove unused unarmor_pump code.
9934         + commit 47424881b27d4b3bae2925265b2008cda0c2933f
9935         * g10/armor.c (unarmor_state_e, unarmor_pump_s, unarmor_pump_new)
9936         (unarmor_pump_release, unarmor_pump): Remove.
9937         * g10/filter.h (UnarmorPump, unarmor_pump_new, unarmor_pump_release)
9938         (unarmor_pump): Remove.
9939
9940         g10/armor: fix eof checks in radix64_read.
9941         + commit a571bb8df52d6f2727876e086790dd037c9948ad
9942         * g10/armor.c (radix64_read): Check EOF with '!afx->buffer_len' instead
9943         of 'c == -1', as 'c' is never set to this value.
9944
9945         g10/decrypt-data: use iobuf_read for higher performance.
9946         + commit 5d6c080522e1666943b75c99124fb69b985b6941
9947         * g10/decrypt-data.c (fill_buffer): Use iobuf_read instead of iobuf_get
9948         for reading data.
9949
9950         g10/decrypt-data: use fill_buffer in more places.
9951         + commit e2b9095de35ac4d402b077d5484b4131700a9925
9952         * g10/decrypt-data.c (mdc_decode_filter, decode_filter): Use
9953         fill_buffer.
9954
9955 2018-11-08  NIIBE Yutaka  <gniibe@fsij.org>
9956
9957         gpgcompose: Fix --sk-esk.
9958         + commit 69930f6884a934207f7aa523cf6d2b8e22dfe666
9959         * g10/gpgcompose.c (sk_esk): Copy the result content correctly.
9960         Don't forget to free the result.
9961
9962         g10: Fix log_debug formatting.
9963         + commit 7fc3decc2e038be905d47701c7ce196ed86a725b
9964         * g10/cipher-aead.c (do_flush): No cast is correct.
9965         * g10/decrypt-data.c (aead_underflow): No cast needed.
9966         Use "%j" for uint64_t for chunklen.
9967
9968 2018-11-06  NIIBE Yutaka  <gniibe@fsij.org>
9969
9970         g10: Fix print_keygrip for smartcard.
9971         + commit 01b77ebbb71d47ba276d3a1af9595fdcd9b48f5f
9972         * g10/card-util.c (print_keygrip): Use tty_fprintf.
9973
9974 2018-11-05  Werner Koch  <wk@gnupg.org>
9975
9976         wks: New option --with-colons for gpg-wks-client.
9977         + commit e3a1e80d13487c9336640a99b2f6d385d7d6f55c
9978         * tools/gpg-wks.h (opt): Add field with_colons.
9979         * tools/gpg-wks-client.c (oWithColons): New const.
9980         (opts, parse_arguments): Add option --with-colons.
9981         (main): Change aSupported to take several domains in --with-colons
9982         mode.
9983         (command_send): Factor policy getting code out to ...
9984         (get_policy_and_sa): New function.
9985         (command_supported): Make use of new function.
9986
9987         speedo: Remove obsolete configure option of gpgme.
9988         + commit d7323bb2d957fbeb8192c0ecbd99b1d14d302912
9989         * build-aux/speedo.mk (speedo_pkg_gpgme_configure): Remove
9990         --disable-w32-qt option.
9991
9992         dirmngr: Fix LDAP port parsing.
9993         + commit a3a5a2451924640588e5ecc03a1d4ba6a6ba94a5
9994         * dirmngr/misc.c (host_and_port_from_url): Fix bad port parsing and a
9995         segv for a missing slash after the host name.
9996
9997 2018-11-02  NIIBE Yutaka  <gniibe@fsij.org>
9998
9999         build: Update *.m4 from libraries.
10000         + commit 8e84efbe35633275e260712ba38a505e3f9d0898
10001         * m4/gpg-error.m4: Update from master.
10002         * m4/ksba.m4: Ditto.
10003         * m4/libassuan.m4: Ditto.
10004         * m4/libgcrypt.m4: Ditto.
10005         * m4/npth.m4: Ditto.
10006         * m4/ntbtls.m4: Ditto.
10007
10008 2018-10-31  NIIBE Yutaka  <gniibe@fsij.org>
10009
10010         build: Update *.m4 from libraries.
10011         + commit fd7aee6a97134fdf48a496841241f8ae25736e61
10012         * m4/gpg-error.m4: Update from master.
10013         * m4/ksba.m4: Ditto.
10014         * m4/libassuan.m4: Ditto.
10015         * m4/libgcrypt.m4: Ditto.
10016         * m4/npth.m4: Ditto.
10017         * m4/ntbtls.m4: Ditto.
10018
10019 2018-10-26  Werner Koch  <wk@gnupg.org>
10020
10021         build: By default build wks-tools on all Unix platforms.
10022         + commit b83fed64f8051279a8f36e024c1f12f7f13c4716
10023
10024
10025         wkd: Add option --directory to the server.
10026         + commit f248416bc9792e80bb0785302058131de49d7639
10027         * tools/gpg-wks-server.c (opts): Add '--directory',
10028         (main): Explain how to set correct permissions.
10029         (command_list_domains): Create an empty policy file and remove the
10030         warning for an empty policy file.
10031
10032 2018-10-26  NIIBE Yutaka  <gniibe@fsij.org>
10033
10034         kbx: Increase size of field for fingerprint.
10035         + commit 4249e9a2bf028f007d1ddaac730f636e5c6da20f
10036         * kbx/keybox-search-desc.h (fpr): Increase the size.
10037
10038 2018-10-25  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
10039
10040         all: fix more spelling errors.
10041         + commit a7c5d65eb50355274c1b5b047c02c653f518900a
10042
10043
10044         headers: fix spelling.
10045         + commit b39ece7d35401302879062d9d4bec25b1249ae7e
10046
10047
10048 2018-10-25  Werner Koch  <wk@gnupg.org>
10049
10050         dirmngr: Fix out of scope use of a var in the keyserver LDAP code.
10051         + commit 2b57a8159cdc3b212a4efc68787b40cafcd91ebe
10052         * dirmngr/ks-engine-ldap.c (extract_attributes): Don't use a variabale
10053         out of scope and cleanup the entire pgpKeySize block.
10054
10055 2018-10-25  NIIBE Yutaka  <gniibe@fsij.org>
10056
10057         g10,scd: Improve UIF support.
10058         + commit 0240345728a84d8f235ce05889e83963e52742eb
10059         * g10/call-agent.c (learn_status_cb): Parse "bt" flag.
10060         * g10/call-agent.h: New member field "bt".
10061         * g10/card-util.c (uif): Limit its access only when it is supported.
10062         * scd/app-openpgp.c (do_setattr): Allow access to UIF objects only
10063         when there is a button.
10064
10065 2018-10-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
10066
10067         all: fix spelling and typos.
10068         + commit 54eb375ff14e2a93cea70eab35719be4d25f51ca
10069
10070
10071         doc: fix spelling mistakes.
10072         + commit ef540d1af0649ebf1add190d0ab095e957658b7e
10073
10074
10075 2018-10-24  Werner Koch  <wk@gnupg.org>
10076
10077         agent: Fix possible uninitalized use of CTX in simple_pwquery.
10078         + commit bafcf7095159493a656382997f8b0d0bb11a20e8
10079         * common/simple-pwquery.c (agent_open): Clear CTX even on early error.
10080
10081         agent: Fix possible release of unitialize var in a genkey error case.
10082         + commit 2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc
10083         * agent/command.c (cmd_genkey): Initialize 'value'.
10084
10085         ssh: Fix possible infinite loop in case of an read error.
10086         + commit 7385e1babf6eef586c79ad23f8e541aaf608c4e5
10087         * agent/command-ssh.c (ssh_handler_add_identity): Handle other errors
10088         than EOF.
10089
10090         tools: Fix FILE memory leak in gpg-connect-agent.
10091         + commit 378719f25fe00d46393541f4a4f79e04484c3000
10092         * tools/gpg-connect-agent.c (do_open): dup the fileno and close the
10093         stream.
10094
10095         sm: Use the correct string in an error message.
10096         + commit 793fd8d876777c24c4d5072301fa530333d6e1d9
10097         * sm/gpgsm.c (main): Fix error message.
10098
10099         gpg: Unfinished support for v5 signatures.
10100         + commit 64a1e86fc06d89c980a196c61d2b6d77d167565e
10101         * g10/parse-packet.c (parse_signature): Allow for v5 signatures.
10102         * g10/sig-check.c (check_signature_end_simple): Support the 64bit v5
10103         byte count.
10104         * g10/sign.c (hash_sigversion_to_magic): Ditto.
10105         (write_signature_packets): Request v5 sig for v5 keys.  Remove useless
10106         condition.
10107         (make_keysig_packet): Request v5 sig for v5 keys.
10108
10109 2018-10-22  Werner Koch  <wk@gnupg.org>
10110
10111         dirmngr: Prepare for updated WKD specs with ?l= param.
10112         + commit 256a280c51f9ea862e4bfb0bb530c2a96f9088f9
10113         * dirmngr/server.c (proc_wkd_get): Tack the raw local address to the
10114         request.
10115
10116         agent: Fix build regression for Windows.
10117         + commit 68b8096b6617cdad09c99d7eda2035176807e78f
10118         * agent/command-ssh.c (get_client_info): Turn client_uid into an int.
10119         Fix setting of it in case of a failed getsocketopt.
10120         * agent/command.c (start_command_handler): Fix setting of the pid and
10121         uid for Windows.
10122
10123         dirmngr: In verbose mode print the OCSP responder id.
10124         + commit 0a7f446c189201ca6e527af08b44da756b343209
10125         * dirmngr/ocsp.c (ocsp_isvalid): Print the responder id.
10126
10127 2018-10-15  Werner Koch  <wk@gnupg.org>
10128
10129         tools: Replace duplicated code in mime-maker.
10130         + commit f03928b16c4fb00077d22d8ec141575ef6d26913
10131         * tools/rfc822parse.c (HEADER_NAME_CHARS): New.  Taken from
10132         mime-maker.c.
10133         (rfc822_valid_header_name_p): New.  Based on code from mime-maker.c.
10134         (rfc822_capitalize_header_name): New.  Copied from mime-maker.c.
10135         (capitalize_header_name): Remove.  Replace calls by new func.
10136         (my_toupper, my_strcasecmp): New.
10137         * tools/mime-maker.c: Include rfc822parse.h.
10138         (HEADER_NAME_CHARS, capitalize_header_name): Remove.
10139         (add_header): Replace check and capitalization by new functions.
10140
10141 2018-10-15  NIIBE Yutaka  <gniibe@fsij.org>
10142
10143         scd: Fix signing authentication status.
10144         + commit 78f542e1f4495195db2e668f9cd41657fb1afc77
10145         * scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing.
10146
10147 2018-10-12  NIIBE Yutaka  <gniibe@fsij.org>
10148
10149         agent: Fix message for ACK button.
10150         + commit 4ed941ff26783c4fabfe2079029f8e436eb7e340
10151         * agent/divert-scd.c (getpin_cb): Display correct message.
10152
10153 2018-10-11  NIIBE Yutaka  <gniibe@fsij.org>
10154
10155         scd: Support "acknowledge button" feature.
10156         + commit 7a5a4c4cac8709f7c413e94cd0b40f4123baa1e5
10157         * scd/apdu.c (set_prompt_cb): New member function.
10158         (set_prompt_cb_ccid_reader): New function.
10159         (open_ccid_reader): Initialize with set_prompt_cb_ccid_reader.
10160         (apdu_set_prompt_cb): New.
10161         * scd/app.c (lock_app, unlock_app): Add call to apdu_set_prompt_cb.
10162         * ccid-driver.c (ccid_set_prompt_cb): New.
10163         (bulk_in): Call ->prompt_cb when timer extension.
10164         * scd/command.c (popup_prompt): New.
10165
10166         agent: Support --ack option for POPUPPINPADPROMPT.
10167         + commit 827529339a4854886dbb5625238e7e01013efdcd
10168         * agent/divert-scd.c (getpin_cb): Support --ack option.
10169
10170 2018-10-10  Werner Koch  <wk@gnupg.org>
10171
10172         gpg: Don't take the a TOFU trust model from the trustdb,
10173         + commit 150a33df41944d764621f037038683f3d605aa3f
10174         * g10/tdbio.c (tdbio_update_version_record): Never store a TOFU model.
10175         (create_version_record): Don't init as TOFU.
10176         (tdbio_db_matches_options): Don't indicate a change in case TOFU is
10177         stored in an old trustdb file.
10178
10179 2018-10-08  Werner Koch  <wk@gnupg.org>
10180
10181         gpg: Fix extra check for sign usage of a data signature.
10182         + commit b6275f3bda8edff34274c5b921508567f491ab9c
10183         * g10/sig-check.c (check_signature_end_simple):
10184
10185         gpg: Make --skip-hidden-recipients work again.
10186         + commit 79f165d7a8bcc26972712bb0f0cc554d5c3d4e42
10187         * g10/pubkey-enc.c (get_session_key): Take care of
10188         opt.skip_hidden_recipients.
10189
10190 2018-10-02  Werner Koch  <wk@gnupg.org>
10191
10192         gpg: New options import-drop-uids and export-drop-uids.
10193         + commit 8e83493dae426fe36a0e0081198b10db1e103ff1
10194         * g10/options.h (IMPORT_DROP_UIDS): New.
10195         (EXPORT_DROP_UIDS): New.
10196         * g10/import.c (parse_import_options): Add option "import-drop-uids".
10197         (import_one): Don't bail out with that options and no uids found.
10198         Also remove all uids.
10199         (remove_all_uids): New.
10200         * g10/export.c (parse_export_options): Add option "export-drop-uids".
10201         (do_export_one_keyblock): Implement option.
10202
10203 2018-10-02  NIIBE Yutaka  <gniibe@fsij.org>
10204
10205         common: Fix gnupg_reopen_std.
10206         + commit 50b02dba2060a8969da47b18d9c0ecdccbd30db4
10207         * common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat.
10208
10209 2018-09-27  NIIBE Yutaka  <gniibe@fsij.org>
10210
10211         g10,scd: Support UIF changing command.
10212         + commit 0cb65564e022fface5ada4de8e0c2c4c3d0ac8ad
10213         * g10/card-util.c (uif, cmdUIF): New.
10214         (card_edit): Add call to uif by cmdUIF.
10215         * scd/app-openpgp.c (do_getattr): Support UIF-1, UIF-2, and UIF-3.
10216         (do_setattr): Likewise.
10217         (do_learn_status): Learn UIF-1, UIF-2, and UIF-3.
10218
10219 2018-09-18  NIIBE Yutaka  <gniibe@fsij.org>
10220
10221         g10: Fix memory leak for --card-status.
10222         + commit fe8b6339542f3b1228b5fd56fc710ea3b07a3a2b
10223         * g10/card-util.c (card_status): Release memory of serial number.
10224
10225 2018-09-14  NIIBE Yutaka  <gniibe@fsij.org>
10226
10227         g10: Fix another memory leak.
10228         + commit 60c880bda5c9b821fd2968cf89c38c37be3c1a7b
10229         * g10/skclist.c (enum_secret_keys): Use SK_LIST instead of pubkey_t.
10230
10231         g10: Fix memory leak (more).
10232         + commit 2eb481e8cc1c37378cf68a06557c4a7a625d315c
10233         * g10/skclist.c (enum_secret_keys): Free SERIALNO on update.
10234
10235         g10: Fix memory leak in enum_secret_keys.
10236         + commit 64c5c45e2aa4a12d939680b9d51c8b26d61c5e9d
10237         * g10/skclist.c (enum_secret_keys): Don't forget to call
10238         free_public_key in the error return paths.
10239
10240 2018-09-11  NIIBE Yutaka  <gniibe@fsij.org>
10241
10242         Revert "dirmngr: hkp: Avoid potential race condition when some hosts die."
10243         + commit 69bab1cba07a8259b85a7911c2824724667803a4
10244         This reverts commit 04b56eff118ec34432c368b87e724bce1ac683f9.
10245
10246         dirmngr: Serialize access to hosttable.
10247         + commit 995aded58724a1a07704493b311be5222b3f82a2
10248         * dirmngr/dirmngr.h (ks_hkp_init): New.
10249         * dirmngr/dirmngr.c (main): Call ks_hkp_init.
10250         * dirmngr/ks-engine-hkp.c (ks_hkp_init): New.
10251         (ks_hkp_mark_host): Serialize access to hosttable.
10252         (ks_hkp_print_hosttable, make_host_part): Likewise.
10253         (ks_hkp_housekeeping, ks_hkp_reload): Likewise.
10254
10255 2018-09-10  NIIBE Yutaka  <gniibe@fsij.org>
10256
10257         common: Use iobuf_get_noeof to avoid undefined behaviors.
10258         + commit f80346f42df4bdc7d0a9741c3922129aceae4f81
10259         * common/iobuf.c (block_filter): Use iobuf_get_noeof.
10260
10261         agent: Fix error code check from npth_mutex_init.
10262         + commit adce73b86fd49d5bbb8884231a26cc7533d400e2
10263         * agent/call-pinentry.c (initialize_module_call_pinentry): It's an
10264         error when npth_mutex_init returns non-zero.
10265
10266 2018-09-07  Werner Koch  <wk@gnupg.org>
10267
10268         dirmngr: Emit SOURCE status also on NO_DATA.
10269         + commit bee65edfbc8cc2c369e5941cc9d1a01a0519b388
10270         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Send SOURCE status also on
10271         NO DATA error.
10272         (ks_hkp_get): Ditto.
10273         * g10/call-dirmngr.c (gpg_dirmngr_ks_search): Print "data source" info
10274         also on error.
10275         (gpg_dirmngr_ks_get): Ditto.
10276
10277 2018-09-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
10278
10279         dirmngr: hkp: Avoid potential race condition when some hosts die.
10280         + commit 04b56eff118ec34432c368b87e724bce1ac683f9
10281         * dirmngr/ks-engine-hkp.c (select_random_host): Use atomic pass
10282         through the host table instead of risking out-of-bounds write.
10283
10284 2018-09-07  NIIBE Yutaka  <gniibe@fsij.org>
10285
10286         g10: Fix memory leak.
10287         + commit 7c96cc67e108f3a9514a4222ffac2f9f9a2ab19e
10288         * g10/import.c (read_block): Call free_packet to skip the packet.
10289
10290 2018-09-06  NIIBE Yutaka  <gniibe@fsij.org>
10291
10292         gpgscm: Suppress warnings for GCC > 6.
10293         + commit 99c17b970bc0ca7e0cff7fe031c6f9feb05af3ff
10294         * tests/gpgscm/scheme.c (CASE): Use unused attribute for GCC > 6.
10295         (FALLTHROUGH): New for fallthrough.
10296         (Eval_Cycle): Use FALLTHROUGH.  Remove not-needed comment of
10297         fallthrough.
10298
10299         Fix use of strncpy, which is actually good to use memcpy.
10300         + commit 625ced6e672daa892d334323cce6b3d42a6f929f
10301         * common/ssh-utils.c (get_fingerprint): Use memcpy.
10302         * g10/build-packet.c (string_to_notation): Use memcpy.
10303
10304 2018-09-05  Werner Koch  <wk@gnupg.org>
10305
10306         kbx: Add framework for a public key daemon.
10307         + commit 512be1d04b98a9d6a9067bd34c16513089a0db9f
10308         * kbx/keyboxd.c: New.
10309         * kbx/keyboxd.h: New.
10310         * kbx/kbxserver.c: New.
10311         * kbx/keyboxd-w32info.rc: New.
10312         * kbx/Makefile.am (EXTRA_DIST): Add new rc file.
10313         (resource_objs): Ditto.
10314         (libexec_PROGRAMS): New.
10315         (common_libs, commonpth_libs): New.
10316         (kbxutil_LDADD): Use here.
10317         (keyboxd_SOURCES): New.
10318         (keyboxd_CFLAGS): New.
10319         (keyboxd_LDADD): New.
10320         (keyboxd_LDFLAGS): New.
10321         (keyboxd_DEPENDENCIES): new.
10322         ($(PROGRAMS)): Extend.
10323
10324         common: New function status_printf.
10325         + commit d4489be467e7229e17fb17a0489bf711d6ce66d6
10326         * common/asshelp2.c (set_assuan_context_func): New.
10327         (status_printf): New.
10328         * po/Makevars (XGETTEXT_OPTIONS): Add status_printf
10329
10330 2018-08-29  Werner Koch  <wk@gnupg.org>
10331
10332         gpg: Explain error message in key generation with --batch.
10333         + commit 1bfe766bcf3959135333900934f1a15c9b96c3cf
10334         * g10/keygen.c (generate_keypair): Show more info.
10335
10336         gpg: Remove unused function get_pubkeys.
10337         + commit ed8fe21e6612401846fc4af8631f0136dc633c67
10338         * g10/getkey.c (get_pubkeys): Remove.
10339         (pubkey_free): Remove and use code directly ...
10340         (pubkeys_free): ... here.
10341
10342         gpg: New option --known-notation.
10343         + commit 3da835713fb6220112d988e1953f3d84beabbf6a
10344         * g10/gpg.c (oKnownNotation): New const.
10345         (opts): Add option --known-notation.
10346         (main): Set option.
10347         * g10/parse-packet.c (known_notations_list): New local var.
10348         (register_known_notation): New.
10349         (can_handle_critical_notation): Rewrite to handle the new feature.
10350         Also print the name of unknown notations in verbose mode.
10351
10352 2018-08-28  Werner Koch  <wk@gnupg.org>
10353
10354         gpg: Refresh expired keys originating from the WKD.
10355         + commit 7f172404bfcf719b9b1af4a182d4803525ebff7c
10356         * g10/getkey.c (getkey_ctx_s): New field found_via_akl.
10357         (get_pubkey_byname): Set it.
10358         (only_expired_enc_subkeys): New.
10359         (get_best_pubkey_byname): Add support to refresh expired keys from the
10360         WKD.
10361
10362         gpg: Remove unused arg from a function.
10363         + commit db67ccb759426c1173761574b14bdfe6a76394c2
10364         * g10/getkey.c (get_best_pubkey_byname): Remove unused arg 'no_akl'.
10365         Change both callers.
10366
10367 2018-08-27  Werner Koch  <wk@gnupg.org>
10368
10369         gpg: Prepare for longer card fingerprints.
10370         + commit 108702ccae8ff1e5fec3b8e710f06a03637244c7
10371         * g10/call-agent.h (agent_card_info_s): Rename the "*valid" fields to
10372         "*len".
10373         * g10/call-agent.c (unhexify_fpr): Change to take a FPRLEN and to
10374         return the actual length.
10375         (agent_release_card_info): Adjust for these changes.
10376         * g10/card-util.c (print_sha1_fpr): Rename to print_shax_fpr and add
10377         arg FPRLEN.  Change all callers to pass the length.
10378         (print_sha1_fpr_colon): Rename to print_shax_fpr_colon and add arg
10379         FPRLEN.  Change all callers to pass the length.
10380         (fpr_is_zero): Add arg FPRLEN.
10381         (fpr_is_ff): Ditto.
10382         (show_card_key_info): Use the new functions.
10383         * g10/skclist.c (enum_secret_keys): Use MAX_FINGERPRINT_LEN.
10384
10385 2018-08-27  NIIBE Yutaka  <gniibe@fsij.org>
10386
10387         g10: Fix enum_secret_keys for card keys.
10388         + commit b823788d200902f34c632026934cf0e43152b73e
10389         * g10/skclist.c (enum_secret_keys): Since "KEY-FPR" returns
10390         fingerprint in binary, change it to hex string.
10391
10392         g10: Prefer to available card keys for decryption.
10393         + commit 84cc55880a5815155328229beb309326472bfd82
10394         * g10/skclist.c (enum_secret_keys): Add logic to prefer
10395         decryption keys on cards.
10396
10397         g10: Move enum_secret_keys to skclist.c.
10398         + commit 03a8de7def4195b9accde47c1dcb84279361936d
10399         * g10/getkey.c (enum_secret_keys): Move to...
10400         * g10/skclist.c (enum_secret_keys): ... here.
10401
10402         g10: Fix comment of enum_secret_keys.
10403         + commit 6bb93fc295e712ddf9b461dfe650211caf16a844
10404         * g10/getkey.c (enum_secret_keys): Fix comment for usage of
10405         enum_secret_keys, following the previous change.
10406
10407         g10: Enumerated keys for decryption should be unique.
10408         + commit 30153c65f0875f9a62838f6347bcdcedd6114d35
10409         * g10/getkey.c (enum_secret_keys): Collecting keys in the context,
10410         check duplicate to make sure returning only unique keys.
10411         * g10/pubkey-enc.c (get_session_key): Now, it's the responsibility of
10412         enum_secret_keys to free keys.
10413
10414         g10: Change decryption key selection for public key encryption.
10415         + commit ce2f71760155b71a71418fe145a557c99bd52290
10416         * g10/mainproc.c (struct mainproc_context): It's now pubkey_enc_list.
10417         (do_proc_packets): Remove the first arg CTRL.  Fix call of
10418         proc_pubkey_enc.
10419         (release_list): Handle pubkey_enc_list.
10420         (proc_pubkey_enc): Remove the first arg CTRL.  Simply put the packet
10421         to pubkey_enc_list.
10422         (print_pkenc_list): Remove the last arg FAILED.
10423         (proc_encrypted): Only call print_pkenc_list once.
10424         Handle DEK here.
10425         (proc_packets, proc_signature_packets, proc_signature_packets_by_fd)
10426         (proc_encryption_packets): Fix call of do_proc_packets.
10427         * g10/packet.h (struct pubkey_enc_list): Define.
10428         * g10/pubkey-enc.c (get_it): Change the second argument K.
10429         (get_session_key): Select session key by LIST, using enum_secret_keys.
10430         * g10/gpgv.c (get_session_key): Change the second argument K.
10431         * g10/test-stubs.c (get_session_key): Likewise.
10432
10433 2018-08-10  NIIBE Yutaka  <gniibe@fsij.org>
10434
10435         g10: Fix undefined behavior when EOF in parsing packet for S2K.
10436         + commit 1b309d9f6199a91caa0ca0b97b92d599e00b736e
10437         * g10/parse-packet.c (parse_symkeyenc): Use iobuf_get_noeof.
10438         (parse_key): Likewise.
10439
10440 2018-07-27  Werner Koch  <wk@gnupg.org>
10441
10442         gpg: Set a limit for a WKD import of 256 KiB.
10443         + commit e88f56f1937ac92f6a3b94e50b6db2649ec0be41
10444         * g10/call-dirmngr.c (MAX_WKD_RESULT_LENGTH): New.
10445         (gpg_dirmngr_wkd_get): Use it.
10446
10447         dirmngr: Validate SRV records in WKD queries.
10448         + commit ebe727ef596eefebb5eff7d03a98649ffc7ae3ee
10449         * dirmngr/server.c (proc_wkd_get): Check the returned SRV record names
10450         to mitigate rogue DNS servers.
10451
10452         common: New function to validate domain names.
10453         + commit ddee9f9409fb5a089883eab0fadef7b9b7e61e72
10454         * common/mbox-util.c (is_valid_domain_name): New.
10455         * common/t-mbox-util.c (run_dns_test): New test.
10456
10457 2018-07-26  Jiří Keresteš  <jiri.kerestes@trustica.cz>
10458
10459         scd: Add support for Trustica Cryptoucan.
10460         + commit 967d3649d24aba623133808e8d01675dff389fbb
10461
10462
10463 2018-07-25  Werner Koch  <wk@gnupg.org>
10464
10465         dirmngr: Print a WARNING status for DNS config problems.
10466         + commit bd4048c533165fd82340354d7229fcc2220db5a5
10467         * dirmngr/dirmngr-status.h: New.
10468         * dirmngr/dirmngr.h: Include dirmngr-status.h and move some prototypes
10469         to that file.
10470         * dirmngr/t-support.c: New.
10471         * dirmngr/Makefile.am (dirmngr_SOURCES): Add dirmngr-status.h.
10472         (t_common_src): Add t-support.c.
10473         * dirmngr/server.c (dirmngr_status_printf): Bypass if CTRL is NULL.
10474         * dirmngr/dns-stuff.c: Include dirmngr-status.h.
10475         (libdns_init): Print WARNING status line.  Change call callers to take
10476         and pass a CTRL argument.
10477         * g10/call-dirmngr.c (ks_status_cb): Print info for new WARNING
10478         status.
10479
10480 2018-07-24  Werner Koch  <wk@gnupg.org>
10481
10482         gpg: Use 128 MiB as default AEAD chunk size.
10483         + commit 9aa1b368efd4edf51b6d056339bffb726de5162b
10484         * g10/gpg.c (oDebugAllowLargeChunks): New.
10485         (opts): New option --debug-allow-large-chunks.
10486         (main): Implement that option.
10487
10488 2018-07-09  Werner Koch  <wk@gnupg.org>
10489
10490         gpg: Remove multiple subkey bindings during export-clean.
10491         + commit 76989d5bd89ed11f5b3656dc4748fcfc939a46dc
10492         * g10/key-clean.c (clean_one_subkey_dupsigs): New.
10493         (clean_all_subkeys): Call it.
10494
10495         gpg: Let export-clean remove expired subkeys.
10496         + commit c2fd65ec8498a08ee36ca52d99b6b014f6db8d93
10497         * g10/key-clean.h (KEY_CLEAN_NONE, KEY_CLEAN_INVALID)
10498         (KEY_CLEAN_ENCR, KEY_CLEAN_AUTHENCR, KEY_CLEAN_ALL): New.
10499         * g10/key-clean.c (clean_one_subkey): New.
10500         (clean_all_subkeys): Add arg CLEAN_LEVEL.
10501         * g10/import.c (import_one): Call clean_all_subkeys with
10502         KEY_CLEAN_NONE.
10503         * g10/export.c (do_export_stream): Call clean_all_subkeys depedning on
10504         the export clean options.
10505
10506         gpg: Split key cleaning function for clarity.
10507         + commit 6c3567196f7e72552f326ce07dccbcce31926e5d
10508         * g10/key-clean.c (clean_key): Rename to clean_all_uids and split
10509         subkey cleaning into ...
10510         (clean_all_subkeys): new.  Call that always after the former clean_key
10511         invocations.
10512
10513 2018-07-06  Werner Koch  <wk@gnupg.org>
10514
10515         gpg: Move key cleaning functions to a separate file.
10516         + commit 135e46ea480d749b8a9692f71d4d0bfdadd8ee2f
10517         * g10/trust.c (mark_usable_uid_certs, clean_sigs_from_uid)
10518         (clean_uid_from_key, clean_one_uid, clean_key): Move to ...
10519         * g10/key-clean.c: new file.
10520         * g10/key-clean.h: New.
10521         * g10/Makefile.am (gpg_sources): Add new files.
10522         * g10/export.c, g10/import.c, g10/keyedit.c, g10/trustdb.c: Include
10523         new header.
10524         * g10/trustdb.h (struct key_item, is_in_klist): Move to ...
10525         * g10/keydb.h: here.
10526
10527 2018-07-05  Werner Koch  <wk@gnupg.org>
10528
10529         po: Add flag options for xgettext.
10530         + commit cb71573f376235036c98143155e964a15cfcb250
10531         * po/Makevars (XGETTEXT_OPTIONS): Add --flag options.
10532
10533         gpg: Prepare for signatures with ISSUER_FPR but without ISSUER.
10534         + commit f7526c7bc754acf68bde0b79c785e875a9365d60
10535         * g10/getkey.c (get_pubkey_for_sig): New.
10536         (get_pubkeyblock_for_sig): New.
10537         * g10/mainproc.c (issuer_fpr_raw): Give global scope.
10538         (check_sig_and_print): Use get_pubkeyblock_for_sig.
10539         * g10/pkclist.c (check_signatures_trust): Use get_pubkey_for_sig.
10540         * g10/sig-check.c (check_signature2): Ditto.
10541         (check_signature_over_key_or_uid): Ditto.
10542
10543         tools: Add experimental code for a pairing protocol.
10544         + commit faf3c70c7715ba86eb56fdccc6cf831bf87b2ee0
10545         * configure.ac (GNUPG_CACHE_DIR): New const.
10546         * tools/Makefile.am (libexec_PROGRAMS): Add gpg-pair-tool.
10547         (gpg_pair_tool_SOURCES, gpg_pair_tool_CFLAGS)
10548         (gpg_pair_tool_LDADD): New.
10549         * tools/gpg-pair-tool.c: New.
10550
10551 2018-07-04  Werner Koch  <wk@gnupg.org>
10552
10553         gpg: Ignore too large user ids during import.
10554         + commit 01cd66f9faf1623833e6afac84164de5a136ecff
10555         * g10/import.c (read_block): Add special treatment for bad user ids
10556         and comment packets.
10557
10558         gpg: Extra check for sign usage when verifying a data signature.
10559         + commit 214b0077264e35c079e854a8b6374704aea45cd5
10560         * g10/sig-check.c (check_signature_end_simple): Check sign usage.
10561
10562 2018-07-03  NIIBE Yutaka  <gniibe@fsij.org>
10563
10564         g10: Fix memory leak for PKT_signature.
10565         + commit 996febbab21eb9283b0634e51303a36b318734a6
10566         * g10/getkey.c (buf_to_sig): Free by free_seckey_enc.
10567         * g10/gpgcompose.c (signature): Likewise.
10568         * g10/sign.c (write_signature_packets): Likewise.
10569
10570 2018-07-02  Werner Koch  <wk@gnupg.org>
10571
10572         agent: New commands PUT_SECRET and GET_SECRET.
10573         + commit 8a915cd9faf052b4faa3c415f2ac5aa8d6ea1efe
10574         * agent/agent.h (CACHE_MODE_DATA): New const.
10575         * agent/cache.c (DEF_CACHE_TTL_DATA): new.
10576         (housekeeping): Tweak for CACHE_MODE_DATA.
10577         (cache_mode_equal): Ditto.
10578         (agent_get_cache): Ditto.
10579         (agent_put_cache): Implement CACHE_MODE_DATA.
10580         * agent/command.c (MAXLEN_PUT_SECRET): New.
10581         (parse_ttl): New.
10582         (cmd_get_secret): New.
10583         (cmd_put_secret): New.
10584         (register_commands): Register new commands.
10585
10586         common: New function percent_data_escape.
10587         + commit 58baf40af641f8cbf597e508a292e85ae94688f1
10588         * common/percent.c (percent_data_escape): New.
10589         * common/t-percent.c (test_percent_data_escape): New.
10590
10591         agent: Fix segv running in --server mode.
10592         + commit 3978df943dc7a4781a23382be2d3b4a96a04f71f
10593         * agent/command.c (start_command_handler): Do not write to
10594         CLIENT_CREDS after an error.
10595
10596 2018-07-02  NIIBE Yutaka  <gniibe@fsij.org>
10597
10598         libdns: For SOCKS connection, just fails.
10599         + commit 1aacd12471935a354cfd85ee1805edc7eb16e6c5
10600         * dirmngr/dns.c (dns_res_exec): If it's DNS_SO_SOCKS_CONN, don't
10601         iterate to other server, but return the error immediately.
10602
10603 2018-06-21  Werner Koch  <wk@gnupg.org>
10604
10605         gpg: Print revocation reason for "rev" records.
10606         + commit 592deeddb9bf4ae9b3e236b439e2f39644eb6d46
10607         * g10/main.h: Add prototype.
10608         * g10/keylist.c (list_keyblock_print): Print revocation info.
10609         (list_keyblock_colon): Ditto.
10610
10611         * g10/test-stubs.c (get_revocation_reason): New stub.
10612         * g10/gpgv.c (get_revocation_reason): New stub.
10613
10614         gpg: Print revocation reason for "rvs" records.
10615         + commit b7cd2c2093ae1b47645be50fa1d431a028187cad
10616         * g10/import.c (get_revocation_reason): New.
10617         (list_standalone_revocation): Extend function.
10618
10619         gpg: Let --show-keys print revocation certificates.
10620         + commit 386b9c4f25b28fd769d7563f2d86ac3a19cc3011
10621         * g10/import.c (list_standalone_revocation): New.
10622         (import_revoke_cert): Call new function.
10623
10624         build: Remove duplicates from AC_CHECK_FUNCS.
10625         + commit 7e9aa307f76cdf2f624d43a35a8266e8b4e473f9
10626         * configure.ac (AC_CHECK_FUNCS): Fold most calls into one.
10627
10628 2018-06-20  NIIBE Yutaka  <gniibe@fsij.org>
10629
10630         libdns: Let kernel to decide the local port.
10631         + commit 861f1da0731bf29dcb9221c4f22c76b40ec15a78
10632         * dirmngr/dns.c (LEAVE_SELECTION_OF_PORT_TO_KERNEL): New.
10633         (dns_socket): Don't select ephemeral port in user space.
10634
10635 2018-06-19  Werner Koch  <wk@gnupg.org>
10636
10637         wks: Take name of sendmail from configure.
10638         + commit 08147f8bbdca40c98c2a094fa48fab15b8339c80
10639         * configure.ac (NAME_OF_SENDMAIL): New ac_define.
10640         * tools/send-mail.c (run_sendmail): Use it.
10641
10642 2018-06-18  NIIBE Yutaka  <gniibe@fsij.org>
10643
10644         libdns: Fix for non-FQDN hostname.
10645         + commit a4a054bf14fa855715faee01a152755c4e2a74f7
10646         * dirmngr/dns.c (dns_resconf_open): Clear search[0] for non-FQDN
10647         hostname.
10648
10649 2018-06-15  NIIBE Yutaka  <gniibe@fsij.org>
10650
10651         libdns: Fix connect and try next nameserver when ECONNREFUSED.
10652         + commit bcdbf8b8ebe9d61160e0b007dabe1b6462ffbc93
10653         * dirmngr/dns.c (dns_so_check): When EINVAL, release the association
10654         by connect with AF_UNSPEC and try again.  Also try again for
10655         ECONNREFUSED.
10656         (dns_res_exec): Try next nameserver when ECONNREFUSED.
10657
10658         libdns: Clear struct sockaddr_storage by zero.
10659         + commit 1c0b6681e4f322b88ac35d1f21c03d3cfc35fc23
10660         * dirmngr/dns.c (dns_resconf_pton): Clear SS.
10661         (dns_resconf_setiface): Clear ->IFACE.
10662         (dns_hints_root, send_query): Clear SS.
10663
10664 2018-06-14  NIIBE Yutaka  <gniibe@fsij.org>
10665
10666         libdns: Sync to upstream.
10667         + commit 3e6ad302eaf3a4a9f3e60379133b3dfdbe0e1b2d
10668         * dirmngr/dns.c (dns_nssconf_loadfile): Handle exclamation mark.
10669
10670         dirmngr: Fix recursive resolver mode.
10671         + commit 5b40338f12762cd74238c2d2b3101c33dd2d0ed3
10672         * dirmngr/dns-stuff.c (libdns_init): Initialize options.recurse.
10673
10674 2018-06-12  Werner Koch  <wk@gnupg.org>
10675
10676         Some preparations to eventuallt use gpgrt_argparse.
10677         + commit cb52eb76b3ba0269742c5322e10a2b5151dafaf2
10678         * configure.ac (GNUPG_DEF_COPYRIGHT_LINE: New.
10679         * tools/watchgnupg.c (print_version): USe this macro.
10680         * common/init.c (_init_common_subsystems): Register argparse
10681         functions.
10682
10683         Require libgpg-error 1.29 and remove internal logging functions.
10684         + commit 440472663d608660343c54f09172c851f5127c9c
10685         * configure.ac (NEED_GPG_ERROR_VERSION): Set to 1.29
10686         * common/util.h: Remove replacement error codes.
10687         * common/logging.h: Remove fallback to internal logging functions.
10688         * common/logging.c: Remove.
10689         * common/Makefile.am (common_sources): Remove logging.c
10690
10691         gpg: Do not import revocations with --show-keys.
10692         + commit fe621cc64b13b00914633630f28b4b417892d629
10693         * g10/import.c (import_revoke_cert): Add arg 'options'.  Take care of
10694         IMPORT_DRY_RUN.
10695
10696 2018-06-12  NIIBE Yutaka  <gniibe@fsij.org>
10697
10698         card: Fix memory leak for fetch-url sub command.
10699         + commit 8f99299a54a0ac09f9c90c1085b704db78973fda
10700         * g10/card-util.c (fetch_url): Release INFO.
10701
10702 2018-06-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
10703
10704         gpg: Add new usage option for drop-subkey filters.
10705         + commit 2ddfb5bef920919443309ece9fa2930282bbce85
10706         * g10/import.c (impex_filter_getval): Add new "usage" property for
10707         drop-subkey filter.
10708
10709 2018-06-11  Werner Koch  <wk@gnupg.org>
10710
10711         gpg: Set some list options with --show-keys.
10712         + commit d2bc66f241a66cc95140cbb3a07555f6301290ed
10713         * g10/gpg.c (main): Set some list options.
10714
10715 2018-06-08  Werner Koch  <wk@gnupg.org>
10716
10717         gpg: Sanitize diagnostic with the original file name.
10718         + commit 13f135c7a252cc46cff96e75968d92b6dc8dce1b
10719         * g10/mainproc.c (proc_plaintext): Sanitize verbose output.
10720
10721 2018-06-07  Werner Koch  <wk@gnupg.org>
10722
10723         gpg: Improve import's repair-key duplicate signature detection.
10724         + commit 26746fe65d14a00773473c2d0d271406a5105bca
10725         * g10/key-check.c (key_check_all_keysigs): Factor some code out to ...
10726         (remove_duplicate_sigs): new.
10727         (key_check_all_keysigs): Call remove_duplicate_sigs again after
10728         reordering.
10729
10730         gpg: Fix import's repair-key duplicate signature detection.
10731         + commit 26bce2f01d2029ea2b8a8dbbe36118e3c83c5cba
10732         * g10/packet.h (PKG_siganture): Add field 'help_counter'.
10733         * g10/key-check.c (sig_comparison): Take care of HELP_COUNTER.
10734         (key_check_all_keysigs): De-duplicate on a per-block base.
10735
10736         gpg: Improve verbose output during import.
10737         + commit 1bc6b5174248ba4d83d648ef6d6f4550540d1f20
10738         * g10/import.c (chk_self_sigs): Print the subkeyid in addition to the
10739         keyid.
10740         (delete_inv_parts): Ditto.
10741
10742 2018-06-06  Werner Koch  <wk@gnupg.org>
10743
10744         agent: Add DBUS_SESSION_BUS_ADDRESS et al. to the startup list.
10745         + commit 7ffc1ac7dd95d4cc1897a4c36d5cd628741c12f2
10746         * agent/gpg-agent.c (agent_copy_startup_env): Replace explicit list
10747         with the standard list.
10748
10749         gpg: Also detect a plaintext packet before an encrypted packet.
10750         + commit 344b548dc71657d0285d93f78f17a2663b5e586f
10751         * g10/mainproc.c (proc_encrypted): Print warning and later force an
10752         error.
10753
10754         gpg: New command --show-keys.
10755         + commit 257661d6ae0ca376df758c38fabab2316d10e3a9
10756         * g10/gpg.c (aShowKeys): New const.
10757         (opts): New command --show-keys.
10758         (main): Implement command.
10759         * g10/import.c (import_keys_internal): Don't print stats in show-only
10760         mode.
10761         (import_one): Be silent in show-only mode.
10762
10763 2018-06-05  NIIBE Yutaka  <gniibe@fsij.org>
10764
10765         g10: Remove bogus comment.
10766         + commit d2e6b3ea1d70db1039a828fb3a978a4504f8f0c5
10767         * g10/mainproc.c (proc_pubkey_enc): Remove a comment.
10768
10769 2018-05-31  Werner Koch  <wk@gnupg.org>
10770
10771         gpg: Print a hint on how to decrypt a non-mdc message anyway.
10772         + commit 874e391665405fc413a69f2ffacdb94bb08da7ff
10773         * g10/mainproc.c (proc_encrypted): Print a hint for legacy ciphers w/o
10774         MDC.  Also print a dedicated status error code
10775
10776 2018-05-30  Werner Koch  <wk@gnupg.org>
10777
10778         gpg: Ignore the multiple message override options.
10779         + commit d3d41146b33040eb65eaaaffcfc7b4211e60bd95
10780         * g10/gpg.c (oAllowMultisigVerification)
10781         (oAllowMultipleMessages, oNoAllowMultipleMessages): Remove.
10782         (opts): Turn --allow-multisig-verification, --allow-multiple-messages
10783         and --no-allow-multiple-messages into NOPs
10784         * g10/options.h (struct opt): Remove flags.allow_multiple_messages.
10785         * g10/mainproc.c (proc_plaintext): Assume allow_multiple_messages is
10786         false.
10787
10788         gpg: Detect multiple literal plaintext packets more reliable.
10789         + commit 97183b5c0fae05fcda942caa7df14ee6a133d846
10790         * g10/mainproc.c (proc_encrypted): Bump LITERALS_SEEN.
10791
10792 2018-05-29  Werner Koch  <wk@gnupg.org>
10793
10794         gpg: Remove PGP6 compliance mode.
10795         + commit b2c05d691247a79fb46f75b653cbc4bf518c1c2a
10796         * g10/gpg.c: Make --pgp6 an alias for --pgp7.
10797         * common/compliance.h (gnupg_compliance_mode): Remove CO_PGP6.
10798         * g10/options.h (PGP6): Remove.  Adjust all users.
10799
10800         gpg: Remove MDC options.
10801         + commit 253e8bdd9014cbe6dc06adce9d9dd2f8f4b31709
10802         * g10/gpg.c: Tuen options --force-mdc, --no-force-mdc, --disable-mdc
10803         and --no-disable-mdc into NOPs.
10804         * g10/encrypt.c (use_mdc): Simplify.  MDC is now almost always used.
10805         (use_aead): Ignore MDC options. Print warning for missing MDC feature
10806         flags.
10807         * g10/pkclist.c (warn_missing_mdc_from_pklist): Rename to ...
10808         (warn_missing_aead_from_pklist): this and adjust.
10809
10810         gpg: Fix detection of the AEAD feature flag.
10811         + commit af4a5dbe575f304838db358aaeb45741f149d0a7
10812         * g10/getkey.c (fixup_uidnode): Use bitmask 0x02.
10813
10814 2018-05-15  Werner Koch  <wk@gnupg.org>
10815
10816         gpg: Hard fail on a missing MDC even for legacy algorithms.
10817         + commit d1431901f0143cdc7af8d1a23387e0c6b5bb613f
10818         * g10/mainproc.c (proc_encrypted): Require an MDC or AEAD
10819         * tests/openpgp/defs.scm (create-gpghome): Use --ignore-mdc-error to
10820         allow testing with the current files.
10821
10822         gpg: Turn --no-mdc-warn into a NOP.
10823         + commit 96350c5d5afcbc7f66c535e38b9fcc7355622855
10824         * g10/gpg.c (oNoMDCWarn): Remove.
10825         (opts): Make --no-mdc-warn a NOP.
10826         (main): Don't set var.
10827         * g10/options.h (struct opt): Remove 'no_mdc_var'.
10828         * g10/cipher-cfb.c (write_header): Assume opt.no_mdc_warn is false.
10829         * g10/mainproc.c (proc_encrypted): Ditto.
10830
10831 2018-05-07  Ineiev  <ineiev@gnu.org>
10832
10833         doc: Update description of displayed trust values.
10834         + commit ed12a1dabaf928e8620fc26ca426c935e1a8a880
10835         * doc/trust-values.texi: New file.
10836         * doc/Makefile.am (EXTRA_DIST): Add trust-values.texi.
10837         * doc/gnupg.texi (Trust Values): New chapter.
10838         * doc/gpg.texi (OpenPGP Key Management): Update the description
10839         of how trust values are displayed, replace table with a reference
10840         to Trust Values.
10841         * doc/gpg.texi (GPG Examples): Add @mansect trust values.
10842
10843 2018-05-02  Werner Koch  <wk@gnupg.org>
10844
10845         Release 2.2.7.
10846         + commit d31d149196832ed6b8849017d8bcd0852c6ca96c
10847
10848
10849         gpg: Fix minor memory leak in the compress filter.
10850         + commit d26363e4f1933781c86cbe87077fbf1b9a2b64d8
10851         * g10/compress.c (push_compress_filter2): Return an error if no filter
10852         was pushed.
10853         (push_compress_filter): Ditto.
10854         (handle_compressed): Free CFX if no filter was pushed.
10855         * g10/import.c (read_block): Ditto.
10856
10857         gpg: Fix "Too many open files" when using --multifile.
10858         + commit f7f3043653abe699602f910ddd09c1405675c7f6
10859         * common/miscellaneous.c (is_file_compressed): Don't cache the file.
10860
10861         dirmngr: Implement timeout for dirmngr_ldap under Windows.
10862         + commit 007dde93cc3971cb51d08e8c082e172506ae7f80
10863         * dirmngr/dirmngr_ldap.c (alarm_thread) [W32]: New.
10864         (set_timeout): Implement for W32.
10865
10866         build: New configure option to help with nPth debugging.
10867         + commit ddfd39e91a532fd31cd0c20c5d4cf9643acc58bd
10868         * configure.ac: Add option --enable-npth-debug
10869
10870 2018-05-02  Andre Heinecke  <aheinecke@intevation.de>
10871
10872         common,w32: Hide spawned processes by default.
10873         + commit 3bd793256e2e4be52075d50ccf2df70c4a2e1a0f
10874         * common/exechelp-w32.c (gnupg_spawn_process): Use SW_HIDE
10875         instead of SW_MINIMIZE.
10876
10877 2018-04-30  Werner Koch  <wk@gnupg.org>
10878
10879         dirmngr: Sleep in the ldap wrapper thread.
10880         + commit a598bbeeafa30f7854230eed212b76d5c5c77f86
10881         * dirmngr/ldap-wrapper.c (wrapper_list): Rename to reaper_list.
10882         (ldap_reaper_thread): Protect all list modification with a mutex.  Use
10883         a condition var to wake up the reaper thread.
10884
10885 2018-04-27  Werner Koch  <wk@gnupg.org>
10886
10887         dirmngr: Use the LDAP wrapper process also for Windows.
10888         + commit f9fbfc64e402bd41815a68426f55565fa6d5c726
10889         * dirmngr/ldap-wrapper.c: Revamp module to make use of es_poll for
10890         portability.
10891         * configure.ac: Always use the ldap wrapper.
10892
10893         dirmngr: Silence log output from dirmngr_ldap.
10894         + commit d22506a343cec61b7d1a48c970b63a8458b267ab
10895         * dirmngr/dirmngr_ldap.c: Remove assert.h.
10896         (main): Replace assert by log_assert.
10897         * dirmngr/ldap.c (run_ldap_wrapper): Use debug options to pass
10898         verbose options to dirmngr_ldap.
10899         (start_cert_fetch_ldap): Ditto.
10900
10901 2018-04-26  Werner Koch  <wk@gnupg.org>
10902
10903         dirmngr: Lower the dead host resurrection time to 1.5h.
10904         + commit 5789afc840cf79ba2a8cebd9d772ef9c3868c5e9
10905         * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): Decrease.
10906         (INITIAL_HOSTTABLE_SIZE): Increase because the old values was likely
10907         for development.
10908
10909         dirmngr: Fix handling of CNAMEed keyserver pools.
10910         + commit cc66108253c58583d6bad3d1e2da2b004701d0f0
10911         * dirmngr/ks-engine-hkp.c (map_host): Don't use the cname for HTTPHOST.
10912         * dirmngr/server.c (make_keyserver_item): Map keys.gnupg.net.
10913
10914 2018-04-25  Werner Koch  <wk@gnupg.org>
10915
10916         dirmngr: Add the used TLS library to the debug output.
10917         + commit bb8894760fe87cf46a42599f11eab7e7c7a8eb71
10918         * dirmngr/http.c (send_request): Print the used TLS library in debug
10919         mode.
10920
10921         dirmngr: Allow redirection from https to http for CRLs.
10922         + commit 1de4462974113ac18cf98f903e97cd1127fa842f
10923         * dirmngr/ks-engine.h (KS_HTTP_FETCH_NOCACHE): New flag.
10924         (KS_HTTP_FETCH_TRUST_CFG): Ditto.
10925         (KS_HTTP_FETCH_NO_CRL): Ditto.
10926         (KS_HTTP_FETCH_ALLOW_DOWNGRADE): Ditto.
10927         * dirmngr/ks-engine-http.c (ks_http_fetch): Replace args send_no_cache
10928         and extra_http_trust_flags by a new flags arg.  Allow redirectiong
10929         from https to http it KS_HTTP_FETCH_ALLOW_DOWNGRADE is set.
10930         * dirmngr/loadswdb.c (fetch_file): Call with KS_HTTP_FETCH_NOCACHE.
10931         * dirmngr/ks-action.c (ks_action_get): Ditto.
10932         (ks_action_fetch): Ditto.
10933         * dirmngr/crlfetch.c (crl_fetch): Call with the appropriate flags.
10934
10935         dirmngr: Implement CRL fetching via https.
10936         + commit 705d8e9cf0d109005b3441766270c0e584f7847d
10937         * dirmngr/http.h (HTTP_FLAG_TRUST_CFG): New flag.
10938         * dirmngr/http.c (http_register_cfg_ca): New.
10939         (http_session_new) [HTTP_USE_GNUTLS]: Implement new trust flag.
10940         * dirmngr/certcache.c (load_certs_from_dir): Call new function.
10941         (cert_cache_deinit): Ditto.
10942         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
10943         * dirmngr/ks-engine-http.c (ks_http_fetch): Add new args
10944         'send_no_cache' and 'extra_http_trust_flags'.  Change all callers to
10945         provide the default value.
10946         * dirmngr/crlfetch.c (crl_fetch): Rewrite to make use of
10947         ks_http_fetch.
10948
10949 2018-04-25  NIIBE Yutaka  <gniibe@fsij.org>
10950
10951         g10: Fix printing the keygrip with --card-status.
10952         + commit 71903eee89496e3f1d0a24536bced6ff16df6783
10953         * g10/card-util.c (current_card_status): Keygrip for Auth is 3.
10954
10955 2018-04-24  Werner Koch  <wk@gnupg.org>
10956
10957         dirmngr: Fallback to CRL if no default OCSP responder is configured.
10958         + commit 460e3812be711bd18195053d74aa736215f21eee
10959         * dirmngr/server.c (cmd_isvalid): Use option second arg to trigger
10960         OCSP checkibng.  Fallback to CRL if no default OCSP responder has been
10961         configured.
10962         * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Adjust accordingly.
10963
10964 2018-04-20  Andre Heinecke  <aheinecke@intevation.de>
10965
10966         dirmngr: More binary I/O on Windows for CRLs.
10967         + commit 64c1fddb253061a9773c6c4ed2a9c5a54702d21b
10968         * dirmngr/crlcache.c (lock_db_file, crl_cache_insert): Open cache
10969         file in binary mode.
10970
10971         doc: Remove unneccesary empty flags in vsndf.prf.
10972         + commit a44ed3d9a1ad5bd96694f10ea5523c517982017e
10973         * doc/examples/vsnfd.prf (max-cache-ttl): Remove empty flags.
10974
10975 2018-04-16  emma peel  <emma.peel@aktivix.org>
10976
10977         po: more updates to Spanish translation.
10978         + commit acd6d5ff7436bb7fba171ced3294046a14fb777d
10979
10980
10981         po: correct attribution for Spanish translation.
10982         + commit 21b2e88a7e6c3d7313773c9ffb3e0d1fb2af45df
10983
10984
10985         po: correct label tags in Polish translation.
10986         + commit a5290dace7f85d66272af3e14f9f2bc43d2a4af8
10987
10988
10989         po: correct label tags in Finnish translation.
10990         + commit e12475429578add12a53fb2232cb45dc9e2aae1b
10991
10992
10993 2018-04-15  Werner Koch  <wk@gnupg.org>
10994
10995         build: New target "release" to automate the release process.
10996         + commit 3b1ee413a65bf566aa8e5f29a5a2cd5a94e66faa
10997         * Makefile.am (RELEASE_ARCHIVE_DIR): New.
10998         (RELEASE_SIGNING_KEY): New.
10999         (AM_DISTCHECK_CONFIGURE_FLAGS): Remove removed --enable-gpg2-is-gpg,
11000         (RELEASE_NAME, RELEASE_W32_STEM_NAME): New.
11001         (release, sign-release): New.
11002
11003 2018-04-13  NIIBE Yutaka  <gniibe@fsij.org>
11004
11005         g10: Fix memory leak in check_sig_and_print.
11006         + commit f747b8f0734338baa1e608b193b213aca2c577e8
11007         * g10/mainproc.c (check_sig_and_print): Free the public key.
11008
11009         g10: Push compress filter only if compressed.
11010         + commit c31abf84659dbda5503dd9f3aa3449520bcd1b84
11011         * g10/compress.c (handle_compressed): Fix memory leak.
11012
11013 2018-04-12  Werner Koch  <wk@gnupg.org>
11014
11015         gpg: Extend the "sig" record in --list-mode.
11016         + commit 69c3e7acb744e1e5606a4d946e3b948704cfbbae
11017         * g10/getkey.c (get_user_id_string): Add arg R_NOUID.  Change call
11018         callers.
11019         (get_user_id): Add arg R_NOUID.  Change call callers.
11020         * g10/mainproc.c (issuer_fpr_string): Make global.
11021         * g10/keylist.c (list_keyblock_colon): Print a '?' for a missing key
11022         also in --list-mode.  Print the "issuer fpr" field also if there is an
11023         issuer fingerprint subpacket.
11024
11025         gpg: Extend the ERRSIG status line with a fingerprint.
11026         + commit 23a714598c247d78cfda46a6dc338b17e17cc194
11027         * g10/mainproc.c (issuer_fpr_raw): New.
11028         (issuer_fpr_string): Re-implement using issuer_fpr_rtaw.
11029         (check_sig_and_print): Don't free ISSUER_FPR.  Use ISSUER_FPR_RAW.
11030         Use write_status_printf.  Extend ERRSIG status.
11031
11032         gpg: Relax printing of STATUS_FAILURE.
11033         + commit e2bd152a928d79ddfb95fd2f7911c80a1a8d5a21
11034         * g10/gpg.c (g10_exit): Print STATUS_FAILURE only based on passed
11035         return code and not on the presence of any call to log_error.
11036
11037         agent,dirmngr: Add "getenv" to the getinfo command.
11038         + commit bbb5bfacc0d1f179cfec94fd32fee01a09df0f1d
11039         * agent/command.c (cmd_getinfo): Add sub-command getenv.
11040         * dirmngr/server.c (cmd_getinfo): Ditto.
11041
11042 2018-04-12  Andre Heinecke  <aheinecke@intevation.de>
11043
11044         build: Update getswdb version check to 2.2.
11045         + commit 327fece0aed2c9974659c72304f9fd1f461d460c
11046         * build-aux/getswdb.sh: Check for gnupg22_ver gnupg21_ver no
11047         longer exists.
11048
11049 2018-04-11  Werner Koch  <wk@gnupg.org>
11050
11051         gpg: New option --no-symkey-cache.
11052         + commit 789d240cb40ab36406a7c57ad49897e0bafbb41e
11053         * g10/gpg.c (oNoSymkeyCache): New.
11054         (opts): Add that option.
11055         (main): Set var.
11056         * g10/options.h (struct opt): New field no_symkey_cache.
11057         * g10/passphrase.c (passphrase_to_dek): Implement that feature.
11058
11059 2018-04-10  Werner Koch  <wk@gnupg.org>
11060
11061         agent: Improve the unknown ssh flag detection.
11062         + commit 9f69dbeb902ac447adbc92937cd451c4e909f234
11063         * agent/command-ssh.c (ssh_handler_sign_request): Simplify detection
11064         of flags.
11065
11066 2018-04-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11067
11068         agent: unknown flags on ssh signing requests cause an error.
11069         + commit 381c46818ffa4605d0ca39818fe317de445eb6de
11070         * agent/command-ssh.c (ssh_handler_sign_request): if a flag is passed
11071         during an signature request that we do not know how to apply, return
11072         GPG_ERR_UNKNOWN_OPTION.
11073
11074         agent: change documentation reference for ssh-agent protocol.
11075         + commit 55435cdd4fe4fbfbcba1098bb715ecd6171ba2d8
11076         * agent/command-ssh.c: repoint documentation reference.
11077
11078 2018-04-09  Werner Koch  <wk@gnupg.org>
11079
11080         Release 2.2.6.
11081         + commit 6fbe2ddbaf5123ae444c95fdf8da67840f794c76
11082
11083
11084         gpg,w32: Fix empty homedir when only a drive letter is used.
11085         + commit 6da7aa1e7c80d214bd9dccb21744919ae191f2c8
11086         * common/homedir.c (copy_dir_with_fixup): New.
11087         (default_homedir): Use here.
11088         (gnupg_set_homedir): And here .
11089
11090         doc: Document --key-edit:change-usage.
11091         + commit a4e26f2ee852003707857ab0635b783acb89a2f8
11092         * g10/keyedit.c (menu_changeusage): Make strings translatable.
11093
11094 2018-04-06  Werner Koch  <wk@gnupg.org>
11095
11096         gpg: Check that a key may do certifications.
11097         + commit 1a5d95e7319e7e6f0dd11064a26cbbc371b05214
11098         * g10/sig-check.c (check_signature_end_simple): Check key usage for
11099         certifications.
11100         (check_signature_over_key_or_uid): Request usage certification.
11101
11102         gpg: Emit FAILURE stati now in almost all cases.
11103         + commit 0336e5d1a7b9d46e06c838e6a98aecfcc9542882
11104         * g10/cpr.c (write_status_failure): Make it print only once.
11105         * g10/gpg.c (wrong_args): Bump error counter.
11106         (g10_exit): Print a FAILURE status if we ever did a log_error etc.
11107         (main): Use log_error instead of log_fatal at one place.  Print a
11108         FAILURE status for a bad option.  Ditto for certain exit points so
11109         that we can see different error locations.
11110
11111         gpg: Re-indent sig-check.c and use signature class macros.
11112         + commit 5ba74a134db431530884f03eea5410a68dbfe0f5
11113         * g10/keydb.h (IS_BACK_SIG): New.
11114         * g10/sig-check.c: Re-indent and use macros.
11115
11116 2018-04-06  NIIBE Yutaka  <gniibe@fsij.org>
11117
11118         agent: Support SSH signature flags.
11119         + commit 80b775bdbb852aa4a80292c9357e5b1876110c00
11120         * agent/command-ssh.c (SSH_AGENT_RSA_SHA2_256): New.
11121         (SSH_AGENT_RSA_SHA2_512): New.
11122         (ssh_handler_sign_request): Override SPEC when FLAGS
11123         is specified.
11124
11125 2018-04-05  NIIBE Yutaka  <gniibe@fsij.org>
11126
11127         g10: Let card-edit/key-attr show message when change.
11128         + commit 870527df0dd704c994928348c8c2910030776680
11129         * g10/card-util.c (ask_card_rsa_keysize): Don't show message here.
11130         (ask_card_keyattr): Show message when change, also for ECC.
11131
11132 2018-04-04  NIIBE Yutaka  <gniibe@fsij.org>
11133
11134         tests: Fix no gpg-agent upon removal of GNUPGHOME.
11135         + commit 83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73
11136         * tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add
11137         teadown-fn.
11138         * tests/gpgsm/export.scm: Use -no-atexit version and stop-agent.
11139         * tests/openpgp/decrypt-session-key.scm: Likewise.
11140         * tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
11141         * tests/openpgp/defs.scm (have-opt-always-trust): Likewise.
11142         (setup-environment-no-atexit): New.
11143         (start-agent): Support no use of atexit.
11144         * tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New.
11145         * tests/migrations/common.scm (untar-armored): Follow the change
11146         of with-ephemeral-home-directory.
11147
11148 2018-04-03  NIIBE Yutaka  <gniibe@fsij.org>
11149
11150         scd: Writing KDF resets auth state.
11151         + commit cb1731c23cddfa524d3f51cfd82029bff853a073
11152         * scd/app-openpgp.c (do_setattr): Clear auth state.
11153
11154 2018-04-02  NIIBE Yutaka  <gniibe@fsij.org>
11155
11156         g10: Fix filtering by PK->REQ_USAGE.
11157         + commit a17d2d1f690ebe5d005b4589a5fe378b6487c657
11158         * g10/getkey.c (get_pubkey_byfprint): Filter by PK->REQ_USAGE.
11159
11160 2018-03-30  NIIBE Yutaka  <gniibe@fsij.org>
11161
11162         g10: Fix card-edit/kdf-setup for single salt.
11163         + commit 130ad98240c066383fa0a99bcf5e0ec72bc0dff9
11164         * g10/card-util.c (gen_kdf_data): Use SALT_USER.
11165
11166         g10,scd: Support single salt for KDF data object.
11167         + commit 0c097575a9cd923f648fb5bb695893d46400c3ad
11168         * g10/card-util.c (gen_kdf_data): Support single salt.
11169         (kdf_setup): Can have argument for single salt.
11170         * scd/app-openpgp.c (pin2hash_if_kdf): Support single salt.
11171
11172         g10: Add "key-attr" command for --card-edit.
11173         + commit 820380335a20391e0998fb1ba32ebfb9accedc5b
11174         * g10/card-util.c (key_attr): New explicit command.
11175         (generate_card_keys, card_generate_subkey): Don't ask key attr change.
11176         (card_edit): Add for cmdKEYATTR.
11177
11178         scd: Support changing key attribute back to RSA.
11179         + commit 29692718768c28c524be6306081ab1852e75fe07
11180         * scd/app-openpgp.c (change_rsa_keyattr): Try usual RSA.
11181
11182 2018-03-29  NIIBE Yutaka  <gniibe@fsij.org>
11183
11184         g10: Support key attribute change at --card-edit/generate.
11185         + commit a1515b3bbc10a210040dda3b482bcdb933fa8d7c
11186         * g10/card-util.c (ask_card_rsa_keysize): Drop support for magic
11187         number 25519 for ed25519/cv25519.  Rename from ask_card_keyattr.
11188         (ask_card_keyattr): Support ECC, as well as RSA.
11189         (do_change_keyattr): Support ECC dropping magical number 25519.
11190         * g10/keygen.c (ask_curve): Allow call from outside, adding last arg
11191         of CURRENT.
11192         (generate_keypair): Follow the change of ask_curve.
11193         (generate_subkeypair): Likewise.
11194
11195         g10: check_pin_for_key_operation should be just before genkey.
11196         + commit 02d7bb819ff44cc90212568dd6ce24ae1dc5d17f
11197         * g10/card-util.c (generate_card_keys): Check PIN later.
11198         (card_generate_subkey): Likewise.
11199
11200 2018-03-28  NIIBE Yutaka  <gniibe@fsij.org>
11201
11202         g10: Change ask_curve so that it can be used outside.
11203         + commit e610d51f0de11154050915b951bcc5c53c940f5e
11204         * g10/call-agent.h (struct key_attr): New.
11205         * g10/keygen.c (ask_curve): Return const char *.  No allocation.
11206         (quick_generate_keypair): Follow the change.
11207         (generate_keypair, generate_subkeypair): Likewise.
11208         (parse_algo_usage_expire): Return const char *.
11209
11210 2018-03-27  NIIBE Yutaka  <gniibe@fsij.org>
11211
11212         agent,scd: Use pointer to represent HANDLE.
11213         + commit 96918346beeca7a46de9f03f19502373994c21bc
11214         * agent/call-scd.c [HAVE_W32_SYSTEM] (start_scd): Format with %p.
11215         * scd/command.c [HAVE_W32_SYSTEM] (option_handler): Use void *.
11216
11217 2018-03-27  Werner Koch  <wk@gnupg.org>
11218
11219         agent: Make the request origin a part of the cache items.
11220         + commit 02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e
11221         * agent/cache.c (agent_put_cache): Add arg 'ctrl' and change all
11222         callers to pass it.
11223         (agent_get_cache): Ditto.
11224
11225         * agent/cache.c (struct cache_items_s): Add field 'restricted'.
11226         (housekeeping): Adjust debug output.
11227         (agent_flush_cache): Ditto.
11228         (agent_put_cache): Ditto.  Take RESTRICTED into account.
11229         (agent_get_cache): Ditto.
11230
11231 2018-03-26  Werner Koch  <wk@gnupg.org>
11232
11233         gpg: Auto-fix a broken trustdb with just the version record.
11234         + commit eb68c2d3d1b03a18cd24406fa46d4c30cb13d9f7
11235         * g10/tdbio.c (get_trusthashrec): Create hashtable on error.
11236
11237         gpg: Pass CTRL arg to get_trusthashrec.
11238         + commit a750ebebf35a392f1c72d6aee5618df0d9f25ff7
11239         * g10/tdbio.c (get_trusthashrec): Add arg CTRL.
11240         (tdbio_search_trust_byfpr): Ditto.
11241         (tdbio_search_trust_bypk): Ditto.
11242
11243         gpg: Return better error codes in case of a too short trustdb.
11244         + commit 403aa70c52e56614d65490dea9344113f9cf3d29
11245         * g10/tdbio.c (tdbio_read_record): Return GPG_ERR_EOF.
11246         (tdbio_new_recnum): Never return on error.
11247         (lookup_hashtable): Print a more descriptive error in case of !TABLE.
11248
11249         gpg: Fix trustdb updates without lock held.
11250         + commit 456a3a8e93ea14f821e0e98fb515f284ece98685
11251         * g10/tdbio.c (is_locked): Turn into a counter.
11252         (take_write_lock, release_write_lock): Implement recursive locks.
11253
11254         gpg: Disable unused code parts in tdbio.c.
11255         + commit 5f00531463ebc0e606c502696962426007545bb7
11256         * g10/tdbio.c (in_transaction): Comment this var.
11257         (put_record_into_cache): Comment the transaction code.
11258         (tdbio_sync): Ditto
11259
11260 2018-03-23  Werner Koch  <wk@gnupg.org>
11261
11262         sm: Add OPTION request-origin.
11263         + commit 137644c9cb58deaaba6850f2763d9c5f9241cb0b
11264         * sm/server.c: Include shareddefs.h.
11265         (option_handler): Add option.
11266
11267         gpg,sm: New option --request-origin.
11268         + commit 2cd35df5db3c4dfe37616dcfb1fcc644959449ef
11269         * g10/gpg.c (oRequestOrigin): New const.
11270         (opts): New option --request-origin.
11271         (main): Parse that option.
11272         * g10/options.h (struct opt): Add field request_origin.
11273         * g10/call-agent.c (start_agent): Send option to the agent.
11274         * sm/gpgsm.c (oRequestOrigin): New const.
11275         (opts): New option --request-origin.
11276         (main): Parse that option.
11277         * sm/gpgsm.h (struct opt): Add field request_origin.
11278         * sm/call-agent.c (start_agent): Send option to the agent.
11279
11280         agent: New OPTION pretend-request-origin.
11281         + commit 05c55ee260edc07cd19da56dfd00347bfe3f529c
11282         * common/shareddefs.h (request_origin_t): New.
11283         * common/agent-opt.c (parse_request_origin): New.
11284         (str_request_origin): New.
11285         * agent/command.c (option_handler): Implement new option.
11286
11287 2018-03-23  NIIBE Yutaka  <gniibe@fsij.org>
11288
11289         build: Fix the manual source field.
11290         + commit 5400a5bb77bddcb14c94d9405312d6181322b090
11291
11292
11293 2018-03-22  Werner Koch  <wk@gnupg.org>
11294
11295         gpg: Implement --dry-run for --passwd.
11296         + commit 165bc38cefbc03515403b60b704cabf4dc0b71f4
11297         * g10/keyedit.c (change_passphrase): Take care of --dry-run.
11298
11299 2018-03-22  NIIBE Yutaka  <gniibe@fsij.org>
11300
11301         scd: Support KDF DO setup.
11302         + commit 0152ba7c987443d641ce1091c79f90ef2cc46498
11303         * g10/call-agent.c (learn_status_cb): Parse the capability for KDF.
11304         * g10/card-util.c (gen_kdf_data, kdf_setup): New.
11305         (card_edit): New admin command cmdKDFSETUP to call kdf_setup.
11306         * scd/app-openpgp.c (do_getattr): Emit KDF capability.
11307
11308 2018-03-21  Werner Koch  <wk@gnupg.org>
11309
11310         gpg: Fix out-of-bound read in subpacket enumeration.
11311         + commit 983f7b2acbd1e7580652bbeb0c3d64f9dd19d9e4
11312         * g10/parse-packet.c (enum_sig_subpkt): Check buflen before reading
11313         the type octet.  Print diagnostic.
11314
11315         Change license of argparse.c back to LGPLv2.1.
11316         + commit fa0ed1c7e2eee7c559026696e6b21acc882a97aa
11317         * common/argparse.c, common/argparse.h: Change license
11318
11319 2018-03-19  NIIBE Yutaka  <gniibe@fsij.org>
11320
11321         scd: signal mask should be set just after npth_init.
11322         + commit 11bbd99477ef5ba5b7db0c17607b10af03c68afb
11323         * scd/scdaemon.c (setup_signal_mask): New.
11324         (main): Call setup_signal_mask.
11325         (handle_connections): Remove signal mask setup.
11326
11327 2018-03-16  NIIBE Yutaka  <gniibe@fsij.org>
11328
11329         scd: Better user interaction for factory-reset.
11330         + commit 2c85e202bc30231b9555100dec0c490c60d7b88c
11331         * g10/card-util.c (factory_reset): Dummy PIN size is now 32-byte.
11332         Connect the card again at the last step.
11333
11334 2018-03-15  NIIBE Yutaka  <gniibe@fsij.org>
11335
11336         scd: Fix suspend/resume handling for CCID driver.
11337         + commit fd23a0524d8060ed12d87c679b7823686614aaee
11338         * scd/ccid-driver.c (intr_cb): Try submitting INTERRUPT urb
11339         to see if it's suspend/resume.
11340
11341 2018-03-13  NIIBE Yutaka  <gniibe@fsij.org>
11342
11343         scd: After fatal error, shutdown a reader.
11344         + commit c84bae69e9e02923f7180e09d161cb0b13257436
11345         * scd/apdu.c (pcsc_send_apdu): Notify main loop after
11346         fatal errors.
11347
11348         scd: Fix for GNU/Linux suspend/resume.
11349         + commit 71e5282c25ba812c7091e587edd721839bc4c2ac
11350         * configure.ac (require_pipe_to_unblock_pselect): Default is "yes".
11351         * scd/scdaemon.c (scd_kick_the_loop): Minor clean up.
11352
11353 2018-03-12  NIIBE Yutaka  <gniibe@fsij.org>
11354
11355         scd: Fix typo in previous commit.
11356         + commit 655f0b9ad0138e6f960bf4befaf0eea569256614
11357
11358
11359 2018-03-09  NIIBE Yutaka  <gniibe@fsij.org>
11360
11361         scd: More fix with PC/SC for Windows.
11362         + commit 1e27c0e04cd3280d498dc8b72d2e410f6287f656
11363         * scd/apdu.c (pcsc_get_status): Return status based on CURRENT_STATUS.
11364         Add debug log.
11365
11366 2018-03-08  NIIBE Yutaka  <gniibe@fsij.org>
11367
11368         scd: Fix status check when using PC/SC.
11369         + commit f8b8b6aac2ca1cb34d7a346aee1d874e7650557b
11370         * scd/apdu.c (struct reader_table_s): Add field of current_state.
11371         (new_reader_slot): Initialize current_state.
11372         (pcsc_get_status): Keep the status in READER_TABLE array.
11373         Return SW_HOST_NO_READER when PCSC_STATE_CHANGED.
11374         * scd/scdaemon.c (handle_connections): Silence a warning.
11375
11376 2018-03-06  Werner Koch  <wk@gnupg.org>
11377
11378         agent: Also evict cached items via a timer.
11379         + commit f060cb5c63923d6caec784f65f3bb0aadf52f795
11380         * agent/cache.c (agent_cache_housekeeping): New func.
11381         * agent/gpg-agent.c (handle_tick): Call it.
11382
11383 2018-03-01  Werner Koch  <wk@gnupg.org>
11384
11385         gpg: Print the keygrip with --card-status.
11386         + commit fd595c9d3642dba437fbe0f6e25d7aaaae095f94
11387         * g10/call-agent.h (agent_card_info_s): Add fields grp1, grp2 and
11388         grp3.
11389         * g10/call-agent.c (unhexify_fpr): Allow for space as delimiter.
11390         (learn_status_cb): Parse KEYPARIINFO int the grpX fields.
11391         * g10/card-util.c (print_keygrip): New.
11392         (current_card_status): Print "grp:" records or with --with-keygrip a
11393         human readable keygrip.
11394
11395 2018-02-28  Andre Heinecke  <aheinecke@intevation.de>
11396
11397         gpgconf, w32: Allow UNC paths.
11398         + commit e43844c3b0b9ec93b7f2a88752bcd6b6244aacfb
11399         * tools/gpgconf-comp.c (get_config_filename): Allow UNC paths.
11400
11401 2018-02-28  Werner Koch  <wk@gnupg.org>
11402
11403         gpg: Avoid writing a zero length last chunk in AEAD mode.
11404         + commit f2c09203b98b83669a460dc8161283de96022536
11405         * g10/cipher-aead.c (write_header): Do not call set_nonce_and_ad.
11406         (write_final_chunk): Do not increase chunkindex.
11407         (do_flush): Call set_nonce_and_ad immediately before the first
11408         encryption of a chunk.  Bump up the chunkindex after writing the tag.
11409         (do_free): Do not insert a zero length last chunk.
11410         * g10/decrypt-data.c (aead_underflow): Fix the corresponding bug.
11411
11412         gpg: Merge two functions in cipher-aead.c.
11413         + commit 047506a03d21739b5b922f6b3fd9f059b0b137c5
11414         * g10/cipher-aead.c (set_nonce, set_additional_data): Merge into ...
11415         (set_nonce_and_ad): new function.
11416         (write_auth_tag): Print error message here.
11417         (do_flush): Rename var newchunk to finalize.
11418
11419 2018-02-27  Werner Koch  <wk@gnupg.org>
11420
11421         gpg: Simplify the AEAD decryption function.
11422         + commit 618b86325f776f7250ad2bb09680e4bb427d7e50
11423         * g10/decrypt-data.c (aead_set_nonce, aead_set_ad): Merge into ...
11424         (aead_set_nonce_and_ad): new single function.  Change callers.
11425         (decrypt_data): Do not set the nonce and ad here.
11426         (aead_underflow): Get rid of the LAST_CHUNK_DONE hack.
11427
11428         gpg: Factor common code out of the AEAD decryption function.
11429         + commit ad989373f1a46139ed0fbc4d4a91069b78617ad9
11430         * g10/decrypt-data.c (aead_underflow): Factor reading and checking
11431         code code out to ...
11432         (fill_buffer, aead_checktag): new functions.
11433
11434         gpg: Rename cipher.c to cipher-cfb.c.
11435         + commit b703ba725dadca8298a0c69365225f9a7ff60ae2
11436         * g10/cipher.c: Rename to ...
11437         * g10/cipher-cfb.c: this.
11438
11439         gpg: Fix corner cases in AEAD encryption.
11440         + commit ebb0fcf6e0bd6997eff4097ddda94955134212af
11441         * g10/cipher-aead.c (write_final_chunk): Do not bump up the chunk
11442         index if the previous chunk was empty.
11443         * g10/decrypt-data.c (aead_underflow): Likewise.  Also handle a other
11444         corner cases.  Add more debug output.
11445
11446 2018-02-23  Werner Koch  <wk@gnupg.org>
11447
11448         gpg: Try to mitigate the problem of wrong CFB symkey passphrases.
11449         + commit cbc7bacf2ff95aebb427bb244c719143a9001f3c
11450         * g10/mainproc.c (symkey_decrypt_seskey): Check for a valid algo.
11451
11452 2018-02-22  Michał Górny  <mgorny@gentoo.org>
11453
11454         dirmngr: Handle failures related to missing IPv6 gracefully.
11455         + commit ecfc4db3a2f8bc2652ba4ac4de5ca1cd13bfcbec
11456         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Handle two more
11457         error codes.
11458
11459 2018-02-22  Werner Koch  <wk@gnupg.org>
11460
11461         build: Update swdb tags and include release info from 2.2.5.
11462         + commit 7853190cfe2953fdac066b4f3256edc206896144
11463
11464
11465         Release 2.2.5.
11466         + commit 9581a65ccc10daededc05c55391a04022f794a4a
11467
11468
11469         gpg: Don't let gpg return failure on an invalid packet in a keyblock.
11470         + commit b375d50ee4ce52c9b0f0855ec155be027642fb05
11471         * g10/keydb.c (parse_keyblock_image): Use log_info instead of
11472         log_error for skipped packets.
11473         * g10/keyring.c (keyring_get_keyblock): Ditto.
11474
11475 2018-02-22  NIIBE Yutaka  <gniibe@fsij.org>
11476
11477         g10: Select a secret key by checking availability under gpg-agent.
11478         + commit 88e766d3915c2919e9968148ebb30463d4a673e4
11479         * g10/getkey.c (finish_lookup): Add WANT_SECRET argument to confirm
11480         by agent_probe_secret_key.
11481         (get_pubkey_fromfile, lookup): Supply WANT_SECRET argument.
11482
11483 2018-02-20  Werner Koch  <wk@gnupg.org>
11484
11485         wks: Add special mode to --install-key.
11486         + commit 685a5e1558b2252ac895637fb857f6f7bb85ea7b
11487         * tools/gpg-wks-client.c (get_key_status_parm_s)
11488         (get_key_status_cb, get_key): Move to ...
11489         * tools/wks-util.c: ...here.
11490         (get_key): Rename to wks_get_key.
11491         * tools/gpg-wks-server.c: Include userids.h.
11492         (command_install_key): Allow use of a fingerprint.
11493
11494         wks: Implement server command --install-key.
11495         + commit ee474856ec16ff11d922d8503fb3ede77129c4aa
11496         * tools/wks-util.c (wks_filter_uid): Add arg 'binary'.
11497         * tools/gpg-wks-server.c (main): Expect 2 args for --install-key.
11498         (write_to_file): New.
11499         (check_and_publish): Factor some code out to ...
11500         (compute_hu_fname): ... new.
11501         (command_install_key): Implement.
11502
11503         wks: Support alternative submission address.
11504         + commit 1877603761911ea5b1c15f4aef11a2cf86a8682c
11505         * tools/gpg-wks.h (policy_flags_s): Add field 'submission_address'.
11506         * tools/wks-util.c (wks_parse_policy): Parse that field.
11507         (wks_free_policy): New.
11508         * tools/gpg-wks-client.c (command_send): Also try to take the
11509         submission-address from the policy file.  Free POLICY.
11510         * tools/gpg-wks-server.c (process_new_key): Free POLICYBUF.
11511         (command_list_domains): Free POLICY.
11512
11513 2018-02-15  Werner Koch  <wk@gnupg.org>
11514
11515         kbx: Fix detection of corrupted keyblocks on 32 bit systems.
11516         + commit 5e3679ae395e7a7e44f218f07bbe487429f1b279
11517         * kbx/keybox-search.c (blob_cmp_fpr): Avoid overflow in OFF+LEN
11518         checking.
11519         (blob_cmp_fpr_part): Ditto.
11520         (blob_cmp_name): Ditto.
11521         (blob_cmp_mail): Ditto.
11522         (blob_x509_has_grip): Ditto.
11523         (keybox_get_keyblock): Check OFF and LEN using a 64 bit var.
11524         (keybox_get_cert): Ditto.
11525
11526 2018-02-15  NIIBE Yutaka  <gniibe@fsij.org>
11527
11528         gpg: Fix reversed messages for --only-sign-text-ids.
11529         + commit ca138d5bf36accde2fd755249b470a8dc8743c95
11530         * g10/keyedit.c (keyedit_menu): Fix messages.
11531
11532 2018-02-14  Katsuhiro Ueno  <uenobk@gmail.com>
11533
11534         agent: Avoid appending a '\0' byte to the response of READKEY.
11535         + commit df97fe24807826ddc2af0e45e416fb81c5666f88
11536         * agent/command.c (cmd_readkey): Set pkbuflen to the length of the output
11537         without an extra '\0' byte.
11538
11539 2018-02-14  Werner Koch  <wk@gnupg.org>
11540
11541         sm: Fix minor memory leak in --export-p12.
11542         + commit 80719612b7e92aff5887f2a68d550a24f350722c
11543         * sm/export.c (gpgsm_p12_export): Free KEYGRIP.
11544
11545 2018-02-14  Katsuhiro Ueno  <uenobk@gmail.com>
11546
11547         sm: Fix a wrong key parameter in an exported private key file.
11548         + commit 29aac7798085ee38da5107698618890ae7593c96
11549         * sm/export.c (sexp_to_kparms): Fix the computation of array[6],
11550         which must be 'd mod (q-1)' but was 'p mod (q-1)'.
11551
11552 2018-02-14  Werner Koch  <wk@gnupg.org>
11553
11554         common: Use new function to print status strings.
11555         + commit f19ff78f0fbfc2793d8a9ab0173486bf712871ac
11556         * common/asshelp2.c (vprint_assuan_status_strings): New.
11557         (print_assuan_status_strings): New.
11558         * agent/command.c (agent_write_status): Replace by call to new
11559         function.
11560         * dirmngr/server.c (dirmngr_status): Ditto.
11561         * g13/server.c (g13_status): Ditto.
11562         * g13/sh-cmd.c (g13_status): Ditto.
11563         * sm/server.c (gpgsm_status2): Ditto.
11564         * scd/command.c (send_status_info): Bump up N.
11565
11566 2018-02-13  Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
11567
11568         scd: Improve KDF-DO support.
11569         + commit 25f3b69129015c54392636818c8846e236f5cb2c
11570         * scd/app-openpgp.c (pin2hash_if_kdf): Check the content of KDF DO.
11571
11572 2018-02-12  NIIBE Yutaka  <gniibe@fsij.org>
11573
11574         scd: Fix handling for Data Object with no data.
11575         + commit 0a3bec2c2525935362f87dce93d7df2c8d498498
11576         * scd/app-openpgp.c (get_cached_data): Return NULL for Data Object
11577         with no data.
11578
11579 2018-02-09  Andre Heinecke  <aheinecke@intevation.de>
11580
11581         doc: Add compliance de-vs to gpgsm in vsnfd.prf.
11582         + commit e0658b19d93b38ed9ebd07734c4678acdde1607d
11583         * doc/examples/vsnfd.prf: Set complaince mode for gpgsm.
11584
11585 2018-02-07  NIIBE Yutaka  <gniibe@fsij.org>
11586
11587         scd: Use pipe to kick the loop on NetBSD.
11588         + commit 015fe1c47b91da340e9df6bed908e0747ae8c60b
11589         * configure.ac (HAVE_PSELECT_NO_EINTR): New.
11590         * scd/scdaemon.c (scd_kick_the_loop): Write to pipe.
11591         (handle_connections): Use pipe.
11592
11593 2018-02-06  Werner Koch  <wk@gnupg.org>
11594
11595         gpg: Fix packet length checking in symkeyenc parser.
11596         + commit 8305739fe857ed3378f885bb43777fd518dd1060
11597         * g10/parse-packet.c (parse_symkeyenc): Move error printing to the
11598         end.  Add additional check to cope for the 0je extra bytes needed for
11599         AEAD.
11600
11601 2018-01-29  NIIBE Yutaka  <gniibe@fsij.org>
11602
11603         tests: Fix for NetBSD with __func__.
11604         + commit 64aa98c8a05513d9c00f53a2b880d80f9035333e
11605         * tests/asschk.c: Don't define __func__ if available.
11606
11607 2018-01-28  Werner Koch  <wk@gnupg.org>
11608
11609         gpg: Rename a misnomed arg in open_outfile.
11610         + commit 303310d05e708dd58dcf7b7d8e8634cd5085bc7e
11611         * g10/openfile.c (open_outfile): Rename inp_fd to out_fd.
11612
11613 2018-01-27  Werner Koch  <wk@gnupg.org>
11614
11615         dirmngr: Improve assuan error comment for cmd keyserver.
11616         + commit f8e868d9dfb6fc1390e421e7993a1d076309ed83
11617         * dirmngr/server.c: Add error comment in case --resolve fails in
11618         ensure_keyserver.
11619
11620 2018-01-26  NIIBE Yutaka  <gniibe@fsij.org>
11621
11622         agent: Fix sending connecting process uid to pinentry.
11623         + commit 660eafa3a9f68e116e9b0597edc317d8ff90f9b2
11624         * agent/command-ssh.c (get_client_info): Use LOCAL_PEERCRED.
11625
11626         agent: Fix last commit.
11627         + commit d7207b39b71d1b07c4cddac602f29ec583f6d1ad
11628         * configure.ac: Check ucred.h as well as sys/ucred.h.
11629         * agent/command-ssh.c: Add inclusion of ucred.h.
11630
11631         agent: More fix for get_client_pid for portability.
11632         + commit 08e686a6a6d5bcb5410228b388745d09686b260c
11633             * configure.ac: Check sys/ucred.h instead of ucred.h.
11634             * agent/command-ssh.c: Include sys/ucred.h.
11635
11636 2018-01-24  Werner Koch  <wk@gnupg.org>
11637
11638         gpg: New maintainer option --debug-set-iobuf-size.
11639         + commit db7661b5a297a58c95fa9873d43f31d697b8feb3
11640         * g10/gpg.c (opts): Add new option.
11641         (opt_set_iobuf_size): New var.
11642         (set_debug): Set the option.
11643         * tests/openpgp/armor.scm: Use this option to revert the buffer size
11644         to the one which used to exhibit the tested bugs.
11645
11646         iobuf: Increase the size of the buffer.  Add iobuf_set_buffer_size.
11647         + commit bfc11816444512b4ebcc6617d3c3b5988e753de3
11648         * common/iobuf.c (IOBUF_BUFFER_SIZE): Rename to
11649         DEFAULT_IOBUF_BUFFER_SIZE and increase to 64k.
11650         (iobuf_buffer_size): New var.  Always use this instead of the macro.
11651         (iobuf_set_buffer_size): New.
11652         (struct file_filter_ctx_t): Add field delayed_rc.
11653         (file_filter) [!W32]: Try to fill the supplied buffer.
11654
11655         gpg: Fix AEAD encryption for chunk sizes other than 64 KiB.
11656         + commit ff1bdc23d9f1693c1add7c1fe8d218b7bf743e31
11657         * g10/cipher-aead.c (do_flush): Init ERR.  Fix remaining chunklen
11658         computation.
11659         (do_free): Add dummy encryption.  Close the cipher handle.
11660         * g10/decrypt-data.c (aead_underflow): Rewrite.
11661
11662         gpg: Rename a variable in decrypt-data for clarity.
11663         + commit 83a15fa88e91d277811b6d030c4aa40c4fb3e6ad
11664         * g10/decrypt-data.c (decode_filter_context_s): Rename field 'defer'
11665         to 'holdback' and replace 'defer_filled' flag into 'holdbacklen'.
11666         Change all users.
11667
11668 2018-01-23  Werner Koch  <wk@gnupg.org>
11669
11670         gpg: New option --chunk-size.
11671         + commit f3ef8b0dcaede1c85da0dff8eeceda6a994f0b28
11672         * g10/gpg.c (opts): New option --chunk-size.
11673         (oChunkSize): New const.
11674         (build_list_aead_test_algo, build_list_aead_algo_name): New.
11675         (my_strusage): List AEAD algos.
11676         (main): Implement --chunk-size..
11677         * g10/options.h (struct opt): Add field 'chunk_size'.
11678         (DBG_IPC): Remove duplicated macro.
11679         * g10/main.h (DEFAULT_AEAD_ALGO): Depend on Libgcrypt version.
11680         * g10/misc.c (openpgp_aead_test_algo): Ditto.
11681
11682         * g10/cipher-aead.c: Silence if not in debug mode.
11683         * g10/decrypt-data.c: Ditto.
11684
11685         gpg: Copy the AEAD prefs to the user ID struct.
11686         + commit 112e02ee89b78369c1c50e672873e726cbfeb994
11687         * g10/getkey.c (fixup_uidnode): Copy the AEAD prefs.
11688
11689         gpg: Clear the symmetric passphrase cache for encrypted session keys.
11690         + commit 278d87465685e0aa415e0333de1d27e79d1608f0
11691         * g10/mainproc.c (proc_symkey_enc): Clear the symmetric key cache on
11692         error.
11693         (proc_encrypted): Need to take are of the checksum error.
11694
11695         gpg: Implement AEAD for SKESK packets.
11696         + commit 9aab9167bca38323973e853845ca95ae8e9b6871
11697         * g10/packet.h (PKT_symkey_enc): Add field aead_algo.
11698         * g10/build-packet.c (do_symkey_enc): Support version 5 packets.
11699         * g10/parse-packet.c (parse_symkeyenc): Ditto.
11700         * g10/encrypt.c (encrypt_symmetric): Force using a random session
11701         key in AEAD mode.
11702         (encrypt_seskey): Add and support arg aead_algo.
11703         (write_symkey_enc): Ditto.
11704         (encrypt_simple): Adjust accordingly.
11705         (encrypt_filter): Ditto.
11706         * g10/gpgcompose.c (sk_esk): For now call encrypt_seskey without AEAD
11707         support.
11708         * g10/mainproc.c (symkey_decrypt_seskey): Support AEAD.  Nver call BUG
11709         but return an error.
11710         (proc_symkey_enc): Call symkey_decrypt_seskey in a bug compatible way.
11711
11712         * g10/import.c (check_prefs): Check AEAD preferences.
11713         * g10/keyedit.c (show_prefs): Print AEAD preferences.
11714
11715 2018-01-22  Werner Koch  <wk@gnupg.org>
11716
11717         gpg: Unify AEAD parameter retrieval.
11718         + commit da3015e3c05030fe709c8f922486e73d06d1d16a
11719         * g10/pkclist.c (select_aead_from_pklist): Return the AEAD_algo.
11720         * g10/encrypt.c (use_aead): Return the AEAD algo.
11721         (encrypt_simple): Adjust for this change.
11722         (encrypt_crypt): Ditto.
11723         (encrypt_filter): Ditto.
11724         * g10/sign.c (sign_symencrypt_file): Ditto.
11725
11726         * g10/misc.c (MY_GCRY_CIPHER_MODE_EAX): New.
11727         (openpgp_aead_algo_info): New.
11728         * g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
11729         (write_header): Use new fucntion.
11730         * g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
11731         (decrypt_data): Use new function.  Also allow for chunkbytes other
11732         than 10.
11733
11734         gpg: Refactor function encrypt_seskey.
11735         + commit 0131d4369a81a51bf7bb328cc81a3bb082ed1a94
11736         * g10/encrypt.c (encrypt_seskey): Allocate the buffer for the
11737         encrypted key and returns that buffer and its length.
11738         (encrypt_simple): Adjust for above change.
11739         (write_symkey_enc): Ditto.
11740
11741 2018-01-22  NIIBE Yutaka  <gniibe@fsij.org>
11742
11743         scd: Support KDF Data Object of OpenPGPcard V3.3.
11744         + commit 91303b7df9c3e810cfcd4920f78bac6f8b7df2b2
11745         * scd/app-openpgp.c (do_getattr, do_setattr): Add KDF support.
11746         (pin2hash_if_kdf): New.
11747         (verify_a_chv): Add PINLEN arg.  Use pin2hash_if_kdf.
11748         (verify_chv2, do_sign): Follow the change of verify_a_chv.
11749         (verify_chv3, do_change_pin): Use pin2hash_if_kdf.
11750
11751 2018-01-21  Werner Koch  <wk@gnupg.org>
11752
11753         gpg: Support EAX if for latest Libgcrypt.
11754         + commit 7356d6ec50ea24bc9449187e1c2b3ecd717b789f
11755         * g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): New.
11756         (write_header): Use it.
11757         * g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): New.
11758         (decrypt_data): Use it.
11759         * g10/misc.c (openpgp_aead_test_algo): Allow EAX.
11760
11761         gpg: First take on PKT_ENCRYPTED_AEAD.
11762         + commit 3f4ca85cb0cf58006417f4f7faafaa9a1f1bdf22
11763         * common/openpgpdefs.h (PKT_ENCRYPTED_AEAD): New const.
11764         * g10/dek.h (DEK): Increase size of use_aead to 4 bits.
11765         * g10/filter.h (cipher_filter_context_t):  Add new fields for AEAD.
11766         * g10/packet.h (PKT_encrypted): Add fields aead_algo, cipher_algo, and
11767         chunkbyte.
11768         * g10/build-packet.c (do_encrypted_aead): New.
11769         (build_packet): Call it.
11770         * g10/parse-packet.c (dump_sig_subpkt): Handle SIGSUBPKT_PREF_AEAD.
11771         (parse_one_sig_subpkt, can_handle_critical): Ditto.
11772         (parse_encrypted): Clear new PKT_ENCRYPTED fields.
11773         (parse_encrypted_aead): New.
11774         (parse): Call it.
11775         * g10/gpg.c (main): Take care of --rfc4880bis option when checking
11776         compliance.
11777         * g10/cipher-aead.c: Replace the stub by real code.
11778         * g10/decrypt-data.c (decode_filter_ctx_t): Add fields for use with
11779         AEAD.
11780         (aead_set_nonce): New.
11781         (aead_set_ad): New.
11782         (decrypt_data): Support AEAD.
11783         (aead_underflow): New.
11784         (aead_decode_filter): New.
11785         * g10/encrypt.c (use_aead): Make that new fucntion work.
11786         (encrypt_simple): Use default_aead_algo() instead of EAX.
11787         * g10/mainproc.c (proc_encrypted): Support AEAD.
11788         (do_proc_packets): Support PKT_ENCRYPTED_AEAD.
11789
11790 2018-01-18  Werner Koch  <wk@gnupg.org>
11791
11792         gpg: Fix the use of future-default with --quick-add-key.
11793         + commit e1e35db510c9222e7a7dc208c2e49df556954170
11794         * g10/keygen.c (parse_key_parameter_part): Add arg clear_cert.
11795         (parse_key_parameter_string): Add arg suggested_use and implement
11796         fallback.  Change callers to pass 0 for new arg.
11797         (parse_algo_usage_expire): Pass the parsed USAGESTR to
11798         parse_key_parameter_string so that it can use it in case a subkey is
11799         to be created.
11800
11801 2018-01-10  Werner Koch  <wk@gnupg.org>
11802
11803         gpg: Add stub function for encrypting AEAD.
11804         + commit 81d71818d054a5faa9153fd52a4b79bbbb71e9d5
11805         * g10/cipher.c (cipher_filter): Rename to cipher_filter_cfb.
11806         * g10/cipher-aead.c: New.  Right now only with a stub function.
11807         * g10/Makefile.am (gpg_sources): Add file.
11808         * g10/encrypt.c (encrypt_simple): Push either cipher_filter_cfb or
11809         cipher_filter_aead.
11810         (encrypt_crypt): Ditto.
11811         (encrypt_filter): Ditto.
11812         * g10/sign.c (sign_symencrypt_file): Ditto.
11813
11814         gpg: New option --force-aead.
11815         + commit 4e2ba546cdccbbc6d3e29867ee5671fd44d74e67
11816         * g10/dek.h (DEK): Turn fields use_mdc, algo_printed and symmetric
11817         into single bit vars.  Make sure they are always set to 1 or 0.
11818         (DEK): New field use_aead.
11819         * g10/options.h (struct opt): New field force_aead.
11820         * g10/pkclist.c (select_aead_from_pklist): New.
11821         * g10/gpg.c (oForceAEAD): New const.
11822         (opts): New options "--force-aead".
11823         (main): Set new option.
11824         * g10/encrypt.c (use_aead): New.
11825         (encrypt_simple): Implement new flags DEK.use_aead.
11826         (encrypt_crypt): Ditto.
11827         (encrypt_filter): Ditto.
11828         * g10/sign.c (sign_symencrypt_file): Ditto.
11829
11830         gpg: Add option and preference framework for AEAD.
11831         + commit 8217cd49364b9f81b390f7ca6a608dd946f93efc
11832         * common/openpgpdefs.h (aead_algo_t): New.
11833         (SIGSUBPKT_PREF_AEAD): New.
11834         * g10/gpg.c (oAEADAlgo, oPersonalAEADPreferences): New.
11835         (opts): New options --aead-algo and --personal-aead-preferences.
11836         (set_compliance_option): Clar aead algo.
11837         (main): Parse and check the new options
11838         * g10/options.h (struct opt): Add fields def_aead_algo and
11839         personal_aead_prefs.
11840         * g10/packet.h (PREFTYPE_AEAD): New enum value.
11841         (PKT_user_id): Add field flags.aead.
11842         (PKT_public_key): Add field flags.aead.
11843         * g10/pkclist.c (select_algo_from_prefs): Support PREFTYPE_AEAD.
11844         * g10/getkey.c (fixup_uidnode): Set AEAD flag.
11845         (merge_selfsigs): Ditto.
11846         * g10/kbnode.c (dump_kbnode): Show aead flag.
11847         * g10/keyedit.c (show_prefs): Ditto.
11848         (show_key_with_all_names_colon): Ditto.
11849         * g10/keygen.c (aead_presf, n_aead_prefs): New vars.
11850         (set_one_pref): Suppport PREFTYPE_AEAD.
11851         (keygen_set_std_prefs): Parse AEAD preferences.
11852         (keygen_get_std_prefs): Ditto.
11853         (add_feature_aead): New.
11854         (keygen_upd_std_prefs): Call that and build AEAD pref  packet.
11855         * g10/main.h (DEFAULT_AEAD_ALGO): New const.
11856         * g10/misc.c (openpgp_aead_test_algo): New.
11857         (openpgp_aead_algo_name): New.
11858         (string_to_aead_algo): New.
11859         (default_aead_algo): New.
11860
11861 2018-01-09  Andre Heinecke  <aheinecke@intevation.de>
11862
11863         doc: Note pinentry-mode for passphrase opts.
11864         + commit 6fb5713f4a6976900cc70c140e61043b6ef688d1
11865         * doc/gpg.texi (--passphrase, --passphrase-file, --passphrase-fd):
11866         Note that pinentry-mode needs to be loopback.
11867
11868 2018-01-08  Werner Koch  <wk@gnupg.org>
11869
11870         gpg: Print all keys with --decrypt --list-only.
11871         + commit 339b3301ee8410fe3bbdebb66a6e83801d79d40d
11872         * g10/mainproc.c (proc_pubkey_enc): Use dedicated error code for
11873         list-only and put the key into PKENC_LIST.
11874         (print_pkenc_list): Take care of the new error code.
11875
11876 2018-01-01  Werner Koch  <wk@gnupg.org>
11877
11878         gpg: Allow "futuredefault" as alias for "future-default".
11879         + commit 4d3c500f4793eb263940ff5ef87ec4ead63c9b4b
11880         * g10/keygen.c (parse_key_parameter_string): Allow "futuredefault" and
11881         use case-insensitive matching
11882         (quick_generate_keypair): Ditto.
11883         (parse_algo_usage_expire): Ditto.
11884
11885 2017-12-29  Werner Koch  <wk@gnupg.org>
11886
11887         gpg: Allow the use of "cv25519" and "ed25519" in the keygen parms.
11888         + commit 412bb7a801f242d47a82712080cce6ddbb843166
11889         * g10/keygen.c (gen_ecc): Map curve names.
11890
11891 2017-12-27  NIIBE Yutaka  <gniibe@fsij.org>
11892
11893         scd: Fix for inactive card at start by internal CCID driver.
11894         + commit 4f88b0f56134af2ce56d434b7acd47fcf9b6f7cf
11895         * scd/ccid-driver.c (do_close_reader): Set NULL on close.
11896         (bulk_in): Move DEBUGOUT and check by EP_INTR.
11897         (ccid_get_atr): Clear powered_off flag after initial status check.
11898
11899 2017-12-22  Werner Koch  <wk@gnupg.org>
11900
11901         kbx: Simplify by removing custom memory functions.
11902         + commit f3ba66781a07af2e32f5887e6e15acdd4822a431
11903         * kbx/keybox-util.c (keybox_set_malloc_hooks): Remove.
11904         (_keybox_malloc, _keybox_calloc, keybox_realloc)
11905         (_keybox_free): Remove.
11906         (keybox_file_rename): Remove.  Was not used.
11907         * sm/gpgsm.c (main): Remove call to keybox_set_malloc_hooks.
11908         * kbx/kbxutil.c (main): Ditto.
11909         * kbx/keybox-defs.h: Remove all separate includes.  Include util.h.
11910         remove convenience macros.
11911         * common/logging.h (return_if_fail): New.  Originally from
11912         keybox-defs.h but now using log_debug.
11913         (return_null_if_fail): Ditto.
11914         (return_val_if_fail): Ditto.
11915         (never_reached): Ditto.
11916
11917 2017-12-20  Werner Koch  <wk@gnupg.org>
11918
11919         common: Use larger buffer for homedir in case of 64 bit UIDs.
11920         + commit 290348e349e8d56a856f187a08e913f2ed525b3c
11921         * common/homedir.c (_gnupg_socketdir_internal): Enlarge PREFIX by 6
11922         bytes for "/gnupg".
11923
11924         Release 2.2.4.
11925         + commit 558b17593ae97b8a07d06bf0d6af1a626b304501
11926
11927
11928 2017-12-19  Petr Pisar  <petr.pisar@atlas.cz>
11929
11930         po: Update Czech translation.
11931         + commit 43aaf60449036e870cc25b77fbb7312cf3fb534c
11932
11933
11934 2017-12-19  Ineiev  <ineiev@gnu.org>
11935
11936         po: Update Russian translation.
11937         + commit c7b8ec6c8e57797f0b77dbf7fca85fb600323328
11938
11939
11940 2017-12-19  Werner Koch  <wk@gnupg.org>
11941
11942         wks: New server options --check, --with-dir, with-file.
11943         + commit 7449063b1af2eef73d621a69cdb2fb713ab1ae6c
11944         * tools/gpg-wks-server.c (aCheck, oWithDir, oWithFile): New const.
11945         (opts): New options --check, --with-dir, and --with-file.
11946         (main): Call command_check_key.
11947         (command_list_domains): Implement option --with-dir.
11948         (fname_from_userid): New.
11949         (command_check_key): New.
11950         (command_remove_key): Implement existsing command.
11951         (command_revoke_key): Call command_remove_key as a simple
11952         implementation.
11953
11954 2017-12-18  Werner Koch  <wk@gnupg.org>
11955
11956         conf: New option --status-fd.
11957         + commit 482e000b8a7e336f342a7fac3b7379257e944b6e
11958         * tools/gpgconf.c (oStatusFD): New const.
11959         (opts): New option --status-fd.
11960         (statusfp): New var.
11961         (set_status_fd): New.
11962         (gpgconf_write_status): New.
11963         (gpgconf_failure): New.
11964         (main): Set status fd and replace exit by gpgconf_failure.
11965         * tools/gpgconf-comp.c: Repalce exit by gpgconf_failure.
11966         (gc_process_gpgconf_conf): Print a few warning status messages.
11967
11968         gpgconf: Show --compliance in expert mode.
11969         + commit d74c40cef0a97cd98aa05f13b1541a94eda502a6
11970         * tools/gpgconf-comp.c (gc_options_gpg): Set compliance to expert.
11971         (gc_options_gpgsm): Ditto.
11972
11973         sm: Allow explicit setting of the default --compliance=gnupg.
11974         + commit 8c878ae4c9dfa9fe26aa15f4f9db3e86833575e9
11975         * sm/gpgsm.c (main): Allow setting of the default compliance.
11976         * tools/gpgconf-comp.c (gc_options_gpgsm): Add "compliance".
11977
11978 2017-12-18  NIIBE Yutaka  <gniibe@fsij.org>
11979
11980         po: Update Japanese translation.
11981         + commit e3ddeff66e8c08a37ddf8b6510d69579c245e192
11982         * po/ja.po: Fix message with no "%s".
11983
11984         po: Update Japanese translation.
11985         + commit 77e2fcb4ffbad8577a2cf41f17bf92dec6a93ad8
11986         * po/ja.po: Fix message with no "%s".
11987
11988 2017-12-13  Werner Koch  <wk@gnupg.org>
11989
11990         gpg: Print a warning for too much data encrypted with 3DES et al.
11991         + commit 416cf9e9be5d2daf0ef629208031989699b3653f
11992         * g10/filter.h (cipher_filter_context_t): Remove unused filed
11993         'create_mdc'.  Turn field 'header' into a bit field.  Add new fields
11994         'short_blklen_warn' and 'short_blklen_count'.
11995         * g10/cipher.c (write_header): Print a warning if MDC is not used.
11996         (cipher_filter): Print a warning for long messages encrypted with a
11997         short block length algorithm.
11998
11999         gpg: Simplify cipher:write_header.
12000         + commit b5333e13cbc9db354ed90762190bf70605a02d1f
12001         * g10/cipher.c (write_header): Use write_status_printf.
12002
12003         gpg: Simplify default_recipient().
12004         + commit 9f641430dcdecbd7ee205d407cb19bb4262aa95d
12005         * g10/pkclist.c (default_recipient): Use hexfingerprint.
12006
12007         gpg: Return an error from hexfingerprint on malloc error.
12008         + commit cd26c5482b10bee7658959ae913f2ddb83190587
12009         * g10/keyid.c (hexfingerprint): Return NULL on malloc failure.  Chnage
12010         all callers.
12011
12012         gpg: Remove some xmallocs.
12013         + commit 29119a6492eda5dd7920e45e7f2faa043d436591
12014         * g10/getkey.c (get_pubkeys): Do not use xmalloc.
12015
12016 2017-12-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
12017
12018         gpg: default-preference-list: prefer SHA512.
12019         + commit 8ede3ae29a39641a2f98ad9a4cf61ea99085a892
12020         * g10/keygen.c (keygen_set_std_prefs): when producing default internal
12021         personal-digest-preferences, keep the same order.  When publishing
12022         external preferences, state preference for SHA512 first.
12023
12024 2017-12-12  Werner Koch  <wk@gnupg.org>
12025
12026         Change backlog from 5 to 64 and provide option --listen-backlog.
12027         + commit c81a447190d2763ac4c64b2e74e22e824da8aba3
12028         * agent/gpg-agent.c (oListenBacklog): New const.
12029         (opts): New option --listen-backlog.
12030         (listen_backlog): New var.
12031         (main): Parse new options.
12032         (create_server_socket): Use var instead of 5.
12033         * dirmngr/dirmngr.c: Likewise.
12034         * scd/scdaemon.c: Likewise.
12035
12036         build: New configure option --enable-run-gnupg-user-socket.
12037         + commit 17efcd2a2acdc3b7f00711272aa51e5be2476921
12038         * configure.ac: (USE_RUN_GNUPG_USER_SOCKET): New ac_define.
12039         * common/homedir.c (_gnupg_socketdir_internal): Add extra directories.
12040
12041 2017-12-11  Werner Koch  <wk@gnupg.org>
12042
12043         dirmngr: Check for WKD support at session end.
12044         + commit 20b52be9ca29b0bc843fc68a279cb72728ede72f
12045         * dirmngr/domaininfo.c (insert_or_update): Copy the name.
12046         * dirmngr/misc.c (copy_stream): Allow arg OUT to be NULL.
12047         * dirmngr/server.c (set_error): Protect CTX.
12048         (dirmngr_status): Protect against missing ASSUAN_CTX.
12049         (dirmngr_status_help): Ditto.
12050         (dirmngr_status_printf): Ditto.
12051         (cmd_wkd_get): Factor code out to ...
12052         (proc_wkd_get): new func.  Support silent operation with no CTX.
12053         (task_check_wkd_support): New.
12054
12055         dirmngr: Add a background task framework.
12056         + commit f2997adee0455c8c0fa391a853ec1b0c9fc43342
12057         * dirmngr/workqueue.c: New.
12058         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new file.
12059         * dirmngr/server.c (server_local_s): New field session_id.
12060         (cmd_wkd_get): Add a task.
12061         (task_check_wkd_support): New stub function.
12062         (cmd_getinfo): New sub-commands "session_id" and "workqueue".
12063         (start_command_handler): Add arg session_id and store it in
12064         SERVER_LOCAL.
12065         (dirmngr_status_helpf): New.
12066         * dirmngr/dirmngr.h (wqtask_t): New type.
12067         * dirmngr/dirmngr.c (main): Pass 0 as session_id to
12068         start_command_handler.
12069         (start_connection_thread): Introduce a session_id and pass it to
12070         start_command_handler.  Run post session tasks.
12071         (housekeeping_thread): Run global workqueue tasks.
12072
12073         dirmngr: Limit the number of cached domains for WKD.
12074         + commit 7a663c296e687f12ccd9a21d414de780feb4dfcf
12075         * dirmngr/domaininfo.c (MAX_DOMAINBUCKET_LEN): New.
12076         (insert_or_update): Limit the length of a bucket chain.
12077         (domaininfo_print_stats): Print just one summary line.
12078
12079         (cherry picked from commit 26f08343fbccdbaa177c3507a3c5e24a5cf94a2d)
12080
12081         dirmngr: Keep track of domains used for WKD queries.
12082         + commit 6c1dcd79cf0977844179d9a7b189c10af5e42a7e
12083         * dirmngr/domaininfo.c: New file.
12084         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
12085         * dirmngr/server.c (cmd_wkd_get): Check whether the domain is already
12086         known and tell domaininfo about the results.
12087
12088         Adjust for changed macro names in libgpg-error master.
12089         + commit 34defc9bce91d66fa8c9481ebe6e78b612e570dc
12090         * common/logging.h (GPGRT_LOGLVL_): New replacement macros for older
12091         libgpg-error versions.
12092
12093 2017-12-08  NIIBE Yutaka  <gniibe@fsij.org>
12094
12095         agent: Fix description of shadow format.
12096         + commit 5c121d44443b0a96ec6ea82b90717e3dbafd2cc5
12097         * agent/keyformat.txt, agent/protect.c, agent/t-protect.c: Fix.
12098
12099 2017-12-07  Werner Koch  <wk@gnupg.org>
12100
12101         build: Do not define logging.h constants for libgpg-error dev versions.
12102         + commit 2fedf8583bcc493f587c90bc9632d25dfd10bd10
12103         * common/logging.h [GPGRT_LOG_WITH_PREFIX]: Do not define the log
12104         constants.
12105
12106 2017-12-07  NIIBE Yutaka  <gniibe@fsij.org>
12107
12108         agent: Change intialization of assuan socket system hooks.
12109         + commit b9677ba16f6b386896781a751e4b2fc839e3ec81
12110         * agent/gpg-agent.c (initialize_modules): Add hook again.
12111         (main): Remove setting of the system houk but add scoket system hook
12112         setting after assuan initialization.
12113
12114 2017-12-06  NIIBE Yutaka  <gniibe@fsij.org>
12115
12116         agent: Set assuan system hooks before call of assuan_sock_init.
12117         + commit 1524ba9656f0205d8c6ef504f773b832a7a12ab9
12118         * agent/gpg-agent.c (initialize_modules): Move assuan_set_system_hooks.
12119         (main): ... here, just before assuan_sock_init.
12120
12121 2017-12-04  NIIBE Yutaka  <gniibe@fsij.org>
12122             Damien Goutte-Gattat  <dgouttegattat@incenp.org>
12123
12124         g10: Fix regexp sanitization.
12125         + commit 0d0b9eb0d4f99e8d293a4ce4b90921a879905115
12126         * g10/trustdb.c (sanitize_regexp): Only escape operators.
12127
12128 2017-11-27  Werner Koch  <wk@gnupg.org>
12129
12130         Use the gpgrt log functions if possible.
12131         + commit b56dfdfc1865ceb7c3c025d79996e049faee7fdf
12132         * common/logging.c: Do not build any code if we can use the gpgrt_log
12133         functions.
12134         (log_logv_with_prefix): Rename to log_logv_prefix and change order of
12135         args so that this function matches its printf like counterpart
12136         gpgrt_logv_prefix.  Change all callers.
12137         (log_debug_with_string): Rename to log_debug_string. Change all
12138         callers.
12139         (log_printhex): Move first arg to end so that this function matches
12140         its printf like counterpart gpgrt_log_printhex.  Change all callers.
12141         * common/logging.h: Divert to gpgrt/libgpg-error if we can use the
12142         gpgrt_log functions.
12143         (bug_at): Add inline versions if we can use the gpgrt_log functions.
12144         * configure.ac (GPGRT_ENABLE_LOG_MACROS): Add to AH_BOTTOM.
12145         (mycflags): Add -Wno-format-zero-length.
12146
12147 2017-11-26  Werner Koch  <wk@gnupg.org>
12148
12149         gpg: Do not read from uninitialized memory with --list-packets.
12150         + commit 4cf3cc6e3d48c8400466ca29c3f1c22ed2da6c2c
12151         * g10/parse-packet.c (parse_plaintext): Fill up the allocated NAME.
12152
12153 2017-11-24  Werner Koch  <wk@gnupg.org>
12154
12155         agent: New option --auto-expand-secmem.
12156         + commit 18af15249de5f826c3fa8d1d40e876734adcd0cf
12157         * agent/gpg-agent.c (oAutoExpandSecmem): New enum value.
12158         (opts): New option --auto-expand-secmem.
12159         (main): Implement that option.
12160
12161 2017-11-22  Werner Koch  <wk@gnupg.org>
12162
12163         gpg: Fix memory leaking for long inputs via --command-fd.
12164         + commit ea28ea18f3ee6c9f5e69986f39848398b58e242e
12165         * g10/cpr.c (do_get_from_fd): Free the old buffer.
12166
12167 2017-11-21  NIIBE Yutaka  <gniibe@fsij.org>
12168
12169         scd: Enable card removal check after select_application.
12170         + commit 0bb7fd0cab2d53cd0d44b21301b23edfe817e66b
12171         * scd/apdu.c (open_ccid_reader): Fix error handling of ccid_get_atr.
12172         * scd/app.c (select_application): Always kick the loop if new APP.
12173         * scd/ccid-driver.c (ccid_open_usb_reader): Don't setup at open.
12174         (ccid_slot_status): Setup interrupt transfer when !ON_WIRE.
12175
12176 2017-11-20  Werner Koch  <wk@gnupg.org>
12177
12178         Release 2.2.3.
12179         + commit 97f4feaaca8da4dcf1ca09a2016693155016f06b
12180
12181
12182         build: Use -Werror only for the check.
12183         + commit 04d9833e71cc9d0c087faec091c29b0b6cf69488
12184         * configure.ac: Do not add -Werror to mycflags.
12185
12186         gpg-agent: Avoid getting stuck in shutdown pending state.
12187         + commit 7ffedfab8909a45a4b0347a5f7b52222e8439f1d
12188         * agent/gpg-agent.c (handle_connections): Always check inotify fds.
12189
12190 2017-11-20  NIIBE Yutaka  <gniibe@fsij.org>
12191
12192         agent: Use clock or clock_gettime for calibration.
12193         + commit 760aa8aadafb747f33a1461ab0c2570b5ae43716
12194         * agent/protect.c (calibrate_get_time): Use clock or clock_gettime.
12195
12196         build: Check -Wlogical-op flag availability with -Werror.
12197         + commit 3ecd1a41be7c880976987d13e88342c98f37e064
12198         * configure.ac: Use -Werror.
12199
12200         build: BSD make support for yat2m.
12201         + commit e1984969cac06a88c7e6f5e49e5c3104d10a847d
12202         * configure.ac (YAT2M): Only define when found.
12203         * doc/Makefile.am: Portability fix.
12204
12205 2017-11-17  Werner Koch  <wk@gnupg.org>
12206
12207         dirmngr: Fix double free of a hash context in the error case.
12208         + commit 2aa106d6a4e2b09c257e8d769895d93ebb7f7edf
12209         * dirmngr/crlcache.c: Clearly document that this fucntions takes
12210         ownership of MD.
12211         (abort_sig_check): Allow NULL for MD.
12212         (crl_parse_insert): Immediately set MD to NULL.  Remove check for md
12213         before a calling abort_sig_check.
12214
12215 2017-11-15  Werner Koch  <wk@gnupg.org>
12216
12217         assuan: Fix exponential decay for first second.
12218         + commit 0cfdd3b57d592fb6baa7dafe8fde124e8a6c7798
12219         * common/asshelp.c (wait_for_sock): Round SECSLEFT.
12220         * dirmngr/dirmngr.c (main): Take care of --debug-wait also in dameon
12221         mode.
12222         * common/sysutils.c (gnupg_usleep) [HAVE_NANOSLEEP]: Fix nanosleep use.
12223
12224         common: Change log_clock to printf style.
12225         + commit 8704304699bcbc1c10d0315ec7d25a1ae05c9905
12226         * common/logging.c (log_clock): Use do_logv.
12227
12228         common: Tweak new code to keep already translated strings.
12229         + commit 4a7fe9a596b639a0edb08502f20cb293129e5a33
12230         * common/asshelp.c (wait_for_sock): Replace NAME by WHICH and adjust
12231         caller.  Revert to use the former strings.
12232
12233 2017-11-15  Andre Heinecke  <aheinecke@intevation.de>
12234
12235         w32: Fix default registry path.
12236         + commit 4f5afaf1fdb5cb13859aca390ccb5a1ba1dba00c
12237         * configure.ac (GNUPG_REGISTRY_DIR): Remove leading backslash.
12238
12239 2017-11-15  Werner Koch  <wk@gnupg.org>
12240
12241         gpg: Repurpose the ISO defined DO "sex" to "salutation".
12242         + commit 166f3f9ec40888e10cb0c51017944bfc57503fc1
12243         * g10/card-util.c (current_card_status): String changes.
12244         (change_sex): Description change.
12245         (cmds): Add "salutation"; keep "sex" as an alias.
12246
12247 2017-11-15  Andre Heinecke  <aheinecke@intevation.de>
12248
12249         gpgtar: Prefer --set-filename over implicit name.
12250         + commit 878b8bfdcc3a8becfc46b9287a2d14cd3c875f28
12251         * tools/gpgtar-extract.c: Prefer opt.filename over filename
12252         for the directory prefix.
12253
12254 2017-11-15  Werner Koch  <wk@gnupg.org>
12255
12256         gpg: Print AKL info only in verbose mode.
12257         + commit b062ea5bc25157c942047b3fe7f5182a06106340
12258         * g10/getkey.c (get_pubkey_byname): Print info only in verbose mode.
12259
12260 2017-11-14  Werner Koch  <wk@gnupg.org>
12261
12262         dirmngr: Check for WKD support at session end.
12263         + commit d4e2302d8f4a1ff52d56da4f8e3a5d1c6303822d
12264         * dirmngr/domaininfo.c (insert_or_update): Copy the name.
12265         * dirmngr/misc.c (copy_stream): Allow arg OUT to be NULL.
12266         * dirmngr/server.c (set_error): Protect CTX.
12267         (dirmngr_status): Protect against missing ASSUAN_CTX.
12268         (dirmngr_status_help): Ditto.
12269         (dirmngr_status_printf): Ditto.
12270         (cmd_wkd_get): Factor code out to ...
12271         (proc_wkd_get): new func.  Support silent operation with no CTX.
12272         (task_check_wkd_support): New.
12273
12274         dirmngr: Add a background task framework.
12275         + commit 96a4fbecd1acf946dcde20bef4752c539dae196b
12276         * dirmngr/workqueue.c: New.
12277         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new file.
12278         * dirmngr/server.c (server_local_s): New field session_id.
12279         (cmd_wkd_get): Add a task.
12280         (task_check_wkd_support): New stub function.
12281         (cmd_getinfo): New sub-commands "session_id" and "workqueue".
12282         (start_command_handler): Add arg session_id and store it in
12283         SERVER_LOCAL.
12284         (dirmngr_status_helpf): New.
12285         * dirmngr/dirmngr.h (wqtask_t): New type.
12286         * dirmngr/dirmngr.c (main): Pass 0 as session_id to
12287         start_command_handler.
12288         (start_connection_thread): Introduce a session_id and pass it to
12289         start_command_handler.  Run post session tasks.
12290         (housekeeping_thread): Run global workqueue tasks.
12291
12292 2017-11-14  Andre Heinecke  <aheinecke@intevation.de>
12293
12294         sm, w32: Fix initial keybox creation.
12295         + commit 5ecef193bc2144e6d51a6bd5727bfd08a0d28b66
12296         * sm/keydb.c (maybe_create_keybox): Open new keybox in bin mode.
12297
12298 2017-11-14  Werner Koch  <wk@gnupg.org>
12299
12300         dirmngr: Limit the number of cached domains for WKD.
12301         + commit 26f08343fbccdbaa177c3507a3c5e24a5cf94a2d
12302         * dirmngr/domaininfo.c (MAX_DOMAINBUCKET_LEN): New.
12303         (insert_or_update): Limit the length of a bucket chain.
12304         (domaininfo_print_stats): Print just one summary line.
12305
12306 2017-11-13  Werner Koch  <wk@gnupg.org>
12307
12308         dirmngr: Keep track of domains used for WKD queries.
12309         + commit 65038e6852185c20413d8f6602218ee636413b77
12310         * dirmngr/domaininfo.c: New file.
12311         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
12312         * dirmngr/server.c (cmd_wkd_get): Check whether the domain is already
12313         known and tell domaininfo about the results.
12314
12315         gpg-agent: Avoid getting stuck in shutdown pending state.
12316         + commit 5d83eb9226c0ce608ec284d8c9bc22ce84a00c25
12317         * agent/gpg-agent.c (handle_connections): Always check inotify fds.
12318
12319 2017-11-13  NIIBE Yutaka  <gniibe@fsij.org>
12320
12321         tests: Handle the case with DISABLE_REGEX.
12322         + commit 80b904543486a2f12087bc34a6049ede4eb75940
12323         * tests/openpgp/Makefile.am [DISABLE_REGEX] (EXTRA_DIST, XTESTS):
12324           Conditionalize.
12325         * tests/openpgp/all-tests.scm (all-tests): Input file is Makefile.
12326
12327 2017-11-13  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
12328
12329         tests: Run the trust-pgp-4 test again.
12330         + commit a1fe3708d0894c138f6dd75d2a6bd22c64359172
12331         * tests/openpgp/Makefile.am (XTESTS): Add trust-pgp-4.scm.
12332         (EXTRA_DIST): Remove the test file from EXTRA_DIST.
12333
12334 2017-11-09  NIIBE Yutaka  <gniibe@fsij.org>
12335             Damien Goutte-Gattat  <dgouttegattat@incenp.org>
12336
12337         g10: Fix regexp sanitization.
12338         + commit ccf3ba92087e79abdeaa0208795829b431c6f201
12339         * g10/trustdb.c (sanitize_regexp): Only escape operators.
12340
12341 2017-11-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
12342
12343         assuan: Use exponential decay for first 1s of spinlock.
12344         + commit 149041b0b917f4298239fe18b5ebd5ead71584a6
12345         * common/asshelp.c (wait_for_sock): instead of checking the socket
12346         every second, we check 10 times in the first second (with exponential
12347         decay).
12348
12349         assuan: Reorganize waiting for socket.
12350         + commit 0471ff9d3bf8d6b9a359f3c426d70d0935066907
12351         * common/asshelp.c (wait_for_sock): New function, collecting
12352         codepaths from...
12353         (start_new_gpg_agent) here and...
12354         (start_new_dirmngr) here.
12355
12356 2017-11-07  Werner Koch  <wk@gnupg.org>
12357
12358         Release 2.2.2.
12359         + commit 5bd515005032f9340bd73e4346bbd0aef8518074
12360
12361
12362         dirmngr: Reduce default LDAP timeout to 15 seconds.
12363         + commit 30f21f8b0fa6844a9bba3f24dc41b3ac32170109
12364         * dirmngr/dirmngr.c (DEFAULT_LDAP_TIMEOUT): Change to 15.
12365         * dirmngr/dirmngr_ldap.c (DEFAULT_LDAP_TIMEOUT): Ditto.
12366
12367         (cherry picked from commit ab7ac827041b5cd97bbca7a75b0930072dd6611f)
12368
12369         dirmngr: Reduce default LDAP timeout to 15 seconds.
12370         + commit ab7ac827041b5cd97bbca7a75b0930072dd6611f
12371         * dirmngr/dirmngr.c (DEFAULT_LDAP_TIMEOUT): Change to 15.
12372         * dirmngr/dirmngr_ldap.c (DEFAULT_LDAP_TIMEOUT): Ditto.
12373
12374         speedo: Include software versions in the W32 README.
12375         + commit 23bfac6d1a8bd2d0af5a6fac3ba3a6e986d6c9e8
12376         (cherry picked from commit f9f72ffbfa9fd7d1a7a1823697d116d76155b407)
12377
12378 2017-11-07  Ineiev  <ineiev@gnu.org>
12379
12380         po: Update Russian translation.
12381         + commit 1941287c9d2c9e666bad1bd330db169f0e3d6b6c
12382
12383
12384 2017-11-07  Werner Koch  <wk@gnupg.org>
12385
12386         speedo: Include software versions in the W32 README.
12387         + commit f9f72ffbfa9fd7d1a7a1823697d116d76155b407
12388
12389
12390 2017-11-07  NIIBE Yutaka  <gniibe@fsij.org>
12391
12392         po: Update Japanese translation.
12393         + commit 96d441b315ec5c9f329596cfda28ac13a8bfa21a
12394
12395
12396         agent: Use clock or clock_gettime for calibration.
12397         + commit 380bce13d94ff03c96e39ac1d834f382c5c730a1
12398         * agent/protect.c (calibrate_get_time): Use clock or clock_gettime.
12399
12400 2017-11-06  Werner Koch  <wk@gnupg.org>
12401
12402         tests: Minor imporvement in agent invocation.
12403         + commit 42308224d1fce64c666aed2be5eb4ef42e8aced4
12404         * tests/openpgp/defs.scm (create-gpghome): Add s2k-count.
12405
12406         agent: New GETINFO sub-commands "s2k_count_cal" and "s2k_time".
12407         + commit 3607ab2cf382296cb398a92d5ec792239960bf7b
12408         * agent/command.c (cmd_getinfo): New sub-commands.
12409         * agent/protect.c (get_standard_s2k_count): Factor some code out to ...
12410         (get_calibrated_s2k_count): new.
12411         (get_standard_s2k_time): New.
12412
12413         (cherry picked from commit 52d41c8b0f4af6278d18d8935399ddad16a26856)
12414
12415         agent: New option --s2k-count.
12416         + commit 78a6d0ce88ae14d8324fbab3aee3286b17e49259
12417         * agent/agent.h (opt): New field 's2k_count'.
12418         * agent/gpg-agent.c (oS2KCount): New enum value.
12419         (opts): New option --s2k-count.
12420         (parse_rereadable_options): Set opt.s2k_count.
12421
12422         agent: New GETINFO sub-commands "s2k_count_cal" and "s2k_time".
12423         + commit 52d41c8b0f4af6278d18d8935399ddad16a26856
12424         * agent/command.c (cmd_getinfo): New sub-commands.
12425         * agent/protect.c (get_standard_s2k_count): Factor some code out to ...
12426         (get_calibrated_s2k_count): new.
12427         (get_standard_s2k_time): New.
12428
12429         agent: New option --s2k-count.
12430         + commit f7212f1d11aad5d910d2c77b2e5c6ab31a0e786e
12431         * agent/agent.h (opt): New field 's2k_count'.
12432         * agent/gpg-agent.c (oS2KCount): New enum value.
12433         (opts): New option --s2k-count.
12434         (parse_rereadable_options): Set opt.s2k_count.
12435
12436 2017-11-06  NIIBE Yutaka  <gniibe@fsij.org>
12437
12438         g10: Unattended key generation "Key-Grip" and "Subkey-Grip".
12439         + commit 680161647ad56d1ca92988f80bcc4d6fcb20b1eb
12440         * g10/keygen.c (pSUBKEYGRIP): New.
12441         (read_parameter_file): Add "Key-Grip" and "Subkey-Grip".
12442         (do_generate_keypair): Support pSUBKEYGRIP.
12443
12444         g10: Simplify "factory-reset" procedure.
12445         + commit f183b9768b42a6792c55a6129488bd8fbf5e8e6d
12446         * g10/card-util.c (factory_reset): Simplify.
12447
12448 2017-11-02  Ineiev  <ineiev@gnu.org>
12449
12450         po: Update Russian translation.
12451         + commit 6070f5a61d4d17ff437c69e1b708d49d107c22dc
12452
12453
12454 2017-11-02  Werner Koch  <wk@gnupg.org>
12455
12456         gpg: Introduce magic value 25519 to switch a card to ECC.
12457         + commit acb300543422c660c87ac2f0211a42f792a65cc4
12458         * g10/card-util.c (ask_card_keyattr): Handle special value 25519.
12459         (do_change_keyattr): Allow changing to cv25519/ed25519.
12460         (generate_card_keys): Ditto.
12461         (card_generate_subkey): Ditto.
12462
12463         gpg: Rename two card related functions in card-util.
12464         + commit de3a740c2e1156e58d2f94faa85c051740c8988e
12465         * g10/card-util.c (ask_card_rsa_keysize): Rename to ask_card_keyattr.
12466         (do_change_rsa_keysize): Rename to do_change_keyattr.
12467
12468         gpg: Unifiy the message for re-configuring cards.
12469         + commit 922bae8082f2f8d696ea0e7d7e9e4d986789bdfc
12470         * g10/card-util.c (ask_card_keyattr): Print "rsaNNNN".
12471
12472         gpg: Introduce magic value 25519 to switch a card to ECC.
12473         + commit ea09b6cded9d31a8ebd91878553c3eaa2b76e817
12474         * g10/card-util.c (show_keysize_warning): Slightly change the text.
12475         (ask_card_keyattr): Handle special value 25519.
12476         (do_change_keyattr): Allow changing to cv25519/ed25519.
12477         (generate_card_keys): Ditto.
12478         (card_generate_subkey): Ditto.
12479
12480 2017-11-02  NIIBE Yutaka  <gniibe@fsij.org>
12481
12482         agent: Fix returning GPG_ERR_NOT_FOUND wrongly.
12483         + commit 3da47d19df89d302c0ea25921f4bd8ce55705afe
12484         * agent/learncard.c (agent_handle_learn): Find SERIALNO.
12485
12486         agent: Fix returning GPG_ERR_NOT_FOUND wrongly.
12487         + commit 5e96fe72e477d09e35ccee48af0fd9ab2b3ae409
12488         * agent/learncard.c (agent_handle_learn): Find SERIALNO.
12489
12490 2017-11-01  NIIBE Yutaka  <gniibe@fsij.org>
12491
12492         common: Accept the Z-suffix for yymmddThhmmssZ format.
12493         + commit 0e5bd473a07f188615c4fce26b73bb452d689d68
12494         * common/gettime.c (isotime_p): Accept the Z suffix.
12495
12496 2017-11-01  Werner Koch  <wk@gnupg.org>
12497
12498         gpg: Rename two card related functions in card-util.
12499         + commit f795f4529d8ab5a05db1cc1960abd34390bfae1b
12500         * g10/card-util.c (ask_card_rsa_keysize): Rename to ask_card_keyattr.
12501         (do_change_rsa_keysize): Rename to do_change_keyattr.
12502
12503 2017-11-01  NIIBE Yutaka  <gniibe@fsij.org>
12504
12505         g10: Unattended key generation "Key-Grip" and "Subkey-Grip".
12506         + commit 6c63a04569c07c9c2817c7c530a92ccfa58155cc
12507         * g10/keygen.c (pSUBKEYGRIP): New.
12508         (read_parameter_file): Add "Key-Grip" and "Subkey-Grip".
12509         (do_generate_keypair): Support pSUBKEYGRIP.
12510
12511 2017-10-30  NIIBE Yutaka  <gniibe@fsij.org>
12512
12513         g10: Simplify "factory-reset" procedure.
12514         + commit d63b7966cdd72548c60466c620de5cd6104a779e
12515         * g10/card-util.c (factory_reset): Simplify.
12516
12517 2017-10-27  NIIBE Yutaka  <gniibe@fsij.org>
12518
12519         agent: Clean up pinentry access locking.
12520         + commit 3924e1442c6625a2b57573a1a634a5ec56b09a29
12521         * agent/agent.h (struct server_control_s): Rename PINENTRY_ACTIVE.
12522         * agent/call-pinentry.c (entry_owner): Remove.
12523         (agent_reset_query): Use thread private object of PINENTRY_ACTIVE.
12524         (unlock_pinentry): Add CTRL to arguments to access thread private.
12525         Check and decrement PINENTRY_ACTIVE for recursive use.
12526         (start_pinentry): Check and increment PINENTRY_ACTIVE for recursion.
12527         (agent_askpin): Follow the change of unlock_pinentry API.
12528         (agent_get_passphrase, agent_get_confirmation): Likewise.
12529         (agent_show_message, agent_popup_message_start): Likewise.
12530         (agent_popup_message_stop, agent_clear_passphrase): Likewise.
12531
12532         agent: Allow recursive use of pinentry.
12533         + commit 4738256f2e0d22302377c9ec7b2ae3999338e6c6
12534         * agent/agent.h (struct server_control_s): Add pinentry_level.
12535         * agent/call-pinentry.c (agent_popup_message_stop): Not clear
12536         ENTRY_CTX here.
12537         (unlock_pinentry): Handle recursion.  Clear ENTRY_CTX here.
12538         (start_pinentry): Allow recursive use.
12539
12540         agent: Clean up pinentry access locking.
12541         + commit fb7828676cc2c01047498898378711e049f73fee
12542         * agent/agent.h (struct server_control_s): Rename PINENTRY_ACTIVE.
12543         * agent/call-pinentry.c (entry_owner): Remove.
12544         (agent_reset_query): Use thread private object of PINENTRY_ACTIVE.
12545         (unlock_pinentry): Add CTRL to arguments to access thread private.
12546         Check and decrement PINENTRY_ACTIVE for recursive use.
12547         (start_pinentry): Check and increment PINENTRY_ACTIVE for recursion.
12548         (agent_askpin): Follow the change of unlock_pinentry API.
12549         (agent_get_passphrase, agent_get_confirmation): Likewise.
12550         (agent_show_message, agent_popup_message_start): Likewise.
12551         (agent_popup_message_stop, agent_clear_passphrase): Likewise.
12552
12553 2017-10-26  NIIBE Yutaka  <gniibe@fsij.org>
12554
12555         agent: Allow recursive use of pinentry.
12556         + commit 3b66a256e3760e88066ca11b7b49d924e42aa46b
12557         * agent/agent.h (struct server_control_s): Add pinentry_level.
12558         * agent/call-pinentry.c (agent_popup_message_stop): Not clear
12559         ENTRY_CTX here.
12560         (unlock_pinentry): Handle recursion.  Clear ENTRY_CTX here.
12561         (start_pinentry): Allow recursive use.
12562
12563         agent, tests: Support --disable-scdaemon build case.
12564         + commit 05cb87276c21c3a47226c75026fa46a955553dd9
12565         * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON.
12566         * tests/openpgp/defs.scm (create-gpghome): Likewise.
12567         * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise.
12568
12569         Fix comment of configure.
12570         + commit b13972dfbf7224478652038725ab0d2cb41b7303
12571         * configure.ac (BUILD_WITH_DIRMNGR): Comment fix.
12572
12573         agent, tests: Support --disable-scdaemon build case.
12574         + commit bf26c08b95389718ba07f12789d372c6f438134f
12575         * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON.
12576         * tests/openpgp/defs.scm (create-gpghome): Likewise.
12577         * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise.
12578
12579         Fix comment of configure.
12580         + commit 3549dce4f5a726f5350ac2f20d83ba9f84cc23b4
12581         * configure.ac (BUILD_WITH_DIRMNGR): Comment fix.
12582
12583 2017-10-24  Werner Koch  <wk@gnupg.org>
12584
12585         gpg: Avoid superfluous sig check info during import.
12586         + commit 84af859e391a757877c9a1d78e35face983e6d23
12587         * g10/key-check.c (print_info): New.
12588         (key_check_all_keysigs): Print sig checking results only in debug
12589         mode.  Prettify the stats info and suppress them in quiet mode.
12590
12591         build: New configure option --enable-werror.
12592         + commit 812fe29bff42cf7dbd07e0becc55b2ada340dd97
12593         * configure.ac: Implement that option.
12594
12595         build: Do not mess with CFLAGS in configure.
12596         + commit e417aaf69817fcb4a73c38077853dc940a2deabc
12597         * configure.ac: Do not mess with the user provided CFLAGS.
12598
12599 2017-10-24  Rainer Perske  <rainer.perske@uni-muenster.de>
12600
12601         sm: Do not expect X.509 keyids to be unique.
12602         + commit 1067403c8a7fb51decf30059e46901b5ee9f5b37
12603         * sm/certlist.c (gpgsm_find_cert): Add arg allow_ambiguous and use it.
12604         * sm/call-dirmngr.c (inq_certificate): Pass true to ALLOW_AMBIGUOUS
12605         (run_command_inq_cb): Ditto.
12606         * sm/gpgsm.c (main): Pass false.
12607         * sm/server.c (cmd_passwd): Pass false.
12608
12609 2017-10-24  Werner Koch  <wk@gnupg.org>
12610
12611         gpgconf: Ignore non-installed components with --apply-profile.
12612         + commit 6e808ae4700dc5e95bf4cc2d5c063df582c234d0
12613         * tools/gpgconf-comp.c (retrieve_options_from_program): Add arg
12614         only_installed.
12615         (gc_component_retrieve_options): Use this if we want to process all
12616         components.
12617
12618         gpg: Improve the "secret key available" notice in keyedit.c.
12619         + commit 560d85ecff4246133d185dc29395f07c918b5556
12620         * g10/keyedit.c (KEYEDIT_NEED_SUBSK): New.
12621         (cmds): Add this flag to keytocard, bkuptocard, expire, and passwd.
12622         (keyedit_menu): Check whether only subkeys are available and take care
12623         of that in the command check and in the HELP listing.  Also print a
12624         different notice if only subkeys are available.
12625
12626         gpg: Remove unused flags from keyedit.c.
12627         + commit 016538d82867c40a21bc7cbf44ec386f4699077f
12628         * g10/keyedit.c (KEYEDIT_NOT_SK, KEYEDIT_ONLY_SK): Remove.
12629         (cmds): Remove them.
12630
12631 2017-10-19  Werner Koch  <wk@gnupg.org>
12632
12633         gpg: Fix creating on-disk subkey with on-card primary key.
12634         + commit 44fb3fbc85b32552c91f32f099b6b246c12ce0cc
12635         * g10/keygen.c (generate_subkeypair): Ignore error code issued for
12636         trying to verify a card based key.
12637
12638         gpg: Print sec/sbb with --import-option import-show or show-only.
12639         + commit 2c7dccca9b617780a3ea760adf460bb3b77f90f3
12640         * g10/import.c (import_one): Pass FROM_SK to list_keyblock_direct.
12641
12642         gpg: Make --dry-run and show-only work for secret keys.
12643         + commit 68c8619114fd5f24cb6bfb9e0f25c428a8805323
12644         * g10/import.c (import_secret_one): Check for dry-run before
12645         transferring keys.
12646
12647 2017-10-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
12648
12649         dirmngr: Do not follow https-to-http redirects.
12650         + commit 1ba308aa0356a57c21c4c8c2dac75b4d62b8aac3
12651         * dirmngr/ks-engine-http.c (ks_http_fetch): Forbid redirects from
12652         a https URI to a http URI.
12653
12654 2017-10-19  NIIBE Yutaka  <gniibe@fsij.org>
12655
12656         g10: Fix find_and_check_key for multiple keyrings.
12657         + commit d07de3862710d88bc80d6f6c5ca8da5cf38ff0eb
12658         * g10/pkclist.c (find_and_check_key): Call get_validity on a specific
12659         keyblock.
12660
12661 2017-10-19  Werner Koch  <wk@gnupg.org>
12662
12663         gpg: Keep a lock during the read-update/insert cycle in import.
12664         + commit 7c73db3d31c6457dfbdc82a8dc89951c023f0603
12665         * g10/keydb.c (keydb_handle): New field 'keep_lock'.
12666         (keydb_release): Clear that flag.
12667         (keydb_lock): New function.
12668         (unlock_all): Skip if KEEP_LOCK is set.
12669         * g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if
12670         requested.
12671
12672         gpg: Improve keydb handling in the main import function.
12673         + commit 8448347b5bdee56e6f9938a93ea92fe4d3c8800c
12674         * g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ...
12675         (get_keyblock_byfprint_fast): .. new function.
12676         * g10/import.c (revocation_present): s/int rc/gpg_error_t err/.
12677         (import_one): Use get_keyblock_byfprint_fast to get the keyblock and a
12678         handle.  Remove the now surplus keyblock fetch in the merge branch.
12679
12680         gpg: Simplify keydb handling of the main import function.
12681         + commit 752cae6dd2ee8982a34c796a3f168ae538f7938c
12682         * g10/import.c (import_keys_internal): Return gpg_error_t instead of
12683         int.  Change var names.
12684         (import_keys_es_stream): Ditto.
12685         (import_one): Ditto.  Use a single keydb_new and simplify the use of
12686         of keydb_release.
12687
12688         sm: Fix colon listing of fields > 12 in crt records.
12689         + commit 1bf5cbd3ef01b7f5fdcfa30c882047b924dcf3f0
12690         * sm/keylist.c (print_capabilities): Move colon printing ...
12691         (list_cert_colon): to here.
12692
12693 2017-10-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
12694
12695         agent: Send pinentry the uid of connecting process where possible.
12696         + commit 28aa6890588cc108639951bb4bef03ac17743046
12697         * agent/agent.h (server_control_s): Add field 'client_uid'.
12698         * agent/call-pinentry.c (start_pinentry): Add uid field to assuan
12699         option "owner" sent to pinentry.
12700         * agent/command-ssh.c (peer_info_s): New static struct.
12701         (get_client_pid): Rename to...
12702         (get_client_info): Here, and extract uid in addition to pid.
12703         (start_command_handler_ssh): Use get_client_info() instead of
12704         get_client_pid().
12705         * agent/command.c (start_command_handler): Try assuan_get_peercred,
12706         and only fall back to assuan_get_pid when assuan_get_peercred fails.
12707
12708 2017-10-19  NIIBE Yutaka  <gniibe@fsij.org>
12709
12710         g10: Fix find_and_check_key for multiple keyrings.
12711         + commit 995c46ea77cff5b99b2fca17b547d6525a4f227e
12712         * g10/pkclist.c (find_and_check_key): Call get_validity on a specific
12713         keyblock.
12714
12715 2017-10-18  Werner Koch  <wk@gnupg.org>
12716
12717         gpg: Keep a lock during the read-update/insert cycle in import.
12718         + commit 645f30ad310a518a863eb7bd3e11251a7e7f2eca
12719         * g10/keydb.c (keydb_handle): New field 'keep_lock'.
12720         (keydb_release): Clear that flag.
12721         (keydb_lock): New function.
12722         (unlock_all): Skip if KEEP_LOCK is set.
12723         * g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if
12724         requested.
12725
12726         gpg: Improve keydb handling in the main import function.
12727         + commit 3bb06531d38b85be295308e826a50a1a7ba935ec
12728         * g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ...
12729         (get_keyblock_byfprint_fast): .. new function.
12730         * g10/import.c (revocation_present): s/int rc/gpg_error_t err/.
12731         (import_one): Use get_keyblock_byfprint_fast to get the keyblock and a
12732         handle.  Remove the now surplus keyblock fetch in the merge branch.
12733
12734         gpg: Simplify keydb handling of the main import function.
12735         + commit d353287f721ffb56627d55bef04cc770ff0a8681
12736         * g10/import.c (import_keys_internal): Return gpg_error_t instead of
12737         int.  Change var names.
12738         (import_keys_es_stream): Ditto.
12739         (import_one): Ditto.  Use a single keydb_new and simplify the use of
12740         of keydb_release.
12741
12742         gpg: Fix wrong Tofu DB consistency check.
12743         + commit 18e5946aef458cd95fdce4a04e144747b52b0472
12744         * g10/tofu.c (build_conflict_set): Do not assume MAX_FINGERPRINT_LEN
12745         is the size of the fingerprint.
12746
12747 2017-10-17  Werner Koch  <wk@gnupg.org>
12748
12749         gpg,sm: New option --with-key-screening.
12750         + commit 825abec0e7f38667a34dce3025fc2f3a05001dde
12751         * common/pkscreening.c: New.
12752         * common/pkscreening.h: New.
12753         * common/Makefile.am (common_sources): Add them.
12754         * g10/gpg.c (opts): New option --with-key-screening.
12755         * g10/options.h (struct opt): New field with_key_screening.
12756         * g10/keylist.c: Include pkscreening.h.
12757         (print_pk_screening): New.
12758         (list_keyblock_print): Call it.
12759         (print_compliance_flags): Call it.
12760         * sm/gpgsm.c (opts): New option --with-key-screening.
12761         * sm/gpgsm.h (scruct opt): New field with_key_screening.
12762         * sm/keylist.c:  Include pkscreening.h.
12763         (print_pk_screening): New.
12764         (print_compliance_flags): Call it.  Add new arg cert.
12765         (list_cert_colon): Pass arg cert
12766         (list_cert_std): Call print_pk_screening.
12767         * sm/fingerprint.c (gpgsm_get_rsa_modulus): New.
12768
12769         sm: Fix colon listing of fields > 12 in crt records.
12770         + commit 69e579d78545aee5096a5d170e1cb9e511a09a90
12771         * sm/keylist.c (print_capabilities): Move colon printing ...
12772         (list_cert_colon): to here.
12773
12774 2017-10-06  Neal H. Walfield  <neal@g10code.com>
12775
12776         gpg: Fix comparison.
12777         + commit 1ed21eee79749b976b4a935f2279b162634e9c5e
12778         * g10/gpgcompose.c (literal_name): Complain if passed zero arguments,
12779         not one or fewer.
12780
12781 2017-09-28  Werner Koch  <wk@gnupg.org>
12782
12783         gpg: Workaround for junk after --trusted-key.
12784         + commit b509d81cab030cca6abf0d878e1fc884eda344e6
12785         * g10/trust.c (register_trusted_key): Cut off everthing starting as a
12786         hash sign.
12787
12788 2017-09-27  Werner Koch  <wk@gnupg.org>
12789
12790         gpg: Prepare for a longer fingerprint.
12791         + commit ecbbafb88d920e713439b6b1b8e1b41a6f8d0e38
12792         * g10/card-util.c (change_cafpr): Use MAX_FINGERPRINT_LEN.
12793         * g10/cipher.c (write_header): Use snprintf.
12794         * g10/gpg.h (MAX_FINGERPRINT_LEN): Change to 32.
12795         (MAX_FORMATTED_FINGERPRINT_LEN): Change to 59
12796         * g10/keyid.c (format_hexfingerprint): Add v5 fingerprint format.
12797         * g10/tofu.c (get_policy): Use MAX_FINGERPRINT_LEN for the buffer but
12798         keep the raw length for now.
12799
12800         common: Add constant KEYGRIP_LEN.
12801         + commit 76c80021d4da0755dbb04bd5d42f32015cba0b9a
12802         * common/util.h (KEYGRIP_LEN): New.
12803         * g10/call-agent.c (agent_probe_any_secret_key): Use that constant.
12804         * g10/keyid.c (keygrip_from_pk): Ditto.
12805
12806         gpg: Let --debug clock time sign and verify.
12807         + commit 6aa4478c78cb34cf3d0ae5c752525110947bd247
12808         * configure.ac (ENABLE_LOG_CLOCK): New ac_define and option.
12809         * common/logging.c (log_clock): Use ENABLE_LOG_CLOCK to enable
12810         timestamp printing.
12811         * g10/call-agent.c (agent_pksign): Time signing.
12812         * g10/sig-check.c (check_signature_end_simple): Time verification.
12813
12814 2017-09-26  NIIBE Yutaka  <gniibe@fsij.org>
12815
12816         g10: Select a secret key by checking availability under gpg-agent.
12817         + commit 0a76611294998ae34b9d9ebde484ef8ad3a9a3a6
12818         * g10/getkey.c (finish_lookup): Add WANT_SECRET argument to confirm
12819         by agent_probe_secret_key.
12820         (get_pubkey_fromfile, lookup): Supply WANT_SECRET argument.
12821
12822 2017-09-20  NIIBE Yutaka  <gniibe@fsij.org>
12823
12824         agent: Fix cancellation handling for scdaemon.
12825         + commit 9f5e50e7c85aa8b847d38010241ed570ac114fc3
12826         * agent/call-scd.c (cancel_inquire): Remove.
12827         (agent_card_pksign, agent_card_pkdecrypt, agent_card_writekey)
12828         (agent_card_scd): Don't call cancel_inquire.
12829
12830         scd: Distinguish cancel by user and protocol error.
12831         + commit 2396055c096884d521c26b76f26263a146207c24
12832         * scd/apdu.h (SW_HOST_CANCELLED): New.
12833         * scd/apdu.c (host_sw_string): Support SW_HOST_CANCELLED.
12834         (pcsc_error_to_sw): Return SW_HOST_CANCELLED for PCSC_E_CANCELLED.
12835         * scd/iso7816.c (map_sw): Return GPG_ERR_INV_RESPONSE for
12836         SW_HOST_ABORTED and GPG_ERR_CANCELED for SW_HOST_CANCELLED.
12837
12838 2017-09-19  NIIBE Yutaka  <gniibe@fsij.org>
12839
12840         common: Accept the Z-suffix for yymmddThhmmssZ format.
12841         + commit ba8afc4966cca1f6aaf9b2a9bfc3220782306c2b
12842         * common/gettime.c (isotime_p): Accept the Z suffix.
12843
12844 2017-09-19  Werner Koch  <wk@gnupg.org>
12845
12846         Release 2.2.1.
12847         + commit 355ca9e9498740fb6294eec451507b4891ae01ec
12848
12849
12850 2017-09-19  NIIBE Yutaka  <gniibe@fsij.org>
12851
12852         common: Fix gnupg_wait_processes.
12853         + commit eeb3da6eb717ed6a1a1069a7611eb37503e8672d
12854         * common/exechelp-posix.c (gnupg_wait_processes): Loop for r_exitcodes
12855         even if we already see an error.
12856
12857 2017-09-18  Werner Koch  <wk@gnupg.org>
12858
12859         dirmngr: Use system certs if --hkp-cacert is not used.
12860         + commit df692a6167be5486f9a29da003a00292fd895176
12861         * dirmngr/certcache.c (any_cert_of_class): New var.
12862         (put_cert): Set it.
12863         (cert_cache_deinit): Clear it.
12864         (cert_cache_any_in_class): New func.
12865         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Add hack to
12866         override empty list of HKP certs.
12867
12868         wks: Create a new user id if provider wants mailbox-only.
12869         + commit 50c8b6c88f5d9f4b6c4e9c03aee31fe29afa94b8
12870         * tools/gpg-wks-client.c (get_key): Add arg 'exact'.
12871         (add_user_id): New.
12872         (command_send): Create new user id.
12873
12874         wks: Send only the newest UID to the server.
12875         + commit 7f7f5d06fa5aa3a3c5ab8d2e59ee76207bfdeaa0
12876         * tools/wks-util.c (list_key_status_cb): Rename to key_status_cb.
12877         (wks_filter_uid): New.
12878         (wks_list_key): Allow FPR to be NULL.  Return an error if no
12879         fingerprint was found.
12880         * tools/gpg-wks-server.c (process_new_key)
12881         (check_and_publish): Remove now useless extra check for FPR.
12882         * tools/gpg-wks-client.c (command_check): Ditto.
12883         (command_send): Filter out the newest uid.
12884
12885         wks: Print the UID creation time with gpg-wks-client --check.
12886         + commit a0035986a8615df056182bb9af775b8b7b22003d
12887         * tools/gpg-wks.h (uidinfo_list_s): Add field 'created'.
12888         * tools/wks-util.c (append_to_uidinfo_list): Add arf 'created'.
12889         (wks_list_key): Pass timestamp to append_to_uidinfo_list.
12890         * tools/gpg-wks-client.c (command_check): Print UID creation time.
12891
12892         wks: Use dedicated type to convey user ids.
12893         + commit 4e0696de897cac6a34d55a69d8889faf26f1a923
12894         * tools/gpg-wks.h (uidinfo_list_s, uidinfo_list_t): New.
12895         * tools/wks-util.c (append_to_uidinfo_list): New.
12896         (free_uidinfo_list): New.
12897         (wks_list_key): Change arg r_mboxes to uidinfo_list_t.  Use
12898         append_to_uidinfo_list.
12899         * tools/gpg-wks-server.c (sserver_ctx_s): Replace strlist_t by
12900         uidinfo_list_t.
12901         (process_new_key): Ditto.
12902         (check_and_publish): Ditto.
12903         (command_receive_cb): Replace free_strlist by free_uidinfo_list.
12904         * tools/gpg-wks-client.c (command_check): Replace strlist_t by
12905         uidinfo_list_t.  Also print user id in verbose mode.
12906
12907 2017-09-13  Werner Koch  <wk@gnupg.org>
12908
12909         gpgv: Initialize compliance checker.
12910         + commit 006ca124ed95845d43af8c14d7ab2bc085b47b4c
12911         * g10/gpgv.c (main): Call gnupg_initialize_compliance.
12912
12913 2017-09-12  Werner Koch  <wk@gnupg.org>
12914
12915         wks: Add hack for the broken posteo system.
12916         + commit a821b4f5567d02c3329c2b94a73dcbe12e6699a2
12917         * tools/gpg-wks-client.c (command_send): Additional hack for posteo.
12918         Check the protocol-version flag.
12919
12920         wks: Add new policy flag protocol-version.
12921         + commit 332c9eaa2a3c7cae90b389cdaa2c149c5595fb4d
12922         * tools/gpg-wks.h (policy_flags_s): Add field protocol_version.
12923         * tools/wks-util.c (wks_parse_policy): Add new policy flag.
12924
12925         gpg: Fix "Fix key generation with only an email part".
12926         + commit 8b5a2474f21dd4f1aa2a283e2f57d75e42742af5
12927         * g10/keygen.c (proc_parameter_file): Don't check the result of
12928         stpcpy.
12929
12930         wks: Use unencrypted draft-1 mode for posteo.de.
12931         + commit c65a7bba7331975d20910f90cf648b6ecc5410f0
12932         * tools/gpg-wks-client.c (command_send): Allow sending in draft-1
12933         mode.
12934
12935         tools: New function mime_maker_add_body_data.
12936         + commit 7d15ee88980f88ca62fc7de9492dd08e54d0f0f1
12937         * tools/mime-maker.c (mime_maker_add_body_data): New.
12938
12939 2017-09-11  Alon Bar-Lev  <alon.barlev@gmail.com>
12940
12941         sm: Move qualified.txt from datadir into sysconfdir.
12942         + commit 384a3748d9022b7ae3f629c13f92e204565fea3d
12943         * doc/Makefile.am: Move qualified.txt into examples.
12944         * doc/qualified.txt: Move into examples, remove trailing spaces.
12945         * doc/examples/README: Document qualified.txt.
12946         * doc/gpgsm.texi: Move qualified.txt from datadir into sysconfdir.
12947         * sm/qualified.c (read_list): Move qualified.txt from datadir into
12948         sysconfdir.
12949
12950 2017-09-11  NIIBE Yutaka  <gniibe@fsij.org>
12951
12952         tests: Fix a test which specifies expiration date.
12953         + commit a172759b5088ae086c0caa2e7d4d0ea346b28a90
12954         * tests/openpgp/quick-key-manipulation.scm: Fix expiration time
12955         comparison.
12956
12957         scd: Fix for large ECC keys.
12958         + commit 827abe01a72a50eab1cdcde78985b42a4a8480fb
12959         * scd/app-openpgp.c (do_decipher): Support larger length.
12960
12961 2017-09-11  Werner Koch  <wk@gnupg.org>
12962
12963         gpg: Fix key generation with only an email part.
12964         + commit 7089dcc54099a4909ce7d386c07ab87e1398e2eb
12965         * g10/keygen.c (proc_parameter_file): Special case the email only
12966         case.
12967
12968 2017-09-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
12969
12970         agent: compile-time configuration of s2k calibration.
12971         + commit 926d07c5fa05de05caef3a72b6fe156606ac0549
12972         * configure.ac: add --with-agent-s2k-calibration=MSEC, introduces
12973         AGENT_S2K_CALIBRATION (measured in milliseconds)
12974         * agent/protect.c (calibrate_s2k_count): Calibrate based on
12975         AGENT_S2K_CALIBRATION.
12976
12977         gpg: default to AES-256.
12978         + commit 73ff075204df09db5248170a049f06498cdbb7aa
12979         * g10/main.h (DEFAULT_CIPHER_ALGO): Prefer AES256 by default.
12980
12981         gpg: default to 3072-bit RSA keys.
12982         + commit 909fbca19678e6e36968607e8a2348381da39d8c
12983         * agent/command.c (hlp_genkey): update help text to suggest the use of
12984         3072 bits.
12985         * doc/wks.texi: Make example match default generation.
12986         * g10/keygen.c (DEFAULT_STD_KEY_PARAM): update to
12987         rsa3072/cert,sign+rsa3072/encr, and fix neighboring comment,
12988         (gen_rsa, get_keysize_range): update default from 2048 to 3072).
12989         * g10/keyid.c (pubkey_string): update comment so that first example
12990         is the default 3072-bit RSA.
12991
12992         gpgsm: default to 3072-bit keys.
12993         + commit 7955262151a5c755814dd23414e6804f79125355
12994         * doc/gpgsm.texi, doc/howto-create-a-server-cert.texi: : update
12995         default to 3072 bits.
12996         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): update default to
12997         3072 bits.
12998         * sm/certreqgen.c (proc_parameters): update default to 3072 bits.
12999         * sm/gpgsm.c (main): print correct default_pubkey_algo.
13000
13001 2017-09-08  NIIBE Yutaka  <gniibe@fsij.org>
13002
13003         tests: Fix a test which specifies expiration date.
13004         + commit 17f764dd4972a063fe09c4b9d2846e8efcb25c7a
13005         * tests/openpgp/quick-key-manipulation.scm: Fix expiration time
13006         comparison.
13007
13008 2017-08-29  NIIBE Yutaka  <gniibe@fsij.org>
13009
13010         scd: Fix for large ECC keys.
13011         + commit ff7ccd284c327a5b1c89603f157089177dac9d13
13012         * scd/app-openpgp.c (do_decipher): Support larger length.
13013
13014 2017-08-28  Werner Koch  <wk@gnupg.org>
13015
13016         Release 2.2.0.
13017         + commit 9d80fb8e000189e61c173c39f1e1ca417566a7fc
13018
13019
13020 2017-08-27  Werner Koch  <wk@gnupg.org>
13021             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
13022
13023         scd: Convey the correct length for Le.
13024         + commit 45d5f5800afe6613f338a26f361cb5e03e861129
13025         * scd/app-openpgp.c (determine_rsa_response): Round bits up.
13026
13027 2017-08-24  Werner Koch  <wk@gnupg.org>
13028
13029         gpg: Fix memory leak while running --check-trustdb.
13030         + commit 13821e15fb9bdddfce79d88731c0f151724b2371
13031         * g10/trustdb.c (update_min_ownertrust): Free PK.
13032
13033         gpg: Fix memory leak in sig-check.
13034         + commit b065a696344eac3007dbd5642143ecaaeebab43a
13035         * g10/sig-check.c (check_signature_over_key_or_uid): Remove useless
13036         condition.  Actually free when SIGNER was allocated by us.
13037
13038         build: Remove obsolete option from autogen.rc.
13039         + commit 02a5df614a369519ad7781f95dc977e24a0d4277
13040         * autogen.rc: Remove --enable-gpg2-is-gpg.
13041
13042 2017-08-23  Werner Koch  <wk@gnupg.org>
13043
13044         gpgconf: Swap "auto-key-retrieve" and "no-auto-key-retrieve".
13045         + commit 565e486b8028f9e3cc51ebc5202666b598042175
13046         * g10/gpg.c (gpgconf_list): Announce "auto-key-retrieve".
13047         (main): Simplify setting of KEYSERVER_AUTO_KEY_RETRIEVE.
13048         * tools/gpgconf-comp.c: Make "no-auto-key-retrieve" invisible.  Make
13049         "auto-key-retrieve" an expert option.
13050
13051         tests: Do not run trust-pgp-4.scm.
13052         + commit b917cb66b79597520788cd9264889942247a3377
13053         * tests/openpgp/Makefile.am (XTESTS): Remove test.
13054         (EXTRA_DIST): Add test file.
13055
13056         build: Change SWDB tag "gnupg21" to "gnupg22".
13057         + commit 008ae0bd868cb49ad4d67fc8c71707cd2a162137
13058         * configure.ac (GNUPG_SWDB_TAG): New ac_define.  Set it to "gnupg22".
13059         * tools/gpgconf.c (query_swdb): Use it.
13060         * build-aux/speedo.mk: Change tag "gnupg21" to "gnupg22".
13061         * Makefile.am (distcheck-hook): Ditto.
13062
13063 2017-08-23  Åka Sikrom  <a4@hush.com>
13064
13065         po: Update Norwegian translation.
13066         + commit fd0e5b60bed1cfc2aed7b2e13cc449f355eac051
13067
13068
13069 2017-08-23  Andre Heinecke  <aheinecke@intevation.de>
13070
13071         agent: Fix string translation for Windows.
13072         + commit 6158811304937b592601ef30c29c5a5cdbaa88ea
13073         * agent/agent.h (L_): Define agent_Lunderscore when simple
13074         gettext is used.
13075
13076 2017-08-22  NIIBE Yutaka  <gniibe@fsij.org>
13077
13078         po: Update Japanese translation.
13079         + commit e6fa6b0ce823effd721c807b2b292287af91c642
13080
13081
13082 2017-08-21  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
13083
13084         tests: Add tests for the PGP trust model.
13085         + commit c23a69970ba38edae9d3b2603825d18fbb732423
13086         * tests/openpgp/trust-pgp-1.scm: New file.
13087         * tests/openpgp/trust-pgp-2.scm: New file.
13088         * tests/openpgp/trust-pgp-3.scm: New file.
13089         * tests/openpgp/trust-pgp-4.scm: New file.
13090         * tests/openpgp/trust-pgp/common.scm: New file.
13091         * tests/openpgp/trust-pgp/scenario1.asc: New file.
13092         * tests/openpgp/trust-pgp/scenario2.asc: New file.
13093         * tests/openpgp/trust-pgp/scenario3.asc: New file.
13094         * tests/openpgp/trust-pgp/scenario4.asc: New file.
13095         * tests/openpgp/trust-pgp/alice.sec.asc: New file.
13096         * tests/openpgp/trust-pgp/bobby.sec.asc: New file.
13097         * tests/openpgp/trust-pgp/carol.sec.asc: New file.
13098         * tests/openpgp/trust-pgp/david.sec.asc: New file.
13099         * tests/openpgp/trust-pgp/frank.sec.asc: New file.
13100         * tests/openpgp/trust-pgp/grace.sec.asc: New file.
13101         * tests/openpgp/trust-pgp/heidi.sec.asc: New file.
13102         * tests/openpgp/Makefile.am (XTESTS): Add new tests.
13103         (TEST_FILES): Add new files.
13104         (EXTRA_DIST): Add new common file.
13105
13106         tests: Move some functions into a common module.
13107         + commit cbe54b28bf3610204e12c50c0606df37337a1156
13108         * tests/openpgp/tofu.scm (gettrust): Moved to the common defs.scm
13109         module.
13110         (checktrust): Likewise.
13111         * tests/openpgp/defs.scm (gettrust): New function.
13112         (checktrust): Likewise.
13113
13114         gpgconf: Make WoT settings configurable by gpgconf.
13115         + commit 0161225457e0609509d0d5f4b80a60a1071b4b48
13116         * tools/gpgconf-comp.c (gc_options_gpg): Add max-cert-depth,
13117         completes-needed, and marginals-needed options.
13118         * g10/gpg.c (gpgconf_list): Likewise.
13119
13120 2017-08-21  Justus Winter  <justus@g10code.com>
13121
13122         gpgscm: Fix -Wimplicit-fallthrough warnings.
13123         + commit 6e596b2a745ae7a75a69038cf00ab4bbae1cebaa
13124         * tests/gpgscm/scheme.c (CASE): Rearrange so that the case statement
13125         is at the front.
13126         (Eval_Cycle): Improve fallthrough annotations.
13127
13128 2017-08-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
13129
13130         gpg: default to --no-auto-key-retrieve.
13131         + commit e6f84116abca2ed49bf14b2e28c3c811a3717227
13132         * g10/gpg.c (main): remove KEYSERVER_AUTO_KEY_RETRIEVE from the
13133         default keyserver options.
13134         * doc/gpg.texi: document this change.
13135
13136 2017-08-10  Justus Winter  <justus@g10code.com>
13137
13138         tests: Improve documentation.
13139         + commit 23107ba20f8b4eb5482b480ad6a8af6b39d2bfeb
13140         * tests/openpgp/README: Add quickstart instructions, how to use
13141         shell.scm, remove no longer used MKDATA.
13142
13143 2017-08-09  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13144
13145         g10: Write status error on error of --quick-revoke-uid.
13146         + commit 977fc5f0eb9fdee19e66bea8cd2eb5414789b485
13147         * g10/keyedit.c (keyedit_quick_revuid): Write status error on error.
13148
13149 2017-08-09  Werner Koch  <wk@gnupg.org>
13150
13151         Release 2.1.23.
13152         + commit e8ffa9a6ca5d76660b67207cd1157068e48483de
13153
13154
13155         po: Update German translation.
13156         + commit 2059dbf201963c6f229698ae80c6c774b1f686c8
13157
13158
13159 2017-08-08  Werner Koch  <wk@gnupg.org>
13160
13161         build: New configure option --enable-all-tests.
13162         + commit fb21aa8b50367e2afa13bad73fc21d6f01a97e18
13163         * configure.ac: New option --enable-all-tests.
13164         * tests/gpgscm/ffi.c (ffi_init): New gloabl var *run-all-tests*.
13165         * tests/openpgp/all-tests.scm (all-tests): Use that var instead
13166         of *maintainer-mode*.
13167         * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Add --enable-all-tests.
13168
13169         gpgscm: Make the test summary stand out.
13170         + commit 0bd19dae1161a71053d794e4f75e66f70445f9f0
13171         * tests/gpgscm/tests.scm (test-pool): Add delimiter lines.
13172
13173         sm: Always print the keygrip in colon mode.
13174         + commit 0a8e20c4c639f0c491e2af5ac5fb97005196422b
13175         * sm/keylist.c (list_cert_colon): Always print the keygrip as
13176         described in the manual.
13177
13178 2017-08-08  Justus Winter  <justus@g10code.com>
13179
13180         gpg: Add option '--disable-dirmngr'.
13181         + commit c4506f624ed6854aa0ba1629aa2d1d43eb26900d
13182         * doc/gpg.texi: Document new option.
13183         * g10/call-dirmngr.c (create_context): Fail if option is given.
13184         * g10/gpg.c (cmd_and_opt_values): New value.
13185         (opts): New option.
13186         (gpgconf_list): Add new option.
13187         (main): Handle new option.
13188         * g10/options.h (struct opt): New field 'disable_dirmngr'.
13189         * tools/gpgconf-comp.c (gc_options_gpg): New option.
13190
13191 2017-08-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
13192
13193         systemd-user: Drop redundant After=*.socket.
13194         + commit 81074c3b0211854a2dc94600dc892224201536f5
13195         * doc/examples/systemd-user/*.service: Drop redundant After=*.socket
13196         directive.
13197
13198         systemd-user: Drop RefuseManualStart=true.
13199         + commit 407da18254dfebcacfaee16952ef0b617b1626ea
13200         * doc/examples/systemd-user/*.service: drop RefuseManualStart=true
13201
13202 2017-08-07  Justus Winter  <justus@g10code.com>
13203
13204         tests: Do not run all tests unless in maintainer mode.
13205         + commit b0112dbca91e720a4ff622ad0e88d99eba56203a
13206         * configure.ac: Leak the maintainer mode flag into 'config.h'.
13207         * tests/gpgscm/ffi.c: Pass it into the scheme environment.
13208         * tests/openpgp/all-tests.scm: Only run tests against non-default
13209         configurations (keyring, extended-key-format) in maintainer mode.
13210
13211 2017-08-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
13212
13213         Fix spelling.
13214         + commit a611cba142470c52f3303c512f77ae7d195cc41f
13215         * doc/gpg.texi: s/occured/occurred/
13216
13217         Simple typo fix.
13218         + commit f011d8763a009612c858a287cf7cc6a1f1a6d32a
13219         * agent/gpg-agent.c: Correct spelling in comment.
13220
13221 2017-08-05  Werner Koch  <wk@gnupg.org>
13222
13223         gpg: Install gpg by default under the name gpg.
13224         + commit a69464b0b6dac88b360a13d3faf19dd7f2a0e02b
13225         * configure.ac: Remove option --enable-gpg2-is-gpg.  Add option
13226         --enable-gpg-is-gpg2.
13227         * build-aux/speedo.mk (speedo_pkg_gnupg_configure): Remove
13228         --enable-gpg2-is-gpg.
13229
13230         gpg: gpgconf needs to support the now default --auto-key-retrieve.
13231         + commit 69e97d909d586160cc0631c9a6f4d3f24bb0c682
13232         * tools/gpgconf-comp.c (gc_options_gpg): Re-add "auto-key_retrieve".
13233
13234 2017-08-04  Werner Koch  <wk@gnupg.org>
13235
13236         gpg: Fix memory leak in parse_auto_key_locate.
13237         + commit b70e86fd1050fc6da07a177ed142ae9882b4dd0d
13238         * g10/getkey.c (parse_auto_key_locate): Fix freeing of OPTIONS.
13239
13240         tests: Adjust tests for changed --auto-key-locate default.
13241         + commit 0767eada1479c0fa9d4b75781a8c2afb67bdbf90
13242         * tests/openpgp/defs.scm (create-gpghome): Disable new defaults.
13243
13244         gpg: Make --no-auto-key-retrieve gpgconf-igurable.
13245         + commit 9bb13a0e819334681caca38c9074bd7bfc04e45e
13246         * g10/gpg.c (gpgconf_list): Print no-auto-key-retrieve instead of
13247         auto-key-retrieve.
13248         * tools/gpgconf-comp.c (gc_options_gpg): Replace auto-key-retrieve by
13249         no-auto-key-retrieve and chnage level from invisible to advanced.
13250
13251         gpg: Default to --auto-key-locate "local,wkd" and --auto-key-retrieve.
13252         + commit 7e1fe791d188b078398bf83c9af992cb1bd2a4b3
13253         * g10/gpg.c (main): Add KEYSERVER_AUTO_KEY_RETRIEVE to the default
13254         keyserver options.  Set the default for --auto-key-locate to
13255         "local,wkd".  Reset that default iff --auto-key-locate has been given
13256         in the option file or in the commandline.
13257         * g10/getkey.c (parse_auto_key_locate): Work on a copy of the arg.
13258
13259         agent: Make --no-grab the default.
13260         + commit 3d78ae4d3de08398fabae5821045a3a1da6dadbe
13261         * agent/gpg-agent.c (oGrab): New const.
13262         (opts): New option --grab.  Remove description for --no-grab.
13263         (parse_rereadable_options): Make --no-grab the default.
13264         (finalize_rereadable_options): Allow --grab to override --no-grab.
13265         (main) <gpgconflist>: Add "grab".
13266         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add "grab".
13267
13268         gpg: Avoid double fingerprint printing with import-show.
13269         + commit b54d75fb1dcfa2cebb3a2497b81ffb49acac2056
13270         * g10/import.c (import_one) <IMPORT_SHOW>: Take care of fingerprint
13271         options.
13272
13273         gpg: New import option show-only.
13274         + commit d9fabcc1989d7235ea0294874803295a30f8711b
13275         * g10/options.h (IMPORT_DRY_RUN): New.
13276         * g10/import.c (parse_import_options): Add "show-only".
13277         (import_one): use that as alternative to opt.dry_run.
13278
13279 2017-08-03  Werner Koch  <wk@gnupg.org>
13280
13281         wks: Allow gpg-wks-client --supported with just the domain name.
13282         + commit 6cba56d436b56ea5e60042144a8a75a2e80007c8
13283         * tools/gpg-wks-client.c (command_supported): Hack for missing local
13284         part.
13285
13286 2017-08-02  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13287
13288         g10: Always save standard revocation certificate in file.
13289         + commit dcfb01959802b27869528dda1d9a4f5e79574bb5
13290         * g10/revoke.c (gen_standard_revocation): Set opt.outfile to NULL
13291         temporarily to create certificate in right place.
13292
13293 2017-08-01  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13294
13295         Revert "g10: Always save standard revocation certificate in file."
13296         + commit 624cd2d0bf6cc6dd1b79654295dc76f5b2d6d70b
13297         This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.
13298
13299         g10: Always save standard revocation certificate in file.
13300         + commit ebc65ff459e6c228fb7406e375819a9fe5637abe
13301         * g10/main.h (open_outfile): New parameter NO_OUTFILE.
13302         * g10/openfile.c (open_outfile): New parameter NO_OUTFILE.  If given,
13303         never use opt.outfile.
13304         * g10/revoke.c (create_revocation): If FILENAME is true, also set
13305         NO_OUTFILE to true (for standard revocation certificates).
13306         * g10/dearmor.c, g10/encrypt.c, g10/export.c, g10/revoke.c,
13307         g10/sign.c: Adjust all other callers.
13308
13309         artwork: Add icons.
13310         + commit a8d0b8d2333ddab703d1e346e06c106eeeedfd53
13311         * artwork/icons/index.css: New file.
13312         * artwork/icons/index.html: New file.
13313         * artwork/icons/lock-12.png: New file.
13314         * artwork/icons/lock-128.png: New file.
13315         * artwork/icons/lock-16.png: New file.
13316         * artwork/icons/lock-24.png: New file.
13317         * artwork/icons/lock-256.png: New file.
13318         * artwork/icons/lock-32.png: New file.
13319         * artwork/icons/lock-48.png: New file.
13320         * artwork/icons/lock-64.png: New file.
13321         * artwork/icons/lock-wing-12.png: New file.
13322         * artwork/icons/lock-wing-128.png: New file.
13323         * artwork/icons/lock-wing-16.png: New file.
13324         * artwork/icons/lock-wing-24.png: New file.
13325         * artwork/icons/lock-wing-256.png: New file.
13326         * artwork/icons/lock-wing-32.png: New file.
13327         * artwork/icons/lock-wing-48.png: New file.
13328         * artwork/icons/lock-wing-64.png: New file.
13329         * artwork/icons/lock-wing.svg: New file.
13330         * artwork/icons/lock.svg: New file.
13331         * artwork/icons/wing-12.png: New file.
13332         * artwork/icons/wing-128.png: New file.
13333         * artwork/icons/wing-16.png: New file.
13334         * artwork/icons/wing-24.png: New file.
13335         * artwork/icons/wing-256.png: New file.
13336         * artwork/icons/wing-32.png: New file.
13337         * artwork/icons/wing-48.png: New file.
13338         * artwork/icons/wing-64.png: New file.
13339         * artwork/icons/wing.svg: New file.
13340
13341 2017-08-01  Werner Koch  <wk@gnupg.org>
13342
13343         gpg,sm: Error out on compliance mismatch while decrypting.
13344         + commit 4e117f206beb38287ddcd3251fb7baabadfbddbb
13345         * g10/pubkey-enc.c (get_session_key): Bail out if the algo is not
13346         allowed in the current compliance mode.
13347         * sm/decrypt.c (gpgsm_decrypt): Ditto.
13348
13349 2017-08-01  NIIBE Yutaka  <gniibe@fsij.org>
13350
13351         Simple typo fix.
13352         + commit fde9a8cc6c849fb21f3e6782dbd5c6bc863357eb
13353         * tools/rfc822parse.c: Fix.
13354
13355         po: Update Japanese translation.
13356         + commit 02b571947b9442604faa7509478cd8577c2c0b9c
13357
13358
13359 2017-07-31  Werner Koch  <wk@gnupg.org>
13360
13361         dirmngr,w32: Fix http connection timeout problem.
13362         + commit 482fd5758c1b7e1b33c4cb50656e586a3ae16815
13363         * dirmngr/http.c (connect_with_timeout) [W32]: Take care of EAGAIN.
13364
13365         Explain the "server is older than xxx warning".
13366         + commit 4ad5bc1b6d72483123963c894ee1412b2ceb99b4
13367         * g10/call-agent.c (warn_version_mismatch): Print a note on how to
13368         restart the servers.
13369         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
13370         * sm/call-agent.c (warn_version_mismatch): Ditto.
13371         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
13372
13373 2017-07-28  Werner Koch  <wk@gnupg.org>
13374
13375         Release 2.1.22.
13376         + commit 7d335ff496b129ee6f33c4ca25bd7a6631a4b590
13377
13378
13379         po: Update German translation.
13380         + commit 339f672dad94b4e0000fd2d3a1f272a4861c91c3
13381
13382
13383         agent: Make --ssh-fingerprint-digest re-readable.
13384         + commit 6c9899bede6ecb2ccf7336d12724090f36a6aa3d
13385         * agent/gpg-agent.c (main): Move oSSHFingerprintDigest to ...
13386         (parse_rereadable_options): here.
13387         (opts): Change its description.
13388         (main) <aGPGConfList>: Include this option.
13389         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add option at expert
13390         level.
13391
13392         gpg,sm: String changes for compliance diagnostics.
13393         + commit efe187e8a2b583defdcd9d4b96e3dc83f95bef0d
13394
13395
13396         agent: For OCB key files return Bad Passprase instead of Checksum Error.
13397         + commit 5cf95157c5db88dd599ac4d48f619782179b1438
13398         * agent/protect.c (do_decryption): Map error checksum to bad
13399         passpharse protection
13400
13401         * agent/call-pinentry.c (unlock_pinentry): Don't munge the error
13402         source for corrupted protection.
13403
13404         gpg: Minor rework for better readibility of get_best_pubkey_byname.
13405         + commit 1c35e29af95c46475f297d2bd70a5f3bd49d45b1
13406         * g10/getkey.c (get_best_pubkey_byname): Change return type to
13407         gpg_error_t.  Use var name err instead of rc.  Move a
13408         gpg_error_from_syserror closer to the call.
13409
13410         gpg: Fix segv in get_best_pubkey_byname.
13411         + commit 6496dc1f9d2aef3bf8cf950da2434c96f7a0145c
13412         * g10/getkey.c (get_best_pubkey_byname): Init NEW.
13413
13414         agent: Minor cleanup (mostly for documentation).
13415         + commit 5516ef47a22dfdf9cdf56107f34d2bda9e46deec
13416         * agent/command.c (cmd_pksign): Change var name 'rc' to 'err'.
13417         * agent/findkey.c (read_key_file): Ditto.  Change return type to
13418         gpg_error_t.  On es_fessk failure return a correct error code.
13419         (agent_key_from_file): Change var name 'rc' to 'err'.
13420         * agent/pksign.c (agent_pksign_do): Ditto.  Change return type to
13421         gpg_error_t.  Return a valid erro code on malloc failure.
13422         (agent_pksign): Ditto.  Change return type to gpg_error_t.  replace
13423         xmalloc by xtrymalloc.
13424         * agent/protect.c (calculate_mic): Change return type to gpg_error_t.
13425         (do_decryption): Ditto.  Do not init RC.
13426         (merge_lists): Change return type to gpg_error_t.
13427         (agent_unprotect): Ditto.
13428         (agent_get_shadow_info): Ditto.
13429
13430 2017-07-27  Werner Koch  <wk@gnupg.org>
13431
13432         gpg: Tweak compliance checking for verification.
13433         + commit 6502bb0d2af5784918ebb74242fff6f0a72844bf
13434         * common/compliance.c (gnupg_pk_is_allowed): Rework to always allow
13435         verification.
13436         * g10/mainproc.c (check_sig_and_print): Print a con-compliant warning.
13437         * g10/sig-check.c (check_signature2): Use log_error instead of
13438         log_info.
13439
13440         gpg,sm: Allow encryption (with warning) to any key in de-vs mode.
13441         + commit 1bd22a85b4f06324037b3500d2fa8af62733c926
13442         * g10/encrypt.c (encrypt_crypt): Do not abort for a non-compliant key.
13443         * sm/encrypt.c (gpgsm_encrypt): Ditto.
13444
13445         gpg,sm: Fix compliance checking for decryption.
13446         + commit a0d0cbee7654ad7582400efaa92d493cd8e669e9
13447         * common/compliance.c (gnupg_pk_is_compliant): Remove the Elgamal
13448         signing check.  We don't support Elgamal signing at all.
13449         (gnupg_pk_is_allowed) <de-vs>: Revert encryption/decryption for RSA.
13450         Check the curvenames for ECDH.
13451         * g10/pubkey-enc.c (get_session_key): Print only a warning if the key
13452         is not compliant.
13453         * sm/decrypt.c (gpgsm_decrypt): Ditto.  Use the same string as in gpg
13454         so that we have only one translation.
13455
13456         gpg: Avoid output to the tty during import.
13457         + commit fcb62fe20f45290bf95703ec3bf4d0b361fa4339
13458         * g10/key-check.c (key_check_all_keysigs): Add arg mode and change all
13459         output calls to use it.
13460         * g10/keyedit.c (keyedit_print_one_sig): Add arg fp and chnage all
13461         output calls to use it.
13462         (keyedit_menu): Adjust for changes.
13463         * g10/gpgcompose.c (keyedit_print_one_sig): Add dummy arg fp.
13464         * g10/import.c (import_one): Call key_check_all_keysigs with output to
13465         the log stream.
13466
13467 2017-07-26  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13468
13469         g10: Make sure exactly one fingerprint is output with --quick-gen-key.
13470         + commit 94eea0ed2c8b47cb0fe02b22cbe668705a5fe0d0
13471         * g10/keygen.c (do_generate_keypair): Only set fpr in
13472         list_keyblock_direct invocation if neither --fingerprint nor
13473         --with-fingerprints are given.
13474
13475 2017-07-26  Werner Koch  <wk@gnupg.org>
13476
13477         doc: Add man pages form gpg-wks-server and gpg-wks-client.
13478         + commit be636c3cfca178927b09ef4154c3e555d6f5b1c4
13479         * doc/wks.texi: New.
13480         * doc/gnupg.texi: Include wks.texi.
13481         * doc/Makefile.am (gnupg_TEXINFOS): Add wks.texi.
13482         (myman_pages): Add new man pages.
13483
13484         wks: Fix program names in the usage diagnostics.
13485         + commit c76398da5b15df2086f68bc26b7fde75219976c7
13486         * tools/gpg-wks-client.c (my_strusage): Add case 12.
13487         * tools/gpg-wks-server.c (my_strusage): Add case 12:
13488
13489 2017-07-26  Andre Heinecke  <aheinecke@intevation.de>
13490
13491         doc: Update vsnfd profile example.
13492         + commit 4f569c69075fddbaea588544a6625c28cb4cb8f4
13493         * doc/examples/vsnfd.prf: Use rsa3072
13494
13495 2017-07-26  Werner Koch  <wk@gnupg.org>
13496
13497         dirmngr: Do not use a blocking connect in Tor mode.
13498         + commit c5e5748480952e5bcedb16f6ce6ef7e435acb3c7
13499         * dirmngr/http.c (http_raw_connect): Disable the timeout in Tor mode.
13500         (send_request): Ditto.
13501
13502         dirmngr: Auto-enable Tor on startup or reload.
13503         + commit fd68bdb61ec4f8441da6d3023a8da4315df54cec
13504         * dirmngr/dirmngr.c (dirmngr_use_tor): Test for Tor availibility.
13505
13506         agent,dirmngr: Check for homedir removal also using stat(2).
13507         + commit d50c2eff8d6931586c527edb3dea98dbc6facdec
13508         * agent/gpg-agent.c (have_homedir_inotify): New var.
13509         (reliable_homedir_inotify): New var.
13510         (main):  Set reliable_homedir_inotify.
13511         (handle_tick): Call stat on the homedir.
13512         (handle_connections): Mark availibility of the inotify watch.
13513         * dirmngr/dirmngr.c (handle_tick): Call stat on the homedir.
13514         (TIMERTICK_INTERVAL_SHUTDOWN): New.
13515         (handle_connections): Depend tick interval on the shutdown state.
13516
13517         agent: Lengthen timertick interval on Unix to 4 seconds.
13518         + commit f4ec7697a9c2d7587794d3bd75efbb0b51d6562f
13519         * agent/gpg-agent.c (TIMERTICK_INTERVAL): Same value for Windows and
13520         Unix.
13521
13522 2017-07-25  Werner Koch  <wk@gnupg.org>
13523
13524         common: Strip trailing slashes from the homedir.
13525         + commit 24c7aa0d58e3768690dd8ebef0e8e01af7e80f83
13526         * common/homedir.c (default_homedir): Strip trailing slashes.
13527         (gnupg_set_homedir): Ditto.
13528
13529         w32: Also change the directory on daemon startup.
13530         + commit 0ef50340ef68b2541d9a1aafa71f5400aef4dc7e
13531         * agent/gpg-agent.c (main): Always to the chdir.
13532         * dirmngr/dirmngr.c (main): Ditto.
13533         * scd/scdaemon.c (main): Ditto.
13534
13535         common: New functions gnupg_daemon_rootdir and gnupg_chdir.
13536         + commit 226f143ca01cf335c7c4e3e94c96fb9d271eccc9
13537         * common/sysutils.c (gnupg_chdir): New.
13538         * common/homedir.c (gnupg_daemon_rootdir): New.
13539         * agent/gpg-agent.c (main): Use these functions instead chdir("/").
13540         * dirmngr/dirmngr.c (main): Ditto.
13541         * scd/scdaemon.c (main): Ditto.
13542
13543         gpg: Update key origin info during import merge.
13544         + commit 166d0d7a2439f30c0a250faadc16ce3453447d71
13545         * g10/import.c (update_key_origin): New.
13546         (merge_blocks): Add arg curtime.
13547         (import_one): Pass curtime to merge_blocks.  Call update_key_origin.
13548
13549         gpg: Store key origin for new userids during import merge.
13550         + commit 84c993d9325fc000acac7950b2dfeefa5976df3b
13551         * g10/import.c (apply_meta_data): Rename to ...
13552         (insert_key_origin): this.  Factor code out to ...
13553         (insert_key_origin_pk, insert_key_origin_uid): new funcs.
13554         (import_one): Move insert_key_origin behind clean_key.
13555         (merge_blocks): Add args options, origin, and url.
13556         (append_uid): Rename to ...
13557         (append_new_uid): this.  Add args options, curtime, origin, and url.
13558         Call insert_key_origin_uid for new UIDs.
13559
13560 2017-07-25  NIIBE Yutaka  <gniibe@fsij.org>
13561
13562         dirmngr: Add annotation for fallthrough.
13563         + commit d40b4a41a8d60292fd4b5b951a19883e31090179
13564         * dirmngr/dns.c: Add /* FALL THROUGH */ to clarify.
13565
13566 2017-07-24  Werner Koch  <wk@gnupg.org>
13567
13568         gpg: Extend --key-origin to take an optional URL arg.
13569         + commit 87b5421ca84bbea68217c9ed771ee8c0a98a4d0c
13570         * g10/getkey.c (parse_key_origin): Parse appended URL.
13571         * g10/options.h (struct opt): Add field 'key_origin_url'.
13572         * g10/gpg.c (main) <aImport>: Pass that option to import_keys.
13573         * g10/import.c (apply_meta_data): Extend for file and url.
13574         * g10/keyserver.c (keyserver_fetch): Pass the url to
13575         import_keys_es_stream.
13576
13577         gpg: Store key origin info for new keys from a keyserver.
13578         + commit 2ca0381d077d766593db26f4215b8eddee8d7963
13579         * g10/keyserver.c (keyserver_get_chunk): Use KEYORG_KS if request was
13580         done by fingerprint.
13581         * g10/import.c (apply_meta_data): Implement that.
13582
13583         gpg: Store key origin info for new DANE and WKD retrieved keys.
13584         + commit e7068bf92ec5ca5d440346d43a382c1f625b924d
13585         * g10/import.c (apply_meta_data): Remove arg 'merge'.  Add arg 'url'.
13586         Implement WKD and DANE key origin.
13587         (import_keys_internal): Add arg 'url' and change all callers.
13588         (import_keys_es_stream): Ditto.
13589         (import): Ditto.
13590         (import_one): Ditto.
13591         * g10/keylist.c (list_keyblock_print): Fix update URL printing.
13592         * g10/call-dirmngr.c (gpg_dirmngr_wkd_get): Add arg 'r_url' to return
13593         the SOURCE.  Pass ks_status_cb to assuan_transact.
13594         * g10/keyserver.c (keyserver_import_wkd): Get that URL and pass it to
13595         the import function.
13596
13597         gpg: Filter keys received via DANE.
13598         + commit f6f0dd4d5ea85e0b16e96d7678b1d508182049a8
13599         * g10/keyserver.c (keyserver_import_cert): Use an import filter in
13600         DANE mode.
13601
13602         dirmngr: Print a SOURCE status for WKD requests.
13603         + commit e97548223948222a5c22acdf3775c7f93c1e17a9
13604         * dirmngr/server.c (cmd_wkd_get): Print a SOURCE status.
13605
13606         dirmngr: New function dirmngr_status_printf.
13607         + commit 9b88cfa0962f28894658cff8777fe7a217c6f700
13608         * dirmngr/server.c (dirmngr_status_printf): New.
13609
13610 2017-07-24  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13611
13612         g10: Make sure to emit NEED_PASSPHRASE on --import of secret key.
13613         + commit 872137b5921dd297e7d2c1def6e3868b7595feb5
13614         * call-agent.h (agent_import_key): Add keyid parameters.
13615         * call-agent.c (agent_import_key): Set keyid parameters.
13616         * import.c (transfer_secret_keys): Pass keyid parameters.
13617
13618         w32: Change directory on daemon startup.
13619         + commit 78ebc62604d77600b9865950610717d28c6027a2
13620         * agent/gpg-agent.c [HAVE_W32_SYSTEM]: Include <direct.h>.
13621         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
13622         * dirmngr/dirmngr.c [HAVE_W32_SYSTEM]: Include <direct.h>.
13623         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
13624         * scd/scdaemon.c [HAVE_W32_SYSTEM]: Include <direct.h>.
13625         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
13626
13627         g10: Make sure to emit NEED_PASSPHRASE on --export-secret-key.
13628         + commit d8e46f10698da0bee4cd58d95f1f9832bdda0c5f
13629         * call-agent.h (agent_export_key): Add keyid parameters.
13630         * call-agent.c (agent_export_key): Set keyid parameters.
13631         * export.c (receive_seckey_from_agent): Pass keyid parameters.
13632
13633 2017-07-24  NIIBE Yutaka  <gniibe@fsij.org>
13634
13635         scd: Use unsigned int for fields.
13636         + commit 45e40487fb7bb51228c96c8966e38c643a9b9ba5
13637         * scd/app-openpgp.c (data_objects): Use unsigned ints.
13638
13639         dirmngr: More minor fix.
13640         + commit ade4b2744c848e07b87afa4f186256c2a2ef1d13
13641         * dirmngr/http.c (send_request): Care the case of !USE_TLS.
13642
13643         dirmngr: More minor fixes.
13644         + commit 789401e9557db13422f47a8c09e693f3cee0132b
13645         * dirmngr/http.c (http_verify_server_credentials): Duplicated const.
13646         * dirmngr/ldap.c (parse_one_pattern): Add comment.
13647
13648         dirmngr: Minor fix for Windows.
13649         + commit 274602820cfbb15c7cdb4525acd9793bdb472e78
13650         * dirmngr/http.c (connect_with_timeout): Use FD2INT.
13651
13652         agent: Minor fix for Windows.
13653         + commit 328fca187253c069e3630bd387a71f6d16e9820a
13654         * agent/command-ssh.c (serve_mmapped_ssh_request): Add const
13655         qualifier.
13656
13657 2017-07-21  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13658
13659         g10: Avoid caching passphrase for failed symmetric encryption.
13660         + commit e4c720fa3b31ebd3e9d764c6eab02729cf06124c
13661         * g10/mainproc.c (proc_encrypted): If error code is GPG_ERR_CIPHER_ALGO,
13662         assume the symmetric passphrase was wrong and invalidate the cache.
13663
13664 2017-07-21  Werner Koch  <wk@gnupg.org>
13665
13666         gpg: Extend --quick-set-expire to allow subkey expiration setting.
13667         + commit b55b72bb815ad5870456b89c3a011fa00991b4a8
13668         * g10/keyedit.c (keyedit_quick_set_expire): Add new arg subkeyfprs.
13669         (menu_expire): Rename arg force_mainkey to unattended and allow
13670         unattended changing of subkey expiration.
13671         * g10/gpg.c (main): Extend --quick-set-expire.
13672
13673         gpg: Fix possible double free of the card serialno.
13674         + commit e888f7af6571ecd3994fd55cc18c9e2df7fd0c60
13675         * g10/free-packet.c (copy_public_key): Copy fields serialno and
13676         updateurl.
13677
13678         gpg: Use macros to check the signature class.
13679         + commit 5818ff0ae314af08548fcc23df2b807736144a00
13680         * g10/import.c: Use the extistin macros for better readability.
13681
13682 2017-07-21  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13683
13684         g10: Clean keyblock on initial commit.
13685         + commit 609bbdf3614fbadeba7a6cbdfdf5004b23516a64
13686         * g10/import.c (import_one): If option import-clean is set,
13687         also clean on initial import, not only for merge.
13688
13689 2017-07-21  NIIBE Yutaka  <gniibe@fsij.org>
13690
13691         scd: Fix SEGV in CCID driver.
13692         + commit d8a55da715ce8447b0686f321fa43d00be34a467
13693         * scd/ccid-driver.c (intr_cb): Only kick the loop for removal.
13694         (bulk_in): Don't set POWERED_OFF when interrupt transfer is enabled.
13695
13696         g10: Don't limit at the frontend side for card capability.
13697         + commit a76b6cf9709c0a2a89fa2887075491b80f3d9608
13698         * g10/card-util.c (MAX_GET_DATA_FROM_FILE): New.
13699         (get_data_from_file): Use MAX_GET_DATA_FROM_FILE.
13700         (change_url, change_login, change_private_do): Don't limit.
13701
13702         scd: Add debug message for v3 card.
13703         + commit 892e86b0dc69193ddff018bf9b3938509dd72cb3
13704         * scd/app-openpgp.c (show_caps): Output more messages.
13705
13706 2017-07-20  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13707
13708         doc: Clarify wording of export-attributes.
13709         + commit cea4313644b531ef87b8c8e4bfddde4388cbbe0d
13710         * doc/gpg.texi: Clarify wording of export-attributes.
13711
13712 2017-07-20  Werner Koch  <wk@gnupg.org>
13713
13714         gpg: New option --with-key-origin.
13715         + commit 165cdd8121bbf80bfe2da071539d3578630f198f
13716         * g10/getkey.c (parse_key_origin): Factor list out as ...
13717         (key_origin_list): new struct.
13718         (key_origin_string): New.
13719         * g10/gpg.c (oWithKeyOrigin): New const.
13720         (opts): New option --with-key-origin.
13721         (main): Implement option.
13722         * g10/options.h (struct opt): New flag with_key_origin.
13723         * g10/keylist.c (list_keyblock_print): Print key origin info.
13724         (list_keyblock_colon): Ditto.
13725
13726         common: New function print_utf9_string.
13727         + commit bddc2e04f1ddc18be20efc0f0508be401b345f42
13728         * common/miscellaneous.c (print_utf8_string): New.
13729
13730         gpg: Make function mk_datestr public.
13731         + commit 3ee314dde16d1d69ddf840cdb8b5aa186c592262
13732         * g10/keydb.h (MK_DATESTR_SIZE): New.
13733         * g10/keyid.c (mk_datestr): Make public.  Add arg bufsize and use
13734         snprintf.  Change arg atime to u32.
13735         (datestr_from_pk): Simplify.
13736         (datestr_from_sig): Ditto.
13737         (expirestr_from_pk): Ditto.
13738         (expirestr_from_sig): Ditto.
13739         (revokestr_from_pk): Ditto.
13740
13741 2017-07-20  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13742
13743         g10: Return proper error when gpg-agent fails to start during probe.
13744         + commit 9998b162b47931fb8a8ed961d53418d505358888
13745         * g10/getkey.c (lookup): Return immediately on any other error than
13746         GPG_ERR_NO_SECKEY from agent_probe_any_secret_key.
13747
13748 2017-07-20  NIIBE Yutaka  <gniibe@fsij.org>
13749
13750         scd: Support longer data length for special DOs for v3 card.
13751         + commit 69614d55018ddb8678d8904a52e648931f480d72
13752         * scd/app-openpgp.c (data_objects): Special DOs like "Login Data",
13753         "URL", "Private DO N" can be longer size >= 256.
13754         (struct app_local_s): Define bits for v3 card.
13755         (get_cached_data): Use extcap.max_special_do for special DOs.
13756         (app_select_openpgp): Detect if extcap_v3, kdf_do, and other bits.
13757
13758         common: logstream fix.
13759         + commit 84146b3ec44943f06c66a603de19094b930ad446
13760         * common/logging.c (set_file_fd): Don't close es_stderr.
13761
13762         dnsmngr: Fix use of CPP.
13763         + commit cc12cf386b620e658fa93a0bd40477bc16d85d98
13764         * dirmngr/dns.c (HAVE_STATIC_ASSERT, HAVE___ATOMIC_FETCH_ADD)
13765         (DNS_HAVE_SOCKADDR_UN, HAVE_SOCK_NONBLOCK): Don't use defined
13766         to be expanded for expression evaluation.
13767
13768 2017-07-19  Justus Winter  <justus@g10code.com>
13769
13770         dirmngr: Forbid redirects from .onion to clearnet URIs.
13771         + commit e7fc6e3bf0eb6ffe53e1f099d28ce45cef4a8a87
13772         * dirmngr/ks-engine-hkp.c (send_request): Forbid redirects from .onion
13773         to clearnet URIs.
13774         * dirmngr/ks-engine-http.c (ks_http_fetch): Likewise.
13775
13776 2017-07-19  Werner Koch  <wk@gnupg.org>
13777
13778         gpg: Avoid asking by fpr and then by keyid during auto-key-retrieve.
13779         + commit 2e5459457473eb4b3e7b2b14815cb94faa66e8bb
13780         * g10/mainproc.c (check_sig_and_print): Track key server request via
13781         fingerprint.
13782
13783 2017-07-19  Justus Winter  <justus@g10code.com>
13784
13785         dirmngr: Implement TLS over http proxies.
13786         + commit da91d2106a17c796ddb066a34db92d33b21c81f7
13787         * dirmngr/http.c (send_request): If a http proxy is to be used, and we
13788         want to use TLS, try to use the CONNECT method to get a connection to
13789         the target server.
13790
13791         dirmngr: Log http response in debug mode.
13792         + commit e7eabe66b6409c1f5225b751ea5c2d456a3856e6
13793         * dirmngr/http.c (parse_response): Log http response in debug mode.
13794
13795         dirmngr: Amend TLS handling.
13796         + commit 1ba220e68149fdb197accf4a15b0a11126c8b431
13797         * dirmngr/http.c (http_wait_response): Get the 'use_tls' flag from the
13798         write cookie, not from the URI.
13799
13800         dirmngr: Fix connecting to http proxies.
13801         + commit 46a4a0c0e77e19f9589088bb87357c33142c3f04
13802         * dirmngr/http.c (send_request): Do not use the 'srvtag' intended for
13803         the target host to connect to the http proxy.
13804
13805         dirmngr: Fix handling of proxy URIs.
13806         + commit 73d4781e4595634548269bafe46aeb7674c5b219
13807         * dirmngr/http.c (send_request): We do not support socks4.
13808
13809 2017-07-19  NIIBE Yutaka  <gniibe@fsij.org>
13810
13811         gpgconf: Make vars read-only explicitly.
13812         + commit 99791184ac4c7486ccdefc150b9921cd923428b9
13813         * tools/gpgconf-comp.c (gc_backend, gc_arg_type, gc_level, gc_flag)
13814         (gc_component): Add const qualifier.
13815
13816         Fix usage of ARGPARSE_OPTS.
13817         + commit fa63db89f9581186ed758c502d4e69914b774157
13818         * agent/gpg-agent.c, agent/preset-passphrase.c,
13819         dirmngr/dirmngr-client.c, dirmngr/dirmngr_ldap.c, kbx/kbxutil.c,
13820         tools/gpg-check-pattern.c, tools/gpgconf.c, tools/gpgsplit.c,
13821         tools/symcryptrun.c: Use ARGPARSE_end.
13822
13823 2017-07-18  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13824
13825         common: Allow abbreviations of standard options.
13826         + commit f17862d47d184d7f6ef883778cf63801365599a0
13827         * argparse.h (ARGPARSE_SHORTOPT_HELP, ARGPARSE_SHORTOPT_VERSION,
13828         ARGPARSE_SHORTOPT_WARRANTY, ARGPARSE_SHORTOPT_DUMP_OPTIONS): New
13829         macros.
13830         (ARGPARSE_end): Add some placeholders for standard options.
13831         * argparse.c (arg_parse): Fill in missing standard options so
13832         default machinery works.  Check for standard options in new way.
13833         Do not write out standard options for --dump-options.
13834
13835 2017-07-18  Justus Winter  <justus@g10code.com>
13836
13837         gpgscm,w32: Fix testing for absolute paths.
13838         + commit 2e1342b78b020f5b28359b08a4f63cf11479602f
13839         * tests/gpgscm/main.c (path_absolute_p): New function.
13840         (load): Use new function.
13841
13842         dirmngr: Honor http keyserver URLs.
13843         + commit b231959728a0056094134e0fca8cc916c24ef37e
13844         * dirmngr/http.c (parse_uri): Keep an unmodified copy of the URI.
13845         * dirmngr/http.h (struct parsed_uri_s): New field 'original'.
13846         * dirmngr/ks-action.c (ks_action_get): Properly handle http and https
13847         URLs.
13848
13849         dirmngr: Fix memory leak.
13850         + commit ebb35ed7110d1a29061dfb4ccb9038645b20d7f4
13851         * dirmngr/http.c (parse_uri): Properly free partial results.
13852
13853         dirmngr: Fix memory leak.
13854         + commit 3d670fa973a03ea88b5f9459b3222a951136dd7a
13855         * dirmngr/http.c (http_release_parsed_uri): Free 'params'.
13856
13857 2017-07-17  Werner Koch  <wk@gnupg.org>
13858
13859         gpg,sm: Check compliance of the RNG.
13860         + commit a149afe338d61d86985c533cde5e7dbcd31e8698
13861         * common/compliance.c (gnupg_rng_is_compliant): New.
13862         * g10/call-agent.c (start_agent) [W32]: Check rng compliance.
13863         * sm/call-agent.c (start_agent) [W32]: Ditto.
13864         * g10/encrypt.c (encrypt_simple, encrypt_crypt): Check that the RNG is
13865         compliant.
13866         * sm/encrypt.c (gpgsm_encrypt): Ditto.
13867         * g10/sign.c (do_sign): Ditto.
13868         * sm/sign.c (gpgsm_sign): Ditto.
13869
13870         agent: New GETINFO sub-command jent_active.
13871         + commit bbbd0db34b4e387f8dc089fb7d69fdcf2ed91a01
13872         * agent/command.c (cmd_getinfo): Implement it for gcrypt >= 1.8.
13873
13874         common: New function split_fields_colon.
13875         + commit 849467870ee1c10e0a7b1e89cfc9e8214e4963fe
13876         * common/stringhelp.c (split_fields_colon): New.
13877         * common/t-stringhelp.c (test_split_fields_colon): New test.
13878         (main): Call that test.
13879
13880 2017-07-14  Justus Winter  <justus@g10code.com>
13881
13882         tests: Improve 'shell.scm' script.
13883         + commit 58eafd11ed5501c0b72fcb553eb3e097ad29b3c6
13884         * tests/openpgp/defs.scm (create-file): Unlink file first.
13885         * tests/openpgp/shell.scm: Ask whether to import legacy test keys or
13886         not, and whether to drop 'batch' from the configuration.  Add paths to
13887         all the programs to 'PATH'.
13888
13889         gpgscm: Library improvements.
13890         + commit b4d25082fd4502ec01d511c22fecd60d513b81f4
13891         * tests/gpgscm/repl.scm (prompt-yes-no?): New function.
13892         * tests/gpgscm/tests.scm (pathsep-split): Likewise.
13893         (pathsep-join): Likewise.
13894         (with-path): Use the new function.
13895
13896         gpgscm: Fail early if the test setup fails.
13897         + commit 7a6e6ad2880bbff54a75ff608d0ec97d6c405733
13898         * tests/gpgscm/tests.scm (make-environment-cache): Check status code
13899         of setup script.
13900
13901         gpg: Fix importing keys.
13902         + commit 956da89193370d5aa970cff5b77f605534481a02
13903         * g10/import.c (import_one): Fix error handling.
13904
13905 2017-07-13  Werner Koch  <wk@gnupg.org>
13906
13907         gpg: Pass key origin values to import functions.
13908         + commit 330212efb927c119bb5135856f8582c0e4e2e6b7
13909         * g10/import.c (import_keys_stream): Remove this unused function.
13910         (import_keys_internal): Add arg origin.
13911         (import_keys): Ditto.
13912         (import_keys_es_stream): Ditto.
13913         (import): Ditto.
13914         (import_one): Ditto.
13915         (apply_meta_data): New stub.
13916         (import_secret_one): Pass 0 for ORIGIN.
13917         * g10/keyserver.c (keyserver_get_chunk): For now pass 0 for ORIGIN.
13918         (keyserver_fetch): Add arg origin.
13919         (keyserver_import_cert): Pass KEYORG_DANE for ORIGIN.
13920         (keyserver_import_wkd): Pass KEYORG_WKD for ORIGIN.
13921         * g10/gpg.c (main): Pass OPT.KEY_ORIGIN to import_keys and
13922         keyserver_fetch.
13923         * g10/card-util.c (fetch_url): Pass KEYORG_URL for ORIGIN.
13924
13925         gpg: New option --key-origin.
13926         + commit fa1155e89ebb4b16ee95549b8ab72672df3a0c54
13927         * g10/keydb.h (KEYORG_): Rename to KEYORG_.
13928         * g10/packet.h (PKT_user_id): Rename field keysrc to keyorg.  Adjust
13929         users.
13930         (PKT_public_key): Ditto.
13931         (PKT_ring_trust): Ditto.
13932         * g10/options.h (struct opt): Add field key_origin.
13933         * g10/getkey.c (parse_key_origin): New.
13934         * g10/gpg.c (oKeyOrigin): New.
13935         (opts): Add "keys-origin".
13936         (main): Set option.
13937
13938 2017-07-13  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13939
13940         doc: Document gnupg version requirement for gpg-preset-passphrase.
13941         + commit 877a321d011deb3e8501aa9cc5e9f9cd0b19dddf
13942
13943
13944 2017-07-13  Justus Winter  <justus@g10code.com>
13945
13946         gpgscm: Make loading of modules less verbose.
13947         + commit f78fe1a4ec9d343199e1f424dd09e2937c913412
13948         * tests/gpgscm/main.c (load): Increase logging threshold.
13949
13950         gpgscm: Make it impossible to catch '*interpreter-exit*'.
13951         + commit bce02a8b0f0e51775a4ee5536ccf35efc1f15ca6
13952         * tests/gpgscm/init.scm (throw'): Make it impossible to catch
13953         '*interpreter-exit*'.  This fixes 'exit' (and with it 'fail') inside
13954         'catch' statements.
13955
13956 2017-07-10  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13957
13958         tofu: Compare squares instead of square roots.
13959         + commit d24594976686983c7186cbe4e78153888a13b6e4
13960         * g10/Makefile.am (tofu_source) [USE_TOFU]: Remove sqrtu32.h and
13961         sqrtu32.c.
13962         * g10/sqrtu32.h, g10/sqrtu32.c: Removed files.
13963         * g10/tofu.c: Compare squares instead of square roots.
13964
13965         speedo: Provide a vagrantfile to test speedo in an isolated VM.
13966         + commit 1455b406e63dd262938e49da5f83c05c17c60a8d
13967         * build-aux/Vagrantfile: New file.
13968
13969 2017-07-06  Neal H. Walfield  <neal@g10code.com>
13970
13971         doc: Improve TOFU documentation.
13972         + commit 243b2a570c30586e19b8c88e43b282d62d8eb77c
13973         * doc/gpg.texi: Improve TOFU documentation.
13974
13975 2017-07-05  Werner Koch  <wk@gnupg.org>
13976
13977         agent: Use MAX_PASSPHRASE_LEN (255) also for the loopback.
13978         + commit 3681ee7dc1e9d8c94fdb046d7be0bbcfeba1cfe9
13979         * agent/call-pinentry.c (agent_get_passphrase): Reduce maximum
13980         passphrase length as conveyed to the loopback to MAX_PASSPHRASE_LEN.
13981         * agent/genkey.c (agent_ask_new_passphrase): Extend the maximum
13982         passphrase as conveyed to the loopback to MAX_PASSPHRASE_LEN.
13983
13984         doc: Update yat2m to take care of SOURCE_DATE_EPOCH.
13985         + commit 139de02b93773615bdd95e04a7f0c1ad73b4f6fb
13986         * doc/yat2m.c (main): Set a default for OPT_DATE.
13987
13988         doc: Prefer an installed version of yat2m.
13989         + commit f6faa058749846de18cb34f1cc79867bb0029922
13990         * configure.ac (YAT2M): Check for tool.
13991         * doc/Makefile.am (yat2m-stamp): Use installed tool if possible.
13992
13993 2017-07-01  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
13994
13995         doc: Document obsolete option in gpgsm.  Closes T2231.
13996         + commit 7fb724c61655c6f75c61572d65a46e21ae112574
13997         * doc/gpgsm.texi: Mark --prefer-system-dirmngr as obsolete.
13998
13999 2017-06-28  Werner Koch  <wk@gnupg.org>
14000
14001         agent: Fix option --debug-wait.
14002         + commit ecd6c0160f49ae83001dfd150df6b1238fc479d5
14003         * agent/gpg-agent.c (opts): Typo fix.
14004
14005 2017-06-26  Justus Winter  <justus@g10code.com>
14006
14007         agent: Support unprotected ssh keys.
14008         + commit 273964798592cd479c111f47e8ce46d5b1999d6a
14009         * agent/command-ssh.c (ssh_key_to_protected_buffer): If the empty
14010         passphrase is supplied, do not protect the key.
14011
14012         tests: Improve test.
14013         + commit b49b1a87ac2695e3892fb001878da59fbc92fa37
14014         * tests/openpgp/ssh-export.scm: Split output at any whitespace.
14015
14016 2017-06-23  Werner Koch  <wk@gnupg.org>
14017
14018         agent: Shutdown on removal of the home directory.
14019         + commit 1ead1ca818bddabc3bca22c195be667993eb3e2e
14020         * common/sysutils.c (gnupg_inotify_watch_delete_self): New.
14021         * agent/gpg-agent.c (handle_connections): Rename my_inotify_fd to
14022         sock_inotify_fd.
14023         (handle_connections): Add home_inotify_fd to watch the home directory.
14024
14025         build: Add missing LIBASSUAN_CFLAGS to dirmngr/.
14026         + commit 815ecdf08a4285c75892cf9ab72feb13f3bcf590
14027         * dirmngr/Makefile.am (t_http_CFLAGS): Add LIBASSUAN_CFLAGS.
14028         (t_ldap_parse_uri_CFLAGS): Ditto.
14029         (t_dns_stuff_CFLAGS): Ditto.
14030
14031         gpg,gpgsm: Emit status code ENCRYPTION_COMPLIANCE_MODE.
14032         + commit f31dc2540acf7cd7f09fd94658e815822222bfcb
14033         * common/status.h (STATUS_ENCRYPTION_COMPLIANCE_MODE): New.
14034         * g10/encrypt.c (encrypt_crypt): Emit new status code.
14035         * sm/encrypt.c (gpgsm_encrypt): Ditto.
14036
14037 2017-06-21  Justus Winter  <justus@g10code.com>
14038
14039         gpg: Close cached keydb handle in gpgv.
14040         + commit a68a98233ab83f0c7b90e6e588b882085fe59d91
14041         * g10/gpgv.c (main): Close cached handle.
14042
14043         tests: Add test for gpgv.
14044         + commit 62274d3c309d8948405c2f966bef507638b4d5c6
14045         * tests/openpgp/Makefile.am (XTESTS): Add the new test.
14046         * tests/openpgp/gpgv.scm: New file.
14047         * tests/openpgp/signed-messages.scm: Likewise.
14048         * tests/openpgp/verify.scm: Move the signed messages to the new file
14049         and load it.
14050
14051         gpg: Fix printing keyserver URLs and notation data.
14052         + commit 890a3a70f2e1340d90c7f499358467979b182719
14053         * g10/keylist.c (show_keyserver_url): Print to 'fp', not to 'stdout'.
14054         (show_notation): Likewise.
14055
14056 2017-06-20  Justus Winter  <justus@g10code.com>
14057
14058         dirmngr: Properly handle SRV records.
14059         + commit 48aae8167dcae80d43b08167a88d9eb170781a04
14060         * dirmngr/ks-engine-hkp.c (enum ks_protocol): New type.
14061         (struct hostinfo_s): New flags indicating whether we already did a
14062         A lookup, or a SRV lookup per protocol.  Turn 'port' into an array.
14063         (create_new_hostinfo): Initialize new fields.
14064         (add_host): Update the port for the given protocol.
14065         (map_host): Simplify hosttable lookup misses.  Check the SRV records
14066         for both protocols on demand, do the A lookup just once.  Return the
14067         correct port.
14068
14069         dirmngr: Refactor variable-sized array code.
14070         + commit fc4834d213af031b456c49c1ba5b5ef8873d1f18
14071         * dirmngr/ks-engine-hkp.c (struct hostinfo_s): Add explicit length and
14072         size fields.
14073         (MAX_POOL_SIZE): New macro.
14074         (create_new_hostinfo): Initialize new fields.
14075         (host_in_pool_p): Adapt.
14076         (select_random_host): Likewise.
14077         (add_host): Likewise.  Move the resizing logic here.
14078         (hostinfo_sort_pool): New function.
14079         (map_host): Simplify.  Move the resizing logic away from here.
14080         (ks_hkp_mark_host): Adapt.
14081         (ks_hkp_print_hosttable): Likewise.
14082
14083         gpg: Fix error handling.
14084         + commit badc1cdae52bd434e5fac2e4275575afeccc2837
14085         * g10/keygen.c (generate_subkeypair): Handle errors from pinentry.
14086
14087 2017-06-19  Werner Koch  <wk@gnupg.org>
14088
14089         gpg,gpgsm: Fix compliance check for DSA and avoid an assert.
14090         + commit 3621dbe52584bc8b417f61b5370ebaa5598db956
14091         * common/compliance.c (gnupg_pk_is_compliant): Swap P and Q for DSA
14092         check.  Explicitly check for allowed ECC algos.
14093         (gnupg_pk_is_allowed): Swap P and Q for DSA check.
14094         * g10/mainproc.c (proc_encrypted): Simplify SYMKEYS check.  Replace
14095         assert by debug message.
14096
14097 2017-06-19  Justus Winter  <justus@g10code.com>
14098
14099         gpgscm: Limit the number of parallel jobs.
14100         + commit 61ef43546ba9f0209692a1569d2f033436566a02
14101         * ffi.c (do_wait_processes): Suppress the timeout error.
14102         * tests.scm (semaphore): New definition.
14103         (test-pool): Only run a bounded number of tests in parallel.
14104         (test::started?): New function.
14105         (run-tests-parallel): Do not report results, do not start the tests.
14106         (run-tests-sequential): Adapt.
14107         (run-tests): Parse the number of parallel jobs.
14108
14109         gpgscm: Improve option parsing.
14110         + commit e555e7ed7de20fbbb1e3b005c32e292f29cc4a58
14111         * tests/gpgscm/tests.scm (flag): Accept arguments of the form
14112         '--foo=bar'.
14113
14114         gpgscm: Improve error handling of foreign functions.
14115         + commit 6639aedaee051e8104d7f63b9a5812abf79440ed
14116         * tests/gpgscm/ffi.scm (ffi-fail): Do not needlessly join the error
14117         message.
14118
14119         gpgscm: Improve error reporting.
14120         + commit 4c8be58fd46bb16332e84ab8ce978087dc5c68a3
14121         * tests/gpgscm/init.scm (throw'): Guard against 'args' being atomic.
14122         * tests/gpgscm/scheme.c (Eval_Cycle): Remove any superfluous colons in
14123         error messages.
14124
14125         tests: Run the OpenPGP tests using the new extended key format.
14126         + commit b766d3d1034e6068a91755ada68f7f7dbe2943b6
14127         * tests/openpgp/all-tests.scm: Generalize a bit, and also add a
14128         variant that uses the new extended key format.
14129         * tests/openpgp/defs.scm (create-gpghome): Conditionally enable the
14130         new extended key format.
14131
14132 2017-06-19  Werner Koch  <wk@gnupg.org>
14133
14134         Change license of some files to LGPLv2.1.
14135         + commit 3419a339d9c4e800bf30e9021e05982d8c1021c1
14136         * COPYING.LIB: Rename to COPYING.LGPL3.
14137         * COPYING.LGPL21: New.
14138         * COPYING.GPL2: New.
14139         * Makefile.am: Distribute them.
14140         * AUTHORS: Update license pointers.  Add BSI as copyright holder.
14141         * common/compliance.c, common/compliance.h: Add BSI copyright notice.
14142         Break overlong lines.
14143         * dirmngr/loadswdb.c: Add BSI copyright notices.
14144         * dirmngr/server.c: Ditto.
14145         * tools/call-dirmngr.c: Change license to LGPLv2.1.  Add BSI
14146         copyright notice.
14147         * tools/call-dirmngr.h: Ditto.
14148         * tools/gpg-wks-client.c: Ditto.
14149         * tools/gpg-wks-server.c: Ditto.
14150         * tools/gpg-wks.h: Ditto.
14151         * tools/mime-maker.c: Ditto.
14152         * tools/mime-maker.h: Ditto.
14153         * tools/mime-parser.c: Ditto.
14154         * tools/mime-parser.h: Ditto.
14155         * tools/send-mail.c: Ditto.
14156         * tools/send-mail.h: Ditto.
14157         * tools/wks-receive.c: Ditto.
14158         * tools/wks-util.c: Ditto.
14159         * tools/rfc822parse.c, tools/rfc822parse.h: Change license to LGPLv2.1.
14160
14161 2017-06-19  Justus Winter  <justus@g10code.com>
14162
14163         gpg: Disable compliance module for other GnuPG components.
14164         + commit 6e23416fe61d4130918f2d1bf6e1f98d102c4610
14165         * common/compliance.c (gnupg_{pk,cipher,digest}_is_compliant): Return
14166         false if the module is not initialized.
14167         (gnupg_{pk,cipher,digest}_is_allowed): Return true if the module is
14168         not initialized.
14169         (gnupg_status_compliance_flag): Do not assert that the module is
14170         initialized.
14171         (gnupg_parse_compliance_option): Likewise.
14172         (gnupg_compliance_option_string): Likewise.
14173
14174 2017-06-14  Justus Winter  <justus@g10code.com>
14175
14176         gpg: Check and fix keys on import.
14177         + commit 9b12b45aa5e67d4d422bf75a3879df1d52dbe67f
14178         * doc/gpg.texi: Document the new import option.
14179         * g10/gpg.c (main): Make the new option default to yes.
14180         * g10/import.c (parse_import_options): Parse the new option.
14181         (import_one): Act on the new option.
14182         * g10/options.h (IMPORT_REPAIR_KEYS): New macro.
14183
14184         gpg: Refactor key checking and fixing.
14185         + commit 404fa8211b6188a0abe83ef43a4b44d528c0b035
14186         * g10/Makefile.am (gpg_sources): Add new files.
14187         * g10/gpgcompose.c (keyedit_print_one_sig): New stub.
14188         * g10/keyedit.c (sig_comparison): Move to new module.
14189         (check_all_keysigs): Likewise.
14190         (fix_keyblock): Adapt callsite.
14191         (keyedit_menu): Likewise.
14192         * g10/key-check.c: New file.
14193         * g10/key-check.h: Likewise.
14194
14195 2017-06-13  Justus Winter  <justus@g10code.com>
14196
14197         gpg: Refactor keyedit module.
14198         + commit 8095d16b3ef6b5f01ec351824855708149f1c1c3
14199         * g10/Makefile.am (gpg_SOURCES): Add new file.
14200         * g10/keyedit.c (NODFLG_*): Move flags to the new header file.
14201         (print_one_sig): Export symbol and rename accordingly.
14202         (print_and_check_one_sig): Adapt accordingly.
14203         (check_all_keysigs): Likewise.
14204         * g10/keyedit.h: New file.
14205         * g10/main.h: Drop declarations, include new header.
14206
14207         dirmngr: Implement querying nameservers over IPv6.
14208         + commit 15d2a009931f44a60b9df6325f837add208459d6
14209         * dirmngr/dns.c (dns_so_check): Reinitialize sockets on address family
14210         mismatch.
14211         (enum dns_res_state): New states for querying over IPv6.
14212         (dns_res_exec): Implement the new states by copying and modifying the
14213         IPv4 variants.  Branch to their respective counterparts if the current
14214         list of resolvers using the current address family is exhausted.
14215
14216 2017-06-13  Werner Koch  <wk@gnupg.org>
14217
14218         gpg: Disable keydb handle caching only for W32.
14219         + commit e80925171ddb20c7e76c1db88c15ce2d9b09db86
14220         * g10/getkey.c (getkey_end) [!W32]: Re-enable caching.
14221
14222         common: Fix -Wswitch warning.
14223         + commit 7c91b48f0e80266cf7491c2bb7d8aabc12362643
14224         * common/compliance.c (gnupg_digest_is_allowed): Don't include
14225         GCRY_MD_WHIRLPOOL because it is not a digest_algo_t.
14226
14227 2017-06-11  Neal H. Walfield  <neal@g10code.com>
14228
14229         gpg: Send gpgcompose --help output to stdout, not stderr.
14230         + commit 7aeac20f12ed257d3d159b304afeeac7f406c9d2
14231         * g10/gpgcompose.c (show_help): Send gpgcompose --help output to
14232         stdout, not stderr.
14233
14234         gpg: Improve some output of gpgcompose.
14235         + commit cb0484e0762a1ce05d00d949f4b70162e2f7b82c
14236
14237
14238         gpg: Support 'gpgcompose --encrypted-pop --help'
14239         + commit 4ddf4e114c8df06d89144e857b7601de0b7e5a7c
14240         * g10/gpgcompose.c (encrypted_pop_options): New variable.
14241         (encrypted_pop): Support the --help option.
14242
14243         gpg: Remove dead code.
14244         + commit 8a9066865688cf17594b2bdde4b260b0ef36d68e
14245         * g10/gpgcompose.c (filter_pop): F->PKTTYPE will never be
14246         PKT_ENCRYPTED_MDC.
14247         (encrypted_pop): Likewise and there is no option --encrypted-mdc-pop.
14248
14249 2017-06-08  Marcus Brinkmann  <mb@g10code.com>
14250
14251         artwork: Add new banner.
14252         + commit bc5503b2bf273b51d5dc59617e596f1cfb742fbc
14253         * artwork/banner/banner-full.png: New file.
14254         * artwork/banner/banner-rectangle.png: New file.
14255         * artwork/banner/banner.svg: New file.
14256         * artwork/banner/Bungee-Regular.ttf: New file.
14257         * artwork/banner/Raleway-license.txt: New file.
14258         * artwork/banner/banner-half.png: New file.
14259         * artwork/banner/banner-skyscraper.png: New file.
14260         * artwork/banner/Bungee-license.txt: New file.
14261         * artwork/banner/Raleway-ExtraBold.ttf: New file.
14262         * artwork/banner/Raleway-SemiBold.ttf: New file.
14263
14264 2017-06-08  Justus Winter  <justus@g10code.com>
14265
14266         common,gpg,sm: Restrict the use of algorithms according to CO_DE_VS.
14267         + commit a64a55e10420cf11e00062b590dffe5d0c3e8192
14268         * common/compliance.c (gnupg_pk_is_allowed): New function.
14269         (gnupg_cipher_is_allowed): Likewise.
14270         (gnupg_digest_is_allowed): Likewise.
14271         * common/compliance.h (enum pk_use_case): New definition.
14272         (gnupg_pk_is_allowed): New prototype.
14273         (gnupg_cipher_is_allowed): Likewise.
14274         (gnupg_digest_is_allowed): Likewise.
14275         * g10/decrypt-data.c (decrypt_data): Restrict use of algorithms using
14276         the new predicates.
14277         * g10/encrypt.c (encrypt_crypt): Likewise.
14278         * g10/gpg.c (main): Likewise.
14279         * g10/pubkey-enc.c (get_session_key): Likewise.
14280         * g10/sig-check.c (check_signature2): Likewise.
14281         * g10/sign.c (do_sign): Likewise.
14282         * sm/decrypt.c (gpgsm_decrypt): Likewise.
14283         * sm/encrypt.c (gpgsm_encrypt): Likewise.
14284         * sm/gpgsm.c (main): Likewise.
14285         * sm/sign.c (gpgsm_sign): Likewise.
14286         * sm/verify.c (gpgsm_verify): Likewise.
14287
14288         gpg: Fix computation of compliance with CO_DE_VS.
14289         + commit b03fab09e188f7bb10237d4f20455e4026737e4e
14290         * g10/mainproc.c (proc_encrypted): Symmetric encryption is also in
14291         compliance with CO_DE_VS.
14292
14293 2017-06-08  Werner Koch  <wk@gnupg.org>
14294
14295         dirmngr: Implement HTTP connect timeouts of 15 or 2 seconds.
14296         + commit 9b43220b8ad1a5c1cd51de3bbfff7ccbcc3fa877
14297         * dirmngr/dirmngr.c (oConnectTimeout, oConnectQuickTimeout): New
14298         enums.
14299         (opts): New options --connect-timeout and --connect-quick-timeout.
14300         (DEFAULT_CONNECT_TIMEOUT): New.
14301         (DEFAULT_CONNECT_QUICK_TIMEOUT): New.
14302         (parse_rereadable_options): Handle new options.
14303         (post_option_parsing): New.  Use instead of direct calls to
14304         set_debug() and set_tor_mode ().
14305         (main): Setup default timeouts.
14306         (dirmngr_init_default_ctrl): Set standard connect timeout.
14307         * dirmngr/dirmngr.h (opt): New fields connect_timeout and
14308         connect_quick_timeout.
14309         (server_control_s): New field timeout.
14310         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass timeout to
14311         http_raw_connect.
14312         * dirmngr/ks-engine-hkp.c (send_request): Call
14313         http_session_set_timeout.
14314         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
14315         * dirmngr/server.c (cmd_wkd_get, cmd_ks_search, cmd_ks_get)
14316         (cmd_ks_fetch): Implement --quick option.
14317
14318         dirmngr: Allow a timeout for HTTP and other TCP connects.
14319         + commit 5b9025cfa1f9b1c67ddf2f6bf87d863e780cf157
14320         * dirmngr/http.c: Include fcntl.h.
14321         (http_session_s): Add field 'connect_timeout'.
14322         (http_session_new): Clear that.
14323         (http_session_set_timeout): New function.
14324         (my_wsagetlasterror) [W32]: New.
14325         (connect_with_timeout): New function.
14326         (connect_server): Add arg 'timeout' and call connect_with_timeout.
14327         (send_request): Add arg 'timeout' and pass it to connect_server.
14328         (http_raw_connect): Add arg 'timeout'.
14329         (http_open): Pass TIMEOUT from the session to connect_server.
14330
14331         gpg: Avoid failure exit when scdaemon is disabled but not needed.
14332         + commit 17e5afd80f247c356f03c71e8b61da424ffedabb
14333         * g10/call-agent.c (warn_version_mismatch): Use log_info if error is
14334         "not supported".
14335
14336 2017-06-07  Justus Winter  <justus@g10code.com>
14337
14338         common: Add cipher mode to compliance predicate.
14339         + commit e051e396156211449568afa0ca7505dc13eaa3b4
14340         * common/compliance.c (gnupg_cipher_is_compliant): Add mode parameter.
14341         * common/compliance.h (gnupg_cipher_is_compliant): Likewise.
14342         * g10/mainproc.c (proc_encrypted): Adapt callsite.
14343         * sm/decrypt.c (gpgsm_decrypt): Likewise.
14344
14345         common,gpg,sm: Initialize compliance module.
14346         + commit 21fc2508c979a8202dd8ca7fa7b801e0d62a5ceb
14347         * common/compliance.c (gnupg_initialize_compliance): New function.
14348         * common/compliance.h (gnupg_initialize_compliance): New prototype.
14349         * g10/gpg.c (main): Use the new function.
14350         * sm/gpgsm.c (main): Likewise.
14351
14352         common,gpg: Move the compliance option printer.
14353         + commit f440cf73eab0b0e75e3cb2e8c9e70a77f20ef1dc
14354         * common/compliance.c (gnupg_compliance_option_string): New function.
14355         * common/compliance.h (gnupg_compliance_option_string): New prototype.
14356         * g10/encrypt.c (write_pubkey_enc_from_list): Update callsite.
14357         * g10/gpg.c (main): Likewise.
14358         * g10/keyedit.c (keyedit_menu): Likewise.
14359         * g10/pkclist.c (build_pk_list): Likewise.
14360         * g10/main.h (compliance_option_string): Remove prototype.
14361         * g10/misc.c (compliance_option_string): Remove function.
14362
14363         common,gpg,sm: Move the compliance option parser.
14364         + commit 842d233d408457cfa9a8473a6748472956f44e84
14365         * common/compliance.c (gnupg_parse_compliance_option): New function.
14366         * common/compliance.h (struct gnupg_compliance_option): New type.
14367         (gnupg_parse_compliance_option): New prototype.
14368         * g10/gpg.c (parse_compliance_option): Remove function.
14369         (compliance_options): New variable.
14370         (main): Adapt callsite.
14371         * sm/gpgsm.c (main): Use the new common function.
14372         * sm/gpgsm.h (opt): New field 'compliance'.
14373
14374         gpg: Improve compliance with CO_DE_VS.
14375         + commit 027ce4ba37be1d052bca2f6109fe810ef57f4038
14376         * g10/gpg.c (set_compliance_option): The specification, section 4.1.1,
14377         forbids the use of encryption without integrity protection.
14378
14379 2017-06-07  Andre Heinecke  <aheinecke@intevation.de>
14380
14381         speedo: Fix a minor memleak in the installer.
14382         + commit 13dc75a4e7cc2959003c08940fc53c6ece7b77e4
14383         * build-aux/speedo/w32/g4wihelp.c (path_remove): Free path_new on
14384         early return.
14385
14386 2017-06-06  Andre Heinecke  <aheinecke@intevation.de>
14387
14388         speedo: Fix source tar call ambiguity.
14389         + commit 96acbdd7265f504d06783adfd6322a6675c41c0a
14390         * build-aux/speedo.mk (dist-source): Expand exclude-vc to
14391         exclude-vcs.
14392
14393 2017-06-01  Justus Winter  <justus@g10code.com>
14394
14395         gpg: Report compliance with CO_DE_VS.
14396         + commit be8ca8852629786266db4d3d69b2c2fb03bd6365
14397         * common/compliance.c (gnupg_pk_is_compliant): Add DSA with certain
14398         parameters.
14399         (gnupg_cipher_is_compliant): New function.
14400         (gnupg_digest_is_compliant): Likewise.
14401         * common/compliance.h (gnupg_cipher_is_compliant): New prototype.
14402         (gnupg_digest_is_compliant): Likewise.
14403         * common/status.h (STATUS_DECRYPTION_COMPLIANCE_MODE): New status.
14404         (STATUS_VERIFICATION_COMPLIANCE_MODE): Likewise.
14405         * doc/DETAILS: Document the new status lines.
14406         * g10/mainproc.c (proc_encrypted): Compute compliance with CO_DE_VS
14407         and report that using the new status line.
14408         (check_sig_and_print): Likewise.
14409         * sm/decrypt.c (gpgsm_decrypt): Likewise.
14410         * sm/verify.c (gpgsm_verify): Likewise.
14411
14412         common: Improve checking for compliance with CO_DE_VS.
14413         + commit 3b70f62423041e614332b90d782576ee6868a030
14414         * common/compliance.c (gnupg_pk_is_compliant): Only certain RSA key
14415         sizes are compliant.
14416
14417         gpg,common: Move the compliance framework.
14418         + commit 8a012280e0f0a462c094d106355aa436fceb1b76
14419         * common/Makefile.am (common_sources): Add new files.
14420         * common/compliance.c: New file.  Move 'gnupg_pk_is_compliant' here,
14421         and tweak it to not rely on types private to gpg.
14422         * common/compliance.h: New file.  Move the compliance enum here.
14423         * g10/keylist.c (print_compliance_flags): Adapt callsite.
14424         * g10/main.h (gnupg_pk_is_compliant): Remove prototype.
14425         * g10/misc.c (gnupg_pk_is_compliant): Remove function.
14426         * g10/options.h (opt): Use the new compliance enum.
14427         * sm/keylist.c (print_compliance_flags): Use the common functions.
14428
14429 2017-05-31  Justus Winter  <justus@g10code.com>
14430
14431         gpg: Fix compliance computation.
14432         + commit 02af509dfc2b893720aa0c7b380fd7736b2bafd0
14433         * g10/misc.c (gnupg_pk_is_compliant): Compare against CO_RFC2440, not
14434         RFC2440 which is actually a predicate.
14435
14436         sm: Simplify code.
14437         + commit f9cb15b385f64f7c9403670f03632f81a874f213
14438         * sm/verify.c (gpgsm_verify): Simplify by using a newer gcrypt
14439         interface.
14440
14441         doc: Improve documentation.
14442         + commit 485b5a6e6dfe7aa545afa926e060d516ae911e42
14443         * doc/gpgsm.texi: Mention that '--with-key-data' implies
14444         '--with-colons'.
14445
14446 2017-05-31  NIIBE Yutaka  <gniibe@fsij.org>
14447
14448         agent: Fix error from do_encryption.
14449         + commit c03e0eb01dc4632432d0472a6f8051142082bea4
14450         * agent/protect.c (do_encryption): Don't mask failure of OUTBUF
14451         allocation.
14452
14453         scd: Fix error code on failure at usb_init.
14454         + commit 8defb21d34410d000c8b776e0e3a1edd04762638
14455         * scd/ccid-driver.c (ccid_dev_scan): Return GPG_ERR_ENODEV.
14456
14457         scd: Handle a failure of libusb_init.
14458         + commit 5c33649782bf255af5a55f16eac5e85f059b00bf
14459         * scd/ccid-driver.c (ccid_get_reader_list, ccid_dev_scan): Handle
14460         failure.
14461
14462 2017-05-30  Andre Heinecke  <aheinecke@intevation.de>
14463
14464         gpg: Disable keydb handle caching.
14465         + commit d3d640b9cc98dd0d06b49a2e4d46eb67af96fe29
14466         * g10/getkey.c (getkey_end): Disable caching of the open keydb
14467         handle.
14468
14469 2017-05-30  NIIBE Yutaka  <gniibe@fsij.org>
14470
14471         agent: Fix memory leaks.
14472         + commit 996544626ea416c173a940db47f47f9e5cbd844c
14473         * agent/divert-scd.c (ask_for_card): Free WANT_KID and WANT_SN_DISP.
14474         * agent/gpg-agent.c (create_server_socket): Free UNADDR.
14475
14476 2017-05-25  Werner Koch  <wk@gnupg.org>
14477
14478         dirmngr: This towel should better detect a changed resolv.conf.
14479         + commit de3a0988ef9addccd6b5c7950fb8797afbc3978d
14480         * dirmngr/dns-stuff.c (resolv_conf_changed_p): Fix initialization time
14481         issue.
14482
14483         dirmngr: Re-init libdns resolver on towel change of resolv.conf.
14484         + commit b5f356e9fba2d99909f8f54d7b7e6836bed87b68
14485         * dirmngr/dns-stuff.c: Include sys/stat.h.
14486         (RESOLV_CONF_NAME): New macro to replace a string.
14487         (resolv_conf_changed_p): New.
14488         (libdns_init): Call new function
14489         (libdns_res_open): Ditto.
14490
14491 2017-05-24  Justus Winter  <justus@g10code.com>
14492
14493         agent: Make digest algorithms for ssh fingerprints configurable.
14494         + commit 525f2c482abb6bc2002eb878b03558fb43e6b004
14495         * agent/agent.h (opt): New field 'ssh_fingerprint_digest'.
14496         * agent/command-ssh.c (data_sign, ssh_identity_register): Honor the
14497         option for strings used to communicate with the user.
14498         * agent/findkey.c (agent_modify_description): Likewise.
14499         * agent/gpg-agent.c (cmd_and_opt_values): New value.
14500         (opts): New option '--ssh-fingerprint-digest'.
14501         (parse_rereadable_options): Set the default to MD5 for now.
14502         (main): Handle the new option.
14503         * doc/gpg-agent.texi: Document the new option.
14504
14505         agent: Write both ssh fingerprints to 'sshcontrol' file.
14506         + commit a5f046d99a084b6a95268f03c1b588e8b78083cb
14507         * agent/command-ssh.c (add_control_entry): Hand in the key, write both
14508         the MD5- and the SHA256-based fingerprint to the 'sshcontrol' file
14509         when adding ssh keys.
14510         (ssh_identity_register): Adapt callsite.
14511
14512         common: Correctly render SHA256-based ssh fingerprints.
14513         + commit 3a07a69dfc87b4fff610740d3dde8e23f0d2f8bc
14514         * common/ssh-utils.c (dummy_realloc): New function.
14515         (dummy_free): Likewise.
14516         (get_fingerprint): Prepend the fingerprint with the name of the digest
14517         algorithm.  Correctly render SHA256-based ssh fingerprints.
14518         * common/t-ssh-utils.c (sample_keys): Add SHA256 hashes for the keys.
14519         (main): Add an option to dump the keys to gather fingerprints, also
14520         print the SHA256 fingerprint for keys given as arguments, and check
14521         the SHA256 fingerprints of the test keys.
14522
14523         common: Support different digest algorithms for ssh fingerprints.
14524         + commit 3ac1a9d3a018816233a855faff059b4e0657a0f1
14525         * common/ssh-utils.c (get_fingerprint): Add and honor 'algo' parameter.
14526         (ssh_get_fingerprint{,_string}): Likewise.
14527         * common/ssh-utils.h (ssh_get_fingerprint{,_string}): Update prototypes.
14528         * common/t-ssh-utils.c (main): Adapt accordingly.
14529         * agent/command-ssh.c (agent_raw_key_from_file): Likewise.
14530         (ssh_identity_register): Likewise.
14531         * agent/command.c (do_one_keyinfo): Likewise.
14532         * agent/findkey.c (modify_description): Likewise.
14533
14534 2017-05-22  NIIBE Yutaka  <gniibe@fsij.org>
14535
14536         agent: Add const qualifier for read-only table.
14537         + commit 509e4a4d7491daf496b21e5892f4f63ab90e8e21
14538         * agent/call-pinentry.c (start_pinentry): Add const to tbl.
14539         * agent/command-ssh.c (request_specs): Add const.
14540         (ssh_key_types): Likewise.
14541         (request_spec_lookup): Add const to the return value and SPEC.
14542         (ssh_request_process): Likewise.
14543         * agent/protect.c (protect_info): Add const.
14544         (agent_unprotect): Add const to algotable.
14545
14546         g10: Fix default-key selection for signing, possibly by card.
14547         + commit fbb2259d22e6c6eadc2af722bdc52922da348677
14548         * g10/call-agent.c (warn_version_mismatch): Revert.
14549         (start_agent): Suppress version mismatch if relevant.
14550         * g10/getkey.c (get_seckey_default_or_card): New.
14551         * g10/skclist.c (build_sk_list): Use get_seckey_default_or_card.
14552
14553 2017-05-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14554
14555         doc: Fix spellings.
14556         + commit 3713f67026467f63f80649c92ac4cc7973589855
14557
14558
14559         docs: Point to https://dev.gnupg.org/ .
14560         + commit 705da1eb23aef92c42d6d657b20a0984b104f72f
14561         Replace mentions of bugs.gnupg.org with https://dev.gnupg.org/.  Since
14562         the project has transitioned to a better workflow for supporting
14563         contributions, we should ensure that our documentation points to the
14564         right place.
14565
14566 2017-05-17  Justus Winter  <justus@g10code.com>
14567
14568         gpgscm: Fix checking for opcode arguments.
14569         + commit aae50e0b6a61549e226e0c7785260ad517f0ffff
14570         * tests/gpgscm/scheme.c (Eval_Cycle): Update 'pcd' after dispatching
14571         an instruction.
14572
14573         tests: Fix agent teardown in release builds.
14574         + commit 0e1729bb993648deca84a2664ae78edc848d7003
14575         * tests/openpgp/defs.scm (start-agent,stop-agent): Use gpg-conf which
14576         will properly use the '--build-prefix' argument to make gpgconf use
14577         tools from the build directory.
14578
14579 2017-05-17  NIIBE Yutaka  <gniibe@fsij.org>
14580
14581         g10: Fix gpgcompose.c.
14582         + commit ae95a7f5335e605fcd71fbe4a18ed384c88d590a
14583         * g10/gpgcompose.c (show_help): Check return value.
14584
14585         g10: Suppress error for card availability check.
14586         + commit a8dd96826f8484c0ae93c954035b95c2a75c80f2
14587         * g10/call-agent.c (start_agent): Add semantics for card; Suppress
14588         error for card check.
14589         (warn_version_mismatch): Ignore an error for scdaemon.
14590         (agent_scd_serialno): Call start_agent with
14591         FLAG_FOR_CARD_SUPPRESS_ERRORS.
14592
14593 2017-05-16  Justus Winter  <justus@g10code.com>
14594
14595         tests: Configure the environments to use scdaemon from build tree.
14596         + commit 386a7bbb245dd3ab7c4156a554adbe75d82bdf49
14597         * tests/gpgme/gpgme-defs.scm: Use the scdaemon from the build tree
14598         when writing a 'gpg-agent.conf'.
14599         * tests/gpgsm/gpgsm-defs.scm: Likewise.
14600         * tests/openpgp/defs.scm: Likewise.
14601
14602 2017-05-15  Werner Koch  <wk@gnupg.org>
14603
14604         Release 2.1.21.
14605         + commit 9574820329128f0ea8a98f9bfc0e77c73c3e0ec0
14606
14607
14608         po: Update German translation.
14609         + commit 4bd079dbdb44067688377156413dd32a82a89d22
14610
14611
14612         gpg: Do not mark ", " translatable.
14613         + commit 2d381b0f0ba97657e9fb2971eca6648bb77dd2cc
14614         * g10/tofu.c (ask_about_binding): Remove useless translation markers.
14615
14616 2017-05-15  Andre Heinecke  <aheinecke@intevation.de>
14617
14618         dirmngr,w32: Fix ldap crl read on windows.
14619         + commit abe3a9043f86b48b92ddcec47197e032e35a6f4f
14620         Summary:
14621         * dirmngr/ldap-wrapper-ce.c (outstream_cookie_s): Add buffer_read_pos.
14622         (buffer_get_data): Use seperate read pos.
14623
14624 2017-05-15  Werner Koch  <wk@gnupg.org>
14625
14626         common: Let format_text return an error.
14627         + commit 00b7767bc6fe309aa20375c859ebf708cfc7b9ea
14628         * common/stringhelp.c (format_text): Return NULL on error.
14629         * common/t-stringhelp.c (test_format_text): Adjust for change.
14630         * g10/gpgcompose.c (show_help): Abort on out of core.
14631         * g10/tofu.c (ask_about_binding): Abort on format_text error.
14632         (show_statistics): Ditto.
14633         (show_warning): Ditto.
14634
14635 2017-05-11  Justus Winter  <justus@g10code.com>
14636
14637         tests: Also run all OpenPGP tests using keyrings.
14638         + commit bc01d62dc5d520e138499df5d80fb50f9e87e3e8
14639         * tests/openpgp/all-tests.scm: Run each test twice, once with public
14640         keys stored in a keybox, once with a keyring.
14641         * tests/openpgp/defs.scm (create-gpghome): Create a public keyring to
14642         make GnuPG use that instead of creating a keybox if '--use-keyring' is
14643         given.
14644         * tests/openpgp/setup.scm: Fix flag handling and usage.
14645
14646         tests: Make it possible to run all tests using our infrastructure.
14647         + commit f4365790daa1d1400c7f0fe73ac9a6d25f0c6d0a
14648         * Makefile.am (TESTS_ENVIRONMENT): New variable.
14649         (check-all): New phony target to run all tests.
14650         * tests/gpgme/gpgme-defs.scm (have-gpgme?): New function that tests
14651         whether the GPGME test suite is available instead of exiting the
14652         process.
14653         * tests/gpgscm/init.scm (export): New macro.
14654         * tests/gpgscm/tests.scm (run-tests): New function.
14655         (load-tests): Likewise.
14656         * tests/gpgme/run-tests.scm: Simplify and move the parsing of the list
14657         of tests to 'all-tests.scm'.
14658         * tests/gpgsm/run-tests.scm: Likewise.
14659         * tests/migrations/run-tests.scm: Likewise.
14660         * tests/openpgp/run-tests.scm: Likewise.
14661         * tests/gpgme/Makefile.am: To select the tests to run, use the
14662         variable 'TESTS'.  This harmonizes the interface with the automake
14663         test suite.
14664         * tests/gpgsm/Makefile.am: Likewise.
14665         * tests/migrations/Makefile.am: Likewise.
14666         * tests/openpgp/Makefile.am: Likewise.
14667         * tests/openpgp/README: Likewise.
14668         * agent/all-tests.scm: New file.
14669         * common/all-tests.scm: Likewise.
14670         * g10/all-tests.scm: Likewise.
14671         * g13/all-tests.scm: Likewise.
14672         * tests/gpgme/all-tests.scm: Likewise.
14673         * tests/gpgsm/all-tests.scm: Likewise.
14674         * tests/migrations/all-tests.scm: Likewise.
14675         * tests/openpgp/all-tests.scm: Likewise.
14676         * tests/run-tests.scm: Likewise.
14677
14678         tests: Move the makefile parser.
14679         + commit 78d6a25a2db22ad2ae30d57ca980c0400cfef726
14680         * tests/gpgme/gpgme-defs.scm (parse-makefile, parse-makefile-expand):
14681         Move...
14682         * tests/gpgscm/makefile.scm: ... here.
14683         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
14684
14685         gpgscm: Make it possible to set the logfile name.
14686         + commit 29ef34cc4cb23e7b743dbf4cc8e5761f06076b9a
14687         * tests/gpgscm/tests.scm (test): Only set the default log filename
14688         when it has not been set before.
14689
14690 2017-05-10  NIIBE Yutaka  <gniibe@fsij.org>
14691
14692         g10, sm, dirmngr, common: Add comment for fall through.
14693         + commit 0ce94a9698104d9bfc73d5a37478189564c96eb4
14694         * common/b64dec.c (b64dec_proc): Comment to clarify.
14695         * dirmngr/cdblib.c (cdb_make_put): Use same pattern to clarify.
14696         * dirmngr/dirmngr-client.c (read_pem_certificate): Likewise.
14697         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Likewise.
14698         * g10/armor.c (unarmor_pump): Likewise.
14699         * g10/gpg.c (main): Likewise.
14700         * g10/import.c (read_block): Likewise.
14701         * g10/keygen.c (make_backsig): Likewise.
14702         * g10/pkclist.c (check_signatures_trust):  Likewise.
14703         * sm/gpgsm.c (main): Likewise.
14704
14705         g10: Stop compiler warning for t-stutter.
14706         + commit 98b759119c81c5b39f34f8a9a7b6a57e91ad6470
14707         * g10/t-stutter.c (do_test): Refer current_test_group_failed.
14708
14709 2017-05-08  Justus Winter  <justus@g10code.com>
14710
14711         gpg: Properly account for ring trust packets.
14712         + commit 22739433e98be80e46fe7d01d52a9627c1aebaae
14713         * g10/keyring.c (keyring_get_keyblock): Use the parser's packet count
14714         instead of counting ourself.
14715         * g10/packet.h (struct parse_packet_ctx_s): New field
14716         'n_parsed_packets'.
14717         (init_parse_packet): Initialize new field.
14718         * g10/parse-packet.c (parse): Count packets.
14719
14720 2017-05-04  Justus Winter  <justus@g10code.com>
14721
14722         tests: Support tests that are expected to fail.
14723         + commit d6b46462f8c5c705ffb7cf8af03465a926aa11d3
14724         * tests/gpgscm/tests.scm (test-pool): Rework reporting.  Filter using
14725         the computed test status instead of the return value.  Also print the
14726         new categories 'failed expectedly' and 'passed unexpectedly'.
14727         (test): If a test ends with a bang (!), it is expected to fail.  Adapt
14728         status, status-string, and xml accordingly.
14729
14730         tests: Add function to dump packets.
14731         + commit eab0138e3179f247180a639a91570e5ee2c6ad0e
14732         * tests/openpgp/defs.scm (gpg-dump-packets): New function.
14733
14734 2017-05-03  Andre Heinecke  <aheinecke@intevation.de>
14735
14736         speedo,w32: Fix silent user mode installation.
14737         + commit d378cc34a8d3d5053cf0c5ac7aa731c1bcefee22
14738         * build-aux/speedo/w32/inst.nsi (AddToPath): Move account
14739         check here.
14740         (PrintNonAdminWarning): Remove is_user_install variable.
14741
14742 2017-05-03  Justus Winter  <justus@g10code.com>
14743
14744         gpgscm: Create and re-use frame objects.
14745         + commit 8a168a6d4052ec31fed77c79bb96ffdd32bf9646
14746         * tests/gpgscm/scheme-private.h (struct scheme): New field
14747         'frame_freelist'.
14748         * tests/gpgscm/scheme.c (enum scheme_types): New type 'T_FRAME'.
14749         (type_to_string): Handle new type.
14750         (settype): New macro.
14751         (gc_disable): Make sure there is at least one frame in the free list.
14752         (mark): Handle frame objects.
14753         (finalize_cell): Likewise.
14754         (dump_stack_initialize): Initialize free list.
14755         (dump_stack_free): Simplify.
14756         (frame_length): New variable.
14757         (dump_stack_make_frame): New function.
14758         (frame_slots): Likewise.
14759         (frame_payload): New macro.
14760         (dump_stack_allocate_frame): New function.
14761         (dump_stack_deallocate_frame): Likewise.
14762         (dump_stack_preallocate_frame): Likewise.
14763         (_s_return): Unpack frame object and deallocate it.
14764         (s_save): Wrap state in an frame object.
14765         (dump_stack_mark): Mark the free list.
14766
14767         gpgscm: Merge opexe_0.
14768         + commit 9c6407d17e0cb9f4a370b1b83e7816577ec7d29d
14769         * tests/gpgscm/scheme-private.h (struct scheme): Remove field 'op'.
14770         * tests/gpgscm/scheme.c (opexe_0): Inline into 'Eval_Cycle'.
14771         (_Error_1): Return the opcode to evaluate next.
14772         (Error_1): Do not return, but set the opcode and goto dispatch.
14773         (Error_0): Likewise.
14774         (s_goto): Likewise.
14775         (s_return): Likewise.
14776         (s_return_enable_gc): Likewise.
14777         (s_thread_to): Remove superfluous cast.
14778         (_s_return): Return the opcode to evaluate next.
14779         (scheme_init_custom_alloc): Adapt to removal of field 'op'.
14780
14781 2017-05-03  Andre Heinecke  <aheinecke@intevation.de>
14782
14783         speedo,w32: Allow installation as normal user.
14784         + commit cacfd4bce94704b531f68ee76fb40789e44fde67
14785         * build-aux/speedo/w32/g4wihelp.c (ENV_HK_USER, ENV_REG_USER):
14786         New defines.
14787         (path_add): Handle is_user_install variable. Don't abort
14788         if Path reg key does not exist. Fix crash if Path reg key
14789         does not contain a semicolon.
14790         (path_remove): Handle is_user_install variable. Fix crash
14791         if Path reg key does not exist.
14792         * build-aux/speedo/w32/inst.nsi: Remove obsolete HAVE_STARTMENU
14793         this was double guarded with WITH_GUI. Add Multiuser plugin and
14794         defines for this. Use SHCTX instead of HKLM / HKCU.
14795         (PrintNonAdminWarning): Only Warn and don't abort.
14796
14797 2017-05-02  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14798
14799         g10: Remove skeleton options files.
14800         + commit 201f86803017c1db373023f7b506d4a0dc644bbc
14801         * build-aux/speed/w32/inst.nsi: stop installing skeleton files.
14802         * doc/gpg.texi: stop documenting skeleton files.
14803         * g10/Makefile.am: stop installing skeleton files.
14804         * g10/openfile.c (copy_options_file): Remove.
14805         (try_make_homedir): do not call copy_options_file.
14806
14807 2017-04-27  NIIBE Yutaka  <gniibe@fsij.org>
14808
14809         g10: For signing, prefer available card key when no -u option.
14810         + commit 97a2394ecafaa6f58e4a1f70ecfd04408dc15606
14811         * g10/skclist.c (build_sk_list): Ask gpg-agent if card is available.
14812         Then, use the card key if any.
14813
14814 2017-04-26  NIIBE Yutaka  <gniibe@fsij.org>
14815
14816         g10: Minor clean up.
14817         + commit 2262a80c5f44433a08bc0e21b77d9efe51596f21
14818         * g10/main.h (complete_sig): Remove declaration.
14819         * g10/sign.c (complete_sig): Make it static.
14820
14821 2017-04-25  NIIBE Yutaka  <gniibe@fsij.org>
14822             Tomas Mraz
14823
14824         dirmngr: Fix aliasing problem in dns.c.
14825         + commit 247932f367f856e7ce91528e14f0aaf838150857
14826         * dirmngr/dns.c (dns_ai_setent): Care about aliasing.
14827
14828 2017-04-25  NIIBE Yutaka  <gniibe@fsij.org>
14829
14830         tests: Remove *.conf.tmpl from Makefile.
14831         + commit 7851d73fd7f424f9a649690e1cb3055feb792c51
14832         * tests/openpgp/Makefile.am (TEST_FILES): Remove gpg.conf.tmpl
14833         and gpg-agent.conf.tmpl.
14834
14835         g10: invalidate the fd cache for keyring.
14836         + commit 116cfd60779fbb3540da629db54dc2e148f4a3a2
14837         * g10/keyring.c (keyring_search_reset): Don't keep the FD cache.
14838
14839 2017-04-24  Andre Heinecke  <aheinecke@intevation.de>
14840
14841         w32: Enable wildcard expansion with mingw-w64.
14842         + commit 2e71bf30f038ca0e142acbb6f650ce029105f8a2
14843         * g10/gpg.c: Define _dowildcard = -1;
14844
14845 2017-04-24  Justus Winter  <justus@g10code.com>
14846
14847         tests: Fix Python detection.
14848         + commit ef1922b3b19df0aa7f8c15d503c603f76fc13f82
14849         * tests/gpgme/gpgme-defs.scm (python): Fix Python detection.
14850
14851         gpgscm: Refactor cell finalization.
14852         + commit d2f6798621d751cd6ae6f091c4a2af4569c5b8aa
14853         * tests/gpgscm/scheme.c (finalize_cell): Use switch, return whether
14854         the cell may be freed.
14855         (gc): Update callsite.
14856
14857         gpgscm: Tweak error message display.
14858         + commit 78547bfe8a885579438a17abadca02b62cce2844
14859         * tests/gpgscm/init.scm (throw'): If the first argument to the error
14860         is a string, display it as such.
14861
14862         tests: Deduplicate and simplify code.
14863         + commit 06a177ceea529269a7404740c60416bd6a4567b1
14864         * tests/gpgme/gpgme-defs.scm (create-file): Move...
14865         * tests/gpgsm/gpgsm-defs.scm (create-file): ... likewise...
14866         * tests/openpgp/defs.scm (create-file): Here.
14867         (create-gpghome): Use 'create-file'.
14868         * tests/openpgp/gpg-agent.conf.tmpl: Delete file.
14869         * tests/openpgp/gpg.conf.tmpl: Likewise.
14870
14871         gpgscm: Fix test.
14872         + commit 9ae63b9caefdf3e925c5928667fcd9227132d27f
14873         * tests/gpgscm/t-child.scm: Use 'string-length' on the string.
14874
14875         gpgscm: Improve syntax checking.
14876         + commit 4aab0e6ac7f2887a6f38f0cb95365dd7c30b4b18
14877         * tests/gpgscm/scheme.c (opexe_0): Make sure closure arguments are
14878         symbols.
14879
14880         gpgscm: Emit JUnit-style XML reports.
14881         + commit ee715201ae784e840b6136393289e6dbd6f4c540
14882         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
14883         * tests/gpgscm/lib.scm (string-translate): New function.
14884         * tests/gpgscm/main.c (main): Load new file.
14885         * tests/gpgscm/tests.scm (dirname): New function.
14886         (test-pool): Record execution times, emit XML report.
14887         (test): Record execution times, record log file name, emit XML report.
14888         (run-tests-parallel): Write XML report.
14889         (run-tests-sequential): Likewise.
14890         * tests/gpgscm/xml.scm: New file.
14891         * tests/gpgme/Makefile.am (CLEANFILES): Add 'report.xml'.
14892         * tests/gpgsm/Makefile.am: Likewise.
14893         * tests/migrations/Makefile.am: Likewise.
14894         * tests/openpgp/Makefile.am: Likewise.
14895
14896         gpgscm: Make logging less verbose and more useful.
14897         + commit 679920781a25ae5c0e49d4bd78e6926fd661778f
14898         * tests/gpgscm/tests.scm (call-with-io): When being verbose, include
14899         the pid in the output, and avoid duplicating the command arguments.
14900
14901         gpgscm: Make test framework less functional.
14902         + commit a71f4142e13e2cc26ef0cd62f56a1ccb7ce678ee
14903         * tests/gpgscm/tests.scm (test-pool, tests): Previously, these methods
14904         updated objects by creating new updated copies of the object being
14905         manipulated.  This made the code awkward without any benefit,
14906         therefore I change it to just update the object.
14907
14908         gpgscm: Move 'trace' and 'stringify'.
14909         + commit f03d6897be904da58cad76b4bd07729922b47616
14910         * tests/gpgscm/tests.scm (trace, stringify): Move...
14911         * tests/gpgscm/lib.scm: ... here.
14912
14913         gpgscm: Avoid fruitless garbage collection cycles.
14914         + commit 245860ecaf8b9e82ca577385abd453ac92ffcd26
14915         * tests/gpgscm/scheme-private.h (CELL_MINRECOVER): New macro.
14916         * tests/gpgscm/scheme.c (_get_cell): Move the heuristic to get more
14917         cells...
14918         (gc): ... here where every caller benefits from the optimization.
14919
14920 2017-04-20  NIIBE Yutaka  <gniibe@fsij.org>
14921
14922         g13: Fix for Solaris.
14923         + commit 10519270d36586c536bfb6c4cda8ac17c01f4976
14924         * configure.ac: Check sys/mkdev.h.
14925         * g13/sh-dmcrypt.c: Include sys/mkdev.h.
14926
14927 2017-04-18  NIIBE Yutaka  <gniibe@fsij.org>
14928
14929         dirmngr: Fix final close of LISTEN_FD.
14930         + commit 4b2581dc0ea1d03e70023bb0748aa0c21c0a2173
14931         * dirmngr/dirmngr.c (handle_connections): Close LISTEN_FD.
14932
14933         dirmngr: Fix API difference for Windows.
14934         + commit 0d0a7efa8fa0accc1da851917376e2328ef33c96
14935         * dirmngr/http.c (read_server, write_server): Use assuan_fd_t.
14936         (http_wait_response): Use FD2INT to get unsigned integer fd.
14937         (read_server, write_server): Likewise.
14938         (simple_cookie_read, simple_cookie_write): Use assuan_fd_t.
14939
14940 2017-04-17  NIIBE Yutaka  <gniibe@fsij.org>
14941
14942         agent: More minor change.
14943         + commit 9296aed4bd2ad09d23339e658264e557c5312585
14944         * agent/command.c (cmd_pksign): Remove redundant assignment.
14945
14946         agent: Minor cleanup.
14947         + commit 45c52cca1401b930878a8f901b63cfbb22e9e327
14948         * agent/command-ssh.c (ssh_key_to_protected_buffer): Not touch ERR.
14949         * agent/command.c (cmd_genkey, cmd_import_key): Clean up.
14950
14951         tests: Minor memory fix.
14952         + commit b9440aa3693a4bb91e1ba8ff09e2d93ff22dd70a
14953         * tests/openpgp/fake-pinentry.c (get_passphrase): Free the memory.
14954
14955         g10: Fix parse_ring_trust.
14956         + commit 256e861bce3dc9aba8fab4df47a40cae3bede175
14957         * g10/parse-packet.c (parse_ring_trust): Fix condition.
14958
14959         g10: Minor fixes.
14960         + commit 0dec0cc281dfa26db89f8cc5ee002dea5c2b2e81
14961         * g10/export.c (cleartext_secret_key_to_openpgp): No initialization.
14962         (do_export_one_keyblock): Initialize with GPG_ERR_NOT_FOUND.
14963         * g10/getkey.c (get_best_pubkey_byname): Add non-null check.
14964         * g10/tofu.c (tofu_set_policy): ERR initialize to 0.
14965
14966         g10: Fix import/export filter property match.
14967         + commit af5f8ecf51f5e1f33e832d4946d02313b78a0536
14968         * g10/import.c (impex_filter_getval): Fix to "else if".
14969
14970 2017-04-14  NIIBE Yutaka  <gniibe@fsij.org>
14971
14972         agent: Clean up error initialize/return.
14973         + commit 36c4e540f1a4992675ee6e0acca1231325457079
14974         * agent/call-pinentry.c (start_pinentry): Return RC.
14975         * agent/command-ssh.c (ssh_handler_request_identities): Don't set ERR.
14976         * agent/findkey.c (try_unprotect_cb): Return ERR.
14977         (unprotect): Don't set RC.
14978         * agent/gpg-agent.c (handle_connections): Don't set fd.
14979
14980         dirmngr: More fix for test program.
14981         + commit adb77d095b3958482863a17c83746f33945638dc
14982         * dirmngr/t-http.c (main): Care about no TLS.
14983
14984         dirmngr: More fix for Windows.
14985         + commit 4771bad610eb59e701fe8e53468e2af22d45eeb0
14986         * dirmngr/http.c (simple_cookie_read, simple_cookie_write): Only
14987         valid with HTTP_USE_NTBTLS.
14988         (_my_socket_new): Simply cast to int since it's for debug.
14989         (_my_socket_ref, _my_socket_unref): Likewise.
14990
14991 2017-04-13  NIIBE Yutaka  <gniibe@fsij.org>
14992
14993         dirmngr: Fix http.c for sockaddr_storage.
14994         + commit 86dcb03134fd4957d51ebaa06b7991239f9ee56a
14995         dirmngr/http.c (use_socks): Use sockaddr_storage.
14996         (my_sock_new_for_addr, connect_server): Likewise.
14997
14998         dirmngr: Fix alignment of ADDR.
14999         + commit 892b33bb2c57785927ea6652091191da2deed464
15000         * dirmngr/dns-stuff.h (dns_addrinfo_s): Use struct sockaddr_storage
15001         for size and alignment.
15002         * dirmngr/dns-stuff.c (resolve_name_libdns): Follow the change.
15003         (resolve_dns_name): Use struct sockaddr_storage.
15004         (resolve_addr_standard, resolve_dns_addr): Likewise.
15005         (resolve_dns_addr): Likewise.
15006
15007         dirmngr: Fix thread key type.
15008         + commit 37018adce6ea4920b34d59afcfe4f55f716b3086
15009         * dirmngr/dirmngr.c (my_tlskey_current_fd): Use npth_key_t.
15010
15011         common, g10: Fix enumeration types.
15012         + commit 74258278efacd7069e8c1df8ff6fc3f4675d713e
15013         * common/openpgpdefs.h (CIPHER_ALGO_PRIVATE10, PUBKEY_ALGO_PRIVATE10)
15014         (DIGEST_ALGO_PRIVATE10, COMPRESS_ALGO_PRIVATE10): New.
15015         * g10/misc.c (map_pk_gcry_to_openpgp): Add type conversion.
15016         (map_cipher_openpgp_to_gcry, openpgp_cipher_algo_name)
15017         (openpgp_pk_test_algo2, map_md_openpgp_to_gcry)
15018         (pubkey_get_npkey): Add default handling.
15019
15020         dirmngr: More fix for Windows.
15021         + commit 5af104b541ed430a54eb0163a1d29e1d043f9377
15022         * dirmngr/dns.c (socket_fd_t, STDCALL): New.
15023         (dns_te_initname): Use.
15024
15025 2017-04-12  NIIBE Yutaka  <gniibe@fsij.org>
15026
15027         dirmngr: Fix type of sock.
15028         + commit 6755b3b505f79a5a233b18e85f57a0d3a455e664
15029         * dirmngr/http.c (send_request): Use assuan_fd_t for SOCK.
15030
15031         tools: Fix condition for gpg-connect-agent.
15032         + commit f52f6af834cc488d11612e349e4af023d69a45f4
15033         * tools/gpg-connect-agent.c (start_agent): Add paren.
15034
15035         dirmngr: Fix possible null reference.
15036         + commit 7ae1857c90ab43ad9e31f0fb6dbd37f25cc37278
15037         * dirmngr/dns.c (dns_error_t dns_trace_fput): Check NULL.
15038
15039         common: Simplify format_text.
15040         + commit 7b4edf14bb16fbe786e55b829a208960396ce8df
15041         * common/stringhelp.c (format_text): Don't allow IN_PLACE formatting.
15042         * common/stringhelp.h: Change the API with no IN_PLACE.
15043         * common/t-stringhelp.c (test_format_text): Follow the change.
15044         * g10/gpgcompose.c (show_help): Likewise.
15045         * g10/tofu.c (format_conflict_msg_part1, ask_about_binding)
15046         (show_statistics, show_warning): Likewise.
15047
15048         gpgscm: Fix test program.
15049         + commit 7f9032d4a8ce53ce1a972bd3c1f8d20b3776756b
15050         * tests/gpgscm/t-child.c (main): Fix for setmode.
15051
15052         dirmngr: Fix plus1_ns.
15053         + commit 60d9a9e6b4ae3af029596d14732c02f49203326d
15054         * dirmngr/dns.c (plus1_ns): Fix the initial implementation.
15055
15056         scd: Handle unexpected suspend/resume by CCID driver.
15057         + commit f053f99ed0b0c6de7b7c4a07cbd7f7d213ddf0db
15058         * scd/ccid-driver.c (bulk_in): Handle unexpected failure.
15059
15060         dirmngr: Fix dns-stuff.c in another way.
15061         + commit bd0c94939faf8ccfc117fb595e9bc0105edcafa4
15062         * dirmngr/dns-stuff.c (T_CERT): Define our own.
15063
15064         Revert "dirmngr: Fix dns-stuff.c."
15065         + commit 0b904ddea8bddaa2fd7893a9dce1df1cb5e36b00
15066         This reverts commit 1538523156be568046f632d1775eae30ea8bd556.
15067
15068         dirmngr: Fix dns-stuff.c.
15069         + commit 1538523156be568046f632d1775eae30ea8bd556
15070         * dirmngr/dns-stuff.c: Don't include arpa/nameser.h.
15071
15072         agent: Simplify stream_read_cstring.
15073         + commit c64763c3a74ecc61c2f6c5edb679a2a3879d79e7
15074         * agent/command-ssh.c (stream_read_cstring): Just call
15075         stream_read_string.
15076
15077         dirmngr: Use a function to increment network short.
15078         + commit 64904ce627b6b0661acf15b5b70103c4842bb0f3
15079         * dirmngr/dns.c (plus1_ns): New.
15080         (dns_p_push): Use it.
15081
15082         g10: Minor clean up for export.c.
15083         + commit 05218829589f6d4b09933fa19f568c2019367d5c
15084         * g10/export.c (export_ssh_key): Check IDENTIFIER for error.
15085         Release base64 thing on error of get_membuf.
15086
15087 2017-04-11  NIIBE Yutaka  <gniibe@fsij.org>
15088
15089         g13: Include sys/sysmacros.h if available.
15090         + commit c3cc9551dcc89cc25c0a0ec16d8eb12c1c221638
15091         * configure.ac: Add test for sys/sysmacros.h.
15092         * g13/sh-dmcrypt.c: Include sys/sysmacros.h.
15093
15094 2017-04-11  Justus Winter  <justus@g10code.com>
15095
15096         tests: Fix distcheck.
15097         + commit 00be2a92625e832e8dd621f2a8f72b124c6d50ca
15098         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'gnupg.scm'.
15099
15100         tests: Avoid relying on implicit gpg commands.
15101         + commit cde626e7f7349a73d58ec3236ab3b43dec852bb5
15102         * tests/openpgp/armdetach.scm: Always use an explicit command instead
15103         of relying on gpg to guess what we want.
15104         * tests/openpgp/armdetachm.scm: Likewise.
15105         * tests/openpgp/armencrypt.scm: Likewise.
15106         * tests/openpgp/armencryptp.scm: Likewise.
15107         * tests/openpgp/armor.scm: Likewise.
15108         * tests/openpgp/armsignencrypt.scm: Likewise.
15109         * tests/openpgp/armsigs.scm: Likewise.
15110         * tests/openpgp/clearsig.scm: Likewise.
15111         * tests/openpgp/compression.scm: Likewise.
15112         * tests/openpgp/conventional-mdc.scm: Likewise.
15113         * tests/openpgp/conventional.scm: Likewise.
15114         * tests/openpgp/decrypt-dsa.scm: Likewise.
15115         * tests/openpgp/decrypt.scm: Likewise.
15116         * tests/openpgp/detach.scm: Likewise.
15117         * tests/openpgp/detachm.scm: Likewise.
15118         * tests/openpgp/ecc.scm: Likewise.
15119         * tests/openpgp/encrypt-dsa.scm: Likewise.
15120         * tests/openpgp/encrypt-multifile.scm: Likewise.
15121         * tests/openpgp/encrypt.scm: Likewise.
15122         * tests/openpgp/encryptp.scm: Likewise.
15123         * tests/openpgp/seat.scm: Likewise.
15124         * tests/openpgp/signencrypt-dsa.scm: Likewise.
15125         * tests/openpgp/signencrypt.scm: Likewise.
15126         * tests/openpgp/sigs-dsa.scm: Likewise.
15127         * tests/openpgp/sigs.scm: Likewise.
15128
15129         tests: Make tests more robust.
15130         + commit 1b28d9dbe0260b2a4645c4b5caae11d9f375c942
15131         * tests/openpgp/defs.scm (have-opt-always-trust): Execute in empty
15132         ephemeral home directory.  This prevents gpg from picking up the
15133         configuration from the current gnupghome (if any).
15134         * tests/migrations/common.scm (untar-armored): Likewise.
15135
15136         tests: Move common functionality.
15137         + commit ccd2187212c12b84c86a10fd4417a16536243179
15138         * tests/openpgp/defs.scm (with-home-directory,
15139         with-ephemeral-home-directory): Move...
15140         * tests/gpgscm/gnupg.scm: ... to this new file.
15141         * tests/gpgscm/main.c (main): Load the new file.
15142
15143 2017-04-11  NIIBE Yutaka  <gniibe@fsij.org>
15144
15145         dirmngr: Fix build for Windows.
15146         + commit 3133402241167ccad70fa888a47ffcbe04e7b4c5
15147         * dirmngr/ldap-wrapper-ce.c (outstream_cookie_writer): Use
15148         gpgrt_ssize_t.
15149
15150         g10,tools: Fix bzlib.h include order.
15151         + commit 03d77b60befa4e2f8437a80ac429cca3e54688f8
15152         * g10/compress-bz2.c: Include bzlib.h after gcrypt.h.
15153         * tools/gpgsplit.c: Likewise.
15154
15155         g10: Minor clean up for TOFU.
15156         + commit f079822b2ce06c18b7ea45efed2d29b54e38f04d
15157         * g10/tofu.c (ask_about_binding): Fix for qualifier.
15158
15159         common: Portability fix for logging.c.
15160         + commit 456c5cdb2d72bba77e2a30c8fdb1c1cebbe9b1d2
15161         * common/logging.c (S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Avoid
15162         duplicated definition.
15163
15164         tools: Portability fix for gpgparsemail.
15165         + commit a1446163d584cdc3003c7d5b5fc6d74737c1732d
15166         * tools/rfc822parse.c (my_stpcpy): Rename from stpcpy.
15167
15168 2017-04-10  Justus Winter  <justus@g10code.com>
15169
15170         gpgscm: Fix opcode dispatch.
15171         + commit 1b6adab41d386b587f65e5c6f14a63859ac1226b
15172         * tests/gpgscm/scheme.c (opexe_0): Consider 'op', not 'sc->op'.  The
15173         former is the opcode we are currently executing.
15174
15175         gpgscm: Mmap script files.
15176         + commit c7f0d90592fd0348a3818ac897f91e6859584146
15177         * tests/gpgscm/main.c (load): Try to mmap the script.
15178         * tests/gpgscm/scheme.c (scheme_load_memory): New function, a
15179         generalization of 'scheme_load_string'.
15180         * tests/gpgscm/scheme.h (scheme_load_memory): New prototype.
15181
15182         gpgscm: Refactor checking for opcode arguments.
15183         + commit f3d1f6867792deeb9a2a63744ee9b076c41c58f3
15184         * tests/gpgscm/scheme.c (op_code_info): Fix type, add forward
15185         declaration.
15186         (check_arguments): New function.
15187         (Eval_cycle): Use the new function.
15188
15189         gpgscm: Improve syntax dispatch.
15190         + commit b628e62b5b9f7ed5cbb1bfe34727b5ee8129f7d4
15191         * tests/gpgscm/scheme.c (assign_syntax): Add opcode parameter, store
15192         opcode in the tag.
15193         (syntaxnum): Add sc parameter, retrieve opcode from tag.
15194         (opexe_0): Adapt callsite.
15195         (scheme_init_custom_alloc): Likewise.
15196
15197         gpgscm: Make tags mandatory.
15198         + commit a1ad5d6a30cf72d9b7e7bb449985dc69d5e01c4b
15199         * tests/gpgscm/opdefines.h: Make tags mandatory.
15200         * tests/gpgscm/scheme.c: Likewise.
15201         * tests/gpgscm/scheme.h: Likewise.
15202
15203         gpgscm: Add and use opcode for reversing a list in place.
15204         + commit e1bb9326dc381ae2711a81ab621e21a66388bcbd
15205         * tests/gpgscm/lib.scm (string-split-pln): Use 'reverse!'.
15206         (string-rtrim): Likewise.
15207         * tests/gpgscm/opdefines.h (reverse!): New opcode.
15208         * tests/gpgscm/scheme.c (opexe_0): Handle new opcode.
15209
15210         gpgscm: Deduplicate code.
15211         + commit 3e91019a92b9bb3bb5a8cd62336b4cf65964e45b
15212         * tests/gpgscm/scheme.c (oblist_add_by_name): Deduplicate.
15213         (new_slot_spec_in_env): Likewise.
15214
15215         gpgscm: Move dispatch table into rodata.
15216         + commit 7dff6248bddd5583988ac562318cf0d76a409d0e
15217         * tests/gpgscm/opdefines.h: Use 0 instead of NULL.
15218         * tests/gpgscm/scheme.c (op_code_info): Use char arrays instead of
15219         pointers, make arity parameters smaller.
15220         (INF_ARG): Adapt.
15221         (_OP_DEF): Likewise.
15222         (dispatch_table): Likewise.
15223         (procname): Likewise.
15224         (Eval_cycle): Likewise.
15225         (scheme_init_custom_alloc): Likewise.
15226
15227         gpgscm: Use more threaded code.
15228         + commit 6f217d116d1a12c6093bb253dbfa349bc81bc90b
15229         * tests/gpgscm/scheme.c (opexe_0): Use 's_thread_to' instead of
15230         's_goto' wherever possible.
15231
15232         gpgscm: Remove now obsolete dispatcher function from the opcodes.
15233         + commit e7ed9822e20ee4bbb4cdd9eca8121b4ade87e5ce
15234         * tests/gpgscm/opdefines.h: Remove now obsolete dispatcher function
15235         from the opcodes.
15236         * tests/gpgscm/scheme-private.h (_OP_DEF): Adapt.
15237         * tests/gpgscm/scheme.c (dispatch_func): Remove type declaration.
15238         (op_code_info): Remove 'func'.
15239         (_OP_DEF): Adapt.
15240         (Eval_Cycle): Always call 'opexe_0'.
15241
15242         gpgscm: Merge 'opexe_6'.
15243         + commit ddf444828b9b3f75d964473a2c0e77f75f094cf4
15244         * tests/gpgscm/scheme.c (opexe_6): Merge into 'opexe_0'.
15245         * tests/gpgscm/opdefines.h: Adapt.
15246
15247         gpgscm: Merge 'opexe_5'.
15248         + commit 1379df44537b67b7c2fbc0fb5bc6f7945a5d7ebb
15249         * tests/gpgscm/scheme.c (opexe_5): Merge into 'opexe_0'.
15250         * tests/gpgscm/opdefines.h: Adapt.
15251
15252         gpgscm: Merge 'opexe_4'.
15253         + commit 4f835104b9475e7d585d859b85e7d0d4cfe9aab3
15254         * tests/gpgscm/scheme.c (opexe_4): Merge into 'opexe_0'.
15255         * tests/gpgscm/opdefines.h: Adapt.
15256
15257         gpgscm: Merge 'opexe_3'.
15258         + commit d591ab65d37ee467ca91ad851ab236f2985c1ee2
15259         * tests/gpgscm/scheme.c (opexe_3): Merge into 'opexe_0'.
15260         * tests/gpgscm/opdefines.h: Adapt.
15261
15262         gpgscm: Merge 'opexe_2'.
15263         + commit 6cad38228f6ebfdc8e52960223b492597aff26a0
15264         * tests/gpgscm/scheme.c (opexe_2): Merge into 'opexe_0'.
15265         * tests/gpgscm/opdefines.h: Adapt.
15266
15267         gpgscm: Merge 'opexe_1'.
15268         + commit 154af876f05b773bf3a860fcb4cc41066da27beb
15269         * tests/gpgscm/scheme.c (opexe_1): Merge into 'opexe_0'.
15270         * tests/gpgscm/opdefines.h: Adapt.
15271
15272 2017-04-10  NIIBE Yutaka  <gniibe@fsij.org>
15273
15274         agent: Use "ll" length specifier when time_t is larger.
15275         + commit 170660ed11b56145dea4865e751ae5aff1681fe2
15276         * agent/command.c (cmd_keytocard): Use KEYTOCARD_TIMESTAMP_FORMAT.
15277
15278         scd: Relax a condition for p15 driver.
15279         + commit 7501f2e9c4e6fd94a191b381d52ec2fe1d103e29
15280         * scd/app-p15.c (read_ef_aodf): Fix.
15281
15282         scd: Relax a condition for p15 driver.
15283         + commit 3c1ad96f1ce838daf2d861b33e6611f6d3043d25
15284         * scd/app-p15.c (read_ef_aodf): Remove possibly redundant condition.
15285
15286         scd: Remove "special transport" support.
15287         + commit 34199ef677bb40eadf0da696a111f7036bc3187e
15288         * scd/ccid-driver.c (transports, my_sleep, prepare_special_transport)
15289         (writen): Remove.
15290         (ccid_dev_scan, ccid_dev_scan_finish, ccid_get_BAI): Only for USB.
15291         (ccid_open_reader, do_close_reader, bulk_out, bulk_in, abort_cmd)
15292         (ccid_poll, ccid_transceive): Likewise.
15293
15294 2017-04-07  Justus Winter  <justus@g10code.com>
15295
15296         gpgscm: Allocate small integers in the rodata section.
15297         + commit 8640fa880d7050917f4729f2c0cb506e165ee446
15298         * tests/gpgscm/Makefile.am (gpgscm_SOURCES): Add new file.
15299         * tests/gpgscm/scheme-private.h (struct cell): Move number to the top
15300         of the union so that we can initialize it.
15301         (struct scheme): Remove 'integer_segment'.
15302         * tests/gpgscm/scheme.c (initialize_small_integers): Remove function.
15303         (small_integers): New variable.
15304         (MAX_SMALL_INTEGER): Compute.
15305         (mk_small_integer): Adapt.
15306         (mark): Avoid marking objects already marked.  This allows us to run
15307         the algorithm over objects in the rodata section if they are already
15308         marked.
15309         (scheme_init_custom_alloc): Remove initialization.
15310         (scheme_deinit): Remove deallocation.
15311         * tests/gpgscm/small-integers.h: New file.
15312
15313         gpgscm: Make global data constant when possible.
15314         + commit c9c3fe883271868d3b2dd287d295cf6a8f8ffc05
15315         * tests/gpgscm/scheme-private.h (struct scheme): Make 'vptr' const.
15316         * tests/gpgscm/scheme.c (num_zero): Statically initialize and turn
15317         into constant.
15318         (num_one): Likewise.
15319         (charnames): Change type so that it can be stored in rodata.
15320         (is_ascii_name): Adapt slightly.
15321         (assign_proc): Make argument const char *.
15322         (op_code_info): Make some fields const char *.
15323         (tests): Make const.
15324         (dispatch_table): Make const.  At least it can be made read-only after
15325         relocation.
15326         (Eval_Cycle): Adapt slightly.
15327         (vtbl): Make const.
15328
15329         gpgscm: Remove arbitrary limit on number of cell segments.
15330         + commit 56638c28adc1bbe9fc052b92549a50935c0fe99c
15331         * tests/gpgscm/scheme-private.h (struct scheme): Remove fixed-size
15332         arrays for cell segments, replace them with a pointer to the new
15333         'struct cell_segment' instead.
15334         * tests/gpgscm/scheme.c (struct cell_segment): New definition.
15335         (_alloc_cellseg): Allocate the header within the segment, return a
15336         pointer to the header.
15337         (_dealloc_cellseg): New function.
15338         (alloc_cellseg): Insert the segments into a list.
15339         (_get_cell): Allocate a new segment if less than a quarter of
15340         CELL_SIGSIZE is recovered during garbage collection.
15341         (initialize_small_integers): Adapt callsite.
15342         (gc): Walk the list of segments.
15343         (scheme_init_custom_alloc): Remove initialization of removed field.
15344         (scheme_deinit): Adapt deallocation.
15345
15346         gpgscm: Fix compact vector encoding.
15347         + commit bf8b5e9042b3d86d419b2ac1987a9298c9d21500
15348         * tests/gpgscm/scheme-private.h (struct cell): Use uintptr_t for
15349         '_flags'.  This way, '_flags' has the size of a machine word.
15350
15351 2017-04-07  Werner Koch  <wk@gnupg.org>
15352
15353         gpg: Fix printing of offline taken subkey.
15354         + commit 547bc01d57528ecc27b3b5e16797967a7f88fecf
15355         * g10/keylist.c (list_keyblock_print): Set SECRET to 2 and not 0x32.
15356
15357 2017-04-07  NIIBE Yutaka  <gniibe@fsij.org>
15358
15359         scd: Internal CCID reader cleanup.
15360         + commit cc420d34880e2a050b39f969873974cfc35fa5c3
15361         * scd/ccid-reader.c (scan_usb_device): Only for scan mode, so, rename
15362         from scan_or_find_usb_device.
15363         (scan_devices): Likewise.  Remove support of special transport types.
15364         (ccid_get_reader_list): Simplify.
15365         (abort_cmd): Fix error return.
15366         (send_escape_cmd): Fix for RESULTLEN == NULL.
15367         (ccid_transceive_secure): Remove unnecessary var updates.
15368
15369         scd: Don't keep CCID reader open when card is not available.
15370         + commit 3c93595d701c59cbc9b67a7fd0bcde7ee0fada1a
15371         * scd/apdu.c (open_ccid_reader): Fail if no ATR.
15372
15373         agent: Serialize access to passphrase cache.
15374         + commit ebe12be034f052cdec871f0d8ad1bfab85d7b943
15375         * agent/cache.c (encryption_lock): Remove.
15376         (cache_lock): New.  Now, we have coarse grain lock to serialize
15377         entire cache access.
15378         (initialize_module_cache): Use CACHE_LOCK.
15379         (init_encryption, new_data): Remove ENCRYPTION_LOCK.
15380         (agent_flush_cache, agent_put_cache, agent_get_cache): Lock the cache.
15381
15382 2017-04-06  Justus Winter  <justus@g10code.com>
15383
15384         gpgscm: Avoid mutating integer.
15385         + commit f1dc34f502a68673e7a29f3fcf57b8dc6a4fac89
15386         * tests/gpgscm/scheme.c (opexe_5): Do not modify the integer in-place
15387         while printing an vector.  Integer objects may be shared, so they must
15388         not be mutated.
15389
15390         gpgscm: Initialize unused slots in vectors.
15391         + commit b83903f59ec5d49ac579f263da70ebc8dc3645b5
15392         * tests/gpgscm/scheme.c (get_vector_object): Initialize unused slots
15393         at the end of vectors.
15394
15395         tests: Fix distcheck.
15396         + commit 23f00f109ddba595db4f73a6182750177c7dd75d
15397         * tests/Makefile.am (SUBDIRS): Add 'pkits' again.  Simply dropping it
15398         makes 'make distcheck' unhappy.
15399         * tests/pkits/Makefile.am (TESTS): Remove all tests.
15400
15401         tests: Disable 'pkits' test suite.
15402         + commit af1c1a57e46a00a32d83c1a58c5f3ef6f4a1c1d1
15403         * tests/Makefile.am (SUBDIRS): Drop 'pkits'.
15404         * tests/pkits/common.sh: Fix locating 'PKITS_data.tar.bz2'.
15405         * tests/pkits/inittests: Likewise.
15406
15407         tests: Make test more robust.
15408         + commit 94645311f8a3e9ae33643512f87fbef41bf0556f
15409         * tests/openpgp/4gb-packet.scm: Skip if we do not have BZIP2.
15410         * tests/openpgp/defs.scm (have-compression-algo?): New function.
15411
15412 2017-04-05  Justus Winter  <justus@g10code.com>
15413
15414         tests: Fix setup of ephemeral home directories.
15415         + commit 01e84d429aeeb1450012ff0576a6a24de50693c6
15416         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Set
15417         GNUPGHOME and cwd to the ephemeral directory before calling the setup
15418         function.
15419
15420 2017-04-04  Justus Winter  <justus@g10code.com>
15421
15422         tests: Fix setup of ephemeral home directories.
15423         + commit 32b75fb7743f35936d7014fce33c90ba97dfa374
15424         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Create
15425         configuration files when we enter the context.
15426         * tests/openpgp/setup.scm: Do not use an ephemeral home directory.
15427         Tests should always use the cwd.
15428         * tests/gpgsm/setup.scm: Likewise.
15429         * tests/gpgsm/export.scm: Add explicit constructor function.
15430         * tests/openpgp/decrypt-session-key.scm: Likewise.
15431         * tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
15432
15433         gpgscm: Fix copying values.
15434         + commit 6261611d3786f19fd84ccc79f45a89cadac518e8
15435         * tests/gpgscm/scheme.c (copy_value): New function.
15436         (mk_tagged_value): Use new function.
15437         (opexe_4): Likewise for OP_SAVE_FORCED.
15438
15439         gpgscm: Simplify get-output-string operation.
15440         + commit a80d4a9b50ad47eae1f8c740dd73804311e38783
15441         * tests/gpgscm/scheme.c (opexe_4): Simplify 'get-output-string'.
15442
15443         gpgscm: Simplify substring operation.
15444         + commit d858096c99705ccf2e115475f81c4cf88edbeebf
15445         * tests/gpgscm/scheme.c (opexe_2): Simplify 'substring'.
15446
15447 2017-04-04  NIIBE Yutaka  <gniibe@fsij.org>
15448
15449         agent: Minor fix for get_client_pid.
15450         + commit 5744d2038bd17b8b1be4e73d0ad3bc41772efe96
15451         * agent/command-ssh.c (get_client_pid): Use 0 to initialize.
15452
15453 2017-04-03  Werner Koch  <wk@gnupg.org>
15454
15455         Release 2.1.20.
15456         + commit e7eb9b12deaf7ebe26967bfb56e980b7efeebdc3
15457
15458
15459         dirmngr: New option --disable-ipv6.
15460         + commit 3533b854408fa93734742b2ee12b62aa0d55ff28
15461         * dirmngr/dirmngr.h (struct opt): Add field 'disable_ipv6'.
15462         * dirmngr/dirmngr.c (oDisableIPv6): New const.
15463         (opts): New option --disable-ipv6.
15464         (parse_rereadable_options): Set that option.
15465         * dirmngr/dns-stuff.c (opt_disable_ipv6): New var.
15466         (set_dns_disable_ipv6): New.
15467         (resolve_name_standard): Make use of it.
15468         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Take care of
15469         OPT.DISABLE_IPV6.
15470         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
15471         (send_request): Ditto.
15472         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
15473         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
15474
15475         dirmngr,w32: Silence the 'certificate already cached' message.
15476         + commit fce36d7ec87be14b874813db277781c87a64ea87
15477         * dirmngr/certcache.c (load_certs_from_w32_store): Silenece an info
15478         message.
15479
15480         dirmngr: Handle EIO which is sometimes returned by cookie functions.
15481         + commit cc32ddbcba8c53d3e2cad952d72f62dc73911042
15482         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Handle EIO.
15483
15484         dirmngr: Always print a warning for a missing /etc/hosts.
15485         + commit 35c843c815306f36d1efbc52f5e2f6bac3f67aec
15486         * dirmngr/dns-stuff.c (libdns_init): No Windows specific handling of a
15487         missing /etc/hosts.
15488
15489         dirmngr: Do not assume that /etc/hosts exists.
15490         + commit 5d873f288e86edfb684f4dd57ac36466b06494a4
15491         * dirmngr/dns-stuff.c (libdns_init): Do not bail out.
15492
15493         po: Update the German translation.
15494         + commit c7be01dae914c183dd99bd531a388c794d858c61
15495
15496
15497         gpgconf: Add --enable-extended-key-format for the agent.
15498         + commit d23052b04ebb0ac731aa351650c4084f080c640b
15499         * tools/gpgconf-conf.c: Add option.
15500         * agent/gpg-agent.c (main) <aGPGConfList>: Add option.
15501
15502 2017-04-03  Justus Winter  <justus@g10code.com>
15503
15504         gpgscm: Slightly improve the procedure dispatch.
15505         + commit 90932bdad607d06f4f040e3457caddba79ba8b7e
15506         * tests/gpgscm/scheme.c (procnum): Procedures always have an integer
15507         number, so we can safely use the cheaper 'ivalue_unchecked'.
15508
15509 2017-04-03  Werner Koch  <wk@gnupg.org>
15510
15511         gpg: Handle critical marked 'Reason for Revocation'.
15512         + commit 3f6d949011f485613bb4bd3e06a2643be79cce40
15513         * g10/parse-packet.c (can_handle_critical): Add
15514         SIGSUBPKT_REVOC_REASON.
15515
15516 2017-04-02  Werner Koch  <wk@gnupg.org>
15517
15518         agent: Use OCB for key protection with --enable-extended-key-format.
15519         + commit d24375271b97e45deaeb1ef0a8434c64066ba2e8
15520         * agent/protect.c (PROT_DEFAULT_TO_OCB): Remove macro.
15521         (agent_protect): Make the default protection mode depend on the extend
15522         key format option.
15523
15524 2017-04-01  Werner Koch  <wk@gnupg.org>
15525
15526         kbx: Unify blob reading functions.
15527         + commit 0039d7107bcdfce6f3b02b46ff0495cfba07882a
15528         * kbx/keybox-file.c (_keybox_read_blob): Remove.
15529         (_keybox_read_blob2): Rename to ....
15530         (_keybox_read_blob): this.  Make arg options.  Change all callers.
15531         * kbx/keybox-search.c (keybox_search): Factor fopen call out to ...
15532         (open_file): new.
15533         (keybox_seek): Als use open_file.
15534
15535 2017-03-31  Werner Koch  <wk@gnupg.org>
15536
15537         gpg: Avoid multiple open calls to the keybox file.
15538         + commit 5556eca5acd46983bff0b38a1ffbc2f07fbaba9f
15539         * g10/keydb.h (KEYDB_HANDLE): Move typedef to ...
15540         * g10/gpg.h: here.
15541         (struct server_control_s): Add field 'cached_getkey_kdb'.
15542         * g10/gpg.c (gpg_deinit_default_ctrl): Release that keydb handle.
15543         * g10/getkey.c (getkey_end): Cache keydb handle.
15544         (get_pubkey): Use cached keydb handle.
15545         * kbx/keybox-search.c (keybox_search_reset): Use lseek instead of
15546         closing the file.
15547
15548         gpg: Pass CTRL also to getkey_end.
15549         + commit aca5f494a88776d4974bfa9b0b65cb60c1b42040
15550         * g10/getkey.c (getkey_end): Add arg CTRL.  Change all callers.
15551
15552         gpg: Print more stats for the keydb and the signature cache.
15553         + commit 3a10de3bfd785aefb0150e82b6dbbc7cb9f208c8
15554         * g10/sig-check.c (sig_check_dump_stats): New.
15555         (cache_stats): New struct.
15556         (check_key_signature2): Update stats.
15557         * g10/gpg.c (g10_exit): Call new function.
15558         * g10/keydb.c (kid_not_found_cache_count): Replace by ...
15559         (kid_not_found_stats): ... new struct.  Change users.
15560         (keydb_stats): New struct.  Update the counters.
15561         (keydb_dump_stats): Print all stats.
15562
15563         gpg: Assert that an opaque parameter is really what we expect.
15564         + commit 52ba5e67cad4311d0ddbc4f2979e20afd0161d1f
15565         * g10/gpg.h (SERVER_CONTROL_MAGIC): New const.
15566         (server_control_s): Add field 'magic'.
15567         * g10/gpg.c (gpg_init_default_ctrl): Init MAGIC.
15568         * g10/import.c (impex_filter_getval): Assert MAGIC.
15569
15570 2017-03-30  Justus Winter  <justus@g10code.com>
15571
15572         gpg: Consistent use of preprocessor conditionals.
15573         + commit 5e89144cbca36c1e7eb814b3aad4b7c46cd4efbf
15574         * g10/parse-packet.c: Use '#if' instead of '#ifdef' when checking
15575         DEBUG_PARSE_PACKET.  This fixes the build with '#define
15576         DEBUG_PARSE_PACKET 0'.
15577
15578         common: Avoid undefined behavior.
15579         + commit 214fa9012296d796b78f1a3106d656639cf50aef
15580         * common/iobuf.c (iobuf_read_line): Do not consider 'length' if
15581         'buffer' is NULL.
15582
15583 2017-03-30  Werner Koch  <wk@gnupg.org>
15584
15585         gpg: Remove the use of the signature information from a KBX.
15586         + commit a6142dbdbc5783043deb847dc64998c421860941
15587         * g10/keydb.c (keyblock_cache): Remove field SIGSTATUS.
15588         (keyblock_cache_clear): Adjust for that removal.
15589         (parse_keyblock_image): Remove arg SIGSTATUS.  Remove the signature
15590         cache setting; this is now done in the parser.
15591         (keydb_get_keyblock): Do not set SIGSTATUS.
15592         (build_keyblock_image): Remove arg SIGSTATUS and simplify.  Change
15593         caller.
15594         * kbx/keybox-blob.c: Explain that the signature information is not
15595         anymore used.
15596         (_keybox_create_openpgp_blob): Remove arg SIGSTATUS and change
15597         callers.
15598         * kbx/keybox-search.c (keybox_get_keyblock): Remove arg R_SIGSTATUS
15599         and change callers.
15600         * kbx/keybox-update.c (keybox_insert_keyblock): Likewise.
15601
15602         gpg: Fix actual leak and possible leaks in the packet parser.
15603         + commit 7bf24e8146116a30c4c9d7b6dbf8bbb27fc35971
15604         * g10/packet.h (struct parse_packet_ctx_s): Change LAST_PKT deom a
15605         pointer to its struct.
15606         (init_parse_packet): Adjust for LAST_PKT not being a pointer.
15607         * g10/parse-packet.c (parse): Ditto. Free the last packet before
15608         storing a new one in case of a deep link.
15609         (parse_ring_trust): Adjust for LAST_PKT not being a pointer.
15610         * g10/free-packet.c (free_packet): Ditto.
15611         * g10/t-keydb-get-keyblock.c (do_test): Release keyblock.
15612
15613         gpg: Fix export porting of zero length user ID packets.
15614         + commit 64665404e43051fa50ee030766347e24b7d1e4d5
15615         * g10/build-packet.c (do_user_id): Avoid indeterminate length header.
15616
15617         gpg: Revamp reading and writing of ring trust packets.
15618         + commit a8895c99a7d0750132477d80cd66caaf3a709113
15619         * g10/parse-packet.c (parse_trust): Rename to ...
15620         (parse_ring_trust): this.  Change args and implement new ring trust
15621         packet format.
15622         (parse): Add special ring trust packet handling.
15623         * g10/packet.h (PKT_user_id): New fields KEYUPDATE, UPDATEURL, and
15624         KEYSRC.
15625         (PKT_public_key): Ditto.
15626         (RING_TRUST_SIG, RING_TRUST_KEY, RING_TRUST_UID): New consts.
15627         (PKT_ring_trust): New.
15628         (struct packet_struct): Remove member RING_TRUST.
15629         (strcu parse_packet_ctx_s): Add field SKIP_META.
15630         (init_parse_packet): Init SKIPT_META.
15631         * g10/free-packet.c (release_public_key_parts): Free UDPATEURL.
15632         (free_user_id): Ditto.
15633         * g10/mainproc.c (list_node): Remove printing of non-documented "rtv"
15634         lines.
15635         * g10/build-packet.c (build_packet_and_meta): New.
15636         (do_ring_trust): New.
15637         * g10/export.c (write_keyblock_to_output): Use build_packet_and_meta
15638         in backup mode.
15639         (do_export_one_keyblock): Ditto.
15640         * g10/import.c (read_block): Add arg WITH_META.  Skip ring trust
15641         packets if that ism not set.
15642         (import): Call read_block WITH_META in restore mode.
15643         * g10/keydb.h (KEYSRC_UNKNOWN, KEYSRC_FILE, KEYSRC_KS, KEYSRC_PREF_KS)
15644         (KEYSRC_WKD, KEYSRC_WKD_SD, KEYSRC_DANE): New constants.  They are not
15645         yet used, though.
15646         * g10/keydb.c (parse_keyblock_image): Allow ring trust packets.
15647         (build_keyblock_image): Ditto.  Use build_packet_and_meta.
15648         * g10/keyring.c (keyring_get_keyblock): Remove specila treatment of
15649         ring trust packets.
15650         (write_keyblock): Use build_packet_and_meta.  Remove special treatment
15651         of ring trust packets and initialization of the signature caches.
15652
15653 2017-03-29  Werner Koch  <wk@gnupg.org>
15654
15655         gpg: Extend free_packet to handle a packet parser context.
15656         + commit afa86809087909a8ba2f9356588bf90cc923529c
15657         * g10/packet.h (struct parse_packet_ctx_s): Add fields LAST_PKT and
15658         FREE_LAST_PKT.
15659         (init_parse_packet): Clear them.
15660         (deinit_parse_packet): New macro.  Change all users if
15661         init_parse_packet to also call this macro.
15662         * g10/free-packet.c (free_packet): Add arg PARSECTX and handle shallow
15663         packet copies in the context.  Change all callers.
15664         * g10/parse-packet.c (parse): Store certain packets in the parse
15665         context.
15666
15667         gpg: Change parse_packet to take a context.
15668         + commit 0526c99164d3531b5ec763ffc672407eb24b2296
15669         * g10/packet.h (struct parse_packet_ctx_s): New.
15670         (parse_packet_ctx_t): New type.
15671         (init_parse_packet): New macro.
15672         * g10/parse-packet.c (parse_packet, dbg_parse_packet): Change to take
15673         a parse context.  Change all callers to provide a context instead of
15674         directly supplying the input stream.
15675         (search_packet, dbg_search_packet): Ditto.
15676         (copy_all_packets, dbg_copy_all_packets): Init an use a parse context.
15677         (copy_some_packets, dbg_copy_some_packets): Ditto.
15678         (skip_some_packets, dbg_skip_some_packets): Ditto.
15679
15680         gpg: Export ring trust packets in backup mode.
15681         + commit f5b565a5b8de3f2a3d98bc1a655e18333aee223b
15682         * g10/export.c (write_keyblock_to_output): Export ring trust packets.
15683
15684 2017-03-28  Justus Winter  <justus@g10code.com>
15685
15686         tests,w32: Fix importing the extra key for GPGME's keylist test.
15687         + commit b20780658ebb1e1245db18c04db3e815399cf706
15688         * tests/gpgme/wrap.scm: Qualify the tests name with the extension for
15689         executables (if any).
15690
15691 2017-03-28  Werner Koch  <wk@gnupg.org>
15692
15693         gpg: Prepare for listing last_update and key origin data.
15694         + commit 4af389c9721fa534ed06a64b80705b631575c775
15695         * g10/keylist.c (list_keyblock_colon): Add empty fields 19 and 20.
15696
15697 2017-03-28  Justus Winter  <justus@g10code.com>
15698
15699         tests: Fix distcheck.
15700         + commit 5128cd74c029d57491a79ca9e918c81facdf1b76
15701         * tests/openpgp/Makefile.am (sample_msgs): Add all missing sample
15702         messages.
15703
15704         tests: Add test for '--decrypt --unwrap'.
15705         + commit 211d71f19c24da94f4c58014606125c1a29d86a2
15706         * tests/openpgp/Makefile.am (XTESTS): Add new test.
15707         * tests/openpgp/decrypt-unwrap-verify.scm: New file.
15708
15709         g10: Fix memory leak.
15710         + commit 6d3edfd972c1114f43f6b35773dc25e0256f48f4
15711         * g10/decrypt-data.c (decrypt_data): Free 'filename'.
15712
15713 2017-03-27  Justus Winter  <justus@g10code.com>
15714
15715         common: Fix connecting to the agent.
15716         + commit caf00915532e6e8e509738962964edcd14fb0654
15717         * common/homedir.c (_gnupg_socketdir_internal): Fix error handling.
15718
15719 2017-03-27  NIIBE Yutaka  <gniibe@fsij.org>
15720
15721         g10: Support specifying SERIALNO for --card-status.
15722         + commit c1e6302b347caf852a056b9c721469ccb51f44da
15723         * g10/gpg.c (main): Allow an argument for --card-status.
15724         * g10/card-util.c (current_card_status): Rename from card_status.
15725         (card_status): New, which supports multiple cards.
15726         (get_one_name): Use current_card_status.
15727
15728         scd: Change the order of applications when accessed.
15729         + commit d58275703f035e8cfd58cd1c2d0d5ac7dc59e110
15730         * scd/app.c (select_application): Move the app to top.
15731
15732         scd: Fix timeout handling for key generation.
15733         + commit 0848cfcce738150b53bfb65b78efc1e6dc9f3d26
15734         * scd/ccid-driver.c (CCID_CMD_TIMEOUT): Back to original value.
15735         (CCID_CMD_TIMEOUT_LONGER): New.
15736         (ccid_transceive): Add kludge for key generation.
15737
15738 2017-03-24  Werner Koch  <wk@gnupg.org>
15739
15740         gpg: Improve check for already compressed packets.
15741         + commit 0b3770c421a35b64823a805fa8d49ddd5c653d50
15742         * common/miscellaneous.c (is_openpgp_compressed_packet): New.
15743         (is_file_compressed): Rerad 2 more bytes and call new function.
15744
15745         agent: New option --enable-extended-key-format.
15746         + commit 2c237c13628a88ba23742da34ea18d3e205d7c53
15747         * agent/gpg-agent.c (oEnableExtendedKeyFormat): New const.
15748         (opts): New option --enable-extended-key-format.
15749         (parse_rereadable_options): Set option
15750         * agent/findkey.c (write_extended_private_key): Add arg 'update'.
15751         (agent_write_private_key): Implement new option.
15752
15753         agent: New option --stub-only for DELETE_KEY.
15754         + commit 6fab7bba879d7794e32112cf3eddd8d87130a5d7
15755         * agent/findkey.c (agent_delete_key): Add arg 'only_stubs'.
15756         * agent/command.c (cmd_delete_key): Add option --stub-only.
15757
15758 2017-03-23  Werner Koch  <wk@gnupg.org>
15759
15760         common: Implicitly do a gpgconf --create-socketdir.
15761         + commit 26086b362ff47d21b1abefaf674a6464bf0a8921
15762         * common/homedir.c (_gnupg_socketdir_internal): Create the
15763         sub-directory.
15764
15765         tests: Use gpgconf to stop the agent.
15766         + commit 2c9d9ac55ea455a5ec26428989dced0311ed46cc
15767         * tests/openpgp/defs.scm (stop-agent): Swap order of actions.  Kill
15768         all daemons using gpgconf.
15769         * tools/gpgconf.c (main) <aRemoveSocketDir>: Try to remove known
15770         socketfails on rmdir failure.  Do no fail for ENONET.
15771
15772 2017-03-23  Justus Winter  <justus@g10code.com>
15773
15774         gpgscm: Make test cleanup more robust.
15775         + commit 178b6314ab2d2268873067314744c8af74dc331e
15776         * tests/gpgscm/tests.scm (mkdtemp-autoremove): New function that
15777         cleans up at interpreter shutdown.
15778         (run-tests-parallel): Use the new function.
15779         (run-tests-sequential): Likewise.
15780         (make-environment-cache): Execute setup with an temporary working
15781         directory.
15782
15783 2017-03-21  Justus Winter  <justus@g10code.com>
15784
15785         tests: Test '--quick-set-primary-uid'.
15786         + commit fde885bbc47a4bf14a8570ac62e68adc8cf47a6e
15787         * tests/openpgp/quick-key-manipulation.scm: Test
15788         '--quick-set-primary-uid'.
15789
15790         tests,w32: Use GetTempPath to get the path for temporary files.
15791         + commit d17840c3f40111beaf97d96ad3ca52047976e221
15792         * tests/gpgscm/ffi.c (do_get_temp_path): New function.
15793         (ffi_init): Make function available.
15794         * tests/gpgscm/tests.scm (mkdtemp): Use the new function.
15795
15796 2017-03-21  Werner Koch  <wk@gnupg.org>
15797
15798         gpg: New command --quick-set-primary-uid.
15799         + commit 74c1f30ad6616186f0ab9dbaf34db6c17b1e40c4
15800         * g10/gpg.c (aQuickSetPrimaryUid): New const.
15801         (opts): New command --quick-set-primary-uid.
15802         (main): Implement it.
15803         * g10/keyedit.c (keyedit_quick_adduid): Factor some code out to ...
15804         (quick_find_keyblock): new func.
15805         (keyedit_quick_revuid): Use quick_find_keyblock.
15806         (keyedit_quick_set_primary): New.
15807
15808 2017-03-21  Justus Winter  <justus@g10code.com>
15809
15810         dirmngr: Fix error handling.
15811         + commit 483c1288a8f86dc6bf93d0d3f2865ecc246aecba
15812         * dirmngr/dns-stuff.c (libdns_init): Convert error before printing it.
15813
15814         dirmngr: Load the hosts file into libdns.
15815         + commit 88f1505f0613894d5544290a170119eb538921e5
15816         * dirmngr/dns-stuff.c (libdns_init): Actually load the hosts file into
15817         libdns.
15818
15819         tests: Create temporary directories in '/tmp'.
15820         + commit 06f1f163e96f1039304fd3cf565cf9de1ca45849
15821         * tests/gpgscm/tests.scm (mkdtemp): Create temporary directories in
15822         '/tmp' on UNIX, or in '%Temp' on Windows.
15823         * tests/migrations/common.scm (run-test): Turn error into a warning.
15824         * tests/openpgp/defs.scm (start-agent): Likewise.
15825
15826 2017-03-20  Justus Winter  <justus@g10code.com>
15827
15828         tests: Remove debugging remnants.
15829         + commit ceb4b245752bb1fb43fde7e99f8d904ab8a9b5e2
15830         * tests/gpgme/gpgme-defs.scm (run-python-tests?): Remove 'trace's.
15831
15832         tests: Fail if we cannot create the socket directory.
15833         + commit d75d20909d9f60d33ffd210def92278c0f383aad
15834         * tests/migrations/common.scm (run-test): Turn warning into an error.
15835         * tests/openpgp/defs.scm (start-agent): Likewise.
15836
15837 2017-03-20  Werner Koch  <wk@gnupg.org>
15838
15839         gpg: Add new field no 18 to the colon listing.
15840         + commit fe0b37e123ded51cc5f4cb5e3547fdfbce37a43e
15841         * g10/misc.c (gnupg_pk_is_compliant): New.
15842         * g10/keylist.c (print_compliance_flags): New.
15843         (list_keyblock_colon): Call it here.
15844         * sm/keylist.c (print_compliance_flags): New.
15845         (list_cert_colon): Call it here.
15846
15847         gpg: Remove unused stuff.
15848         + commit e2c63a13e2fa4ce39af8471a34c06d73ff3ee6f6
15849         * g10/OPTIONS: Remove.
15850         * g10/options.h (struct opt): Remove 'shm_coprocess'.
15851
15852 2017-03-17  Neal H. Walfield  <neal@g10code.com>
15853
15854         tests: Add test for issue 2959.
15855         + commit fb9d68d636490ca88925051f48b08963c324aed1
15856         * tests/openpgp/tofu.scm: Add test for --tofu-default-policy=ask.
15857
15858         gpg: Make sure the conflict set includes the current key.
15859         + commit b1106b4d640325c60a7212a4a44e4f67c0e3312d
15860         * g10/tofu.c (get_trust): Sanity check CONFLICT_SET after calling
15861         get_policy.  If POLICY is 'auto' and the default policy is 'ask', make
15862         sure CONFLICT_SET includes the current key.
15863
15864 2017-03-17  Werner Koch  <wk@gnupg.org>
15865
15866         dirmngr: Ignore warning alerts in the GNUTLS handshake.
15867         + commit 69c521df422a6c9a6b0a93e45c9373a8b6ceb28e
15868         * dirmngr/http.c (send_request) [GNUTLS]: Don't bail out on warning
15869         alerts.
15870
15871 2017-03-17  Justus Winter  <justus@g10code.com>
15872
15873         gpgscm: Simplify hash tables.
15874         + commit 6a3f857224eab108ae38e6259194b01b0ffdad8b
15875         * tests/gpgscm/scheme.c (oblist_add_by_name): We now always get a
15876         slot.  Simplify accordingly.
15877         (oblist_find_by_name): Always return the slot.
15878         (vector_elem_slot): New function.
15879         (new_slot_spec_in_env): We now always get a slot.  Remove parameter
15880         'env'.  Simplify accordingly.
15881         (find_slot_spec_in_env): Always return a slot.
15882         (new_slot_in_env): Adapt callsite.
15883         (opexe_0): Likewise.
15884         (opexe_1): Likewise.
15885         (scheme_define): Likewise.
15886
15887         gpgscm: Remove framework for immediate values.
15888         + commit 38c955599f7c6c20faeec57d8e1df7d2c0eeba18
15889         * tests/gpgscm/scheme.c (IMMEDIATE_TAG): Remove macro.
15890         (is_immediate): Likewise.
15891         (set_immediate): Likewise.
15892         (clr_immediate): Likewise.
15893         (enum scheme_types): Set the LSB in every value.
15894         (fill_vector): Adapt.
15895         (vector_elem): Likewise.
15896         (set_vector_elem): Likewise.
15897         (mark): Likewise.
15898         (gc): Test for the LSB to tell typeflags apart from pointers stored in
15899         the same memory location.
15900
15901 2017-03-16  NIIBE Yutaka  <gniibe@fsij.org>
15902
15903         agent,g10: Remove redundant SERIALNO request.
15904         + commit 8c8ce8711d9c938fcb982b0341e6b052742cb887
15905         * agent/learncard.c (agent_handle_learn): Don't call
15906         agent_card_serialno.  Get the serialno in status response.
15907         * g10/call-agent.c (agent_scd_learn): Don't request "SCD SERIALNO".
15908         (agent_scd_serialno): New.
15909         (card_cardlist_cb, agent_scd_cardlist): New.
15910
15911 2017-03-15  Justus Winter  <justus@g10code.com>
15912
15913         tests: Fix using tools from the build directory.
15914         + commit a98459d3f4ec3d196fb0adb0e90dadf40abc8c81
15915         * tests/openpgp/defs.scm (gpg-conf'): Explicitly pass the build prefix
15916         to gpgconf here...
15917         (gpg-components): ... instead of only here.
15918
15919         tests: Dump the tools that the tests are going to use.
15920         + commit c7833eca38fdb8d9ba7b59438ea87d651b8bf7ba
15921         * tests/openpgp/setup.scm: Dump the tools that the tests are going to
15922         use.  This will help us diagnose problems with the tests picking the
15923         wrong paths in the future.
15924
15925         build: Remove '--disable-tools' configuration option.
15926         + commit 6993e42088c191f18468317ba2b5b8fbc8c3edff
15927         * Makefile.am (SUBDIRS): Unconditionally include 'tools'.
15928         * configure.ac: Remove '--disable-tools' configuration option.
15929
15930 2017-03-15  NIIBE Yutaka  <gniibe@fsij.org>
15931
15932         g10: Fix check of serialno.
15933         + commit 61785b679c542bbd789395fa632eb8b5133b01ad
15934         * g10/card-util.c (card_status): Fix.
15935
15936         g10: Remove unused function.
15937         + commit ed3248219e921ee24f6f1b2985abb7e0945d70e9
15938         * g10/call-agent.c (select_openpgp): Remove.
15939
15940         tests: Fix running python condition.
15941         + commit a672ddec03f96475866d712b28be18b3fab43aef
15942         * tests/gpgme/gpgme-defs.scm (run-python-tests?): We need Python.
15943
15944 2017-03-14  Justus Winter  <justus@g10code.com>
15945
15946         tests: Skip Python tests if the bindings are not built.
15947         + commit d82abbb1b6e80d5980e6259ddcfc770e65a6b1b3
15948         * tests/gpgme/wrap.scm (python): Move variable...
15949         * tests/gpgme/gpgme-defs.scm (python): ... here.
15950         (run-python-tests?): New function.
15951         * tests/gpgme/run-tests.scm: Only run Python tests if the bindings can
15952         be located in GPGME's build directory.
15953
15954 2017-03-13  Werner Koch  <wk@gnupg.org>
15955
15956         gpg: Flush stdout before printing stats with --check-sigs.
15957         + commit 9a77b3b6e41f97b1209ad61c04b3dd33242ecae8
15958         * g10/keylist.c (print_signature_stats): Flush stdout.
15959         (list_keyblock_colon): Use es_flush instead of fflush.
15960
15961 2017-03-09  Justus Winter  <justus@g10code.com>
15962
15963         tests: Run the tests for the Python bindings of GPGME.
15964         + commit 046a15a88c83b40a753b4ad7ecc1456efa5b527f
15965         * tests/gpgme/gpgme-defs.scm (create-file): Write lines.
15966         (create-gpgmehome): Extend function to create the right environment
15967         for the Python tests.
15968         * tests/gpgme/run-tests.scm: Make an environment cache for the Python
15969         tests and enable them.
15970         * tests/gpgme/wrap.scm: Do not hardcode the path of the Python
15971         interpreter.
15972
15973         tests: Rework environment setup.
15974         + commit cca91a3f8f7e3e36b7149fc93f7b6df11d21eb1d
15975         * tests/gpgscm/tests.scm (test::scm): Add a setup argument.
15976         (test::binary): Likewise.
15977         (run-tests-parallel): Remove setup parameter.
15978         (run-tests-sequential): Likewise.
15979         (make-environment-cache): New function that handles the cache
15980         protocol.
15981         * tests/gpgme/run-tests.scm: Adapt accordingly.
15982         * tests/gpgsm/run-tests.scm: Likewise.
15983         * tests/migrations/run-tests.scm: Likewise.
15984         * tests/openpgp/run-tests.scm: Likewise.
15985
15986 2017-03-08  Werner Koch  <wk@gnupg.org>
15987
15988         wks: Put stdout into binary mode for Windows at another place.
15989         + commit ed5575ec550ff16b0b901a23c6aa3eb3d47b0575
15990         * tools/wks-util.c (wks_send_mime): Set stdout to binary.
15991
15992         wks: Put stdout into binary mode for Windows.
15993         + commit 5c83759364272b19ceafbef46d057f0430a12698
15994         * tools/send-mail.c (send_mail_to_file): Call es_set_binary.
15995
15996 2017-03-08  Justus Winter  <justus@g10code.com>
15997
15998         build: Use macOS' compatibility macros to enable all features.
15999         + commit dd60e868d2bf649a33dc96e207ffd3b8ae4d35af
16000         * configure.ac: On macOS, use the compatibility macros to expose every
16001         feature of the libc.  This is the equivalent of _GNU_SOURCE on GNU
16002         libc.
16003
16004         g10: Move more flags into the flag bitfield.
16005         + commit 2649fdfff5d9e227025956e015b67502fd4962c4
16006         * g10/packet.h (PKT_user_id): Move 'is_primary', 'is_revoked', and
16007         'is_expired' into the flags bitfield, and drop the prefix.
16008         * g10/call-dirmngr.c: Adapt accordingly.
16009         * g10/export.c: Likewise.
16010         * g10/getkey.c: Likewise.
16011         * g10/import.c: Likewise.
16012         * g10/kbnode.c: Likewise.
16013         * g10/keyedit.c: Likewise.
16014         * g10/keylist.c: Likewise.
16015         * g10/keyserver.c: Likewise.
16016         * g10/mainproc.c: Likewise.
16017         * g10/pkclist.c: Likewise.
16018         * g10/pubkey-enc.c: Likewise.
16019         * g10/tofu.c: Likewise.
16020         * g10/trust.c: Likewise.
16021         * g10/trustdb.c: Likewise.
16022
16023 2017-03-08  Werner Koch  <wk@gnupg.org>
16024
16025         dirmngr: Do not put a keyserver into a new dirmngr.conf.
16026         + commit 8f028642239fa992c6c059e3c1b4421a1813c827
16027         * g10/dirmngr-conf.skel: Do not define keyservers.
16028
16029         doc: Add a note to the trust model direct.
16030         + commit f0257b4a86b73f5b956028e68590b6d2a23ea4da
16031         * doc/gpg.texi (GPG Configuration Options): Add note.  Chnage Index
16032         from trust-mode:foo to trust-model:foo.
16033
16034 2017-03-07  Justus Winter  <justus@g10code.com>
16035
16036         Revert "build: Improve CFLAGS handling."
16037         + commit b71384c8054ce2f245ccfae02b8ee81e1adfc512
16038         This reverts commit 4b57359ef3ce0b87e15889e12ef0fcd23f62dcb4.
16039
16040         build: Improve CFLAGS handling.
16041         + commit 4b57359ef3ce0b87e15889e12ef0fcd23f62dcb4
16042         * configure.ac: Strip any flags matching '-Werror' from CFLAGS before
16043         running the tests, and add them back later on.
16044
16045 2017-03-07  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
16046
16047         gpgscm: Use system strlwr if available.
16048         + commit c22a2a89d3bd3d08b3abb8e4e33df32b480338ec
16049         * tests/gpgscm/scheme.c: Define local strlwr only when HAVE_STRLWR is
16050         not defined in config.h.
16051         * tests/gpgscm/scheme-config.h: Remove hack.
16052
16053 2017-03-07  Justus Winter  <justus@g10code.com>
16054
16055         gpg: Do not allow the user to revoke the last valid UID.
16056         + commit 591b6a9d879cbcabb089d89a26d3c3e0306054e1
16057         * g10/keyedit.c (keyedit_quick_revuid): Merge self signatures, then
16058         make sure that we do not revoke the last valid UID.
16059         (menu_revuid): Make sure that we do not revoke the last valid UID.
16060         * tests/openpgp/quick-key-manipulation.scm: Demonstrate that
16061         '--quick-revoke-uid' can not be used to revoke the last valid UID.
16062
16063 2017-03-07  NIIBE Yutaka  <gniibe@fsij.org>
16064
16065         tools: Removal of -Icommon.
16066         + commit 80fb1a8a05b2194af16027555b09bbd5d48ec9ac
16067         * tools/gpg-wks-server.c: Follow the change.
16068
16069         More change for common.
16070         + commit d6c7bf1f8ab8899faba2fb81a35b096921c38f3c
16071         * g10, scd, test, tools: Follow the change of removal of -Icommon.
16072
16073         Remove -I option to common.
16074         + commit 70aca95d6816082b289fceca8eabfcf718a6b701
16075         * dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common.
16076         * g10/Makefile.am (AM_CPPFLAGS): Ditto.
16077         * g13/Makefile.am (AM_CPPFLAGS): Ditto.
16078         * kbx/Makefile.am (AM_CPPFLAGS): Ditto.
16079         * scd/Makefile.am (AM_CPPFLAGS): Ditto.
16080         * sm/Makefile.am (AM_CPPFLAGS): Ditto.
16081         * tools/Makefile.am (AM_CPPFLAGS): Ditto.
16082         * Throughout: Follow the change.
16083
16084 2017-03-07  Justus Winter  <justus@g10code.com>
16085
16086         tests: Avoid overflowing signed 32 bit time_t.
16087         + commit de3838372ae3cdecbd83eea2c53c8e2656d93052
16088         * tests/openpgp/quick-key-manipulation.scm: Use expiration times in
16089         the year 2038 instead of 2105 to avoid overflowing 32 bit time_t.
16090         time_t is used internally to parse the expiraton time from the iso
16091         timestamp.
16092
16093 2017-03-07  NIIBE Yutaka  <gniibe@fsij.org>
16094
16095         agent: Resolve conflict of util.h.
16096         + commit 176e07ce10d892fa7c7b96725b38b2fec9a1f916
16097         * agent/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common.
16098         * agent/call-pinentry.c, agent/call-scd.c: Follow the change.
16099         * agent/command-ssh.c, agent/command.c, agent/cvt-openpgp.c: Ditto.
16100         * agent/divert-scd.c, agent/findkey.c, agent/genkey.c: Ditto.
16101         * agent/gpg-agent.c, agent/pksign.c, agent/preset-passphrase.c: Ditto.
16102         * agent/protect-tool.c, agent/protect.c, agent/trustlist.c: Ditto.
16103         * agent/w32main.c: Ditto.
16104
16105         agent: Add include files.
16106         + commit bf03925751abb739f2fd9d631694d3dd33decf92
16107         * agent/command-ssh.c: Add sys/socket.h and sys/un.h.
16108
16109         agent: Fix get_client_pid for portability.
16110         + commit f7f806afa5083617f4aba02fc3b285b06a7d73d4
16111         * configure.ac: Simply check getpeerucred and ucred.h, and structure
16112         members.
16113         * agent/command-ssh.c: Include ucred.h.
16114         (get_client_pid) [HAVE_STRUCT_SOCKPEERCRED_PID]: Use sockpeercred
16115         structure for OpenBSD.
16116         [LOCAL_PEERPID]: Use LOCAL_PEERPID for macOS.
16117         [LOCAL_PEEREID]: Use LOCAL_PEEREID for NetBSD.
16118         [HAVE_GETPEERUCRED]: Use getpeerucred for OpenSolaris.
16119
16120         common: Fix warning for portability.
16121         + commit b9ab733fc0dd2ca2a7eaac0bde3a817c07af36c5
16122         * common/localename.c (do_nl_locale_name): We don't use CATEGORY.
16123
16124         tools: More portable for openpty use.
16125         + commit ce37ada87139ef418401f9f35439007a8c04a856
16126         * configure.ac (AC_CHECK_HEADERS): Add util.h libutil.h and termios.h.
16127         * tools/symcryptrun.c: Include those headers.
16128
16129         scd: Close THE_EVENT handle.
16130         + commit cc933a96f8e83bc66fb69ed33d9593acdd60c929
16131         * scd/scdaemon.c (handle_connections): Close the handle.
16132
16133 2017-03-06  Justus Winter  <justus@g10code.com>
16134
16135         tests: Harmonize temporary and socket directory handling.
16136         + commit 7e19786a5ddef637d1d9d21593fecf5a36b6f372
16137         * tests/gpgscm/tests.scm (mkdtemp): Do not magically obey the
16138         environment variable 'TMP', make sure to always return an absolute
16139         path.
16140         * tests/gpgme/Makefile.am (TMP): Drop variable.
16141         (TESTS_ENVIRONMENT): Drop 'TMP'.
16142         * tests/gpgme/gpgme-defs.scm (create-gpgmehome): Start the agent.  Do
16143         not create private key store, the agent does that for us.
16144         * tests/gpgsm/Makefile.am (TMP): Drop variable.
16145         (TESTS_ENVIRONMENT): Drop 'TMP'.
16146         * tests/gpgme/gpgme-defs.scm (create-gpgsmhome): Start the agent.  Do
16147         not create private key store, the agent does that for us.
16148         * tests/migrations/Makefile.am (TMP): Drop variable.
16149         (TESTS_ENVIRONMENT): Drop 'TMP'.
16150         * tests/migrations/common.scm (gpgconf): New variable.
16151         (run-test): Create and remove socket directory.
16152         * tests/migrations/extended-pkf.scm (src-tarball): Remove variable.
16153         (setup): Remove function.
16154         (trigger-migration): Likewise.
16155         Use 'run-test' to execute the test.
16156         * tests/migrations/from-classic.scm (src-tarball): Remove variable.
16157         (setup): Remove function.
16158         Use 'run-test' to execute the tests.
16159         * tests/openpgp/Makefile.am (TMP): Drop variable.
16160         (TESTS_ENVIRONMENT): Drop 'TMP'.
16161         * tests/openpgp/README: Do not mention 'TMP'.
16162         * tests/openpgp/defs.scm (with-home-directory): New macro.
16163         (create-legacy-gpghome): Do not create private key store, the agent
16164         does that for us.
16165         (start-agent): Make sure to terminate the right agent with 'atexit'.
16166
16167         gpgscm: Fix creation of temporary directories.
16168         + commit 171e4314ebd3ff74af3dcdc8bd68e1100e8910ea
16169         * tests/gpgscm/ffi.c (do_mkdtemp): Use a larger buffer for the
16170         template.
16171
16172 2017-03-06  Werner Koch  <wk@gnupg.org>
16173
16174         wks: Set published keys world-readable.
16175         + commit e3589110e01dc6ad04463351ec2ce17201556d09
16176         * tools/gpg-wks-server.c (check_and_publish): Set the permissions.
16177
16178         gpg: Fix attempt to double free an UID structure.
16179         + commit 4a130bbc2c2f4be6e8c6357512a943f435ade28f
16180         * g10/getkey.c (get_best_pubkey_byname): Set released .UID to NULL.
16181
16182 2017-03-06  NIIBE Yutaka  <gniibe@fsij.org>
16183
16184         scd: Fix compiler warnings for app-openpgp.c.
16185         + commit e6ca015ae182a6dbb0466441efc17c99683e9375
16186         * scd/app-openpgp.c (retrieve_key_material): Remove touching I.
16187         (do_change_pin): Make sure going to leave if PINVALUE == 0.
16188         (rsa_writekey): Emit simpler log.
16189
16190         scd: More cleanup of old code.
16191         + commit 9bf39ed75ddbd35908bcd0996f55325ff801619a
16192         * scd/app-dinsig.c (do_sign): Remove assignment to HASHALGO.
16193         * scd/app-p15.c (parse_keyusage_flags): Remove assign to MASK.
16194         (read_ef_aodf): Likewise.
16195         (read_ef_cdf): Change the control to parse_error.
16196         * scd/app-sc-hsm.c (parse_keyusage_flags): Remove assign to MASK.
16197         (read_ef_prkd): Remove assign to S.
16198         (read_ef_prkd): Check if PRKDF is not null.
16199         (read_ef_cd): Likewise for CDF.
16200
16201         scd: Clean up old code.
16202         + commit cb6337329d3c858c695a7e56e2fc31d9d50ca3fe
16203         * scd/apdu.c (CT_init, CT_data, CT_close): Remove.
16204         (ct_error_string, ct_activate_card, close_ct_reader, reset_ct_reader)
16205         (ct_get_status, ct_send_apdu, open_ct_reader): Remove.
16206         (new_reader_slot) [NEED_PCSC_WRAPPER]: Remove fd and pid handling.
16207         (writen, readn): Remove.
16208         (pcsc_get_status, pcsc_send_apdu, control_pcsc, close_pcsc_reader)
16209         (reset_pcsc_reader, open_pcsc_reader): Only DIRECT version.
16210         (apdu_open_one_reader): Remove CT_api handling.
16211         (apdu_get_status_internal, send_le): Fix to stop warnings.
16212
16213         scd: Fix API of select_file/_path.
16214         + commit 0703de01c8fbc417a99ecf8e950fc306b8c8ac9c
16215         * scd/iso7816.c (iso7816_select_file, iso7816_select_path): Remove
16216         unused arguments.
16217         * scd/app-dinsig.c (do_readcert): Follow the change.
16218         * scd/app-help.c (app_help_read_length_of_cert): Likewise.
16219         * scd/app-nks.c (keygripstr_from_pk_file, do_readcert, do_readkey)
16220         (switch_application): Likewise.
16221         * scd/app-p15.c (select_and_read_binary, select_ef_by_path)
16222         (micardo_mse, app_select_p15): Likewise.
16223         * scd/app.c (app_new_register): Likewise.
16224
16225         agent: For SSH, robustly handling scdaemon's errors.
16226         + commit 4ce4f2f683a17be3ddb93729f3f25014a97934ad
16227         * agent/command-ssh.c (card_key_list): Return 0 when
16228         agent_card_serialno returns an error.
16229         (ssh_handler_request_identities): Handle errors for card listing
16230         and proceed to other cases.
16231
16232 2017-03-03  Werner Koch  <wk@gnupg.org>
16233
16234         dirmngr: Fix commit de6d8313.
16235         + commit 67c203b6bf8d6dd489ceef3391f609986e7b7a49
16236         * dirmngr/http-common.c (get_default_keyserver): Fix assert.
16237
16238 2017-03-03  NIIBE Yutaka  <gniibe@fsij.org>
16239
16240         scd: Fix scd_kick_the_loop.
16241         + commit f9acc7d18bb90f47dafe7e32ae92f567756d6b12
16242         * scd/scdaemon.c (notify_fd): Remove.
16243         (the_event) [W32]: New.
16244         (main_thread_pid) [!W32]: New.
16245         (handle_signal): Handle SIGCONT.
16246         (scd_kick_the_loop): Use signal on UNIX and event on Windows.
16247         (handle_connections): Likewise.
16248
16249 2017-03-03  Werner Koch  <wk@gnupg.org>
16250
16251         gpg: Fix possible segv when attribute packets are filtered.
16252         + commit 5f6f3f5cae8a95ed469129f9677782c17951dab3
16253         * g10/import.c (impex_filter_getval): Handle PKT_ATTRIBUTE the same as
16254         PKT_USER_ID
16255         (apply_drop_sig_filter): Ditto.
16256
16257         gpg: Add new variables to the import and export filters.
16258         + commit 1813f3be23bdab5a42070424c47cb8daa9d9e6b7
16259         * g10/import.c (impex_filter_getval): Add new variables "expired",
16260         "revoked", and "disabled".
16261
16262 2017-03-02  Werner Koch  <wk@gnupg.org>
16263
16264         tools: Fix compile error with older gcc versions.
16265         + commit b1f48da02b474e985161aa2778d7b602a13c4292
16266         * tools/mime-parser.h: Include rfc822parse.h.
16267         (struct rfc822parse_context): Remove duplicate definition.
16268
16269         dirmngr: Rearrange files to fix de6d831.
16270         + commit 1890896fe698c55d15160a53aa6c5c22dc424031
16271         * dirmngr/http-common.c: New.
16272         * dirmngr/http-common.h: New.
16273         * dirmngr/Makefile.am (dirmngr_SOURCES): Add them.
16274         (t_http_SOURCES): Add them.
16275         (t_ldap_parse_uri_SOURCES): Add them.
16276         * dirmngr/misc.c (get_default_keyserver): Move to ...
16277         * dirmngr/http-common.c: here.
16278         * dirmngr/http.c: Include http-common.h instead of misc.h.
16279         * dirmngr/http-ntbtls.c: Ditto.
16280
16281         dirmngr: Let --gpgconf-list return the default keyserver.
16282         + commit de6d8313f6df32aaa151bee74e1db269ac1e0fed
16283         * dirmngr/misc.c (get_default_keyserver): New.
16284         * dirmngr/http.c: Include misc.h
16285         (http_session_new): Use get_default_keyserver instead of hardwired
16286         "hkps.pool.sks-keyservers.net".
16287         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
16288         * dirmngr/dirmngr.c (main) <aGPGCongList>: Return default keyserver.
16289
16290 2017-03-02  Justus Winter  <justus@g10code.com>
16291
16292         gpg: Always initialize the trust db when generating keys.
16293         + commit 0c4d0620d327e8a2069532a5519afefe867a47d6
16294         * g10/gpg.c (main): Always initialize the trust db when generating
16295         keys.
16296         * g10/keygen.c (do_generate_keypair): We can now assume that there is
16297         a trust db.
16298
16299         gpg: Fix (quick) key generation with --always-trust.
16300         + commit 4735ab96aa5577d40ba7b3f72d863057198cc6a7
16301         * g10/keygen.c (do_generate_keypair): Only update the ownertrust if we
16302         do have a trust database.
16303         * g10/trustdb.c (have_trustdb): New function.
16304         * g10/trustdb.h (have_trustdb): New prototype.
16305         * tests/openpgp/quick-key-manipulation.scm: Remove workaround.
16306
16307 2017-03-02  Werner Koch  <wk@gnupg.org>
16308
16309         agent: Improve error message for the KEYTOCARD command.
16310         + commit d6f0f368763006abf08818bfefcd32ecedb5c20a
16311         * agent/command.c (cmd_keytocard): Always use leave_cmd.  Simplify
16312         timestamp checking and do an early test with an appropriate error
16313         message.
16314
16315 2017-03-02  Justus Winter  <justus@g10code.com>
16316
16317         g10: Signal an error when trying to revoke non-existant UID.
16318         + commit 62d21a4ab4029b32ea129f1cf3a0e1f22e2fb7b0
16319         * g10/keyedit.c (keyedit_quick_revuid): Signal an error when trying to
16320         revoke non-existant UID.
16321         * tests/openpgp/quick-key-manipulation.scm: Test that.
16322
16323         tests: Log information about ssh, add comments to test.
16324         + commit 74cb3b230c1f99afc5fd09bccc24186a63b154b0
16325         * tests/openpgp/ssh-import.scm (ssh-version-string): New variable, and
16326         log the binary and version used in the test.
16327         (ssh-supports?): Document how we test what algorithms are supported by
16328         ssh, and log ssh-keygen's replies.
16329
16330         common,tools: Always escape newlines when escaping data.
16331         + commit e064c75b08a523f738108428fe0c417a46e66238
16332         * common/stringhelp.c (do_percent_escape): Always escape newlines.
16333         * tools/gpgconf-comp.c (gc_percent_escape): Likewise.
16334
16335 2017-03-01  Werner Koch  <wk@gnupg.org>
16336
16337         Release 2.1.19.
16338         + commit 4a28c212b35739ce951bd41cfc6ef1a215846b2e
16339
16340
16341         build: Add kludge for "make distcheck" in a release build.
16342         + commit 246b27921b5dc34f367d879402725784aaee2494
16343         * configure.ac: New option --enable-gnupg-builddir-envvar.
16344         (ENABLE_GNUPG_BUILDDIR_ENVVAR): New ac_define.
16345         * common/homedir.c (gnupg_set_builddir_from_env): Consider
16346         ENABLE_GNUPG_BUILDDIR_ENVVAR.
16347         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Rename to ...
16348         (AM_DISTCHECK_CONFIGURE_FLAGS): this to be future proof.  Add option
16349         --enable-gnupg-builddir-envvar.
16350
16351 2017-03-01  Yuri Chornoivan  <yurchor@ukr.net>
16352
16353         po: Update Ukrainian translation.
16354         + commit c7f2a59833728e99e00449da2ddb10cf66693e7e
16355
16356
16357 2017-03-01  Ineiev  <ineiev@gnu.org>
16358
16359         po: Update Russian translation.
16360         + commit 280c724fe26bfd861ac74abc71e221795d8947f0
16361
16362
16363 2017-03-01  Werner Koch  <wk@gnupg.org>
16364
16365         gpg: Make --export-options work with --export-secret-keys.
16366         + commit 891ab23411b7f20ef37d8bde81d9857b083235df
16367         * g10/export.c (export_seckeys): Add arg OPTIONS and pass it to
16368         do_export.
16369         (export_secsubkeys): Ditto.
16370         * g10/gpg.c (main): Pass opt.export_options to export_seckeys and
16371         export_secsubkeys
16372
16373         gpg: Allow creating keys using an existing ECC key.
16374         + commit 2bbdeb8ee87a6c7ec211be16391a11b7c6030bed
16375         * common/sexputil.c (get_pk_algo_from_canon_sexp): Remove arg R_ALGO.
16376         Change to return the algo id.  Reimplement using get_pk_algo_from_key.
16377         * g10/keygen.c (check_keygrip): Adjust for change.
16378         * sm/certreqgen-ui.c (check_keygrip): Ditto.
16379
16380 2017-02-28  Werner Koch  <wk@gnupg.org>
16381
16382         gpg: Do not require a trustdb for decryption.
16383         + commit e182542e90cbeff4f2ac6c8d71061356d7cdcdea
16384         * g10/trustdb.c (init_trustdb): Add and implement arg NO_CREATE.
16385         Change to return an error code.  Change all callers to to pass False
16386         for NO_CREATE.
16387         (tdb_get_ownertrust): New arg NO_CREATE.  Call init_trustdb to test
16388         for a non-existing trustdb.  Change all callers to to pass False for
16389         NO_CREATE.
16390         (tdb_get_min_ownertrust): Ditto.
16391         * g10/trust.c (get_ownertrust_with_min): Add arg NO_CREATE.  Call
16392         init_trustdb for a quick check.
16393         (get_ownertrust_info): Add arg NO_CREATE.
16394         (get_ownertrust_string): Ditto.
16395         * g10/gpgv.c (get_ownertrust_info): Adjust stub.
16396         * g10/test-stubs.c (get_ownertrust_info): Ditto.
16397         * g10/mainproc.c (list_node): Call get_ownertrust_info with NO_CREATE
16398         set.
16399         * g10/pubkey-enc.c (get_it): Ditto.
16400
16401 2017-02-28  Justus Winter  <justus@g10code.com>
16402
16403         gpgscm: Improve parsing.
16404         + commit e4583ae14e52482ab390c102d071755f91ab211d
16405         * tests/gpgscm/scheme.c (port_increment_current_line): Avoid creating
16406         the same integer if the delta is zero.  This happens a lot during
16407         parsing, and puts pressure on the memory allocator.
16408
16409         gpgscm: Fix calculating the line number.
16410         + commit 058c97f9fc485405246b1adfcc905c1891550652
16411         * tests/gpgscm/scheme.c (opexe_5): Only increment the line number on
16412         newlines.
16413
16414         gpg,tools: Make auto-key-retrieve configurable via gpgconf.
16415         + commit d379a0174cca595204b32da9a66c513a1304e6d0
16416         * g10/gpg.c (gpgconf_list): Add 'auto-key-retrieve'.
16417         * tools/gpgconf-comp.c (gc_options_gpg): Likewise.
16418
16419         tests: Improve support for gpgconf.
16420         + commit 41900175cf046dd9abe3d7a6805f6a403d68df15
16421         * tests/openpgp/defs.scm: Improve high-level inteface to gpgconf.
16422         * tests/openpgp/gpgconf.scm: Adapt.
16423         * tests/openpgp/tofu.scm: Use it to select the trust model.
16424
16425         gpg,tools: Make trust-model configurable via gpgconf.
16426         + commit ebeccd73eb85f9027f0985d77dfe901266c6ddef
16427         * g10/gpg.c (gpgconf_list): Add 'trust-model'.
16428         * tools/gpgconf-comp.c (gc_options_gpg): Likewise.
16429
16430         gpgscm: Track source locations in every kind of ports.
16431         + commit 7cc57e2c63d0fa97569736419db5c76117e7685b
16432         * tests/gpgscm/scheme-private.h (struct port): Move location
16433         information out of the union.
16434         * tests/gpgscm/scheme.c (mark): All ports need marking now.
16435         (gc): Likewise all ports on the load stack.
16436         (port_clear_location): Adapt accordingly.  Also, add an empty function
16437         for !SHOW_ERROR_LINE.
16438         (port_increment_current_line): Likewise.
16439         (port_reset_current_line): Drop function in favor of...
16440         (port_init_location): ... this new function.
16441         (file_push): Simplify.
16442         (file_pop): Likewise.
16443         (port_rep_from_filename): Likewise.
16444         (port_rep_from_file): Likewise.
16445         (port_rep_from_string): Also initialize the location.
16446         (port_rep_from_scratch): Likewise.
16447         (port_close): Simplify and generalize.
16448         (skipspace): Likewise.
16449         (token): Likewise.
16450         (_Error_1): Generalize.
16451         (opexe_5): Likewise.
16452         (scheme_deinit): Simplify and generalize.
16453         (scheme_load_named_file): Likewise.
16454         (scheme_load_string): Also initialize the location.
16455
16456 2017-02-28  Werner Koch  <wk@gnupg.org>
16457
16458         gpgv,w32: Fix --status-fd.
16459         + commit 8a67dc4c4324b617b5a3fea51c59c674488544d6
16460         * g10/gpgv.c (main): Use translate_sys2libc_fd_int for --status-fd.
16461
16462         w32: Make pipes really pollable.
16463         + commit 1192449207f41b26be8950b04df84a52c8a2a886
16464         * common/exectool.c (gnupg_exec_tool_stream) [W32]: Use _get_osfhandle
16465         to print the fd for the command line.
16466         * common/exechelp-w32.c (create_pipe_and_estream): Use es_sysopen so
16467         that the streams are actually pollable.
16468
16469 2017-02-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16470
16471         dirmngr: Avoid warnings during non-ntbtls build.
16472         + commit f5782e11a560fd590221042391254c810a42e45f
16473         * dirmngr/t-http.c (my_http_tls_verify_cb): Avoid warnings when not
16474         using ntbtls.
16475
16476         trustdb: Respect --quiet during --import-ownertrust.
16477         + commit ddf01a67d6388d988f1db50a06facb21c14d9426
16478         * g10/tdbdump.c (import_ownertrust): If opt.quiet is set, do not send
16479         log_info messages.
16480
16481 2017-02-26  Manish Goregaokar  <manish@mozilla.com>
16482
16483         g10: fix typo.
16484         + commit 64ec21bebd3f136722e608649906b59c6add6947
16485         I already have copyright assignment with the FSF for GDB. I don't
16486         think I'll need to do the DCO thing.
16487
16488 2017-02-24  Werner Koch  <wk@gnupg.org>
16489
16490         gpgv: New options --log-file and --debug.
16491         + commit 7af5d61c6e210210c777be9e6e87720dd4a055d9
16492         * g10/gpgv.c (oLoggerFile, oDebug): New consts.
16493         (opts): Add options --log-file and --debug.
16494         (main): Implement options.
16495
16496 2017-02-24  Andre Heinecke  <aheinecke@intevation.de>
16497
16498         speedo,w32: Fix gpg-wks-client installation.
16499         + commit 49b4a676148523b51beca3ae929e9d78ed7ba110
16500         * build-aux/speedo/w32/inst.nsi: gpg-wks-client is an exe.
16501
16502 2017-02-23  Werner Koch  <wk@gnupg.org>
16503
16504         dirmngr: Add new debug flag "extprog"
16505         + commit 22b69b9edfdf6e6172239cbd1075ffe29077d339
16506         * dirmngr/dirmngr.h (DBG_EXTPROG_VALUE, DBG_EXTPROG): New macros.
16507         * dirmngr/dirmngr.c (debug_flags): Add flag "extprog".
16508         (handle_connections): Use a macro instead of -1 for an invalid socket.
16509         * dirmngr/loadswdb.c (verify_status_cb): Debug the gpgv call.
16510
16511         wks: Make sure that the draft 2 request is correctly detected.
16512         + commit d30e17ac62dea8913b7f353971d546b6b1a09bd5
16513         * tools/gpg-wks.h (WKS_DRAFT_VERSION): New.
16514         * tools/wks-receive.c (new_part): Move test wks draft version to ...
16515         (t2body): new callback.
16516         (wks_receive): Register this callback.
16517         * tools/gpg-wks-server.c (send_confirmation_request): Emit draft
16518         version header.
16519         (send_congratulation_message): Ditto.
16520         * tools/gpg-wks-client.c (decrypt_stream_parm_s): New.
16521         (decrypt_stream_status_cb): Check DECRYTPION_KEY status.
16522         (decrypt_stream): Get infor from new callback.
16523         (process_confirmation_request): New arg 'mainfpr'.  Check that it
16524         matches the decryption key.
16525         (read_confirmation_request): Check that the decryption key has been
16526         generated by us.
16527         (command_send): Use macro from draft version header.
16528         (send_confirmation_response): Emit draft version header.
16529
16530         wks: New callback for the mime parser.
16531         + commit a2090250829fe8989be2afc8cf41ba2a022072fc
16532         * tools/mime-parser.c (mime_parser_context_s): New field 't2body'.
16533         (parse_message_cb): Call that callback.
16534         (mime_parser_set_t2body): New.
16535
16536         gpg: Emit new status DECRYPTION_KEY.
16537         + commit effa80e0b5fd8cf9e31a984afe391c2406edee8b
16538         * common/status.h (STATUS_DECRYPTION_KEY): New.
16539         * g10/pubkey-enc.c (get_it): Emit that status.
16540
16541         dirmngr,w32: Make https with ntbtls work.
16542         + commit a42bf00b4edce789999aa3bdfce235cf726463ae
16543         * dirmngr/http.c (simple_cookie_functions): New.
16544         (send_request) [HTTP_USE_NTBTLS, W32]: Use es_fopencookie.
16545         (cookie_read): Factor some code out to ...
16546         (read_server): new.
16547         (simple_cookie_read, simple_cookie_write) [W32]: New.
16548
16549 2017-02-22  Werner Koch  <wk@gnupg.org>
16550
16551         scd,agent: Improve the OpenPGP PIN prompt texts.
16552         + commit f98c8cb013033c08e98ebedcc0e084fbd2a85b0c
16553         * scd/app-openpgp.c (get_prompt_info): Change texts.
16554         * agent/call-pinentry.c (struct entry_features): New.
16555         (getinfo_features_cb): New.
16556         (start_pinentry): Set new fucntion as status callback.
16557         (build_cmd_setdesc): New.  Replace all snprintf for SETDESC by this
16558         one.
16559
16560 2017-02-22  Andre Heinecke  <aheinecke@intevation.de>
16561
16562         scd: Nitpicks on the improved card prompts.
16563         + commit 143ca039e1e81140ae520cc1025f8e25c01acc80
16564         * src/app-openpgp.c (get_prompt_info): Change wording and order
16565         slightly.
16566
16567 2017-02-22  Werner Koch  <wk@gnupg.org>
16568
16569         scd: Improve the prompts for OpenPGP cards.
16570         + commit e3944f34e3220f96fb1be449eb6f3d7360bc2d0b
16571         * scd/app-openpgp.c (get_disp_name): New.
16572         (get_disp_serialno): New.
16573         (get_prompt_info): New.
16574         (build_enter_admin_pin_prompt): Rework the prompt texts.  Factor some
16575         code out to ...
16576         (get_remaining_tries): New.
16577         (verify_a_chv): Print a remaining counter also for the standard PIN.
16578         Rework the prompt texts.
16579
16580         * agent/divert-scd.c (ask_for_card): Pretty format an OpenPGP serial
16581         no.
16582
16583         agent: Prepend the description to a PIN prompt.
16584         + commit 6488ffb767733a2cf92ca5ba3e61fc0c53e0f673
16585         * agent/divert-scd.c (has_percent0A_suffix): New.
16586         (getpin_cb): Prepend DESC_TEXT to the prompt.
16587         * agent/findkey.c (modify_description): Rename to ...
16588         (agent_modify_description): this.  MAke global.  Add kludge to remove
16589         empty parentheses from the end.
16590         (agent_key_from_file, agent_delete_key): Adjust for above change.
16591         * agent/pksign.c (agent_pksign_do): Modify DESC_TEXT also when
16592         diverting to a card.
16593
16594         agent: Prepare to pass an additional parameter to the getpin callback.
16595         + commit 78d875a0f83bc046279b951aea76cd74f3c44fd8
16596         * agent/call-scd.c (writekey_parm_s, inq_needpin_s): Merge into ...
16597         (inq_needpin_parm_s): new struct.  Add new field 'getpin_cb_desc'.
16598         Change users to set all fields.
16599         (inq_needpin): Pass GETPIN_CB_DESC to the GETPIN_CB.
16600         (agent_card_pksign): Add arg 'desc_text' and change arg 'getpin_cb' to
16601         take an additional arg 'desc_text'.
16602         (agent_card_pkdecrypt): Ditto.
16603         (agent_card_writekey): Change arg 'getpin_cb' to take an additional
16604         arg 'desc_text'.
16605         (agent_card_scd): Ditto.
16606         * agent/divert-scd.c (getpin_cb): Add new arg 'desc_text'.
16607         (divert_pksign): Add new arg 'desc_text' and pass is to
16608         agent_card_pksign.
16609         (divert_pkdecrypt): Add new arg 'desc_text' and pass is to
16610         agent_card_pkdecrypt.
16611         * agent/pkdecrypt.c (agent_pkdecrypt): Pass DESC_TEXT to
16612         divert_pkdecrypt.
16613         * agent/pksign.c (agent_pksign_do):  Pass DESC_TEXT to
16614         divert_pksign.
16615
16616 2017-02-22  NIIBE Yutaka  <gniibe@fsij.org>
16617
16618         tests: No spelling fix for test text.
16619         + commit ef424353f342f80ca6d18ede8b63c1b02215d105
16620         * tests/openpgp/verify.scm (msg_ed25519_rshort): Revert the spelling
16621         fix.
16622
16623 2017-02-21  Werner Koch  <wk@gnupg.org>
16624
16625         dirmngr: Add special treatment for the standard hkps pool to ntbtls.
16626         + commit 831d014550863026dfefa774c961a21bd20c1e48
16627         * dirmngr/validate.h (VALIDATE_FLAG_SYSTRUST): Remove
16628         (VALIDATE_FLAG_EXTRATRUST): Remove
16629         (VALIDATE_FLAG_TRUST_SYSTEM): New.
16630         (VALIDATE_FLAG_TRUST_CONFIG): New.
16631         (VALIDATE_FLAG_TRUST_HKP): New.
16632         (VALIDATE_FLAG_TRUST_HKPSPOOL): New.
16633         (VALIDATE_FLAG_MASK_TRUST): New.
16634         * dirmngr/validate.c (check_header_constants): New.
16635         (validate_cert_chain): Call new function.  Simplify call to
16636         is_trusted_cert.
16637         * dirmngr/crlcache.c (crl_parse_insert): Pass
16638         VALIDATE_FLAG_TRUST_CONFIG to validate_cert_chain
16639         * dirmngr/server.c (cmd_validate): Use VALDIATE_FLAG_TRUST_SYSTEM and
16640         VALIDATE_FLAG_TRUST_CONFIG.
16641         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Check provided TLS
16642         context.  Set trustclass flags using the new VALIDATE_FLAG_TRUST
16643         values.
16644
16645         * dirmngr/certcache.c (cert_cache_init): Load the standard pool
16646         certificate prior to the --hkp-cacerts.
16647
16648         dirmngr: Load --hkp-cacert values into the certificate cache.
16649         + commit d1625a9a82b1e5d96bbbf2132c49c53108565ae1
16650         * dirmngr/dirmngr.c (hkp_cacert_filenames): New var.
16651         (parse_rereadable_options): Store filenames from --hkp-cacert in the
16652         new var.
16653         (main, dirmngr_sighup_action): Pass that var to cert_cache_init.
16654         * dirmngr/certcache.c (cert_cache_init): Add arg 'hkp_cacert' and load
16655         those certs.
16656         (load_certs_from_file): Use autodetect so that PEM and DER encodings
16657         are possible.
16658
16659         dirmngr: Load "sks-keyservers.netCA.pem" into the cache.
16660         + commit 9741aa24d9056b56cd5366ff5379bd8a3e6118df
16661         * dirmngr/certcache.c (load_certs_from_file): Always build this
16662         function.  Add args 'trustclasses' and 'no_error'.  Pass TRUSTCLASSES
16663         to put_cert.
16664         (load_certs_from_system): Pass CERTTRUST_CLASS_SYSTEM to
16665         load_certs_from_file.
16666         (cert_cache_init): Try to load "sks-keyservers.netCA.pem".  Don't make
16667         function fail in an out-of-core condition.
16668
16669         dirmngr: Implement trust classes for the cert cache.
16670         + commit 50b9828eacc39c1ca75cb8313db896e4bdc8b270
16671         * dirmngr/certcache.h (CERTTRUST_CLASS_SYSTEM): New.
16672         (CERTTRUST_CLASS_CONFIG): New.
16673         (CERTTRUST_CLASS_HKP): New.
16674         (CERTTRUST_CLASS_HKPSPOOL): New.
16675         * dirmngr/certcache.c (MAX_EXTRA_CACHED_CERTS): Rename to ...
16676         (MAX_NONPERM_CACHED_CERTS): this.
16677         (total_extra_certificates): Rename to ...
16678         (total_nonperm_certificates): this.
16679         (total_config_certificates): Remove.
16680         (total_trusted_certificates): Remove.
16681         (total_system_trusted_certificates): Remove.
16682         (cert_item_s): Remove field 'flags'.  Add fields 'permanent' and
16683         'trustclasses'.
16684         (clean_cache_slot): Clear new fields.
16685         (put_cert): Change for new cert_item_t structure.
16686         (load_certs_from_dir): Rename arg 'are_trusted' to 'trustclass'
16687         (load_certs_from_file): Use CERTTRUST_CLASS_ value for put_cert.
16688         (load_certs_from_w32_store): Ditto.
16689         (cert_cache_init): Ditto.
16690         (cert_cache_print_stats): Rewrite.
16691         (is_trusted_cert): Replace arg 'with_systrust' by 'trustclasses'.
16692         Chnage the test.
16693         * dirmngr/validate.c (allowed_ca): Pass CERTTRUST_CLASS_CONFIG to
16694         is_trusted_cert.
16695         (validate_cert_chain): Pass CERTTRUST_CLASS_ values to
16696         is_trusted_cert.
16697
16698         dirmngr: New Assuan option "http-crl".
16699         + commit 493c142e582ff5ef1b5fdfcb9653715ef43e83e9
16700         * dirmngr/dirmngr.h (server_control_s): New flag 'http_no_crl'.
16701         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Set this flag.
16702         * dirmngr/server.c (option_handler): New option "http-crl"
16703         * dirmngr/http.h (HTTP_FLAG_NO_CRL): New flag.
16704         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Consult this flag.
16705         * dirmngr/ks-engine-hkp.c (send_request): Set flag depending on CTRL.
16706         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
16707
16708         * dirmngr/t-http.c (main): New option --no-crl.
16709
16710         dirmngr: Add a magic field to the http structs.
16711         + commit 39c745038181edd097e188434b3f9c971ed3987f
16712         * dirmngr/http.c (HTTP_SESSION_MAGIC): New.
16713         (http_session_s): New field 'magic'.
16714         (HTTP_CONTEXT_MAGIC): New.
16715         (http_context_s): New field 'magic'.
16716         (my_ntbtls_verify_cb): Assert MAGIC.
16717         (fp_onclose_notification): Ditto.
16718         (session_unref): Ditto.  Reset MAGIC.
16719         (http_session_new): Set MAGIC.
16720         (http_open): Ditto.
16721         (http_raw_connect): Ditto.
16722         (http_close): Assert MAGIC.  Reset MAGIC.
16723
16724         * dirmngr/t-http.c (my_http_tls_verify_cb): MArk HTTP_FLAGS unused.
16725
16726 2017-02-21  NIIBE Yutaka  <gniibe@fsij.org>
16727
16728         g10: Support primary key generation by keygrip.
16729         + commit 3fc69224b7b22ad1df1395ebcb21549384839cd1
16730         * g10/keygen.c (para_name): Add pKEYGRIP.
16731         (generate_keypair): Use pKEYGRIP for key generation.
16732         (do_generate_keypair): Call do_create_from_keygrip with pKEYGRIP.
16733
16734 2017-02-20  Werner Koch  <wk@gnupg.org>
16735
16736         dirmngr: Setup a log handler for ntbtls.
16737         + commit a022baa4a487eec769411255a64088450c4c8a49
16738         * dirmngr/dirmngr.c (my_ntbtls_log_handler) [HTTP_USE_NTBTLS]: New.
16739         (main) [HTTP_USE_NTBTLS]: Register log handler.
16740
16741         common: New function log_logv_with_prefix.
16742         + commit 3e9512e557d95c7dc36835365b127b25f6a5cdd9
16743         * common/logging.c (do_logv): Add arg 'prefmt' and print it.  Chnage
16744         call callers to pass NULL.
16745         (log_logv_with_prefix): New.
16746
16747         dirmngr.c: Make http.c build without any TLS support.
16748         + commit e174893262d8de0f52faa8abe4fc0402719a35d8
16749         * dirmngr/http.c (http_session_new): Remove used of tls_prority.
16750
16751          dirmngr: Make t-http.c work again with gnutls - second try.
16752         + commit 81ea24b8637ac08e44e9e44816689413c2ae7e08
16753         * dirmngr/t-http.c: Always include ksba.h.
16754
16755         dirmngr: Make t-http.c work again with gnutls.
16756         + commit f923873863fd863d71349f20f5568f80aecc020b
16757         * dirmngr/Makefile.am (t_http_CFLAGS, t_http_LDADD): Add KSBA flags
16758         and libs.
16759
16760 2017-02-19  Werner Koch  <wk@gnupg.org>
16761
16762         dirmngr: First take on ntbtls cert verification.
16763         + commit 64fffd0ce2a4fd9cba152cf07497b585410cc652
16764         * dirmngr/http-ntbtls.c: New.
16765         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
16766         * dirmngr/dirmngr.h (SERVER_CONTROL_MAGIC): New.
16767         (server_conrol_s): Add field 'magic',
16768         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Set MAGIC.
16769         (dirmngr_deinit_default_ctrl): Set MAGIC to deadbeef.
16770         * dirmngr/http.c (my_ntbtls_verify_cb): New.
16771         (http_session_new) [HTTP_USE_NTBTLS]: Remove all CA setting code.
16772         (send_request) [HTTP_USE_NTBTLS]: Set the verify callback.  Do not call
16773         the verify callback after the handshake.
16774         * dirmngr/ks-engine-hkp.c (send_request): Pass
16775         gnupg_http_tls_verify_cb to http_session_new.
16776         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
16777
16778         * dirmngr/t-http.c (my_http_tls_verify_cb): New.
16779         (main): Rename option --gnutls-debug to --tls-debug.
16780         (main) [HTTP_USE_NTBTLS]: Create a session.
16781
16782 2017-02-18  Werner Koch  <wk@gnupg.org>
16783
16784         dirmngr: Add per-session verify callback to http.c.
16785         + commit a74902cccde539ee2bd216caec0da6eb54b67c1b
16786         * dirmngr/http.h (http_verify_cb_t): New type.
16787         * dirmngr/http.c (http_session_s): Add fields flags, verify_cb, and
16788         verify_cb_value.
16789         (http_session_new): Remove arg tls_priority.  Add args verify_cb and
16790         verify-cb_value.  Store them in the session object.
16791         (send_request): Use per-session verify callback.
16792         (http_verify_server_credentials) [HTTP_USE_NTBTLS]: Return
16793         GPG_ERR_NOT_IMPLEMENTED.
16794         * dirmngr/ks-engine-hkp.c (send_request): Adjust for changed
16795         http_session_new.
16796         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
16797         * dirmngr/t-http.c (main): Ditto.
16798
16799         * dirmngr/server.c (do_get_cert_local): Replace xmalloc by malloc.
16800
16801 2017-02-17  Werner Koch  <wk@gnupg.org>
16802
16803         dirmngr: Strip the default https port from the Host: header.
16804         + commit cd32ebd152a522e362469ab969d91f8d49f28a60
16805         * dirmngr/http.c (send_request): Strip the default https port.
16806
16807         dirmngr: Add option --no-crl to the VALIDATE cmd.
16808         + commit f07811ee2c0a8044551e2ec063eda61cff7f6e39
16809         * dirmngr/validate.h: Remove enums VALIDATE_MODE_*.
16810         (VALIDATE_FLAG_SYSTRUST, VALIDATE_FLAG_EXTRATRUST)
16811         (VALIDATE_FLAG_CRL, VALIDATE_FLAG_RECURSIVE)
16812         (VALIDATE_FLAG_OCSP, VALIDATE_FLAG_TLS)
16813         (VALIDATE_FLAG_NOCRLCHECK): New constants.
16814         * dirmngr/validate.c (validate_cert_chain): Change arg 'mode' to
16815         'flags'.  Change code accordingly.  Remove NO-CRL in TLS mode kludge.
16816         * dirmngr/crlcache.c (crl_parse_insert): Change to use flag values for
16817         the validate_cert_chain call.
16818         * dirmngr/server.c (cmd_validate): Ditto.  Add new option --no-crl.
16819
16820         dirmngr: Add options --tls and --systrust to the VALIDATE cmd.
16821         + commit 070211eb990f5ea41271eba432b6a6b485cef7c7
16822         * dirmngr/certcache.h (certlist_s, certlist_t): New.
16823         * dirmngr/certcache.c (read_certlist_from_stream): New.
16824         (release_certlist): New.
16825         * dirmngr/server.c (MAX_CERTLIST_LENGTH): New.
16826         (cmd_validate): Add options --tls and --systrust.  Implement them
16827         using a kludge for now.
16828         * dirmngr/validate.c (validate_cert_chain): Support systrust
16829         checking.  Add kludge to disable the CRL checking for tls mode.
16830
16831         dirmngr: Remove use of hardcoded numbers in validate.
16832         + commit ed99af030d19305dd7cd41c41ac581306cb91fd5
16833         * dirmngr/validate.c (enum cert_usage_modes): New.
16834         (cert_usage_p): Change type of arg MODE.  Use enums instead of
16835         hardwired values.  Use a switch instead of tricky bit tests.
16836         (cert_use_cert_p, cert_use_ocsp_p, cert_use_crl_p): Adjust.
16837
16838         * dirmngr/validate.c (cert_usage_p): Rename to check_cert_usage.
16839         (cert_use_cert_p): Rename to check_cert_use_cert.
16840         (cert_use_ocsp_p): Rename to check_cert_use_ocsp.
16841         (cert_use_crl_p): Rename to check_cert_use_crl.
16842
16843         * dirmngr/validate.h (VALIDATE_MODE_CERT_SYSTRUST): New.
16844         (VALIDATE_MODE_TLS, VALIDATE_MODE_TLS_SYSTRUST): New.
16845
16846 2017-02-17  NIIBE Yutaka  <gniibe@fsij.org>
16847
16848         agent: No cards is not an error.
16849         + commit dea4b3c742acbd195d6ab12b279b4dda315f2582
16850         * agent/command-ssh.c (card_key_list): Care the case of no cards.
16851
16852         agent: Send back all public keys for available cards.
16853         + commit 3f4f64b6ac0d7160fd9e1301f95820894b219c3f
16854         * agent/call-scd.c (card_cardlist_cb, agent_card_cardlist): New.
16855         * agent/command-ssh.c (card_key_list): New.
16856         (ssh_handler_request_identities): Call card_key_list and loop for the
16857         list to send public keys for all available cards.
16858
16859 2017-02-17  Justus Winter  <justus@g10code.com>
16860
16861         gpgscm: Guard use of tagged expressions.
16862         + commit aab6ba0bb60528b9e816e430be51170cf39611b0
16863         * tests/gpgscm/init.scm (vm-history-print): Check that the tag added
16864         to expressions when parsing source files matches the expected format.
16865         * tests/gpgscm/lib.scm (assert): Likewise.
16866
16867 2017-02-17  NIIBE Yutaka  <gniibe@fsij.org>
16868
16869         scd: Fix RESET command handling (more).
16870         + commit 99d4dfe83661d05ef3a20ed04e6cec5647536738
16871         * scd/app-common.h (struct app_ctx_s): Add reset_requested.
16872         * scd/app.c (app_reset): Locking APP, set reset_requested.
16873         (deallocate_app): Release the lock.
16874         (release_application): Add LOCKED_ALREADY argument.
16875         (scd_update_reader_status_file): Hold the lock when accessing APP.
16876         When reset_requested is set, close the reader and deallocate APP.
16877         * scd/command.c (open_card_with_request, cmd_restart): Follow the
16878         change of release_application.
16879         (send_client_notifications): Here it calls release_application holding
16880         the lock.
16881
16882 2017-02-16  Werner Koch  <wk@gnupg.org>
16883
16884         dirmngr,w32: Load all system provided certificates.
16885         + commit 7006352da773d82c47797bbf11e570ecafac6501
16886         * dirmngr/certcache.c (CERTOPENSYSTEMSTORE) [W32]: New type.
16887         (CERTENUMCERTIFICATESINSTORE) [W32]: New type.
16888         (CERTCLOSESTORE) [W32]: New type.
16889         (load_certs_from_file) [W32]: Do not build.
16890         (load_certs_from_w32_store) [W32]: New.
16891         (load_certs_from_system) [W32]: Call new function.
16892
16893         dirmngr: Load all system provided certificates.
16894         + commit 9a1a5ca0bc2cfb17ccf632de3e134b6d789c6855
16895         * configure.ac: Add option --default-trust-store.
16896         (DEFAULT_TRUST_STORE_FILE): New ac_define.
16897         * dirmngr/certcache.c: Include ksba-io-support.h.
16898         (total_trusted_certificates, total_system_trusted_certificates): New.
16899         (put_cert): Manage the new counters.
16900         (cert_cache_deinit): Reset them.
16901         (cert_cache_print_stats): Print them.
16902         (is_trusted_cert): Add arg WITH_SYSTRUST.  Change all callers to pass
16903         false.
16904         (load_certs_from_file): New.
16905         (load_certs_from_system): New.
16906         (cert_cache_init): Load system certificates.
16907
16908         common: Rename remaining symbols in ksba-io-support.
16909         + commit e1dfd862367cf91b66abe86bd73664409354bb14
16910         * common/ksba-io-support.c (gpgsm_reader_eof_seen): Rename to ...
16911         (gnupg_ksba_reader_eof_seen): this.  Change all callers.
16912         (gpgsm_destroy_reader): Rename to ...
16913         (gnupg_ksba_destroy_reader): this.  Change all callers.
16914         (gpgsm_finish_writer): Rename to ...
16915         (gnupg_ksba_finish_writer): this.  Change all callers.
16916         (gpgsm_destroy_writer): Rename to ...
16917         (gnupg_ksba_destroy_writer): this.  Change all callers.
16918         * common/ksba-io-support.c (struct base64_context_s): Rename to ...
16919         (gnupg_ksba_io_s): this.
16920         * common/ksba-io-support.h (base64_context_s): Ditto.
16921         (Base64Context): Rename this typedef to ...
16922         (gnupg_ksba_io_t): this.  Change all users.
16923
16924         common: Remove gpgsm dependencies from ksba-io-support.
16925         + commit 28c31524be84f20b34573c78bd3a94a81e4b1d61
16926         * common/ksba-io-support.c: Include ksba-io-support.h instead of
16927         ../sm/gpgsm.h.  Include util.h.
16928         (writer_cb_parm_s): Remove const from 'pem_name'.
16929         (gpgsm_destroy_writer): Free 'pem_name'.
16930         (gpgsm_create_reader): Rename to ...
16931         (gnupg_ksba_create_reader): this.  Replace args CTRL and
16932         ALLOW_MULTI_PEM by a new arg FLAGS.  Change the code to evaluate
16933         FLAGS.  Change all callers to pass the FLAGS.
16934         (gpgsm_create_writer): Rename to ...
16935         (gnupg_ksba_create_writer): this.  Replace arg CTRL by new arg FLAGS.
16936         Add arg PEM_NAME.  Evaluate FLAGS.  Store a copy of PEM_NAME.  Change
16937         all callers to pass the FLAGS and PEM_NAME.
16938
16939         common: Change license of ksba-io-support.c.
16940         + commit 919e76b407ac557b0f518ec03f3cc59e9e5740c9
16941         * common/ksba-io-support.c: Change from GPLv3+ to LGPLv3+/GPLv2+.
16942
16943         sm,common: Move ksba reader and writer support to common/.
16944         + commit 04bfa6fe6597b8ffcec61cbcacdc7eb137444e80
16945         * sm/base64.c: Rename to ...
16946         * common/ksba-io-support.c: this.
16947         * common/ksba-io-support.h: New.
16948         * common/Makefile.am (common_sources): Add new files.
16949         * sm/Makefile.am (gpgsm_SOURCES): Remove base64.c
16950
16951         dirmngr: Prepare certcache for forthcoming changes.
16952         + commit 5c4e67afd6385b48065de6a0f2dd0bfd936ab90b
16953         * dirmngr/certcache.c (cert_item_s): Rename 'flags.loaded' to
16954         'flags.config'.  Add 'flags.systrust'.
16955         (total_loaded_certificates): Rename to total_config_certificates.
16956         (put_cert): Rename args for clarity.  Set SYSTRUST flag.
16957         (load_certs_from_dir): Make sure put_cert does not set the SYSTRUST
16958         flag.
16959
16960         dirmngr: Replace stpcpy chains by strconcat.
16961         + commit aef60abe6a1772e18634984a94bd70f57d57ccdd
16962         * dirmngr/certcache.c (find_cert_bysn): Use strconcat.
16963         (find_cert_bysubject): Ditto.
16964         * dirmngr/http.c (store_header): Ditto.
16965         * dirmngr/ldap.c (make_url): Ditto.
16966         * dirmngr/server.c (get_cert_local_ski): Ditto.
16967         (do_get_cert_local): Use xstrconcat.
16968
16969 2017-02-16  NIIBE Yutaka  <gniibe@fsij.org>
16970
16971         scd: Minor fixes to silence compiler warnings.
16972         + commit 7a666ccb44f43c4efbaa51c1ca16fc0b37c3399d
16973         * scd/app.c (app_reset): Initialize ERR.
16974         * scd/scdaemon.c (scd_kick_the_loop, handle_connections): Catch the
16975         return value.
16976
16977 2017-02-15  Werner Koch  <wk@gnupg.org>
16978
16979         libdns: Workaround for bracketed numerical addresses.
16980         + commit a3509e12b6626a585ce7da6ceed8cfddcba2460f
16981         * dirmngr/dns-stuff.c (resolve_name_libdns): Work around an
16982         incompatibility between the glibc resolver and libdns.
16983
16984         dirmngr: Do PTR lookups only for 'keyserver --hosttable'.
16985         + commit a75325faf163275674a91971e75f1018035ca348
16986         * dirmngr/ks-engine-hkp.c (hostinfo_s): Remove fields v4addr and
16987         v5addr and add fields iporname and iporname_valid.
16988         (create_new_hostinfo): Clear them.
16989         (add_host): Remove the code to set the v4addr and v6addr fields.
16990         (ks_hkp_print_hosttable): Remove printing of the fields.  Compute the
16991         iporname field and display it.
16992         (ks_hkp_reload): Force re-computing of the iporname field in
16993         ks_hkp_print_hosttable.
16994
16995         dirmngr: Avoid PTR lookup for hosts in a pool.
16996         + commit da2ba20868093e3054d18adc2b1bc56cb23e4ba7
16997         * dirmngr/ks-engine-hkp.c (add_host): Don't to a PTR lookup for hosts
16998         in a pool.
16999
17000 2017-02-15  Justus Winter  <justus@g10code.com>
17001
17002         tests,build: Fix distcheck.
17003         + commit 2f7b6cb279ea0ee27364fbb2b12df47e76166a39
17004         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'time.scm'.
17005
17006         tests: Test and document other ways to create keys.
17007         + commit 90d383f1eb07fc823518dea10eb15ca390f5cf8e
17008         * doc/gpg.texi: Clarify usage and expiration arguments for key
17009         generation.
17010         * tests/openpgp/quick-key-manipulation.scm: Test all variants.
17011
17012         tests: Check expiration times of created keys.
17013         + commit 127e1e532da4083ccd3c307555b6177fab16f408
17014         * tests/gpgscm/ffi.c (do_get_time): New function.
17015         (ffi_init): Expose new function.
17016         * tests/gpgscm/ffi.scm (get-time): Document new function.
17017         * tests/gpgscm/time.scm: New file.
17018         * tests/openpgp/quick-key-manipulation.scm: Use the new facilities to
17019         check the expiration times of created keys.
17020         * tests/openpgp/tofu.scm: Use the new module.
17021
17022 2017-02-15  NIIBE Yutaka  <gniibe@fsij.org>
17023
17024         scd: Fix RESET command handling.
17025         + commit e2792813a55e091c51be7b1b089a71beb6466f1d
17026         * scd/app.c (release_application_internal): Remove.
17027         (release_application): Merge release_application_internal.
17028         (app_reset): Kick the loop and let close the reader.  Sleep is
17029         required here to wait closing.
17030         (scd_update_reader_status_file): When APP is no use, close it.
17031
17032 2017-02-14  Werner Koch  <wk@gnupg.org>
17033
17034         gpg: Make --export-ssh-key work for the primary key.
17035         + commit b456e5be91dc064fc9509ea86edab113721ed299
17036         * g10/export.c (export_ssh_key): Also check the primary key.
17037
17038 2017-02-13  Werner Koch  <wk@gnupg.org>
17039
17040         dirmngr: Do a DNS lookup even if it is missing from nsswitch.conf.
17041         + commit dee026d761ae3d7594c3dbc5b3fa842df53cc189
17042         * dirmngr/dns-stuff.c (libdns_init): Do not print error message for a
17043         missing nsswitch.conf.  Make sure that tehre is a DNS entry.
17044
17045         gpgconf: No ENOENT warning with --change-options et al.
17046         + commit 30dac0486b6357e84fbe79c612eea940b654e4d1
17047         * tools/gpgconf-comp.c (retrieve_options_from_program): Check ERRNO
17048         before printing a warning.
17049
17050         gpg: Print a warning if no command has been given.
17051         + commit 810adfd47801fc01e45fb71af9f05c91f7890cdb
17052         * g10/gpg.c (main): Print in the default case.
17053
17054 2017-02-13  Justus Winter  <justus@g10code.com>
17055
17056         g13: Fix build on macOS.
17057         + commit f8ce31a7bf1ee85e5010b628a66e6f69486e5213
17058         * g13/Makefile.am (t_common_ldadd): Add iconv.
17059
17060 2017-02-13  NIIBE Yutaka  <gniibe@fsij.org>
17061
17062         scd: Fix use case of PC/SC.
17063         + commit da4c132cca2c6df81243c9660b7348268a848f88
17064         * scd/apdu.c (apdu_open_reader): Add an argument APP_EMPTY.
17065         When CCID driver fails to open, try PC/SC if APP is nothing.
17066         * scd/app.c (select_application): Supply arg if APP is nothing.
17067
17068 2017-02-10  Werner Koch  <wk@gnupg.org>
17069
17070         gpg: Fix memory leak in the error case of signature creation.
17071         + commit 5996c7bf99f3a681393fd9589276399ebc956cff
17072         * g10/sign.c (write_signature_packets): Free SIG.  Also replace
17073         xcalloc by xtrycalloc.
17074
17075 2017-02-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17076
17077         common: Avoid warning about implicit declaration of gnupg_fd_valid.
17078         + commit 8810314e377a9cb6612150a57cf99260ed0bb9f6
17079         * common/logging.c: Add #include "sysutils.h".
17080
17081 2017-02-08  Justus Winter  <justus@g10code.com>
17082
17083         gpg,common: Make sure that all fd given are valid.
17084         + commit 6823ed46584e753de3aba48a00ab738ab009a860
17085         * common/sysutils.c (gnupg_fd_valid): New function.
17086         * common/sysutils.h (gnupg_fd_valid): New declaration.
17087         * common/logging.c (log_set_file): Use the new function.
17088         * g10/cpr.c (set_status_fd): Likewise.
17089         * g10/gpg.c (main): Likewise.
17090         * g10/keylist.c (read_sessionkey_from_fd): Likewise.
17091         * g10/passphrase.c (set_attrib_fd): Likewise.
17092         * tests/openpgp/Makefile.am (XTESTS): Add the new test.
17093         * tests/openpgp/issue2941.scm: New file.
17094
17095 2017-02-07  Justus Winter  <justus@g10code.com>
17096
17097         tests: Skip key types not supported by OpenSSH.
17098         + commit 56aa85f88f6b35fb03a2dc1a95882d49a74290e3
17099         * tests/openpgp/ssh-import.scm (path): New variable.
17100         (ssh,ssh-keygen,ssh-version,ssh-supports?): Likewise.
17101
17102 2017-02-07  Werner Koch  <wk@gnupg.org>
17103
17104         wks: Add WKS-Phase headers to the server messages.
17105         + commit b30ac663cec82c89ca9a3e87e65b36d2552f1533
17106         * tools/gpg-wks-server.c (send_confirmation_request): Add custom
17107         header.
17108         (send_congratulation_message): Ditto.
17109
17110 2017-02-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17111
17112         po: Manual updates of nl translation.
17113         + commit aa3f08794bfc809821e2fc30a09a5ae23925c645
17114         * po/nl.po: Apply several minor manual cleanups to nl.po that were
17115         previously applied to all the other localizations.
17116
17117         po: Copied missing nl.po translation from the 2.0 branch.
17118         + commit 8a9d4b55b09d04482b46055f0a60f01b86738df3
17119         * po/nl.po: Copy from 2.0 branch.
17120
17121         gpg: Fix aliases --list-key, --list-sig, and --check-sig.
17122         + commit f31120a5aa40b6e4e89d41d1d5d34e0f7da173b4
17123         * g10/gpg.c (opts): Define commands with ARGPARSE_c
17124         instead of ARGPARSE_s_n.
17125
17126 2017-02-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17127
17128         doc: Clarify abbreviation of --help.
17129         + commit f2b276dffbe2435b17abf2b3c51684d3636f3f11
17130         * doc/gpg.texi: clarify abbreviation of --help.
17131
17132 2017-02-03  Werner Koch  <wk@gnupg.org>
17133
17134         agent: Tell pinentry the hostname the agent is running on.
17135         + commit 042fe711c76f6377cedb8f83a73ba386cee34bb7
17136         * agent/call-pinentry.c [!W32]: Incluse utsname.h
17137         (start_pinentry): Pass nodename to OPTION/owner.
17138
17139         agent: Tell the Pinentry the client's pid.
17140         + commit 309f464a5952c7d7504b875bf4853914b1242346
17141         * configure.ac: Check for SO_PEERCRED et al.
17142         * agent/agent.h (server_control_s): Add field 'client_pid'.
17143         * agent/command.c (start_command_handler): Set CLIENT_PID.
17144         * agent/command-ssh.c (get_client_pid): New.
17145         (start_command_handler_ssh): Set CLIENT_PID.
17146         * agent/call-pinentry.c (start_pinentry): Tell Pinentry the client-pid.
17147
17148         gpg: More diagnostics for a launched pinentry.
17149         + commit 7052a0d77cf8f3a445b252a809d29be445788625
17150         * agent/call-pinentry.c (start_pinentry): Call getinfo/ttyinfo.
17151         * g10/server.c (gpg_proxy_pinentry_notify): Simplify the output so
17152         that we do not change the code when adding new fields to
17153         PINENTRY_LAUNCHED.
17154
17155 2017-02-02  Neal H. Walfield  <neal@g10code.com>
17156
17157         gpg: Don't assume that strtoul interprets "" as 0.
17158         + commit 407f5f9baea5591f148974240a87dfb43e5efef3
17159         * g10/tofu.c (show_statistics): If there are not records, return 0
17160         instead of NULL.
17161
17162         tests: Improve description of test.
17163         + commit 64be8e1e8607944687f3ae45ec64aa30bf4fdf6f
17164         * tests/openpgp/issue2929.scm: Improve description of test.
17165
17166         Revert "Revert "tests: Add test demonstrating issue2929.""
17167         + commit e596b21f4b78dd27489e677699cc4ba648051b3f
17168         This reverts commit 59048b0f1aa77313573a1004cd3a9f02692a7521.
17169
17170         gpg: Ensure TOFU bindings associated with UTKs are registered as usual.
17171         + commit 769272ba87f282a69e8d5f9bb27c86e6bec4496b
17172         * g10/tofu.c (get_trust): Call get_policy before short-circuiting the
17173         policy lookup for ultimately trusted keys to make sure the binding is
17174         added to the bindings table, if necessary.
17175
17176         gpg: If there is a TOFU conflict, elide the too few message warning.
17177         + commit a08c781739e7561093f32b732c4991f2bd817ec2
17178         * g10/tofu.c (tofu_get_validity): If there was a conflict, don't also
17179         print out a warning about too few messages.
17180
17181         gpg: Only print out TOFU statistics for conflicts in interactive mode.
17182         + commit 027b81b35fe36692005b8dba22d9eb2db05e8c80
17183         * g10/tofu.c (get_trust): Add arguments POLICYP and CONFLICT_SETP.  If
17184         they are not NULL, return the policy and conflict set (if there is
17185         one), respectively.  Update callers.  If MAY_ASK is FALSE, don't print
17186         out the statistics.
17187         (tofu_register_encryption): If there is a conflict and we haven't yet
17188         printed the statistics about the conflicting bindings, do so now.
17189         (tofu_get_validity): Likewise.
17190
17191         gpg: Add newline to output.
17192         + commit 74268180e5a3acc827f3a369f1fe5971f3bbe285
17193         * g10/tofu.c (ask_about_binding): Add newline to output.
17194
17195         gpg: Remove period at end of warning.
17196         + commit 6f9d8a956b2ca0f5a0eb7acc656fc17af2f2de47
17197         * g10/tofu.c (tofu_register_encryption): Remove period at end of
17198         warning.
17199
17200 2017-02-01  Werner Koch  <wk@gnupg.org>
17201
17202         dirmngr: New option --no-use-tor and internal changes.
17203         + commit 7440119e729d3fdedda8a9b44b70f8959beea8d7
17204         * dirmngr/dns-stuff.c (disable_dns_tormode): New.
17205         * dirmngr/dirmngr.c (oNoUseTor): New const.
17206         (opts): New option --no-use-tor.
17207         (tor_mode): New var.
17208         (parse_rereadable_options): Change to use TOR_MODE.
17209         (dirmngr_use_tor): New.
17210         (set_tor_mode): Call disable_dns_tormode.  Implement oNoUseTor.
17211         * dirmngr/dirmngr.h (opt): Remove field 'use_tor'.  Replace all
17212         references by a call to dirmngr_use_tor().
17213         * dirmngr/server.c (cmd_getinfo): Distinguish between default and
17214         enforced TOR_MODE.
17215
17216 2017-02-01  NIIBE Yutaka  <gniibe@fsij.org>
17217
17218         scd: Fix regression tracking the connection count.
17219         + commit 8ddc9268f6aedef0e178b174b89245c33d8189dd
17220         * scd/scdaemon.c (get_active_connection_count): New.
17221         (start_connection_thread): Bump ACTIVE_CONNECTIONS up and down.
17222         * scd/command.c (cmd_getinfo): Add subcommand "connections".
17223
17224 2017-01-31  Justus Winter  <justus@g10code.com>
17225
17226         gpgscm: Tune the hash tables.
17227         + commit 2e78aa6ff770849415f8eb71ca70c8886e9564c8
17228         * tests/gpgscm/scheme.c (oblist_initial_value): Increase the size of
17229         the hash table based on the number of symbols used after initializing
17230         the interpreter.
17231         (new_frame_in_env): Increase the size of the hash table based on the
17232         number of variables in the global environement.
17233
17234         gpgscm: Optimize environment lookups and insertions.
17235         + commit b85d509a8f5c2e6200b8051ca1593c019abce90b
17236         * tests/gpgscm/scheme.c (pointercmp): New function.
17237         (new_slot_spec_in_env): Add and use slot for insertions.
17238         (find_slot_spec_in_env): New variant of 'find_slot_in_env' that
17239         returns the slot on failures.
17240         (find_slot_in_env): Express using the new function.
17241         (new_slot_in_env): Update callsite.
17242         (opexe_0): Optimize lookup-or-insert.
17243         (opexe_1): Likewise.
17244         (scheme_define): Likewise.
17245
17246         gpgscm: Fix build with list environments.
17247         + commit 874424ee3cc795eae9972b6259a2cc4dcdbb868e
17248         * tests/gpgscm/scheme.c (new_slot_spec_in_env): Provide preallocation
17249         inforomation if USE_ALIST_ENV.
17250
17251         gpgscm: Optimize symbol lookups and insertions.
17252         + commit cea6d114b60deaecfbc2eb1aedbdfb7e6700922f
17253         * tests/gpgscm/scheme.c (oblist_find_by_name): Keep the list of
17254         symbols sorted, return the slot where a new symbol must be inserted on
17255         lookup failures.
17256         (oblist_add_by_name): Add the new symbol at the given slot.
17257         (mk_symbol): Adjust callsite.
17258         (gensym): Likewise.
17259         (assign_syntax): Likewise.
17260
17261         gpgscm: Fix build with object list.
17262         + commit 8f0ecb16cbb3798ad18be5f05b826db2aa1aaa00
17263         * tests/gpgscm/scheme.c (oblist_add_by_name): Provide preallocation
17264         information if USE_OBJECT_LIST.
17265
17266         gpgscm: Remove unused functions.
17267         + commit 2076cdaf6b93bc73223819895cc7a67323d8cee7
17268         * tests/gpgscm/scheme.c (check_cell_alloced): Remove function.
17269         (check_range_alloced): Likewise.
17270
17271 2017-01-31  Werner Koch  <wk@gnupg.org>
17272
17273         dirmngr: Require --allow-version-check even if --use-tor is used.
17274         + commit b0e8376e19072ec3c590273c69ab3e8e5edfdaca
17275         * dirmngr/dirmngr.c (housekeeping_thread): Load swdb only if the
17276         option is set.
17277
17278 2017-01-31  NIIBE Yutaka  <gniibe@fsij.org>
17279
17280         scd: Remove --debug-disable-ticker option.
17281         + commit e17fa5c75d76af4d4684ee810cb446ecd5110560
17282         * scd/scdaemon.c (ticker_disabled): Remove.
17283         (handle_tick, need_tick): Remove.
17284         (handle_connections): Don't check ticker_disabled.
17285
17286         scd: Fix SERIALNO for multiple devices.
17287         + commit f08d37af049bf1718b301644020658dd2bb07638
17288         * scd/app.c (select_application): Fix the logic if periodical check is
17289         needed.  If it is needed for newly found device(s), kick the loop.
17290         (scd_update_reader_status_file): Return value if select(2) should be
17291         called with timeout.
17292         * scd/ccid-driver.c (ccid_require_get_status): Don't return 0 for
17293         token with no interrupt transfer for now.
17294         * scd/command.c (open_card_with_request): Fix scan by SERIALNO.
17295         * scd/scdaemon.c (update_usb): Remove.
17296         (handle_connections): Evaluate need_tick after handle_tick.
17297
17298 2017-01-30  Justus Winter  <justus@g10code.com>
17299
17300         gpgscm: Use a compact vector representation.
17301         + commit 49e2ae65e892f93be7f87cfaae3392b50a99e4b1
17302         * tests/gpgscm/scheme-private.h (struct cell): Add a compact vector
17303         representation.
17304         * tests/gpgscm/scheme.c (vector_length): Use new representation.
17305         (vector_size): New macro.
17306         (get_vector_object): Use the new representation.
17307         (fill_vector): Likewise.
17308         (vector_elem): Likewise.
17309         (set_vector_elem): Likewise.
17310         (mark): Likewise.
17311         (gc): Likewise.  Be careful not to confuse immediate values for type
17312         flags.
17313         (finalize_cell): Vectors now require finalization.
17314
17315         gpgscm: Provide framework for immediate values.
17316         + commit e343984fc50e87830905614dc87f83f810551ad1
17317         * tests/gpgscm/scheme.c (IMMEDIATE_TAG): New macro.
17318         ({is,set,clr}_immediate): Likewise.
17319         (enum scheme_types): Make type tags disjoint from immediate values.
17320         (TYPE_BITS): We need one more bit now.
17321         (ADJ,T_MASKTYPE): Compute values.
17322
17323         gpgscm: Fix setting the line of the first gc reservation.
17324         + commit d27a4435bd8c0f0971d51ddf454422fc77d48271
17325         * tests/gpgscm/scheme.c (_gc_disable): Negate guard.
17326
17327         gpgscm: Introduce macro for the vector length.
17328         + commit 489edf84c9a9c2122cef1b4e678154521525b54a
17329         * tests/gpgscm/scheme.c (vector_length): New macro.
17330         (get_vector_object): Use the new macro.
17331         (oblist_add_by_name): Likewise.
17332         (oblist_find_by_name): Likewise.
17333         (oblist_all_symbols): Likewise.
17334         (mk_vector): Likewise.
17335         (mark): Likewise.
17336         (new_slot_spec_in_env): Likewise.
17337         (find_slot_spec_in_env): Likewise.
17338         (opexe_2): Likewise.
17339         (opexe_5): Likewise.
17340
17341         Revert "tests: Add test demonstrating issue2929."
17342         + commit 59048b0f1aa77313573a1004cd3a9f02692a7521
17343         This reverts commit 5aafa56dffefe3fac55b9d0555c7c86e8a07f072.
17344
17345 2017-01-30  NIIBE Yutaka  <gniibe@fsij.org>
17346
17347         scd: Fix GetSlotStatus.
17348         + commit 2a025039c1817c7f75c35a898884849a8e5dc926
17349         * scd/apdu.c (get_status_reader): Add ON_WIRE arg, here.
17350         (ct_get_status, pcsc_get_status_direct, pcsc_get_status_wrapped)
17351         (pcsc_get_status, get_status_ccid, my_rapdu_get_status): Likewise.
17352         (reset_pcsc_reader_wrapped, open_pcsc_reader_wrapped): Follow the
17353         change.
17354         (apdu_get_status_internal): It's lower-level driver which judge
17355         it's not needed.  Otherwise, it can't detect the removal.
17356         * scd/ccid-driver.c (ccid_slot_status): After the POWERED_OFF check,
17357         we can skip sending GetSlotStatus packet on wire, when no need.
17358
17359         scd: Don't send GET_STATUS packet if not needed.
17360         + commit 7c8eee4d396a751d41fd1ee1e1b87b851fca172a
17361         * scd/apdu.c (apdu_get_status_internal): Add ON_WIRE arg.
17362         (apdu_connect): Call apdu_get_status_internal with ON_WIRE enabled.
17363         (apdu_get_status): For periodical check, call apdu_get_status_internal
17364         with ON_WIRE disabled.
17365
17366         scd: Fix cancel INTERRUPT transfer.
17367         + commit 216afba0d99582d0fbae1d6e925f4ddb349d9de3
17368         * scd/ccid-driver.c (do_close_reader): Don't lock events, but check the
17369         return value of libusb_cancel_transfer.
17370
17371 2017-01-27  NIIBE Yutaka  <gniibe@fsij.org>
17372
17373         scd: More changes on watching removal of card/reader.
17374         + commit f3d9b2582bcaa1936b4fed5ec42a889b02df2f42
17375         * scd/app-common.h (struct app_ctx_s): Rename field to
17376         periodical_check_needed.
17377         * scd/scdaemon.c (update_usb): Rename from update_fdset_for_usb.
17378         Don't use libusb_get_pollfds any more.
17379         (scd_kick_the_loop): New.
17380         (need_tick): Follow the rename.
17381         (handle_connections): No libusb event handling here.
17382         * scd/app.c (app_new_register): Follow the change of rename.
17383         (select_application, scd_update_reader_status_file): Likewise.
17384         * scd/ccid-driver.c (ccid_usb_thread_is_alive): New.
17385         (intr_cb): Call scd_kick_the_loop.
17386         (ccid_usb_thread): New.  Thread to invoke INTERRUPT callback.
17387         (ccid_open_usb_reader): Add thread invocation.
17388         (ccid_require_get_status): Remove
17389         LIBUSB_WORKS_EXPECTED_FOR_INTERRUPT_ENDP.
17390         (do_close_reader): Carefully handle handle->transfer.
17391         (get_escaped_usb_string): Insert npth_unprotect/npth_protect.
17392         (do_close_reader, bulk_out, bulk_in, abort_cmd, ccid_slot_status)
17393         (ccid_transceive, ccid_transceive_secure): Likewise.
17394
17395         scd: Fix release of transfer object.
17396         + commit f92fe33f11c44f14fd31682259fcd231e8fa9e75
17397         * scd/ccid-driver.c (intr_cb): Handle LIBUSB_TRANSFER_CANCELLED.
17398         (do_close_reader): When callback is active, call
17399         libusb_cancel_transfer and wait callback is fired off.
17400
17401         scd: Improve watching USB device removal.
17402         + commit 25cc8575da9a9b8bf60c64c8059cb5f73cc52e1d
17403         * scd/apdu.c(struct reader_table_s): Add require_get_status.
17404         (apdu_connect): Change return value meaning.  Call apdu_reset here.
17405         * scd/app.c (app_new_register): Add require_get_status.
17406         (select_application): Use the return value of apdu_connect.
17407         (scd_update_reader_status_file): Call update_fdset_for_usb with
17408         checking all_have_intr_endp.
17409         (app_list_start, app_list_finish): Remove.
17410         * scd/ccid-driver.c (struct ccid_driver_s): Add transfer.
17411         (intr_cb): Don't call libusb_transfer in this callback.
17412         (ccid_require_get_status): New.
17413         (do_close_reader): Call libusb_transfer here.
17414         * scd/scdaemon.c (update_fdset_for_usb): Remove the first argument.
17415
17416         scd: Wake up the select when new USB scan.
17417         + commit 031e3fa7b9a6770a4de1a184555250feeba0d26f
17418         * scd/scdaemon.c (update_fdset_for_usb): Wake up the select(2).
17419         (handle_connections): Use a kind of "self-pipe" technique.
17420
17421 2017-01-26  NIIBE Yutaka  <gniibe@fsij.org>
17422
17423         scd: Only submit apdu_get_status when needed.
17424         + commit 881dcdfd84ebad36bff20c895e629025bed9d94e
17425         * scd/apdu.c (apdu_dev_list_finish): Return Boolean value if
17426         all device support INTERRUPT transfer.
17427         * scd/ccid-driver.c (ccid_dev_scan_finish): Likewise.
17428         * scd/app.c (app_new_register): Fix initial value of card_status.
17429         (select_application): Call update_fdset_for_usb.
17430         (scd_update_reader_status_file): Ditto.
17431         * scd/scdaemon.c (update_fdset_for_usb, need_tick): New.
17432         (handle_connections): Call handle_tick when select returns.
17433         Let select watch USB file descriptors, too.
17434         Call libusb_handle_events_timeout_completed for INTERRUPT transfer.
17435
17436         scd: Fix APP reference counting.
17437         + commit 9b06633c811e8815c07d744f20b45405cb082367
17438         * scd/app.c (scd_update_reader_status_file): Don't call another
17439         release_application_internal.
17440         * scd/command.c (open_card_with_request): Don't require APPTYPE !=
17441         NULL.
17442
17443         scd: Add INTERRUPT endp support to CCID driver.
17444         + commit bb5ceb78c333129a44c0144f2cf49b17ede898f1
17445         * scd/app.c (scd_update_reader_status_file): Fix releas of APP.
17446         * scd/ccid-driver.c (struct ccid_driver_s): Add INTR_BUF.
17447         (intr_cb, ccid_setup_intr): New.
17448         (ccid_open_usb_reader): Call ccid_setup_intr.
17449         (ccid_slot_status): Return CCID_DRIVER_ERR_NO_READER when removed.
17450
17451 2017-01-25  Justus Winter  <justus@g10code.com>
17452
17453         gpg: Fix searching for mail addresses in keyrings.
17454         + commit 3f4f20ee6eff052c88647b820d9ecfdbd8df0f40
17455         * g10/keyring.c (compare_name): Fix KEYDB_SEARCH_MODE_MAIL* searches
17456         in keyrings when the UID is a plain addr-spec.
17457
17458         tests,w32: Fix GPGME tests requiring a pinentry.
17459         + commit 02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba
17460         * tests/gpgme/gpgme-defs.scm: Use our fake pinentry, and configure it
17461         to supply the correct passphrase.
17462
17463         tests,w32: Fix gpgsm signature verification test.
17464         + commit 7d5a0ed792133d875fcedb6e23a9a3682f1a23f9
17465         * tests/gpgsm/verify.scm: Use 'call-with-binary-output-file' to avoid
17466         automatic line-ending conversion.
17467
17468         agent: Fix double free.
17469         + commit e175152ef7515921635bf1e00383e812668d13fc
17470         * agent/cache.c (agent_store_cache_hit): Make sure the update is
17471         atomic.
17472
17473         tests: Skip GPGME tests that are not built.
17474         + commit 5f2da5d439debf44615a97de788d8f720b517972
17475         * tests/gpgme/wrap.scm: Skip tests that are not built.
17476
17477         tests,w32: Fix locating GPGME's tests on Windows.
17478         + commit 6ecd8b3e71632bbcca524ad735c83bdc2a4c4a4a
17479         * tests/gpgme/run-tests.scm: Qualify the test with the executable
17480         extension.
17481
17482 2017-01-24  Werner Koch  <wk@gnupg.org>
17483
17484         gpg: Print a warning on Tor problems.
17485         + commit 770b75a746836773909af25ccb9b480e61cea677
17486         * dirmngr/ks-engine-hkp.c (tor_not_running_p): New.
17487         (map_host): Call that to print a warning.
17488         (handle_send_request_error): Ditto and avoid marking the host dead.
17489         Also print a tor_config_problem warning.  Add arg CTRL; adjust callers
17490         to pass that new arg.
17491         * g10/call-dirmngr.c (ks_status_cb): Detect and print the new
17492         warnings.
17493
17494         dirmngr: Simplify error returning inside http.c.
17495         + commit 51e5a5e5a46279809848b4ab4419f35045336010
17496         * dirmngr/http.c (connect_server): Change to return an gpg_error_t
17497         and to store socket at the passed address.
17498         (http_raw_connect, send_request): Adjust accordingly.
17499
17500         dirmngr: New option --disable-ipv4.
17501         + commit 72736af86a501592d974d46ff754a63959e183bd
17502         * dirmngr/dirmngr.c (oDisableIPv4): New const.
17503         (opts): New option --disable-ipv4.
17504         (parse_rereadable_options): Set that option.
17505         * dirmngr/dirmngr.h (opt): New field 'disable_ipv4'.
17506         * dirmngr/dns-stuff.c (opt_disable_ipv4): bew var.
17507         (set_dns_disable_ipv4): New.
17508         (resolve_name_standard): Skip v4 addresses when OPT_DISABLE_IPV4 is
17509         set.
17510         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
17511         (send_request): Pass HTTP_FLAG_IGNORE_IPv4 if opt.disable_v4 is set.
17512         * dirmngr/crlfetch.c (crl_fetch): Ditto.
17513         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Ditto.
17514         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
17515         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
17516
17517 2017-01-24  Justus Winter  <justus@g10code.com>
17518
17519         tools: Use platform abstraction for I/O.
17520         + commit 73d6572bd0f260c5aa1e191a1ba4859ec6fa262c
17521         * tools/gpg-connect-agent.c (main): Use a gpgrt_stream_t for
17522         'script_fp'.  Adapt accordingly.
17523
17524         tools: Use platform abstraction for I/O.
17525         + commit 77b8aff4e1bb641f497e63230a5006ab70e6c3a8
17526         * tools/gpgconf-comp.c (retrieve_options_from_file): Use a
17527         gpgrt_stream_t for 'list_file'.  Adapt accordingly.
17528         (copy_file): Likewise for 'src' and 'dst'.
17529         (change_options_file): Likewise for 'src_file' and 'dest_file'.
17530         (change_options_program): Likewise for 'src_file' and 'dest_file'.
17531         (gc_process_gpgconf_conf): Likewise for 'config'.
17532
17533         tools: Use platform abstraction for renaming files.
17534         + commit bfd75e9492fc4edd86f4049a62304943a7b2a29a
17535         * tools/gpgconf-comp.c (gc_component_change_options): Use
17536         'gnupg_rename_file'.  Also, block signals across all renames in an
17537         attempt to make the whole process atomic.
17538
17539         tools: Add comments explaining the functions parameters.
17540         + commit 82e309ad06884e54693f4856412984331febdda0
17541         * tools/gpgconf-comp.c (change_options_file): Add comments explaining
17542         the functions parameters.
17543         (change_options_program): Likewise.
17544
17545         tools: Improve error handling.
17546         + commit b0348fdb26637b0bcbd68a96c1746a1613b309af
17547         * tools/gpgconf-comp.c (gp_component_change_options): Improve error
17548         handling when reading from stdin.
17549
17550         tools: Fix memory leak.
17551         + commit 5b28f025085b386e0ec49535d4cd3f875a414eb0
17552         * tools/gpgconf-comp.c (change_options_file): Fix leak.
17553
17554         tests: Add test demonstrating issue2929.
17555         + commit 5aafa56dffefe3fac55b9d0555c7c86e8a07f072
17556         * tests/openpgp/Makefile.am (XTESTS): Add new test.
17557         * tests/openpgp/issue2929.scm: New file.
17558
17559         tests: Enable gpgconf test.
17560         + commit 628ff843466b42309f850b8d65b13cf5f586b81f
17561         * tests/openpgp/Makefile.am (XTESTS): Re-add gpgconf.scm.
17562
17563 2017-01-23  Werner Koch  <wk@gnupg.org>
17564
17565         Release 2.1.18.
17566         + commit f8289b1d28f501d2f37bf9ccb5e42f7fb27b4688
17567
17568
17569         build: Change make distcheck configure and temp. remove gpgconf.scm.
17570         + commit 25e029823813e190a18b601af60efcb1fb3b84af
17571         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Also test gpgtar and
17572         wks-tools.  Disable ntbtls.
17573         * tests/openpgp/Makefile.am (XTESTS): Temporary remove gpgconf.scm.
17574
17575         Fix format string errors and some missing error case initialization.
17576         + commit af5979a42b9468ffe0f3ac6de5a77d982c5cf8a0
17577         * common/logging.c (do_logv): Remove extra parentheses in comparison.
17578
17579         * dirmngr/dns-stuff.c (resolve_addr_libdns): Init RES so that
17580         dns_res_close is given a defined value in the error case.
17581
17582         * dirmngr/http.c (cookie_read, cookie_write) [HTTP_USE_NTBTLS]: Fix
17583         format string char.
17584
17585         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Remove duplicate "const".
17586         * dirmngr/ks-engine-http.c (ks_http_help): Ditto.
17587         * dirmngr/ks-engine-kdns.c (ks_kdns_help): Ditto.
17588         * dirmngr/ks-engine-ldap.c (ks_ldap_help): Ditto.
17589
17590         * scd/app-p15.c (send_keypairinfo, do_getattr): Fix format string
17591         char.
17592         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Init PID for the
17593         error case.
17594         (scdaemon_runtime_change): Ditto.
17595         (dirmngr_runtime_change): Ditto.
17596
17597         * tools/gpgconf.c (query_swdb): Init VALUE_SIZE_UL.
17598
17599         dirmngr: On SIGHUP mark all keyservers alive.
17600         + commit 3ca3da8fc4ef802b8cceec5fde398a07b4888848
17601         * dirmngr/ks-engine-hkp.c (ks_hkp_reload): New.
17602         * dirmngr/dirmngr.c (dirmngr_sighup_action): Call it.
17603
17604 2017-01-23  Gaetan Bisson  <bisson@archlinux.org>
17605
17606         libdns: Hack to skip negation term.
17607         + commit d4c0187dd93163f12e9f953366adef81ecf526a6
17608         * dirmngr/dns.c (dns_nssconf_loadfile): Skip negation terms in
17609         nsswitch.conf parser.
17610
17611 2017-01-23  Werner Koch  <wk@gnupg.org>
17612
17613         dirmngr: Print debug message only with --debug.
17614         + commit 9ae0b81e4ff08712da642456d0164f81924a91e4
17615         * dirmngr/dns-stuff.c (libdns_init): Call log_debug only if opt_debug
17616         is set.
17617
17618 2017-01-23  Phil Pennock  <gnupg-devel@spodhuis.org>
17619
17620         dirmngr: Handle missing nsswitch.conf.
17621         + commit 88ade475c56ac3712d6bd6d41ae38e1421dcb320
17622         * dirmngr/dns-stuff.c (libdns_init): Fallback to files,dns.
17623
17624 2017-01-23  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
17625
17626         gpg: Fix misleading log message when checking regexp.
17627         + commit a85731ada2d361eacddc5ae92f80d34792dd4b5e
17628         * src/trustdb.c (check_regexp): Correctly print whether the
17629         regexp matched or not.
17630
17631 2017-01-23  Werner Koch  <wk@gnupg.org>
17632
17633         gpg: New export and import options "backup" and "restore".
17634         + commit 953d4ec6afd1b42feb7465ee57e48d72f033019a
17635         * g10/export.c (parse_export_options): Add "backup" and its alias
17636         "export-backup".
17637         (do_export_one_keyblock): Export ring trust packets in backup mode.
17638         * g10/import.c (parse_import_options): Add "restore" and its alias
17639         "import-restore".
17640         (read_block): Import ring trust packets.
17641
17642 2017-01-23  NIIBE Yutaka  <gniibe@fsij.org>
17643
17644         scd: Fix INTERRUPT transfer.
17645         + commit 21c9ebb908c2ad2e322e7a13e59e5880494c4d67
17646         * scd/ccid-driver.c (find_endpoint): Don't return Bulk endpoint as
17647         Interrupt endpoint.
17648         (ccid_poll): Call libusb_interrupt_transfer.
17649
17650 2017-01-19  Werner Koch  <wk@gnupg.org>
17651
17652         build: Print a commit id in the generated ChangeLog.
17653         + commit e926f30a1cda75f6334b79c303b5134f0441a3dc
17654         * build-aux/gitlog-to-changelog: Print an extra line with the commit
17655         id.
17656
17657         common: Fix buffer copy code again.
17658         + commit e031b3c16cfec583c4322c84d299b355f0849c77
17659         * common/exectool.c (my_error_from_errno): Remove.
17660         (copy_buffer_do_copy): Do without var RC.
17661         (copy_buffer_flush): Ditto.  Use ERRNO instead of es_write return
17662         code.
17663         (gnupg_exec_tool): Correctly return errors from es_read.
17664
17665 2017-01-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
17666
17667         gpg: Allow to freeze faked system time.
17668         + commit 3daeef702b2e6a42f0f396b828f86ffc3f33fc88
17669         * g10/gpg.c (main): If the parameter for --faked-system-time
17670         ends with a '!', freeze time at the specified point.
17671         * common/gettime.c (gnupg_set_time): Allow to freeze the time
17672         at an arbitrary time instead of only the current time.
17673         * doc/gpg.texi: Update documentation for --faked-system-time.
17674
17675 2017-01-19  Werner Koch  <wk@gnupg.org>
17676
17677         common: Clarify use of vars in buffer copy code.
17678         + commit 55c9212a2338bf0b07c8cf3a69bcedaa28d48d43
17679         * common/exectool.c (my_error_from_errno): New.
17680         (copy_buffer_do_copy): Use separate vars for errno values and
17681         gpg-error values for clarity.  s/assert/log_assert/.
17682         (copy_buffer_flush): Ditto.
17683         (gnupg_exec_tool_stream): Use gpg_err_code when testing.
17684
17685 2017-01-19  NIIBE Yutaka  <gniibe@fsij.org>
17686
17687         dirmngr: Add setup of CA for NTBTLS.
17688         + commit 367349b4dcc97718f8ae1163d1389d2a46fc3453
17689         * dirmngr/http.c [HTTP_USE_NTBTLS] (http_session_new): Add CA by
17690         ntbtls_set_ca_chain.
17691
17692 2017-01-18  Justus Winter  <justus@g10code.com>
17693
17694         common: Fix flushing copy buffers.
17695         + commit 34fa2d79a07a079be472c3ff486debfdac8c6070
17696         * common/exectool.c (copy_buffer_flush): Write and flush the data, but
17697         do not hide EAGAIN from the caller.
17698         (gnupg_exec_tool_stream): Retry on EAGAIN.
17699
17700 2017-01-18  Werner Koch  <wk@gnupg.org>
17701
17702         agent: Reduce sleep time in the progress callback.
17703         + commit 3d356d165aed7d76a3ea811b1d24ed0a05ac90d4
17704         * agent/gpg-agent.c (agent_libgcrypt_progress_cb): Reduce sleep time
17705         from 100ms to 1ms or use gpgrt_yield when build against a recent
17706         libgpg-error.
17707
17708         gpgconf: Allow "all" for --launch, --kill, and --reload.
17709         + commit 2312248b2e3adffa52d8a3ac4f24fe2c88f0f569
17710         * tools/gpgconf-comp.c (gc_component_launch): Allow -1 for COMPONENT.
17711         (gc_component_kill): Ditto.
17712         (gc_component_reload): For robustness change the condition to < 0.
17713         * tools/gpgconf.c (main) <aLaunch, aKill, aReload>: Support argument
17714         "all".
17715
17716         gpg: Remove unused definitions.
17717         + commit 701f54eccf3da3319dd6d74f46b852c64d90bc52
17718         * g10/keydb.h (rt_UNKNOWN, rt_RING): Remove constants.
17719         (keyblock_pos_struct, KBPOS): Remove struct and type.
17720
17721 2017-01-18  NIIBE Yutaka  <gniibe@fsij.org>
17722
17723         scd: Cleanup SERIALNO protocol.
17724         + commit 79cea89774e6327b6785e22b7057f9e3e188ac2b
17725         * scd/app.c (app_get_serial_and_stamp): Remove.
17726         (app_get_serialno): New.
17727         (app_write_learn_status): Use send_status_direct.
17728         (app_getattr): Use app_get_serialno for SERIALNO and
17729         send with send_status_direct.
17730         * scd/app-openpgp.c (do_getattr): Likewise.
17731         * scd/command.c (cmd_serialno): Don't send TIMESTAMP of 0.
17732         (cmd_learn): Likewise.  Don't inquire with TIMESTAMP of 0.
17733
17734         scd: Add "card_list" sub command for GETINFO.
17735         + commit 8b1f24a29ebc7651437c01990215a55b1136dae0
17736         * scd/app.c (app_send_card_list): New.
17737         * scd/command.c (cmd_getinfo): Fix "status" sub command.
17738         Add "card_list" sub command.
17739
17740 2017-01-17  Werner Koch  <wk@gnupg.org>
17741
17742         build: Handle packages with dashes in --find-version.
17743         + commit a09f258b1412209763222e2e81bab79663e4d685
17744         * autogen.sh (--find-version): Improve version extraction.
17745         * (--help): Extend.
17746
17747         gpg: Clean bogus subkey binding when cleaning a key.
17748         + commit 356323768a1a29138581d0aceed0336ab8be0d5c
17749         * g10/trust.c (clean_key): Also clean bogus subkey bindings.
17750
17751         gpg: Sync print of additional sig data in --edit-key.
17752         + commit 766c25018b288a7185c6da6adac0dec01a64e94a
17753         * g10/keylist.c (show_policy_url): Implement MODE -1.
17754         (show_keyserver_url): Ditto.
17755         (show_notation): Ditto.
17756         * g10/keyedit.c (print_one_sig): Print policy URL, keyserver URL and
17757         notation data to the tty.
17758
17759         common: Remove unused function tty_print_string.
17760         + commit bae42e543799a428e59bad870aed9719dd6e6e45
17761         * common/ttyio.c (tty_print_string): Rename to ...
17762         (do_print_string): this.  Make local.  Simplify FP case by using
17763         print_utf8_buffer.  Change caller.
17764
17765         gpg: Prepare some key cleaning function for use with secret key packets.
17766         + commit adbfbf608e75cdd72ae7b3a538b91bc0e236a18f
17767         * g10/trust.c (mark_usable_uid_certs): Allow use of secret key packets.
17768         (clean_sigs_from_uid): Ditto.
17769         (clean_uid_from_key): Ditto.
17770         (clean_one_uid): Ditto.
17771         (clean_key): Ditto.
17772
17773 2017-01-16  Werner Koch  <wk@gnupg.org>
17774
17775         dirmngr: Implement hkps lookups using literal addresses.
17776         + commit e6aebfe3d0f16c483296fd125b66a44017fe15f4
17777         * dirmngr/ks-engine-hkp.c (map_host): For literal addresses do a
17778         reverse lookup.
17779
17780         dirmngr: Allow reverse DNS lookups in Tor-mode.
17781         + commit 9850124c7bdf0a0e7c1866abc85f3437257d7095
17782         * dirmngr/dns-stuff.c (resolve_dns_name): Move up in the file.
17783         (resolve_addr_libdns): New.
17784         (resolve_dns_addr): Divert to resolve_dns_addr.
17785
17786         dirmngr: Avoid network queries for literal IP addresses.
17787         + commit daae97bc14742c75408c4eb05808a2102cfe2bcf
17788         * dirmngr/dns-stuff.c (resolve_name_libdns): USe flags AI_NUMERICHOST
17789         for literal IP addresses.
17790         (resolve_name_standard): Ditto.
17791
17792         dirmngr: Fix URL creation for literal IPv6 addresses in HKP.
17793         + commit 82646bbf1a5a7d745da81b239a12667a51703dc1
17794         * dirmngr/dns-stuff.c (is_ip_address): Make the return value depend on
17795         the address family.
17796         * dirmngr/ks-engine-hkp.c (map_host): Rename arg R_POOLNAME to
17797         R_HTTPHOST because that is its purpose.  Note that the former
17798         behaviour of storing a NULL to indicate that it is not a pool has not
17799         been used.
17800         (make_host_part): Ditto.
17801         (make_host_part): Make sure that literal v6 addresses are correclty
17802         marked in the constructed URL.
17803
17804 2017-01-16  Justus Winter  <justus@g10code.com>
17805
17806         tests: Improve GPGHOME handling.
17807         + commit 8b1611a9605b636db3e07a9d81016a11b318724c
17808         * tests/openpgp/defs.scm (GPGHOME): New variable.
17809         * tests/openpgp/ssh-import.scm: Remove redundant code, use 'path-join'.
17810         * tests/openpgp/tofu.scm: Likewise.
17811
17812 2017-01-16  NIIBE Yutaka  <gniibe@fsij.org>
17813
17814         agent: Ask specific SERIALNO for pksign/pkdecrypt.
17815         + commit 0801f49b0dc7102943f0e9fa51061f50f5708ca6
17816         * agent/call-scd.c (agent_card_serialno): Add DEMAND argument.
17817         * agent/command-ssh.c (card_key_available): Follow the change.
17818         * agent/learncard.c (agent_handle_learn): Likewise.
17819         * agent/divert-scd.c (ask_for_card): Use DEMAND argument.
17820
17821         scd: Add --demand option for SERIALNO.
17822         + commit 2e6f1c99d4f66a23a752092397e20a84964edf48
17823         * scd/app.c (select_application): Add SERIALNO_BIN and SERIALNO_BIN_LEN
17824         arguments.  Return matched APP with a serial number when specified.
17825         * scd/command.c (open_card): Modify for the implicit open only.
17826         (open_card_with_request): New for explicit open and support match with a
17827         serial number.
17828         (cmd_serialno): Support --demand option.
17829         (cmd_learn, cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkauth)
17830         (cmd_pkdecrypt, cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
17831         (cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_apdu): Follow
17832         the change of open_card.
17833
17834 2017-01-12  Werner Koch  <wk@gnupg.org>
17835
17836         build: Make autogen.sh more POSIX friendly (next try)
17837         + commit 3db76c9277d918dec9721a6439f4db3b3c06aba3
17838         * autogen.sh: Fix dd count to 5.
17839
17840         gpg: Rename a var to avoid a shadowing warning.
17841         + commit c99a09f111c5980ae034faaea61a00d9ad60463c
17842         * g10/keygen.c (keygen_set_std_prefs): Rename variable.
17843
17844         tests: Fix t-gettime for a time_t of 64 and a long of 32 bit.
17845         + commit 5c0777e1ca02ff1767755c417b64d6f78e02f475
17846         * configure.ac (AC_CHECK_HEADERS): Add stdint.h.
17847         * common/t-gettime.c: Include stdint.h.
17848         (UINTMAX_C): Define replacement.
17849         (test_isotime2epoch): Use UINTMAX_C for the >32 bit constants.
17850
17851         build: Make autogen.sh more POSIX friendly.
17852         + commit 3c00b52f7cb0fbd756c0bbe5134b8f2d69c60dd1
17853         * autogen.sh: Replace non POSIX "cp -a" and "head -c".
17854
17855         libdns: Silence -Wstrict-prototypes on some function ptrs.
17856         + commit 97372b39cd9b4c84a083eadbf072fff77799617f
17857         * dirmngr/dns.c (dns_rrtype): Ignore -Wstrict-prototypes warning.
17858
17859         libdns: Provide replacement for EPROTO.
17860         + commit 0fadff9cdde47e42f7e428bc903b3626c67ba9c0
17861         * dirmngr/dns.c (EPROTO) ![EPROTO]: Define to EPROTONOSUPPORT.
17862
17863 2017-01-11  Werner Koch  <wk@gnupg.org>
17864
17865         dirmngr: After a connection failure log a hint if Tor is not running.
17866         + commit 20dfcfe08c618d23134d5d6efef7676b090f30d3
17867         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Check whether
17868         Tor is running.
17869
17870         dirmngr: Mark hosts dead on ENETDOWN.
17871         + commit 76fb2febde10da8237bbe7613830b51af2a45139
17872         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Take care of
17873         ENETDOWN.
17874
17875         dirmngr: Fix Tor access for v6 addresses.
17876         + commit 09aeac41c97bc8ecb44a09886c7fdbd9a6ec5c7f
17877         * dirmngr/http.c (use_socks): New.
17878         (my_sock_new_for_addr): New.
17879         (connect_server): Replace assuan_sock_new by my_sock_new_for_addr.
17880
17881         dirmngr: Remove warnings about unused global variables.
17882         + commit 915864e7f0315b0c96315d0bcd48b1b93592353a
17883         * dirmngr/crlcache.c (oidstr_issuingDistributionPoint): Comment.
17884         * dirmngr/ocsp.c (oidstr_certHash): Comment.
17885
17886         dirmngr: Implement debug option "network" for http.
17887         + commit da894c48ec3393e7c815f575daa5a52ab37cc102
17888         * dirmngr/dirmngr.c (parse_rereadable_options): Set http debugging.
17889
17890         dirmngr: Add debug code to http.c.
17891         + commit 02ab4b0085f8b4cdfe163d25ddd0fc80753d7f4a
17892         * dirmngr/http.c (opt_verbose, opt_debug): New vars.
17893         (http_set_verbose): New function.
17894         (_my_socket_new): Add debug output.
17895         (_my_socket_ref, _my_socket_unref, session_unref): Call log_debug if
17896         OPT_DEBUG has ben set to 2 in a debugger.
17897         (http_session_new, http_session_ref): Ditto.
17898         (send_request, http_start_data): Print debug output for the request.
17899         (parse_response): Change to use log_debug_string for the response.
17900
17901         common: New function log_debug_with_string.
17902         + commit 088d71d3671e74eb088386026f0e439a7e3b5543
17903         * common/logging.c (do_logv): Factor some code out to ...
17904         (print_prefix): new.
17905         (log_logv): Add arg EXTRASTRING and print it.  Change all callers to
17906         pass NULL for it.
17907         (log_debug_with_string): New.  Uses EXTRASTRING.
17908
17909 2017-01-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17910
17911         common: Avoid unnecessary ambiguity in argparse.
17912         + commit 7249ab0f95d1f6cb8ee61eefedc79801bb56398f
17913         * common/argparse.c (find_long_option): Avoid unnecessary ambiguity.
17914
17915 2017-01-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17916
17917         systemd-user: Enable "systemctl --user reload {dirmngr,gpg-agent}"
17918         + commit a20a450ac4ef10847fd59a5fd3acbbd2bfcaa6a2
17919         * doc/examples/systemd-user/*.service: Add ExecReload directives to
17920           indicate the canonical way to reload the services.
17921
17922         GnuPG recommends reloading the agent and dirmngr with "gpgconf
17923         --reload".  if anyone is running them as systemd user services, they
17924         might ask them to reload in the systemd way, so teach systemd the
17925         right thing to do.
17926
17927 2017-01-10  Justus Winter  <justus@g10code.com>
17928
17929         tests: Improve gpgconf test.
17930         + commit 88e42ef08d65d4d1bc29c6cea48df19ca0d5e2bd
17931         * tests/openpgp/defs.scm (valgrind): New variable.
17932         (gpg-config): Fix clearing an option.
17933         * tests/openpgp/gpgconf.scm: Also toggle 'quiet'.
17934
17935         tools: Fix memory leaks and improve error handling.
17936         + commit 1f5caf90bfaaaf7b9d8c06c12087aeeae3748032
17937         * tools/gpgconf-comp.c (gc_option_free): New function.
17938         (gc_components_free): Likewise.
17939         (gc_components_init): Likewise.
17940         (retrieve_options_from_program): Use 'xfree', fix memory leak.
17941         (change_options_program): Improve error handling.
17942         (gc_component_change_options): Fix memory leaks.
17943         * tools/gpgconf.c (main): Initialize components.
17944         * tools/gpgconf.h (gc_components_init): New prototype.
17945
17946         tests: Add test for gpgconf.
17947         + commit c8cfc62125aceee0ca48aab5c8a9fea1ec1ef652
17948         * tests/openpgp/Makefile.am (XTESTS): Add new test.
17949         * tests/openpgp/defs.scm (percent-encode): New function.
17950         (gpg-conf): Generalize so that we can feed stdin.
17951         (gpg-config): New function.
17952         * tests/openpgp/gpgconf.scm: New file.
17953
17954         common: Fix fallback code.
17955         + commit bfd6a490129ffc7c7ac8776bf5a5da3b1ddf6d42
17956         * common/logging.c (_log_assert): Fix the variant for compilers that
17957         do not support __FUNCTION__.
17958         * common/logging.h (_log_assert): Likewise.
17959
17960 2017-01-09  Werner Koch  <wk@gnupg.org>
17961
17962         dirmngr: Use "pgpkey-hkps" and "pgpkey-hkp" for SRV record lookups.
17963         + commit 0cc975d8a1cd54115938202432e43263b8893ea4
17964         * dirmngr/ks-engine-hkp.c (map_host): Chnage arg NO_SRV to SRVTAG.
17965         (make_host_part): Rewrite.
17966
17967         dirmngr: Do not use a SRV record for HKP if a port was specified.
17968         + commit c2cbe2f87c480c62239dc4c2cbb352acd98cd267
17969         * dirmngr/http.h (parsed_uri_s): Add field EXPLICIT_PORT.
17970         * dirmngr/http.c (do_parse_uri): That it.
17971         * dirmngr/ks-engine-hkp.c (map_host): Add arg NO_SRV.
17972         (make_host_part): Ditto.
17973         (ks_hkp_resolve): Set NO_SRV from EXPLICIT_PORT.
17974         (ks_hkp_search): Ditto.
17975         (ks_hkp_get): Ditto.
17976         (ks_hkp_put): Ditto.
17977
17978 2017-01-08  Werner Koch  <wk@gnupg.org>
17979
17980         dirmngr: Implement experimental SRV record lookup for WKD.
17981         + commit 88dc3af3d4ae1afe1d5e136bc4c38bc4e7d4cd10
17982         * dirmngr/server.c (cmd_wkd_get): Support SRV records.
17983
17984         dirmngr: Improve debug output for TLS.
17985         + commit 714faea4fa7f30d42e9986358214a99aa8fa57b3
17986         * dirmngr/misc.c (dump_cert): Also print SubjectAltNames.
17987
17988         dirmngr: Change internal SRV lookup API.
17989         + commit 16078f3deea5b82ea26e2f01dbd3ef3a5ce25410
17990         * dirmngr/dns-stuff.c (get_dns_srv): Add args SERVICE and PROTO.
17991         * dirmngr/http.c (connect_server): Simplify SRV lookup.
17992         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
17993         * dirmngr/t-dns-stuff.c (main): Adjust for changed get_dns_srv.
17994
17995         dirmngr: Strip root zone suffix from libdns SRV results.
17996         + commit 9fa94aa10778bbd680315e93b23175423e338c40
17997         * dirmngr/dns-stuff.c (getsrv_libdns): Strip trailing dot from the
17998         target.
17999
18000 2017-01-06  Werner Koch  <wk@gnupg.org>
18001
18002         agent,w32: Fix annoying output to DebugView.
18003         + commit 8d774904c8066d8c0f19cfffe2d568979bb8c470
18004         * agent/gpg-agent.c (startup_fd_list): Do not define for W32.
18005         (main) [W32]: Do not call get_all_open_fds.
18006
18007 2017-01-06  NIIBE Yutaka  <gniibe@fsij.org>
18008
18009         scd: Fix for --disable-ccid for scdaemon.
18010         + commit 858e14cd794e2a6125d51e652a754bbe26def997
18011         * scd/apdu.c (apdu_dev_list_finish): Don't call ccid_dev_scan_finish
18012         with no table.
18013         (apdu_open_reader): Only increment when it's zero.
18014
18015         scd: Fix for --disable-ccid-driver.
18016         + commit 62268a2732dddca7a05ca4cf45d0e4338c7dc3c4
18017         * scd/apdu.c [HAVE_LIBUSB] (apdu_dev_list_start): Conditionalize.
18018         [HAVE_LIBUSB] (apdu_dev_list_finish, apdu_open_reader): Likewise.
18019
18020         scd: Support multiple readers by CCID driver.
18021         + commit 8a41e73c31adb86d4a7dca4da695e5ad1347811f
18022         * scd/apdu.c (new_reader_slot): Lock is now in apdu_dev_list_start.
18023         (close_pcsc_reader_direct, close_ccid_reader): RDRNAME is handled...
18024         (apdu_close_reader): ... by this function now.
18025         (apdu_prepare_exit): Likewise.
18026         (open_ccid_reader): Open with dev_list.
18027         (apdu_dev_list_start, apdu_dev_list_finish): New.
18028         (apdu_open_one_reader): New.
18029         (apdu_open_reader): Support multiple readers.
18030         * scd/app.c (select_application): With SCAN, opening all readers
18031         available, and register as new APP.
18032         (app_write_learn_status): app->ref_count == 0 is valid for APP which is
18033         not yet used.
18034         (app_list_start, app_list_finish): New.
18035         * scd/ccid-driver.c (struct ccid_driver_s): Remove RID and BCD_DEVICE.
18036         Add BAI.
18037         (parse_ccid_descriptor): BCD_DEVICE is now on the arguments.
18038         (ccid_dev_scan, ccid_dev_scan_finish): New.
18039         (ccid_get_BAI, ccid_compare_BAI, ccid_open_usb_reader): New.
18040         (ccid_open_reader): Support multiple readers.
18041         (ccid_set_progress_cb, ccid_close_reader): No RID any more.
18042
18043 2017-01-05  Werner Koch  <wk@gnupg.org>
18044
18045         Silence two -Wlogical-op warnings.
18046         + commit 6170eb809033c9d144abf3b1f31f8b936878cdd4
18047         * common/tlv.c (parse_ber_header): Avoid compiler warning about a
18048         duplicate condition.
18049         * tools/gpgtar-create.c (pattern_valid_p): Likewise.
18050
18051 2017-01-05  Justus Winter  <justus@g10code.com>
18052
18053         tests: New test for --{show,override}-session-key.
18054         + commit 168c8c9d79a817c1f08a9ef976dab377f8c4c69e
18055         * tests/openpgp/Makefile.am (XTESTS): Add new test.
18056         * tests/openpgp/decrypt-session-key.scm: New file.
18057
18058         tests: Fix macro.
18059         + commit 4ded213698123a425393b89a800fda2a4ec5229d
18060         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Make
18061         hygienic, use define-macro, do not change to the ephemeral home
18062         directory.
18063         * tests/gpgsm/setup.scm: Change to the ephemeral home directory.
18064         * tests/openpgp/setup.scm: Likewise.
18065
18066 2017-01-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18067
18068         g10: avoid warning when --disable-tofu.
18069         + commit 38671cfe5a2a40bb991619f4cb992c42b5f1e8cd
18070         If configured with --disable-tofu, we see compiler warnings about an
18071         unused variable.  This should remove those warnings.
18072
18073 2017-01-04  Justus Winter  <justus@g10code.com>
18074
18075         tests,w32: Fix locating the components.
18076         + commit 28e149609da44fab600f6a11b385d1c8ca8e7eb9
18077         * tests/openpgp/defs.scm (percent-decode): New function.
18078         (bin-prefix): New variable.
18079         (installed?): Likewise.
18080         (tool-hardcoded): Use the new variables.
18081         (gpg-conf): Use the new function to decode the values.
18082         (gpg-components): Do not use '--build-prefix' when 'installed?'.
18083
18084 2017-01-03  Werner Koch  <wk@gnupg.org>
18085
18086         dirmngr: Make sure Tor mode is also set for DNS on SIGHUP.
18087         + commit 969512401603639e4467ede7d892f1b02582c2c9
18088         * dirmngr/dns-stuff.c (enable_dns_tormode): Always succeed.
18089         (reload_dns_stuff): Reset tor port.
18090         * dirmngr/dirmngr.c (set_tor_mode): Also enable Tor mode for DNS.
18091         (main): Remove warning that Tor mode may not fully work.
18092         * dirmngr/server.c (cmd_dns_cert): Remove explicit Tor for DNS
18093         initialization.
18094         * dirmngr/t-dns-stuff.c (main): Remove option --new-circuit and error
18095         checking for enable_dns_tormode.
18096
18097         dirmngr: New debug message on correctly initialized libdns.
18098         + commit 0004d52ba2f1245c84f95a151342ad99fd72ca3d
18099         * dirmngr/dns-stuff.c (libdns_init): Add debug level diagnostic on
18100         success.
18101
18102 2017-01-02  Justus Winter  <justus@g10code.com>
18103
18104         common: Turn assertions into expressions.
18105         + commit a1e0d4a1e75fc6e6c3392a4e1d1d27005b38d6cc
18106         * common/logging.h (log_assert): Turn this into an expression so it
18107         can be used in expressions.
18108
18109         tests: Fix faked time in the TOFU test.
18110         + commit 6d065198337b5242889723481bfa9ce81aa108bb
18111         * tests/openpgp/tofu.scm (GPG): Fix time delta.
18112
18113 2017-01-02  Werner Koch  <wk@gnupg.org>
18114
18115         g13: Improve printing of debug infos.
18116         + commit 5b6ebfb9244602d9de31d61c7eceb0c45ac8aa49
18117         * g13/g13tuple.c (all_printable): Make it work.
18118
18119         Replace use of variable-length-arrays.
18120         + commit 6b84ecbf312d98ac8cce9fe5facdc815bc742fa1
18121         * common/t-iobuf.c (main): Replace variable-length-array.
18122         * g10/gpgcompose.c (mksubpkt_callback): Ditto.
18123         (encrypted): Ditto.
18124         * g10/t-stutter.c (log_hexdump): Ditto.
18125         (oracle_test): Ditto.
18126         * g10/tofu.c (get_policy): Ditto.  Use "%zu" for size_t.
18127         * scd/app-openpgp.c (ecc_writekey): Replace variable-length-array.
18128         Check for zero length OID_LEN.
18129
18130 2017-01-02  Justus Winter  <justus@g10code.com>
18131
18132         gpgscm: Fail if too many arguments are given.
18133         + commit b0e14bd6ff8401b12b2b39f75aef94d3ad28017f
18134         * tests/gpgscm/scheme.c (opexe_0): Enable check.
18135         * tests/gpgscm/tests.scm (test::report): Remove superfluous argument.
18136
18137         gpgscm: Add 'finally', rework all macros.
18138         + commit b79274a3b7e58f88e9a8c1dc1fb24dd3e983543c
18139         * tests/gpgscm/init.scm (finally): New macro.
18140         * tests/gpgscm/tests.scm (letfd): Rewrite.
18141         (with-working-directory): Likewise.
18142         (with-temporary-working-directory): Likewise.
18143         (lettmp): Likewise.
18144
18145         gpgscm: Use boxed values for source locations.
18146         + commit e8b843508dac96e9d0a3140954dd5a3618669cec
18147         * tests/gpgscm/scheme-private.h (struct port): Use boxed values for
18148         filename and current line.  This allows us to use the same Scheme
18149         object for labeling all expressions in a file.
18150         * tests/gpgscm/scheme.c (file_push): Use boxed type for filename.
18151         (mark): Mark location objects of port objects.
18152         (gc): Mark location objects in the load stack.
18153         (port_clear_location): New function.
18154         (port_reset_current_line): Likewise.
18155         (port_increment_current_line): Likewise.
18156         (file_pop): Adapt accordingly.
18157         (port_rep_from_filename): Likewise.
18158         (port_rep_from_file): Likewise.
18159         (port_close): Likewise.
18160         (skipspace): Likewise.
18161         (token): Likewise.
18162         (_Error_1): Likewise.
18163         (opexe_0): Likewise.
18164         (opexe_5): Likewise.
18165         (scheme_deinit): Likewise.
18166         (scheme_load_file): Likewise.
18167         (scheme_load_named_file): Likewise.
18168
18169 2017-01-02  Werner Koch  <wk@gnupg.org>
18170
18171         dirmngr: Strip root zone suffix from libdns cname results.
18172         + commit b200e636ab20d2aa93d9f71f3789db5a04af0a56
18173         * dirmngr/dns-stuff.c (resolve_name_libdns): Strip trailing dot.
18174         (get_dns_cname_libdns): Ditto.
18175
18176 2016-12-30  NIIBE Yutaka  <gniibe@fsij.org>
18177
18178         scd: Fix select_application.
18179         + commit 337690441fcb19343fe56b139f5649bed7d25c83
18180         * scd/app.c (select_application): Fix the condition for open.
18181
18182         scd: Fix card removal monitor.
18183         + commit f300e12a793d59deb1a369713384eaabfa39b3e6
18184         * scd/app.c (app_reset): Call send_client_notification with REMOVAL.
18185         (scd_update_reader_status_file): Likewise.
18186         * scd/command.c (send_client_notifications): Distinguish removal.
18187
18188 2016-12-29  NIIBE Yutaka  <gniibe@fsij.org>
18189
18190         scd: Improve internal CCID driver.
18191         + commit cdc8d0bd933b958db878861587322bc541b580b3
18192         * scd/ccid-driver.c (scan_or_find_usb_device): Don't scan for
18193         configuration but use active configuration.  Support alt_setting.
18194         (scan_or_find_devices): Support alt_setting.
18195         (ccid_open_reader): Support alt_setting.
18196
18197         scd: Fix a race condition for new_reader_slot.
18198         + commit c48cf7e32ffa02ebdf00265543344c611bef0431
18199         * scd/apdu.c (reader_table_lock, apdu_init): New.
18200         (new_reader_slot): Serialize by reader_table_lock.
18201         * scd/app.c (lock_app, unlock_app, app_new_register): Fix error code
18202         usage.
18203         (initialize_module_command): Call apdu_init.
18204         * scd/scdaemon.c (main): Handle error for initialize_module_command.
18205
18206 2016-12-28  NIIBE Yutaka  <gniibe@fsij.org>
18207
18208         scd: APP centric approach for device management.
18209         + commit 4cc9fc5eb9bd91d943c185d59da4a2b4cb885ee6
18210         * scd/app.c (lock_app): Rename from lock_reader and use internal field
18211         of APP.
18212         (unlock_app): Likewise.
18213         (app_dump_state): Use APP.
18214         (application_notify_card_reset): Remove.
18215         (check_conflict): Change API for APP, instead of SLOT.
18216         (check_application_conflict): Likewise.
18217         (release_application_internal): New.
18218         (app_reset): New.
18219         (app_new_register): New.
18220         (select_application): Change API for APP, instead of SLOT.
18221         (deallocate_app, release_application): Modify for manage link.
18222         (report_change): New.
18223         (scd_update_reader_status_file): Moved from command.c and
18224         use APP list, instead of VREADER.
18225         (initialize_module_command): Moved from command.c.
18226
18227         * scd/command.c (TEST_CARD_REMOVAL): Remove.
18228         (IS_LOCKED): Simplify.
18229         (vreader_table): Remove.
18230         (vreader_slot, update_card_removed): Remove.
18231         (do_reset): Call app_reset.
18232         (get_current_reader): Remove.
18233         (open_card): Add SCAN arg.
18234         (cmd_serialno): No retry, since retry is done in lower layer in apdu.c.
18235         No do_reset, since it is done in lower layer.
18236         Add clearing card_removed flag.
18237         (cmd_disconnect): Call apdu_disconnect.
18238         (send_client_notifications): Modify for APP.
18239         (update_reader_status_file): Remove.
18240
18241         scd: Simplify monitoring card removal.
18242         + commit f9882d8336feea96e3b5e250e9093f8cca01e08b
18243         * scd/apdu.c (struct reader_table_s): Remove any_status, last_status,
18244         status, and change_counter field.
18245         (new_reader_slot, dump_reader_status, ct_activate_card, open_ct_reader)
18246         (connect_pcsc_card, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
18247         (open_ccid_reader, apdu_reset): Follow the change.
18248         (ct_dump_reader_status): Remove.
18249         (apdu_get_status_internal, apdu_get_status): Remove CHANGED arg.
18250         (apdu_connect): Follow the change.
18251         * scd/command.c (struct vreader_s): Remove reset_failed, any, and
18252         changed field.
18253         (cmd_getinfo, update_reader_status_file): Follow the change.
18254
18255 2016-12-27  NIIBE Yutaka  <gniibe@fsij.org>
18256
18257         scd: Improve internal CCID driver.
18258         + commit c7ec9c42246033e14ebad679d11f3b1fbeed23b7
18259         * scd/ccid-driver.c (scan_or_find_usb_device): Fix return value.
18260         Support device with multiple CCID interfaces.  Fix the case with
18261         READERNO.  Support partial string match of "reader-port" like PC/SC
18262         driver.
18263
18264 2016-12-23  NIIBE Yutaka  <gniibe@fsij.org>
18265
18266         dirmngr: Fix for --disable-libdns usage.
18267         + commit d26c51825e2255fe58305cbc1cd74fa43f80d93e
18268         * dirmngr/dns-stuff.c (enable_recursive_resolver, set_dns_nameserver)
18269         (reload_dns_stuff): Conditionalize with USE_LIBDNS.
18270         (get_h_errno_as_gpg_error): Map HOST_NOT_FOUND to GPG_ERR_NO_NAME.
18271
18272 2016-12-22  Neal H. Walfield  <neal@g10code.com>
18273
18274         tools: Show a clearer error message if a server doesn't support WKS.
18275         + commit 1909e994cb87d6c6866a465f0c20a456d4df46cc
18276         * tools/gpg-wks-client.c (command_send): If we fail to lookup the
18277         submission address, print a better error message.  If it is because
18278         the corresponding file doesn't exist, provide the hint that the server
18279         probably doesn't support WKS.
18280
18281 2016-12-22  Werner Koch  <wk@gnupg.org>
18282
18283         wks: Let the client ignore missing policy flags.
18284         + commit e917dfcd973a3ebbf5eb584e819ffa89f932bfef
18285         * tools/gpg-wks-client.c (command_send): Ignore missing policy flags.
18286
18287 2016-12-22  NIIBE Yutaka  <gniibe@fsij.org>
18288
18289         scd: Clean up internal API for APP.
18290         + commit 8431f5a7e88e1f42d75c4a4b61f4aa9b35457204
18291         * scd/app-common.h (app_readcert, app_readkey, app_setattr, app_sign,
18292         app_auth, app_decipher, app_get_challenge, app_check_pin): Add CTRL as
18293         the second argument.
18294         * scd/app.c: Supply CTRL to lock_reader calls.
18295         * scd/command.c (cmd_readcert, cmd_readkey, cmd_pksign, cmd_auth,
18296         cmd_pkdecrypt, cmd_setattr, cmd_random, cmd_checkpin): Follow the
18297         change.
18298
18299 2016-12-21  Justus Winter  <justus@g10code.com>
18300
18301         gpgscm: Guard use of union member.
18302         + commit 6e96cdd41a0e55b672309431062f37c4a4a9f485
18303         * tests/gpgscm/scheme.c (opexe_5): Check that we have a file port
18304         before accessing filename.  Fixes a crash on 32-bit architectures.
18305
18306 2016-12-20  Werner Koch  <wk@gnupg.org>
18307
18308         tests: Avoid skipping exectool tests.
18309         + commit 6204f8104fea42d706a68e77e2dc0bca4704bddc
18310         * common/t-exectool.c (test_executing_true): Try also /usr/bin/true.
18311         (test_executing_false): Try also /usr/bin/false.
18312
18313 2016-12-20  Justus Winter  <justus@g10code.com>
18314
18315         tests: Add test suite for gpgsm.
18316         + commit 36c14139285982def6ad942d4b2d8bef7ed4ea76
18317         * configure.ac (AC_CONFIG_FILES): Add new file.
18318         * tests/Makefile.am (SUBDIRS): Add new directory.
18319         * tests/gpgsm/32100C27173EF6E9C4E9A25D3D69F86D37A4F939: New file.
18320         * tests/gpgsm/Makefile.am: Likewise.
18321         * tests/gpgsm/cert_dfn_pca01.der: Likewise.
18322         * tests/gpgsm/cert_dfn_pca15.der: Likewise.
18323         * tests/gpgsm/cert_g10code_test1.der: Likewise.
18324         * tests/gpgsm/decrypt.scm: Likewise.
18325         * tests/gpgsm/encrypt.scm: Likewise.
18326         * tests/gpgsm/export.scm: Likewise.
18327         * tests/gpgsm/gpgsm-defs.scm: Likewise.
18328         * tests/gpgsm/import.scm: Likewise.
18329         * tests/gpgsm/plain-1.cms.asc: Likewise.
18330         * tests/gpgsm/plain-2.cms.asc: Likewise.
18331         * tests/gpgsm/plain-3.cms.asc: Likewise.
18332         * tests/gpgsm/plain-large.cms.asc: Likewise.
18333         * tests/gpgsm/run-tests.scm: Likewise.
18334         * tests/gpgsm/setup.scm: Likewise.
18335         * tests/gpgsm/shell.scm: Likewise.
18336         * tests/gpgsm/sign.scm: Likewise.
18337         * tests/gpgsm/verify.scm: Likewise.
18338
18339         tests: Add macro managing ephemeral home directories.
18340         + commit c067a012c764218b94ce8de2914615a895a75f3e
18341         * tests/openpgp/defs.scm (with-ephemeral-home-directory): New macro.
18342         * tests/openpgp/setup.scm: Use the new macro.
18343
18344         tests: Move argument parser.
18345         + commit a30c0a6972cabde3858108e9020e900696094843
18346         * tests/gpgme/gpgme-defs.scm (flag): Move...
18347         * tests/gpgscm/tests.scm: ... over here.
18348
18349         tests: Add missing encrypted sample, cleanup samples handling.
18350         + commit e2ed3c1597daf3188ddce049cc3c50113d56f1b9
18351         * tests/openpgp/Makefile.am (TEST_FILES): Add new file.
18352         * tests/openpgp/defs.scm (plain-files): Add 'plain-large'.
18353         (all-files): New variable.
18354         (create-sample-files): New function.
18355         (create-legacy-gpghome): Use new function.
18356         * tests/openpgp/plain-large.asc: New file.
18357
18358 2016-12-20  Werner Koch  <wk@gnupg.org>
18359
18360         Release 2.1.17.
18361         + commit ade32464a25fdb35cc0f39e46d303ceba68ea8f6
18362
18363
18364         sm: Remove wrong example from gpgsm --help.
18365         + commit 13465e708bb67e816e4fb3a37c117ad91dc6383f
18366         * sm/gpgsm.c (opts): Remove group 303.
18367
18368         dirmngr: New option --resolver-timeout.
18369         + commit 81c012787fabf734d9c952c6f18ecac21929d4d8
18370         * dirmngr/dns-stuff.c (DEFAULT_TIMEOUT): New.
18371         (opt_timeout): New var.
18372         (set_dns_timeout): New.
18373         (libdns_res_open): Set the default timeout.
18374         (libdns_res_wait): Use configurable timeout.
18375         (resolve_name_libdns): Ditto.
18376
18377         * dirmngr/dirmngr.c (oResolverTimeout): New const.
18378         (opts): New option --resolver-timeout.
18379         (parse_rereadable_options): Set that option.
18380         (main) <aGPGConfList>: Add --nameserver and --resolver-timeout.
18381         * tools/gpgconf-comp.c (gc_options_dirmngr): Add --resolver-timeout
18382         and --nameserver.
18383
18384         * dirmngr/http.c (connect_server): Fix yesterday introduced bug in
18385         error diagnostic.
18386
18387 2016-12-19  Werner Koch  <wk@gnupg.org>
18388
18389         dirmngr: Fix problems with the getsrv function.
18390         + commit af8b68fae39b1378c769e0de6ba6437ea1aac7e3
18391         * dirmngr/dns-stuff.c (opt_debug, opt_verbose): New vars.
18392         (set_dns_verbose): New func.
18393         (libdns_switch_port_p): Add debug output.
18394         (resolve_dns_name): Ditto.
18395         (get_dns_cert): Ditto.
18396         (get_dns_cname): Ditto.
18397         (getsrv_libdns, getsrv_standard): Change SRVCOUNT to an unsigend int.
18398         (getsrv): Rename to ...
18399         ((get_dns_srv): this.  Add arg R_COUNT and return an error.  Add debug
18400         output.
18401         * dirmngr/http.c: Adjust for chnaged getsrv().
18402         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
18403         * dirmngr/t-dns-stuff.c (main): Ditto.  Call set_dns_verbose.
18404         * dirmngr/dirmngr.c (parse_rereadable_options): Call set_dns_verbose.
18405
18406         build: Add target to sign the windows installer.
18407         + commit 284ec54495dddc9eb0232e959cf994234097578a
18408         * build-aux/speedo.mk (w32-sign-installer): New.
18409         (AUTHENTICODE_KEY): New.
18410         (installer-from-source): Use cp instead of mv.  Factor code out to ...
18411         (MKSWDB_commands): new macro.
18412         (sign-installer): New.
18413
18414 2016-12-19  Justus Winter  <justus@g10code.com>
18415
18416         tests: Use the common test framework for the migration tests.
18417         + commit 65a0d6a24e6299682793f213a9d2bae17c5b12d9
18418         * tests/migrations/Makefile.am (reqired_pgms): Add 'gpgscm'.
18419         (TESTS_ENVIRONMENT): Populate.
18420         (TESTS): Rename to 'XTESTS'.
18421         (xcheck): New target.
18422         (EXTRA_DIST): Add new files.
18423         (CLEANFILES): Remove log files.
18424         * tests/migrations/common.scm: Honor 'verbose', fix paths.
18425         * tests/migrations/run-tests.scm: New file.
18426         * tests/migrations/setup.scm: Likewise.
18427
18428         tests: Use sequential test runner if only one test is given.
18429         + commit 0bf16d702665a269ce5ef724c927fbbd8f7f1ce9
18430         * tests/openpgp/run-tests.scm: Use sequential test runner if only one
18431         test is given.
18432
18433 2016-12-19  Werner Koch  <wk@gnupg.org>
18434
18435         dirmngr,w32: Hack around a select problem.
18436         + commit d51499fdc522a696f23c6776c3ab248742f4e06a
18437         * dirmngr/dns.c (FD_SETSIZE): Bump up to 1024.
18438         (dns_poll): Return an error instead of hitting an assertion failure.
18439
18440 2016-12-19  Neal H. Walfield  <neal@g10code.com>
18441
18442         test: Extend TOFU tests to also check the days with signatures.
18443         + commit aec89a7297bae30f79a63fdc830530e82bab6170
18444         * tests/openpgp/tofu.scm (GPGTIME): Define the "standard" base time.
18445         (faketime): New function.
18446         (days->seconds): Likewise.
18447         (GPG): Use faketime.
18448         (check-counts): Also check the number of expected days with signatures
18449         and encryptions.  Update callers.  Extend tests.
18450
18451 2016-12-19  Justus Winter  <justus@g10code.com>
18452
18453         tests: New test for --delete-[secret-]keys.
18454         + commit a1afc450e182af02ad5e6f6ba79e9dc4332ca2bc
18455         * tests/openpgp/Makefile.am (XTESTS): Add new test.
18456         * tests/openpgp/defs.scm (keys): New variable.
18457         (have-public-key?): New function.
18458         (have-secret-key?): Likewise.
18459         (have-secret-key-file?): Likewise.
18460         * tests/openpgp/delete-keys.scm: New file.
18461         * tests/openpgp/quick-key-manipulation.scm: Move the accessors to
18462         'defs.scm'.
18463
18464         gpgscm: Change associativity of ::.
18465         + commit a45dc0849da0d944ec8c759bc8e3e733b1eb0079
18466         * tests/gpgscm/scheme.c (mk_atom): Change associativity of the ::
18467         infix-operator.  This makes it possible to naturally express accessing
18468         nested structures (e.g. a::b::c).
18469
18470         gpgscm: Display location when assertions fail.
18471         + commit 3949cbd1128585c9b810713aeffaa1455fb5aed9
18472         * tests/gpgscm/lib.scm (assert): Use location information if
18473         available.
18474
18475         gpgscm: Make exception handling more robust.
18476         + commit df00745d6eed7034b218a0c482a46d975425798a
18477         * tests/gpgscm/init.scm (throw'): Check that args is a list.
18478
18479 2016-12-19  Andre Heinecke  <aheinecke@intevation.de>
18480
18481         speedo,w32: Use nsExec::ExecToLog to avoid popups.
18482         + commit 026bbf0d5ee4510967e5f1dd3db2dee4687b0612
18483         * build-aux/speedo/w32/inst.nsi: Use ExecToLog instead of
18484         ExecWait.
18485
18486 2016-12-19  Werner Koch  <wk@gnupg.org>
18487
18488         Remove unused debug flags and add "dns" and "network".
18489         + commit e384405b6e251629fb36bcbba4f5f9ac15a39d10
18490         * g10/options.h (DBG_CARD_IO_VALUE, DBG_CARD_IO): Remove.
18491         * g10/gpg.c (debug_flags): Remove "cardio".
18492         * agent/agent.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove.
18493         * agent/gpg-agent.c (debug_flags): Remove "command".
18494         * scd/scdaemon.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove.
18495         * scd/scdaemon.c (debug_flags): Remove "command".
18496         * dirmngr/dirmngr.h (DBG_DNS_VALUE, DBG_DNS): New.
18497         (DBG_NETWORK_VALUE, DNG_NETWORK): New.
18498         * dirmngr/dirmngr.c (debug_flags): Add "dns" and "network".
18499
18500 2016-12-17  Werner Koch  <wk@gnupg.org>
18501
18502         dirmngr: Fix setup of libdns for W32.
18503         + commit e77b924fec1082faae48cdd2ff8474874a22bdf7
18504         * configure.ac (DNSLIB) {W32]: Add -liphlpapi.
18505         * dirmngr/dns-stuff.c [W32]: Include iphlpapi.h and define
18506         WIN32_LEAN_AND_MEAN.
18507         (libdns_init) [W32]: Use GetNetworkParams to get the nameserver.
18508         * dirmngr/t-dns-stuff.c (init_sockets): New.
18509         (main): Call it.
18510
18511 2016-12-16  Werner Koch  <wk@gnupg.org>
18512
18513         dirmngr: Auto-switch from Tor port to Torbrowser port.
18514         + commit 024dbd7162fc1a7694176ebad3c21ee3ea67c024
18515         * dirmngr/dns-stuff.c (libdns_tor_port): New var.
18516         (set_dns_nameserver): Clear that var.
18517         (libdns_init): Init var to the default port.
18518         (libdns_switch_port_p): New func.
18519         (resolve_dns_name): Use function to switch the port
18520         (get_dns_cert): Ditto.
18521         (getsrv): Ditto.
18522         (get_dns_cname): Ditto.
18523
18524         dirmngr: Use one context for all libdns queries.
18525         + commit c4e8a3194d6b92f596a6483e486c645de7d2ddd1
18526         * dirmngr/dns-stuff.c (libdns_reinit_pending): New var.
18527         (enable_recursive_resolver): Set var.
18528         (set_dns_nameserver): Ditto.
18529         (libdns_init): Avoid double initialization.
18530         (libdns_deinit): New.
18531         (reload_dns_stuff): New.
18532         (libdns_res_open): Act upon LIBDNS_REINIT_PENDING.
18533         * dirmngr/t-dns-stuff.c (main): Call reload_dns_stuff to release
18534         memory.
18535         * dirmngr/dirmngr.c (cleanup): Ditto.
18536         (dirmngr_sighup_action): Call reload_dns_stuff to set
18537         LIBDNS_REINIT_PENDING.
18538
18539         dirmngr: Pass Tor credentials to libdns.
18540         + commit ddb48086833f8b86f0f0d69b21a23f245090ea7a
18541         * dirmngr/dns-stuff.c (tor_credentials): Replace by ...
18542         (tor_socks_user, tor_socks_password): new vars.
18543         (enable_dns_tormode): Set these new vars.
18544         (libdns_res_open): Tell libdns the socks credentials.
18545
18546         dirmngr: Factor common libdns code out.
18547         + commit 59d3c3e4baffff52548fb5d1766ebf02dd8e1bec
18548         * dirmngr/dns-stuff.c (libdns_res_open): New.  Replace all libdns_init
18549         and dns-res_open by a call to this func.
18550         (libdns_res_submit): New wrapper.  Replace all dns_res_sumbit calls.
18551         (libdns_res_wait): New function.
18552         (resolve_name_libdns): Replace loop by libdns_res_wait.
18553         (get_dns_cert_libdns): Ditto.
18554         (getsrv_libdns): Ditto.
18555
18556         gpg,sm: A few more option for --gpgconf-list.
18557         + commit 48671f295ff233765689b6a73021f83ab845a28f
18558         * g10/gpg.c (gpgconf_list): Add --compliance and
18559         --default-new-key-algo.
18560         (parse_compliance_option):
18561         * sm/gpgsm.c (main) <gpgconf-list>: Add --enable-crl-checks.
18562
18563         gpgconf: New command --apply-profile.
18564         + commit 76cd64a5baf6057b199c01f7999b327f1f4a87bc
18565         * tools/gpgconf.c (aApplyProfile): New.
18566         (opts): New command --apply-profile.
18567         (main): Implement that command.
18568         * tools/gpgconf-comp.c (option_check_validity): Add arg VERBATIM.
18569         (change_options_program): Ditto.
18570         (change_one_value): Ditto.
18571         (gc_component_change_options): Ditto.
18572         (gc_apply_profile): New.
18573
18574         gpgconf: Fix --apply-defaults.
18575         + commit 6ca3c28da46873416822bf6ab7893db6c56a49d6
18576         * tools/gpgconf-comp.c: Skip pinentry also in process_all mode.
18577
18578 2016-12-16  Justus Winter  <justus@g10code.com>
18579
18580         doc: Mention extra information in pinentry status lines.
18581         + commit 12a5265afa7f87ad92fb571e0882e57b07a3c267
18582         * doc/DETAILS: Mention that 'PINENTRY_LAUNCHED may carry extra
18583         information.
18584
18585         sm: Fix agent communication.
18586         + commit 3c7d6a1769ed6cc90d86247a814a0dce341512a3
18587         * sm/call-agent.c (gpgsm_agent_pksign): Fix passing the control handle
18588         to the callback.
18589         (gpgsm_scd_pksign): Likewise.
18590         (gpgsm_agent_reaedkey): Likewise.
18591
18592 2016-12-16  Neal H. Walfield  <neal@g10code.com>
18593
18594         doc: Fix manual.
18595         + commit a165fa09be4bfbeb97ebe25d551a9045255e5028
18596         * doc/gpg.texi: Remove comment about options being parsed in-order.
18597         They aren't.
18598
18599         g10: Use total days, not total messages to compute TOFU validity.
18600         + commit 4a2c210b75d4266e289712e73a42c286aabb07f0
18601         * g10/tofu.c (write_stats_status): Use the number of days with
18602         signatures / encryptions to compute the validity, not the total number
18603         of signatures / encryptions.
18604         (BASIC_TRUST_THRESHOLD): Adjust given the new semantics.
18605         (FULL_TRUST_THRESHOLD): Likewise.
18606
18607         g10: Extend TOFU_STATS to emit <sign-days> and <encyrption-days>
18608         + commit 94f6b9010d2e80a75ccbb21426faf0b30195f1ab
18609         * doc/DETAILS: Add SIGN-DAYS and ENCRYPT-DAYS to the TOFU_STATS status
18610         line.
18611         * g10/tofu.c (write_stats_status): Take additional parameters
18612         signature_days and encryption_days.  Update callers.  Include them in
18613         the tfs record and TOFU status lines.
18614         (show_statistics): Compute the number of days on which we saw a
18615         message signed by FINGERPRINT, and the number of days on which we
18616         encrypted a message to it.
18617
18618 2016-12-16  Justus Winter  <justus@g10code.com>
18619
18620         doc: Improve section on unattended key generation.
18621         + commit ca02a8b78fca8815388a859962584d75169ae3ee
18622         * doc/gpg.texi: Improve the subsection on unattended key generation by
18623         suggesting the quick key manipulation interface as an alternative, and
18624         by suggesting alternatives to '%pubring' and '%secring'.  Simplify
18625         examples accordingly.
18626
18627         doc: Add documentation for programmatic use of GnuPG.
18628         + commit 116a78eb869c4c589228bd0d6deff7c7a9f92dfb
18629         * doc/gpg.texi: New subsections on programmatic use of GnuPG,
18630         ephemeral home directories, and the quick key manipulation interface.
18631
18632 2016-12-16  Neal H. Walfield  <neal@g10code.com>
18633
18634         g10: On a TOFU conflict, write the conflicting keys to the status fd.
18635         + commit fea9da4a8afab6f3a49cdbbcc4a7a21f27a6d3e8
18636         * g10/tofu.c (ask_about_binding): Emit all of the conflicting keys and
18637         their statistics on the status fd.
18638         (get_trust): Likewise, if we don't call ask_about_binding.
18639         (show_statistics): Have the caller pass the policy as returned by
18640         get_policy.  Add argument only_status_fd and don't emit any output on
18641         stdout if it is set.  Update callers.
18642
18643         g10: Add missing space.
18644         + commit 6caa2d0ba2bfc0ae93878738b0169483f6b6b462
18645         * g10/tofu.c (tofu_register_encryption): Add missing space.
18646
18647 2016-12-15  Justus Winter  <justus@g10code.com>
18648
18649         g10: Avoid translating simple error messages.
18650         + commit 6b16b02109f4bb5b934e456667ff4c0ba7bc85fd
18651         * g10/gpg.c (main): Avoid translating arguments to 'wrong_args'.
18652
18653         g10: Rework the --quick-* interface.
18654         + commit 41ad04d403de05abe54280d2a84aa51a603194e4
18655         * g10/gpg.c (opts): Rename options.
18656         (main): Update errors.
18657         * doc/gpg.texi: Update accordingly.
18658
18659         g10: Rename 'card-edit' to 'edit-card'.
18660         + commit 6e4396723e9e5865015ebf7033628fa3919cf7d1
18661         * g10/gpg.c (opts): Rename option.
18662         * g10/call-agent.c (agent_scd_learn): Update comment.
18663         * doc/gpg.texi: Update accordingly.
18664
18665         g10: Spell out --desig-revoke.
18666         + commit 3c691097ca144e9a1d4c9185636c59a848bec85c
18667         * g10/gpg.c (opts): Rename option.
18668         * doc/gpg.texi: Update accordingly.
18669
18670         g10: Shorten unreasonably long option.
18671         + commit c252627c6fd93bc305c5a5a2f013c3de2d45c6b0
18672         * g10/gpg.c (opts): Rename 'generate-revocation-certificate' to
18673         'generate-revocation'.
18674         * doc/gpg.texi: Update accordingly.
18675         * po: Update translations.
18676
18677         doc: Add aliases of all changed options.
18678         + commit bc6b76ef26f31c54ae1c29c761b8ecc437fcf565
18679         * doc/gpg.texi: Add the old version of every option that was updated
18680         with the last change set.
18681         * doc/gpgsm.texi: Likewise.
18682
18683 2016-12-15  Werner Koch  <wk@gnupg.org>
18684
18685         dirmngr: First patch to re-enable Tor support.
18686         + commit 2d1760ffe2ff46b77bd0f38db8b781d9564ae999
18687         * dirmngr/dns-stuff.c (SOCKS_PORT, TOR_PORT, TOR_PORT2): New
18688         constants.
18689         (libdns_init): Start adding tor support.
18690         (resolve_name_libdns): Pass socks hosts to dns_res_open.
18691         (get_dns_cert_libdns): Ditto.
18692         (getsrv_libdns): Ditto.
18693         (get_dns_cname_libdns): Ditto.
18694
18695 2016-12-15  Justus Winter  <justus@g10code.com>
18696
18697         build: Fix distcheck.
18698         + commit 0e2055c7d30d987a7a74923a7080b80cce470601
18699         * tests/gpgme/Makefile.am (CLEANFILES): New variable, clean test logs.
18700
18701 2016-12-14  Justus Winter  <justus@g10code.com>
18702
18703         tests: Reuse GPGME's tests.
18704         + commit 948cca9c99e701a1668bb5fd6e25f07e35381b4d
18705         * configure.ac (AC_CONFIG_FILES): Add new Makefile.
18706         * tests/Makefile.am (SUBDIRS): Add new directory.
18707         * tests/gpgme/Makefile.am: New file.
18708         * tests/gpgme/gpgme-defs.scm: Likewise.
18709         * tests/gpgme/run-tests.scm: Likewise.
18710         * tests/gpgme/setup.scm: Likewise.
18711         * tests/gpgme/wrap.scm: Likewise.
18712
18713         common: Support locating components in the build tree.
18714         + commit ca1e9749bfb069d90aa44efbf6f3d611b6104c1b
18715         * common/homedir.c (gnupg_build_directory): New variable.
18716         (gnupg_module_name_called): Likewise.
18717         (gnupg_set_builddir): New function.
18718         (gnupg_set_builddir_from_env): Likewise.
18719         (gnupg_module_name): Support locating components in the build tree.
18720         * common/util.h (gnupg_set_builddir): New prototype.
18721         * tests/openpgp/defs.scm (tools): Drop 'gpg and 'gpg-agent.
18722         (tool): Rename to 'tool-hardcoded.
18723         (gpg-conf): New function, with accessors for the results.
18724         (gpg-components): New variable.
18725         (tool): New function.
18726         * tools/gpgconf.c (enum cmd_and_opt_values): New key.
18727         (opts): New option '--build-prefix'.
18728         (main): Handle new option.
18729
18730         tests: Rework check for trust models.
18731         + commit 55dc81125abc43cd3cc8db951fc3b8a81767942d
18732         * tests/openpgp/defs.scm (gpg-has-option?): New function.
18733         (have-opt-always-trust): Use a simpler test for that option.  This way
18734         that is less distracting when we run the tests with verbose=3.
18735
18736 2016-12-14  Werner Koch  <wk@gnupg.org>
18737
18738         dirmngr: New configure option --disable-libdns.
18739         + commit d34a2bb410c7c770d26430d69ff77bd83fc407f1
18740         * configure.ac: Add option --disable-libdns
18741         (USE_LIBDNS): New ac_subst and am_conditional.
18742         (USE_C99_CFLAGS): Set only if libdns is used.
18743         * dirmngr/Makefile.am (dirmngr_SOURCES): Move dns.c and dns.h to ...
18744         (dirmngr_SOURCES) [USE_LIBDNS0: here.
18745         (t_common_src): Ditto.
18746         * dirmngr/dirmngr.c (oRecursiveResolver): New constant.
18747         (opts): New option "--recursive-resolver".
18748         (parse_rereadable_options): Set option.
18749         * dirmngr/t-dns-stuff.c (main): Add option --recursive-resolver.
18750         * dirmngr/server.c (cmd_getinfo): Depend output of "dnsinfo" on the
18751         new variables.
18752         * dirmngr/dns-stuff.c: Include dns.h only if USE_DNSLIB is defined.
18753         Also build and call dnslib functions only if USE_DNSLIB is defined.
18754         (recursive_resolver): New var.
18755         (enable_recursive_resolver): New func.
18756         (recursive_resolver_p): New func.
18757
18758         dirmngr: Implement CERT record lookup via libdns.
18759         + commit 3c2a7918eac024b5e1258ea9b272b4e8a1f1af43
18760         * dirmngr/dns-stuff.c (get_dns_cert_libdns): New.
18761         (get_dns_cert_standard): Fix URL malloc checking.
18762
18763         dirmngr: Implement CNAME and SRV record lookup via libdns.
18764         + commit 4c13e4e3debe0e55e86ae29c095f2d86eb0a6f11
18765         * dirmngr/dns-stuff.c (dns_free): New macro.
18766         (libdns): Move var to the top.
18767         (libdns_error_to_gpg_error): Map error codes to the new gpg-error
18768         codes.
18769         (resolve_name_libdns): Restructure code.
18770         (getsrv_libdns): New.
18771         (get_dns_cname_libdns): New.
18772
18773         dirmngr: Fix bugs in the standard resolver code.
18774         + commit 4a030f682ef48542ed324b28207f2c2b4847dbef
18775         * dirmngr/dns-stuff.c: Include dirmngr-err.h to set the correct error
18776         source.
18777         (get_h_errno_as_gpg_error): New.
18778         (get_dns_cert_libdns): Fix error code.
18779         (getsrv_libdns): Add arg R_COUNT and return an error code.
18780         (getsrv_standard): Ditto.  Fix handling of res_query errors and
18781         provide the correct size for the return buffer.
18782         (getsrv): Adjust for changed worker functions.
18783         (get_dns_cname_standard): Fix handling of res_query errors and provide
18784         the correct size for the return buffer.
18785
18786         dirmngr: Require a c99 compiler.
18787         + commit 392966aed9b2a5e1456c671e5d13b561a27e4bb2
18788         * configure.ac (USE_C99_CFLAGS): New ac_subst.  Set to -std=gnu99 for
18789         gcc.
18790         * dirmngr/Makefile.am (AM_CFLAGS): Add USE_C99_CFLAGS.
18791         (t_http_CFLAGS): Ditto.
18792         (t_ldap_parse_uri_CFLAGS): Ditto.
18793         (t_dns_stuff_CFLAGS): Ditto.
18794
18795         doc: Add license notes for libdns.
18796         + commit d84f5a88233c073a82fd47728574b001343784ee
18797         * COPYING.other: New.
18798         * Makefile.am (EXTRA_DIST): Add it.
18799         * AUTHORS: Add info on libdns.
18800         * build-aux/speedo/w32/pkg-copyright.txt: Add license terms.
18801
18802         common: Add replacements for error codes from gpg-error 1.26.
18803         + commit aae68a3ccd3d9870162b3ffd49eae08d5bf1b1e1
18804
18805
18806 2016-12-14  Justus Winter  <justus@g10code.com>
18807
18808         dirmngr: New libdns snapshot.
18809         + commit f8ab2c4c70ad15c4b2e45492606fb94ddaccdac7
18810
18811
18812         dirmngr: Add basic libdns support.
18813         + commit f6acd0426453d3a18536ca69d63baa0d971082ef
18814         * dirmngr/dns.c: New file.
18815         * dirmngr/dns.h: New file.
18816         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new files.
18817         * dirmngr/dns-stuff.c: Include dns.h.xxx use libdns
18818         (libdns): New global var for the libdns state.
18819         (libdns_error_to_gpg_error): New.
18820         (libdns_init): New.
18821         (resolve_name_libdns): New.
18822         (get_dns_cert_libdns): New stub.
18823         (getsrv_libdns): New stub.
18824         (get_dns_cname_libdns): New stub.
18825
18826         dirmngr,build: Remove support for ADNS.
18827         + commit 2e734a3ce159de8fb60df2bd5d454f98ca710717
18828         * autogen.rc: Remove '--with-adns' argument.
18829         * configure.ac: Remove check for ADNS.
18830         * dirmngr/dns-stuff.c: Remove all code that uses ADNS.
18831         * dirmngr/server.c (cmd_getinfo): Update status line.
18832         * doc/dirmngr.texi: Do not mention ADNS.
18833
18834 2016-12-14  NIIBE Yutaka  <gniibe@fsij.org>
18835
18836         dirmngr: Improve ntbtls support.
18837         + commit 57aa42ce9b28bc17ac24491d595766fbf80762af
18838         * dirmngr/http.c [HTTP_USE_NTBTLS] (close_tls_session): Release.
18839         (send_request): Call ntbtls_set_transport.
18840         (cookie_read, cookie_write): Implement.
18841         (cookie_close): Add initial implementation for ntbtls.
18842
18843 2016-12-13  Justus Winter  <justus@g10code.com>
18844
18845         g10,sm: Spell out --passwd.
18846         + commit c1c35fb887061de05661f3411eda97546e1a52d7
18847         * g10/gpg.c (opts): Spell out option.
18848         * sm/gpgsm.c (opts): Likewise.
18849         * doc/gpg.texi: Update accordingly.
18850         * doc/gpgsm.texi: Likewise.
18851
18852         g10: Spell out --gen-revoke.
18853         + commit ec1bd3ae685e95563e38077ab3c1655fd55dea07
18854         * g10/gpg.c (opts): Spell out option.
18855         * doc/gpg.texi: Update accordingly.
18856         * po: Update translations.
18857
18858         g10: Spell out --full-gen-key.
18859         + commit 09163a6390bd9713f3a7946de739765b30ef6f64
18860         * g10/gpg.c (opts): Spell out option.
18861         (main): Likewise.
18862         * g10/keygen.c (generate_keypair): Likewise.
18863         * doc/gpg.texi: Update accordingly.
18864
18865         g10,sm: Spell out --gen-key.
18866         + commit 892c827e72b1396e3b58e2f8869cc48328a2b59c
18867         * g10/gpg.c (opts): Spell out option.
18868         * sm/gpgsm.c (opts): Likewise.
18869         * doc/gpg.texi: Update accordingly.
18870
18871         g10,sm: Spell out --check-sigs.
18872         + commit 9147737f1c6894f38b855f3cf38cd33122a1ae2a
18873         * g10/gpg.c (opts): Spell out option.
18874         * sm/gpgsm.c (opts): Likewise.
18875         * doc/gpg.texi: Update accordingly.
18876
18877         g10,sm: Spell out --list-sigs.
18878         + commit a6d6e4afe488bc05ee730e85da6a9505c6cd245a
18879         * g10/gpg.c (opts): Spell out option.
18880         * sm/gpgsm.c (opts): Likewise.
18881         * doc/gpg.texi: Update accordingly.
18882
18883         g10: Hyphenate --clearsign.
18884         + commit 04754ce3a704b1e6d38cb9a28dacf2821dc3f15f
18885         * g10/gpg.c (opts): Hyphenate option.
18886         * doc/gpg.texi: Update accordingly.
18887         * po: Update translations.
18888         * tests/openpgp: Update tests.
18889
18890         g10: Spell out --recv-keys.
18891         + commit ca598152345b40f3a236227dfc63ae04ddf777d7
18892         * g10/gpg.c (opts): Spell out option.
18893         * doc/gpg.texi: Update accordingly.
18894
18895         g10: Create expiring keys in quick key generation mode.
18896         + commit dd3dde07a9a46130ac01d849f8edf0566e44f11f
18897         * doc/gpg.texi: Document that fact.
18898         * g10/keygen.c (quick_generate_keypair): Use a default value.
18899         * tests/openpgp/quick-key-manipulation.scm: Test that fact.
18900
18901         gpgscm: Print failed and skipped tests.
18902         + commit 429891a704057437517cb0b45d11392b40fa1ee8
18903         * tests/gpgscm/tests.scm (test-pool::report): Print failed and skipped
18904         tests at the end.
18905
18906         gpgscm: Generalize the test runner.
18907         + commit d43dabf4607d3bcfc217eb9aea34d093f5aa698f
18908         * tests/gpgscm/tests.scm (test::scm) Add explicit name argument.
18909         (test::binary): Likewise.  Also, add missing unquote.
18910         * tests/openpgp/run-tests.scm: Adapt accordingly.
18911
18912         gpgscm: Move the test runner to the Scheme library.
18913         + commit 1a176b92a8aad42056ed2c4e1f49a5feb40770cf
18914         * tests/openpgp/run-tests.scm: Move most of the code...
18915         * tests/gpgscm/tests.scm: ... here.
18916
18917         tests: Refactor test runner.
18918         + commit fe36e63763c9c595bb057ac50160d2aff7c7a63f
18919         * tests/openpgp/run-tests.scm (locate-test): New function.
18920         (test): Factor-out the code starting the child process.
18921         (test::binary): New function.
18922
18923         gpgscm: Improve library functions.
18924         + commit e3876f16eb237bdeb9f79aca2e7db5e9e2d86686
18925         * tests/gpgscm/tests.scm (absolute-path?): New function.
18926         (canonical-path): Use the new function.
18927         * tests/gpgscm/lib.scm (string-split-pln): New function.
18928         (string-indexp, string-splitp): Likewise.
18929         (string-splitn): Express using the above function.
18930         (string-ltrim, string-rtrim): Fix corner case.
18931         (list->string-reversed): New function.
18932         (read-line): Fix performance.
18933
18934 2016-12-12  Werner Koch  <wk@gnupg.org>
18935
18936         gpg: Fix memory leak in ecc key generation.
18937         + commit 98433c70431dfbde99b0e89416856d1eef9ebc88
18938         * g10/keygen.c (ecckey_from_sexp): Release curve.
18939
18940         gpg: Do not use a fixed string for --gpgconf-list:default_pubkey_algo.
18941         + commit f1304ee9b21e6ceac6c13d04ceddd23fadb5c7f1
18942         * g10/keygen.c (get_default_pubkey_algo): New.
18943         (parse_key_parameter_string): Use it.
18944         * g10/gpg.c (gpgconf_list): Take value from new function.
18945
18946         gpg: Fix algo string parsing of --quick-addkey.
18947         + commit 522e6f798db9f3f3a9e0123fdc389a86ac69dedf
18948         * g10/keygen.c (parse_key_parameter_string): Fix handling of PART==1.
18949         (parse_key_parameter_part): Use default key size if only "rsa", "dsa",
18950         or "elg" is given.
18951
18952 2016-12-09  Justus Winter  <justus@g10code.com>
18953
18954         g10: Create keys that expire in simple key generation mode.
18955         + commit d568a1561642ed9b7b7b6282b86c56786d10a956
18956         * g10/keygen.c (default_expiration_interval): New variable.
18957         (generate_keypair): Use the new default.
18958
18959         tests: Add a test for '--quick-addkey'.
18960         + commit b778d8deedf344c8116362633925b8153c7f1bf1
18961         * tests/openpgp/quick-key-manipulation.scm: Test '--quick-addkey'.
18962
18963         tests: New test using all available compression algorithms.
18964         + commit 59f1562c25119a4fe27411e6350f2149d6147148
18965         * tests/openpgp/Makefile.am (XTESTS): Add new test.
18966         * tests/openpgp/compression.scm: New file.
18967         * tests/openpgp/defs.scm (all-compression-algos): New variable.
18968
18969         g10: List compression algorithms using human-readable names.
18970         + commit c8100fc0faadf8ba35e4df32b4760cc975e3a83d
18971         * g10/gpg.c (list_config): List all enabled compression algorithms
18972         under the key 'compressname'.
18973
18974         g10: Fix memory leak.
18975         + commit 3de9bad359e28ced4a2539e411d222ffd82a4a62
18976         * g10/sign.c (do_sign): Release old signature data.
18977
18978 2016-12-08  Werner Koch  <wk@gnupg.org>
18979
18980         common: Skip the Byte Order Mark in conf files.
18981         + commit 5c7d58222834793629a30248e72b6ea96e832dc4
18982         * common/argparse.c (optfile_parse): Detect and skip the UTF-8 BOM.
18983
18984         Fix 2 compiler warnings.
18985         + commit cb4c7abb774e2d95806d8b0ec6ea5cd130c1b5b8
18986         * dirmngr/loadswdb.c: Set ERR on malloc failure.
18987         * g10/passphrase.c (passphrase_to_dek): Initialize all fields of
18988         HELP_S2K.
18989
18990         wks: New option --status-fd for gpg-wks-client.
18991         + commit 4a04277ad112e0966296133795f93cf6a3daa48e
18992         * tools/wks-util.c: Include status.h.
18993         (statusfp): New global var.
18994         (wks_set_status_fd): New func.
18995         (wks_write_status): New func.
18996         * tools/gpg-wks-client.c: Include status.h.
18997         (oStatusFD): New constant.
18998         (opts): New option --status-fd.
18999         (parse_arguments): Handle that option.
19000         (main): Return STATUS_SUCCESS or STATUS_FAILURE.
19001
19002 2016-12-08  Justus Winter  <justus@g10code.com>
19003
19004         gpgscm: Better error reporting.
19005         + commit e7429b1ced0c69fa7901f888f8dc25f00fc346a4
19006         * tests/gpgscm/ffi.scm: Move the customized exception handling and
19007         atexit logic...
19008         * tests/gpgscm/init.scm: ... here.
19009         (throw): Record the current history.
19010         (throw'): New function that is history-aware.
19011         (rethrow): New function.
19012         (*error-hook*): Use the new throw'.
19013         * tests/gpgscm/main.c (load): Fix error handling.
19014         (main): Save and use the 'sc->retcode' as exit code.
19015         * tests/gpgscm/repl.scm (repl): Print call history.
19016         * tests/gpgscm/scheme.c (_Error_1): Make a snapshot of the history,
19017         use it to provide a accurate location of the expression causing the
19018         error at runtime, and hand the history trace to the '*error-hook*'.
19019         (opexe_5): Tag all lists at parse time with the current location.
19020         * tests/gpgscm/tests.scm: Update calls to 'throw', use 'rethrow'.
19021
19022         gpgscm: Keep a history of calls for error messages.
19023         + commit 404e8a4136bbbab39df7dd5119841e131998cc15
19024         * tests/gpgscm/init.scm (vm-history-print): New function.
19025         * tests/gpgscm/opdefines.h: New opcodes 'CALLSTACK_POP', 'APPLY_CODE',
19026         and 'VM_HISTORY'.
19027         * tests/gpgscm/scheme-private.h (struct history): New definition.
19028         (struct scheme): New field 'history'.
19029         * tests/gpgscm/scheme.c (gc): Mark objects in the history.
19030         (history_free): New function.
19031         (history_init): Likewise.
19032         (history_mark): Likewise.
19033         (add_mod): New macro.
19034         (sub_mod): Likewise.
19035         (tailstack_clear): New function.
19036         (callstack_pop): Likewise.
19037         (callstack_push): Likewise.
19038         (tailstack_push): Likewise.
19039         (tailstack_flatten): Likewise.
19040         (callstack_flatten): Likewise.
19041         (history_flatten): Likewise.
19042         (opexe_0): New variable 'callsite', keep track of the expression if it
19043         is a call, implement the new opcodes, record function applications in
19044         the history.
19045         (opexe_6): Implement new opcode.
19046         (scheme_init_custom_alloc): Initialize history.
19047         (scheme_deinit): Free history.
19048         * tests/gpgscm/scheme.h (USE_HISTORY): New macro.
19049
19050         gpgscm: Add flag TAIL_CONTEXT.
19051         + commit 01256694f006405c54bc2adef63ef0c8f07da9ee
19052         * tests/gpgscm/scheme.c (S_FLAG_TAIL_CONTEXT): New macro.  This flag
19053         indicates that the interpreter is evaluating an expression in a tail
19054         context (see R5RS, section 3.5).
19055         (opexe_0): Clear and set the flag according to the rules layed out in
19056         R5RS, section 3.5.
19057         (opexe_1): Likewise.
19058
19059         gpgscm: Add flags to the interpreter.
19060         + commit a4a69163d9d7e4d9f3339eb5cda0afb947180b26
19061         * tests/gpgscm/scheme-private.h (struct scheme): Add field 'flags'.
19062         * tests/gpgscm/scheme.c (S_OP_MASK): New macro.
19063         (S_FLAG_MASK, s_set_flag, s_clear_flag, s_get_flag): Likewise.
19064         (_s_return): Unpack the encoded opcode and flags.
19065         (s_save): Encode the flags along with the opcode.  Use normal
19066         integers to encode the result.
19067         (scheme_init_custom_alloc): Initialize 'op' and 'flags'.
19068
19069         gpgscm: Implement tags.
19070         + commit fcf5aea44627def43425d03881e20902e7c0331e
19071         * tests/gpgscm/opdefines.h: Add opcodes to create and retrieve tags.
19072         * tests/gpgscm/scheme.c (T_TAGGED): New macro.
19073         (mk_tagged_value): New function.
19074         (has_tag): Likewise.
19075         (get_tag): Likewise.
19076         (mark): Mark tag.
19077         (opexe_4): Implement new opcodes.
19078         * tests/gpgscm/scheme.h (USE_TAGS): New macro.
19079
19080 2016-12-08  Werner Koch  <wk@gnupg.org>
19081
19082         gpg: Fix the fix out-of-bounds access.
19083         + commit a75790b74095828f967c012eff7033f570d93077
19084         * g10/tofu.c (build_conflict_set): Revert to int* and fix calloc.
19085
19086         wks: New option --check for gpg-wks-client.
19087         + commit d8c5e8ccfdb53cc327f7520fc7badc31d0c9c666
19088         * tools/call-dirmngr.c (wkd_get_key): New.
19089         * tools/gpg-wks-client.c (aCheck): New constant.
19090         (opts): New option "--check".
19091         (main): Call command_check.
19092         (command_check): New.
19093
19094         tools: Move a function from gpg-wks-server to wks-util.c.
19095         + commit c3138decd77d788906885b638b344d0d1faf32c0
19096         * tools/gpg-wks-server.c (list_key_status_cb): Remove.
19097         (list_key): Move to ...
19098         * tools/wks-util.c (wks_list_key): here and rename.  Add new args
19099         R_FPR and R_MBOXES and remove the CTX.
19100         (list_key_status_cb): New.
19101         * tools/wks-util.c: Include ccparray.h, exectool.h, and mbox-util.h.
19102         * tools/gpg-wks-server.c (process_new_key): Replace list_key by
19103         wks_list_key.
19104         (check_and_publish): Ditto.
19105
19106 2016-12-08  Justus Winter  <justus@g10code.com>
19107
19108         gpgscm: Generalize 'for-each-p'.
19109         + commit a2bedc8ac6fcdcd1de0a9fa3d540006481387dff
19110         * tests/gpgscm/tests.scm (for-each-p): Generalize to N lists like
19111         for-each.
19112         (for-each-p'): Likewise.
19113
19114         g10: Fix out-of-bounds access.
19115         + commit 3b5b94ceab7c0ed9501c5cf54b4efa17fcd7300a
19116         * g10/tofu.c (build_conflict_set): Use 'char'.
19117
19118 2016-12-08  Werner Koch  <wk@gnupg.org>
19119
19120         tools: Fix use of uninitialized var in mime-maker.
19121         + commit dd03667ab1062bba3b9413c3f8007d63302d1b31
19122         * tools/mime-maker.c (ensure_part): Make sure to set R_PARENT on
19123         error.
19124         (add_missing_headers): Ensure that ERR is set on success.
19125
19126         * tools/wks-util.c (wks_parse_policy): Fix indentation.
19127
19128         tools: Fix memleak in gpgconf.
19129         + commit b265969154741bf9f93167699fe7ddda1d485265
19130         * tools/gpgconf.c (main): Free SOCKETDIR.
19131
19132         gpg: Fix portability problem.
19133         + commit c3008bffac68b6f31e9ae9bad837cdce5de7c0db
19134         * g10/tofu.c (build_conflict_set): Replace variable dynamic array.
19135
19136 2016-12-07  Justus Winter  <justus@g10code.com>
19137
19138         tests: Add test for '--quick-set-expire'.
19139         + commit dec2ae31a46a0f41886c7ad228865cc573f2dea9
19140         * tests/openpgp/quick-key-manipulation.scm: Test '--quick-set-expire'.
19141
19142         tests: Improve quick key manipulation test.
19143         + commit 92df40a3a2ae471fbba00d6d7040230404931fd4
19144         * tests/openpgp/quick-key-manipulation.scm: Do not update the trust
19145         database, rather be more specific when filtering the user ids.
19146
19147 2016-12-06  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19148
19149         agent: Respect --enable-large-secmem.
19150         + commit 8636ad5023a1bdc527add40a5508f8c5b7c35221
19151         * agent/gpg-agent.c (main): Initialize secmem to the configured buffer
19152         size.
19153
19154 2016-12-06  Justus Winter  <justus@g10code.com>
19155
19156         tests: Add test importing a revocation certificate.
19157         + commit e352ead43fbb0180e1f1c71bf1a000d1954eb777
19158         * tests/openpgp/Makefile.am (XTESTS): Add new test.
19159         * tests/openpgp/import-revocation-certificate.scm: New file.
19160         * tests/openpgp/samplemsgs/revoke-2D727CC768697734.asc: Likewise.
19161
19162         tests: Rename 'error' to 'fail'.
19163         + commit 5b5d881f47c82f320abf440c20b7a1bac078a987
19164         * tests/gpgscm/tests.scm (error): Rename to 'fail'.  'error' is a
19165         primitive function (an opcode) of the TinySCHEME vm, and 'error' is
19166         also defined by R6RS.  Better avoid redefining that.  Fix all call
19167         sites.
19168         * tests/openpgp/4gb-packet.scm: Adapt.
19169         * tests/openpgp/decrypt-multifile.scm: Likewise.
19170         * tests/openpgp/ecc.scm: Likewise.
19171         * tests/openpgp/export.scm: Likewise.
19172         * tests/openpgp/gpgtar.scm: Likewise.
19173         * tests/openpgp/gpgv-forged-keyring.scm: Likewise.
19174         * tests/openpgp/import.scm: Likewise.
19175         * tests/openpgp/issue2015.scm: Likewise.
19176         * tests/openpgp/issue2346.scm: Likewise.
19177         * tests/openpgp/issue2419.scm: Likewise.
19178         * tests/openpgp/key-selection.scm: Likewise.
19179         * tests/openpgp/mds.scm: Likewise.
19180         * tests/openpgp/multisig.scm: Likewise.
19181         * tests/openpgp/setup.scm: Likewise.
19182         * tests/openpgp/signencrypt.scm: Likewise.
19183         * tests/openpgp/ssh-import.scm: Likewise.
19184         * tests/openpgp/tofu.scm: Likewise.
19185         * tests/openpgp/verify.scm: Likewise.
19186
19187         tests: Remove debugging display.
19188         + commit 89ac071eb4c7539e98c7dc17e11f57c620b54e90
19189         * tests/openpgp/tofu.scm: Remove debugging display.
19190
19191 2016-12-06  Neal H. Walfield  <neal@g10code.com>
19192
19193         tests: Update distributed files.
19194         + commit 87972fdef2cd853fb97624d0765686674a19e3c4
19195         * tests/openpgp/Makefile.am (TEST_FILES): Remove tofu-keys.asc,
19196         tofu-keys-secret.asc, tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and
19197         tofu-EE37CF96-1.txt.  Add tofu/conflicting/1C005AF3.gpg,
19198         tofu/conflicting/1C005AF3-secret.gpg, tofu/conflicting/1C005AF3-1.txt,
19199         tofu/conflicting/1C005AF3-2.txt, tofu/conflicting/1C005AF3-3.txt,
19200         tofu/conflicting/1C005AF3-4.txt, tofu/conflicting/1C005AF3-5.txt,
19201         tofu/conflicting/B662E42F.gpg, tofu/conflicting/B662E42F-secret.gpg,
19202         tofu/conflicting/B662E42F-1.txt, tofu/conflicting/B662E42F-2.txt,
19203         tofu/conflicting/B662E42F-3.txt, tofu/conflicting/B662E42F-4.txt,
19204         tofu/conflicting/B662E42F-5.txt, tofu/conflicting/BE04EB2B.gpg,
19205         tofu/conflicting/BE04EB2B-secret.gpg, tofu/conflicting/BE04EB2B-1.txt,
19206         tofu/conflicting/BE04EB2B-2.txt, tofu/conflicting/BE04EB2B-3.txt,
19207         tofu/conflicting/BE04EB2B-4.txt, tofu/conflicting/BE04EB2B-5.txt and
19208         tofu/conflicting/README.
19209
19210         doc: Improve the text in the gpg manual.
19211         + commit 7572d270fcda1614648c6f08d711d5096ffebbe6
19212         * doc/gpg.texi: Improve the text.
19213
19214         g10: Avoid a memory leak.
19215         + commit 6102099985c1b82b6c0bba0464c1f913cc673e96
19216         * g10/gpg.c (main): Free KB when we're done with it.
19217
19218         tests: Change (interactive-shell) to start an interactive shell.
19219         + commit db6d8cfdc118131f497596ef1ffc121949377754
19220         * tests/gpgscm/tests.scm (interactive-shell): Start an interactive
19221         shell.
19222
19223         tests: Check the signature count in the TOFU TFS record.
19224         + commit 17c717d7c92d9a52101fea7e396fc133322a8786
19225         * tests/openpgp/tofu.scm: Check the signature count in the TOFU TFS
19226         record.
19227
19228         tests: Replace data used by the TOFU conflict test.
19229         + commit d5b18d6c55d65e8df2dd112651e3b9b3d9e6e27a
19230         * tests/openpgp/tofu-2183839A-1.txt: Remove file.
19231         * tests/openpgp/tofu-BC15C85A-1.txt: Remove file.
19232         * tests/openpgp/tofu-EE37CF96-1.txt: Remove file.
19233         * tests/openpgp/tofu-keys-secret.asc: Remove file.
19234         * tests/openpgp/tofu-keys.asc: Remove file.
19235         * tests/openpgp/tofu/conflicting/1C005AF3.gpg: New file.
19236         * tests/openpgp/tofu/conflicting/1C005AF3-secret.gpg: New file.
19237         * tests/openpgp/tofu/conflicting/1C005AF3-1.txt: New file.
19238         * tests/openpgp/tofu/conflicting/1C005AF3-2.txt: New file.
19239         * tests/openpgp/tofu/conflicting/1C005AF3-3.txt: New file.
19240         * tests/openpgp/tofu/conflicting/1C005AF3-4.txt: New file.
19241         * tests/openpgp/tofu/conflicting/1C005AF3-5.txt: New file.
19242         * tests/openpgp/tofu/conflicting/B662E42F.gpg: New file.
19243         * tests/openpgp/tofu/conflicting/B662E42F-secret.gpg: New file.
19244         * tests/openpgp/tofu/conflicting/B662E42F-1.txt: New file.
19245         * tests/openpgp/tofu/conflicting/B662E42F-2.txt: New file.
19246         * tests/openpgp/tofu/conflicting/B662E42F-3.txt: New file.
19247         * tests/openpgp/tofu/conflicting/B662E42F-4.txt: New file.
19248         * tests/openpgp/tofu/conflicting/B662E42F-5.txt: New file.
19249         * tests/openpgp/tofu/conflicting/BE04EB2B.gpg: New file.
19250         * tests/openpgp/tofu/conflicting/BE04EB2B-secret.gpg: New file.
19251         * tests/openpgp/tofu/conflicting/BE04EB2B-1.txt: New file.
19252         * tests/openpgp/tofu/conflicting/BE04EB2B-2.txt: New file.
19253         * tests/openpgp/tofu/conflicting/BE04EB2B-3.txt: New file.
19254         * tests/openpgp/tofu/conflicting/BE04EB2B-4.txt: New file.
19255         * tests/openpgp/tofu/conflicting/BE04EB2B-5.txt: New file.
19256         * tests/openpgp/tofu/conflicting/README: New file.
19257         * tests/openpgp/tofu.scm: Update accordingly.
19258
19259         g10: Remove dead code.
19260         + commit bd9ebe1404c1395edd0e029023a9e780c90f6d73
19261         * g10/tofu.c (tofu_set_policy_by_keyid): Remove function.
19262
19263 2016-12-05  Werner Koch  <wk@gnupg.org>
19264
19265         gpg: New option --quick-set-expire.
19266         + commit 41b3d0975de65d1654f5e37c626d7c9b7c9a7a4d
19267         * g10/gpg.c (aQuickSetExpire): New.
19268         (opts): New option --quick-set-expire.
19269         (main): Implement option.
19270         * g10/keyedit.c (menu_expire): Add args FORCE_MAINKEY and
19271         NEWEXPIRATION.  Change semantics of the return value.  Change caller.
19272         (keyedit_quick_set_expire): New.
19273
19274 2016-12-05  Justus Winter  <justus@g10code.com>
19275
19276         tests: New test for '--enarmor' and '--dearmor'.
19277         + commit fae4d06b0ccaa9803e0c0da56c327b0bcfffcac5
19278         * tests/openpgp/Makefile.am (XTESTS): Add new test.
19279         * tests/openpgp/enarmor.scm: New file.
19280
19281 2016-12-03  Werner Koch  <wk@gnupg.org>
19282
19283         gpg: Fix error code arg in ERRSIG status line.
19284         + commit ef10c348bffc7dad19e1832bebc453755d209420
19285         * g10/mainproc.c (check_sig_and_print): Use gpg_err_code to return an
19286         error code in ERRSIG.
19287
19288 2016-12-02  Werner Koch  <wk@gnupg.org>
19289
19290         gpg: New option --default-new-key-algo.
19291         + commit ce29272e24e7b718b8fca9b84bc728e65f3dea24
19292         * common/openpgp-oid.c (openpgp_is_curve_supported): Add optional arg
19293         R_ALGO and change all callers.
19294         * common/util.h (GPG_ERR_UNKNOWN_FLAG): New error code.
19295         * g10/options.h (struct opt): Add field DEF_NEW_KEY_ALGO.
19296         * g10/gpg.c (oDefaultNewKeyAlgo): New enum.
19297         (opts): New option "--default-new-key-algo".
19298         (main): Set the option.
19299         * g10/keygen.c: Remove DEFAULT_STD_ FUTURE_STD_ constants and replace
19300         them by ...
19301         (DEFAULT_STD_KEY_PARAM, FUTURE_STD_KEY_PARAM): new string constants.
19302         (get_keysize_range): Remove arg R_DEF and return that value instead.
19303         Change all callers.
19304         (gen_rsa): Use get_keysize_range instead of the removed
19305         DEFAULT_STD_KEYSIZE.
19306         (parse_key_parameter_part): New function.
19307         (parse_key_parameter_string): New function.
19308         (quick_generate_keypair): Refactor using parse_key_parameter_string.
19309         (generate_keypair): Ditto.
19310         (parse_algo_usage_expire): Ditto.
19311
19312 2016-12-02  Neal H. Walfield  <neal@g10code.com>
19313
19314         g10: Improve debugging output.
19315         + commit cd532bb7b866e104304e2443cc942799c385daa5
19316         * g10/tofu.c (string_to_long): Improve debugging output.
19317         (string_to_ulong): Likewise.
19318
19319 2016-12-01  Neal H. Walfield  <neal@g10code.com>
19320
19321         g10: In the TOFU module, make strings easier to translate.
19322         + commit bd1a1d8582abcfd7f29812942fa70f88d0aec7cf
19323         * g10/tofu.c: Remove dead code.
19324         (time_ago_str): Simplify implementation since we only want the most
19325         significant unit.
19326         (format_conflict_msg_part1): Use ngettext.
19327         (ask_about_binding): Likewise and only emit full sentences.
19328         (show_statistics): Likewise.
19329
19330 2016-12-01  Werner Koch  <wk@gnupg.org>
19331
19332         dirmngr: Add option --standard-resolver.
19333         + commit 304566d3327ef0a85188cce3109d46d5ff47177a
19334         * dirmngr/dirmngr.c (oStandardResolver): New constant.
19335         (opts): New option --standard-resolver.
19336         (parse_rereadable_options): Set option.
19337         * dirmngr/dns-stuff.c: Refactor all code to support the new option.
19338         (standard_resolver): New var.
19339         (enable_standard_resolver, standard_resolver_p): New func.
19340         * dirmngr/http.c (connect_server): Remove USE_DNS_SRV build
19341         conditional.
19342         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
19343         * dirmngr/server.c (cmd_getinfo) <dnsinfo>: Take care of new option
19344         * configure.ac (HAVE_ADNS_IF_TORMODE): Remove var ADNSLIB.  ac_define
19345         USE_ADNS in the adns checking code.  Remove options --disable-dns-srv
19346         and --disable-dns-cert.  Always look for the system resolver.  Print
19347         warning if no system resolver was found.
19348         (USE_DNS_CERT, USE_DNS_SRV): Remove ac_defines.
19349         (HAVE_SYSTEM_RESOLVER): New ac_define.
19350         (USE_DNS_SRV): Remove am_conditional; not used anyway.
19351
19352         gpg: Let only Dirmngr decide whether CERT is supported.
19353         + commit 86efc3ee53abaf1e22b53c1b360c51829e476115
19354         * g10/getkey.c (parse_auto_key_locate): Do not build parts depending
19355         on USE_DNS_CERT.
19356
19357 2016-12-01  Justus Winter  <justus@g10code.com>
19358
19359         tests,build: Fix distcheck.
19360         + commit fbdfe6a514a95fb46f2b811a13709024e2baf252
19361         * tests/openpgp/Makefile.am (sample_msgs): Add messages required for
19362         the new test 'verify-multifile.scm'.
19363
19364         tests: Add test for '--verify --multifile'.
19365         + commit 12af8e84a32df728462da09a00a8bec24a487720
19366         * tests/openpgp/Makefile.am (XTESTS): Add new test.
19367         * tests/openpgp/verify-multifile.scm: New file.
19368
19369 2016-11-30  Justus Winter  <justus@g10code.com>
19370
19371         tests: Add test for '--encrypt --multifile'.
19372         + commit 3c0569e99498c7470ebdb639b4c5ae829af92761
19373         * tests/openpgp/Makefile.am (XTESTS): Add new test.
19374         * tests/openpgp/encrypt-multifile.scm: New file.
19375
19376 2016-11-29  Werner Koch  <wk@gnupg.org>
19377
19378         agent,dirmngr: Tiny restructuring.
19379         + commit aa6ab9e0bc67fe9ce5601047e84ea4a875e8eb64
19380         * agent/gpg-agent.c (handle_connections): Add a comment.
19381         * dirmngr/dirmngr.c (main): Move assuan_sock_close of the listening
19382         socket to ...
19383         (handle_connections): here.  Add a comment why we keep the
19384         listening socket open during a shutdown.
19385
19386         agent,dirmngr: Handle corner case in shutdown mode.
19387         + commit 854adc8ae19749e44cb79dfa0c5401f48012b13a
19388         * agent/gpg-agent.c (handle_connections): Keep on selecting on the
19389         inotify fd even when a shutdown is pending.
19390         * dirmngr/dirmngr.c (handle_connections): Ditto.  Also simplifyy the
19391         use of the HAVE_INOTIFY_INIT cpp conditional.
19392
19393         gpgsm: Allow decryption with a card returning a PKCS#1 stripped key.
19394         + commit 8489b12211098ad58c008cfb74b5cb91849cf68d
19395         * sm/decrypt.c (prepare_decryption): Handle a 16 byte session key.
19396
19397         agent,w32: Initialize nPth in server mode.
19398         + commit 81d6e98cdf4caa3aa92398fc3b8bed397b40f58d
19399         * agent/gpg-agent.c (main) [W32]: Call initialize_modules in server
19400         mode.
19401
19402         gpg: Make --decrypt with output '-&nnnn' work.
19403         + commit a5910e00ace882b8a17169faf4607163ab454af9
19404         * g10/plaintext.c (get_output_file): Check and open special filename
19405         before falling back to stdout.
19406
19407         gpg,sm: Merge the two versions of check_special_filename.
19408         + commit 60b4982836a00ef6b2a97d16f735b3f6b74dce62
19409         * sm/gpgsm.c (check_special_filename): Move to ..
19410         * common/sysutils.c (check_special_filename): here.  Add arg
19411         NOTRANSLATE.
19412         (allow_special_filenames): New local var.
19413         (enable_special_filenames): New public functions.
19414         * sm/gpgsm.c (allow_special_filenames): Remove var.
19415         (main): Call enable_special_filenames instead of setting the var.
19416         (open_read, open_es_fread, open_es_fwrite): Call
19417         check_special_filename with 0 for NOTRANSLATE.
19418         * common/iobuf.c (special_names_enabled): Remove var.
19419         (iobuf_enable_special_filenames): Remove func.
19420         (check_special_filename): Remove func.
19421         (iobuf_is_pipe_filename): Call new version of the function with
19422         NOTRANSLATE set.
19423         (do_open): Ditto.
19424         * g10/gpg.c (main): Call enable_special_filenames instead of
19425         iobuf_enable_special_filenames.
19426         * g10/gpgv.c (main): Ditto.
19427
19428 2016-11-29  Justus Winter  <justus@g10code.com>
19429
19430         g10: Fix memory leak.
19431         + commit 52385a2ba1bf7e53f500ffde5fd34f28e69cf76b
19432         * g10/decrypt.c (decrypt_messages): Properly decrease the reference
19433         count of the armor filters after pushing them.
19434
19435         tools,build: Build WKS tools against libintl.
19436         + commit 9fb5e9c14557f7567cbc7c50b9881b7d7bfa2f12
19437         * tools/Makefile.am (gpg_wks_server_LDADD): Link against libintl.
19438         (gpg_wks_client_LDADD): Likewise.
19439
19440 2016-11-29  Neal H. Walfield  <neal@g10code.com>
19441
19442         Improve some comments.
19443         + commit 522f74f7e377135cf098b6b0b9b35284c1dfc963
19444
19445
19446         g10: Extend TOFU_STATS to always show the validity.
19447         + commit 2f27cb12e30c9f6e780354eecc3ff0039ed52c63
19448         * doc/DETAILS (TOFU_STATS): Rename the VALIDITY field to SUMMARY.  Add
19449         a new field called VALIDITY.
19450         * g10/tofu.c (write_stats_status): Update output accordingly.
19451
19452 2016-11-29  Justus Winter  <justus@g10code.com>
19453
19454         tests: Add test for '--decrypt --multifile'.
19455         + commit bde4fddadc75ad6071e3fc6c0980905de14c03cb
19456         * tests/openpgp/Makefile.am (XTESTS): Add new test.
19457         * tests/openpgp/decrypt-multifile.scm: New file.
19458
19459         gpgscm: Avoid truncating pointers.
19460         + commit e062bc4da8062b822ee85096d9adfcbca8dcb56a
19461         * tests/gpgscm/scheme.c (_alloc_cellseg): Avoid truncating pointers on
19462         systems where sizeof(unsigned long) < sizeof(void *).
19463
19464 2016-11-29  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19465
19466         dirmngr: Lazily launch ldap reaper thread.
19467         + commit f6728d13e8e544dbd4b9351ed981613e5504293f
19468         * dirmngr/dirmngr.c (main): Avoid calling ldap_wrapper_launch_thread()
19469         Before we need it.
19470         * dirmngr/ldap-wrapper.c (ldap_wrapper): Call
19471         ldap_wrapper_launch_thread() just in time (before any attempt to use
19472         an ldap subprocess).
19473
19474 2016-11-29  Werner Koch  <wk@gnupg.org>
19475
19476         build: Remove more keywords from the generated ChangeLog.
19477         + commit ecc126a7cef371e3b88e65715ba37fb77e92ea0f
19478         * build-aux/gitlog-to-changelog (parse_amend_file): Generalize keyword
19479         removal.
19480
19481 2016-11-28  Justus Winter  <justus@g10code.com>
19482
19483         tests: Add test for the ssh key export.
19484         + commit 47b8b9e2ce5af7fba117ae0b00e10bec414dcfb0
19485         * tests/openpgp/Makefile.am (XTESTS): Add new test.
19486         (sample_keys): Add new files.
19487         * tests/openpgp/samplekeys/authenticate-only.pub.asc: New file.
19488         * tests/openpgp/samplekeys/authenticate-only.sec.asc: Likewise.
19489         * tests/openpgp/ssh-export.scm: Likewise.
19490
19491         g10: Fix iteration over getkey results.
19492         + commit 4db9a425644dccaf81b51ebc97b32a9cc21941a4
19493         * g10/getkey.c (getkey_next): Only ask 'lookup' for the exact match if
19494         our caller requested the key.  Fixes a crash in 'lookup'.
19495
19496         tests: Rename ssh test.
19497         + commit cc1d21342659a7def5d662d0547579f9e0d3b109
19498         * tests/openpgp/ssh.scm: Rename to 'ssh-import.scm'.
19499         * tests/openpgp/Makefile (XTESTS): Likewise.
19500
19501 2016-11-25  NIIBE Yutaka  <gniibe@fsij.org>
19502
19503         scd: Support OpenPGP card V3 for RSA.
19504         + commit b89e63e5c326af71470124b410e6429cbd2b5c43
19505         * scd/app-openpgp.c (struct app_local_s): Remove max_cmd_data and
19506         max_rsp_data fields as Extended Capabilities bits are different.
19507         (get_cached_data) Use extcap.max_certlen_3.
19508         (get_one_do): Don't use exmode=1.
19509         (determine_rsa_response): New.
19510         (get_public_key, do_genkey): Call determine_rsa_response.
19511         (do_sign): Use keyattr[0].rsa.n_bits / 8, instead of max_rsp_data.
19512         (do_auth): Use keyattr[2].rsa.n_bits / 8, instead of max_rsp_data.
19513         (do_decipher): Likewise with Use keyattr[1].rsa.n_bits / 8.
19514         (show_caps): Remove max_cmd_data and max_rsp_data.
19515         (app_select_openpgp): Likewise.
19516
19517 2016-11-23  Justus Winter  <justus@g10code.com>
19518
19519         gpgscm: Make 'reverse' compatible with 'reverse_in_place'.
19520         + commit 005d326d19ba28005182205f25edc4f7499ec0b5
19521         * tests/gpgscm/scheme.c (reverse): Update prototype, add terminator
19522         argument.
19523         (opexe_4): Update callsite.
19524
19525         gpgscm: Clean sweeped cells.
19526         + commit 3fb9954c43425775a517060959dad01fa00238f7
19527         * tests/gpgscm/scheme.c (gc): Zero typeflag and car of free cells.
19528
19529         gpgscm: Fix initialization of 'sink'.
19530         + commit 7856e3efaad7614979bc0b91379a0a4dcbc739d5
19531         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Also initialize
19532         cdr.
19533
19534 2016-11-23  Neal H. Walfield  <neal@g10code.com>
19535
19536         g10: Avoid gratuitously loading a keyblock when it is already available.
19537         + commit 03a65a53231cc3132a50a1871e81a512c44da169
19538         * g10/trust.c (get_validity): Add new, optional parameter KB.  Only
19539         load the keyblock if KB is NULL.  Update callers.
19540         (get_validity): Likewise.
19541         * g10/trustdb.c (tdb_get_validity_core): Likewise.
19542
19543 2016-11-22  Neal H. Walfield  <neal@g10code.com>
19544
19545         g10: Use es_fopen instead of open.
19546         + commit bfeafe2d3f9bbaa7f11f3ad870a446141c038b0d
19547         * g10/tofu.c: Don't include <utime.h>, <fcntl.h> or <unistd.h>.
19548         (busy_handler): Replace use of open with es_fopen.
19549
19550         g10: If the set of UTKs changes, invalidate any changed policies.
19551         + commit 44c17bcb003a3330f595a6ab144e8439b7b630cb
19552         * g10/trustdb.c (tdb_utks): New function.
19553         * g10/tofu.c (check_utks): New function.
19554         (initdb): Call it.
19555         * tests/openpgp/tofu.scm: Modify test to check the effective policy of
19556         keys whose effective policy changes when we change the set of UTKs.
19557
19558 2016-11-22  NIIBE Yutaka  <gniibe@fsij.org>
19559
19560         scd: Fix receive buffer size.
19561         + commit 5c2db9dedfe9dbb14ffec24751ca23a69cead94e
19562         * scd/apdu.c (send_le): Fix the size, adding two for status
19563         bytes to Le.
19564
19565 2016-11-22  Justus Winter  <justus@g10code.com>
19566
19567         gpgscm: Refactor.
19568         + commit a3b258d1d15953816e0567511ecc527a4ccdd626
19569         * tests/gpgscm/scheme.c (opexe_0): Reduce code duplication.
19570
19571         gpgscm: Fix property lists.
19572         + commit d8df80427238cdbb9ae0f6dae8bc7e9c24f6e265
19573         * tests/gpgscm/opdefines.h (put, get): Check arguments.  Also rename
19574         to 'set-symbol-property' and 'symbol-property', the names used by
19575         Guile, because put and get are too unspecific.
19576         * tests/gpgscm/scheme.c (hasprop): Only symbols have property lists.
19577         (get_property): New function.
19578         (set_property): Likewise.
19579         (opexe_4): Use the new functions.
19580
19581         gpgscm: Fix installation of error handler.
19582         + commit 7b4e2ea274ace22245264f1759279390d0300a62
19583         * tests/gpgscm/ffi.scm: Set '*error-hook*' again so that the
19584         interpreter will use our function.
19585
19586         gpgscm: Use a static pool of cells for small integers.
19587         + commit 66834eb838a8892d088f6b7332084a64d9f15008
19588         * tests/gpgscm/scheme-private.h (struct scheme): New fields for the
19589         static integer cells.
19590         * tests/gpgscm/scheme.c (_alloc_cellseg): New function.
19591         (alloc_cellseg): Use the new function.
19592         (MAX_SMALL_INTEGER): New macro.
19593         (initialize_small_integers): New function.
19594         (mk_small_integer): Likewise.
19595         (mk_integer): Return a small integer if possible.
19596         (_s_return): Do not free 'op' if it is a small integer.
19597         (s_save): Use a small integer to box the opcode.
19598         (scheme_init_custom_alloc): Initialize small integers.
19599         (scheme_deinit): Free chunk of small integers.
19600         * tests/gpgscm/scheme.h (USE_SMALL_INTEGERS): New macro.
19601
19602         tests: Delay querying the avaliable algorithms.
19603         + commit 893a3f7fb46021961914a8acdf1292a80e3eba93
19604         * tests/openpgp/defs.scm: Set verbosity earlier, turn 'all-*-algos'
19605         into promises.
19606         * tests/openpgp/conventional-mdc.scm: Force the promises.
19607         * tests/openpgp/conventional.scm: Likewise.
19608         * tests/openpgp/encrypt-dsa.scm: Likewise.
19609         * tests/openpgp/encrypt.scm: Likewise.
19610         * tests/openpgp/gpgtar.scm: Likewise.
19611         * tests/openpgp/sigs.scm: Likewise.
19612
19613         g10: Fix memory leak.
19614         + commit 6ce14a805f1da687dfb8535db57730d5c7403db7
19615         * g10/tofu.c (tofu_notice_key_changed): Remove spurious duplicate call
19616         to 'hexfingerprint'.
19617
19618 2016-11-21  Neal H. Walfield  <neal@g10code.com>
19619
19620         g10: Cache the effective policy.  Recompute it when required.
19621         + commit 037f9de09298a31026ea2ab5fbd4a599b11cc34f
19622         * g10/tofu.c (initdb): Add column effective_policy to the bindings
19623         table.
19624         (record_binding): New parameters effective_policy and set_conflict.
19625         Save the effective policy.  If SET_CONFLICT is set, then set conflict
19626         according to CONFLICT.  Otherwise, preserve the current value of
19627         conflict.  Update callers.
19628         (get_trust): Don't compute the effective policy here...
19629         (get_policy): ... do it here, if it was not cached.  Take new
19630         parameters, PK, the public key, and NOW, the time that the operation
19631         started.  Update callers.
19632         (show_statistics): New parameter PK.  Pass it to get_policy.  Update
19633         callers.
19634         (tofu_notice_key_changed): New function.
19635         * g10/gpgv.c (tofu_notice_key_changed): New stub.
19636         * g10/import.c (import_revoke_cert): Take additional argument CTRL.
19637         Pass it to keydb_update_keyblock.
19638         * g10/keydb.c (keydb_update_keyblock): Take additional argument CTRL.
19639         Update callers.
19640         [USE_TOFU]: Call tofu_notice_key_changed.
19641         * g10/test-stubs.c (tofu_notice_key_changed): New stub.
19642         * tests/openpgp/tofu.scm: Assume that manually setting a binding's
19643         policy to auto does not cause the tofu engine to forget about any
19644         conflict.
19645
19646         g10: Correctly parameterize ngettext.
19647         + commit 182efc5b5d20ac0d43501a22f349a23dc06a27a4
19648         * g10/tofu.c (ask_about_binding): Correctly parameterize ngettext.
19649
19650         g10: Don't use the same variable for multiple SQL compiled statements.
19651         + commit 7142b293c870d73ce0146bfb90e6a556e0079650
19652         * g10/tofu.c (struct tofu_dbs_s): Remove unused field
19653         record_binding_update2.  Replace register_insert with
19654         register_signature and register_encryption.
19655         (tofu_register_signature): Don't use dbs->s.register_insert, but
19656         dbs->s.register_signature.
19657         (tofu_register_encryption): Don't use dbs->s.register_insert, but
19658         dbs->s.register_encryption.
19659
19660         g10: Add a convenience function for checking if a key is a primary key.
19661         + commit 91a0483c5db8ee4510981448a705981ee1cce199
19662         * g10/keydb.h (pk_is_primary): New function.
19663         * g10/tofu.c (get_trust): Use it.
19664         (tofu_register_signature): Likewise.
19665         (tofu_register_encryption): Likewise.
19666         (tofu_set_policy): Likewise.
19667         (tofu_get_policy): Likewise.
19668
19669 2016-11-21  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19670
19671         doc: Ship example gpg-agent-browser.socket in examples/systemd-user/.
19672         + commit 0540cfbee455b197edd89b602a4b47ebf0be8588
19673         * doc/Makefile.am: Ship gpg-agent-browser.socket alongside the other
19674         systemd user service example files.
19675
19676 2016-11-21  NIIBE Yutaka  <gniibe@fsij.org>
19677
19678         agent: Fix npth + daemon mode problem.
19679         + commit 9a707a223a3d45ccf245dee7989ca144e4e6bb49
19680         * agent/gpg-agent.c (main): Remove duplicated initialization in daemon
19681         mode.
19682
19683 2016-11-18  Werner Koch  <wk@gnupg.org>
19684
19685         Release 2.1.16.
19686         + commit 0a641ad25d8c3b91dc32bb9f3f1ae49ae539a4f7
19687
19688
19689 2016-11-18  Ineiev  <ineiev@gnu.org>
19690
19691         po: Update Russian translation.
19692         + commit 11aaa9c6d4ed3e47de45b4aee925ab1065120988
19693
19694
19695 2016-11-18  NIIBE Yutaka  <gniibe@fsij.org>
19696
19697         g10: Fix flags to open for lock of ToFU.
19698         + commit 1c0b140cccfb884c6d07785c3284b9df06dccd3c
19699         * g10/tofu.c (busy_handler): Fix the flags and utime is not needed.
19700
19701 2016-11-18  Werner Koch  <wk@gnupg.org>
19702
19703         dirmngr: Use a longer timer tick interval.
19704         + commit 833eef974ad4721b9b3e247bae9c890476a936ce
19705         * dirmngr/dirmngr.c (TIMERTICK_INTERVAL): Always use 60 seconds like
19706         we did for WindowsCE.
19707
19708 2016-11-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19709
19710         dirmngr: More w32 system daemon cleanup.
19711         + commit b3a917201207898059c048dd101344765201b03c
19712         * dirmngr/dirmngr.c (handle_tick): Remove w32 tests for
19713         shutdown_pending; no longer needed.
19714
19715 2016-11-18  NIIBE Yutaka  <gniibe@fsij.org>
19716
19717         g10: Fix creating a lock for ToFU.
19718         + commit b2e1b17efa952afcf7aeec8b15e9d0088dba587a
19719         * g10/tofu.c (busy_handler): Add third argument which is mandatory for
19720         O_CREATE flag.
19721
19722         scd: Don't limit to ST-2xxx for PC/SC.
19723         + commit b6066ab18a67195817babaf9eccf896c2b3c7b0e
19724         * scd/apdu.c (pcsc_vendor_specific_init): Only check vender ID.
19725
19726 2016-11-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19727
19728         dirmngr: Use a default keyserver if none is explicitly set.
19729         + commit 8fb482252436b3b4b0b33663d95d1d17188ad1d9
19730         * configure.ac: Define DIRMNGR_DEFAULT_KEYSERVER.
19731         * dirmngr/server.c (ensure_keyserver): Use it if no keyservers are set.
19732         * doc/dirmngr.texi: Document this behavior.
19733
19734         dirmngr: Add system CAs if no hkp-cacert is given.
19735         + commit 7c1613d41566f7d8db116790087de323621205fe
19736         * dirmngr/dirmngr.c (http_session_new): If the user isn't talking to
19737         the HKPS pool, and they have not specified any hkp-cacert, then we
19738         should default to the system CAs, rather than nothing.
19739         * doc/dirmngr.texi: Document choice of CAs.
19740
19741         dirmngr: Register hkp-cacert even if the file doesn't exist yet.
19742         + commit c4e02a3b7ad6ee1da6bfc439921378bdbd5c029c
19743         * dirmngr/dirmngr.c (parse_readable_options): If we're unable to turn
19744         an argument for hkp-cacert into an absolute filename, terminate
19745         completely.
19746         * dirmngr/http.c (http_register_tls_ca): Show a warning if file is not
19747         immediately accessible, but register it anyway.
19748
19749 2016-11-17  Justus Winter  <justus@g10code.com>
19750
19751         gpgscm: Re-enable the garbage collector in case of errors.
19752         + commit 4f189325a409bb08f7a8eabfac3f4579288cf5c5
19753         * tests/gpgscm/scheme.c (opexe_0): Enable gc before calling 'Error_1'.
19754
19755         gpgscm: Fix string.
19756         + commit fc53a4d06eaf891143ab4efec9caffe31ebc2bc0
19757         * tests/gpgscm/scheme.c (type_to_string): Fix string.
19758
19759 2016-11-17  Werner Koch  <wk@gnupg.org>
19760
19761         dirmngr: Auto-sownload the swdb.lst.
19762         + commit bd91f92ace09263e3a91177f2a1644379baeb08a
19763         * dirmngr/dirmngr.h (struct opt): Add field allow_version_check.
19764         * dirmngr/dirmngr.c (oAllowVersionCheck): New.
19765         (opts): Add --allow-version-check.
19766         (network_activity_seen): New variable.
19767         (parse_rereadable_options): Set opt.allow_version_check.
19768         (main) <aGPGConfList>: Do not anymore set the no change flag for
19769         Windows.  Add allow-version-check.
19770         (netactivity_action): Set network_activity_seen.
19771         (housekeeping_thread): Call dirmngr_load_swdb.
19772         * tools/gpgconf-comp.c (gc_options_dirmngr): Add allow-version-check.
19773         Make "use-tor" available at Basic level.
19774
19775         dirmngr: Improve downloading of swdb.lst.
19776         + commit c45ca316a54665915ae08399484db271566db7c0
19777         * dirmngr/loadswdb.c (time_of_saved_swdb): Aslo return the "verified"
19778         timestamp.
19779         (dirmngr_load_swdb): Avoid unnecessary disk or network access witout
19780         FORCE.  Do not update swdb.lst if it did not change.
19781
19782         gpgconf: Change the displayed names of the components.
19783         + commit d8da5bc50b856db3445435780311c9f8e52a5144
19784
19785
19786 2016-11-16  Werner Koch  <wk@gnupg.org>
19787
19788         dirmngr: Add command to only load the swdb.
19789         + commit 52c10a280af6ce06eb1732ff35b095f2b8d24b9f
19790         * dirmngr/loadswdb.c: New.
19791         * dirmngr/Makefile.am (dirmngr_SOURCES): Add that file.
19792         * dirmngr/server.c: Remove includes cpparray.h and exectool.h.
19793         (cmd_loadswdb): New.
19794         (parse_version_number,parse_version_string): Remove.
19795         (my_mktmpdir, cmp_version): Remove.
19796         (fetch_into_tmpdir): Remove.
19797         (struct verify_swdb_parm_s): Remove.
19798         (verify_swdb_status_cb): Remove.
19799         (cmd_versioncheck): Remove.
19800         (register_commands): Register LOADSWDB.  Remove VERSIONCHECK.
19801
19802         scd,dirmngr: Keep the standard fds when daemonizing.
19803         + commit 4839e6d002a8ad1f7d3260792c3c9641e258f342
19804         * dirmngr/dirmngr.c (main): Before calling setsid do not close the
19805         standard fds but connect them to /dev/null.
19806         * scd/scdaemon.c (main): Ditto.  Noet that the old test for a log
19807         stream was even reverted.
19808
19809         common: Rename keybox_file_rename to gnupg_rename_file.
19810         + commit c4506a3f15bba5d257cb4c6738800c5e00ecc9a2
19811         * kbx/keybox-util.c (keybox_file_rename): Rename to ...
19812         * common/sysutils.c (gnupg_rename_file): this.  Change all callers.
19813
19814         wks: Always build gpg-wks-client.
19815         + commit c564790df723beef031d83802bd7830737bd330a
19816         * tools/Makefile.am (gpg_wks_client): Remove macro.
19817         (libexec_PROGRAMS): Add gpg-wks-client.
19818
19819         gpg: New option --override-session-key-fd.
19820         + commit 43bfaf2c5417ede621c0a07721952ea549a7a139
19821         * g10/gpg.c (oOverrideSessionKeyFD): New.
19822         (opts): Add option --override-session-key-fd.
19823         (main): Handle that option.
19824         (read_sessionkey_from_fd): New.
19825
19826 2016-11-15  Werner Koch  <wk@gnupg.org>
19827
19828         gpgv: New option --enable-special-filenames.
19829         + commit 500e594c2da530e69a63fc1a40d173458682fa0e
19830         * g10/gpgv.c (oEnableSpecialFilenames): New.
19831         (opts): Add option --enable-special-filenames.
19832         (main): Implement that option.
19833
19834         gpg: Add new compliance mode "de-vs".
19835         + commit b47603a0ac24902c5bb000f8ef27cfb99aceeb81
19836         * g10/options.h (CO_DE_VS): New.
19837         (GNUPG): Also allow CO_DE_VS.
19838         * g10/gpg.c (oDE_VS): New.
19839         (parse_compliance_option): Add "de-vs".
19840         (set_compliance_option): Set "de-vs".
19841         * g10/misc.c (compliance_option_string): Return a description string.
19842         (compliance_failure): Ditto.
19843         * g10/keygen.c (ask_algo): Take care of CO_DE_VS.
19844         (get_keysize_range): Ditto.
19845         (ask_curve): Add new field to CURVES and trun flags into bit flags.
19846         Allow only Brainpool curves in CO_DE_VS mode.
19847
19848         gpg: Use usual free semantics for packet structure free functions.
19849         + commit 8ea3b4c4102dc67ed83d4419b7171e422fc01047
19850         * g10/free-packet.c (free_attributes): Turn function into a nop for a
19851         NULL arg.
19852         (free_user_id): Ditto.
19853         (free_compressed): Ditto.
19854         (free_encrypted): Ditto.
19855         (free_plaintext): Ditto.
19856         (release_public_key_parts): Avoid extra check for NULL.
19857         * g10/getkey.c (get_best_pubkey_byname): Ditto.
19858
19859 2016-11-15  Justus Winter  <justus@g10code.com>
19860
19861         g10: Optimize key iteration.
19862         + commit 12834e84aca9d74800245f0f2f2e6b5123e76173
19863         * g10/getkey.c (get_best_pubkey_byname): Use the node returned by
19864         'getkey_next' instead of doing another lookup.
19865
19866         g10: Fix memory leak.
19867         + commit d20107f6da094edd782947abb357abae5129a12c
19868         * g10/getkey.c (finish_lookup): Clarify that we do not return a
19869         reference.
19870         (lookup): Clarify the relation between RET_KEYBLOCK and RET_FOUND_KEY.
19871         Check arguments.  Actually release the node if it is not returned.
19872
19873         g10: Fix iteration over getkey results.
19874         + commit 1d03cc77e1706f7da653153ad4b58c61e4fd2573
19875         * g10/getkey.c (getkey_next): Fix invocation of 'lookup'.  If we want
19876         to use RET_FOUND_KEY, RET_KEYBLOCK must be valid.
19877
19878         g10: Fix use-after-free.
19879         + commit bd60742925414e0ef2a497df827c1913ea211a44
19880         * g10/getkey.c (pubkey_cmp): Make a copy of the user id.
19881         (get_best_pubkey_byname): Free the user ids.
19882
19883 2016-11-15  Werner Koch  <wk@gnupg.org>
19884
19885         sm: New stub option --compliance.
19886         + commit 26c7c1d72c5f2acb3edb58d610c09a635c87bdbf
19887         * sm/gpgsm.c (oCompliance): New.
19888         (opts): Add "--compliance".
19889         (main): Implement as stub.
19890
19891 2016-11-15  NIIBE Yutaka  <gniibe@fsij.org>
19892
19893         g10: Fix memory leak.
19894         + commit 1f7639ebbe58af1b581b0be7809da9ee55482992
19895         * g10/keyedit.c (menu_adduid): Don't copy 'sig'.
19896
19897 2016-11-15  Werner Koch  <wk@gnupg.org>
19898
19899         gpg: New option --compliance.
19900         + commit f86b1a15ad4bb7bcc1e9f7d209aabcb23641f7df
19901         * g10/gpg.c (oCompliance): New.
19902         (opts): Add "--compliance".
19903         (parse_tofu_policy): Use a generic description string for "help".
19904         (parse_compliance_option): New.
19905         (main): Add option oCompliance.  Factor out code for compliance
19906         setting to ...
19907         (set_compliance_option): new.
19908
19909 2016-11-15  Justus Winter  <justus@g10code.com>
19910
19911         g10: Fix memory leak.
19912         + commit 809d67e74014cb563efd965744fd11f87bbae743
19913         * g10/keyedit.c (menu_adduid): Deallocate 'sig'.
19914
19915         gpgscm: Mark cells requiring finalization.
19916         + commit 64a58e23c38db8658423bbe26fcd650330e24a88
19917         * tests/gpgscm/scheme.c (T_FINALIZE): New macro.
19918         (mk_port): Use the new macro.
19919         (mk_foreign_object): Likewise.
19920         (mk_counted_string): Likewise.
19921         (mk_empty_string): Likewise.
19922         (gc): Only call 'finalize_cell' for cells with the new flag.
19923
19924         gpgscm: Recover more cells.
19925         + commit 93cc322ac06d3045a24aece90091f7f80f3dacb8
19926         * tests/gpgscm/scheme.c (_s_return): Recover the cell holding the
19927         opcode.
19928
19929 2016-11-14  Justus Winter  <justus@g10code.com>
19930
19931         g10: Fix memory leak.
19932         + commit 2cd281c4def1ea881b92b9aba18c1892f89c1870
19933         * g10/mainproc.c (check_sig_and_print): Free 'pk'.
19934
19935         gpgscm: Avoid cell allocation overhead.
19936         + commit 83c184a66b73f312425b01008f0495610e5329a4
19937         * tests/gpgscm/scheme-private.h (struct scheme): New fields
19938         'inhibit_gc', 'reserved_cells', and 'reserved_lineno'.
19939         * tests/gpgscm/scheme.c (GC_ENABLED): New macro.
19940         (USE_GC_LOCKING): Likewise.
19941         (gc_reservations): Likewise.
19942         (gc_reservation_failure): New function.
19943         (_gc_disable): Likewise.
19944         (gc_disable): New macro.
19945         (gc_enable): Likewise.
19946         (gc_enabled): Likewise.
19947         (gc_consume): Likewise.
19948         (get_cell_x): Consume reserved cell if garbage collection is disabled.
19949         (_get_cell): Assert that gc is enabled.
19950         (get_cell): Only record cell in the list of recently allocated cells
19951         if gc is enabled.
19952         (get_vector_object): Likewise.
19953         (gc): Assert that gc is enabled.
19954         (s_return): Add comment, adjust call to '_s_return'.
19955         (s_return_enable_gc): New macro.
19956         (_s_return): Add flag 'enable_gc' and re-enable gc if set.
19957         (oblist_add_by_name): Use the new facilities to protect the
19958         allocations.
19959         (new_frame_in_env): Likewise.
19960         (new_slot_spec_in_env): Likewise.
19961         (s_save): Likewise.
19962         (opexe_0): Likewise.
19963         (opexe_1): Likewise.
19964         (opexe_2): Likewise.
19965         (opexe_5): Likewise.
19966         (opexe_6): Likewise.
19967         (scheme_init_custom_alloc): Initialize the new fields.
19968
19969 2016-11-14  NIIBE Yutaka  <gniibe@fsij.org>
19970
19971         scd: Fix status info encoding.
19972         + commit 4ee4d0b02172cf56d9582bb99e32a65c75315b25
19973         * scd/command.c (send_status_info): Do percent plus encoding correctly.
19974
19975 2016-11-12  Werner Koch  <wk@gnupg.org>
19976
19977         agent: Improve concurrency when Libgcrypt 1.8 is used.
19978         + commit 6bf698197222bf6081c249c815aebb075e8ec820
19979         * agent/gpg-agent.c (thread_init_once): Tell Libgcrypt to reinit the
19980         system call clamp.
19981         (agent_libgcrypt_progress_cb): Do not sleep if Libgcrypt is recent
19982         enough.
19983
19984 2016-11-11  Werner Koch  <wk@gnupg.org>
19985
19986         agent: Kludge to mitigate blocking calls in Libgcrypt.
19987         + commit 4473db1ef24031ff4e26c9a9de95dbe898ed2b97
19988         * agent/gpg-agent.c (agent_libgcrypt_progress_cb): Sleep for 100ms on
19989         "need_entropy".
19990
19991         dirmngr: Prepare to trigger jobs by network activity.
19992         + commit 7b04a43c05834b937b32a596f1941e9728add5fa
19993         * dirmngr/http.c (netactivity_cb): New.
19994         (http_register_netactivity_cb): New.
19995         (notify_netactivity): New.
19996         (connect_server): Call that function.
19997         * dirmngr/dirmngr.c (main): Call http_register_netactivity_cb.
19998         (netactivity_action): New stub handler.
19999
20000 2016-11-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20001
20002         agent: Clean up comments.
20003         + commit e51912f467fda963c7abcfcd4082d6eb084ba5be
20004         * agent/agent.h: Clean up comments.
20005
20006 2016-11-10  Werner Koch  <wk@gnupg.org>
20007
20008         gpg,sm: Add STATUS_ERROR keydb_search and keydb_add-resource.
20009         + commit 5d13581f4737c18430f6572dd4ef486d1ad80dd1
20010         * g10/keydb.c (keydb_add_resource): Make ANY_REGISTERED
20011         file-global.  Write a STATUS_ERROR.
20012         (maybe_create_keyring_or_box): Check for non-accessible but existant
20013         file.
20014         (keydb_search): Write a STATUS_ERROR if no keyring has been registered
20015         but continue to return NOT_FOUND.
20016         * sm/keydb.c (keydb_add_resource): Rename ANY_PUBLIC to ANY_REGISTERED
20017         and make file-global.  Write a STATUS_ERROR.
20018         (keydb_search): Write a STATUS_ERROR if no keyring has been registered
20019         but continue to return NOT_FOUND.  Also add new arg CTRL and change
20020         all callers to pass it down.
20021
20022         sm: Remove unused arg SECRET from keydb functions.
20023         + commit c8044c6e335f044d7386b9e8869bc4a0d3adff70
20024         * sm/keydb.c (struct resource_item): Remove field 'secret'.
20025         (keydb_add_resource): Remove arg 'secret' and change all callers.
20026         (keydb_new): Ditto.
20027
20028 2016-11-10  Justus Winter  <justus@g10code.com>
20029
20030         gpgscm: Recover cells from the list of recently allocated cells.
20031         + commit ee08677d63a900cea85228024861a4f5c5a87c69
20032         * tests/gpgscm/scheme.c (ok_to_freely_gc): Recover cells.
20033
20034         gpgscm: Recover cells used to maintain interpreter state.
20035         + commit e0cbd3389e2dd6ec19ee3a4c7bad81fa0f1907f5
20036         * tests/gpgscm/scheme.c (free_cell): New function.
20037         (free_cons): Likewise.
20038         (_s_return): Use the new function to recover cells used to save the
20039         state of the interpreter in 's_save'.  This reduces the need to do a
20040         garbage collection considerably.
20041
20042         gpgscm: Reduce opcode dispatch overhead.
20043         + commit d3a98ff5bc972a4c9b01b9e5338a4a59b5b4ac48
20044         * tests/gpgscm/scheme.c (s_thread_to): New macro.
20045         (CASE): Likewise.
20046         (opexe_[0-6]): Use 'CASE' instead of 'case' statements, replace
20047         's_goto' with 's_thread_to' where applicable.
20048
20049         gpgscm: Make the compile-hook configurable.
20050         + commit 568cfcde45a0d6c456d8f8be1ea0e408416badad
20051         * tests/gpgscm/scheme-private.h (struct scheme): Make field
20052         'COMPILE_HOOK' optional.
20053         * tests/gpgscm/scheme.c (opexe_0): Fix guard.
20054         (scheme_init_custom_alloc): Conditionally initialize 'COMPILE_HOOK'.
20055         * tests/gpgscm/scheme.h (USE_COMPILE_HOOK): Define to 1 by default.
20056
20057         gpgscm: Drop obsolete commented-out code.
20058         + commit 9ee184bc0afaea06785d836ed175b851b9ae532f
20059         * tests/gpgscm/scheme.c (opexe_5): Drop obsolete code.
20060
20061         gpgscm: Remove dubious stack implementation.
20062         + commit d7c5799c282a03dcce0e3d327075233353cb76cc
20063         * tests/gpgscm/scheme-private.h (struct scheme): Remove related fields.
20064         * tests/gpgscm/scheme.c: Drop all !USE_SCHEME_STACK code.
20065         * tests/gpgscm/scheme.h (USE_SCHEME_STACK): Remove macro.
20066
20067 2016-11-10  Werner Koch  <wk@gnupg.org>
20068
20069         gpg: Improve error message for --quick-gen-key.
20070         + commit 088d955bd8a6ec8bbf76c8a4c01eb08499d1d9fa
20071         * g10/keygen.c (parse_algo_usage_expire): Use a different error
20072         message for an unknown algorithm name.
20073
20074         dirmngr: Improve concurrency in the non-adns case.
20075         + commit c7ea98cd3d44abf00e32c081e5049ad1d0b1f12c
20076         * dirmngr/dns-stuff.c (map_adns_status_to_gpg_error): New.
20077         (resolve_name_adns, get_dns_cert, get_dns_cname): Use that function.
20078         (getsrv) [!USE_ADNS]: Call res_query outside of nPth.
20079
20080 2016-11-08  Justus Winter  <justus@g10code.com>
20081
20082         tests: Fix environment setup.
20083         + commit 1062953d5132af674aacfc6372e3e9f066c5d145
20084         * tests/openpgp/defs.scm (setup-legacy-environment): Do not call
20085         'setup-environment' because that will start the agent, and hence
20086         register the atexit function twice.
20087
20088         Fixes: a55393cb5f4b331cb3a715c7d9a8b91f7606f337
20089
20090         tests: Log and display output from tests when run in parallel.
20091         + commit 2a7615c48ed79e6b28710cc293ce30c812b2e5b0
20092         * tests/openpgp/run-tests.scm (test): Add field 'logfd'.
20093         (test::new, test::set-*): Adapt accordingly.
20094         (test::set-logfd): New function.
20095         (test::open-log-file): Likewise.
20096         (test::run-sync): Use the new function.
20097         (test::run-async): Likewise.
20098         (test::report): Replay the log.
20099         (run-tests-parallel): Reverse the results to restore the original
20100         order.
20101
20102         tests: Simplify test.
20103         + commit 4dd4801bfa4c3f7ba279b3d171a8ed299dbffaaa
20104         * tests/openpgp/issue2417.scm: Simplify.
20105
20106         gpgscm: Expose seek and associated constants.
20107         + commit 591d61d80f4f81176f7e236df794922df9e001a1
20108         * tests/gpgscm/ffi.c (do_seek): New function.
20109         (ffi_init): Expose 'seek' and 'SEEK_{SET,CUR,END}'.
20110         * tests/gpgscm/lib.scm: Document the new function.
20111
20112         gpgscm: Fix error message.
20113         + commit d4454837cd60981c2863955b11c9e1cc8f9e3833
20114         * tests/gpgscm/ffi.c (do_wait_processes): Fix and improve error
20115         messages.
20116
20117         tests,w32: Make cleanup more robust.
20118         + commit dd13b2a561e31045fd3d3576bab99543cd4eb6cc
20119         * tests/openpgp/run-tests.scm (run-tests-parallel): Catch errors when
20120         removing the working directory.  On Windows this can fail if there is
20121         still a process using one of the files there.
20122         (run-tests-sequential): Likewise.
20123
20124         common,w32: Simplify locking.
20125         + commit 7cbb0803847b8db618d39ff50ae6015e409ab1ae
20126         * common/asshelp.c (lock_spawning): Use the same code on Windows that
20127         we use on all other platforms.
20128         (unlock_spawning): Likewise.
20129
20130 2016-11-07  Justus Winter  <justus@g10code.com>
20131
20132         tests: Write a log file for each test.
20133         + commit 26df829fa22f027ca4a5eaf155cdaa2123afbdd5
20134         * tests/openpgp/Makefile.am (CLEANFILES): Delete logs.
20135         * tests/openpgp/run-tests.scm (test::run-sync): Write logs.
20136
20137         gpgscm: Generalize splice to write to multiple sinks.
20138         + commit abe0cc7a21d2b0b5c77cc525b999d1ede2d29185
20139         * tests/gpgscm/ffi.c (ordinal_suffix): New function.
20140         (do_splice): Generalize splice to write to multiple sinks.
20141         * tests/gpgscm/lib.scm (splice): Document this fact.
20142
20143         gpgscm: Drop 'len' argument from splice.
20144         + commit 4d98a72b88cf167295e1ecd6125b9c7a11b6239f
20145         * tests/gpgscm/ffi.c (do_splice): Drop 'len' argument, no-one uses it.
20146         * tests/gpgscm/lib.scm (splice): Document foreign function.
20147
20148         tests: Move environment creation and teardown into each test.
20149         + commit a55393cb5f4b331cb3a715c7d9a8b91f7606f337
20150         * tests/gpgscm/tests.scm (log): New function.
20151         * tests/openpgp/run-tests.scm (run-tests-parallel): Do not run the
20152         startup and teardown scripts.
20153         (run-tests-sequential): Likewise.
20154         * tests/openpgp/setup.scm: Move all functions...
20155         * tests/openpgp/defs.scm: ... here and make them less verbose.
20156         (setup-environment): New function.
20157         (setup-legacy-environment): Likewise.
20158         (start-agent): Make less verbose, run 'stop-agent' at interpreter
20159         exit.
20160         (stop-agent): Make less verbose.
20161         * tests/openpgp/finish.scm: Drop file.
20162         * tests/openpgp/Makefile.am (EXTRA_DIST): Drop removed file.
20163         * tests/openpgp/4gb-packet.scm: Use 'setup-environment' or
20164         'setup-legacy-environment' as appropriate.
20165         * tests/openpgp/armdetach.scm: Likewise.
20166         * tests/openpgp/armdetachm.scm: Likewise.
20167         * tests/openpgp/armencrypt.scm: Likewise.
20168         * tests/openpgp/armencryptp.scm: Likewise.
20169         * tests/openpgp/armor.scm: Likewise.
20170         * tests/openpgp/armsignencrypt.scm: Likewise.
20171         * tests/openpgp/armsigs.scm: Likewise.
20172         * tests/openpgp/clearsig.scm: Likewise.
20173         * tests/openpgp/conventional-mdc.scm: Likewise.
20174         * tests/openpgp/conventional.scm: Likewise.
20175         * tests/openpgp/decrypt-dsa.scm: Likewise.
20176         * tests/openpgp/decrypt.scm: Likewise.
20177         * tests/openpgp/default-key.scm: Likewise.
20178         * tests/openpgp/detach.scm: Likewise.
20179         * tests/openpgp/detachm.scm: Likewise.
20180         * tests/openpgp/ecc.scm: Likewise.
20181         * tests/openpgp/encrypt-dsa.scm: Likewise.
20182         * tests/openpgp/encrypt.scm: Likewise.
20183         * tests/openpgp/encryptp.scm: Likewise.
20184         * tests/openpgp/export.scm: Likewise.
20185         * tests/openpgp/finish.scm: Likewise.
20186         * tests/openpgp/genkey1024.scm: Likewise.
20187         * tests/openpgp/gpgtar.scm: Likewise.
20188         * tests/openpgp/gpgv-forged-keyring.scm: Likewise.
20189         * tests/openpgp/import.scm: Likewise.
20190         * tests/openpgp/issue2015.scm: Likewise.
20191         * tests/openpgp/issue2417.scm: Likewise.
20192         * tests/openpgp/issue2419.scm: Likewise.
20193         * tests/openpgp/key-selection.scm: Likewise.
20194         * tests/openpgp/mds.scm: Likewise.
20195         * tests/openpgp/multisig.scm: Likewise.
20196         * tests/openpgp/quick-key-manipulation.scm: Likewise.
20197         * tests/openpgp/seat.scm: Likewise.
20198         * tests/openpgp/shell.scm: Likewise.
20199         * tests/openpgp/signencrypt-dsa.scm: Likewise.
20200         * tests/openpgp/signencrypt.scm: Likewise.
20201         * tests/openpgp/sigs-dsa.scm: Likewise.
20202         * tests/openpgp/sigs.scm: Likewise.
20203         * tests/openpgp/ssh.scm: Likewise.
20204         * tests/openpgp/tofu.scm: Likewise.
20205         * tests/openpgp/use-exact-key.scm: Likewise.
20206         * tests/openpgp/verify.scm: Likewise.
20207         * tests/openpgp/version.scm: Likewise.
20208         * tests/openpgp/issue2346.scm: Likewise and simplify.
20209
20210         tests: Do not allow tests to be run in a shared environment.
20211         + commit ac078469cbafe85cf771fca84f376740850d10b0
20212         * tests/openpgp/README: Update.
20213         * tests/openpgp/run-tests.scm (run-tests-parallel-shared): Drop
20214         function.
20215         (run-tests-parallel-isolated): Rename to 'run-tests-parallel'.
20216         (run-tests-sequential-shared): Drop function.
20217         (run-tests-sequential-isolated): Rename to 'run-tests-sequential'.
20218
20219         tests: Fix build.
20220         + commit 37751d2b194bc33539f5b9ea0e02e9f209d2bcf6
20221         * tests/openpgp/Makefile.am: Drop dependency on 'mk-tdata'.
20222
20223         Fixes: 70215ff470c82d144e872057dfa5a478cc9195f2
20224
20225 2016-11-07  Werner Koch  <wk@gnupg.org>
20226
20227         wks: Encrypt all client mails also the target key,
20228         + commit 56e1864aa337f36317534db521fd4434d70e0784
20229         * tools/gpg-wks-client.c (encrypt_response): Add arg FINGERPRINT.
20230         (send_confirmation_response): Ditto.
20231         (process_confirmation_request): Parse out fingerprint and pass
20232         send_confirmation_response.
20233
20234 2016-11-07  Justus Winter  <justus@g10code.com>
20235
20236         tests,tools: Reimplement 'mk-tdata' in Scheme.
20237         + commit 70215ff470c82d144e872057dfa5a478cc9195f2
20238         * tests/openpgp/defs.scm (tools): Drop 'mk-tdata'.
20239         * tests/openpgp/setup.scm (make-test-data): New function.
20240         * tests/openpgp/verify.scm: Avoid 'mk-tdata'.
20241         * tools/Makefile.am (noinst_PROGRAMS): Drop 'mk-tdata'.
20242         * tools/mk-tdata.c: Drop file.
20243
20244         gpgscm,w32: Provide schemish file handling for binary files.
20245         + commit 413cc50345557e0a516f33b98e8aab19bbc8b4fe
20246         * tests/gpgscm/lib.scm (call-with-binary-input-file): New function.
20247         (call-with-binary-output-file): Likewise.
20248
20249         gpgscm: Add support for pseudo-random numbers.
20250         + commit 6e677f9b55fdb610e93134042ee41ee5c641cbdf
20251         * tests/gpgscm/ffi.c (do_getpid): New function.
20252         (do_srandom): Likewise.
20253         (random_scaled): Likewise.
20254         (do_random): Likewise.
20255         (do_make_random_string): Likewise.
20256         (ffi_init): Expose the new functions.
20257         * tests/gpgscm/lib.scm: Document the new functions.
20258
20259         g10: Fix crash.
20260         + commit 5840353d8bbcd9e75374f3bdb2547ffa7bbea897
20261         * g10/getkey.c (get_best_pubkey_byname): If 'get_pubkey_byname' does
20262         not return a getkey context, then it can return at most one key,
20263         therefore there is nothing to rank.  Also, always initialize '*retctx'
20264         to be on the safe side.
20265
20266         Fixes: ab89164be02012f1bf159c971853b8610e966301
20267
20268 2016-11-04  Justus Winter  <justus@g10code.com>
20269
20270         gpgscm: Fix printing strings containing zero bytes.
20271         + commit 1f45878a72f23d4bae08d73b614096b485f35274
20272         * tests/gpgscm/scheme.c (atom2str): Fix computing the length of Scheme
20273         strings.  Scheme strings can contain zero bytes.
20274
20275         gpgscm: Implement 'atexit'.
20276         + commit 43f8006f5c75e3d15fe200e2fa41587a73bfb07b
20277         * tests/gpgscm/ffi.scm (throw): Run *run-atexit-handlers* when
20278         terminating the interpreter.
20279         (*atexit-handlers*): New variable.
20280         (*run-atexit-handlers*): New function.
20281         (atexit): Likewise.
20282         * tests/gpgscm/main.c (main): Run *run-atexit-handlers* at normal
20283         interpreter shutdown.
20284
20285 2016-11-04  NIIBE Yutaka  <gniibe@fsij.org>
20286
20287         scd: Fix length error for READKEY.
20288         + commit cd00b07ec26c3408e6aee66957b08c6fd319b700
20289         * scd/app-openpgp.c (do_readkey): Decrement the length.
20290
20291         scd: Add --advanced option for READKEY.
20292         + commit f9da935c3eb302e75a80def51128fb6f669661d7
20293         * scd/command.c (cmd_readkey) : Support ADVANCED arg.
20294         * scd/app.c (app_readcert): Add ADVANCED arg.
20295         * scd/app-openpgp.c (do_readkey): Implement ADVANCED arg.
20296         * scd/app-nks.c (do_readkey): Error return with GPG_ERR_NOT_SUPPORTED.
20297
20298 2016-11-03  Werner Koch  <wk@gnupg.org>
20299
20300         agent: Extend the PINENTRY_LAUNCHED inquiry and status.
20301         + commit c1ea0b577a468030d2b006317ba27fc1746c4b14
20302         * agent/call-pinentry.c (start_pinentry): Get flavor and version and
20303         pass it to agent_inq_pinentry_launched.
20304         * agent/command.c (agent_inq_pinentry_launched): Add arg EXTRA.
20305         * g10/server.c (gpg_proxy_pinentry_notify): Print a new diagnostic.
20306
20307 2016-11-03  Justus Winter  <justus@g10code.com>
20308
20309         g10: Improve and unify key selection for -r and --locate-keys.
20310         + commit ab89164be02012f1bf159c971853b8610e966301
20311         * g10/getkey.c (struct pubkey_cmp_cookie): New type.
20312         (key_is_ok, uid_is_ok, subkey_is_ok): New functions.
20313         (pubkey_cmp): Likewise.
20314         (get_best_pubkey_byname): Likewise.
20315         * g10/keydb.h (get_best_pubkey_byname): New prototype.
20316         * g10/keylist.c (locate_one): Use the new function.
20317         * g10/pkclist.c (find_and_check_key): Likewise.
20318         * tests/openpgp/Makefile.am (XTESTS): Add new test.
20319         (TEST_FILES): Add new files.
20320         * tests/openpgp/key-selection.scm: New file.
20321         * tests/openpgp/key-selection/0.asc: Likewise.
20322         * tests/openpgp/key-selection/1.asc: Likewise.
20323         * tests/openpgp/key-selection/2.asc: Likewise.
20324         * tests/openpgp/key-selection/3.asc: Likewise.
20325         * tests/openpgp/key-selection/4.asc: Likewise.
20326
20327         gpgscm,tests: Add new functions to the test environment.
20328         + commit 1ec07cbc209f247fd85704f5701564e31aa56d0b
20329         * tests/gpgscm/lib.scm (first, last, powerset): New functions.
20330         * tests/gpgscm/tests.scm (interactive-shell): New function.
20331         * tests/openpgp/Makefile.am (EXTRA_DIST): Add new file.
20332         * tests/openpgp/README: Document 'interactive-shell'.
20333         * tests/openpgp/shell.scm: New file.
20334
20335 2016-11-03  Werner Koch  <wk@gnupg.org>
20336
20337         gpgconf: Add a new field to the --query-swdb output.
20338         + commit d10b67b9bc32e8feff1be86e6646fc23e58fe45d
20339         * tools/gpgconf.c (query_swdb): Insert new field with the installed
20340         version.  Check that the supplied version does not contain a colon.
20341
20342 2016-11-02  Werner Koch  <wk@gnupg.org>
20343
20344         gpgconf: Add command --query-swdb.
20345         + commit 0ed6a6df5aa421a9c5cdb1e63867f0deee79af9e
20346         * tools/gpgconf.c (aQuerySWDB): New.
20347         (opts): Add --query-swdb.
20348         (valid_swdb_name_p): New.
20349         (query_swdb): New.
20350         (main): Implement command --query-swdb.
20351
20352         common: Improve compare_string_versions.
20353         + commit 488b183811fc25c1ae49b4730491accf1adf518e
20354         * common/stringhelp.c: Include limits.h.
20355         (compare_version_strings): Change semantics to behave like strcmp.
20356         Include the patch lebel in the comparison.  Allow checking a single
20357         version string.
20358         * common/t-stringhelp.c (test_compare_version_strings): Adjust test
20359         vectors and a few new vectors.
20360         * g10/call-agent.c (warn_version_mismatch): Adjust to new sematics.
20361         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
20362         * sm/call-agent.c (warn_version_mismatch): Ditto.
20363         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
20364
20365 2016-11-02  Justus Winter  <justus@g10code.com>
20366
20367         gpgscm: Fix inclusion of readline header.
20368         + commit 60ad1a7f37ffc10e601e69a3e2d2bb14af510257
20369         * tests/gpgscm/ffi.c: Define magic macro to prevent the completion
20370         function from redefined.
20371
20372 2016-11-02  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20373
20374         build: Fix misspelled dirmngr.
20375         + commit 5e693ddfbe44d149ce0d9393d699c613ad5ea706
20376
20377
20378         Spelling: correct spelling of "passphrase".
20379         + commit 68b59bbc42ba9ec69496758743924d54a95742f0
20380         There were several different variant spellings of "passphrase".  This
20381         should fix them all for all English text.
20382
20383         I did notice that po/it.po contains multiple instances of
20384         "passhprase", which also looks suspect to me, but i do not know
20385         Italian, so i did not try to correct it.
20386
20387 2016-11-02  Justus Winter  <justus@g10code.com>
20388
20389         g10,w32: Fix build on Windows.
20390         + commit 5d4f1408d0dd055d412ae44bb4a0f28f74617f05
20391         * g10/tofu.c (begin_transaction): Use the new 'gnupg_usleep'.
20392
20393 2016-10-31  Werner Koch  <wk@gnupg.org>
20394
20395         common: New function gnupg_usleep.
20396         + commit ad491ceec6145b3781a05dc7b4a36052abeeb4b4
20397         * configure.ac (HAVE_NANOSLEEP): Test for nanosleep.
20398         * common/sysutils.c: Always include time.h.
20399         (gnupg_usleep): New.
20400
20401 2016-10-31  Andre Heinecke  <aheinecke@intevation.de>
20402
20403         w32: Fix PKG_CONFIG_LIBDIR in --build-w32.
20404         + commit 3b6b8fe32af7568ff51066d4c2e3679df6dea86f
20405         * autogen.sh: Point pkg-config to the right location.
20406
20407 2016-10-31  Neal H. Walfield  <neal@g10code.com>
20408
20409         g10: Avoid gratuitious SQLite aborts and starving writers.
20410         + commit 7a634e48b13c5d5d295b8fed9b429e1b2109a333
20411         * g10/tofu.c: Include <time.h>, <utime.h>, <fcntl.h> and <unistd.h>.
20412         (tofu_dbs_s): Add fields want_lock_file and want_lock_file_ctime.
20413         (begin_transaction): Only yield if DBS->WANT_LOCK_FILE_CTIME has
20414         changed since we took the lock.  Don't use gpgrt_yield to yield, but
20415         sleep for 100ms.  After taking the batch lock, update
20416         DBS->WANT_LOCK_FILE_CTIME.  Also take the batch lock the first time we
20417         take the real lock.  When taking the real lock, use immediate not
20418         deferred mode to avoid gratuitious aborts.
20419         (end_transaction): When dropping the outermost real lock, drop the
20420         batch lock.
20421         (busy_handler): New function.
20422         (opendbs): Set the busy handler to it when opening the DB.  Initialize
20423         CTRL->TOFU.DBS->WANT_LOCK_FILE.
20424         (tofu_closedbs): Free DBS->WANT_LOCK_FILE.
20425
20426 2016-10-30  Neal H. Walfield  <neal@g10code.com>
20427
20428         g10: Avoid reading in keys when possible.
20429         + commit eec365a02bd35d2d5c9e4d2c8d18bcd9180cf859
20430         * g10/tofu.c (build_conflict_set): If CONFLICT_SET contains a single
20431         element, don't bother to check for cross sigs.  Add parameter PK.
20432         Update callers.
20433
20434         g10: Fix bit setting.
20435         + commit 614ca00676bb8ca12b5107fec0e4ef8818445254
20436         * g10/tofu.c (build_conflict_set): Fix bit setting.
20437
20438 2016-10-28  Werner Koch  <wk@gnupg.org>
20439
20440         gpg: Enable the Issuer Fingerprint from rfc4880bis.
20441         + commit b6f08dbb0b45059cdbbb5d9be9725e437f42a8cc
20442         * g10/build-packet.c (build_sig_subpkt_from_sig): Always write the new
20443         Issuer Fingerprint sub-packet.
20444         * g10/mainproc.c (check_sig_and_print): Always consider that
20445         sub-packet.
20446
20447 2016-10-27  Werner Koch  <wk@gnupg.org>
20448
20449         dirmngr: Fix signature checking.
20450         + commit 5a1f6a0062488aaf345b1c73ba98a540e673d619
20451         * dirmngr/server.c: Include cpparray.h.
20452         (verify_swdb_parm_s): New.
20453         (verify_swdb_status_cb): New.
20454         (cmd_versioncheck): Use gpgv to correclty verify the signature.
20455         Rename some variable to comply with GNU standards.
20456
20457         gpg: Verify multiple detached signatures with different hash algos.
20458         + commit 8fced66be35db5ac2a6bfdb9bccb2c0e582d8256
20459         * g10/mainproc.c (proc_tree): Loose check.  Enable all algos.
20460
20461         common: Add GNUPG_MODULE_NAME_GPGV.
20462         + commit ece9ade4b44fb3d5d120cfd32b23632e5efd2134
20463         * common/util.h (GNUPG_MODULE_NAME_GPGV): New.
20464         * common/homedir.c (gnupg_module_name): Implement.
20465
20466 2016-10-27  Justus Winter  <justus@g10code.com>
20467
20468         g10: Fix iteration over getkey results.
20469         + commit 8ea72a776a88f3c851e812d258355be80caa1bc1
20470         * g10/getkey.c (getkey_next): Return the public key in PK even if
20471         RET_KEYBLOCK is NULL.
20472
20473         g10: Assert preconditions.
20474         + commit 66a0091d74768ab3a4a5342d3645e1834c59045a
20475         * g10/getkey.c (get_pubkey_byname): Assert preconditions.
20476
20477 2016-10-27  Werner Koch  <wk@gnupg.org>
20478
20479         dirmngr: Do not implement --supervised in Windows.
20480         + commit cf20b23c146c9e499263654644035796475de097
20481         * dirmngr/dirmngr.c (opts) [W32]: Remove --supervised.
20482         (main) [W32]: Ditto.
20483
20484         common: Remove debug output from gnupg_get_socket_name.
20485         + commit a9c8b5fbe7ae241bf45bdee15884abc7891aedf9
20486         * common/sysutils.c (gnupg_get_socket_name): Remove debug message and
20487         use my_error_from_syserror.
20488
20489 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
20490
20491         dirmngr: ADNS error handling fix.
20492         + commit 45dfc02b47f798f5a3b9973ca6a9f5a907d7e665
20493         * dirmngr/dns-stuff.c (resolve_name_adns, get_dns_cert, get_dns_cname):
20494         Use gpg_error and gpg_err_code_from_errno to compose the error value.
20495
20496 2016-10-27  Werner Koch  <wk@gnupg.org>
20497
20498         gpg: Convey --quick option to dirmngr for --auto-key-retrieve.
20499         + commit a15ed5a1fd5307b3ec1822daf3b138b187db0b5e
20500         * g10/call-dirmngr.c (gpg_dirmngr_ks_get): Add arg 'quick'.
20501         (gpg_dirmngr_wkd_get): Ditto.
20502         * g10/keyserver.c (keyserver_get): Add arg 'quick'.
20503         (keyserver_get_chunk): Add arg 'quick'.
20504         (keyserver_import_fprint): Ditto.  Change callers to pass 0 for it.
20505         (keyserver_import_keyid): Ditto.
20506         (keyserver_import_wkd): Ditto.
20507         * g10/mainproc.c (check_sig_and_print): Call the 3 fucntions with
20508         QUICK set.
20509
20510 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
20511
20512         common: Fix gnupg_inotify_has_name, differently.
20513         + commit 8b3d0d1a36cab83dafb98ccb7895144edb95e298
20514         * common/sysutils.c (gnupg_inotify_has_name): Use void * to stop the
20515         warning.
20516
20517         dirmngr: More ADNS error fix.
20518         + commit 6f1d8123d61b3efac94b4c61ee75bd947790ba42
20519         * dirmngr/dns-stuff.c (get_dns_cert, getsrv, get_dns_cname): Fix return
20520         value.
20521
20522         dirmngr: Fix error return for ADNS.
20523         + commit 8a9341b42cd1891090d45cc068bff84b2b3edb50
20524         * dirmngr/dns-stuff.c (resolve_name_adns): Use RET for return value.
20525
20526         g10: Fix ECDH, clarifying the format.
20527         + commit ca0ee4e381d0b6a57e4ddc8f4bb2390eb97a2540
20528         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Returns error when
20529         it's short.  Clarify the format.  Handle other prefixes correctly.
20530
20531         scd: Add 0x41 prefix for x-coordinate only result.
20532         + commit 6bbd97d6c771b2e2c7cfcff6d5a823f0fb44d443
20533         * scd/app-openpgp.c (do_decipher): When it's x-coordinate only, add the
20534         prefix 0x41.
20535
20536 2016-10-27  Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
20537
20538         g10: ECDH shared point format.
20539         + commit b648f28f9f8b889f1217a649ded1d45f261bb2bf
20540         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Improve handling of
20541         ECDH shared point format.
20542
20543 2016-10-27  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20544
20545         dirmngr: Implement --supervised command (for systemd, etc).
20546         + commit 75f8aaf5bc2dc7fcffe2987a572d489155c91eb9
20547         * dirmngr/dirmngr.c (main): Add new --supervised command, which is a
20548         mode designed for running under a process supervision system like
20549         systemd or runit.
20550         * doc/dirmngr.texi: document --supervised option.
20551
20552         agent,common: move get_socket_name() into common.
20553         + commit 6316b28e896957adb76a61a41d2e1c2a08d9f716
20554         * agent/gpg-agent.c (get_socket_name): move to ...
20555         * common/sysutils.c (gnupg_get_socket_name): ... here.
20556
20557         dirmngr: report actual socket name.
20558         + commit 6bb6ac56cca8135666387a0b9d88dd6b50311418
20559         * dirmngr/dirmngr.[ch] (dirmngr_get_current_socket_name): new function
20560         to report known socket name.
20561         * dirmngr/server.c (cmd_getinfo): use dirmngr_get_current_socket_name
20562         to report correct socket name.
20563
20564 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
20565
20566         common: Fix gnupg_inotify_has_name.
20567         + commit bc28f320fa6f5b9fcdb73dba5e6c582daf7992c5
20568         * common/sysutils.c (gnupg_inotify_has_name): Take care of the
20569         alignment.
20570
20571         dirmngr: Fix help string and argument.
20572         + commit 96414baf36b8e6385b71847c789d489ebe176a93
20573         * dirmngr/server.c (hlp_versioncheck): Add a newline.
20574         (cmd_versioncheck): Fix argument.
20575
20576 2016-10-26  Werner Koch  <wk@gnupg.org>
20577
20578         dirmngr: Fix hang due to deferred thread initialization.
20579         + commit d1ccab5176d7719328b287544b54b85e0277b146
20580         * dirmngr/dirmngr.c (main): Call ldap_wrapper_launch_thread after
20581         thread_init.
20582
20583         agent: Avoid double error message.
20584         + commit b77f95a4a675fd20f6eeb611f4e7b519eceb4ad3
20585         * agent/gpg-agent.c (map_supervised_sockets): Shorten error message.
20586         Remove unneeded diagnostic.
20587
20588         common: Use GPG_ERR_INV_VALUE instead of GPG_ERR_EINVAL.
20589         + commit ece13f177d948013b6f3df926406c0cd947abc25
20590         * common/sysutils.c (gnupg_inotify_watch_socket): Return
20591         GPG_ERR_INV_VALUE for a missing socket name and set proper error
20592         source.
20593
20594         tests: Improve portability of fake-pinentry.
20595         + commit 21b318452abbfe21c45c2a67dae0e3a81cff1090
20596         * tests/openpgp/fake-pinentry.c: Make all functions static.
20597         (get_passphrase): s/unlink/remove/ because that is standard C.
20598         (spacep): Rename to whitespace and change all callers.
20599         (main): Move macro out of if-then chain.
20600
20601 2016-10-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20602
20603         agent: --supervised mode improvements.
20604         + commit 27f6d5b9f4b6057ddeb9ace87a1e7e61ebac63e6
20605         * agent/gpg-agent.c (map_supervised_socket): if the agent is running
20606           in --supervised mode and is not actually given LISTEN_FDNAMES
20607           directives, require at least fd 3 to be open for listening.
20608
20609         common: avoid segfault.
20610         + commit 3b5f5e0eb02ecbdcf59722755f22a9d2f88de6e6
20611         * common/sysutils.c (gnupg_inotify_watch_socket): return EINVAL if
20612           socket_name is NULL, rather than segfaulting
20613
20614 2016-10-25  Justus Winter  <justus@g10code.com>
20615
20616         agent,tests,w32: Fix relaying pinentry user data, fix fake-pinentry.
20617         + commit 852b8f0b89d447536dfdf6cd4ea91615c75491ce
20618         * agent/call-pinentry.c (start_pinentry): Also send the user data
20619         using an Assuan 'OPTION' command.
20620         * tests/openpgp/fake-pinentry.c (get_passphrase): Fix updating
20621         passphrase file.
20622         (spacep): Include newline characters.
20623         (rstrip): New function.
20624         (main): Handle Windows line endings.  Handle the userdata option, and
20625         restart with the new options.
20626
20627         tests: Do not autostart gpg-agents on teardown.
20628         + commit f88f11a25665dca7490a09088aa24edf396e4c40
20629         * tests/openpgp/defs.c (stop-agent): Use '--no-autostart' when calling
20630         gpg-connect-agent.
20631
20632 2016-10-25  Werner Koch  <wk@gnupg.org>
20633
20634         dirmngr: Allow command VERSIONCHECK to handle 3 part version numbers.
20635         + commit b120f358c25cc846ca9d841d47e71ca1a7fe02e4
20636         * dirmngr/server.c (parse_version_string): Add arg MICRO and set it.
20637         (cmp_version): Extend to handle the MICRO part.
20638         (confucius_mktmpdir): Rename to my_mktmpdir.
20639         (my_mktmpdir): xstrconcat does not fail; use strconcat.
20640         (fetch_into_tmpdir): Improve error checking.
20641
20642         common: Use strconcat in gnupg_setenv.
20643         + commit 7983f8758703071710c11bf2a255efcd71836b65
20644         * common/sysutils.c (gnupg_setenv): Replace malloc+stpcpy by
20645         strconcat.  Indent cpp conditionals.
20646         (gnupg_unsetenv): Indent cpp conditionals.
20647
20648 2016-10-24  Werner Koch  <wk@gnupg.org>
20649
20650         gpg: Replace two sprintf calls.
20651         + commit 9d6146d6f9870fbfcec15cdc4becaf094d5a90e0
20652         * g10/keygen.c (print_status_key_created): Use snprintf for now.
20653         (ask_expire_interval): Replace xmalloc and sprintf by xasprintf.
20654
20655         agent: Minor cleanup for recent change in findkey.c.
20656         + commit 8c40b3b98d3ddeda79fde981e6539c5b3b09d9a2
20657         * agent/findkey.c (agent_write_private_key): Avoid label name error.
20658
20659         agent: Slightly change structure of cmd_readkey.
20660         + commit fdb653a33ea1a24d1159880624dbbcc0867865b5
20661         * agent/command.c (cmd_readkey): Avoid a leave label in the middle of
20662         the code.  Remove the special return.
20663
20664 2016-10-24  Kai Michaelis  <kai@gnupg.org>
20665
20666         dirmngr: Fix segfault in VERSIONCHECK.
20667         + commit 5e7dfd979d2d91800d90c3ce9a66755df3217682
20668         * dirmngr/server.c (cmd_versioncheck): The VERSIONCHECK command crashes
20669         when called without program version.
20670
20671 2016-10-24  NIIBE Yutaka  <gniibe@fsij.org>
20672
20673         scd: Use canonical curve name of libgcrypt.
20674         + commit b1828c17fc475def1ee9e06f083f513f568c241b
20675         * scd/app-openpgp.c (send_key_attr): Use curve instead of OID.
20676         (ecdh_params): New.
20677         (ecc_read_pubkey): Use ecdh_params.  Use curve name.
20678         (ecc_writekey): Likewise.
20679         (ecc_curve): Rename from ecc_oid.
20680         (parse_algorithm_attribute): Use ecc_curve.
20681         * g10/call-agent.c (learn_status_cb): Use openpgp_is_curve_supported to
20682         intern the curve name string.
20683         * g10/card-util.c (card_status): Conver curve name to alias for print.
20684
20685         common: Fix openpgp_is_curve_supported.
20686         + commit 945e7ab0ddedf5f58afd97d81e101939de5b5d89
20687         * common/openpgp-oid.c (openpgp_is_curve_supported): Support both of
20688         canonical name of the curve and alias.
20689
20690         g10: Fix card keygen for decryption.
20691         + commit acef0951646b47c87ccc1c616f0105a068e7ed86
20692         * g10/keygen.c (do_generate_keypair): Fix arguments.
20693
20694 2016-10-22  NIIBE Yutaka  <gniibe@fsij.org>
20695
20696         g10: More card key generation change.
20697         + commit 987bbb2276aeb6bee2793e8406e223717b605009
20698         * g10/keygen.c (gen_card_key): Add back ALGO as the second argument.
20699         Don't get ALGO by KEY-ATTR by this function.  It's caller to provide
20700         ALGO.  Don't do that by both of caller and callee.
20701         (generate_keypair): Only put paramerters needed.  Use parameters
20702         for ALGO to call gen_card_key.
20703         (generate_card_subkeypair): Get ALGO and call gen_card_key with it.
20704
20705 2016-10-21  Andre Heinecke  <aheinecke@intevation.de>
20706
20707         g10: Write first keybox record in binary mode.
20708         + commit f7e50634be71ce3028726f23edf14454109a04a8
20709         * g10/keydb.c (maybe_create_keyring_or_box): Open in binary mode.
20710
20711 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
20712
20713         g10,scd: Fix ECC keygen.
20714         + commit d2653b1a6db90aed073194a51fd61023d69773ec
20715         * g10/keygen.c (generate_keypair): For card key generation, fill
20716         parameters by KEY-ATTR.
20717
20718         * scd/app-openpgp.c (ecc_read_pubkey): OID should be freed at last,
20719         after its reference by OIDBUF is finished.
20720         (ecc_writekey): Likewise.
20721
20722         scd: Fix segfault changing key attr.
20723         + commit 693e657ff04756737dce025203c0deba480ea8de
20724         * asc/app-openpgp.c (change_keyattr_from_string): Release after
20725         allocated.
20726
20727 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
20728             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
20729
20730         g10: Don't ask keysize for for non-RSA card.
20731         + commit dafce6f698bec6e9d4c0125b90754d0687294e86
20732         * g10/card-util.c (card_status): Bug fix for keyno.
20733         (ask_card_rsa_keysize, do_change_rsa_keysize): Rename.
20734         (generate_card_keys): Only ask keysize when RSA.
20735         (card_generate_subkey): Likewise.
20736
20737         g10: Support ECC for gen_card_key.
20738         + commit 161cb22f13bcd8cbdb08558d9926b2168a8297ac
20739         * g10/keygen.c (gen_card_key): Remove the first argument of ALGO.
20740         (do_generate_keypair, generate_card_subkeypair): Follow the change.
20741
20742 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
20743
20744         Fix use cases of snprintf.
20745         + commit 6e85ac77af594035137950d801d8a1bacce548a3
20746         * agent/call-pinentry.c, agent/call-scd.c, agent/command.c,
20747         build-aux/speedo/w32/g4wihelp.c, common/get-passphrase.c,
20748         dirmngr/dirmngr.c, g10/call-agent.c, g10/cpr.c, g10/keygen.c,
20749         g10/openfile.c, g10/passphrase.c, scd/app-openpgp.c, scd/scdaemon.c,
20750         sm/call-agent.c, sm/call-dirmngr.c, sm/certreqgen.c: Fix assuming C99.
20751
20752         agent: Fix saving with FORCE=1.
20753         + commit 1ffd475f99eaff4e40950eda88702f8db9288eb5
20754         * agent/findkey.c (agent_write_private_key): Recover from an error of
20755         GPG_ERR_ENOENT when FORCE=1 and it is opened with "rb+".
20756
20757 2016-10-20  Justus Winter  <justus@g10code.com>
20758
20759         tests: Simplify test.
20760         + commit 71158d8d5f823888abc8588caa6497860ce59c06
20761         * tests/openpgp/quick-key-manipulation.scm: Avoid creating a temporary
20762         home directory, just make the uids unique.
20763
20764         tests: Flush stdout in the fake pinentry.
20765         + commit ca9597f080f70a8435daaeb5449bef0462a1402a
20766         * tests/openpgp/fake-pinentry.c (reply): Flush stdout.
20767
20768         common,w32: Fix setting environment variables on Windows.
20769         + commit 8c7c4faf3de28ca70a60e6b15f51c1b206e0ddd9
20770         * common/sysutils.c (gnupg_setenv): Also update the environment block
20771         maintained by the C runtime.
20772         (gnupg_unsetenv): Likewise.
20773         * tests/gpgscm/ffi.c (do_setenv): Fix error handling.
20774
20775         tests,w32: Cope with Windows line endings.
20776         + commit bf37916a23bd0929fc4a5f28c9a41f43c5a473f6
20777         * tests/openpgp/issue2015.scm: Rstrip line before comparison.
20778
20779         tests: Create and remove socket directories.
20780         + commit 2d794779e0fd9d9a1efc98e7bd77a296a25f4293
20781         * tests/openpgp/defs.scm (start-agent): Move function here and create
20782         the socket directory prior to starting the agent.
20783         (stop-agent): Move function here and remove the socket directory.
20784         * tests/openpgp/finish.scm: Adapt.
20785         * tests/openpgp/setup.scm: Likewise.
20786
20787 2016-10-20  NIIBE Yutaka  <gniibe@fsij.org>
20788
20789         agent, g10: Fix keygen.
20790         + commit 9a34e2142b426b98c73fd888102ea1596bbce62a
20791         * agent/command.c (cmd_readkey): Get length after card_readkey.
20792         * g10/keygen.c (gen_card_key): Fix off-by-one error.
20793
20794         scd: GENKEY updates the public key in APP.
20795         + commit b680f79cc112c4831293e259d7db2921bcd783a4
20796         * scd/app-openpgp.c (rsa_read_pubkey, ecc_read_pubkey): New.
20797         (read_public_key): New.
20798         (get_public_key, do_genkey): Use read_public_key.
20799
20800         g10: smartcard keygen change.
20801         + commit 980c037bedb968ddf155dd334c0a70b918a17759
20802         * g10/call-agent.c (scd_genkey_cb_append_savedbytes): Remove.
20803         (scd_genkey_cb): Only handle KEY-CREATED-AT and PROGRESS.
20804         (agent_scd_genkey): Remove INFO argument.  CREATETIME is now in/out
20805         argument.
20806         (agent_readkey): Use READKEY --card instead of SCD READKEY.
20807         * g10/keygen.c (gen_card_key): Use READKEY --card command of the agent
20808         to retrieve public key information from card and let the agent make
20809         a file for private key with shadow info.
20810
20811         agent: Add --card option for READKEY.
20812         + commit 82cbab906a3e72a98fdc16096f2f0451465969a2
20813         * agent/findkey.c (agent_write_shadow_key): New.
20814         * agent/command-ssh.c (card_key_available): Use agent_write_shadow_key.
20815         * agent/learncard.c (agent_handle_learn): Likewise.
20816         * agent/command.c (cmd_readkey): Add --card option.
20817
20818 2016-10-19  Kai Michaelis  <kai@gnupg.org>
20819
20820         dirmngr: improve VERSIONCHECK.
20821         + commit 72a99f582dad4cb4c3b05b97c7ebb8d537f10b79
20822         Replace strtok_r() and code formatting. Use code from libgpg-error for
20823         version comparison.
20824
20825 2016-10-18  Justus Winter  <justus@g10code.com>
20826
20827         common: Fix copying data to estreams.
20828         + commit 8dce5ee55a0268d196023224dcf3020306922490
20829         * common/exectool.c (copy_buffer_do_copy): Correctly account for
20830         partially written data in the event of errors.
20831
20832         common,w32: Communicate with child in non-blocking mode.
20833         + commit 05a1e412332dd980353a4e3e59bc75ba40bae7fc
20834         * common/exechelp-w32.c (gnupg_spawn_process): Open streams in
20835         non-blocking mode if requested.
20836
20837         common,w32: Extend gnupg_create_inbound_pipe et al.
20838         + commit f2d39a6d051413289c717b9cd2dc387a270b8e7c
20839         * common/exechelp-w32.c (do_create_pipe): Rename, add arguments, and
20840         create a stream if reqested.
20841         (gnupg_create_inbound_pipe): Use the extended function to open the
20842         stream if requested.
20843         (gnupg_create_outbound_pipe): Likewise.
20844         (gnupg_create_pipe): Update call site.
20845
20846         common,w32: Make use of default_errsource in exechelp.
20847         + commit 727ca74bb942464217e678012cccbfc347ae08a5
20848         * common/exechelp-posix.c (my_error_from_syserror, my_error): New.
20849         Use them instead of gpg_error and gpg_error_from_syserror.
20850
20851 2016-10-18  NIIBE Yutaka  <gniibe@fsij.org>
20852             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
20853
20854         scd: Support ECC key generation.
20855         + commit 34439da2d62b964a914ace66bae7e38f619582a4
20856         * scd/app-openpgp.c (get_public_key): Fix a message.
20857         (change_keyattr_from_string, ecc_writekey): Call mpi_release sooner.
20858         (do_genkey): Add ECC support.
20859
20860 2016-10-18  NIIBE Yutaka  <gniibe@fsij.org>
20861
20862         scd: minor cleanup to merge other works.
20863         + commit f1845f25dbea79c191427710fa56ed01e63a045b
20864         * scd/iso7816.c (do_generate_keypair): Use const char * for DATA.
20865         (iso7816_generate_keypair, iso7816_read_public_key): Likewise.
20866         * scd/app-openpgp.c (get_public_key): Follow the change.
20867         (do_genkey): Ditto.  Use ERR instead of RC.  Use u32 for CREATED_AT.
20868
20869 2016-10-17  Justus Winter  <justus@g10code.com>
20870
20871         gpgscm: Initialize nesting stack.
20872         + commit c2e713d9e25ef8b61e8eeb3c01ee1e31cb70b794
20873         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize nesting
20874         stack.
20875
20876 2016-10-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20877
20878         doc: Document how to manually shut down gpg-agent.
20879         + commit 869c06efa791bbc8330becdb3f13f7cf9506257e
20880         * doc/gpg-agent.texi: document "gpgconf --kill gpg-agent" for manual
20881           agent termination.
20882
20883         This was requested in a side-comment in https://bugs.debian.org/840669
20884
20885         doc: Point gpg-agent(1) at the right gpg manpage in SEE ALSO.
20886         + commit c53ce53ab1fa6a328c368f2a15e3ccd803f03ee2
20887         * doc/gpg-agent.texi (SEE ALSO): refer to @gpgname, instead of
20888           hard-coding "gpg2".
20889
20890 2016-10-17  NIIBE Yutaka  <gniibe@fsij.org>
20891
20892         scd: Fix keytocard for ECC.
20893         + commit 25428be52168fa9c581b7f11c95a5c63b25343b7
20894         * scd/app-openpgp.c (build_ecc_privkey_template): Size can be greater
20895         than 128 when it comes with public key for curve of larger field.
20896
20897         gpgconf: Fix for --homedir.
20898         + commit 70a8584ec4389209762eb65bb77f20f7881577be
20899         * tools/gpgconf-comp.c (gpg_agent_runtime_change,
20900         scdaemon_runtime_change, dirmngr_runtime_change): Provide the homedir
20901         arguments by --homedir when it's not default.
20902
20903 2016-10-16  Werner Koch  <wk@gnupg.org>
20904
20905         agent: Use straightforward names for the default socket names.
20906         + commit 0b0f9a3788cb5d3c26cec16cd24acc973069d280
20907         * configure.ac (GPG_AGENT_SOCK_NAME): Change name to *.extra.
20908         (GPG_AGENT_EXTRA_SOCK_NAME): Change name to *browser.
20909
20910 2016-10-15  Werner Koch  <wk@gnupg.org>
20911
20912         agent: Move inotify code to common and improve it.
20913         + commit 2f7d4c38c9e7bcc14e6e0bf219d688c40a4afecb
20914         * common/sysutils.c: Include sys/inotify.h.
20915         (my_error_from_syserror, my_error): New.
20916         (gnupg_inotify_watch_socket): New.
20917         (gnupg_inotify_has_name): New.
20918         * agent/gpg-agent.c: Do not include sys/inotify.h.
20919         (my_inotify_is_name): Remove.
20920         (handle_connections): Remove HAVE_INOTIFY_INIT protected code and use
20921         the new functions.
20922
20923 2016-10-14  Kai Michaelis  <kai@gnupg.org>
20924
20925         dirmngr: use gnupg_mkdtemp instead of mkstemp.
20926         + commit c318561ef4c97f0c2767aef377531d58174060a1
20927         MinGW on debian does not support mkstemp.
20928
20929         dirmngr: add VERSIONCHECK command.
20930         + commit f99c5fa1c970dc1122ac62371eb8d758f380ed57
20931         Given an application name and version VERSIONCHECK fetches the software
20932         version list from version.gnupg.org, verifies the signature and returns
20933         whenever the given version is older (UPDATE), current (CURRENT) or newer
20934         (ROLLBACK).
20935
20936 2016-10-13  Neal H. Walfield  <neal@g10code.com>
20937
20938         tests: Use shorter filenames.
20939         + commit 0c56ad5a8d89d69a9ed00571720b3b105f955214
20940         * tests/openpgp/tofu/cross-sigs/
20941           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.gpg: Rename from this...
20942         * tests/openpgp/tofu/cross-sigs/EC38277E-1.gpg: .. to this.
20943         * tests/openpgp/tofu/cross-sigs/
20944           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.txt: Rename from this...
20945         * tests/openpgp/tofu/cross-sigs/EC38277E-1.txt: .. to this.
20946         * tests/openpgp/tofu/cross-sigs/
20947           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.gpg: Rename from this...
20948         * tests/openpgp/tofu/cross-sigs/EC38277E-2.gpg: .. to this.
20949         * tests/openpgp/tofu/cross-sigs/
20950           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.txt: Rename from this...
20951         * tests/openpgp/tofu/cross-sigs/EC38277E-2.txt: .. to this.
20952         * tests/openpgp/tofu/cross-sigs/
20953           1938C3A0E4674B6C217AC0B987DB2814EC38277E-3.txt: Rename from this...
20954         * tests/openpgp/tofu/cross-sigs/EC38277E-3.txt: .. to this.
20955         * tests/openpgp/tofu/cross-sigs/
20956           1938C3A0E4674B6C217AC0B987DB2814EC38277E-secret.gpg: Rename from
20957           this...
20958         * tests/openpgp/tofu/cross-sigs/EC38277E-secret.gpg: .. to this.
20959         * tests/openpgp/tofu/cross-sigs/
20960           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.gpg: Rename from this...
20961         * tests/openpgp/tofu/cross-sigs/871C2247-1.gpg: .. to this.
20962         * tests/openpgp/tofu/cross-sigs/
20963           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.txt: Rename from this...
20964         * tests/openpgp/tofu/cross-sigs/871C2247-1.txt: .. to this.
20965         * tests/openpgp/tofu/cross-sigs/
20966           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.gpg: Rename from this...
20967         * tests/openpgp/tofu/cross-sigs/871C2247-2.gpg: .. to this.
20968         * tests/openpgp/tofu/cross-sigs/
20969           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.txt: Rename from this...
20970         * tests/openpgp/tofu/cross-sigs/871C2247-2.txt: .. to this.
20971         * tests/openpgp/tofu/cross-sigs/
20972           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.gpg: Rename from this...
20973         * tests/openpgp/tofu/cross-sigs/871C2247-3.gpg: .. to this.
20974         * tests/openpgp/tofu/cross-sigs/
20975           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.txt: Rename from this...
20976         * tests/openpgp/tofu/cross-sigs/871C2247-3.txt: .. to this.
20977         * tests/openpgp/tofu/cross-sigs/
20978           DC463A16E42F03240D76E8BA8B48C6BD871C2247-4.gpg: Rename from this...
20979         * tests/openpgp/tofu/cross-sigs/871C2247-4.gpg: .. to this.
20980         * tests/openpgp/tofu/cross-sigs/
20981           DC463A16E42F03240D76E8BA8B48C6BD871C2247-secret.gpg: Rename from
20982           this...
20983         * tests/openpgp/tofu/cross-sigs/871C2247-secret.gpg: .. to this.
20984         * tests/openpgp/Makefile.am (TEST_FILES): Update accordingly.
20985
20986         g10: Be more careful when checking if a binding is signed by a UTK.
20987         + commit 95d0f3e5eebd85dcf226dca14891a1215bfe93ae
20988         * g10/tofu.c (signed_by_utk): When checking if a key is signed by an
20989         ultimately trusted key, only consider the signatures on the specified
20990         user id.
20991         * tests/openpgp/tofu.scm: Add test for the above.
20992
20993         tests: Add test data to TEST_FILES.
20994         + commit d2d936fbe86d61b89cead95df633b2b575690e05
20995         * tests/openpgp/Makefile.am (TEST_FILES): Add new test data.
20996
20997         g10: Be more careful when checking cross signatures.
20998         + commit 4c0389f8eb19ae7dfd9c5d784a629b386d93cc5c
20999         * g10/tofu.c (cross_sigs): When checking cross signatures, only
21000         consider the signatures on the specified user id.
21001         * tests/openpgp/tofu.scm: Add test for the above.
21002         * tests/openpgp/tofu/cross-sigs/
21003           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.gpg:
21004           New file.
21005         * tests/openpgp/tofu/cross-sigs/
21006           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.txt: New file.
21007         * tests/openpgp/tofu/cross-sigs/
21008           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.gpg: New file.
21009         * tests/openpgp/tofu/cross-sigs/
21010           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.txt: New file.
21011         * tests/openpgp/tofu/cross-sigs/
21012           1938C3A0E4674B6C217AC0B987DB2814EC38277E-3.txt: New file.
21013         * tests/openpgp/tofu/cross-sigs/
21014           1938C3A0E4674B6C217AC0B987DB2814EC38277E-secret.gpg: New file.
21015         * tests/openpgp/tofu/cross-sigs/
21016           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.gpg: New file.
21017         * tests/openpgp/tofu/cross-sigs/
21018           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.txt: New file.
21019         * tests/openpgp/tofu/cross-sigs/
21020           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.gpg: New file.
21021         * tests/openpgp/tofu/cross-sigs/
21022           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.txt: New file.
21023         * tests/openpgp/tofu/cross-sigs/
21024           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.gpg: New file.
21025         * tests/openpgp/tofu/cross-sigs/
21026           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.txt: New file.
21027         * tests/openpgp/tofu/cross-sigs/
21028           DC463A16E42F03240D76E8BA8B48C6BD871C2247-4.gpg: New file.
21029         * tests/openpgp/tofu/cross-sigs/
21030           DC463A16E42F03240D76E8BA8B48C6BD871C2247-secret.gpg: New file.
21031         * tests/openpgp/tofu/cross-sigs/README: New file.
21032
21033         g10: Still check if the key is an UTK or cross signed in batch mode.
21034         + commit e09166c77273f459c8f87cab9224f85808af2cba
21035         * g10/tofu.c (get_trust): If POLICY is ask, but we can't ask, don't
21036         bail immediately.  Instead, check if the key in question is an
21037         ultimately trusted key or cross signed.
21038
21039         g10: If an sqlite operation fails, map the error code to GPG_ERR_GENERAL
21040         + commit 5bf92e51dfdfb4f4746ecd817d8d2240ed27ea74
21041         * g10/tofu.c (get_policy): If an sqlite operation fails, map the error
21042           code to GPG_ERR_GENERAL.
21043         (ask_about_binding): Likewise.
21044         (build_conflict_set): Likewise.
21045         (get_trust): Likewise.
21046         (show_statistics): Likewise.
21047         (tofu_register_signature): Likewise.
21048         (tofu_register_encryption): Likewise.
21049
21050         tests: Remove support for deprecated functionality.
21051         + commit 2282c3b761413dfa894300e70084bbd58908c0b1
21052         * tests/openpgp/tofu.scm: Don't remove tofu.d.  It's deprecated.
21053
21054 2016-10-12  Neal H. Walfield  <neal@g10code.com>
21055
21056         g10: When changing a TOFU binding's policy, update the conflict info.
21057         + commit 3ad17e72fa81d18c95732ddcd4def244f52bb5b1
21058         * g10/tofu.c (record_binding): Take an additional argument, CONFLICT.
21059         Set the binding's conflict accordingly.  Update callers.
21060
21061         g10: Make a singular string singular.
21062         + commit ca84f65c7cf2c6a08a01018519965a82e6c52cac
21063         * g10/tofu.c (ask_about_binding): Make the singular string singular.
21064
21065         g10: Correctly determine whether a binding has a conflict.
21066         + commit 6fdf37f0831949cb279de6dc6b247ab2ed53fe5a
21067         * g10/tofu.c (build_conflict_set): A binding has a conflict is
21068         conflict is *not* NULL, not if it is NULL.
21069
21070         g10: Fix a column's type in TOFU DB.
21071         + commit 78eda335fd1c29038b74b9cc912b6a4515fccd9f
21072         * g10/tofu.c (initdb): Change policy from a boolean to an integer.
21073
21074 2016-10-07  Justus Winter  <justus@g10code.com>
21075
21076         tests: Rework test environment setup.
21077         + commit cbbf0a7a8da1757fea29cff0daaa42a6bbb95b26
21078         * tests/openpgp/setup.scm: Import one keyring at a time.  This works
21079         around a yet to be investigated hang on Windows.  It is also much
21080         prettier.
21081
21082         tests: Improve handling of Windows newlines.
21083         + commit 1f76f8d8bc65fad98927c977baf4d5e36dafe52b
21084         * tests/gpgscm/lib.scm (string-split-newlines): New function.
21085         * tests/openpgp/default-key.scm: Use new function.
21086         * tests/openpgp/defs.scm: Likewise.
21087         * tests/openpgp/export.scm: Likewise.
21088         * tests/openpgp/import.scm: Likewise.
21089
21090         gpgscm: Improve test of low-level functions.
21091         + commit 11eac7eb2fa3392a9aa052f8f5bb9875129ab84b
21092         * tests/gpgscm/t-child.c: Print large amounts of data.
21093         * tests/gpgscm/t-child.scm: Test that this works.
21094
21095         gpgscm: Improve path handling.
21096         + commit dff266059813d22d1e2ba7e77279999cd41ceb75
21097         * tests/gpgscm/ffi.c (ffi_init): New Scheme variable '*win32*'.
21098         * tests/gpgscm/tests.scm (canonical-path): Correctly handle paths with
21099         drive letter on Windows.  Use 'path-join'.
21100         (path-expand): Use 'path-join'.
21101
21102         tools: Fix error handling.
21103         + commit 5afbfdfd59540cb882d891ff1f4afa73fe48f99a
21104         * tools/gpgtar-create.c (gpgtar_create): Do not crash if opening the
21105         tarball failed.
21106
21107 2016-10-07  NIIBE Yutaka  <gniibe@fsij.org>
21108
21109         agent: Fix get_socket_name.
21110         + commit fb3b3e1e7a4219f61a834fd07809898918611c2f
21111         * agent/gpg-agent.c (get_socket_name): Fix the size of copying.
21112
21113 2016-10-07  Werner Koch  <wk@gnupg.org>
21114
21115         gpg: Put extra parens around bit tests.
21116         + commit 5d43d28aa3c44c3a27fde823f467b0c4be1a58c2
21117         * g10/options.h (DBG_MPI): New.
21118         * g10/gpg.c (set_debug): Use macro or extra parens for binary operator.
21119         * g10/parse-packet.c (set_packet_list_mode): Use dbg macro.
21120
21121 2016-10-07  NIIBE Yutaka  <gniibe@fsij.org>
21122
21123         agent, dirmngr, scd: Fix init_common_subsystems.
21124         + commit fc0b392e766af8127094e8b529d25abb84ad1d65
21125         * common/init.c (_init_common_subsystems): Don't call
21126         gpgrt_set_syscall_clamp in this function.
21127         * agent/gpg-agent.c, dirmngr/dirmngr.c, scd/scdaemon.c: Call
21128         gpgrt_set_syscall_clamp after npth_init.
21129
21130 2016-10-06  Justus Winter  <justus@g10code.com>
21131
21132         common: Avoid pointer arithmetic on string literals.
21133         + commit 4aadc751f201f8f97c9c1f454e3a29803cce3edb
21134         * common/gettime.c (rfctimestamp): Use indexing instead.
21135         * common/signal.c (got_fatal_signal): Likewise.
21136
21137         g10: Fix singular term.
21138         + commit b0d2526bc4e5c663eeffe04500420c70cee98712
21139         * g10/tofu.c (ask_about_binding): Fix singular message.
21140
21141         g10: Use appropriate variant of 'abs'.
21142         + commit 73000d1ce0317210f5a9e5262404cc90258041ff
21143         * g10/tofu.c (ask_about_binding): Use 'labs' instead of 'abs'.
21144
21145         sm: Remove statement without effect.
21146         + commit 2d446759bd43ae38fbce9a18c955285ca535bc08
21147         * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Remove statement without
21148         effect.
21149
21150         g10: Fix testing for debug flag.
21151         + commit 6b626824c8e30b41c47724b5ccbf761937499512
21152         * g10/parse-packet.c (set_packet_list_mode): Fix testing for debug
21153         flag.
21154
21155         tools: Improve error handling.
21156         + commit 32f81f56a8be6d13dea0a64d24f52343c7e72c84
21157         * tools/gpg-wks-server.c (copy_key_as_binary): Initialize 'argv'.
21158
21159         gpgscm: Update callsite of 'gnupg_spawn_process'.
21160         + commit 07cfb3b27a77491eae818d57f6eb660e75fa013f
21161         * tests/gpgscm/ffi.c (do_spawn_process): Adapt to the changes to
21162         'gnupg_spawn_process'.
21163
21164 2016-10-05  Werner Koch  <wk@gnupg.org>
21165
21166         wks: Send key encrypted as required by draft -02.
21167         + commit 8ce800d21919eaaba7ed4f04f712292be310fd66
21168         * tools/gpg-wks-client.c (get_key): Encrypt.
21169         (encrypt_response): Take care of --fake-submission-addr.
21170
21171         wks: Add option --fake-submission-addr to gpg-wks-client.
21172         + commit e514a5b725f0c997cef4362808b2778a3faa9cf8
21173         * tools/gpg-wks-client.c (oFakeSubmissionAddr): New.
21174         (opts): Add option --fake-submission-addr.
21175         (fake_submission_addr): New variable.
21176         (parse_arguments): Set it.
21177         (command_send): Use --fake-submission-addr.
21178
21179         agent: Another minor fix to map_supervised_sockets.
21180         + commit 1cedc32c95c2e3c3ab98af23ddc2845d51e596c1
21181         * agent/gpg-agent.c (map_supervised_sockets): Remove debug message.
21182         Provide correct fd in the second error case.
21183
21184         agent: Fix npth + supervised mode problem.
21185         + commit f57dc2b1e6f28d164f882373535dbcb0d632ca17
21186         * agent/gpg-agent.c (main): Initialize modules in supervised mode.
21187
21188 2016-10-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21189
21190         agent: Fix error handling in map_supervised_sockets.
21191         + commit a2127c71dbf87c1710b43d91a733dd4c9b2953bc
21192         * agent/gpg-agent.c (map_supervised_sockets): the file descriptor to
21193           close on error is fd, not i.
21194
21195 2016-10-04  Werner Koch  <wk@gnupg.org>
21196
21197         agent: Streamline the supervised mode code.
21198         + commit 1a9c8d78ece2f31fdb1a8e2be049aa71053061fa
21199         * agent/gpg-agent.c (get_socket_path): Rename to ...
21200         (get_socket_name): this.  This is to comply with the GNU coding guide.
21201         Use xtrymalloc instead of malloc.  Do not build for W32.
21202         (map_supervised_sockets): Use strtokenize and set the the socket names
21203         here.
21204         (main): Adjust for above change.  Do not close the socket.
21205
21206         agent: Adjust cleanup for supervised mode.  Fix for W32.
21207         + commit afcfae7959f39e7d85309b9496e1f1cf9acd5cc2
21208         * agent/gpg-agent.c (opts) [W32]: Remove option --supervised.
21209         (is_supervised): Move from main() to global.
21210         (inhibit_socket_removal): New.
21211         (cleanup): Take care of supervise mode and INHIBIT_SOCKET_REMOVAL.
21212         (check_own_socket_thread): Set INHIBIT_SOCKET_REMOVAL instead of
21213         seting the socket names to empty.
21214
21215         agent: Adjust supervised mode for the new default socket names.
21216         + commit dc059af1ff007842e2633e686c87d05daf1d45e3
21217         * agent/gpg-agent.c (main): In supervised mode do not provide default
21218         socket names.  Unset DISPLAY and INSIDE_EMACS.  Use log_error and
21219         agent_exit.
21220
21221 2016-10-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21222
21223         agent: Implement --supervised command (for systemd, etc).
21224         + commit 9f92b62a51d2d60f038fdbe01602865c5933fa95
21225         * agent/gpg-agent.c (get_socket_path): New function for POSIX systems
21226         to return the path for a provided unix-domain socket.
21227         (map_supervised_sockets): New function to inspect $LISTEN_FDS and
21228         $LISTEN_FDNAMES and map them to the specific functionality offered by
21229         the agent.
21230         (main): Add --supervised command.  When used, listen on already-open
21231         file descriptors instead of opening our own.
21232         * doc/gpg-agent.texi: Document --supervised option.
21233
21234 2016-10-04  Justus Winter  <justus@g10code.com>
21235
21236         build,w32: Unconditionally build tests.
21237         + commit 4a232d23a8f51bebf9ee382e480248b4bde30f28
21238         * configure.ac (run_tests, RUN_TESTS, RUN_GPG_TESTS): Remove
21239         variables.  They are misleadingly named, as they inhibit building the
21240         tests.  There is no reason not to build the tests even when
21241         cross-compiling, as they are only run if one does 'make check'.
21242         * Makefile: Adapt accordingly.
21243         * tests/Makefile.am: Adapt accordingly.  Avoid building 'asschk' on
21244         Windows as it uses non-portable functions.
21245
21246         tests,w32: Do not expose 'glob' to gpgscm.
21247         + commit 41b510f9c510f8fd1b59eb0c5dd2e2b2deaf0a1b
21248         * tests/gpgscm/ffi.c (do_glob): Remove function.
21249         (ffi_init): Likewise.
21250
21251         tests,w32: Avoid using 'glob'.
21252         + commit 949e70115eb2c04bd09da6477f6c433e6fd9a366
21253         * tests/openpgp/setup.scm: Avoid 'glob' which is not available on
21254         mingw.
21255
21256         tools: Ignore existing directories in gpgtar.
21257         + commit fbc83c0cdd390473c044953fb774571ffc636c6d
21258         * tools/gpgtar-extract.c (extract_directory): Ignore existing
21259         directories now that we have '--directory'.
21260
21261 2016-10-04  NIIBE Yutaka  <gniibe@fsij.org>
21262
21263         agent, dirmngr, scd: npth_init must be after fork.
21264         + commit eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d
21265         * agent/gpg-agent.c (thread_init_once, initialize_modules): New.
21266         (main): Make sure no daemonizing-fork call after npth_init, and no npth
21267         calls before npth_init, with care of npth calls by assuan hooks.
21268         * dirmngr/dirmngr.c (thread_init): New.
21269         (main): Make sure npth_init must not be called before daemonizing fork.
21270         * scd/scdaemon.c (main): Likewise.
21271
21272 2016-09-30  Werner Koch  <wk@gnupg.org>
21273
21274         agent: Remove the warning for the GKR hijacking.
21275         + commit a43739a2456a38c01704d8a52dca441055e29bc6
21276         * g10/call-agent.c (check_hijacking): Remove.
21277         (start_agent): Remove call.
21278
21279         agent: Create the extra sockets in the standard socket dir.
21280         + commit 80cc16e0728256f6b07a12980e1f3512cf2324fa
21281         * agent/gpg-agent.c (main): Take the socketdir in account for the
21282         default sockets.
21283         * tools/gpgconf.c (list_dirs): Add "agent-extra-socket" and
21284         "agent-browser-socket".
21285
21286         agent: Kludge to allow disabling of the extra sockets.
21287         + commit 95cf7afff074613825f4442fa131145a2c0d3cf7
21288         * agent/gpg-agent.c (main): Check for special socket names.
21289
21290         wks: Avoid long trustdb checks.
21291         + commit de67055aff916455cec89fab1d95177d3b383008
21292         * tools/wks-receive.c (verify_signature): Use --always-trust.
21293
21294 2016-09-30  Justus Winter  <justus@g10code.com>
21295
21296         build: Fix build against libiconv.
21297         + commit 6054e8aaecbd355bb7559697eecaadf2225189b8
21298         * agent/Makefile.am: Add INCICONV and LIBICONV.
21299         * common/Makefile.am: Likewise.
21300         * tools/Makefile.am: Likewise.
21301
21302         agent: Enable restricted, browser, and ssh socket by default.
21303         + commit e11686f973b35869d7b299ce4726003ac22e2e3a
21304         * agent/gpg-agent.c (main): Provide defaults for 'extra-socket' and
21305         'browser-socket', enable ssh socket by default, but do not emit the
21306         'SSH_AUTH_SOCK' variable unless it has been explicitly requested.
21307         * configure.ac (GPG_AGENT_{EXTRA,BROWSER}_SOCK_NAME): New definitions.
21308         * doc/gpg-agent.texi: Update documentation.
21309
21310         w32: Fix STARTTLS on LDAP connections.
21311         + commit 8d37018050373a47566bf8ea0d894da20ed292c7
21312         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Fix build against
21313         <winldap.h>.
21314
21315 2016-09-29  Werner Koch  <wk@gnupg.org>
21316
21317         wks: Partly implement draft-koch-openpgp-webkey-service-02.
21318         + commit 33800280da55a859e08dfa57f29144c89dd1bead
21319         * tools/gpg-wks.h (WKS_RECEIVE_DRAFT2): New.
21320         * tools/wks-receive.c: Include rfc822parse.h.
21321         (struct receive_ctx_s): Add fields PARSER, DRAFT_VERSION_2, and
21322         MULTIPART_MIXED_SEEN.
21323         (decrypt_data): Add --no-options.
21324         (verify_signature): Ditto.
21325         (new_part): Check for Wks-Draft-Version header.  Take care of text
21326         parts.
21327         (wks_receive): Set Parser and pass a flag value to RESULT_CB.
21328         * tools/gpg-wks-client.c (read_confirmation_request): New.
21329         (main) <aRead>: Call read_confirmation_request instead of
21330         process_confirmation_request.
21331         (command_receive_cb): Ditto.  Add arg FLAGS..
21332         (decrypt_stream_status_cb, decrypt_stream): New.
21333         (command_send): Set header Wks-Draft-Version.
21334         * tools/gpg-wks-server.c (struct server_ctx_s): Add field
21335         DRAFT_VERSION_2.
21336         (sign_stream_status_cb, sign_stream): New.
21337         (command_receive_cb): Set draft flag.
21338         (send_confirmation_request): Rework to implement protocol draft
21339         version 2.
21340
21341         * tools/gpg-wks.h (DBG_MIME_VALUE, DBG_PARSER_VALUE): New.
21342         (DBG_MIME, DBG_PARSER, DBG_CRYPTO): New.  Use instead of a plain
21343         opt.debug where useful.
21344         * tools/gpg-wks-client.c (debug_flags): Add "mime" and "parser".
21345         * tools/gpg-wks-server.c (debug_flags): Ditto.
21346
21347         tools: Convey signeddata also to the part_data callback in mime-parser.
21348         + commit c738f92c195d91662ddc7848cc3c92c7f091f1f8
21349         * tools/mime-parser.c (mime_parser_parse): Factor some code out to ...
21350         (process_part_data): new.
21351         ((mime_parser_parse): Also call process_part_data for signed data.
21352
21353         tools: Allow retrieval of signed data from mime-maker.
21354         + commit f776757ea94542e2f425840dddaf3e65b0ff7757
21355         * tools/mime-maker.c (find_part): New.
21356         (mime_maker_get_part): New.
21357
21358         tools: Change mime-maker to write out CR,LF.
21359         + commit 29db3be6e8dbc9b4dd52cd1781106fa9fa3954a5
21360         * tools/mime-maker.c (struct part_s): Add field PARTID.
21361         (struct mime_maker_context_s): Add field PARTID_COUNTER.
21362         (dump_parts): Print part ids.
21363         (mime_maker_add_header): Assign PARTID.
21364         (mime_maker_add_container): Ditto.
21365         (mime_maker_get_partid): New.
21366         (write_ct_with_boundary): Remove.
21367         (add_header): Strip trailing white spaces.
21368         (write_header): Remove trailing spaces trimming.  Add arg BOUNDARY.
21369         Handle emdedded LFs.
21370         (write_gap, write_boundary, write_body): New.
21371         (write_tree): Use new functions.
21372
21373         tools: Simplify the mime-maker container creation.
21374         + commit 95d60c6ce9e8a7a7741553af957978c1f91547c5
21375         * tools/mime-maker.c (struct part_s): Remove field MEDIATYPE.
21376         (release_parts): Ditto.
21377         (dump_parts): Print a body line only if tehre is a body.
21378         (mime_maker_add_header): Check for body or container.
21379         (mime_maker_add_container): Remove arg MEDIATYPE.  Change all callers.
21380         (mime_maker_end_container): New.
21381
21382         tools: Give mime parser callbacks access to the rfc822 parser.
21383         + commit 4ac138c84d0f344ca9442f90c96f0e1f76062a4a
21384         * tools/mime-parser.c (mime_parser_context_s): Add field MSG.
21385         (parse_message_cb): Set it.
21386         (mime_parser_rfc822parser): New.
21387         * tools/mime-parser.h: Declare rfc822parse_t for the new prototype.
21388
21389 2016-09-29  Justus Winter  <justus@g10code.com>
21390
21391         dirmngr: Fix STARTTLS on LDAP connections.
21392         + commit 9e6f8a55ed04f876635792125858ee76a948802a
21393         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Fix unfortunate typo.
21394
21395 2016-09-28  Werner Koch  <wk@gnupg.org>
21396
21397         gpg: Improve WKD by importing only the requested UID.
21398         + commit cbf2ac66692daa7a324108724698d60d6c7e473f
21399         * g10/keyserver.c: Include mbox-util.h.
21400         (keyserver_import_wkd): Do not use the global import options but
21401         employ an import filter.
21402
21403         gpg: Reject import if an import filter removed all user ids.
21404         + commit 80393661bdfa7ae0288644513575e8a5d708b084
21405         * g10/import.c (any_uid_left): New.
21406         (import_one): Check that a UID is left.
21407
21408         gpg: Make import filter data object more flexible.
21409         + commit c9237bf2ba2c49588576dcece756ebf5fe89aada
21410         * g10/main.h (import_filter_t): New.
21411         * g10/import.c (struct import_filter_s): Declare struct.
21412         (import_keep_uid, import_drop_sig): Replace by ...
21413         (import_filter): new.  Adjust all users.
21414         (cleanup_import_globals): Move code to ...
21415         (release_import_filter): new.
21416         (save_and_clear_import_filter): New.
21417         (restore_import_filter): New.
21418
21419         gpg: Make sure that internal key import is done with a binary stream.
21420         + commit 829949f3823c2306022928ce782f9c9d9c5f1cc8
21421         * g10/import.c (import_keys_internal): Open stream in binary mode.
21422
21423 2016-09-27  Justus Winter  <justus@g10code.com>
21424
21425         build: Do not link gpg-connect-agent against npth.
21426         + commit 20a16833ee2bb05f735377f705899302bcf2b4d3
21427         * tools/Makefile.am: Do not link gpg-connect-agent against npth.
21428
21429         build: Fix check for resolver library on macOS.
21430         + commit 2e64ccb0f96d615b1eb87e37f230a5d761aa9c36
21431         * configure.ac: Check for the mangled name of 'dn_skipname' first.
21432
21433         common: Correctly handle modules relying on npth.
21434         + commit 2b23a321ac0b07beeac1dfa8d71f223e66c49b71
21435         * common/Makefile.am (common_sources): Drop 'call-gpg.{c,h}'.
21436         (with_npth_sources): New variable.
21437         (libcommonpth_a_SOURCES): Use the new variable.
21438
21439 2016-09-27  NIIBE Yutaka  <gniibe@fsij.org>
21440
21441         agent, sm: Set CTX after start_agent.
21442         + commit 4e4843e735f32b5e79a51d8062da55bfaab6ad77
21443         * g10/call-agent.c (agent_keytocard): Assign parm.ctx after start_agent.
21444         * sm/call-agent.c (gpgsm_agent_pksign, gpgsm_scd_pksign)
21445         (gpgsm_agent_readkey, gpgsm_agent_scd_serialno)
21446         (gpgsm_agent_scd_keypairinfo, gpgsm_agent_marktrusted)
21447         (gpgsm_agent_passwd, gpgsm_agent_get_confirmation)
21448         (gpgsm_agent_ask_passphrase, gpgsm_agent_keywrap_key)
21449         (gpgsm_agent_export_key): Likewise.
21450
21451         dirmngr: Removal of no-libgcrypt.o.
21452         + commit 836b72363168cbb0051fc2356f61788468db211c
21453         * dirmngr/Makefile.am (dirmngr_ldap_LDADD): Remove no-libgcrypt.o.
21454
21455         agent: Allow only specific digest size for ECDSA.
21456         + commit 98bc6f480ac973dccce90378dc021a2e24e58704
21457         * agent/pksign.c (do_encode_dsa): Fix validation of digest size.
21458
21459 2016-09-22  Neal H. Walfield  <neal@g10code.com>
21460
21461         g10: When adding a user id, make sure the keyblock has been prepared.
21462         + commit df5353b95eefc13135e7df50a7c197f270d6080d
21463         * g10/keyedit.c (keyedit_quick_adduid): Call merge_keys_and_selfsig on
21464         KEYBLOCK before adding the user id.
21465         * tests/openpgp/quick-key-manipulation.scm: Make sure that the key
21466         capabilities don't change when adding a user id.
21467         (key-data): New function.
21468
21469 2016-09-20  Justus Winter  <justus@g10code.com>
21470
21471         tests: Add documentation, make interactive debugging possible.
21472         + commit 7e0379a75475abfd15e0623913795779ff0f40d7
21473         * tests/openpgp/README: Add documentation about debugging and
21474         interfacing with GnuPG.
21475         * tests/openpgp/run-tests.scm (test::run-sync): Hand stdin to the
21476         child so that we can use a repl in the tests.
21477
21478         tests: Port the quick key manipulation test to Scheme.
21479         + commit 6c4c0e3ac2aeafba7a2b7c2dd92a18be8aec92b1
21480         * tests/openpgp/Makefile.am (XTESTS): Add new test.
21481         * tests/openpgp/quick-key-manipulation.scm: New file.
21482
21483         tests: Remove list of tests from the test runner.
21484         + commit 49fae88fd170f2bdc12a1794a2637260e3c73a73
21485         * tests/openpgp/run-tests.scm: Drop hardcoded list.
21486
21487         tests: Reduce runtime of excessive test.
21488         + commit 988a04b98d42ff9cc9e62007ebcc0e4c03f4047d
21489         * tests/openpgp/conventional-mdc.scm: Use only two plaintexts when
21490         iterating over all cipher algorithms.
21491
21492         dirmngr: Fix type.
21493         + commit 285d193f1e1464495bce57bd0f323468515b4513
21494         * dirmngr/dns-stuff.c (get_dns_cert): Fix type in fallback code.
21495
21496 2016-09-20  Andre Heinecke  <aheinecke@intevation.de>
21497
21498         dirmngr: Open file CRL's in binary mode.
21499         + commit 4644c27514f34f5efc555d43672a25088a611a72
21500         * dirmngr/crlcache.c (crl_cache_load): Open file in binary mode.
21501
21502 2016-09-20  NIIBE Yutaka  <gniibe@fsij.org>
21503
21504         doc: Fix a xref usage.
21505         + commit b9b4ff857034df51e055ceddce567ca97e94e075
21506
21507
21508 2016-09-20  Ineiev  <ineiev@gnu.org>
21509
21510         doc: Do not end section names with "."
21511         + commit 8078d8246fa38c3e478fc9a542117468780ace00
21512
21513
21514 2016-09-20  NIIBE Yutaka  <gniibe@fsij.org>
21515
21516         doc: minor fix for @xref.
21517         + commit 9c1b3bc25a1b38c4eda31bf12ccc10d94bb05212
21518         * doc/yat2m.c (proc_texi_cmd): Captalize "see" for xref.
21519
21520 2016-09-20  Justus Winter  <justus@g10code.com>
21521
21522         doc: Implement simple '@ref'erences.
21523         + commit 91d5e6f805aaf24a3f1f03a95998f757dce04cb2
21524         * doc/yat2m.c (proc_texi_cmd): Handle '@ref'.
21525
21526 2016-09-20  Ineiev  <ineiev@gnu.org>
21527
21528         doc: Fix full stops.
21529         + commit 0eaab1af48f600b636183321e4a4e9c6bc361610
21530         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
21531         doc/instguide.texi, doc/scdaemon.texi, doc/specify-user-id.texi,
21532         doc/tools.texi: Fix.
21533
21534         doc: Fix spacings.
21535         + commit 32bcf8b73ede9c8f1469821a54dedc6be75241d2
21536         * doc/debugging.texi, doc/dirmngr.texi, doc/gpg-agent.texi,
21537         doc/gpg.texi, doc/tools.texi: Fix.
21538
21539         doc: Improve markup.
21540         + commit 377624207e9b2895ce00dfc4d1163d72f349841f
21541         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
21542         doc/howto-create-a-server-cert.texi, doc/scdaemon.texi,
21543         doc/specify-user-id.texi, doc/tools.texi: Fix.
21544
21545         doc: Replace rfc0123 with RFC-0123.
21546         + commit 9d2b7bff12b268638465da222ca7cc9042bba072
21547         * doc/gpg.texi, doc/gpgsm.texi, doc/specify-user-id.texi: Fix.
21548
21549         doc: Add missing description of datafile.
21550         + commit 789916281c25e737d8fb44add5ca61f8fd25de2f
21551         * doc/gpg.texi: Fix.
21552
21553         doc: Replace UTF8 with UTF-8.
21554         + commit 00d6d8bc8772e48b6f200d359e11eb93ab65f51f
21555         * doc/gpg.texi: Fix.
21556
21557         doc: Fix mistakes.
21558         + commit f25e04005af5831053ba194a09e3afa48d1e162b
21559         * doc/dirmngr.texi, doc/gpg.texi, doc/gpgsm.texi,
21560         doc/howto-create-a-server-cert.texi,
21561         doc/scdaemon.texi, doc/tools.texi: Fix.
21562
21563         doc: Eliminate inconsistent UK English.
21564         + commit 825c1dfb3ee4c1704f42eaf064161b9731c20134
21565         * doc/dirmngr.texi, doc/gpg-agent.texi, doc/scdaemon.texi,
21566         doc/tools.texi: Fix.
21567
21568         doc: Use the right reference commands.
21569         + commit f32689f833838a742243e94c900e98f5b59a5811
21570         * doc/debugging.texi, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
21571         doc/tools.texi: Fix.
21572
21573         doc: Fix "Not(e) that you can(not) abbreviate".
21574         + commit 20a27d8a57c4c990fcada4278a1ce2e6fc9043e9
21575         * doc/dirmngr.texi, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
21576         doc/scdaemon.texi, doc/tools.texi: Fix.
21577
21578         doc: Fix typos.
21579         + commit fa346508fe323e61cf157ee30c13301e1d2117c0
21580         * doc/debugging.texi, doc/dirmngr.texi, doc/glossary.texi
21581         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi
21582         * doc/instguide.texi, doc/opt-homedir.texi, doc/scdaemon.texi
21583         * doc/specify-user-id.texi, doc/tools.texi: Fix.
21584
21585         doc: Fix Martin Hellman's name.
21586         + commit 858af2b3473e436af53470d53cdac334edce9f09
21587         * doc/contrib.texi: Fix.
21588
21589 2016-09-19  Justus Winter  <justus@g10code.com>
21590
21591         tests: Refine the repl function.
21592         + commit 884e78efe1f3ba50513bf81c8b4804d22b25eac4
21593         * tests/gpgscm/repl.scm (repl): Add an argument 'environment'.
21594         (interactive-repl): Add an optional argument 'environment'.
21595
21596         tests: Implement interpreter shutdown using exceptions.
21597         + commit 9a0659a65c52378de1c4736a0eddf8518eb20948
21598         * tests/gpgscm/ffi.c (ffi_init): Rename 'exit' to '_exit'.
21599         * tests/gpgscm/ffi.scm (*interpreter-exit*): New variable.
21600         (throw): New function.
21601         (exit): New function.
21602
21603         tests: Correctly handle exceptions in resource handling macros.
21604         + commit 58007e52593e6b0f838de2e464ceeacf22757018
21605         * tests/gpgscm/tests.scm (letfd): Correctly release resources when an
21606         exception is thrown.
21607         (with-working-directory): Likewise.
21608         (with-temporary-working-directory): Likewise.
21609         (lettmp): Likewise.
21610
21611         tests: Refine exception handling.
21612         + commit ab483eff9a8254adf127cdee178e14ba74f0a2b3
21613         * tests/gpgscm/init.scm (catch): Bind all arguments to '*error*' in
21614         the error handler, update and fix comment.
21615         (*error-hook*): Revert to original definition.
21616         * tests/gpgscm/tests.scm (tr:do): Adapt accordingly.
21617         * tests/openpgp/issue2419.scm: Likewise.
21618
21619         tests: Use descriptive temporary file names.
21620         + commit 83a406b38a21d0eeb4963db824a27783c212d2fb
21621         * tests/gpgscm/ffi.c (do_get_isotime): New function.
21622         (ffi_init): Add parameter 'scriptname', bind new function and
21623         scriptname.
21624         * tests/gpgscm/ffi.h (ffi_init): Update prototype.
21625         * tests/gpgscm/main.c (main): Hand in the script name.
21626         * tests/gpgscm/tests.scm (mkdtemp): Use current time and script name
21627         for the names of temporary directories.
21628
21629 2016-09-19  Werner Koch  <wk@gnupg.org>
21630
21631         gpg: Fix regression in fingerprint printing.
21632         + commit 998643666c016dbacf10f813c22efc97deadec65
21633         * g10/keylist.c (list_keyblock_print): Do not depend calling
21634         print_fingerprint on opt.keyid_format.
21635
21636         dirmngr: Silence diagnostics about starting housekeeping.
21637         + commit 5bf1facc973eb6e0bfab0f8f17129534dec56e04
21638         * dirmngr/dirmngr.c (housekeeping_thread): Print info only in very
21639         verbose mode.
21640
21641 2016-09-19  Justus Winter  <justus@g10code.com>
21642
21643         g10: Fix memory leak.
21644         + commit 086d219d96caa3501048aff82a282481e07c195b
21645         * g10/tofu.c (build_conflict_set): Free 'kb_all'.
21646
21647 2016-09-19  Werner Koch  <wk@gnupg.org>
21648
21649         doc: Update license information.
21650         + commit 3899041cd2877ce9584c7bd149f232f35a07c399
21651         * tests/fake-pinentries/COPYING: Rename to  ...
21652         * COPYING.CC0: this.  Add a note on the scope of this license.
21653         * COPYING.LIB: Add a note on the scope of this license.
21654         * AUTHORS (License): Mention CC) license.
21655
21656         gpgscm: Fix gcrypt version check.
21657         + commit 47baeac50ccaaf06dc8b0cebece50f47754de6ca
21658         * tests/gpgscm/main.c (main): Check against required and not installed
21659         version.
21660
21661         gpg: Avoid malloc failure due to no key signatures.
21662         + commit 18bbefa27f9e47e1062ee4d7af09487632795ba7
21663         * g10/keyedit.c (check_all_keysigs): Check early for no key
21664         signatures.  Use xtrycalloc.
21665
21666 2016-09-17  NIIBE Yutaka  <gniibe@fsij.org>
21667
21668         Fix comment and format.
21669         + commit 7305d27f36148a7fb8c2f4ef5b94774cbd21b18e
21670         * agent/protect-tool.c (main): Fix comment.
21671         * doc/DETAILS (colon listings): Fix list.
21672         * tests/openpgp/multisig.test: Fix comment.
21673
21674 2016-09-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21675
21676         Fix more spelling.
21677         + commit 0d67241e317b172a258a910c02d90639e2b08fce
21678         * NEWS, acinclude.m4, agent/command-ssh.c, agent/command.c,
21679           agent/gpg-agent.c, agent/keyformat.txt, agent/protect-tool.c,
21680           common/asshelp.c, common/b64enc.c, common/recsel.c, doc/DETAILS,
21681           doc/HACKING, doc/Notes, doc/TRANSLATE, doc/dirmngr.texi,
21682           doc/faq.org, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
21683           doc/instguide.texi, g10/armor.c, g10/gpg.c, g10/keyedit.c,
21684           g10/mainproc.c, g10/pkclist.c, g10/tofu.c, g13/sh-cmd.c,
21685           g13/sh-dmcrypt.c, kbx/keybox-init.c, m4/pkg.m4, sm/call-dirmngr.c,
21686           sm/gpgsm.c, tests/Makefile.am, tests/gpgscm/Manual.txt,
21687           tests/gpgscm/scheme.c, tests/openpgp/gpgv-forged-keyring.scm,
21688           tests/openpgp/multisig.test, tests/openpgp/verify.scm,
21689           tests/pkits/README, tools/applygnupgdefaults,
21690           tools/gpg-connect-agent.c, tools/mime-maker.c, tools/mime-parser.c:
21691           minor spelling cleanup.
21692
21693         move some file encodings to UTF-8.
21694         + commit 215180d1ce6c93e2b4969d746c83ac4c055d25ef
21695         * dirmgnr/cdblib.c: comment used unnecesary hyphenation
21696         * dirmngr/crlcache.h: comment was iso-8859-1
21697         * doc/contrib.text: list contributors using UTF-8 (now we can
21698           acknowledge many more people using their preferred orthography)
21699
21700         At least one other files remains in a non-UTF-8 encoding, which i'm
21701         not sure what to do with:
21702
21703          - build-aux/speedo/w32/inst.nsi is ISO-8859-1, but maybe Windows needs
21704            it that way?
21705
21706 2016-09-16  Neal H. Walfield  <neal@g10code.com>
21707
21708         g10: On failure, propagate the return code.
21709         + commit 6e930f0e4077bc7aa3d28b1ba649a82d62427d87
21710         * g10/tofu.c (tofu_register_encryption): If get_trust fails, set RC.
21711
21712         g10: Don't ignore failure.  On failure, rollback.
21713         + commit 221b0bd0e5946edaea7135bc3b6f3c5c0fc6dbca
21714         * g10/tofu.c (tofu_set_policy): If record_binding fails, fail.  If the
21715         function fails, rollback the transaction.
21716
21717         g10: Load the key block if the supplied user id list is NULL.
21718         + commit c2e563421e4fd4f0910642aa7b171bcf0b374b01
21719         * g10/tofu.c (tofu_register_encryption): Load the key block if
21720         USER_ID_LIST is NULL.
21721
21722         g10: Use the accessor functions for accessing and comparing key ids.
21723         + commit af196342bf44ce6dc42111d37539dec7ee3b3d82
21724         * g10/tofu.c (get_trust): Use the pk_main_keyid accessor function.
21725         (tofu_register_signature): Likewise.
21726         (tofu_register_encryption): Likewise.
21727         (tofu_set_policy): Likewise and also use pk_keyid and keyid_cmp.
21728
21729 2016-09-16  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21730
21731         po: convert localizations to UTF-8.
21732         + commit 4ab8107063b641ed74fc4c9bf98304bcea573178
21733         * po/{it,et,pl,ro,gl,es,el,sk,pt,eo,hu}.po: convert to UTF-8
21734
21735         This was an automated conversion process, using:
21736
21737            for x in po/{it,et,pl,ro,gl,es,el,sk,pt,eo,hu}.po; do
21738                cs=$(grep charset= $x | cut -f2 -d= | cut -f1 -d\\)
21739                iconv -f $cs -t UTF-8 < $x >$x.tmp
21740                sed "s/$cs/UTF-8/" < $x.tmp > $x
21741                rm -f $x.tmp
21742            done
21743
21744 2016-09-16  NIIBE Yutaka  <gniibe@fsij.org>
21745
21746         scd: Add support of ECC pubkey attribute.
21747         + commit dd06d33655bc872a6310edac8e448419479d3312
21748         * scd/app-openpgp.c (ECC_FLAG_PUBKEY): New.
21749         (send_key_attr, get_public_key, ecc_writekey, do_auth, do_decipher)
21750         (parse_algorithm_attribute): Check ECC_FLAG_DJB_TWEAK.
21751         (build_ecc_privkey_template): Add ECC_Q and ECC_Q_LEN.
21752         Support offering public key when ECC_FLAG_PUBKEY sets.
21753         (ecc_writekey): Supply ECC_Q and ECC_Q_LEN.
21754         (parse_algorithm_attribute): Parse pubkey-required byte.
21755
21756 2016-09-15  Justus Winter  <justus@g10code.com>
21757
21758         g10: Add missing header.
21759         + commit c0e620cee86b5dacc941964bd187bba0dfa90eea
21760         * g10/trustdb.c: Include 'mbox-util.h'.
21761
21762 2016-09-15  Neal H. Walfield  <neal@g10code.com>
21763
21764         g10: Only consider bindings matching the signer's user id.
21765         + commit 3f7f7447316f57d002d683af4ad30ac5730b9ebe
21766         * g10/trustdb.c (tdb_get_validity_core): If the signer's user id
21767         subpacket is present, only consider matching user ids.
21768
21769         g10: Don't include the signature when printing a binding's validity.
21770         + commit dcc64663051f8af82abc11e2699649c3b35936db
21771         * g10/mainproc.c (check_sig_and_print): When printing information
21772         about a binding don't include the current signature.
21773
21774 2016-09-15  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21775
21776         tests/fake-pinentries: fake pinentries for downstream developers.
21777         + commit 3248182d1b5a03098ee797c980fa0f0ec06e716f
21778         * tests/fake-pinentries/README.txt and
21779           tests/fake-pinentries/fake-pinentry.{sh,py,pl,php}}: New public
21780           domain (CC0) files to encourage better test suite practices from
21781           downstream developers.
21782         * tests/fake-pinentries/COPYING (new): a copy of
21783           https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
21784
21785         spelling: conenction should be connection.
21786         + commit 167273ee9d3c04f29835aa2d12fde52eebf61efb
21787         * dirmngr/server.c, sm/server.c: s/conenction/connection/
21788
21789         spelling: correct achived to achieved.
21790         + commit 7fafc3c49901c118b47d4d13a41fb3575c1f9e4b
21791
21792
21793 2016-09-15  NIIBE Yutaka  <gniibe@fsij.org>
21794
21795         tests/gpgscm: Fix use of pointer.
21796         + commit 68eb5fbd37c31ed7c0c916656131eea7bb58d13d
21797         * tests/gpgscm/scheme-private.h (struct scheme): Use (void *) for
21798         alloc_seg.
21799         * tests/gpgscm/scheme.c (alloc_cellseg): Use (void *) for cp.  Use
21800         (void *) for coercion of address calculation.
21801
21802 2016-09-14  Neal H. Walfield  <neal@g10code.com>
21803
21804         g10: Fix whitespace.
21805         + commit 9799b5d18f8fd29872b75c4d70d370af2b4e9a89
21806         * g10/tofu.c (show_statistics): Fix whitespace.
21807
21808         g10: Correctly compute the euclidean distance.
21809         + commit 05b2b13efd8ecea86d31af863cbf82c8b38dc94f
21810         * g10/tofu.c (write_stats_status): Correctly compute the euclidean
21811         distance.
21812         (show_statistics): Likewise.
21813
21814         g10: Change the default TOFU policy for UTKs to good.
21815         + commit ca91caabb5798f67c69ee96657c7cb402e7db0df
21816         * g10/tofu.c (get_trust): Change the default TOFU policy for UTKs to
21817         good.
21818
21819         g10: Add missing static qualifier.
21820         + commit 9d62b79e62ef2690e6522fe1621140fbfc10695c
21821         * g10/tofu.c (cross_sigs): Add missing static qualifier.
21822
21823         g10: Default to the "good" TOFU policy for keys signed by a UTK.
21824         + commit 8df8aa13c795e400324a782fbaea578c8f2a1398
21825         * g10/tofu.c (signed_by_utk): New function.
21826         (get_trust): If a key is signed by an ultimately trusted key, then
21827         set any bindings to good.
21828
21829 2016-09-14  Werner Koch  <wk@gnupg.org>
21830
21831         gpg: Emit a new error status line in --quick-adduid.
21832         + commit f4e11f2e9e8f58fd5f0df3148e6d7ccef0f84232
21833         * g10/keyedit.c (menu_adduid): Emit an ERROR status for an existsing
21834         user id.
21835
21836         gpg: Allow use of "default" algo for--quick-addkey.
21837         + commit 0fd332bc1f6f1f10c96da0cc91203925d3ac81eb
21838         * g10/keygen.c (quick_generate_keypair): Write a status error.
21839         (parse_algo_usage_expire): Set a default curve.
21840
21841 2016-09-13  Werner Koch  <wk@gnupg.org>
21842
21843         gpg: Improve usability of --quick-gen-key.
21844         + commit 30a011cfd6ec172cc460e59f0904a26fe2d68632
21845         * g10/keygen.c (FUTURE_STD_): New constants.
21846         (parse_expire_string): Handle special keywords.
21847         (parse_algo_usage_expire): Allow "future-default".  Simplify call to
21848         parse_expire_string.
21849         (quick_generate_keypair): Always allow an expiration date.  Replace
21850         former "test-default" by "future-default".
21851
21852 2016-09-12  Werner Koch  <wk@gnupg.org>
21853
21854         gpg: Avoid mixing up status and colon line output.
21855         + commit 31fc420727f45dd081f8ad5d056da6675dad29f2
21856         * g10/keylist.c (list_keyblock_colon): Avoid calling functions which
21857         trigger a status line output before having printed a LF.
21858
21859 2016-09-12  Justus Winter  <justus@g10code.com>
21860
21861         tests: Simplify tofu test.
21862         + commit aa81e32df7189c3eb44d4c602fd63f5b3f6a9e49
21863         * tests/openpgp/tofu.scm: Simplify now that we only have one db
21864         format.
21865
21866 2016-09-10  Ben Kibbey  <bjk@luxsci.net>
21867
21868         Portability build fix.
21869         + commit eddcba038025cdbd58aaf67cafd6d83f0ea042d5
21870         * kbx/Makefile.am: Add NETLIBS.
21871         * dirmngr/Makefile.am: Ditto for dirmngr_ldap.
21872
21873         Fix symbol conflict.
21874         + commit 937ec53eff290c3d916faebc23218c9272671c02
21875         * g10/gpgcompose.c: Rename struct siginfo to signinfo.
21876
21877 2016-09-09  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21878
21879         gpg: print fingerprint regardless of keyid-format.
21880         + commit d757009a24eb856770fc3a3729e2f21f54d2a618
21881         * g10/keylist.c (print_fingerprint): use compact format independent of
21882           keyid-format; (print_key_line): always print the fingerprint
21883
21884 2016-09-08  Werner Koch  <wk@gnupg.org>
21885
21886         gpg: Remove option --yes from gpgv.
21887         + commit 30a9f53a0f2af6b98c26b8ddc0b4b87c38416f2a
21888         * g10/gpgv.c (opts): Remove --yes.
21889         (main): Always set opt.ANSWER_YES.
21890
21891         gpg: Add options --output and --yes to gpgv.
21892         + commit a8363b7d0bcc77b55226d5fe8f972214c968ddc3
21893         * g10/gpgv.c (oOutput, oAnswerYes): New.
21894         (opts): Add --output and --yes.
21895         (main): Implement options.
21896
21897         gpg: Make --output work with --verify.
21898         + commit bbe940c095f2bca7a1ca5f8e68ca1af98350a885
21899         * g10/mainproc.c (proc_plaintext): Handle opt.output.
21900
21901 2016-09-07  Werner Koch  <wk@gnupg.org>
21902
21903         dirmngr: Terminate on deletion of the socket file (Linux only).
21904         + commit 6308c300196ae85fd82ed383217219e0206640a4
21905         * dirmngr/dirmngr.c [HAVE_INOTIFY_INIT]: Include sys/inotify.h.
21906         (oDisableCheckOwnSocket): New.
21907         (opts): Add --disable-check-own-socket.
21908         (disable_check_own_socket): New var.
21909         (parse_rereadable_options): Set that var.
21910         (my_inotify_is_name) [HAVE_INOTIFY_INIT]: New.
21911         (handle_connections) [HAVE_INOTIFY_INIT]: New.
21912
21913 2016-09-07  Neal H. Walfield  <neal@g10code.com>
21914
21915         g10: Use the time a signature was seen, not the embedded time, for stats
21916         + commit bde29a46cedbbd2a5dfe7c91a6277c0a4ff50825
21917         * g10/tofu.c (ask_about_binding): Use the time that a signature was
21918         seen, not allegedly generated, when generating statistics.
21919
21920         tests: Don't use --tofu-db-format.
21921         + commit a937eef2d4e80cd43095802176d3db5e7fd94008
21922         * tests/openpgp/tofu.scm: Remove use of --tofu-db-format, which is
21923         deprecated.
21924
21925         g10: Check for a new binding a bit later.
21926         + commit ee06b3f7889bd99c28ac68f4781bda77d67eed00
21927         * g10/tofu.c (build_conflict_set): Check for the current key after
21928         looking for conflicts and removing any '!'.
21929
21930         g10: Change TOFU code to respect --faked-system-time.
21931         + commit 7b3e8572e3bb8a65d20577a48009251fdc7b1910
21932         * g10/tofu.c (record_binding): New parameter now.  Update callers.
21933         Don't use SQLite's strftime('%s','now') to get the current time, use
21934         NOW.
21935         (ask_about_binding): Likewise.
21936         (get_trust): New parameter now.  Update callers.
21937         (show_statistics): Likewise.
21938         (tofu_register_signature): Don't use SQLite's strftime('%s','now') to
21939         get the current time, use gnupg_get_time().
21940         (tofu_register_encryption): Likewise.
21941
21942         g10: Use the correct conversion function.
21943         + commit 56c18408d4955713d9c4e634367c7912d6564651
21944         * g10/tofu.c (show_statistics): Use string_to_ulong, not
21945         string_to_long.
21946
21947 2016-09-07  Werner Koch  <wk@gnupg.org>
21948
21949         gpg: Fix format string issues in tofu.
21950         + commit 97a67d42dc946b2d6ed81723d86e37002b5931b3
21951         * g10/tofu.c (write_stats_status): Use ulong for MESSSAGES.  Fix
21952         format strings.  Simplify by using the new write_status_printf.
21953
21954 2016-09-06  Neal H. Walfield  <neal@g10code.com>
21955
21956         g10: Make sure some functions are passed a primary key.
21957         + commit 13ddc17ddb266d74033d5739fec932034fa85c72
21958         * g10/tofu.c (get_trust): Make sure the caller provides a primary key.
21959         (tofu_register_signature): Likewise.
21960
21961         g10: Tweak TOFU's verbosity.
21962         + commit ee19eacd1d688d3a98cd66e5ef2f42079eb829f1
21963         * g10/tofu.c (time_ago_str): Only show the most significant unit.
21964         * g10/tofu.c (show_statistics): Tweak the output.
21965
21966         g10: Only show the TOFU warning once per key.
21967         + commit 67cef405cbfad2e53fc388dd6591ee4f7cb0d973
21968         * g10/tofu.c (show_statistics): Return whether to call show_warning.
21969         Move the warning from here...
21970         (show_warning): ... to this new function.
21971         (tofu_get_validity): If show_statistics returns a non-zero value, call
21972         show_warning.
21973
21974         g10: Record and show statistics for encrypted messages when using TOFU.
21975         + commit 875ac9216f1383851a82bd240cadb17c7112f6a8
21976         * g10/tofu.c: Include "sqrtu32.h".
21977         (struct tofu_dbs_s.s): Rename get_trust_gather_other_keys to
21978         get_trust_gather_signature_stats.  Add new field
21979         get_trust_gather_encryption_stats.
21980         (initdb): Create the encryptions table.
21981         (ask_about_binding): Show the encryption statistics too.
21982         (tofu_register): Rename from this...
21983         (tofu_register_signature): ... to this and update callers.
21984         (tofu_register_encryption): New function.
21985         (write_stats_status): Add parameters encryption_count,
21986         encryption_first_done and encryption_most_recent.  Update callers.
21987         Compute the trust using the euclidean distance of the signature and
21988         signature count.  Compare with twice the threshold.  Include
21989         encryption count information in the TFS and TOFU_STATS lines.
21990         (show_statistics): Also get information about the encrypted messages.
21991         * g10/trustdb.c (tdb_get_validity_core): Use it.
21992
21993         g10: Simplify the binding statistics shown for a TOFU conflict.
21994         + commit a9e6db6c7e23d9f4b8de59f5cabbf9eb6a59e626
21995         * g10/tofu.c (ask_about_binding): Simplify binding statistics.
21996
21997 2016-09-06  Justus Winter  <justus@g10code.com>
21998
21999         gpgscm: Fix detection of unbalanced parenthesis.
22000         + commit f2249b737055f84842778285bbeff5e61fa55225
22001         * tests/gpgscm/main.c (load): Print error message.
22002         * tests/gpgscm/scheme.c (opexe_0): Correctly report nesting level when
22003         loading files.
22004
22005         tests: Fix test.
22006         + commit 213b3cf465fb091dc0a205d1a08b88b950ffb85f
22007         * tests/openpgp/multisig.scm: Add missing parenthesis.
22008
22009 2016-09-06  Werner Koch  <wk@gnupg.org>
22010
22011         agent: Terminate on deletion of the socket file (Linux only).
22012         + commit 650356148af43ea619bec12e599a4981b147d5f8
22013         * configure.ac (AC_CHECK_FUNCS): Chec for inotify_init.
22014         * agent/gpg-agent.c [HAVE_INOTIFY_INIT]: Include sys/inotify.h.
22015         (my_inotify_is_name) [HAVE_INOTIFY_INIT]: New.
22016         (handle_connections) [HAVE_INOTIFY_INIT]: New.
22017
22018 2016-09-05  Justus Winter  <justus@g10code.com>
22019
22020         tests: Speed up the test suite.
22021         + commit 46c4333c372f0e1ad2aadc411490c2a330b4c5a6
22022         * tests/openpgp/run-tests.scm (test::run-sync): Pass additional
22023         arguments to the test.
22024         (test::run-sync-quiet): Likewise.
22025         (test::run-async): Likewise.
22026         (run-tests-{parallel,sequential}-isolated): Create a tarball of the
22027         gnupghome, then extract it for each test.
22028         * tests/openpgp/setup.scm: Refactor into functions, add an interface
22029         to tar-up the created environment, and untar it multiple times.
22030
22031         common: Restore a simpler variant of 'gnupg_wait_process'.
22032         + commit c97bde2dfeab23a84b4788d998934ac49ff5b797
22033         * common/exechelp-posix.c (gnupg_wait_process): Use the code prior to
22034         5ba4f604.
22035
22036         common: Fix error handling.
22037         + commit 845e2cc201d6a2cdb151e39e29516d26cb49311c
22038         * common/exechelp-posix.c (store_result): Use xtrymalloc.
22039         (gnupg_wait_processes): Likewise, and check result.
22040
22041 2016-09-05  Neal H. Walfield  <neal@g10code.com>
22042
22043         g10: Don't add user attributes to the TOFU DB.
22044         + commit 9082bde01cc18e32504ce39d55ea6dd3c05dddec
22045         * g10/trustdb.c (tdb_get_validity_core): Skip user attributes.
22046
22047 2016-09-05  Werner Koch  <wk@gnupg.org>
22048
22049         agent: Silence --debug IPC output for connections from self.
22050         + commit 0b99d1fd2a80b8efaacc731027d2b2ecd9eca699
22051         * agent/command.c (server_local_s): Add fields 'greeting_seen' and
22052         'connect_from_self'.
22053         (io_monitor): Do not log connections from self.
22054         (start_command_handler): Set flag 'connect_from_self'.
22055         * agent/gpg-agent.c (check_own_socket_thread): Disable logging.
22056         (do_start_connection_thread): Do not log conection start and
22057         termination if IPC debugging is enabled.
22058
22059         agent: Small improvement of the server's local state.
22060         + commit 2eeb5551c37659fdd59e8537fc77a9e7fb6a9204
22061         * agent/command.c (sserver_local_s): Change flags to use only one bit.
22062         (option_handler): Make an atoi return 1 or 0.
22063
22064 2016-09-05  Neal H. Walfield  <neal@g10code.com>
22065
22066         g10: Refactor cross sig check code.
22067         + commit 1f1f56e606c1cb28eec68c60bd8bcb7ab30805de
22068         * g10/tofu.c (BINDING_NEW): New enum value.
22069         (BINDING_CONFLICT): Likewise.
22070         (BINDING_EXPIRED): Likewise.
22071         (BINDING_REVOKED): Likewise.
22072         (ask_about_binding): Move cross sig check from here...
22073         (get_trust): ... and the conflict set building from here...
22074         (build_conflict_set): ... to this new function.
22075         (format_conflict_msg_part1): Replace parameter conflict with
22076         conflict_set.  Drop parameter fingerprint.  Update callers.
22077         (ask_about_binding): Drop unused parameter conflict and redundant
22078         parameter bindings_with_this_email_count.  Rename parameter
22079         bindings_with_this_email to conflict_set.  Update callers.
22080
22081 2016-09-05  Justus Winter  <justus@g10code.com>
22082
22083         tests: Update README.
22084         + commit 65a7563edbbab8f93fe901f932065687508788de
22085         * tests/openpgp/README: Update.
22086
22087         tests: Pass flags to test driver.
22088         + commit 059c79d8b447a3baa9ad0b4d3367bdb64dd2ef3b
22089         * tests/openpgp/Makefile.am (xcheck): Pass flags to 'run-tests.scm'.
22090
22091         common: Improve waiting for processes on POSIX.
22092         + commit e33111fcdac08ed2ddfbdf59b1f790569b42f695
22093         * common/exechelp-posix.c (struct terminated_child): New definition.
22094         (terminated_children): New variable.
22095         (store_result): New function.
22096         (get_result): Likewise.
22097         (gnupg_wait_process): Store results that were not requested and
22098         consider previously stored results.
22099
22100         waitpid(2) may return information about terminated children that we
22101         did not yet request, and there is no portable way to wait for a
22102         specific set of children.  As a workaround, we store the results of
22103         children for later use.
22104
22105 2016-09-05  Werner Koch  <wk@gnupg.org>
22106
22107         dirmngr: Exclude D lines from the IPC debug output.
22108         + commit de623474db3ba402c9bbd872ab6f932f46cbdde9
22109         * dirmngr/dirmngr.h: Include asshelp.h.
22110         * dirmngr/server.c (server_local_s): Add inhibit_dara_logging fields.
22111         (data_line_write): Implement logging inhibit.
22112         (data_line_cookie_close): Print non-logged D lines.
22113         (cmd_wkd_get, cmd_ks_get, cmd_ks_fetch): Do not log D lines.
22114         (dirmngr_assuan_log_monitor): New.
22115         * dirmngr/dirmngr.c (main): Register monitor function.
22116
22117         common: Add an assuan logging monitor.
22118         + commit 0ac671f8a2b65a4b339f615c6420287a549779fa
22119         * common/asshelp.c (my_log_monitor): New var.
22120         (my_libassuan_log_handler): Run that monitor.
22121         (setup_libassuan_logging): Add arg to set a log monitor and change all
22122         callers.
22123
22124         gpg: New export filter drop-subkey.
22125         + commit 0a4a03e5310946b0866a0f6a34031eda7a240162
22126         * g10/import.c (impex_filter_getval): Add properties for key packets.
22127         * g10/export.c (export_drop_subkey): New var.
22128         (cleanup_export_globals): Release that var.
22129         (parse_and_set_export_filter): Add filter "drop-subkey".
22130         (apply_drop_subkey_filter): New.
22131         (do_export_stream): Run that filter.
22132
22133         common: Add string operator gt,ge,le,lt to recsel.
22134         + commit 959cd8903fd012e63dbb156db56708dd3934b5df
22135         * common/recsel.c (recsel_parse_expr): Add them.
22136         (recsel_dump): Print them.
22137         (recsel_select): Evaluate them.
22138
22139         gpg: Use a common filter_getval for import and export.
22140         + commit c8e0d37f4152d1341ef562a190fce93a0386a759
22141         * g10/import.c (filter_getval): Rename to ...
22142         (impex_filter_getval): this.  Make global.
22143         (apply_keep_uid_filter, apply_drop_sig_filter): Adjust.
22144         * g10/export.c (filter_getval): Remove.
22145         (apply_drop_sig_filter): Use impex_filter_getval.
22146
22147 2016-09-03  NIIBE Yutaka  <gniibe@fsij.org>
22148
22149         scd: Fix an action after card removal.
22150         + commit f9e49c80e706a27d5e30d4b3237ff26367a67130
22151         * scd/command.c (update_card_removed): Call apdu_close_reader here.
22152
22153 2016-09-02  Werner Koch  <wk@gnupg.org>
22154
22155         wks: Add framework for policy flags.
22156         + commit 46362cbc0e2260e989820795a6e4245c72335172
22157         * tools/call-dirmngr.c (wkd_get_policy_flags): New.
22158         * tools/gpg-wks.h (struct policy_flags_s, policy_flags_t): New.
22159         * tools/wks-util.c (wks_parse_policy): New.
22160         * tools/gpg-wks-client.c (command_send): Get the policy flags to show
22161         a new info line.
22162         * tools/gpg-wks-server.c (get_policy_flags): New.
22163         (process_new_key): get policy flag and add a stub for "auth-submit".
22164         (command_list_domains): Check policy flags.
22165
22166         dirmngr: Add --policy-flags option to WKD_GET.
22167         + commit 505ee45106d6aa2902bbdd6326f8eb7527c273c4
22168         * dirmngr/server.c (cmd_wkd_get): Add new option.
22169
22170         common: Check read errors in name-value.c.
22171         + commit fc445b36fafc8a4cc3ce5a675ac42df7a9d9a02a
22172         * common/name-value.c: Check for read errors.
22173
22174 2016-09-02  NIIBE Yutaka  <gniibe@fsij.org>
22175
22176         scd: Release the card reader after card removal.
22177         + commit 8fe81055762d9c9e6f03fb7853a985c94ef73ac3
22178         * scd/command.c (update_reader_status_file): Call apdu_close_reader.
22179
22180         scd: Clean up unused shutdown method.
22181         + commit d1ae7103352fbda2a05f098379cd3043a0ab5566
22182         * scd/apdu.c (shutdown_ccid_reader, apdu_shutdown_reader): Remove.
22183         (reset_ccid_reader): Don't set shutdown_reader.
22184         * scd/ccid-driver.c (ccid_shutdown_reader): Remove.
22185
22186         agent: invoke scdaemon with --homedir.
22187         + commit 8b6c0bae33bdc36892f4595806665ce61f77dfd2
22188         * agent/call-scd.c (start_scd): Supply --homedir option when it's not
22189         default homedir.
22190
22191         po: Update Japanese translation.
22192         + commit afdfc954b35370fbf03aaf8dc0e496410923aa4e
22193
22194
22195 2016-09-01  Neal H. Walfield  <neal@g10code.com>
22196
22197         g10: End transaction earlier.
22198         + commit 85fad6c34c08b2850580e0644faba62d3a501b84
22199         * g10/tofu.c (ask_about_binding): End the transaction earlier.
22200
22201         g10: Don't consider cross-signed keys to be in conflict.
22202         + commit b410a3cb7683fc7c2a253e23130c44df42a6203c
22203         * g10/tofu.c (cross_sigs): New function.
22204         (ask_about_binding): If apparently conflicting keys are cross signed,
22205         then don't mark them as conflicting.
22206
22207 2016-09-01  Werner Koch  <wk@gnupg.org>
22208
22209         gpg: Avoid homedir creation by --list-config.
22210         + commit 38d369de13acb95208a0ed8d1cf82ac19173688f
22211         * g10/gpg.c (main): Do not register a key for the list config
22212         commands.
22213
22214         gpg: Simplify code to print VALIDSIG.
22215         + commit fde9fa81d3d3b25a929b532cc1960d9d9f454a0c
22216         * g10/mainproc.c (check_sig_and_print): Use hexfingerprint and
22217         write_status_printf.
22218
22219         gpg: Add new function write_status_printf.
22220         + commit 6bdadae00512b4907826f6754cdb220d06e1ac6d
22221         * g10/cpr.c (write_status_printf): New.
22222
22223         gpg: Fix printing of pubkey algo in --verbose signature verify.
22224         + commit 37e3c897252babc203447be9d2f286a4507875ad
22225         * g10/sig-check.c (check_signature2): Replace arg PK by R_PK and
22226         change the semantics.  Also clear the other R_ args on function entry,
22227         use gpg_error() and change retturn type to gpg_error_t.
22228         * g10/mainproc.c (do_check_sig): Add arg R_PK.
22229         (list_node): Pass NULL for new arg.
22230         (check_sig_and_print): Rework to make use of the returned PK.
22231
22232 2016-09-01  Neal H. Walfield  <neal@g10code.com>
22233
22234         g10: When asking about a TOFU binding conflict, default to unknown.
22235         + commit 3d44e5e8a8d1d8bf6cf5d387f50d75f84d804412
22236         * g10/tofu.c (ask_about_binding): Default to unknown.
22237
22238         g10: Add support for TRUST_NEVER.
22239         + commit f2e5cb6ffb55e49a05d452cd85e45f6f67c20abb
22240         * g10/pkclist.c (do_we_trust): Handle TRUST_NEVER, which can be
22241         returned by the TOFU trust model.
22242         (do_we_trust_pre): Print a different message if TRUSTLEVEL is
22243         TRUST_NEVER.
22244         (check_signatures_trust): Improve comment.
22245
22246         g10: Improve text.
22247         + commit 0cb0ea1633955fb7acd33fe993a4ae4e96e83ae3
22248         * g10/tofu.c (show_statistics): Improve the text (key and user id, not
22249         just key).
22250
22251         g10: Remove unused parameter.
22252         + commit 00c2850393ecc320f591f511c3534286964780c2
22253         * g10/tofu.c (show_statistics): Remove unused parameter sig_exclude.
22254         Update callers.
22255
22256 2016-09-01  Werner Koch  <wk@gnupg.org>
22257
22258         gpg: Copy the correct digest for use by TOFU.
22259         + commit 3e67b50490aef087b5769bb35145d23f6657780f
22260         * g10/mainproc.c (do_check_sig): Use the current digest algo.
22261
22262 2016-09-01  Neal H. Walfield  <neal@g10code.com>
22263
22264         g10: Be careful to not be in a transaction during long operations.
22265         + commit 4cbd2a690c5e5ed2dff49c1f4fc867b31fca689a
22266         * g10/tofu.c (begin_transaction): New parameter only_batch.  If set,
22267         only start a batch transaction if there is none and one has been
22268         requested.  Update callers.
22269         (tofu_suspend_batch_transaction): New function.
22270         (tofu_resume_batch_transaction): Likewise.
22271         (ask_about_binding): Take a ctrl_t, not a tofu_dbs_t.  Update
22272         callers.  Gather statistics within a transaction.  Suspend any batch
22273         transaction when getting user input.
22274         (get_trust): Take a ctrl_t, not a tofu_dbs_t.  Update callers.
22275         Enclose in a transaction.
22276         (tofu_get_validity): Use a batch transaction, not a normal
22277         transaction.
22278
22279 2016-09-01  Werner Koch  <wk@gnupg.org>
22280
22281         tests: Run test requiring the network only in maintainer-mode.
22282         + commit babeb6f8a9b1f8341652145bad58be6cd49e0712
22283         * dirmngr/Makefile.am (noinst_PROGRAMS, TESTS): Add module_net_tests.
22284         (module_tests): Move t-dns-test to ...
22285         (module_net_tests): here.
22286
22287 2016-08-31  Werner Koch  <wk@gnupg.org>
22288
22289         wks: Send a final message to the user.
22290         + commit 04c042f3f2a631bc6e772c33f8da5e7aa7b1902a
22291         * tools/gpg-wks-server.c (send_congratulation_message): New.
22292         (check_and_publish): Call it.
22293
22294         wks: Relax permission check for the top directory.
22295         + commit e4eac16330449f3893c11820c15e07d58fb807ff
22296         * tools/gpg-wks-server.c: Allow S_IXOTH for the top directory.
22297
22298 2016-08-31  Neal H. Walfield  <neal@g10code.com>
22299
22300         g10: On a TOFU conflict, show whether the uids are expired or revoked.
22301         + commit edfb6934caf16c6afcfd82d684d8ae9c79674d10
22302         * g10/tofu.c (struct signature_stats): Add fields is_expired and
22303         is_revoked.
22304         (signature_stats_prepend): Clear *stats when allocating it.
22305         (ask_about_binding): Also show whether the user ids are expired or
22306         revoked.
22307
22308         doc: Add a help text for tofu.conflict.
22309         + commit b69b2cb082e39a7eb56082fa80219f6f14fbd2b4
22310         * doc/help.txt (.gpg.tofu.conflict): New help text.
22311
22312         g10: Always trust ultimately trusted keys.
22313         + commit 28c235ae757e9036b0b96efc28931fa5cc74f7ee
22314         * g10/tofu.c (get_trust): Always return TRUST_ULTIMATE for ultimately
22315         trusted keys.
22316
22317         g10: Fix error detection.
22318         + commit 5b48960a8a2555db7bf992261de9e922838c9913
22319         * g10/tofu.c: first_seen == 0 is not an error.
22320
22321         g10: Update a key's TOFU policy in a transaction.
22322         + commit e4d5e3cb0d10e8f77c7100d42cfdb32051de1c18
22323         * g10/tofu.c (tofu_set_policy): Do the update in a transaction.
22324         * g10/gpg.c (main): Do a TOFU policy update in a batch transaction.
22325
22326         g10: Fix the show old policy functionality when changing a TOFU policy.
22327         + commit 247eef005cf4c34e9a82227e4ab7823e04911be4
22328         * g10/tofu.c (record_binding): Fix the show old policy functionality.
22329
22330         g10: Drop unused argument.
22331         + commit 70df5a8fd781d8774d835384ca28c4d8518bb9d0
22332         * g10/tofu.c (begin_transaction): Remove unused option only_batch.
22333
22334         gpg: Move state local to tofu.c to a private structure.
22335         + commit 268f6b7a3403d036882b4af384ba7ab2f8c8355f
22336         * g10/gpg.h (struct server_control_s.tofu): Move fields in_transaction
22337         and batch_update_started from here...
22338         * g10/tofu.c (struct tofu_dbs_s): ... to here.
22339
22340         gpg: Avoid name spaces clash with future sqlite versions (2).
22341         + commit b8184d2d74e5ddd5eb68836b53fe5568110e14dd
22342         * g10/gpgsql.h (gpgsql_arg_type): Rename SQLITE_ARG_END to
22343         GPGSQL_ARG_END, SQLITE_ARG_INT to GPGSQL_ARG_INT, SQLITE_ARG_LONG_LONG
22344         to GPGSQL_ARG_LONG_LONG, SQLITE_ARG_STRING to GPGSQL_ARG_STRING, and
22345         SQLITE_ARG_BLOB to GPGSQL_ARG_BLOB.
22346
22347 2016-08-31  Werner Koch  <wk@gnupg.org>
22348
22349         gpg: Fix regression in gpgv's printing of the keyid.
22350         + commit 76304a971fe507ea659b952932ea899463ab7166
22351         * g10/keyid.c (keystr): Take care of KF_NONE != KF_DEFAULT.
22352
22353 2016-08-30  Neal H. Walfield  <neal@g10code.com>
22354
22355         g10: Improve TOFU batch update code.
22356         + commit 371ae66e9d5c7524431773c4a479fcae1ea3b652
22357         * g10/gpg.h (tofu): Rename field batch_update_ref to
22358         batch_updated_wanted.
22359         * g10/tofu.c (struct tofu_dbs_s): Rename field batch_update to
22360         in_batch_transaction.
22361         (begin_transaction): Only end an extant batch transaction if we are
22362         not in a normal transaction.  When ending a batch transaction, really
22363         end it.  Update ctrl->tofu.batch_update_started when starting a batch
22364         transaction.
22365         (end_transaction): Only release a batch transaction if ONLY_BATCH is
22366         true.  When releasing a batch transaction, assert that there is no
22367         open normal transaction.  Only allow DBS to be NULL if ONLY_BATCH is
22368         true.
22369         (tofu_begin_batch_update): Don't update
22370         ctrl->tofu.batch_update_started.
22371         (opendbs): Call end_transaction unconditionally.
22372
22373         g10: If a key has no valid user ids, change TOFU to return TRUST_NEVER.
22374         + commit d0451440c036106895a291f9ca1c53c2d5159f8f
22375         * g10/tofu.c (tofu_get_validity): If a key has no valid (non-expired)
22376         user ids, change TOFU to return TRUST_NEVER.
22377
22378         g10: Change tofu_register & tofu_get_validity to process multiple uids.
22379         + commit 6052c147091935fc0321ba24f4a44146df70ef01
22380         * g10/tofu.c (tofu_register): Take a list of user ids, not a single
22381         user id.  Only register the bindings, don't compute the trust.  Thus,
22382         change return type to an int and remove the may_ask parameter.  Update
22383         callers.
22384         (tofu_get_validity): Take a list of user ids, not a single user id.
22385         Update callers.  Observe signatures made by expired user ids, but
22386         don't include them in the trust calculation.
22387
22388         g10: Support nested transactions on the TOFU DB.
22389         + commit 33e97813d72996d22a295773c64261f5588ce9dd
22390         * g10/gpg.h (struct server_control_s): New field in_transaction.
22391         * g10/tofu.c (struct tofu_dbs_s): Remove fields savepoint_inner and
22392         savepoint_inner_commit.
22393         (begin_transaction): Increment CTRL->TOFU.IN_TRANSACTION.  Name the
22394         savepoint according to the nesting level.
22395         (end_transaction): Name the savepoint according to the nesting level.
22396         Decrement CTRL->TOFU.IN_TRANSACTION.
22397         (rollback_transaction): Likewise.  Only ever rollback a non-batch
22398         transaction.
22399         (opendbs): Assert that there are no outstanding transactions.
22400
22401         g10: Print the info text in more situations.
22402         + commit 4c2abb221b29c9e8e0876fe986472b562ee1c99f
22403         * g10/tofu.c (ask_about_binding): Print the info text when the policy
22404         is ask and there are multiple bindings with the email address.
22405
22406         g10: Print the formatted text.
22407         + commit 0858f141a8b8d0c098a0c6097176b7225c4a9db8
22408         * g10/tofu.c (ask_about_binding): Print the formatted text, not the
22409         unformatted text.
22410
22411         g10: When showing a user id's trust, pass the current signature.
22412         + commit 8dda861ad80228da76cd5c97467008c87b8b6eee
22413         * g10/mainproc.c (check_sig_and_print): Consistently pass SIG to
22414         get_validity.
22415
22416 2016-08-29  Werner Koch  <wk@gnupg.org>
22417
22418         w32: Fix build regression due to 2aa0701.
22419         + commit 8b3e691ffbaaa218d309d5aaf8f37532308558ff
22420         * common/logging.c (fun_writer): Always declare 'name_for_err'.
22421
22422         gpgconf: Print the plain socket directory with --list-dirs.
22423         + commit 8e3fa5a4b205c534de2142e5d071712f957cf06a
22424         * tools/gpgconf.c (list_dirs): Add plain socketdir out.
22425
22426         common: Add a default socket name feature.
22427         + commit 2aa0701013f703ad93e17da3345c493c08aa04ee
22428         * common/logging.c (log_set_socket_dir_cb): New.
22429         (socket_dir_cb): New.
22430         (set_file_fd): Allow "socket://".
22431         (fun_writer): Implement default socket name.
22432         * common/init.c (_init_common_subsystems): Register default socket.
22433
22434         gpg: Make decryption of -R work w/o --try-secret-key or --default-key.
22435         + commit bdbd03608b6f508ac4732f9986a046de8a85a311
22436         * g10/getkey.c (enum_secret_keys): At state 3 enumerate the keys in all
22437         cases not just when --try-all-secrets is used.
22438
22439 2016-08-25  Werner Koch  <wk@gnupg.org>
22440
22441         gpg: Fix false negatives in Ed25519 signature verification.
22442         + commit 0a5a854510fda6e6990938a3fca424df868fe676
22443         * g10/pkglue.c (pk_verify): Fix Ed25519 signatrue values.
22444         * tests/openpgp/verify.scm (msg_ed25519_rshort): New
22445         (msg_ed25519_sshort): New.
22446         ("Checking that a valid Ed25519 signature is verified as such"): New.
22447
22448         common: Rename an odd named function.
22449         + commit 74a082bc10960b2d65d4d1e31152f988a40a2225
22450         * common/openpgp-oid.c (oid_crv25519): Rename to oid_cv25519.
22451         (openpgp_oid_is_crv25519): Rename to openpgp_oid_is_cv25519.  Change
22452         callers.
22453
22454         gpg: New option --with-tofu-info.
22455         + commit 19d12be3cea5b4ee8153287a2f2442913a5e07a1
22456         * g10/gpg.c (oWithTofuInfo): New.
22457         (opts): Add --with-tofu-info.
22458         (main): Set opt.with_tofu_info.
22459         * g10/options.h (struct opt): Add field WITH_TOFU_INFO.
22460         * g10/tofu.c (show_statistics): Add optional arg OUTFP and enter
22461         special mode if not NULL.  Change all callers.
22462         (tofu_write_tfs_record): New.
22463         * g10/keylist.c (list_keyblock_colon): Do not print the tofu policy as
22464         part of the "uid" record.  Print a new "tfs" record if the new option
22465         is set.
22466         * tests/openpgp/tofu.scm (getpolicy): Change from UID to TFS record.
22467
22468 2016-08-24  Werner Koch  <wk@gnupg.org>
22469
22470         gpg: Change TOFU_STATS to return timestamps.
22471         + commit 0f1f02acc1cdcc2cf74a97b05507bb1f062f8af2
22472         * g10/tofu.c (write_stats_status): Add arg FP to print a colon
22473         formated line.  Adjust for changed TOFU_STATS interface.
22474         (show_statistics): Let the query return timestamps and use
22475         gnupg_get-time to compute the "time ago" values.
22476
22477         common: Guarantee that gnupg_get_time does not return an error.
22478         + commit 5eb2682686b32bd82096924eeabd0c5bd347adfd
22479         * common/gettime.c (gnupg_get_time): Abor if time() failed.
22480         (gnupg_get_isotime): Remove now useless check.
22481         (make_timestamp): Remove check becuase we already checked this modulo
22482         the faked time thing.
22483
22484         wks: Add command --supported to gpg-wks-client.
22485         + commit 460568d341851ac79dd100e00e4eafcac1318148
22486         * tools/gpg-wks-client.c (aSupported): New.
22487         (opts): Add --supported.
22488         (parse_arguments): Ditto.
22489         (main): Call command_supported.
22490         (command_supported): New.
22491
22492 2016-08-22  Werner Koch  <wk@gnupg.org>
22493
22494         wks: Install gpg-wks-client under libexec.
22495         + commit c47386a11a32c5ed3b5a31fad5c3e9a9a020ca7b
22496         * tools/Makefile.am (bin_PROGRAMS): Move gpg-wks-client to ...
22497         (libexec_PROGRAMS): ...here.
22498
22499         common: Remove unused vars in simple-pwquery.
22500         + commit 62f3e0027724b23c0de5be6d1e66cfdeef7e7bc9
22501         * common/simple-pwquery.c (agent_send_option): Remove unused vars.
22502         (simple_query): Ditto.
22503         (agent_open): Ditto.  Return RC on error.
22504         (simple_pwquery): Remove unused vars.  Remove shadowing of 'p'.
22505
22506 2016-08-18  Werner Koch  <wk@gnupg.org>
22507
22508         Release 2.1.15.
22509         + commit 6bee88dd067e03e7767ceacf6a849d9ba38cc11d
22510
22511
22512         po: Update German translation.
22513         + commit 0a32153316855224acda268edb60b80d4e64b12f
22514
22515
22516 2016-08-18  Åka Sikrom  <a4@hush.com>
22517
22518         po: Update Norwegian translation.
22519         + commit ec88d7c8a9af864fad8ab5e0b9c4eb90ddcdd630
22520
22521
22522 2016-08-18  Ineiev  <ineiev@gnu.org>
22523
22524         po: Update Russian translation.
22525         + commit 6f6bfbf175653faa5cf560a7174e81a599247e80
22526
22527
22528 2016-08-18  Werner Koch  <wk@gnupg.org>
22529
22530         gpg: Add import filter "drop-sig".
22531         + commit 1b55e864421f88b8c8088639682767076abbeab0
22532         * g10/import.c (import_drop_sig): New variable.
22533         (cleanup_import_globals): Release that.
22534         (parse_and_set_import_filter): Add filter "drop-sig".
22535         (filter_getval): Implement properties for drop-sig.
22536         (apply_drop_sig_filter): New.
22537         (import_one): Apply that filter.
22538
22539         dirmngr: Remove all system daemon features.
22540         + commit d83ba4897bf217d1045c58d1b99e52bd31c58812
22541         * dirmngr/dirmngr.h (opts): Remove fields 'system_service' and
22542         'system_daemon'.
22543         * common/homedir.c (dirmngr_sys_socket_name): Remove.
22544         (dirmngr_user_socket_name): Rename to ...
22545         (dirmngr_socket_name): this.  Change call callers.
22546         * common/asshelp.c (start_new_dirmngr): Remove the system socket
22547         feature.
22548         * tools/gpgconf.c (list_dirs): Do not print "dirmngr-sys-socket".
22549         * sm/server.c (gpgsm_server): Adjust for removed system socket feature.
22550         * dirmngr/server.c (cmd_getinfo): Ditto.
22551         (cmd_killdirmngr): Remove check for system daemon.
22552         (cmd_reloaddirmngr): Ditto.
22553         * dirmngr/dirmngr.c (USE_W32_SERVICE): Remove macro.
22554         (aService): Remove.
22555         (opts): Remove --service.
22556         (w32_service_control): Remove.
22557         (real_main, call_real_main) [W32]: Remove wrapper.
22558         (main): Remove Windows system service feature.  Remove system dameon
22559         feature.  Use only the "~/.gnupg/dirmngr_ldapservers.conf" file.
22560         * dirmngr/certcache.c (load_certs_from_dir): Remove warning in the
22561         system dameon case.
22562         * dirmngr/crlcache.c (DBDIR_D): Always use "~/.gnupg/crls.d".
22563         * dirmngr/ocsp.c (validate_responder_cert): Do not call
22564         validate_cert_chain which was used only in system daemon mode.
22565         * dirmngr/validate.c (validate_cert_chain): Always use the code.
22566
22567         gpg: New option --sender.
22568         + commit de6e3217cde81df370926571e0fd65e468619803
22569         * g10/options.h (struct opt): Add field 'sender_list'.
22570         * g10/gpg.c: Include mbox-util.h.
22571         (oSender): New.
22572         (opts): Add option "--sender".
22573         (main): Parse option.
22574
22575 2016-08-16  Werner Koch  <wk@gnupg.org>
22576
22577         agent: Allow import of overly large keys.
22578         + commit b5d63e81d5c472647decc7687cef91fee0378eb8
22579         * agent/command.c (MAXLEN_KEYDATA): Double the size.
22580
22581 2016-08-14  Werner Koch  <wk@gnupg.org>
22582
22583         g13: Allow the use of a g13tab label for --mount.
22584         + commit f02ceb6c6e94c6fbfaeeafe728397be38107de4d
22585         * g13/mount.c (g13_mount_container): Do not run the first access check
22586         if syshelp is required.
22587
22588         g13: Implement --umount for dm-crypt.
22589         + commit b781113cf1391926dedf8dc943624d3bb9726318
22590         * g13/g13.c (main): Implement command --umount.
22591         * g13/mount.c (g13_umount_container): use the syshelper if needed.
22592         * g13/backend.c (be_umount_container): New.
22593         * g13/be-dmcrypt.c (be_dmcrypt_umount_container): New.
22594         * g13/call-syshelp.c (call_syshelp_run_umount): New.
22595         * g13/sh-cmd.c (cmd_umount): New.
22596         (register_commands): Register UMOUNT.
22597         * g13/sh-dmcrypt.c (sh_dmcrypt_umount_container): New.
22598
22599 2016-08-13  Werner Koch  <wk@gnupg.org>
22600
22601         g13: Fix double free bug.
22602         + commit c9a0bccc77c93c08d6980a1718dfaf238a559eb9
22603         * g13/sh-cmd.c (cmd_mount, cmd_resume): Do not xfree TIUPLES.
22604
22605         g13: Consider g13tab for a mount command.
22606         + commit 700920640211168ae1c97d0adef74ba8615d90bb
22607         * g13/sh-cmd.c (cmd_getkeyblob): New.
22608         (register_commands): Register it.
22609         * g13/call-syshelp.c (getkeyblob_data_cb): New.
22610         (call_syshelp_get_keyblob): New.
22611         * g13/mount.c: Include callsyshelp.h.
22612         (g13_mount_container): Ask syshelp whether the filename is managed by
22613         g13tab.  Call syshelp to get the encrypted keyblob in this case.
22614
22615         g13: Move some function around.
22616         + commit 37e932658cbd873ac96ff7e2067a97dffc2e0507
22617         * g13/keyblob.c (g13_keyblob_decrypt): Move to ...
22618         * g13/server.c: to here.
22619         * g13/suspend.c, g13/mount.c: Include server.h.
22620         * g13/Makefile.am (g13_syshelp_SOURCES): Add keyblob.c
22621
22622         g13: New command --find-device.
22623         + commit b57f55321295846d47144bd6b39fbbcac0127421
22624         * common/status.h (STATUS_BLOCKDEV: New.
22625         * g13/call-syshelp.c: Include "call-syshelp.h".
22626         (finddevice_status_cb, call_syshelp_find_device): New.
22627         * g13/g13.c (aFindDevice): New.
22628         (opts): Add "--find-device".
22629         (main): Implement --find-device.
22630         * g13/sh-cmd.c (cmd_finddevice): New.
22631         (register_commands): Register new command.
22632
22633 2016-08-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
22634
22635         Avoid leading ": " in the log output when there are no prefixes.
22636         + commit 3a75ff65fba24ea2d024bd8fef633ab7d8f7d520
22637         * common/logging.c (do_logv): When no prefixes have been requested,
22638         omit the ": " separator, since there is nothing on the left-hand
22639         side of it.
22640
22641         Call log_set_prefix() with human-readable labels.
22642         + commit 61c2a1fa6d6cb345f9d81f4bdd3f8f8ddac1ea3e
22643         * agent/preset-passphrase.c, agent/protect-tool.c, dirmngr/dirmngr.c
22644         * dirmngr/t-http.c, g10/gpg.c, g10/gpgv.c, g13/g13-syshelp.c
22645         * g13/g13.c, kbx/kbxutil.c, scd/scdaemon.c, sm/gpgsm.c
22646         * tests/gpgscm/main.c, tools/gpg-check-pattern.c
22647         * tools/gpg-connect-agent.c, tools/gpgconf.c, tools/gpgtar.c
22648         * tools/symcryptrun.c: Invoke log_set_prefix() with
22649         human-readable labels.
22650
22651 2016-08-11  Werner Koch  <wk@gnupg.org>
22652
22653         gpg: New option --input-size-hint.
22654         + commit 70b5d7c43a57a44dad60c2c700a263610748d8f4
22655         * g10/options.h: Include stdint.h.
22656         (struct opt): Add field 'input_size_hint'.
22657         * g10/gpg.c (oInputSizeHint): New.
22658         (opts): Add --input-size-hint.
22659         (main): Set opt.input_size_hint.
22660         * g10/progress.c (write_status_progress): Use the hint.
22661
22662         common: New function string_to_u64.
22663         + commit 0698324cde3e0cef7eeb6cfd1640c5eefdf13698
22664         * common/stringhelp.c (string_to_u64): New.
22665         * dirmngr/http.c (longcounter_t): Remove.
22666         (struct cookie_s): Change content_length to uint64_t.
22667         (parse_response): Use string_to_u64.
22668
22669 2016-08-11  Justus Winter  <justus@g10code.com>
22670
22671         common: Remove compatibility code.
22672         + commit 72fa314b71e4ce8780f59b16d32cabf5d4bd5451
22673         * common/Makefile.am: Drop deleted files.
22674         * common/w32-afunix.c: Delete file.
22675         * common/w32-afunix.h: Likewise.
22676
22677         common: Rework the simple password query module.
22678         + commit 14479e2515439c73e385f37e8c2b3fc517b038b9
22679         * common/simple-pwquery.c (writen, readline): Drop.
22680         (agent_send_option, agent_send_all_options, agent_open): Just use
22681         libassuan.
22682         (simple_pw_set_socket): Simplify.
22683         (default_inq_cb): New function.
22684         (simple_pwquery, simple_query): Just use libassuan.
22685         * agent/Makefile.am (gpg_preset_passphrase_LDADD): Add libassuan.
22686         * tools/Makefile.am (symcryptrun_LDADD): Likewise.
22687
22688         common: Remove simple password query error codes.
22689         + commit 9e6503b7ce019aa417099ded1dda87b68c33f912
22690         * common/simple-pwquery.h: Remove mapping function.  Move all
22691         definitions of status codes...
22692         * common/simple-pwquery.c: ... here, and define them to meaningful gpg
22693         error values.
22694         * agent/preset-passphrase.c (preset_passphrase): Use error code as-is.
22695         (forget_passphrase): Likewise.
22696         * tools/symcryptrun.c (confucius_get_pass): Likewise.
22697
22698 2016-08-10  Werner Koch  <wk@gnupg.org>
22699
22700         gpg: Print the signer's UID during verification.
22701         + commit ed5c1b0b8a4790c4fb36a3129387f7c2ef5db302
22702         * g10/parse-packet.c (parse_signature): Sanitize the value stored in
22703         SIGNERS_UID.
22704         * g10/mainproc.c (issuer_fpr_string): New.
22705         (check_sig_and_print): Print the signers' UID.  Print the issuer
22706         fingerprint in --rfc4880bis mode.
22707
22708         common: New function try_make_printable_string.
22709         + commit f2ea7e539c9a22081e3159dcbca84f57f30724ca
22710         * common/stringhelp.c (sanitize_buffer): Remove.  Move code to ...
22711         * common/miscellaneous.c (try_make_printable_string): new.
22712         (make_printable_string): Call try_make_printable_string.
22713
22714 2016-08-10  Justus Winter  <justus@g10code.com>
22715
22716         tests: Fix distcheck.
22717         + commit a6acf1f6b39c5a607f61f643a5d21309ba58685d
22718         * tests/openpgp/issue2417.scm: Copy configuration.
22719
22720 2016-08-10  Werner Koch  <wk@gnupg.org>
22721
22722         gpg: Remove tofu database format "split".
22723         + commit 5b59999ce0dd1650ebe47a74a30ded6af00eeed3
22724         * g10/options.h (struct opt): Remove field tofu_db_format.
22725         * g10/gpg.h (server_control_s): Add fields tofu.batch_update_ref and
22726         tofu.batch_update_started.
22727         * g10/gpg.c (parse_tofu_db_format): Remove.
22728         (main): Make option --tofu-db-format obsolete.
22729         * g10/tofu.c: Major rework.  Remove the pretty complicated and slower
22730         split format and with that all the caching.  Use the dbs struct
22731         directly.  Move global vars for batch update into CTRL.  Change
22732         calling conventions of some function to take CTRL or DBS pointers
22733         instead of  the former low-level database pointer.
22734
22735 2016-08-10  Justus Winter  <justus@g10code.com>
22736
22737         g10: Fix opening of trust database.
22738         + commit a27410a251cd25ca96cd6743969c4db0a0fd553f
22739         * g10/tdbio.c (tdbio_set_dbname): This function explicitly checks for
22740         the file size, but handled the case of a zero-sized file incorrectly
22741         by returning success.  Fix this by initializing the database in that
22742         case.
22743         * tests/openpgp/Makefile.am (XTESTS): Add new test.
22744         * tests/openpgp/issue2417.scm: New file.
22745
22746         tests: Fix distcheck.
22747         + commit 194b1e979c7c547afd0dfea5b2496bdfa34b20f1
22748         * tests/openpgp/Makefile.am (EXTRA_DIST): Explicitly add setup and
22749         teardown scripts now that they no longer are included in the list of
22750         tests.
22751
22752         tests: Improve temporary directory handling.
22753         + commit d9240a3a4688c263632b4168ae2e04363bc91a3a
22754         * tests/gpgscm/ffi.c (ffi_init): Rename 'mkdtemp'.
22755         * tests/gpgscm/tests.scm (mkdtemp): New function that uses a sensible
22756         location and template if no arguments are given.
22757         (with-temporary-working-directory): Simplify accordingly.
22758         (make-temporary-file): Likewise.
22759         * tests/openpgp/run-tests.scm (run-tests-parallel-isolated): Likewise.
22760         (run-tests-sequential-isolated): Likewise.
22761
22762         gpgscm: Make the name of foreign functions more unique.
22763         + commit efe973dab7f69e2b1309446b2fbcd47ce0305399
22764         * tests/gpgscm/ffi-private.h (ffi_define_function_name): Add another
22765         underscore.
22766
22767         tests: Run each test in a clean environment.
22768         + commit e13f1ea8fff3964dc3008432f5c0f26aaa2eaa35
22769         * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Drop obsolete
22770         variables, add 'srcdir', use absolute paths.
22771         (TESTS): Rename to 'XTESTS' to avoid emitting the automake test
22772         runner.  Drop 'setup.scm' and 'finish.scm'.
22773         (xcheck): New target that runs 'run-tests.scm', our Scheme test suite
22774         runner.  It will run each test in a clean environment, isolated from
22775         the other tests.
22776         (EXTRA_DIST): Adapt accordingly.
22777         * tests/openpgp/README: Likewise.
22778
22779         tests: Make ssh test more robust.
22780         + commit b2b21580b68f3a9069562f99675b389a0d044713
22781         * tests/openpgp/ssh.scm: Drop the 'MD5:' which was not printed by
22782         previous ssh versions.
22783
22784 2016-08-10  NIIBE Yutaka  <gniibe@fsij.org>
22785
22786         agent: SSH support fix.
22787         + commit f14795d57f6c81709e9225dd3c5dfd3495cf1b2b
22788         * agent/command-ssh.c (ssh_handler_request_identities): Keep error
22789         message same.
22790
22791 2016-08-09  Werner Koch  <wk@gnupg.org>
22792
22793         agent: Fix regression in recent ssh changes.
22794         + commit e630f904993725c54ec63be00369589b7b7234d2
22795         * agent/command-ssh.c (sexp_key_construct): Lowercase the algo name.
22796
22797         gpg: Extend the PROGRESS line to give the used unit.
22798         + commit 16feb1e0ea9b5d3966f22f4ae047335b9d1b60e1
22799         * g10/progress.c (write_status_progress): Print the units parameter.
22800
22801 2016-08-09  Ben Kibbey  <bjk@luxsci.net>
22802
22803         Cleanup initialization of libgcrypt.
22804         + commit 49829c29e541546084950b8a153067db371d101a
22805         * common/init.c (init_common_subsystems): Initialize libgcrypt.
22806         * dirmngr/Makefile.am (dirmngr_ldap): Link with libgcrypt.
22807
22808 2016-08-09  NIIBE Yutaka  <gniibe@fsij.org>
22809
22810         agent: SSH support improvement.
22811         + commit ebf24e3b29766595204355d82f435a3e675bfbbc
22812         * agent/command-ssh.c (ssh_handler_request_identities): Skip a key with
22813         error, not giving up to handle the request itself.
22814         * agent/cvt-openpgp.c (extract_private_key): Support "ecdsa" key.
22815
22816 2016-08-08  Werner Koch  <wk@gnupg.org>
22817
22818         gpg: Cleanup of dek_to_passphrase function (part 2).
22819         + commit 491d6fdabb3d95905cd96d905e1f965ce8ff07e1
22820         * g10/passphrase.c (passphrase_get): Remove arg KEYID.  Change arg
22821         MODE to NOCACHE.
22822         (passphrase_to_dek): Remove args KEYID and PUBKEY_ALGO.  Split arg
22823         MODE into CREATE and NOCACHE.  Change all callers and adjust stubs.
22824         (passphrase_clear_cache): Remove args KEYID and ALGO.  They are not
22825         used.  Change caller.
22826
22827         gpg: Cleanup of dek_to_passphrase function (part 1).
22828         + commit 5b614973fe2d4b5ef402a3057c31c3ef3042a483
22829         * g10/passphrase.c (passphrase_to_dek_ext): Remove args CUSTDESC and
22830         CUSTPROMPT.  Merge into the passphrase_to_dek wrapper.
22831         (passphrase_get): Remove args CUSTOM_DESCRIPTION and CUSTOM_PROMPT.
22832
22833 2016-08-08  NIIBE Yutaka  <gniibe@fsij.org>
22834
22835         agent: More clean up of SSH support.
22836         + commit 591a8373a5d9567db9b1a1a48205e8a206c7b669
22837         * common/util.h (get_pk_algo_from_key): New.
22838         * common/sexputil.c (get_pk_algo_from_key): The implementation.
22839         * agent/gpg-agent.c: Remove include of openpgpdefs.h.
22840         * agent/command-ssh.c (struct ssh_key_type_spec): Use integer ALGO.
22841         (ssh_key_types): Update with GCRY_PK_*.
22842         (make_cstring, sexp_extract_identifier): Remove.
22843         (sexp_key_construct): Use gcry_pk_algo_name to get ALGO string.
22844         (ssh_key_to_blob): Use cadr to get value list.
22845         (ssh_key_type_lookup): Lookup with integer ALGO.
22846         (ssh_receive_key): Follow the change of ssh_key_type_lookup.
22847         (ssh_send_key_public): Likewise.  Use get_pk_algo_from_key to get ALGO.
22848
22849         tests: Add openpgp/gpgv-forged-keyring.scm.
22850         + commit 7dcad0d3503ac0d75e09efb16246dd78518986fc
22851         * tests/openpgp/gpgv-forged-keyring.scm: New.
22852         * tests/openpgp/forged-keyring.gpg: New.
22853         * tests/openpgp/Makefile.am (TESTS): Add gpgv-forged-keyring.scm.
22854         * tests/openpgp/defs.scm (tools): Add GPGV.
22855         (GPGV): New.
22856
22857 2016-08-06  Werner Koch  <wk@gnupg.org>
22858
22859         agent: Fix long standing regression tracking the connection count.
22860         + commit 40d16029ed8b334c371fa7f24ac762d47302826e
22861         * agent/gpg-agent.c (get_agent_active_connection_count): New.
22862         (do_start_connection_thread, start_connection_thread_ssh): Bump
22863         ACTIVE_CONNECTIONS up and down.
22864         * agent/command.c (cmd_getinfo): Add subcommand "connections".
22865
22866 2016-08-06  NIIBE Yutaka  <gniibe@fsij.org>
22867
22868         agent: Clean up SSH support.
22869         + commit 894789c3299dc47a8c1ccaaa7070382f0fae0262
22870         * agent/command-ssh.c (file_to_buffer): Remove.
22871         (ssh_handler_request_identities): Use agent_public_key_from_file.
22872
22873 2016-08-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
22874
22875         gpg: Avoid publishing the GnuPG version by default.
22876         + commit c9387e41db7520d176edd3d6613b85875bdeb32c
22877         * g10/gpg.c (main): initialize opt.emit_version to 0
22878         * doc/gpg.texi: document different default for --emit-version
22879
22880 2016-08-04  Werner Koch  <wk@gnupg.org>
22881
22882         gpg: Make sure that keygrips are printed for each subkey.
22883         + commit c8cc804f56bfefba46641f2c7078fcd67b494bae
22884         * g10/keylist.c (list_keyblock_colon): Print an emprty grip in case of
22885         an error.
22886
22887         gpg: Always print the fingerprint in colons mode.
22888         + commit 54a1ed20e203dcafeacbe21eb147efa08255dbf5
22889         * g10/keylist.c (list_keyblock_colon): Remove arg FPR.  Always print
22890         fingerprint records.  For secret keys always print keygrip records.
22891
22892         tests: Use gpgconf to set the ssh socket envvar.
22893         + commit 0c2a745a2bc21e8f439930f7c0e5d1521c2fd44c
22894         * tests/openpgp/ssh.scm ("SSH_AUTH_SOCK"): Use gpgconf.
22895
22896         gpgconf: Add limited support for -0.
22897         + commit db6f3eb926619dfe6ed2a9be197c51f9a1b6198c
22898         * tools/gpgconf.h (opt): Add field 'null'.
22899         * tools/gpgconf.c: Add option --null/-0.
22900         (list_dirs): Use it here.
22901
22902 2016-08-04  Justus Winter  <justus@g10code.com>
22903
22904         tests: Update list of tests in Scheme test runner.
22905         + commit 05cb30052cdf1d308ff7da901cfa5a809cd49479
22906         * tests/openpgp/run-tests.scm: Add missing tests.
22907
22908         tests: Fix path to fake-pinentry.
22909         + commit 3566544d04a4b81e5dd8a2883304673b2cc2f108
22910         * tests/openpgp/defs.scm: Correctly compute the path to fake-pinentry.
22911
22912 2016-08-04  NIIBE Yutaka  <gniibe@fsij.org>
22913
22914         po: Update Japanese translation.
22915         + commit 89234f7f3643bad2daddc94569f1d651ec5c835e
22916
22917
22918         po: update Japanese translation.
22919         + commit 573e0f36190346e0263bea3ae12a389f4f598d55
22920
22921
22922         g10: Fix checking key for signature validation.
22923         + commit 6f284e6ed63f514b15fe610f490ffcefc87a2164
22924         * g10/sig-check.c (check_signature2): Not only subkey, but also primary
22925         key should have flags.valid=1.
22926
22927 2016-08-03  Justus Winter  <justus@g10code.com>
22928
22929         kbx: Add missing header file.
22930         + commit e3358b246d9380008a4ba7c8f2fe03659901adaf
22931         * kbx/keybox-update.c: Add missing header file.
22932
22933 2016-08-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
22934
22935         More cleanup of "allow to".
22936         + commit dc107b78509807db375d3a382eb3376cd2183357
22937         * README, agent/command.c, agent/keyformat.txt, common/i18n.c,
22938           common/iobuf.c, common/keyserver.h, dirmngr/cdblib.c,
22939           dirmngr/ldap-wrapper.c, doc/DETAILS, doc/TRANSLATE,
22940           doc/announce-2.1.txt, doc/gpg.texi, doc/gpgsm.texi,
22941           doc/scdaemon.texi, doc/tools.texi, doc/whats-new-in-2.1.txt,
22942           g10/export.c, g10/getkey.c, g10/import.c, g10/keyedit.c, m4/ksba.m4,
22943           m4/libgcrypt.m4, m4/ntbtls.m4, po/ca.po, po/cs.po, po/da.po,
22944           po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po,
22945           po/fr.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po,
22946           po/nb.po, po/pl.po, po/pt.po, po/ro.po, po/ru.po, po/sk.po,
22947           po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po,
22948           scd/app-p15.c, scd/ccid-driver.c, scd/command.c, sm/gpgsm.c,
22949           sm/sign.c, tools/gpgconf-comp.c, tools/gpgtar.h: replace "Allow to"
22950           with clearer text.
22951
22952         In standard English, the normal construction is "${XXX} allows ${YYY}
22953         to" -- that is, the subject (${XXX}) of the sentence is allowing the
22954         object (${YYY}) to do something.  When the object is missing, the
22955         phrasing sounds awkward, even if the object is implied by context.
22956         There's almost always a better construction that isn't as awkward.
22957
22958         These changes should make the language a bit clearer.
22959
22960         dirmngr: Emit correct spelling of "superseded".
22961         + commit 436b28c23194fa77919967338d5a61a82d242153
22962         * dirmngr/crlcache.c (list_one_crl_entry): Spell superseded correctly.
22963         * dirmngr/ocsp.c (ocsp_invalid): Likewise.
22964
22965         This might break some tools which parse the existing output and expect
22966         misspellings, but i'm not sure there are many such tools, and we
22967         should use standardized orthography going forward.
22968
22969         Fix spelling and grammar.
22970         + commit cd45cf782b91ff0f6b023913963e5258ffcbf464
22971         * agent/learncard.c: s/coccured/occurred/
22972         * doc/dirmngr.texi: s/ommitted/omitted/, s/orginally/originally/,
22973           s/reponses/responses/i
22974         * doc/gpg-agent.texi, doc/dirmngr.texi, doc/gpg.texi: Fix "allows
22975           to" to more conventional english usage.
22976         * doc/tools.texi, g10/gpgcommpose.c, tests/openpgp/armor.scm,
22977           tests/openpgp/armor.test: s/occured/occurred/
22978         * tools/gpgsplit.c: s/calcualting/calculating/
22979         * sm/server.c: s/formated/formatted/
22980
22981 2016-08-03  Werner Koch  <wk@gnupg.org>
22982
22983         gpg,gpgsm: Block signals during keyring/keybox update.
22984         + commit 48a2c93a1886589d1a0e2a4a2173e0e81311200b
22985         * kbx/keybox-util.c (keybox_file_rename): Add arg BLOCK_SIGNALS.
22986         * kbx/keybox-update.c (rename_tmp_file): Block all signals when doing
22987         a double rename.
22988         * g10/keyring.c (rename_tmp_file): Block all signals during the double
22989         rename.
22990
22991         common: New file utilproto.c.
22992         + commit 3a2421c94015432caa49e166bc5bf5c4f80ab7c7
22993         * common/util.h: Factor prototypes from signal.c out to ...
22994         * common/utilproto.h: new.
22995         * common/Makefile.am (common_sources): Add new file.
22996
22997 2016-08-01  Justus Winter  <justus@g10code.com>
22998
22999         gpgsm: Fix machine-readable key listing.
23000         + commit 40365b28c3fdf087fd58401f5a6f42f9d7d29d20
23001         * sm/keylist.c (list_cert_colon): Drop superfluous colon.
23002
23003         tests: Distribute standalone test runner.
23004         + commit c971ff0823d9a649b32fd9f169a12abc3095246e
23005         * tests/openpgp/Makefile.am (EXTRA_DIST): Add missing file
23006         'run-tests.scm'.
23007
23008 2016-07-28  Justus Winter  <justus@g10code.com>
23009
23010         tests: Fix distcheck.
23011         + commit 9e799b0e4f131126b80a5d3272c36d52b8ba1720
23012         * tests/openpgp/Makefile.am (sample_msgs): New variable.
23013         (EXTRA_DIST): Also ship the sample msgs.
23014
23015 2016-07-27  Fredrik Fornwall  <fredrik@fornwall.net>
23016
23017         build: Fix check for Android.
23018         + commit 583a464c62ce8f7d70f5fdab2c7ea73ec3348d69
23019         * configure.ac: Match other Android targets as well.
23020
23021 2016-07-26  Justus Winter  <justus@g10code.com>
23022
23023         common: Fix iobuf_peek corner case.
23024         + commit b2572b0c386fd12ac6581fcce72f8d48cbfd27c7
23025         Previously, iobuf_peek on a file smaller than 'buflen' would hang.
23026
23027         * common/iobuf.c (underflow): Generalize by adding a target parameter.
23028         (iobuf_peek): Use this to prevent looping here.
23029         * tests/openpgp/Makefile.am (TESTS): Add new test.
23030         * tests/openpgp/setup.scm (dearmor): Move function...
23031         * tests/openpgp/defs.scm (dearmor): ... here.
23032         * tests/openpgp/issue2419.scm: New file.
23033         * tests/openpgp/samplemsgs/issue2419.asc: Likewise.
23034
23035         gpgscm: Do not shadow common function name in catch macro.
23036         + commit 046338b8494c036a5e717130d3eadce0291126fc
23037         * tests/gpgscm/init.scm (catch): Do not shadow 'exit'.
23038
23039         tests: Fix distcheck.
23040         + commit 66c0dab3c722c2766828515120775b106286334e
23041         * tests/openpgp/Makefile.am (samplekeys): Add missing key.
23042
23043         gpgscm: Make the verbose setting more useful.
23044         + commit f17aecbcd98103fcd2ece537be96930f354de656
23045         * tests/gpgscm/ffi.c (do_get_verbose): New function.
23046         (do_set_verbose): Likewise.
23047         (ffi_init): Turn *verbose* into a function, add *set-verbose!*.
23048         * tests/gpgscm/tests.scm (call): Adapt accordingly.
23049         (call-with-io): Dump output if *verbose* is high.
23050         (pipe-do): Adapt accordingly.
23051         * tests/openpgp/defs.scm: Set verbosity according to environment.
23052         * tests/openpgp/run-tests.scm (test): Adapt accordingly.
23053
23054         common: Avoid excessive stack use.
23055         + commit b3610badf691178bbbf0831af9aa6b6658c1948a
23056         * common/exectool.c (copy_buffer_shred): Make passing NULL a nop.
23057         (gnupg_exec_tool_stream): Allocate copy buffers from the heap.
23058
23059         common: Rework resource cleanup when handling errors.
23060         + commit 35132a8b119dbc3393ceb0d0874917905d1a6354
23061         * common/exectool.c (gnupg_exec_tool_stream): Rework error handling.
23062
23063         common: Add unit test for exectool.
23064         + commit fe40e9c53dc0710ff73e72d05ba8040874465b55
23065         * common/Makefile.am: Build new test.
23066         * common/t-exectool.c: New file.
23067
23068 2016-07-25  Justus Winter  <justus@g10code.com>
23069
23070         g10: Fix key import statistics.
23071         + commit 4ba11251aff578394000bf480f47160f0879c763
23072         'transfer_secret_keys' collects statistics on a subkey-basis, while
23073         the other code does not.  This leads to inflated numbers when
23074         importing secret keys.  E.g. 'count' is incremented by the main
23075         parsing loop in 'import', and again in 'transfer_secret_keys', leading
23076         to a total of 3 if one key with two secret subkeys is imported.
23077
23078         * g10/import.c (import_secret_one): Adjust to the fact that
23079         'transfer_secret_keys' collects subkey statistics.
23080         * tests/openpgp/Makefile.am (TESTS): Add new test.
23081         * tests/openpgp/issue2346.scm: New file.
23082         * tests/openpgp/samplekeys/issue2346.gpg: Likewise.
23083
23084 2016-07-22  Justus Winter  <justus@g10code.com>
23085
23086         gpgscm: Make function more general.
23087         + commit 9ee23a715d5dad6bf568a2deb1c55bf15601cf51
23088         * tests/gpgscm/tests.scm (in-srcdir): Accept more path fragments.
23089
23090         g10: Properly ignore legacy keys in the keyring cache.
23091         + commit d9839c9d303a01dc1032a6de311e034fe14e81da
23092         * g10/keyring.c (keyring_rebuild_cache): Properly ignore legacy keys
23093         in the keyring cache.
23094         * tests/migrations/Makefile.am (TESTS): Add new test.
23095         * tests/migrations/common.scm (GPG-no-batch): New variable.
23096         (run-test): New function.
23097         * tests/migrations/issue2276.scm: New file.
23098         * tests/migrations/issue2276.tar.asc: Likewise.
23099
23100 2016-07-21  Justus Winter  <justus@g10code.com>
23101
23102         g10: Fix error handling.
23103         + commit 45bb9a2a46e11bc13c6b39e7b4748b7de199018e
23104         * g10/tofu.c (show_statistics): Fix error handling, 0 is a valid
23105         duration.
23106
23107         g10: Drop superfluous begin transaction.
23108         + commit 8a6f8e1e397a2d676b211f2dbc6df4a80b67442d
23109         * g10/tofu.c (record_binding): We only need a transaction for the
23110         split format.
23111
23112         gpgscm: Make assert macro more accurate.
23113         + commit 699c6c9f4b44441ab3db7f942df5b81f4cd88b06
23114         * tests/gpgscm/lib.scm (assert): Print the representation of the
23115         failed expression.
23116
23117         gpgscm: Make error message more useful.
23118         + commit 7207b2fe45bcf884e029366a2677a570234bed2e
23119         * tests/gpgscm/scheme.c (opexe_0): Include names of missing function
23120         parameters in the error message.
23121
23122         g10: Fix crash.
23123         + commit 1af2fd44f0a66fd0d94c224319db0b128d42a288
23124         * g10/tofu.c (tofu_closedbs): Fix freeing database handles up to the
23125         cache limit.  Previously, this would crash if db_cache_count == count.
23126
23127 2016-07-20  NIIBE Yutaka  <gniibe@fsij.org>
23128
23129         scd: Fix card removal/reset on multiple contexts.
23130         + commit 1598a4476466822e7e9c757ac471089d3db4b545
23131         * scd/app.c (application_notify_card_reset): Add message for debug.
23132         *scd/command.c (update_card_removed): Call release_application and set
23133         SLOT -1 here.
23134         (struct server_local_s): Remove app_ctx_marked_for_release.
23135         (do_reset): Don't mark release but call release_application here.
23136         (open_card): Remove app_ctx_marked_for_release handling.
23137         (update_reader_status_file): Don't set SLOT here, so that it can be
23138         released the APP by application_notify_card_reset in
23139         update_card_removed.
23140
23141 2016-07-19  Justus Winter  <justus@g10code.com>
23142
23143         agent: Add known keys to sshcontrol.
23144         + commit 270f7f7b8b235cc93516566702e2a1d256605cca
23145         * agent/command-ssh.c (ssh_identity_register): Add a key to sshcontrol
23146         even if it is already in the private key store.
23147         * tests/openpgp/ssh.scm: Test this.
23148
23149         tests: Add test for ssh support.
23150         + commit d7a405de8325aa945ab791dcd3bc48272af33b86
23151         * tests/gpgscm/tests.scm (path-expand): New function.
23152         * tests/openpgp/Makefile.am (TESTS): Add new test.
23153         (sample_keys): Add new keys.
23154         (CLEANFILES): Clean ssh socket and control file.
23155         * tests/openpgp/fake-pinentry.c (main): Add a default passphrase.
23156         * tests/openpgp/gpg-agent.conf.tmpl: Enable ssh support.
23157         * tests/openpgp/samplekeys/ssh-dsa.key: New file.
23158         * tests/openpgp/samplekeys/ssh-ecdsa.key: Likewise.
23159         * tests/openpgp/samplekeys/ssh-ed25519.key: Likewise.
23160         * tests/openpgp/samplekeys/ssh-rsa.key: Likewise.
23161         * tests/openpgp/ssh.scm: Likewise.
23162
23163 2016-07-19  NIIBE Yutaka  <gniibe@fsij.org>
23164
23165         scd: Fix race conditions for release_application.
23166         + commit 0c1fd4e9884ed7c1edd1819762b9e8a77f606ed3
23167         * scd/command.c (do_reset, cmd_restart): Reset app_ctx before calling
23168         release_application.
23169
23170 2016-07-18  Justus Winter  <justus@g10code.com>
23171
23172         agent: Fix passphrase cache lookups.
23173         + commit f474249366e8e143c8e6eb7f7b1a74056e46fa1f
23174         CACHE_MODE_ANY is supposed to match any cache mode except
23175         CACHE_MODE_IGNORE, but the code used '==' to compare cache modes.
23176
23177         * agent/cache.c (cache_mode_equal): New function.
23178         (agent_set_cache): Use the new function to compare cache modes.
23179         (agent_get_cache): Likewise.
23180         * tests/openpgp/Makefile.am (TESTS): Add new test.
23181         * tests/openpgp/issue2015.scm: New file.
23182
23183 2016-07-15  Justus Winter  <justus@g10code.com>
23184
23185         build: Always build gpgtar.
23186         + commit 7f4dd24b880323a5b772719dafae829c288303a8
23187         We use gpgtar to unpack test data, hence we always build it.  If the
23188         user opts out, we simply don't install it.
23189
23190         * configure.ac: Add comment.
23191         * tests/migrations/Makefile.am (required_pgms): Make sure gpgtar is
23192         built.
23193         * tools/Makefile.am: Always build gpgtar, but do not install it if the
23194         user used '--disable-gpgtar'.
23195
23196 2016-07-15  Werner Koch  <wk@gnupg.org>
23197
23198         wks: Publish as binary file.
23199         + commit b7b37716b9d2cd1b71b5f7f0e4fb2c1a43eee90a
23200         * tools/gpg-wks-server.c (copy_key_as_binary): New.
23201         (check_and_publish): Use new function instead of rename.
23202
23203 2016-07-15  Justus Winter  <justus@g10code.com>
23204
23205         gpgscm: Fix linking.
23206         + commit c49c43d7e4229fd9f1bc55e17fa32fdc334dbef6
23207         * tests/gpgscm/Makefile.am: Add -lintl.
23208
23209         g10: Fix building without trust models.
23210         + commit d21efa398874be4a15e8283c5fc382fb90f562fd
23211         * g10/pkclist.c (write_trust_status): Fall back to the previous
23212         behavior.
23213
23214         tests: Check for gpgtar.
23215         + commit 12a887050a560c4cacaf95e4cdb0cc42d8b87aa1
23216         * tests/migrations/extended-pkf.scm: Skip test if gpgtar is not built.
23217         * tests/migrations/from-classic.scm: Likewise.
23218         * tests/openpgp/gpgtar.scm: Fix check for gpgtar.
23219
23220 2016-07-14  Werner Koch  <wk@gnupg.org>
23221
23222         Release 2.1.14.
23223         + commit 09c448202ffb4c26d7ec2028351a78e2d3680396
23224
23225
23226         po: Update the German translation.
23227         + commit 23c2491f94b94fa231bde8187eb958432555eff1
23228
23229
23230 2016-07-14  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
23231
23232         dirmngr: fix handling of HTTP redirections.
23233         + commit 60428c24fb29cb633c9392abb777bc4da88dbfba
23234         * dirmngr/ks-engine-http.c (ks_http_fetch): Reinitialize HTTP session
23235         when following a HTTP redirection.
23236
23237 2016-07-14  Werner Koch  <wk@gnupg.org>
23238
23239         gpg: Remove options --print-dane-records and --print-pka-records.
23240         + commit 1e9bc66a9a60de668890452d504eea3c3c614f7e
23241         * g10/gpg.c (main): Remove options but print a dedicated warning.
23242         * g10/options.h (struct opt): Remove fields 'print_dane_records' and
23243         'print_pka_records'.
23244         * g10/keylist.c (list_keyblock): Do not call list_keyblock_pka.
23245         (list_keyblock_pka): Remove.
23246
23247 2016-07-14  Åka Sikrom  <a4@hush.com>
23248
23249         po: Complete update of the Norwegian translation.
23250         + commit d6d7e4d218a1e2e2a88bc893b00967b032d194f8
23251
23252
23253 2016-07-14  Yuri Chornoivan  <yurchor@ukr.net>
23254
23255         Update Ukrainian translation.
23256         + commit 9427288ebb32141c196996315f93535fd7744901
23257
23258
23259 2016-07-14  Ineiev  <ineiev@gnu.org>
23260
23261         Update Russian translation.
23262         + commit 39c88870359bc75e9f72e08a7466fcff01bdc655
23263
23264
23265 2016-07-14  Werner Koch  <wk@gnupg.org>
23266
23267         gpg: Fix regression since 2.1 in --search-key with a fingerprint.
23268         + commit 0342369ce001b9dba04dc79e7a4eb66fbda278e7
23269         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Prefix fingerprint with 0x.
23270
23271         gpgscm: Use kludge to avoid improper use of ffi_schemify_name.
23272         + commit fb14bf0a95e361b0991067e3aea2902d54be811d
23273         * tests/gpgscm/ffi.c (ffi_schemify_name): Use xstrdup instead of
23274         strdup for now.
23275
23276         build: Require latest released libraries.
23277         + commit c98995efefbdebea8f53d54ba2df4217dfd31ad4
23278         * agent/protect.c (OCB_MODE_SUPPORTED): Remove macro.
23279         (do_encryption): Always support OCB.
23280         (do_decryption): Ditto.
23281         (agent_unprotect): Ditto.
23282         * dirmngr/server.c (is_tor_running): Unconditionally build this.
23283
23284 2016-07-13  Werner Koch  <wk@gnupg.org>
23285
23286         build: Update config.{guess,sub} to {2016-05-15,2016-06-20}.
23287         + commit 66b634f27f10e4c0cb21c3f201998497d0bb24ca
23288         * build-aux/config.guess: Update.
23289         * build-aux/config.sub: Update.
23290
23291         gpg: Fix regression due to the new --mimemode options.
23292         + commit 3b8ed7650d2d63b01ec80ecf9e493b80e3ac7ef8
23293         * g10/gpg.c (opts): Re-add oTextmodeShort.
23294
23295 2016-07-13  Daiki Ueno  <ueno@gnu.org>
23296
23297         gpg: Make --try-all-secrets work for hidden recipients.
23298         + commit 82b90eee100cf1c9680517059b2d35e295dd992a
23299         * g10/getkey.c (enum_secret_keys): Really enumerate all secret
23300         keys if --try-all-secrets is specified.
23301
23302 2016-07-13  Werner Koch  <wk@gnupg.org>
23303
23304         gpg: Do not print a the short keyid if the high word is zero.
23305         + commit 7b96a8d736934e65bb2adbc17059f84dfeaf95fb
23306         * g10/keyid.c (format_keyid): Always returh long keyid ifor KF_LONG.
23307
23308         gpg: New option --mimemode.
23309         + commit e148c3caa90fbadba32bdbfea9513392e3aea598
23310         * g10/gpg.c (oMimemode): New.
23311         (opts): Add --mimemode.
23312         (main): Use --mimemode only in rfc4880bis compliance mode.
23313         * g10/options.h (struct opt): Add field "mimemode".
23314         * g10/build-packet.c (do_plaintext): Allow for mode 'm'.
23315         * g10/encrypt.c (encrypt_simple, encrypt_crypt): Use 'm' if requested.
23316         * g10/plaintext.c (handle_plaintext): Handle 'm' mode.
23317         * g10/sign.c (write_plaintext_packet): Handle 'm' mode.
23318         (sign_file, sign_symencrypt_file): Use 'm' if requested.
23319
23320         wks: Use correct key for the confirmation.
23321         + commit 95810929f75bd718dbdf2cd1c0181137a45e2456
23322         * tools/gpg-wks-client.c (send_confirmation_response): Actually
23323         encrypt to the recipient.
23324
23325         wks: New server command --list-domains.
23326         + commit 44ecc33b4a7147d9c112a72f55a42b65cef4fe67
23327         * tools/gpg-wks-server.c (aListDomains): New.
23328         (opts): Add --list-domains.
23329         (parse_arguments): Implement.
23330         (main): Ditto.  Use only one final diagnostic message.
23331         (command_list_domains): New.
23332         (check_and_publish): Remove directory creation.
23333         (get_domain_list): New.
23334         (expire_pending_confirmations): Rewrite using a list of directories.
23335         (command_cron): Get domain list and pass to
23336         expire_pending_confirmations.
23337
23338 2016-07-13  NIIBE Yutaka  <gniibe@fsij.org>
23339
23340         agent: Fix envvars for UPDATESTARTUPTTY.
23341         + commit 7be218177701af316db75057c99ca674d53cf585
23342         agent/command.c (cmd_updatestartuptty): Use session_env_list_stdenvnames
23343         to get the list.
23344
23345 2016-07-12  Werner Koch  <wk@gnupg.org>
23346
23347         g13: Fix memleak.
23348         + commit acb27915f8646a875b6bb507ff46cd1bc330c02b
23349         * g13/g13tuple.c (create_tupledesc): Init refcount to 1.
23350
23351         wks: Add --cron command to gpg-wks-server.
23352         + commit 38eb5f81d223616e3ee34bdfb41c387ce4e7df22
23353         * tools/gpg-wks-server.c (PENDING_TTL): New.
23354         (expire_one_domain, expire_pending_confirmations): New.
23355         (command_cron): New.
23356         (main): Implement --cron.
23357
23358         wks: Try to send an encrypted confirmation back.
23359         + commit 5de41c4ecef32add89044b8a550a47cce8c6d61e
23360         * tools/gpg-wks-client.c (encrypt_response_status_cb): New.
23361         (encrypt_response): New.
23362         (send_confirmation_response): Encrypt the response.
23363
23364         * tools/gpg-wks-server.c (send_confirmation_request): Use freeing of
23365         BODY and BODYENC.
23366
23367         wks: Also create DANE record.
23368         + commit d3837e0435921bfa5587a50738f5924a5fdf976a
23369         * tools/gpg-wks-server.c (copy_key_as_dane): New.
23370         (check_and_publish): Also publish as DANE record.
23371
23372         gpg: Extend import-option import-export to print PKA or DANE.
23373         + commit 9b075575cdc5851b019aed5ca5d5e18416beec8e
23374         * g10/export.c (do_export_stream): Move PKA and DANE printing helper
23375         code to ...
23376         (print_pka_or_dane_records): this fucntion.
23377         (write_keyblock_to_output): Add arg OPTIOSN and call
23378         print_pka_or_dane_records if requested.
23379
23380         gpg: Move a function from import.c to export.c.
23381         + commit 0f5b105d96780a29cc58893285e6c38482e0cc2d
23382         * g10/import.c (write_keyblock_to_output): Move to ...
23383         * g10/export.c (write_keyblock_to_output): here.  Add arg WITH_ARMOR.
23384         Also make sure never to export ring trust packets.
23385
23386 2016-07-11  Werner Koch  <wk@gnupg.org>
23387
23388         gpgconf: Enhance --list-dirs.
23389         + commit 7732b332886792b2bbf47ecf7430e953f1c55a2c
23390         * tools/gpgconf.c (main) <aListDir>: Factor code out to ...
23391         (list_dirs): new.  Rewrite to use a table.  Allow selection of a
23392         items.  Add "agent-ssh-socket".
23393
23394 2016-07-09  NIIBE Yutaka  <gniibe@fsij.org>
23395
23396         gpgv: Tweak default options for extra security.
23397         + commit e32c575e0f3704e7563048eea6d26844bdfc494b
23398         * g10/gpgv.c (main): Set opt.no_sig _cache, so that it doesn't depend on
23399         cached status.  Similarly, set opt.flags.require_cross_cert for backsig
23400         validation for subkey signature.
23401
23402 2016-07-07  Werner Koch  <wk@gnupg.org>
23403
23404         gpg: Add export options "export-pka" and "export-dane".
23405         + commit cbe467e794f3be81b8da2bcb1732b5514b13b71d
23406         * g10/options.h (EXPORT_PKA_FORMAT): New.
23407         * g10/keylist.c (list_keyblock_pka): Do not use DANE flag.
23408         * g10/export.c: Include zb32.h.
23409         (parse_export_options): Add options "export-pka" and "export-dane".
23410         (do_export): Do not armor if either of these option is set.
23411         (print_pka_or_dane_records): New.
23412         (do_export_stream): Implement new options.
23413
23414         gpg: Split a too large export function.
23415         + commit b05878f32aa507aa9087d7c992b630840b5ad71c
23416         * g10/export.c (do_export_stream): Factor some code out to ...
23417         (do_export_one_keyblock): new.
23418
23419 2016-07-07  Justus Winter  <justus@g10code.com>
23420
23421         gpgscm: Capture output of spawned processes.
23422         + commit 2f61aa0ff11b194d20307751ab686c87cd47dd56
23423         * tests/gpgscm/tests.scm (call-check): Capture stdout and stderr, and
23424         return stdout if the child exited successfully, or include stderr in
23425         the error.
23426         * tests/openpgp/version.scm: Demonstrate this by checking the stdout.
23427
23428 2016-07-06  Werner Koch  <wk@gnupg.org>
23429
23430         doc: Escape file names in generated macros.
23431         + commit 511c2522b95333226a5e45e538fed29dd44c9be3
23432         * doc/mkdefsinc.c (print_filename): New.
23433         (main): Use it here.
23434
23435         wks: Let the server take the encrytion key from the file.
23436         + commit e5896da666551da5322b2ae5458d429b9e60241e
23437         * tools/gpg-wks-server.c (encrypt_stream): Change arg 'fingerprint' to
23438         'keyfile'.
23439         (store_key_as_pending): Add arg 'r_fname' to make of the keyfile.
23440         (send_confirmation_request): Add arg 'keyfile'.
23441         (process_new_key): Pass on the name of the keyfile.
23442
23443         gpg: New options --recipient-file and --hidden-recipient-file.
23444         + commit a479804c86bc24bfab101f39464db3ecfbaedf6d
23445         * g10/gpg.c (oRecipientFile, oHiddenRecipientFile): New.
23446         (opts): Add options --recipient-file and --hidden-recipient-file.
23447         (main): Implement them.  Also remove duplicate code from similar
23448         options.
23449         * g10/keydb.h (PK_LIST_FROM_FILE): New.
23450         (PK_LIST_SHIFT): Bump up.
23451         * g10/pkclist.c (expand_group): Take care of PK_LIST_FROM_FILE.
23452         (find_and_check_key): Add and implement arg FROM_FILE.
23453         (build_pk_list): Pass new value for new arg.
23454         * g10/getkey.c (get_pubkey_fromfile): New.
23455         * g10/gpgv.c (read_key_from_file): New stub.
23456         * g10/test-stubs.c (read_key_from_file): New stub.
23457         * g10/server.c (cmd_recipient): Add flag --file.
23458         * g10/import.c (read_key_from_file): New.
23459
23460         * tests/openpgp/defs.scm (key-file1): New.
23461         (key-file2): New.
23462         * tests/openpgp/setup.scm: Add their private keys and import the
23463         key-file1.
23464         * tests/openpgp/encrypt.scm: Add new test.
23465
23466         gpg: New option --no-keyring.
23467         + commit 073be51a866cb5600479c504a44ae5ac94a449a2
23468         * g10/gpg.c (oNoKeyring): New.
23469         (opts): Add "--no-keyring".
23470         (main): Do not register any keyring if the option is used.
23471
23472         gpg: Document use of node flags in import.c and remove unused args.
23473         + commit fdfde91595109e51a5b8fafd292244ad41dfb83d
23474         * g10/import.c (NODE_GOOD_SELFSIG): New.  Use instead of 1.
23475         (NODE_BAD_SELFSIG): New.  Use instead of 2.
23476         (NODE_DELETION_MARK): New.  Use instead of 4.
23477         (NODE_FLAG_A): New.  Use to mark new nodes in merge_blocks.
23478         (chk_self_sigs): Remove unused args FNAME and PK.
23479         (import_one): Adjust call.  Simplify error return because
23480         chk_self_sigs does not return an error code.
23481         (append_uid, append_key, merge_sigs, merge_keysigs): Remove unsued
23482         args FNAME and KEYID.
23483         (merge_blocks, import_one, import_secret_one)
23484         (import_revoke_cert): Remove unused arg FNAME.
23485
23486         gpg: Get rid of an unused arg in a function in getkey.c.
23487         + commit 7e0c48eb6f18a80142ca2a0f76fe8d270a4e5b33
23488         * g10/getkey.c (pk_from_block): Remove unused arg CTX.  Change all
23489         callers.
23490
23491         gpg: Change calling convention for a function in getkey.c.
23492         + commit 9385dfeb9dd6d83608a10c7896c341f585a25a2b
23493         * g10/getkey.c (merge_selfsigs): Remove arg CTX.  Add args REQ_USAGE
23494         and WANT_EXACT.
23495         (finish_lookup): Adjust caller.  Set LOOKUP_NOT_SELECTED here...
23496         (lookup): and not here.
23497
23498 2016-07-05  Werner Koch  <wk@gnupg.org>
23499
23500         gpg: Fix possible out-of-bounds read in is_armored.
23501         + commit 5d1a9c4dc823b418db6c4686da55ee3abdf023b0
23502         * g10/armor.c (check_input): Call is_armored only if LEN >= 2.
23503         (unarmor_pump): Use a 2 byte buffer for is_armored.
23504
23505 2016-07-05  Justus Winter  <justus@g10code.com>
23506
23507         tests: Honor environment variable 'TMP'.
23508         + commit 8270580a5a70874beeffcdd16221937db4bcdc93
23509         This fixes problems with long socket names, e.g. when doing distcheck.
23510
23511         * tests/gpgscm/tests.scm (path-join): New function.
23512         (with-temporary-working-directory): Honor 'TMP'.
23513         (make-temporary-file): Likewise.
23514         * tests/migrations/Makefile.am (TMP): Default to '/tmp'.
23515         (TESTS_ENVIRONMENT): Set 'TMP'.
23516         * tests/openpgp/Makefile.am (TMP): Default to '/tmp'.
23517         (TESTS_ENVIRONMENT): Set 'TMP'.
23518
23519         gpgscm: Improve robustness and compatibility.
23520         + commit f26fe4f73e8430d93c03d95a8a24fdabd078bb20
23521         * tests/gpgscm/ffi.c (do_getenv): Avoid gccism.
23522         (do_mkdtemp): Handle errors.
23523
23524         tests/migrations: Fix distcheck.
23525         + commit b70d08827ddb56423ad610b4ebaaaf9cc763512f
23526         * tests/migrations/Makefile.am (TESTS): Rename test.
23527         (TEST_FILES): Update list.
23528         (EXTRA_DIST): Add common.scm.
23529         * tests/migrations/common.scm (GPGTAR): New variable.
23530         (dearmor): Rename and untar archive.
23531         * tests/migrations/extended-private-key-format.scm: Rename.
23532         (setup): Update.
23533         * tests/migrations/extended-pkf.tar.asc: New file.
23534         * tests/migrations/extended-private-key-format.gpghome: Delete.
23535         * tests/migrations/from-classic.gpghome: Likewise.
23536         * tests/migrations/from-classic.scm (setup): Update.
23537         * tests/migrations/from-classic.tar.asc: New file.
23538
23539         tools/gpgtar: Provide --create and --extract.
23540         + commit 0b8a3358798b7028be872a923da2e275da67d592
23541         * tools/gpgtar.c (cmd_and_opt_values): New values.
23542         (opts): New actions.
23543         (parse_arguments): Handle new actions.
23544         * tests/openpgp/gpgtar.scm: Test new interface.
23545
23546         g10: Fix out-of-bounds read.
23547         + commit a6b87981f7ddef42b25703723162c647e312b125
23548         * g10/armor.c (use_armor_filter): We need two bytes for 'is_armored'.
23549
23550 2016-07-04  Werner Koch  <wk@gnupg.org>
23551
23552         wks: Add command --read to gpg-wks-client.
23553         + commit 8c8ae043b8d65cb79e0e99c5bdbdcbf34714bd0c
23554         * tools/gpg-wks-client.c (aRead): New.
23555         (opts): Add command "--read".
23556         (main): Implement that.
23557
23558         tests: Add a gettime test for sizeof (time_t) > 4.
23559         + commit 27d158ead4a2b9c52269ef28d050a49c786c7d13
23560         * common/t-gettime.c (test_isotime2epoch): Add 4 more tests.
23561
23562 2016-07-03  Werner Koch  <wk@gnupg.org>
23563
23564         gpg: Avoid spurious failures on keyblocks with no or only deleted nodes.
23565         + commit 9177a897732b3cebf3f15c97c1f613f71b6318fe
23566         * g10/import.c (write_keyblock_to_output): Clear ERR on success.
23567
23568         wks: Let the client only export the requested UID.
23569         + commit 1bfed0bbc5ec9d60d4fb3a0f5c865923ed3563e7
23570         * tools/gpg-wks-client.c (get_key): Export only the requested uid.
23571
23572         tools: Call sendmail directly from the wks tools.
23573         + commit 7705f310f1406fe49b45e16c371b09863313f24f
23574         * tools/send-mail.c, tools/send-mail.h: New.
23575         * tools/wks-util.c: New.
23576         * tools/Makefile.am (gpg_wks_server_SOURCES): Add them.
23577         (gpg_wks_client_SOURCES): Ditto.
23578         * tools/gpg-wks.h (opt): Add fields use_sendmail and output.
23579         * tools/gpg-wks-client.c: Add options --send and --output.  Rename
23580         command --send to --create.
23581         (command_send, send_confirmation_response): Output via wks_send_mime.
23582         * tools/gpg-wks-server.c:  Add options --send and --output.
23583         (send_confirmation_request): Output via wks_send_mime.
23584         (check_and_publish): Add hack for name-value bug.
23585
23586 2016-07-02  Werner Koch  <wk@gnupg.org>
23587
23588         tools: Add options to gpg-wks-server.
23589         + commit c619035d9cd0c9cef62facf5365321289051f9a0
23590         * tools/gpg-wks.h (opt): Add 'default_from' and 'extra_headers'.
23591         * tools/gpg-wks-server.c (oFrom, oHeader): New.
23592         (parse_arguments): Set them and check args.
23593         (get_submission_address): New.
23594         (send_confirmation_request): Set correct From address.  Add extra
23595         headers.
23596         (process_new_key): Return an error code.
23597
23598         tools: Extend mime-maker.c:mime_maker_add_header.
23599         + commit 0e36a1d1fb79c2b75c081616eed00075190b38aa
23600         * tools/mime-maker.c (add_header): Check header name and allow
23601         name-value syntax.
23602         (mime_maker_add_header): Add mode for a syntax check.
23603
23604         doc: Describe filter expressions.
23605         + commit 442efa9b3ff211c692b6967a944b3d9371ad1bb7
23606         * doc/gpg.texi: Remove some superfluous .E.
23607         (FILTER EXPRESSIONS): New.
23608
23609         yat2m: Fix table formatting.
23610         + commit aae3cdb61555db4efb26f522030c8303a731d4a9
23611         * doc/yat2m.c (proc_texi_cmd): Use .TQ for @itemx.  Print a .P at the
23612         end of a level 0 table.
23613
23614 2016-07-01  Werner Koch  <wk@gnupg.org>
23615
23616         gpg: New option --export-filter.
23617         + commit 7bfc86c938d11c14ea78b196c82ceba2a2f5317d
23618         * g10/gpg.c (oExportFilter): New.
23619         (opts): Add --export-filter.
23620         (main): Handle option.
23621         * g10/export.c: Include recsel.h, init.h, and mbox-util.h.
23622         (export_keep_uid): New global var.
23623         (cleanup_export_globals): New.
23624         (parse_and_set_export_filter): New.
23625         (filter_getval): New.
23626         (apply_keep_uid_filter): New.
23627         (do_export_stream): Apply filter if set.
23628
23629         gpg: New option --import-filter.
23630         + commit 5137bf73ccc98a72c2eeac148e4d4b5d58f0a854
23631         * g10/gpg.c (oImportFilter): New.
23632         (opts): Add --import-filter.
23633         (main): Handle option.
23634         * g10/import.c: Include recsel.h, init.h, and mbox-util.h.
23635         (import_keep_uid): New global var.
23636         (cleanup_import_globals): New.
23637         (parse_and_set_import_filter): New.
23638         (filter_getval): New.
23639         (apply_keep_uid_filter): New.
23640         (import_one): Apply filter if set.
23641
23642         gpg: Allow to cache the mbox in a user id struct.
23643         + commit f015552374d69e28292a12f2b91ab34d65c9b457
23644         * g10/packet.h (PKT_user_id): Add field 'mbox'.
23645         * g10/free-packet.c (free_user_id): Free that.
23646
23647         gpg: Make sure a user ID packet has always a terminating Nul in memory.
23648         + commit d8bce478be3ae9e401841a77d189ef3c81ccb757
23649         * g10/keygen.c (write_uid): Avoid overflow.
23650
23651         common: Add function to select records etc.
23652         + commit 681c6ef757a73fc1a63a552186e038db179494aa
23653         * common/recsel.c, common/recsel.h: New.
23654         * common/t-recsel.c: New.
23655
23656         common: Smart up register_mem_cleanup_func.
23657         + commit 6446a6b3dfd3b2e68b4285870f902ed1f86b0866
23658         * common/init.c (register_mem_cleanup_func): Avoid double registration.
23659
23660 2016-07-01  Justus Winter  <justus@g10code.com>
23661
23662         common: Annotate semi-static allocation.
23663         + commit 49fdd0887c84ed7f7b858b9e7ffa146fcb7f1e87
23664         * common/argparse.c (optfile_parse): Allow string arguments to leak.
23665
23666         g10: Fix memory leak.
23667         + commit 78aeb236fe4ff3a6d51b3095148e7086f2a6e9a8
23668         * g10/keyserver.c (parse_keyserver_uri): Free URI.
23669
23670         tools/gpgtar: Annotate semi-static allocation.
23671         + commit cff63da930b6b3f0253668911e0931713b2b584a
23672         * tools/gpgtar.c (shell_parse_argv): Annotate argument vector as
23673         leaked.
23674
23675         g10: Fix memory leak.
23676         + commit c454922ffa71929c810c6ff048d902498575302f
23677         * g10/import.c (transfer_secret_keys): Release curve from the previous
23678         iteration.
23679
23680         g10: Fix build with disabled kbnode cache.
23681         + commit ff77b92aae9c8e20cbc7fa7c294adcc6a8c2f614
23682         * g10/kbnode.c (release_unused_nodes): Fix build with disabled kbnode
23683         cache.
23684
23685         g10: Fix memory leak.
23686         + commit 44d4c695722d96b3bbef16f2843f62413b9670cd
23687         * g10/trustdb.c (tdb_get_validity_core): Fix kbnode leak.
23688
23689         g10: Fix memory leak.
23690         + commit 5fafd18d474da7b763f5b82c73b6ca4288e136d7
23691         * g10/keygen.c (keygen_set_std_prefs): Fix memory leak.
23692
23693         Fix trivial memory leaks in tests.
23694         + commit 6bfbc368f90b274192d3751274816091675f5109
23695         * dirmngr/t-ldap-parse-uri.c (check_ldap_escape_filter): Free result.
23696         * g10/t-stutter.c (main): Free file name.
23697
23698 2016-06-30  Justus Winter  <justus@g10code.com>
23699
23700         tools: Fix trivial memory leak.
23701         + commit 8f39185d7bfa0bc749f9ccf4a041d2da4eba24ff
23702         * tools/gpg-connect-agent.c (main): Fix trivial memory leak.
23703
23704         g10: Fix memory leak.
23705         + commit 401db0eebbcd28dca8f4059706bfbd18d8cc7528
23706         * g10/export.c (do_export_stream): Free secret parameters.
23707
23708         g10: Fix memory leak.
23709         + commit eb4cdbefb05795b77a8a72189eff246b84442caf
23710         * g10/keygen.c (read_parameter_file): Free 'line'.
23711
23712         g10: Fix memory leak.
23713         + commit 1de362af9094e0a1a0be60f77fbea7c5190a4dcc
23714         * g10/sign.c (mk_notation_policy_etc): Free 'mbox'.
23715
23716         common: Fix memory leak.
23717         + commit 6b9a89e4c7d6f19de62e0a908a8d80c98bf99819
23718         * g10/textfilter.c (copy_clearsig_text): Free buffer.
23719
23720         common: Fix memory leak.
23721         + commit d2d19063d3adf29340aeb39f14e1b1e9aacf41e7
23722         * common/iobuf.c (iobuf_set_partial_body_length_mode): Only create
23723         context if necessary.
23724
23725         common: Fix memory leak.
23726         + commit 9037c23979866e6e085b3e32f973bcba590a2635
23727         * common/simple-pwquery.c (agent_open): Free socket path.
23728
23729         g10: Fix keybox-related memory leaks.
23730         + commit 29beea6462cca32d3278b0f7f9364ff4342327b8
23731         * g10/keydb.c (keydb_release): Clear keyblock cache.
23732         (keydb_get_keyblock): Revert previous change.
23733         * kbx/keybox-blob.c (create_blob_finish): Free previous buffer, free
23734         fixups after applying them.
23735         (_keybox_release_blob): Free buffer.  Currently, the buffer has been
23736         extracted before the keybox is released, but this is the right thing
23737         to do here.
23738
23739         g10: Fix memory leak.
23740         + commit 5869f518cbd8b41b4c9880fc593216b9efeea430
23741         * g10/compress.c (release_context): Free buffers.
23742
23743         g10: Fix memory leak.
23744         + commit 84f262102be19334534cccc66ed7eceea2714527
23745         * g10/sign.c (write_plaintext_packet): Free packet.
23746
23747         g10: Fix memory leak.
23748         + commit abae8a9dc8a00cf46291ccb40644b3a7aa477307
23749         * g10/mainproc.c (release_list): Do not exit early if list is NULL,
23750         there are other resources that must be released.
23751
23752         gpgscm: Fix reallocating string ports.
23753         + commit 5003caa8fdc80afd5748835c06621014f83e6ec4
23754         * tests/gpgscm/scheme.c (realloc_port_string): Use memcpy because
23755         Scheme strings may contain 0s.
23756
23757         gpgscm: Free memory backing string ports.
23758         + commit 599ad21104e622acbd1230d90d6a23abf9145499
23759         * tests/gpgscm/scheme.c (finalize_cell): Free memory backing string
23760         ports.
23761
23762         gpgscm: Use the allocator from libgcrypt.
23763         + commit d4ede89981c769b0626ab2b37615da1d12a3b078
23764         * tests/gpgscm/main.c (main): Use the allocator from libgcrypt.
23765
23766         w32: Fix build.
23767         + commit dbcb342eaf1738798a5378d9ecd83c7946140d54
23768         * g10/keyedit.c (keyedit_quick_revuid): Fix call to
23769         'check_trustdb_stale'.
23770
23771 2016-06-30  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
23772
23773         g10: Implement gpg --quick-revuid.
23774         + commit 55d112eeb0743e90be46d15dbae67368ee7d4b50
23775         * g10/revoke.c (get_default_uid_revocation_reason): New.
23776         * g10/keyedit.c (menu_revuid): Break out creation of uid revocation
23777         into new function core_revuid.
23778         * g10/keyedit.c (keyedit_quick_revuid): New. Selects key and
23779         uid, invokes core_revuid.
23780         * g10/gpg.c (main): Handle --quick-revuid argument.
23781         * doc/gpg.texi: Document --quick-revuid.
23782
23783 2016-06-29  Werner Koch  <wk@gnupg.org>
23784
23785         tools: Add gpg-wks-client and gpg-wks-server.
23786         + commit 5d6c83deaa11327366b0038928200b9f9f85b426
23787         * configure.ac: Add option --enable-wks-tools
23788         * tools/gpg-wks-client.c: New.
23789         * tools/gpg-wks-server.c: New.
23790         * tools/gpg-wks.h: new.
23791         * tools/wks-receive.c: New.
23792         * tools/call-dirmngr.c, tools/call-dirmngr.h: New.
23793
23794         build: Improve GNUPG_BUILD_PROGRAM macro.
23795         + commit d8ee0d79a702c92a257884bab86183d32d16ff0e
23796         * acinclude.m4 (GNUPG_BUILD_PROGRAM): Allow for dash in options.
23797
23798         tools: Add modules for MIME parsing and creating.
23799         + commit c334fa8df0e3901857e1a277d3277a873ae4af74
23800         * tools/mime-maker.c: New.
23801         * tools/mime-maker.h: New.
23802         * tools/mime-parser.c: New.
23803         * tools/mime-parser.h: New.
23804
23805 2016-06-28  Justus Winter  <justus@g10code.com>
23806
23807         gpgscm: Fix memory leaks.
23808         + commit 9c67958c4737b34c60ef2076f57234eec155eb36
23809         * tests/gpgscm/ffi-private.h (ffi_schemify_name): Fix prototype.
23810         (ffi_define_function_name): Free schemified name.
23811         (ffi_define_function): Likewise.
23812         (ffi_define_constant): Likewise.
23813         (ffi_define_variable_pointer): Likewise.
23814         * tests/gpgscm/ffi.c (do_wait_processes): Free arrays.
23815         (ffi_schemify_name): Fix type.
23816         * tests/gpgscm/main.c (main): Free 'sc'.
23817
23818         gpgscm: Free file names.
23819         + commit 6cb2be91a7cc8a9b8ec42f3956adbb19347318e3
23820         * tests/gpgscm/scheme.c (scheme_load_named_file): Free file name.
23821
23822         gpgscm: Fix buffer overflow.
23823         + commit 56cebdc30c10eaec179a6911e308074264d876ae
23824         * tests/gpgscm/scheme.c (store_string): Avoid writing past allocated
23825         buffer.
23826
23827         g10: Fix memory leaks.
23828         + commit c57501cc5fa84dbaf560c0fc18853c9540e918af
23829         * g10/keydb.c (keydb_get_keyblock): Free 'sigstatus' and 'iobuf'.
23830         * g10/t-keydb-get-keyblock.c: Fix trivial memory leaks.
23831         * g10/t-keydb.c: Likewise.
23832
23833         common: Fix memory leaks.
23834         + commit c14ef10fc347d966a1efcb5c2000cbf3aaafa905
23835         * common/ccparray.c (ccparray_put): Free old array.
23836         * common/stringhelp.c (do_make_filename): Free 'home'.
23837         * common/t-convert.c: Fix trivial memory leaks.
23838         * common/t-iobuf.c: Likewise.
23839         * common/t-mbox-util.c: Likewise.
23840         * common/t-name-value.c: Likewise.
23841         * common/t-stringhelp.c: Likewise.
23842         * common/t-strlist.c: Likewise.
23843
23844 2016-06-28  Werner Koch  <wk@gnupg.org>
23845
23846         dirmngr: add option to retrieve extra WKS info.
23847         + commit b1e8e0d4b945e077966fb98175191aed056bd957
23848         * dirmngr/server.c (cmd_wkd_get): Add option --submission-address.
23849
23850         gpg: Add hack to --quick-gen-key to create Curve25519 keys.
23851         + commit 20ca075d9605e27e25a780bcc465c7371400ca61
23852         * g10/keygen.c (quick_generate_keypair): Add special algo string
23853         "test-default".
23854
23855         common: New function rfctimestamp.
23856         + commit 1ddf5b846fc058171af5f2784dad866b73eb0205
23857         * common/gettime.c (rfctimestamp): New.
23858
23859         common: Add missing header file for clarity.
23860         + commit 781e614e3b4586da27e54caca39b6a7ed42fc7c7
23861         * common/zb32.c: Include zb32.h.
23862
23863 2016-06-28  Justus Winter  <justus@g10code.com>
23864
23865         tools/gpgtar: Fix handling of '-'.
23866         + commit 4819f687c48c7972c39ae29c7af1e891a4d57360
23867         * tools/gpgtar-extract.c (gpgtar_extract): Use stdin if file is '-'.
23868         * tools/gpgtar-list.c (gpgtar_list): Likewise.
23869
23870         common: Close input stream.
23871         + commit d36f664bfdc39c05927cb6e14fe1b3ecb7b64bfa
23872         * common/exechelp-posix.c (gnupg_spawn_process): Also close the input
23873         stream in the child.
23874
23875         common: Fix copying data from the spawned child.
23876         + commit 8f79c31b4d465eeaf81c8046c35bb8c34512dd8d
23877         Fixes intermittent gpgtar failures.
23878
23879         * common/exectool.c (copy_buffer_do_copy): Initialize 'nwritten'.
23880         (gnupg_exec_tool_stream): Loop until all data is copied.
23881
23882 2016-06-28  NIIBE Yutaka  <gniibe@fsij.org>
23883
23884         g10: Fix --list-packets.
23885         + commit 52f65281f9743c42a48bf5a3354c9ab0ecdb681a
23886         * g10/gpg.c (main): Call set_packet_list_mode after assignment of
23887         opt.list_packets.
23888         * g10/mainproc.c (do_proc_packets): Don't stop processing with
23889         --list-packets as the comment says.
23890         * g10/options.h (list_packets): Fix the comment.
23891         * g10/parse-packet.c: Fix the condition for opt.list_packets.
23892
23893 2016-06-25  Werner Koch  <wk@gnupg.org>
23894
23895         build: Add aclocal macro from pkg-config.
23896         + commit b6872353bae778d11730f5d0afd2192750777647
23897         * m4/pkg.m4: New.
23898
23899         yat2m: Silence lint warnings and fix a printf format bug.
23900         + commit 22b9bea1c3d0e944aa539a87d79e47d92ca5309f
23901         * doc/yat2m.c (ATTR_PRINTF, ATTR_NR_PRINTF, ATTR_MALLOC): New.
23902         (die, err, inf, xmalloc, xcalloc): New prototypes with attributes.
23903         (get_section_buffer): Take care of !N_SECTIONS.
23904         (proc_texi_cmd): Cast precision format arg.
23905         (proc_texi_buffer): Do not set IN_CMD when not used afterwards.
23906
23907 2016-06-24  Werner Koch  <wk@gnupg.org>
23908
23909         gpg: New import option "import-export".
23910         + commit 7bca3be65e510eda40572327b87922834ebe07eb
23911         * g10/import.c (parse_import_options): Add option "import-export".
23912         (write_keyblock_to_output): New.
23913         (import_one): Implement option.
23914
23915 2016-06-23  Werner Koch  <wk@gnupg.org>
23916
23917         gpg: New import option "import-show".
23918         + commit 1e5959ec059ba41f4de1e2f953300bc040efc16f
23919         * g10/options.h (IMPORT_SHOW): New.
23920         * g10/import.c (parse_import_options): Add "import-show".
23921         (import_one): Implement that.
23922
23923         gpg: Do not print the validity after key generation.
23924         + commit 09c6f7135150efbbeb459d4ae0189a81e9d180f8
23925         * g10/keylist.c (struct keylist_context): Add field NO_VALIDITY.
23926         (list_keyblock_print): Take care of it.
23927         (list_keyblock_direct): Add arg NO_VALIDITY.
23928         * g10/keygen.c (do_generate_keypair): Merge keyblock and print w/o
23929         validity.
23930
23931         common: Fix possible small memory leak in b64dec.c.
23932         + commit c229ba4d8b9b16052ee0b9573bed7905be602cdf
23933         * common/b64dec.c (b64dec_finish): Always release TITLE.
23934
23935 2016-06-23  Justus Winter  <justus@g10code.com>
23936
23937         tests/openpgp: Fake the system time for the tofu test.
23938         + commit e584d6468a2e72cd01e55f46104f9f96b56c0b66
23939         The keys in the tofu test are set to expire on 2016-09-17.  Fake the
23940         system time for this test.
23941
23942         This commit includes changes to the old test as well, for those who
23943         need to backport it.
23944
23945         * tests/openpgp/gpg-agent.conf.tmpl: Drop trailing newlines.
23946         * tests/openpgp/tofu.scm: Fake system time.
23947         * tests/openpgp/tofu.test: Likewise.
23948
23949         gpgscm: Handle exceptions in the transformation monad.
23950         + commit 145910afc077e7a5df6cc8b10e180dfa6ce38cc3
23951         * tests/gpgscm/tests.scm (pipe:do): Raise errors.
23952         (tr:spawn): Catch and return errors.
23953         (tr:call-with-content): Likewise.
23954         (tr:{open,write-to,pipe-do,assert-identity,assert-weak-identity}):
23955         Adapt.
23956
23957         tests/openpgp: Improve tests.
23958         + commit 1e822654c1dcfc23a9ef689f4e18c0ebba18baca
23959         * tests/openpgp/multisig.scm: Simplify test.
23960         * tests/openpgp/setup.scm (dearmor): Use pipe.
23961
23962         gpgscm: Add types for special objects.
23963         + commit 332fa86982dc811640ac8643332d8375816e5b81
23964         * tests/gpgscm/scheme.c (enum scheme_types): Add types for boolean,
23965         nil, eof, and the sink object.
23966         (type_to_string): Handle new types.
23967         (scheme_init_custom_alloc): Give special objects a type.
23968
23969         gpgscm: Fix Scheme initialization.
23970         + commit e6e56adf208f194ecafda29bb1c1c06655348432
23971         This potentially causes a crash if the garbage collector marks an eof
23972         object.
23973
23974         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize
23975         'EOF_OBJ'.
23976
23977 2016-06-23  Werner Koch  <wk@gnupg.org>
23978
23979         common: Add dedicated private key functions to name-value.c.
23980         + commit 3ead21da80da4570e77036cc05303914c9b1f364
23981         * common/name-value.c (struct name_value_container): Add field
23982         'private_key_mode'.
23983         (my_error): New.  Use instead of gpg_error.
23984         (nvc_new_private_key): New.
23985         (nve_release): Add arg 'private_key_mode'.
23986         (nvc_release): Call nve_release with private_key_mode flag.
23987         (nvc_delete): Ditto.
23988         (_nvc_add): Do no special case "Key:" in non-private_key_mode.
23989         (nvc_get_private_key): Return error in non-private_key_mode.
23990         (nvc_set_private_key): Ditto.
23991         (nvc_parse):  Factor all code out to ...
23992         (do_nvc_parse): new.  Add arg 'for_private_key'.
23993         (nvc_parse_private_key): New.
23994         * agent/findkey.c (write_extended_private_key): Replace nvc_parse by
23995         nvc_parse_private_key.
23996         (read_key_file): Ditto.
23997
23998         * common/t-name-value.c (private_key_mode): New variable.
23999         (my_nvc_new): New.  Replace all callers.
24000         (test_key_extraction): Take mode in account.
24001         (run_tests): Ditto.
24002         (run_modification_tests): Ditto.
24003         (parse): Ditto.
24004         (main): Add option --parse and rename --parse to --parse-key.
24005
24006         common: Rename external symbols in name-value.c.
24007         + commit d74d23d860c1e5039bd595c31c846782c5cb8025
24008         * common/name-value.c, common/name-value.h: Rename symbol prefixes
24009         from "pkc_" to "nvc_" and from "pke_" to "nve_".  Change all callers.
24010
24011         common: Rename private-keys.c to name-value.c.
24012         + commit b841a883a2a66807aa427e65d49067584bedfbe2
24013         * common/private-keys.c: Rename to name-value.c.
24014         * common/private-keys.h: Rename to name-value.h.  Chage all users.
24015         * common/t-private-keys.c: Rename to t-name-value.c.
24016         * common/Makefile.am: Adjust accordingly.
24017
24018         common: Add PGP armor decoding to b64dec.
24019         + commit 3694579bc4eef27ed53e1845bf03be38c299ce76
24020         * common/b64dec.c (decoder_states): Add new states.
24021         (b64dec_proc): Handle PGP armored format.
24022
24023 2016-06-23  NIIBE Yutaka  <gniibe@fsij.org>
24024
24025         g10: Fix regression of card-edit/fetch.
24026         + commit 6f5ff1cfe449cf1f4cb7287bc57570eb794216b2
24027         * g10/card-util.c (fetch_url): Call keyserver_fetch instead of
24028         keyserver_import_fprint.
24029
24030 2016-06-21  Justus Winter  <justus@g10code.com>
24031
24032         tests/migrations: Convert to Scheme and re-enable.
24033         + commit f548383d9af912bf93217068cc8aa99a9a6eda93
24034         * configure.ac: Re-enable.
24035         * tests/Makefile.am: Likewise.
24036         * tests/migrations/Makefile.am (TESTS): Use Scheme tests.
24037         * tests/migrations/common.scm: New file.
24038         * tests/migrations/extended-private-key-format.scm: Likewise.
24039         * tests/migrations/from-classic.scm: Likewise.
24040         * tests/migrations/extended-private-key-format.test: Drop file.
24041         * tests/migrations/from-classic.test: Drop file.
24042
24043         gpgscm: Add more file handling functions.
24044         + commit c5e0ca5a59ebd91b67944ca125cc8cd73a9d243e
24045         * tests/gpgscm/ffi.c (do_glob): New function.
24046         (ffi_init): Define new function.
24047         * tests/gpgscm/tests.scm (basename-suffix): New function.x
24048
24049         tests/openpgp: Port the remaining tests to Scheme.
24050         + commit 0340fcdac864109e3dd6edee759efc96e4d3f84e
24051         * tests/openpgp/Makefile.am (TESTS): Add new tests.
24052         * tests/openpgp/defs.scm (gpg-with-colons): New function.
24053         (get-config): Use new function.
24054         * tests/openpgp/export.scm: New file.
24055         * tests/openpgp/tofu.scm: Likewise.
24056
24057         gpgscm: Improve test framework.
24058         + commit 65081c31e7536d8fb5effcc2c9aeeffc120c9a69
24059         * tests/gpgscm/lib.scm (echo): Move...
24060         * tests/gpgscm/tests.scm (echo): ... here.
24061         (info, error, skip): And use echo here.
24062         (file-exists?): New function.
24063         (tr:spawn): Check that source exists and if the sink has been created.
24064         (tr:call-with-content): Hand in optional arguments.
24065
24066         gpgscm: Use native string searching functions.
24067         + commit 5fbbc4b334a73150e709a4802cac99abd8ada61d
24068         * tests/gpgscm/ffi-private.h: Handle character arguments.
24069         * tests/gpgscm/ffi.c (do_string_index): New function.
24070         (do_string_rindex): Likewise.
24071         (do_string_contains): Likewise.
24072         (ffi_init): Define new functions.
24073         * tests/gpgscm/ffi.scm (ffi-define): New macro.
24074         * tests/gpgscm/lib.scm (string-index): Use native function,
24075         demonstrate behavior.
24076         (string-rindex): Likewise.
24077         (string-contains?): Likewise.
24078         Demonstrate behavior of various other functions.
24079         (read-all): Rework so that it can handle large files.
24080
24081         gpgscm: Improve error reporting.
24082         + commit d99949fc8cf541018267964629992d55c97ca9ab
24083         * tests/gpgscm/scheme.c (type_to_string): New function.
24084         (Eval_Cycle): Include actual type in error message.
24085
24086         gpgscm: Make memory allocation failures fatal.
24087         + commit 616582071a2c76c4fb529d4da549aa95ee5d78d6
24088         * tests/gpgscm/scheme.c (Eval_Cycle): Exit if we run out of memory.
24089
24090 2016-06-21  Werner Koch  <wk@gnupg.org>
24091
24092         sm: Do not install cacert and other root certificates.
24093         + commit c19b2061274cd50838e62a2acbdc7e7d24888e7e
24094         * doc/Makefile.am (dist_pkgdata_DATA): Move qualified.txt and
24095         com-certs.pem to ...
24096         (EXTRA_DIST): here.
24097
24098 2016-06-20  Werner Koch  <wk@gnupg.org>
24099
24100         gpg: Add experimental support for an issuer fpr.
24101         + commit 955baf04364721457cd99aad21942523cd50498c
24102         * common/openpgpdefs.h (SIGSUBPKT_ISSUER_FPR): New.
24103         * g10/build-packet.c (build_sig_subpkt_from_sig): Add arg PKSK and
24104         insert the issuer fpr if needed.
24105         * g10/sign.c (write_signature_packets): Pass signing key.
24106         (make_keysig_packet): Ditto.
24107         (update_keysig_packet): Ditto.
24108         * g10/parse-packet.c (dump_sig_subpkt): Print issuer fpr.
24109         (parse_one_sig_subpkt): Detect issuer fpr.
24110         (can_handle_critical): Add issuer fpr.
24111         * g10/mainproc.c (check_sig_and_print): Try to get key via fingerprint.
24112         * g10/gpgv.c (keyserver_import_fprint): New stub.
24113         * g10/test-stubs.c (keyserver_import_fprint): New stub.
24114
24115         gpg: New option --rfc4880bis.
24116         + commit ee2d9061d7abc36b857165a8395203a97380baa2
24117         * g10/options.h (struct opt): Add field flags.rfc4880bis.
24118         * g10/gpg.c (oRFC4880bis): new.
24119         (opts): add --rfc4880bis.
24120         (main): Implement that and print a warning.
24121
24122 2016-06-19  Niibe Yutaka  <gniibe@fsij.org>
24123
24124         scd: Reset nonnull_nad to zero for VENDOR_GEMPC.
24125         + commit 971064f8b7ad676326b2a468f688037a303717df
24126         * (parse_ccid_descriptor): nonnull_nad = 0 for all GEMPC device.
24127
24128 2016-06-17  Werner Koch  <wk@gnupg.org>
24129
24130         tests: Make make distcheck work again.
24131         + commit ce1689ea0720552ac900d7b2c4139caf24452018
24132         * Makefile.am (tests): Remove test code which would led to doubling
24133         calls to for e.g. "make distclean".
24134         * tests/Makefile.am: Typo fixes.
24135         * tests/gpgscm/Makefile.am (EXTRA_DIST): Fix name of License file.
24136         Add repl.scm.
24137         (check): Replace by check-local because check is a standard automake
24138         target.
24139         * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Replace gmake0sim by
24140         automake generated macro.
24141         (EXTRA_DIST): Add defs.scm
24142
24143         gpgscm: Silence compiler warnings.
24144         + commit dfe5282e5859409849a17d68b2b3a046370f65bd
24145         * tests/gpgscm/scheme.c (mk_integer): Rename arg NUM to N.
24146         (fill_vector): Ditto.
24147         (mark): Rename var NUM to N.
24148         (set_slot_in_env): Mark SC as unused.
24149         (is_any): Mark P as unused.
24150
24151         Add license notices for TinySCHEME.
24152         + commit dc1db12d2c4f9f12bc3f7de37f76293b316c3f35
24153         * tests/gpgscm/COPYING: Rename to ...
24154         * tests/gpgscm/LICENSE.TinySCHEME: this.
24155         * AUTHORS: Add a note about TinySCHEME.
24156         * build-aux/speedo/w32/pkg-copyright.txt: Add TinySCHEME notice.
24157
24158 2016-06-17  Justus Winter  <justus@g10code.com>
24159
24160         tests/openpgp: Reimplement tests in Scheme.
24161         + commit 9609cb20e4caee739b9fc4fd36797029d2970041
24162         * Makefile.am: Build the test infrastructure on Windows.
24163         * tests/openpgp/Makefile.am (required_pgms): Add gpgscm.
24164         (TESTS_ENVIRONMENT): Make sure gpgscm and the libraries are found.
24165         (TESTS): Replace tests with the new Scheme implementations.
24166         * tests/openpgp/4gb-packet.scm: New file.
24167         * tests/openpgp/README: Likewise.
24168         * tests/openpgp/armdetach.scm: Likewise.
24169         * tests/openpgp/armdetachm.scm: Likewise.
24170         * tests/openpgp/armencrypt.scm: Likewise.
24171         * tests/openpgp/armencryptp.scm: Likewise.
24172         * tests/openpgp/armor.scm: Likewise.
24173         * tests/openpgp/armsignencrypt.scm: Likewise.
24174         * tests/openpgp/armsigs.scm: Likewise.
24175         * tests/openpgp/clearsig.scm: Likewise.
24176         * tests/openpgp/conventional-mdc.scm: Likewise.
24177         * tests/openpgp/conventional.scm: Likewise.
24178         * tests/openpgp/decrypt-dsa.scm: Likewise.
24179         * tests/openpgp/decrypt.scm: Likewise.
24180         * tests/openpgp/default-key.scm: Likewise.
24181         * tests/openpgp/defs.scm: Likewise.
24182         * tests/openpgp/detach.scm: Likewise.
24183         * tests/openpgp/detachm.scm: Likewise.
24184         * tests/openpgp/ecc.scm: Likewise.
24185         * tests/openpgp/encrypt-dsa.scm: Likewise.
24186         * tests/openpgp/encrypt.scm: Likewise.
24187         * tests/openpgp/encryptp.scm: Likewise.
24188         * tests/openpgp/finish.scm: Likewise.
24189         * tests/openpgp/genkey1024.scm: Likewise.
24190         * tests/openpgp/gpgtar.scm: Likewise.
24191         * tests/openpgp/import.scm: Likewise.
24192         * tests/openpgp/mds.scm: Likewise.
24193         * tests/openpgp/multisig.scm: Likewise.
24194         * tests/openpgp/run-tests.scm: Likewise.
24195         * tests/openpgp/seat.scm: Likewise.
24196         * tests/openpgp/setup.scm: Likewise.
24197         * tests/openpgp/signencrypt-dsa.scm: Likewise.
24198         * tests/openpgp/signencrypt.scm: Likewise.
24199         * tests/openpgp/sigs-dsa.scm: Likewise.
24200         * tests/openpgp/sigs.scm: Likewise.
24201         * tests/openpgp/use-exact-key.scm: Likewise.
24202         * tests/openpgp/verify.scm: Likewise.
24203         * tests/openpgp/version.scm: Likewise.
24204
24205         tests/gpgscm: Add a TinySCHEME-based test driver.
24206         + commit d2ce3f9eee34e380536049c0c9d26ed66273f094
24207         * configure.ac: Add new component.
24208         * tests/Makefile.am: Likewise.
24209         * tests/gpgscm/Makefile.am: New file.
24210         * tests/gpgscm/ffi-private.h: Likewise.
24211         * tests/gpgscm/ffi.c: Likewise.
24212         * tests/gpgscm/ffi.h: Likewise.
24213         * tests/gpgscm/ffi.scm: Likewise.
24214         * tests/gpgscm/lib.scm: Likewise.
24215         * tests/gpgscm/main.c: Likewise.
24216         * tests/gpgscm/private.h: Likewise.
24217         * tests/gpgscm/repl.scm: Likewise.
24218         * tests/gpgscm/scheme-config.h: Likewise.
24219         * tests/gpgscm/t-child.c: Likewise.
24220         * tests/gpgscm/t-child.scm: Likewise.
24221         * tests/gpgscm/tests.scm: Likewise.
24222
24223         tests/gpgscm: Foreign objects support for TinySCHEME.
24224         + commit 56c36f2932fe2baf8e46efdea4315cf33f3c0338
24225         * tests/gpgscm/scheme-private.h (struct cell): Add 'foreign_object'.
24226         (is_foreign_object): New prototype.
24227         (get_foreign_object_{vtable,data}): Likewise.
24228         * tests/gpgscm/scheme.c (enum scheme_types): New type.
24229         (is_foreign_object): New function.
24230         (get_foreign_object_{vtable,data}): Likewise.
24231         (mk_foreign_object): Likewise.
24232         (finalize_cell): Free foreign objects.
24233         (atom2str): Pretty-print foreign objects.
24234         (vtbl): Add new functions.
24235         * tests/gpgscm/scheme.h (struct foreign_object_vtable): New type.
24236         (mk_foreign_object): New prototype.
24237         (struct scheme_interface): Add new functions.
24238
24239         Patch from Thomas Munro,
24240         https://sourceforge.net/p/tinyscheme/patches/13/
24241
24242         tests/gpgscm: Dynamically allocate string buffer.
24243         + commit 8e5ad9aabdd57457f76078924d33acb94b75a877
24244         * tests/gpgscm/scheme-config.h (strbuff{,_size}): Make buffer dynamic.
24245         * tests/gpgscm/scheme.c (expand_strbuff): New function.
24246         (putcharacter): Adapt length test.
24247         (readstrexp): Expand buffer if necessary.
24248         (scheme_init_custom_alloc): Initialize buffer.
24249         (scheme_deinit): Free buffer.
24250
24251         Patch from Thomas Munro,
24252         https://sourceforge.net/p/tinyscheme/patches/11/
24253
24254         tests/gpgscm: Make exception value available.
24255         + commit 3b100da9ada9171d873a796eaf3351d4fceed394
24256         * tests/gpgscm/init.scm (throw): Hand exception value to the handler.
24257         (catch): And bind it to *error*.
24258
24259         tests/gpgscm: Add package macro.
24260         + commit 2907381f4a7b422823b2304ebe550acbb2f66480
24261         * tests/gpgscm/init.scm: Add package macro from manual.
24262
24263         tests/gpgscm: Expose function to open streams as Scheme ports.
24264         + commit 55275b8e2b43a3420d85a1a931e02febaa1113e7
24265         * tests/gpgscm/scheme.c (vtbl): Add 'port_from_file' to the vtable.
24266         * tests/gpgscm/scheme.h (struct scheme_interface): New field
24267         'mk_port_from_file'.
24268
24269         tests/gpgscm: Nicer error message.
24270         + commit 13bba1357478815a85f5c0db3607ebb6cd574f56
24271         * tests/gpgscm/scheme.c (opexe_0): Include the value that we tried to
24272         evaluate as function-like in the error message.
24273
24274         tests/gpgscm: Fix error hook.
24275         + commit e02c1ccae13e4eb55afef8de4f29022c709404eb
24276         * tests/gpgscm/init.scm (*error-hook*): Fix error hook so that the
24277         whole error message is displayed.
24278
24279         tests/gpgscm: Handle unhandled enumeration values.
24280         + commit 133f25703a47e9bbc28c4532934f405ecdeb2de0
24281         * tests/gpgscm/scheme.c (opexe_{3,4}): Handle unhandled enumeration
24282         values in the opcode dispatching code.
24283
24284         tests/gpgscm: Verbatim import of latest TinySCHEME.
24285         + commit cb989504cdd4f0ff902d31af871dc3ee0d9419ac
24286         Revision 110 from svn://svn.code.sf.net/p/tinyscheme/code/trunk
24287
24288         * tests/gpgscm/COPYING: New file.
24289         * tests/gpgscm/Manual.txt: Likewise.
24290         * tests/gpgscm/init.scm: Likewise.
24291         * tests/gpgscm/opdefines.h: Likewise.
24292         * tests/gpgscm/scheme-private.h: Likewise.
24293         * tests/gpgscm/scheme.c: Likewise.
24294         * tests/gpgscm/scheme.h: Likewise.
24295
24296 2016-06-17  Werner Koch  <wk@gnupg.org>
24297
24298         scd: Make option --homedir work.
24299         + commit 4e41745b3ea3bb8ffc50af6bafeb1de9c928812f
24300         * scd/scdaemon.c (opts): Add --homedir.
24301
24302 2016-06-16  Werner Koch  <wk@gnupg.org>
24303
24304         Release 2.1.13.
24305         + commit b3df4e2ac6aa9b4154e923f71b4221533043e5ac
24306
24307
24308 2016-06-16  Yuri Chornoivan  <yurchor@ukr.net>
24309
24310         po: Update Ukrainian translation.
24311         + commit d4ce1b04431cf02ebc1bdc7150ad587d599f2a95
24312
24313
24314 2016-06-16  Ineiev  <ineiev@gnu.org>
24315
24316         po: Update Russian translation.
24317         + commit 2273e4f999325cdc9d275507cd07c7e95d62a377
24318
24319
24320 2016-06-16  Werner Koch  <wk@gnupg.org>
24321
24322         po: Update German translation.
24323         + commit 69f1b0b041c251abb66f000db173a602693bb18f
24324
24325
24326         Add missing files so that make distcheck works again,
24327         + commit 4d7d292cd5b616b209dfd4302a1deffe11b7be0e
24328         * tests/openpgp/Makefile.am (CLEANFILES): Add created file
24329         "passphrases".
24330         * tools/Makefile.am (EXTRA_DIST): Add no-libgcrypt.c.
24331
24332         tools: Fix typo in function name of symcryptrun.
24333         + commit e44dd878df58dab27c9cd411d80c4c81501e649a
24334         * tools/symcryptrun.c (main): Fix typo.
24335
24336 2016-06-15  Niibe Yutaka  <gniibe@fsij.org>
24337
24338         g10: Fix another race condition for trustdb access.
24339         + commit 35a3ce2acf78a95fecbccfd8db0560cca24232df
24340         * g10/tdbio.c (create_version_record): Call create_hashtable to always
24341         make hashtable, together with the version record.
24342         (get_trusthashrec): Remove call to create_hashtable.
24343
24344 2016-06-14  Werner Koch  <wk@gnupg.org>
24345
24346         gpg: Print the subkey's curve and not the primary key curve.
24347         + commit b56aebe76657ce6efa9c6819d5a8c2a31c2bbbba
24348         * g10/keylist.c (list_keyblock_colon): Use PK2 for the subkey's curve.
24349
24350         ldap: Improve info output for v3 fallback.
24351         + commit b7e3dfcf139284d30921cf44e7bab43d4244cc37
24352         * dirmngr/dirmngr_ldap.c (fetch_ldap): Do not use log_debug in an
24353         unprotected section.  Replace log_debug by log_info in verbose mode.
24354
24355 2016-06-14  Andre Heinecke  <aheinecke@intevation.de>
24356
24357         dirmngr: Try ldap protocol V3 as fallback.
24358         + commit f989b6ee0db96c36f13f093cbbcfd1d5b472d03c
24359         * dirmngr/dirmngr_ldap.c (fetch_ldap): Try V3 Protocol in case
24360         default Protocol gives error.
24361
24362         dirmngr: Print ldap error if bind fails.
24363         + commit 5faddcb2927a997e05fb34eb270982096d1fe3a4
24364         * dirmngr/dirmngr_ldap.c (fetch_ldap): Use ldap_err2string on bind
24365         return.
24366
24367 2016-06-14  Werner Koch  <wk@gnupg.org>
24368
24369         gpgsm: Allow ciphers AES192 and SERPENT256.
24370         + commit 5f9bd7a9e1ed4edcbb6c4e908d4bea5cd7dc9e68
24371         * sm/gpgsm.c (main): Add AES192 cipher.  Allow SERPENT256.
24372
24373         doc: Add files and envvars to a new index.
24374         + commit 2423238ee4c8a8c531dfe9e45c95f2760b638faa
24375         * doc/gnupg.texi: Define new index "ef".
24376         (Environment Index): New.
24377
24378         gpg: Avoid endless loop in a tofu error case.
24379         + commit f980cd2e0e4694a38038f518f290017087d4ce33
24380         * g10/tofu.c (get_trust): Do not jump to out.
24381
24382         gpg: Split tofu's get_trust function into several smaller ones.
24383         + commit 1affdf1efc42ed22dc023c92ca5134d5bcbf2686
24384         * g10/tofu.c (get_trust): Factor code out to ...
24385         (format_conflict_msg_part1): new and to ...
24386         (ask_about_binding): new.
24387
24388 2016-06-13  Werner Koch  <wk@gnupg.org>
24389
24390         gpg: Un-deprecate option --auto-key-retrieve.
24391         + commit 9e126af215143fddbdc3949681abb9ffdb9153bb
24392         * g10/gpg.c (main): Remove deprecation warning.
24393
24394         gpg: New option --disable-signer-uid, create Signer's UID sub-packet.
24395         + commit 61e7fd68c05ed185728e9da45f7a44a2323065ad
24396         * g10/gpg.c (oDisableSignerUID): New.
24397         (opts): New option '--disable-signer-uid'.
24398         (main): Set option.
24399         * g10/options.h (opt): Add field flags.disable_signer_uid.
24400         * g10/sign.c: Include mbox-util.h.
24401         (mk_notation_policy_etc): Embed the signer's uid.
24402         * g10/mainproc.c (check_sig_and_print): Do not use WKD for auto key
24403         retrieval if --disable-signer-uid is used.
24404
24405         gpg: Try Signer's User ID sub-packet with --auto-key-retrieve.
24406         + commit 08c82b1b55d28ffd09b859205b7686bcefae5011
24407         * g10/packet.h (PKT_signature): Add field 'signers_uid'.
24408         * g10/parse-packet.c (parse_signature): Set this field.
24409         * g10/free-packet.c (free_seckey_enc): Free field.
24410         (copy_signature): Copy field.
24411         * g10/mainproc.c (akl_has_wkd_method): New.
24412         (check_sig_and_print): Extend NEWSIG status.  If WKD is enabled try to
24413         locate a missing key via the signature's Signer's User ID sub-packet.
24414         Do this right before trying a keyserver lookup.
24415
24416 2016-06-11  Werner Koch  <wk@gnupg.org>
24417
24418         gpg: Remove C-99ism, re-indent, and simplify one function.
24419         + commit 334e993a71d3abb7d30cb5ee05d578cecf0c3f67
24420         * g10/call-agent.c (struct keyinfo_data): Rename to
24421         keyinfo_data_parm_s.
24422         (agent_get_keyinfo): Replace C-99 style init.
24423         (keyinfo_status_cb): Use new fucntion split_fields.
24424         * g10/export.c (match_curve_skey_pk): Add missings returns error
24425         cases.
24426         (cleartext_secret_key_to_openpgp): Better clear PK->PKEY first.
24427
24428         common: New function split_fields.
24429         + commit 5ba99d9302cd86aee99958b71075d5288bb430aa
24430         * common/stringhelp.c (split_fields): New.
24431         * common/t-stringhelp.c: Include assert.h.
24432         (test_split_fields): New.
24433         (main): Call test.
24434
24435 2016-06-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
24436
24437         g10: Export cleartext keys as cleartext.
24438         + commit c41c46fa84cabbed74a13ded51fc3a817a919367
24439         * g10/export.c (do_export_stream): If a key is stored by the agent in
24440         cleartext, then try to export it as cleartext.
24441         * tests/openpgp/export.test: For secret keys that are stored in
24442         cleartext, test should try to export without pinentry interaction.
24443
24444         g10: Allow receiving cleartext secret keys from agent.
24445         + commit a3cb72af79ee645eda212f31ab0b266f2c3d9f29
24446         * g10/export.c (match_curve_skey_pk): New function, testing whether an
24447         OpenPGP public key and an S-expression use the same curve.
24448         * g10/export.c (cleartext_secret_key_to_openpgp): New function,
24449         filling in the secret key parameters of a PKT_public_key object from
24450         a corresponding cleartext S-expression.
24451         * g10/export.c, g10/main.h (receive_seckey_from_agent): Add cleartext
24452         parameter, enabling retrieval of the secret key, unlocked.
24453         * g10/export.c (do_export_stream): Send cleartext as 0, keeping current
24454         behavior.
24455         * g10/keygen.c (card_store_key_with_backup): Use cleartext=0 to ensure
24456         that smartcard backups are all passphrase-locked.
24457
24458         g10: Add openpgp_protected flag to agent secret key export functions.
24459         + commit 7de74320767d15d915942a98ff47c00175a078ed
24460         * g10/call-agent.c, g10/call-agent.h (agent_export_key): Add
24461         openpgp_protected flag.
24462         * g10/export.c (receive_seckey_from_agent): Request openpgp_protected
24463         secret keys from agent.
24464         * agent/command.c (hlp_export_key): EXPORT_KEY help text: add a
24465         brief description of the effect of --openpgp.
24466
24467         g10: report whether key in agent is passphrase-protected or not.
24468         + commit 00f30cc01c79bbdff5cdc3be795f009f15d3845e
24469         * g10/call-agent.c, g10/call-agent.h (agent_get_keyinfo): add
24470           r_cleartext parameter to report whether a key is stored without
24471           passphrase protection.
24472         * g10/gpgv.c, g10/test-stubs.c: augment dummy agent_get_keyinfo to
24473           match new API.
24474         * g10/export.c, g10/keyedit.c, g10/keygen.c, g10/keylist.c,
24475           g10/sign.c: pass NULL to agent_get_keyinfo since we do not yet
24476           need to know whether agent is passphrase-protected.
24477
24478 2016-06-08  Werner Koch  <wk@gnupg.org>
24479
24480         Explicitly restrict socket permissions.
24481         + commit 8127043d549a5843ea1ba2dc6da4906fc2258d53
24482         * agent/gpg-agent.c (create_server_socket): Call chmod before listen.
24483         * scd/scdaemon.c (create_server_socket): Ditto.
24484         * dirmngr/dirmngr.c (main): Ditto.
24485
24486         w32: Fix recent build regression.
24487         + commit 6790115fd9059e066b4e6feb6b1e3876a1c1d522
24488         * common/homedir.c (_gnupg_socketdir_internal) [W32]: Add definition
24489         for NAME.
24490         * g10/gpg.c (main) [W32]:  Fix use og gnupg_homedir.
24491
24492         * agent/gpg-agent.c (remove_socket): Remove unused var P.
24493         * scd/scdaemon.c (cleanup): Ditto.
24494
24495         gpgconf: New commands --create-socketdir and --remove-socketdir.
24496         + commit cf4910419e09daf414f76ca2c8ab685c3d488ec1
24497         * tools/gpgconf.c: Include unistd.h.
24498         (aCreateSocketDir, aRemoveSocketDir): New.
24499         (opts): Add --create-socketdir and --remove-socketdir.
24500         (main): Implement them.
24501
24502         Implement /run/user/UID/gnupg based sockets.
24503         + commit aab8a0b05292b0d06e3001a0b289224cb7156dbd
24504         * common/homedir.c: Include sys/stat.h and zb32.h.
24505         (w32_portable_app, w32_bin_is_bin): Change type from int to byte.
24506         (non_default_homedir): New.
24507         (is_gnupg_default_homedir): New.
24508         (default_homedir): Set non_default_homedir.
24509         (gnupg_set_homedir): Set non_default_homedir and make
24510         the_gnupg_homedir and absolute directory name.
24511         (gnupg_homedir): Return an absolute directory name.
24512         (_gnupg_socketdir_internal): New.
24513         (gnupg_socketdir): Implement /run/user/ based sockets.
24514         * tools/gpg-connect-agent.c (get_var_ext): Replace now obsolete
24515         make_filename by xstrdup.
24516         * tools/gpgconf.c (main): Sue gnupg_homedir for the "homedir:" output.
24517
24518         gpgconf: Add option --homedir.
24519         + commit def512eb67c8a380f3b873cee0f156deef0b6dda
24520         * tools/gpgconf.c (opts): Add --homedir.
24521         (main): Set homedir.
24522
24523         Do not use no-libgcrypt dummy for tools.
24524         + commit 173fa97102fec68670a46ae1b460231e2a183c81
24525         * tools/Makefile.am (gpgconf_SOURCES): Remove no-libgcrypt.c.
24526         (gpgconf_LDADD): Add LIBGCRYPT_LIBS.
24527         (gpg_connect_agent_LDADD): Ditto.
24528         (gpgtar_LDADD): Ditto.
24529         * dirmngr/Makefile.am (dirmngr_client_LDADD): Ditto.
24530         (t_common_ldadd): Ditto.  Remove no-libgcrypt.o.
24531
24532         Do not try to remove the enclosing directory of sockets.
24533         + commit 0faf8951544f43790c412777a926c969540174bd
24534         * agent/gpg-agent.c (remove_socket): Do not remove the enclosing
24535         directory.
24536         * scd/scdaemon.c (cleanup): Ditto.
24537
24538 2016-06-07  Werner Koch  <wk@gnupg.org>
24539
24540         common: New function gnupg_socketdir.
24541         + commit 36550dde998fa1d497098050ca2d4e1a952ed6b6
24542         * common/homedir.c (gnupg_socketdir): New.
24543         * agent/gpg-agent.c (create_socket_name): Use new function instead of
24544         gnupg_homedir.
24545         (check_own_socket): Ditto.
24546         (check_for_running_agent): Ditto.
24547         * agent/preset-passphrase.c (main): Ditto.
24548         * common/asshelp.c (start_new_gpg_agent): Ditto.
24549         * scd/scdaemon.c (create_socket_name): Ditto.
24550         * tools/gpgconf.c (main): Ditto.
24551         * tools/symcryptrun.c (main): Ditto.
24552
24553         common: Remove homedir arg from start_new_{dirmngr,gpg_agent}.
24554         + commit fb88f37c40dc156fa0b5bfba4ac85f1e553fd7e9
24555         * common/asshelp.c (start_new_gpg_agent): Remove arg 'homedir' in
24556         favor of gnupg_homedir ().  Change all callers.
24557         (start_new_dirmngr): Ditto.
24558         * common/get-passphrase.c (gnupg_prepare_get_passphrase): Remove arg
24559         'homedir'.
24560
24561         Replace use of opt.homedir by accessor functions.
24562         + commit 22a7ef01aa2c0eb77bcc40174d09104acc35cab1
24563         * common/homedir.c (the_gnupg_homedir): New var.
24564         (gnupg_set_homedir): New.
24565         (gnupg_homedir): New.
24566         * g10/options.h (struct opt): Remove 'homedir' and replace all users
24567         by the new accessor functions.
24568         * g13/g13-common.h (struct opt): Ditto.
24569         * scd/scdaemon.h (struct opt): Ditto.
24570         * sm/gpgsm.h (struct opt): Ditto.
24571         * dirmngr/dirmngr.h (struct opt): Ditto.
24572         * agent/preset-passphrase.c (opt_homedir): Ditto.
24573         * agent/protect-tool.c (opt_homedir): Ditto.
24574
24575 2016-06-07  NIIBE Yutaka  <gniibe@fsij.org>
24576
24577         po: Update Japanese translation.
24578         + commit 650abbab716750d6087a457a25fa2efaaa3567cd
24579
24580
24581         gpg: Fix command line parsing of --quick-addkey and --quick-gen-key.
24582         + commit abeeb84a94be815a16e678b319cb5c8bffde2811
24583         * g10/gpg.c (main): Compose a block by curly braces.
24584
24585 2016-06-06  Werner Koch  <wk@gnupg.org>
24586
24587         gpg: Use --keyid-format=none by default.
24588         + commit 7257ea2d450238afa4d162fab8001f74782fe43f
24589         * g10/gpg.c (main): Init keyid_format to KF_NONE.
24590         * g10/keyid.c (format_keyid): Ditto.
24591         (keystrlen): Ditto.
24592
24593         gpg: Add option --with-subkey-fingerprint.
24594         + commit 1d1cb86694fb2223de1da0b3bfffb5c62f505847
24595         * g10/gpg.c (oWithSubkeyFingerprint): New.
24596         (opts): Add --with-subkey-fingerprint[s].
24597         (main): Set that option.
24598         * g10/options.h (struct opt): Add 'with_subkey_fingerprint'.
24599         * g10/keylist.c (list_keyblock_print): Print subkey fingerprint.
24600         (print_fingerprint): Tweak printing to use compact format if
24601         desirable.
24602
24603         gpg: Implement --keyid-format=none.
24604         + commit b047388d57443f584f1c1d6333aac5218b685042
24605         * g10/gpg.c (main): Add option "none" to --keyid-format.
24606         * g10/options.h (KF_NONE): New.
24607         * g10/keyid.c (format_keyid): Implement that.
24608         (keystr): Use format "long" is KF_NONE is in use.
24609         (keystr_with_sub): Ditto.
24610         * g10/keylist.c (list_keyblock_print): Adjust indentaion for KF_NONE.
24611         Factor some code out to ...
24612         (print_key_line): new.
24613         (print_fingerprint): Add mode 20.
24614         * g10/mainproc.c (list_node): Use print_key_line.  Replace MAINKEY by
24615         flags.primary in the PK.  Fix putting a " revoked..." string into the
24616         colons format.
24617         * g10/pkclist.c (do_edit_ownertrust): Use print_key_line.  This
24618         slightly changes the putput format.
24619         * g10/revoke.c (gen_standard_revoke): Use print_key_line.  This may
24620         also put "expires: " into the output.
24621
24622 2016-06-04  Werner Koch  <wk@gnupg.org>
24623
24624         w32: Require --enable-build-timestamp for the BUILD_HOSTNAME.
24625         + commit 79b7a8a9e0d41b743ceaee20dc47294359fe0d44
24626         * configure.ac (BUILD_HOSTNAME): Set to "<anon>" bey default.
24627         * build-aux/speedo.mk (speedo_pkg_gnupg_configure): Add
24628           --enable-build-timestamp.
24629
24630 2016-06-02  Werner Koch  <wk@gnupg.org>
24631
24632         gpg: Add the fingerprint to KEY_CREATED for subkeys.
24633         + commit 8d976a6b07c5a356631791b46b590328c1451f31
24634         * g10/keygen.c (print_status_key_created): Make more robust by
24635         allowing a NULL for PK.
24636         (generate_subkeypair): Use print_status_key_created.
24637         (generate_card_subkeypair): Ditto.
24638
24639         gpg: Try to use the passphrase from the primary for --quick-addkey.
24640         + commit 1b460f049e5c1c102d8b55ad28781688252c5a6b
24641         * agent/command.c (cmd_genkey): Add option --passwd-nonce.
24642         (cmd_passwd): Return a PASSWD_NONCE in verify mode.
24643         * g10/call-agent.c (agent_genkey): Add arg 'passwd_nonce_addr' and do
24644         not send a RESET if given.
24645         (agent_passwd): Add arg 'verify'.
24646         * g10/keygen.c (common_gen): Add optional arg 'passwd_nonce_addr'.
24647         (gen_elg, gen_dsa, gen_ecc, gen_rsa, do_create): Ditto.
24648         (generate_subkeypair): Use sepeare hexgrip var for the to be created
24649         for hexgrip feature.  Verify primary key first.  Make use of the
24650         passwd nonce.  Allow for a static passphrase.
24651
24652         gpg: Extend the --quick-gen-key command.
24653         + commit 01285f909e43e8d6a48fbcc77bb5af53d567d8a2
24654         * g10/keygen.c (quickgen_set_para): Add arg 'use'.
24655         (quick_generate_keypair): Add args 'algostr', 'usagestr', and
24656         'expirestr'.  Implement primary only key mode.
24657         (parse_algo_usage_expire): Set NBITS for the default algo.
24658         * g10/gpg.c (main): Extend --quick-gen-key command.
24659
24660         gpg: Improve the new parse_subkey_algostr_usagestr fucntion.
24661         + commit dcc4cd83821667be22e502af86139bb4bd41bdf7
24662         * g10/keygen.c (parse_usagestr): Allow "cert".
24663         (generate_subkeypair): Factor expire parsing out to ...
24664         (parse_subkey_algostr_usagestr): here.  Rename to ...
24665         (parse_algo_usage_expire): this.  Add arg 'for_subkey'.  Set CERT for
24666         primary key and check that it is not set for subkeys.
24667
24668         gpg: New command --quick-addkey.
24669         + commit 8f2a053a0ffa0430d01a53b4d491a3f0fff683eb
24670         * g10/keygen.c (DEFAULT_STD_SUBKEYUSE): New.
24671         (ask_keysize): Factor code out to ...
24672         (get_keysize_range, fixup_keysize): new.
24673         (parse_parameter_usage): Factor parsing out to  ...
24674         (parse_usagestr): new.  Allow use of "encr" as alias for "encrypt".
24675         (parse_subkey_algostr_usagestr): New.
24676         (generate_subkeypair): Add new args.  Implement unattended mode.
24677
24678         * g10/keyedit.c (keyedit_quick_sign): Factor some code out to ...
24679         (find_by_primary_fpr): new.
24680         (keyedit_quick_addkey): New.
24681         * g10/gpg.c (aQuickAddKey): New.
24682         (opts): Add --quick-addkey.
24683         (main): Implement.
24684
24685         gpg: Do not abort on certain invalid packets.
24686         + commit d837f6b0eadb14ea08c1c6030b4d6adaaee8778e
24687         * g10/build-packet.c (write_fake_data): Check for non-opaque data.
24688         * g10/seskey.c (do_encode_md): Return NULL instead of abort.
24689
24690         common: New function openpgp_is_curve_supported.
24691         + commit 072acb69be55e366e2da921e3953404765fa3928
24692         * common/openpgp-oid.c: Include openpgpdefs.h.
24693         (oidtable): Add field pubkey_algo.
24694         (openpgp_is_curve_supported): New.
24695
24696 2016-06-01  NIIBE Yutaka  <gniibe@fsij.org>
24697
24698         g10: Allow User ID length >= 256.
24699         + commit db1ecc8212defdd183abbb6b1407fcc8d2dc9552
24700         * build-packet.c (do_user_id): Call write_header2 with HDRLEN not set.
24701
24702 2016-05-31  Werner Koch  <wk@gnupg.org>
24703
24704         gpg: New status code NOTATION_FLAGS.
24705         + commit 67a4bc8d536f6997f14daff4c039abd48a172100
24706         * common/status.h (STATUS_NOTATION_FLAGS: New.
24707         * g10/packet.h (struct notation): Add flags.human.
24708         (notation_t): New typedef.
24709         * g10/build-packet.c (sig_to_notation): Set flags.human.
24710         * g10/keylist.c (show_notation): Write STATUS_NOTATION_FLAGS.
24711
24712 2016-05-28  Werner Koch  <wk@gnupg.org>
24713
24714         common: Add a status callback to gnupg_exec_tool_stream.
24715         + commit 239a4d53916b47b5b0f0167a9b2c7a8915bb9c52
24716         * common/exectool.h (exec_tool_status_cb_t): New.
24717         * common/exectool.c: Include missing exectool.h.
24718         (read_and_log_buffer_t): Replace array by pointer.
24719         (gnupg_exec_tool_stream): Add args 'status_cb' and 'status_cb_value'.
24720         Change all callers to pass NULL for them.  Malloc buffer for
24721         FDERRSTATE.
24722         (read_and_log_stderr): Implement status_fd feature.
24723
24724 2016-05-27  Werner Koch  <wk@gnupg.org>
24725
24726         common: Allow a second input stream for gnupg_exec_tool_stream.
24727         + commit 44a32455c8e41400ea96db4507c8a42bdb65b3b6
24728         * common/exechelp-posix.c (do_exec): Add arg 'except' and pass to
24729         close_all_fds.
24730         (gnupg_spawn_process): Add arg 'except'.  Change callers to pass NULL
24731         for it.
24732         * common/exechelp-w32.c (gnupg_spawn_process): Add dummy arg 'except'.
24733         * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
24734         * common/exectool.c (copy_buffer_do_copy): Allow NULL for SINK.
24735         (gnupg_exec_tool_stream): Add arg 'inextra'. Change callers to pass
24736         NULL for it.  Allow NULL for OUTPUT.
24737
24738         common: Simplify the fd closing patch 512c56a.
24739         + commit e6d9a2d07ed7aeac3944d8a7d1317c4a117356b4
24740         * common/exechelp-posix.c (get_max_fds): Use /proc/self.
24741
24742         common: Speedup closing fds before an exec.
24743         + commit 512c56af43027149e8beacf259746b8d7bf9b1a2
24744         * common/exechelp-posix.c [__linux__]: Include dirent.h.
24745         (get_max_fds) [__linux__]: Return the actual used highest fd.
24746
24747         tools: Improve debug output of rfc822parse.
24748         + commit ad75ca9c963bebbe02aae8d73e199a705764ae82
24749         * tools/rfc822parse.c (show_event): Add missing events.
24750
24751         build: Remove obsolete tests for funopen and fopencookie.
24752         + commit d755bcb89dbeaf6c7c1eca73ccabdf89b536c535
24753         * configure.ac (AC_CHECK_FUNCS): Remove tests for funopen.
24754
24755         common: Extend gnupg_create_inbound_pipe et al.
24756         + commit 5d991e333a1885adc40abd9d00c01fec4bd5d9d7
24757         * common/exechelp-posix.c (gnupg_create_inbound_pipe): Add args 'r_fp'
24758         and 'nonblock'.
24759         (gnupg_create_outbound_pipe): Ditto.
24760         * common/exechelp-w32.c (gnupg_create_inbound_pipe): Add non yet
24761         functional args 'r_fp' and 'nonblock'.
24762         (gnupg_create_outbound_pipe): Ditto.
24763         * common/exechelp-w32ce.c (gnupg_create_inbound_pipe): Ditto.
24764         (gnupg_create_outbound_pipe): Ditto.
24765
24766         common: Make use of default_errsource in exechelp.
24767         + commit 96c7901ec1c79be732570811223d3ea54875abfe
24768         * common/exechelp-posix.c (my_error_from_syserror, my_error): New.
24769         Use them instead of gpg_error and gpg_error_from_syserror.
24770         (create_pipe_and_estream): Remove arg ERRSOURCE and fix use of
24771         OUTBOUND which has a wrong name.  Adjust callers.
24772         (gnupg_spawn_process): Remove arg ERRSOURCE and replace by use of
24773         DEFAULT_ERRSOURCE.
24774         * common/exechelp-w32.c (gnupg_spawn_process): Ditto.
24775         * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
24776         * common/exectool.c (gnupg_exec_tool_stream):  Do not pass
24777         GPG_ERROR_FROM_SYSERROR.
24778         * tools/gpgconf-comp.c (gc_component_check_options): Ditto.
24779         (retrieve_options_from_program): Ditto.
24780
24781         gpg: Keep current and total of PROGESS status lines small enough.
24782         + commit 6c957c3d880c069bb843cc58fdcebb9fc344727e
24783         * g10/progress.c (progress_filter): Factor status wrote out to...
24784         (write_status_progress): New.  Scale values down.
24785
24786 2016-05-27  NIIBE Yutaka  <gniibe@fsij.org>
24787
24788         configure: Detection of libusb on FreeBSD.
24789         + commit b3e043ba905fdf2efcdadbd7022ac53f4408b748
24790         * configure.ac (LIBUSB_LIBS): Use LIBUSB_NAME for AC_CHECK_LIB.
24791
24792 2016-05-25  Werner Koch  <wk@gnupg.org>
24793
24794         build: Switch to new URL for swdb.lst.
24795         + commit 74028096e06d2904f77b74b373750264e5b7b1ea
24796
24797
24798 2016-05-24  Werner Koch  <wk@gnupg.org>
24799
24800         gpgtar: Simplify code by using ccparray.
24801         + commit 91bc7833836f19256d56984c94cacf44853ff5c8
24802         * tools/gpgtar-create.c (gpgtar_create): Use ccparray functions.
24803         * tools/gpgtar-extract.c (gpgtar_extract): Ditto.
24804         * tools/gpgtar-list.c (gpgtar_list): Ditto.
24805
24806         common: Add simple dynamic array function.
24807         + commit 2421f7f7ed74ed20372efd63a2efd58d3b55005c
24808         * common/ccparray.c: New.
24809         * common/ccparray.h: New.
24810         * common/t-ccparray.c: New.
24811         * common/Makefile.am (common_sources): Add files.
24812         (module_tests): Add test file.
24813         (t_ccparray_LDADD): New.
24814
24815 2016-05-23  Justus Winter  <justus@g10code.com>
24816
24817         tests: Test the pinentry interactions when exporting keys.
24818         + commit b9d1e099c3ec3163c86afe627ecbe028db1facf6
24819         * tests/openpgp/export.test: Test pinentry interactions.
24820
24821         tests: Add support for a passphrase queue to fake pinentry.
24822         + commit 4994153924e0948a657edddaef54a39a6001beff
24823         * tests/openpgp/fake-pinentry.c (get_passphrase): New function.
24824         (main): Add option --passphrasefile and read passphrases from it.
24825
24826         tests: Add logging to fake pinentry.
24827         + commit 41b10c66ec1dd33633386f4fc8013ddeab7737ca
24828         * tests/openpgp/fake-pinentry.c (log_stream): New variable.
24829         (reply): New function.
24830         (spacep,skip_options,option_value): Copy from common.
24831         (main): Parse arguments, add --logfile option, write logfile.
24832
24833         tests: Add export test.
24834         + commit a54e89a58576108fcae10ceeb4fc65822aecc170
24835         * tests/openpgp/Makefile.am (TESTS): Add new file.
24836         * tests/openpgp/export.test: New file.
24837
24838 2016-05-21  Werner Koch  <wk@gnupg.org>
24839
24840         gpg: Speed up key listing in Tofu mode.
24841         + commit 78bb08425af5b1edb7f3ef0119013529b3a9e4ba
24842         * g10/tofu.c (get_trust): Add arg PK.  Uses this instead of a an extra
24843         lookup of the public key by fingerrpint.
24844         (tofu_register): Pass PK to get_trust.
24845         (tofu_get_validity): Ditto.
24846
24847         *g10/tofu.c (tofu_register): Remove unused FINGERPRINT_PP.
24848
24849         gpg: Avoid name spaces clash with future sqlite versions.
24850         + commit b1ba460d8f3358342c2ee2927114d36e767a439f
24851         * g10/sqlite.c: Rename to gpgsql.c.  Change function prefixes to
24852         gpgsql_.
24853         * g10/sqlite.h: Rename to gpgsql.h.
24854         * g10/tofu.c: Adjust for changes.
24855
24856         gpg: Explicitly close a combined Tofu DB.
24857         + commit 006a6126131ffd59d9a47889ac031f932ecc5d0b
24858         * g10/tofu.c (tofu_closedbs): Close combined DB.
24859
24860         gpg: Store the Tofu meta handle for databases in CTRL.
24861         + commit 754b1c463034a634a678d8efc76c27fd46aad9b9
24862         * g10/gpg.h (struct tofu_dbs_s, tofu_dbs_t): New declarations.
24863         (struct server_control_s): Add field tofu.dbs.
24864         * g10/tofu.c (struct dbs): Rename to tofu_dbs_s.  Replace all users by
24865         by tofu_dbs_t.
24866         (opendbs):  Add arg CTRL.  Cache the DBS in CTRL.
24867         (closedbs): Rename to tofu_closedbs and make global.  Add arg CTRL.
24868         (tofu_register): Add arg CTRL.  Change all callers.  Do not call
24869         closedbs.
24870         (tofu_get_validity): Ditto.
24871         (tofu_set_policy): Ditto.
24872         (tofu_get_policy): Ditto.
24873         (tofu_set_policy_by_keyid): Add arg CTRL.
24874         * g10/gpg.c (gpg_deinit_default_ctrl): Call tofu_closedbs.
24875
24876         gpg: Pass CTRL object down to the trust functions.
24877         + commit 027c4e55522b8e18711a3331932a9869ab89ca26
24878
24879
24880         gpg: Fix the TOFU_STATS_LONG status.
24881         + commit fd973ee1c18aa8fe764e09ba4dff589309b2d78d
24882         * g10/tofu.c (show_statistics): Print TOFU STATS with formatting
24883         characters.
24884
24885 2016-05-19  Werner Koch  <wk@gnupg.org>
24886
24887         gpg: Print "[  never ]" instead of err for validity.
24888         + commit 437c97ab6a34ff1936001dd05209193b4466a81d
24889         * g10/trust.c (uid_trust_string_fixed): Handle NEVER.
24890
24891 2016-05-18  Werner Koch  <wk@gnupg.org>
24892
24893         dirmngr: Adjust the WKD lookup to specs version -01.
24894         + commit cf97769906337d65289ad58225a5ecc53c715550
24895         * dirmngr/server.c (cmd_wkd_get): Remove second occurrence of the
24896         domain part.
24897
24898 2016-05-17  Werner Koch  <wk@gnupg.org>
24899
24900         gpg: Emit new status line KEY_CONSIDERED.
24901         + commit ff71521d9698c7c5df94831a1398e948213af433
24902         * common/status.h (STATUS_KEY_CONSIDERED): New.
24903         * g10/getkey.c: Include status.h.
24904         (LOOKUP_NOT_SELECTED, LOOKUP_ALL_SUBKEYS_EXPIRED): New.
24905         (finish_lookup): Add arg R_FLAGS.  Count expired and revoked keys and
24906         set flag.  Check a requested usage before checking for expiraion or
24907         revocation.
24908         (print_status_key_considered): New.
24909         (lookup): Print new status.
24910
24911 2016-05-11  NIIBE Yutaka  <gniibe@fsij.org>
24912
24913         g10: Fix signature checking.
24914         + commit 83a90a916e8e2f8e44c3b11d11e1dd75f65a87fb
24915         * g10/sig-check.c (check_signature_over_key_or_uid): Fix call to
24916         walk_kbnode.
24917
24918 2016-05-10  Werner Koch  <wk@gnupg.org>
24919
24920         gpg: Allow unattended deletion of secret keys.
24921         + commit ac9ff644b12c4dfa55d466af8ae6af54d1646893
24922         * agent/command.c (cmd_delete_key): Make the --force option depend on
24923         --disallow-loopback-passphrase.
24924         * g10/call-agent.c (agent_delete_key): Add arg FORCE.
24925         * g10/delkey.c (do_delete_key): Pass opt.answer_yes to
24926         agent_delete_key.
24927
24928 2016-05-09  Werner Koch  <wk@gnupg.org>
24929
24930         gpg: Fix buglet in the check_all_keysigs function.
24931         + commit 693838f0125d5d0c963fa3771b1bd117702af697
24932         * g10/keyedit.c (sig_comparison): Actually compare the pubkey
24933         algorithms.
24934
24935         gpg: Request a "save" after cmd "check" fixed something.
24936         + commit d33b35f7481caa0dcb25f9fa7d6c5bb27895297a
24937         * g10/keyedit.c (keyedit_menu) <cmdCHECK>: Set modified.
24938
24939 2016-05-09  NIIBE Yutaka  <gniibe@fsij.org>
24940
24941         po: Update Japanese translation.
24942         + commit ff870d59f067d3c5415e231c02a50d5dceac7e48
24943
24944
24945 2016-05-04  Werner Koch  <wk@gnupg.org>
24946
24947         Release 2.1.12.
24948         + commit 00df5b1236cac5c7a48638a4613278c5aab486f8
24949
24950
24951         speedo,w32: Remove the installation directory page.
24952         + commit fb1e9df48465c2f77a65dddd257572fdc79d9450
24953         * build-aux/speedo/w32/inst.nsi (MUI_PAGE_DIRECTORY): Remove.
24954
24955         gpg: Fix const char pointer mismatch with gettext.
24956         + commit 920b1421b35d1404b8360bd8feac0be659840543
24957         * g10/tofu.c (get_trust): Use const char *.
24958
24959         speedo: Build sqlite with static-libgcc.
24960         + commit edce430b039b313cc2d79402a7bd21347490c3be
24961         * build-aux/speedo/patches/sqlite.patch: New.
24962         * Makefile.am (EXTRA_DIST): Add file.
24963
24964         speedo: Also try patch files w/o version number.
24965         + commit 9ea258fa5b45bb5454ee3f5906df5d5eebdec0dd
24966         * build-aux/speedo.mk (SPKG_template): Try such a patch file.
24967
24968 2016-05-04  Andre Heinecke  <aheinecke@intevation.de>
24969
24970         speedo,w32: Install sqlite.
24971         + commit 2b78223d7587c68e2e27a3d7b365219228da7947
24972         * build-aux/speedo/w32/inst.nsi (-sqlite, -un.sqlite): New.
24973
24974         speedo,w32: Fix uninstallation.
24975         + commit 5ec76fd0c300b52366cf8d1407fe1c8de3a8a9d4
24976         * build-aux/speedo/w32/inst.nsi (-un.gnupg): Delete distsigkey and
24977         dirmngr-conf.skel
24978
24979         speedo,w32: Install localisation.
24980         + commit 3f58fc64666101e160e9b13fedb6cdaebeb91a7a
24981         * build-aux/speedo/w32/inst.nsi (-libgpg-error, GnuPG): Install l10n.
24982         (-un.libgpg-error, -un.gnupg): Uninstall l10n files.
24983
24984 2016-05-04  Werner Koch  <wk@gnupg.org>
24985
24986         tests: Disable the migrations tests.
24987         + commit d696eb396a9c88319358da4333feb653994d5408
24988         * tests/Makefile.am (SUBDIRS): Remove migrations.
24989         * configure.ac (AC_CONFIG_FILES): Remove migrations Makefile.
24990
24991 2016-05-04  Ineiev  <ineiev@gnu.org>
24992
24993         po: Update Russian translation.
24994         + commit 4fd13ab78dd228d8ff85659cddc2076af8728ebe
24995
24996
24997 2016-05-04  Werner Koch  <wk@gnupg.org>
24998
24999         po: Update German translation.
25000         + commit 75f31cdd42eed3555952ac478055d52af841f702
25001
25002
25003         Some minor string changes and fixed a printf format.
25004         + commit d00625dae60f26617d2e1bd4f22c6b35a4e92c91
25005         * g10/build-packet.c (notation_value_to_human_readable_string): Use
25006         %zu for size_t.
25007
25008         build: Update config.{guess,sub} to 2016-04-02 and 2016-03-30.
25009         + commit 04cc7c3786d91881f83a72799dab058476602a31
25010         * build-aux/config.guess: Update.
25011         * build-aux/config.sub: Update.
25012
25013         agent: Make --allow-loopback-pinentry the default.
25014         + commit 3ef0938cfd8637e9801369f142eb8dd564f2ca61
25015         * agent/gpg-agent.c (oNoAllowLoopbackPinentry): New.
25016         (opts): Add --no-allow-loopback-pinentry.  Hide
25017         description of --allow-loopback-pinentry.
25018         (parse_rereadable_options): Set opt.allow_loopback_pinentry by
25019         default.
25020         (main): Replace allow-loopback-pinentry by no-allow-loopback-pinentry
25021         in the gpgconf list.
25022         * tools/gpgconf-comp.c (gc_options_gpg_agent): Ditto.
25023
25024 2016-05-03  Werner Koch  <wk@gnupg.org>
25025
25026         common: Print https URLs in help messages.
25027         + commit 9e28617e260261de3972c20698b5a01561330e1c
25028         * common/argparse.c (strusage): Print https URLS.
25029
25030         tests: Silence output of some tests.
25031         + commit 33aacc3d4bbd6a82d7e7ceca058970879741b7da
25032         * common/t-exechelp.c (print_open_fds): Silence non-verbose output.
25033         (test_close_all_fds): Ditto.
25034         * common/t-session-env.c (show_stdnames): Indent output.
25035         * g10/test.c (TEST): Silence non-verbose okay output.
25036         (exit_tests): Ditto.
25037         * tools/gpg-zip.in (tar_verbose_opt): Add option --quiet.
25038         * tests/openpgp/gpgtar.test (GPGZIP): Pass option --quiet.
25039         * tests/openpgp/mds.test: Indent MD5 notice.
25040         * tests/openpgp/version.test: Indent --version output.
25041
25042         gpg: Emit status lines TOFU_STATS and TOFU_STATS_LONG.
25043         + commit 83865be35cff5355a5c4575cc3b50609819b0baa
25044         * g10/tofu.c (NO_WARNING_THRESHOLD): Rename to BASIC_TRUST_THRESHOLD.
25045         (FULL_TRUST_THRESHOLD): New.
25046         (write_stats_status): New.
25047         (show_statistics): Call new function.  Print TOFU_STATS_LONG.
25048
25049 2016-05-02  Werner Koch  <wk@gnupg.org>
25050
25051         gpg: Extend TRUST_foo status lines with the trust model.
25052         + commit ae1889320b822d48f7118a29391605e9ac992701
25053         * g10/trustdb.h (TRUST_FLAG_TOFU_BASED): New.
25054         * g10/trustdb.c (trust_model_string): Lowercase the strings.  Add arg
25055         "model" and change callers to call with OPT.TRUST_MODEL.
25056         * g10/tofu.c (tofu_wot_trust_combine): Set TRUST_FLAG_TOFU_BASED.
25057         * g10/pkclist.c (write_trust_status): New.
25058         (check_signatures_trust): Call new function.
25059
25060         gpg: Improve line wrapping for a tofu message.
25061         + commit 5cef6118580fe658a27d32e85696d88775ad417a
25062         * g10/tofu.c (time_ago_str): Mark non-breakable spaces.
25063         (show_statistics): Remove marks.
25064
25065         gpg: Re-format some tofu messages.
25066         + commit d73e83c3b678add11a5754e199e528aeb39ec8ce
25067         * common/status.h (STATUS_TOFU_USER, STATUS_TOFU_STATS)
25068         (STATUS_TOFU_STATS_SHORT, STATUS_TOFU_STATS_LONG): New.
25069         * g10/tofu.c (NO_WARNING_THRESHOLD): New.
25070         (record_binding, tofu_register): Take care of --dry-run.
25071         (show_statistics): Print STATUS_TOFU_USER.  Reformat some messages.
25072         Fix the ngettext/strcmp thing.  Use log_string instead of log_info.
25073         Use NO_WARNING_THRESHOLD constant.
25074         (get_trust): Use format_text and print a compact fingerprint.
25075
25076 2016-05-02  NIIBE Yutaka  <gniibe@fsij.org>
25077
25078         scd: More fix of error return path.
25079         + commit 6677d8b61446eb5760a30a2488c992d6e895a9ed
25080         * scd/command.c (open_card): Return GPG_ERR_ENODEV on the failure of
25081         apdu_connect.
25082
25083 2016-04-29  Werner Koch  <wk@gnupg.org>
25084
25085         common: Extend log_string to indent lines.
25086         + commit 35f4b6aafdf1889ed1ae569af5852f47738fe993
25087         * common/logging.c (do_logv): Add indentation when called via
25088         log_string.
25089
25090         gpg: Factor some code code out of tofu.c.
25091         + commit dcad99c98616a6031ddfde313c920339e4012378
25092         * g10/tofu.c (string_to_long): New.
25093         (string_to_ulong): New.
25094         (get_single_unsigned_long_cb): Replace strtol/strtoul by new function.
25095         (get_single_long_cb): Ditto.
25096         (signature_stats_collect_cb):  Ditto.
25097         (get_policy): Ditto.
25098         (show_statistics): Ditto.  Uese es_free instead of free.
25099
25100         gpg: Remove all assert.h and s/assert/log_assert/.
25101         + commit 64bfeafa52a5ed3fa82bdc0ce7ef0edddeef188c
25102
25103
25104         common: Improve log_assert.
25105         + commit 9740dff9f4d18ba764dc7173d4902e94e3f0c2e8
25106         * common/logging.c (bug_at): Do not i18n the string.
25107         (_log_assert): New.
25108         * common/logging.h (log_assert): Use new function and pass line
25109         information.
25110
25111 2016-04-28  NIIBE Yutaka  <gniibe@fsij.org>
25112
25113         scd: Fix error return path.
25114         + commit cb4fee8bb645745ff199f7428e19226d5bc63dab
25115         * scd/ccid-driver.c (bulk_in): Remove EAGAIN handling.
25116         Handle LIBUSB_ERROR_NO_DEVICE to return CCID_DRIVER_ERR_NO_READER.
25117
25118 2016-04-27  NIIBE Yutaka  <gniibe@fsij.org>
25119
25120         scd: Fix memory leaks.
25121         + commit 508b0deb70d39d388149be9a63fab24cc956a239
25122         * scd/ccid-driver.c (scan_or_find_usb_device): Return on
25123         LIBUSB_ERROR_NO_MEM.  Free CONFIG before return except on error.
25124         (scan_or_find_devices): Free device list.
25125
25126 2016-04-27  Werner Koch  <wk@gnupg.org>
25127
25128         gpg: Add experimental AKL method "wkd" and option --with-wkd-hash.
25129         + commit 87de9e19edf0311ca0342e15ef44ebe40e32861e
25130         * g10/getkey.c (parse_auto_key_locate): Add method "wkd".
25131         (get_pubkey_byname): Implement that method.  Also rename a variable.
25132         * g10/call-dirmngr.c (gpg_dirmngr_wkd_get): New.
25133         * g10/keyserver.c (keyserver_import_wkd): New.
25134         * g10/test-stubs.c (keyserver_import_wkd): Add stub.
25135         * g10/gpgv.c (keyserver_import_wkd): Ditto.
25136         * g10/options.h (opt):  Add field 'with_wkd_hash'.
25137         (AKL_WKD): New.
25138
25139         * g10/gpg.c (oWithWKDHash): New.
25140         (opts): Add option --with-wkd-hash.
25141         (main): Set that option.
25142         * g10/keylist.c (list_keyblock_print): Implement that option.
25143
25144         dirmngr: Add experimental command WKD_GET.
25145         + commit c83c6f212e9bc98a9ea8dd8102bc16edd1a03050
25146         * dirmngr/server.c (cmd_wkd_get): New.
25147         (register_commands): Add command WKD_GET.
25148
25149         dirmngr: Use system provided root CAs with KS_FETCH.
25150         + commit c3aeda82b8d00b87a5af72b4075c487c10dfdf6b
25151         * dirmngr/ks-engine-http.c (ks_http_fetch): Use HTTP_FLAG_TRUST_SYS.
25152
25153 2016-04-26  Werner Koch  <wk@gnupg.org>
25154
25155         http: Allow to request system defined CAs for TLS.
25156         + commit fd765df6a7883c3d841abeb657330a1aab4b7756
25157         * dirmngr/http.h (HTTP_FLAG_TRUST_DEF, HTTP_FLAG_TRUST_SYS): New.
25158         * dirmngr/http.c (http_session_new): Add arg "flags".
25159         * dirmngr/ks-engine-hkp.c (send_request): Use new flag
25160         HTTP_FLAG_TRUST_DEF for the new arg of http_session_new.
25161         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
25162         * dirmngr/t-http.c (main): Ditto.
25163
25164 2016-04-25  Werner Koch  <wk@gnupg.org>
25165
25166         common: Minor fixes for the new private-keys.c.
25167         + commit b7fa4960c292ef1a290d32b7f46bb741bbfc0923
25168         * common/private-keys.c (my_error_from_syserror): New.  Use it in
25169         place of gpg_error_from_syserror.
25170         (_pkc_add, pkc_lookup, pke_next_value): Use ascii_strcasecmp.
25171         (pkc_parse): Use xtrystrdup and append_to_strlist_try as intended.
25172
25173         (_pkc_add): Add braces around if-statement.
25174
25175         common: Use new function to print a failure of xtrymalloc.
25176         + commit 8776abbe02935e720018f3ef6ffd48f21435ff8b
25177         * common/miscellaneous.c (xoutofcore): New.
25178         * common/strlist.c (append_to_strlist): Use instead of abort.
25179         (append_to_strlist_try): Use xtrymalloc instead of xmalloc.
25180
25181 2016-04-21  Justus Winter  <justus@g10code.com>
25182
25183         common: Add support for the new extended private key format.
25184         + commit 12af2630cf4d1a39179179925fac8f2cce7504ff
25185         * agent/findkey.c (write_extended_private_key): New function.
25186         (agent_write_private_key): Detect if an existing file is in extended
25187         format and update the key within if it is.
25188         (read_key_file): Handle the new format.
25189         * agent/keyformat.txt: Document the new format.
25190         * common/Makefile.am: Add the new files.
25191         * common/private-keys.c: New file.
25192         * common/private-keys.h: Likewise.
25193         * common/t-private-keys.c: Likewise.
25194         * common/util.h (alphap, alnump): New macros.
25195         * tests/migrations: Add test demonstrating that we can cope with the
25196         new format.
25197
25198         common: Add 'free_strlist_wipe' which wipes memory.
25199         + commit c6d1f2f08c68efe7e80887219064a8ce6365128f
25200         * common/strlist.c (free_strlist_wipe): New function.
25201         * common/strlist.h (free_strlist_wipe): New prototype.
25202
25203         common: Add 'append_to_strlist_try' which can fail.
25204         + commit 95303ee11df12f284e98d02dba993eda9e425383
25205         * common/strlist.c (append_to_strlist): Use the new function.
25206         (append_to_strlist_try): New function.
25207         * common/strlist.h (append_to_strlist_try): New prototype.
25208
25209         agent: Convert key format document to org.
25210         + commit 342cc488890241b41e49f50886617115342721d6
25211         * agent/keyformat.txt: Convert to org mode.
25212
25213         tests: Make migration test more robust and silent.
25214         + commit 0c35e09278514f1e3377a4b0a9b1f44dd39b1bf4
25215         * tests/migrations/from-classic.test: Fix in-tree build, silence test.
25216
25217 2016-04-21  Werner Koch  <wk@gnupg.org>
25218
25219         w32: Use --enable-gpg2-is-gpg by default.
25220         + commit d81de224ecd542922dda649a492dd9550509d7bc
25221         * autogen.rc: Add option also for plain Windows.
25222
25223         w32: Replace libiconv DLL by iconv feature of libgpg-error.
25224         + commit bd4d65615b3a5360d455b99e77bd113ad90f1539
25225         * configure.ac: Do nor require libiconv for W32.
25226         * common/utf8conv.c [W32]: Do not incluce iconv.h.  Request
25227         libgpg-error iconv macros.
25228         (jnlib_iconv): Use ICONV_CONST macro.
25229         * build-aux/speedo/w32/inst.nsi [!WITH_GUI]: Do not install libiconv.
25230         * build-aux/speedo.mk (speedo_spkgs) [!WITH_GUI]: Likewise.
25231
25232 2016-04-20  Justus Winter  <justus@g10code.com>
25233
25234         agent: Sanitize permissions of the private key directory.
25235         + commit f8adf1a3234655877a4f985d627d98567507002c
25236         * agent/gpg-agent.c (create_private_keys_directory): Set permissions.
25237         * common/sysutils.c (modestr_to_mode): New function.
25238         (gnupg_mkdir): Use new function.
25239         (gnupg_chmod): New function.
25240         * common/sysutils.h (gnupg_chmod): New prototype.
25241         * tests/migrations/from-classic.test: Test migration with existing
25242         directory.
25243
25244         tests: Test the migration from a classic GnuPG home directory.
25245         + commit defbc70b4a16264e067daf76678ecfb9d030dee4
25246         * configure.ac: Add new directory.
25247         * tests/Makefile.am (SUBDIRS): Likewise.
25248         * tests/migrations/Makefile.am: New file.
25249         * tests/migrations/from-classic.gpghome/pubring.gpg.asc: Likewise.
25250         * tests/migrations/from-classic.gpghome/secring.gpg.asc: Likewise.
25251         * tests/migrations/from-classic.gpghome/trustdb.gpg.asc: Likewise.
25252         * tests/migrations/from-classic.test: Likewise.
25253
25254 2016-04-20  Werner Koch  <wk@gnupg.org>
25255
25256         speedo: Use swdb.lst to define the SQLite version.
25257         + commit 2385b9f1ddc4938e45c01a12a804f4b77d253305
25258         * build-aux/speedo.mk: Change sqlite to use our mirror and the
25259         swdb.lst file.
25260         * build-aux/speedo/w32/inst.nsi: gpg is now build and installed as
25261         gpg.
25262
25263 2016-04-19  Werner Koch  <wk@gnupg.org>
25264
25265         gpg: Improve UID selction of --quick-sign-key.
25266         + commit d02de6c0a4a55a2720cfa5caddcbfc4ce988a2ec
25267         * g10/keyedit.c (keyedit_quick_sign): Improve UID selection and print
25268         error for non-found userids.
25269
25270         gpg: Avoid debug like output at start of --edit-key.
25271         + commit 085b19fc9aa7f2f9b82a97824b117e71390964ec
25272         * g10/keyedit.c (check_all_keysigs): Print info only after something
25273         has been modified.
25274
25275 2016-04-15  Andre Heinecke  <aheinecke@intevation.de>
25276
25277         dirmngr: Fix https never reported in general help.
25278         + commit 6272f24312f2efe8707a7712858c85cd5a42e6fa
25279         * dirmngr/ks-engine-http.c (ks_hkp_help): Also print https
25280         when supported and no uri provided.
25281
25282         dirmngr: Fix https incorrectly reported in help.
25283         + commit a0642856b25622c81d3464979c47ff2a30af58fa
25284         * dirmngr/ks-engine-http.c (ks_hkp_help): Only print https if tls
25285         is supported.
25286
25287 2016-04-14  Werner Koch  <wk@gnupg.org>
25288
25289         agent: Fix regression due to recent commit 4159567.
25290         + commit 8c3fb2360f154a971d2a390e4937acb22a44a8c2
25291         * agent/protect.c (do_encryption): Fix CBC hashing.
25292
25293         agent: Allow gpg-protect-tool to handle openpgp-native protection.
25294         + commit 6df75ec70afeb1a5ad9a00557e1245e1514c37b5
25295         * agent/protect-tool.c (read_and_unprotect): Add arg ctrl and pass to
25296         agent_unprotect.
25297         (main): Allocate a simple CTRL object and pass it to
25298         read_and_unprotect.
25299         (convert_from_openpgp_native): Remove stub.
25300         (agent_key_available, agent_get_cache): New stubs.
25301         (agent_askpin): New emulation for the one in call-pinentry.c.
25302         (agent_write_private_key): New to dump key.
25303         * agent/Makefile.am (gpg_protect_tool_SOURCES): Add cvt-openpgp.c
25304
25305         tests: Set fake-pinentry's stdout and stdin to _IOLBF.
25306         + commit 94504b3d5af126abb591dedda1ca0f0970822f55
25307         * tests/openpgp/fake-pinentry.c (main): Call setvbuf.  Show passphrase
25308         at startup.  Increase buffer.
25309
25310 2016-04-12  Werner Koch  <wk@gnupg.org>
25311
25312         agent: Implement new protection mode openpgp-s2k3-ocb-aes.
25313         + commit 4159567f7ed7a1139fdc3a6c92988e1648ad84ab
25314         * agent/protect.c (agent_protect): Add arg use_ocb.  Change all caller
25315         to pass -1 for default.
25316         * agent/protect-tool.c: New option --debug-use-ocb.
25317         (oDebugUseOCB): New.
25318         (opt_debug_use_ocb): New.
25319         (main): Set option.
25320         (read_and_protect): Implement option.
25321
25322         * agent/protect.c (OCB_MODE_SUPPORTED): New macro.
25323         (PROT_DEFAULT_TO_OCB): New macro.
25324         (do_encryption): Add args use_ocb, hashbegin, hashlen, timestamp_exp,
25325         and timestamp_exp_len.  Implement OCB.
25326         (agent_protect): Change to support OCB.
25327         (do_decryption): Add new args is_ocb, aadhole_begin, and aadhole_len.
25328         Implement OCB.
25329         (merge_lists): Allow NULL for sha1hash.
25330         (agent_unprotect): Change to support OCB.
25331         (agent_private_key_type): Remove debug output.
25332
25333         indent: Help Emacs not to get confused by conditional compilation.
25334         + commit 7faf131c8b8710419df3dc13a1228d1977c55f53
25335         * agent/protect.c (calibrate_get_time) [W32]: Use separate function
25336         calls for W32 and W32CE.
25337
25338 2016-04-07  Justus Winter  <justus@g10code.com>
25339
25340         g10: Fix exporting secret keys of certain sizes.
25341         + commit 02cf1357dd5ee34a57371f55b9d312b8b9e3a7e8
25342         * g10/build-packet.c (do_key): Do not use the header length specified
25343         by the public key packet from the keyring, but let 'write_header2'
25344         compute the required length.
25345
25346 2016-04-06  Justus Winter  <justus@g10code.com>
25347
25348         Revert "g10: Support armored keyrings in gpgv."
25349         + commit 76ca869197e304daa5a8dd96ea43113ec7b28354
25350         This reverts commit abb352de51bc964c06007fce43ed6f6caea87c15.
25351
25352 2016-04-05  Justus Winter  <justus@g10code.com>
25353
25354         dirmngr: Autodetect PEM format in dirmngr-client.
25355         + commit 9354293b8c9f234939bc04182f15e2fe512e914e
25356         * dirmngr/dirmngr-client.c (init_asctobin): New function.
25357         (main): Move the initialization code to the new function.
25358         (read_pem_certificate): Initialize base64 table.
25359         (read_certificate): Try to decode certificates given in files as PEM
25360         first.
25361
25362 2016-04-05  Werner Koch  <wk@gnupg.org>
25363
25364         build: Fix for: Build gpgcompose only in maintainer mode.
25365         + commit f45ed07a0fffa3adbc75b9d5726108a066927599
25366         * g10/Makefile.am (noinst_PROGRAMS): Always add module_tests.
25367
25368         doc: Install gpg and gpgv man pages under the correct name.
25369         + commit 4dc4fb1c14b3096bb1cdc5923c0d1eb419036805
25370         * doc/mkdefsinc.c (main): Add double include guard.  Set variable
25371         gpgtwohack. Define macros gpgname and gpgvname.
25372         * doc/gpg.texi: Remove macro definition for gpgname.  Use Texinfo var
25373         gpgtwohack to prepare the man pages.  Use @gpgname everywhere.
25374         * doc/gpgv.texi: Likewise.
25375         * doc/Makefile.am (myman_pages): Remove gpg2.1 and gpgv2.1 but add
25376         them depending on USE_GPG2_HACK.
25377
25378         build: Build gpgcompose only in maintainer mode.
25379         + commit 4b5341dc333983a15f649601fdddc42ba9161433
25380         * g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose only in maintainer
25381         mode.
25382
25383         gpg: Replace use of "gpg2" by GPG_NAME.
25384         + commit 7b58a1118d98543ed6854447d7b403877638ba54
25385
25386
25387 2016-04-04  Werner Koch  <wk@gnupg.org>
25388
25389         Now build "gpg" binary but install as "gpg2"
25390         + commit 96bcd4220f1f1313afe12097d8dc62342ac8de0d
25391         * configure.ac (USE_GPG2_HACK): New ac_define am_conditional.
25392         * common/homedir.c (gnupg_module_name): Replace use of macro
25393         NAME_OF_INSTALLED_GPG.
25394         * g10/keygen.c (generate_keypair): Ditto.
25395         * g10/Makefile.am (bin_PROGRAMS): Remove.
25396         (noinst_PROGRAMS): Add gpg or gpg2 and gpgv or gpg2.
25397         (gpg2_hack_list): New.
25398         (use_gpg2_hack): New.
25399         (gpg2_SOURCES): Rename to gpg_SOURCES.
25400         (gpgv2_SOURCES): Rename to gpgv_SOURCES.
25401         (gpg2_LDADD): Rename to gpg_LDADD.
25402         (gpgv2_LDADD): Rename to gpgv_LDADD.
25403         (gpg2_LDFLAGS): Rename to gpg_LDFLAGS.
25404         (gpgv2_LDFLAGS): Rename to gpgv2_LDFLAGS.
25405         (install-exec-hook): Remove WinCE specific rules and add new rules.
25406         (uninstall-local): Uninstall gpg/gpg2 and gpgv/gpgv2.
25407         * tests/openpgp/Makefile.am (required_pgms): s/gpg2/gpg/.
25408         * tests/openpgp/defs.inc: Ditto.
25409         * tests/openpgp/gpgtar.test: Ditto.
25410         * tests/openpgp/mkdemodirs: Ditto.
25411         * tests/openpgp/signdemokey: Ditto.
25412
25413         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Remove obsolete
25414         --enable-mailto, add --enable-gpg2-is-gpg.
25415
25416         tests: Add missing file.
25417         + commit c6ed863491ec3a1e0fcf9cbe2c93c87468306c29
25418         * tests/openpgp/Makefile.am (TEST_FILES): Add plain-largeo.asc.
25419
25420 2016-04-04  Justus Winter  <justus@g10code.com>
25421
25422         g10: Support armored keyrings in gpgv.
25423         + commit abb352de51bc964c06007fce43ed6f6caea87c15
25424         * doc/gpgv.texi: Document the feature.
25425         * g10/Makefile.am (gpgv2_SOURCES): Add dearmor.c.
25426         * g10/dearmor.c (dearmor_file): Add sink argument.
25427         * g10/gpg.c (main): Adapt accordingly.
25428         * g10/gpgv.c (make_temp_dir): New function.
25429         (main): De-armor keyrings.
25430         * g10/main.h (dearmor_file): Adapt prototype.
25431
25432         tests: Fix default key test.
25433         + commit dd5902cc45bae7582f8a0bc91a0a7f4d8ae45d8c
25434         * tests/openpgp/default-key.test: Avoid using the option
25435         '--trust-model' unconditionally.
25436
25437 2016-04-01  Justus Winter  <justus@g10code.com>
25438
25439         build: Check for conflicting trust model options.
25440         + commit 6060ea898fda499211c9d5030fff41d58f899fb0
25441         * configure.ac: Disable TOFU if configured without trust models, and
25442         check for conflicting options.
25443
25444         g10: Remove option --always-trust if compiled without trust models.
25445         + commit b74185b6eaeaae4754726ff203e11977777f568c
25446         * g10/gpg.c (opts): Remove option --always-trust if compiled without
25447         trust models.
25448
25449 2016-03-31  Justus Winter  <justus@g10code.com>
25450
25451         speedo,w32: Build libsqlite3.
25452         + commit e7171f559590422cc52dbcb8d78d94569b31012f
25453         * build-aux/speedo.mk (speedo_spkgs): Add libsqlite3 on w32.
25454         (libsqlite3_ver): New variable.
25455         (speedo_pkg_libsqlite3_tar): Likewise.
25456
25457         g10: Use gpg-error abstraction of sched_yield.
25458         + commit 8be9dab2dd2f83ca922c01542c63b404e34bdfd9
25459         * g10/tofu.c (begin_transaction): Use 'gpgrt_yield'.
25460
25461 2016-03-29  Werner Koch  <wk@gnupg.org>
25462
25463         gpg: Fix NULL-segv for missing tofu DB.
25464         + commit e2c5781788f765815532410a77077ddbb72513e9
25465         * g10/tofu.c (opendb): Guard call to timeout function.
25466
25467 2016-03-22  Werner Koch  <wk@gnupg.org>
25468
25469         gpg: Improve message when asking for key capabilities.
25470         + commit fc30c079a348436868968850dabf653b91f82419
25471         * g10/keygen.c (ask_key_flags): Improve message.
25472
25473         gpg: Remove the extra prompt for Curve25519.
25474         + commit 7f919063d3e426104fe58ae779a9a066140014c1
25475         * g10/keygen.c (MY_USE_ECDSADH): New macro local to ask_curve.
25476         (ask_curve): Use a fixed table of curve names and reserve a slot for
25477         Curve448.  Simplify CurveNNNN/EdNNNN switching.
25478         (ask_curve): Remove the Curve25519 is non-standard prompt.
25479
25480 2016-03-19  Werner Koch  <wk@gnupg.org>
25481
25482         gpg: Silence trustdb computation with --quiet.
25483         + commit af9a4afbf0b518c8acff98e50135b2beb6c722c3
25484         * g10/trustdb.c (validate_keys): Do not print log_info stuff in quiet
25485         mode.
25486
25487 2016-03-17  Werner Koch  <wk@gnupg.org>
25488
25489         sm: Always create a keybox header when creating a new keybox.
25490         + commit 1aad5c6277ea3852ff57bbf680f61c9136ce4d5c
25491         * sm/keydb.c (maybe_create_keybox): Create the header blob.
25492
25493 2016-03-17  Neal H. Walfield  <neal@g10code.com>
25494
25495         doc: Improve documentation of --enable-large-rsa.
25496         + commit 1dc7f55a4095ee42ce2d8c3eb41b7162edf2ca2e
25497         * doc/gpg.texi (--enable-large-rsa): Improve text.
25498
25499 2016-03-17  NIIBE Yutaka  <gniibe@fsij.org>
25500
25501         agent: allow removal of the shadowed key.
25502         + commit 8588c2dbc4c4d1b53796f3dbe8489b932dca7a60
25503         * agent/findkey.c (agent_delete_key): Remove the key when asked.
25504
25505 2016-03-16  NIIBE Yutaka  <gniibe@fsij.org>
25506
25507         g10: Add const qualifier.
25508         + commit b752d2c93778e6a1c1de3eddf8fc725b0ddd354e
25509         * g10/gpgcompose.c (show_help): Those are strings not to be modified.
25510
25511 2016-03-15  Werner Koch  <wk@gnupg.org>
25512
25513         gpg: Do not rely on a certain evaluation order.
25514         + commit 60b34f96f4f390670462d719c0d797e622cee4d4
25515         * g10/keyedit.c (print_and_check_one_sig): Call check_key_signature
25516         before derefing IS_SELFSIG.
25517
25518 2016-03-14  Werner Koch  <wk@gnupg.org>
25519
25520         scd: Add manufacturer id 0x000a.
25521         + commit 834b84c0ee4990393daa5e44afbab5b0aaed0758
25522         * g10/card-util.c (get_manufacturer): Add it.
25523
25524 2016-03-10  Kevin J. McCarthy  <kevin@8t8.us>
25525
25526         g10: Silence message if --quiet is given.
25527         + commit 4f578cb2fc192f44070bb0d18dffaa3863ed0d92
25528         * g10/getkey.c (parse_def_secret_key): Silence message if --quiet is
25529         given.
25530
25531 2016-03-08  Neal H. Walfield  <neal@g10code.com>
25532
25533         gpg: Add a new test.
25534         + commit b17577eac6b7599a4bab6fd3ecb04715aa01367c
25535         * g10/Makefile.am (EXTRA_DIST): Add t-stutter-data.asc.
25536         (module_tests): Add t-stutter.
25537         (t_stutter_SOURCES): New variable.
25538         (t_stutter_LDADD): New variable.
25539
25540 2016-03-07  Justus Winter  <justus@g10code.com>
25541
25542         sm: Implement pinentry loopback and reading passphrases from fd.
25543         + commit eea139c56ef55081d8cd8df2a35ce507386e0f17
25544         * doc/gpgsm.texi: Document '--pinentry-mode' and '--passphrase-fd'.
25545         * sm/Makefile.am (gpgsm_SOURCES): Add new files
25546         * sm/call-agent.c (struct default_inq_parm_s): New definition.
25547         (start_agent): Pass in the pinentry mode.
25548         (default_inq_cb): Handle 'PASSPHRASE' and 'NEW_PASSPHRASE' inquiries.
25549         Adapt all call sites to the new callback cookie.
25550         * sm/gpgsm.c (cmd_and_opt_values): Add new values.
25551         (opts): Add new options.
25552         (main): Handle new options.
25553         * sm/gpgsm.h (struct opt): Add field 'pinentry_mode'.
25554         * sm/passphrase.c: New file.
25555         * sm/passphrase.h: Likewise.
25556
25557         sm: Remove unused argument '--fixed-passphrase'.
25558         + commit 53ed98eda77ff2dcf390cebd0cec9f2665661863
25559         * doc/gpgsm.texi: Drop description.
25560         * sm/gpgsm.c (cmd_and_opt_values): Drop enum value.
25561         (opts): Drop argument.
25562         (main): Drop argument handling.
25563         * sm/gpgsm.h (struct opt): Drop field 'fixed_passphrase'.
25564
25565         kbx: Avoid undefined behavior.
25566         + commit a68ca5a90457ac97eee4efd7fdea596d27c54697
25567         * kbx/keybox-file.c (_keybox_read_blob2): Cast to unsigned int before
25568         shifting.
25569
25570 2016-03-07  NIIBE Yutaka  <gniibe@fsij.org>
25571
25572         scd: Bug fix for a device with multiple interfaces.
25573         + commit 7a32f87cccddb40521bfdd4eb2d0dc9c88fb3fe5
25574         * scd/ccid-driver.c (scan_or_find_usb_device): Use IFC_NO when
25575         accessing interface information.
25576
25577 2016-03-04  Justus Winter  <justus@g10code.com>
25578
25579         build: Make libusb a hard requirement if the ccid driver is requested.
25580         + commit e997552161b2dd8aabf350adee14e208e1545aef
25581         * configure.ac: Print an error message and die if the internal ccid
25582         driver is requested but no suitable libusb is found.
25583
25584         g10: Drop superfluous declaration.
25585         + commit 1e4b7823008daea1a22a6f0f9b379fdec37a4cd4
25586         * g10/main.h (disable_core_dumps): Drop declaration.
25587
25588         g10: Guard code against errors.
25589         + commit 40f6529ceeea806fc011135a9fa3a3590a9534ac
25590         * g10/keygen.c (do_generate_keypair): Check for errors, in which case
25591         'pri_psk' is NULL.
25592
25593 2016-03-03  Justus Winter  <justus@g10code.com>
25594
25595         dirmngr: Add more missing CFLAGS.
25596         + commit 9f0ba5089e664447c36cee3d9249f95e4ea39957
25597         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
25598         'GCRYPT_CFLAGS'.
25599         (t_dns_stuff_CFLAGS): Likewise.
25600
25601         tests/openpgp: Skip gpgtar test if it has not been built.
25602         + commit a883d4c0f8125e809c144ec69e76c9f522102d8f
25603         * tests/openpgp/gpgtar.test: Check if executable exists.
25604
25605 2016-03-02  Neal H. Walfield  <neal@g10code.com>
25606
25607         gpg: Add new program gpgcompose.
25608         + commit d040628ddf2c09ddc9581ff365680a568ad24278
25609         * g10/packet.h: Include "util.h".
25610         * g10/encrypt.c (encrypt_seskey): Don't mark as static.
25611         * g10/gpgcompose.c: New file.
25612         * g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose.
25613         (gpg2_SOURCES): Split everything but gpg.c into...
25614         (gpg_sources): ... this new variable.
25615         (gpgcompose_SOURCES): New variable.
25616         (gpgcompose_LDADD): Likewise.
25617         (gpgcompose_LDFLAGS): Likewise.
25618
25619         gpg: More robustly detect valid non-armored OpenPGP messages.
25620         + commit 605276ef8cd449bfd574ae6c498fa5d7d265c5c7
25621         * g10/armor.c (is_armored): More robustly detect valid non-armored
25622         OpenPGP messages.
25623
25624         common: Provide a function for mapping packet types to strings.
25625         + commit 24e0f1d56e6f56e7fb52b5c6bdb100131e12dfe3
25626         * common/openpgpdefs.h (pkttype_str): New function.
25627
25628         gpg: Rename pop_filter to iobuf_pop_filter and export it.
25629         + commit 1463f9b9624fae97cc89df3aa4546655ee893f7c
25630         * common/iobuf.c (pop_filter): Rename from this...
25631         (iobuf_pop_filter): ... to this.  Don't mark it as static.
25632
25633         gpg: Split write_pubkey_enc_from_list.
25634         + commit 7eac4942b537c4b3710d34e6adb9c5d36338f38b
25635         * g10/encrypt.c (write_pubkey_enc_from_list): Split the body of this
25636         function out into...
25637         (write_pubkey_enc): ... this new function.
25638
25639         gpg: Allow the caller to write the contents of a plaintext packet.
25640         + commit 2fdb950471bd36f046672254ff26ca94797cc9f1
25641         * g10/build-packet.c (do_plaintext): Change the semantics such that if
25642         PT->BUF is NULL, it is the caller's responsibility to write the
25643         content (and disable partial body length mode, if appropriate).
25644
25645         gpg: Add a new function for creating binary notations.
25646         + commit 1a624586149f9e34206e5d5e1ba0b7d2b7004c80
25647         * g10/build-packet.c (blob_to_notation): New function.
25648
25649         gpg: Refactor the printing of binary notations.
25650         + commit fd2d00ccf558b1ac1184967d8702ef01cd60bf60
25651         * g10/build-packet.c (sig_to_notation): Break printing of binary
25652         notations into...
25653         (notation_value_to_human_readable_string): ... this new function.
25654         Provide a small preview of the binary data substituting non-printable
25655         characters with '?'.
25656
25657 2016-03-02  Uldis Anšmits  <uldis.ansmits@tieto.com>
25658
25659         tests/openpgp: Make tests more portable.
25660         + commit 1cdb744d91ab33563fc0b3156fb05694caa55278
25661         * tests/openpgp/default-key.test: Avoid 'grep -q'.
25662         * tests/openpgp/gpgtar.test: Avoid 'grep -qe' and 'diff -q'.
25663         * tests/openpgp/use-exact-key.test: Avoid 'grep -q'.
25664
25665 2016-03-02  Justus Winter  <justus@g10code.com>
25666
25667         common: Consolidate Assuan server argument handling.
25668         + commit e77c85577d1bdd77ad3b81907145fd68f2653c01
25669         * common/Makefile.am (common_sources): Add new files.
25670         * common/server-help.c: New file.
25671         * common/server-help.h: Likewise.
25672         * agent/command.c: Drop argument handling primitives in favor of using
25673         the consolidated ones.
25674         * dirmngr/server.c: Likewise.
25675         * g10/server.c: Likewise.
25676         * g13/server.c: Likewise.
25677         * scd/command.c: Likewise.
25678         * sm/server.c: Likewise.
25679
25680 2016-03-01  Justus Winter  <justus@g10code.com>
25681
25682         dirmngr: Add missing CFLAGS.
25683         + commit 9a1778abcae0a7afe33be8e02b6d9a909463cd54
25684         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
25685         'GPG_ERROR_CFLAGS'.
25686         (t_dns_stuff_CFLAGS): Likewise.
25687
25688         tools: Drop superfluous include.
25689         + commit 3a1d142f9b71721a631cf2037665e9def60aa384
25690         * tools/gpgtar.c: Do not include unused 'npth.h'.
25691
25692 2016-02-26  Werner Koch  <wk@gnupg.org>
25693
25694         gpg: Prettify a 2 octet hex output.
25695         + commit 2de0d41219a522e01f050d475b3ddecb9173fc7d
25696         * g10/sig-check.c (check_key_signature2): Wrap line and use %02x.
25697
25698 2016-02-25  Neal H. Walfield  <neal@g10code.com>
25699
25700         gpg: Show debugging info if a sig with an unsupported sig class is used.
25701         + commit 87515e39295e4b7eaec1641c38e1ac32e8d39a91
25702         * g10/sig-check.c (check_key_signature2): If SIG->CLASS is
25703         unsupported, show some debugging information.  Don't use BUG to fail.
25704         Just return GPG_ERR_BAD_SIGNATURE.
25705
25706         gpg: More carefully encode a packet's length.
25707         + commit 960f5e26f2cda3ac6e6b30548fa808a690c39ffc
25708         * g10/build-packet.c (write_header2): Make sure the length bits are
25709         cleared.  Fail if HDRLEN is set and the specified length can't be
25710         encoded in the available space.
25711
25712         gpg: Avoid directly twiddling bits.
25713         + commit 105a5629c7e938ec7b3c9c338ebe7bdfee4cfdad
25714         * g10/build-packet.c (do_plaintext): Use ctb_new_format_p to check the
25715         packet's format.
25716         (write_header2): Likewise.
25717
25718         gpg: Add some asserts.
25719         + commit c9636a1acc952eb8e1355089bc2e229dece98165
25720         * g10/build-packet.c (ctb_new_format_p): New function.
25721         (ctb_pkttype): New function.
25722         (do_user_id): Add some asserts.
25723         (do_key): Likewise.
25724         (do_symkey_enc): Likewise.
25725         (do_pubkey_enc): Likewise.
25726         (do_plaintext): Likewise.
25727         (do_encrypted): Likewise.
25728         (do_encrypted_mdc): Likewise.
25729         (do_compressed): Likewise.
25730         (do_signature): Likewise.
25731         (do_signature): Likewise.
25732         (write_header2): Likewise.
25733
25734         gpg: Avoid an unnecessary copy.
25735         + commit 512bc72e1f8544341529174142273d857f45540c
25736         * g10/build-packet.c (sig_to_notation): Avoid an unnecessary copy of
25737         the data: the size of the packet is fixed.
25738
25739 2016-02-23  Neal H. Walfield  <neal@g10code.com>
25740
25741         common: Reduce buffer size.
25742         + commit 75861b663bbb37214143c2ff7b1b4d1d10ba2657
25743         * common/iobuf.c (iobuf_copy): Change buffer size from 1 MB to 32 KB.
25744
25745         common: Improve a function's documentation and comments.
25746         + commit 14d27b2cadf9b0bb413f2b8bad2d81c1d370c2e7
25747         * common/iobuf.c (iobuf_set_partial_body_length_mode): Fix
25748         documentation and comment.  Add an assert.
25749
25750         common: Add log_assert.
25751         + commit f57a91afb69c58f9d8d9632801650f28c7dc1e0d
25752         * common/logging.h (log_assert): New macro.
25753
25754         gpg: Use higher-level functions.
25755         + commit 33ac735a781325c4d47cdf6216813866ab93562e
25756         * g10/build-packet.c (do_symkey_enc): Use iobuf_write instead of
25757         iobuf_put in a loop.  Use iobuf_copy instead of iobuf_read and
25758         iobuf_write in a loop.  Move the memory wiping from here...
25759         * common/iobuf.c (iobuf_copy): ... to here.
25760
25761         common: Check for an error before reading.
25762         + commit 8066f8a3470f9d2f3682a28641a7b09eca29a105
25763         * common/iobuf.c (iobuf_copy): If DEST has a pending error, don't
25764         start copying.
25765
25766         common: More accurately name function.
25767         + commit 903466e124841cb29f518afa6b7706d490737ac3
25768         * common/iobuf.c (iobuf_set_partial_block_mode): Rename from this...
25769         (iobuf_set_partial_body_length_mode): ... to this.  Update callers.
25770
25771 2016-02-23  Werner Koch  <wk@gnupg.org>
25772
25773         g13: Add commands --suspend and --remove.
25774         + commit f7968db30b0e0ccae038e354568accb0a05d877c
25775         * g13/g13.c (aSuspend, aResume): New.
25776         (opts): Add commands --suspend and --resume.
25777         (main): Implement dummy command aUmount.  Implement commands aResume
25778         and aSuspend.
25779         * g13/sh-cmd.c (cmd_suspend): New.
25780         (cmd_resume): New.
25781         (register_commands): Add commands RESUME and SUSPEND.
25782         * g13/server.c (cmd_suspend): New.
25783         (cmd_resume): New.
25784         (register_commands): Add commands RESUME and SUSPEND.
25785         * g13/be-dmcrypt.c (be_dmcrypt_suspend_container): New.
25786         (be_dmcrypt_resume_container): New.
25787         * g13/backend.c (be_suspend_container): New.
25788         (be_resume_container): New.
25789         * g13/suspend.c, g13/suspend.h: New.
25790         * g13/mount.c (parse_header, read_keyblob_prefix, read_keyblob)
25791         (decrypt_keyblob, g13_is_container): Move to ...
25792         * g13/keyblob.c: new file.
25793         (keyblob_read): Rename to g13_keyblob_read and make global.
25794         (keyblob_decrypt): Rename to g13_keyblob_decrypt and make global.
25795         * g13/sh-dmcrypt.c (check_blockdev): Add arg expect_busy.
25796         (sh_dmcrypt_suspend_container): New.
25797         (sh_dmcrypt_resume_container): New.
25798         * g13/call-syshelp.c (call_syshelp_run_suspend): New.
25799         (call_syshelp_run_resume): New.
25800
25801         g13: Run mount after dmsetup.
25802         + commit f26867928c451443769fecc41c3283e077e8c49f
25803         * g13/g13-syshelp.c (main): Reject userids with a slash.
25804         * g13/sh-dmcrypt.c (sh_dmcrypt_mount_container): Run mount if a
25805         mountpoint is known.
25806
25807 2016-02-23  Justus Winter  <justus@g10code.com>
25808
25809         tests/openpgp: Qualify executables with extension.
25810         + commit ede0061febe5b2edde6a1a79d599e3c7c0faed5a
25811         * tests/openpgp/Makefile.am (required_pgms): Qualify executables with
25812         '$EXEEXT'.
25813
25814         tests/openpgp: Reimplement 'pinentry.sh' in c.
25815         + commit 01dcc2cf2f2f00235ffa7d0718ecb468370980cc
25816         * tests/openpgp/Makefile.am: Build new program.
25817         * tests/openpgp/defs.inc: Use the new program.
25818         * tests/openpgp/fake-pinentry.c: New file.
25819
25820         tests/openpgp: Avoid dependency on source files.
25821         + commit 785a7f463ec4e937304ce1263c5e6a46e8079137
25822         * tests/openpgp/plain-largeo.asc: New file.
25823         * tests/openpgp/version.test: Dearmor the new file instead of relying
25824         on the source being present.
25825
25826         tests/openpgp: Fix file removal.
25827         + commit 629284120ff359b98a178b6cddf0e005e5f4db1a
25828         * tests/openpgp/version.test: Fix file removal.
25829
25830         common/exechelp: Provide a way to wait for multiple processes.
25831         + commit 5ba4f6047b84e4cfdb3e6bc88e574ca7a455da81
25832         * common/exechelp-posix.c (gnupg_wait_process): Generalize to
25833         'gnupg_wait_processes'.
25834         * common/exechelp-w32.c (gnupg_wait_process): Likewise.
25835         * common/exechelp-w32ce.c (gnupg_wait_process): New function stub.
25836         * common/exechelp.h (gnupg_wait_process): New prototype.
25837
25838         common/exechelp: Add general pipe function.
25839         + commit 9f4a8d4ea173b4b4cb4d4f06b4004d43e2f4b97a
25840         * common/exechelp-posix.c (gnupg_create_pipe): New function.
25841         * common/exechelp-w32.c (INHERIT_{READ,WRITE,BOTH}): New macros.
25842         (create_inheritable_pipe): Generalize so that both ends can be
25843         inherited.
25844         (do_create_pipe): Rename argument accordingly.
25845         (gnupg_create_{in,out}bound_pipe): Use new flags.
25846         (gnupg_create_pipe): New function.
25847         (gnupg_spawn_process): Use new flags.
25848         * common/exechelp-w32ce.c (gnupg_create_pipe): New stub.
25849         * common/exechelp.h (gnupg_create_pipe): New prototype.
25850
25851         common/exechelp: Mute the Windows version.
25852         + commit 54acc87c1e0b100accbfd02cfce59a897f2f0ce1
25853         * common/exechelp-w32.c (gnupg_wait_process): Do not print an error if
25854         the exit code can be returned.  This makes the Windows version behave
25855         like the POSIX version.
25856
25857         common/exechelp: Avoid magic numbers.
25858         + commit 709e2a7e9a3197e8ded4be0b05c138e8d5adbca6
25859         * common/exechelp-w32.c (do_create_pipe): Use symbolic names.
25860
25861         common/exechelp: Disable debugging by default.
25862         + commit 5d8f7b16c8490d6951772fa98c1f075a952cc571
25863         * common/exechelp-w32.c (DEBUG_W32_SPAWN): Set to 0.
25864
25865         common/exechelp: Fix handle leak.
25866         + commit dd670366d7aedb07e9420d1f8575197acfae1914
25867         * common/exechelp-w32.c (gnupg_spawn_process_detached): Close process
25868         handle.
25869
25870         common/exechelp: Fix opening the 'nul' device.
25871         + commit 8857590006266da200427f2d4f9e8c27fbc89ed9
25872         * common/exechelp-w32.c (gnupg_spawn_process): Fix opening the 'nul'
25873         device.
25874
25875         common/exechelp: Fix error handling.
25876         + commit f5a4b6a3a39a2b78d33769184d6133d5e256e02c
25877         * common/exechelp-w32.c (gnupg_spawn_process): Close the right handle.
25878
25879         common/exechelp: Fix pipe creation.
25880         + commit b0125ae9850973b89010517b1dbce04125a51d51
25881         * common/exechelp-w32.c (gnupg_spawn_process): Fix the creation of the
25882         input pipe.
25883
25884         tools/mk-tdata: Fix data generation on Windows.
25885         + commit 661ba477e01b796db161fa612b46c353393c6b10
25886         * tools/mk-tdata.c (main): Set stdout to binary mode to avoid newline
25887         conversion.
25888
25889 2016-02-19  Neal H. Walfield  <neal@g10code.com>
25890
25891         gpg: Systematically detect and fix signatures that are out of order.
25892         + commit 2d1d795481bc011447284f8ce0a3ae96a08daf17
25893         * g10/keyedit.c (sig_comparison): New function.
25894         (fix_key_signature_order): Merge functionality into...
25895         (check_all_keysigs): ... this function.  Rewrite to eliminate
25896         duplicates and use a systematic approach to detecting and moving
25897         signatures that are out of order instead of a heuristic.
25898         (fix_keyblock): Don't call fix_key_signature_order.  Call
25899         check_all_keysigs instead after collapsing the uids.
25900
25901         gpg: Split check_key_signature2.
25902         + commit 44cdb9d73f1a0b7d2c8483a119b9c4d6caabc1ec
25903         * g10/sig-check.c (hash_uid_node): Rename from this...
25904         (hash_uid_packet): ... to this.  Take a PKT_user_id instead of a
25905         KBNODE.
25906         (check_key_signature2): Split the basic signature checking
25907         functionality into...
25908         (check_signature_over_key_or_uid): ... this new function.
25909
25910         gpg: Split print_and_check_one_sig.
25911         + commit 5fbd80579aea0f75ca1d2700515c5b8747a75c7d
25912         * g10/keyedit.c (print_and_check_one_sig): Split the print
25913         functionality into...
25914         (print_one_sig): ... this new function.
25915
25916         gpg: Split the function check_signature_end.
25917         + commit ac5aea95455372145f3f06df2b4c1584d759d660
25918         * g10/sig-check.c (check_signature_end): Break the basic signature
25919         check into...
25920         (check_signature_end_simple): ... this new function.
25921
25922         gpg: Use format_keyid rather than manually formatting the keyid.
25923         + commit 10671c3a4c18ea26035a5819a9f2b8fd6c7e41ea
25924         * g10/keyedit.c (menu_addrevoker): Use format_keyid rather than
25925         manually formatting the keyid.
25926         * g10/keygen.c (card_write_key_to_backup_file): Likewise.
25927
25928         gpg: Initialize the primary key when generating a key.
25929         + commit bf9d1248c80205795e26156f67aff0b3f796cfce
25930         * g10/keygen.c (do_generate_keypair): Initialize
25931         pri_psk->flags.primary, pri_psk->keyid and pri_psk->main_keyid.
25932
25933         gpg: Add accessor & utility functions for pk->keyid and pk->main_keyid.
25934         + commit c45633a571bf663bc7f3610fc481acded6acfc19
25935         * g10/keydb.h (keyid_cmp): New function.
25936         * g10/keyid.c (pk_keyid): New function.
25937         (pk_main_keyid): New function.
25938         (keyid_copy): New function.
25939         (pk_keyid_str): New function.
25940         * g10/packet.h (PKT_public_key): Update comments for main_keyid and
25941         keyid.
25942
25943 2016-02-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
25944
25945         gpgparsemail: Allow weirdly-mixed pkcs7 signatures.
25946         + commit 7e7f35a2d7d40267a4dd30791df77420efeebfa7
25947         * tools/gpgparsemail.c: Add and check info->signing_protocol_2.
25948
25949         gpg: Clean up dangling agent_open and agent_closed declarations.
25950         + commit 813df2fe6656e55bea4d0be07cc964a140218412
25951         * g10/keydb.h: Remove agent_open, agent_close declarations/
25952         * g10/migrate.c: #include <unistd.h> for access()
25953
25954 2016-02-16  Werner Koch  <wk@gnupg.org>
25955
25956         w32: Make scdaemon build again due to libusb problem.
25957         + commit e1ceff16765b0342531709cf97d03ef0158c29d5
25958         * configure.ac: Add hack to disable libusb for Windows.  Also use
25959         $host instead of $target in the switch
25960          --
25961
25962         The new test for libusb does not support cross-compiling.  As a quick
25963         workaround we disable libusb for Windows because we can't use it anyway.
25964
25965         w32: Do not error out if gpgconf is not installed.
25966         + commit 44b02e1beb4f38f26551d932827d5317fddd27c2
25967         * common/homedir.c (check_portable_app): Remove error message.
25968
25969 2016-02-16  Neal H. Walfield  <neal@g10code.com>
25970
25971         gpg: Make ASCII armor decoding more robust to encoding errors.
25972         + commit 2f02ed75a9671a7aae36968d5a1618f71b491325
25973         * g10/armor.c (radix64_read): If the = is followed by the string "3D",
25974         check if the following four characters are valid radix 64 and are
25975         followed by a new line.  If so, warn and ignore the '3D'.
25976
25977 2016-02-16  Werner Koch  <wk@gnupg.org>
25978
25979         doc: Add a gnupg-module-overview picture.
25980         + commit a1c11283af759c1045a8bb75815db325f415ded4
25981         * doc/gnupg-module-overview.svg: New.
25982         * doc/debugging.texi (Component interaction): New.
25983         * doc/Makefile.am (EXTRA_DIST): Add PNG and PDF versions of
25984         gnupg-module-overview.svg.  Remove two eps files.
25985         (BUILT_SOURCES): Add gnupg-module-overview.pdf and .png.  Remove
25986         gnupg-card-architecture.epsl
25987         (gnupg_TEXINFOS): Add gnupg-module-overview.svg
25988         (gnupg.dvi): New.
25989         (DISTCLEANFILES): Remove build eps files.
25990
25991 2016-02-15  NIIBE Yutaka  <gniibe@fsij.org>
25992
25993         common, g10: Fix indentation to silence GCC-6.
25994         + commit ea9cfcfbf76de232221f31787c53d5f46361a9f0
25995         * common/iobuf.c (iobuf_ioctl): Fix.
25996         * g10/encrypt.c (encrypt_filter): Likewise.
25997         * g10/keyring.c (prepare_search): Likewise.
25998
25999         dirmngr: fix for memory alignment.
26000         + commit 6fbe12a51e8fe2649ffe5a8a02aa93026a8f02cd
26001         * dirmngr/dns-stuff.c (get_dns_cert): Cast through void *.
26002         (getsrv, get_dns_cname): Make sure it's aligned for HEADER.
26003
26004 2016-02-14  Werner Koch  <wk@gnupg.org>
26005
26006         gpg: Add hidden key-edit subcommand "change-usage".
26007         + commit 9b28b82e7c40d1eacc446d5932cd613c56378ed8
26008         * g10/keyedit.c (cmdCHANGEUSAGE): New.
26009         (cmds): Add command "change-usage".
26010         (keyedit_menu): Handle that command.
26011         (menu_changeusage): New.
26012         * g10/keygen.c (keygen_add_key_flags): New.
26013         (ask_key_flags): Add optional arg current.
26014
26015 2016-02-14  Neal H. Walfield  <neal@g10code.com>
26016
26017         gpg: Improve API documentation.
26018         + commit 9663b088480cef6734a3c5892d5ddbbd60ecc1a4
26019         * g10/seskey.c (make_session_key): Improve documentation.
26020         (encode_session_key): Improve documentation.
26021         * g10/encrypt.c (encrypt_seskey): Remove gratuitous initialization.
26022         * g10/dek.h (DEK): Improve documenation.
26023
26024         gpg: Fix calc_header_length when LEN is 0 and improve documentation.
26025         + commit 5cdde08ea869ef02111f618ad782d392a296eb7f
26026         * g10/build-packet.c (calc_header_length): Return the correct haeder
26027         size when LEN is 0.  Fix documentation.
26028
26029         gpg: Fix format_keyid when dynamically allocating the buffer.
26030         + commit c0268c449d0f3d23be5ec7b92fe92e7e078166cf
26031         * g10/keyid.c (format_keyid): Return a char *, not a const char *.  If
26032         BUFFER is NULL, then set LEN to the static buffer's size.
26033
26034         common: Fix comment.
26035         + commit ad43dc6cfc2b610a4e34fe55811bd937f9c3238b
26036         * common/iobuf.c (iobuf_flush_temp): Fix comment.
26037
26038 2016-02-13  Werner Koch  <wk@gnupg.org>
26039
26040         g13: Require a confirmation before g13 is used for DM-Crypt.
26041         + commit 86f3bb144ad75461eb9b7ac1e59046ac75efccac
26042         * g13/g13-syshelp.c (g13_syshelp_i_know_what_i_am_doing):
26043         * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Call it.
26044         (sh_dmcrypt_mount_container): Call it.
26045
26046         g13: Second chunk of code to support dm-crypt.
26047         + commit b0e6ab1109d05fc664f46e17d721fe9b01d38115
26048         * g13/be-dmcrypt.c, g13/be-dmcrypt.h: New.
26049         * g13/Makefile.am (g13_SOURCES): Add them.
26050         * g13/backend.c: Include be-dmcrypt.h and call-syshelp.h.
26051         (no_such_backend): Rename to _no_such_backend and provide replacement
26052         macro.
26053         (be_is_supported_conttype): Support DM-Crypt.
26054         (be_take_lock_for_create): Call set_segvice for DM-Crypt.
26055         (be_create_new_keys): Make it a dummy for DM-Crypt.
26056         (be_create_container): Call be_dmcrypt_create_container.
26057         (be_mount_container): call be_dmcrypt_mount_container.
26058         * g13/g13-syshelp.c (main): Enable verbose mode.
26059         * g13/g13tuple.c (get_tupledesc_data): New.
26060         * g13/g13tuple.h (unref_tupledesc): New.
26061         * g13/g13.h (server_control_): Add field "recipients".
26062         * g13/g13.c (main): Fix setting of recipients via cmdline.
26063         (g13_deinit_default_ctrl): Release recipients list.
26064         (g13_request_shutdown): New.  Replace all direct update of
26065         shutdown_pending by calls this function.
26066         * g13/server.c (server_local_s): Remove field recipients which is now
26067         part of CTRL.
26068         (reset_notify, cmd_recipient, cmd_create): Adjust for this change.
26069         * g13/create.c (encrypt_keyblob): Rename to g13_encrypt_keyblob.
26070         (g13_create_container): Support DM-Crypt.
26071         * g13/mount.c (parse_header): Allow for meta data copies.
26072         (g13_mount_container): Support DM-Crypt.
26073         * g13/sh-cmd.c (cmd_create): Make it work.
26074         (cmd_mount): New.
26075         * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Make it work.
26076         (sh_dmcrypt_mount_container): New.
26077
26078         g13: Improve dump_keyblob.
26079         + commit 13f745b50dc7031755faadb2d3476a6b6aafc739
26080         * g13/g13tuple.c: Include keyblob.h.
26081         (find_tuple_uint): Factor code out to ...
26082         (convert_uint): new.
26083         (all_printable): New.
26084         * g13/mount.c (dump_keyblob: Move and rename to ...
26085         * g13/g13tuple.c (dump_tupledesc): here.  Revamp and pretyy print uint
26086         values.
26087
26088         g13: Define 3 new tags.
26089         + commit 59fc3507d18072833559f227ecab8aa00cad9466
26090         * g13/keyblob.h (KEYBLOB_TAG_CONT_NSEC): New.
26091         (KEYBLOB_TAG_ENC_NSEC): New.
26092         (KEYBLOB_TAG_ENC_OFF): New.
26093
26094         g13: Rename utils.c to g13tuple.c.
26095         + commit 82d12156ef5f948d44934ed44d79d24cc9e94366
26096         * g13/utils.c: Rename to g13tuple.c.
26097         * g13/utils.h: Rename to g13tuple.h.  Change all users.
26098         * g13/Makefile.am: Adjust accordingly
26099
26100         g13: Add functions to handle uint in a keyblob.
26101         + commit 4f152f3276b6d40d2568a27e74903dd18b41d752
26102         * g13/utils.c (append_tuple_uint): New.
26103         (find_tuple_uint): New.
26104         * g13/t-utils.c: New.
26105         * g13/Makefile.am (noinst_PROGRAMS, TESTS): New.
26106         (module_tests, t_common_ldadd): New.
26107         (t_utils_SOURCES, t_utils_LDADD): New.
26108
26109         g13: Re-factor high level create code.
26110         + commit dc1dbc43a6bfb2f3e6a1cc2ca089e0318b3af0ed
26111         * g13/create.c (g13_create_container): Factor some code out to ...
26112         * g13/backend.c (be_take_lock_for_create): new.
26113
26114         g13: Return an error for non-existing device.
26115         + commit 3087197008d2b12bf9f0d7d1f2aca500db816e7c
26116         * g13/sh-cmd.c (cmd_device): Set ERR.
26117
26118         g13: Fix releasing of a syshelp context.
26119         + commit 6390beca54f55e8d36ff767b99ae9ff68b15f10e
26120         * g13/call-syshelp.c (call_syshelp_release): Allow a NULL arg.
26121
26122         g13: Switch over to common/exectool.c.
26123         + commit c5d7045dafcfb569c11c90c04ea7a75328c80084
26124         * g13/sh-exectool.c: Remove.  It has been replaced by common/exectool.c.
26125         * g13/Makefile.am (g13_syshelp_SOURCES): Remove sh-exectool.c
26126         * g13/sh-blockdev.c: Include exectool.h.  Change sh_exec_tool to
26127         gnupg_exec-tool.
26128         * g13/sh-dmcrypt.c: Ditto.
26129
26130         common: Make gnupg_exec_tool conform to spec.
26131         + commit d19d6e1856c9a1acbf48e8b2e39b3d9171aa9f7f
26132         * common/exectool.c (gnupg_exec_tool): Allocate extra byte.  Allow
26133         zero length read.  Append hidden byte.  Release memory on error.
26134
26135         g13: First chunk of code to support dm-crypt.
26136         + commit 81494fd30d3815502247a721f50d9eadf86a73fa
26137         * g13/call-syshelp.c, g13/call-syshelp.h: New.
26138         * g13/g13-syshelp.c, g13/g13-syshelp.h: New.
26139         * g13/sh-cmd.c: New.
26140         * g13/sh-blockdev.c: New.
26141         * g13/sh-exectool.c: New.
26142         * g13/sh-dmcrypt.c: New.
26143         * g13/Makefile.am (sbin_PROGRAMS): Add g13-syshelp.c
26144         (g13_syshelp_SOURCES): New.
26145         (g13_syshelp_LDADD): New.
26146
26147         * g13/g13.c (opts): Add option --type.
26148         (g13_deinit_default_ctrl): New.
26149         (main): Implement that option.  Call g13_deinit_default_ctrl.
26150         * g13/g13.h (struct call_syshelp_s): New declaration.
26151         (server_control_s): Add field syshelp_local.
26152         * g13/keyblob.h (KEYBLOB_TAG_CREATED): New.
26153         (KEYBLOB_TAG_ALGOSTR): New.
26154         (KEYBLOB_TAG_HDRCOPY): New.
26155         * g13/backend.c (be_parse_conttype_name): New.
26156         (be_get_detached_name): Add CONTTYPE_DM_CRYPT.
26157
26158         tests: Remove some harmless warnings in regression tests.
26159         + commit d711f5c7697cd4bc5dc6d9fd01706cabc771dad2
26160         * tests/openpgp/gpg-agent.conf.tmpl: Remove --use-standard-socket.
26161
26162 2016-02-12  Neal H. Walfield  <neal@g10code.com>
26163
26164         common: Change simple_query to ignore status messages.
26165         + commit acac103ba5772ae738ce5409d17feab80596cde6
26166         * common/simple-pwquery.c (simple_query): Ignore status messages.
26167
26168 2016-02-12  NIIBE Yutaka  <gniibe@fsij.org>
26169
26170         g10: Make sure to have the directory for trustdb.
26171         + commit d9f9b3be036747c9f55060aed47896f951bfb853
26172         * g10/tdbio.c (tdbio_set_dbname): Return earlier if !CREATE.  Check
26173         the directory and create it if none before calling take_write_lock.
26174
26175 2016-02-02  Neal H. Walfield  <neal@g10code.com>
26176
26177         doc: Note that rngd can also be used to quickly generate insecure keys.
26178         + commit 75311cfe18071b94c66121a9785b133b6df345a3
26179         * doc/gpg-agent.texi (Agent Options): Add comment to the description
26180         of --debug-quick-random that rngd can also be used to quickly generate
26181         key.
26182
26183 2016-01-27  Werner Koch  <wk@gnupg.org>
26184
26185         scd: Fix size_t/int mismatch in libusb.
26186         + commit 3d952a2fe5da9d84c20d3debdcc1e425b08781c6
26187         * scd/ccid-driver.c (bulk_in, abort_cmd, ccid_poll): Change msglen to
26188         int.
26189
26190         scd: Fix detection of libusb.
26191         + commit 1b90b52a56b4f808ad29a7ef79aeafc03c7424b4
26192         * configure.ac (HAVE_LIBUSB): Clear if no header file was found.
26193         (LIBUSB_LIBS): Ditto.
26194
26195         dirmngr: Build fix for FreeBSD (EAI macros)
26196         + commit 4d67144142f04184b835e50314eb21b882b9e00a
26197         * dirmngr/dns-stuff.c (map_eai_to_gpg_error): Map EAI_NODATA and
26198         EAI_ADDRFAMILY only if defined.
26199
26200 2016-01-27  NIIBE Yutaka  <gniibe@fsij.org>
26201
26202         scd: Migrate to new API of libusb 1.0.
26203         + commit d0d97089706286fafd3c8ff56f3b5bf7ac07c6e0
26204         * configure.ac (LIBUSB_CPPFLAGS): New.
26205         * scd/Makefile.am (AM_CPPFLAGS): Add LIBUSB_CPPFLAGS.
26206         * scd/ccid-driver.c: Use libusb 1.0 API.
26207
26208 2016-01-26  Werner Koch  <wk@gnupg.org>
26209
26210         Release 2.1.11.
26211         + commit e9e5e83ec14459c2fc9060c54fc8e7381b541acd
26212
26213
26214 2016-01-26  Andre Heinecke  <aheinecke@intevation.de>
26215
26216         gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32.
26217         + commit 3e50236d4ecc3601b2641bf4273a0ff64bb5fdc4
26218         * common/utf8conv.c (wchar_to_utf8): Factor code out to ...
26219         (wchar_to_cp): new.
26220         (utf8_to_wchar): Factor code out to ...
26221         (cp_to_wchar): new.
26222         (wchar_to_native): New.
26223         (native_to_wchar): New.
26224         * tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar.
26225         (scan_directory): Use wchar_to_native.
26226
26227 2016-01-26  NIIBE Yutaka  <gniibe@fsij.org>
26228
26229         g10: Fix segfault on unsupported curve.
26230         + commit b8bb16c6c08d3c2947f1ff67419b36eb203c5c1a
26231         * g10/call-agent.c (learn_status_cb): Don't use NULL for strcmp.
26232
26233         sm: small fix for GCC 6.
26234         + commit d33a34004bef028068538f099c32a0e292a004c3
26235         * sm/export.c (insert_duptable): Use unsigned 0.
26236
26237 2016-01-25  Werner Koch  <wk@gnupg.org>
26238             Daiki Ueno  <ueno@gnu.org>
26239
26240         gpg: Print PROGRESS status lines during key generation.
26241         + commit fbe1cf67aadc5a33cf815ddbcfc9669e43caa123
26242         * g10/call-agent.c (cache_nonce_status_cb): Rewrite by using
26243         has_leading_keyword.  Handle PROGRESS lines.
26244
26245 2016-01-25  Werner Koch  <wk@gnupg.org>
26246
26247         agent: Send PROGRESS status lines to the client.
26248         + commit ee87c653bf4b495714e8e6b024d0a8ace3a33452
26249         * agent/gpg-agent.c (struct progress_dispatch_s): New.
26250         (progress_dispatch_list): New.
26251         (main): Register libgcrypt pogress handler.
26252         (agent_libgcrypt_progress_cb): New.
26253         (agent_set_progress_cb): New.
26254         (unregister_progress_cb): New.
26255         (agent_deinit_default_ctrl): Call unregister.
26256         * agent/command.c (progress_cb): New.
26257         (start_command_handler): Register progress callback.
26258
26259         speedo: Allow use of SHA-256 checksums.
26260         + commit 039a55716b8abd22ce23a96dce34cf2dc4be1862
26261         * build-aux/getswdb.sh: Add option --find-sha256sum.
26262         * build-aux/speedo.mk (libgpg_error_sha2): New var.  Also for all
26263         other packages.
26264         (SHA2SUM): New.
26265         (SETVARS, SETVARS_W64): Prefer sha256sum over sha1sum.
26266         (installer-from-source): Create swdb fragment.
26267
26268 2016-01-22  Werner Koch  <wk@gnupg.org>
26269
26270         dirmngr: Indicate that serial numbers are hexadecimal.
26271         + commit 12c665b36cdc4b7189549698fc4cc1b3523b18f5
26272         * dirmngr/misc.c (hexify_data): Add arg with_prefix.  Adjust all
26273         callers.
26274         * dirmngr/crlcache.c (cache_isvalid): Print "0x" in front of the S/N.
26275
26276         dirmngr: Provide the keyserver pool name even if there is no CNAME.
26277         + commit 77bceb2902dd489443073d91836ea54376c60bf6
26278         * dirmngr/ks-engine-hkp.c (map_host): Fix setting of r_poolname.
26279
26280 2016-01-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
26281             wk@gnupg.org
26282
26283         dirmngr: Use sks-keyservers CA by default for the hkps pool.
26284         + commit afb8696126ff0babaab23e884ff5da008281e3b7
26285         * dirmngr/Makefile.am (dist_pkgdata_DATA): Add sks-keyservers.netCA.pem.
26286         * dirmngr/http.c (http_session_new): Add optional arg
26287         intended_hostname and set a default cert.
26288         * dirmngr/ks-engine-hkp.c (send_request): Pass httphost to
26289         http_session_new.
26290
26291 2016-01-22  Werner Koch  <wk@gnupg.org>
26292
26293         gpg: Allow new user ids with only the mail address.
26294         + commit fc0c71dfe5ea8f1c683101948c23f5d2064ee4cd
26295         * g10/keygen.c (ask_user_id): Allow empty name.
26296
26297 2016-01-21  Werner Koch  <wk@gnupg.org>
26298
26299         gpg: Improve header text of the auto-created revocations.
26300         + commit bb99b40bd1e624f58ca806ca16dc73d4d594a30a
26301         * g10/revoke.c (gen_standard_revoke): Improve header text for the
26302         file.  Add info output.
26303
26304         gpg: Make --auto-key-retrieve work with dirmngr configured server.
26305         + commit 09117e769a093467cb47154f36d7dda613313e33
26306         * g10/call-dirmngr.c (gpg_dirmngr_ks_list): Make R_KEYSERVER optional.
26307         * g10/keyserver.c (keyserver_any_configured): New.
26308         (keyserver_put): Remove arg keyserver because this will always receive
26309         opt.keyserver which is anyway used when connecting dirmngr.  Do not
26310         check opt.keyserver.
26311         (keyserver_import_cert): Replace opt.keyserver by
26312         keyserver_any_configured.
26313         * g10/mainproc.c (check_sig_and_print): Ditto.
26314         * g10/import.c (revocation_present): Ditto.
26315         * g10/getkey.c (get_pubkey_byname): Ditto.
26316         * g10/gpgv.c (keyserver_any_configured): Add stub.
26317         * g10/test-stubs.c (keyserver_any_configured): Add stub.
26318
26319 2016-01-20  Werner Koch  <wk@gnupg.org>
26320
26321         gpg: Silence message about ignoring revoked user ids.
26322         + commit bdb61351776c038d668310d9b5e5c32588ef6519
26323         * g10/trustdb.c (tdb_get_validity_core): Print message only in debug
26324         mode.
26325
26326         agent: New option --pinentry-timeout.
26327         + commit 499743387f4d07847a2842358bc54f9237e0c2a7
26328         * agent/gpg-agent.c (oPinentryTimeout): New.
26329         (opts): Add new option.
26330         (parse_rereadable_options): PArse that option.
26331         (main): Tell gpgconf about this option.
26332         * agent/call-pinentry.c (start_pinentry): Send option to Pinentry.
26333         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add Option.
26334
26335 2016-01-19  Werner Koch  <wk@gnupg.org>
26336
26337         gpg: Streamline use of error messages in tofu.c.
26338         + commit cfa41890bb5ff306c07dad295136601fe47566a7
26339         * g10/tofu.c: Make use of print_further_info to reduce the number of
26340         different error messages to be translated.  Also streamline some
26341         messages.
26342
26343         common: Add substitute code for libgpg-error < 1.22.
26344         + commit 8b7f64f9dfc80b2a0ad235996b47369c2ba9b48f
26345         * common/util.h (GPG_ERR_DB_CORRUPTED): New.
26346
26347         gpg: Add function print_further_info.
26348         + commit d96e76d15f61812b950b64a60bc47117785a9dac
26349         * g10/misc.c (print_further_info): New.
26350
26351 2016-01-18  Werner Koch  <wk@gnupg.org>
26352
26353         g10: Improve strings printed by tofu.c.
26354         + commit 79778a8dd5f61a6b7abeeb44b75d82932db788b7
26355         * g10/tofu.c: Include ttyio.h.  Change many strings to help
26356         translating.  Make use of ngettext wehere needed.
26357         (CONTROL_L): New.
26358         (TIME_AGO_UNIT_SMALL_NAME): Remove this and all similar *_NAME macros.
26359         (time_ago_unit): Remove.
26360         (get_trust): Use tty_prints and cpr_get only for the actual prompt.
26361         Add Ctrl-L hack.
26362         (show_statistics): Use two English strings for singular and plural.
26363
26364         * po/POTFILES.in: Add tofu.c.
26365
26366         gpg: Use "days" in "...newer than..." diagnostics.
26367         + commit 9309bda9581715d304305c8c5116f2cbb31aec77
26368         * g10/sig-check.c (check_signature_metadata_validity): Use days if
26369         useful.
26370
26371         Use ngettext for some strings.
26372         + commit 437965e5622612941ed0fa55584811c65069242e
26373         * scd/app-openpgp.c (build_enter_admin_pin_prompt): Use ngettext for
26374         some diagnostics.
26375         (do_genkey): Ditto.
26376         * g10/keyedit.c (check_all_keysigs, menu_delsig, menu_clean): Ditto.
26377         * g10/keylist.c (print_signature_stats): Ditto.
26378         * g10/keyserver.c (keyserver_refresh): Ditto.
26379         * g10/sig-check.c (check_signature_metadata_validity): Ditto.
26380         * g10/sign.c (do_sign): Ditto.
26381         * g10/trustdb.c (reset_trust_records): Ditto.
26382         (validate_keys): Use a table like diagnostic output.
26383
26384 2016-01-15  Werner Koch  <wk@gnupg.org>
26385
26386         kbx,w32: Use shorter retry intervals for keybox_file_rename.
26387         + commit 3cccd5a83b96e4558642dcdf5d974f64ebdb9817
26388         * kbx/keybox-util.c (keybox_file_rename): Restart retry intervals
26389         after 800ms.
26390
26391 2016-01-14  Werner Koch  <wk@gnupg.org>
26392
26393         w32: Fix deadlock introduced by keybox_file_rename.
26394         + commit 663c5d129a8f400cc6eb8ab7b91772d6e578152d
26395         * g10/keyring.c (keyring_lock) [W32]: Flush the close cache before
26396         locking.
26397         * kbx/keybox-init.c (keybox_lock) [W32]: Close the file before
26398         locking.
26399
26400         gpg: Detect race between pubring.gpg and pubring.kbx use.
26401         + commit 3b1248e007a6bf830a3230ee2d9cc548205ec31a
26402         * g10/keydb.c (maybe_create_keyring_or_box): Detect race condition.
26403
26404         kbx: New function keybox_file_rename to replace rename.
26405         + commit 8241ed59d05e06252647b26477ed5c2f84895a26
26406         * kbx/keybox-util.c: Include windows.h.
26407         (keybox_file_rename): New.
26408         * kbx/keybox-update.c (rename_tmp_file): Replace remove+rename by
26409         keybox_file_rename.
26410         * g10/keyring.c (rename_tmp_file): Ditto.
26411
26412         kbx: Add function keybox_tmp_names to avoid code duplication.
26413         + commit f5cceef115f0307664956d01c48b1b397fdad4b3
26414         * kbx/keybox-update.c (create_tmp_file): Move some code to...
26415         * kbx/keybox-util.c (keybox_tmp_names): new.
26416         * g10/keyring.c: Include keybox.h.
26417         (create_tmp_file): Replace parts by keybox_tmp_names.
26418
26419         gpg: Make --list-options show-usage the default.
26420         + commit 360534bde770f4845669de223154216d249b954b
26421         * g10/gpg.c (main): Add LIST_SHOW_USAGE.
26422
26423 2016-01-13  Werner Koch  <wk@gnupg.org>
26424
26425         kbx: Change return type of search functions to gpg_error_t.
26426         + commit c7ca0f73dbe7c080b79f93f90f00ba2396fc4bd0
26427         * kbx/keybox-search.c (keybox_search_reset): Change return type to
26428         gpg_error_t.
26429         (keybox_search): Ditto.  Also handle GPG_ERR_EOF.
26430         * sm/keydb.c (keydb_search_reset): Ditto.
26431
26432         gpg: Improve error code from lock_all.
26433         + commit 9b6c91469a804c60289a2ed21334dfd856c294bb
26434         * g10/keydb.c (lock_all): Do not clobber RC during failur cleanup.
26435
26436         kbx: Improve and fix keybox_lock.
26437         + commit 8f1368d5e3f7654ad9cb100053535f728dff2344
26438         * kbx/keybox-init.c (keybox_lock): Make sure ERR is initialized.  Get
26439         error codes from dotlock functions.
26440
26441         common: Make sure dotlock functions set a proper ERRNO.
26442         + commit 4aceebf36f103eb380e21d12a1f08b7d6ea7cc8e
26443         * common/dotlock.c (map_w32_to_errno): New.
26444         (read_lockfile): Return a proper ERRNO.
26445         (dotlock_create_unix): Do not let log functions clobber ERRNO.
26446         (dotlock_take_unix): Ditto.
26447         (dotlock_release_unix): Ditto.
26448         (dotlock_create_w32): Set proper ERRNO.
26449         (dotlock_take_w32): Ditto.
26450         (dotlock_release_w32): Ditto.
26451
26452         kbx: Implement keybox_lock for use by gpg.
26453         + commit 160862978628b07ed5150ec2c8abad6af1656bc3
26454         * kbx/keybox-defs.h: Include dotlock.h and logging.h.
26455         (CONST_KB_NAME): Remove.  Replace usage by KB_NAME.
26456         (struct keybox_name): Add field "lockhd".
26457         * kbx/keybox-init.c (keybox_register_file): Init LOCKHD.
26458         (keybox_lock): Chnage to return gpg_error_t.  Implement locking.
26459
26460         gpg: Make sure to mark a duplicate registered keybox as primary.
26461         + commit 9dc355ad3ae0026ab04c424dc984d748b8fad393
26462         * kbx/keybox-init.c (keybox_register_file): Change interface to return
26463         the token even if the file has already been registered.
26464         * g10/keydb.c (primary_keyring): Rename to primary_keydb.
26465         (maybe_create_keyring_or_box): Change return type to gpg_error_t.
26466         (keydb_add_resource): Ditto. s/rc/err/.
26467         (keydb_add_resource): Mark an already registered as primary.
26468         * sm/keydb.c (maybe_create_keybox): Change return type to gpg_error_t.
26469         (keydb_add_resource): Ditto. s/rc/err/.
26470         (keydb_add_resource): Adjust for changed keybox_register_file.
26471
26472 2016-01-13  NIIBE Yutaka  <gniibe@fsij.org>
26473
26474         Fix to support git worktree.
26475         + commit 96237b9a63a50aed1884cb06f84279b977d6a8fa
26476         * autogen.sh, Makefile.am, doc/Makefile.am: Use -e for testing .git.
26477
26478 2016-01-12  Werner Koch  <wk@gnupg.org>
26479
26480         ssh: Accept OpenSSH *cert-v01 key variants.
26481         + commit e2f984b4afffaa89bdeba2f5d447b5681237177e
26482         * agent/command-ssh.c (SPEC_FLAG_WITH_CERT): New.
26483         (ssh_key_types): Add OpenSSH cert types.
26484         (stream_read_string): Allow a dummy read.
26485         (ssh_receive_mpint_list): Pass SPEC by reference.
26486         (ssh_receive_mpint_list): New arg CERT and use it.
26487         (ssh_receive_key): Read certificate into an estream object and modify
26488         parser to make use of that object.
26489
26490 2016-01-12  NIIBE Yutaka  <gniibe@fsij.org>
26491
26492         common: Fix iobuf API of filter function for alignment.
26493         + commit 4b4639b0b04dc82c550fa711dd7193e13fc4a428
26494         * common/iobuf.h: Fix comment.
26495
26496         common: Fix iobuf API of filter function for alignment.
26497         + commit 3f52c7da3940ec06572270d511000dc7fe9c27d2
26498         * common/iobuf.h (IOBUFCTRL_DESC): Change the call semantics.
26499         * common/iobuf.c (iobuf_desc): Add the second argument DESC.
26500         (print_chain, iobuf_close, do_open, iobuf_sockopen, iobuf_ioctl)
26501         (iobuf_push_filter2, pop_filter, iobuf_write_temp): Change calls
26502         of iobuf_desc.
26503         (file_filter, file_es_filter, sock_filter, block_filter): Fill the
26504         description.
26505         * common/t-iobuf.c (every_other_filter, double_filter): Likewise.
26506         * g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c,
26507         g10/decrypt-data.c, g10/encrypt.c, g10/mdfilter.c, g10/progress.c,
26508         g10/textfilter.c: Likewise.
26509
26510 2016-01-11  Werner Koch  <wk@gnupg.org>
26511
26512         gpg: Fix NULL de-ref for ambiguous key check in --export-ssh-keys.
26513         + commit b280aa6423c9492e8c5a9afa57339d06d957996d
26514         * g10/getkey.c: Allow arg RET_KEYBLOCK to be NULL.
26515
26516 2016-01-09  Werner Koch  <wk@gnupg.org>
26517
26518         tools: Remove gpgkey2ssh.
26519         + commit eb9c021631174fde4c1c444bbc533a7a46d570cd
26520         * tools/gpgkey2ssh.c: Remove.
26521         * tools/Makefile.am (bin_PROGRAMS): Ditto.
26522
26523 2016-01-08  Werner Koch  <wk@gnupg.org>
26524
26525         gpg: Support ECDSA keys with --export-ssh-key.
26526         + commit b2da3951a395366bf1644bc4c4eb42d657effe17
26527         * g10/export.c (key_to_sshblob): Add hack for ECDSA.
26528
26529         gpg: New command --export-ssh-key.
26530         + commit 4970868d8d84d3a64b067e5aafc9f097621758d3
26531         * g10/export.c: Include membuf.h and host2net.h.
26532         (key_to_sshblob): New.
26533         (export_ssh_key): New.
26534         * g10/gpg.c (aExportSshKey): New.
26535         (opts): Add command.
26536         (main): Implement that command.
26537
26538         gpg: Add an exact search flag to the PK struct.
26539         + commit 34bca9cd4b8517795833cb754b0d5b1dd33b08ed
26540         * g10/getkey.c (merge_selfsigs_subkey): Clear exact flag.
26541         (finish_lookup): Set exact flag.
26542         * g10/packet.h (PKT_public_key): Add field flags.exact.
26543
26544         Print warnings if old daemon versions are used.
26545         + commit 2aa42baaf3dd7c3ae613ae0c61760a17c8adfcd0
26546         * common/status.h (STATUS_WARNING): New.
26547         * g10/call-agent.c (warn_version_mismatch): New.
26548         (start_agent): Call warn function.
26549         * g10/call-dirmngr.c: Include status.h.
26550         (warn_version_mismatch): New.
26551         (create_context): Call warn function.
26552         * sm/call-agent.c (warn_version_mismatch): New.
26553         (start_agent): Call warn function.
26554         (gpgsm_agent_learn): Call warn function.
26555         * sm/call-dirmngr.c (warn_version_mismatch): New.
26556         (prepare_dirmngr): Call warn function.
26557
26558         common: New function compare_version_strings.
26559         + commit 4d7ac43ff71fdadfd2e04621f74840a82fbe788a
26560         * common/stringhelp.c (parse_version_number): New.
26561         (parse_version_string): New.
26562         (compare_version_strings): New.
26563         * common/t-stringhelp.c (test_compare_version_strings): New.
26564         (main): Call test.  Return ERRCOUNT instead of 0.
26565
26566         common: New function get_assuan_server_version.
26567         + commit 496643291e1e346434e9c98405c5a370957eb7d3
26568         * common/asshelp.c: Include membuf.h.
26569         (get_assuan_server_version): New.
26570         * g10/call-agent.c (agent_get_version): Use new function.
26571
26572         common: New put_membuf_cb to replace static membuf_data_cb.
26573         + commit 833ba5faa1340aff80a205acbb701d4ae1d594d0
26574         * common/membuf.c (put_membuf_cb): New.
26575         * agent/call-scd.c (membuf_data_cb): Remove.  Change callers to use
26576         put_membuf_cb.
26577         * common/get-passphrase.c (membuf_data_cb): Ditto.
26578         * g10/call-agent.c (membuf_data_cb): Ditto.
26579         * sm/call-agent.c (membuf_data_cb): Ditto.
26580
26581 2016-01-07  Werner Koch  <wk@gnupg.org>
26582
26583         gpg: Return an error code from keygrip_from_pk.
26584         + commit 8fd406c317ad7c2e375ae4f7d20656dadf6d7fcc
26585         * g10/keyid.c (keygrip_from_pk): Return an error code.
26586
26587         gpg: Avoid warnings about possible NULL deref.
26588         + commit 8a56a38387c10c02ba0790c655dd5c1d08e4a724
26589         * g10/getkey.c (cache_public_key): Protect deref of CE which actually
26590         can't happen.
26591         * g10/keygen.c (quickgen_set_para): s/sprintf/snprintf/.
26592         * g10/tofu.c (end_transaction, rollback_transaction): Allow NULL for
26593         DB.
26594         * g10/trustdb.c (update_min_ownertrust): Remove useless clearling of
26595         ERR.
26596
26597         gpg: Fix warnings about useless assignments.
26598         + commit 008aa6e6d4b213c3a0d15509eb46cf168b6f2c94
26599         * g10/armor.c (parse_hash_header): Remove duplicate var assignment.
26600         * g10/getkey.c (cache_user_id): Ditto.
26601         * g10/keygen.c (ask_curve): Ditto.  This also fixes a small memory
26602         leak.
26603
26604         * g10/keygen.c (proc_parameter_file): Remove useless assignment or
26605         pointer increment.
26606         (generate_keypair): Ditto.
26607         * g10/getkey.c (finish_lookup, lookup): Ditto.
26608         * g10/card-util.c (change_pin): Ditto.
26609         * g10/gpg.c (main) <aVerify>: Ditto.
26610         * g10/import.c (import): Ditto.
26611         (print_import_check): Ditto
26612         * g10/keyring.c (do_copy): Ditto.
26613         * g10/tdbio.c (tdbio_read_record): Ditto.
26614         * g10/trustdb.c (tdb_update_ownertrust): Ditto.
26615         (update_validity): Ditto.
26616
26617         * g10/server.c (cmd_passwd): Remove useless call to skip_options.
26618
26619         sm: Avoid warnings about useless assignments.
26620         + commit 126aebbb82667d160c8c4435898efeb3b43c4ec8
26621         * sm/call-dirmngr.c (prepare_dirmngr): Remove setting of ERR.
26622         (unhexify_fpr): Remove useless computation on N.
26623         * sm/certchain.c (do_validate_chain): Remove clearing of RC.  Remove
26624         useless setting of RC.
26625         * sm/fingerprint.c (gpgsm_get_keygrip): Remove setting of RC.
26626         * sm/gpgsm.c (build_list): Replace final stpcpy by strcpy.
26627         * sm/keydb.c (keydb_clear_some_cert_flags): Remove clearing of RC.
26628         * sm/server.c (cmd_getauditlog): Comment unused skip_options.
26629
26630         kbx: Avoid warnings about useless assignments.
26631         + commit 0de7d61437bd0bfbe645d5eed7a62df03129fb32
26632         * kbx/keybox-dump.c (_keybox_dump_blob): Remove setting of IN_RANGE
26633         and the last increment of P.
26634
26635         gpg: Fix DNS cert lookup returning an URL.
26636         + commit a41638acf4808caa619f4f3f4c0dcd12be00d6f8
26637         * g10/call-dirmngr.c (dns_cert_status_cb): Store URL status in the URL
26638         param.  The old code was entirely buggy (c+p error).
26639
26640 2016-01-06  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
26641
26642         Fix keystrlen to work when OPT.KEYID_FORMAT is KF_DEFAULT.
26643         + commit 2c3e67430d9b523c85c81ae562223fd51e3608cc
26644         * g10/keyid.c (keystrlen): If opt.keyid_format is KF_DEFAULT unset,
26645         default to KF_SHORT.
26646         (format_keyid): Default to KF_SHORT, not KF_0xLONG.
26647
26648 2016-01-06  Werner Koch  <wk@gnupg.org>
26649
26650         gpg: Silence some regression tests.
26651         + commit c7389ae90fa4a70766400cc241ff6a45aa750324
26652         * g10/test.c (TEST): Print diagnostics only in verbose mode.
26653
26654         gpg: Avoid using an uninitialized SALT on premature EOF.
26655         + commit 85cc7449fb00ac85b0c2eecd22bd38b23f33edf5
26656         * g10/parse-packet.c (parse_key): Check for premature end of salt.
26657
26658         gpg: Silence warnings found by static analyzer.
26659         + commit 09accc0e3d74e6289bed40b5bfc6479981cabfe4
26660         * g10/keyedit.c (change_passphrase): Remove useless init of ANY.
26661         (keyedit_quick_adduid): Remove useless setting of ERR.
26662         * g10/parse-packet.c (parse_key): Remove PKTLEN from condition because
26663         it has been checked before the loop.
26664         (parse_plaintext): Remove useless init of PKTLEN.
26665
26666         kbx: Avoid faulty fclose in an error case.
26667         + commit db82b6131d437bf6ba34db0e08b7dfa9edb11e45
26668         * kbx/keybox-update.c (blob_filecopy): Do not close an uninitialized
26669         file pointer after a failure to create a temp file.
26670         * kbx/keybox-openpgp.c (next_packet): Remove duplicate assignment of
26671         PKTLEN.
26672
26673         dirmngr: Silence one regression test.
26674         + commit 6deafb92abe100ff67e3a0a230a39e8c0ad41900
26675         * dirmngr/t-dns-stuff.c (main): Do not print info during standard
26676         "make check".
26677
26678         common: Avoid warnings about useless assignments.
26679         + commit e64317c15e9960f3173d374e589f7c3565a4ad08
26680         * common/b64enc.c (b64enc_finish): Remove var assignment which is not
26681         used later.
26682         * common/iobuf.c (file_filter): Ditto.
26683         * common/tlv.c (do_find_tlv): Ditto.
26684         * common/userids.c (classify_user_id): Ditto.
26685
26686         tests: Use info and error instead of a plain echo.
26687         + commit 1fbfa1bf0a6ad0dc7ed67d12252643c2c6c7370a
26688         * tests/openpgp/4gb-packet.test: Use error and info.
26689
26690         common: Do not deref vars in tests after a fail().
26691         + commit 0a00115ee2049ab2357b7a14a51c7da185ffcabd
26692         * common/t-convert.c (test_bin2hex): Turn if conditions into if-else
26693         chains to avoid accessing unchecked data.
26694         (test_bin2hexcolon): Ditto.
26695         * common/t-mapstrings.c (test_map_static_macro_string): Ditto.
26696         * common/t-stringhelp.c (test_percent_escape): Ditto.
26697         (test_make_filename_try): Ditto.
26698         (test_make_absfilename_try): Ditto.
26699         * common/t-timestuff.c (test_timegm): Ditto.
26700
26701 2016-01-05  Werner Koch  <wk@gnupg.org>
26702
26703         gpg: Align notes about minimal keysize with actual checks.
26704         + commit e70f7a54f29d727def2cfe9ea5ab9d461b4ce842
26705         * g10/keygen.c (ask_keysize): Use 768 for the minimal value for DSA in
26706         export mode.  Improve readability.
26707
26708 2016-01-05  NIIBE Yutaka  <gniibe@fsij.org>
26709
26710         agent: Fix RSA verification for card.
26711         + commit ff3b607fc879b70665c187500022cc63e2a0cd86
26712         * agent/pksign.c (agent_pksign_do): Use S-exp of public key, instead
26713         of shadowed key.
26714
26715 2016-01-04  Neal H. Walfield  <neal@g10code.com>
26716
26717         gpg: Fix double free.
26718         + commit 575c15a090913d86cf8d75b2bc4471e371f234b9
26719         * g10/getkey.c (get_pubkeys): Fix double free.
26720
26721 2015-12-24  NIIBE Yutaka  <gniibe@fsij.org>
26722
26723         agent: IMPORT_KEY with --force option fix.
26724         + commit 79b51bb8727bd3485229ac8ff5987558156d5d83
26725         * agent/cvt-openpgp.c (convert_from_openpgp_main): Add an option not
26726         to check existing key.
26727         (convert_from_openpgp): Ditto.
26728         (convert_from_openpgp_native): Call convert_from_openpgp_main with
26729         dontcare_exist=0.
26730         * agent/command.c (cmd_import_key): Call with dontcare_exist=force.
26731
26732         g10: Use --force when importing key for bkuptocard.
26733         + commit 5ca57f1a697e875bae5a5c73f1a580c42ca75343
26734         * g10/call-agent.c (agent_import_key): Add an argument FORCE.
26735         * g10/import.c (transfer_secret_keys): Likewise.
26736         (import_secret_one): Call transfer_secret_keys with FORCE=0.
26737         * g10/keyedit.c (keyedit_menu): Call with FORCE=1.
26738
26739         g10: Remove subcommand checkbkupkey for --key-edit.
26740         + commit 44aee35e69540510617aea4b886ef845590960fe
26741         * g10/keyedit.c (keyedit_menu): Remove cmdCHECKBKUPKEY support.
26742
26743         g10: Allow relative path for specifying the file for bkuptocard.
26744         + commit ee433d2b00c93b5a4e4ed54b9fb5806361df1b71
26745         * g10/keyedit.c (keyedit_menu): Assume the file is under GNUPGHOME.
26746         Also support tilda expansion.
26747
26748         g10: fix regression of bkuptocard subcommand in --edit-key.
26749         + commit 40959add1ba0efc1f4aa87fa075fa42423eff73c
26750         * g10/keyedit.c (keyedit_menu): Call transfer_secret_keys.
26751         * g10/import.c (transfer_secret_keys): Make it global function.
26752         Allow stats==NULL.
26753
26754         agent: Support --force option for IMPORT_KEY.
26755         + commit e684c634df814b12d399dcdc375c35d3e9a137af
26756         * agent/command.c (cmd_keywrap_key): New option --force.
26757
26758 2015-12-23  Werner Koch  <wk@gnupg.org>
26759
26760         gpg: Rename struct pubkey to pukey_s and add pubkey_t.
26761         + commit a9cbdcfd9c364557787f4a173cc59f14c067946e
26762         * g10/keydb.h (struct pubkey): Rename to pubkey_s.
26763         (pubkey_t): New.  Change all struct pubkey_s to use this type.
26764         * g10/getkey.c (get_pubkeys): Rename arg keys to r_keys.
26765
26766         gpg: Simplify status message code from commit b30c15bf.
26767         + commit 363ed2e892adc97fae97111bb56b64f9f809e8d5
26768         * g10/keygen.c (card_write_key_to_backup_file): Simplify by using
26769         hexfingerprint.
26770
26771         gpg: Add standard free() semantic to pubkey_free.
26772         + commit 04c9cddda95f2a8ca5c0cf10bb3dd6accf56cf45
26773         * g10/getkey.c (pubkey_free): Check for NULL arg.
26774
26775         gpg: Fix use of assert from commit dc417bf0.
26776         + commit ef7b7e91600f35b4d682a6267001a8d30f0fa49f
26777         * g10/keydb.c (keydb_update_keyblock): De-ref after the assert.  Use
26778         %zu for size_t.
26779
26780         gpg: Do not translate debug output.
26781         + commit b0c9867fb74d5a00335e6606d5bdcc5342ce26cd
26782         * g10/getkey.c (parse_def_secret_key): Do not make strings passed to
26783         log_debug translatable.
26784
26785 2015-12-23  NIIBE Yutaka  <gniibe@fsij.org>
26786
26787         scd: Fix commit b30c15bf (again).
26788         + commit aecf1a3c57ca8bf8050a3743b62fe142ccf9eb22
26789         * g10/keygen.c (do_generate_keypair): Clear the variable S.
26790
26791 2015-12-22  Neal H. Walfield  <neal@g10code.com>
26792
26793         gpg: Fix type.
26794         + commit 5c759924fb92b6de7ab3baed7871e5114ebd2505
26795         * g10/keygen.c (card_write_key_to_backup_file): Change n to a size_t.
26796
26797         gpg: Fix error message.
26798         + commit 4654384fe7a4dcee113dacf27c398b13dea5d0be
26799         * g10/getkey.c (parse_def_secret_key): Fix error message.
26800
26801         gpg: Don't check for ambiguous keys.
26802         + commit 7195b94345b0bb937477dc47fc5ec27fb108a099
26803         * g10/gpg.c (struct result): Move from here...
26804         * g10/keydb.h (struct pubkey): ... to here.  Update users.
26805         * g10/gpg.c (check_user_ids): Move from here...
26806         * g10/getkey.c (get_pubkeys): ... to here.  Update users.  Use
26807         get_pubkey_byname to look up the keys (this also prunes invalid keys).
26808         (pubkey_free): New function.
26809         (pubkeys_free): New function.
26810         * g10/gpg.c (main): Don't check for ambiguous key specifications.
26811
26812         gpg: Lazily evaluate --default-key.
26813         + commit dc52995d85048ed12ae8b9f330e9ca41a4030aae
26814         * g10/gpg.c (main): If --encrypt-to-default-key is specified, don't
26815         add --default-key's value to REMUSR here...
26816         * g10/pkclist.c (build_pk_list): ... do it here.
26817         * tests/openpgp/Makefile.am (TESTS): Add default-key.test.
26818         * tests/openpgp/default-key.test: New file.
26819
26820         gpg: Remove unused parameter.
26821         + commit ffe0b7a6dd6bfaec62f81f511b3caf08978bb269
26822         * g10/pkclist.c (build_pk_list): Remove parameter use, which is always
26823         called set to PUBKEY_USAGE_ENC.  Update callers.
26824
26825         gpg: Improve check for ambiguous keys.
26826         + commit 4103850c2e51274984f69443dee34295cbb8c282
26827         * g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
26828         encryption-only keys when a signing key is needed and vice-versa.
26829
26830         gpg: Fix TOCTTOU when updating keyblocks.
26831         + commit dc417bf0c555a7416d0aedde6645fd1087660f92
26832         * g10/keydb.c (keydb_update_keyblock): Don't replace the record at the
26833         current offset.  After taking the lock, extract the fingerprint from
26834         the keyblock, find it and then replace it.
26835
26836         Only add the user supplied CFLAGS after running any autoconf tests.
26837         + commit 02eb9fc9d5863abcfed6af704e618f8cac7cc2e8
26838         * configure.ac: Only add the user supplied CFLAGS after running any
26839         autoconf tests.
26840
26841         gpg: Suppress a warning.
26842         + commit 1cceba163b17b5e9fd7c89e5b40e3d7e1cffc885
26843         * dirmngr/dns-stuff.c (enable_dns_tormode): Reference new_circuit to
26844         avoid a warning when ADNS is not available.
26845
26846         gpg: Remove dead code.
26847         + commit 4143cc1c3783c54a6f733f08a4739e4e5fb0c8b3
26848         * kbx/keybox-defs.h (struct keybox_found_s): Remove unused fields
26849         offset and n_packets.
26850
26851         gpg: Display the key that is invalid, not the search description.
26852         + commit 7fe4be0416cdc9269011bc4213b8a22d6ced295c
26853         * g10/getkey.c (parse_def_secret_key): Display the key that is
26854         invalid, not the search description.
26855
26856         gpg: Mark more options as coming from the config file (when this holds)
26857         + commit 478ca6c75bbf529f95974224dfb7d71bd5860a96
26858         * g10/gpg.c (main): When --default-key or --encrypt-to-default-key is
26859         taken from the config file, note this.
26860
26861         gpg: Use enums instead of defines.
26862         + commit ee8a8ec1cf4605e5af427f9c8b01b3609c82cbe7
26863         * g10/keydb.h (PK_LIST_ENCRYPT_TO): Change from a macro to an enum.
26864         (PK_LIST_HIDDEN): Likewise.
26865         (PK_LIST_CONFIG): Likewise.
26866         (PK_LIST_SHIFT): Likewise.n
26867
26868 2015-12-21  NIIBE Yutaka  <gniibe@fsij.org>
26869
26870         po: Update Japanese translation.
26871         + commit d8392299f311f8cfcf8bc02679dd3ae7ef8cc6d7
26872
26873
26874         g10: clean up of headers for card.
26875         + commit ab9a9bce77d014159c68460f5a7c263fb72f3c1c
26876         * g10/main.h (save_unprotected_key_to_card): Remove.
26877         * g10/options.h (ctapi_driver, pcsc_driver, disable_ccid): Remove.
26878
26879 2015-12-21  Werner Koch  <wk@gnupg.org>
26880
26881         common: New file fwddecl.h.
26882         + commit 98f9e14323bf806f674b3cc259e19ef6219b4378
26883         * common/util.h (server_control_s, ctrl_t): Move to ...
26884         * common/fwddecl.h: New file.
26885         * common/call-gpg.h: Replace typedef by fwddecl.h.  Change include
26886         protection macro name.
26887         * common/Makefile.am (common_sources): Add fwddecl.h.
26888
26889 2015-12-18  Werner Koch  <wk@gnupg.org>
26890
26891         build: Add required macro for pkg-config.
26892         + commit af142854a73567836a0ca44ad62900469c23d531
26893         * configure.ac (PKG_PROG_PKG_CONFIG): New.
26894
26895 2015-12-18  NIIBE Yutaka  <gniibe@fsij.org>
26896
26897         g10: Remove deprecated internal functions.
26898         + commit 72eaff1aa610f3c89a755f212760157e1932d847
26899         * g10/keygen.c (do_ask_passphrase, generate_raw_key)
26900         (gen_card_key_with_backup, save_unprotected_key_to_card): Remove.
26901
26902         g10: Fix a regression for generating card key with backup.
26903         + commit b30c15bf7c5336c4abb1f9dcd974cd77ba6c61a7
26904         * g10/main.h (receive_seckey_from_agent): Declare.
26905         * g10/keygen.c (card_write_key_to_backup_file): New.
26906         (card_store_key_with_backup): New.
26907         (do_generate_keypair): Create a key on host for encryption key when
26908         backup is requested.  Then, call card_store_key_with_backup.
26909
26910 2015-12-17  NIIBE Yutaka  <gniibe@fsij.org>
26911
26912         g10: factor out a function for secret key retrieval.
26913         + commit e644aa7f5943174e3f7ba9408af71531fd125a0b
26914         * g10/export.c (receive_seckey_from_agent): New.
26915         (do_export_stream): Use it.
26916
26917 2015-12-16  Neal H. Walfield  <neal@g10code.com>
26918
26919         gpg: When checking for ambiguous keys, ignore invalid keys.
26920         + commit fc010b6c7fe14e609734e448775fa384421bdef1
26921         * g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
26922         disabled, revoked and expired keys (if appropriate for the provided
26923         option).
26924
26925 2015-12-15  Werner Koch  <wk@gnupg.org>
26926
26927         common: Use default_errsource for call-gpg and exectool.
26928         + commit 4ffe44c5874ed655d82adfa7a85439fab91cde03
26929         * common/call-gpg.c (my_error_from_syserror, my_error_from_errno): New.
26930         Use these wrappers.
26931         * common/exectool.c (my_error_from_syserror): New.  Use these
26932         wrappers.
26933
26934         gpg: Reduce number of strings to translate.
26935         + commit 345ec7323d643528d2f904765708b5ecfe51f57b
26936         * g10/getkey.c (parse_def_secret_key): Do not make debug messages
26937         translatable.  Make use of print_reported_error.
26938
26939         gpg: New function to printed a detailed error code.
26940         + commit 2ea1aebc924c3f0b2269f83cb1b80c75d9fa069c
26941         * g10/misc.c (print_reported_error): New.
26942
26943 2015-12-15  Neal H. Walfield  <neal@g10code.com>
26944
26945         gpg: Improve the keyblock cache's transparency.
26946         + commit f369efd6712148dc7ed40dba6d1ff5b0e169431a
26947         * kbx/keybox-search.c (keybox_seek): New function.
26948         * g10/keydb.c (keydb_search): When reading from the cache, seek to
26949         just after the cached record.
26950
26951         gpg: Improve the keyblock cache's transparency.
26952         + commit 2e4e10c1dcd8dfeafec51f44ebf26acfeb770c41
26953         * kbx/keybox-search.c (keybox_offset): New function.
26954         * g10/keydb.c (struct keyblock_cache): Add fields resource and offset.
26955         (keyblock_cache_clear): Reset HD->KEYBLOCK_CACHE.RESOURCE and
26956         HD->KEYBLOCK_CACHE.OFFSET.
26957         (keydb_search): Don't use the cached result if it comes before the
26958         current file position.  When caching an entry, also record the
26959         position at which it was found.
26960
26961         gpg: Use more descriptive names.
26962         + commit 0ea186db645da2b51a7e71f46793d447f2de5e3d
26963         * g10/keyring.c (KR_NAME): Rename this...
26964         (KR_RESOURCE): ... to this.  Update users.
26965         (struct keyring_name): Rename this...
26966         (struct keyring_resource): ... to this.  Update users.
26967         (struct off_item): Rename this...
26968         (struct key_present): ... to this.  Update users.
26969         (OffsetHashTable): Rename this...
26970         (key_present_hash_t): ... to this.  Update users.
26971         (kr_offtbl): Rename this...
26972         (key_present_hash): ... to this.  Update users.
26973         (kr_offtbl_ready): Rename this...
26974         (key_present_hash_ready): ... to this.  Update users.
26975         (KEY_PRESENT_HASH_BUCKETS): New define.  Replace use of literals
26976         with this.
26977         (new_offset_item): Rename this...
26978         (key_present_value_new): ... to this.  Update users.
26979         (release_offset_items): Drop dead code.
26980         (new_offset_hash_table): Rename this...
26981         (key_present_hash_new): ... to this.  Update users.
26982         (release_offset_hash_table): Drop dead code.
26983         (lookup_offset_hash_table): Rename this...
26984         (key_present_hash_lookup): ... to this.  Update users.
26985         (update_offset_hash_table): Rename this...
26986         (key_present_hash_update): ... to this.  Drop unused parameter off.
26987         Update users.
26988         (update_offset_hash_table_from_kb): Rename this...
26989         (key_present_hash_update_from_kb): ... to this.  Drop unused parameter
26990         off.  Update users.
26991
26992 2015-12-15  NIIBE Yutaka  <gniibe@fsij.org>
26993
26994         sm: Handle gcry_pk_encrypt return value.
26995         + commit 4ee881bff4c8fdfa4b3b7a4b7afab611471e97f1
26996         * sm/encrypt.c (encrypt_dek): Don't ignore failure of gcry_pk_encrypt.
26997
26998 2015-12-14  Werner Koch  <wk@gnupg.org>
26999
27000         common: Change license of isascii.c to all-premissive,
27001         + commit 7baca033070e7811f75e2021100adf8e6a48907f
27002         * common/isascii.c: Change.
27003
27004         common: Change license of some modules to LGPLv3+/GPLv2+.
27005         + commit 7d129a7391115ff1d6a3541078a37a630ab7819f
27006         * common/status.c: Change from GPLv3 to LGPLv3+/GPLv2+.
27007         * common/status.h: Ditto.
27008         * common/yesno.c: Ditto.
27009         * common/common-defs.h: Ditto.
27010         * common/gettime.h: Ditto.
27011         * common/keyserver.h: Ditto.
27012
27013         common: Change license for exectool to LGPLv3+/GPLv2+.
27014         + commit 467e18b74b4790dcbdf3c816206d2fbaf170a12a
27015         * common/exectool.c, common/exectool.h: Change license.
27016
27017         common: Rename sh-exectool to exectool.
27018         + commit d80e1bc430bf64debdb6b08f0b7e5c42836781fa
27019         * common/sh-exectool.c: Rename to exectool.c.
27020         * common/sh-exectool.h: Rename to exectool.h.
27021         * common/Makefile.am (common_sources): Adjust for rename.
27022         * common/exectool.c (sh_exec_tool_stream): Rename to
27023         gnupg_exec-tool-stream.
27024         (sh_exec_tool): Rename to gnupg_exec_tool.
27025         * tools/gpgtar-create.c (gpgtar_create): Adjust for changes.
27026         * tools/gpgtar-extract.c: Adjust for changes.
27027         * tools/gpgtar-list.c: Adjust for changes.
27028
27029 2015-12-14  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
27030
27031         gpg: Print ownertrust in TOFU+PGP trust model.
27032         + commit f5aa51aaacfe13ab9528aa9b88d8ce8eb61362fc
27033         * g10/keyedit.c: Print ownertrust in TOFU+PGP trust model.
27034
27035 2015-12-14  Neal H. Walfield  <neal@g10code.com>
27036
27037         gpg: Fix --default-key checks.
27038         + commit e573e6188dada4d70f6897aa2fda3c3af8c50441
27039         * g10/getkey.c (parse_def_secret_key): Don't just check if a secret
27040         key is available for the public key, also consider subkeys.  Also
27041         check that the key has the signing capability, is not revoked, is not
27042         expired and is not disabled.  Print a warning if there was a least one
27043         value passed to --default-key and all were ignored.
27044
27045 2015-12-14  NIIBE Yutaka  <gniibe@fsij.org>
27046
27047         scd: Fix regression for generating RSA keys on card.
27048         + commit d40975cbe8ff86fcc4a1b4963fdffc66ddee85ce
27049         * scd/app-openpgp.c (do_genkey): Strip leading zeros for fingerprint
27050         computation.
27051
27052 2015-12-12  Werner Koch  <wk@gnupg.org>
27053
27054         gpg: Use a regular type instead of a void* for import stats.
27055         + commit 4d3395ef1fcde0b8c454c09956863959d590ede6
27056         * g10/import.c (struct stats_s): Rename to import_stats_s.  Change all
27057         users.
27058         * g10/main.h (import_stats_t): New.  Change fucntions to use this
27059         instead of a void pointer.
27060
27061         Remove replacements for libgpg-error < 1.21.
27062         + commit f0ae40b0c901e5f5c04c6ed5b2ab96ab7340b2bd
27063         * common/util.h: Remove replacement macros for libgpg-error<1.21.
27064         * common/types.h: Ditto.
27065         * common/mischelp.h: Ditto.
27066         * common/t-mapstrings.c: Include t-support.h before stringhelp.h
27067         * common/t-stringhelp.c: Ditto.
27068         * common/t-support.h: Always include gpg-error.h.
27069         * kbx/keybox-search.c: Do not include stringhelp.h so that keybox-defs
27070         comes first.
27071
27072 2015-12-11  Neal H. Walfield  <neal@g10code.com>
27073
27074         gpg: Fix buffer overflow.
27075         + commit 1605e34fc365edd473aac15c9b4e5aadc1d95cf5
27076         * g10/keydb.c (keydb_search_desc_dump): Fix buffer overflow.
27077
27078 2015-12-11  Justus Winter  <justus@g10code.com>
27079
27080         agent: Improve error handling.
27081         + commit 25f0f053cd306200a6211b5cf397838a59835ee7
27082         * agent/pksign.c (agent_pksign_do): Improve error handling.
27083
27084         Fix required libgpg-error version.
27085         + commit d6e01493cad6ff32f356185c7a2d2b5c2b86a937
27086         * configure.ac (NEED_GPG_ERROR_VERSION): We need version 1.21 for the
27087         poll interface.
27088
27089 2015-12-11  Neal H. Walfield  <neal@g10code.com>
27090
27091         gpg: Don't error out if a key occurs multiple times in the keyring.
27092         + commit 6dc37c5fb60acbfd5ba2ab979852383eac8944e0
27093         * g10/gpg.c (check_user_ids): Don't error out if a key occurs multiple
27094         times in the keyring.  Instead, print a warning.  When printing out
27095         fingerprint prints, use format_hexfingerprint to format them.
27096
27097 2015-12-10  Daniel Hoffend  <dh@dotlan.net>
27098
27099         scd: Fix removal of unplugged usb readers on Windows.
27100         + commit d1a97585c5e73fbc7d4cf90e38f76ffc5aea305f
27101         * scd/apdu.c (pcsc_error_to_sw): map PCSC_E_NO_SERVICE and
27102         PCSC_E_SERVICE_STOPPED to the internal SW_HOST_NO_READER error code.
27103
27104 2015-12-07  Justus Winter  <justus@g10code.com>
27105
27106         tests: Add some more gpgtar tests.
27107         + commit 1c8eae95a8b3b89bc0f49cb5f4938101634583dc
27108         * tests/openpgp/gpgtar.test: Add more tests.
27109
27110         dirmngr: Initialize http status code.
27111         + commit 71726b627dcff015dc12568021b31d8ccede788a
27112         * dirmngr/ks-action.c (ks_action_search): Initialize 'http_status' as
27113         it is unused if LDAP is used to search for keys.
27114
27115 2015-12-04  Daiki Ueno  <ueno@gnu.org>
27116
27117         gpg: Write ERROR status on delete-key cancellation.
27118         + commit b5cd68852d0e3485c9e13a8ddb70f05f36a65cb9
27119         * g10/delkey.c (do_delete_key): Write ERROR status code with the error
27120         location "delete_key.secret", when the user cancelled the operation on
27121         Pinentry.
27122
27123 2015-12-04  Justus Winter  <justus@g10code.com>
27124
27125         dirmngr: Stricter handling of http error codes.
27126         + commit 6d64ef869dfbcb7aaa802b80ed648393147e40d8
27127         * dirmngr/ks-action.c (ks_action_search): Only retry if the keyserver
27128         responded with a '404 Not Found'.
27129         * dirmngr/ks-engine-hkp.c (send_request): Return http status code.
27130         (ks_hkp_search): Likewise.
27131         (ks_hkp_{get,put}): Adapt call to 'send_request'.
27132         * dirmngr/ks-engine.h (ks_hkp_search): Update prototype.
27133
27134         dirmngr: Really search all keyservers for patterns.
27135         + commit 6ac57a482f7ae02db1bee4e4b861288fc6905adc
27136         * dirmngr/ks-action.c (ks_action_search): Search all configured
27137         keyservers for the given patterns.
27138
27139         dirmngr: Handle http status '501 Not Implemented'.
27140         + commit a8308ba5231682ce7c7d591a17e7e940fbd63189
27141         * dirmngr/ks-engine-hkp.c (send_request): Handle status 501 and return
27142         GPG_ERR_NOT_IMPLEMENTED.
27143
27144         tools/gpgtar: Implement symmetric encryption.
27145         + commit 582e684a48eb4f3716cecf7dc73eb93046efcfad
27146         * tests/openpgp/gpgtar.test: Add test case.
27147         * tools/gpgtar-create.c (gpgtar_create): Pass '--symmetric' flag to
27148         gpg.
27149         * tools/gpgtar.c (parse_arguments): We do handle the argument now.
27150
27151         tools/gpgtar: Implement signing.
27152         + commit 45c814f348c89acd8d21d0607ffcf68e5c5c399e
27153         * tests/openpgp/gpgtar.test: Test signing.
27154         * tools/gpgtar-create.c (gpgtar_create): Add 'sign' option, add the
27155         appropriate gpg arguments to implement signing and selecting the local
27156         user.
27157         * tools/gpgtar.c (parse_options): We do handle '--local-user' now.
27158         (main): Handle signing, encrypting, and doing both when creating an
27159         archive.
27160         * tools/gpgtar.h (gpgtar_create): Update prototype.
27161
27162         tools/gpgtar: Use the new exectool helper.
27163         + commit 0c0dafd8e89bb702e856c661c1561e10cdcaf37f
27164         * tools/Makefile.am: gpgtar now requires neither npth nor libassuan.
27165         * tools/gpgtar-create.c (gpgtar_create): Use the new 'sh-exectool'
27166         helper.
27167         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
27168         * tools/gpgtar-list.c (gpgtar_list): Likewise.
27169         * tools/gpgtar.c (main): Set default gpg program.  Drop the
27170         initialization of npth and libassuan.
27171
27172         common: Add a stream interface to 'sh-exectool'.
27173         + commit a81aca6e1c2a4529d416d1989f15d7338d2ee81e
27174         * common/sh-exectool.c (struct copy_buffer): Add infrastructure for
27175         copying between streams.
27176         (copy_buffer_{init,shred,do_copy,flush}): New functions.
27177         (sh_exec_tool_stream): Rework 'sh_exec_tool' to operate on streams.
27178         (nop_free): New function.
27179         (sh_exec_tool): Express this in terms of 'sh_exec_tool_stream'.
27180         * common/sh-exectool.h (sh_exec_tool_stream): New prototype.
27181
27182         common: Add header file and build the new code.
27183         + commit d955cb5e0700c6d2b6b26cb210b5a176d22d4235
27184         * common/Makefile.am (common_sources): Add new files.
27185         * common/sh-exectool.h: New file.
27186
27187 2015-12-04  Werner Koch  <wk@gnupg.org>
27188
27189         common: Add code to execute a helper.
27190         + commit 2ae07f826aa551db8adf714158fce962790a6b54
27191         * common/sh-exectool.c: New file.
27192
27193         Release 2.1.10.
27194         + commit 9fadfdb3109f7ea42aaaa9d745b64c6c90cb8233
27195
27196
27197 2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>
27198
27199         po: Japanese translation.
27200         + commit 762fcc027b0b4cc88c1f633804de619273d6a8b9
27201
27202
27203 2015-12-04  Werner Koch  <wk@gnupg.org>
27204
27205         speedo,w32: Improve installer.
27206         + commit 0fe3614d9afe42ecf80bbc932366ceeaba0a0ecc
27207         * build-aux/speedo/w32/inst.nsi (SEC_gnupg): Install dirmngr.conf and
27208         distsigkey.gpg.
27209         (un.gnupglast): Stop dirmngr.
27210
27211         gpg: Do not pre-check keys given on the command line.
27212         + commit 28311d1fa56bfbd801103a8475597459132874f4
27213         * g10/keydb.h (PK_LIST_ENCRYPT_TO, PK_LIST_HIDDEN, PK_LIST_CONFIG)
27214         (PK_LIST_SHIFT): New.
27215         * g10/pkclist.c (build_pk_list): Use them here.
27216         * g10/gpg.c (check_user_ids, main): Ditto.
27217
27218         * g10/gpg.c (main): Set PK_LIST_CONFIG for REMUSR and LOCUSR.
27219         (check_user_ids): Skip check for command line specified options.
27220
27221         dirmngr: Add command to print the resolver version.
27222         + commit 4ff2cae7dee36ffee854c5f05c3e8ee9eb0308dd
27223         * dirmngr/server.c (cmd_getinfo): Add sub-command "dnsinfo".
27224
27225         gpg: Allow "help" as value for --tofu-policy.
27226         + commit 59f6192cb766612ad215bc6a3af13d5b137139e4
27227         * g10/gpg.c (parse_tofu_policy): Add keyword "help".
27228         (parse_tofu_db_format): Ditto.
27229
27230         Do not translate messages printed with log_debug.
27231         + commit 218a52787a87be6b7481a39f87d212d6ef594e97
27232         * common/asshelp.c (start_new_gpg_agent): Do not i18n string.
27233         (start_new_dirmngr): Ditto.
27234         * g10/mainproc.c (proc_encrypted): Ditto.  Print only if debug is
27235         enabled.
27236
27237 2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>
27238
27239         scd: Fix for removing the prefix.
27240         + commit f03976f1101f539a2782cd9e87d640fc32a022db
27241         * scd/app-openopg.c (do_decipher): Fix the condition.
27242
27243         scd: Simplify saving application context.
27244         + commit 9639af5f16a7ed908cbce2415330b9fcd88edc90
27245         * scd/app.c (lock_table): Remove LAST_APP field.
27246         (lock_reader, app_dump_state, application_notify_card_reset)
27247         (release_application): Follow the change.
27248         (check_conflict): New.
27249         (check_application_conflict): Lock the slot and call check_conflict.
27250         (select_application): Call check_conflict and not use LAST_APP.
27251
27252         scd: More fix for Curve25519 prefix handling.
27253         + commit f747adfa21551e083bc947540c64c94a96dcc059
27254         * scd/app-openpgp.c (do_decipher): Handle trancated cipher text.
27255         Also fix xfree bug introduced.
27256
27257 2015-12-03  Werner Koch  <wk@gnupg.org>
27258
27259         scd: Another fix for Curve25519 prefix handling.
27260         + commit e28f2e7a2f265af8bbdb4979e9679b4396dccdd5
27261         * scd/app-openpgp.c (do_decipher): Check 0x02 also for 16+1 byte long
27262         INDATA.
27263         (do_decipher): Fix integer arithmetic in void pointer.
27264         (do_decipher): Add missing memcpy.
27265
27266         build: Avoid dependecy problems in "make distcheck".
27267         + commit 0f61599ed0bd1cc6842067d040bb58ec0a451715
27268         * doc/Makefile.am (gnupg.texi): Depend on defs.inc.
27269
27270         build: Change how caller provided CFLAGS are used by configure.
27271         + commit 4e9957250eee3521dc979912a4818e58ffddc5b8
27272         * configure.ac: Append instead of prepend caller provided CFLAGS.
27273
27274         gpg: Add variant of 'key "%s" not found: %s' error message.
27275         + commit 5e2c5e9ec5b75fae886e1294adbdb7ad2ac12827
27276         * g10/gpg.c (check_user_ids): Change error message.
27277         * g10/delkey.c (do_delete_key): Ditto.
27278
27279         gpg: Make keyidlist more robust in case of errors.
27280         + commit 50a568e7380752454c029eac2b57d8803b1cb287
27281         * g10/keyserver.c (keyidlist): Clear *KLIST on error.
27282
27283         gpg: Take care of keydb_new returning NULL.
27284         + commit a28ac99efead8be73ea1704abe1611ccc4811c54
27285         * g10/keydb.c (keydb_new): Print an error message if needed.  Also use
27286         xtrycalloc because we return an error anyway.
27287         * g10/delkey.c (do_delete_key): Handle error retruned by keydb_new.
27288         * g10/export.c (do_export_stream): Ditto.
27289         * g10/getkey.c (get_pubkey): Ditto.
27290         (get_pubkey_fast): Ditto.
27291         (get_pubkeyblock): Ditto.
27292         (get_seckey): Ditto.
27293         (key_byname): Ditto.
27294         (get_pubkey_byfprint): Ditto.
27295         (get_pubkey_byfprint_fast): Ditto.
27296         (parse_def_secret_key): Ditto.
27297         (have_secret_key_with_kid): Ditto.
27298         * g10/import.c (import_one): Ditto.
27299         (import_revoke_cert): Ditto.
27300         * g10/keyedit.c (keyedit_quick_adduid): Ditto.
27301         * g10/keygen.c (quick_generate_keypair): Ditto.
27302         (do_generate_keypair): Ditto.
27303         * g10/trustdb.c (validate_keys): Ditto.
27304         * g10/keyserver.c (keyidlist): Ditto.
27305         * g10/revoke.c (gen_desig_revoke): Ditto.
27306         (gen_revoke): Ditto.
27307         * g10/gpg.c (check_user_ids): Ditto.
27308         (main): Do not print an error message for keydb_new error.
27309         * g10/keylist.c (list_all): Use actual error code returned by
27310         keydb_new.
27311
27312         * g10/t-keydb-get-keyblock.c (do_test): Abort on keydb_new error.
27313         * g10/t-keydb.c (do_test): Ditto.
27314
27315         * g10/keyring.c (keyring_new): Actually return an error so that the
27316         existing keydb_new error checking makes sense for a keyring resource.
27317         (keyring_rebuild_cache): Take care of keyring_new returning an error.
27318
27319         gpg: Change some error messages.
27320         + commit 9fcc047d921bde95b6807325b7fd2b697e89907f
27321         * g10/getkey.c (parse_def_secret_key): Change error message.  Replace
27322         log_debug by log_info.
27323         * g10/gpg.c (check_user_ids): Make function static.  Change error
27324         messages.
27325         (main): Change error messages.
27326         * g10/revoke.c (gen_revoke): Ditto.
27327
27328 2015-12-03  NIIBE Yutaka  <gniibe@fsij.org>
27329
27330         scd: Fix "Conflicting usage" bug.
27331         + commit f42c50dbf00c2e6298ca6830cbe6d36805fa54a3
27332         * scd/apdu.c (apdu_close_reader): Call CLOSE_READER method even if we
27333           got an error from apdu_disconnect.
27334         * scd/app-common.h (no_reuse): Remove.
27335         * scd/app.c (application_notify_card_reset): Deallocate APP here.
27336         (select_application, release_application): Don't use NO_REUSE.
27337
27338         scd: Fix for Curve25519 prefix handling.
27339         + commit 11b2691eddc42e91651e4f95dd2731255a3e9211
27340         * scd/app-openpgp.c (do_decipher): More condition for AES decipher.
27341           Handle the prefix in cipher text.  Always add the prefix in result.
27342
27343 2015-12-03  Neal H. Walfield  <neal@g10code.com>
27344
27345         gpg: Use the matching key if the search description is exact.
27346         + commit cedbd4709eed6fead9d1b271f96860c00547c77c
27347         * g10/gpg.c (check_user_ids): If the search description is for an
27348         exact match (a keyid or fingerprint that ends in '!'), then use the
27349         matching key, not the primary key.
27350         * tests/openpgp/Makefile.am (TESTS): Add use-exact-key.test.
27351         (priv_keys): Add privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc,
27352         privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc,
27353         privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc,
27354         privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc and
27355         privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc.
27356         (sample_keys): Add
27357         samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc.
27358         * tests/openpgp/privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc:
27359         New file.
27360         * tests/openpgp/privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc:
27361         New file.
27362         * tests/openpgp/privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc:
27363         New file.
27364         * tests/openpgp/privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc:
27365         New file.
27366         * tests/openpgp/privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc:
27367         New file.
27368         * tests/openpgp/samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc:
27369         New file.
27370         * tests/openpgp/use-exact-key.test: New file.
27371         * tests/openpgp/version.test: Install the new private keys.
27372
27373 2015-12-02  Werner Koch  <wk@gnupg.org>
27374
27375         build: Require at least Libassuan 2.4.1.
27376         + commit 69db3285e4612ad24462149a4d64cc32c090a491
27377         * configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.4.1.
27378         * agent/gpg-agent.c (create_server_socket): Remove check for
27379         libassuan >= 2.3.0 and >= 2.1.4.
27380         (main): Remove check for libassuan >= 2.1.4.
27381         * scd/scdaemon.c (create_server_socket): Remove check for
27382         libassuan >= 2.1.4.
27383         * dirmngr/dirmngr.c (set_tor_mode): Remove check for
27384         libassuan >= 2.3.0.
27385         * dirmngr/http.c (http_raw_connect, send_request): Remove checks for
27386         libassuan >= 2.3.0.
27387
27388 2015-12-02  Neal H. Walfield  <neal@g10code.com>
27389
27390         gpg: Improve documentation.
27391         + commit 28195f8d27aa0fc9daf5b74fb24de87c36e04739
27392         * g10/tofu.c (initdb): Improve documentation.
27393
27394         gpg: Fix type mismatch resulting in a buffer overflow.
27395         + commit c73d75103cbd34975e2bd28e9924caee05eaf829
27396         * g10/tofu.c (record_binding): Change policy_old's type from an enum
27397         tofu_policy to a long: this variable is passed by reference and a long
27398         is expected.
27399
27400 2015-12-02  Werner Koch  <wk@gnupg.org>
27401
27402         dirmngr: Switch to an onion address if Tor is running.
27403         + commit 28e2513721ff0cec920564d4087f3600cce8672e
27404         * dirmngr/dirmngr.h (opt): Turn field 'keyserver' into an strlist.
27405         * dirmngr/dirmngr.c (parse_rereadable_options): Allow multiple
27406         --keyserver options.
27407         * dirmngr/server.c (server_local_s): Add field 'tor_state'.
27408         (release_uri_item_list): New.
27409         (release_ctrl_keyservers): Use it.
27410         (start_command_handler): Release list of keyservers.
27411         (is_tor_running): New.
27412         (cmd_getinfo): Re-implement "tor" subcommand using new fucntion.
27413         (ensure_keyserver): Rewrite.
27414         * g10/dirmngr-conf.skel: Add two keyserver options.
27415
27416         http: Enhance parser to detect .onion addresses.
27417         + commit 17ac843871d5f350f26edff0187f94ced923f534
27418         * dirmngr/http.h (parsed_uri_s): Add flag 'onion'.
27419         * dirmngr/http.c (do_parse_uri): Set that flag.
27420         * dirmngr/t-http.c (main): Print flags.
27421
27422 2015-12-02  Neal H. Walfield  <neal@g10code.com>
27423
27424         common,gpg: Fix processing of search descriptions ending in '!'.
27425         + commit 10cca02c4c70eee993d4df0a1d20ae841992efe9
27426         * g10/gpg.c (check_user_ids): If the search description describes a
27427         keyid or fingerprint and ends in a '!', include the '!' in the
27428         rewritten description.
27429         * common/userids.c (classify_user_id): Accept keyids and fingerprints
27430         ending in '!'.
27431
27432 2015-12-01  Justus Winter  <justus@g10code.com>
27433
27434         dirmngr: Improve error handling.
27435         + commit 9c34711539fc2c34aea8da0fd49ae6aa28991518
27436         * dirmngr/dns-stuff.c (getsrv): Avoid looking at 'header' before
27437         checking for errors, but silently ignore errors when looking up SRV
27438         records.
27439
27440 2015-12-01  Werner Koch  <wk@gnupg.org>
27441
27442         build: Let configure show the the status of Tor support.
27443         + commit 3be12d1e1b8334fb2bba307ec9efbc004f1dbf8d
27444         * configure.ac (show_tor_support): New
27445
27446 2015-11-30  Werner Koch  <wk@gnupg.org>
27447
27448         doc: Make make distcheck work again.
27449         + commit 4ecb5db804003c10c57bdc0dc7f1d9649c5ba6f8
27450         * doc/Makefile.am (DISTCLEANFILES): Add gpgkey2ssh.1
27451
27452         yat2m: Add keyword @url.
27453         + commit b4756a54a55fcd51717c149e19191a2eeaa6a919
27454         * doc/yat2m.c (proc_texi_cmd): Add keyword @url.
27455
27456         doc: Build man pages with the same date as the info files.
27457         + commit 081c902f16a2f251df4593f090b3978dfa473a26
27458         * doc/Makefile.am (yat2m-stamp): Use option --date.
27459
27460         yat2m: New option --date.
27461         + commit 75eb071354d1f862bac09c56c8ab81dae8883270
27462         * doc/yat2m.c (opt_date): new.
27463         (isodatestring): Use it if set.
27464         (main): New option --date.
27465
27466 2015-11-27  Werner Koch  <wk@gnupg.org>
27467
27468         gpg: Avoid extra translation strings.
27469         + commit 686f31c3d5aee0d2825265869ae92ca95cdcabae
27470         * g10/keyedit.c (menu_expire): Use only one prompt.
27471
27472         kbx: Include gpg-error prior to mischelp.h.
27473         + commit 436a154ea85e4dffbde7c3b316fbfca1b066aa2a
27474         * kbx/keybox-init.c: Change order of includes.
27475
27476         gpg,w32: Fix a format string error.
27477         + commit 7c856f99144b84ac30e0c9a192f09dc36d93190a
27478         * g10/keyring.c (keyring_search): Fix format string for off_t.
27479
27480         Silence compiler warnings related to not using assuan_fd_t.
27481         + commit 501436ab0f9d8e7d56b2f5e344006be5f5a3c653
27482         * common/call-gpg.c (start_gpg): Use assuan_fd_t.  Note that the
27483         declaration was already fixed by a previous change.
27484         * dirmngr/server.c (cmd_getinfo): Use assuan_fd_t.
27485
27486         Avoid incompatible pointer assignment warnings on Windows.
27487         + commit 64e87083394d38998feab359caac917bcc6139d3
27488         * common/logging.c (fun_writer): Use gpgrt_ssize_t instead of ssize_t.
27489         * dirmngr/server.c (data_line_cookie_write): Ditto.
27490         * sm/certdump.c (format_name_writer): Ditto.
27491         * sm/server.c (data_line_cookie_write): Ditto.
27492         * dirmngr/http.c (cookie_read, cookie_write): Ditto.
27493
27494         dirmngr: Avoid a declarations after statements.
27495         + commit 100f34e869df899a695f5e5ef1b8e092baf91751
27496         * tools/gpgtar.c (parse_arguments): Use a block for a local varibale
27497         definition.
27498
27499         dirmngr: Avoid casting away a const from an char**.
27500         + commit 6501741d2c1beb8060198a39a1aa950cb11b386f
27501         * dirmngr/ldap.c (start_cert_fetch_ldap): Do not use pointers from
27502         global variables.
27503
27504         dirmngr: Allow testing for a running Tor via "getinfo tor".
27505         + commit da5a232199ef93be219e933a7eaf4ccfc6d24d61
27506         * dirmngr/server.c (cmd_getinfo): Print an S line if Tor is not
27507         running.
27508
27509 2015-11-26  Werner Koch  <wk@gnupg.org>
27510
27511         g13: Fix commit 1a045b13.
27512         + commit 82f6abb4807c89388052ab442368d9e09fb84aea
27513         * g13/g13.c (main): Use existsing function.
27514
27515         common: Fix off-by-one access in the new format_text.
27516         + commit 61941a984964308b09c7fc1b3438fb99d0b3c917
27517         * common/stringhelp.c (format_text): Use existsing fucntion to trim
27518         trailing spaces.  Fix off-by-one access.
27519
27520         dirmngr: Improve output of "getinfo tor".
27521         + commit d226e67856e7197c581dcd2cef0f1e687bee0ac9
27522         * dirmngr/server.c (cmd_getinfo): Print a message along with OK.
27523
27524         dirmngr: Let Libassuan employ nPth wrappers for connect.
27525         + commit f95cff1cc9e7a4d9f6b7c45188ec47e70f9874dc
27526         * dirmngr/http.c (my_unprotect, my_protect): Remove.
27527         (connect_server): Do not use these wrappers.
27528
27529 2015-11-26  Justus Winter  <justus@g10code.com>
27530
27531         tools/gpgtar: Add '--dry-run'.
27532         + commit 676b2d7081291f7e47a66755ab07af259fea130b
27533         * tools/gpgtar-extract.c (extract_{regular,directory}): Honor
27534         '--dry-run'.
27535         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
27536         (opts): Add '--dry-run'.
27537         (parse_arguments): Handle '--dry-run'.
27538         * tools/gpgtar.h (opt): Add field 'dry_run'.
27539
27540         tools/gpgtar: Handle '--gpg-args'.
27541         + commit 69a8440f44fa025e33a4cc32d17695c9ac385043
27542         * tools/gpgtar-create.c (gpgtar_create): Use given arguments.
27543         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
27544         * tools/gpgtar-list.c (gpgtar_list): Likewise.
27545         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
27546         (opts): Add 'gpg-args'.
27547         (parse_arguments): Handle arguments.
27548         * tools/gpgtar.h (opt): Add field 'gpg_arguments'.
27549         * tests/openpgp/gpgtar.test: Simplify accordingly.
27550
27551         common: Make the GPG arguments configurable in call-gpg.
27552         + commit 1a045b1324efabe7423a8d00245f01718ed72556
27553         * common/call-gpg.c (start_gpg): Add parameter 'gpg_arguments'.
27554         (_gpg_encrypt, gpg_encrypt_blob, gpg_encrypt_stream): Likewise.
27555         (_gpg_decrypt, gpg_decrypt_blob, gpg_decrypt_stream): Likewise.
27556         * common/call-gpg.h: Adapt prototypes.
27557         * g13/create.c (encrypt_keyblob): Adapt callsite.
27558         * g13/g13-common.h (opt): Add field 'gpg_arguments'.
27559         * g13/g13.c (main): Construct default arguments.
27560         * g13/mount.c (decrypt_keyblob): Adapt callsite.
27561         * tools/gpgtar-create.c (gpgtar_create): Likewise.
27562         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
27563         * tools/gpgtar-list.c (gpgtar_list): Likewise.
27564
27565         tools/gpgtar: Handle '--tar-args' for compatibility with gpg-zip.
27566         + commit 2eb3248058330dd5c37560d9887db5b5266c54fe
27567         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
27568         (opts): Add new group for tar options, rearrange a little, add
27569         '--tar-args'.
27570         (tar_opts): New variable.
27571         (shell_parse_stringlist): New function.
27572         (shell_parse_argv): Likewise.
27573         (parse_arguments): Add option argument, handle '--tar-args'.
27574         (main): Fix invokation of 'parse_arguments'.
27575         * tests/openpgp/gpgtar.test: Simplify decryption.
27576
27577         tools/gpgtar: Rework argument parsing.
27578         + commit 35c0c8b211bc891335e822379b33ea34fbc1f84f
27579         * tools/gpgtar.c (main): Move argument parsing into its own function.
27580
27581 2015-11-25  Justus Winter  <justus@g10code.com>
27582
27583         tests: Add tests for gpgtar and gpg-zip.
27584         + commit 556e8c44267fe3b829ca06286e9b5637ca1a6a73
27585         * tests/openpgp/Makefile.am (TESTS): Add new file.
27586         * tests/openpgp/gpgtar.test: New file.
27587
27588         tools/gpgtar: Handle '--directory' argument.
27589         + commit 127aba9a4d6c1aabb4a18a74b16d3bddc6eb5c54
27590         * tools/gpgtar-extract.c (gpgtar_extract): Only generate a directory
27591         name if none is given via arguments.
27592         * tools/gpgtar.c (enum cmd_and_opt_values): New constant.
27593         (opts): Add argument.
27594         (main): Parse argument.
27595         * tools/gpgtar.h (opt): New field 'directory'.
27596
27597         tools/gpgtar: Handle '--gpg' argument.
27598         + commit 89e104eb38c3a6896892ff09db11cb1bae2bb0d3
27599         * tools/gpgtar-create.c (gpgtar_create): Use given gpg program.
27600         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
27601         * tools/gpgtar-list.c (gpgtar_list): Likewise.
27602         * tools/gpgtar.c (enum cmd_and_opt_values): New constant.
27603         (opts): Add argument.
27604         (main): Handle argument.
27605         * tools/gpgtar.h (opt): Add field 'gpg_program'.
27606
27607         tools/gpgtar: Improve error handling.
27608         + commit f76fb047c15914ba44dc9423d235484758bcd721
27609         * tools/gpgtar-create.c (gpgtar_create): Return an error code, fix
27610         error handling.
27611         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
27612         * tools/gpgtar-list.c (read_header): Return an error code.
27613         (gpgtar_list): Return an error code, fix error handling.
27614         (gpgtar_read_header): Return an error code.
27615         * tools/gpgtar.c: Add missing include.
27616         (main): Print an generic error message if a command failed and no
27617         error has been printed yet.
27618         * tools/gpgtar.h (gpgtar_{create,extract,list,read_header}): Fix the
27619         prototypes accordingly.
27620
27621         tools: Add encryption and decryption support to gpgtar.
27622         + commit 40dbee86f3043aff8a8c2055521e270318e33068
27623         * tools/Makefile.am: Amend CFLAGS and LDADD.
27624         * tools/gpgtar-create.c (gpgtar_create): Add encrypt flag and encrypt
27625         stream if requested.
27626         * tools/gpgtar-extract.c (gpgtar_extract): Likewise for decryption.
27627         * tools/gpgtar-list.c (gpgtar_list): Likewise.
27628         * tools/gpgtar.c (main): Initialize npth and assuan.  Parse recipient
27629         and local user, and note which flags are currently ignored.  Adapt
27630         calls to gpgtar_list and friends.
27631         (tar_and_encrypt): Drop stub function and prototype.
27632         (decrypt_and_untar): Likewise.
27633         (decrypt_and_list): Likewise.
27634         * tools/gpgtar.h (gpgtar_{create,extract,list}): Add encryption or
27635         decryption argument.
27636
27637         common: Add stream interface to call-pgp.
27638         + commit 03bf88f32c8d203d5b3bfbbc48cc45e6c08cc187
27639         * common/call-gpg.c (struct writer_thread_parms): Add field 'stream'.
27640         (writer_thread_main): Support reading from a stream.
27641         (start_writer): Add stream argument.
27642         (struct reader_thread_parms): Add field 'stream'.
27643         (reader_thread_main): Support writing to a stream.
27644         (start_reader): Add stream argument.
27645         (_gpg_encrypt): Add stream api.
27646         (gpg_encrypt_blob): Adapt accordingly.
27647         (gpg_encrypt_stream): New function.
27648         (_gpg_decrypt): Add stream api.
27649         (gpg_decrypt_blob): Adapt accordingly.
27650         (gpg_decrypt_stream): New function.
27651         * common/call-gpg.h (gpg_encrypt_stream): New prototype.
27652         (gpg_decrypt_stream): Likewise.
27653
27654         common: Refactor the call-gpg code.
27655         + commit cb18d802308bde4e28219417bb4d107a4c0001b4
27656         * common/call-gpg.c (gpg_{en,de}crypt_blob): Move most of the code
27657         into two new functions, _gpg_encrypt and _gpg_decrypt.
27658
27659         g13: Move 'call-gpg.c' to common.
27660         + commit ba1a5cc17d43d9cba32447876f06a8ab8f97e5ae
27661         * common/Makefile.am (common_sources): Add files.
27662         * g13/call-gpg.c: Move to 'common' and adapt slightly.  Add a
27663         parameter to let callees override the gpg program to execute.
27664         * g13/call-gpg.h: Likewise.
27665         * g13/Makefile.am (g13_SOURCES): Drop files.
27666         * g13/create.c (encrypt_keyblob): Hand in the gpg program to execute.
27667         * g13/mount.c (decrypt_keyblob): Likewise.
27668
27669 2015-11-24  Neal H. Walfield  <neal@g10code.com>
27670
27671         gpg: When comparing keyids, use the keyid, not the fingerprint's suffix.
27672         + commit e9c16fee2576c772de9d4fb5d53fee28e4b84202
27673         * g10/keyedit.c (menu_select_key): Use spacep and hexdigitp instead of
27674         inline tests.  Don't compare P to the suffix of the fingerprint.  If P
27675         appears to be a keyid, do an exact compare against the keyid.  If it
27676         appears to be a fingerprint, do an exact compare against the
27677         fingerprint.
27678
27679 2015-11-23  Neal H. Walfield  <neal@g10code.com>
27680
27681         gpg: Reflow long texts.
27682         + commit 19362a8dd7ee986c082a5afc5a446f939991ec0f
27683         * common/stringhelp.c (format_text): New function.
27684         * common/t-stringhelp.c (stresc): New function.
27685         (test_format_text): New function.  Test format_text.
27686         * g10/tofu.c (get_trust): Use format_text to reflow long texts.
27687         (show_statistics): Likewise.
27688
27689         common: Extend utf8_charcount to include the string's length.
27690         + commit 5b84b0d660c8329e184d98682665aaea7e1703d2
27691         * common/stringhelp.c (utf8_charcount): Take additional parameter,
27692         len.  Process at most LEN bytes.
27693
27694 2015-11-23  Justus Winter  <justus@g10code.com>
27695
27696         dirmngr: Fix http lookups when libadns is used.
27697         + commit b75e1b3d8b1643640d046f7f8e89adf5b1caa7a3
27698         * dirmngr/dns-stuff.c (resolve_name_adns): Fill in the port.
27699
27700         dirmngr: Fix SRV record lookups when using the system resolver.
27701         + commit 946faaff04f3340ed6db9e89c5036dc5f9beca6a
27702         * dirmngr/dns-stuff.c (getsrv): Fix error handling.
27703
27704         dirmngr: Honor ports specified in SRV records.
27705         + commit 73c1a86ad937d7be027eece991c69aaeb6a1f092
27706         * dirmngr/ks-engine-hkp.c (struct hostinfo_s): New field 'port'.
27707         (create_new_hostinfo): Initialize 'port'.
27708         (add_host): Add host parameter and update the hosttable entry.
27709         (map_host): Return port if known, adjust calls to 'add_host'.
27710         (make_host_part): Let 'map_host' specify the port if known.
27711
27712         dirmngr: Support hkp server pools using SRV records.
27713         + commit c9f5aa15793b3c05c1b92af401b23ab34d3e6196
27714         * dirmngr/ks-engine-hkp.c (map_host): Handle SRV records.
27715
27716         dirmngr: Refactor 'map_host'.
27717         + commit 3f52f6bcacfe3877d30a21464e93e9240bc75085
27718         * dirmngr/ks-engine-hkp.c (add_host): New function.
27719         (map_host): Use the new function.
27720
27721         dirmngr: Fix pool detection.
27722         + commit 23ea641ba2a063cc99c82869061703d48bc674b2
27723         * dirmngr/ks-engine-hkp (arecords_is_pool): Fix counting IP addresses.
27724
27725         dirmngr: Refactor 'map_host'.
27726         + commit 2b43a0515868b8720009e48d7a1f32d571767f14
27727         * dirmngr/ks-engine-hkp.c (arecords_is_pool): New function.
27728         (map_host): Use the new function.
27729
27730         dirmngr: Start dirmngr on demand.
27731         + commit a9e0b1dd6c106e243e3fbbaa1838b56a1f1c8584
27732         * common/asshelp.h: Include 'util.h'.
27733         * dirmngr/dirmngr-client.c (main): Use 'start_new_dirmngr' to connect
27734         to the dirmngr.
27735         (start_dirmngr): Drop now unused declaration and function.
27736
27737 2015-11-23  Neal H. Walfield  <neal@g10code.com>
27738
27739         gpg: If sqlite is not available, don't build things depending on it.
27740         + commit 770c06ed4e6c1097d6e305a0a9427c3c783b787c
27741         * configure.ac: Define the automake conditional SQLITE3.
27742         * tests/openpgp/Makefile.am (TESTS): Move the sqlite3 dependent tests
27743         to...
27744         (sqlite3_dependent_tests): ... this new variable.  If SQLITE3 is not
27745         defined, then clear this variable.
27746
27747         gpg: Allow updating the expiration time of multiple subkeys at once.
27748         + commit b64b33bb80a8cf5dcc1fdbc62023d019fe2c8cb1
27749         * g10/keyedit.c (menu_expire): Allow updating the expiration time of
27750         multiple subkeys at once.
27751
27752         gpg: Don't crash if key is not passed an argument.
27753         + commit 19f099463c82c119288a05eaefc42bf09d617377
27754         * g10/keyedit.c (menu_select_key): Don't crash if P is NULL.
27755
27756 2015-11-20  Neal H. Walfield  <neal@g10code.com>
27757
27758         gpg: Fail if the search description passed to --gen-revoke is ambiguous.
27759         + commit 178af9c3f56d385fe28a9e5e8bde0ab34c0b260e
27760         * g10/revoke.c (gen_revoke): Error out if the search description is
27761         ambiguous.
27762
27763         gpg: Refactor print_seckey_info.
27764         + commit f8a65ac96b27a0963892892ce6e93b37b8df1ad7
27765         * g10/keylist.c (print_seckey_info): Break formatting functionality
27766         into...
27767         (format_seckey_info): ... this new function.
27768
27769         gpg: Improve an error message.
27770         + commit 46e128d44a0456dc603bc9e25a4c5d8da903b078
27771         * g10/revoke.c (gen_revoke): Provide a more descriptive error message
27772         if searching for a key fails.
27773
27774 2015-11-19  Justus Winter  <justus@g10code.com>
27775
27776         dirmngr: Improve error handling.
27777         + commit 6b14df5525777ee0330a34a7b335359f562616a4
27778         * dirmngr/crlcache.c (crl_cache_cert_isvalid): Add missing break.
27779
27780         dirmngr: Fix memory leak.
27781         + commit b223cde311e4e02f7983e33fe3d7214287dfb678
27782         * dirmngr/ldap.c (start_cert_fetch_ldap): Avoid leaking all malloc'ed
27783         arguments.
27784
27785         agent: Improve error handling.
27786         + commit a1650b1edf80c2526c0576547b3a574e8d30f1fa
27787         * agent/trustlist.c (istrusted_internal): Initialize 'err'.
27788
27789         common: Avoid undefined behavior.
27790         + commit eb957ffc4797fb019c505510295af244baf5be38
27791         * common/iobuf.c (iobuf_esopen): Initialize 'len' as 'file_es_filter'
27792         will make use of it.
27793
27794         g10: Avoid undefined behavior.
27795         + commit 52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb
27796         * g10/trust.c (clean_one_uid): Avoid a computation involving an
27797         uninitialized value.
27798
27799         scd: Improve error handling.
27800         + commit 6a37b45a7f13cf5d2ae7d6c9cd796a4bd197b80d
27801         * scd/app-openpgp.c (get_public_key): Improve error handling.
27802
27803 2015-11-18  Justus Winter  <justus@g10code.com>
27804
27805         dirmngr: Gracefully handle premature termination of TLS streams.
27806         + commit eb54fca4bf3ef8e0cd50b01df5b40e0d6d318d7e
27807         * dirmngr/http.c (close_tls_session): New function.
27808         (session_unref): Use the new function to close the TLS stream.
27809         (cookie_read): If the stream terminated prematurely, close it and
27810         return a short read.
27811
27812 2015-11-17  Neal H. Walfield  <neal@g10code.com>
27813             Michael Mönch  <michael.moench@marktjagd.de>
27814
27815         tools: Fix option parsing for gpg-zip.
27816         + commit 84ebf15b06e435453b2f58775f97a3a1c61a7e55
27817         * tools/gpg-zip.in: Correctly set GPG when --gpg is specified.
27818         Correctly set TAR when --tar is specified.  Pass TAR_ARGS to tar.
27819
27820 2015-11-17  Neal H. Walfield  <neal@g10code.com>
27821
27822         gpg: Allow selecting subkeys using a keyid.
27823         + commit 0b86c7463c8c057496b38e06c00f0ae4288dad49
27824         * g10/keyedit.c (menu_select_key): Take an additional argument, p.
27825         Update callers.  If P is a hex string, then assume that P is a key id
27826         or fingerprint and select subkeys with matching key ids or
27827         fingerprints.
27828         * doc/gpg.texi: Update documentation for the key subcommand.
27829
27830 2015-11-17  Justus Winter  <justus@g10code.com>
27831
27832         dirmngr: Fix specifying keyservers by IP address.
27833         + commit 1e3dbb15affd6d75a477aa17715d8e5470988c08
27834         * dirmngr/ks-engine-hkp.c (map_host): Update the original 'hosttable'
27835         entry instead of creating another one.
27836
27837 2015-11-17  Neal H. Walfield  <neal@g10code.com>
27838
27839         gpg: Change keydb_search to not return legacy keys.
27840         + commit 58e4a492e2c8e908d16135486ed601f602f1e38d
27841         * g10/keyring.c (keyring_search): Take new argument, ignore_legacy.
27842         If set, skip any legacy keys.  Update callers.
27843         * g10/keydb.c (keydb_search): Skip any legacy keys.
27844         (keydb_search_first): Don't skip legacy keys.  Treat them
27845         as an error.
27846         (keydb_search_next): Likewise.
27847         (keydb_search_fpr): Likewise.
27848         * g10/export.c (do_export_stream): Likewise.
27849         * g10/getkey.c (lookup): Likewise.
27850         (have_secret_key_with_kid): Likewise.
27851         * g10/keylist.c (list_all): Likewise.
27852         (keyring_rebuild_cache): Likewise.
27853         * g10/keyserver.c (keyidlist): Likewise.
27854         * g10/trustdb.c (validate_key_list): Likewise.
27855
27856         gpg: Correctly handle an error.
27857         + commit 848726f5c02faddb0b0fd24ce1a66893f5325675
27858         * g10/keyring.c (keyring_search): If a compare function returns an
27859         error, treat it as an error.
27860
27861         gpg: Correctly handle keyblocks followed by legacy keys.
27862         + commit ad9befab12376b3a49cde410996ac9f0013d0871
27863         * g10/keyring.c (keyring_get_keyblock): If we encounter a legacy
27864         packet after already having some non-legacy packets, then treat the
27865         legacy packet as a keyblock boundary, not as part of the keyblock.
27866         * g10/t-keydb-get-keyblock.c: New file.
27867         * g10/t-keydb-get-keyblock.gpg: New file.
27868         * g10/Makefile.am (EXTRA_DIST): Add t-keydb-get-keyblock.gpg.
27869         (module_tests): Add t-keydb-get-keyblock.
27870         (t_keydb_get_keyblock_SOURCES): New variable.
27871         (t_keydb_get_keyblock_LDADD): Likewise.
27872
27873         gpg: Make debugging search descriptors easier.
27874         + commit 11ec4785df1646643966d872b1b53ef675092c98
27875         * g10/keydb.c (dump_search_desc): Rename from this...
27876         (keydb_search_desc_dump): ... to this.  Only process a single search
27877         descriptor.  Improve output.  Don't mark as static.  Update callers.
27878
27879         gpg: Add function format_keyid.
27880         + commit a052c30d31c0f6b532fea081f4a9bee083f5440f
27881         * g10/options.h (opt.keyid_format): Add new value KF_DEFAULT.
27882         * g10/keyid.c (format_keyid): New function.
27883         (keystr): Use it.
27884
27885         gpg: Use a more appropriate error code.
27886         + commit eae982ed6d69644258afe9c4ad1be553853d8403
27887         * g10/gpg.c (check_user_ids): Return a more appropriate error code if
27888         a user id is ambiguous.
27889
27890 2015-11-17  Justus Winter  <justus@g10code.com>
27891
27892         Fix typos found using codespell.
27893         + commit a9e0905342e847e8961ec4fe9b3aaedf05e33423
27894         * agent/cache.c: Fix typos.
27895         * agent/call-pinentry.c: Likewise.
27896         * agent/call-scd.c: Likewise.
27897         * agent/command-ssh.c: Likewise.
27898         * agent/command.c: Likewise.
27899         * agent/divert-scd.c: Likewise.
27900         * agent/findkey.c: Likewise.
27901         * agent/gpg-agent.c: Likewise.
27902         * agent/w32main.c: Likewise.
27903         * common/argparse.c: Likewise.
27904         * common/audit.c: Likewise.
27905         * common/audit.h: Likewise.
27906         * common/convert.c: Likewise.
27907         * common/dotlock.c: Likewise.
27908         * common/exechelp-posix.c: Likewise.
27909         * common/exechelp-w32.c: Likewise.
27910         * common/exechelp-w32ce.c: Likewise.
27911         * common/exechelp.h: Likewise.
27912         * common/helpfile.c: Likewise.
27913         * common/i18n.h: Likewise.
27914         * common/iobuf.c: Likewise.
27915         * common/iobuf.h: Likewise.
27916         * common/localename.c: Likewise.
27917         * common/logging.c: Likewise.
27918         * common/openpgp-oid.c: Likewise.
27919         * common/session-env.c: Likewise.
27920         * common/sexputil.c: Likewise.
27921         * common/sysutils.c: Likewise.
27922         * common/t-sexputil.c: Likewise.
27923         * common/ttyio.c: Likewise.
27924         * common/util.h: Likewise.
27925         * dirmngr/cdblib.c: Likewise.
27926         * dirmngr/certcache.c: Likewise.
27927         * dirmngr/crlcache.c: Likewise.
27928         * dirmngr/dirmngr-client.c: Likewise.
27929         * dirmngr/dirmngr.c: Likewise.
27930         * dirmngr/dirmngr_ldap.c: Likewise.
27931         * dirmngr/dns-stuff.c: Likewise.
27932         * dirmngr/http.c: Likewise.
27933         * dirmngr/ks-engine-hkp.c: Likewise.
27934         * dirmngr/ks-engine-ldap.c: Likewise.
27935         * dirmngr/ldap-wrapper.c: Likewise.
27936         * dirmngr/ldap.c: Likewise.
27937         * dirmngr/misc.c: Likewise.
27938         * dirmngr/ocsp.c: Likewise.
27939         * dirmngr/validate.c: Likewise.
27940         * g10/encrypt.c: Likewise.
27941         * g10/getkey.c: Likewise.
27942         * g10/gpg.c: Likewise.
27943         * g10/gpgv.c: Likewise.
27944         * g10/import.c: Likewise.
27945         * g10/keydb.c: Likewise.
27946         * g10/keydb.h: Likewise.
27947         * g10/keygen.c: Likewise.
27948         * g10/keyid.c: Likewise.
27949         * g10/keylist.c: Likewise.
27950         * g10/keyring.c: Likewise.
27951         * g10/mainproc.c: Likewise.
27952         * g10/misc.c: Likewise.
27953         * g10/options.h: Likewise.
27954         * g10/packet.h: Likewise.
27955         * g10/parse-packet.c: Likewise.
27956         * g10/pkclist.c: Likewise.
27957         * g10/pkglue.c: Likewise.
27958         * g10/plaintext.c: Likewise.
27959         * g10/server.c: Likewise.
27960         * g10/sig-check.c: Likewise.
27961         * g10/sqlite.c: Likewise.
27962         * g10/tdbio.c: Likewise.
27963         * g10/test-stubs.c: Likewise.
27964         * g10/tofu.c: Likewise.
27965         * g10/trust.c: Likewise.
27966         * g10/trustdb.c: Likewise.
27967         * g13/create.c: Likewise.
27968         * g13/mountinfo.c: Likewise.
27969         * kbx/keybox-blob.c: Likewise.
27970         * kbx/keybox-file.c: Likewise.
27971         * kbx/keybox-init.c: Likewise.
27972         * kbx/keybox-search-desc.h: Likewise.
27973         * kbx/keybox-search.c: Likewise.
27974         * kbx/keybox-update.c: Likewise.
27975         * scd/apdu.c: Likewise.
27976         * scd/app-openpgp.c: Likewise.
27977         * scd/app-p15.c: Likewise.
27978         * scd/app.c: Likewise.
27979         * scd/ccid-driver.c: Likewise.
27980         * scd/command.c: Likewise.
27981         * scd/iso7816.c: Likewise.
27982         * sm/base64.c: Likewise.
27983         * sm/call-agent.c: Likewise.
27984         * sm/call-dirmngr.c: Likewise.
27985         * sm/certchain.c: Likewise.
27986         * sm/gpgsm.c: Likewise.
27987         * sm/import.c: Likewise.
27988         * sm/keydb.c: Likewise.
27989         * sm/minip12.c: Likewise.
27990         * sm/qualified.c: Likewise.
27991         * sm/server.c: Likewise.
27992         * tools/gpg-check-pattern.c: Likewise.
27993         * tools/gpgconf-comp.c: Likewise.
27994         * tools/gpgkey2ssh.c: Likewise.
27995         * tools/gpgparsemail.c: Likewise.
27996         * tools/gpgtar.c: Likewise.
27997         * tools/rfc822parse.c: Likewise.
27998         * tools/symcryptrun.c: Likewise.
27999
28000 2015-11-16  Neal H. Walfield  <neal@g10code.com>
28001
28002         gpg: Fix error checking and improve error reporting.
28003         + commit 8e2bea22b0927f4f95a248cc7517f407a705d8a8
28004         * g10/gpg.c (check_user_ids): Differentiate between a second result
28005         and an error.  If the key specification is ambiguous or an error
28006         occurs, set RC appropriately.
28007
28008 2015-11-14  Werner Koch  <wk@gnupg.org>
28009
28010         gpg: Use only one fingerprint formatting function.
28011         + commit 3689c2105aab6a4304e9464c5b20207d69b9a133
28012         * g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): New.
28013         * g10/keyid.c (hexfingerprint): Add optional args BUFFER and BUFLEN.
28014         Change all callers.
28015         (format_hexfingerprint): New.
28016         * g10/keylist.c (print_fingerprint): Change to use hexfingerprint.
28017         * g10/tofu.c (fingerprint_format): Remove.  Replace calls by
28018         format_hexfingerprint.
28019
28020 2015-11-13  Werner Koch  <wk@gnupg.org>
28021
28022         gpg: Simplify the tofu interface by using the public key packet.
28023         + commit e7d7160ab7cd4e6b460bfe36fd3a7275adadb4e2
28024         * g10/tofu.c (fingerprint_str): Remove.
28025         (tofu_register): Take a public key instead of a fingerprint as arg.
28026         Use hexfingerprint() to get a fpr from the PK.
28027         (tofu_get_validity): Ditto.
28028         (tofu_set_policy, tofu_get_policy): Simplify by using hexfingerprint.
28029         * g10/trustdb.c (tdb_get_validity_core): Pass the primary key PK to
28030         instead of the fingerprint to the tofu functions.
28031
28032         gpg: Make trusted-key override for Tofu robust against swapped tofu.db.
28033         + commit 7de8376430625c1f6f3a58ae16276deca8ff6a82
28034         * g10/tofu.c (get_trust): For the UTK check lookup the key by
28035         fingerprint.
28036
28037         gpg: Fix regression in --locate-keys (in 2.1.9).
28038         + commit 7e59fb21f728b5f54468cd35b1415a2f86003d4f
28039         * g10/getkey.c (getkey_ctx_s): Add field "extra_list".
28040         (get_pubkey_byname): Store strings in the context.
28041         (getkey_end): Free EXTRA_LIST.
28042
28043 2015-11-12  Werner Koch  <wk@gnupg.org>
28044
28045         gpg: Print a new EXPORTED status line.
28046         + commit 2038adf16d0e7eeb614043aae17b16a867de6b70
28047         * common/status.h (STATUS_EXPORTED): New.
28048         * g10/export.c (print_status_exported): New.
28049         (do_export_stream): Call that function.
28050
28051         gpg: Print export statistics to the status-fd.
28052         + commit e3c48335f9c5081c6080bceafa7a04140403427a
28053         * common/status.h (STATUS_EXPORT_RES): New.
28054         * g10/main.h (export_stats_t): New.
28055         * g10/export.c (export_stats_s): New.
28056         (export_new_stats, export_release_stats): New.
28057         (export_print_stats): New.
28058         (export_pubkeys, export_seckeys, export_secsubkeys)
28059         (export_pubkey_buffer, do_export): Add arg "stats".
28060         (do_export_stream): Add arg stats and update it.
28061         * g10/gpg.c (main) <aExport, aExportSecret, aExportSecretSub>: Create,
28062         pass, and print a stats object to the export function calls.
28063
28064         * g10/export.c (export_pubkeys_stream): Remove unused function.
28065
28066         dirmngr: Do not block during ADNS calls.
28067         + commit a3b26d6c0839ec18d1dc226bb537d5067c86d574
28068         * dirmngr/dns-stuff.c: Include npth.h
28069         (my_unprotect, my_protect): New wrapper.
28070         (resolve_name_adns): Put unprotect/protect around adns calls.
28071         (get_dns_cert): Ditto.
28072         (getsrv): Ditto.
28073         (get_dns_cname): Ditto.
28074
28075         dirmngr: New option --nameserver.
28076         + commit a2cc1d57552ccac7b2f9a0c6423b171b2a168b2a
28077         * dirmngr/dirmngr.c (oNameServer): New.
28078         (opts): Add --nameserver.
28079         (parse_rereadable_options): Act upon oNameServer.
28080         * dirmngr/dns-stuff.c (DEFAULT_NAMESERVER): New.
28081         (tor_nameserver): New.
28082         (set_dns_nameserver): New.
28083         (my_adns_init): Make name server configurable.
28084
28085 2015-11-11  Neal H. Walfield  <neal@g10code.com>
28086
28087         gpg: Fix cache consistency problem.
28088         + commit 7546e818791988c00b8635dab5b899265d8d9f42
28089         g10/keyring.c (keyring_search): Only mark the cache as completely
28090         filled if we start the scan from the beginning of the keyring.
28091
28092 2015-11-10  Neal H. Walfield  <neal@g10code.com>
28093
28094         gpg: Default to the the PGP trust model.
28095         + commit 67c701d1e53f56305e3b8771c683c45bb9672305
28096         * g10/trustdb.c (init_trustdb): If we can't read the trust model from
28097         the trust DB, default to TM_PGP, not TM_TOFU_PGP.
28098
28099         gpg: Default to the flat TOFU DB format.
28100         + commit 951f277b6bf8178560105538d38e2a07a96865bd
28101         * g10/tofu.c (opendbs): If the TOFU DB format is set to auto and there
28102         is no TOFU DB, default to the flat format.
28103
28104 2015-11-09  Werner Koch  <wk@gnupg.org>
28105
28106         dirmngr: Change to new ADNS Tor mode init scheme.
28107         + commit 288c9919dc45496b2380eeac487a8539692d6842
28108         * dirmngr/dns-stuff.c (tor_credentials): New.
28109         (enable_dns_tormode): Add arg new_circuit and update tor_credentials.
28110         (my_adns_init): Rework to set Tor mode using a config file options and
28111         always use credentials.
28112         * dirmngr/server.c (cmd_dns_cert): Improve error message.
28113         * dirmngr/t-dns-stuff.c (main): Add option --new-circuit.
28114
28115         dirmngr: Improve detection of ADNS.
28116         + commit f92e95175e90120362a7d6376fb32307e11267b5
28117         * configure.ac (HAVE_ADNS_FREE): New ac_define.
28118
28119 2015-11-09  NIIBE Yutaka  <gniibe@fsij.org>
28120
28121         scd: Add reder information to --card-status.
28122         + commit bce0e3f71df0709a7d323a688ddf2690c1727a6c
28123         * g10/call-agent.h, g10/call-agent.c (agent_release_card_info)
28124         g10/card-util.c (card_status): Add READER.
28125         * scd/apdu.c (close_ccid_reader, open_ccid_reader): Handle RDRNAME.
28126         (apdu_get_reader_name): New.
28127         * scd/ccid-driver.c (ccid_open_reader): Add argument to RDRNAME_P.
28128         * scd/command.c (cmd_learn): Return READER information.
28129
28130 2015-11-06  Werner Koch  <wk@gnupg.org>
28131
28132         gpg: Avoid new strings.
28133         + commit 2242658efe0c975a46c3316bc9171ddbce085e2c
28134         * g10/decrypt-data.c (decrypt_data): Use already translated strings.
28135
28136         common: Fix commit f99830b.
28137         + commit 20125333e7b822e8c70ac8cef986649f0654eb56
28138         * common/userids.c (classify_user_id): Avoid underflow.  Use spacep to
28139         also trim tabs.
28140
28141 2015-11-06  Neal H. Walfield  <neal@g10code.com>
28142
28143         gpg: Fix formatting string.
28144         + commit 28e198201e580b39bceb9c151df07fc0e936a91d
28145         * g10/decrypt-data.c (decrypt_data): Fix formatting string.
28146
28147         gpg: Add new option --only-sign-text-ids.
28148         + commit a74aeb5dae1f673fcd98b39a6a0496f3c622709a
28149         * g10/options.h (opt): Add field only_sign_text_ids.
28150         * g10/gpg.c (enum cmd_and_opt_values): Add value oOnlySignTextIDs.
28151         (opts): Handle oOnlySignTextIDs.
28152         (main): Likewise.
28153         * g10/keyedit.c (sign_uids): If OPT.ONLY_SIGN_TEXT_IDS is set, don't
28154         select non-text based IDs automatically.
28155         (keyedit_menu): Adapt the prompt asking to sign all user ids according
28156         to OPT.ONLY_SIGN_TEXT_IDS.
28157         * doc/gpg.texi: Document the new option --only-sign-text-ids.
28158
28159         common: When classifying keyids and fingerprints, reject trailing junk.
28160         + commit f99830b72812395da5451152bdd2f2d90a7cb7fb
28161         * common/userids.c (classify_user_id): Trim any trailing whitespace.
28162         Before assuming that a hexstring corresponds to a key id or
28163         fingerprint, make sure that it is NUL terminated.
28164
28165         gpg: Check for ambiguous or non-matching key specs.
28166         + commit e8c53fca954d33366e3494a6d4eecc3868282bcc
28167         * g10/gpg.c (check_user_ids): New function.
28168         (main): Check that any user id specifications passed to --local-user
28169         and --remote-user correspond to exactly 1 user.  Check that any user
28170         id specifications passed to --default-key correspond to at most 1
28171         user.  Warn if any user id specifications passed to --local-user or
28172         --default-user are possible ambiguous (are not specified by long keyid
28173         or fingerprint).
28174         * g10/getkey.c (parse_def_secret_key): Don't warn about possible
28175         ambiguous key descriptions here.
28176
28177         common: Add new function strlist_rev.
28178         + commit f38bac8883ea2e9ed8e2836f97a953efb85e774c
28179         * common/strlist.c (strlist_rev): New function.
28180         * common/t-strlist.c: New file.
28181         * common/Makefile.am (common_sources): Add strlist.c and strlist.h.
28182         (module_tests): Add t-strlist.
28183         (t_strlist_LDADD): New variable.
28184
28185         common: Include required, but not included headers in t-support.h.
28186         + commit 23e163473f050d1f2c08f589beb9dab283b7d624
28187         * common/t-support.h: Include <stdlib.h> and <stdio.h>.
28188
28189 2015-11-05  Neal H. Walfield  <neal@g10code.com>
28190
28191         gpg: Indicate which characters are invalid.
28192         + commit a958ffd148a46f3757d1c309bb13555638044640
28193         * g10/keygen.c (ask_user_id): Indicate which characters are invalid.
28194
28195         gpg: Add support for unwrapping the outer level of encryption.
28196         + commit ec409e62aea6cc829299be794f9d035d033cb51b
28197         * g10/decrypt-data.c (decrypt_data): If OPT.UNWRAP_ENCRYPTION is set,
28198         copy the data to the output file instead of continuing to process it.
28199         * g10/gpg.c (enum cmd_and_opt_values): Add new value oUnwrap.
28200         (opts): Handle oUnwrap.
28201         (main): Likewise.
28202         * g10/options.h (opt): Add field unwrap_encryption.
28203         * g10/plaintext.c (handle_plaintext): Break the output file selection
28204         functionality into ...
28205         (get_output_file): ... this new function.
28206
28207         common: Add a function for copying data from one iobuf to another.
28208         + commit fd4b9e232805b2e30b29903568c95cc0aad8bbec
28209         * common/iobuf.c (iobuf_copy): New function.
28210
28211         doc: Note that gpgkey2ssh is deprecated.
28212         + commit 2b0e0a53b4db8c44e299f57a9f4f9fc1b825e707
28213         * doc/tools.texi (gpgkey2ssh): Note that gpgkey2ssh is deprecated.
28214
28215         tools: Fix gpgkey2ssh's most gratuitous errors.  Use gpg2, not gpg.
28216         + commit cd2d685230ecafb7df504ef2b16cf1ec9a014300
28217         * tools/gpgkey2ssh.c (main): Add support for --help.  Replace the most
28218         gratuitous asserts with error messages.  Invoke gpg2, not gpg.
28219
28220 2015-11-05  Neal H. Walfield  <neal@g10code.com>
28221             Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
28222
28223         doc: Add documentation for gpgkey2ssh.
28224         + commit 2b27acc3435e73fad7460b551a36b4064cdd58be
28225         * doc/tools.texi: Add documentation for gpgkey2ssh.
28226
28227 2015-11-04  Neal H. Walfield  <neal@g10code.com>
28228
28229         gpg: Print a better error message for --multifile --sign --encrypt.
28230         + commit 6897bbf1aa9bf0a61b186ea1a9bcb463fb1fd10e
28231         * g10/gpg.c (main): Print a better error message for --multifile
28232         --sign --encrypt.
28233
28234         gpg: Add --encrypt-to-default-key.
28235         + commit de9b2340153d70b083494d1a277a384dcf43bff0
28236         * g10/getkey.c (parse_def_secret_key): Drop the static qualifier and
28237         export the function.
28238         * g10/gpg.c (enum cmd_and_opt_values): Add value oEncryptToDefaultKey.
28239         (opts): Handle oEncryptToDefaultKey.
28240         (main): Likewise.
28241         * g10/options.h (opt): Add field encrypt_to_default_key.
28242
28243         gpg: Allow multiple --default-key options.  Take the last available key.
28244         + commit e16d7168c54e5f7bc2f0037806ee4f730930eaf0
28245         * g10/getkey.c (parse_def_secret_key): New function.
28246         (get_seckey_default): Add parameter ctrl.  Update callers.  Use
28247         parse_def_secret_key to get the default secret key, if any.
28248         (getkey_byname): Likewise.
28249         (enum_secret_keys): Likewise.
28250         * g10/options.h (opt): Change def_secret_key's type from a char * to a
28251         strlist_t.
28252         * g10/gpg.c (main): When processing --default-key, add the key to
28253         OPT.DEF_SECRET_KEY.
28254         * g10/gpgv.c (get_session_key): Add parameter ctrl.  Update callers.
28255         * g10/mainproc.c (proc_pubkey_enc): Likewise.
28256         (do_proc_packets): Likewise.
28257         * g10/pkclist.c (default_recipient): Likewise.
28258         * g10/pubkey-enc.c (get_session_key): Likewise.
28259         * g10/sign.c (clearsign_file): Likewise.
28260         (sign_symencrypt_file): Likewise.
28261         * g10/skclist.c (build_sk_list): Likewise.
28262         * g10/test-stubs.c (get_session_key): Likewise.
28263
28264 2015-11-04  NIIBE Yutaka  <gniibe@fsij.org>
28265
28266         scd: Fix error handling with libusb-compat library.
28267         + commit 1e94a672efb8bf66f416bc63bf6670e509a21fe5
28268         * scd/ccid-driver.c (bulk_out): Use LIBUSB_ERRNO_NO_SUCH_DEVICE.
28269
28270         scd: fix change_keyattr.
28271         + commit c5a9fedba66361ddd9f596528882750068543298
28272         * scd/app-openpgp.c (change_keyattr_from_string): Fix parsing.
28273
28274 2015-11-03  Werner Koch  <wk@gnupg.org>
28275
28276         gpg: Change out of core error message.
28277         + commit 44ad9f29d43f40bbc1840454880f4af3df1c5295
28278         * g10/tofu.c (fingerprint_str): Die with the error code returned by
28279         the failed function.
28280         (time_ago_str): Ditto.  Do not make a comma translatable.
28281         (fingerprint_format): Use "%zu" for a size_t.
28282
28283         gpg: Make translation easier.
28284         + commit 62b8cd5495dcac9a0f8a3d88c7bd4cd80997fd3f
28285         * g10/import.c (import_secret_one): Split info string for easier
28286         translation.
28287
28288 2015-11-03  Neal H. Walfield  <neal@g10code.com>
28289
28290         gpg: Also show when the most recently signed message was observed.
28291         + commit 621afac37e5555fd68054531e611ead444b62928
28292         * g10/tofu.c (show_statistics): Also show when the most recently
28293         signed message was observed.
28294
28295         gpg: Split a utility function out of a large function.
28296         + commit 36326112290b6eef47c9dada30dddbdf408680e4
28297         * g10/tofu.c (show_statistics): Break the time delta to string code
28298         into...
28299         (time_ago_str): ... this new function.
28300
28301         gpg: Fix message formatting.
28302         + commit c8ef9f9a64d13ea8b9b4ade62525243abe2976ba
28303         * g10/tofu.c (get_trust): Fix message formatting.
28304
28305         gpg: Don't store formatting fingerprints in the TOFU DB.
28306         + commit 8ae3946d28c43e30ef692ba6cf1a7fa4ed65ecc5
28307         * g10/tofu.c (fingerprint_pp): Split this function into...
28308         (fingerprint_str): ... this function...
28309         (fingerprint_format): ... and this function.
28310         (record_binding): Store the unformatted fingerprint in the DB.  Only
28311         use the formatting fingerprint when displaying a message to the user.
28312         (get_trust): Likewise.
28313         (show_statistics): Likewise.
28314         (tofu_register): Likewise.
28315         (tofu_get_validity): Likewise.
28316         (tofu_set_policy): Likewise.
28317         (tofu_get_policy): Likewise.
28318
28319 2015-11-02  NIIBE Yutaka  <gniibe@fsij.org>
28320
28321         g10: notify a user when importing stub is skipped.
28322         + commit 06f3eadb22986d9ebde9efff2794eb1d45d6c6d4
28323         * g10/import.c (transfer_secret_keys): Return GPG_ERR_NOT_PROCESSED
28324         when stub_key_skipped.
28325         (import_secret_one): Notify a user, suggesting --card-status.
28326
28327 2015-10-31  Neal H. Walfield  <neal@g10code.com>
28328
28329         gpg: Consider newlines to be whitespace in an SQL statement.
28330         + commit 18cd09246f5dcddcafb8662afd84fa046e36de3f
28331         * g10/sqlite.c (sqlite3_stepx): When making sure that there is no
28332         second SQL statement, ignore newlines.
28333
28334 2015-10-30  Werner Koch  <wk@gnupg.org>
28335
28336         common: Improve t-zb32 to be used for manual encoding.
28337         + commit d89a9fca46d9bba497dde0793b57217c800b0e8d
28338         * common/t-support.h (no_exit_on_fail, errcount): New.
28339         (fail): Bump errcount.
28340         * common/t-zb32.c (main): Add options to allow manual use.
28341
28342         common: Add separate header for zb32.c.
28343         + commit 5aadb4b62d26e1bfb40a1ce444a81c2a5a56159c
28344         * common/util.h (zb32_encode): Move prototype to ...
28345         * common/zb32.h: new.  Include this for all callers of zb32_encode.
28346
28347 2015-10-29  Neal H. Walfield  <neal@g10code.com>
28348
28349         gpg: Display the correct error message.
28350         + commit 641df615da4937b0073c420a0503c5810c237972
28351         * g10/trustdb.c (validate_keys): If tdbio_update_version_record fails,
28352         RC does not contain the error code.  Save the error code in rc2 and
28353         use that.
28354
28355         gpg: Eliminate a memory leak.
28356         + commit d68bdc553a206e54234d5d53ad35c4ba34133118
28357         * g10/trustdb.c (validate_key_list): Don't leak the keyblocks on
28358         failure.
28359
28360         gpg: Remove unused prototype.
28361         + commit ef052591ba51ee16bafc3c5b79d837ed8f01b520
28362         g10/keyring.h (keyring_locate_writable): Remove unused prototype.
28363
28364         gpg: Eliminate a memory leak.
28365         + commit 89eee5f6b7ca3da7ebdcc3e5d069701d0834b39e
28366         * g10/gpg.c (main): Don't leak OPT.DEF_RECIPIENT.
28367
28368         gpg: Fix keyring support.
28369         + commit 99c84b49b787dab8da26cf61eed24dd4a2b77fd9
28370         * g10/keydb.c (keydb_rebuild_caches): Only mark the cached as prepared
28371         if it is actually prepared, which it only is if the resource is a
28372         keybox.
28373
28374         gpg: Change sqlite3_stepx to pass the sqlite3_stmt * to the callback.
28375         + commit 421827424fe87855307fe3e803b42ffa02738600
28376         * g10/sqlite.h (enum sqlite_arg_type): Add SQLITE_ARG_BLOB.
28377         (sqlite3_stepx_callback): New declaration.
28378         (sqlite3_stepx): Change the callback's type to sqlite3_stepx_callback,
28379         which passes an additional parameter, the sqlite3_stmt *.  Update
28380         users.
28381
28382         gpg: Move sqlite helper functions into their own file.
28383         + commit 351f4213e192aa11500c0c590d11183edbe326c5
28384         * g10/tofu.c (sqlite3_exec_printf): Move from here...
28385         * g10/sqlite.c (sqlite3_exec_printf): ... to this new file.  Don't
28386         mark as static.
28387         * g10/tofu.c (sqlite3_stepx): Move from here...
28388         * g10/sqlite.c (sqlite3_stepx): ... to this new file.  Don't
28389         mark as static.
28390         * g10/tofu.c (enum sqlite_arg_type): Move from here...
28391         * g10/sqlite.h (enum sqlite_arg_type): ... to this new file.
28392
28393 2015-10-29  NIIBE Yutaka  <gniibe@fsij.org>
28394
28395         doc: Don't install gpg-zip.1.
28396         + commit d25e29ad9374da1c11ccfc38f392dbab2d707042
28397         * doc/Makefile.am (myman_pages): Remove gpg-zip.1.
28398         (DISTCLEANFILES): Add gpg-zip.1.
28399
28400 2015-10-28  Werner Koch  <wk@gnupg.org>
28401
28402         sm: Allow combination of usage flags --gen-key.
28403         + commit 8b6c83dcb086ef09b2676e4d5b0111c88b7b8bf8
28404         * sm/certreqgen.c (create_request): Re-implement building of the
28405         key-usage extension.
28406
28407 2015-10-28  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
28408
28409         doc: Document some changed default options.
28410         + commit e095a3fcf2ccc6cc4e258111dc395558069a1164
28411         * doc/gpg.texi: Update the description of some options which are
28412           now enabled by default.
28413
28414 2015-10-28  Werner Koch  <wk@gnupg.org>
28415
28416         dirmngr: Fix NULL-deref while loading a CRL.
28417         + commit fa15a71daff8414bf4112bc2826dc495ff2fb01f
28418         * dirmngr/crlcache.c (crl_parse_insert): Set error before leaping to
28419         failure.
28420
28421         dirmngr: Minor cleanup of the SRV RR code.
28422         + commit 949a5cfdabcafab93c1ac092c0459b59318805b9
28423         * dirmngr/dns-stuff.c: Include unistd.h.
28424         (getsrv): Run srand only once.
28425         * dirmngr/t-dns-stuff.c (main): Allow passing another name for --srv
28426         and change output format.
28427
28428         dirmngr: Add a getaddrinfo wrapper backend using ADNS.
28429         + commit e026efb4363bc6e3c41ed533daf06f103ebd2e32
28430         * dirmngr/dns-stuff.c: Replace all use of default_errsource.
28431         (my_adns_init): Move to top.
28432         (resolve_name_adns): New.
28433         (resolve_dns_name) [USE_ADNS]: Divert to new func.
28434
28435 2015-10-26  Werner Koch  <wk@gnupg.org>
28436
28437         gpg: Do not call an extra get_validity if no-show-uid-validity is used.
28438         + commit a6c2c098435a703ca02abf651ff4fa45e5a4db9a
28439         * g10/mainproc.c (check_sig_and_print): Do not call the informational
28440         get_validity if we are not going to use it.
28441
28442 2015-10-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
28443
28444         gpg: Ensure all weak digest rejection notices are shown.
28445         + commit 91015d021b3dcbe21ad0e580a4f34c523abf9e72
28446         * g10/main.h: Add rejection_shown flag to each weakhash struct
28447         * g10/misc.c (print_digest_algo_note, additional_weak_digest): Do not
28448         treat MD5 separately; (print_digest_rejected_note): Use
28449         weakhash.rejection_shown instead of static shown.
28450         * g10/options.h (opt): Change from additional_weak_digests to
28451         weak_digests.
28452         * g10/sig-check.c: Do not treat MD5 separately.
28453         * g10/gpg.c (main): Explicitly set MD5 as weak.
28454         * g10/gpgv.c (main): Explicitly set MD5 as weak.
28455
28456 2015-10-26  Werner Koch  <wk@gnupg.org>
28457
28458         w32: Make it build again if Tofu support is not available.
28459         + commit 0d37a40fc34519e93af3ceffff2cd726d29576d3
28460         * g10/keylist.c (public_key_list) [!USE_TOFU]: Do not call tofu
28461         functions.
28462
28463         dirmngr: Support Tor hidden services.
28464         + commit 4524a2a3714f263d56bb7db349c169b456994fd9
28465         * dirmngr/dns-stuff.c (is_onion_address): New.
28466         * dirmngr/ks-engine-hkp.c (hostinfo_s): Add field "onion".
28467         (map_host): Special case onion addresses.
28468         (ks_hkp_print_hosttable): Print an 'O' for an onion address.
28469         * dirmngr/http.c (connect_server): Special case onion addresses.
28470
28471         dirmngr,w32: Remove gethostbyname hack and make it build again.
28472         + commit 7735bbe539af35ce16e270946d5ae798c5989d6e
28473         * dirmngr/http.c (connect_server) [W32]: Remove gethostbyname hack;
28474         we require getaddrinfo anyway.
28475         * dirmngr/dns-stuff.c (AI_ADDRCONFIG): Add replacement if not defined.
28476         (map_eai_to_gpg_error) [W32]: Take care of unsupported codes.
28477
28478 2015-10-26  Neal H. Walfield  <neal@g10code.com>
28479
28480         gpg: Make sure we only have a single SQL statement.
28481         + commit c18fb0d99b633bb267dead6e7c46229f4b780bc3
28482         * g10/tofu.c (sqlite3_stepx): Make sure SQL only contains a single SQL
28483         statement.
28484
28485         gpg: When the TOFU DB is in batch mode, periodically drop the locks.
28486         + commit 5b0ed7674dc718ee98e0c80aa93ce014f2b51411
28487         * g10/tofu.c: Include <sched.h>.
28488         (batch_update_started): New variable.
28489         (begin_transaction): If we've been in batch mode for a while, then
28490         commit any extant batch transactions.
28491         (tofu_begin_batch_update): If we are not in batch mode, initialize
28492         batch_update_started.
28493
28494 2015-10-25  Werner Koch  <wk@gnupg.org>
28495
28496         dirmngr: Add workaround for broken getaddrinfo.
28497         + commit 5e7ac031f513ad3b60e4f092fa72b3bec0676515
28498         * dirmngr/dns-stuff.c (resolve_name_standard): On failure retry by
28499         first resolving the CNAME.
28500         (get_dns_cname): New.
28501
28502         * dirmngr/t-dns-stuff.c (main): Add option --cname.
28503
28504         dirmngr: Better handle systems without IPv6 or IPv4.
28505         + commit 0e3c9f184a5fb3e41277700d690febc2eee9600a
28506         * dirmngr/dns-stuff.c (resolve_name_standard): Use AI_ADDRCONFIG.
28507
28508         dirmngr: Replace use of getnameinfo by resolve_dns_addr.
28509         + commit 927f34603d942868af6a7bd0f347681bbad76a94
28510         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Remove.
28511         (map_host): Use resolve_dns_addr.
28512
28513         dirmngr: Implement a getnameinfo wrapper.
28514         + commit 816505958ac4308ee0dfe787d1b706982428b6cc
28515         * dirmngr/dns-stuff.h (DNS_NUMERICHOST): New.
28516         (DNS_WITHBRACKET): New.
28517         * dirmngr/dns-stuff.c (resolve_name_standard): Factor code out to...
28518         (map_eai_to_gpg_error): new.
28519         (resolve_addr_standard): New.
28520         (resolve_dns_addr): New.
28521
28522         * dirmngr/ks-engine-hkp.c (is_ip_address): Move to ...
28523         * dirmngr/dns-stuff.c (is_ip_address): here.  Add support for non
28524         bracketed v6 addresses.
28525
28526         * dirmngr/t-dns-stuff.c: Remove header netdb.h.
28527         (main): Add option --bracket.  Use resolve_dns_name instead of
28528         getnameinfo.
28529
28530 2015-10-23  Neal H. Walfield  <neal@g10code.com>
28531
28532         gpg: Provide an interface to patch TOFU updates.
28533         + commit 7f65e84ac035e8f7a25639a6b09eb6000115e337
28534         * g10/tofu.c (struct db): Rename begin_transaction to savepoint_batch.
28535         Rename end_transaction to savepoint_batch_commit.  Update users.
28536         Remove field rollback.  Add fields savepoint_inner and
28537         savepoint_inner_commit.  Add field batch_update.
28538         (dump_cache): New function.
28539         (batch_update): New variable.
28540         (begin_transaction). New function.
28541         (end_transaction): New function.
28542         (rollback_transaction): New function.
28543         (tofu_begin_batch_update): New function.
28544         (tofu_end_batch_update): New function.
28545         (closedb): End any pending batch transaction.
28546         (closedbs): Assert that none of the DBs have a started batch
28547         transaction if we not in batch mode.
28548         (record_binding): Use the begin_transaction, end_transaction and
28549         rollback_transaction functions instead of including the SQL inline.
28550         Also start a batch mode transaction if we are using the flat format.
28551         (tofu_register): Use the begin_transaction, end_transaction and
28552         rollback_transaction functions instead of including the SQL inline.
28553         * g10/gpgv.c (tofu_begin_batch_update): New function.
28554         (tofu_end_batch_update): New function.
28555         * g10/test-stubs.c (tofu_begin_batch_update): New function.
28556         (tofu_end_batch_update): New function.
28557
28558         gpg: Cache prepared SQL queries and open DB connections.
28559         + commit 297cf8660ce346638e42934d84d746768f8bb10a
28560         * g10/tofu.c: Include <stdarg.h>.
28561         (prepares_saved) [DEBUG_TOFU_CACHE]: New variable.
28562         (queries) [DEBUG_TOFU_CACHE]: New variable.
28563         (struct db): Add fields prevp, begin_transaction, end_transaction,
28564         rollback, record_binding_get_old_policy, record_binding_update,
28565         record_binding_update2, get_policy_select_policy_and_conflict,
28566         get_trust_bindings_with_this_email, get_trust_gather_other_user_ids,
28567         get_trust_gather_other_keys, register_already_seen, and
28568         register_insert.
28569         [DEBUG_TOFU_CACHE]: Add field hits.
28570         (STRINGIFY): New macro.
28571         (STRINGIFY2): New macro.
28572         (enum sqlite_arg_type): New enum.
28573         (sqlite3_stepx): New function.
28574         (combined_db): Remove variable.
28575         (opendb): Don't cache the combined db.
28576         (struct dbs): New struct.  Update users to use this as the head of the
28577         local DB list rather than overloading struct db.
28578         (unlink_db): New function.
28579         (link_db): New function.
28580         (db_cache): New variable.
28581         (db_cache_count): New variable.
28582         (DB_CACHE_ENTRIES): Define.
28583         (getdb): If the dbs specific cache doesn't include the DB, look at
28584         DB_CACHE.  Only if that also doesn't include the DB open the
28585         corresponding DB.
28586         (closedb): New function.
28587         (opendbs): Don't open the combined DB.  Just return an initialized
28588         struct dbs.
28589         (closedbs): Don't close the dbs specific dbs.  Attach them to the
28590         front of DB_CACHE.  If DB_CACHE contains more than DB_CACHE_ENTRIES,
28591         close enough dbs from the end of the DB_CACHE list such that DB_CACHE
28592         only contains DB_CACHE_ENTRIES.  Don't directly close the dbs, instead
28593         use the new closedb function.
28594         [DEBUG_TOFU_CACHE]: Print out some statistics.
28595         (record_binding): Use sqlite3_stepx instead of sqlite3_exec or
28596         sqlite3_exec_printf.
28597         (get_policy): Likewise.
28598         (get_trust): Likewise.
28599         (tofu_register): Likewise.
28600
28601         gpg: Return the DBs meta-handle rather than the sqlite3 handle.
28602         + commit cd879d4bd69a578be5a1ff96497f8c1181885563
28603         * g10/tofu.c (getdb): Return a struct db * instead of an sqlite *.
28604         Update users.
28605
28606         gpg: Use the proper type.
28607         + commit 3c4c89cc35280164b509977c5288b0a06d6f530e
28608         * g10/options.h: Include "tofu.h".
28609         (opt.tofu_default_policy): Change type to enum tofu_policy.
28610         * g10/gpgv.c (enum tofu_policy): Don't redeclare.
28611         * g10/test-stubs.c (enum tofu_policy): Likewise.
28612
28613 2015-10-22  Werner Koch  <wk@gnupg.org>
28614
28615         dirmngr: Implement Tor mode for SRV RRs.
28616         + commit 8b06d7f41aec6cb993445935dba7c60e033d026a
28617         * dirmngr/dns-stuff.c (get_dns_cert): Factor adns init out to...
28618         (my_adns_init): new.
28619         (getsrv)[USE_ADNS]: Use my_adns_init.
28620         (getsrv)[!USE_ADNS]: Return an error if Tor mode is active.
28621
28622         * dirmngr/t-dns-stuff.c: Add option --use-tor.
28623
28624         dirmngr: Do not use MAXDNAME.
28625         + commit e03a4a94bb67d4a6c958b37671f83456e203f325
28626         * dirmngr/dns-stuff.c (getsrv): Replace MAXDNAME.
28627         * dirmngr/dns-stuff.h (MAXDNAME): Remove.
28628         (struct srventry): Use a fixed value instead of MAXDNAME.
28629         * dirmngr/http.c (connect_server): Use DIMof instead of MAXDNAME.
28630         Malloc a helper array.
28631
28632         Move SRV RR code from common/ to dirmngr/.
28633         + commit 41bb01ae792af78edd28bf1b735cacc0b3ac428a
28634         * common/srv.c: Merge into dirmngr/dns-stuff.c.  Delete file.
28635         * common/srv.h: Merge into dirmngr/dns-stuff.h.  Delete file.
28636         * common/Makefile.am (common_sources): Remove srv.c and srv.h.
28637         * g10/keyserver.c: Do not include srv.h.  The code using it is anyway
28638         disabled.
28639         * dirmngr/http.c: Remove header srv.h and stubs.
28640         * dirmngr/t-dns-stuff.c: Add option --srv.
28641
28642 2015-10-21  Werner Koch  <wk@gnupg.org>
28643
28644         dirmngr: Use the new DNS wrapper for the HTTP module.
28645         + commit 1e34007c972c1d7730cfcacd88f6bbebba7dec1d
28646         * dirmngr/t-http.c (main): Init assuan sockets.
28647         * dirmngr/http.c: Include dns-stuff.h.
28648         (connect_server)[!HAVE_GETADDRINFO]: Remove all code.
28649         (connect_server): Change to use resolve_dns_name.
28650
28651         dirmngr: Allow use of http.c if USE_NPTH is not defined.
28652         + commit b6af3377e14fad35b9c6041b11888cabce6e8a56
28653         * dirmngr/http.c (send_request): Always set the gnutls pull/push
28654         functions.
28655         (my_npth_read): Rename to ...
28656         (my_gnutls_read) .. this.  Use system read if !USE_NPTH.
28657         (my_npth_write): Rename to ...
28658         (my_gnutls_write) .. this.  Use system write if !USE_NPTH.
28659
28660         dirmngr: Check that getaddrinfo is available.
28661         + commit 6fafda979df8e7e117f8e6929bcce89513a6e746
28662         * dirmngr/Makefile.am (t_http_SOURCES): Add dns-stuff.c.
28663         (t_ldap_parse_uri_SOURCES): Ditto.
28664         * dirmngr/dns-stuff.c: Bail out if neither ADNS nor getaddrinfo is
28665         available.
28666
28667         dirmngr: Use the new DNS wrapper for the HKP engine.
28668         + commit afbe87fa2d259b665b2d67a038a8535cfcfee094
28669         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Change arg type to
28670         dns_addrinfo_t.
28671         (map_host): Replace getaddrinfo by resolve_dns_name.
28672
28673         dirmngr: Implement a getaddrinfo wrapper.
28674         + commit 8bccbf477878fd99baa96e11db9db99aaf1e8d91
28675         * dirmngr/dns-stuff.h: Include some header files.
28676         (dns_addinfo_t, dns_addrinfo_s): New.
28677         * dirmngr/dns-stuff.c: Always include DNS related headers.
28678         (free_dns_addrinfo): New.
28679         (resolve_name_standard): New.
28680         (resolve_dns_name): New.
28681
28682         * dirmngr/t-dns-stuff.c: Include netdb.h.
28683         (main): Keep old default mode with no args but else print outout of
28684         resolve_dns_name.  Revamp option parser.
28685
28686         common: Add more replacement error codes.
28687         + commit ffe60eb3d2b8f7d6c506804ce4645d695c91f237
28688         * common/util.h (GPG_ERR_SERVER_FAILED): New.
28689         (GPG_ERR_NO_KEY): New.
28690         (GPG_ERR_NO_NAME): New.
28691
28692 2015-10-21  Neal H. Walfield  <neal@g10code.com>
28693
28694         gpg: If the saved trust model is unknown, default to tofu+pgp.
28695         + commit 9afeb4cca10c3632495fe71b23df99a4878bd3a5
28696         * g10/trustdb.c (init_trustdb): If the saved trust model is unknown,
28697         default to tofu+pgp instead of pgp.
28698
28699         gpg: Don't accidentally free UTK_LIST.
28700         + commit 8c3b7915d675ca5346c17244654d5c6ab583ac44
28701         * g10/trustdb.c (validate_keys): Don't free UTK_LIST.
28702
28703         gpg: When evaluating trust reg exps, treat tofu+pgp like pgp.
28704         + commit cbaca254ac818c49c18d4480d3c7bd246cc57ae8
28705         * g10/trustdb.c (validate_one_keyblock): When checking trust regular
28706         expressions, treat the tofu+pgp trust model the same as the pgp trust
28707         model.
28708
28709         gpg: If a key is ultimate trusted, return that in the tofu model.
28710         + commit df57390d68482c5b3fa5ff3a42a29ae1b6cbb23c
28711         * g10/tofu.c (get_trust): If the policy is auto or none, check if the
28712         key is ultimately trusted.  If so, return that.
28713         (tofu_register): If the key is ultimately trusted, don't show any
28714         statistics.
28715         (tofu_get_validity): Likewise.
28716
28717         gpg: Keep the trust DB up to date for the tofu and tofu+pgp models.
28718         + commit d05ff81732e20e6f9d6d7a6281a96a312b001abb
28719         * g10/trustdb.c (init_trustdb): Recognize tofu and tofu+pgp as
28720         possibly saved trust models.  Also register the ultimately trusted
28721         keys if the trust model is tofu or tofu+pgp.
28722         (check_trustdb): Don't skip if the trust model is tofu or tofu+pgp.
28723         (update_trustdb): Likewise.
28724         (tdb_check_trustdb_stale): Likewise.
28725         (validate_keys): If the trust model is TOFU, just write out the
28726         ultimately trusted keys.
28727
28728         gpg: Factor out code into a standalone function.
28729         + commit 243f90afba87e99ca42e2451ac5cc59d00a044ac
28730         * g10/trustdb.c (tdb_keyid_is_utk): New function.
28731         (add_utk): Use it.
28732
28733         dirmngr: Allow building with libassuan < 2.3.
28734         + commit a79045e38d239a7f6e787cf7c1132772c737cc0e
28735         * dirmngr/http.c (send_request): Use newer assuan function only if
28736         available.
28737
28738 2015-10-21  Neal H. Walfield  <neal@g10code.com>
28739             Andre Heinecke  <aheinecke@intevation.de>
28740
28741         gpg: Make the tofu DB check and initialization atomic.
28742         + commit 85bd7d9491f8cc13c2b03f19b4f70ea13b45c704
28743         * g10/tofu.c (initdb): Make the version check and the database
28744         initialization atomic.
28745
28746 2015-10-21  Werner Koch  <wk@gnupg.org>
28747
28748         build: Make --disable-g13 the default.
28749         + commit 485e0a221deb5c68f29b6a7a110b349dbe41c027
28750         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --enable-g13.  Remove
28751         --enable-gpgtar because that is enabled anyway.
28752         * configure.ac: Do not build g13 by default.
28753
28754         dirmngr: Rename file dns-cert.c.
28755         + commit 5055b617a94587580bc16a56bb82333077b05693
28756         * dirmngr/dns-cert.c: Rename to dirmngr/dns-stuff.c.
28757         * dirmngr/dns-cert.h: Rename to dirmngr/dns-stuff.h and change
28758         includers.
28759         * dirmngr/t-dns-cert.c: Rename to dirmngr/t-dns-stuff.c.
28760         * dirmngr/Makefile.am: Adjust.
28761
28762         common: Add status code for use by g13.
28763         + commit 42571a38344e39f747315f754700a8181b8744fe
28764         * common/status.h (STATUS_PLAINTEXT_FOLLOWS): New.
28765
28766 2015-10-20  Werner Koch  <wk@gnupg.org>
28767
28768         dirmngr: Prefer ADNS over system resolver.
28769         + commit 58ebe50bdf4837e9ab2d3f8c6e5fcf28c66f26e9
28770         * configure.ac (HAVE_ADNS_IF_TORMODE): New ac_define.
28771         (USE_DNS_CERT): Prefer ADNS over the system resolver.
28772         * dirmngr/dns-cert.c (tor_mode): New global var.
28773         (enable_dns_tormode): New func.
28774         (get_dns_cert): Use DNS resolver at 8.8.8.8 in tor-mode.
28775         * dirmngr/server.c (cmd_dns_cert): If supported allow DNS requests.
28776
28777         w32: Allow building again.
28778         + commit c83b627174f46e841f1ccc018322fe499969c267
28779         * dirmngr/http.c (connect_server): Fix called function name.
28780
28781         build: Allow building without SQLlite support.
28782         + commit 734c61dc9d4915605816803182c9adcc1594e008
28783         * configure.ac: Add option --dsiable-tofu and --disable-sqlite.
28784         (NEED_SQLITE_VERSION): New var.
28785         (USE_TOFU): New ac_define and am_conditional.
28786         * autogen.sh (build-w32): Add PKG_CONFIG_LIBDIR to configure so that
28787         pkg-config find the correct .pc file.
28788
28789         * g10/Makefile.am (tofu_source): New.  Build only if enabled.
28790         * g10/gpg.c (parse_trust_model)[!USE_TOFU]: Disable tofu models.
28791         (parse_tofu_policy)[!USE_TOFU]: Disable all.
28792         (parse_tofu_db_format)[!USE_TOFU]: Disable all.
28793         (main) <aTOFUPolicy>[!USE_TOFU]: Skip.
28794         * g10/keyedit.c (show_key_with_all_names_colon)[!USE_TOFU]: Do not
28795         call tofu functions.
28796         * g10/keylist.c (list_keyblock_colon)[!USE_TOFU]: Ditto.
28797         * g10/trustdb.c (tdb_get_validity_core)[!USE_TOFU]: Skip tofu
28798         processing.
28799
28800 2015-10-20  Neal H. Walfield  <neal@g10code.com>
28801
28802         gpg: Don't die immediately if the TOFU DB is locked.
28803         + commit 26d457c218c2e93b2e2cf316f0c1074c70894d0f
28804         * g10/tofu.c (opendb): Don't die immediately if the DB is locked.
28805
28806         gpg: Improve output.
28807         + commit bc9ff6c85e2d89be4ee873b8a72a214759a66157
28808         * g10/tofu.c (get_trust): Also show the binding when indicating a
28809         conflict occurred.
28810
28811         gpg: Synchronize translation template.
28812         + commit 251c070f91e2c65baa3f1195f14a176440a8aafa
28813         * g10/tofu.c (show_statistics): Synchronize translation template.
28814
28815         gpg: When showing conflicts, also show bindings with no recorded sigs.
28816         + commit d3eca517745a862432fcfeaa729e5333b15ffa6a
28817         * g10/tofu.c (signature_stats_collect_cb): If the time_ago column is
28818         NULL, then both time_ago and count should be 0.
28819         (get_trust): Reverse the direction of the join so that we also get
28820         statistics about bindings without any signatures.
28821
28822         gpg: Improve text.
28823         + commit 445f94bc81b20959a667a4ad80ea6c73059540bf
28824         * g10/tofu.c (show_statistics): Improve text.
28825
28826         gpg: Use the right variable to display the information.
28827         + commit 4957e3236796979b58f35628351505ea5f4e936a
28828         * g10/tofu.c (get_trust): Use the right variable to display the
28829         conflicting key.
28830
28831         gpg: Make failing to create a directory a soft error.
28832         + commit eb8a0b051faa03584b3820200e10301936e82f51
28833         * g10/tofu.c (getdb): Don't exit if we can't create the directory.
28834         Just return an error.
28835
28836         common: Make sure tilde expansion works for the mkdir functions.
28837         + commit c3bb9fccb7963a0918b9ec6a4f10d568fac7c125
28838         * common/mkdir_p.c (gnupg_amkdir_p): Use make_filename_try on the
28839         first directory component as well.
28840
28841         gpg: Remove unused prototype digest_algo_from_sig.
28842         + commit d1a0b520b15bb941cdbf66c2e832c617af778ac8
28843         * g10/packet.h (digest_algo_from_sig): Remove prototype without a
28844         corresponding implementation.
28845
28846 2015-10-19  Werner Koch  <wk@gnupg.org>
28847
28848         dirmngr: Allow building with libassuan < 2.3.
28849         + commit 4e42ad300b3de9fab25095a9e82431b1ea2740e7
28850         * dirmngr/dirmngr.c (set_tor_mode): Use newer assuan function only if
28851         available.
28852         * dirmngr/http.c (http_raw_connect): Ditto.
28853
28854 2015-10-19  Neal H. Walfield  <neal@g10code.com>
28855
28856         gpg: Fix --desig-revoke.
28857         + commit c37621166e9cc2a818de73bc99287a393dbb5744
28858         * g10/revoke.c (gen_desig_revoke): Add additional parameter ctrl.
28859         Check that the secret key is available.  If not, display an error
28860         message.
28861
28862         gpg: Improve function documentation and some comments.
28863         + commit a608ee750dd83bf77a5fb4f0ab5bcf812436ba4d
28864         * g10/main.h: Improve function documentation.
28865         * g10/packet.h.h: Improve function documentation.
28866         * g10/sig-check.c: Improve function documentation and some comments.
28867
28868         gpg: Improve and regularize naming of signature checking functions.
28869         + commit 0433e667029508d6933e8798d3d95bcdde70a7aa
28870         * g10/packet.h (signature_check): Rename from this...
28871         (check_signature): ... to this.  Update users.
28872         (signature_check2): Rename from this...
28873         (check_signature2): ... to this.  Update users.
28874         * g10/sig-check.c (do_check): Rename from this...
28875         (check_signature_end): ... to this.  Update users.
28876         (do_check_messages): Rename from this...
28877         (check_signature_metadata_validity): ... to this.  Update users.
28878
28879         gpg: Mark local function as static.
28880         + commit 547a1b3fb881bb8581d03dbf4eacf49163eaa4b5
28881         * g10/tdbio.c (put_record_into_cache): Mark as static.
28882
28883 2015-10-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
28884
28885         gpg: Print warning when rejecting weak digests.
28886         + commit b98939812abf6c643c752ce7c325f98039a1a9e2
28887         * g10/misc.c (print_md5_rejected_note): Rename to ..
28888         (print_digest_rejected_note): this.  Parameterize function to take an
28889         enum gcry_md_algos.
28890         * g10/sig-check.c: Use print_digest_rejected_note() when rejecting
28891         signatures.
28892
28893         gpg: Add option --weak-digest to gpg and gpgv.
28894         + commit 76afaed65e3b0ddfa4923cb577ada43217dd4b18
28895         * g10/options.h: Add additional_weak_digests linked list to opts.
28896         * g10/main.h: Declare weakhash linked list struct and
28897         additional_weak_digest() function to insert newly-declared weak
28898         digests into opts.
28899         * g10/misc.c: (additional_weak_digest): New function.
28900         (print_digest_algo_note): Check for deprecated digests; use proper
28901         gcry_md_algos type.
28902         * g10/sig-check.c: (do_check): Reject weak digests in addition to MD5.
28903         * g10/gpg.c: Add --weak-digest option to gpg.
28904         * doc/gpg.texi: Document gpg --weak-digest option.
28905         * g10/gpgv.c: Add --weak-digest option to gpgv.
28906         * doc/gpgv.texi: Document gpgv --weak-digest option.
28907
28908 2015-10-19  Werner Koch  <wk@gnupg.org>
28909
28910         dirmngr: Make --use-tor work - still leaks DNS.
28911         + commit 6983fd131f648ba4acd57b266de9868911874d14
28912         * dirmngr/dirmngr.c (set_tor_mode): New.
28913         (main, reread_configuration): Call it.
28914         * dirmngr/http.c (http_raw_connect, send_request): Check whether TOR
28915         mode is enabled if the FORCE_TOR flag is given.
28916
28917         dirmngr: Use Assuan socket wrappers for http.c.
28918         + commit 8c609eaf35b547f02979ef0b206520dd0853b294
28919         * dirmngr/http.c: Include assuan.h.  Changed all code taking a socket
28920         descriptor from int to assuan_fd_t.
28921         (my_unprotect, my_protect): New.
28922         (my_connect): Remove.
28923         (_my_socket_new, _my_socket_unref): use assuan_sock_close.
28924         (connect_server): Use assuan_sock_connect, assuan_sock_new, and
28925         assuan_sock_close.
28926         * dirmngr/Makefile.am (t_common_ldadd): Add LIBASSUAN_LIBS.
28927
28928 2015-10-19  Neal H. Walfield  <neal@g10code.com>
28929
28930         gpg: Fix formatting.
28931         + commit 253afa244487dd8129816615ac2865c9fe812aaf
28932         * g10/tofu.c (get_trust): Fix formatting.
28933
28934         gpg: Don't forget to free some memory.
28935         + commit e56a116f9a1171ccf8b3293887a217953a46fc20
28936         * g10/tofu.c (tofu_register): Free SIG_DIGEST before returning.
28937
28938         gpg: If a conflict occurs in batch mode, record that.
28939         + commit 55d88454652543c98d74376977d855e394df6c92
28940         * g10/tofu.c (get_trust): If a conflict occurs when MAY_ASK is false,
28941         set conflict to the key.  When prompting the user, don't show the
28942         conflicting key if the conflicting key is the current key.
28943
28944 2015-10-18  Werner Koch  <wk@gnupg.org>
28945
28946         gpg: Silence two more warnings.
28947         + commit c2c400714854d5a127a6966200d345d0d6cfc7d4
28948         * g10/trustdb.c (tdb_get_validity_core): Silence a warning.
28949         * g10/tofu.c (tofu_register): Move SIG_DIGEST computation to the top
28950         so that it is not uninitialized in case of an early error.
28951
28952         gpg: Fix harmless compiler warnings.
28953         + commit 558bcd43ae0a841cf1e58e06f5d72a19d5bc70cd
28954         * g10/tofu.h (_tofu_GET_POLICY_ERROR): New.  This avoids warnings
28955         about undefined enum values in a switch.
28956         * g10/trustdb.h (_tofu_GET_TRUST_ERROR): New.
28957         * g10/tofu.c (TIME_AGO_FUTURE_IGNORE): Move to the top.
28958         (opendbs): Avoid compiler warning (use braces).
28959         (GET_POLICY_ERROR): Replace define by enum _tofu_GET_POLICY_ERROR.
28960         (get_policy): Remove assert.
28961         (GET_TRUST_ERROR): Replace by _tofu_GET_TRUST_ERROR macro.
28962         (show_statistics): Undef MIN_SECS et al. after use.
28963
28964         common: Avoid warning about const char ** assignment.
28965         + commit e64c805b0c270d859ddf2c35d573110cf25e8d48
28966         * common/mkdir_p.c (gnupg_amkdir_p): Also strdup first item.  Return
28967         an error on malloc failure.
28968         (gnupg_mkdir_p): Fix type of dirs and tmp_dirs.
28969
28970         Move http module from common/ to dirmngr/.
28971         + commit 5aa1b392b1bf6fcf4cd380862c5affac39a4f34d
28972         * common/http.c: Move to ../dirmngr/.
28973         * common/http.h: Move to ../dirmngr/.
28974         * common/t-http.c: Move to ../dirmngr/.
28975         * common/tls-ca.pem: Move to ../dirmngr/.
28976         * common/Makefile.am: Do not build libcommontls.a libcommontlsnpth.a.
28977         Remove http.c related stuff.
28978         * po/POTFILES.in: Move http.c to dirmngr/.
28979         * dirmngr/Makefile.am (EXTRA_DIST): Add tls-ca.pem.
28980         (module_maint_tests): New.
28981         (noinst_PROGRAMS): Add module_maint_tests.
28982         (dirmngr_SOURCES): Add http.c and http.h.
28983         (dirmngr_LDADD): Remove libcommontlsnpth.
28984         (t_common_ldadd): Ditto.
28985         (t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
28986         (t_ldap_parse_uri_SOURCES): Add http.c.
28987         (t_ldap_parse_uri_CFLAGS): Build without npth.
28988         ($(PROGRAMS)): Do not require libcommontls.a libcommontlsnpth.a.
28989         * dirmngr/dirmngr.h, dirmngr/ks-engine.h: Fix include of http.h.
28990
28991 2015-10-18  Neal H. Walfield  <neal@g10code.com>
28992
28993         g10: Fix assert.
28994         + commit 128a456e775edf393d47e40bb9ae8b62434e2978
28995         * g10/tofu.c (get_trust): Fix assert.
28996
28997         g10: Add TOFU support.
28998         + commit f77913e0ff7be4cd9c6337a70ac715e6f4a43572
28999         * configure.ac: Check for sqlite3.
29000         (SQLITE3_CFLAGS): AC_SUBST it.
29001         (SQLITE3_LIBS): Likewise.
29002         * g10/Makefile.am (AM_CFLAGS): Add $(SQLITE3_CFLAGS).
29003         (gpg2_SOURCES): Add tofu.h and tofu.c.
29004         (gpg2_LDADD): Add $(SQLITE3_LIBS).
29005         * g10/tofu.c: New file.
29006         * g10/tofu.h: New file.
29007         * g10/options.h (trust_model): Define TM_TOFU and TM_TOFU_PGP.
29008         (tofu_db_format): Define.
29009         * g10/packet.h (PKT_signature): Add fields digest and digest_len.
29010         * g10/gpg.c: Include "tofu.h".
29011         (cmd_and_opt_values): Declare aTOFUPolicy, oTOFUDefaultPolicy,
29012         oTOFUDBFormat.
29013         (opts): Add them.
29014         (parse_trust_model): Recognize the tofu and tofu+pgp trust models.
29015         (parse_tofu_policy): New function.
29016         (parse_tofu_db_format): New function.
29017         (main): Initialize opt.tofu_default_policy and opt.tofu_db_format.
29018         Handle aTOFUPolicy, oTOFUDefaultPolicy and oTOFUDBFormat.
29019         * g10/mainproc.c (do_check_sig): If the signature is good, copy the
29020         hash to SIG->DIGEST and set SIG->DIGEST_LEN appropriately.
29021         * g10/trustdb.h (get_validity): Add arguments sig and may_ask.  Update
29022         callers.
29023         (tdb_get_validity_core): Add arguments sig and may_ask.  Update
29024         callers.
29025         * g10/trust.c (get_validity) Add arguments sig and may_ask.  Pass them
29026         to tdb_get_validity_core.
29027         * g10/trustdb.c: Include "tofu.h".
29028         (trust_model_string): Handle TM_TOFU and TM_TOFU_PGP.
29029         (tdb_get_validity_core): Add arguments sig and may_ask.  If
29030         OPT.TRUST_MODEL is TM_TOFU or TM_TOFU_PGP, compute the TOFU trust
29031         level.  Combine it with the computed PGP trust level, if appropriate.
29032         * g10/keyedit.c: Include "tofu.h".
29033         (show_key_with_all_names_colon): If the trust mode is tofu or
29034         tofu+pgp, then show the trust policy.
29035         * g10/keylist.c: Include "tofu.h".
29036         (public_key_list): Also show the PGP stats if the trust model is
29037         TM_TOFU_PGP.
29038         (list_keyblock_colon): If the trust mode is tofu or
29039         tofu+pgp, then show the trust policy.
29040         * g10/pkclist.c: Include "tofu.h".
29041         * g10/gpgv.c (get_validity): Add arguments sig and may_ask.
29042         (enum tofu_policy): Define.
29043         (tofu_get_policy): New stub.
29044         (tofu_policy_str): Likewise.
29045         * g10/test-stubs.c (get_validity): Add arguments sig and may_ask.
29046         (enum tofu_policy): Define.
29047         (tofu_get_policy): New stub.
29048         (tofu_policy_str): Likewise.
29049         * doc/DETAILS: Describe the TOFU Policy field.
29050         * doc/gpg.texi: Document --tofu-set-policy, --trust-model=tofu,
29051         --trust-model=tofu+pgp, --tofu-default-policy and --tofu-db-format.
29052         * tests/openpgp/Makefile.am (TESTS): Add tofu.test.
29053         (TEST_FILES): Add tofu-keys.asc, tofu-keys-secret.asc,
29054         tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and tofu-EE37CF96-1.txt.
29055         (CLEANFILES): Add tofu.db.
29056         (clean-local): Add tofu.d.
29057         * tests/openpgp/tofu.test: New file.
29058         * tests/openpgp/tofu-2183839A-1.txt: New file.
29059         * tests/openpgp/tofu-BC15C85A-1.txt: New file.
29060         * tests/openpgp/tofu-EE37CF96-1.txt: New file.
29061         * tests/openpgp/tofu-keys.asc: New file.
29062         * tests/openpgp/tofu-keys-secret.asc: New file.
29063
29064 2015-10-16  Neal H. Walfield  <neal@g10code.com>
29065
29066         common: Prefix the mkdir functions with gnupg_.  Make args const.
29067         + commit 93e855553eba03f5c31682e0aaf39f18f29860b7
29068         * common/mkdir_p.h (mkdir_p): Rename from this...
29069         (gnupg_mkdir_p): ... to this.  Change directory_component's type from
29070         char * to const char *.
29071         (amkdir_p): Rename from this...
29072         (gnupg_amkdir_p): ... to this.  Change directory_component's type from
29073         char * to const char *.
29074         * common/mkdir_p.c (mkdir_p): Rename from this...
29075         (gnupg_mkdir_p): ... to this.  Change directory_component's type from
29076         char * to const char *.
29077         (amkdir_p): Rename from this...
29078         (gnupg_amkdir_p): ... to this.  Change directory_component's type from
29079         char * to const char *.
29080
29081 2015-10-14  NIIBE Yutaka  <gniibe@fsij.org>
29082
29083         cleanup: Fix confusion between gpg_error_t and gpg_err_code_t.
29084         + commit 3de5ef759895837fe499cff7fb1fa7798e6d5754
29085         * dirmngr/crlcache.c (hash_dbfile): Use gpg_error_t for ERR.
29086         * kbx/keybox-update.c (keybox_set_flags): Call
29087         gpg_err_code_from_syserror.
29088
29089 2015-10-13  NIIBE Yutaka  <gniibe@fsij.org>
29090
29091         po: Update Japanese translation.
29092         + commit 0b4ebc398cc8aad3f25f84034cd6b129e55f1368
29093
29094
29095 2015-10-12  Werner Koch  <wk@gnupg.org>
29096
29097         gpg: Try hard to use MDC also for sign+symenc.
29098         + commit 4584125802be11833a5b289e864b45eedc2b45fd
29099         * g10/encrypt.c (use_mdc): Make it a global func.
29100         * g10/sign.c (sign_symencrypt_file): Use that function to decide
29101         whether to use an MDC.
29102         * tests/openpgp/conventional-mdc.test: Add a simple test case.
29103
29104 2015-10-09  Werner Koch  <wk@gnupg.org>
29105
29106         Release 2.1.9.
29107         + commit 086b8738f71ba26d36287db81f6d78116053ba66
29108
29109
29110 2015-10-09  NIIBE Yutaka  <gniibe@fsij.org>
29111
29112         agent: simplify agent_get_passphrase.
29113         + commit 5a12c45666cd16bc750d7f0e63620c295feb77ea
29114         * agent/call-pinentry.c (agent_get_passphrase): Simplify.
29115
29116         agent: fix agent_askpin.
29117         + commit 818fa4f71e1056831b35d0f8aff715c0e1d537e6
29118         * agent/call-pinentry.c (agent_askpin): Fix off-by-one error.
29119
29120         agent: Fix function return type for check_cb and agent_askpin.
29121         + commit f70f6695368444d8058305ab696e5e5a1bace18c
29122         * agent/call-pinentry.c (unlock_pinentry): Return gpg_error_t.
29123         (start_pinentry, setup_qualitybar): Likewise.
29124         (agent_askpin): Fix return value check of check_cb.
29125         * agent/command-ssh.c (reenter_compare_cb): Return gpg_error_t.
29126         (ssh_identity_register): Fix return value check of agent_askpin.
29127         * agent/cvt-openpgp.c (try_do_unprotect_cb): Return gpg_error_t.
29128         * agent/findkey.c (try_unprotect_cb): Likewise.
29129         * agent/genkey.c (reenter_compare_cb): Return gpg_error_t.
29130         (agent_ask_new_passphrase): Fix return value check of agent_askpin.
29131
29132 2015-10-08  Andre Heinecke  <aheinecke@intevation.de>
29133
29134         dirmngr: Default to http protocol for http-proxy.
29135         + commit ea079d283de6bf4ac70d7530fac70938e7c5e8f5
29136         * common/http.c (send_request): Fix handling for hostname:port string.
29137
29138 2015-10-08  Werner Koch  <wk@gnupg.org>
29139
29140         common: Allow building of mkdir_p.c for Windows.
29141         + commit 4c298525903f844eee95ecbcdc45f5ac034fa148
29142         * common/mkdir_p.c: Change license and comment debug statements.
29143         (amkdir_p, mkdir_p): Fail on malloc error and use default_errsource to
29144         build an error code.  Change return value to gpg_error_t.
29145         (amkdir_p): Use gnupg_mkdir.
29146
29147         * common/membuf.c: Include util.h first to avoid redefined macro
29148         warnings.
29149
29150         gpg: Add option --print-dane-records.
29151         + commit d7b8e76f9930750d669405dee3108c9bc8e87b91
29152         * g10/options.h (opt): Add field "print_dane_records".
29153         * g10/gpg.c (oPrintDANERecords): new.
29154         (opts): Add --print-dane-records.
29155         (main): Set that option.
29156         * g10/export.c (do_export): Remove EXPORT_DANE_FORMAT handling.
29157         (do_export_stream): Add EXPORT_DANE_FORMAT handling.
29158         * g10/keylist.c (list_keyblock_pka): Implement DANE record printing.
29159
29160         * g10/gpgv.c (export_pubkey_buffer): New stub.
29161         * g10/test-stubs.c (export_pubkey_buffer): New stub.
29162
29163         gpg: Pass CTRL parameter to all key listing functions.
29164         + commit b6d621583fc9cbda6f9376a24f2f4cf11499a4fd
29165         * g10/keylist.c (public_key_list): Add arg CTRL.
29166         (secret_key_list): Ditto.
29167         (list_all, list_one): Ditto.
29168         (locate_one): Ditto.
29169         (list_keyblock_pka): Ditto.
29170         (list_keyblock): Ditto.
29171         (list_keyblock_direct): Ditto.
29172         * g10/keygen.c (proc_parameter_file): Add arg CTRL.
29173         (read_parameter_file): Ditto.
29174         (quick_generate_keypair): Ditto.
29175         (do_generate_keypair): Ditto.
29176         (generate_keypair): Pass arg CTRL.
29177         * g10/gpg.c (main): Pass arg CTRL to quick_generate_keypair.
29178
29179 2015-10-07  Werner Koch  <wk@gnupg.org>
29180
29181         gpg: Remove unfinished experimental code to export as S-expressions.
29182         + commit a400958323d93036dca9c63135b167012ea64f8b
29183         * g10/options.h (EXPORT_SEXP_FORMAT): Remove.
29184         (EXPORT_DANE_FORMAT): New.
29185         * g10/export.c (parse_export_options): Remove "export-sexp-format".
29186         (export_seckeys): Adjust for removed option.
29187         (export_secsubkeys): Ditto.
29188         (do_export): Prepare for DANE format.
29189         (build_sexp, build_sexp_seckey): Remove.
29190         (do_export_stream): Remove use of removed functions.
29191
29192 2015-10-06  Werner Koch  <wk@gnupg.org>
29193
29194         gpg: Add new --auto-key-locate mechanism "dane".
29195         + commit 9ac31f91b10059474da1c9580fb99e94278d4c11
29196         * g10/call-dirmngr.c (gpg_dirmngr_dns_cert): Allow fetching via DANE.
29197         * g10/keyserver.c (keyserver_import_cert): Add arg "dane_mode".
29198         * g10/options.h (AKL_DANE): New.
29199         * g10/getkey.c (get_pubkey_byname): Implement AKL_DANE.
29200         (parse_auto_key_locate): Ditto.
29201
29202         dirmngr: Addlow fetching keys using OpenPGP DANE.
29203         + commit 264a81d82737369ee8beef771cf2bd2cd874320a
29204         * dirmngr/server.c (cmd_dns_cert): Add option --dane.
29205
29206         dirmngr: Improve DNS code to retrieve arbitrary records.
29207         + commit 211b8084ee4391baec35e8c5bd75a9ecbcb889a7
29208         * dirmngr/dns-cert.c (get_dns_cert): Add hack to retrieve arbitrary
29209         resource records.
29210         * dirmngr/dns-cert.h (DNS_CERTTYPE_RRBASE): New.
29211         (DNS_CERTTYPE_RR61): New.
29212
29213         dirmngr: Change DNS code to make additions easier.
29214         + commit 6cf80dc77ec5df3722924301ff4be2475966937b
29215         * dirmngr/dns-cert.c (get_dns_cert) [!USE_ADNS]: Change loop to allow
29216         adding more resource types.
29217
29218         dirmngr: Make commands RELOADDIRMNGR and KILLDIRMNGR work properly.
29219         + commit 7faf45effcd47d2d04d35090a1e01a1dbb99ec70
29220         * dirmngr/server.c (cmd_killdirmngr): Set assuan close flag.
29221         (cmd_reloaddirmngr): Use check_owner_permission.
29222
29223         dirmngr: Do tilde expansion for --hkp-cacert.
29224         + commit 9db6547a00cded92c00c8f8382b1b605be1027d2
29225         * dirmngr/dirmngr.c (parse_rereadable_options): Do tilde expansion and
29226         check for cert file existance in option --hkp-cacert.
29227
29228         gpg: Fail decryption for AES etc message w/o MDC.
29229         + commit 625e292108cc0fd9077769587a8c22abe7805e33
29230         * g10/mainproc.c (proc_encrypted): Fail for modern messages w/o MDC.
29231
29232 2015-10-06  NIIBE Yutaka  <gniibe@fsij.org>
29233
29234         agent: Fix verification of signature for smartcard.
29235         + commit 4a5bd1720f5a3dbb26f5daeb03725cae29be7e24
29236         * agent/pksign.c (agent_pksign_do): Use public key smartcard.
29237
29238         agent: Fix non-allocation for pinentry_loopback.
29239         + commit ce2a84b58833fd308d5fe11756721f39c953280a
29240         * agent/call-pinentry.c (agent_get_passphrase): Don't allocate, it will
29241         be allocated by pinentry_loopback.
29242
29243 2015-10-05  Werner Koch  <wk@gnupg.org>
29244
29245         gpg: Install a dirmngr.conf file.
29246         + commit f3959f14b6c496c726bbca5230becb7b6844a234
29247         * g10/dirmngr-conf.skel: New.
29248         * g10/Makefile.am (EXTRA_DIST): Add file.
29249         (install-data-local, uninstall-local): Install that file.
29250         * g10/openfile.c (copy_options_file): Add arg "name", return a value,
29251         simplify with xstrconcat, and factor warning message out to:
29252         (try_make_homedir): here.  Also install dirmngr.conf.
29253         * g10/options.skel: Remove --keyserver entry.
29254
29255         gpg: Deprecate the --keyserver option.
29256         + commit ae471fa978589fb61ecb0f89bbfe4d43cf2d5eac
29257         * g10/keyserver.c (keyserver_refresh): Change return type to
29258         gpg_error_t.  Use gpg_dirmngr_ks_list to print the name of the
29259         keyserver to use.
29260         (keyserver_search): Do not print the "no keyserver" error
29261         message.  The same error is anyway returned from dirmngr.
29262         * g10/call-dirmngr.c (ks_status_parm_s): Add field "keyword".
29263         (ks_status_cb): Handle other status keywords.
29264         (gpg_dirmngr_ks_list): New.
29265         * tools/gpgconf-comp.c (gc_options_gpg): Deprecate "keyserver".
29266         (gc_options_dirmngr): Add "Keyserver" group and "keyserver".
29267
29268         dirmngr: Add option --keyserver.
29269         + commit a48e6de603c3a312f02b1b5fdb813032eeae9074
29270         * dirmngr/dirmngr.c (oKeyServer): New.
29271         (opts): Add "keyserver".
29272         (parse_rereadable_options): Parse that options
29273         (main): Add option to the gpgconf list.
29274         * dirmngr/dirmngr.h (opt): Add field "keyserver".
29275         * dirmngr/server.c (ensure_keyserver): New.
29276         (make_keyserver_item): New.  Factored out from
29277         (cmd_keyserver): here.  Call ensure_keyserver.
29278         (cmd_ks_search): Call ensure_keyserver.
29279         (cmd_ks_get): Ditto.
29280         (cmd_ks_fetch): Ditto.
29281         (cmd_ks_put): Ditto.
29282
29283         dirmngr: Make clear that --use-tor is not yet ready for use.
29284         + commit 438730323a5d9bbf8dd5cd60d479b6c03f8721d0
29285         * dirmngr/dirmngr.c (main): Print a warning if --use-tor has been
29286         given.
29287         * tools/gpgconf-comp.c (gc_options_dirmngr): Make --use-tor invisible.
29288
29289         gpgconf: Change displayed name of Dirmngr to "Key Acquirer".
29290         + commit c6400c1aa82239f1c154ca27596600cae964515d
29291         * tools/gpgconf-comp.c (gc_component): Change printed name.
29292
29293 2015-10-02  Werner Koch  <wk@gnupg.org>
29294
29295         dirmngr: Fix use-after-free due to a realloc shrinking.
29296         + commit 75c64c2b6d77856b90903cc3b7c6a2f62ff8eb7b
29297         * dirmngr/ks-engine-hkp.c (map_host): Do not use original pointer
29298         after realloc.
29299
29300         agent: Fix alignment problem with the second passphrase struct.
29301         + commit ddf9dd135acd2b3635bb986f6dfc0e4e446d5fad
29302         * agent/genkey.c (agent_ask_new_passphrase): Use a separate malloc for
29303         PI2.  Check return value of the malloc function.
29304         * agent/command-ssh.c (ssh_identity_register): Use a separate malloc
29305         for PI2.  Wipe PI2.
29306
29307 2015-10-01  Werner Koch  <wk@gnupg.org>
29308
29309         gpg: Fix a practical hang after use of --faked-system-time.
29310         + commit 2acceba5cc299796c7b5b1851a9baeb75d9f32a1
29311         * g10/sign.c (update_keysig_packet): Bail out if we would need to long
29312         for a new timestamp.
29313
29314         gpg: Print more info with "check selfsig".
29315         + commit 2c60663a72f090573c4869e305b098b4b1fb23bd
29316         * g10/keyedit.c (print_and_check_one_sig): Print more Some sigsub
29317         packets.
29318
29319         gpg: Add debug helper to --edit-keys's check sub-command.
29320         + commit 13a3f65968f4a8205ca664cc46b1a53de4dc489b
29321         * g10/keyedit.c (print_and_check_one_sig): Add arg "extended" and
29322         print an asterisk for the chosen selfsig.
29323         (check_all_keysigs): Add arg "only_selfsig"
29324         (keyedit_menu) <cmdCHECK>: Add optional arg "selfsig".
29325
29326 2015-10-01  NIIBE Yutaka  <gniibe@fsij.org>
29327
29328         common: Fix strsplit.
29329         + commit a9895a5a72a851c5fcc70f16d5f8f588cc885751
29330         * common/stringhelp.c (strsplit): Fix arguments order.
29331
29332 2015-09-30  Neal H. Walfield  <neal@g10code.com>
29333
29334         common: Add mkdir_p.
29335         + commit c8584a1e559bc720412e1a2fc546a54ff4517205
29336         * common/mkdir_p.c: New file.
29337         * common/mkdir_p.h: New file.
29338         * common/Makefile.am (common_sources): Add mkdir_p.c and mkdir_p.h.
29339
29340         common: Remove unused files.
29341         + commit 5576146ede40b42bc632fd9697dd429a4d1409cf
29342         * common/xmalloc.c: Remove file.
29343         * common/xmalloc.h: Remove file.
29344
29345         common: Include <gpg-error.h>.
29346         + commit 270d3f55f9193ebda5e1b642d58daf905019914d
29347         * common/logging.h: Include <gpg-error.h>.
29348
29349 2015-09-29  Neal H. Walfield  <neal@g10code.com>
29350
29351         g10: Remove unused struct cmp_help_context_s.
29352         + commit 8ab63e4b5018044ecfb0b9910412487066886826
29353         * g10/sig-check.c (struct cmp_help_context_s) Remove unused struct.
29354
29355         g10: Avoid an unnecessary copy.
29356         + commit 12443eafa6e19b94a8b554126423e2a5ccc2dd7e
29357         * g10/sig-check.c (signature_check2): Avoid copying PK to RET_PK.
29358         Instead, directly use the provided storage.  If none is provided
29359         allocate some.
29360
29361 2015-09-29  NIIBE Yutaka  <gniibe@fsij.org>
29362
29363         ssh: Fix fingerprint computation for EdDSA key.
29364         + commit 5c067d54d349fdfb3243634789c8841515d2c28f
29365         * common/ssh-utils.c (get_fingerprint): Handle the prefix of 0x40.
29366         * common/t-ssh-utils.c (sample_keys): Add a new key.
29367
29368         agent: RSA signature verification by gpg-agent.
29369         + commit cfbe6ba9cf1414e9aa4977e2bbaecaa43154b2ae
29370         * g10/sign.c (do_sign): Let verify signature by gpg-agent.
29371         * agent/pksign.c (agent_pksign_do): Call gcry_pk_verify for RSA.
29372
29373 2015-09-28  Werner Koch  <wk@gnupg.org>
29374
29375         common: Provide two new error code replacements.
29376         + commit f1effdc5ecd0cc52a28db7ae28a5c28f33486542
29377         * common/util.h (GPG_ERR_FALSE, GPG_ERR_TRUE): Rew replcements.
29378
29379         common: Change calling convention for gnupg_spawn_process.
29380         + commit 83811e3f1f0c615b2b63bafdb49a35a0fc198088
29381         * common/exechelp.h (GNUPG_SPAWN_NONBLOCK): New.
29382         (GNUPG_SPAWN_RUN_ASFW, GNUPG_SPAWN_DETACHED): Macro to replace the
29383         numbers.
29384         * common/exechelp.h (gnupg_spawn_process): Change function to not take
29385         an optional stream for stdin but to return one.
29386         * common/exechelp-posix.c (gnupg_spawn_process): Implement change.
29387         (create_pipe_and_estream): Add args outbound and nonblock.
29388         * common/exechelp-w32.c (gnupg_spawn_process): Implement change.
29389
29390 2015-09-28  NIIBE Yutaka  <gniibe@fsij.org>
29391
29392         scd: Handle error correctly.
29393         + commit 6bb7206e357acfd7276a8f1334c0f0c9cc6ed100
29394         * scd/apdu.c (apdu_connect): Initialize variables and check an error
29395         of apdu_get_status_internal.
29396
29397 2015-09-22  Werner Koch  <wk@gnupg.org>
29398
29399         ssh: Add 256, 384 and 521 bit test keys for the fingerprint.
29400         + commit 12ff806d1b63d08cb43d131065d51353495d9346
29401         * common/t-ssh-utils.c (sample_keys): Add 3 new keys.
29402
29403         ssh: Fix fingerprint computation for 384 bit ECDSA keys.
29404         + commit 2167951b275bae51cf669c02547e2e7ea8fbe2ee
29405         * common/ssh-utils.c (get_fingerprint): Fix hashed string.
29406
29407 2015-09-19  NIIBE Yutaka  <gniibe@fsij.org>
29408
29409         agent: Fix importing ECC key.
29410         + commit 1542dc604b9c3e6a6a99750c48f7800e72584a89
29411         * agent/cvt-openpgp.c (convert_from_openpgp_main): Only encrypted
29412         parameters are stored as opaque.
29413         (apply_protection): ARRAY members are all normal, non-opaque MPI.
29414         (extract_private_key): Get public key as normal, non-opaque MPI.
29415         Remove support of ECC key with '(flags param)'.
29416         Remove support of "ecdsa" and "ecdh" keys of our experiment.
29417
29418         scd: Fix KEYTOCARD handling for ECC key.
29419         + commit 708b7eccdef8d274bd5578b9a5fd908e9685c795
29420         * scd/app-openpgp.c (ecc_writekey): Only public key can be native
29421         format.
29422
29423 2015-09-19  Neal H. Walfield  <neal@g10code.com>
29424
29425         common: Add new function strlist_length.
29426         + commit 8499c4f84a664bedbdf5a5689cb02420909f1968
29427         * common/strlist.c (strlist_length): New function.
29428
29429 2015-09-18  Werner Koch  <wk@gnupg.org>
29430
29431         gpgconf: Change displayed name of Dirmngr to "Network Manager".
29432         + commit 819bba75aaed11ecef2e274add173718358212b9
29433         * tools/gpgconf-comp.c (gc_component): Change printed name.
29434
29435         dirmngr: Add option --use-tor as a stub.
29436         + commit c091816b4a90d7eea6f8601ec1522a0a006794e8
29437         * dirmngr/dirmngr.h (opt): Add field "use_tor".
29438         * dirmngr/dirmngr.c (oUseTor): New.
29439         (opts): Add --use-tor.
29440         (parse_rereadable_options): Set option.
29441         (main): Tell gpgconf about that option.
29442
29443         * dirmngr/crlfetch.c (crl_fetch): Pass TOR flag to the http module and
29444         return an error if LDAP is used in TOR mode.
29445         (ca_cert_fetch): Return an error in TOR mode.
29446         (start_cert_fetch): Ditto.
29447         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass TOR flag to the
29448         http module.
29449         * dirmngr/ks-engine-hkp.c (send_request): Ditto.
29450         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
29451         * dirmngr/ks-engine-ldap.c (ks_ldap_get): Return an error in TOR mode.
29452         (ks_ldap_search): Ditto.
29453         (ks_ldap_put): Ditto.
29454         * dirmngr/ocsp.c (do_ocsp_request): Ditto.  Also pass TOR flag to the
29455         http module.
29456
29457         * dirmngr/server.c (option_handler): Add "honor-keyserver-url-used".
29458         (cmd_dns_cert): Return an error in TOR mode.
29459         (cmd_getinfo): Add subcommand "tor"
29460         * tools/gpgconf-comp.c (gc_options_dirmngr): Add TOR group.
29461
29462         gpg: Report a conflict between honor-keyserver-url and TOR.
29463         + commit d5a3142b8f2e5603357182f34f0b081b47eda23c
29464         * g10/call-dirmngr.c (create_context): Send option and print a verbose
29465         error.
29466
29467         http: Add flag to force use of TOR (part 1)
29468         + commit b4bc1c8b10c7a794fa108678b80f76366a65c47d
29469         * common/http.h (HTTP_FLAG_FORCE_TOR): New.
29470         * common/http.c (http_raw_connect, send_request): Detect flag and
29471         return an error for now.
29472
29473 2015-09-17  NIIBE Yutaka  <gniibe@fsij.org>
29474
29475         po: Update Japanese translation.
29476         + commit f986b23e13eaa2d7705733b4bf6b5210311f181a
29477
29478
29479         scd: Fix ccid-driver timeout for OpenPGPcard v2.1.
29480         + commit 6510df3a7cd2b5bf44fac1e4d50ee54b8c897daa
29481         * scd/ccid-driver.c (CCID_CMD_TIMEOUT): New.
29482         (ccid_transceive_apdu_level, ccid_transceive): Use.
29483
29484 2015-09-16  Werner Koch  <wk@gnupg.org>
29485
29486         agent: New option --pinentry-invisible-char.
29487         + commit 93d257c81952cbb08a744a9cea6749639aa32cd7
29488         * agent/gpg-agent.c (oPinentryInvisibleChar): New.
29489         (opts): Add option.
29490         (parse_rereadable_options): Set option.
29491         * agent/agent.h (opt): Add field pinentry_invisible_char.
29492         * agent/call-pinentry.c (start_pinentry): Pass option to pinentry.
29493
29494         g13: Move some code to a separate module.
29495         + commit 9e65bbd255c43f0e59f35b0003052234d69042be
29496         * g13/g13-common.c, g13/g13-common.h: New.
29497         * g13/Makefile.am (g13_SOURCES): Add new files.
29498         * g13/g13.c (g13_errors_seen): Move to g13-common.c.
29499         (cmdline_conttype): New.
29500         (main): Use g13_init_signals and g13_install_emergency_cleanup.
29501         (emergency_cleanup, g13_exit): Move to g13-common.c.
29502         * g13/g13.h: Move OPT and some other code to g13-common.h.
29503
29504         gpg: Fix skip function dummy parameter.
29505         + commit 8eb3a1797a1e7cb59a8342a8aa917756fe67949f
29506         * g10/trustdb.c (search_skipfnc): Fix dummy argument
29507
29508         gpg: Change last commit to avoid extra translations.
29509         + commit f71ed902def81f9408d9094289d8a97abaa0f609
29510         * g10/keyedit.c (keyedit_menu): Do not print usage hints in expert
29511         mode.
29512
29513 2015-09-16  Neal H. Walfield  <neal@g10code.com>
29514
29515         g10: Improve error message.
29516         + commit 172af881a1cfe82dfec1c43102d6c464e67ef230
29517         * g10/keyedit.c (keyedit_menu): When complaining that a user ID or key
29518         must be selected, indicate what command to use to do this.
29519
29520         g10: Be more careful when merging self-signed data.
29521         + commit 6845737736d3264d7ee8b7364d908951010084c9
29522         * g10/getkey.c (merge_selfsigs_main): Stop looking for self-signed
29523         data belonging to the public key when we encounter an attribute packet
29524         or a subkey packet, not just a user id packet.  When looking for
29525         self-signed data belonging to a user id packet, stop when we see a
29526         user attribute packet.
29527
29528         g10: Simplify some complicated boolean expressions.
29529         + commit c31e089129c0102c1710522d71fbe1880e84d68e
29530         * g10/getkey.c (finish_lookup): Simplify logic.
29531
29532         g10: Also mark revoked and expired keys as unusable.
29533         + commit 77c2ad4a817c129b899708399ed2078a52b452b8
29534         * g10/getkey.c (skip_unusable): Also mark the key as unusable if it
29535         has been revoked or has expired.
29536
29537         g10: Release resources when returning an error in get_seckey.
29538         + commit 1b601de06a57c78537a336093d2531d8c58bc0d2
29539         * g10/getkey.c (get_seckey): If the key doesn't have a secret key,
29540         release *PK.
29541
29542         g10: Improve documentation and comments for getkey.c.
29543         + commit cab581c486e1987445092b1afdf2cba1f62d017d
29544         * g10/getkey.c: Improve documentation and comments for most
29545         functions.  Move documentation for public functions from here...
29546         * g10/keydb.h: ... to here.
29547
29548         g10: Remove unused function have_any_secret_key.
29549         + commit 7333e704efde6923d4b914b37e9a92c4a5bab156
29550         * g10/getkey.c (have_any_secret_key): Remove function.
29551
29552         g10: Bring cache semantics closer to non-cache semantics.
29553         + commit 5e233e12f55be00f5659c63bc32fbdca2ec93136
29554         * g10/getkey.c (get_pubkey_fast): When reading from the cache, only
29555         consider primary keys.
29556
29557         g10: Break out of the loop earlier.
29558         + commit 3940f10af7915b080bf4ed25ceb7e20b52e3cd3e
29559         * g10/getkey.c (have_secret_key_with_kid): Once we find the relevent
29560         key or subkey, stop searching.
29561
29562         g10: Don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXT
29563         + commit 50affffe93a07643f2610c7a5f3d6f61988855e8
29564         * g10/getkey.c (lookup): Also don't skip legacy keys if the search
29565         mode is KEYDB_SEARCH_MODE_NEXT.
29566
29567         g10: Remove unused function get_seckeyblock_byfprint.
29568         + commit efbaa8f891812e13ae9e689299aa2cd51781ccb3
29569         * g10/keydb.h (get_seckeyblock_byfprint): Remove prototype.
29570         * g10/getkey.c (get_seckeyblock_byfprint): Remove function.
29571
29572         g10: Remove unused function get_seckey_byfprint.
29573         + commit e2b300801ed7143fa924df5442ec2b61079c0bbb
29574         * g10/keydb.h (get_seckey_byfprint): Remove prototype.
29575         * g10/getkey.c (get_seckey_byfprint): Remove function.
29576
29577         g10: Simplify get_seckey_byname: it was never called with NAME not NULL.
29578         + commit 80dbf8006ffe52e77930b0a6dca9d8caba8c3fd5
29579         * g10/keydb.h (get_seckey_byname): Rename from this...
29580         (get_seckey_default): ... to this.  Drop the parameter name.  Update
29581         users.
29582         * g10/getkey.c (get_seckey_byname): Rename from this...
29583         (get_seckey_default): ... to this.  Drop the parameter name.  Drop the
29584         code which assumed that NAME is not NULL.
29585
29586         g10: Eliminate the redundant function get_keyblock_byfprint.
29587         + commit dc69804ab0576fbc87297215d63b37a680d74d4d
29588         * g10/keydb.h (get_keyblock_byfprint): Remove prototype.  Replace use
29589         of this function with get_pubkey_byfprint.
29590         * g10/getkey.c (get_pubkey_byname): Remove function.
29591
29592         g10: Simplify semantics of get_pubkey_byname.
29593         + commit 911fcca36d61afd061e9e6dc0584bb069353db89
29594         * g10/getkey.c (get_pubkey_byname): If R_KEYBLOCK is not NULL, return
29595         the keyblock in R_KEYBLOCK independent of whether PK is set or not.
29596
29597         g10: Eliminate the redundant function get_pubkey_byname.
29598         + commit b4672e4d48fb1e1e4d17551c4c828763d1dfbb57
29599         * g10/getkey.c (get_pubkey_byname): Remove function.
29600         (lookup): Replace use of get_pubkey_byname by get_pubkey_byfprint.
29601
29602         g10: Eliminate the redundant function get_pubkey_end.
29603         + commit 65e58ae6748c280c8633d2ca5f227ebe1220805d
29604         * g10/keydb.h (get_pubkey_end): Remove declaration.  Replace use of
29605         function with getkey_end.
29606         * g10/getkey.c (get_pubkey_byname): Remove function.
29607
29608         g10: Eliminate the redundant function get_pubkey_next.
29609         + commit be6743b2e19241f66148bf89c3442d8e2ebcd63e
29610         * g10/keydb.h (get_pubkey_next): Remove prototype.
29611         * g10/getkey.c (get_pubkey_next): Remove function.
29612         * g10/keylist.c (locate_one): Use getkey_next instead of
29613         get_pubkey_next.
29614
29615         kbx: Change skipfnc's prototype so that we can provide all information.
29616         + commit 9acbeac23668a1d0dabca27d7825430d76e095c2
29617         * kbx/keybox-search-desc.h (struct keydb_search_desc.skipfnc): Change
29618         third parameter to be the index of the user id packet in the keyblock
29619         rather than the packet itself.  Update users.
29620
29621         g10: Remove unused prototype (get_pubkey_byfpr).
29622         + commit 83e17ab1b4cf4420f2abaf9e1f4017a9473fb281
29623         * g10/keydb.h (get_pubkey_byfpr): Remove unused prototype.
29624
29625         g10: Remove unused function (get_pubkey_bynames).
29626         + commit b06f96ba4f57f55194efcd37a0e3a2aa5450b974
29627         * g10/keydb.h (get_pubkey_bynames): Remove prototype.
29628         * g10/getkey.c (get_pubkey_bynames): Remove function.
29629
29630         g10: Simplify code.  Turn struct getkey_ctx_s.found_key into an argument
29631         + commit d47e84946ee010917cfc3501062721b74afbb771
29632         * g10/getkey.c (struct getkey_ctx_s): Remove field found_key.
29633         (lookup): Add argument ret_found_key.  If not NULL, set it to the
29634         found key.  Update callers.
29635         (pk_from_block): Add argument found_key.  Use it instead of
29636         CTX->FOUND_KEY.  Update callers.
29637         (finish_lookup): Return a KBNODE (the found key) instead of an int.
29638         Don't set CTX->FOUND_KEY.  Return the found key instead.
29639
29640         g10: Remove unused field struct getkey_ctx_s.kbpos.
29641         + commit c110e186e07fb1035dc757d322274f939df1c86d
29642         * g10/getkey.c (struct getkey_ctx_s): Remove field kbpos.
29643         (getkey_end): Don't clear CTX->KBPOS.
29644
29645         g10: Simplify code: remove field struct getkey_ctx_s.keyblock.
29646         + commit 3798f73c07f33576bd02ba4a3256c626bd80752f
29647         * g10/getkey.c (struct getkey_ctx_s): Remove field keyblock.
29648         (finish_lookup): Add parameter keyblock.  Update caller to pass this.
29649         (lookup): Add new local variable keyblock.  Use this instead of
29650         ctx->keyblock for referencing the keyblock.
29651
29652 2015-09-16  NIIBE Yutaka  <gniibe@fsij.org>
29653
29654         agent: Fix registering SSH Key of Ed25519.
29655         + commit 7d5999f0964c9412c0e18eb1adefdb729be68cd4
29656         * agent/command-ssh.c (stream_read_string): Add the prefix of 0x40.
29657
29658 2015-09-15  NIIBE Yutaka  <gniibe@fsij.org>
29659
29660         po: Update Japanese translation.
29661         + commit faee25e670cfeb0d0166d7c59cc6a0b3842ee34d
29662
29663
29664 2015-09-10  Werner Koch  <wk@gnupg.org>
29665
29666         Release 2.1.8.
29667         + commit 311816f6cf9d411dba060603e3c5d01c72824645
29668
29669
29670         tests: Silence the 5gb-packet test.
29671         + commit 7a0c3cc760367024305d23e2124ea4cbc7e802df
29672         * tests/openpgp/4gb-packet.test: Send output to /dev/null.
29673
29674         g10: Fix make distcheck problem.
29675         + commit e92a8ab021672b19e5cd397fa555fcc8a3401e8b
29676         * g10/test.c: Include string.h.
29677         (prepend_srcdir): New.  Taken from Libgcrypt.
29678         (test_free): New.
29679         * g10/t-keydb.c (do_test): Malloc the filename.
29680         * g10/Makefile.am (AM_CPPFLAGS): Remove -DSOURCE_DIR
29681         (EXTRA_DIST): Add t-keydb-keyring.kbx.
29682
29683         g10: Improve portability of the new test driver.
29684         + commit fbf24cd09abcdc3dec21db4114ab2db99ce21e4c
29685         * g10/test.c: Include stdio.h and stdlib.h.
29686         (verbose): New.
29687         (print_results): Rename to exit_tests.
29688         (main): Remove atexit and call exit_tests.  Set verbose.
29689         (ASSERT, ABORT): Call exit_tests instead of exit.
29690
29691 2015-09-09  Werner Koch  <wk@gnupg.org>
29692
29693         dirmngr: Allow sending much larger keyblocks.
29694         + commit 19545e3a2d2990cba6d62f98cdb1f665b38ba4f1
29695         * dirmngr/server.c (MAX_CERT_LENGTH): Increase to 16k.
29696         (MAX_KEYBLOCK_LENGTH): Increase to 20M.
29697
29698 2015-09-07  NIIBE Yutaka  <gniibe@fsij.org>
29699
29700         scd: Force key attribute change for writekey.
29701         + commit f10b427d0e2be333776fee2df8150145da36e587
29702         * scd/app-openpgp.c (change_rsa_keyattr): New.
29703         (change_keyattr_from_string): Use change_rsa_keyattr.
29704         (rsa_writekey): Call change_rsa_keyattr when different size.
29705         (ecc_writekey): Try to change key attribute.
29706
29707         scd: KEYNO cleanup.
29708         + commit fd689e85423d0d80d725f0315c52d94f0e9766f8
29709         * scd/app-openpgp.c (get_public_key, send_keypair_info, do_readkey)
29710         (change_keyattr, change_keyattr_from_string, ecc_writekey, do_genkey)
29711         (compare_fingerprint, check_against_given_fingerprint): KEYNO starts
29712         from 0.
29713
29714 2015-09-02  Neal H. Walfield  <neal@g10code.com>
29715
29716         g10: Remove unused field req_algo.
29717         + commit bd0c902f1de46eda03a065da41487e7e01ab4c50
29718         * g10/packet.h (PKT_public_key): Remove unused field req_algo.  Remove
29719         users.
29720         * g10/getkey.c (struct getkey_ctx_s): Remove unused field req_algo.
29721         Remove users.
29722
29723         g10: Use a symbolic constant instead of a literal.
29724         + commit 1f03d4cd940fed26fc3ffa1742728d68c55ee5d1
29725         * g10/trustdb.c (KEY_HASH_TABLE_SIZE): Define.
29726         (new_key_hash_table): Use KEY_HASH_TABLE_SIZE instead of a literal.
29727         (release_key_hash_table): Likewise.
29728         (test_key_hash_table): Likewise.
29729         (add_key_hash_table): Likewise.
29730
29731         g10: Add test for keydb as well as new testing infrastructure.
29732         + commit ee7ec1256b24dc340656c331ef92fc59cad817b6
29733         * g10/Makefile.am (EXTRA_DIST): Add test.c.
29734         (AM_CPPFLAGS): Add -DSOURCE_DIR="\"$(srcdir)\"".
29735         (module_tests): Add t-keydb.
29736         (t_keydb_SOURCES): New variable.
29737         (t_keydb_LDADD): Likewise.
29738         * g10/t-keydb.c: New file.
29739         * g10/t-keydb-keyring.kbx: New file.
29740         * g10/test-stubs.c: New file.
29741         * g10/test.c: New file.
29742
29743         g10: Make the keyblock cache per-handle rather than global.
29744         + commit 60bc518645d3acfd4dcb79e61a2be6ce001e93aa
29745         * g10/keydb.c (keyblock_cache): Don't declare this variable.  Instead...
29746         (struct keyblock_cache): ... turn its type into this first class
29747         object...
29748         (struct keydb_handle): ... and instantiate it once per database
29749         handle.  Update all users.
29750         (keydb_rebuild_caches): Don't invalidate the keyblock cache.
29751
29752         g10: If iobuf_seek fails when reading from the cache, do a hard read.
29753         + commit f076fa190e09eab5c586650d81e241e0bb85ce25
29754         * g10/keydb.c (keydb_get_keyblock): If the iobuf_seek fails when
29755         reading from the cache, then simply clear the cache and try reading
29756         from the database.
29757
29758         iobuf: Reduce verbosity of test.
29759         + commit 219de84df9a8408fffedbb2600f5eb4c441950b6
29760         * common/t-iobuf.c (main): Reduce verbosity.
29761
29762         iobuf: Add the IOBUF_INPUT_TEMP type to improve input temp handling.
29763         + commit f2d75ac7dc58f5ea59b231be6b83fea939b43ab8
29764         * common/iobuf.h (enum iobuf_use): Add new member, IOBUF_INPUT_TEMP.
29765         * common/iobuf.c (iobuf_temp_with_content): Create the iobuf as an
29766         IOBUF_INPUT_TEMP, not an IOBUF_INPUT buffer.  Assert that LENGTH ==
29767         A->D.SIZE.
29768         (iobuf_push_filter2): If A is an IOBUF_INPUT_TEMP, then make the new
29769         filter an IOBUF_INPUT filter and set its buffer size to
29770         IOBUF_BUFFER_SIZE.
29771         (underflow): If A is an IOBUF_INPUT_TEMP, then just return EOF; don't
29772         remove already read data.
29773         (iobuf_seek): If A is an IOBUF_INPUT_TEMP, don't discard the buffered
29774         data.
29775         (iobuf_alloc): Allow USE == IOBUF_INPUT_TEMP.
29776         (pop_filter): Allow USE == IOBUF_INPUT_TEMP.
29777         (iobuf_peek): Allow USE == IOBUF_INPUT_TEMP.
29778         (iobuf_writebyte): Fail if USE == IOBUF_INPUT_TEMP.
29779         (iobuf_write): Fail if USE == IOBUF_INPUT_TEMP.
29780         (iobuf_writestr): Fail if USE == IOBUF_INPUT_TEMP.
29781         (iobuf_flush_temp): Fail if USE == IOBUF_INPUT_TEMP.
29782
29783         iobuf: Rename IOBUF_TEMP to IOBUF_OUTPUT_TEMP.
29784         + commit 5ff5e72b9c275fbd978136b1028bbf251af26e57
29785         * common/iobuf.h (enum iobuf_use): Rename IOBUF_TEMP to
29786         IOBUF_OUTPUT_TEMP.  Update users.
29787
29788         iobuf: Use a first-class enum.
29789         + commit 24259d856b6cbdd679035512a8fb7c042de8f02e
29790         * common/iobuf.h (enum iobuf_use): Name the IOBUF_OUTPUT, etc. enum.
29791         (struct iobuf_struct): Change the field use's type to it.
29792
29793         iobuf: Fix test.
29794         + commit 8522cdc2264804d0677b7c0a447a0b45cf4195e3
29795         * common/t-iobuf.c (content_filter): If there is nothing to read,
29796         don't forget to set *LEN to 0.
29797         (main): Fix checks.
29798
29799 2015-09-01  Werner Koch  <wk@gnupg.org>
29800
29801         agent: Protect commit 135b1e3 against misbehaving Libgcrypt.
29802         + commit 9ba4ccdaf5e128fbea51ff142c63d4b359c7264d
29803         * agent/command-ssh.c (ssh_key_to_blob): Check DATALEN.
29804
29805         gpg: Remove option --no-sig-create-check.
29806         + commit f9c83d84e7d33df76898975f5ac852efa9c4882a
29807         * g10/gpg.c (opts): Remove --no-sig-create-check.
29808         * g10/options.h (struct opt): Remove field no_sig_create_check.
29809         * g10/sign.c (do_sign): Always check unless it is RSA and we are using
29810         Libgcrypt 1.7.
29811
29812         common: Assume an utf-8 locale on iconv errors.
29813         + commit 99c9bf7defd6c1ac9cc49c84e6c78eeb886a6952
29814         * common/utf8conv.c (handle_iconv_error): Use utf-8 as fallback.
29815
29816         common: Fix regression in building argpase.c standalone.
29817         + commit bc23e69b70191f887dcb937007833d0187af181f
29818         * common/argparse.c (is_native_utf8) [GNUPG_MAJOR_VERSION]: New.
29819
29820 2015-08-31  Neal H. Walfield  <neal@g10code.com>
29821
29822         g10: Don't leak memory if we fail to initialize a new database handle.
29823         + commit 04a6b903d0354be2c69c7f2c98987de17d68416e
29824         * g10/keydb.c (keydb_new): If we fail to open a keyring or keybox
29825         correctly release all resources.
29826
29827         g10: Improve interface documentation of the keydb API.
29828         + commit 360b699e9b4b8f99bd790b3cd158cd6f0fd7c131
29829         * g10/keydb.c: Improve code comments and documentation of internal
29830         interfaces.  Improve documentation of public APIs and move that to...
29831         * g10/keydb.h: ... this file.
29832
29833         g10: Don't cache search results if the search didn't scan the whole DB.
29834         + commit efd1ead9e779eb3bd37384258e08ad921a934612
29835         * g10/keydb.c (struct keydb_handle): Add new field is_reset.
29836         (keydb_new): Initialize hd->is_reset to 1.
29837         (keydb_locate_writable): Set hd->is_reset to 1.
29838         (keydb_search): Set hd->is_reset to 0.  Don't cache a key not found if
29839         the search started from the beginning of the database.
29840
29841         g10: Have keydb_search_first call keydb_search_reset before searching.
29842         + commit 11d8ffc939a4d20cfb0082b2d966b1e1a7d61f8d
29843         * g10/keydb.c (keydb_search_first): Reset the handle before starting
29844         the search.
29845
29846         g10: Remove unused parameter.
29847         + commit 0377db4b3581561b1ffc5bb7c3b4d698e8993b3a
29848         * g10/keydb.h (keydb_locate_writable): Remove unused parameter
29849         reserved.  Update users.
29850
29851 2015-08-31  NIIBE Yutaka  <gniibe@fsij.org>
29852
29853         agent: Fix SSH public key for EdDSA.
29854         + commit 135b1e32f01beaceba8a4ecc774e23b56aca1d24
29855         * agent/command-ssh.c (ssh_key_to_blob): Remove the prefix 0x40.
29856
29857 2015-08-26  Neal H. Walfield  <neal@g10code.com>
29858
29859         g10: Simplify cache.  Only include data that is actually used.
29860         + commit fad91071cadff43d77ce2e524dfb03999ba6678e
29861         * g10/keydb.c (struct kid_list_s): Rename from this...
29862         (struct kid_not_found_cache_bucket): ... to this.  Update users.
29863         Remove field state.
29864         (kid_list_t): Remove type.
29865         (KID_NOT_FOUND_CACHE_BUCKETS): Define.  Use this instead of a literal.
29866         (kid_found_table): Rename from this...
29867         (kid_not_found_cache_bucket): ... to this.  Update users.
29868         (kid_found_table_count): Rename from this...
29869         (kid_not_found_cache_count): ... to this.  Update users.
29870         (kid_not_found_p): Only return whether a key with the specified key id
29871         is definitely not in the database.
29872         (kid_not_found_insert): Remove parameter found.  Update callers.
29873         (keydb_search): Only insert a key id in the not found cache if it is
29874         not found.  Rename local variable once_found to already_in_cache.
29875
29876 2015-08-25  Werner Koch  <wk@gnupg.org>
29877
29878         Add configure option --enable-build-timestamp.
29879         + commit 9d07f6930aaa40dce92104e8c99241713d92eed2
29880         * configure.ac (BUILD_TIMESTAMP): Set to "<none>" by default.
29881
29882         gpg: Emit ERROR status for key signing failures.
29883         + commit 51b9b8fba4ee326013c2cc911c70cde4c5f81fc7
29884         * g10/keyedit.c (sign_uids): Write an ERROR status for a signing
29885         failure.
29886         (menu_adduid, menu_addrevoker, menu_revsig): Ditto.
29887         (menu_revuid, menu_revkey, menu_revsubkey): Ditto.
29888
29889         gpg: Print a new FAILURE status after most commands.
29890         + commit 9cdff09743c473a12359bfdb914578ede0e4e3e2
29891         * common/status.h (STATUS_FAILURE): New.
29892         * g10/cpr.c (write_status_failure): New.
29893         * g10/gpg.c (main): Call write_status_failure for all commands which
29894         print an error message here.
29895         * g10/call-agent.c (start_agent): Print an STATUS_ERROR if we can't
29896         set the pinentry mode.
29897
29898 2015-08-24  Neal H. Walfield  <neal@g10code.com>
29899
29900         agent: Raise the maximum password length.  Don't hard code it.
29901         + commit 348a6ebb63523305ce9f47d0f3e8a9086c338fed
29902         * agent/agent.h (MAX_PASSPHRASE_LEN): Define.
29903         * agent/command-ssh.c (ssh_identity_register): Use it instead of a
29904         hard-coded literal.
29905         * agent/cvt-openpgp.c (convert_from_openpgp_main): Likewise.
29906         * agent/findkey.c (unprotect): Likewise.
29907         * agent/genkey.c (agent_ask_new_passphrase): Likewise.
29908
29909 2015-08-24  Werner Koch  <wk@gnupg.org>
29910
29911         sm: Support secret key export via the Assuan interface.
29912         + commit 3cf02192a890d04f8f558cb72d46f9bd7a378322
29913         * sm/server.c (cmd_export): Add options --secret, --raw, and --pkcs12.
29914
29915 2015-08-23  Werner Koch  <wk@gnupg.org>
29916
29917         dirmngr: Allow sending of Zack's key.
29918         + commit 84f4c8811fc5bdd78693c4dc289389a8337cc257
29919         * dirmngr/server.c (MAX_KEYBLOCK_LENGTH): Increase to 1 MiB.
29920
29921         gpg: Fix regression in packet parser from Aug 19.
29922         + commit 88317ae8c829bfeb1689415efbd32b7a232d7bd0
29923         * g10/parse-packet.c (parse): Use an int to compare to -1.  Use
29924         buf32_to_ulong.
29925
29926         gpg: Show not found keys with --locate-key --verbose.
29927         + commit 00def10d365a88ce2d034ea9a5d6be4b03285fa4
29928         * g10/keylist.c (locate_one): Print a diagnostic for a not-found key.
29929
29930 2015-08-21  Neal H. Walfield  <neal@g10code.com>
29931
29932         common: Don't incorrectly reject 4 GB - 1 sized packets.
29933         + commit 09f2a7bca624d0492e1d7ab29ce19542249c13ff
29934         * g10/parse-packet.c (parse): Don't reject 4 GB - 1 sized packets.
29935         Add the constraint that the type must be 63.
29936         * kbx/keybox-openpgp.c (next_packet): Likewise.
29937         * tests/openpgp/4gb-packet.asc: New file.
29938         * tests/openpgp/4gb-packet.test: New file.
29939         * tests/openpgp/Makefile.am (TESTS): Add 4gb-packet.test.
29940         (TEST_FILES): Add 4gb-packet.asc.
29941
29942         common: Don't assume on-disk layout matches in-memory layout.
29943         + commit 4f37820334fadd8c5036ea6c42f3dc242665c4a9
29944         * g10/packet.h (PKT_signature): Change revkey's type from a struct
29945         revocation_key ** to a struct revocation_key *.  Update users.
29946
29947         common: Don't incorrectly copy packets with partial lengths.
29948         + commit b3226cadf9bbef4a367072396e5b0abf37afff2d
29949         * g10/parse-packet.c (parse): We don't handle copying packets with a
29950         partial body length to an output stream.  If this occurs, log an error
29951         and abort.
29952
29953         common: Check parameters more rigorously.
29954         + commit 0143d5c1ca4d12ac252c14f01931f48131591065
29955         * g10/parse-packet.c (dbg_copy_all_packets): Check that OUT is not
29956         NULL.
29957         (copy_all_packets): Likewise.
29958
29959         common: Don't continuing processing on error.
29960         + commit 48e792cc951a9d00fad0691ef7411c9e22cf675a
29961         * g10/parse-packet.c (dbg_parse_packet): Also return if parse returns
29962         an error.
29963         (parse_packet): Likewise.
29964         (dbg_search_packet): Likewise.
29965         (search_packet): Likewise.
29966
29967         common: Better respect the packet's length when reading it.
29968         + commit 73af66a0aada8f30d8f400fdc4f69e233fb53089
29969         * g10/parse-packet.c (parse_signature): Make sure PKTLEN doesn't
29970         underflow.  Be more careful that a read doesn't read more data than
29971         PKTLEN says is available.
29972
29973 2015-08-20  Werner Koch  <wk@gnupg.org>
29974
29975         po: Add lost translation of validity strings.
29976         + commit 0d5a4138f27187e7828ef8216758edc9b48b2c64
29977         * po/POTFILES.in (trust.c): Add missing file.
29978         * po/de.po: Changed German validity strings.
29979         * doc/help.de.txt: Ditto.
29980
29981 2015-08-20  Neal H. Walfield  <neal@g10code.com>
29982
29983         g10/parse-packet.c:parse: Try harder to not ignore an EOF.
29984         + commit 0add91ae1ca3718e8140af09294c595f47c958d3
29985         * g10/parse-packet.c (parse): Be more robust: make sure to process any
29986         EOF.
29987
29988         g10/parse-packet.c: Replace literal with symbolic expression.
29989         + commit 24a72dffa75a04611c98343140c4eb0fbfe2a59f
29990         * g10/parse-packet.c (dump_hex_line): Use sizeof rather than the
29991         buffer's size.
29992
29993         Add documentation for g10/parse-packet.c.
29994         + commit 026feff4a8e3090fb152af72c73aaa80c78e4551
29995         * g10/packet.h: Add documentation for functions defined in
29996         parse-packet.c.
29997         * g10/parse-packet.c: Improve comments for many functions.
29998
29999         g10/packet.h: Remove unused argument from enum_sig_subpkt.
30000         + commit c46e8bfe9a1ae3f1e5327d0451cffd6e4567b449
30001         * g10/packet.h (enum_sig_subpkt): Remove argument RET_N.  Update
30002         callers.
30003         * g10/parse-packet.c (enum_sig_subpkt): Remove argument RET_N.
30004
30005         g10/parse-packet.c:mpi_read: Detect EOF and correct boundary conditions.
30006         + commit c271feb53664dbf2b4ccbae90a31b8e726481e2d
30007         * g10/parse-packet.c (mpi_read): Improve documentation.  Correctly
30008         handle an EOF.  On overflow, correctly return the number of bytes read
30009         from the pipeline.
30010
30011         common/iobuf.c: Make control flow more obvious.
30012         + commit 49f922286fa8adb2d2ca730eb7bbe67e684b20de
30013         * common/iobuf.c (iobuf_read): Make control flow more obvious.
30014         (iobuf_get_filelength): Likewise.
30015         (iobuf_get_fd): Likewise.
30016         (iobuf_seek): Likewise.
30017
30018         common/iobuf.c: Add some sanity checks to catch programmer bugs.
30019         + commit c5da750cf3d53277fe6d86776bfe0d2304b05151
30020         * common/iobuf.c (iobuf_alloc): Check that BUFSIZE is not 0.
30021         (iobuf_readbyte): Check that A is an input filter.  Check that the
30022         amount of read data is at most the amount of buffered data.
30023         (iobuf_read): Check that A is an input filter.
30024         (iobuf_writebyte): Check that A is not an input filter.
30025         (iobuf_writestr): Check that A is not an input filter.
30026         (iobuf_flush_temp): Check that A is not an input filter.
30027
30028         common/iobuf.c:iobuf_write_temp: Elide redundant code.
30029         + commit e291b631c3b1aedf529078190cd51e2acfcd1d92
30030         * common/iobuf.c (iobuf_write_temp): Don't repeat iobuf_flush_temp.
30031         Use it directly.
30032
30033         common/iobuf.c: Have iobuf_writestr use iobuf_write, not iobuf_writebyte
30034         + commit a6d4bca3b576c3c5dba1aa6e8c1039089e14147b
30035         * common/iobuf.c (iobuf_write): Don't write a byte at a time.  Use
30036         iobuf_write.
30037
30038         common/iobuf: Improve documentation and code comments.
30039         + commit 1bfd1e43246c16e20f819bf5381ca21abde54458
30040         common/iobuf.h: Improve documentation and code comments.
30041         common/iobuf.c: Likewise.
30042
30043         common/iobuf.c: Adjust buffer size of filters in front of temp filters.
30044         + commit 0d40c4e83f6fbfea2f494f1f88412d3132ff98bd
30045         * common/iobuf.c (iobuf_push_filter2): If the head filter is a temp
30046         filter, use IOBUF_BUFFER_SIZE for the new filter.
30047
30048         common/iobuf.c: Buffered data should not be processed by new filters.
30049         + commit 827cc922d84d8113d4f13ebbed1314e03da5f7d2
30050         * common/iobuf.c (iobuf_push_filter2): If the pipeline is an output or
30051         temp pipeline, the new filter shouldn't assume ownership of the old
30052         head's internal buffer: the data was written before the filter was
30053         added.
30054         * common/t-iobuf.c (double_filter): New function.
30055         (main): Add test cases for the above bug.
30056
30057         common/iobuf.c: Flush the pipeline in iobuf_temp_to_buffer.
30058         + commit 616181f3c757160af8539869a6d929faca4962c4
30059         * common/iobuf.c (iobuf_temp_to_buffer): Flush each filter in the
30060         pipeline and copy the data from the last (not the first) filter's
30061         internal buffer.
30062
30063         common/iobuf.c: Combine iobuf_open, iobuf_create and iobuf_openrw.
30064         + commit 15ae99f887f4694de8468625d455d487d283f719
30065         * common/iobuf.c (do_open): New function, which is a generalization of
30066         iobuf_open, iobuf_Create, iobuf_openrw.
30067         (iobuf_open): Call do_open.
30068         (iobuf_create): Likewise.
30069         (iobuf_openrw): Likewise.
30070
30071         common/iobuf.h: Remove iobuf_open_fd_or_name.
30072         + commit 8402815d8e0e04a44362968f88b3d484d2395402
30073         * common/iobuf.h (iobuf_open_fd_or_name): Remove prototype.  Replace
30074         use with either iobuf_open or iobuf_fdopen_nc, as appropriate.
30075         * common/iobuf.c (iobuf_open): Remove function.
30076
30077         common/iobuf.c: Rename iobuf_flush and make it a static function.
30078         + commit 6d49a2b6691f2dd0d8ac34a15f18cc2a0c3ba5d3
30079         * common/iobuf.h (iobuf_flush): Remove prototype.
30080         * common/iobuf.c (filter_flush): New static prototype.
30081         (iobuf_flush): Rename...
30082         (filter_flush): ... to this.  Make static.  Simplify code.  Update
30083         callers.
30084
30085         common/iobuf.c: Don't abort freeing a pipeline if freeing a filter fails
30086         + commit 1f94646a86348128f585301fcd605e5e703fd77d
30087         * common/iobuf.c (iobuf_cancel): Don't abort freeing a pipeline if
30088         freeing a filter fails.  This needs to a memory leak.  Instead, keep
30089         freeing and return the error code of the first filter that fails.
30090
30091         common/iobuf.c: Improve iobuf_peek.
30092         + commit a250f73783c06d7789ac65a395d9247f4ab44c26
30093         * common/iobuf.c (underflow): Take additional parameter
30094         clear_pending_eof.  If not set, don't clear a pending eof when
30095         returning EOF.  Update callers.
30096         (iobuf_peek): Fill the internal buffer, if needed, to be able to
30097         better satisfy any request.
30098
30099         common/iobuf.c: When requested, fill the buffer even if it is not empty.
30100         + commit c7ad36eb0d7f872fc15e793aa1d0b6b89bc471d6
30101         * common/iobuf.c (underflow): Don't require that the buffer be empty.
30102         When called, fill any available space.
30103
30104         common/t-iobuf.c: Add a test case for multiple EOFs.
30105         + commit e76c75d8726558dc9084710253f0f6780e06fad3
30106         common/t-iobuf.c (main): Add a test case for multiple EOFs in an INPUT
30107         pipeline.
30108
30109         common/iobuf.c: Better respect boundary conditions in iobuf_read_line.
30110         + commit 4e32c602f5c40cca5f8f40e642ccb10d3f8c5614
30111         * common/iobuf.c (iobuf_read_line): Be more careful with boundary
30112         conditions.
30113         * common/iobuf.h: Include <gpg-error.h>.
30114         * common/t-iobuf.c: New file.
30115         * common/Makefile.am (module_tests): Add t-iobuf.
30116         (t_mbox_util_LDADD): New variable.
30117
30118         common/iobuf.c: Fix filter type for iobuf_temp_with_content.
30119         + commit fa9fda23c2c8cf6982b7263f6882ed8687d98c16
30120         * common/iobuf.c (iobuf_temp_with_content): Set the filter type to
30121         IOBUF_INPUT, not IOBUF_TEMP, which is only for output filters that
30122         write into a dynamic buffer.
30123
30124         common/iobuf.h: Remove unimplemented prototypes.
30125         + commit 75fd86bbd175e085a93c1ad62f50ae936494b307
30126         * common/iobuf.h (iobuf_unread): Remove unimplemented prototype.
30127         (iobuf_clear_eof): Likewise.
30128         (iobuf_append): Likewise.
30129
30130         common/iobuf.c: Refactor code to not need the desc field.
30131         + commit 679acc671e621847f50d6b4dca10a22c62500b9a
30132         * common/iobuf.h (struct iobuf_struct): Remove field desc.
30133         * common/iobuf.c (iobuf_desc): New function.  When a filter's
30134         description is needed, use this instead of the filter's desc field.
30135
30136         common/iobuf.h: Clarify semantics of nofast.  Simplify implementation.
30137         + commit 12fc56bcb51d984a6e86fc1eb7952f9976c67043
30138         * common/iobuf.h (struct iobuf_struct): Clarify semantics of nofast.
30139         Simplify use of nofast to implement just these semantics.
30140
30141         common/iobuf.c: Remove dead code (directfp).
30142         + commit e8c0b6abf88309c23a70df0abbd38d42fa22a786
30143         * common/iobuf.h (struct iobuf_struct): Remove field directfp.  Remove
30144         all uses of it.
30145
30146         common/iobuf.c: Remove dead code (opaque).
30147         + commit f05d60b3813a97e316a067680d7598b74621a522
30148         * common/iobuf.h (struct iobuf_struct): Remove field opaque.  Remove
30149         all uses of it.
30150
30151         common/iobuf.h: Replace further use of literals with symbolic constants.
30152         + commit c06eabac8e85f7f79414363836f093415e8da62e
30153         * common/iobuf.c: Move BLOCK_FILTER_INPUT,
30154         BLOCK_FILTER_OUTPUT_BLOCK_FILTER_TEMP from here...
30155         * common/iobuf.h: ... to here and rename to IOBUF_INPUT, IOBUF_OUTPUT
30156         and IOBUF_TEMP, respectively.  Where appropriate, use these macros
30157         instead of a literal.
30158
30159 2015-08-17  Werner Koch  <wk@gnupg.org>
30160
30161         gpg: Avoid linking to Libksba.
30162         + commit 91357b7722f2bf0d3765ec72855bdc96732df9d6
30163         * kbx/keybox.h (KEYBOX_WITH_X509): Do not define.
30164         * sm/Makefile.am (AM_CPPFLAGS): Define it here.
30165         (common_libs): Change to libkeybox509.a
30166         * g10/Makefile.am (AM_CFLAGS): remove KSBA_CFLAGS.
30167         (gpg2_LDADD, gpgv2_LDADD): Remove KSBA_LIBS
30168         * kbx/Makefile.am (noinst_LIBRARIES): Add libkeybox509.a.
30169         (libkeybox509_a_SOURCES): New.
30170         (libkeybox_a_CFLAGS): New.
30171         (libkeybox509_a_CFLAGS): New.
30172         (kbxutil_CFLAGS): New.
30173         * kbx/keybox-search.c (has_keygrip) [!KEYBOX_WITH_X509]: Declare args
30174         as unused.
30175
30176 2015-08-16  Ben Kibbey  <bjk@luxsci.net>
30177
30178         Fix pinentry loopback and passphrase contraints.
30179         + commit bba74cdd95ea98b5a7c3a12823b229341e91504e
30180         * agent/command.c (cmd_get_passphrase): Don't repeat passphrase for
30181         pinentry loopback mode.
30182         * agent/genkey.c (check_passphrase_constraints): Immediately return when
30183         pinentry mode is loopback.
30184
30185         Fix sending INQUIRE_MAXLEN for symmetric data.
30186         + commit 93f5295df512269dd8fecbd649b11cbacf78e864
30187         * g10/passphrase.c (passphrase_to_dek_ext): Write the status message.
30188
30189 2015-08-15  Ben Kibbey  <bjk@luxsci.net>
30190
30191         Inform a user about inquire length limit.
30192         + commit f126ca61565922b3b938c3486614b9bd7e6e454c
30193         * common/status.h (INQUIRE_MAXLEN): New.
30194         * g10/call-agent.c (default_inquire_cb): Send STATUS_INQUIRE_MAXLEN.
30195         client when inquiring a passphrase over pinentry-loopback.
30196
30197         Allow --gen-key to inquire a passphrase.
30198         + commit 233b5fedabd80a34452e748132e65b5944310428
30199         * g10/gpg.c (main): test for --command-fd during --gen-key parse.
30200
30201         When --command-fd is set then imply --batch to let gpg inquire a
30202         passphrase rather than requiring a pinentry.
30203
30204 2015-08-11  Werner Koch  <wk@gnupg.org>
30205
30206         Release 2.1.7.
30207         + commit b5e081973b56b21214fc0c65ba9015dd026328b4
30208
30209
30210 2015-08-10  NIIBE Yutaka  <gniibe@fsij.org>
30211
30212         agent: fix ECC key handling.
30213         + commit 8704c70108218a60f8fb2ee0e558ca8ed125600d
30214         * agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
30215         (convert_transfer_key): CURVE is the name of curve.
30216
30217 2015-08-08  Neal H. Walfield  <neal@g10code.com>
30218
30219         common/iobuf.c: Replace use of literals with symbolic constants.
30220         + commit c80643c5ecbee89f343ef087313870cee1334fe4
30221         * common/iobuf.c (BLOCK_FILTER_INPUT): Define.  Where appropriate, use
30222         this instead of a literal.
30223         (BLOCK_FILTER_OUTPUT): Likewise.
30224         (BLOCK_FILTER_TEMP): Likewise.
30225
30226 2015-08-07  Werner Koch  <wk@gnupg.org>
30227
30228         gpg: Allow gpgv to work with a trustedkeys.kbx file.
30229         + commit 5b7a80b1ab91d2f199065e5dd14e85f42918975d
30230         * g10/keydb.h (KEYDB_RESOURCE_FLAG_GPGVDEF): New.
30231         * g10/keydb.c (keydb_add_resource): Take care of new flag.
30232         * g10/gpgv.c (main): Use new flag.
30233
30234         agent: Add option --force to the DELETE_KEY command.
30235         + commit a68c5c5c7fe4ec8665e252e5062292f6c7b94fdd
30236         * agent/findkey.c (agent_delete_key): Add arg "force".
30237         * agent/command.c (cmd_delete_key): Add option --force.
30238
30239         common: Change alias for Curve25519 to "cv25519".
30240         + commit 9f31ab3d216ed74d6f392a62e3f95e0591174119
30241         * common/openpgp-oid.c (oidtable): Change alias.
30242
30243 2015-08-06  Werner Koch  <wk@gnupg.org>
30244
30245         gpg: Remove duplicated printing of the curve name in "sub" lines.
30246         + commit fb754dc6170d12edf3d35c48340b8d7b1ded20f7
30247         * g10/keylist.c (list_keyblock_print): Do not print extra curve name.
30248
30249         gpg: Add commands "fpr *" and "grip" to --edit-key.
30250         + commit fbb6c25ab5dbb5f2b1f1eb342ca7caa3f955d8c9
30251         * g10/keyedit.c (cmdGRIP): New.
30252         (cmds): Add command "grip".
30253         (keyedit_menu) <cmdFPR>: Print subkeys with argument "*".
30254         (keyedit_menu) <cmdGRIP>: Print keygrip.
30255         (show_key_and_fingerprint): Add arg "with_subkeys".
30256         (show_key_and_grip): New.
30257         * g10/keylist.c (print_fingerprint): Add mode 4.
30258
30259         gpg: Adjust UID line indentation for common key algos.
30260         + commit 969542c8c2f48a60c1d68b7bf70b0c00374bacba
30261         * g10/keylist.c (list_keyblock_print): Change UID line indentation
30262         * g10/mainproc.c (list_node): Ditto.
30263
30264 2015-08-06  NIIBE Yutaka  <gniibe@fsij.org>
30265
30266         Curve25519 support.
30267         + commit e5891a82c39997b65ce9ff90eb6120db7bedd399
30268         * agent/cvt-openpgp.c (get_keygrip): Handle Curve25519.
30269         (convert_secret_key, convert_transfer_key): Ditto.
30270         * common/openpgp-oid.c (oidtable): Add Curve25519.
30271         (oid_crv25519, openpgp_oid_is_crv25519): New.
30272         * common/util.h (openpgp_oid_is_crv25519): New.
30273         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Handle the case
30274         with Montgomery curve which uses x-only coordinate.
30275         * g10/keygen.c (gen_ecc): Handle Curve25519.
30276         (ask_curve): Change the API and second arg is to return subkey algo.
30277         (generate_keypair, generate_subkeypair): Follow chage of ask_curve.
30278         * g10/keyid.c (keygrip_from_pk): Handle Curve25519.
30279         * g10/pkglue.c (pk_encrypt): Handle Curve25519.
30280         * g10/pubkey-enc.c (get_it): Handle the case with Montgomery curve.
30281         * scd/app-openpgp.c (ECC_FLAG_DJB_TWEAK): New.
30282         (send_key_attr): Work with general ECC, Ed25519, and Curve25519.
30283         (get_public_key): Likewise.
30284         (ecc_writekey): Handle flag_djb_tweak.
30285
30286         common: extend API of openpgp_oid_to_curve for canonical name.
30287         + commit a6e40530898622fbc5d76557a7da5e69368ecaa4
30288         * common/openpgp-oid.c (openpgp_oid_to_curve): Add CANON argument.
30289         * common/util.h: Update.
30290         * g10/import.c (transfer_secret_keys): Follow the change.
30291         * g10/keyid.c (pubkey_string): Likewise.
30292         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Likewise.
30293         * parse-packet.c (parse_key): Likewise.
30294         * scd/app-openpgp.c (send_key_attr, get_public_key): Likewise.
30295
30296 2015-08-05  NIIBE Yutaka  <gniibe@fsij.org>
30297
30298         scd: Fix ecc_oid.
30299         + commit d088d2c81690a89051349ddc8a82fe222625f4e0
30300         * scd/app-openpgp.c (ecc_oid): Call with OIDBUF.
30301
30302         scd: Fix ECC support.
30303         + commit 0751571cac0f5aef2862c34a184f7f09ad9cb203
30304         * scd/app-openpgp.c (send_key_attr): Send KEYNO.
30305         (get_public_key): Fix SEXP composing.
30306         (ecc_writekey): Fix OID length calculation.
30307         (ecc_oid): Prepend the length before query.
30308         (parse_algorithm_attribute): Handle the case the curve is not available.
30309
30310 2015-08-04  Werner Koch  <wk@gnupg.org>
30311
30312         gpg: Fix duplicate key import due to legacy key in keyring.
30313         + commit 4a326d7c9a3b09efcccf4de00d6c003829ad89e8
30314         * g10/keydb.c (keydb_search_fpr): Skip legacy keys.
30315
30316         gpg: Properly handle legacy keys while looking for a secret key.
30317         + commit f05a63b10428df2878b1bb6fde57a2fc2aa99105
30318         * g10/getkey.c (have_secret_key_with_kid): Skip legacy keys.
30319
30320 2015-07-31  Werner Koch  <wk@gnupg.org>
30321
30322         gpg: Fix endless loop for expired keys given by fpr.
30323         + commit 328a6b6459a5ce4a70b374262f221ada20c40878
30324         * g10/getkey.c (lookup): Disable keydb caching when continuing a
30325         search.
30326
30327 2015-07-29  Werner Koch  <wk@gnupg.org>
30328
30329         gpg: Do not return "Legacy Key" from lookup if a key is expired.
30330         + commit 23d8609f4b5ec3432323a676fd7ef225c0ef71a1
30331         * g10/getkey.c (lookup): Map GPG_ERR_LEGACY_KEY.
30332
30333         gpg: Indicate secret keys and cards in a key-edit listing.
30334         + commit 8b2b988309cbc5af339beb0a55ff71d7464eb646
30335         * g10/keyedit.c (sign_uids): Add arg "ctrl".
30336         (show_key_with_all_names_colon): Ditto.
30337         (show_key_with_all_names): Ditto.
30338
30339         * g10/keyedit.c (show_key_with_all_names): Print key record
30340         indicators by checking with gpg-agent.
30341         (show_key_with_all_names): Ditto.  May now also print sec/sbb.
30342
30343 2015-07-28  Werner Koch  <wk@gnupg.org>
30344
30345         gpg: Remove the edit-key toggle command.
30346         + commit 7ef09afd1a6a37c7f22e7c3d898f0c917b08f940
30347         * g10/keyedit.c (cmds): Remove helptext from "toggle".
30348         (keyedit_menu): Remove "toggle" var and remove the sub/pub check
30349         against toggle.
30350
30351         common,w32: Avoid unused var warning about msgcache.
30352         + commit 4bc75337f31374b7424d7bdebf839dd91ec80c0a
30353         * common/i18n.c (USE_MSGCACHE): New.
30354         (msgcache) [!USE_MSGCACHE]: Do not define.
30355         (i18n_localegettext): Repalce #if conditions by USE_MSGCACHE.
30356
30357         w32: Try more places to find an installed Pinentry.
30358         + commit 18f1e627c697d75175b79fe095305fa775f20841
30359         * common/homedir.c (get_default_pinentry_name): Re-implement to
30360         support several choices for Windows.
30361
30362 2015-07-26  Werner Koch  <wk@gnupg.org>
30363
30364         scd: Fix size_t/unsigned int mismatch.
30365         + commit 55e64f47a52d76e097a01eb4044a88a4e10d6a87
30366         * scd/app-openpgp.c (ecc_writekey): Use extra var n.
30367
30368         Replace GNUPG_GCC_A_ macros by GPGRT_ATTR_ macros.
30369         + commit d382242fb6789973ce8d246ec154a4a1468c24c0
30370         * common/util.h: Provide replacement for GPGRT_ATTR_ macros when using
30371         libgpg-error < 1.20.
30372         * common/mischelp.h: Ditto.
30373         * common/types.h: Ditto.
30374
30375 2015-07-25  NIIBE Yutaka  <gniibe@fsij.org>
30376
30377         scd: support any curves defined by libgcrypt.
30378         + commit ef080d5c7fb7f3b75c3c57c011f78a312b8e13a9
30379         * g10/call-agent.h (struct agent_card_info_s): Add curve field.
30380         * g10/call-agent.c (learn_status_cb): Use curve name.
30381         * g10/card-util.c (card_status): Show pubkey name.
30382         * scd/app-openpgp.c (struct app_local_s): Record OID and flags.
30383         (store_fpr): Use ALGO instead of key type.
30384         (send_key_attr): Use curve name instead of OID.
30385         (get_public_key): Clean up by OID to curve name.
30386         (ecc_writekey): Support any curves in libgcrypt.
30387         (do_genkey, do_auth, ): Follow the change.
30388         (ecc_oid): New.
30389         (parse_algorithm_attribute): Show OID here.
30390
30391 2015-07-23  Peter Wu  <peter@lekensteyn.nl>
30392
30393         build: ignore scissor line for the commit-msg hook.
30394         + commit d24165bce2823c2f5dcb39b7b84c9aa00802a8ee
30395         * build-aux/git-hooks/commit-msg: Stop processing more lines when the
30396           scissor line is encountered.
30397
30398 2015-07-23  NIIBE Yutaka  <gniibe@fsij.org>
30399
30400         scd: Format change to specify "rsa2048" for KEY-ATTR.
30401         + commit dbf4534f49a1fe3823bd6d6d7bb4d9df863b4789
30402         * g10/card-util.c (do_change_keysize): Put "rsa".
30403         * scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
30404         Change the command format.
30405         (rsa_writekey): Check key type.
30406         (do_writekey): Remove "ecdh" and "ecdsa" support which was available
30407         in experimental libgcrypt before 1.6.0.
30408
30409 2015-07-22  Werner Koch  <wk@gnupg.org>
30410
30411         Avoid a leading double slash in make_filename.
30412         + commit 69d2c9b09bd9d0b86b9f2feb585037a2c11795b0
30413         * common/stringhelp.c (do_make_filename): Special case leading '/'.
30414
30415 2015-07-21  NIIBE Yutaka  <gniibe@fsij.org>
30416
30417         scd: change_keyattr_from_string for ECC.
30418         + commit 9901be395684dd1b35d83685a719291347684ab1
30419         * scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
30420         Support ECC.
30421         (rsa_writekey): Don't change key attribute.
30422
30423 2015-07-17  NIIBE Yutaka  <gniibe@fsij.org>
30424
30425         scd: Use openpgpdefs.h for constants.
30426         + commit f5d356fb5bbbd0e05a753612455253e4bc335266
30427         * scd/app-openpgp.c: Include openpgpdefs.h.
30428
30429 2015-07-16  Neal H. Walfield  <neal@g10code.com>
30430
30431         Don't segfault if the first 'auto-key-locate' option is 'clear'.
30432         + commit f2ee673c99825d5189631031ddec2dbf54dbd482
30433         * g10/getkey.c (free_akl): If AKL is NULL, just return.
30434
30435 2015-07-10  NIIBE Yutaka  <gniibe@fsij.org>
30436
30437         agent: Support non-NLS build.
30438         + commit b3286af36d452fc801be573a057b0838d53a2edd
30439         * agent/agent.h: Use ENABLE_NLS and define L_() macro.
30440
30441 2015-07-09  NIIBE Yutaka  <gniibe@fsij.org>
30442
30443         scd: Remove unused files.
30444         + commit 67b2dc7636e47baefd5aafe0eb45b4730f974481
30445         * scd/Makefile.am (sc_copykeys_*): Remove.
30446         * scd/sc-copykeys.c: Remove.
30447         * scd/pcsc-wrapper.c: Remove.
30448         * scd/{card-common.h,card-dinsig.c,card-p15.c,card.c}: Remove.
30449
30450 2015-07-08  NIIBE Yutaka  <gniibe@fsij.org>
30451
30452         g10: Use canonical name for curve.
30453         + commit 5b46726931049e060d8fbfa879db7907078a9aed
30454         * g10/import.c (transfer_secret_keys): Use canonical name.
30455         * common/openpgp-oid.c (openpgp_curve_to_oid): Return NULL on error.
30456         * g10/keyid.c (pubkey_string): Follow change of openpgp_curve_to_oid.
30457         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
30458         * g10/parse-packet.c (parse_key): Ditto.
30459
30460 2015-07-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
30461
30462         drop long-deprecated gpgsm-gencert.sh.
30463         + commit 1be2cebf7ff5837c8b548b4f4afbf1b8b28211bc
30464          * tools/gpgsm-gencert.sh: remove deprecated script entirely.  It is
30465            fully replaced by gpgsm --gen-key
30466          * doc/tools.texi: remove gpgsm-gencert.sh documentation
30467          * .gitignore: no longer ignore gpgsm-gencert.sh manpage
30468          * doc/Makefile.am: quit making the manpage
30469          * tools/Makefile.am: quit distributing the script
30470          * doc/howto-create-a-server-cert.texi: overhaul documentation to use
30471            gpgsm --gen-key and tweak explanations
30472
30473 2015-07-02  NIIBE Yutaka  <gniibe@fsij.org>
30474
30475         po: Update Japanese translation.
30476         + commit 3502b3cc0f5ff92ab89a0da8b1e344a8ad615737
30477
30478
30479         scd: Support AES decryption for OpenPGPcard v3.0.
30480         + commit 45c49a0030c7a01ec011ce810ddb3aaef734e9bf
30481         * scd/app-openpgp.c (do_decipher): Support AES decryption.
30482
30483 2015-07-01  Werner Koch  <wk@gnupg.org>
30484
30485         Release 2.1.6.
30486         + commit a499eeb6a6545d87ac9f1b64e32017bfdb4f67e6
30487
30488
30489 2015-07-01  Daiki Ueno  <ueno@gnu.org>
30490
30491         agent: Unset INSIDE_EMACS on gpg-agent startup.
30492         + commit f1490a3a0ecf4a5a03373c9563f7709630232ee3
30493         * agent/gpg-agent.c (main): Unset INSIDE_EMACS envvar.
30494
30495 2015-07-01  Werner Koch  <wk@gnupg.org>
30496
30497         common: Implement i18n_localegettext.
30498         + commit a65447f0d64d0c53ddbdcfc988f26ecc9a8a6f08
30499         * common/i18n.c (msg_cache_s, msg_cache_head_s): New.
30500         (msgcache): New.
30501         (i18n_localegettext): Implement locale dependent lookup.
30502
30503 2015-06-30  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
30504
30505         Pass DBUS_SESSION_BUS_ADDRESS for gnome3.
30506         + commit 816824953c91959c23a57c047bdba6a902ffdde6
30507         * common/session-env.c (stdenvnames): Add DBUS_SESSION_BUS_ADDRESS.
30508
30509 2015-06-30  Werner Koch  <wk@gnupg.org>
30510
30511         Flag the L_() function with attribute format_arg.
30512         + commit 232af382e563fcbe15589a3ccae7d6908a17c44d
30513         * agent/agent.h (LunderscorePROTO): New.
30514         * common/util.h (GNUPG_GCC_ATTR_FORMAT_ARG): New.
30515         * common/i18n.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. Use for
30516         i18n_localegettext.  Expand LunderscorePROTO.
30517         * agent/genkey.c (check_passphrase_constraints): Use xtryasprintf
30518         again to keep the old translations.
30519
30520         agent: Use different translation func for Pinentry strings.
30521         + commit e76d4c05b24211f3981ab69cddb3fccc17d21e0e
30522         * po/Makevars (XGETTEXT_OPTIONS): Add keyword "L_".
30523         * common/i18n.c (i18n_localegettext): New stub.
30524         * common/i18n.h: Expand the LunderscoreIMPL macro.
30525         * agent/agent.h (L_): New.
30526         (LunderscoreIMPL): New.
30527         * agent/call-pinentry.c (setup_qualitybar): Add arg ctrl anc change
30528         caller.
30529         * agent/findkey.c (try_unprotect_cb): Add local var ctrl.
30530         * agent/genkey.c (check_passphrase_constraints): Replace xtryasprintf
30531         by xtrystrdup to avoid gcc warning.  Unfortinately this changes the
30532         string.
30533         (agent_ask_new_passphrase): Cleanup the use of initial_errtext.
30534
30535         gpg: Make show-sig-subpackets work again.
30536         + commit 010e4281c3e15e2f86589dd1da419531ead519ef
30537         * g10/gpg.c (parse_list_options): Fix offset for subpackets.
30538
30539 2015-06-29  Werner Koch  <wk@gnupg.org>
30540
30541         agent: Prepare for Libassuan with Cygwin support.
30542         + commit b6076579311029aa76c00377d9a804b1578bf58f
30543         * agent/gpg-agent.c (create_server_socket): Add arg "cygwin".  Call
30544         assuan_sock_set_flag if Assuan version is recent enough.
30545         (main): Create ssh server socket with Cygwin flag set.
30546
30547 2015-06-29  Neal H. Walfield  <neal@gnu.org>
30548
30549         Show passphrase constraints errors as password prompt errors.
30550         + commit 2778c6f8f40d73272075ce04c07097f65c94054e
30551         * agent/agent.h (check_passphrase_constraints): Add parameter
30552         failed_constraint and remove parameter silent.  Update callers.
30553         * agent/genkey.c (check_passphrase_constraints): Add parameter
30554         failed_constraint and remove parameter silent.  If FAILED_CONSTRAINT
30555         is not NULL and OPT.ENFORCE_PASSPHRASE_CONSTRAINTS is FALSE, save the
30556         error text in *FAILED_CONSTRAINT and don't call take_this_one_anyway
30557         or take_this_one_anyway2.  If FAILED_CONSTRAINT is NULL, act as if
30558         SILENT was set.
30559         (agent_ask_new_passphrase): Change initial_errtext's type from a const
30560         char * to a char *.  Pass it to check_passphrase_constraints.  If it
30561         contains malloc's memory, free it.
30562
30563 2015-06-29  Neal H. Walfield  <neal@g10code.com>
30564
30565         Improve documentation for default-cache-ttl and default-cache-ttl-ssh.
30566         + commit 0416aed4abf6cea94458d2e38eb4a5e6bfea2d8b
30567         * doc/gpg-agent.texi (Agent Options): Improve documentation for
30568         default-cache-ttl and default-cache-ttl-ssh.
30569
30570         Don't raise max-cache-ttl to default-cache-ttl.
30571         + commit 60cf69ff9d61a2cd37fc4468f232fd41aa70a651
30572         * agent/gpg-agent.c (finalize_rereadable_options): Don't raise
30573         max-cache-ttl to default-cache-ttl.  Likewise for max-cache-ttl-ssh
30574         and default-cache-ttl-ssh.
30575
30576         Improve the description of old packets with an indeterminate length.
30577         + commit 68c217f457a772984d0afbdd341f18de7c867505
30578         * g10/parse-packet.c (parse): Make the description more accurate when
30579         listing packets: old format packets don't support partial lengths,
30580         only indeterminate lengths (RFC 4880, Section 4.2).
30581
30582 2015-06-29  Werner Koch  <wk@gnupg.org>
30583
30584         agent: Add --verify to the PASSWD command.
30585         + commit 9bca96dbc5c32bdd00196462fde8c9ab94aeb28d
30586         * agent/command.c (cmd_passwd): Add option --verify.
30587
30588         agent,w32: Do not create a useless socket with --enable-putty-support.
30589         + commit 7a387331645736eaeaaef57770beef5fa741bc22
30590         * agent/agent.h (opt): Remove field ssh_support.
30591         * agent/gpg-agent.c (ssh_support): New.  Replace all opt.ssh_support
30592         by this.
30593         (main): Do not set ssh_support along with setting putty_support.
30594
30595         gpgsm: Add command option "offline".
30596         + commit 2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073
30597         * sm/server.c (option_handler): Add "offline".
30598         (cmd_getinfo): Ditto.
30599         * sm/certchain.c (is_cert_still_valid):
30600         (do_validate_chain):
30601         * sm/gpgsm.c (gpgsm_init_default_ctrl): Default "offline" to the value
30602         of --disable-dirmngr.
30603         * sm/call-dirmngr.c (start_dirmngr_ext): Better also check for
30604         ctrl->offline.
30605
30606 2015-06-26  NIIBE Yutaka  <gniibe@fsij.org>
30607
30608         scd: Support button flag and AES key data for OpenPGPcard v3.0.
30609         + commit d2fdf2e1b6cd447bb1c36df0ac7d8e669802fa22
30610         * scd/app-openpgp.c (do_getattr, show_caps, app_select_openpgp):
30611         Support button and symmetric decryption.
30612         (do_setattr): Support setting AESKEY.
30613
30614 2015-06-25  Andre Heinecke  <aheinecke@intevation.de>
30615
30616         sm: Fix cert storage for ephemeral certs.
30617         + commit 5e1a844ae9b6730b4b8a2c9178ea9bc121560c28
30618         * sm/keydb.c (keydb_store_cert): Clear ephemeral flag for
30619         existing certs if store should not be ephemeral.
30620
30621 2015-06-23  Werner Koch  <wk@gnupg.org>
30622
30623         Allow use of debug flag names for all tools.
30624         + commit 54a0ed3d9b10a3c6dfb3d6a4d20b693a3183f8f6
30625         * g13/g13.c: Make use of debug_parse_flag.
30626         * scd/scdaemon.c: Ditto.
30627         * sm/gpgsm.c: Ditto
30628         * agent/gpg-agent.c: Ditto.  But do not terminate on "help"
30629         * dirmngr/dirmngr.c: Ditto.
30630
30631         common: Improve fucntion parse_debug_flag.
30632         + commit 8195e55d0c134a45f7c9bd95c8b5741781841c18
30633         * common/miscellaneous.c (parse_debug_flag): Add hack not to call
30634         exit.  Add "none" and "all" flags.
30635
30636 2015-06-23  NIIBE Yutaka  <gniibe@fsij.org>
30637
30638         scd: pinpad workaround for PC/SC implementations.
30639         + commit 5e1d2fe6555d06f9dcd2daac713b2edfbc0428a5
30640         * scd/adpu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Bigger buffer
30641         for TPDU card reader.
30642
30643 2015-06-22  Werner Koch  <wk@gnupg.org>
30644
30645         gpg: Allow debug flag names for --debug.
30646         + commit 4698e5b203bd983503b5fd784fcd09dd3bc3a15e
30647         * g10/gpg.c (opts): Change arg for oDebug to a string.
30648         (debug_flags): New; factored out from set_debug.
30649         (set_debug): Remove "--debug-level help".  Use parse_debug_flag to
30650         print the used flags.
30651         (main): Use parse_debug_flag for oDebug.
30652
30653         common: Add function parse_debug_flag.
30654         + commit 22147952b744958ec46d356e942540356ff7d93e
30655         * common/miscellaneous.c (parse_debug_flag): New.
30656         * common/util.h (struct debug_flags_s): New.
30657
30658         common: Add function strtokenize.
30659         + commit d37f47081d41584efc0c397432811f9cfa5d5867
30660         * common/stringhelp.c: Include assert.h.
30661         (strtokenize): New.
30662         * common/t-stringhelp.c (test_strtokenize): New.
30663
30664         gpg: Fix regression due to recent commit 6500f33.
30665         + commit e0873a3372800d51c90ca656450f937dbae9c169
30666         * g10/keydb.c (kid_list_s): Keep a state in the table.
30667         (kid_not_found_table): Rename to kid_found_table.
30668         (n_kid_not_found_table): Rename to kid_found_table_count.
30669         (kid_not_found_p): Return found state.
30670         (kid_not_found_insert): Add arg found.
30671         (keydb_search): Store found state in the table.
30672
30673 2015-06-22  NIIBE Yutaka  <gniibe@fsij.org>
30674
30675         scd: Fix Cherry ST-2000 support for pinpad input.
30676         + commit 444e9232aa9e00aacd939cbf7bdb881b550dfebe
30677         * scd/apdu.c (pcsc_vendor_specific_init): Set pinmax to 15.
30678         * scd/ccid-driver.c (ccid_transceive_secure): Add zero for the
30679         template of APDU.
30680
30681 2015-06-20  Werner Koch  <wk@gnupg.org>
30682
30683         gpg: Print number of good signatures with --check-sigs.
30684         + commit 0948c4f217308ffa0ec61ce189d387fd61b02bbd
30685         * g10/keylist.c (keylist_context): Add field good_sigs.
30686         (list_keyblock_print): Updated good_sigs.
30687         (print_signature_stats): Print number of good signatures and use
30688         log_info instead of tty_printf.
30689
30690         gpg: Improve speed of --check-sigs and --lish-sigs.
30691         + commit 6500f338a35f4148606480c79f3a0c1b0d15f13a
30692         * g10/keydb.c (kid_list_t): New.
30693         (kid_not_found_table, n_kid_not_found_table): New.
30694         (kid_not_found_p, kid_not_found_insert, kid_not_found_flush): New.
30695         (keydb_insert_keyblock): Flush the new cache.
30696         (keydb_delete_keyblock): Ditto.
30697         (keydb_update_keyblock): Ditto.
30698         (keydb_search): Use the new cache.
30699         (keydb_dump_stats): New.
30700         * g10/gpg.c (g10_exit): Dump keydb stats.
30701
30702 2015-06-19  Werner Koch  <wk@gnupg.org>
30703
30704         gpg: Add more log_clock calls to keydb.c.
30705         + commit 53e9b86085ac70ede8a0b1de9018ccbfe55b0932
30706         * g10/keydb.c (keydb_get_keyblock): Add log_clock calls.
30707
30708         gpg: Print available debug flags using "--debug-level help".
30709         + commit 663a31f1ea2fc5a43c822e916cf20fece5243851
30710         * g10/gpg.c (set_debug): Add "help" option and use a table for the
30711         flags.
30712
30713         gpg: Fix export problem in case an old keyring has PGP-2 keys.
30714         + commit c5604eeee4b64a44a1ca1d517ace14fc1cbda298
30715         * g10/export.c (do_export_stream): Skip legacy keys.
30716
30717 2015-06-18  Werner Koch  <wk@gnupg.org>
30718
30719         dirmngr: Fix the cleanup zombies fix (685b782).
30720         + commit c97198371b7307e64afdd323231977b2247f64ec
30721         * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Do not close the
30722         stdout reader after EOF from read_log_data.
30723         * dirmngr/crlcache.c (crl_cache_reload_crl): Close the reader before
30724         the next iteration.
30725
30726 2015-06-17  Werner Koch  <wk@gnupg.org>
30727
30728         agent: Print a warning for obsolete options.
30729         + commit 010d26a85bfe15c4aa12eefeab851dbde0609c26
30730         * g10/misc.c (obsolete_scdaemon_option): Move to
30731         * common/miscellaneous.c (obsolete_option): ... here.
30732         * agent/gpg-agent.c (main): Use obsolete_option for the 3 obsolete
30733         options.
30734
30735 2015-06-16  Werner Koch  <wk@gnupg.org>
30736
30737         dirmngr: Cleanup zombies and fix hang on shutdown.
30738         + commit 685b782a18adb90bbf78956682e4e7f89fed678c
30739         * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Move nfds computation
30740         into the loop.  Check the queue also on timeout.  Close log_fd and
30741         reader context on EOF or error.
30742
30743         dirmngr: Avoid accessing uninitialized memory in log callback.
30744         + commit 82c72e2db7bc5b633768d59822f2e2a353fa6e32
30745         * dirmngr/dirmngr.c (pid_suffix_callback): Clear int_and_ptr_u before
30746         use.
30747         (start_connection_thread): Ditto.
30748         (handle_connections): Ditto.
30749
30750 2015-06-16  Neal H. Walfield  <neal@g10code.com>
30751
30752         Don't prompt for the password multiple times in pinentry loopback mode.
30753         + commit eac081ba1278855fa223b031b527498fec558bc7
30754         * g10/gpg.c (main): If OPT.PINENTRY_MODE is PINENTRY_MODE_LOOPBACK,
30755         clear OPT.PASSPHRASE_REPEAT.
30756
30757 2015-06-16  NIIBE Yutaka  <gniibe@fsij.org>
30758
30759         po: Update Japanese Translation.
30760         + commit 15540f6233bd041b06708862a6d9535cbcabe330
30761
30762
30763 2015-06-15  Werner Koch  <wk@gnupg.org>
30764
30765         doc: Add defs.inc to BUILT_SOURCES.
30766         + commit ef273a9afc7840b75cfb9b8af78d117b7d672c6a
30767
30768
30769 2015-06-11  Werner Koch  <wk@gnupg.org>
30770
30771         Release 2.1.5.
30772         + commit 9b7bdfae82f74a147a5dbf0fac0f78cde77a207b
30773
30774
30775         agent: Fix --extra-socket on Windows.
30776         + commit 985918aab025cf0ac9db411b88a47c4b985e5e95
30777         * agent/gpg-agent.c (start_connection_thread): Rename to ...
30778         (do_start_connection_thread): this.  Factor nonce checking out to ...
30779         (start_connection_thread_std): this,
30780         (start_connection_thread_extra): this,
30781         (start_connection_thread_browser): and this.
30782
30783         agent: Add experimental option --browser-socket.
30784         + commit 008435b95cbca19adc217178dc9d793eca584345
30785         * agent/agent.h (opt): Add field "browser_socket".
30786         * agent/command.c (cmd_setkeydesc): Use a different message for
30787         restricted==2.
30788         * agent/gpg-agent.c (oBrowserSocket): New.
30789         (opts): Add --browser-socket.
30790         (socket_name_browser, redir_socket_name_browser): New.
30791         (socket_nonce_browser): New.
30792         (cleanup): Cleanup browser socket.
30793         (main): Implement option.
30794         (start_connection_thread_browser): New.
30795         (handle_connections): Add arg listen_fd_browser and use it.
30796
30797 2015-06-10  Daiki Ueno  <ueno@gnu.org>
30798
30799         agent: Add option --allow-emacs-pinentry.
30800         + commit 691dae270b3b741178912599724d69adabdb48b9
30801         * agent/agent.h (opt): Add field allow_emacs_pinentry.
30802         * agent/call-pinentry.c (start_pinentry): Act upon new var.
30803         * agent/gpg-agent.c (oAllowEmacsPinentry): New.
30804         (opts): Add option --allow-emacs-pinentry.
30805         (parse_rereadable_options): Set this option.
30806         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add new option.
30807
30808 2015-06-09  Werner Koch  <wk@gnupg.org>
30809
30810         doc: Do not used fixed file names in the manuals.
30811         + commit 25331bba5554a39d226d32433add7784b2e170b8
30812         * doc/mkdefsinc.c: New.
30813         * doc/Makefile.am: Include cmacros.am.
30814         (EXTRA_DIST): Add mkdefsinc.c defsincdate.
30815         (BUILT_SOURCES): Add defsincdate
30816         (CLEANFILES): Add mkdefsinc and defs.inc.
30817         (mkdefsinc): New rule.
30818         (yat2m-stamp): Depend on defs.inc.
30819         ($(myman_pages) gnupg.7): Ditto.
30820         (gnupg.texi): Remove rule to touch itself.
30821         (dist-hook): New.
30822         (defsincdate): New.
30823         (defs.inc): New.
30824         * doc/gnupg.texi: Remove inclusion of version.texi.  Include defs.inc.
30825         Also include defs.inc in all files used to build man files.  Change
30826         fixed directory names to those from defs.inc.
30827
30828         dirmngr: Avoid crash due to an empty crls.d/DIR.txt.
30829         + commit 255dadd76d5a2101d2c5450741326b67253fa9ea
30830         * dirmngr/crlcache.c (check_dir_version): Avoid segv.
30831
30832 2015-06-08  Werner Koch  <wk@gnupg.org>
30833
30834         doc: Change the manual source to be only for GnuPG 2.1.
30835         + commit abbefdd04d7ee30218506caeae1fd858569c9f0a
30836
30837
30838         Convey envvar INSIDE_EMACS to the pinentry.
30839         + commit c672572bd50966187cc823585efed673b66ff942
30840         * common/session-env.c (stdenvnames): Add it.
30841
30842         agent: Add command "getinfo std_env_names".
30843         + commit 8425db6a26bf66dad16dfbc26be9af7d272f31d3
30844         * agent/command.c (cmd_getinfo): Add new sub-command.
30845
30846 2015-06-05  NIIBE Yutaka  <gniibe@fsij.org>
30847
30848         scd: do_decipher change for OpenPGPcard v3.0.
30849         + commit cf508a1f7f4c8926dc554be68a2d46f5ce272ac0
30850         * scd/app-openpgp.c (do_decipher): Add a header for ECDH.
30851
30852 2015-06-04  Werner Koch  <wk@gnupg.org>
30853
30854         gpg: Replace -1 by GPG_ERR_NOT_FOUND in tdbio.c.
30855         + commit a4a15195c2a3729025a3ba3439ac8860083fceeb
30856         * g10/tdbio.c (lookup_hashtable): Return GPG_ERR_NOT_FOUND.
30857         * g10/tdbdump.c (import_ownertrust): Test for GPG_ERR_NOT_FOUND.
30858         * g10/trustdb.c (read_trust_record): Ditto.
30859         (tdb_get_ownertrust, tdb_get_min_ownertrust): Ditto.
30860         (tdb_update_ownertrust, update_min_ownertrust): Ditto.
30861         (tdb_clear_ownertrusts, update_validity): Ditto.
30862         (tdb_cache_disabled_value): Ditto.
30863
30864         gpg: Cleanup error code path in case of a bad trustdb.
30865         + commit f170240ef735edc481f60e51527cbb5ee1acfd55
30866         * g10/tdbio.c (tdbio_read_record): Fix returning of the error.
30867
30868         gpg: Fix output in case of a corrupted trustdb.
30869         + commit bf06d04f53296f4b4b73b9360cf1571559bb2295
30870         * g10/tdbdump.c (list_trustdb): Add arg FP and change callers to pass
30871         es_stdout.
30872         * g10/tdbio.c (upd_hashtable): On a corrupted trustdb call
30873         list_trustdb only in verbose > 1 mode and let it dump to stderr.
30874
30875 2015-05-29  NIIBE Yutaka  <gniibe@fsij.org>
30876
30877         scd: Fix key template of ECC.
30878         + commit e5c69e87beebe99d362ac721ce4ea6b057a30a99
30879         * scd/app-openpgp.c (build_ecc_privkey_template): Use correct value.
30880
30881 2015-05-28  NIIBE Yutaka  <gniibe@fsij.org>
30882
30883         g10: Fix a race condition initially creating trustdb.
30884         + commit fe5c6edaed78839303d67e01e141cfc6b5de9aec
30885         * g10/tdbio.c (take_write_lock, release_write_lock): New.
30886         (put_record_into_cache, tdbio_sync, tdbio_end_transaction): Use
30887         new lock functions.
30888         (tdbio_set_dbname): Fix the race.
30889         (open_db): Don't call dotlock_create.
30890
30891 2015-05-27  NIIBE Yutaka  <gniibe@fsij.org>
30892
30893         g10: Remove g10/signal.c.
30894         + commit 6cb18a8f975b7ff7ca79c1fb0cddcd4b66be90fb
30895         * g10/signal.c: Remove.
30896         * g10/main.h: Remove old function API.
30897         * g10/tdbio.c: Use new API, even in the dead code.
30898
30899 2015-05-20  Werner Koch  <wk@gnupg.org>
30900
30901         agent: Cleanup caching code for command GET_PASSPHRASE.
30902         + commit 23d2ef83cda644c6a83499f9327350d3371e8a17
30903         * agent/command.c (cmd_get_passphrase): Read from the user cache.
30904
30905 2015-05-19  Neal H. Walfield  <neal@g10code.com>
30906
30907         agent: When the password cache is cleared, also clear the ext. cache.
30908         + commit 3a9305439b75ccd4446378d4fd87da087fd9c892
30909         * agent/agent.h (agent_clear_passphrase): New declaration.
30910         * agent/call-pinentry.c (agent_clear_passphrase): New function.
30911         * agent/command.c (cmd_clear_passphrase): Call agent_clear_passphrase.
30912
30913         agent: Modify agent_clear_passphrase to support an ext. password cache.
30914         + commit e201c20f25e7bed29088186c5f717d43047a0f4b
30915         * agent/agent.h (agent_get_passphrase): Add arguments keyinfo and
30916         cache_mode.  Update callers.
30917         * agent/call-pinentry.c (agent_get_passphrase): Add arguments keyinfo
30918         and cache_mode.  If KEYINFO and CACHE_MODE describe a cachable key,
30919         then send SETKEYINFO to the pinentry.
30920
30921 2015-05-19  NIIBE Yutaka  <gniibe@fsij.org>
30922
30923         g10: detects public key encryption packet error properly.
30924         + commit c771963140cad7c1c25349bcde27e427effc0058
30925         g10/mainproc.c (proc_pubkey_enc): Only allow relevant algorithms for
30926         encryption.
30927
30928 2015-05-15  Werner Koch  <wk@gnupg.org>
30929
30930         build: Make --disable-gpgsm work.
30931         + commit 43ea8f5d884dd108bb27d8e1610fa28802295a06
30932         * Makefile.am: Always build kbx/
30933         * g10/Makefile.am (AM_CFLAGS): Include KSBA_CFLAGS.
30934
30935 2015-05-12  Werner Koch  <wk@gnupg.org>
30936
30937         Release 2.1.4.
30938         + commit a67ead6525d7597a9e0b152c5971f6290f7912f3
30939
30940
30941         speedo: Add make option SELFCHECK=0 to build a new release.
30942         + commit 21b0701e2e044894c53ff59d22c5c6a172780c25
30943         * build-aux/getswdb.sh: Add option --skip-selfcheck.
30944         * build-aux/speedo.mk: Add option SELFCHECK.
30945
30946 2015-05-11  Werner Koch  <wk@gnupg.org>
30947
30948         common: Cope with AIX problem on number of open files.
30949         + commit 987532b038a2d9b9e76c0de425ee036ca2bffa1b
30950         * common/exechelp-posix.c: Limit returned value for too hight values.
30951
30952         gpg-connect-agent: Fix quoting of internal percent+ function.
30953         + commit 26e2eb98d3d8405b335b43c8e86deacf622cd957
30954         * tools/gpg-connect-agent.c (get_var_ext) <percent, percent+): Also
30955         escape '+'.
30956
30957         agent: Add option --no-allow-external-cache.
30958         + commit d7293cb317acc40cc9e5189cef33fe9d8b47e62a
30959         * agent/agent.h (opt): Add field allow_external_cache.
30960         * agent/call-pinentry.c (start_pinentry): Act upon new var.
30961         * agent/gpg-agent.c (oNoAllowExternalCache): New.
30962         (opts): Add option --no-allow-external-cache.
30963         (parse_rereadable_options): Set this option.
30964
30965         agent: Add strings for use by future Pinentry versions.
30966         + commit 02d5e1205489aa5027a87a64552eaf15984dc22d
30967         * agent/call-pinentry.c (start_pinentry): Add more strings.
30968
30969         agent: Add option --debug-pinentry.
30970         + commit 14232c3870c5ef5d2fa15e8ed3f302b1ba29d25c
30971         * agent/gpg-agent.c (oDebugPinentry): New.
30972         (opts): Add --debug-pinentry.
30973         (parse_rereadable_options): Set that option.
30974         * agent/call-pinentry.c (start_pinentry): Pass option to
30975         assuan_set_flag.
30976
30977 2015-05-08  Werner Koch  <wk@gnupg.org>
30978
30979         gpg: Avoid cluttering stdout with trustdb info in verbose mode.
30980         + commit b03a2647299a6c8764a2574590cbaccdff9e497d
30981         * g10/trustdb.c (validate_keys): Call dump_key_array only in debug
30982         mode.
30983
30984         gpg: Fix wrong output in list mode.
30985         + commit 7039f87375b3c89d6e63837b811ed2be71c8d9db
30986         * g10/parse-packet.c (parse_gpg_control): Replace puts by es_fputs to
30987         LISTFP.
30988
30989         gpg: New command --quick-adduid.
30990         + commit 64e809b791645f343feb69112baba8e2700e454b
30991         * g10/keygen.c (ask_user_id): Factor some code out to ...
30992         (uid_already_in_keyblock): new.
30993         (generate_user_id): Add arg UIDSTR.  Fix leaked P.
30994         * g10/keyedit.c (menu_adduid): Add new arg uidstring.  Adjust caller.
30995         (keyedit_quick_adduid): New.
30996         * g10/gpg.c (aQuickAddUid): New.
30997         (opts):  Add command --quick-adduid.
30998         (main): Implement that.
30999
31000         gpg: Add push/pop found state feature to keydb.
31001         + commit 3c439c0447f8a7468a61bbdc4c9a101ef2451dcb
31002         * g10/keydb.c (keydb_handle): Add field saved_found.
31003         (keydb_new): Init new field.
31004         (keydb_push_found_state, keydb_pop_found_state): New.
31005         * g10/keyring.c (kyring_handle): Add field saved_found.
31006         (keyring_push_found_state, keyring_pop_found_state): New.
31007
31008         gpg: Minor code merging in keyedit.
31009         + commit b772e459fa91cdc7facd95227ebc0faba20a7003
31010         * g10/keyedit.c (fix_keyblock): Rename to fix_key_signature_order.
31011         (fix_keyblock): New.  Call fix_key_signature_order and other fix
31012         functions.
31013         (keyedit_menu): Factor code out to new fix_keyblock.
31014         (keyedit_quick_sign): Ditto.  Check for primary fpr before calling
31015         fix_keyblock.
31016
31017 2015-05-07  Werner Koch  <wk@gnupg.org>
31018
31019         agent: Minor change for 56b5c9f.
31020         + commit 436f2060721e997479a9dd5be8dfc73627dd49c9
31021         * agent/call-pinentry.c (agent_askpin): Move option setting to ...
31022         (start_pinentry): here.  Fix error code check.
31023
31024 2015-05-07  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
31025
31026         dirmngr: Fix segfault in ldap engine.
31027         + commit d0d4984cfec54dee727b9e9d33d09e33c6f2e182
31028         (ks-engine-ldap.c) Fix segfault caused by missing check whether uri is
31029         initialized
31030
31031 2015-05-07  Neal H. Walfield  <neal@g10code.com>
31032
31033         agent: Improve support for externally cached passwords.
31034         + commit 56b5c9f94f2e55d096be585ed061ccf1c9ec0de6
31035         * agent/call-pinentry.c (PINENTRY_STATUS_PASSWORD_FROM_CACHE): New
31036         constant.
31037         (pinentry_status_cb): Add it to *FLAGS if PASSWORD_FROM_CACHE was
31038         provided.
31039         (agent_askpin): Pass "OPTION allow-external-password-cache" to the
31040         pinentry.  Always pass SETKEYINFO to the pinentry.  If there is no
31041         stable identifier, then use "--clear".  If the password is incorrect
31042         and PINENTRY_STATUS_PASSWORD_FROM_CACHE is set in *PINENTRY_STATUS,
31043         then decrement PININFO->FAILED_TRIES.
31044
31045         agent: Or in the value; don't overwrite the variable.
31046         + commit 74944330ba7229ed0cbe23cc0f573962a444bd07
31047         * agent/call-pinentry.c (pinentry_status_cb): Or in
31048         PINENTRY_STATUS_CLOSE_BUTTON; don't overwrite *FLAG.
31049
31050         agent: Avoid magic numbers.  Use more accurate names.
31051         + commit d3b5cad2346bd5747789dc62d7804fa5c15f4f3b
31052         * agent/call-pinentry.c (PINENTRY_STATUS_CLOSE_BUTTON): New constant.
31053         (PINENTRY_STATUS_PIN_REPEATED): Likewise.
31054         (close_button_status_cb): Rename from this...
31055         (pinentry_status_cb): ... to this.  Use the constants.
31056         (agent_askpin): Rename local variable from close_button to
31057         pinentry_status.  Use symbolic constants rather than magic numbers.
31058
31059 2015-05-07  Werner Koch  <wk@gnupg.org>
31060
31061         gpg: Improve 'General key info' line of --card-status.
31062         + commit 874ef16e70ab750db7b153f17a7e859a0db6a2f1
31063         * g10/keylist.c (print_pubkey_info): Print either "pub" or "sub".
31064
31065         * g10/getkey.c (get_pubkey_byfprint): Add optional arg R_KEYBLOCK.
31066         * g10/keyid.c (keyid_from_fingerprint): Adjust for change.
31067         * g10/revoke.c (gen_desig_revoke): Adjust for change.
31068         * g10/card-util.c (card_status): Simplify by using new arg.  Align
31069         card-no string.
31070
31071         * g10/card-util.c (card_status): Remove not used GnuPG-1 code.
31072
31073         gpg: Fix regression not displaying the card serial number.
31074         + commit 173b26c8f83a3c623165a96c315bf9ed4b90edcc
31075         * g10/call-agent.c (keyinfo_status_cb): Detect KEYINFO.
31076
31077 2015-05-06  Werner Koch  <wk@gnupg.org>
31078
31079         speedo,w32: Install a native pinentry.
31080         + commit 154abaf3c97dae43ba972e4482680a287f3e5c39
31081         * build-aux/speedo.mk: Always build pinentry for w32.
31082         (speedo_pkg_pinentry_configure): Adjust to modern pinentry.
31083         * build-aux/speedo/w32/inst.nsi: Install native pinentry under the
31084         name pinentry-basic.exe.
31085
31086 2015-05-01  NIIBE Yutaka  <gniibe@fsij.org>
31087
31088         g10: fix cmp_public_key.
31089         + commit f77fd572db658959fa40aa8c181be919e688b707
31090         * g10/free-packet.c (cmp_public_keys): Compare opaque
31091         data at the first entry of the array when it's unknown algo.
31092
31093 2015-04-30  NIIBE Yutaka  <gniibe@fsij.org>
31094
31095         scd: PC/SC reader selection by partial string match.
31096         + commit 01a2a61bc4b34817c4216888265f65d59a33dad3
31097         * scd/apdu.c (open_pcsc_reader_direct): Partial string match.
31098
31099 2015-04-24  Werner Koch  <wk@gnupg.org>
31100
31101         common: Remove JNLIB from boiler plate (jnlib merge).
31102         + commit 172b6193488f433a206fd88f85d8c4a5d1eb7fdf
31103         * common/README.jnlib: Remove.
31104
31105         common: Rename log and gcc attribute macros (jnlib merge).
31106         + commit 26d7e0d7accf269c15fb4bc23e5e80580bfb7fe3
31107         * common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*.
31108         * common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*.
31109
31110         common: Remove two JNLIB_ macros (jnlib merge).
31111         + commit 575230d91bba95697518da418ea0e8712f889a0f
31112         * configure.ac: Merge seperate jnlib checks.
31113         (HAVE_JNLIB_LOGGING): Remove.
31114         * common/logging.c, common/simple-pwquery.c (JNLIB_NEED_AFLOCAL):
31115         Rename to GNUPG_COMMON_NEED_AFLOCAL.  Change all tests.
31116
31117         common: Remove libjnlib-config.h (jnlib merge).
31118         + commit 17bcd087082d01c48c60ff20d7f9a40f34c6969f
31119         * common/libjnlib-config.h: Remove.
31120         * common/common-defs.h (getenv) [HAVE_GETENV]: New.  From removed
31121         header.
31122         (getpid) [HAVE_W32CE_SYSTEM]: New.  From removed header.
31123         * common/argparse.c: Include util.h and common-defs.h.  Replace
31124         jnlib_ macro names for non-GNUPG builds by x* names.
31125         * common/dotlock.c: Ditto.
31126         * common/logging.c: Include util.h and common-defs.h.  Replace jnlib_
31127         symbol names by x* names.
31128         * common/strlist.c: Ditto.
31129         * common/utf8conv.c: Ditto.
31130         * common/w32-reg.c: Ditto.
31131         * common/mischelp.c: Ditto.  Also remove _jnlib_free.
31132         * common/stringhelp.c: Ditto.
31133         (JNLIB_LOG_WITH_PREFIX): Do not depend on this macro.
31134         * common/logging.h (JNLIB_LOG_WITH_PREFIX): Do not depend on this
31135         macro.
31136
31137 2015-04-23  Werner Koch  <wk@gnupg.org>
31138
31139         gpg: Move all DNS access to Dirmngr.
31140         + commit 154f3ed2bf64de801ae0f9796338a2767ec6357b
31141         * common/dns-cert.h: Move to ../dirmngr/.
31142         * common/dns-cert.c: Move to ../dirmngr/.  Change args to return the
31143         key as a buffer.
31144         * common/t-dns-cert.c: Move to ../dirmngr/.
31145         * common/pka.c, common/pka.h, common/t-pka.c: Remove.
31146
31147         * dirmngr/server.c (data_line_cookie_write): Factor code out to
31148         data_line_write and make it a wrapper for that.
31149         (data_line_write): New.
31150         (cmd_dns_cert): New.
31151         (register_commands): Register new command.
31152
31153         * g10/Makefile.am (LDADD): Remove DNSLIBS.
31154         * g10/call-dirmngr.c (dns_cert_parm_s): New.
31155         (dns_cert_data_cb, dns_cert_status_cb): New.
31156         (gpg_dirmngr_dns_cert): New.
31157         (gpg_dirmngr_get_pka): New.
31158         * g10/gpgv.c (gpg_dirmngr_get_pka): New dummy function.
31159         * g10/keyserver.c (keyserver_import_cert): Replace get_dns_cert by
31160         gpg_dirmngr_dns_cert.
31161         (keyserver_import_pka): Replace get_pka_info by gpg_dirmngr_get_pka.
31162         * g10/mainproc.c: Include call-dirmngr.h.
31163         (pka_uri_from_sig): Add CTX arg. Replace get_pka_info by
31164         gpg_dirmngr_get_pka.
31165
31166         common: Minor change of hex2str to allow for embedded nul.
31167         + commit ce11cc39ea7e011040debc9339a2310a714efe7e
31168         * common/convert.c (hex2str): Set ERRNO.  Return adjusted COUNT.
31169
31170 2015-04-23  NIIBE Yutaka  <gniibe@fsij.org>
31171
31172         common: removal of t-support.c from t_jnlib_src.
31173         + commit a7264e3a6a83189a9e43edf5e99f5ac7ee42a2ab
31174         * common/Makefile.am (t_jnlib_src): Remove t-support.c.
31175
31176 2015-04-21  Werner Koch  <wk@gnupg.org>
31177
31178         gpg: Make keyserver-option http_proxy work.
31179         + commit c4d98734c5df39f57a71f0ec1c0c80e82ff08508
31180         * g10/options.h (opt): Add field keyserver_options.http_proxy.
31181         * g10/keyserver.c (warn_kshelper_option): Add arg noisy.
31182         (parse_keyserver_options): Parse into new http_proxy field.
31183         * g10/call-dirmngr.c (create_context): Send the http-proxy option.
31184
31185         common: Make proper use of http proxy parameter.
31186         + commit 54e55149f2af96eff08bfd6f70ef13d007fb58c7
31187         * common/http.c (is_hostname_port): New.
31188         (send_request): Fix proxy name parsing.
31189
31190         dirmngr: Add http proxy support for keyservers.
31191         + commit a0dead5edce07838cf5ff3ec7205a3bff2a6ef70
31192         * dirmngr/dirmngr.h (server_control_s): Add field http_proxy.
31193         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Copy http_proxy value
31194         from OPT.
31195         (dirmngr_deinit_default_ctrl): New.
31196         (main): Call dirmngr_deinit_default_ctrl.
31197         * dirmngr/server.c (start_command_handler): Ditto.
31198         (option_handler): Add option "http-proxy".
31199         * dirmngr/crlfetch.c (crl_fetch): Take http_proxy from CTRL.
31200         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
31201         * dirmngr/ks-engine-hkp.c (send_request): Add proxy support.
31202         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
31203
31204         gpg: Do not use honor-keyserver-url sub-option by default.
31205         + commit 727fe4f8d7d5fc3eac0b0aa6fafa4a314686d7dc
31206
31207
31208         gpg: Make preferred keyservers work.
31209         + commit ae0d65f86413a82a40cf68e08aaeca405eee8c78
31210         * g10/call-dirmngr.c (dirmngr_local_s): Add field set_keyservers_done.
31211         (create_context): Move keyserver setting to ...
31212         (open_context): here.
31213         (clear_context_flags): New.
31214         (gpg_dirmngr_ks_get): Add arg override_keyserver.
31215         * g10/keyserver.c (keyserver_refresh): Improve diagnostics.
31216         (keyserver_get_chunk): Ditto.  Pass OVERRIDE_KEYSERVER to ks_get.
31217
31218         gpg: Update sub-options of --keyserver-options.
31219         + commit da1990bac71f6447d8ebd169c3b3b186e9f287d9
31220         * g10/options.h (KEYSERVER_HTTP_PROXY): New.
31221         (KEYSERVER_USE_TEMP_FILES, KEYSERVER_KEEP_TEMP_FILES): Remove.
31222         (KEYSERVER_TIMEOUT): New.
31223         * common/keyserver.h (KEYSERVER_TIMEOUT): Remove.
31224         * g10/keyserver.c (keyserver_opts): Remove obsolete "use-temp-files"
31225         and "keep-temp-files". Add "http-proxy" and "timeout".
31226         (parse_keyserver_options): Remove 1.2 compatibility option
31227         "honor-http_proxy".  Remove "use-temp-files" and "keep-temp-files"
31228         code.
31229
31230 2015-04-14  Werner Koch  <wk@gnupg.org>
31231
31232         agent: Send the new SETKEYINFO command to the Pinentry.
31233         + commit 2180845959839705200e3172dbafc94b70b9007f
31234         * agent/call-pinentry.c (agent_askpin): Add args keyinfo and
31235         cache_mode.  Change all callers to pass (NULL,0) for them.  Send
31236         SETKEYINFO command.
31237         * agent/findkey.c (unprotect): Pass the keygrip and the cache_mode for
31238         the new args.
31239
31240 2015-04-14  NIIBE Yutaka  <gniibe@fsij.org>
31241
31242         scd: better handling of extended APDU.
31243         + commit 971d558e862db878a7310e06ed7116dbe36886ab
31244         * scd/apdu.c (send_le): Bug fix for not append Z when lc<0&&le<0.
31245         * scd/app-common.h (struct app_ctx_s): Use bit fields for flags.
31246         * scd/ccid-driver.c (CCID_MAX_BUF): New.  Only for OpenPGPcard.
31247         (struct ccid_driver_s): New field of max_ccid_msglen.
31248          Remove ifsd field.
31249         (parse_ccid_descriptor): Initialize max_ccid_msglen.
31250         (ccid_transceive_apdu_level): Implement sending extended APDU in
31251         chain of CCID message.
31252
31253 2015-04-13  Werner Koch  <wk@gnupg.org>
31254
31255         gpg: Fix NULL-segv due to invalid imported data.
31256         + commit 25fce93ba19d997e234a674d5cc98df82c5b5496
31257         * g10/free-packet.c (my_mpi_copy): New.
31258         (copy_public_key, copy_signature): Use instead of mpi_copy.
31259
31260 2015-04-13  Neal H. Walfield  <neal@g10code.com>
31261
31262         dirmngr: If LDAP is not enable, don't build the LDAP bits.
31263         + commit 5cde5bf37339cdeb0bd0a33d39477382eafebede
31264         * dirmngr/Makefile.am (dirmngr_SOURCES): Only include
31265         ks-engine-ldap.c, ldap-parse-uri.c and ldap-parse-uri.h if USE_LDAP
31266         is TRUE.
31267         (module_tests): Only add t-ldap-parse-uri if USE_LDAP is TRUE.
31268         * dirmngr/ks-action.c: Only include "ldap-parse-uri.h" if USE_LDAP is
31269         TRUE.
31270         (ks_action_help): Don't invoke LDAP functionality if USE_LDAP is not
31271         TRUE.
31272         (ks_action_search): Likewise.
31273         (ks_action_get): Likewise.
31274         (ks_action_put): Likewise.
31275         * dirmngr/server.c: Only include "ldap-parse-uri.h" if USE_LDAP is
31276         TRUE.
31277         (cmd_keyserver): Don't invoke LDAP functionality if USE_LDAP is not
31278         TRUE.
31279
31280 2015-04-13  Werner Koch  <wk@gnupg.org>
31281
31282         common: Do without nested fucntions to support non-gcc.
31283         + commit 454f60399c7318fffd3de2afadd58c7a490178bd
31284         * common/t-stringhelp.c (test_strsplit): Remove nested function.
31285
31286 2015-04-11  Werner Koch  <wk@gnupg.org>
31287
31288         Release 2.1.3.
31289         + commit b1e1959d59a12b53c016ca9c95aee3a62c0bfc00
31290
31291
31292 2015-04-11  Yuri Chornoivan  <yurchor@ukr.net>
31293
31294         po: Update Ukrainian translation.
31295         + commit 896f438967b66b4836419aa737c706ced6b6454a
31296
31297
31298 2015-04-11  Ineiev  <ineiev@gnu.org>
31299
31300         po: Update and review Russian translation.
31301         + commit b69d7064f30c38ffe18e71de6a0fc14b5da0452f
31302
31303
31304 2015-04-10  Werner Koch  <wk@gnupg.org>
31305
31306         dirmngr,w32: Make it build for Windows.
31307         + commit c8bb5000d4c86a055348dc08352f573c599743a7
31308         * dirmngr/Makefile.am (t_common_ldadd): Add missing libs.
31309
31310         Remove obsolete directories from AM_CPPFLAGS.
31311         + commit 67158ff155ef52fd54a6bbe680551c0e12b31e69
31312
31313
31314         dirmngr,w32: Replace functions not available under Windows.
31315         + commit 0fb224c2c5e0c6770d4a6044d62d84f6bbc1b26b
31316         * dirmngr/ks-engine-ldap.c (extract_attributes): Replace isoptime and
31317         gmtime_r.
31318
31319         common: Add new function gnupg_gmtime.
31320         + commit 5d60c7f7e05a06e46e23bafe61cef09ad32aa998
31321         * common/gettime.c (gnupg_gmtime): New.
31322         (gnupg_get_isotime): Use it.  Also take care of an gmtime_t returning
31323         an error.
31324
31325         common: Add new function isodate_human_to_tm.
31326         + commit f6670100b7a15b2071c2e4062f5c5a678f2a30f6
31327         * common/gettime.c (isotime_human_p): Add arg date_only.
31328         (isodate_human_to_tm): New.
31329         * common/t-gettime.c (test_isodate_human_to_tm): New.
31330         (main): Call new test.
31331
31332         dirmngr,w32: Avoid name clash with existing function.
31333         + commit 6ad95fe6f1f130c8f6d139a9bd57fc4a0d38292b
31334         * dirmngr/ks-engine-ldap.c (ldap_connect): Rename to my_ldap_connect.
31335
31336         gpgparsemail: Fix last commit (3f2bdac)
31337         + commit 9433661419043431a6cfc7d84c8450e0b2f6c353
31338         * tools/rfc822parse.c (parse_field): Replace break by goto.
31339
31340 2015-04-09  Werner Koch  <wk@gnupg.org>
31341
31342         gpgparsemail: Fix case of zero length continuation lines.
31343         + commit 3fbeba64a8bfb2b673230c124a3d616b6568fd2f
31344         * tools/rfc822parse.c (parse_field): Loop after continuation line.
31345
31346 2015-04-08  Werner Koch  <wk@gnupg.org>
31347
31348         sm: Fix certificate lookup in dirmngr cache.
31349         + commit 6619ead2cfd2abcb95b66dc70622fdeef624fb8a
31350         * sm/call-dirmngr.c (get_cached_cert): Fix typo in LOOKUP command.
31351
31352 2015-04-06  Werner Koch  <wk@gnupg.org>
31353
31354         gpg: Print the user id in --fast-list-mode.
31355         + commit c2383407bba5eefea486464a31e02846124c9da5
31356         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Change.
31357
31358         gpg: Prepare to pass additional context to the list functions.
31359         + commit 67a58118ab6171c0cf28b65a39973062690d1313
31360         * g10/keylist.c (struct sig_stats): Rename to keylist_context and add
31361         field check_sigs.
31362         (keylist_context_release): New.
31363         (list_all): Set listctx.check_sigs and call release func.
31364         (list_one): Ditto.
31365         (locate_one): Ditto.
31366         (list_keyblock_print): Use .check_sigs field.  Repalce arg opaque by
31367         listctx.
31368         (list_keyblock): Ditto.  Make static.
31369         (list_keyblock_direct): New.
31370         * g10/keygen.c (do_generate_keypair): Replace list_keyblock by
31371         list_keyblock_direct.
31372
31373         gpg: Merge duplicated code for get_user_id et al.
31374         + commit f577d5c1a747d673fa1d5c012ce3e3b78b699c6a
31375         * g10/getkey.c (get_user_id_string): Add args mode and r_LEN.
31376         (get_user_id_string_native): Add new args.
31377         (get_long_user_id_string, get_user_id): Rewrite using
31378         get_user_id_string.
31379
31380         gpg: Add new option --debug-iolbf.
31381         + commit c581ed717ad2cc4be90c46253baa44a0d3ba5b80
31382         * g10/gpg.c (oDebugIOLBF): new.
31383         (opts): Add --debug-iolbf.
31384         (main): Set option.
31385
31386         Rename DBG_ASSUAN to DBG_IPC and add separate DBG_EXTPROG.
31387         + commit 24a75201da6be72edf85b96dbc0c01c747d02c6a
31388         * g10/options.h (DBG_EXTPROG_VALUE): Separate from DBG_IPC_VALUE.
31389
31390         Fix use of DBG_CACHE and DBG_LOOKUP.
31391         + commit 2f099eb62ac6491675bbcccaca4e076b2d8e7ea0
31392         * dirmngr/dirmngr.h (DBG_LOOKUP_VALUE): Change to 8192.
31393         * g10/options.h (DBG_LOOKUP_VALUE, DBG_LOOKUP): New.
31394         * g10/getkey.c: Use DBG_LOOKUP instead of DBG_CACHE at most places.
31395
31396         gpg: Rename a debug macro.
31397         + commit 4de8a58e44262a25564e2acef8c8865d1755982e
31398         * g10/options.h (DBG_CIPHER_VALUE): Rename to DBG_CRYPTO_VALUE.
31399         (DBG_CIPHER): Rename to DBG_CRYPTO.
31400
31401 2015-04-05  Werner Koch  <wk@gnupg.org>
31402
31403         gpg: Fix DoS while parsing mangled secret key packets.
31404         + commit d901efcebaefaf6eae4a9b9aa8f0c2c055d3518a
31405         * g10/parse-packet.c (parse_key): Check PKTLEN before calling mpi_read
31406         et al.
31407
31408 2015-04-03  NIIBE Yutaka  <gniibe@fsij.org>
31409
31410         g10: Fix keytocard.
31411         + commit f82c4a6d0d76e716b6a7b22ca964fa2da1f962a0
31412         g10/call-agent.h (agent_scd_learn): Add FORCE option.
31413         g10/call-agent.c (agent_scd_learn): Implement FORCE option.
31414         g10/keygen.c (gen_card_key): Follow the change of option.
31415         g10/card-util.c (change_pin, card_status, factory_reset): Likewise.
31416         g10/keyedit.c (keyedit_menu): Update private key storage by
31417         agent_scd_learn.
31418
31419         agent: Add --force option for LEARN.
31420         + commit 4ffadb74b3ada8a5d69ef8d87f4326df9bd97e97
31421         * agent/command.c (cmd_learn): Handle --force option.
31422         (cmd_keytocard): Don't update key storage file.
31423         * agent/agent.h (agent_handle_learn): Add FORCE.
31424         * agent/learncard.c (agent_handle_learn): Implement FORCE to update
31425         key stroage file.
31426
31427 2015-03-31  Neal H. Walfield  <neal@g10code.com>
31428
31429         dirmngr: Don't use alloca.
31430         + commit d0ff2ee04187fbedacbe4d3884ee75d957a0b8c6
31431         * dirmngr/ks-engine-ldap.c (ks_ldap_put): Replace use of alloca with
31432         xmalloc and xfree.
31433
31434         dirmngr: Simplify truncation of long strings in debug code.
31435         + commit 802eec0ca49b92104c92f18c9a6a04c34de74168
31436         * dirmngr/ks-engine-ldap.c (modlist_dump): Simplify truncation of long
31437         strings.
31438
31439         dirmngr: Use a better error code.
31440         + commit 7f6d7948c1e56e09c1bdaa5143e1b5558c4376dd
31441         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): On error, return
31442         GPG_ERR_GENERAL, not GPG_ERR_ASS_GENERAL.
31443
31444         dirmngr: Better encapsulate the keyservers variable.
31445         + commit 348c520040a31f5c322183c0654a34978e2baf6f
31446         * dirmngr/dirmngr.h (struct server_control_s): Move field keyservers
31447         from here...
31448         * dirmngr/server.c (struct server_local_s): ... to here.  Update
31449         users.
31450         * dirmngr/ks-action.h (ks_action_resolve): Add argument keyservers.
31451         (ks_action_search): Likewise.
31452         (ks_action_get): Likewise.
31453         (ks_action_put): Likewise.
31454         * dirmngr/ks-action.c (ks_action_resolve): Add argument keyservers.
31455         Use it instead of ctrl->keyservers.
31456         (ks_action_search): Likewise.
31457         (ks_action_get): Likewise.
31458         (ks_action_put): Likewise.
31459
31460 2015-03-28  Neal H. Walfield  <neal@g10code.de>
31461
31462         gpg: Only use the last specified keyserver.
31463         + commit f26ba14028d34845ae10aae552b90681907e377d
31464         * g10/gpg.c (main): Only use the last specified keyserver.
31465
31466 2015-03-25  Werner Koch  <wk@gnupg.org>
31467
31468         dirmngr: Fix resource leaks and check rare errors.
31469         + commit bec10ae4b5a870303c800cdf3cd906044613fc2d
31470         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Fix resource
31471         leak.
31472         (ks_ldap_search): Check error from es_fopenmem.  Use LDAP_ERR where
31473         required.
31474         (modlist_dump): Check error from es_fopenmem.
31475         (uncescape): s/int/size_t/.  Use existing macros.
31476         (extract_attributes): Use existing trim function.
31477         (ks_ldap_put): Do not segv on error from modlist_dump.
31478
31479         dirmngr: Minor cleanups.
31480         + commit 6c701af121782c2feb4ee51e559a7420df00471f
31481         * dirmngr/ks-engine-ldap.c [__riscos__]: Remove doubled util.h.
31482         (ldap_to_gpg_err): s/GPG_ERR_GENERAL/GPG_ERR_INTERNAL/.
31483         (tm2ldaptime): Use snprintf.
31484         (ldap_connect): Get error code prior to log_error and and use modern
31485         function.   Use xfree, xtrustrdup etc.
31486         (modlist_lookup): Use GNUPG_GCC_A_USED.
31487         (modlist_free): Use xfree.
31488
31489         common: Add macro GNUPG_GCC_A_USED.
31490         + commit 99ef9cd7f589b51921bfbe8d52735c104ef260e3
31491         * common/util.h (GNUPG_GCC_A_USED): New.
31492
31493         sm: Change default algos to SHA256 (CSR) and AES128 (bulk encryption).
31494         + commit 1e4d8ddbe3ad7ee8f1c1d1798694d91f792776c0
31495         * sm/certreqgen.c (create_request): Change default hash algo.
31496         * sm/gpgsm.c (DEFAULT_CIPHER_ALGO): Change default bulk cipher algo.
31497
31498 2015-03-24  Werner Koch  <wk@gnupg.org>
31499
31500         gpg,w32: Handle forward slash in --keyring option.
31501         + commit bdd22e3a0846d38a0b6cdb822476ad2f15d03455
31502         * g10/keydb.c (keydb_add_resource): Allow forward slash under Windows.
31503
31504 2015-03-23  Neal H. Walfield  <neal@g10code.de>
31505
31506         Improve documentation for ks_hkp_get.
31507         + commit 7a56b6b3aa8b7a07bd80a3fcd5114bd1af359fa3
31508         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Improvement documentation.
31509
31510         Improve documenation of http_parse_uri.
31511         + commit 00a16cf49336ee0b4ce21eb05a79db955af053e0
31512         * common/http.c (http_parse_uri): Improve documentation.
31513
31514         Add support to talking to LDAP key servers.
31515         + commit 51341badb623927f2a358588c725a356fc77dbe7
31516         * g10/call-dirmngr.c (record_output): New function.
31517         (ks_put_inq_cb): Use it here to generate a --with-colons like output
31518         instead of a custom format.
31519         * dirmngr/ks-action.c: Include "ldap-parse-uri.h".
31520         (ks_action_help): If the provided URI is an LDAP URI, then use
31521         ldap_parse_uri to parse.  Call ks_ldap_help.
31522         (ks_action_search): If passed an LDAP URI, then call ks_ldap_search.
31523         (ks_action_get): Likewise.
31524         (ks_action_put): Likewise.  Also, change data from a 'const void *' to
31525         a 'void *' and add info and infolen parameters.  Add note that
31526         function may modify DATA.
31527         * dirmngr/ks-action.h (ks_action_put): Update declaration accordingly.
31528         * dirmngr/server.c: Include "ldap-parse-uri.h".
31529         (cmd_keyserver): If ITEM->URI is an LDAP URI, parse it using
31530         ldap_parse_uri.
31531         (hlp_ks_put): Improve documentation.
31532         (cmd_ks_put): Also pass info and infolen to ks_action_put.  Improve
31533         documentation.
31534         * dirmngr/ks-engine.h (ks_ldap_help): New declaration.
31535         (ks_ldap_search): Likewise.
31536         (ks_ldap_get): Likewise.
31537         (ks_ldap_put): Likewise.
31538         * dirmngr/ks-engine-ldap.c: New file.
31539         * dirmngr/Makefile.am (dirmngr_SOURCES): Add ks-engine-ldap.c,
31540         ldap-parse-uri.c and ldap-parse-uri.h.
31541         (dirmngr_LDADD) [USE_LDAP]: Add $(ldaplibs).
31542
31543         Import _gpgme_parse_timestamp from gpgme as parse_timestamp.
31544         + commit 81e83060856f02f6cfc7b48f8032e0cf14fc6c68
31545         * common/gettime.h (parse_timestamp): New declaration.
31546         * common/gettime.c (_win32_timegm): New function imported from
31547         gpgme/src/conversion.c:_gpgme_timegm.
31548         (parse_timestamp): New function imported from
31549         gpgme/src/conversion.c:_gpgme_parse_timestamp.
31550
31551         Move copy_stream function to misc.c.
31552         + commit 9e79a15f74c428624b0049a3f6a077c1bc7c731d
31553         * dirmngr/ks-action.c (copy_stream): Move function from here...
31554         * dirmngr/misc.c (copy_stream): ... to here and drop the static
31555         qualifier.
31556         * dirmngr/misc.h (copy_stream): Add declaration.
31557
31558         Move armor_data to misc.c.
31559         + commit 63552852bf191985b4b55aa524bc397c5b1d1515
31560         * dirmngr/ks-engine-hkp.c (armor_data): Move function from here...
31561         * dirmngr/misc.c (armor_data): ... to here and drop static qualifier.
31562         * dirmngr/misc.h: New declaration.
31563
31564         Add new LDAP utility functions.
31565         + commit 1a75b7c39f0a84f518711438565645a34fb2673f
31566         * dirmngr/Makefile.am (module_tests): New variable.
31567         (noinst_PROGRAMS): New primary.  Set it to $(module_tests).
31568         (TESTS): New variable.  Set it to $(module_tests).
31569         (t_common_src): New variable.
31570         (t_common_ldadd): Likewise.
31571         (t_ldap_parse_uri_SOURCES): New primary.
31572         (t_ldap_parse_uri_LDADD): Likewise.
31573         * dirmngr/ldap-parse-uri.c: New file.
31574         * dirmngr/ldap-parse-uri.h: Likewise.
31575         * dirmngr/t-ldap-parse-uri.c: Likewise.
31576         * dirmngr/t-support.h: Likewise.
31577
31578         Add new function uri_query_lookup.
31579         + commit e23b3ba5ffd3134a72da176a039e4d6c4f3ff595
31580         * common/http.h (uri_query_lookup): New declaration.
31581         * common/http.c (uri_query_lookup): The corresponding implementation.
31582
31583         Add new function strlist_find.
31584         + commit 79907ad256f5b84f36cbebdc92e5a05d9e266557
31585         * common/strlist.h (strlist_find): New declaration.
31586         * common/strlist.c (strlist_find): New function.
31587
31588         common: Add new helper function, strsplit.
31589         + commit b18ffcb81a3839dbf09603d70ebb8b80f65892d3
31590         * common/stringhelp.h (strsplit): New declaration.
31591         * common/stringhelp.c (strsplit): New function.
31592         * common/t-stringhelp.c (test_strsplit): New function.
31593         (main): Call it here.
31594
31595 2015-03-20  Werner Koch  <wk@gnupg.org>
31596
31597         gpg: Consider a mailbox only userid in mail search mode.
31598         + commit bebab54027d8c63574a2680c60481cfe9b88c240
31599         * kbx/keybox-search.c: Include mbox-util.h.
31600         (blob_cmp_mail): Improve OpenPGP uid parsing.
31601
31602         common: Add function is_valid_mailbox_mem.
31603         + commit a0eb2e4e8cef9ca6a5dfbae6440fa6cd583d0805
31604         * common/mbox-util.c (mem_count_chr): New.
31605         (my_memstr): New.
31606         (has_invalid_email_chars): Change args to work on a buffer.
31607         (is_valid_mailbox_mem): New.
31608         (is_valid_mailbox): Rewrite to use is_valid_mailbox_mem.
31609
31610         gpg: Find keys using mail addresses with garbage after the '>'
31611         + commit 783a4a98378fa1aa222d5cb7427dd37151feb08b
31612         * kbx/keybox-search.c (blob_cmp_mail): Stop comparing at the '>'.
31613
31614         common: Fix syntax error when building with gnutls.
31615         + commit 5136e39c6466de90697153ea253c4b540c1f7d1a
31616         * common/http.c (send_request): Add missing comma.
31617
31618 2015-03-19  Werner Koch  <wk@gnupg.org>
31619
31620         gpg: Emit status line NEWSIG before signature verification starts.
31621         + commit e7ddaad0fd2c8774a1d3367adfaa68014eaf65de
31622         * g10/mainproc.c (check_sig_and_print): Emit STATUS_NEWSIG.
31623
31624         agent: Compute correct MPI length header for protected ECC keys.
31625         + commit cf83ff01fce3ddcbde6d97dffa0db6f277588e25
31626         * agent/cvt-openpgp.c (apply_protection): Strip leading zeroes from
31627         opaque MPIs to comply with the OpenPGP spec.
31628
31629         hkps: Fix host name verification when using pools.
31630         + commit dc10d466bff53821f23d2cb4814c259d40c5d9c5
31631         * common/http.c (send_request): Set the requested for SNI.
31632         * dirmngr/ks-engine-hkp.c (map_host): Return the poolname and not
31633         the selecting a host.
31634
31635         Define replacement error codes from libgpg-error 1.19.
31636         + commit 28bb3ab686c1c994f67a92b6846b3726c58a0bc3
31637         * common/util.h: Add GPG_ERR_LDAP codes for libgpg-error < 1.19.
31638
31639 2015-03-17  Andre Heinecke  <aheinecke@intevation.de>
31640
31641         gpgtar: Fix extracting files with !(size % 512)
31642         + commit 6cbbb0bec98e1acefc4c7163cc41a507469db920
31643         * tools/gpgtar-extract.c (extract_regular): Handle size multiples
31644           of RECORDSIZE.
31645
31646 2015-03-17  Werner Koch  <wk@gnupg.org>
31647
31648         common: Add feature to ease using argparse's usage().
31649         + commit 9078b75a73600fc6b7b5502ceee8de032bb9c446
31650         * common/argparse.c (show_help): Take care of flag value
31651         (usage): Ditto.
31652
31653         common: Allow standalone build of argparse.c.
31654         + commit eb5f2c0af6691229300ac120ee44815cb27ed38e
31655         * common/argparse.h: Remove types.h - not required.
31656         * common/argparse.c: Change to allow standalone use.
31657
31658 2015-03-16  Werner Koch  <wk@gnupg.org>
31659
31660         gpg: Create all MPIs with RFC-4880 correct length headers.
31661         + commit ab17f7b6c392782718f57eaea94fc18a0ff49389
31662         * g10/build-packet.c (gpg_mpi_write): Strip leading zeroes.
31663
31664         gpg: Allow printing of MPI values in --list-mode.
31665         + commit bcc8250bc5b9a357c6d1444f03e334edec573ede
31666         * g10/parse-packet.c (set_packet_list_mode): Set mpi_print_mode.
31667         * g10/misc.c (mpi_print): Do not print an extra leading zero.
31668
31669         gpg: Fix broken write of opaque MPI length header.
31670         + commit 8bc1debfefb7cd4b0be724317793d59dea37d677
31671         * g10/build-packet.c (gpg_mpi_write): Use a char array for the length.
31672
31673 2015-03-15  Werner Koch  <wk@gnupg.org>
31674
31675         gpg: Fix possible dead code elimination.
31676         + commit 1a9f13bc663daa75c5009f6a0bf7d7483f12cce0
31677         * g10/encrypt.c: Change condition for detecting a real file.
31678
31679         g13: Fix pointer wrap check.
31680         + commit 4bc3a2e954afc2ba7dbe79ba5f740184b7d4cd73
31681         * g13/utils.c (find_tuple, next_tuple): Cast pointer to size_t before
31682         doing an overflow check.
31683
31684         agent: Remove useless conditions in command.c.
31685         + commit 3a35c9740ab792068ec4b3732ecfaa17bf4fc7f0
31686         * agent/command.c (cmd_setkeydesc): Remove NULL check.
31687         (cmd_get_passphrase): Ditto.
31688         (cmd_clear_passphrase): Ditto.
31689         (cmd_get_confirmation): Ditto.
31690         (cmd_getval): Ditto.
31691         (cmd_putval): Ditto.
31692
31693         agent: Fix length test in sshcontrol parser.
31694         + commit 3529dd8bb5bafc4e02915648d5f409bd27a9cc37
31695         * agent/command-ssh.c (ssh_search_control_file): Check S before
31696         upcasing it.
31697
31698         agent: Remove useless conditions.
31699         + commit 95415bdec77a608e6052ba3e2a5d857a8e8f7689
31700         * agent/genkey.c (agent_ask_new_passphrase): Remove useless condition.
31701         * agent/command-ssh.c (ssh_identity_register): Ditto.
31702
31703         gpg: Remove useless condition.
31704         + commit c59b410cf1d5676de7061e5a183c01227aa8e760
31705         * g10/keylist.c (list_keyblock_colon): Remove useless condition (PK).
31706         (list_keyblock_print):  Likewise.
31707
31708         scd: Fix possible NULL deref in apdu.c.
31709         + commit ef0a3abf7305133d071bf1a94a7f461082f9a9aa
31710         * scd/apdu.c (control_pcsc_direct): Take care of BUFLEN being NULL.
31711         (control_pcsc_wrapped): Ditto.
31712
31713         common: Make openpgp_oid_to_str more robust.
31714         + commit 35db798c2df7f31b52a9dd9d55ea60ae1f325be9
31715         * common/openpgp-oid.c (openpgp_oid_to_str): Take care of
31716         gcry_mpi_get_opaque returning NULL.  Remove useless condition !BUF.
31717
31718 2015-03-11  Werner Koch  <wk@gnupg.org>
31719
31720         agent: Improve error reporting from Pinentry.
31721         + commit efde50f92af241d8357db83e280a6ece62f6397f
31722         * agent/call-pinentry.c (unlock_pinentry): Add error logging.  Map
31723         error source of uncommon errors to Pinentry.
31724
31725 2015-03-10  Werner Koch  <wk@gnupg.org>
31726
31727         gpg: Change --print-pka-records into an option.
31728         + commit 7b5b52f3268b093eebbac3f199fb69bf246d9cd1
31729         * g10/gpg.c (aPrintPKARecords): Rename to oPrintPKARecords and do not
31730         use it as a command.
31731         * g10/keylist.c (list_keyblock): List PKA rceords also for secret
31732         keys.
31733
31734         gpg: Add --list-gcrypt-config and "curve" item for --list-config.
31735         + commit 14af2be022ccaf826db048fc16959d0222ff1134
31736         * common/openpgp-oid.c (curve_supported_p): New.
31737         (openpgp_enum_curves): New.
31738         * common/t-openpgp-oid.c (test_openpgp_enum_curves): New.
31739         (main): Add option --verbose.
31740         * g10/gpg.c (opts): Add --list-gcrypt-config.
31741         (list_config): Add items "curve" and "curveoid".  Remove unused code.
31742
31743 2015-03-09  NIIBE Yutaka  <gniibe@fsij.org>
31744
31745         scd: fix for 64-bit arch.
31746         + commit bb5a1b7c738d74d5b46340ec7b50000a2d343ca9
31747         * agent/pksign.c (agent_pksign_do): Use int.
31748         * scd/app-openpgp.c (get_public_key): Likewise.
31749
31750 2015-03-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
31751
31752         gpg: avoid chatter about trustdb when --quiet.
31753         + commit 82146af85b65498a69b28913593dc1ffeb6b6fed
31754         * g10/trustdb.c (tdb_check_trustdb_stale): avoid log_info() when
31755           opt.quiet
31756
31757 2015-02-26  Werner Koch  <wk@gnupg.org>
31758
31759         gpg: Lowercase mailbox for PKA lookups.
31760         + commit c071be698efadef1ad01fd3d329d1b486a372927
31761         * common/stringhelp.c (ascii_strlwr): New.
31762         * common/mbox-util.c (mailbox_from_userid): Downcase result.
31763
31764         gpg: Fix memory leak due to PKA lookup.
31765         + commit 91baea2dcde6c1e5ca9e8fa7020d9ab4551d1bca
31766         * g10/keyserver.c (keyserver_import_pka): Move the xfree.
31767
31768 2015-02-25  Werner Koch  <wk@gnupg.org>
31769
31770         gpg: Switch to a hash and CERT record based PKA system.
31771         + commit 2fc27c8696f5cf2ddf3212397ea49bff115d617b
31772         * common/dns-cert.c (get_dns_cert): Make r_key optional.
31773         * common/pka.c: Rewrite for the new hash based lookup.
31774         * common/t-pka.c: New.
31775         * configure.ac: Remove option --disable-dns-pka.
31776         (USE_DNS_PKA): Remove ac_define.
31777         * g10/getkey.c (parse_auto_key_locate): Always include PKA.
31778
31779         common: Allow requesting a specific certtype with get_dns_cert()
31780         + commit af60152a4632ef26ca950a424429b15b6c69038d
31781         * common/dns-cert.c (get_dns_cert): Add arg want_certtype.  Change all
31782         callers.
31783         (CERTTYPE_): Move constants to ...
31784         * common/dns-cert.h: here as DNS_CERTTYPE_.
31785
31786         Move new mailbox.c source file to common/.
31787         + commit 9913253610bac69e9503800e85696491e018e327
31788         * g10/mailbox.c: Move to ...
31789         * common/mbox-util.c: new file.
31790         * common/mbox-util.h: New. Include where needed.
31791         * g10/t-mailbox.c: Move to ...
31792         * common/t-mbox-util.c: new file.
31793
31794 2015-02-24  Werner Koch  <wk@gnupg.org>
31795
31796         gpg: Add command --print-pka-records.
31797         + commit e2d93402801a2cb822c723e891fd98233fdb3fd5
31798         * g10/gpg.c (main): Add command --print-pka-records.
31799         * g10/options.h (struct opt): Add field "print_pka_records".
31800         * g10/keylist.c (list_keyblock_pka): New.
31801         (list_keyblock): Call it if new option is set.
31802         (print_fingerprint): Add mode 10.
31803
31804         gpg: Add function to extract the mailbox.
31805         + commit 93fa3d5c1760f3fee5412fb29d58fbd60db16ea9
31806         * g10/misc.c (has_invalid_email_chars, is_valid_mailbox)
31807         (is_valid_user_id): Move to ...
31808         * g10/mailbox.c: new file.
31809         (string_has_ctrl_or_space, has_dotdot_after_at): New.
31810         (has_invalid_email_chars): New.
31811
31812         * g10/t-mailbox.c: New.
31813         * g10/Makefile.am (module_tests): Add t-mailbox.
31814         (t_mailbox_SOURCES, t_mailbox_LDADD): New.
31815
31816 2015-02-23  Werner Koch  <wk@gnupg.org>
31817
31818         gpg: Add option to print fingerprints in ICAO spelling.
31819         + commit ae09515b9d3aae653b62a32ea5b4a9b9e557fc52
31820         * g10/gpg.c: Add option --with-icao-spelling.
31821         * g10/options.h (struct opt): Add with_icao_spelling.
31822         * g10/keylist.c (print_icao_hexdigit): New.
31823         (print_fingerprint): Print ICAO spelling.
31824
31825         gpg: Skip legacy keys while searching keyrings.
31826         + commit a8116aacd91b7e775762a62c268fab6cc3c77438
31827         * g10/getkey.c (search_modes_are_fingerprint): New.
31828         (lookup): Skip over legacy keys.
31829
31830         common: Fix regression due to commit 2183683b.
31831         + commit d9f6eea6115df7959564123eb99d633ce5bba42e
31832         * common/dns-cert.c (get_dns_cert): Remove cruft.
31833
31834 2015-02-19  Werner Koch  <wk@gnupg.org>
31835
31836         gpg: Replace remaining uses of stdio by estream.
31837         + commit d2a70fd8348d6c11d1960caf2afe0701833dad6a
31838         * g10/sign.c (sign_file):  Use log_printf instead of stderr.
31839         * g10/tdbdump.c (export_ownertrust): Use estream fucntions.
31840         (import_ownertrust): Ditto.
31841         * g10/tdbio.c (tdbio_dump_record): Ditto.  Change arg to estream_t.
31842
31843         gpg: Fix segv due to NULL value stored as opaque MPI.
31844         + commit 76c8122adfed0f0f443cce7bda702ba2b39661b3
31845         * g10/build-packet.c (gpg_mpi_write): Check for NULL return from
31846         gcry_mpi_get_opaque.
31847         (gpg_mpi_write_nohdr, do_key): Ditto.
31848         * g10/keyid.c (hash_public_key): Ditto.
31849
31850 2015-02-12  Werner Koch  <wk@gnupg.org>
31851
31852         scd: Fix regression in 2.1.2 (due to commit 2183683)
31853         + commit 07a71da479daaac43b8c5b1034a1e66f96bdbc48
31854         * scd/apdu.c (pcsc_vendor_specific_init): Replace use of
31855         bufNN_to_uint by direct code.
31856
31857 2015-02-12  Andre Heinecke  <aheinecke@intevation.de>
31858
31859         dirmngr: Initialize cache from sysconfig dir.
31860         + commit 070d7bf940efa60db2b0734273b9b3736d18338a
31861         * dirmngr/certcache.c (cert_cache_init): Load certificates
31862         from sysconfig dir instead of the homeidr.
31863         * dirmngr/dirmngr.c (main): Removed parsing of obsolete
31864         homedir_data option.
31865         * dirmngr/dirmngr.h (opt): Removed homedir_data.
31866         * doc/dirmngr.texi: Update and clarify certs directory doc.
31867
31868 2015-02-11  Werner Koch  <wk@gnupg.org>
31869
31870         Release 2.1.2.
31871         + commit fc17562cc4f8d531ae7f0887cf2a96dcc224b021
31872
31873
31874         dirmngr: Avoid warning about unused function.
31875         + commit 8219c87c301ec669f07528e8d8108655f7b705be
31876         * dirmngr/dirmngr.c (my_gnutls_log): Build only if gnutls is used.
31877
31878         build: Update standard build-aux files.
31879         + commit 81e93e251e52e427a29556de75640c7933bb5aad
31880
31881
31882         Use inline functions to convert buffer data to scalars.
31883         + commit 2183683bd633818dd031b090b5530951de76f392
31884         * common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
31885         (buf16_to_ushort, buf16_to_u16): New.
31886         (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
31887
31888 2015-02-09  Werner Koch  <wk@gnupg.org>
31889
31890         gpg: Prevent an invalid memory read using a garbled keyring.
31891         + commit f0f71a721ccd7ab9e40b8b6b028b59632c0cc648
31892         * g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
31893         types.
31894         * g10/keydb.c (parse_keyblock_image): Ditto.
31895
31896         gpg: Fix a NULL-deref in export due to invalid packet lengths.
31897         + commit 0835d2f44ef62eab51fce6a927908f544e01cf8f
31898         * g10/build-packet.c (write_fake_data): Take care of a NULL stored as
31899         opaque MPI.
31900
31901         gpg: Fix a NULL-deref due to empty ring trust packets.
31902         + commit 39978487863066e59bb657f5fe4e8baab510da7e
31903         * g10/parse-packet.c (parse_trust): Always allocate a packet.
31904
31905 2015-02-04  Werner Koch  <wk@gnupg.org>
31906
31907         gpg-agent: Use "pinentry-basic" as fallback.
31908         + commit 0de5c6a9a783ed9dc69cecbf34eadcaace4be243
31909         * common/homedir.c (get_default_pinentry_name): New.
31910         (gnupg_module_name): Use that for the default pinentry.
31911         (gnupg_module_name_flush_some): New.
31912         * agent/gpg-agent.c (agent_sighup_action): Flush some module names.
31913         * agent/call-pinentry.c (start_pinentry): Do not modify
31914         opt.pinentry_program.
31915
31916         w32: Add manifest to gpg.
31917         + commit 05428d12561bc7eb872a81444918dfe706477a41
31918         * g10/gpg.w32-manifest.in: New.
31919         * g10/gpg-w32info.rc: Add manifest.
31920         * g10/Makefile.am (EXTRA_DIST): Add manifest.
31921         (gpg-w32info.o): Depend on manifest.
31922         * configure.ac (BUILD_VERSION): New.
31923         (AC_CONFIG_FILES): Add manifest.
31924
31925 2015-02-03  Werner Koch  <wk@gnupg.org>
31926
31927         Update copyright years.
31928         + commit 3f67426a89bf4b37e1d2662fddc3eb4fa474c4ad
31929         * common/w32info-rc.h.in (W32INFO_COMPANYNAME): Change to "The GnuPG
31930         Project".
31931
31932 2015-02-02  Werner Koch  <wk@gnupg.org>
31933
31934         w32: Change default Windows install dir and add bin to PATH.
31935         + commit 8872657b2a52dd9698224b80e5672e23c5405eda
31936         * build-aux/speedo.mk (WITH_GUI): New macro.  The Windows installer is
31937         now build by default without any GUI stuff.
31938         * build-aux/speedo/w32/inst.nsi: Change standard installation
31939         directory.
31940         (AddToPath, un.RemoveFromPath): New.
31941         (gnupginst): Add bin directory to the PATH.
31942
31943 2015-02-01  Werner Koch  <wk@gnupg.org>
31944
31945         w32: Allow for Unicocde installation directory.
31946         + commit 616633b7713081ecc39419494879947cc7f163d0
31947         * common/homedir.c (w32_rootdir): Use Unicode fucntion not only for
31948         WinCE.
31949
31950 2015-01-30  Joshua Rogers  <git@internot.info>
31951
31952         kbx: Fix resource leak.
31953         + commit 7db6c82cec49b7c56c403a8ea98364086baf75f3
31954         * kbx/keybox-update.c (blob_filecopy): Fix resource leak.  On error
31955         return, 'fp' and 'newfp' was never closed.
31956
31957 2015-01-29  Werner Koch  <wk@gnupg.org>
31958
31959         agent: Fix use of imported but unprotected openpgp keys.
31960         + commit 6ab0fac575a8b04152a199cb300a08436b096753
31961         * agent/agent.h (PRIVATE_KEY_OPENPGP_NONE): New.
31962         * agent/command.c (do_one_keyinfo): Implement it.
31963         * agent/findkey.c (agent_key_from_file): Ditto.
31964         (agent_key_info_from_file): Ditto.
31965         (agent_delete_key): Ditto.
31966         * agent/protect.c (agent_private_key_type): Add detection for openpgp
31967         "none" method.
31968
31969 2015-01-29  NIIBE Yutaka  <gniibe@fsij.org>
31970
31971         po: Update Japanese Translation.
31972         + commit 6c368533f5211bed62e8638f522cef65c7ba4b87
31973
31974
31975 2015-01-28  Werner Koch  <wk@gnupg.org>
31976
31977         gpg: Limit the size of key packets to a sensible value.
31978         + commit 382ba4b137b42d5f25a7e256bb7c053ee5ac7b64
31979         * g10/parse-packet.c (MAX_KEY_PACKET_LENGTH): New.
31980         (MAX_UID_PACKET_LENGTH): New.
31981         (MAX_COMMENT_PACKET_LENGTH): New.
31982         (MAX_ATTR_PACKET_LENGTH): New.
31983         (parse_key): Limit the size of a key packet to 256k.
31984         (parse_user_id): Use macro for the packet size limit.
31985         (parse_attribute): Ditto.
31986         (parse_comment): Ditto.
31987
31988         gpg: Fix buffering problem in --list-config.
31989         + commit d8eea25b8b7becbfa3f059be6f5966a2f1aa7112
31990         * g10/gpg.c (list_config): Replace print_sanitized_string2 by
31991         es_write_sanitized.
31992
31993         * common/stringhelp.c (print_sanitized_buffer2): Remove.
31994         (print_sanitized_buffer, print_sanitized_utf8_buffer): Remove.
31995         (print_sanitized_utf8_buffer, print_sanitized_utf8_string): Remove.
31996         (print_sanitized_string): Remove.
31997
31998         * sm/certdump.c (print_dn_part, print_dn_parts): Remove arg FP.
31999         (pretty_print_sexp, gpgsm_print_name2, gpgsm_print_name): Remove.
32000
32001         Add a hook to be called right after main.
32002         + commit 0c2bfd9d5a49a6134188f8f7820f6ccdebd9f181
32003         * common/init.c (early_system_init): New stub function.
32004
32005         gpg: Allow predefined names as answer to the keygen.algo prompt.
32006         + commit b1d5ed6ac842469afcb84868d0f6641dc286a6c7
32007         * g10/keygen.c (ask_algo): Add list of strings.
32008
32009         agent: Add some extra robustness to extract_private_key.
32010         + commit 795965437732e50f6216d7f5db0e6174e90548a9
32011         * agent/cvt-openpgp.c (extract_private_key): Add arg "arraysize".
32012         Make sure that R_FLAGS and R_CURVE are set to NULL.
32013
32014 2015-01-28  NIIBE Yutaka  <gniibe@fsij.org>
32015
32016         scd: Fix varargs call for 64-bit arch on ECC keys.
32017         + commit f6d3c6e5263d84b94ebe13df9ff39b02109a2acb
32018         * scd/app-openpgp.c (store_fpr): Remove CARD_VERSION from the
32019         arguments.
32020         (rsa_writekey): Follow the change.
32021         (do_genkey): Likewise.
32022         (ecc_writekey): Likewise.  Cast to size_t.
32023
32024 2015-01-27  Werner Koch  <wk@gnupg.org>
32025
32026         gpg: Fix segv introduced to commit 4d7c9b0.
32027         + commit 6eebc56687935f3e993eac374b9f4cc5ad3bcf2b
32028         * g10/keygen.c (get_parameter_passphrase): Take care of R == NULL.
32029
32030 2015-01-27  NIIBE Yutaka  <gniibe@fsij.org>
32031
32032         agent: Fix agent_public_key_from_file for ECC.
32033         + commit 9453d645d4a489f038829c80343c124fff62d635
32034         * agent/cvt-openpgp.c (extract_private_key): New.
32035         (convert_to_openpgp): Use extract_private_key.
32036         * agent/findkey.c (agent_public_key_from_file): Use
32037         extract_private_key.
32038
32039 2015-01-26  Werner Koch  <wk@gnupg.org>
32040
32041         sm: Simplify fix ed8383c6.
32042         + commit 6c87d1ce66d8e93e6c0f16c06116e9179f6158ba
32043         * sm/minip12.c (p12_build): Release PWBUF only at the end.
32044
32045 2015-01-25  Joshua Rogers  <git@internot.info>
32046
32047         ccid: Remove incorrect expression leading to errors.
32048         + commit 274d7b17a90908a90ba6ad295c08a79b287fc231
32049         * scd/ccid-driver.c (send_escape_cmd): Fix setting of 'rc'.
32050
32051 2015-01-23  Werner Koch  <wk@gnupg.org>
32052
32053         gpgconf: Fix validity check for UINT32 values.
32054         + commit 3f6abb57a7b5e54b593c5775c8f7a07d61119705
32055         * tools/gpgconf-comp.c (option_check_validity): Enable check for
32056         UINT32.
32057
32058 2015-01-22  Werner Koch  <wk@gnupg.org>
32059
32060         gpg: Improve skipping of PGP-2 keys.
32061         + commit 09e8f35d3808d6e49f891360c341aae3869e8650
32062         * g10/keydb.c (keydb_search_first, keydb_search_next): Skip legacy
32063         keys.
32064         * g10/keyring.c (keyring_get_keyblock): Handle GPG_ERR_LEGACY_KEY.
32065         (prepare_search): Ditto.
32066         (keyring_rebuild_cache): Skip legacy keys.
32067         * g10/keyserver.c (keyidlist): Ditto.
32068         * g10/trustdb.c (validate_key_list): Ditto.
32069
32070         gpg: Add dedicated error code for PGP-2 keys.
32071         + commit 6f3d11d8837b00e3a1c4fa881066855c0321d6b2
32072         * g10/parse-packet.c (parse_key): Return GPG_ERR_LEGACY_KEY for PGP2
32073         keys.
32074         * g10/import.c (read_block): Simplify by checking GPG_ERR_LEGACY_KEY.
32075         * g10/getkey.c (lookup): Silence error message for PGP-2 keys.
32076
32077         * common/util.h (GPG_ERR_LEGACY_KEY): Add replacement for older
32078         libgpg-error.
32079
32080         gpg: Replace remaining old error code macros by GPG_ERR_.
32081         + commit 11142e0ad7bc9a9e3c3dccf958d8dbd3312cb993
32082         * g10/gpg.h (g10_errstr): Remove macro and change all occurrences by
32083         gpg_strerror.
32084         (G10ERR_): Remove all macros and change all occurrences by their
32085         GPG_ERR_ counterparts.
32086
32087         gpg: Remove an unused variable.
32088         + commit a23c30fb59c0a216763a7972028995d3be42a844
32089         * g10/getkey.c (getkey_ctx_s): Remove last_rc.
32090
32091 2015-01-21  Werner Koch  <wk@gnupg.org>
32092
32093         dirmngr: Fix TLS build problems.
32094         + commit 091c35ec726a4fa4691c2665b13adee6a34b5b66
32095         * dirmngr/Makefile.am (AM_CFLAGS): Add flags for TLS libs.
32096
32097         gpg: Support --passphrase with --quick-gen-key.
32098         + commit 4d7c9b0e9aceedd924d600978bc1b6cae7d5c456
32099         * g10/keygen.c: Include shareddefs.h.
32100         (quick_generate_keypair): Support static passphrase.
32101         (get_parameter_passphrase): New.
32102         (do_generate_keypair): Use it.
32103
32104         gpg: Re-enable the "Passphrase" parameter for batch key generation.
32105         + commit aa99ebde778b7b563f35025f1b48954757f840be
32106         * agent/command.c (cmd_genkey): Add option --inq-passwd.
32107         * agent/genkey.c (agent_genkey): Add new arg override_passphrase.
32108         * g10/call-agent.c (inq_genkey_parms): Handle NEWPASSWD keyword.
32109         (agent_genkey): Add arg optional arg "passphrase".
32110         * g10/keygen.c (common_gen, gen_elg, gen_dsa, gen_ecc)
32111         (gen_rsa, do_create): Add arg "passphrase" and pass it through.
32112         (do_generate_keypair): Make use of pPASSPHRASE.
32113         (release_parameter_list): Wipe out a passphrase parameter.
32114
32115 2015-01-19  Werner Koch  <wk@gnupg.org>
32116
32117         kbx: Minor cleanup for the previous fix.
32118         + commit 7be1b7d8017cb7ebf1a3855edec0ef5e342cc9c5
32119         * kbx/keybox-search.c (blob_get_keyid): Rename to
32120         blob_get_first_keyid. Check number of keys and remove blob type check.
32121
32122 2015-01-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
32123
32124         kbx: Call skipfnc callback to filter out keys.
32125         + commit c5956592c171e6fe988e74161aa99636b7f12e4b
32126         * kbx/keybox-search.c (blob_get_keyid): New.
32127         (keybox-search): Call skipfnc callback function.
32128
32129 2015-01-13  Andreas Schwier  <andreas.schwier@cardcontact.de>
32130
32131         scd: Allow for certificates > 1024 with PC/SC.
32132         + commit 16a1330fa16f6b23e2661c0175c431ab40da45ff
32133         * scd/pcsc-wrapper.c (handle_transmit): Enlarge buffer to 4096 too
32134         allow for larger certificates.
32135
32136 2015-01-08  NIIBE Yutaka  <gniibe@fsij.org>
32137
32138         dirmngr: Fix error code path of map_host.
32139         + commit 657a26f3af1b3f817d6cde2d091273d332571247
32140         * dirmngr/ks-engine-hkp.c (map_host): Fix error return.
32141
32142 2015-01-08  Joshua Rogers  <git@internot.info>
32143
32144         scd: fix get_public_key for OpenPGPcard v1.0.
32145         + commit 100b322f5da3066bab5a2b0eb234c631c581c0e4
32146         * scd/app-openpgp.c (get_public_key): correctly close 'fp' upon use.
32147
32148 2015-01-07  NIIBE Yutaka  <gniibe@fsij.org>
32149
32150         dirmngr: fix LDAP query PATTERNS limit check.
32151         + commit 22b15fccffe613f455f9748c048c8e451724a842
32152         * dirmngr/ldap.c (start_cert_fetch_ldap): fix ARGC limitation.
32153
32154         scd: fix merge failure.
32155         + commit 602f17b5a775f02e0e33a54d3155929dc00e4f53
32156         * scd/apdu.c (pcsc_pinpad_verify): Remove wrong lines inserted by
32157         merge.
32158
32159 2015-01-05  Werner Koch  <wk@gnupg.org>
32160
32161         sm,g13: Init local vars to avoid compiler warnings.
32162         + commit 9bf40849a9f86204e113712c4cc285f1ac16127a
32163         * sm/misc.c (transform_sigval): Init RSA_S_LEN.
32164         * g13/mount.c (read_keyblob): Init HEADERLEN.
32165
32166         gpg: Remove unused args from a function.
32167         + commit 616e511f278bf9af04dc66bbb8b05b37bf541f37
32168         * g10/keyserver.c (parse_keyserver_uri): Remove args configname and
32169         configlineno.  Change all callers.
32170
32171         gpg: Clear a possible rest of the KDF secret buffer.
32172         + commit 56e688823345bbcfef220b13eb418854f8798b16
32173         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Fix order of args.
32174
32175         build: Require automake 1.14.
32176         + commit 445bb17d5fe6b53db078082fb033dbc67eea8307
32177         * configure.ac (AM_INIT_AUTOMAKE): Add serial-tests.
32178
32179 2015-01-04  Werner Koch  <wk@gnupg.org>
32180
32181         agent: Make --allow-loopback-pinentry gpgconf changeable.
32182         + commit ac2cb47fc5c0be539aaa07fd141acdbc0934800f
32183
32184
32185 2014-12-22  Joshua Rogers  <git@internot.info>
32186
32187         tools: Free variable before return.
32188         + commit cf88337f8a4f8c98aca4b1da5921d18567b4f474
32189         * tools/gpgconf-comp.c: Free 'dest_filename' before it is returned
32190         upon error.
32191
32192 2014-12-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
32193
32194         sm: Avoid double-free on iconv failure.
32195         + commit ed8383c618e124cfa708c9ee87563fcdf2f4649c
32196         * sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid
32197         double-free of pwbuf.
32198
32199         scd: Avoid double-free on error condition in scd.
32200         + commit b0b3803e8c2959dd67ca96debc54b5c6464f0d41
32201         * scd/command.c (cmd_readkey): avoid double-free of cert
32202
32203         avoid future chance of using uninitialized memory.
32204         + commit 367b073ab5f439ccf0750461d10c69f36998bd62
32205         * common/iobuf.c: (iobuf_open): initialize len
32206
32207         avoid double-close in unusual dotlock situations.
32208         + commit 628b111fa679612e23c0d46505b1ecbbf091897d
32209         * common/dotlock.c: (dotlock_create_unix) avoid double-close()
32210          in unusual situations.
32211
32212         gpgkey2ssh: clean up varargs.
32213         + commit 351bca9047d748c3c4f7e9a3cdc476af127b1da3
32214         * tools/gpgkey2ssh.c (key_to_blob) : ensure that va_end is called.
32215
32216 2014-12-22  Werner Koch  <wk@gnupg.org>
32217
32218         doc: Fix memory leak in yat2m.
32219         + commit 6056d2467310260ddc0db2fe65b737ace6febcaa
32220         * doc/yat2m.c (write_th): Free NAME.
32221
32222         dirmngr: Fix memory leak.
32223         + commit 5a556e4e88bcbc926c0922070acaf5f7b25d18fb
32224         * dirmngr/server.c (cmd_ks_search, cmd_ks_get): Fix memory leak.
32225
32226         * dirmngr/ks-engine-hkp.c (ks_hkp_mark_host): Remove double check.
32227
32228         dirmngr: Remove un-needed check.
32229         + commit 0d5cb55402c44fb5f731ecf85705f845f3091aa7
32230         * dirmngr/crlfetch.c (crl_fetch): Check that URL is not NULL.
32231
32232         dirmngr,gpgsm: Return NULL on fail.
32233         + commit abd5f6752d693b7f313c19604f0723ecec4d39a6
32234         * dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL.
32235         * sm/gpgsm.c (parse_keyserver_line): Ditto.
32236
32237 2014-12-22  NIIBE Yutaka  <gniibe@fsij.org>
32238
32239         scd: ECDH Support.
32240         + commit bdc8efbdd124d836c36cf482216e375421f72891
32241         * agent/divert-scd.c (divert_pkdecrypt): Support ECDH.
32242         * scd/app-openpgp.c (get_algo_byte, store_fpr): Support ECDH.
32243         (send_key_attr): Support ECDH.  Fix EdDSA algorithm value.
32244         (retrieve_key_material): Initialize fields.
32245         (get_public_key, ecc_writekey, do_writekey): Support ECDH.
32246         (ecdh_writekey): Remove.
32247         (do_decipher): Support ECDH.
32248         (parse_algorithm_attribute): Support ECDH.  Fix EdDSA.
32249
32250 2014-12-19  Werner Koch  <wk@gnupg.org>
32251
32252         agent: Make sure --max-cache-ttl is >= --default-cache-ttl.
32253         + commit 76140141699b545f7a988bf5fc101063917e8ce3
32254         * agent/gpg-agent.c (finalize_rereadable_options): New.
32255         (main, reread_configuration): Call it.
32256
32257         agent: Keep the session environment for restricted connections.
32258         + commit 14601eacb51f6c8a60d3d57aee1be11debd94c68
32259         * agent/command-ssh.c (setup_ssh_env): Move code to ...
32260         * agent/gpg-agent.c (agent_copy_startup_env): .. new function.  Change
32261         calllers.
32262         * agent/command.c (start_command_handler): Call that fucntion for
32263         restricted connections.
32264
32265         agent: Fix string prepended to remotely initiated prompts.
32266         + commit aad8963f7b9d13b319abd413db8f42ec467db913
32267         * agent/command.c (cmd_setkeydesc): Use %0A and not \n. Make
32268         translatable.
32269
32270 2014-12-18  Werner Koch  <wk@gnupg.org>
32271
32272         build: Remove option to build without agent.
32273         + commit abec64f3cb04e49ca48cc476a5830a920e2ebf8f
32274         * configure.ac (build-agent): Set to yes.
32275
32276 2014-12-17  Werner Koch  <wk@gnupg.org>
32277
32278         gpgconf: Exit with failure if --launch fails.
32279         + commit 5cb6df8996623c00eaa2a39e3037101585442f7e
32280         * tools/gpgconf-comp.c (gc_component_launch): Return an error code.
32281         * tools/gpgconf.c (main): Exit if launch failed.
32282
32283 2014-12-16  Werner Koch  <wk@gnupg.org>
32284
32285         Release 2.1.1.
32286         + commit 08c00cd4fe432d6852ad1d5c34a234c56aa3617c
32287
32288
32289         po: Update the German translation.
32290         + commit 4ba740bd4734c43e7876f6f6380cc5963789d510
32291
32292
32293 2014-12-16  Petr Pisar  <petr.pisar@atlas.cz>
32294
32295         po: Update Czech translation.
32296         + commit 30560491fe42562f4bbdb17d3213f7210f549a0f
32297
32298
32299 2014-12-16  Werner Koch  <wk@gnupg.org>
32300
32301         gpg: Show private DO information in the card status.
32302         + commit ce9212924039fba4e479760bba86c61b0d91c469
32303         * g10/call-agent.c (agent_release_card_info): Free private_do.
32304         (learn_status_cb): Parse PRIVATE-DO-n stati.
32305
32306 2014-12-16  Ineiev  <ineiev@gnu.org>
32307
32308         po: Update Russian translation.
32309         + commit 5ab5b3fa6921f08dd0a498fe0381735e803d01e3
32310
32311
32312 2014-12-16  Jedi  <jedi@jedi.org>
32313
32314         po: Update zh_TW translation.
32315         + commit 668dc6b32cb97608ef65b85d917c86f5aec896ce
32316
32317
32318 2014-12-15  Werner Koch  <wk@gnupg.org>
32319
32320         gpg: Add sub-command "factory-reset" to --card-edit.
32321         + commit dd65e21cb4934b40e6f2f7a8095f39fd6d9971bc
32322         * common/util.h (GPG_ERR_OBJ_TERM_STATE): New.
32323         * scd/iso7816.c (map_sw): Add this error code.
32324         * scd/app-openpgp.c (do_getattr): Return the life cycle indicator.
32325         * scd/app.c (select_application): Allow a return value of
32326         GPG_ERR_OBJ_TERM_STATE.
32327         * scd/scdaemon.c (set_debug): Print the DBG_READER value.
32328         * g10/call-agent.c (start_agent): Print a status line for the
32329         termination state.
32330         (agent_scd_learn): Make arg "info" optional.
32331         (agent_scd_apdu): New.
32332         * g10/card-util.c (send_apdu): New.
32333         (factory_reset): New.
32334         (card_edit): Add command factory-reset.
32335
32336         gpg: Fix regression in notation data regression.
32337         + commit fc9a35d2dec2f838abac831fd88dca494773e082
32338         * g10/misc.c (pct_expando): Reorder conditions for clarity.
32339         * g10/sign.c (write_signature_packets): Fix notation data creation.
32340
32341         gpg: Avoid extra LF in notaion data listing.
32342         + commit b4e402cb5c6d7fc507e8d5131969145b49640e50
32343         * g10/keylist.c (show_notation): Use log_printf.
32344
32345 2014-12-12  Werner Koch  <wk@gnupg.org>
32346
32347         scd: Fix possibly inhibited checkpin of the admin pin.
32348         + commit 68b4e7c9e4de0dc3580ca5af3cfd0f20a2691b5e
32349         * scd/app-openpgp.c (do_check_pin): Do not check a byte of a released
32350         buffer.
32351
32352         gpg: Let --card--status create a shadow key (card key stub).
32353         + commit f3f9f9b2844c35f7942ee904d5222523615cdad4
32354         * agent/command.c (cmd_learn): Add option --sendinfo.
32355         * agent/learncard.c (agent_handle_learn): Add arg "send" andsend
32356         certifciate only if that is set.
32357         * g10/call-agent.c (agent_scd_learn): Use --sendinfo.  Make INFO
32358         optional.
32359         (agent_learn): Remove.
32360         * g10/keygen.c (gen_card_key): Replace agent_learn by agent_scd_learn.
32361
32362         gpg: Fix possible read of unallocated memory.
32363         + commit 193815030d20716d9a97850013ac3cc8749022c9
32364         * g10/parse-packet.c (can_handle_critical): Check content length
32365         before calling can_handle_critical_notation.
32366
32367 2014-12-11  Werner Koch  <wk@gnupg.org>
32368
32369         build: Replace deprecated autconf macro.
32370         + commit 1d8ebe4d54eef37da65e7bd5d7386bc04f344447
32371         * m4/intl.m4: s/AM_PROG_MKDIR_P/AC_PROG_MKDIR_P/
32372         * m4/po.m4: Ditto.
32373
32374 2014-12-08  Werner Koch  <wk@gnupg.org>
32375
32376         dirmngr: Improve dead host detection.
32377         + commit e8c0ed779579293b3f4592d9337bc15ee0fc3fdd
32378         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Mark host dead
32379         also for 2 other error messages.
32380
32381         http: Improve diagnostic messages.
32382         + commit 6d5f12834124ba5ee0e54261531abf95c36c116c
32383         * common/http.c (send_request): Print TLS alert info
32384         (connect_server): Detect bogus DNS entry.
32385
32386         gpg: Obsolete some keyserver helper options.
32387         + commit 5bf93f4ea7a11381dd256b5fd4e5913366828265
32388         * g10/options.h (opt): Remove keyserver_options.other.
32389         * g10/gpg.c (main): Obsolete option --honor-http-proxt.
32390         * g10/keyserver.c (add_canonical_option): Replace by ...
32391         (warn_kshelper_option): New.
32392         (parse_keyserver_uri): Obsolete "x-broken-http".
32393
32394         dirmngr: Return a proper error for all dead hosts.
32395         + commit b72ece6d74d3e385e818ead748eba0cb111b95b3
32396         * dirmngr/ks-engine-hkp.c (map_host): Change to return an gpg_error_t.
32397         Return an error code for all dead hosts.
32398         (make_host_part): Change to return an gpg_error_t.  Change all
32399         callers.
32400
32401         gpg: Write a status line for a failed --send-keys.
32402         + commit 66ab8f807c96b778f2a2c82b58d3e15ac295e1b2
32403         * g10/keyserver.c (keyserver_put): Write an status error.
32404
32405 2014-12-08  NIIBE Yutaka  <gniibe@fsij.org>
32406
32407         scd: Fix for EdDSA.
32408         + commit c50c11d5751f46ddb38244a5a07d8274e1e10922
32409         * scd/app-openpgp.c (get_algo_byte): It catches 22.
32410         (store_fpr): It's MPI usually, but it's opaque bytes for EdDSA.
32411
32412 2014-12-05  Andre Heinecke  <aheinecke@intevation.de>
32413
32414         Document no-allow-mark-trusted option.
32415         + commit f4ed04fca8885301b567ec004ffff0d6e24f4611
32416             doc: Document no-allow-mark-trusted for gpg-agent
32417
32418             * doc/gpg-agent.texi: Change allow-mark-trusted doc to
32419             no-allow-mark-trusted.
32420
32421             --
32422             Since rev. 78a56b14 allow-mark-trusted is the default option
32423             and was replaced by no-allow-mark-trusted to disable the
32424             interactive prompt.
32425
32426 2014-12-05  NIIBE Yutaka  <gniibe@fsij.org>
32427
32428         scd: Fix for NIST P-256.
32429         + commit 8720125f5a283ede34e52c2493b8a9b0226ae62c
32430         * g10/card-util.c (card_store_subkey): Error check.
32431         * scd/app-opengpg.c (ecc_writekey): Support NIST P-256.
32432         (do_writekey): Error check.
32433
32434 2014-12-04  Werner Koch  <wk@gnupg.org>
32435
32436         gpg: Allow import of large keys.
32437         + commit 63e7891f0f9f0228d93c6cd979fbf2797da2b67d
32438         * g10/import.c (import): Skip too large keys.
32439         * kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 2MB to 5MB.
32440
32441 2014-12-03  Werner Koch  <wk@gnupg.org>
32442
32443         gpg: Remove option aliases --[no-]throw-keyid and --notation-data.
32444         + commit 17b4662984b4669d8dcbbd6705ccfbe6c263319c
32445         * g10/gpg.c (opts): Remove them.
32446         * g10/options.h (opt): s/throw_keyid/throw_keyids/ and change users.
32447
32448 2014-12-02  Werner Koch  <wk@gnupg.org>
32449
32450         agent: Replace some sprintf.
32451         + commit fabcf1440a6900b9471f11e4f2a015e9f2d1a74c
32452         * agent/call-scd.c (agent_card_pksign): Replace sprintf by bin2hex.
32453         * agent/command-ssh.c (ssh_identity_register): Ditto.
32454         * agent/pkdecrypt.c (agent_pkdecrypt): Replace sprintf by
32455         put_membuf_printf.
32456
32457 2014-12-01  Werner Koch  <wk@gnupg.org>
32458
32459         tools: Improve watchgnupg portability.
32460         + commit 0367a4b8cfbf1f197e093ca2b83b27e0a409c3c7
32461         * configure.ac (AC_CHECK_HEADERS): Check for sys.select.h
32462         * tools/watchgnupg.c: Include it.
32463
32464         gpg: Fix export bug using exact search with only one key in the keybox.
32465         + commit f1c3eb4b16ca43b5d3712a3b54c22d17ce85af47
32466         * g10/export.c (do_export_stream): Disable caching.
32467         * g10/keyserver.c (keyidlist): Ditto.
32468
32469         scd: Implement socket redirection.
32470         + commit 2f90b7c21b2f84ca2bf5f4555da9233e84606b4e
32471         * scd/scdaemon.c (ENAMETOOLONG): New.
32472         (redir_socket_name): New.
32473         (cleanup): Take care of a redirected socket.
32474         (main): Pass redir_socket_name to create_server_socket.
32475         (create_socket_name): Remove superfluous length check.
32476         (create_server_socket): Add arg r_redir_name and implement
32477         redirection.  Replace assert for older Assuan by an error message.
32478
32479         dirmngr: Implement socket redirection.
32480         + commit eede0e59bf6281777da7391752ae4191f3e51204
32481         * dirmngr/dirmngr.c (ENAMETOOLONG): new.
32482         (redir_socket_name): New.
32483         (main): Add Assuan socket redirection.
32484         (cleanup): Adjust cleanup for redirection.
32485
32486 2014-11-28  Werner Koch  <wk@gnupg.org>
32487
32488         agent: Implement socket redirection.
32489         + commit e1f515b19c7f63b6d0b0253319b9fc41dabed657
32490         * agent/gpg-agent.c (ENAMETOOLONG): New.
32491         (redir_socket_name, redir_socket_name_extra)
32492         (redir_socket_name_ssh): New.
32493         (remove_socket): Take care of the redir names.
32494         (main): Pass the redir names to create_server_socket.
32495         (create_socket_name): Remove length check - that is anyway done later.
32496         (create_server_socket): Add arg r_redir_name and implement redirection
32497         if Libassuan is at least 2.14.
32498
32499         gpg: Change another BUG() call to a regular error message.
32500         + commit e59b1cc7471dd161a627b290c645ef7bd0d9d42c
32501         * g10/mainproc.c (proc_tree): Replace BUG by a proper error messages.
32502
32503         Add option --no-autostart.
32504         + commit 7aee3579be6e24a1aa280e75615fc3a11ceef960
32505         * g10/gpg.c: Add option --no-autostart.
32506         * sm/gpgsm.c: Ditto.
32507         * g10/options.h (opt): Add field autostart.
32508         * sm/gpgsm.h (opt): Ditto.
32509         * g10/call-agent.c (start_agent): Print note if agent was not
32510         autostarted.
32511         * sm/call-agent.c (start_agent): Ditto.
32512         * g10/call-dirmngr.c (create_context): Likewise.
32513         * sm/call-dirmngr.c (start_dirmngr_ext): Ditto.
32514
32515 2014-11-27  Мирослав Николић  <wk@gnupg.org>
32516
32517         gpg-agent: Add restricted connection feature.
32518         + commit f173cdcdfbfd083b035516a406c2c754f38a0ace
32519         * agent/agent.h (opt): Add field extra_socket.
32520         (server_control_s): Add field restricted.
32521         * agent/command.c: Check restricted flag on many commands.
32522         * agent/gpg-agent.c (oExtraSocket): New.
32523         (opts): Add option --extra-socket.
32524         (socket_name_extra): New.
32525         (cleanup): Cleanup that socket name.
32526         (main): Implement oExtraSocket.
32527         (create_socket_name): Add arg homedir and change all callers.
32528         (create_server_socket): Rename arg is_ssh to primary and change
32529         callers.
32530         (start_connection_thread): Take ctrl as arg.
32531         (start_connection_thread_std): New.
32532         (start_connection_thread_extra): New.
32533         (handle_connections): Add arg listen_fd_extra and replace the
32534         connection starting code by parameterized loop.
32535         * common/asshelp.c (start_new_gpg_agent): Detect the use of the
32536         restricted mode and don't fail on sending the pinentry environment.
32537
32538         * common/util.h (GPG_ERR_FORBIDDEN): New.
32539
32540         agent: Make auditing of the option list easier.
32541         + commit ccee34736b57a42ec4bdcb0d3181bdc6a08b0fff
32542         * agent/gpg-agent.c (opts): Use ARGPARSE_ macros.
32543
32544 2014-11-26  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
32545
32546         dirmngr: Only report hkps scheme when available.
32547         + commit 68a7ccc0c870cce6ab9fefb1aa6fd100e1de129b
32548         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Make use of TLS macros.
32549
32550 2014-11-26  Werner Koch  <wk@gnupg.org>
32551
32552         gpg: Change a bug() call to a regular error message.
32553         + commit 1c2140346d6ef9c35e303099d2d15be57869b4d5
32554         * g10/decrypt-data.c (decrypt_data): Return an error code instead of
32555         calling BUG().
32556
32557 2014-11-25  Werner Koch  <wk@gnupg.org>
32558
32559         Fix buffer overflow in openpgp_oid_to_str.
32560         + commit 8445ef24fc31e1fe0291e17f90f9f06b536e34da
32561         * common/openpgp-oid.c (openpgp_oid_to_str): Fix unsigned underflow.
32562
32563         * common/t-openpgp-oid.c (BADOID): New.
32564         (test_openpgp_oid_to_str): Add test cases.
32565
32566 2014-11-24  Werner Koch  <wk@gnupg.org>
32567
32568         gpg: Fix use of uninit.value in listing sig subpkts.
32569         + commit 596ae9f5433ca3b0e01f7acbe06fd2e424c42ae8
32570         * g10/parse-packet.c (dump_sig_subpkt): Print regex subpacket
32571         sanitized.
32572
32573         gpg: Fix off-by-one read in the attribute subpacket parser.
32574         + commit 0988764397f99db4efef1eabcdb8072d6159af76
32575         * g10/parse-packet.c (parse_attribute_subpkts): Check that the
32576         attribute packet is large enough for the subpacket type.
32577
32578         gpg: Fix batch generation of ECC keys.
32579         + commit b716e6a69919b89c7887d6c7c9b97e58d18fdf95
32580         * g10/keygen.c (get_parameter_algo): Map ECC algorithm strings
32581         directly.
32582
32583 2014-11-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
32584
32585         Distinguish between ARGPARSE_AMBIGUOUS_{OPTION,COMMAND}
32586         + commit eed16ccebf8fd1fdf9709affbd5c831f6957b8ae
32587         * common/argparse.c (initialize): Use correct value.
32588
32589         gpg: Refer to --throw-keyids instead of --throw-keyid.
32590         + commit a3cf781e3bc144aff60e007b9ba59bff7b1b2c9e
32591         * g10/encrypt.c: adjust error message
32592
32593 2014-11-21  Werner Koch  <wk@gnupg.org>
32594
32595         gpg: Track number of skipped v3 keys on import.
32596         + commit 44c9cc18968b3e1d7568ec41ebf28a07285c61bb
32597         * g10/import.c (stats_s): Add field v3keys.
32598         (import): Update this field.
32599         (import_print_stats): Print v3 key count.
32600         (read_block): Skip v3 keys and return a count for them.
32601
32602         gpg: Fix regression in parse_key.
32603         + commit 94a54425144e412bc83e44b7c6323282f49f650f
32604         * g10/parse-packet.c (parse): Better return just the gpg_err_code.
32605         (parse_key): Return the error code.
32606
32607         speedo: Add simple logos to the installer.
32608         + commit 9a85b91e925ac0798d56820353bf5858b212277f
32609         * build-aux/speedo/w32/README.txt: Include GnuPG Readme.
32610         * build-aux/speedo/w32/gnupg-logo-150x57.bmp: New.
32611         * build-aux/speedo/w32/gnupg-logo-164x314.bmp: New.
32612         * build-aux/speedo/w32/inst.nsi: Add logos.
32613         * build-aux/speedo.mk ($(bdir)/NEWS.tmp): Extract news items.
32614
32615 2014-11-20  Werner Koch  <wk@gnupg.org>
32616
32617         gpg: Fix hash detection for ECDSA.
32618         + commit f80c2dd78d522f12b2c7afbd5c0763a97d87d2bd
32619         * g10/sign.c (sign_file): Use DSA or ECDSA and not DSA|EdDSA.
32620
32621         Fix linker problem on OS X.
32622         + commit cd2c6f36fe5d1d1d45546f5168aead5cbe6487e0
32623         * common/init.c (default_errsource): Move to the .data segmemt.
32624
32625 2014-11-19  Werner Koch  <wk@gnupg.org>
32626
32627         gpg-connect-agent: Add convenience option --uiserver.
32628         + commit 164a6a9dd4af26668dd0d01061688bf1ceff44bf
32629
32630
32631         Add "gpgconf --kill dirmngr" and avoid useless launch before a kill.
32632         + commit 0e7dd40342bd56810c27db1c38c1928f56f43bfd
32633         * common/asshelp.c (start_new_gpg_agent): Add arg autostart.  Change
32634         all callers to use 1 for it.
32635         (start_new_dirmngr): Ditto.
32636         * tools/gpg-connect-agent.c: Add option --no-autostart.
32637         (main): Default autostart to 1.
32638         (start_agent): Implement no-autostart.
32639         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Use --no-autostart.
32640         (scdaemon_runtime_change): Ditto.
32641         (dirmngr_runtime_change): New.
32642
32643         po: Copied missing translations from the 2.0 branch.
32644         + commit 329ece46bf83871f01eb833d5ebec6da36bfcce0
32645         * po/LINGUAS: Add new translations.
32646
32647 2014-11-17  Werner Koch  <wk@gnupg.org>
32648
32649         gpg: Fix a NULL-deref for invalid input data.
32650         + commit 32e85668b82f6fbcb824eea9548970804fb41d9e
32651         * g10/mainproc.c (proc_encrypted): Take care of canceled passpharse
32652         entry.
32653
32654 2014-11-13  Werner Koch  <wk@gnupg.org>
32655
32656         gpg: Make the use of "--verify FILE" for detached sigs harder.
32657         + commit 69384568f66a48eff3968bb1714aa13925580e9f
32658         * g10/openfile.c (open_sigfile): Factor some code out to ...
32659         (get_matching_datafile): new function.
32660         * g10/plaintext.c (hash_datafiles): Do not try to find matching file
32661         in batch mode.
32662         * g10/mainproc.c (check_sig_and_print): Print a warning if a possibly
32663         matching data file is not used by a standard signatures.
32664
32665         gpg: Fix a missing LF in debug output.
32666         + commit 22748338da9a78d20aefe3656ba40b0f9d34a681
32667         * g10/kbnode.c (dump_kbnode): Print a LF.
32668
32669         gpg: Remove PGP-2 related cruft.
32670         + commit e30cb8f61792e3808f7c8f343fc8545e6c81fe74
32671         * g10/armor.c (parse_hash_header,carmor_filter): Ignore MD5 in hash
32672         header.
32673         (fake_packet): Remove pgp-2 workaround for white space stripping.
32674         * g10/filter.h (armor_filter_context_t): Remove field pgp2mode.
32675         * g10/options.h (opt): Remove field pgp2_workarounds.
32676         * g10/gpg.c (main): Do not set this field.
32677         * g10/gpgv.c (main): Ditto.
32678         * g10/mainproc.c (proc_encrypted): Use SHA-1 as fallback s2k hash
32679           algo.  Using MD5 here is useless.
32680         (proc_plaintext): Remove PGP-2 related woraround
32681         (proc_tree): Remove another workaround but keep the one for PGP-5.
32682
32683 2014-11-12  Werner Koch  <wk@gnupg.org>
32684
32685         gpg: Improve perceived speed of secret key listings.
32686         + commit 81e177be10273885573f5d1fd88a1ee23479f4ab
32687         * g10/keylist.c (list_keyblock): Flush stdout for secret keys.
32688
32689         gpg: Fix regression in --refresh-keys.
32690         + commit eecbed004ca1e9ca23c3892c3a5e6dd174ddf93b
32691         * g10/keyserver.c (keyserver_get): Factor all code out to ...
32692         (keyserver_get_chunk): new.  Extimate line length.
32693         (keyserver_get): Split up requests into chunks.
32694
32695         gpg: Add import options "keep-ownertrust".
32696         + commit ffc2307843ce6c4ac3c8d99ba8c70ffa1ae28e39
32697         * g10/options.h (IMPORT_KEEP_OWNERTTRUST): New.
32698         * g10/import.c (parse_import_options): Add "keep-ownertrust".
32699         (import_one): Act upon new option.
32700
32701 2014-11-11  Werner Koch  <wk@gnupg.org>
32702
32703         Remove use of gnulib (part 2)
32704         + commit b8cdfac353ad96d4ef025c066c16dbde34805661
32705         * configure.ac (strpbrk): Add to AC_CHECK_FUNCS.
32706         (gl_EARLY): Remove.
32707         * common/stringhelp.c (strpbrk) [!HAVE_STRPBRK]: New.
32708         * common/sysutils.c (gnupg_mkdtemp): New.  Based on code from
32709         glibc-2.6.
32710         (gnupg_setenv): Rewrite.
32711         (gnupg_unsetenv): Rewrite.
32712         * g10/exec.c: Include sysutils.h and replace mkdtemp by gnupg_mkdtemp.
32713         * g13/be-encfs.c: Ditto.
32714         * g13/mount.c: Ditto.
32715         * tools/symcryptrun.c (confucius_mktmpdir): Ditto.
32716
32717         Remove use of gnulib (part 1)
32718         + commit 1adf719b2d8e2d5b912bf6655731e7e586402654
32719         * gl/: Remove entire tree.
32720         * configure.ac: Remove gnulib tests and the gl/ Makefile.
32721         (setenv): Add to AC_CHECK_FUNCS.
32722         * autogen.rc (extra_aclocal_flags): Set to empty.
32723         * Makefile.am (ACLOCAL_AMFLAGS): Remove -I gl/m4
32724         (SUBDIRS): Remove gl/.
32725         * agent/Makefile.am (common_libs): Remove ../gl/gnulib.a
32726         * common/Makefile.am (t_common_ldadd): Ditto.
32727         * dirmngr/Makefile.am (dirmngr_LDADD): Ditto.
32728         (dirmngr_ldap_LDADD, dirmngr_client_LDADD): Ditto.
32729         * g10/Makefile.am (needed_libs): Ditto.
32730         * g13/Makefile.am (g13_LDADD): Ditto.
32731         * kbx/Makefile.am (kbxutil_LDADD): Ditto.
32732         ($(PROGRAMS)): Ditto.
32733         * scd/Makefile.am (scdaemon_LDADD): Ditto.
32734         * sm/Makefile.am (common_libs): Ditto.
32735         * tools/Makefile.am (common_libs, commonpth_libs): Ditto.
32736
32737         * agent/gpg-agent.c: Remove "mkdtemp.h"
32738         * g10/exec.c: Ditto.
32739         * scd/scdaemon.c: Ditto.
32740         * tools/symcryptrun.c: Ditto.
32741         * common/sysutils.c: Remove "setenv.h"
32742
32743         * common/t-timestuff.c: Use putenv if setenv is not available.
32744
32745 2014-11-07  Werner Koch  <wk@gnupg.org>
32746
32747         gpg: Remove warning message for non-implemented search modes.
32748         + commit 7362c8c6e60939588e817384ae2e29195cb3f518
32749         * kbx/keybox-search.c (keybox_search): Silently ignore.
32750         * doc/specify-user-id.texi: Docuement '@", '+', and '.' search
32751         prefixes.
32752
32753         w32: Fix http access module.
32754         + commit f0f5cb6b3e525f696b8820c517190e1d84f3b885
32755         * common/http.c (write_server) [W32]: Rework to use send() instead of
32756         write even when build with npth.
32757         (cookie_read) [W32]: Rework to use recv() instead of read even when
32758         build with npth.
32759
32760         build: Add method to use a custom swdb.lst and use adns with Windows.
32761         + commit c7c79e31937e2d2fdb4042641786c229e31fbfae
32762         * build-aux/getswdb.sh: Add option --skip-verify.
32763         * build-aux/speedo.mk: Add config var CUSTOM_SWDB.  Tage adns version
32764         from swdb and build for Windows with adns.
32765
32766         build: Improve test for ADNS.
32767         + commit f7e1be24c8fcf588d4e48aa53a85b22bd035e3b0
32768         * configure.ac <adns>: Use adns_free as probe function for libadns.
32769         (HAVE_ADNS_FREE): Remove bogus tests to set this and remove the macro.
32770         (ADNSLIBS): Do not ac_subst - it is only used within configure.
32771
32772 2014-11-05  Werner Koch  <wk@gnupg.org>
32773
32774         speedo: Append the date to the Windows installer.
32775         + commit 8ec0b384a86bd7f67a60ab43ff1540e80c3f729d
32776         * build-aux/speedo.mk (BUILD_DATESTR): New.
32777         (dist-source, installer): Use it.
32778
32779         Release 2.1.0.
32780         + commit e22b459b910762f77245283746de34c67ebc72da
32781
32782
32783         Avoid sign extension when shifting the MSB.
32784         + commit 91b826a38880fd8a989318585eb502582636ddd8
32785         * sm/fingerprint.c (gpgsm_get_short_fingerprint): Cast MSB before
32786         shifting.
32787         * g10/build-packet.c (delete_sig_subpkt): Ditto.
32788
32789 2014-11-04  Werner Koch  <wk@gnupg.org>
32790
32791         Remove all expired common CA certificates.
32792         + commit 46fa1e0fe9f7407f12aa854e5cdb54624af3e89b
32793         * doc/com-certs.pem: Remove certifciates.
32794
32795 2014-11-02  Werner Koch  <wk@gnupg.org>
32796
32797         gpg: Avoid extra pinentries for each subkey in --export-secret-keys.
32798         + commit f8c993fbe28bf02f1d7aadec823a9dfc935398fa
32799         * agent/command.c (cmd_export_key): Actually implement the cache_nonce
32800         feature.
32801         * g10/export.c (do_export_stream): Make use of a cache_nonce.
32802
32803         gpg: Fix endless loop in keylisting with fingerprint.
32804         + commit d95f05c314adfecbe0af9073f964030010442f9b
32805         * g10/getkey.c (getkey_next): Disable cache.
32806
32807         gpg: Minor cleanup for key listing related code.
32808         + commit 440e8f517008107a9fe1b72cb659b97b7d840de6
32809         * g10/getkey.c (get_pubkey_next): Divert to getkey_next.
32810         (get_pubkey_end): Move code to getkey_end.
32811         * g10/keydb.c (keydb_search_reset): Add a debug statement.
32812         (dump_search_desc): Add arg HD and print the handle.
32813
32814         gpg: Do not show an useless passphrase prompt in batch mode.
32815         + commit a929f36693567e57eca89fb48f23cada8ce7291a
32816         * g10/keygen.c: Remove unused PASSPHRASE related code.
32817         (proc_parameter_file): Remove useless asking for a passphrase in batch
32818         mode.
32819
32820 2014-10-31  Werner Koch  <wk@gnupg.org>
32821
32822         gpg: Remove superfluous check for Libgcrypt >= 1.4.0.
32823         + commit f4df71aa2d544ec46a2ded3055ffb21b9842129e
32824         * g10/gpg.c (main): Remove check.
32825
32826         kbx: Let keydb_search skip unwanted blobs.
32827         + commit 935edf88ab29b2f63afc2a0e3af1b33c92033ab7
32828         * kbx/keybox.h (keybox_blobtype_t): New.
32829         * kbx/keybox-defs.h (BLOBTYPE_*): Replace by KEYBOX_BLOBTYPE_*.
32830         * kbx/keybox-search.c (keybox_search): Add arg want_blobtype and skip
32831         non-matching blobs.
32832         * sm/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_X509 to keybox_search.
32833         * g10/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_PGP to keybox_search.
32834
32835         gpg: Fix --rebuild-keydb-caches.
32836         + commit 28ae8ad70b3b802e67344468a4765eee6e291c68
32837         * g10/parse-packet.c (parse_key): Store even unsupported packet
32838         versions.
32839         * g10/keyring.c (keyring_rebuild_cache): Do not copy keys with
32840         versions less than 4.
32841
32842         gpg: Fix testing for secret key availability.
32843         + commit 433208a5536608c2b40525eebadbbdeb7780d7f2
32844         * g10/getkey.c (have_secret_key_with_kid): Do not change the search
32845         mode.
32846
32847         build: Avoid distributing backup files etc.
32848         + commit b47fe2b14e2a610706bdeff9dbd9a5f7bd6f6b3a
32849         * Makefile.am (EXTRA_DIST): Do not include directories.
32850
32851 2014-10-30  Werner Koch  <wk@gnupg.org>
32852
32853         tests: Speed up the genkey1024.test by using not so strong random.
32854         + commit 9546aa3cc87fc83a40768a12fbbceb19496ce129
32855         * agent/gpg-agent.c (oDebugQuickRandom): New.
32856         (opts): New option --debug-quick-random.
32857         (main): Use new option.
32858         * common/asshelp.c (start_new_gpg_agent): Add hack to pass an
32859         additional argument for the agent name.
32860         * tests/openpgp/defs.inc: Pass --debug-quick-random to the gpg-agent
32861         starting parameters.
32862         * tests/openpgp/version.test: Ditto.
32863
32864 2014-10-29  Werner Koch  <wk@gnupg.org>
32865
32866         common: Check option arguments for a valid range.
32867         + commit 0d73a242cb53522669cf712b5ece7d1ed05d003a
32868         * common/argparse.h (ARGPARSE_INVALID_ARG): New.
32869         * common/argparse.c: Include limits h and errno.h.
32870         (initialize): Add error strings for new error constant.
32871         (set_opt_arg): Add range checking.
32872
32873         Fix stdint.h problem for Apple.
32874         + commit f5592fcff308007322a201c970a6d5e8763c9fe3
32875         * gl/stdint_.h [__APPLE__]: Include hack.
32876
32877 2014-10-27  Werner Koch  <wk@gnupg.org>
32878
32879         speedo: Fixes for native build.
32880         + commit 158fe900183daf745821dea7a70cf1c673cd8de0
32881         * build-aux/speedo.mk (TARGETOS): Init with empty string.
32882         (speedo_pkg_gnupg_configure): Use --enable-gpg2-is-gpg only for w32.
32883         (INST_VERSION, INST_PROD_VERSION): Create only for w32.
32884
32885 2014-10-24  Werner Koch  <wk@gnupg.org>
32886
32887         agent: Support pinentries with integrated repeat passphrase feature.
32888         + commit c9aadcb3a248632c07391ff3d829bece9320a901
32889         * agent/agent.h (struct pin_entry_info_s): Add fields repeat_okay and
32890         with_repeat.
32891         * agent/call-pinentry.c (close_button_status_cb): Rewrite and check
32892         for PIN_REPEAT.  Change users to check only the relevant bit.
32893         (agent_askpin): Support repeat logic of new Pinentries.
32894
32895         * agent/command-ssh.c (ssh_identity_register): Use the new repeat
32896         feature.
32897         * agent/genkey.c (agent_ask_new_passphrase): Ditto.
32898
32899 2014-10-19  Werner Koch  <wk@gnupg.org>
32900
32901         gpg: Silence "packet with obsolete versoin" warnings.
32902         + commit 472a4a0d82add2d17154fa38e0074eaea56c28c1
32903         * g10/parse-packet.c (parse_key): Print warning only in very verbose
32904         mode.
32905
32906         gpg: Make card key generation work again.
32907         + commit 1b8decc4767f0c55867327bdf3113204efcd19a7
32908         * g10/call-agent.c (agent_scd_learn): Rename from agent_learn.
32909         (agent_learn): New.
32910         * g10/keygen.c (gen_card_key): Call new agent-learn.
32911
32912 2014-10-17  Werner Koch  <wk@gnupg.org>
32913
32914         dirmngr: Allow building without LDAP support.
32915         + commit 6d9491842d5da597980eaa59e1e3e2137965fe09
32916         * configure.ac: Add option --disable-ldap.
32917         (USE_LDAP): New ac_define and am_conditional.
32918         * dirmngr/Makefile.am: Take care of USE_LDAP.
32919         * dirmngr/dirmngr.c (!USE_LDAP): Make all ldap options dummy options
32920         and do not call any ldap function.
32921         * dirmngr/server.c (!USE_LDAP): Do not call any ldap function.
32922         * dirmngr/crlfetch.c (!USE_LDAP): Ditto.
32923
32924         w32: Set SYSROOT to help finding config scripts.
32925         + commit a13705f4c18db56765f4af31376e81241dbabebe
32926         * autogen.sh <build-w32>: Set SYSROOT.
32927
32928         gpg: Remove all support for v3 keys and always create v4-signatures.
32929         + commit 8fd150b05b744fe9465057c12529d5e6b6b02785
32930         * g10/build-packet.c (do_key): Remove support for building v3 keys.
32931         * g10/parse-packet.c (read_protected_v3_mpi): Remove.
32932         (parse_key): Remove support for v3-keys.  Add dedicated warnings for
32933         v3-key packets.
32934         * g10/keyid.c (hash_public_key): Remove v3-key support.
32935         (keyid_from_pk): Ditto.
32936         (fingerprint_from_pk): Ditto.
32937
32938         * g10/options.h (opt): Remove fields force_v3_sigs and force_v4_certs.
32939         * g10/gpg.c (cmd_and_opt_values): Remove oForceV3Sigs, oNoForceV3Sigs,
32940         oForceV4Certs, oNoForceV4Certs.
32941         (opts): Turn --force-v3-sigs, --no-force-v3-sigs, --force-v4-certs,
32942         --no-force-v4-certs int dummy options.
32943         (main): Remove setting of the force_v3_sigs force_v4_certs flags.
32944         * g10/revoke.c (gen_revoke, create_revocation): Always create v4 certs.
32945         * g10/sign.c (hash_uid): Remove support for v3-signatures
32946         (hash_sigversion_to_magic): Ditto.
32947         (only_old_style): Remove this v3-key function.
32948         (write_signature_packets): Remove support for creating v3-signatures.
32949         (sign_file): Ditto.
32950         (sign_symencrypt_file): Ditto.
32951         (clearsign_file): Ditto.  Remove code to emit no Hash armor line if
32952         only v3-keys are used.
32953         (make_keysig_packet): Remove arg SIGVERSION and force using
32954         v4-signatures.  Change all callers to not pass a value for this arg.
32955         Remove all v3-key related code.
32956         (update_keysig_packet): Remove v3-signature support.
32957         * g10/keyedit.c (sign_uids): Always create v4-signatures.
32958
32959         * g10/textfilter.c (copy_clearsig_text): Remove arg pgp2mode and
32960         change caller.
32961
32962 2014-10-13  Werner Koch  <wk@gnupg.org>
32963
32964         gpg: Remove extra RSA import status line.
32965         + commit fab89f159bcb36ea7285af661d5756eefa981822
32966         * g10/import.c (stats_s): Remove field "imported_rsa".
32967         (import_print_stats): Do not print separate value for RSA.
32968         (import_one): Remove the RSA counter.
32969
32970         gpg: Fix informative printing of user ids.
32971         + commit 21c0ea6bafafbcc4a2e07f0ac76275cc0229e9a0
32972         * g10/getkey.c (keyid_list): Add field "fpr".
32973         (cache_user_id): Store fpr and check for dups only by fpr.
32974         (get_pubkey_byfpr): New.
32975         (get_user_id_string): Make static and use xasprintf.
32976         (get_long_user_id_string): Use xasprintf.
32977         (get_user_id_byfpr): New.
32978         (get_user_id_byfpr_native): New.
32979         * g10/keyid.c (fingerprint_from_pk): Make arg RET_LEN optional.
32980         * g10/import.c (import_one): Use get_user_id_byfpr_native.
32981
32982         gpg: Allow importing keys with duplicated long key ids.
32983         + commit c60814a5ce13932d933b363abc0c60c12783ae2f
32984         * g10/keydb.c (keydb_handle): Add field no_caching.
32985         (keyblock_cache): Repalce field kid by fpr.
32986         (keydb_disable_caching): New.
32987         (keydb_search): Use the fingerprint as cache index.
32988
32989         * g10/import.c (import_one): Use the fingerprint and not the kid to
32990         lookup the key.  Call keydb_disable_caching beofre re-searching for
32991         update.
32992
32993         * tests/openpgp/import.test: Add a test case.
32994
32995         tests: Speed up conventional encryption tests for gpg.
32996         + commit 2543f0ab9c7b4247347688863f898667bae31984
32997         * tests/openpgp/conventional-mdc.test: Add an s2k-count option.
32998         * tests/openpgp/conventional.test: Ditto.
32999
33000 2014-10-12  Werner Koch  <wk@gnupg.org>
33001
33002         gpg: Minor change for better readability.
33003         + commit 2d68dc437e7de92619abe3a019b0a7606487b6bf
33004         * g10/build-packet.c (write_version): Remove.
33005         (do_pubkey_enc, do_onepass_sig): Write version directly.
33006
33007 2014-10-10  Werner Koch  <wk@gnupg.org>
33008
33009         doc: Fix a man page rendering problem.
33010         + commit 5b5e5a6027ae1743719e112aa4e9055f1b8133a7
33011         * doc/gpg-agent.texi (Agent Configuration): Fix rendering of the
33012         sshcontrol example.
33013
33014 2014-10-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
33015
33016         gpg: Add build and runtime support for larger RSA keys.
33017         + commit 6cabb7a2a18f871b8c3d5de58bcdc5aaa5b201af
33018         * configure.ac: Added --enable-large-secmem option.
33019         * g10/options.h: Add opt.flags.large_rsa.
33020         * g10/gpg.c: Contingent on configure option: adjust secmem size,
33021         add gpg --enable-large-rsa, bound to opt.flags.large_rsa.
33022         * g10/keygen.c: Adjust max RSA size based on opt.flags.large_rsa
33023         * doc/gpg.texi: Document --enable-large-rsa.
33024
33025 2014-10-09  Werner Koch  <wk@gnupg.org>
33026
33027         gpg: Skip overlong keys and a print a warning.
33028         + commit 2ca90f78cee91c43b8d538d1cb92728f8e1452d5
33029         * kbx/keybox-search.c (keybox_search): Add arg r_skipped and skip too
33030         long blobs.
33031         * sm/keydb.c (keydb_search): Call keybox_search with a dummy param.
33032         * g10/keydb.c (struct keydb_handle): Add field skipped_long_blobs.
33033         (keydb_search_reset): Reset that field.
33034         (keydb_search): Update that field.
33035         (keydb_get_skipped_counter): New.
33036         * g10/keylist.c (list_all): Print count of skipped keys.
33037
33038         gpg: Sync keylist output and warning messages.
33039         + commit 60e21d8b85888b8c9ea15c70268f98d780fdf5fb
33040         * g10/keylist.c (list_all): Flush stdout before logging.
33041         * g10/misc.c (print_pubkey_algo_note): Ditto.
33042         (print_cipher_algo_note): Ditto.
33043         (print_digest_algo_note): Ditto.
33044         (print_md5_rejected_note): Ditto.
33045
33046         kbx: Fix handling of overlong keys.
33047         + commit b6507bb80e4e4aa5c85a918fdcf5c28cccb75081
33048         * kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 10^6 to 2MiB.
33049         (_keybox_read_blob2): Skip too long record records.
33050         (_keybox_write_blob): Do not accept too long record.
33051         * kbx/keybox-dump.c (file_stats_s): Add field skipped_long_blobs.
33052         (_keybox_dump_file): Print new counter.
33053         (_keybox_dump_file): Skip too long records.
33054         ----
33055
33056         To test this feature you may set the limit back to 1MiB and use key
33057         F7F0E70F307D56ED which is in my local copy close to 2MiB.  Without
33058         this patch it was possible to import the key but access to that key
33059         and all keys stored after it was not possible.
33060
33061         gpg: Take care to use pubring.kbx if it has ever been used.
33062         + commit ec332d58efc50f6508b87fc9f51db68c39cee044
33063         * kbx/keybox-defs.h (struct keybox_handle): Add field for_openpgp.
33064         * kbx/keybox-file.c (_keybox_write_header_blob): Set openpgp header
33065         flag.
33066         * kbx/keybox-blob.c (_keybox_update_header_blob): Add arg for_openpgp
33067         and set header flag.
33068         * kbx/keybox-init.c (keybox_new): Rename to do_keybox_new, make static
33069         and add arg for_openpgp.
33070         (keybox_new_openpgp, keybox_new_x509): New.  Use them instead of the
33071         former keybox_new.
33072         * kbx/keybox-update.c (blob_filecopy): Add arg for_openpgp and set the
33073         openpgp header flags.
33074
33075         * g10/keydb.c (rt_from_file): New.  Factored out and extended from
33076         keydb_add_resource.
33077         (keydb_add_resource): Switch to the kbx file if it has the openpgp
33078         flag set.
33079
33080         * kbx/keybox-dump.c (dump_header_blob): Print header flags.
33081
33082 2014-10-09  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
33083
33084         Avoid unnecessary library linkage.
33085         + commit 27fe067efea883629354450a042ad09e47d90ff8
33086         * dirmngr/Makefile.am: Avoid $(DNSLIBS) for dirmngr_ldap
33087         * g10/Makefile.am: $(LIBREADLINE) is only for gpg2; gpgv2 does not
33088         need $(LIBASSUAN_LIBS)
33089         * sm/Makefile.am: gpgsm does not need $(ZLIBS)
33090         * tools/Makefile.am: gpgconf does not need $(NPTH_LIBS)
33091
33092 2014-10-08  Werner Koch  <wk@gnupg.org>
33093
33094         gpg: Avoid error exit if keygrip computations fails in a key listing.
33095         + commit 3ae6afc1336d42bd95fa0b7f5f83bd299ae26b97
33096         * g10/keyid.c (keygrip_from_pk): Use log_info and clear array on error.
33097
33098 2014-10-03  Werner Koch  <wk@gnupg.org>
33099
33100         Release 2.1.0-beta864.
33101         + commit 0943c7cc23371943e9670a2f35c318d847cbac6a
33102
33103
33104         gpg: Allow creating a cert-only primary key.
33105         + commit bc8583f247898a1fa45f6de834d34b335ab1952c
33106         * g10/keygen.c (ask_key_flags): Allow a 'c' in direct entry.
33107
33108         build: Add configure options --disable-{ntb,gnu}tls.
33109         + commit 6522a68d8d11e15ee77102e6830f251c2d9f440d
33110         * configure.ac: Add --disable-ntbtls and --disable-gnutls.
33111
33112 2014-10-03  Andre Heinecke  <aheinecke@intevation.de>
33113
33114         gpg: Check gpg-agent version before 2.1 migration.
33115         + commit a6fcdbc9e0fc0e45a3badc23813e689e83059b61
33116         * g10/call-agent.c, g10/call-agent.h (agent_get_version): New.
33117         * g10/migrate.c (migrate_secring): Abort migration if
33118         agent_get_version returns not at least 2.1.0
33119
33120 2014-10-03  Werner Koch  <wk@gnupg.org>
33121
33122         po: Update German translation.
33123         + commit b15d5d42adf31c0797797ebe19c471ab6f52c668
33124
33125
33126         Remove support for the GPG_AGENT_INFO envvar.
33127         + commit 9c380384dafb213334f8834178c5ceb0bf33db6e
33128         * agent/agent.h (opt): Remove field use_standard_socket.
33129         * agent/command.c (cmd_killagent): Always allow killing.
33130         * agent/gpg-agent.c (main): Turn --{no,}use-standard-socket and
33131         --write-env-file into dummy options.  Always return true for
33132         --use-standard-socket-p. Do not print the GPG_AGENT_INFO envvar
33133         setting or set that envvar.
33134         (create_socket_name): Simplify by removing non standard socket
33135         support.
33136         (check_for_running_agent): Ditto.
33137         * common/asshelp.c (start_new_gpg_agent): Remove GPG_AGENT_INFO use.
33138         * common/simple-pwquery.c (agent_open): Ditto.
33139         * configure.ac (GPG_AGENT_INFO_NAME): Remove.
33140         * g10/server.c (gpg_server): Do not print the AgentInfo comment.
33141         * g13/server.c (g13_server): Ditto.
33142         * sm/server.c (gpgsm_server): Ditto.
33143         * tools/gpgconf.c (main): Simplify by removing non standard socket
33144         support.
33145
33146 2014-10-02  Werner Koch  <wk@gnupg.org>
33147
33148         gpg: Fix regression removing SHA256.
33149         + commit 688a903b4b3ad348c0d09e9d3fab8a12f4f94311
33150         * g10/misc.c (map_md_openpgp_to_gcry): Always use SHA256.
33151
33152         First changes for future use of NTBTLS.
33153         + commit f2361e6d582d4343d71d294ed1da654afe7750ee
33154         * configure.ac (NEED_NTBTLS_ABI, NEED_NTBTLS_VERSION): New.
33155         (HTTP_USE_NTBTLS): New.  Prefer over GNUTLS.
33156         * m4/ntbtls.m4: New.
33157         * m4/Makefile.am (EXTRA_DIST): Add new file.
33158         * common/http.c: Add conditionals to eventually use NTBTLS.
33159
33160         build: Update m4 scripts.
33161         + commit 6bc0cd6202033be113999dbf27be4014bdf2c784
33162         * m4/gpg-error.m4: Update from Libgpg-error git master.
33163         * m4/libgcrypt.m4: Update from Libgcrypt git master.
33164         * configure.ac: Declare SYSROOT a precious variable.  Add extra error
33165         message for library configuration mismatches.
33166
33167 2014-09-29  Werner Koch  <wk@gnupg.org>
33168
33169         doc: Remove GnuPG-1 related parts from gpg.texi.
33170         + commit edd191e5b006dc6ace1d41672e7201cbe58c41c9
33171         * doc/Makefile.am (YAT2M_OPTIONS): Add 2.1 to the source info.
33172         * doc/gpg.texi: Remove gpg1 related texts.
33173
33174 2014-09-27  Werner Koch  <wk@gnupg.org>
33175
33176         gpg: Default to SHA-256 for all signature types on RSA keys.
33177         + commit d33246700578cddd1cb8ed8164cfbba50aba4ef3
33178         * g10/main.h (DEFAULT_DIGEST_ALGO): Use SHA256 in --gnupg and SHA1 in
33179         strict RFC or PGP modes.
33180         * g10/sign.c (make_keysig_packet): Use DEFAULT_DIGEST_ALGO also for
33181         RSA key signatures.
33182         * configure.ac: Do not allow to disable sha256.
33183
33184         gpg: Simplify command --gen-key and add --full-gen-key.
33185         + commit f3625bb018fa8d5bc754f982996f8788386f0a9d
33186         * g10/gpg.c (aFullKeygen): New.
33187         (opts): Add command --full-key-gen.
33188         (main): Implement it.
33189         * g10/keygen.c (DEFAULT_STD_ALGO): Replace wrong GCRY_PK_RSA although
33190         the value is identical.
33191         (DEFAULT_STD_CURVE): New.
33192         (DEFAULT_STD_SUBALGO): New.
33193         (DEFAULT_STD_SUBKEYSIZE): New.
33194         (DEFAULT_STD_SUBCURVE): New.
33195         (quick_generate_keypair): Use new macros here.
33196         (generate_keypair): Add arg "full" and fix call callers. Do not ask
33197         for keysize in non-full node.
33198         (ask_user_id): Add arg "full" and simplify for non-full mode.
33199
33200 2014-09-26  Werner Koch  <wk@gnupg.org>
33201
33202         gpg: Add shortcut for setting key capabilities.
33203         + commit 7ff4ea2160e87a16bf701552d3b9c7ab1c42f9ec
33204         * g10/keygen.c (ask_key_flags): Add shortcut '='.
33205         * doc/help.txt (gpg.keygen.flags): New.
33206
33207 2014-09-25  Werner Koch  <wk@gnupg.org>
33208
33209         gpg: Do not always print dashes in obsolete_option.
33210         + commit 20c6da50d4f6264d26d113d7de606971f719a0ca
33211         * g10/gpg.c (main): Pass option names to obsolete_option without
33212         double dash.
33213         * g10/misc.c (obsolete_option, obsolete_scdaemon_option): Print double
33214         dash only for command line options.
33215
33216 2014-09-25  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
33217
33218         gpg: Warn about (but don't fail) on scdaemon options in gpg.conf.
33219         + commit 371c2b14b0347209efd23b4e54e1981a12d7aeab
33220         * g10/gpg.c: Add config options that should belong in scdaemon.conf
33221         * g10/main.h, g10/misc.c (obsolete_scdaemon_option): New.
33222
33223 2014-09-22  Werner Koch  <wk@gnupg.org>
33224
33225         speedo: Check that wget and gpgv are installed.
33226         + commit 59b6f6f16e095162358ac2001aeb2c058de2fd1e
33227         * build-aux/getswdb.sh: Check for required tools.
33228
33229         speedo: Autodetect sha1sum tools.
33230         + commit 2427bc5bc76b00cfe790e1f370113f5b4199e8fa
33231         * build-aux/getswdb.sh: Add option --find-sha1sum.
33232         * build-aux/speedo.mk (check-tools): New phony target.  Not yet used.
33233         (SHA1SUM): New var.  Use it instead of sha1sum.
33234
33235         gpg: Create default keyring with .kbx suffix.
33236         + commit bc2f5c1d1afbe8ba413e594639fd05f19df32f75
33237         * g10/keydb.c (maybe_create_keyring_or_box): Rename arg for clarity.
33238         (keydb_add_resource): Fix order of args to maybe_create_keyring_or_box
33239         and check and create .kbx.
33240
33241 2014-09-20  Werner Koch  <wk@gnupg.org>
33242
33243         gpg: --delete-secret-key - check that a secret key exists.
33244         + commit 1d33d03f0bb576601f5eef1a548cbc519f251b17
33245         * g10/delkey.c (do_delete_key): Check availibility of a secret key.
33246
33247         gpg: Make algorithm selection prompt for ECC more clear.
33248         + commit cf648fc5c8cb20bfea4fd303631ba311bbaf3659
33249         * g10/keygen.c (ask_algo): Change 9 to "ECC and ECC".
33250
33251 2014-09-18  Werner Koch  <wk@gnupg.org>
33252
33253         Release 2.1.0-beta834.
33254         + commit 93f158df381af86036332c4314c2d4a64eab3e62
33255
33256
33257         speedo: Distribute needed files.
33258         + commit 72a16d80d4505aa0ff509aae41f848bbe42ed129
33259         * Makefile.am (EXTRA_DIST): Add speedo stuff.
33260
33261         build: Enable gpgtar by default.
33262         + commit 345a8374f31e637a99e6438e527670cf6845ca05
33263
33264
33265         common: Do not build maintainer modules in non-maintainer mode.
33266         + commit 927db789c19cbe5656ff980841ee37dd3a8989e7
33267         * common/Makefile.am (module_maint_tests): Use only in maintainer
33268         mode.
33269         (t_common_cflags): New.
33270
33271         common: Remove superfluous statements.
33272         + commit cad181b5ece3ab6910575c82c731ce2b47271a09
33273         * common/exechelp-posix.c: Remove weak pragmas.
33274         * common/sexputil.c (make_canon_sexp_from_rsa_pk): Remove double
33275         const.
33276
33277         g13: Avoid segv after pipe creation failure.
33278         + commit 6e7bcabd781a3ca9ad7dd90d962fb2a239feab4a
33279         * g13/call-gpg.c (gpg_encrypt_blob): Init some vars in case of an
33280         early error.
33281         (gpg_decrypt_blob): Ditto.
33282
33283         scd: Fix int/short mismatch in format string of app-p15.c.
33284         + commit b17e8bbf20239e840763f98d3e62f16efdc82ba3
33285         * scd/app-p15.c (parse_certid): Use snprintf and cast value.
33286         (send_certinfo): Ditto.
33287         (send_keypairinfo): Ditto.
33288         (do_getattr): Ditto.
33289
33290         agent: Init a local variable in the error case.
33291         + commit f82a6e0f08725008c5bbf702a5f4c175ea09f01c
33292         * agent/pksign.c (do_encode_md): Init HASH on error.
33293
33294         agent: Remove left over debug output.
33295         + commit 4f35ef499ac913036b7b69296a62afe8159b90b8
33296         * agent/command-ssh.c (ssh_signature_encoder_eddsa): Remove debug
33297         output.
33298
33299         agent: Silence compiler warning for a debug message.
33300         + commit ba6f8b3d9ec83b35c4f3839853567491fee2f99c
33301         * agent/call-pinentry.c (agent_query_dump_state): Use %p for
33302         POPUP_TID.
33303
33304         sm: Silence compiler warnings.
33305         + commit 34b2e8c7dcb0edb28f99edbd788d73491334e3c0
33306         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Remove unused var I.
33307         * sm/certreqgen.c (proc_parameters): Init PUBLIC to avoid compiler
33308         warning.
33309
33310         gpg: Silence a compiler warning.
33311         + commit 6a0c3fa19cfcdd590b96691e8a8ffb48fb5e0ec4
33312         * g10/parse-packet.c (enum_sig_subpkt): Replace hack.
33313
33314         gpg: Replace a hash algo test function.
33315         + commit 327134934d79d141d92170ad3b4a6ef3cb718ee0
33316         * g10/gpg.c (print_mds): Replace openpgp_md_test_algo.
33317
33318         speedo: Various fixes.
33319         + commit 2f065d7ab6c514013eb8504281f50284764c26ec
33320         * build-aux/speedo.mk: Take zlib and bzip2 from ftp.gnupg.org.  Minor
33321         other fixes.
33322
33323 2014-09-17  Werner Koch  <wk@gnupg.org>
33324
33325         gpg: Print a warning if the subkey expiration may not be what you want.
33326         + commit ae3d1bbb65b65cf3c57bb14886be120f5e31635d
33327         * g10/keyedit.c (subkey_expire_warning): New.
33328         (keyedit_menu): Call it when needed.
33329
33330         gpg: Improve passphrase caching.
33331         + commit 457bce5cd39146df047e4740162125c32c738789
33332         * agent/cache.c (last_stored_cache_key): New.
33333         (agent_get_cache): Allow NULL for KEY.
33334         (agent_store_cache_hit): New.
33335         * agent/findkey.c (unprotect): Call new function and try to use the
33336         last stored key.
33337
33338         * g10/revoke.c (create_revocation): Add arg CACHE_NONCE and pass to
33339         make_keysig_packet.
33340         (gen_standard_revoke): Add arg CACHE_NONCE and pass to
33341         create_revocation.
33342         * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke with
33343         cache nonce.
33344
33345 2014-09-12  Werner Koch  <wk@gnupg.org>
33346
33347         gpg: Use algorithm id 22 for EdDSA.
33348         + commit 83c2d2396cc9fa6bdd887a560830fc0f48b01b08
33349         * common/openpgpdefs.h (PUBKEY_ALGO_EDDSA): Change to 22.
33350         * g10/keygen.c (ask_curve): Reword the Curve25519 warning note.
33351
33352 2014-09-11  Werner Koch  <wk@gnupg.org>
33353
33354         gpg: Stop early on bogus old style comment packets.
33355         + commit 3d250d21d36e8a0935b645f1ed5134ef9083530e
33356         * g10/parse-packet.c (parse_key): Take care of too short packets for
33357         old style commet packets.
33358
33359 2014-09-10  Werner Koch  <wk@gnupg.org>
33360
33361         dirmngr: Support https for KS_FETCH.
33362         + commit 84419f42da0fd436a9e0e669730157e74ce38b77
33363         * dirmngr/ks-engine-hkp.c (cert_log_cb): Move to ...
33364         * dirmngr/misc.c (cert_log_cb): here.
33365         * dirmngr/ks-engine-http.c (ks_http_fetch): Support 307-redirection
33366         and https.
33367
33368         dirmngr: Fix the ks_fetch command for the http scheme.
33369         + commit 3b20cc21de86ac8a475bdefd3aebb02a12fb8d0b
33370         * common/http.c (http_session_ref): Allow for NULL arg.
33371
33372 2014-09-08  Werner Koch  <wk@gnupg.org>
33373
33374         gpg: Fix memory leak in ECC encryption.
33375         + commit 98f65291d7abecc1e4d618125f33b6ce759e0892
33376         * g10/pkglue.c (pk_encrypt): Fix memory leak and streamline error
33377         handling.
33378
33379 2014-09-02  Werner Koch  <wk@gnupg.org>
33380
33381         gpg: Fix export of NIST ECC keys.
33382         + commit bf2fc12b83b45953f7afa403b8d91c36d0b50ec9
33383         * common/openpgp-oid.c (struct oidtable): New.
33384         (openpgp_curve_to_oid): Rewrite and allow OID as input.
33385         (openpgp_oid_to_curve): Make use of the new table.
33386
33387         agent: Fix import of OpenPGP EdDSA keys.
33388         + commit afe85582ddc2ebc285728bf6417f8929fd0b3281
33389         * agent/cvt-openpgp.c (get_keygrip): Special case EdDSA.
33390         (convert_secret_key): Ditto.
33391         (convert_transfer_key): Ditto.
33392         (apply_protection): Handle opaque MPIs.
33393
33394         (do_unprotect): Check FLAG_OPAQUE instead of FLAG_USER1 before
33395         unpacking an opaque mpi.
33396
33397 2014-09-01  Kyle Butt  <kylebutt@gmail.com>
33398
33399         gpg: Fix export of ecc secret keys by adjusting check ordering.
33400         + commit 4054d86abcb7ad953ed9e988b1765cb9266faefd
33401         * g10/export.c (transfer_format_to_openpgp): Move the check against
33402         PUBKEY_MAX_NSKEY to after the ECC code adjusts the number of
33403         parameters.
33404
33405 2014-09-01  Werner Koch  <wk@gnupg.org>
33406
33407         agent: Allow key unprotection using AES-256.
33408         + commit c913e09ebdbb1a1e9838a0a5897448841f5e9bc3
33409         * agent/protect.c (PROT_CIPHER): Rename to GCRY_CIPHER_AES128 for
33410         clarity.
33411         (do_decryption): Add args prot_cipher and prot_cipher_keylen.  USe
33412         them instead of the hardwired values.
33413         (agent_unprotect): Change to use a table of protection algorithms.
33414         Add AES-256 variant.
33415
33416 2014-08-28  Werner Koch  <wk@gnupg.org>
33417
33418         gpg: Do not show "MD5" and triplicated "RSA" in --version.
33419         + commit be98b5960ebd48929c399b0b91c95bfc0cb9749b
33420         * g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
33421         (build_list_md_test_algo): Ignore MD5.
33422
33423         gpg: Do not show "MD5" and triplicated "RSA" in --version.
33424         + commit 40ad42dbe3c67d8103aedb6b584f4bedc5f93307
33425         * g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
33426         (build_list_md_test_algo): Ignore MD5.
33427
33428 2014-08-26  Werner Koch  <wk@gnupg.org>
33429
33430         gpg: Remove CAST5 from the default prefs and order SHA-1 last.
33431         + commit 15cfd9a3bcdd561091a28c8f989c616b87348463
33432         * g10/keygen.c (keygen_set_std_prefs): Update prefs.
33433
33434         Switch to the libgpg-error provided estream.
33435         + commit 519305feb888b529c005b40445d041a088a2f8fc
33436         * configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14.
33437         (GPGRT_ENABLE_ES_MACROS): Define.
33438         (estream_INIT): Remove.
33439         * m4/estream.m4: Remove.
33440         * common/estream-printf.c, common/estream-printf.h: Remove.
33441         * common/estream.c, common/estream.h: Remove.
33442         * common/init.c (_init_common_subsystems): Call gpgrt initialization.
33443
33444         gpg: Allow for positional parameters in the passphrase prompt.
33445         + commit a731c22952278c12c601b73d7581fda3a15a4b5b
33446         * g10/passphrase.c (passphrase_get): Replace sprintf by xasprintf.
33447
33448 2014-08-20  Werner Koch  <wk@gnupg.org>
33449
33450         gpg: Fix "can't handle public key algorithm" warning.
33451         + commit cb680c5ea540738692a5c74951802b0fdc658e85
33452         * g10/parse-packet.c (unknown_pubkey_warning): Check for encr/sign
33453         capabilities.
33454
33455 2014-08-19  Werner Koch  <wk@gnupg.org>
33456
33457         speedo: Get version numbers from online database.
33458         + commit 31649e72fd106a990614ce3cf720640a841ba722
33459         * build-aux/getswdb.sh: New.
33460         * build-aux/speedo.mk: Get release version numbers from swdb.lst.
33461
33462         build: Create VERSION file via autoconf.
33463         + commit 4fc1c712e986f280057b1bce7ca4696ba6d95dfc
33464         * Makefile.am (dist-hook): Remove creation of VERSION.
33465         (EXTRA_DIST): Add VERSION.
33466         * configure.ac: Let autoconf create VERSION.
33467
33468 2014-08-18  Werner Koch  <wk@gnupg.org>
33469
33470         gpg: Install the current release signing pubkey.
33471         + commit e5da80bc1888bf8801e69c9ff99f7f47550f7a09
33472         * g10/distsigkey.gpg: New.
33473
33474         agent: Return NO_SECKEY instead of ENONET for PKSIGN and others.
33475         + commit 3981ff15f3c0829ba22cd37794353502d996683c
33476         * agent/pksign.c (agent_pksign_do): Replace ENONET by NO_SECKEY.
33477         * agent/findkey.c (agent_key_from_file): No diagnostic for NO_SECKEY.
33478         * agent/pkdecrypt.c (agent_pkdecrypt): Replace checking for ENOENT.
33479
33480         kbx: Make user id and signature data optional for OpenPGP.
33481         + commit e4aa006e4807285ffdd881e4e05af3bc47c5c964
33482         * kbx/keybox-blob.c (_keybox_create_openpgp_blob): Remove restriction.
33483
33484         gpg: Change default cipher for --symmetric from CAST5 to AES-128.
33485         + commit 57df1121c18b004dd763b35eabf7b51fc9e8ec38
33486         * g10/main.h (DEFAULT_CIPHER_ALGO): Chhange to AES or CAST5 or 3DES
33487         depending on configure option.
33488         * g10/gpg.c (main): Set opt.s2k_cipher_algo to DEFAULT_CIPHER_ALGO.
33489
33490         yat2m: Support @set and @value.
33491         + commit 425d0750168f6b66a5d78a857cf21375a8f129eb
33492         * doc/yat2m.c (variablelist): New.
33493         (set_variable): New.
33494         (macro_set_p): Also check the variables.
33495         (proc_texi_cmd): Support the @value command.
33496         (parse_file): Support the @set command.
33497         (top_parse_file): Release variablelist.
33498
33499         yat2m: Support the $* command for man page rendering.
33500         + commit 7e51ef0f77962f5fb215da53817caf28899ca190
33501
33502
33503 2014-08-17  Werner Koch  <wk@gnupg.org>
33504
33505         estream: Change license from GPL to LPGL.
33506         + commit af1196512f505e8a3a338f9b72394fa3585a5234
33507         * common/estream-printf.c, common/estream-printf.h: Change license.
33508         * common/estream.c, common/estream.h: Ditto.
33509
33510 2014-08-14  Werner Koch  <wk@gnupg.org>
33511
33512         Release 2.1.0-beta783.
33513         + commit a13198d9bcee368a8de7a401feb017efc83ff795
33514
33515
33516         po: Update the German (de) translation.
33517         + commit fe9ff33b9dc8793957998341cf4bcf5e50827b41
33518
33519
33520         sm: Create homedir and lock empty keybox creation.
33521         + commit c4b60cdae8dbf68206fd105fd09adeb61a9dafe4
33522         * sm/gpgsm.h (opt): Add field "no_homedir_creation".
33523         * sm/gpgsm.c (main): Set it if --no-options is used.
33524         * sm/keydb.c (try_make_homedir): New.  Similar to the one from
33525         g10/openfile.c.
33526         (maybe_create_keybox): New.  Similar to the one from g10/keydb.c.
33527         (keydb_add_resource): Replace some code by maybe_create_keybox.
33528
33529         gpg: Screen keyserver responses.
33530         + commit c23c18c1543d1ff58f0f78baaa6a8e319c659ecb
33531         * g10/main.h (import_screener_t): New.
33532         * g10/import.c (import): Add screener callbacks to param list.
33533         (import_one): Ditto.
33534         (import_secret_one): Ditto.
33535         (import_keys_internal): Ditto.
33536         (import_keys_stream): Ditto.
33537         * g10/keyserver.c (struct ks_retrieval_screener_arg_s): New.
33538         (keyserver_retrieval_screener): New.
33539         (keyserver_get): Pass screener to import_keys_es_stream().
33540
33541         scd: Minor changes to app-sc-hsm.
33542         + commit a61b28df1f29b1e306115282ec1ce580fa54945a
33543         * scd/app-sc-hsm.c: Re-indendet some parts and set some vars to NULL
33544         after xfree for improbed robustness.
33545         (read_ef_prkd): Replace serial operator by blocks for better
33546         readability.
33547         (apply_PKCS_padding): Rewrite for easier auditing.
33548         (strip_PKCS15_padding): Ditto.  Add stricter check on SRCLEN.
33549
33550         gpg: Disable an MD5 workaround for pgp2 by default.
33551         + commit ae29b52119aa419989b773b2d6abb6e287dfc81b
33552         * g10/sig-check.c (do_check): Move some code to ...
33553         * g10/misc.c (print_md5_rejected_note): new function.
33554         * g10/mainproc.c (proc_tree, proc_plaintext): Enable MD5 workaround
33555         only if option --allow-weak-digest-algos is used.
33556
33557         gpg: Remove options --pgp2 and --rfc1991.
33558         + commit 2b8d8369d59249b89526c18c5ac276e6445dc35e
33559         * g10/gpg.c (oRFC1991, oPGP2): Remove
33560         (opts): Remove --pgp2 and --rfc1991.
33561         * g10/options.h (CO_PGP2, CO_RFC1991): Remove.  Remove all users.
33562         (RFC2440, PGP2): Remove.  Remove all code only enabled by these
33563         conditions.
33564         * tests/openpgp/clearsig.test: Remove --rfc1991 test.
33565
33566         build: Fix autogen.sh base version hack.
33567         + commit 49c9a958e0b786850309bca555d4465c97d337e1
33568         * autogen.sh <find-version>: Fix.
33569
33570         gpg: Remove --compress-keys and --compress-sigs feature.
33571         + commit 71b55e91f02cdb65a8884892f71c4c7bf8a75247
33572         * g10/gpg.c (oCompressKeys, oCompressSigs): Remove.
33573         (opts): Turn --compress-keys and --compress-signs in NOPs.
33574         * g10/options.h (opt): Remove fields compress_keys and compress_sigs.
33575         * g10/export.c (do_export): Remove compress_keys feature.
33576         * g10/sign.c (sign_file): Remove compress_sigs feature.
33577
33578 2014-08-13  Werner Koch  <wk@gnupg.org>
33579
33580         gpg: Add list-option "show-usage".
33581         + commit 7d0492075ea638607309b3ea6a792b0e95ea7d98
33582         * g10/gpg.c (parse_list_options): Add "show-usage".
33583         * g10/options.h (LIST_SHOW_USAGE): New.
33584         * g10/keyid.c (usagestr_from_pk): Add arg FILL.  Change caller.
33585         * g10/keylist.c (list_keyblock_print): Print usage info.
33586
33587 2014-08-12  Werner Koch  <wk@gnupg.org>
33588
33589         gpg: Make --with-colons work again for --search-keys.
33590         + commit a57c33c855c6757c8770529ee71f0f90744cd7a6
33591         * g10/keyserver.c (search_line_handler): Replace log_debug by
33592         es_printf.
33593
33594 2014-08-08  NIIBE Yutaka  <gniibe@fsij.org>
33595
33596         po: Update Japanese translation.
33597         + commit 2d9f76e07082fc231303ac2c6ae1aea3c98fa2e4
33598
33599
33600 2014-07-25  Werner Koch  <wk@gnupg.org>
33601
33602         scd: Minor and editorial changes to app-sc-hsm.c.
33603         + commit 2e936915cf2f830e60d974d607b08822645f5753
33604         * scd/app-sc-hsm.c (select_and_read_binary): Use SW_ macro.
33605         (parse_certid): Remove useless test.
33606         (send_certinfo, send_keypairinfo): Shrink malloc to the needed size.
33607         (do_getattr): Ditto.
33608         (verify_pin): Use SW_ macro.
33609         (do_decipher): Replace OFS variable and extend comment.
33610
33611         scd: Add a new status word code.
33612         + commit e49c851ff54d5ecf856411bf6cdee721695ea172
33613         * scd/apdu.h (SW_REF_DATA_INV): New.
33614         * scd/apdu.c (apdu_strerror): Add string.
33615
33616 2014-07-25  Andreas Schwier  <andreas.schwier@cardcontact.de>
33617
33618         scd: Support for SmartCard-HSM.
33619         + commit 8eb9224f32ddf1c9e1490c4d9688a177f8b6ae64
33620         * scd/app-sc-hsm.c: New.
33621         * scd/app.c (select_application, get_supported_applications): Register
33622         new app.
33623
33624 2014-07-25  Werner Koch  <wk@gnupg.org>
33625
33626         gpg: Switch to an EdDSA format with prefix byte.
33627         + commit 557cc11a605dd280d03c52d8b546deed8c4c714d
33628         * g10/keygen.c (gen_ecc): USe "comp" for EdDSA.
33629
33630 2014-07-23  Werner Koch  <wk@gnupg.org>
33631
33632         agent: Show just one warning with all failed passphrase constraints.
33633         + commit b3378b3a56fc90ba8ae38e6298b23a378305af32
33634         * agent/genkey.c (check_passphrase_constraints): Build a final warning
33635         after all checks.
33636
33637         agent: Only one confirmation prompt for an empty passphrase.
33638         + commit a24510d53bb23e3a680ed2c306e576268c07060d
33639         * agent/genkey.c (check_passphrase_constraints): Moev empty passphrase
33640         check to the front.
33641
33642         gpg: Add command --quick-gen-key.
33643         + commit ea186540db5b418bc6f6e5ca90337672c9981c88
33644         * g10/gpg.c (aQuickKeygen): New.
33645         * g10/misc.c (is_valid_user_id): New stub.
33646         * g10/keygen.c (quickgen_set_para): New.
33647         (quick_generate_keypair): New.
33648
33649         common: Add cpr_get_answer_is_yes_def()
33650         + commit 75127bc4561787aa9bc1cf976658e20192446d7f
33651         * g10/cpr.c (cpr_get_answer_is_yes): Factor code out to ....
33652         (cpr_get_answer_is_yes_def): ...new.
33653
33654         gpg: Make --quick-sign-key promote local key signatures.
33655         + commit 17404b2fccbc74c4f0b2364cc08e9dcc64175cf8
33656         * g10/keyedit.c (sign_uids): Promote local sigs in quick mode.
33657
33658 2014-07-22  Werner Koch  <wk@gnupg.org>
33659
33660         scd: Do not use the pcsc-wrapper.
33661         + commit bc6b452129178658da7241903ca2174c79281752
33662         * scd/apdu.c (NEED_PCSC_WRAPPER): Do not define.
33663         * scd/Makefile.am (libexec_PROGRAMS): Remove gnupg-pcsc-wrapper
33664         (gnupg_pcsc_wrapper_SOURCES): Remove.
33665         (gnupg_pcsc_wrapper_LDADD): Remove.
33666         (gnupg_pcsc_wrapper_CFLAGS): Remove.
33667
33668 2014-07-21  Werner Koch  <wk@gnupg.org>
33669
33670         gpg: Improve --list-packets output for faulty packets.
33671         + commit 5b34e347b612765f31061d077b7c343e08662ba9
33672         * g10/parse-packet.c: Add list_mode output for certain failures.
33673
33674         gpg: Cap size of attribute packets at 16MB.
33675         + commit bab9cdd971f35ff47e153c00034c95e7ffeaa09a
33676         * g10/parse-packet.c (parse_attribute): Avoid xmalloc failure and cap
33677         size of packet.
33678
33679 2014-07-03  Werner Koch  <wk@gnupg.org>
33680
33681         Release 2.1.0-beta751.
33682         + commit 5ae34f574baca2b98a09fd982c941855558408e1
33683
33684
33685         gpg: Make show-uid-validity the default.
33686         + commit 5214d8f02bf65fb0a4af15ff80cf1369ccd4c167
33687
33688
33689         tests: Fix end-of-all-ticks test for Western locales.
33690         + commit 3533860ee316918dd47501c53e910bfd0032b39d
33691         * common/t-timestuff.c (test_timegm): Use timegm if available.
33692         (main): Set TX to UTC if timegm is not available.
33693
33694 2014-07-03  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
33695
33696         gpg: Spelling error.
33697         + commit b51af333bdf77c042c9fe748616e80d1f5e4d3f9
33698
33699
33700 2014-06-30  Werner Koch  <wk@gnupg.org>
33701
33702         gpg: Auto-create revocation certificates.
33703         + commit 03018ef9eec75e4d91ea53c95547a77dedef8f80
33704         * configure.ac (GNUPG_OPENPGP_REVOC_DIR): New config define.
33705         * g10/revoke.c (create_revocation): Add arg "leadin".
33706         (gen_standard_revoke): New.
33707         * g10/openfile.c (get_openpgp_revocdir): New.
33708         (open_outfile): Add MODE value 3.
33709         * g10/keyid.c (hexfingerprint): New.
33710         * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke.
33711
33712         estream: Fix minor glitch in "%.*s" format.
33713         + commit aa5b4392aac99382d96be94782ae745e0a42484a
33714         * common/estream-printf.c (pr_string): Take care of non-nul terminated
33715         strings.
33716
33717         gpg: Rearrange code in gen_revoke.
33718         + commit 3a01b220715b3d1a90d94353e4980ab5a1ea8f26
33719         * g10/revoke.c (gen_revoke): Factor some code out to ...
33720         (create_revocation): new.
33721
33722         gpg: Create exported secret files and revocs with mode 700.
33723         + commit c434de4d83ccfaca8bde51de5c2ac8d9656e4e18
33724         * common/iobuf.c (direct_open): Add arg MODE700.
33725         (iobuf_create): Ditto.
33726         * g10/openfile.c (open_outfile): Add arg RESTRICTEDPERM.  Change call
33727         callers to pass 0 for it.
33728         * g10/revoke.c (gen_desig_revoke, gen_revoke): Here pass true for new
33729         arg.
33730         * g10/export.c (do_export): Pass true for new arg if SECRET is true.
33731
33732         common: Minor code cleanup for a legacy OS.
33733         + commit 35fdfaa0b94342c53eb82eea155a37ad4009fa9f
33734         * common/iobuf.c (direct_open) [__riscos__]: Simply cpp conditionals.
33735
33736 2014-06-27  Werner Koch  <wk@gnupg.org>
33737
33738         speedo: Fix the w32 installer name.
33739         + commit adad1872b448593275d8cae06dffe376bee067b5
33740
33741
33742         po: Update some strings of the French (fr) translation.
33743         + commit 1ef7870fc96f6dd8137e9bfabf9b06787f75dffd
33744
33745
33746         po: Update the German (de) translation.
33747         + commit c2e3eb98884785e6794dc79c1a53d75945f4c1ab
33748
33749
33750         agent: Adjust for changed npth_eselect under W32.
33751         + commit a1dff86da8ebaab6e154360f538ca9d43a6c4934
33752         * agent/gpg-agent.c (handle_connections) [W32]: Make events_set an
33753         unsigned int to match the changed prototype.
33754
33755         dirmngr: Use the homedir based socket also under W32.
33756         + commit 5e1f9b5e1427688ac340f0829e02bece7f0caf9c
33757         * common/homedir.c (dirmngr_user_socket_name): Use same code for all
33758         platforms.
33759
33760 2014-06-27  Yuri Chornoivan  <yurchor@ukr.net>
33761
33762         po: Update and enable Ukrainian (uk) translation.
33763         + commit 2c4025576105a9deb78e1cfb22c11af4af09c4fa
33764
33765
33766         Fix typos in messages.
33767         + commit e56a2d6a56d95c0f169506a8dc74a845c22b699d
33768
33769
33770 2014-06-27  Werner Koch  <wk@gnupg.org>
33771
33772         build: Remove unused options.
33773         + commit 2540a4b674a17b45ec33f43f26e830e74ff0afed
33774         * configure.ac: Remove option --build-agent-only.
33775         (FAKE_CURL, GPGKEYS_CURL): Remove check for cURL
33776         (GPGKEYS_MAILTO): Remove ac_subst but keep the currently unused
33777         SENDMAIL check.
33778         (GPGKEYS_KDNS): Remove ac_subst.
33779         * autogen.rc (final_info): Remove suggestion to use the removed option
33780         --enable-mailto.
33781
33782 2014-06-27  NIIBE Yutaka  <gniibe@fsij.org>
33783
33784         scd: Add pinpad support for REINER SCT cyberJack go.
33785         + commit 73ba75ad8b933beddd2c3f4b66937b56faa0a2d8
33786         * scd/ccid-driver.h (VENDOR_REINER, CYBERJACK_GO): New.
33787         * scd/ccid-driver.c (ccid_transceive_secure): Handle the case for
33788         VENDOR_REINER. Original work was by Alina Friedrichsen (tiny change).
33789
33790 2014-06-27  Werner Koch  <wk@gnupg.org>
33791
33792         scd: Support reader Gemalto IDBridge CT30.
33793         + commit 24be0f24d3a9325a04de10ae0e5e277bf28a74fe
33794         * scd/ccid-driver.h (GEMPC_CT30): New product id.
33795         * scd/ccid-driver.c (parse_ccid_descriptor): Add quirk for that
33796         reader.
33797
33798 2014-06-26  Werner Koch  <wk@gnupg.org>
33799
33800         gpg: Limit keysize for unattended key generation to useful values.
33801         + commit 03f0b51fe454f8dbe77c302897f7a5899c4c5380
33802         * g10/keygen.c (gen_elg): Enforce keysize 1024 to 4096.
33803         (gen_rsa): Enforce keysize 1024 to 4096.
33804         (gen_dsa): Enforce keysize 768 to 3072.
33805
33806         Enable DNS SRV records again.
33807         + commit c0d1e7fca95629e1cddd7d129fa51b9a6556cb70
33808         * configure.ac (GPGKEYS_HKP, GPGKEYS_FINGER): Remove ac_subst.
33809         (use_dns_srv): Make test work.
33810
33811         agent: Fix export of RSA keys to OpenPGP.
33812         + commit 9a034acf8ab6f85c65ccc75a4fd7b8dd47b73e3a
33813         * agent/cvt-openpgp.c (convert_transfer_key): Fix sexp build format
33814         string.
33815
33816         gpg,gpgsm: Simplify wrong_args function.
33817         + commit 572502bd2c0637429bca547ba882629640477495
33818
33819
33820         speedo: "make clean-gnupg" may not remove the source.
33821         + commit c029a184d6a1a96c6de234835fff97d4e946b19c
33822         * build-aux/speedo.mk (clean-$(1)): Take care of gnupg.
33823
33824         gpgsm: Fix default config name.
33825         + commit 2480b0253166712a2f20b92f34c8e4c2db0fc26f
33826
33827
33828 2014-06-25  Werner Koch  <wk@gnupg.org>
33829
33830         doc: Improve the rendering of the manual.
33831         + commit b5f95c1b566f9530127f3f34e10d120a951cf428
33832
33833
33834         doc: Update for modern makeinfo.
33835         + commit f149e05427a370f5985bc3fb142370b043f19924
33836         * doc/texi.css: Remove.
33837         * doc/Makefile.am (AM_MAKEINFOFLAGS): Use --css-ref.
33838
33839         gpg: Allow key-to-card upload for cert-only keys.
33840         + commit f171fd226e84311f92545ca0494771db07ba777d
33841         * g10/card-util.c (card_store_subkey): Allo CERT usage for key 0.
33842
33843 2014-06-24  Werner Koch  <wk@gnupg.org>
33844
33845         doc: Add conditionals for GnuPG-1.
33846         + commit 2c8e00137a340d04f0836f75e138dd85f8c9eff7
33847
33848
33849 2014-06-20  Werner Koch  <wk@gnupg.org>
33850
33851         gpg: Make export of ECC keys work again.
33852         + commit f4fcaa29367daacfe0ca209fa83dfa8640ace276
33853         * agent/cvt-openpgp.c (convert_to_openpgp): Use the curve name instead
33854         of the curve parameters.
33855         * g10/export.c (canon_pubkey_algo): Rename to ...
33856         (canon_pk_algo): this.  Support ECC.
33857         (transfer_format_to_openpgp): Expect curve name.
33858
33859         gpg: Avoid infinite loop in uncompressing garbled packets.
33860         + commit d6ca407a27877174c10adfae9dc601bea996cf27
33861         * g10/compress.c (do_uncompress): Limit the number of extra FF bytes.
33862
33863 2014-06-17  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
33864
33865         gpg: Fix a couple of spelling errors.
33866         + commit 3f17b74aa57ac1ea2f3aa93dec4889778a21afeb
33867
33868
33869 2014-06-17  Werner Koch  <wk@gnupg.org>
33870
33871         speedo: Support building from dist-source generated tarball.
33872         + commit 47e63dc00169030b6ff01ab67e73e52aec1395db
33873
33874
33875 2014-06-13  Werner Koch  <wk@gnupg.org>
33876
33877         http: Print human readable GNUTLS status.
33878         + commit 5bf04522e353675e4c3eda118fee2580756704a2
33879         * common/http.c (send_gnutls_bye): Take care of EAGAIN et al.
33880         (http_verify_server_credentials): Print a human readable status.
33881
33882 2014-06-12  Werner Koch  <wk@gnupg.org>
33883
33884         gpg: Improve the output of --list-packets.
33885         + commit d8314e31c58ea0827d0e2361dabcdf869ab08fce
33886         * g10/parse-packet.c (parse): Print packet meta info in list mode.
33887
33888 2014-06-11  Werner Koch  <wk@gnupg.org>
33889
33890         speedo: Improve building of the w32 installer.
33891         + commit 6eeb31abee82cb2016bf054cd302af64f6dfdc2e
33892         * build-aux/speedo.mk: Change name of build directory to PLAY.
33893         Improve the dist-source target.
33894         * build-aux/speedo/w32/gdk-pixbuf-loaders.cache: Add a blank
33895         line (plus comment).
33896         * build-aux/speedo/w32/inst.nsi: Change name of file to gnupg-w32-*.
33897         Install more tools.
33898
33899 2014-06-10  Werner Koch  <wk@gnupg.org>
33900
33901         speedo: Revamped speedo and include a w32 installer.
33902         + commit e06d5d1a3b4a5c446a27d64cd2da0e48ccec5601
33903         * build-aux/speedo/: New.
33904         * build-aux/speedo/w32/: New.
33905
33906         build: Add more options to autogen.sh.
33907         + commit 0399d87f7aaf2f2126a63899004c5c7bffd4346b
33908         * autogen.sh: Add options --print-host and --print-build.
33909
33910         w32: Fix build problem with dirmngr.
33911         + commit 141d69cb2a94a752244e89f49611923a2f184dfd
33912         * dirmngr/ks-engine-hkp.c (EAI_SYSTEM) [W32]: Add replacement
33913         constant.
33914
33915         gpg: Use more specific reason codes for INV_RECP.
33916         + commit 45ed901c466bd72118c2844069f566e190d847d6
33917         * g10/pkclist.c (find_and_check_key, build_pk_list): Use more specific
33918         reasons codes for INV_RECP.
33919
33920 2014-06-06  Werner Koch  <wk@gnupg.org>
33921
33922         Improve the beta number generation.
33923         + commit b67e4e523e6d19d384e23c5bb03010caebd150e7
33924         * autogen.sh: Add option --find-version
33925         * configure.ac: Rework the setting of the mym4_ variables.
33926
33927 2014-06-05  Werner Koch  <wk@gnupg.org>
33928
33929         Remove keyserver helper code.
33930         + commit 23712e69d3f97df9d789325f1a2f2f61e7d5bbb4
33931         * configure.ac: Remove keyserver helper related stuff.
33932         * Makefile.am (SUBDIRS): Remove keyserver.
33933         * keyserver/Makefile.am: Remove.
33934
33935         gpg: Require confirmation for --gen-key with experimental curves.
33936         + commit 9c9e26d41e7d65711da8dbf1afa452254749621c
33937         * g10/keygen.c (ask_curve): Add arg both.  Require confirmation for
33938         Curve25519.
33939
33940         gpg: Auto-migrate existing secring.gpg.
33941         + commit 4f0625889b768eabdec52696bf15059a9e8d9c02
33942         * g10/migrate.c: New.
33943         * g10/import.c (import_old_secring): New.
33944         (import_one): Add arg silent.
33945         (transfer_secret_keys): Add arg batch.
33946         (import_secret_one): Add args batch and for_migration.
33947         * g10/gpg.c (main): Call migration function.
33948
33949 2014-06-04  Werner Koch  <wk@gnupg.org>
33950
33951         gpgsm: Fix commit be07ed65.
33952         + commit 09a2d4ec74d352dcb4f006aab60b07bc4f5f1a37
33953         * sm/server.c (option_handler): Use "with-secret".
33954
33955 2014-06-03  Werner Koch  <wk@gnupg.org>
33956
33957         Add new option --with-secret.
33958         + commit be07ed65e169a7ec3fbecdb1abf988fc0245d9ff
33959         * g10/gpg.c: Add option --with-secret.
33960         * g10/options.h (struct opt): Add field with_secret.
33961         * g10/keylist.c (public_key_list): Pass opt.with_secret to list_all
33962         and list_one.
33963         (list_all, list_one): Add arg mark_secret.
33964         (list_keyblock_colon): Add arg has_secret.
33965         * sm/gpgsm.c: Add option --with-secret.
33966         * sm/server.c (option_handler): Add option "with-secret".
33967         * sm/gpgsm.h (server_control_s): Add field with_secret.
33968         * sm/keylist.c (list_cert_colon): Take care of with_secret.  Also move
33969         the token string from the wrong field 14 to 15.
33970
33971         gpgsm: New commands --export-secret-key-{p8,raw}
33972         + commit 0beec2f0f255a71f9d5a4a0729d0259f673e8838
33973         * sm/gpgsm.c: Add new commands.
33974         * sm/minip12.c (build_key_sequence): Add arg mode.
33975         (p12_raw_build): New.
33976         * sm/export.c (export_p12): Add arg rawmode.  Call p12_raw_build.
33977         (gpgsm_p12_export): Ditto.
33978         (print_short_info): Print the keygrip.
33979
33980 2014-06-02  Werner Koch  <wk@gnupg.org>
33981
33982         gpg: Avoid NULL-deref in default key listing.
33983         + commit 958e5f292fa3f8e127f54bc088c56780c564dcae
33984         * g10/keyid.c (hash_public_key): Take care of NULL keys.
33985         * g10/misc.c (pubkey_nbits): Ditto.
33986
33987         gpg: Simplify default key listing.
33988         + commit f3249b1c4d0f2e9e0e8956042677e47fc9c6f6c0
33989         * g10/mainproc.c (list_node): Rework.
33990
33991         gpg: Graceful skip reading of corrupt MPIs.
33992         + commit d9cde7ba7d4556b216f062d0cf92d60cbb204b00
33993         * g10/parse-packet.c (mpi_read): Change error message on overflow.
33994
33995         gpgsm: Handle re-issued CA certificates in a better way.
33996         + commit 715285bcbc12c024dbd9b633805189c09173e317
33997         * sm/certchain.c (find_up_search_by_keyid): Consider all matching
33998         certificates.
33999         (find_up): Add some debug messages.
34000
34001         gpgsm: Add a way to save a found state.
34002         + commit 42c043a8ad542c131917879c9b458f234b4bb645
34003         * kbx/keybox-defs.h (keybox_found_s): New.
34004         (keybox_handle): Factor FOUND out to above.  Add saved_found.
34005         * kbx/keybox-init.c (keybox_release): Release saved_found.
34006         (keybox_push_found_state, keybox_pop_found_state): New.
34007
34008         * sm/keydb.c (keydb_handle): Add field saved_found.
34009         (keydb_new): Init it.
34010         (keydb_push_found_state, keydb_pop_found_state): New.
34011
34012         gpg: Fix bug parsing a zero length user id.
34013         + commit 99972bd6e9abea71f270284f49997de5f00208af
34014         * g10/getkey.c (get_user_id): Do not call xmalloc with 0.
34015
34016         * common/xmalloc.c (xmalloc, xcalloc): Take extra precaution not to
34017         pass 0 to the arguments.
34018
34019 2014-05-19  Werner Koch  <wk@gnupg.org>
34020
34021         dirmngr: Print certificates on failed TLS verification.
34022         + commit 9e1c99f8009f056c39a7465b91912c136b248e8f
34023         * dirmngr/ks-engine-hkp.c (cert_log_cb): New.
34024         (send_request): Set callback.
34025
34026         http: Add callback to help logging of server certificates.
34027         + commit 45f15b2d767d4068f79fd5b123e9eeae08a0616d
34028         * common/http.c (http_session_s): Add field cert_log_cb.
34029         (http_session_set_log_cb): New.
34030         (http_verify_server_credentials): Call callback.
34031
34032 2014-05-16  Werner Koch  <wk@gnupg.org>
34033
34034         keyserver: Improve support for hkps pools.
34035         + commit d2d9d4fb60e3f2160af6252335364d3aac4b7d17
34036         * dirmngr/ks-engine-hkp.c (hostinfo_s): Add fields cname, v4addr, and
34037         v6addr.
34038         (create_new_hostinfo): Clear them.
34039         (my_getnameinfo): Add args numeric and r_isnumeric.
34040         (is_ip_address): New.
34041         (map_host): Add arg r_host.  Rewrite the code to handle pools in a
34042         special way.
34043         (ks_hkp_print_hosttable): Change format of help info output.
34044         (make_host_part): Add arg optional r_httphost.
34045         (send_request): Add arg httphost.
34046         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Get httphost and pass it to
34047         send_request.
34048
34049         http: Allow overriding of the Host header.
34050         + commit 8b90d79818355b81ce223e1cb96cd0c939096fe2
34051         * common/http.c (http_open): Add arg httphost.
34052         (http_open_document): Pass NULL for httphost.
34053         (send_request): Add arg httphost.  If given, use HTTPHOST instead of
34054         SERVER.  Use https with a proxy if requested.
34055         (http_verify_server_credentials): Do not stop at the first error
34056         message.
34057         * dirmngr/ocsp.c (do_ocsp_request): Adjust call to http_open.
34058         * keyserver/curl-shim.c (curl_easy_perform): Ditto.
34059         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
34060         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Ditto.
34061
34062 2014-05-14  Werner Koch  <wk@gnupg.org>
34063
34064         gpg: Fix uninitialized access to search descindex with gpg keyboxes.
34065         + commit 25036ec6abbc0c9d0003dcfe227724038c35a304
34066         * kbx/keybox-search.c (keybox_search): Add arg  R_DESCINDEX.  Chnage
34067         both callers.
34068         * g10/keydb.c (keydb_search): Always set DESCINDEX.
34069
34070         w32: Make make_absfilename work with drive letters.
34071         + commit 71fa6a35107d4d4547eb9155d7c2612b6a6a16fb
34072         * common/stringhelp.c (do_make_filename) [HAVE_DRIVE_LETTERS]: Fix.
34073
34074         gpg: Remove useless diagnostic in MDC verification.
34075         + commit 455a4a2212302c05095e736b127f647e95714fe7
34076         * g10/decrypt-data.c (decrypt_data): Do not distinguish between a bad
34077         MDC packer header and a bad MDC.
34078
34079         gpg: Fix glitch entering a full expiration time.
34080         + commit b2945c451d3d3f25ba11a9fe88c6cbf3f88c2fb5
34081         * g10/keygen.c (ask_expire_interval): Get the current time after the
34082         prompt.
34083
34084 2014-05-08  Werner Koch  <wk@gnupg.org>
34085
34086         agent: Fix import of non-protected gpg keys.
34087         + commit 4aeb02562c9db4b96366220b781e2b4fa2d6fd3b
34088         * agent/cvt-openpgp.c (do_unprotect): Return an s-exp also for
34089         non-protected keys.
34090         (convert_from_openpgp_main): Do not call agent_askpin for a
34091         non-protected key.
34092
34093         Make more use of *_NAME macros.
34094         + commit cb2aeb4e1157fc0d7dc25d94115973422dc1a800
34095         * configure.ac (GPG_DISP_NAME, GPGSM_DISP_NAME): New.
34096         (GPG_AGENT_DISP_NAME, SCDAEMON_DISP_NAME): New.
34097         (DIRMNGR_DISP_NAME, G13_DISP_NAME): New.
34098         (GPGCONF_DISP_NAME): New.
34099         (SCDAEMON_SOCK_NAME): New.
34100         * common/argparse.c (show_help): Map description string.
34101
34102 2014-05-08  NIIBE Yutaka  <gniibe@fsij.org>
34103
34104         agent: Fix auth key comment handling.
34105         + commit fb24808db9af9dfe36f9f6d7fc24e0b903ecc12c
34106         * agent/command-ssh.c (ssh_send_key_public): Handle the case with no
34107         comment.
34108
34109 2014-05-07  Werner Koch  <wk@gnupg.org>
34110
34111         Make -jN work again.
34112         + commit 57011da53e43f9c8a6c7e7314166c3e17ff8627a
34113         * common/Makefile.am ($(PROGRAMS)): New rule
34114         (t_http_LDADD): Use libcommontls.a without directory prefix.
34115         * dirmngr/Makefile.am ($(PROGRAMS)): New rule.
34116
34117         gpg: Print the key algorithm/curve with signature info.
34118         + commit 359c643d747c890f73f68b42e0aeb896016f05fd
34119         * g10/mainproc.c (check_sig_and_print): Print the name and curve.
34120
34121         gpg: Fix memleak in signature verification of bogus keys.
34122         + commit e73edfb1759d05121ea66f67c775e763bf47d737
34123         * g10/mainproc.c (check_sig_and_print): Factor common code out to ...
34124         (print_good_bad_signature): here.
34125
34126         gpg: Mark experimental algorithms in the key listing.
34127         + commit 09055aa0f7993aaf4dcffdd80d8192945ae6080a
34128         * g10/keylist.c (list_keyblock_print): Remove duplicate curve name.
34129         Print a note for experimental algorithms.
34130         * g10/misc.c (print_pubkey_algo_note): Fix warning message.
34131
34132         gpg: Finish experimental support for Ed25519.
34133         + commit 8fee6c1ce6d116fe7909dbe1184d95bc91305484
34134         * agent/cvt-openpgp.c (try_do_unprotect_arg_s): Add field "curve".
34135         (get_keygrip): Add and use arg CURVE.
34136         (convert_secret_key): Ditto.
34137         (convert_transfer_key): Ditto.
34138         (get_npkey_nskey): New.
34139         (prepare_unprotect): Replace gcrypt functions by
34140         get_npkey_nskey.  Allow opaque MPIs.
34141         (do_unprotect): Use CURVE instead of parameters.
34142         (convert_from_openpgp_main): Ditto.
34143         (convert_to_openpgp):  Simplify.
34144         * g10/import.c (one_mpi_from_pkey): Remove.
34145         (transfer_secret_keys): Rewrite to use the curve instead of the
34146         parameters.
34147         * g10/parse-packet.c (parse_key): Mark protected MPIs with USER1 flag.
34148
34149         * common/openpgp-oid.c (openpgp_curve_to_oid): Allow the use of
34150          "NIST P-256" et al.
34151         * g10/keygen.c (ask_curve): Add arg ALGO.
34152         (generate_keypair): Rewrite the ECC key logic.
34153
34154         * tests/openpgp/ecc.test: Provide the "ecc" passphrase.
34155
34156         kbx: Add experimental support for EDDSA.
34157         + commit bdb9c2b314400da9155b8a924e22e486793dda89
34158         * kbx/keybox-openpgp.c (parse_key): Use algo constants and add
34159         experimental support for EdDSA.
34160
34161         agent: Remove greeting message.
34162         + commit a63ed9875830e5b3b4d48b7d97d24c18de36b326
34163         * agent/gpg-agent.c (main): Remove greeting.  Make --no-greeting a
34164         dummy.
34165
34166 2014-05-06  Werner Koch  <wk@gnupg.org>
34167
34168         Use "samethread" mode keyword for some es_fopenmem.
34169         + commit 6477e51919ef97f0f9cc05d10cdc7aa2b89faafe
34170         * dirmngr/ks-engine-hkp.c (armor_data): Add mode keyword.
34171         * g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
34172         * scd/atr.c (atr_dump): Ditto.
34173
34174 2014-05-05  Werner Koch  <wk@gnupg.org>
34175
34176         dirmngr: Add support for hkps keyservers.
34177         + commit 60e2fc7d38d8b37d1de944cf230e410c2ce37d5e
34178         * dirmngr/dirmngr.c: Include gnutls.h.
34179         (opts): Add --gnutls-debug and --hkp-cacert.
34180         (opt_gnutls_debug, my_gnutls_log): New.
34181         (set_debug): Set gnutls log level.
34182         (parse_rereadable_options): Register a CA file.
34183         (main): Init GNUTLS.
34184         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Support hkps.
34185         (send_request): Ditto.
34186
34187         http: Add reference counting to the session object.
34188         + commit ea0f5481f01eacedff264bf08144164aa989ec4d
34189         * common/http.c (http_session_t): Add field "refcount".
34190         (_my_socket_new, _my_socket_ref, _my_socket_unref): Add debug code.
34191         (send_request, my_npth_read, my_npth_write): Use SOCK object for the
34192         transport ptr.
34193         (http_session_release): Factor all code out to ...
34194         (session_unref): here.  Deref SOCK.
34195         (http_session_new): Init refcount and transport ptr.
34196         (http_session_ref): New.  Ref and unref all assignments.
34197
34198 2014-05-02  Werner Koch  <wk@gnupg.org>
34199
34200         http: Add HTTP_FLAG_FORCE_TLS and http_get_tls_info.
34201         + commit 0e59195642eb26263b8e0b9200290538631d35cd
34202         * common/http.c (http_parse_uri): Factor code out to ...
34203         (parse_uri): here.  Add arg FORCE_TLS.
34204         (do_parse_uri): Ditto.  Implement flag.
34205         (http_get_tls_info): New.
34206         (http_register_tls_ca): Allow clearing of the list.
34207         (send_request): Use a default verification function.
34208         * common/http.h (HTTP_FLAG_FORCE_TLS): New.
34209         * common/t-http.c (main): Add several command line options.
34210
34211         common: Fix test for openpgp_oid_is_ed25519.
34212         + commit 2def230231abd34f6012df284ab468321ffedc10
34213         * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): Add correct
34214         value.
34215
34216         http: Revamp TLS API.
34217         + commit 8412a5825c225c8ff14de3ffaad2e55e040b2eca
34218         * configure.ac (NEED_GNUTLS_VERSION): New.
34219         (HTTP_USE_GNUTLS, LIBGNUTLS_CFLAGS, LIBGNUTLS_LIBS): New ac_subst.
34220
34221         * common/http.h (http_session_t): New.
34222         * common/http.c: Remove compatibility for gnutls < 3.0.
34223         (http_session_s): New.
34224         (cookie_s): Replace gnutls_session_t by http_session_t.
34225         (tls_callback, tls_ca_certlist): New variables.
34226         (my_socket_unref): Add preclose args.
34227         (my_npth_read, my_npth_write): New.
34228         (make_header_line): Fix bug using int* instead of char*.
34229         (http_register_tls_callback): New.
34230         (http_register_tls_ca): New.
34231         (http_session_new): New.
34232         (http_session_release): New.
34233         (http_get_header_names): New.
34234         (escape_data): Add hack to escape in forms mode.
34235         (send_request) [HTTP_USE_GNUTLS]: Support SNI.
34236         (send_request) [HTTP_USE_GNUTLS]: Fix use of make_header_line.
34237         (send_gnutls_bye): New.
34238         (cookie_close): Make use of preclose feature.
34239         (http_verify_server_credentials): New.
34240         (main) [TEST]: Remove test code.
34241         * common/t-http.c: New.
34242         * common/tls-ca.pem: New.
34243         * common/Makefile.am (tls_sources): New. Move http code to here.
34244         (libcommontls_a_SOURCES): New.
34245         (libcommontlsnpth_a_SOURCES): New.
34246         (EXTRA_DIST): Add tls-ca.pem
34247         (module_maint_tests): Add t-http.
34248         (t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
34249
34250         * dirmngr/Makefile.am (dirmngr_LDADD): Add libcommontlsnpth.
34251
34252         common: Cleanup the use of USE_NPTH and HAVE_NPTH macros.
34253         + commit 84289e85c72ae58c321dfdb96816700a6b7f7122
34254         * configure.ac (HAVE_NPTH): New ac_define.
34255         * common/estream.c: Use USE_NPTH instead of HAVE_NPTH.
34256         * common/http.c: Ditto.  Replace remaining calls to pth by npth calls.
34257         (connect_server): Remove useless _().
34258         * common/exechelp-posix.c, common/exechelp-w32.c
34259         * common/exechelp-w32ce.c: Use HAVE_PTH to include npth.h.
34260         * common/init.c (_init_common_subsystems): Remove call to pth_init.
34261         * common/sysutils.c (gnupg_sleep): Use npth_sleep.
34262         * scd/ccid-driver.c (my_sleep): Ditto.
34263
34264 2014-04-30  Werner Koch  <wk@gnupg.org>
34265
34266         estream: Implement "samethread" mode keyword.
34267         + commit 8416c875a729426eae05ed1ca9f1ebcb933c246a
34268         * src/estream.c (estream_internal): Add field SAMETHREAD.
34269         (init_stream_lock, lock_stream, trylock_stream, unlock_stream): Use it.
34270         (parse_mode): Add arg SAMETHREAD and parse that keyword.
34271         (es_initialize): Rename to ...
34272         (init_stream_obj): this.  Add arg SAMETHREAD.
34273         (es_create): Add arg SAMETHREAD.  Call init_stream_lock after
34274         init_stream_obj.
34275         (doreadline): Call es_create with samethread flag.
34276         (es_fopen, es_mopen, es_fopenmem, es_fopencookie, do_fdopen)
34277         (do_fpopen, do_w32open): Implement "samethread" keyword.
34278         (es_freopen): Take samthread flag from old stream.
34279         (es_tmpfile): Call es)_create w/o samethread.
34280
34281         estream: Fix deadlock in es_fileno.
34282         + commit ecea94461ed40f3f6ef662c2501e1d56ec284022
34283         * src/estream.c (es_fileno_unlocked): Call the unlocked functions.
34284
34285         estream: Add debug code to the lock functions.
34286         + commit aeb81727c77dfea3bf5d2d689ffbdc897f2938a7
34287         * common/estream.c (dbg_lock_0, dbg_lock_1, dbg_lock_1): New.
34288
34289         estream: Replace locking macros by functions.
34290         + commit 39e91a5f0a666aad2fef7a840b2cd03949bb1be4
34291         * common/estream.c: Replace most macros.
34292
34293 2014-04-28  NIIBE Yutaka  <gniibe@fsij.org>
34294
34295         ECC Fixes.
34296         + commit 21dab64030c95a909767bf6d8f99e8476f9df8a2
34297         * agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
34298         (convert_transfer_key): Follow newer (>= 1.6) libgcrypt API, which
34299         does not distinguish the detail.
34300         (do_unprotect, convert_from_openpgp_main): Don't call
34301         map_pk_openpgp_to_gcry, as it's the value of libgcrypt API already and
34302         not the value defined by OpenPGP.
34303         (convert_to_openpgp): It's "ecc".
34304         * agent/gpg-agent.c (map_pk_openpgp_to_gcry): Remove.
34305         * g10/call-agent.c (agent_pkdecrypt): Fix off-by-one error.
34306         * g10/pubkey-enc.c (get_it): Fix swapping the fields error.
34307
34308 2014-04-22  Werner Koch  <wk@gnupg.org>
34309
34310         gpg: Pass --homedir to gpg-agent.
34311         + commit fdd938a5bbecb5b70f564ae3afb4e17905404bb2
34312         * agent/gpg-agent.c (main): Make sure homedir is absolute.
34313         * common/asshelp.c (lock_spawning): Create lock file with an absolute
34314         name.
34315         (start_new_gpg_agent): Use an absolute name for the socket and pass
34316         option --homedir to the agent.
34317         (start_new_dirmngr): Use an absolute name for the --homedir.
34318
34319         common: Add functions make_absfilename and make_absfilename_try.
34320         + commit 71a54313adf7b57b7b27bb9ad07b142a34306260
34321         * common/stringhelp.c (do_make_filename): Add modes 2 and 3.
34322         (make_absfilename): New.
34323         (make_absfilename_try): New.
34324
34325         common: Add function gnupg_getcwd.
34326         + commit 1a87edab6657a257876ab2f8790f2937feba7066
34327         * tools/gpg-connect-agent.c (gnu_getcwd): Move to ...
34328         * common/sysutils.c (gnupg_getcwd): .. here.
34329         * tools/gpg-connect-agent.c (get_var_ext): Use gnupg_getcwd.
34330
34331         gpg: Print a warning if GKR has hijacked gpg-agent.
34332         + commit ffa39be5ebfc1059a737905ee317c9b6f3d2a77e
34333         * g10/call-agent.c (check_hijacking): New.
34334         (start_agent): Call it.
34335         (membuf_data_cb, default_inq_cb): Move more to the top.
34336
34337 2014-04-17  Werner Koch  <wk@gnupg.org>
34338
34339         gpg: New %U expando for the photo viewer.
34340         + commit e184a11f94e2d41cd9266484542631bec23628b5
34341         * g10/photoid.c (show_photos): Set namehash.
34342         * g10/misc.c (pct_expando): Add "%U" expando.
34343
34344         common: Add z-base-32 encoder.
34345         + commit b8a91ebf46a927801866e99bb5a66ab00651424e
34346         * common/zb32.c: New.
34347         * common/t-zb32.c: New.
34348         * common/Makefile.am (common_sources): Add zb82.c
34349         (module_tests): Add t-zb32.
34350
34351 2014-04-16  Werner Koch  <wk@gnupg.org>
34352
34353         Two minor code cleanups and one NULL deref on error fix.
34354         + commit a34afa8f2053d75f276d6d28dbf1a43db0fd9768
34355         * common/estream.c (es_freopen): Remove useless check for STREAM.
34356         * kbx/keybox-blob.c (_keybox_create_x509_blob): Remove useless check
34357         for BLOB.
34358         * tools/sockprox.c (run_proxy): Do not fclose(NULL).
34359
34360 2014-04-15  Werner Koch  <wk@gnupg.org>
34361
34362         gpg: Re-enable secret key deletion.
34363         + commit db3b528239c9d56bc71fd2283e07a3f1d91e4fd0
34364         * g10/call-agent.c (agent_delete_key): New.
34365         * g10/keydb.h (FORMAT_KEYDESC_DELKEY): New.
34366         * g10/passphrase.c (gpg_format_keydesc): Support new format.
34367         * g10/delkey.c (do_delete_key): Add secret key deletion.
34368
34369         gpg: Re-indent a file.
34370         + commit d25d00b89efed461d344028d0e2e2be38cc77628
34371         * g10/delkey.c: Re-indent.
34372         (do_delete_key, delete_keys): Change return type top gpg_error_t.
34373
34374         gpg: Fix regression in secret key export.
34375         + commit c4d983239a3f0a18c77f0a5aeba520a81a1b86e8
34376         * agent/cvt-openpgp.c (convert_to_openpgp): Fix use
34377         gcry_sexp_extract_param.
34378         * g10/export.c (do_export_stream): Provide a proper prompt to the
34379         agent.
34380
34381         gpg: Change pinentry prompt to talk about "secret key".
34382         + commit e549799db66be30cdd68a3e6cdca9c6a050466d1
34383         * g10/passphrase.c (gpg_format_keydesc): Add mode 2.  Change strings.
34384         * g10/keydb.h (FORMAT_KEYDESC_NORMAL, FORMAT_KEYDESC_IMPORT)
34385         (FORMAT_KEYDESC_EXPORT): New.  Use them for clarity.
34386
34387         agent: Add command DELETE_KEY.
34388         + commit e3a4ff89a0b106e678bf9d0a4d47917123071140
34389         * agent/command.c (cmd_delete_key): New.
34390         * agent/findkey.c (modify_description): Add '%C' feature.
34391         (remove_key_file): New.
34392         (agent_delete_key): New.
34393         * agent/command-ssh.c (search_control_file): Make arg R_DISABLE
34394         optional.
34395
34396         * configure.ac: Require libgpg-error 1.13.
34397
34398 2014-04-09  NIIBE Yutaka  <gniibe@fsij.org>
34399
34400         scd: EdDSA support.
34401         + commit 3132bd90dc8db9c7fd19ba201918e95891306dc5
34402         * scd/app-openpgp.c (KEY_TYPE_EDDSA, CURVE_ED25519): New.
34403         (struct app_local_s): Add eddsa.
34404         (get_algo_byte, store_fpr): Support KEY_TYPE_EDDSA.
34405         (get_ecc_key_parameters, get_curve_name): Support CURVE_ED25519.
34406         (send_key_attr, get_public_key): Support KEY_TYPE_EDDSA.
34407         (build_ecc_privkey_template): Rename as it supports both of
34408         ECDSA and EdDSA.
34409         (ecc_writekey): Rename.  Support CURVE_ED25519, too.
34410         (do_writekey): Follow the change of ecc_writekey.
34411         (do_auth): Support KEY_TYPE_EDDSA.
34412         (parse_ecc_curve): Support CURVE_ED25519.  Bug fix for other curves.
34413         (parse_algorithm_attribute): Bug fix for ECDH.  Support EdDSA.
34414
34415 2014-04-08  Werner Koch  <wk@gnupg.org>
34416
34417         dirmngr: Fix compiler warning.
34418         + commit db85feceaf43ebd6d44421bb14fcb60495804ae0
34419         * common/mischelp.h (JNLIB_GCC_HAVE_PUSH_PRAGMA): New.
34420         * dirmngr/dirmngr.c (handle_tick): Factor time check out to ...
34421         (time_for_housekeeping_p): new.
34422
34423         gpgconf: Add command --launch.
34424         + commit b4cf4686f7349be9558217f20e51157398cd88a0
34425         * tools/gpgconf.c: Add command --launch.
34426         * tools/gpgconf-comp.c (gc_component_launch): New.
34427
34428         scd: Silent compiler warnings about unused variables.
34429         + commit 36dfc37e438660632d3a2bf5d5526be9005fa8c5
34430         * scd/app-openpgp.c (build_ecdsa_privkey_template): Mark unused arg.
34431         (ecdh_writekey): Mark unused args.
34432
34433 2014-04-08  NIIBE Yutaka  <gniibe@fsij.org>
34434
34435         agent: Support EdDSA.
34436         + commit 5ff6d0c25e6d0f422b17809b954e9e87cb137347
34437         * agent/pksign.c (agent_pksign_do): Handle EdDSA signature.
34438
34439         g10: EdDSA support.
34440         + commit 40c3b0741e593d0658dda0c707c4f32e80648dd1
34441         * g10/keyid.c (keygrip_from_pk): Compute keygrip of EdDSA key.
34442         * g10/keygen.c (generate_subkeypair): Ed25519 is for EdDSA.
34443         * common/openpgp-oid.c (oid_ed25519): Update.
34444
34445 2014-04-04  NIIBE Yutaka  <gniibe@fsij.org>
34446
34447         agent: EdDSA support for SSH.
34448         + commit 513c67b7461a2451247ef2b2fc64e0470a16edf1
34449         * agent/command-ssh.c (ssh_signature_encoder_eddsa): Signature is
34450         two 32-byte opaque data which should not be interpreted as number.
34451
34452 2014-03-27  Werner Koch  <wk@gnupg.org>
34453
34454         gpg: Add commands --quick-sign-key and --quick-lsign-key.
34455         + commit b6786cc3ec0bb582323adf94c2ee624bcfbeb466
34456         * g10/gpg.c (main): Add commands --quick-sign-key and
34457         --quick-lsign-key.
34458         * g10/keyedit.c (sign_uids): Add args FP and QUICK.
34459         (keyedit_quick_sign): New.
34460         (show_key_with_all_names): Add arg NOWARN.
34461
34462         Change some keyedit functions to allow printing to arbitrary streams.
34463         + commit 4f50ec98ddd57253cae66e2321f0cc98ee189a09
34464         * common/ttyio.c (tty_print_string): Add optional arg FP. Change all
34465         callers.
34466         (tty_print_utf8_string2): Ditto.
34467         * g10/keyedit.c (show_prefs):  Ditto.
34468         (show_key_with_all_names_colon): Ditto.
34469         (show_names): Ditto.
34470         * g10/keylist.c (print_revokers): Ditto.
34471         (print_fingerprint): Ditto.
34472
34473 2014-03-23  Werner Koch  <wk@gnupg.org>
34474
34475         agent: Replace es_mopen by es_fopenmem for ssh.
34476         + commit 5c2a50cdc90e85b1fc380851ccfbe9186969b658
34477         * agent/command-ssh.c (ssh_read_key_public_from_blob): Use
34478         es_fopenmem.
34479         (ssh_handler_request_identities): Ditto.
34480         (ssh_request_process): Ditto.
34481
34482 2014-03-22  Werner Koch  <wk@gnupg.org>
34483
34484         agent: Put ssh key type as comment into sshcontrol.
34485         + commit fc3e70c11342267c1062e4244955d19ecd72e0f6
34486         * agent/command-ssh.c (ssh_key_type_spec): Add field name.
34487         (ssh_key_types): Add human readable names.
34488         (add_control_entry): Add arg SPEC and print key type as comment.
34489         (ssh_identity_register): Add arg SPEC.
34490         (ssh_handler_add_identity): Add var SPEC and pass ssh_receive_key.
34491
34492         agent: Support the Ed25519 signature algorithm for ssh.
34493         + commit 072432883ededa15bf35f80102e0572746ba4af1
34494         * agent/command-ssh.c (SPEC_FLAG_IS_EdDSA): New.
34495         (ssh_key_types): Add entry for ssh-ed25519.
34496         (ssh_identifier_from_curve_name): Move to the top.
34497         (stream_read_skip): New.
34498         (stream_read_blob): New.
34499         (ssh_signature_encoder_rsa): Replace MPIS array by an s-exp and move
34500         the s-exp parsing to here.
34501         (ssh_signature_encoder_dsa): Ditto.
34502         (ssh_signature_encoder_ecdsa): Ditto.
34503         (ssh_signature_encoder_eddsa): New.
34504         (sexp_key_construct): Rewrite.
34505         (ssh_key_extract): Rename to ...
34506         (ssh_key_to_blob): .. this and rewrite most of it.
34507         (ssh_receive_key): Add case for EdDSA.
34508         (ssh_convert_key_to_blob, key_secret_to_public): Remove.
34509         (ssh_send_key_public): Rewrite.
34510         (ssh_handler_request_identities): Simplify.
34511         (data_sign): Add rename args.  Add new args HASH and HASHLEN.  Make
34512         use of es_fopenmen and es_fclose_snatch.  Remove parsing into MPIs
34513         which is now doe in the sgnature encoder functions.
34514         (ssh_handler_sign_request): Take care of Ed25519.
34515         (ssh_key_extract_comment): Rewrite using gcry_sexp_nth_string.
34516
34517         agent: Cleanups to prepare implementation of Ed25519.
34518         + commit a77ed0f266d03e234027dda4de5a7f3dd6787b1e
34519         * agent/cvt-openpgp.c: Remove.
34520         (convert_to_openpgp): Use gcry_sexp_extract_param.
34521         * agent/findkey.c (is_eddsa): New.
34522         (agent_is_dsa_key, agent_is_eddsa_key): Check whether ecc means EdDSA.
34523         * agent/pksign.c (agent_pksign_do): Add args OVERRIDEDATA and
34524         OVERRIDEDATALEN.
34525
34526         * common/ssh-utils.c (is_eddsa): New.
34527         (get_fingerprint): Take care or EdDSA.
34528
34529 2014-03-18  Werner Koch  <wk@gnupg.org>
34530
34531         tools: Fix NULL deref in gpg-connect-agent.
34532         + commit 6376227a31b3076321ce16ad626b333057bda53d
34533         * tools/gpg-connect-agent.c (handle_inquire): Do not pass NULL to
34534         strlen.
34535
34536         dirmngr: Resurrect hosts in the HKP hosttable.
34537         + commit 6c058fac65c7e9d1ffb72686f0f02644f172da22
34538         * dirmngr/dirmngr.c (HOUSEKEEPING_INTERVAL): New.
34539         (housekeeping_thread): New.
34540         (handle_tick): Call new function.
34541         * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): New.
34542         (struct hostinfo_s): Add field died_at and set it along with the dead
34543         flag.
34544         (ks_hkp_print_hosttable): Print that info.
34545         (ks_hkp_housekeeping): New.
34546
34547         common: New function elapsed_time_string.
34548         + commit 04e304278c9302831bc81e7fe9049c588ead029a
34549         * common/gettime.c (elapsed_time_string): New.
34550
34551 2014-03-17  Werner Koch  <wk@gnupg.org>
34552
34553         gpg: Reject signatures made with MD5.
34554         + commit f90cfe6b66269de0154d810c5cee1fe9a5af475c
34555         * g10/gpg.c: Add option --allow-weak-digest-algos.
34556         (main): Set option also in PGP2 mode.
34557         * g10/options.h (struct opt): Add flags.allow_weak_digest_algos.
34558         * g10/sig-check.c (do_check): Reject MD5 signatures.
34559         * tests/openpgp/defs.inc: Add allow_weak_digest_algos to gpg.conf.
34560
34561         gpg: Make --auto-key-locate work again with keyservers.
34562         + commit 1e2e39c5758ffaf62f8bb85b4a86dc49c41f3a68
34563         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Allow exact search mode.
34564         * g10/keyserver.c (keyserver_import_name): Implement.
34565         (keyserver_get): Use exact mode for name based import.
34566         (keyserver_get): Add args R_FPR and R_FPRLEN.  Change all callers.
34567
34568         gpg: New mechanism "clear" for --auto-key-locate.
34569         + commit 1d642d3ca890daa65ee5dd949a00747da6b49015
34570         * g10/getkey.c (parse_auto_key_locate): Implement "clear".
34571
34572 2014-03-14  Werner Koch  <wk@gnupg.org>
34573
34574         gpg-connect-agent: Make it easier to connect to the dirmngr.
34575         + commit 2223eaefaf53aa7217ac593b83e4294148a4db5d
34576         * tools/gpg-connect-agent.c: Add options --dirmngr and
34577         --dirmngr-program.
34578
34579         dirmngr: Make use of IPv4 and IPV6 more explicit.
34580         + commit 59b4fb5f4927908af06bb80ecd86adbf6e54ba14
34581         * common/http.c (connect_server): Handle the new flags.
34582         * common/http.h (HTTP_FLAG_IGNORE_IPv4, HTTP_FLAG_IGNORE_IPv4): New.
34583         * dirmngr/ks-engine-hkp.c (map_host): Add arg r_httpflags.
34584         (make_host_part): Ditto.
34585         (send_request): Add arg httpflags.
34586         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Handle httpflags.
34587
34588         dirmngr: Do not use brackets around legacy IP addresses.
34589         + commit d7fbefeb82833db9eea8b15dc7889ecf0b7ffab4
34590         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Change args to take a
34591         complete addrinfo.  Bracket only v6 addresses.  Change caller.
34592
34593         gpg: Print the actual used keyserver address.
34594         + commit a401f768ca8e218eef7a5c87a8f99cb1d6b4aaeb
34595         * dirmngr/ks-engine-hkp.c (ks_hkp_search, ks_hkp_get): Print SOURCE
34596         status lines.
34597         * g10/call-dirmngr.c (ks_status_parm_s): New.
34598         (ks_search_parm_s): Add field stparm.
34599         (ks_status_cb): New.
34600         (ks_search_data_cb): Send source to the data callback.
34601         (gpg_dirmngr_ks_search): Change callback prototope to include the
34602         SPECIAL arg.  Adjust all users.  Use ks_status_cb.
34603         (gpg_dirmngr_ks_get): Add arg r_source and use ks_status_cb.
34604         * g10/keyserver.c (search_line_handler): Adjust callback and print
34605         "data source" disgnostic.
34606         (keyserver_get): Print data source diagnostic.
34607
34608         dirmngr: Default to a user socket name and enable autostart.
34609         + commit 5d321eb00be0774418de1a05678ac0ec44d7193b
34610         * common/homedir.c (dirmngr_socket_name): Rename to
34611         dirmngr_sys_socket_name.
34612         (dirmngr_user_socket_name): New.
34613         * common/asshelp.c (start_new_dirmngr): Handle sys and user dirmngr
34614         socket.
34615         * dirmngr/dirmngr.c (main): Ditto.
34616         * dirmngr/server.c (cmd_getinfo): Ditto.
34617         * sm/server.c (gpgsm_server): Ditto.
34618         * dirmngr/dirmngr-client.c (start_dirmngr): Likewise.
34619         * tools/gpgconf.c (main): Print "dirmngr-sys-socket" with --list-dirs.
34620
34621         * configure.ac (USE_DIRMNGR_AUTO_START): Set by default.
34622
34623 2014-03-12  Werner Koch  <wk@gnupg.org>
34624
34625         gpg: Add option --dirmngr-program.
34626         + commit 6dd5d99a61f24aff862ccba9f7410d7f1af87c05
34627         * g10/gpg.c: Add option --dirmngr-program.
34628         * g10/options.h (struct opt): Add field dirmngr_program.
34629         * g10/call-dirmngr.c (create_context): Use new var.
34630
34631         * dirmngr/dirmngr.c: Include gc-opt-flags.h.
34632         (main): Remove GC_OPT_FLAG_*.
34633         * tools/gpgconf-comp.c (GC_OPT_FLAG_NO_CHANGE): Move macro to ...
34634         * common/gc-opt-flags.h: here.
34635
34636         dirmngr: Detect dead keyservers and try another one.
34637         + commit fb56a273b1f2b3a99dc1d1a0850378ab7625e6b9
34638         * dirmngr/ks-action.c (ks_action_resolve): Rename var for clarity.
34639         (ks_action_search, ks_action_put): Ditto.
34640         (ks_action_get): Consult only the first server which retruned some
34641         data.
34642
34643         * dirmngr/ks-engine-hkp.c (SEND_REQUEST_RETRIES): New.
34644         (map_host): Add arg CTRL and call dirmngr_tick.
34645         (make_host_part): Add arg CTRL.
34646         (mark_host_dead): Allow the use of an URL.
34647         (handle_send_request_error): New.
34648         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Mark host dead and retry on
34649         error.
34650
34651         http: Add a flag to the URL parser indicating a literal v6 address.
34652         + commit 3d9e0eb02ce2b2e153e25deb0fc4b27b45f5026a
34653         * common/http.h (struct parsed_uri_t): Add field v6lit.
34654         * common/http.c (do_parse_uri): Set v6lit.
34655
34656 2014-03-12  NIIBE Yutaka  <gniibe@fsij.org>
34657
34658         scd: writekey support of ECC.
34659         + commit 781b94174310dceffa075719420b74b29fe41764
34660         * scd/app-openpgp.c (CURVE_SEC_P256K1, get_algo_byte): New.
34661         (store_fpr): Support ECC keys with varargs.
34662         (get_ecc_key_parameters, get_curve_name): Support secp256k1.
34663         (parse_ecc_curve): Likewise.
34664         (build_ecdsa_privkey_template, rsa_writekey, ecdsa_writekey): New.
34665         (ecdh_writekey): New.  Not implemented yet.
34666         (do_writekey): Call rsa_writekey, ecdsa_writekey, or ecdh_writekey.
34667         (do_genkey): Follow the change of store_fpr.
34668
34669 2014-03-11  Werner Koch  <wk@gnupg.org>
34670
34671         dirmngr: Put brackets around IP addresses in the hosttable.
34672         + commit 0b2cca807d5a4a3664145032271141da853e7bac
34673         * dirmngr/ks-engine-hkp.c (EAI_OVERFLOW): Provide a substitute.
34674         (my_getnameinfo): New.
34675         (map_host): Use it.
34676
34677         dirmngr: Add command option to mark hosts as dead or alive.
34678         + commit a3dee2889106fcab112c1c96b32e04d8154875e7
34679         * dirmngr/server.c (cmd_killdirmngr): Factor some code out to ...
34680         (check_owner_permission): here.
34681         (cmd_keyserver): Add options --dead and --alive.
34682         * dirmngr/ks-engine-hkp.c (host_in_pool_p): New.
34683         (ks_hkp_mark_host): New.
34684
34685         dirmngr: Make Assuan output of keyblocks easier readable.
34686         + commit 71b55c945542e695161ddbd783f87c5f534012a5
34687         * dirmngr/server.c (data_line_cookie_write): Print shorter data lines
34688         in verbose mode.
34689
34690         dirmngr: Fix HKP host selection code.
34691         + commit 3c35b46a32ac7584f3807b611cde78b199c527d6
34692         * dirmngr/server.c (cmd_keyserver): Add option --resolve and change
34693         --print-hosttable to --hosttable.
34694         * dirmngr/ks-action.c (ks_printf_help): New.
34695         (ks_action_resolve): New.
34696         * dirmngr/ks-engine-hkp.c (select_random_host): Fix selection.
34697         (ks_hkp_print_hosttable): Print to assuan stream.
34698         (map_host): Remove debug code.  Add arg FORCE_SELECT.  Return numeric
34699         IP addr if it can't be resolved.
34700         (make_host_part): Add arg FORCE_SELECT; change callers to pass false.
34701         (ks_hkp_resolve): New.
34702
34703         List readline support in configure summary.
34704         + commit f30d8b018871495327cbf711b73b04278a34f3e1
34705         * m4/readline.m4: Set gnupg_cv_have_readline.
34706         * configure.ac: Add readline support to summary output.
34707
34708 2014-03-11  NIIBE Yutaka  <gniibe@fsij.org>
34709
34710         agent: API change of agent_key_from_file.
34711         + commit ac5a1a3ccb7c3e6393bc83d73b545dec9b70e7d1
34712         * agent/findkey.c (agent_key_from_file): Always return S-expression.
34713         * agent/command.c (cmd_passwd): Distinguish by SHADOW_INFO.
34714         (cmd_export_key): Likewise.  Free SHADOW_INFO.
34715         (cmd_keytocard): Likewise.  Release S_SKEY.
34716         * agent/pkdecrypt.c (agent_pkdecrypt): Likewise.
34717         * agent/pksign.c (agent_pksign_do): Likewise.  Use the S-expression to
34718         know the key type.
34719
34720 2014-03-10  Werner Koch  <wk@gnupg.org>
34721
34722         Backport useful code from fixes for bug 1447.
34723         + commit 57d26f39afb3c75e24a8d240d7af32b9d2b9775a
34724         * configure.ac: Cehck for inet_ntop.
34725         * m4/libcurl.m4: Provide a #define for the version of the curl
34726         library.
34727
34728         scd: acquire lock in new_reader_slot.
34729         + commit 9ab9f414fb919f0bc87c301c3e36180715d0aa4e
34730         * scd/apdu.c (new_reader_slot): Acquire lock.
34731         (open_ct_reader, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
34732         (open_ccid_reader, open_rapdu_reader): Release lock.
34733         (lock_slot, trylock_slot, unlock_slot): Move more to the top.
34734
34735         Do not require libiconv for Android.
34736         + commit b278043a8f38e2706ccf617d2ac5661b33791d6b
34737         * configure.ac (require_iconv): New.  Set to false for android.
34738         (AM_ICONV): Run only if required.
34739
34740 2014-03-07  Werner Koch  <wk@gnupg.org>
34741
34742         dirmmgr: Use a portability wrapper for struct timeval.
34743         + commit feda379595e06583bc5b3610dec74890de29cb8e
34744         * dirmngr/dirmngr_ldap.c [W32]: Include winber.h.
34745         (my_ldap_timeval_t): New.
34746
34747         Silence more warnings about unused vars and args.
34748         + commit 4387ecb11cdb2addf738eb922c1b9f14c6c76efc
34749         * dirmngr/cdblib.c (cdb_init) [W32]: Remove unused var.
34750         * dirmngr/dirmngr-client.c (start_dirmngr): s/int/assuan_fd_t/.
34751         * dirmngr/dirmngr.c (w32_service_control): Mark unused args.
34752         (call_real_main): New.
34753         (main) [W32]: Use new function to match prototype.
34754         (real_main) [W32]: Mark unused vars.
34755         (handle_signal) [W32]: Do not build the function at all.
34756         (handle_connections) [W32]: Do not define signo.
34757         * dirmngr/ldap-wrapper-ce.c (outstream_reader_cb): Remove used vars.
34758         * g10/tdbio.c (ftruncate) [DOSISH]: Define only if not yet defined.
34759
34760         dirmngr: Simplify strtok macro.
34761         + commit 35266076e3452590931e58f188815859dff6de3c
34762         * dirmngr/ldap-url.c (ldap_utf8_strtok): Remove unused r3d arg.
34763         (ldap_str2charray): Remove lasts.
34764
34765         Use attribute __gnu_printf__ also in estream header files.
34766         + commit 72133b54de89e593d8193b106e9369cf90d2e1c0
34767         * common/estream-printf.h: Use attribute gnu_printf.
34768         * common/estream.h: Ditto.
34769
34770         Use attribute __gnu_printf__ with our estream-printf functions.
34771         + commit 36372dcb2f75a659b7ace0e9c46f07bb431d009c
34772         * common/mischelp.h (JNLIB_GCC_A_PRINTF): Use __gnu_printf__
34773         (JNLIB_GCC_A_NR_PRINTF): Ditto.
34774
34775         w32: Silence warnings about unused vars.
34776         + commit 094aa2589e3920d400be93ae2823a6c4b23db623
34777         * agent/gpg-agent.c (main) [W32]: Mark unused vars.
34778         * sm/gpgsm.c (run_protect_tool) [W32]: Ditto.
34779         * g10/trustdb.c (check_regexp) [DISABLE_REGEX]: Ditto.
34780         * scd/scdaemon.c (main) [W32]: Ditto.
34781         (handle_connections) [W32]: Ditto.
34782         (handle_signal) [W32]: Do not build the function at all.
34783         * scd/apdu.c (pcsc_send_apdu_direct): Ditto.
34784         (connect_pcsc_card): s/long/pcsc_dword_t/.
34785         (open_pcsc_reader_direct): Remove var listlen.
34786
34787         w32: Fix a potential problem in gpgconf's gettext.
34788         + commit a0fc42598f51ef4a958fc3c2fed7f4b8df2da3fd
34789         * tools/gpgconf-comp.c (my_dgettext) [USE_SIMPLE_GETTEXT]: Make sure
34790         to return something even DOMAIN is not given.
34791
34792         Silence several warnings when building under Windows.
34793         + commit 3032fc3ad78ac9ed857570844547afed520d635a
34794         * agent/call-scd.c (start_scd): Replace int by assuan_fd_t.
34795         (start_pinentry): Ditto.
34796         * common/asshelp.c (start_new_gpg_agent): Replace int by assuan_fd_t.
34797         * common/dotlock.c (GNUPG_MAJOR_VERSION): Include stringhelp.h for
34798         prototypes on Windows and some other platforms.
34799         * common/logging.c (fun_writer): Declare addrbuf only if needed.
34800         * g10/decrypt.c (decrypt_message_fd) [W32]: Return not_implemented.
34801         * g10/encrypt.c (encrypt_crypt) [W32]: Return error if used in server
34802         mode.
34803         * g10/dearmor.c (dearmor_file, enarmor_file): Replace GNUPG_INVALID_FD
34804         by -1 as temporary hack for Windows.
34805         * g10/export.c (do_export): Ditto.
34806         * g10/revoke.c (gen_desig_revoke, gen_revoke): Ditto.
34807         * g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Ditto.
34808         * g10/server.c (cmd_verify, gpg_server) [W32]: Return an error.
34809
34810         w32: Include winsock2.h to silence warnings.
34811         + commit cb0dcc340836a64e2d33b27f1be7bc888c084f12
34812
34813
34814         gl: Avoid warning about shadowing an arg.
34815         + commit 84fd36f8baa2b800ea47ff74935f5aaf0e55c299
34816         * gl/setenv.c (KNOWN_VALUE): s/value/_v/.
34817
34818         common: Fix build problem with Sun Studio compiler.
34819         + commit 0fc71f7277c6f833f838bbd384f1a22d0c333e8e
34820         * common/estream.c (ESTREAM_MUTEX_UNLOCK): Use int dummy dummy
34821         functions.
34822         (ESTREAM_MUTEX_INITIALIZE): Ditto.
34823
34824         gpg: Do not require a trustdb with --always-trust.
34825         + commit d8f0b83e4f04641e5e9adbdd8abada15380f981c
34826         * g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE.
34827         * g10/trustdb.c (trustdb_args): Add field no_trustdb.
34828         (init_trustdb): Set that field.
34829         (revalidation_mark):  Take care of a nonexistent trustdb file.
34830         (read_trust_options): Ditto.
34831         (tdb_get_ownertrust): Ditto.
34832         (tdb_get_min_ownertrust): Ditto.
34833         (tdb_update_ownertrust): Ditto.
34834         (update_min_ownertrust): Ditto.
34835         (tdb_clear_ownertrusts): Ditto.
34836         (tdb_cache_disabled_value): Ditto.
34837         (tdb_check_trustdb_stale): Ditto.
34838         (tdb_get_validity_core): Ditto.
34839         * g10/gpg.c (main): Do not create a trustdb with most commands for
34840         trust-model always.
34841
34842         gpg: Print a "not found" message for an unknown key in --key-edit.
34843         + commit dfb25d47a9fcfd7c7c084ea58744724cd5315086
34844         * g10/keyedit.c (keyedit_menu): Print message.
34845
34846         gpg: Protect against rogue keyservers sending secret keys.
34847         + commit db1f74ba5338f624f146a3cb41a346e46b15c8f9
34848         * g10/options.h (IMPORT_NO_SECKEY): New.
34849         * g10/keyserver.c (keyserver_spawn, keyserver_import_cert): Set new
34850         flag.
34851         * g10/import.c (import_secret_one): Deny import if flag is set.
34852
34853         agent: Fix UPDATESTARTUPTTY for ssh.
34854         + commit 90688b29f3701f4d3e2a5a49c5544fe8d2a84b2d
34855         * agent/command-ssh.c (setup_ssh_env): Fix env setting.
34856
34857         gpgv: Init Libgcrypt to avoid syslog warning.
34858         + commit 7c4bfa599fa69c3a942c8deea83737a4c5a0806e
34859         * g10/gpgv.c (main): Check libgcrypt version and disable secure
34860         memory.
34861
34862         Improve libcurl detection.
34863         + commit 5ca482d5f949444ffd453de158ee186ab07fc9b6
34864         * m4/libcurl.m4: Do not use AC_PATH_PROG if --with-libcurl as been
34865         given.  Suggested by John Marshall.
34866
34867         gpg: Remove legacy keyserver examples from the template conf file.
34868         + commit 0ab752cc2d46bbd0077bed889676169b7aeb1eb6
34869         * g10/options.skel: Update.
34870
34871         (cherry picked from commit f3c5cc8bcd37e38b5d65db6a50466e22d03d1f0c)
34872
34873         w32: Define WINVER only if needed.
34874         + commit 76b1940ad6f5f058c4a6bec35902da9f6d4e27b0
34875         * common/sysutils.c (WINVER): Define only if less that 5.0.
34876
34877         w32: Remove unused code.
34878         + commit 63b7658a29809249d7aeb0423bf8c5a693eee0c7
34879         * jnlib/w32-reg.c (write_w32_registry_string): Remove.
34880
34881         agent: Make --allow-mark-trusted the default.
34882         + commit 9942a149ff2ab919c1b2916c7bc347e578a56b14
34883         * agent/gpg-agent.c (opts, main): Add option --no-allow-mark-trusted.
34884         Put this option into the gpgconf-list.
34885         (main): Enable opt.allow_mark_trusted by default.
34886         * tools/gpgconf-comp.c (gc_options_gpg_agent): Replace
34887         allow-mark-trusted by no-allow-mark-trusted.
34888
34889         * agent/trustlist.c (agent_marktrusted): Always set the "relax" flag.
34890
34891         ssh: Add support for Putty.
34892         + commit 5105c8d2d344fd7301d456d8c13c7e90a54f7e98
34893         * agent/gpg-agent.c [W32]: Include Several Windows header.
34894         (opts): Change help text for enable-ssh-support.
34895         (opts, main): Add option --enable-putty-support
34896         (putty_support, PUTTY_IPC_MAGIC, PUTTY_IPC_MAXLEN): New for W32.
34897         (agent_init_default_ctrl): Add and asssert call.
34898         (putty_message_proc, putty_message_thread): New.
34899         (handle_connections) [W32]: Start putty message thread.
34900         * common/sysutils.c (w32_get_user_sid): New for W32 only
34901         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add
34902         --enable-ssh-support and --enable-putty-support.  Make the
34903         configuration group visible at basic level.
34904         * agent/command-ssh.c (serve_mmapped_ssh_request): New for W32 only.
34905
34906         agent: Fix binary vs. text mode problem in ssh.
34907         + commit 179012ddd48e63ca83e8f5c24537a2db45c3e122
34908         * agent/command-ssh.c (file_to_buffer)
34909         (ssh_handler_request_identities): Open streams in binary mode.
34910         (start_command_handler_ssh): Factor some code out to ..
34911         (setup_ssh_env): new function.
34912
34913         Fix syntax error for building on APPLE.
34914         + commit 4ad123d6fe341da7768e43360375e17fa89e8e0d
34915         * scd/pcsc-wrapper.c [__APPLE__]: Fix syntax error.
34916
34917         Ignore obsolete option --disable-keypad.
34918         + commit d2a6be24af0bf220bb448fdd50c0196faddee0f4
34919         * scd/scdaemon.c (opts): Ignore --disable-keypad.
34920
34921         Allow marking options as ignored.
34922         + commit 8fc9de8d6bf663f7c8419b42dab01f590a694d59
34923         * jnlib/argparse.h (ARGPARSE_OPT_IGNORE): New.
34924         (ARGPARSE_TYPE_MASK): New, for internal use.
34925         (ARGPARSE_ignore): New.
34926         * jnlib/argparse.c (optfile_parse, arg_parse): Replace remaining
34927         constants by macros.
34928         (optfile_parse): Implement ARGPARSE_OPT_IGNORE.
34929         (arg_parse): Exclide ignore options from --dump-options.
34930
34931 2014-03-06  Werner Koch  <wk@gnupg.org>
34932
34933         common: Fix recent commit 55656208.
34934         + commit 191e32026f02054b1edb4f02536875462fd0b6b3
34935         * common/membuf.c (get_membuf_shrink): Fix use of LEN.
34936
34937 2014-03-06  NIIBE Yutaka  <gniibe@fsij.org>
34938
34939         Fix g10/trust.c.
34940         + commit 5ed8e9335fb886d7ddc86728d8481e5e47485531
34941         * g10/trust.c (register_trusted_keyid, register_trusted_key)
34942         (update_ownertrust): Call functions with tdb_.
34943
34944 2014-02-26  Werner Koch  <wk@gnupg.org>
34945
34946         common: Replace all macros in strusage() returned strings.
34947         + commit 0f38c87f427a155ab5684e18e3b73956f81edfab
34948         * common/argparse.c (writechar): Remove.
34949         (writestrings): Simplify.
34950         (strusage): Use map_static_macro_string.
34951
34952         common: New function map_static_macro_string.
34953         + commit c72762f9acf3eef5c466ba76e895d7654df12ff7
34954         * common/mapstrings.c: New.
34955         * common/t-mapstrings.c: New.
34956         * common/t-support.h (DIM, DIMof): Define if not defined.
34957         * common/Makefile.am: Add new files.
34958
34959         common: New function get_membuf_shrink.
34960         + commit 556562086acd2bc2f8e3aa3126ebf155715e042b
34961         * common/membuf.c (get_membuf_shrink): New.
34962
34963         agent: Fixed unresolved symbol under Windows.
34964         + commit 55c3e5f448c26360eda31e05b1f62249119f73d9
34965         * agent/gpg-agent.c (main): s/ttyname/gnupg_ttyname/.
34966
34967         common: Require an installed libiconv.
34968         + commit 380a2aa18e0c048cfefa1cb4102dfbf902a1962b
34969         * common/utf8conv.c: Remove dynload.h.
34970         (load_libiconv): Remove.  Remove all calls to it.
34971
34972 2014-02-10  Werner Koch  <wk@gnupg.org>
34973
34974         gpg: Silent more compiler warnings due to some configure options.
34975         + commit 47e6b6bad1dff493f4102a5549a7bb54466684c2
34976         * g10/keygen.c (generate_keypair, gen_card_key)
34977         (gen_card_key_with_backup) [!ENABLE_CARD_SUPPORT]: Mark unused args.
34978
34979         tests: Avoid segv if dns cert lookup is not configured.
34980         + commit 672f4aeba8bf55839911e1fe805af6b2873853f7
34981         * common/dns-cert.c (get_dns_cert) [!USE_DNS_CERT]: Reset return args.
34982
34983         gpg: Cleanup compiler warnings due to some configure options.
34984         + commit 7901c5c2a3b7b24e9a4eaab590b0a54e9695c3e4
34985         * g10/photoid.c (show_photos) [DISABLE_PHOTO_VIEWER]: Mark args as
34986         unused.
34987         * tools/gpgconf-comp.c (my_dgettext): Mark DOMAIN as unused if NLS is
34988         not configured.
34989
34990         gpg: Allow building without any trust model support.
34991         + commit 62fb86c6589f7f74dad4741db31b3aefa0848420
34992         * configure.ac: Add option --disable-trust-models
34993         (NO_TRUST_MODELS): New ac_define and am_conditional.
34994         * g10/Makefile.am (trust_source): New.
34995         (gpg2_SOURCES): Factor some files out to above.  Add trust.c.
34996         * g10/gpg.c [NO_TRUST_MODELS]: Disable options --export-ownertrust,
34997         --import-ownertrust, --update-trustdb, --check-trustdb, --fix-trustdb,
34998         --list-trustdb, --trustdb-name, --auto-check-trustdb,
34999         --no-auto-check-trustdb, and --force-ownertrust.
35000         (parse_trust_model) [NO_TRUST_MODELS]: Do not build.
35001         (main) [NO_TRUST_MODELS]: Set trust_model to always and exclude all
35002         trustdb related option code.
35003         * g10/keyedit.c (cmds) [NO_TRUST_MODELS]: Remove menu items "trust",
35004         "enable", and "disable".
35005         * g10/keylist.c (public_key_list) [NO_TRUST_MODELS]: Do not print
35006         "tru" record.
35007
35008         * g10/trust.c: New.
35009         * g10/trustdb.c (struct key_item): Move to trustdb.h.
35010         (register_trusted_keyid): Rename to tdb_register_trusted_keyid.
35011         (register_trusted_key): Rename to tdb_register_trusted_key.
35012         (trust_letter, uid_trust_string_fixed, trust_value_to_string)
35013         (string_to_trust_value, get_ownertrust_with_min, get_ownertrust_info)
35014         (get_ownertrust_string, get_validity_info, get_validity_string)
35015         (clean_sigs_from_uid, clean_uid_from_key, clean_key): Move to trust.c.
35016         (mark_usable_uid_certs): Move to trust.c and make global.
35017         (is_in_klist): Move as inline to trustdb.h.
35018         (trustdb_check_or_update): Rename to tdb_check_or_update
35019         (revalidation_mark): Rename to tdb_revalidation_mark.
35020         (get_ownertrust): Rename to tdb_get_ownertrust.
35021         (get_min_ownertrust): Rename to tdb_get_min_ownertrust.
35022         (update_ownertrust): Rename to tdb_update_ownertrust.
35023         (clear_ownertrusts): Rename to tdb_clear_ownertrusts.
35024         (cache_disabled_value): Rename to tdb_cache_disabled_value.
35025         (check_trustdb_stale): Rename to tdb_check_trustdb_stale.
35026         (get_validity): Rename to tdb_get_validity_core, add arg MAIN_PK and
35027         factor some code out to ...
35028         * trust.c (get_validity): ...new.
35029         (check_or_update_trustdb): New wrapper.
35030         (revalidation_mark): New wrapper.
35031         (get_ownertrust): New wrapper.
35032         (get_ownertrust_with_min): New wrapper.
35033         (update_ownertrust): New wrapper.
35034         (clear_ownertrusts): New wrapper.
35035         (cache_disabled_value): New wrapper.
35036         (check_trustdb_stale): New wrapper.
35037
35038         * tests/openpgp/defs.inc (opt_always): New.  Use in all tests instead
35039         of --always-trust.
35040
35041         tests: Handle disabled algorithms.
35042         + commit ea7f895319e89150e5613b6d20f21410f99d6f22
35043         * tests/openpgp/mds.test: Skip disabled algorithms.
35044         * tests/openpgp/signencrypt-dsa.test: Ditto.
35045         * tests/openpgp/sigs-dsa.test: Ditto.
35046
35047 2014-02-07  Werner Koch  <wk@gnupg.org>
35048
35049         Silence annoying ABI change warning.
35050         + commit 111f082487dc7a2a50375e24203de31b000e0dea
35051         * configure.ac [GCC]: Pass -Wno-psabi for gcc >= 4.6.  Avoid some gcc
35052         option tests for gcc >= 4.6
35053
35054         Allow disabling of card support.
35055         + commit 8e0ba4ecd3897c748ac2f06028406604ae7baced
35056         * configure.ac: Add option --disable-card-support.  Also add
35057         am_conditional and do not build scd if card support is enabled.
35058
35059         gpg: List only available algos in --gen-key.
35060         + commit 357b142e7225e5c7f1e0f9768f48e833d5804b6a
35061         * g10/keygen.c (ask_algo, ask_curve): Take care of GPG_USE_<algo>.
35062
35063         gpg: Change --print-mds to output enabled OpenPGP algos.
35064         + commit 54a11729fb71ba06e318fe229d0a230686ed4dc8
35065         * g10/gpg.c (print_mds): Use opengpg_md_test_algo.  Test also for MD5
35066         availibility.
35067
35068         gpg: Avoid compiler warnings for disabled algos.
35069         + commit aa76a1660613ece3fc0d774856abcbe0bb158300
35070         * g10/misc.c (map_cipher_openpgp_to_gcry): Add case for disabled algo.
35071         (openpgp_pk_test_algo2): Ditto.
35072         (map_md_openpgp_to_gcry): Ditto.
35073
35074 2014-02-05  Werner Koch  <wk@gnupg.org>
35075
35076         gpg: Change format for the key size in --list-key and --edit-key.
35077         + commit 2c814806d759e5cf611200e8210137cf8502a672
35078         * g10/gpg.c (oLegacyListMode, opts, main): Add --legacy-list-mode.
35079         * g10/options.h (struct opt): Add field legacy_list_mode.
35080         * g10/keydb.h (PUBKEY_STRING_SIZE): New.
35081         * g10/keyid.c (pubkey_string): New.
35082         * g10/import.c (import_one, import_secret_one): Use pubkey_string.
35083         * g10/keylist.c (print_seckey_info): Ditto.
35084         (print_pubkey_info, print_card_key_info): Ditto.
35085         (list_keyblock_print): Ditto.
35086         * g10/mainproc.c (list_node): Ditto.
35087         * g10/pkclist.c (do_edit_ownertrust, build_pk_list): Ditto.
35088         * g10/keyedit.c (show_key_with_all_names): Ditto.  Also change the
35089         format.
35090         (show_basic_key_info): Ditto.
35091         * common/openpgp-oid.c (openpgp_curve_to_oid): Also allow "ed25519".
35092         (openpgp_oid_to_curve): Downcase "ed25519"
35093
35094 2014-01-31  Werner Koch  <wk@gnupg.org>
35095
35096         gpg: Add configure options to disable algorithms.
35097         + commit 2ba818de1aa311ba8eb27012d69e93dd16e7d4ed
35098         * acinclude.m4 (GNUPG_GPG_DISABLE_ALGO): New.
35099         * configure.ac: Add --enable-gpg-* options to disable non MUS
35100         algorithms.
35101         * g10/misc.c (map_cipher_openpgp_to_gcry): Implement these options.
35102         (openpgp_pk_test_algo2): Ditto.
35103         (map_md_openpgp_to_gcry): Ditto.
35104         (openpgp_cipher_test_algo, openpgp_md_test_algo): Simplify.
35105
35106         gpg: Improve --version algo info output.
35107         + commit 71540d40414dc8b304b45dc476e5e5650a2db20a
35108         * g10/misc.c (openpgp_pk_algo_name): Return a different string for
35109         each ECC algorithm.
35110         * g10/gpg.c (build_list_pk_test_algo): New wrapper to cope with the
35111         different algo type enums.
35112         (build_list_pk_algo_name): Ditto.
35113         (build_list_cipher_test_algo): Ditto.
35114         (build_list_cipher_algo_name): Ditto.
35115         (build_list_md_test_algo): Ditto.
35116         (build_list_md_algo_name): Ditto.
35117         (my_strusage): Use them.
35118         (list_config): Ditto. Add "pubkeyname".
35119         (build_list): Add letter==1 hack.
35120
35121         gpg: Start using OpenPGP digest algo ids.
35122         + commit bf50604a0d50b974c1d4b8ccf5d774489f996cae
35123         * g10/misc.c (print_pubkey_algo_note): Use enum typedef for the arg.
35124         (print_cipher_algo_note): Ditto.
35125         (print_digest_algo_note): Ditto.
35126         (map_md_openpgp_to_gcry): New.
35127         (openpgp_md_test_algo): Rewrite.
35128         (openpgp_md_algo_name): Rewrite to do without Libgcrypt.
35129         * g10/cpr.c (write_status_begin_signing): Remove hardwired list of
35130         algo ranges.
35131
35132         gpg: Use only OpenPGP cipher algo ids.
35133         + commit 16a6311adefff0139056714521214f845315b7f8
35134         * g10/misc.c (map_cipher_openpgp_to_gcry): Use explicit mapping and
35135         use enums for the arg and return value.
35136         (map_cipher_gcry_to_openpgp): Ditto.
35137         (openpgp_cipher_blocklen): Use constant macros.
35138         (openpgp_cipher_test_algo): Use mapping function and prepare to
35139         disable algorithms.
35140         (openpgp_cipher_algo_name): Do not use Libgcrypt.
35141
35142         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Replace
35143         CGRY_CIPHER_* by CIPHER_ALGO_*.
35144
35145         * common/openpgpdefs.h (cipher_algo_t): Remove unused
35146         CIPHER_ALGO_DUMMY.
35147
35148 2014-01-30  Werner Koch  <wk@gnupg.org>
35149
35150         gpg: Use only OpenPGP public key algo ids and add the EdDSA algo id.
35151         + commit b7f8dec6325f1c80640f878ed3080bbc194fbc78
35152         * common/sexputil.c (get_pk_algo_from_canon_sexp): Change to return a
35153         string.
35154         * g10/keygen.c (check_keygrip): Adjust for change.
35155         * sm/certreqgen-ui.c (check_keygrip): Likewise.
35156
35157         * agent/pksign.c (do_encode_dsa): Remove bogus map_pk_openpgp_to_gcry.
35158
35159         * g10/misc.c (map_pk_openpgp_to_gcry): Remove.
35160         (openpgp_pk_test_algo): Change to a wrapper for openpgp_pk_test_algo2.
35161         (openpgp_pk_test_algo2): Rewrite.
35162         (openpgp_pk_algo_usage, pubkey_nbits): Add support for EdDSA.
35163         (openpgp_pk_algo_name): Rewrite to remove need for gcry calls.
35164         (pubkey_get_npkey, pubkey_get_nskey): Ditto.
35165         (pubkey_get_nsig, pubkey_get_nenc): Ditto.
35166         * g10/keygen.c(do_create_from_keygrip):  Support EdDSA.
35167         (common_gen, gen_ecc, ask_keysize, generate_keypair): Ditto.
35168         * g10/build-packet.c (do_key): Ditto.
35169         * g10/export.c (transfer_format_to_openpgp): Ditto.
35170         * g10/getkey.c (cache_public_key): Ditto.
35171         * g10/import.c (transfer_secret_keys): Ditto.
35172         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
35173         * g10/mainproc.c (proc_pubkey_enc): Ditto.
35174         * g10/parse-packet.c (parse_key): Ditto,
35175         * g10/sign.c (hash_for, sign_file, make_keysig_packet): Ditto.
35176         * g10/keyserver.c (print_keyrec): Use openpgp_pk_algo_name.
35177         * g10/pkglue.c (pk_verify, pk_encrypt, pk_check_secret_key): Use only
35178         OpenPGP algo ids and support EdDSA.
35179         * g10/pubkey-enc.c (get_it): Use only OpenPGP algo ids.
35180         * g10/seskey.c (encode_md_value): Ditto.
35181
35182 2014-01-29  Werner Koch  <wk@gnupg.org>
35183
35184         gpg: Remove cipher.h and put algo ids into a common file.
35185         + commit ea8a1685f75d27f5277d42ea7390ad5aeaf51b1f
35186         * common/openpgpdefs.h (cipher_algo_t, pubkey_algo_t, digest_algo_t)
35187         (compress_algo_t): New.
35188         * agent/gpg-agent.c: Remove ../g10/cipher.h. Add openpgpdefs.h.
35189         * g10/cipher.h (DEK): Move to ...
35190         * g10/dek.h: new file.
35191         * g10/cipher.h (is_RSA, is_ELGAMAL, is_DSA)
35192         (PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY, PUBKEY_MAX_NSIG, PUBKEY_MAX_NENC)
35193         (PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC, PUBKEY_USAGE_CERT)
35194         (PUBKEY_USAGE_AUTH, PUBKEY_USAGE_NONE): Move to
35195         * g10/packet.h: here.
35196         * g10/cipher.h: Remove.  Remove from all files.
35197         * g10/filter.h, g10/packet.h:  Include dek.h.
35198         * g10/Makefile.am (common_source): Remove cipher.h.  Add dek.h.
35199
35200         include: Remove this directory.
35201         + commit 25b4c2acbd01f9b4c2c364f44c53b73498ed8469
35202         * include/cipher.h: Move to ...
35203         * g10/cipher.h: here.
35204         * agent/gpg-agent.c: Adjust header file name.
35205
35206         * include/host2net.h: Move to ...
35207         * common/host2net.h: here.  Change license to LGPLv3/GPLv2.  Adjust
35208         notices to reflect that only me worked on that file.
35209
35210         * include/types.h: Remove.
35211         * common/types.h: Include inttypes.h.  Add byte typedef and comments
35212         for __riscos__.
35213         * common/iobuf.h: Adjust header file name.
35214
35215         * include/_regex.h: Remove this unused file.
35216
35217         * include/Makefile.am: Remove.
35218         * Makefile.am (SUBDIRS): Remove "include".
35219         * configure.ac (AC_CONFIG_FILES): Remove include/Makefile.
35220         * include/ChangeLog-2011: Move to ...
35221         * common/ChangeLog-2011.include: here.
35222         * common/Makefile.am (EXTRA_DIST): Add file.
35223
35224         * include/zlib-riscos.h: Move this repo only file to ...
35225         * g10/zlib-riscos.h: here.
35226
35227         * include/: Remove.
35228
35229 2014-01-17  Werner Koch  <wk@gnupg.org>
35230
35231         Remove unused u64 type definitions.
35232         + commit 362a30d8c2f529cd44687066f9c33cab7b43bedc
35233         * configure.ac: Remove check for uint64 and UINT64_C.
35234         * include/types.h: Remove u64 stuff.
35235         * common/types.h: Ditto.
35236
35237 2014-01-16  NIIBE Yutaka  <gniibe@fsij.org>
35238
35239         agent: Not remove SSH socket when already running.
35240         + commit 0ee66a6f66d7389e381fffa5f9eedbc8de9add10
35241         * agent/gpg-agent.c (main): Defer setting of socket_name_ssh to avoid
35242         removal of the socket when it will die in create_server_socket for
35243         socket_name.
35244
35245         agent: Fix agent_is_eddsa_key.
35246         + commit 9c731bbedfd8bded5efd886304c5ca6655768c45
35247         * agent/findkey.c (agent_is_eddsa_key): Implemented.
35248
35249 2014-01-15  NIIBE Yutaka  <gniibe@fsij.org>
35250
35251         Add secp256k1.
35252         + commit c5e41f539b9a21cbad10c7dae95572a4445d31c3
35253         * common/openpgp-oid.c (openpgp_curve_to_oid): Add secp256k1.
35254         (openpgp_oid_to_curve): Likewise.
35255
35256         * g10/keygen.c (ask_curve): Add secp256k1.
35257
35258 2014-01-10  Werner Koch  <wk@gnupg.org>
35259
35260         autogen.sh: Add rule for 64 bit windows.
35261         + commit aedfa95bcc49156f2bc6ae5d0f385705d4fbdd32
35262
35263
35264         Turn autogen.sh into a generic script.
35265         + commit e7973d36d88178b4b0a977e3fcc0d62600777618
35266         * autogen.sh: Revamp.
35267         * autogen.rc: New.
35268         * Makefile.am (EXTRA_DIST): Add autogen.rc.
35269
35270         Rename scripts/ to build-aux/
35271         + commit 99a48b2fcdf7c33fe553511c12f2ebb8eea5c634
35272         * scripts/: Rename to build-aux/
35273         * Makefile.am: Adjust accordingly.
35274         * configure.ac (AC_CONFIG_AUX_DIR): Change to build-aux.
35275
35276 2014-01-09  Werner Koch  <wk@gnupg.org>
35277
35278         Improve the speedo make script.
35279         + commit a55ffb9da9a844bd2bd73a4a2ea65bf18b21c57f
35280         * scripts/gpg-w32-dev/README: Remove
35281         * scripts/gpg-w32-dev/GNUmakefile, scripts/gpg-w32-dev/speedo.mk:
35282         Merge into ..
35283         * scripts/speedo.mk: this.
35284
35285         gpgsplit: Allow building without zlib support.
35286         + commit 00d5d2204cefb0f4b953e0c00448f16aab2d39c7
35287         * tools/gpgsplit.c [!HAVE_ZLIB]: Do not include zlib.h.
35288         (handle_zlib): Build only if HAVE_ZLIB is defined.
35289         (write_part): Support zlib and zip only if HAVE_ZLIB is defined.
35290
35291         w32: Fix backslash quoting in registry name.
35292         + commit fa318406c9bdb60aee1e1b410e4c9e0b3eb1392e
35293         * configure.ac (GNUPG_REGISTRY_DIR): Double backslashes.
35294
35295         Fix test for zlib.
35296         + commit 477aabaf753f987987f7a2e1f999a499ea3bd103
35297         * configure.ac (HAVE_ZLIB): Define only if found.
35298
35299         Add --enable-silent-rules stuff.
35300         + commit aba53e9f96d0c9b270edef0806976a56326249c4
35301         * configure.ac: Add AM_SILENT_RULES.
35302
35303 2014-01-08  Werner Koch  <wk@gnupg.org>
35304
35305         w32: Add macro for the registry key.
35306         + commit 75ba215ebd8be7e14b26bb53ef3c7d41e4ce1e02
35307         * configure.ac (GNUPG_REGISTRY_DIR) [W32]: New ac-define.
35308         * common/homedir.c (default_homedir): Use it.
35309         * common/logging.c (do_logv): Use it.
35310
35311 2013-12-11  Werner Koch  <wk@gnupg.org>
35312
35313         gpg: Change --show-session-key to print the session key earlier.
35314         + commit 101a54add351ff62793cbfbf3877787c4791f833
35315         * g10/cpr.c (write_status_strings): New.
35316         (write_status_text): Replace code by a call to write_status_strings.
35317         * g10/mainproc.c (proc_encrypted): Remove show_session_key code.
35318         * g10/decrypt-data.c (decrypt_data): Add new show_session_key code.
35319
35320 2013-12-05  Werner Koch  <wk@gnupg.org>
35321
35322         gpg: Change OID of Ed25519 and add Brainpool oids.
35323         + commit 59207a86e5f40c77fed296b642bf76692e8eef65
35324         * common/openpgp-oid.c (openpgp_curve_to_oid): Change OID for
35325         Ed25519.  Add brainpool OIDs.
35326         (openpgp_oid_to_curve): Ditto.
35327
35328 2013-11-29  Werner Koch  <wk@gnupg.org>
35329
35330         common: Add put_membuf_printf.
35331         + commit 159d42ee6ab21d97f40ee129445f37209b875739
35332         * common/membuf.c (put_membuf_printf): New.
35333
35334 2013-11-27  Werner Koch  <wk@gnupg.org>
35335
35336         gpg: Change armor Version header to emit only the major version.
35337         + commit e951782e937ce290be0d89d83e84b3daea997587
35338         * g10/options.h (opt): Rename field no_version to emit_version.
35339         * g10/gpg.c (main): Init opt.emit_vesion to 1.  Change --emit-version
35340         to bump up opt.emit_version.
35341         * g10/armor.c (armor_filter): Implement different --emit-version
35342         values.
35343
35344 2013-11-18  Werner Koch  <wk@gnupg.org>
35345
35346         Make use of the *_NAME etc macros.
35347         + commit cc9a0b69b698ba436eaf777e5020532845b56236
35348         Replace hardwired strings at many places with new macros from config.h
35349         and use the new strusage macro replacement feature.
35350
35351         * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
35352         sentinels.
35353         * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
35354
35355         Add strusage macro replacement feature.
35356         + commit 798daaa1ddf73f64cf840fbdc1f4c5b9c4b4ec13
35357         * common/argparse.c (writechar): New.
35358         (writestrings): Add macro replacement feature.
35359         (show_help): Remove specialized @EMAIL@ replacement.
35360         * configure.ac (GNUPG_NAME, GPG_NAME, GPGSM_NAME): Define.
35361         (GPG_AGENT_NAME, DIRMNGR_NAME, G13_NAME, GPGCONF_NAME): Define.
35362         (GPGTAR_NAME, GPG_AGENT_INFO_NAME, GPG_AGENT_SOCK_NAME): Define.
35363         (GPG_AGENT_SSH_SOCK_NAME, DIRMNGR_INFO_NAME): Define.
35364         (DIRMNGR_SOCK_NAME): Define.
35365
35366 2013-11-15  Werner Koch  <wk@gnupg.org>
35367
35368         kbx: Implement update operation for OpenPGP keyblocks.
35369         + commit 5499942571a88a1223a7318992605c6d29858866
35370         * kbx/keybox-update.c (keybox_update_keyblock): Implement.
35371         * kbx/keybox-search.c (get_blob_flags): Move to ...
35372         * kbx/keybox-defs.h (blob_get_type): here.
35373         * kbx/keybox-file.c (_keybox_read_blob2): Fix calling without R_BLOB.
35374         * g10/keydb.c (build_keyblock_image): Allow calling without
35375         R_SIGSTATUS.
35376         (keydb_update_keyblock): Implement for keybox.
35377
35378         * kbx/keybox-dump.c (_keybox_dump_blob): Fix printing of the unhashed
35379         size.  Print "does not expire" also on 64 bit platforms.
35380
35381         gpg: Rework ECC support and add experimental support for Ed25519.
35382         + commit 402aa0f94854bb00475c934be5ca6043a4632126
35383         * agent/findkey.c (key_parms_from_sexp): Add algo name "ecc".
35384         (agent_is_dsa_key): Ditto.
35385         (agent_is_eddsa_key): New.  Not finished, though.
35386         * agent/pksign.c (do_encode_eddsa): New.
35387         (agent_pksign_do): Use gcry_log_debug functions.
35388         * agent/protect.c (agent_protect): Parse a flags parameter.
35389         * g10/keygen.c (gpg_curve_to_oid): Move to ...
35390         * common/openpgp-oid.c (openpgp_curve_to_oid): here and rename.
35391         (oid_ed25519): New.
35392         (openpgp_oid_is_ed25519): New.
35393         (openpgp_oid_to_curve): New.
35394         * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): New.
35395         * g10/build-packet.c (gpg_mpi_write): Write the length header also for
35396         opaque MPIs.
35397         (gpg_mpi_write_nohdr): New.
35398         (do_key): Use gpg_mpi_write_nohdr depending on algorithm.
35399         (do_pubkey_enc): Ditto.
35400         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Use
35401         gpg_mpi_write_nohdr.
35402         * g10/export.c (transfer_format_to_openpgp):
35403         * g10/keygen.c (ecckey_from_sexp): Return the error.
35404         (gen_ecc): Repalce arg NBITS by CURVE.
35405         (read_parameter_file): Add keywords "Key-Curve" and "Subkey-Curve".
35406         (ask_curve): New.
35407         (generate_keypair, generate_subkeypair): Use ask_curve.
35408         (do_generate_keypair): Also pass curve name.
35409         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Print
35410         curve name.
35411         * g10/parse-packet.c (mpi_read): Remove workaround for
35412         Libcgrypt < 1.5.
35413         (parse_key): Fix ECC case.  Print the curve name.
35414         * g10/pkglue.c (mpi_from_sexp): Rename to get_mpi_from_sexp.
35415         (pk_verify, pk_check_secret_key): Add special case for Ed25519.
35416         * g10/seskey.c (encode_md_value): Ditto.
35417         * g10/sign.c (do_sign, hash_for, sign_file): Ditto.
35418
35419         kbx: Fix possible segv in kbxdump.
35420         + commit 9ae48b173c93f4747a9826beb1fbd023c4362c22
35421         * kbx/keybox-dump.c (_keybox_dump_blob): Check length before get32.
35422
35423         Require Libgcrypt 1.6.
35424         + commit b27161cd0c76ae6e2381f60c3a502cde3a2aaa21
35425         * agent/pksign.c (do_encode_dsa): Remove Libgcrypt version check
35426
35427 2013-11-13  NIIBE Yutaka  <gniibe@fsij.org>
35428
35429         scd: more pinpad input fix for PC/SC.
35430         + commit abd922e79b2ff63a5a763a30d4a06a91f93d0b12
35431         * scd/apdu.c (check_pcsc_pinpad): Set default values here.
35432         (pcsc_pinpad_verify, pcsc_pinpad_modify): Remove setting default
35433         values, as it's too late.
35434
35435 2013-11-11  NIIBE Yutaka  <gniibe@fsij.org>
35436
35437         scd: more pinpad fix.
35438         + commit 037dea9dd5eac7a74df0e12cb437e71fb0732afa
35439         * scd/apdu.c (check_pcsc_pinpad): Set ->minlen and ->maxlen only when
35440         those are specified.
35441         (pcsc_pinpad_modify): Remove old check code.
35442
35443 2013-10-29  NIIBE Yutaka  <gniibe@fsij.org>
35444
35445         scd: pinpad fix for PC/SC on Windows.
35446         + commit 32989ad2b152d18198d718bc2c7232ce3e79c72f
35447         * scd/apdu.c (SCARD_CTL_CODE): Fix for Windows.
35448
35449 2013-10-28  Werner Koch  <wk@gnupg.org>
35450
35451         doc: Change yat2m to allow arbitrary condition names.
35452         + commit a15c35f37ed2b58805adc213029998aa3e52f038
35453         * doc/yat2m.c (MAX_CONDITION_NESTING): New.
35454         (gpgone_defined): Remove.
35455         (condition_s, condition_stack, condition_stack_idx): New.
35456         (cond_is_active, cond_in_verbatim): New.
35457         (add_predefined_macro, set_macro, macro_set_p): New.
35458         (evaluate_conditions, push_condition, pop_condition): New.
35459         (parse_file): Rewrite to use the condition stack.
35460         (top_parse_file): Set prefined macros.
35461         (main): Change -D to define arbitrary macros.
35462
35463 2013-10-25  NIIBE Yutaka  <gniibe@fsij.org>
35464
35465         scd: fix pinpad input on Windows.
35466         + commit de7e15c6b80164a351586e9087aad86420c8b89e
35467         * scd/apdu.c (open_pcsc_reader_direct): Don't call
35468         pcsc_vendor_specific_init here, but...
35469         (connect_pcsc_card): Call it here.
35470
35471 2013-10-23  NIIBE Yutaka  <gniibe@fsij.org>
35472
35473         po: Update Japanese translation.
35474         + commit b66158cac7347e4c56c79ab7b5416ae5b3f4a0a2
35475
35476
35477 2013-10-16  NIIBE Yutaka  <gniibe@fsij.org>
35478
35479         scd: add pinpad readers information for PC/SC service.
35480         + commit 5efcc2b8fee8de31d255d09037f0a1e6209eab32
35481         * scd/apdu.c (pcsc_vendor_specific_init): Add information for Cherry
35482         ST-2xxx, Reiner cyberJack, Vasco DIGIPASS, FSIJ Gnuk Token, and KAAN
35483         Advance.
35484
35485 2013-10-15  NIIBE Yutaka  <gniibe@fsij.org>
35486
35487         scd: remove pin length check.
35488         + commit e0ab665a792ada6470cb8885b8427acc3c960998
35489         * scd/apdu.c (pcsc_pinpad_verify): Remove old check code for pin
35490         length.
35491
35492 2013-10-04  Werner Koch  <wk@gnupg.org>
35493
35494         gpg: Limit the nesting level of I/O filters.
35495         + commit e6175055fbca958b7fa43aaf84359574ca7f3ebb
35496         * common/iobuf.c (MAX_NESTING_FILTER): New.
35497         (iobuf_push_filter2): Limit the nesting level.
35498
35499         * g10/mainproc.c (mainproc_context): New field ANY.  Change HAVE_DATA
35500         and ANY_SIG_SIGN to bit fields of ANY.  Add bit field
35501         UNCOMPRESS_FAILED.
35502         (proc_compressed): Avoid printing multiple Bad Data messages.
35503         (check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA.
35504
35505 2013-10-02  Werner Koch  <wk@gnupg.org>
35506
35507         gpg: Fix bug with deeply nested compressed packets.
35508         + commit 0899f6d4be0406c9efbf9c3f342825804f359b5a
35509         * g10/mainproc.c (MAX_NESTING_DEPTH): New.
35510         (proc_compressed): Return an error code.
35511         (check_nesting): New.
35512         (do_proc_packets): Check packet nesting depth.  Handle errors from
35513         check_compressed.
35514
35515 2013-09-08  Werner Koch  <wk@gnupg.org>
35516
35517         Switch to deterministic DSA.
35518         + commit 6466db10fb22a4f24df4edad9c5cb33ec67321bd
35519         * agent/pksign.c (rfc6979_hash_algo_string): New.
35520         (do_encode_dsa) [Libgcrypt >= 1.6]: Make use of RFC-6979.
35521
35522 2013-08-30  Werner Koch  <wk@gnupg.org>
35523
35524         scd: Suppress gcc warning about possible uninitialized use.
35525         + commit 244587ea41d4c75cb5570356f09a6705864a7e8d
35526         * scd/app-nks.c (parse_pwidstr): Always init r_pwid.
35527
35528         gpg: Use 2048 as the default keysize in batch mode.
35529         + commit 4c3b35b067a4e7002bb6473b879b551014bb7857
35530         * g10/keygen.c (gen_elg, gen_dsa, gen_rsa): Set default keysize to
35531         2048.
35532
35533         gpgtar: Fix building for systems with a separate libintl.
35534         + commit 12990efb45ee7c425167aad19fe759d5609c5182
35535         * tools/Makefile.am (gpgtar_LDADD): Add LIBINTL and LIBICONV.
35536
35537         scd: Use vendor and product id macros also in apdu.c.
35538         + commit fc31d730d8506b069de1d3529ed26660856bf07f
35539         * scd/ccid-driver.c: Move vendor and product ids to ...
35540         * scd/ccid-driver.h: here.
35541         * scd/apdu.c (CCID_DRIVER_INCLUDE_USB_IDS): Define to include ids.
35542         (pcsc_vendor_specific_init): Use vendor and product id macros.
35543
35544 2013-08-30  NIIBE Yutaka  <gniibe@fsij.org>
35545
35546         scd: PC/SC pinpad input improvement.
35547         + commit 95a3bffeaf07e8bf9487d4b165c336d166236fc1
35548         * scd/apdu.c (struct reader_table_s): Add members: PINMIN, PINMAX, and
35549         PINPAD_VERLEN_SUPPORTED.
35550         (CM_IOCTL_VENDOR_IFD_EXCHANGE, FEATURE_GET_TLV_PROPERTIES,
35551         PCSCv2_PART10_PROPERTY_*): New.
35552         (new_reader_slot): Initialize pinpad_varlen_supported, pinmin, pinmax.
35553         (pcsc_vendor_specific_init): New.
35554         (open_pcsc_reader_direct, open_pcsc_reader_wrapped): Call
35555         pcsc_vendor_specific_init.
35556         (check_pcsc_pinpad): Not detect here but use the result of
35557         pcsc_vendor_specific_init.
35558         (pcsc_pinpad_verify, pcsc_pinpad_modify): Specify bNumberMessage.
35559
35560 2013-08-29  Jonas Borgström  <jonas@borgstrom.se>
35561
35562         scd: add support for RSA_CRT and RSA_CRT_N key import.
35563         + commit cc67918c088e90c1d9a507af5f6288e8faa93d87
35564         * scd/app-openpgp.c (do_writekey): Added RSA_CRT and RSA_CRT_N support.
35565
35566 2013-08-29  Werner Koch  <wk@gnupg.org>
35567
35568         kbx: Add a few macros for easier readability.
35569         + commit 3adfaa9beee4502479b5673c7dfd386680a920c5
35570         * kbx/keybox-update.c (FILECOPY_INSERT)
35571         (FILECOPY_DELETE, FILECOPY_UPDATE): New macros.  Replace numbers by
35572         them.
35573
35574 2013-08-28  Werner Koch  <wk@gnupg.org>
35575
35576         Fix commit 04e2c83f.
35577         + commit fdbf76eee6a4e81b040d423926b71af7b491fb4a
35578         * agent/command-ssh.c (stream_read_string): Do not assign to a NULL
35579         ptr.
35580
35581         gpg: Make decryption with the OpenPGP card work.
35582         + commit 780ba3233618393835970bac4cf8aab713f4d7fa
35583         * scd/app-common.h (APP_DECIPHER_INFO_NOPAD): New.
35584         * scd/app-openpgp.c (do_decipher): Add arg R_INFO.
35585         * scd/app-nks.c (do_decipher): Add arg R_INFO as a dummy.
35586         * scd/app.c (app_decipher): Add arg R_INFO.
35587         * scd/command.c (cmd_pkdecrypt): Print status line "PADDING".
35588         * agent/call-scd.c (padding_info_cb): New.
35589         (agent_card_pkdecrypt): Add arg R_PADDING.
35590         * agent/divert-scd.c (divert_pkdecrypt): Ditto.
35591         * agent/pkdecrypt.c (agent_pkdecrypt): Ditto.
35592         * agent/command.c (cmd_pkdecrypt):  Print status line "PADDING".
35593         * g10/call-agent.c (padding_info_cb): New.
35594         (agent_pkdecrypt): Add arg R_PADDING.
35595         * g10/pubkey-enc.c (get_it): Use padding info.
35596
35597         agent: Fix two compiler warnings.
35598         + commit 04e2c83f189cc56342e1be784bdc63761ccdb5bb
35599         * agent/command.c (cmd_preset_passphrase, pinentry_loopback): Use %zu
35600         in format string.
35601         * scd/ccid-driver.c (ccid_get_atr): Ditto.
35602         * agent/command-ssh.c (stream_read_string): Init arg STRING_SIZE to
35603         avoid maybe_unitialized warning.
35604
35605 2013-08-27  NIIBE Yutaka  <gniibe@fsij.org>
35606
35607         scd: fix parsing login-data DO.
35608         + commit b6d54f1196d5f110fd94dfd661e74dbc60ca9811
35609         * scd/app-openpgp.c (parse_login_data): Release RELPTR.  Fix parsing.
35610
35611         scd: fix Vega for Alpha reader.
35612         + commit 54cbab29c700db2df74e808f16db49170e6c42f1
35613         * scd/ccid-driver.c (ccid_vendor_specific_init): Fix error handling
35614         and size of command.
35615
35616 2013-08-21  Werner Koch  <wk@gnupg.org>
35617
35618         scd: Make SPRx32 pinpad work with PC/SC on Windows.
35619         + commit 5c5e52df4b92e23045ac87abac09357de58920d4
35620         * scd/apdu.c (CM_IOCTL_GET_FEATURE_REQUEST): Use SCARD_CTL_CODE.
35621         (SCARD_CTL_CODE): Define if not defined.
35622         (reader_table_s): Add is_spr532.
35623         (new_reader_slot): Clear it.
35624         (check_pcsc_pinpad): Set it.
35625         (pcsc_pinpad_verify, pcsc_pinpad_modify): Add fix for SPR532.
35626
35627         scd: Improve --enable-pinpad-varlen.
35628         + commit 7bde2bf3b0ddb5d3515a44879e1a7ddb581a5c0b
35629         * tools/gpgconf-comp.c (gc_options_scdaemon): Add
35630         enable-pinpad-varlen.
35631         * scd/apdu.c (check_pcsc_pinpad): Detect SPRx32 reader.
35632
35633 2013-08-08  Werner Koch  <wk@gnupg.org>
35634
35635         agent: Extend cmd KEYINFO to return data from sshcontrol.
35636         + commit 50c98c7ed6b542857ee2f902eca36cda37407737
35637         * agent/command-ssh.c (struct control_file_s): Rename to
35638         ssh_control_file_s.
35639         (ssh_open_control_file, ssh_close_control_file)
35640         (ssh_read_control_file, ssh_search_control_file): New.
35641         (control_file_t):  Rename and move to ...
35642         * agent/agent.h (ssh_control_file_t): here.
35643         * agent/command.c (do_one_keyinfo): Add args is_ssh, ttl, disabled,
35644         and confirm. Rename unknown keytype indicator from '-' to 'X'.  Extend
35645         output.
35646         (cmd_keyinfo): Add options --ssh-list and --with-ssh.
35647
35648 2013-08-02  Werner Koch  <wk@gnupg.org>
35649
35650         gpg: No need to create a trustdb when encrypting with --always-trust.
35651         + commit 498b9a95dc65c43240835d64cc92d8fb43014d53
35652         * g10/gpg.c (main): Special case setup_trustdb for --encrypt.
35653
35654 2013-08-01  Werner Koch  <wk@gnupg.org>
35655
35656         w32: Fix recent patch 9ff72e4.
35657         + commit ca6fe88c0068f8d45ef39df0fc7b161998a91fe9
35658         * common/homedir.c (check_portable_app): Fix the name of the control
35659         file.
35660
35661         agent: Include missing prototype.
35662         + commit ef6a6d973c2bcc54006c04dc41f978ff01005c97
35663         * agent/protect.c: Include cvt-openpgp.h.
35664
35665         w32: Add code to support a portable use of GnuPG.
35666         + commit 9ff72e4e7e4f56c241a525479a94ed4c95efc23f
35667         * common/homedir.c (w32_bin_is_bin, w32_portable_app) [W32]: New.
35668         (check_portable_app) [W32]: New.
35669         (standard_homedir, default_homedir) [W32]: Support the portable flag.
35670         (w32_rootdir, w32_commondir) [W32]: Ditto.
35671         (gnupg_bindir, gnupg_cachedir, dirmngr_socket_name) [W32]: Ditto.
35672         * common/logging.h (JNLIB_LOG_NO_REGISTRY): New.
35673         * common/logging.c (no_registry): New variable.
35674         (log_set_prefix, log_get_prefix): Set/get that variable.
35675         (do_logv): Do not check the registry if that variable is set.
35676
35677         Silence compiler warning about deprecated Libgcrypt symbols.
35678         + commit db4651734fe91935b17876dc9194329b00066eff
35679         * configure.ac (AH_BOTTOM): Define GCRYPT_NO_DEPRECATED.
35680
35681         dirmngr: Define missing LDAP constant.
35682         + commit ef2e2e54020c3475bf2129c3ec8360c7bad3a6c9
35683         * dirmngr/ldap-url.c (LDAP_SCOPE_DEFAULT): Define if missing.
35684
35685         scd: Fix a syntax error for Apple and Windows.
35686         + commit 25b0357bf0a4861a751cfbc3e0335ae05c8b2b1b
35687         * scd/apdu.c (pcsc_dword_t) [W32]: Fix syntax error.
35688
35689         common: Fix a build error when using adns.
35690         + commit ffa7472db551f12f66b9789c31fabb5fc80cc13a
35691         * common/dns-cert.c (get_dns_cert) [USE_ADNS]: Fix synatx error.
35692
35693 2013-07-31  Werner Koch  <wk@gnupg.org>
35694
35695         common: Comment out unused code.
35696         + commit f101f34fffee4a02e7a5f62b59667e45e50e8325
35697         * common/w32-reg.c (write_w32_registry_string): Comment out.
35698
35699         dirmngr: Remove unused file.
35700         + commit 2830fcb83c99289a49da0e111766daf2d9a1fa3b
35701         * dirmngr/get-path.c: Remove.
35702
35703 2013-06-27  Werner Koch  <wk@gnupg.org>
35704
35705         sm: Remove cruft from source files.
35706         + commit f254497e09fa4e0e24e63d14f7316fc31c938844
35707         * sm/keydb.c, sm/keydb.h: Remove disabled code parts.
35708
35709         Prepare for newer automake versions.
35710         + commit 043e2728c813299fafcf62cd125ecf872b26179e
35711         * configure.ac (AM_INIT_AUTOMAKE): Replace 2 argument form by the
35712         option form.  Add options from the top Makefile.
35713         (AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADER.
35714         * Makefile.am (AUTOMAKE_OPTIONS): Remove.
35715
35716         * kbx/Makefile.am: Remove INCLUDES.  Include cmacros.am.  FActor some
35717         AM_CPPFLAGS options to  AM_CFLAGS.
35718
35719 2013-06-26  Werner Koch  <wk@gnupg.org>
35720
35721         Fix Makefile regression.
35722         + commit 136f190a2f20c6ec4d5c3ca3ac7f0440c14e4dc2
35723         * agent/Makefile.am (gpg_agent_DEPENDENCIES): Remove cruft from wrong
35724         resolve conflict 2013-04-25.
35725         (gpg_agent_DEPENDENCIES): Remove obsolete gpg_agent_res_deps
35726         (gpg_agent_LDFLAGS): Remove obsolete gpg_agent_res_ldflags.
35727
35728 2013-05-22  Werner Koch  <wk@gnupg.org>
35729
35730         Implement unattended OpenPGP secret key import.
35731         + commit 7777e68d0482c942f527e91c04adbcfb40bc8bef
35732         * agent/command.c (cmd_import_key): Add option --unattended.
35733         * agent/cvt-openpgp.c (convert_transfer_key): New.
35734         (do_unprotect): Factor some code out to ...
35735         (prepare_unprotect): new function.
35736         (convert_from_openpgp): Factor all code out to ...
35737         (convert_from_openpgp_main): this.  Add arg 'passphrase'.  Implement
35738         openpgp-native protection modes.
35739         (convert_from_openpgp_native): New.
35740         * agent/t-protect.c (convert_from_openpgp_native): New dummy fucntion
35741         * agent/protect-tool.c (convert_from_openpgp_native): Ditto.
35742         * agent/protect.c (agent_unprotect): Add arg CTRL.  Adjust all
35743         callers.  Support openpgp-native protection.
35744         * g10/call-agent.c (agent_import_key): Add arg 'unattended'.
35745         * g10/import.c (transfer_secret_keys): Use unattended in batch mode.
35746
35747         New debug functions log_printcanon and log_printsexp.
35748         + commit cb6a64bb78296c8e9f72df0c482ff847e89a1541
35749         * common/sexputil.c (sexp_to_string, canon_sexp_to_string): New.
35750         (log_printcanon, log_printsexp): New.
35751
35752         agent: Fix length detection of canonical formatted openpgp keys.
35753         + commit 0f0e0559f9b160824f10dc17b389268cdb53aea4
35754         * agent/command.c (cmd_import_key): Pass 0 instead of KEYLEN to
35755         gcry_sexp_canon_len.
35756
35757         agent: New option --disable-check-own-socket.
35758         + commit f2d8a14e1b12534eba69d595a62c78f92331e11b
35759         * agent/gpg-agent.c (oDisableCheckOwnSocket): New.
35760         (disable_check_own_socket): New.
35761         (parse_rereadable_options): Set new option.
35762         (check_own_socket): Implement new option.
35763
35764 2013-05-07  Werner Koch  <wk@gnupg.org>
35765
35766         w32: Add icons and version information.
35767         + commit 88e24341e57c96e31a25e92e09d67989e64cc1c1
35768         * common/gnupg.ico: New.  Take from artwork/gnupg-favicon-1.ico.
35769         * agent/gpg-agent-w32info.rc: New.
35770         * g10/gpg-w32info.rc: New.
35771         * scd/scdaemon-w32info.rc: New.
35772         * sm/gpgsm-w32info.rc: New.
35773         * tools/gpg-connect-agent-w32info.rc: New.
35774         * common/w32info-rc.h.in: New.
35775         * configure.ac (BUILD_REVISION, BUILD_FILEVERSION, BUILD_TIMESTAMP)
35776         (BUILD_HOSTNAME): New.
35777         (AC_CONFIG_FILES): Add w32info-rc.h.
35778         * am/cmacros.am (.rc.o): New rule.
35779         * agent/Makefile.am, common/Makefile.am, g10/Makefile.am
35780         * scd/Makefile.am, sm/Makefile.am, tools/Makefile.am: Add stuff to
35781         build resource files.
35782
35783 2013-05-07  Ian Abbott  <abbotti@mev.co.uk>
35784
35785         doc: fix some Texinfo warnings.
35786         + commit 2c3fc4719b92d9e3ac32efd134a930e1cc126032
35787         * doc/gpg.texi: Fix syntax and add missing menu entries.
35788         * doc/gpgsm.texi: Fix subsectioning.
35789
35790 2013-04-22  Werner Koch  <wk@gnupg.org>
35791
35792         Fix potential heap corruption in "gpg -v --version".
35793         + commit 151b78cc26d728e9eb42620e0caf8c6f4bd7f839
35794         * g10/gpg.c (build_list): Rewrite to cope with buffer overflow in
35795         certain locales.
35796
35797 2013-04-19  Werner Koch  <wk@gnupg.org>
35798
35799         gpgsm: Remove non-implemented commands from --help.
35800         + commit d6798d261cbe6519ef5b3ebb474e2ad348442c0c
35801         * sm/gpgsm.c (opts): Removed commands --clearsign, --symmetric,
35802         --send-keys, and --recv-keys.
35803
35804 2013-04-19  Daiki Ueno  <ueno@gnu.org>
35805
35806         Make sure to call fflush if estream_t is backed with stdio.
35807         + commit e498180d5647d3427a7d7e6c82a9f09cf1ba439d
35808         * common/estream.c (es_func_fp_write): Call fflush after fwrite.
35809
35810 2013-04-19  Werner Koch  <wk@gnupg.org>
35811
35812         doc: Formatting fixes.
35813         + commit ff6115227a1ced14e2fb3d160a12181b9dfbc502
35814         * doc/Makefile.am (.fig.jpg): Correct to use -L jpeg.
35815         * doc/gpg.texi: Fix cross reference for --options.
35816         * doc/gpgsm.texi: Likewise.
35817         * doc/gpl.texi: Fix enumerate and re-indent examples.
35818
35819 2013-04-01  NIIBE Yutaka  <gniibe@fsij.org>
35820
35821         scd: move SCDaemon to libexecdir.
35822         + commit 021767d8aa11aac8ac87dc3a31969ee6cfa65966
35823         * common/homedir.c (gnupg_module_name): It's now libexecdir.
35824         * scd/Makefile.am (libexec_PROGRAMS): Add scdaemon
35825         (bin_PROGRAMS): Remove scdaemon.
35826
35827 2013-03-29  Werner Koch  <wk@gnupg.org>
35828
35829         copyright assignments are not anymore required.
35830         + commit 07227279c44e3af0939f90025a0d22b782d0f185
35831
35832
35833 2013-03-26  NIIBE Yutaka  <gniibe@fsij.org>
35834
35835         scd: PC/SC status fix.
35836         + commit 64b1a2cf6f18348544a2d2cd4d49fd27bf01c150
35837         * scd/apdu.c (pcsc_get_status_direct): Check PCSC_STATE_MUTE only when
35838         PCSC_STATE_PRESENT.
35839
35840         * scd/pcsc-wrapper.c (handle_status): Ditto.
35841
35842         scd: PC/SC cleanup (more).
35843         + commit b9aceaa442914beb4f5359283053b43ba5a46b4c
35844         * scd/apdu.c (control_pcsc_direct, control_pcsc_wrapped, control_pcsc)
35845         (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify): Use
35846         pcsc_dword_t.
35847
35848         scd: call update_card_removed only when detecting removal.
35849         + commit 1062893832bb15eaac853f52e1cb673e5e03790a
35850         * scd/command.c (update_reader_status_file): Add condition
35851         vr->status == 0.
35852
35853 2013-03-22  NIIBE Yutaka  <gniibe@fsij.org>
35854
35855         scd: PC/SC cleanup.
35856         + commit ee95c23fcdc6673db0fc7287ab2197915d9b55b3
35857         * scd/apdu.c (pcsc_dword_t): New.  It was named as DWORD (double-word)
35858         when a word was 16-bit.
35859         (struct reader_table_s): Fixes for types.
35860         (struct pcsc_readerstate_s) [__APPLE__]: Enable #pragma pack(1).
35861         Throughout: Fixes for types.
35862
35863         * scd/pcsc-wrapper.c: Likewise.
35864
35865 2013-03-21  NIIBE Yutaka  <gniibe@fsij.org>
35866
35867         po: Enable ja.po.
35868         + commit a75a08d6e30e93e1793aa78a15d473a3ea7623cb
35869         * po/LINGUAS: Enable ja.po.
35870
35871         scd: change default value of pinpad maxlen.
35872         + commit ca66f5c779af74d0eb7221afd7a9707201931e50
35873         * scd/apdu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Default value
35874         of maxlen for pinpad input is now 15 (was: 25).
35875
35876         * scd/ccid-driver.c (ccid_transceive_secure): Likewise.
35877
35878 2013-03-20  Werner Koch  <wk@gnupg.org>
35879
35880         Add code to allow for late memory cleanup.
35881         + commit 2739834206f23833161898a73427b8a9c6d5d26d
35882         * common/init.c (mem_cleanup_item_t): New.
35883         (run_mem_cleanup): New.
35884         (_init_common_subsystems): Add an atexit for it.
35885         (register_mem_cleanup_func): New.
35886
35887         * g10/kbnode.c (cleanup_registered): New.
35888         (release_unused_nodes): New.
35889         (alloc_node): Call register_mem_cleanup_func.
35890
35891         kbx: Remove unused macro.
35892         + commit 44159b681f8f09000fabfc3ee294d5821578d3a6
35893         * kbx/keybox.h (KEYBOX_WITH_OPENPGP): Remove unused macro.
35894
35895 2013-03-19  Werner Koch  <wk@gnupg.org>
35896
35897         gpg: Print indicator for unknown key capability.
35898         + commit c4dbd1b2de8ae3847a040444e86500848868bcf4
35899         * g10/keylist.c (print_capabilities): Print '?' for unknown usage.
35900
35901 2013-03-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
35902
35903         gpg: Allow setting of all zero key flags.
35904         + commit b693ec02c467696bf9d7324dd081e279f9965151
35905         * g10/keygen.c (do_add_key_flags): Do not check for empty key flags.
35906
35907 2013-03-19  Werner Koch  <wk@gnupg.org>
35908
35909         gpg: Distinguish between missing and cleared key flags.
35910         + commit 4bde12206c5bf199dc6e12a74af8da4558ba41bf
35911         * include/cipher.h (PUBKEY_USAGE_NONE): New.
35912         * g10/getkey.c (parse_key_usage): Set new flag.
35913
35914 2013-03-15  NIIBE Yutaka  <gniibe@fsij.org>
35915
35916         scd: ccid-driver supporting larger APDU.
35917         + commit 76dc5c08dc2686eef32e1bd221c60fe91201246f
35918         * scd/ccid-driver.c (ccid_transceive_apdu_level): Support larger
35919         APDU.
35920
35921         scd: fix missing close paren.
35922         + commit 006782068e4d2a9413770400494421a2e9726ee7
35923         * scd/app-openpgp.c (du_auth): Fix.
35924
35925 2013-03-09  NIIBE Yutaka  <gniibe@fsij.org>
35926
35927         scd: support ECDSA signing.
35928         + commit 73ad742deacfe2bf7d6efc7cc30f9ced2d83521a
35929         * scd/app-openpgp.c (do_sign): Only prepend message digest block
35930         for RSA or do_auth.
35931         (do_auth): Remove message digest block for ECDSA.
35932
35933 2013-03-08  NIIBE Yutaka  <gniibe@fsij.org>
35934
35935         scd: support ECDSA public key.
35936         + commit 010bc7f4f06d8affb98950e1adc76c68bfcc9abb
35937         * scd/app-openpgp.c (key_type_t): New.
35938         (CURVE_NIST_P256, CURVE_NIST_P384, CURVE_NIST_P521): New.
35939         (struct app_local_s): Change keyattr to have key_type and union.
35940         (get_ecc_key_parameters, get_curve_name): New.
35941         (send_key_attr, get_public_key): Support ECDSA.
35942         (build_privkey_template, do_writekey, do_genkey): Follow the change
35943         of the member KEY_ATTR.
35944         (parse_historical): New.
35945         (parse_algorithm_attribute): Support ECDSA.
35946
35947 2013-03-05  Werner Koch  <wk@gnupg.org>
35948
35949         Require libgpg-error 1.11.
35950         + commit 5bac5040dc93343e1e89916b263390b0e52040bf
35951         * configure.ac: Require libgpg-error 1.11.
35952         * common/util.h (GPG_ERR_NO_KEYSERVER, GPG_ERR_INV_CURVE)
35953         (GPG_ERR_UNKNOWN_CURVE): Remove fallback definitions.
35954
35955 2013-02-28  NIIBE Yutaka  <gniibe@fsij.org>
35956
35957         agent: pksign result conversion to sexp to upper layer.
35958         + commit ef1983d58b913306e9bf02a7189e530123839c59
35959         * agent/agent.h (divert_pksign): Add R_SIGLEN argument.
35960         * agent/divert-scd.c (divert_pksign): Return length at R_SIGLEN.
35961         * agent/call-scd.c (agent_card_pksign): Move composition of
35962         S-expression to...
35963         * agent/pksign.c (agent_pksign_do): ... here.
35964
35965 2013-02-22  Werner Koch  <wk@gnupg.org>
35966
35967         Use has_leading_keyword in the assuan callbacks.
35968         + commit 585d5c62eece23911a768d97d11f159be138b13d
35969         * agent/call-pinentry.c (inq_quality): Use has_leading_keyword.
35970         * agent/call-scd.c (inq_needpin, inq_writekey_parms): Ditto.
35971         * g10/call-agent.c (inq_writecert_parms, keyinfo_status_cb): Ditto.
35972         (inq_genkey_parms, inq_ciphertext_cb, inq_import_key_parms): Ditto.
35973         * g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
35974         * sm/call-agent.c (default_inq_cb, inq_ciphertext_cb): Ditto.
35975         (inq_genkey_parms, istrusted_status_cb, learn_status_cb): Ditto.
35976         (keyinfo_status_cb, inq_import_key_parms): Ditto.
35977         * sm/call-dirmngr.c (inq_certificate, isvalid_status_cb): Ditto.
35978         (lookup_status_cb, run_command_inq_cb, run_command_status_cb): Ditto.
35979
35980         Remove some unused variables.
35981         + commit c6b8f05517228c6aeab28d2bf5da7724c059bb1a
35982         * tools/gpgconf-comp.c (gc_process_gpgconf_conf): Remove unused
35983         used_components.
35984         * agent/command-ssh.c (ssh_signature_encoder_ecdsa): Mark unused arg.
35985         * g13/g13.c (main): Comment variable of yet unimplemented options.
35986
35987         gpg: Fix a memory leak in batch key generation.
35988         + commit 161674118d568025896026ede5e03d26bdfdfa68
35989         * g10/keygen.c (append_to_parameter): New.
35990         (proc_parameter_file): Use new func to extend the parameter list.
35991
35992         * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
35993         gcry_kdf_derive failed.
35994         * g10/keygen.c (proc_parameter_file): Print a diagnostic if
35995         passphrase_to_dek failed.
35996
35997         gpg: Handle the agent's NEW_PASSPHRASE inquiry.
35998         + commit baee681d2406530c45fd6d4bde77193ba23ac263
35999         * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
36000
36001         common: Add func has_leading_keyword.
36002         + commit 2838385e76c8c7108bc949d5a1d1c947051bd5be
36003         * common/stringhelp.c (has_leading_keyword): New.
36004
36005         Remove build hacks for FreeBSD.
36006         + commit 21f5a9ec27c0794141a835a5bb3c69495ee554a6
36007         * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
36008         LDFLAGS.
36009
36010 2013-02-22  NIIBE Yutaka  <gniibe@fsij.org>
36011
36012         agent: fix two bugs.
36013         + commit 3c3648e720b8014828573bd708c88ba4775014e3
36014         * agent/command.c (cmd_keytocard): Decrement KEYDATALEN.
36015         * agent/findkey.c (agent_public_key_from_file): Increment for ELEMS.
36016
36017         gpg: fix keytocard and support ECC card for key attribute.
36018         + commit 7d376ffa321d4af6e62a2bc64ef2b8574b122b1a
36019         * g10/call-agent.c (agent_keytocard): Supply PARM arg.
36020         * g10/card-util.c (card_status): Support ECC.
36021         (card_store_subkey): Don't assume RSA.
36022
36023 2013-02-21  Werner Koch  <wk@gnupg.org>
36024
36025         gpg: Fix a memory leak in batch key generation.
36026         + commit 273bb38cd7b517460cb3de67662e96e910104675
36027         * g10/keygen.c (append_to_parameter): New.
36028         (proc_parameter_file): Use new func to extend the parameter list.
36029
36030         * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
36031         gcry_kdf_derive failed.
36032         * g10/keygen.c (proc_parameter_file): Print a diagnostic if
36033         passphrase_to_dek failed.
36034
36035         gpg: Handle the agent's NEW_PASSPHRASE inquiry.
36036         + commit 18a261b65fd77a9e434b13483ceaaaf2176f1197
36037         * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
36038
36039         common: Add func has_leading_keyword.
36040         + commit 4af0c62b15c51056dc293c8e3b907e7c41fbf08c
36041         * common/stringhelp.c (has_leading_keyword): New.
36042
36043 2013-02-20  Werner Koch  <wk@gnupg.org>
36044
36045         Remove build hacks for FreeBSD.
36046         + commit 8e5766c38f3ac376fb8e7c7f2b0f65de23d84cbe
36047         * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
36048         LDFLAGS.
36049
36050 2013-02-12  NIIBE Yutaka  <gniibe@fsij.org>
36051
36052         gpg: Implement card_store_subkey again.
36053         + commit b90506ea220860c89128f002bd593d0462a08d73
36054         * g10/call-agent.h (agent_keytocard): New.
36055         * g10/call-agent.c (agent_keytocard): New.
36056         * g10/card-util.c (replace_existing_key_p): Returns 1 when replace.
36057         (card_generate_subkey): Check return value of replace_existing_key_p.
36058         (card_store_subkey): Implement again using agent_keytocard.
36059
36060         agent: Add KEYTOCARD command.
36061         + commit 30f8a3c8736451d8c06ef72521a8da5eabf23016
36062         * agent/agent.h (divert_writekey, agent_card_writekey): New.
36063         * agent/call-scd.c (inq_writekey_parms, agent_card_writekey): New.
36064         * agent/command.c (cmd_keytocard, hlp_keytocard): New.
36065         (register_commands): Add cmd_keytocard.
36066         * agent/divert-scd.c (divert_writekey): New.
36067
36068         Japanese: update po and doc.
36069         + commit 595ab0da666c43a1315a72a1346ee149998d8771
36070         * doc/help.ja.txt, po/ja.po: Updated.
36071
36072 2013-02-08  NIIBE Yutaka  <gniibe@fsij.org>
36073
36074         scd: Rename 'keypad' to 'pinpad'.
36075         + commit 7253093addfd82a8dd25cd80e3ba820a85e3c9a7
36076         * NEWS: Mention scd changes.
36077
36078         * agent/divert-scd.c (getpin_cb): Change message.
36079
36080         * agent/call-scd.c (inq_needpin): Change the protocol to
36081         POPUPPINPADPROMPT and DISMISSPINPADPROMPT.
36082         * scd/command.c (pin_cb): Likewise.
36083
36084         * scd/apdu.c (struct reader_table_s): Rename member functions.
36085         (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify,
36086         check_ccid_pinpad, ccid_pinpad_operation, apdu_check_pinpad
36087         apdu_pinpad_verify, apdu_pinpad_modify): Rename.
36088
36089         * scd/apdu.h (SW_HOST_NO_PINPAD, apdu_check_pinpad)
36090         (apdu_pinpad_verify, apdu_pinpad_modify): Rename.
36091
36092         * scd/iso7816.h (iso7816_check_pinpad): Rename.
36093
36094         * scd/iso7816.c (map_sw): Use SW_HOST_NO_PINPAD.
36095         (iso7816_check_pinpad): Rename.
36096         (iso7816_verify_kp, iso7816_change_reference_data_kp): Follow
36097         the change.
36098
36099         * scd/ccid-driver.h (CCID_DRIVER_ERR_NO_PINPAD): Rename.
36100         * scd/ccid-driver.c (ccid_transceive_secure): Use it.
36101
36102         * scd/app-dinsig.c (verify_pin): Follow the change.
36103         * scd/app-nks.c (verify_pin): Follow the change.
36104
36105         * scd/app-openpgp.c (check_pinpad_request): Rename.
36106         (parse_login_data, verify_a_chv, verify_chv3, do_change_pin): Follow
36107         the change.
36108
36109         * scd/scdaemon.c (oDisablePinpad, oEnablePinpadVarlen): Rename.
36110
36111         * scd/scdaemon.h (opt): Rename to disable_pinpad,
36112         enable_pinpad_varlen.
36113
36114         * tools/gpgconf-comp.c (gc_options_scdaemon): Rename to
36115         disable-pinpad.
36116
36117 2013-02-07  Werner Koch  <wk@gnupg.org>
36118
36119         gpg: Add pinentry-mode feature.
36120         + commit 21feecd48f990b2569cb4b385dea3e57b9501525
36121         * g10/gpg.c: Include shareddefs.h.
36122         (main): Add option --pinentry-mode.
36123         * g10/options.h (struct opt): Add field pinentry_mode.
36124         * g10/passphrase.c: Include shareddefs.h.
36125         (have_static_passphrase): Take care of loopback pinentry_mode.
36126         (read_passphrase_from_fd): Ditto.
36127         (get_static_passphrase): New.
36128         (passphrase_to_dek_ext): Factor some code out to ...
36129         (emit_status_need_passphrase): new.
36130         * g10/call-agent.c (start_agent): Send the pinentry mode.
36131         (default_inq_cb): Take care of the PASSPHRASE inquiry.  Return a
36132         proper error code.
36133         (agent_pksign): Add args keyid, mainkeyid and pubkey_algo.
36134         (agent_pkdecrypt): Ditto.
36135         * g10/pubkey-enc.c (get_it): Pass new args.
36136         * g10/sign.c (do_sign): Pass new args.
36137
36138         * g10/call-agent.c (struct default_inq_parm_s): New.  Change all
36139         similar structs to reference this one.  Change all users and inquire
36140         callback to use this struct, instead of NULL or some undefined but not
36141         used structs.  This change will help to eventually get rid of global
36142         variables.
36143
36144 2013-02-06  Werner Koch  <wk@gnupg.org>
36145
36146         agent: Move a typedef to common and provide parse_pinentry_mode.
36147         + commit 8b2b8dfe5c4cd346bbea2c228e75737bbeeca4c4
36148         * common/agent-opt.c: New.
36149         * common/shareddefs.h: New.
36150         * common/Makefile.am: Add new files.
36151         * agent/agent.h: Include shareddefs.h.
36152         (pinentry_mode_t): Factor out to shareddefs.h.
36153         * agent/command.c (option_handler): Use parse_pinentry_mode.
36154
36155         agent: Return a better error code if no passphrase was given.
36156         + commit 4483a4f0ea030046137ba04905eb5220c14a2161
36157         * agent/protect.c (hash_passphrase): Handle an empty passphrase.
36158
36159 2013-02-05  NIIBE Yutaka  <gniibe@fsij.org>
36160
36161         scd: Fix check_keypad_request.
36162         + commit c27315fc6466cceb862c9e67755a8e044e9b7688
36163         * scd/app-openpgp.c (check_keypad_request): 0 means not to use pinpad.
36164
36165         SCD: Add vendor specific initalization.
36166         + commit e791ac6683bfb90d5e40c0103324784bd58535c9
36167         * scd/ccid-driver.c (ccid_vendor_specific_init): New.
36168         (ccid_open_reader): Call ccid_vendor_specific_init.
36169
36170         SCD: Support P=N format for login data.
36171         + commit 0407e642f796fb2780a77b7a1a86731d0de27e5d
36172         * scd/app-openpgp.c (parse_login_data): Support P=N format.
36173
36174         SCD: Better interoperability.
36175         + commit bd5eded73a1268afdf81482f8408e5f640abf9c4
36176         * scd/apdu.c: Fill bTeoPrologue[2] field.
36177
36178         SCD: Defaults to use pinpad if the reader has the capability.
36179         + commit a9ff97a10f7ae5a703ed1bccba294473ecc88d5d
36180         * scd/app-openpgp.c (struct app_local_s): Remove VARLEN.
36181         (parse_login_data): "P=0" means to disable pinpad.
36182         (check_keypad_request): Default is to use pinpad if available.
36183
36184         SCD: handle keypad request on the card.
36185         + commit 334ba6efa5a05d8849fae213128a0505e7615e13
36186         * scd/app-openpgp.c: Add 2013.
36187         (struct app_local_s): Add keypad structure.
36188         (parse_login_data): Add parsing keypad request on the card.
36189         (check_keypad_request): New.
36190         (verify_a_chv, verify_chv3, do_change_pin): Call check_keypad_request
36191         to determine use of keypad.
36192
36193         SCD: Minor fix of ccid-driver.
36194         + commit d5bf83a24cf3871b7d8cfe61049f70e1e206d09a
36195         * scd/ccid-driver.c (VENDOR_VEGA): Fix typo.
36196
36197         SCD: Add support of Covadis VEGA_ALPHA reader.
36198         + commit 82e1e837c29225cd55642b193cc04ce6191d19bb
36199         * scd/ccid-driver.c: Add 2013.
36200         (VENDER_VEGA, VEGA_ALPHA):New.
36201         (ccid_transceive_secure): VEGA_ALPHA is same firmware as GEMPC_PINPAD.
36202         Change bNumberMessage to 0x01, as it works better (was: 0xff).
36203
36204         SCD: Support fixed length PIN input for keypad (PC/SC).
36205         + commit 3aae780f9debaeb3560ff866b7e09d0923481c57
36206         * scd/apdu.c (pcsc_keypad_verify): SUpport fixed length PIN input for
36207         keypad.
36208         (pcsc_keypad_modify): Likewise.
36209         * scd/ccid-driver.c (ccid_transceive_secure): Clean up.
36210
36211         SCD: Support fixed length PIN input for keypad.
36212         + commit 40a914a2e3052847b49c4b5e8ac8538e97efd18a
36213         * scd/iso7816.h (struct pininfo_s): Remove MODE and add FIXEDLEN.
36214         * scd/app-dinsig.c (verify_pin): Initialize FIXEDLEN to unknown.
36215         * scd/app-nks.c (verify_pin): Likewise.
36216         * scd/app-openpgp.c (verify_a_chv, verify_chv3, do_change_pin):
36217         Likewise.
36218         * scd/apdu.c (check_pcsc_keypad): Add comment.
36219         (pcsc_keypad_verify, pcsc_keypad_modify): PC/SC driver only support
36220         readers with the feature of variable length input (yet).
36221         (apdu_check_keypad): Set FIXEDLEN.
36222         * scd/ccid-driver.c (ccid_transceive_secure): Add GEMPC_PINPAD
36223         specific settings.
36224         Support fixed length PIN input for keypad.
36225
36226         SCD: API cleanup for keypad handling.
36227         + commit b526f6e223604b7c1852ef2aab9fc1ea691b1181
36228         * scd/iso7816.h (struct pininfo_s): Rename from iso7816_pininfo_s.
36229         Change meaning of MODE.
36230         (pininfo_t): Rename from iso7816_pininfo_t.
36231         * scd/sc-copykeys.c: Include "iso7816.h".
36232         * scd/scdaemon.c, scd/command.c: Likewise.
36233         * scd/ccid-driver.c: Include "scdaemon.h" and "iso7816.h".
36234         (ccid_transceive_secure): Follow the change of PININFO_T.
36235         * scd/app.c: Include "apdu.h" after "iso7816.h".
36236         * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
36237         (iso7816_change_reference_data_kp): Follow the change of API.
36238         * scd/apdu.c (struct reader_table_s): Change API of CHECK_KEYPAD,
36239         KEYPAD_VERIFY, KEYPAD_MODIFY to have arg of PININFO_T.
36240         (check_pcsc_keypad, check_ccid_keypad): Likewise.
36241         (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise.
36242         (pcsc_keypad_verify, pcsc_keypad_modify, ct_send_apdu)
36243         (pcsc_send_apdu_direct,  pcsc_send_apdu_wrapped, pcsc_send_apdu)
36244         (send_apdu_ccid, ccid_keypad_operation, my_rapdu_send_apdu, send_apdu)
36245         (send_le): Follow the change of API.
36246         * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
36247         (apdu_keypad_modify): Change the API.
36248         * scd/app-dinsig.c, scd/app-nks.c, scd/app-openpgp.c: Follow the
36249         change.
36250
36251         SCD: Clean up.  Remove PADLEN for keypad input.
36252         + commit ca89277cb4cb9558da97a71a4cb070cb77c9b536
36253         * scd/apdu.c (struct pininfo_s): Use iso7816_pininfo_s.
36254         (struct reader_table_s): Remove last arg from check_keypad method.
36255         (check_pcsc_keypad, check_pcsc_keypad): Remove PIN_PADLEN.
36256         (pcsc_keypad_verify, pcsc_keypad_modify): Don't check PIN_PADLEN.
36257         (send_apdu_ccid, ccid_keypad_operation): Remove PIN_PADLEN.
36258         (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify):
36259         Likewise.
36260
36261         * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
36262         (apdu_keypad_modify): Remove PIN_PADLEN.
36263
36264         * scd/ccid-driver.c (ccid_transceive_secure): Remove PIN_PADLEN.
36265
36266         * scd/ccid-driver.h (ccid_transceive_secure): Remove PIN_PADLEN.
36267
36268         * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
36269         (iso7816_change_reference_data_kp): Remove PADLEN.
36270
36271         * scd/iso7816.h (struct iso7816_pininfo_s): Remove PADLEN, PADCHAR.
36272
36273         SCD: Add option enable-keypad-varlen and support for GEMPC_PINPAD.
36274         + commit d9f6cc7502793ed41928042cc2f968c8c7effc22
36275         * scd/scdaemon.h (opt): Add enable_keypad_varlen.
36276         * scd/scdaemon.c (cmd_and_opt_values): Add oEnableKeypadVarlen.
36277         (opts, main): Add oEnableKeypadVarlen.
36278         * scd/ccid-driver.c (GEMPC_PINPAD): New.
36279         (ccid_transceive_secure): Add enable_varlen handling.
36280         Enable GEMPC_PINPAD.
36281
36282 2013-01-30  Werner Koch  <wk@gnupg.org>
36283
36284         Remove unused status codes.
36285         + commit 50a7badbdacac8ba472b35090c1aab4568434d04
36286         * common/status.h (STATUS_BEGIN_STREAM, STATUS_END_STREAM)
36287         (STATUS_SIEXPIRED): Remove unused codes.
36288
36289         gpg: Add status line PINENTRY_LAUNCHED.
36290         + commit 1cd6445eec4c3642ad92afb02f3563a01cc10c10
36291         * common/status.h (STATUS_PINENTRY_LAUNCHED): New.
36292         * g10/server.c (server_local_s): Add field allow_pinentry_notify.
36293         (option_handler): Add option "allow-pinentry-notify".
36294         (gpg_proxy_pinentry_notify): New.
36295         * g10/call-agent.c (default_inq_cb): Factor code out to the new
36296         function.
36297
36298 2013-01-25  NIIBE Yutaka  <gniibe@fsij.org>
36299
36300         agent: Fix a bug of handling return code from npth_join.
36301         + commit 19994466449a93704d38d429ca1ea36f63da0bf0
36302         * agent/call-pinentry.c (agent_popup_message_stop): Fix npth_join
36303         return code.
36304
36305 2013-01-11  Christian Aistleitner  <christian@quelltextlich.at>
36306
36307         gpg: Fix honoring --cert-digest-algo when recreating a cert.
36308         + commit 60c58766aeb847b769372fa981f79abac6014500
36309         * g10/sign.c (update_keysig_packet): Override original signature's
36310         digest algo in hashed data and for hash computation.
36311
36312 2013-01-11  Werner Koch  <wk@gnupg.org>
36313
36314         Fix spurious cruft from configure summary output.
36315         + commit 7a638c094fa1aa7ed1d9caf085af9980a2664d64
36316         * configure.ac (build_scdaemon_extra): Remove $tmp cruft.
36317
36318 2013-01-11  NIIBE Yutaka  <gniibe@fsij.org>
36319
36320         SCD: Hold lock for pinpad input.
36321         + commit 4dddf32c83f52483d95d7770232e9e808558e702
36322         * scd/apdu.c (apdu_check_keypad, apdu_keypad_verify)
36323         (apdu_keypad_modify): Hold lock to serialize communication.
36324
36325 2013-01-08  Werner Koch  <wk@gnupg.org>
36326
36327         kbx: Switch from MD5 to SHA-1 for the checksum.
36328         + commit b11f84b858bad867f1062977a7aba30299157e90
36329         * kbx/keybox-blob.c (put_membuf): Use a NULL buf to store zero bytes.
36330         (create_blob_finish): Write just the needed space.
36331         (create_blob_finish): Switch to SHA-1.
36332         * kbx/keybox-dump.c (print_checksum): New.
36333         (_keybox_dump_blob): Print the checksum and the verification status.
36334
36335         gpg: Cache keybox searches.
36336         + commit 492792378dc7a79316ef742b2ffaa46c6cda282a
36337         * common/iobuf.c (iobuf_seek): Fix for temp streams.
36338         * g10/pubkey-enc.c (get_session_key, get_it): Add some log_clock calls.
36339         * g10/keydb.c (dump_search_desc): New.
36340         (enum_keyblock_states, struct keyblock_cache): New.
36341         (keyblock_cache_clear): New.
36342         (keydb_get_keyblock, keydb_search): Implement a keyblock cache.
36343         (keydb_update_keyblock, keydb_insert_keyblock, keydb_delete_keyblock)
36344         (keydb_rebuild_caches, keydb_search_reset): Clear the cache.
36345
36346         Make log_clock easier to read.
36347         + commit 5c565512b8af73bee2a176530663154b9277ef1c
36348         * common/logging.c (log_clock): Print in microseconds.
36349
36350         gpg: Remove a function wrapper.
36351         + commit f3f5721e6843a08d1011875400f385b8cd5fe226
36352         * g10/keydb.h (keydb_search): Remove macro.
36353         * g10/keydb.c (keydb_search2): Rename to keydb_search.  Change all
36354         callers.
36355
36356 2013-01-08  NIIBE Yutaka  <gniibe@fsij.org>
36357
36358         SCD: Support not-so-smart card readers.
36359         + commit a776f660363d20b6cc023609c4547e0aa8825d97
36360         * scd/ccid-driver.c (struct ccid_driver_s): Add auto_voltage,
36361         auto_param, and auto_pps.
36362         (parse_ccid_descriptor): Set auto_voltage, auto_param, and auto_pps.
36363         Support non-autoconf readers.
36364         (update_param_by_atr): New.
36365         (ccid_get_atr): Use 5V for PowerOn when auto_voltage is not supported.
36366         Use 0x10 when nonnull_nad for SetParameters.
36367         Call update_param_by_atr for parsing ATR, and use param for
36368         SetParameters.
36369         Send PPS if reader requires it and card is negotiable.
36370         When bNadValue in the return values of SetParameters == 0,
36371         clear handle->nonnull_nad flag.
36372
36373 2013-01-07  Werner Koch  <wk@gnupg.org>
36374
36375         gpg: Set the node flags while retrieving a keyblock.
36376         + commit f6d7b3f1ee5eed32bc3257c99cb878091d26c482
36377         * g10/keydb.c (parse_keyblock_image): Add args PK_NO and UID_NO and
36378         set the note flags accordingly.
36379         (keydb_get_keyblock): Transfer PK_NO and UID_NO to parse_keyblock_image.
36380         * kbx/keybox-search.c (blob_cmp_fpr, blob_cmp_fpr_part)
36381         (blob_cmp_name, blob_cmp_mail): Return the key/user number.
36382         (keybox_search): Set the key and user number into the found struct.
36383         (keybox_get_keyblock): Add args R_PK_NO and R_UID_NO and set them from
36384         the found struct.
36385
36386         New function log_clock.
36387         + commit 0baedfd25a4bdc6c8e7aefbd67006b063e2dc33f
36388         * common/logging.c (log_clock): New.
36389         * g10/gpg.c (set_debug): Print clock debug flag.
36390         * g10/options.h (DBG_CLOCK_VALUE, DBG_CLOCK): New.
36391
36392         gpg: Allow searching for user ids in a keybox.
36393         + commit fb31462e7e92d4b19256e6fd40b1b6ffcef2676c
36394         * kbx/keybox-search.c (blob_cmp_name): Add arg X509 and adjust for PGP
36395         use.  Change callers.
36396         (blob_cmp_mail): Add arg X509 and find the mailbox offset for PGP.
36397         Chnage callers.
36398         (has_subject_or_alt): Rename to has_username.
36399         (has_username): Allow blobtype PGP.
36400         (has_mail): Ditto.
36401
36402         gpg: Allow generation of more than 4096 keys in one run.
36403         + commit 7d00e52bd58d9e40c18dcc0122b2c236ef3318f5
36404         * g10/getkey.c (cache_public_key): Make room in the cache if needed.
36405
36406 2013-01-07  NIIBE Yutaka  <gniibe@fsij.org>
36407
36408         Update Japanese Translation.
36409         + commit bb51edc31e6595e38fcbd91d470de57d3a1a7150
36410         * po/ja.po: Fix wrong translations for designated revocation.
36411         Reported by Hideki Saito.
36412
36413         Conflicts:
36414                 po/ja.po
36415
36416 2013-01-05  NIIBE Yutaka  <gniibe@fsij.org>
36417
36418         Update Japanese Translation.
36419         + commit 05a4458e5721a0afd600f0ec908e739fa83d58f2
36420         * po/ja.po: Fix fuzzy translations.
36421
36422 2013-01-03  NIIBE Yutaka  <gniibe@fsij.org>
36423
36424         Update Japanese Translation.
36425         + commit 709a8f8125b9ba5e1ad1e6268cca5ac96d478f63
36426         * po/ja.po: Update with POT.
36427
36428         Update Japanese Translation.
36429         + commit 0fae789c4125dd8492ed25bd6728b5ac98f19729
36430         * po/ja.po: Start from the new one of 2.0.
36431
36432 2012-12-28  Werner Koch  <wk@gnupg.org>
36433
36434         gpg: Add signature cache support to the keybox.
36435         + commit 79f08fb0699f4a065e3a29bc7676a90534d7ba60
36436         * g10/keydb.c (parse_keyblock_image): Add arg SIGSTATUS.
36437         (keydb_get_keyblock): Handle it.
36438         (build_keyblock_image): Add arg SIGSTATUS.
36439         (keydb_insert_keyblock): Handle it.
36440         * kbx/keybox-blob.c (pgp_create_sig_part): Add arg SIGSTATUS.
36441         (_keybox_create_openpgp_blob): Ditto.
36442         * kbx/kbxutil.c (import_openpgp): Adjust for above change.
36443         * kbx/keybox.h (KEYBOX_FLAG_SIG_INFO): New.
36444         * kbx/keybox-search.c (_keybox_get_flag_location): Handle new flag.
36445         (keybox_get_keyblock): Add arg R_SIGSTATUS.
36446         * kbx/keybox-update.c (keybox_insert_keyblock): Add arg SIGSTATUS.
36447
36448         kbxutil: Improve format of the Sig-Expire lines.
36449         + commit 564d10ea5cd29685a00a4096d69ae2476b60506f
36450         * kbx/keybox-dump.c (_keybox_dump_blob): Print the expirate timestamp.
36451
36452         gpg: First working support for keyboxes.
36453         + commit a9863834244fc2a58d8950977243702d12e420a1
36454         * g10/getkey.c (get_pubkey_fast): Improve the assertion.
36455         * kbx/keybox.h: Include iobuf.h.
36456         * kbx/keybox-blob.c (keyboxblob_uid): Add field OFF.
36457         (KEYBOX_WITH_OPENPGP): Remove use of this macro.
36458         (pgp_create_key_part_single): New.
36459         (pgp_temp_store_kid): Change to use the keybox-openpgp parser.
36460         (pgp_create_key_part): Ditto.
36461         (pgp_create_uid_part): Ditto.
36462         (pgp_create_sig_part): Ditto.
36463         (pgp_create_blob_keyblock): Ditto.
36464         (_keybox_create_openpgp_blob): Ditto.
36465         * kbx/keybox-search.c (keybox_get_keyblock): New.
36466         * kbx/keybox-update.c (keybox_insert_keyblock): New.
36467         * g10/keydb.c (parse_keyblock_image):
36468         (keydb_get_keyblock): Support keybox.
36469         (build_keyblock_image): New.
36470         (keydb_insert_keyblock): Support keybox.
36471
36472         * kbx/kbxutil.c (import_openpgp, main): Add option --dry-run and print
36473         a kbx file to stdout.
36474
36475         * kbx/keybox-file.c (_keybox_read_blob2): Allow keyblocks up to 10^6
36476         bytes.
36477
36478         kbxutil: Print algo number and fold similar lines.
36479         + commit f7495f1004071a0ceac394007bb37f88d7a3467f
36480         * kbx/keybox-defs.h (_keybox_openpgp_key_info): Add field ALGO.
36481         * kbx/keybox-openpgp.c (parse_key): Store algo.
36482         * kbx/kbxutil.c (dump_openpgp_key): Print algo number.
36483         * kbx/keybox-dump.c (_keybox_dump_blob): Print identical Sig-Expire
36484         value lines with a range of indices.
36485
36486 2012-12-27  Werner Koch  <wk@gnupg.org>
36487
36488         gpg: First patches to support a keybox storage backend.
36489         + commit 91e61d52539b1808e209c43e51465c76cebb06f9
36490         * kbx/keybox-defs.h (_keybox_write_header_blob): Move prototype to ..
36491         * kbx/keybox.h: here.
36492         * kbx/keybox-init.c (keybox_lock): Add dummy function
36493         * g10/keydb.c: Include keybox.h.
36494         (KeydbResourceType): Add KEYDB_RESOURCE_TYPE_KEYBOX.
36495         (struct resource_item): Add field kb.
36496         (maybe_create_keyring_or_box): Add error descriptions to diagnostics.
36497         Add arg IS_BOX.  Write a header for a new keybox file.
36498         (keydb_add_resource): No more need for the force flag.  Rename the
36499         local variable "force" to "create".  Add URL scheme "gnupg-kbx".  Add
36500         magic test to detect a keybox file.  Add basic support for keybox.
36501         (keydb_new, keydb_get_resource_name, keydb_delete_keyblock)
36502         (keydb_locate_writable, keydb_search_reset, keydb_search2): Add
36503         support for keybox.
36504         (lock_all, unlock_all): Ditto.
36505         * g10/Makefile.am (needed_libs): Add libkeybox.a.
36506         (gpg2_LDADD, gpgv2_LDADD): Add KSBA_LIBS as a workaround.
36507
36508         * g10/keydb.h (KEYDB_RESOURCE_FLAG_PRIMARY)
36509         KEYDB_RESOURCE_FLAG_DEFAULT, KEYDB_RESOURCE_FLAG_READONLY): New.
36510         * g10/gpg.c, g10/gpgv.c (main): Use new constants.
36511
36512 2012-12-20  Werner Koch  <wk@gnupg.org>
36513
36514         gpg: Import only packets which are allowed in a keyblock.
36515         + commit f0b33b6fb8e0586e9584a7a409dcc31263776a67
36516         * g10/import.c (valid_keyblock_packet): New.
36517         (read_block): Store only valid packets.
36518
36519 2012-12-19  Werner Koch  <wk@gnupg.org>
36520
36521         gpg: Make commit 2b3cb2ee actually work.
36522         + commit d61f7402f2b0f6dd288e403ed9408fd65e617f85
36523         * g10/sign.c (update_keysig_packet): Use digest_algo.
36524
36525         (cherry-picked from commit d23ec86095714d388acac14b515445fe69f019e9)
36526
36527         gpg: Suppress "public key already present" in quiet mode.
36528         + commit 8325d616593187ff227853de0295e3269b96edcb
36529         * g10/pkclist.c (find_and_check_key, build_pk_list): Print a
36530         diagnostic only in non-quiet mode.
36531
36532 2012-12-18  Werner Koch  <wk@gnupg.org>
36533
36534         common: Add meta option ignore-invalid-option.
36535         + commit 41d564333d35c923f473aa90625d91f8fe18cd0b
36536         * common/argparse.c (iio_item_def_s, IIO_ITEM_DEF): New.
36537         (initialize): Init field IIO_LIST.
36538         (ignore_invalid_option_p): New.
36539         (ignore_invalid_option_add): New.
36540         (ignore_invalid_option_clear): New.
36541         (optfile_parse): Implement meta option.
36542
36543 2012-12-13  Werner Koch  <wk@gnupg.org>
36544             Hans of Guardian  <hans@guardianproject.info>
36545
36546         utf8conv.c: Add hacks for Android.
36547         + commit 6177fb3c87f485fb654bbba492d04508755718b3
36548         * common/utf8conv.c [HAVE_ANDROID_SYSTEM]: Do not include iconv.h.
36549         (iconv_open, iconv_close, load_libiconv) [HAVE_ANDROID_SYSTEM]: New
36550         dummy functions.
36551         (set_native_charset) [HAVE_ANDROID_SYSTEM]: Force use of "utf-8".
36552         (jnlib_iconv_open) [HAVE_ANDROID_SYSTEM]: Act the same as under W32.
36553         (jnlib_iconv) [HAVE_ANDROID_SYSTEM]: Ditto.
36554         (jnlib_iconv_close) [HAVE_ANDROID_SYSTEM]: Ditto.
36555
36556 2012-12-13  NIIBE Yutaka  <gniibe@fsij.org>
36557
36558         SCD: Fix the process of writing key or generating key.
36559         + commit e7dca3e83ebd6df0a7ea55e97c3cd6e91be90af5
36560         * scd/app-openpgp.c (store_fpr): Flush KEY-FPR and KEY-TIME.
36561
36562 2012-12-12  Werner Koch  <wk@gnupg.org>
36563
36564         ssh: Support ECDSA keys.
36565         + commit 649b31c663b8674bc874b4ef283d714a13dc8cfe
36566         * agent/command-ssh.c (SPEC_FLAG_IS_ECDSA): New.
36567         (struct ssh_key_type_spec): Add fields CURVE_NAME and HASH_ALGO.
36568         (ssh_key_types): Add types ecdsa-sha2-nistp{256,384,521}.
36569         (ssh_signature_encoder_t): Add arg spec and adjust all callers.
36570         (ssh_signature_encoder_ecdsa): New.
36571         (sexp_key_construct, sexp_key_extract, ssh_receive_key)
36572         (ssh_convert_key_to_blob): Support ecdsa.
36573         (ssh_identifier_from_curve_name): New.
36574         (ssh_send_key_public): Retrieve and pass the curve_name.
36575         (key_secret_to_public): Ditto.
36576         (data_sign): Add arg SPEC and change callers to pass it.
36577         (ssh_handler_sign_request): Get the hash algo from SPEC.
36578         * common/ssh-utils.c (get_fingerprint): Support ecdsa.
36579
36580         * agent/protect.c (protect_info): Add flag ECC_HACK.
36581         (agent_protect): Allow the use of the "curve" parameter.
36582         * agent/t-protect.c (test_agent_protect): Add a test case for ecdsa.
36583
36584         * agent/command-ssh.c (ssh_key_grip): Print a better error code.
36585
36586 2012-12-11  Werner Koch  <wk@gnupg.org>
36587
36588         ssh: Rewrite a function for better maintainability.
36589         + commit f76a0312c3794afd81fe1e172df15eb0612deae0
36590         * agent/command-ssh.c (ssh_signature_encoder_dsa): Rewrite.
36591
36592 2012-12-10  Werner Koch  <wk@gnupg.org>
36593
36594         ssh: Improve key lookup for many keys.
36595         + commit d2777f84be0ded5906a9bec3bc23cfed0a9be02f
36596         * agent/command-ssh.c: Remove dirent.h.
36597         (control_file_s): Add struct item.
36598         (rewind_control_file): New.
36599         (search_control_file): Factor code out to ...
36600         (read_control_file_item): New.
36601         (ssh_handler_request_identities): Change to iterate over entries in
36602         sshcontrol.
36603
36604         ssh: Cleanup sshcontrol file access code.
36605         + commit 25fb53ab4ae7e1c098500229c776d29b82713a20
36606         * agent/command-ssh.c (SSH_CONTROL_FILE_NAME): New macro to replace
36607         the direct use of the string.
36608         (struct control_file_s, control_file_t): New.
36609         (open_control_file, close_control_file): New.  Use them instead of
36610         using fopen/fclose directly.
36611
36612         agent: Add envvar "gnupg_SSH_AUTH_SOCK_by"
36613         + commit 36ba7845995dd3caf8faeec3e09b3ffb879fc29b
36614         * agent/gpg-agent.c (main): Pass new envar gnupg_SSH_AUTH_SOCK_by to
36615         an invoked process.
36616
36617         config: Update npth.m4.
36618         + commit ceab60b59d907354d323ace09d7b3f2d36d330fb
36619         * m4/npth.m4: Take from current npth master.
36620
36621 2012-12-04  NIIBE Yutaka  <gniibe@fsij.org>
36622
36623         Revert SCD changes of 2010-05-03.
36624         + commit 1e1326aeb8923782138e133f091afec41d969c40
36625         * scd/apdu.c (pcsc_no_service): Remove.
36626         (open_pcsc_reader_direct, open_pcsc_reader_wrapped): Remove
36627         pcsc_no_service support.
36628         (apdu_open_reader): Remove R_NO_SERVICE.
36629         * scd/apdu.h (apdu_open_reader): Remove R_NO_SERVICE.
36630         * scd/command.c (reader_disabled): Remove.
36631         (get_current_reader): Follow the change of R_NO_SERVICE.
36632         (open_card, cmd_serialno, scd_command_handler): Remove reader_disabled
36633         support.
36634         * scd/sc-copykeys.c (main): Follow the change of R_NO_SERVICE.
36635
36636         Don't keep opening unavailable card reader.
36637         + commit baf7b09e124f9eb4ca4b8ee02474ee7710a95a40
36638         * scd/command.c (update_reader_status_file): Don't call
36639         get_current_reader.
36640
36641 2012-11-30  David Shaw  <dshaw@jabberwocky.com>
36642
36643         Refresh sample keys.
36644         + commit b8eb2ab56971a309353ae2682bc6ef1357e9ac53
36645
36646
36647         Adjust awk to not add trailing whitespace.
36648         + commit 3f8ad564674431b4c0c6cff259f02248c80a6ef9
36649         * mksamplekeys: Tweak awk script to not add trailing whitespace to
36650           blank lines (makes git pre-commit hook unhappy)
36651
36652 2012-11-29  David Shaw  <dshaw@jabberwocky.com>
36653
36654         The keyserver search menu should honor --keyid-format.
36655         + commit 7602d9e3edda99b0b65ba928eef435dab04ecd09
36656         * keyserver.c (print_keyrec): Honor --keyid-format when getting back
36657           full fingerprints from the keyserver (the comment in the code was
36658           correct, the code was not).
36659
36660 2012-11-27  Werner Koch  <wk@gnupg.org>
36661
36662         Fix printing of ECC algo names in hkp keyserver listings.
36663         + commit 3d2da6c82163ffbc2e827abc4144dc3197ed53db
36664         * g10/keyserver.c (print_keyrec): Map OpenPGP algorithm ids.
36665
36666 2012-11-26  Ben Kibbey  <bjk@luxsci.net>
36667
36668         Check for inet_addr() in -lnsl.
36669         + commit 66331e138ec17e176cc3f45bb095820866d5358c
36670         * configure.ac: Check for inet_addr() in libnsl.
36671
36672 2012-11-20  Werner Koch  <wk@gnupg.org>
36673
36674         Do not use a broken ttyname.
36675         + commit 835698b72bc509565aad52b0753f1c56c1a8f062
36676         * configure.ac (HAVE_BROKEN_TTYNAME): New ac_define set for Android
36677         systems.
36678         * common/util.h (gnupg_ttyname): New macro.  Change all callers of
36679         ttyname to use this macro instead.
36680         (ttyname) [W32]: Rename to _gnupg_ttyname and use also if
36681         HAVE_BROKEN_TTYNAME is defined.
36682         * common/simple-pwquery.c (agent_send_all_options): Keep on using
36683         ttyname unless HAVE_BROKEN_TTYNAME is set.  This is because this file
36684         may be used standalone.
36685
36686 2012-11-16  Werner Koch  <wk@gnupg.org>
36687
36688         Fix non-portable use of chmod in autogen.sh.
36689         + commit e7bc5012c568da9ceb0a80a8f3fe3edf3dac9564
36690         * autogen.sh: Remove option -c from chmod.
36691
36692         Improve parsing of the GIT revision number.
36693         + commit 011faa0c68cf0c628ef581193166e9ac9bf22b71
36694         * configure.ac (mmm4_revision): Use git rev-parse.
36695
36696         Add an OpenPGP card vendor.
36697         + commit ac775780fef3ef63f896e822add9ff6ea7e5119c
36698         * g10/card-util.c (get_manufacturer): Add Yubico.
36699
36700 2012-11-06  Werner Koch  <wk@gnupg.org>
36701
36702         agent: Use wipememory instead of memset in one place.
36703         + commit 9f0e9ea80ca30269770eb955e33b54401bff917f
36704         * agent/command.c (clear_outbuf): Use wipememory.  Suggested by Ben
36705         Kibbey.
36706
36707         Allow decryption with card keys > 3072 bits.
36708         + commit 905b6a36d3ca21b2f619721e1de892398e5eb759
36709         * scd/command.c (MAXLEN_SETDATA): New.
36710         (cmd_setdata): Add option --append.
36711         * agent/call-scd.c (agent_card_pkdecrypt): Use new option for long
36712         data.
36713
36714         * scd/app-openpgp.c (struct app_local_s): Add field manufacturer.
36715         (app_select_openpgp): Store manufacturer.
36716         (do_decipher): Print a note for broken cards.
36717
36718 2012-11-02  NIIBE Yutaka  <gniibe@fsij.org>
36719
36720         agent: Fix wrong use of gcry_sexp_build_array.
36721         + commit 8f8c29d24ca13f987e6c118702b428a2051b7072
36722         * findkey.c (agent_public_key_from_file): Fix use of
36723         gcry_sexp_build_array.
36724
36725 2012-10-31  NIIBE Yutaka  <gniibe@fsij.org>
36726
36727         SCD: Upon error, open_pcsc_reader_wrapped does same as _direct.
36728         + commit 8df89f3e9cf0255f11011c2f1df0d419a5c23a8c
36729         * scd/apdu.c (PCSC_E_NO_SERVICE): New.
36730         (open_pcsc_reader_direct): Use PCSC_E_NO_SERVICE.
36731         (open_pcsc_reader_wrapped): Set pcsc_no_service.
36732
36733 2012-08-24  Werner Koch  <wk@gnupg.org>
36734
36735         Update and enable French translation.
36736         + commit 76055d49d1c8b8e4f6245e6729cae81b1eaecbf6
36737         * po/fr.po: Update.
36738         * po/LINGUAS: Enable fr.
36739
36740 2012-08-24  David Prévot  <taffit@debian.org>
36741
36742         Fix typos spotted during translations.
36743         + commit ba591e2f14c0d85ba15346ffd04b9e7d72ec89dc
36744         * agent/genkey.c: s/to to/to/
36745         * sm/*.c: s/failed to allocated/failed to allocate/
36746         * sm/certlist.c, ./dirmngr/validate.c: s/should have not/should not have/
36747         * g10/seskey.c: missing closing parenthesis
36748         * dirmngr/crlcache.c: s/may has/may have/
36749
36750         Consistency fix:
36751
36752         * g10/gpg.c, kbx/kbxutil.c, sm/gpgsm.c: uppercase after Syntax
36753         * dirmngr/dirmngr_ldap: no period in Syntax
36754         * dirmngr/dirmngr-client.c: infinitive for option description:
36755                 s/certificates are expected/expect certificates/
36756
36757         Keep previous msgids of translated messages.
36758         + commit bf95408fc33709d154cd41566d33af3ec3c48886
36759         * po/Makefile.in.in: Use --previous with msgmerge.
36760
36761 2012-08-24  Hans-Christoph Steiner  <hans@eds.org>
36762
36763         Fix build system for Android by disabling tests since its x-compiled.
36764         + commit 1da04bfb3f5714a0fa6d0b779d0d2ae4e9544b8f
36765         * configure.ac (HAVE_ANDROID_SYSTEM, RUN_TESTS): New.
36766         (AH_BOTTOM) [__ANDROID__]: Do not re-define ttyname.
36767         * Makefile.am: Depend tests on new RUN_TESTS conditional.
36768
36769 2012-08-24  Werner Koch  <wk@gnupg.org>
36770
36771         Fix left over use of jnlib on some platforms.
36772         + commit 8156a38674421deef6c2eb3e91e0186fe7fe4b26
36773         * tools/watchgnupg.c: Take mischelp.h from common/ and not jnlib/.
36774
36775 2012-06-25  NIIBE Yutaka  <gniibe@fsij.org>
36776
36777         scd: handle reader/token removal.
36778         + commit ca8eec8e28abb8473d02dbaf8d61cfb1094c5c50
36779         * scd/apdu.c (pcsc_error_to_sw): PCSC_E_UNKNOWN_READER means
36780         SW_HOST_NO_READER.
36781
36782 2012-06-05  Werner Koch  <wk@gnupg.org>
36783
36784         Change all quotes in strings and comments to the new GNU standard.
36785         + commit 096e7457ec636bcfcf128678660eb2f2e19f113a
36786         The asymmetric quotes used by GNU in the past (`...') don't render
36787         nicely on modern systems.  We now use two \x27 characters ('...').
36788
36789         The proper solution would be to use the correct Unicode symmetric
36790         quotes here.  However this has the disadvantage that the system
36791         requires Unicode support.  We don't want that today.  If Unicode is
36792         available a generated po file can be used to output proper quotes.  A
36793         simple sed script like the one used for en@quote is sufficient to
36794         change them.
36795
36796         The changes have been done by applying
36797
36798           sed -i "s/\`\([^'\`]*\)'/'\1'/g"
36799
36800         to most files and fixing obvious problems by hand.  The msgid strings in
36801         the po files were fixed with a similar command.
36802
36803 2012-05-24  Werner Koch  <wk@gnupg.org>
36804
36805         Print the hash algorithm in colon mode key listing.
36806         + commit fc00d3fcb201476b3495f47138fa35b71c52f403
36807         * g10/keylist.c (list_keyblock_colon): Print digest_algo.
36808
36809         Fix type conflict warning.
36810         + commit f8a8c71c41bc1893df8af6ce522876ccbf6240a9
36811         * g10/keylist.c: Change min_cert_level to a byte.
36812
36813 2012-05-11  Werner Koch  <wk@gnupg.org>
36814
36815         Switch to the new automagic beta numbering scheme.
36816         + commit 68777b40dcf215305a325185f6bd9cfd6dcc0542
36817         * configure.ac: Add all the require m4 magic.
36818
36819 2012-05-08  Werner Koch  <wk@gnupg.org>
36820
36821         Add tweaks for the not anymore patented IDEA algorithm.
36822         + commit b4d9f8dbc8e074cd91bbd3e2e54e2b77c9268d1a
36823         * g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2
36824         compatibility mode.
36825         * g10/misc.c (idea_cipher_warn): Remove.  Also remove all callers.
36826         * common/status.h (STATUS_RSA_OR_IDEA): Remove.  Do not emit this
36827         status anymore.
36828
36829         po: Update de.po.
36830         + commit 59b77f9ea7dfa4d5c74573d2186c9a3e129ab3bf
36831         * po/de.po: Update.
36832
36833         common: Remove generated files only during maintainer-clean.
36834         + commit d800fa5ce6102e069305f8e1a5d55d18ac3a1993
36835         * common/Makefile.am (CLEANFILES): Rename to MAINTAINERCLEANFILES.
36836
36837 2012-04-30  Werner Koch  <wk@gnupg.org>
36838
36839         agent: Fix deadlock in trustlist due to the switch to npth.
36840         + commit 0f02fba19df16c82ca1ad44a8cb09f952d755598
36841         * agent/trustlist.c (clear_trusttable): New.
36842         (agent_reload_trustlist): Use new function.
36843         (read_trustfiles): Require to be called with lock held.
36844         (agent_istrusted): Factor all code out to ...
36845         (istrusted_internal): new.  Add ALREADY_LOCKED arg.  Make sure the
36846         table islocked.  Do not print TRUSTLISTFLAG stati if called internally.
36847         (agent_marktrusted): Replace calls to agent_reload_trustlist by
36848         explicit code.
36849
36850 2012-04-26  NIIBE Yutaka  <gniibe@fsij.org>
36851
36852         make DNS and URI fields work in gpgsm --gen-key.
36853         + commit 8d7522837c6dba3065d24594bcdbe7b99a702cde
36854         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Actually set mb_uri and
36855         mb_dns.avoid buffer strncpy-induced buffer overrun
36856
36857 2012-04-26  Jim Meyering  <jim@meyering.net>
36858
36859         avoid buffer strncpy-induced buffer overrun.
36860         + commit 20c9ac4df34e25f7085bb4e4ab5ea7223932f5c4
36861         * dirmngr/crlcache.c (open_dir): Ensure that both this_update
36862         and next_update member strings are NUL-terminated.
36863
36864         remove doubled words in a comment.
36865         + commit 6e3882785a629b361c57c8b9d5cad51fb234ac23
36866
36867
36868 2012-04-20  Werner Koch  <wk@gnupg.org>
36869
36870         Change license for some files in common to LGPLv3+/GPLv2+.
36871         + commit 37df3d5f593f76ddbf1b9dc6de0173b7bb85c0ad
36872         Having the LGPL on the common GnuPG code helps to share code
36873         between GnuPG and related projects (like GPGME and Libassuan).  This
36874         is good for interoperability and to reduces bugs.
36875
36876         * common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c
36877         * common/b64enc.c, common/convert.c, common/dns-cert.c
36878         * common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c
36879         * common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c
36880         * common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c
36881         * common/helpfile.c, common/homedir.c, common/http.c, common/http.h
36882         * common/i18n.c, common/init.c, common/init.h, common/iobuf.c
36883         * common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h
36884         * common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h
36885         * common/percent.c, common/pka.c, common/pka.h, common/session-env.c
36886         * common/session-env.h, common/sexp-parse.h, common/sexputil.c
36887         * common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c
36888         * common/ssh-utils.h, common/sysutils.c, common/sysutils.h
36889         * common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h
36890         * common/userids.c, common/userids.h, common/xasprintf.c: Change
36891         license to LGPLv3+/GPLv2+/
36892
36893 2012-04-10  Ben Kibbey  <bjk@luxsci.net>
36894
36895         Fix killing PID -1.
36896         + commit bee0ac28c9c8027540ae56900b9f85e0bd555f1d
36897         When the KILLSCD command had been sent a race condition would occur
36898         causing PID -1 getting killed, which on Linux seems to terminate all
36899         applications for the current user.
36900
36901 2012-04-05  Werner Koch  <wk@gnupg.org>
36902
36903         Do not mix test result with progress lines.
36904         + commit f1e1387bee286c7434f0462185048872bcdb4484
36905         This makes parsing of the results easier.  Fixes bug#1400.
36906
36907         * tests/openpgp/defs.inc (progress_cancel, progress_end)
36908         (progress_new): New.
36909         * tests/openpgp/conventional-mdc.test: Use progress functions
36910         * tests/openpgp/conventional.test: Ditto.
36911         * tests/openpgp/encrypt-dsa.test: Ditto.
36912         * tests/openpgp/encrypt.test: Ditto.
36913         * tests/openpgp/sigs.test: Ditto.
36914
36915 2012-04-04  Ben Kibbey  <bjk@luxsci.net>
36916
36917         Mention status messages in the documentation.
36918         + commit 99fc61f1cf09c7f72a9037d91d3cf0cd2e035ae6
36919         Note INQUIRE_MAXLEN.
36920
36921         Document PASSWD --preset.
36922         + commit a577f06c4aecc0af5b492e15812e9150c747cbe4
36923
36924
36925         Document GENKEY options.
36926         + commit 108e8f622ef9cfa256707debec1d379ce3cf21ca
36927
36928
36929         Document PRESET_PASSPHRASE.
36930         + commit 96e107fc29db625b247022ae1bf2cbe90b939c5d
36931
36932
36933         Document CLEAR_PASSPHRASE.
36934         + commit 26b59d78c43d72fa28609fb2c0d80fb377393127
36935         And describe the --mode=normal option.
36936
36937 2012-03-27  Werner Koch  <wk@gnupg.org>
36938
36939         Fix timegm regression test.
36940         + commit 17499e761e8cd0fe867b5b5f3e42a71b6d45f954
36941         * common/t-timestuff.c (test_timegm): Change test to use January and
36942         not February or December+1.  Bug spotted by Daniel Kahn Gillmor.
36943
36944         Print warning for arguments not considered an option.
36945         + commit de01c51ecb3918f427aa76281351749c8ad07ed6
36946         GnuPG requires that options are given before other arguments.  This
36947         can sometimes be confusing.  We now print a warning if we found an
36948         argument looking alike a long option without being preceded by the
36949         stop option.  This is bug#1343.
36950
36951         * common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New.
36952         * common/argparse.c (arg_parse): Set new flag.
36953         * g10/gpg.c (main): Print the warning.
36954         * agent/gpg-agent.c (main): Ditto.
36955         * dirmngr/dirmngr.c (main): Ditto.
36956         * g13/g13.c (main): Ditto.
36957         * scd/scdaemon.c (main): Ditto.
36958         * sm/gpgsm.c (main): Ditto.
36959         * tools/gpg-connect-agent.c (main): Ditto.
36960         * tools/gpgconf.c (main): Ditto.
36961
36962 2012-03-26  Werner Koch  <wk@gnupg.org>
36963
36964         Allow compress algorithm 0.
36965         + commit 7ddbcb6b6ab8b26c8e609fcd95c2c8a89bc20a7d
36966         * g10/mainproc.c (proc_compressed): Remove superfluous check for
36967         compress algorithm 0.  Reported by pfandrade.  This is bug#1326.
36968
36969         Add mksamplekeys script.
36970         + commit 7441e622ffb3296686bd0d7f04b4051466aaad38
36971         * doc/mksamplekeys: New.
36972
36973 2012-02-28  Marcus Brinkmann  <mb@g10code.com>
36974
36975         Replace npth_yield in busy wait by npth_usleep.
36976         + commit 8f8c6594147608b1021c16fc3561feb96da5d55a
36977         * dirmngr/ldap-wrapper.c (ldap_wrapper_wait_connections): Call
36978         npth_usleep instead of npth_yield.
36979
36980 2012-02-16  Marcus Brinkmann  <mb@g10code.com>
36981
36982         Check for lber and link dirmngr_ldap to it.
36983         + commit 76ff42ef8d1232dd36bf48c1020b0b9b2afb1c7d
36984         * configure.ac (LBER_LIBS, HAVE_LBER): New variables, check for lber.
36985         * dirmngr/Makefile.am (dirmngr_lda_LDADD): Add $(LBER_LIBS).
36986
36987 2012-02-07  Werner Koch  <wk@gnupg.org>
36988
36989         agent: Add pin length field to the shadowed private key format.
36990         + commit b817ae7df947093384a25797999a9aa187e20f9c
36991         This is not yet fully implemented.  It will eventually allow to
36992         support pinpad equipped readers which do not support variable length
36993         pin lengths.
36994         * agent/protect.c (parse_shadow_info): Add optional arg R_PINLEN and
36995         parse pinlen info.  Change all callers to pass NULL for it.
36996
36997         Use new status printing functions.
36998         + commit 12ea5c904c0008a2adec2e8bbe45dac629548e7d
36999         * agent/command.c (cmd_geteventcounter): Get rid of static buffers.
37000         * scd/command.c (cmd_serialno, cmd_learn): Simplify by using
37001         print_assuan_status.
37002
37003         agent: New function agent_print_status.
37004         + commit e78585cd0f553d92f332e33810ab636758bc88a2
37005         * common/asshelp2.c (vprint_assuan_status): New.
37006         (print_assuan_status): Re-implement using above func.
37007         * agent/command.c (agent_print_status): New.
37008
37009         po: Add Ukrainian translation.
37010         + commit 8d8d740bfd73d8764a03220c0b0c949e03fea351
37011         * po/uk.po: New.
37012
37013         common: Replace macro based function calls by using DEFAULT_ERRSOURCE.
37014         + commit 13ec74481ce0137f7a60b3256cc4840073c77efa
37015         * common/dns-cert.h (get_dns_cert): Remove macro.
37016         * common/dns-cert.c (_get_dns_cert): Rename to get_dns_cert.  Replace
37017         arg ERRSOURCE by global DEFAULT_ERRSOURCE.
37018         * common/http.h (http_parse_uri, http_raw_connect, http_open)
37019         (http_open_document, http_wait_response): Remove macros.
37020         * common/http.c (_http_parse_uri, _http_raw_connect, _http_open)
37021         (_http_open_document, _http_wait_response): Remove underscore from
37022         symbols.  Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
37023         * common/ssh-utils.h (ssh_get_fingerprint)
37024         (ssh_get_fingerprint_string): Remove macros.
37025         * common/ssh-utils.h (_ssh_get_fingerprint)
37026         (_ssh_get_fingerprint_string): Remove underscore from symbols.
37027         Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
37028         * common/tlv.h (parse_ber_header, parse_sexp): Remove macros.
37029         * common/tlv.c: Include util.h.
37030         (_parse_ber_header, _parse_sexp): Remove underscore from symbols.
37031         Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
37032
37033 2012-02-06  Werner Koch  <wk@gnupg.org>
37034
37035         Add replacement hack for Android's broken ttyname.
37036         + commit 115a6ed55d1f6be33f66de6734359fa590ca3749
37037         * configure.ac (HAVE_TTYNAME) [__ANDROID__]: Add hack.
37038
37039         agent: Simplify printing of INQUIRE_MAXLEN.
37040         + commit 7981cdd1345d51fd917b2375691ead60c24db2cd
37041         * agent/command.c: Include asshelp.h.
37042         (cmd_pkdecrypt, cmd_genkey, cmd_preset_passphrase)
37043         (pinentry_loopback): Use print_assuan_status for INQUIRE_MAXLEN.
37044
37045         common: Add function print_assuan_status.
37046         + commit 1a0df8506050448f16c63666850e3ae6d94a971b
37047         * common/asshelp2.c: New.
37048         (print_assuan_status): New function.
37049         * common/Makefile.am (common_sources): Add asshelp2.c.
37050
37051         common: Add a global variable to for the default error source.
37052         + commit eb0faef81dae2cba1f62056fdc4dc2a7d58ac86a
37053         For the shared code parts it is cumbersome to pass an error sourse
37054         variable to each function.  Its value is always a constant for a given
37055         binary and thus a global variable makes things a lot easier than the
37056         former macro stuff.
37057         * common/init.c (default_errsource): New global var.
37058         (init_common_subsystems): Rename to _init_common_subsystems.  Set
37059         DEFAULT_ERRSOURCE.
37060         * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT.
37061         (init_common_subsystems): New macro.
37062         * common/util.h (default_errsource): Add declaration.
37063         * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
37064
37065 2012-02-03  Ben Kibbey  <bjk@luxsci.net>
37066
37067         Also let GENKEY and PKDECRYPT send the INQUIRE_MAXLEN status message.
37068         + commit ecda65498ac60dfde50fbbc71cd0cc321d7175a9
37069         * agent/command.c (cmd_pkdecrypt): Send the INQUIRE_MAXLEN status
37070         message before doing the inquire.
37071         (cmd_genkey): Ditto.
37072
37073 2012-02-02  Ben Kibbey  <bjk@luxsci.net>
37074
37075         Inform the client of the preset passphrase length.
37076         + commit 3f7788f2e035eb939abb27b3a53854ec0fc6178c
37077         * agent/command.c (cmd_preset_passphrase): Send the INQUIRE_MAXLEN
37078         status message before inquiring the passphrase.
37079
37080 2012-02-01  David Shaw  <dshaw@jabberwocky.com>
37081
37082         Honor --cert-digest-algo when recreating a cert.
37083         + commit 2b3cb2ee94625498e7a7f939216c9bcddef6ec20
37084         * g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when
37085           recreating a cert.
37086
37087         This is used by various things in --edit-key like setpref, primary,
37088         etc.  Suggested by Christian Aistleitner.
37089
37090 2012-01-27  Werner Koch  <wk@gnupg.org>
37091
37092         gl: Add support for Android to stdint.h replacement.
37093         + commit bdde44ae8d4709e33c09781c3d37a5da2c7a5e0d
37094         * gl/stdint_.h: When included from Bionic <sys/types.h>, just include
37095         the system's <stdint.h>.
37096
37097         gpg-connect-tool: Take the string "true" as a true condition.
37098         + commit 2871422d9a889cb632f59efda4d9cd170fc9fca7
37099         * tools/gpg-connect-agent.c (main): Handle strings "true" and "yes" in
37100         conditions as expected.
37101
37102 2012-01-26  Ben Kibbey  <bjk@luxsci.net>
37103
37104         Return GPG_ERR_CARD_NOT_PRESENT when pinentry-mode=loopback.
37105         + commit cf748e8736b984194345bfd74887b35d3d23fa37
37106         Since there isn't a way to prompt the user to insert the smartcard when
37107         pinentry-mode=loopback, return GPG_ERR_CARD_NOT_PRESENT instead of
37108         GPG_ERR_NO_PIN_ENTRY.
37109
37110         * agent/divert-scd.c (ask_for_card): Return GPG_ERR_CARD_NOT_PRESENT
37111         when pinentry-mode=loopback.
37112
37113         Also check for GPG_ERR_ASS_CANCELED during an inquire.
37114         + commit 3da10eefcb09a520f11e4fae7f59a33f80ffba69
37115         Fix pinentry-mode=loopback when cancelling an inquire from scdaemon.
37116         This is similar to commit 4f21f8d but for both protocol command
37117         cancellation and pinentry cancellation.
37118
37119         * agent/call-scd.c (agent_card_pkdecrypt): Check for
37120         GPG_ERR_ASS_CANCELED.
37121         (agent_card_pksign): Ditto.
37122
37123 2012-01-25  Werner Koch  <wk@gnupg.org>
37124
37125         nPth is now a hard requirement for GnuPG.
37126         + commit 001352077cdc7e402421c77328bea1a052005673
37127         * configure.ac: Remove cruft to allow building without npth.
37128
37129         Require libassuan 2.1.0.
37130         + commit c254d0f0d13a54777a62dad8f78a8f287d6ae565
37131         * configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.1.0.  This is due to
37132         the npth changes.
37133
37134         Fix strerror vs. gpg_strerror usage.
37135         + commit 2be7818c6d916a69ffdf88cce32960949a56e893
37136         This bug was introduced by the migration to npth.
37137         * agent/gpg-agent.c (handle_connections): Use strerror.
37138
37139         Add missing variable.
37140         + commit a55d2e16f1090264338dc3ad0b2afca28db27c09
37141         * agent/gpg-agent.c (handle_connections) [!W32]: Add missing variable.
37142
37143 2012-01-25  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
37144
37145         Port LDAP wrapper to NPTH.
37146         + commit 4074f966276be10a794fd63a7f443b9d974d3982
37147         * agent/gpg-agent.c (handle_connections): Handle error.
37148         * dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c: Port to NPTH.
37149
37150         Port Windows code to NPTH.
37151         + commit ccbb4c3652ee72386b8889358b829e256e1ebcda
37152         * agent/gpg-agent.c (get_agent_ssh_socket_name): Use
37153         INVALID_HANDLE_VALUE instead of 0.
37154         (handle_signal) [!HAVE_W32_SYSTEM]: Don't define.
37155         (handle_connections): Port Windows code to NPTH.
37156         * dirmngr/dirmngr.c (handle_connections): Port Windows code to NPTH.
37157         * g13/g13.c (handle_connections): Port Windows code to NPTH.
37158         * scd/scdaemon.c (handle_connections): Port Windows code to NPTH.
37159
37160         Port to npth.
37161         + commit 7a7a59782766a8bde0c3e7156d14bb2b0e4a3951
37162         * configure.ac: Don't check for PTH but for NPTH.
37163         (AH_BOTTOM): Remove PTH_SYSCALL_SOFT.
37164         (have_pth): Rename to ...
37165         (have_npth): ... this.
37166         (USE_GNU_NPTH): Rename to ...
37167         (USE_GNU_PTH): ... this.
37168         * m4/npth.m4: New file.
37169         * agent/Makefile.am, agent/cache.c, agent/call-pinentry.c,
37170         agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c,
37171         agent/trustlist.c, common/Makefile.am, common/estream.c,
37172         common/exechelp-posix.c, common/exechelp-w32.c,
37173         common/exechelp-w32ce.c, common/http.c, common/init.c,
37174         common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c,
37175         dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c,
37176         dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am,
37177         g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am,
37178         scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c,
37179         scd/scdaemon.c, tools/Makefile.am: Port to npth.
37180
37181 2012-01-25  Werner Koch  <wk@gnupg.org>
37182
37183         Require gitlog-to-changelog to be installed.
37184         + commit 495dc68586356891b82a2d2b6367c4131fd17f08
37185         * Makefile.am (GITLOG_TO_CHANGELOG): New.
37186         (gen-ChangeLog): Use installed version of gitlog-to-changelog.
37187
37188 2012-01-20  David Shaw  <dshaw@jabberwocky.com>
37189
37190         Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)
37191         + commit deee8147aab086161c91e6aa6fb41d7148a630f6
37192         * g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level
37193
37194         * g10/trustdb.c (check_trustdb_stale): Request a rebuild if
37195           pending_check_trustdb is true (set when we detect a trustdb
37196           parameter has changed).
37197
37198         * g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons
37199           listing for min_cert_level not matching.
37200
37201         * g10/tdbio.c (tdbio_update_version_record, create_version_record,
37202           tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record,
37203           tdbio_write_record): Add a byte for min_cert_level in the tdbio
37204           version record.
37205
37206 2012-01-20  Werner Koch  <wk@gnupg.org>
37207
37208         estream: Fix unclean usage of realloc.
37209         + commit e97e2ced6cf3ee295a3cc9f8968969a1910380ea
37210         * common/estream-printf.c (_ESTREAM_PRINTF_MALLOC): Remove.
37211         (_ESTREAM_PRINTF_FREE): Remove.
37212         (_ESTREAM_PRINTF_REALLOC): New.
37213         (fixed_realloc) [!_ESTREAM_PRINTF_REALLOC]): New.
37214         (estream_vasprintf): Use my_printf_realloc instead of my_printf_malloc
37215         and my_printf_free.
37216         (dynamic_buffer_out): Use my_printf_realloc instead of realloc.
37217
37218         Do not copy default merge commit log entries into the ChangeLog.
37219         + commit 7589e43b21c8d80c5a57ecb6eb78dfcd0b5dac46
37220         * scripts/gitlog-to-changelog: Skip merge commits.
37221
37222 2012-01-18  Ben Kibbey  <bjk@luxsci.net>
37223
37224         Add the INQUIRE_MAXLEN status message.
37225         + commit ae981dd8f454e2a8bbc6429bed5abc5e87cc83d5
37226         This status message is used to inform the client of the maximum length
37227         of an inquired passphrase and is used in pinentry-mode=loopback.
37228
37229         * agent/command.c (pinentry_loopback): Send the INQUIRE_MAXLEN status
37230         message before doing the inquire.
37231
37232 2012-01-16  Jim Meyering  <meyering@redhat.com>
37233
37234         yat2m: don't dereference pointer to freed memory.
37235         + commit 4402dc3f0a5c5d0f26ed2ae97f9cda9cf4e695fa
37236         * doc/yat2m.c (top_parse_file): Correct macrolist-freeing loop.
37237
37238         gpg-agent: fix lc-messages handling not to change Xauthority setting.
37239         + commit 37801918cb916ae8c641e003f204dcc70cccb29c
37240         * agent/gpg-agent.c (main): Supply omitted "break" statement for
37241         lc-messages option.  Otherwise, control would fall through to the
37242         following oXauthority case and use the same value there.
37243
37244 2012-01-15  Werner Koch  <wk@gnupg.org>
37245
37246         Fix indentation.
37247         + commit 75a402fc25e4ec9659723dd58306aff3415736f4
37248
37249
37250 2012-01-14  Ben Kibbey  <bjk@luxsci.net>
37251
37252         Fix scdaemon pinentry inquire cancelation.
37253         + commit 4f21f8d6e109eae111d2da91f4c946afda4174e4
37254         Similar to commit 29af488 but also fixes PKDECRYPT and PKSIGN.
37255
37256         * agent/call-scd.c (agent_card_pkdecrypt): Check for GPG_ERR_CANCELED
37257         when returning from the PKDECRYPT operation of scdaemon and cancel the
37258         inquire.
37259         (agent_card_pksign): Ditto.
37260         (cancel_inquire): New.
37261
37262 2012-01-11  Werner Koch  <wk@gnupg.org>
37263
37264         gpg: Fix segv with RSA_S keys.
37265         + commit 30ec869b8c63f1edcc58110ed20b83b0e77248f8
37266         * g10/misc.c (pubkey_get_npkey, pubkey_get_nskey)
37267         (pubkey_get_nsig, pubkey_get_nenc): Map all RSA algo ids to
37268         GCRY_PK_RSA.
37269
37270         estream: Avoid printing leading zeroes by %p on 32 bit systems.
37271         + commit b42bc48dfb4b6d4f745eb02d8de4f4dcffdacf48
37272         * common/estream-printf.c (pr_pointer): Synchronize definition of
37273         AULONG with its use.
37274
37275 2012-01-11  David Shaw  <dshaw@jabberwocky.com>
37276
37277         Refresh sample keys.
37278         + commit 860861279bc17dd80eecc9631c4ae5d161a335fd
37279
37280
37281 2012-01-10  David Shaw  <dshaw@jabberwocky.com>
37282
37283         Adapt HKP fix for fingerprint/long keyid retrievals for dirmngr.
37284         + commit 3f59561cee635c6801e0a59d3abff1c064fcbdbe
37285         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Use the longest valid keyid form
37286
37287 2012-01-06  Werner Koch  <wk@gnupg.org>
37288
37289         gpg: Make the double space in the middle of a fingerprint optional.
37290         + commit 957fe728466893bc63f5ccad197d3e245dca4bf3
37291         This change might help to c+p a fingerprint from an HTML page without
37292         being enclosed in a "pre" tag.
37293         * common/userids.c (classify_user_id): Skip a second blank in the
37294         middle of a fingerprint.
37295
37296         gpg: Allow use of a standard space separated fingerprint.
37297         + commit 372fb4fc0661014ccd9275c89e6da2208f87155f
37298         * common/userids.c (classify_user_id): Check for space separated GPG
37299         fingerprint.
37300
37301 2012-01-06  NIIBE Yutaka  <gniibe@fsij.org>
37302
37303         Merge ccid_driver_improvement branch.
37304         + commit 5988c8bfb7eafaca53c8abeb793f189acd3177c6
37305         * scd/apdu.c (ccid_keypad_operation): Rename from ccid_keypad_verify.
37306         (open_ccid_reader): Use ccid_keypad_operation for verify and modify.
37307
37308         * scd/ccid-driver.c (VENDOR_VASCO, VASCO_920): New.
37309         (ccid_transceive_apdu_level): Permit sending packet where
37310         apdulen <= 289.  Support receiving packets in a chain.
37311         (ccid_transceive_secure): Maximum is 15 for VASCO DIGIPASS 920.
37312         Support keypad_modify method such as CHANGE_REFERENCE_DATA: 0x24.
37313
37314 2012-01-03  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
37315
37316         Silence gcc warning.
37317         + commit ed432f030e604f7b2fd4a79c2110d92b9cde7501
37318         * sm/call-dirmngr.c (get_cached_cert): Make sure buflen is initialized.
37319
37320         Revert last change, add comment about link() return values.
37321         + commit ff2095ad7b4be7eaf9468b6ef39fd979527ecc4f
37322         * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check
37323         return value of link().
37324
37325         Fix compiler warnings.
37326         + commit 0dce26778ef8abd4fc40de689d7ec9b720d26430
37327         * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Check return
37328         value of link().
37329         * g13/g13.c: Make sure err is initialized.
37330         * scd/scdaemon.c (main) [!USE_GCRY_THREAD_CBS]: Do not define ERR.
37331
37332         Fix last change: Only set gcrypt thread callback for older versions.
37333         + commit 61ccd8d92d9d3b8ba0eca3c2969d7f6f37e16405
37334         * dirmngr/dirmngr.c, g13/g13.c: Rename FIX_GCRY_PTH_INIT to
37335         USE_GCRY_THREAD_CBS.
37336
37337 2012-01-03  Werner Koch  <wk@gnupg.org>
37338
37339         Terminate csh commands with a semicolon also for dirmngr.
37340         + commit 682df45d15661ed3544e2ed34bcb636200cc40f9
37341         * dirmngr/dirmngr.c (main): Terminate csh style output with a semicolon.
37342
37343         Terminate csh commands with a semicolon.
37344         + commit d01d9ff11f46cbd61b7b8c0e04431e4f0c4a8580
37345         Fixes bug#1386.
37346
37347         * agent/gpg-agent.c (main): Terminate csh style output with a semicolon.
37348         * scd/scdaemon.c: Ditto.
37349
37350 2012-01-02  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
37351
37352         Only set gcrypt thread callback for older version of gcrypt.
37353         + commit a2d9e48fcca6cfc2dfadef6dbd3579a30314676b
37354         * agent/gpg-agent.c, dirmngr/dirmngr.c, g13/g13.c, scd/scdaemon.c
37355         (USE_GCRY_THREAD_CBS): New macro, defined if
37356         GCRY_THREAD_OPTION_VERSION is 0.
37357         (fixed_gcry_pth_init) [!USE_GCRY_THREAD_CBS]: Don't define.
37358         (main) [!USE_GCRY_THREAD_CBS]: Do not install thread callbacks.
37359
37360 2011-12-28  David Shaw  <dshaw@jabberwocky.com>
37361
37362         Use the longest key ID available when talking to a HKP server.
37363         + commit c6aaf024651c7d55ac9fb77a53c084efb3adc1a9
37364         This is issue 1340.  Now that PKSD is dead, and SKS supports long key
37365         IDs, this is safe to do.  Patch from Daniel Kahn Gillmor
37366         <dkg@fifthhorseman.net>.
37367
37368 2011-12-20  Werner Koch  <wk@gnupg.org>
37369
37370         Post-release version number update.
37371         + commit 97d1c884e62bba94e42bb5b2bb13cd3880334c31
37372
37373
37374         Release 2.1.0beta3.
37375         + commit 604c130a85d4203b9d84137a42673aeaff1c0bd1
37376
37377
37378         Prepare for the beta3 release.
37379         + commit 8e47f1e576f70d4dbe966523057fe3078006ae8b
37380
37381
37382         po: Update the German translation.
37383         + commit 6f02c143440865781b4e3c1753e24e55a0de40e4
37384
37385
37386         Add the STEED Self-Signing Nonthority certificate.
37387         + commit fe2f1826991e8130f727ee15df1a4651f679752f
37388         * doc/com-certs.pem: Install it when creating a keybox.
37389
37390         faq: Add section on US export restrictions.
37391         + commit 779611494dbd187d09b05d2eb10faabd31a70156
37392
37393
37394         Require Libassuan 2.0.3.
37395         + commit 366512abe44d9e71bb2c699c29477afa6ac71cdd
37396         * configure.ac: Require Libassuan 2.0.3.
37397         * agent/call-scd.c (ASSUAN_CONVEY_COMMENTS): Remove macro replacement.
37398         * agent/command.c (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Remove
37399         dependency.
37400         (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Ditto.
37401         * scd/command.c (cmd_killscd) [ASSUAN_FORCE_CLOSE]: Ditto.
37402
37403 2011-12-20  NIIBE Yutaka  <gniibe@fsij.org>
37404
37405         Add error log and debug log for pcsc_keypad_verify and pcsc_keypad_modify.
37406         + commit 07f20f313a0b13e5c93168a8a62ff1cbb94a4514
37407         * scd/apdu.c (pcsc_keypad_verify): Add debug log and error log.
37408         (pcsc_keypad_modify): Likewise.
37409
37410 2011-12-19  Werner Koch  <wk@gnupg.org>
37411             Ben Kibbey  <bjk@luxsci.net>
37412
37413         scd: Fix for card change returning GPG_ERR_CARD_RESET.
37414         + commit f4b7f7146349c388a2f3ce224ff2006606c66232
37415         * scd/apdu.c (apdu_connect): Do not test for zero atrlen.
37416
37417 2011-12-16  NIIBE Yutaka  <gniibe@fsij.org>
37418
37419         Don't kill pinentry by SIGKILL but let it quit by SIGINT.
37420         + commit f6251c0d0af92331388f5e9bcd1750cbadcaca8f
37421         * agent/call-pinentry.c (agent_popup_message_stop): To pinentry, send
37422         SIGINT (was: SIGKILL).
37423
37424 2011-12-15  David Shaw  <dshaw@jabberwocky.com>
37425
37426         Merge fix for issue 1331 from 1.4.
37427         + commit a98260c39f1c0ccdad004784cbc9440376766082
37428         * photoid.c (generate_photo_id): Check for the JPEG magic numbers
37429         instead of JFIF since some programs generate an EXIF header first.
37430
37431 2011-12-15  Werner Koch  <wk@gnupg.org>
37432
37433         scd: Prefer application Geldkarte over DINSIG.
37434         + commit 27089564b6453deaf7b4ffe7cc5f5f290b6d892b
37435         * scd/app.c (select_application): Reorder application tests.
37436
37437         scd: Add option --dump-atr to command APDU.
37438         + commit b22d62bd1481dfe13d60a6d16b09b9297944f063
37439         * scd/atr.c: Rewrite.
37440         * scd/Makefile.am (scdaemon_SOURCES): Add atr.c and atr.h.
37441         * scd/command.c (cmd_apdu): Add option --dump-atr.
37442
37443         estream: New function es_fclose_snatch.
37444         + commit 7737a2c269657189a583cde7f214f20871d264f8
37445         * common/estream.c (cookie_ioctl_function_t): New type.
37446         (es_fclose_snatch): New function.
37447         (COOKIE_IOCTL_SNATCH_BUFFER): New constant.
37448         (struct estream_internal): Add field FUNC_IOCTL.
37449         (es_initialize): Clear FUNC_IOCTL.
37450         (es_func_mem_ioctl): New function.
37451         (es_fopenmem, es_fopenmem_init): Init FUNC_IOCTL.
37452
37453 2011-12-14  Werner Koch  <wk@gnupg.org>
37454
37455         scd: Skip S/N reading for the "undefined" application.
37456         + commit 792e137ec7997a0ff5c54ff970611238d28d4ba8
37457         * scd/app.c (select_application): Skip serial number reading.
37458
37459         scd: Add more status word values for documentation.
37460         + commit 0bac31ee9f74a25d76b08c3e0355a338908f083a
37461
37462
37463         scd: Add the "undefined" stub application.
37464         + commit dcd64131c60efd0189aa05d5dbce6b93547b04e3
37465         * scd/app.c (select_application): Implement the "undefined"
37466         application.
37467
37468         agent: Pass comment lines from scd verbatim thru gpg-agent.
37469         + commit 45cf9de341405a228e331bd3893cbcd6b72306be
37470         * agent/call-scd.c (pass_status_thru): Pass comment lines verbatim.
37471         * tools/gpg-connect-agent.c (help_cmd_p): New.
37472         (main): Treat an "SCD HELP" the same as "HELP".
37473
37474         scd: Fix resetting and closing of the reader.
37475         + commit 2d91febbd8d30beb7eb33f7aa80ffd5691d1d3cc
37476         * scd/command.c (update_card_removed): Do no act on an invalid VRDR.
37477         (do_reset): Ignore apdu_reset error codes for no and inactive card.
37478         Close the reader before setting the slot to -1.
37479         (update_reader_status_file): Notify the application before closing the
37480         reader.
37481
37482         scd: Add debug option for reader function calls.
37483         + commit 07ea8c56b507b06d4bd70e94fa51914659afac4b
37484         * scd/scdaemon.h (DBG_READER_VALUE, DBG_READER): New.
37485         * scd/apdu.c (apdu_open_reader, apdu_close_reader)
37486         (apdu_shutdown_reader, apdu_connect, apdu_disconnect)
37487         (apdu_reset, apdu_get_atr, apdu_get_status): Add debug code.
37488         (apdu_activate): Remove this unused function.
37489
37490 2011-12-13  Werner Koch  <wk@gnupg.org>
37491
37492         scd: New option --debug-assuan-log-cats.
37493         + commit 00c760f628f4cf0fc11e79d305c172f98123f815
37494         * scd/scdaemon.c (oDebugAssuanLogCats): New.
37495         (opts): Add option --debug-assuan-log-cats.
37496         (main): Implement option.
37497         * common/asshelp.c (set_libassuan_log_cats): New.
37498
37499         scd: Introduce a virtual reader table.
37500         + commit 24e121ef261731069868ca403b818f1168237f53
37501         The vreader table makes the code more clear by explicitly talking
37502         about APDU slots and reader indices.  It also accommodates for future
37503         extensions.
37504
37505         * scd/scdaemon.h (server_control_s): Remove READER_SLOT.
37506         * scd/scdaemon.c (scd_init_default_ctrl): Do not init READER_SLOT.
37507         * scd/app.c (check_application_conflict): Add arg SLOT.
37508         * scd/command.c (slot_status_s): Rename to vreader_s.
37509         (server_local_s): Add field VREADER_IDX as replacement for
37510         the READER_SLOT in server_control_s.  Change all users.
37511         (slot_table): Rename to vreader_table.  Change all users.
37512         (vreader_slot): New.
37513         (do_reset, cmd_apdu): Map vreader to apdu slot.
37514         (get_reader_slot): Rename to get_current_reader.  Return -1 on error.
37515         (open_card): Map vreader toapdu slot.  Pass slot to
37516         check_application_conflict.
37517         (scd_command_handler): Init VREADER_IDX.
37518         (update_reader_status_file): Reset SLOT field on error.
37519
37520 2011-12-12  Werner Koch  <wk@gnupg.org>
37521
37522         scd: Retry command SERIALNO for an inactive card.
37523         + commit 11164662788036c4b15d30555ea33ec0b6f5a670
37524         * scd/command.c (cmd_serialno): Retry once for an inactive card.
37525
37526         Fix detection of card removal and insertion.
37527         + commit cd29dc0f1cf7f3bd7938ffa65bf13f9a75d8c156
37528         * scd/apdu.c (apdu_connect): Return status codes for no card available
37529         and inactive card.
37530         * scd/command.c (TEST_CARD_REMOVAL): Also test for GPG_ERR_CARD_RESET.
37531         (open_card): Map apdu_connect status to GPG_ERR_CARD_RESET.
37532
37533         gitlog-to-changelog: New option --tear-off.
37534         + commit ea0a21410b8fa460882c0f8de90b9291345fd4fc
37535         * scripts/gitlog-to-changelog: Add option --tear-off.
37536         * Makefile.am (gen-ChangeLog): Use that option.
37537
37538 2011-12-07  Werner Koch  <wk@gnupg.org>
37539
37540         gpgsm: Add new validation model "steed".
37541         + commit 8a12a2000d82acfa881e8c18d028290100bf5e43
37542         * sm/gpgsm.h (VALIDATE_FLAG_STEED): New.
37543         * sm/gpgsm.c (gpgsm_parse_validation_model): Add model "steed".
37544         * sm/server.c (option_handler): Allow validation model "steed".
37545         * sm/certlist.c (gpgsm_cert_has_well_known_private_key): New.
37546         * sm/certchain.c (do_validate_chain): Handle the
37547         well-known-private-key attribute.  Support the "steed" model.
37548         (gpgsm_validate_chain): Ditto.
37549         * sm/verify.c (gpgsm_verify): Return "steed" in the trust status line.
37550         * sm/keylist.c (list_cert_colon): Print the new 'w' flag.
37551
37552         Correct punctuation in the ChangeLog summary line.
37553         + commit 14e4fdc9f97d6f12bf563adfff1e3157305d7795
37554         * Makefile.am (gen-ChangeLog): Supply --append-dot.
37555
37556         Allow comments which will not show up in the ChangeLog.
37557         + commit cd3732841de32ce5c7841e6e158df3a5f1102f86
37558         * scripts/gitlog-to-changelog: Ignore lines after a "--" line.
37559
37560 2011-12-06  Werner Koch  <wk@gnupg.org>
37561
37562         gpgsm: Allow specification of an AuthorityKeyIdentifier.
37563         + commit 596b84a4de58def2155d3fe56462f6607f135b69
37564         * sm/certreqgen.c (pAUTHKEYID): New.
37565         (read_parameters): Add keyword Authority-Key-Id.
37566         (proc_parameters): Check its value.
37567         (create_request): Insert an Authority-Key-Id.
37568
37569         gpgsm: Allow arbitrary extensions for cert creation.
37570         + commit 5cdad8ff000152b4bd01953646bb87fe8703c70d
37571         * sm/certreqgen.c (pSUBJKEYID, pEXTENSION): New.
37572         (read_parameters): Add new keywords.
37573         (proc_parameters): Check values of new keywords.
37574         (create_request): Add SubjectKeyId and extensions.
37575         (parse_parameter_usage): Support "cert" and the encrypt alias "encr".
37576
37577         gpgsm: Fix storing of the serial number.
37578         + commit 3f284e40502d8181b0b3ea66c77cd7c1252ea781
37579         * sm/certreqgen.c (create_request): Fix hex-bin conversion.
37580
37581 2011-12-05  Werner Koch  <wk@gnupg.org>
37582
37583         Fix last change.
37584         + commit 9274d4d18281b3364fa8abaa821dddf124b105d7
37585         * agent/command.c (start_command_handler): Remove use of removed var.
37586
37587         Amend the agent code with more comments.
37588         + commit 477360e8cdc458b0a36e9c7fb52a35f27766255d
37589         * agent/command.c (server_local_s): Remove unused field MESSAGE_FD.
37590
37591 2011-12-02  Werner Koch  <wk@gnupg.org>
37592
37593         Support the Cherry ST-2000 card reader.
37594         + commit 239659d3a0b8c0c378734ca3d1e9210a02e24da7
37595         * scd/ccid-driver.c (SCM_SCR331, SCM_SCR331DI, SCM_SCR335)
37596         (SCM_SCR3320, SCM_SPR532, CHERRY_ST2000): New constants.
37597         (parse_ccid_descriptor): Use them.
37598         (scan_or_find_usb_device, ccid_transceive_secure): Handle Cherry
37599         ST-2000.  Suggested by Matthias-Christian Ott.
37600
37601         Avoid possible double free in export.c.
37602         + commit 96dc146fa17a7853277dbf3dc771c585a815c247
37603         * g10/export.c (transfer_format_to_openpgp): Avoid possible double
37604           free of LIST.  Reported by NIIBE Yutaka.
37605
37606 2011-12-02  NIIBE Yutaka  <gniibe@fsij.org>
37607
37608         Fix pinpad input support for passphrase modification.
37609         + commit bf37c32367ba149559385ee90b6435cef8bd6412
37610         * apdu.c (pcsc_keypad_verify): Have dummy Lc field with value 0.
37611         (pcsc_keypad_modify): Likewise.
37612         (pcsc_keypad_modify): It's only for ISO7816_CHANGE_REFERENCE_DATA.
37613         bConfirmPIN value is determined by the parameter p0.
37614
37615         * app-openpgp.c (do_change_pin): The flag use_keypad should be 0 when
37616         reset_mode is on, or resetcode is on.  use_keypad only makes sense for
37617         iso7816_change_reference_data_kp.
37618
37619         * iso7816.h (iso7816_put_data_kp): Remove.
37620         (iso7816_reset_retry_counter_kp): Remove.
37621         (iso7816_reset_retry_counter_with_rc_kp): Remove.
37622         (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.
37623
37624         * iso7816.c (iso7816_put_data_kp): Remove.
37625         (iso7816_reset_retry_counter_kp): Remove.
37626         (iso7816_reset_retry_counter_with_rc_kp): Remove.
37627         (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.
37628
37629 2011-12-01  Werner Koch  <wk@gnupg.org>
37630
37631         Add hook to check the commit log syntax.
37632         + commit 29e96e6b9a8e68e6554dd48bc2ce68ae9525d29f
37633         * autogen.sh: Install commit-msg hook for git.
37634
37635         Generate the ChangeLog from commit logs.
37636         + commit 2336b09779d313c1594acf6df3bd8a8486e90458
37637         * scripts/gitlog-to-changelog: New script.  Taken from gnulib.
37638         * scripts/git-log-fix: New file.
37639         * scripts/git-log-footer: New file.
37640         * doc/HACKING: Describe the ChangeLog policy
37641         * ChangeLog: New file.
37642         * Makefile.am (EXTRA_DIST): Add new files.
37643         (gen-ChangeLog): New.
37644         (dist-hook): Run gen-ChangeLog.
37645
37646         Rename all ChangeLog files to ChangeLog-2011.
37647
37648 2011-12-01  Werner Koch  <wk@gnupg.org>
37649
37650         NB: Changes done before December 1st, 2011 are described in
37651         per directory files named ChangeLog-2011.  See doc/HACKING for
37652         details.
37653
37654         -----
37655         Copyright (C) 2011 Free Software Foundation, Inc.
37656
37657         Copying and distribution of this file and/or the original GIT
37658         commit log messages, with or without modification, are
37659         permitted provided the copyright notice and this notice are
37660         preserved.