Imported Upstream version 2.3.1
[platform/upstream/gpg2.git] / ChangeLog
1 2021-04-20  Werner Koch  <wk@gnupg.org>
2
3         Release 2.3.1.
4         + commit cbbdb88627fe57ebf02b8b4bf9002d356e57e2e4
5
6
7         Support log-file option from common.conf for all daemon.
8         + commit 45918813f0599505e4f84bd44b09fb708b4e7f23
9         * agent/gpg-agent.c: Include comopt.h.
10         (main): Read log-file option from common.conf.
11         (reread_configuration): Ditto.
12         * dirmngr/dirmngr.c: Include comopt.h.
13         (main): Read log-file option from common.conf.
14         (reread_configuration): Ditto.
15         * kbx/keyboxd.c: Include comopt.h.
16         (main): Read log-file option from common.conf.
17         (reread_configuration): Ditto.
18         * scd/scdaemon.c: Include comopt.h.
19         (main): Read log-file option from common.conf.
20
21         gpgconf: Fix a diagnostic output.
22         + commit b657d6c3bd8103d40d511a3293313a891a26a9f5
23         * tools/gpgconf-comp.c (gc_component_launch): Fix diagnostic.
24         * doc/examples/common.conf: Fix example.
25
26         sm: New command --show-certs.
27         + commit 51419d63415ae2aa029f8829099b6789b264edc5
28         * sm/keylist.c (do_show_certs): New.
29         (gpgsm_show_certs): New.
30         * sm/gpgsm.c (aShowCerts): New.
31         (opts): Add --show-certs.
32         (main): Call gpgsm_show_certs.
33
34 2021-04-19  Werner Koch  <wk@gnupg.org>
35
36         build: Fix build problems on macOS for gpgsm tests and gpg-card.
37         + commit 5fe60576d50f7c857d0a865a9630212422fa1ad1
38         * tools/gpg-card.c: Include ctype.h.
39         * sm/Makefile.am (t_common_ldadd): Add LIBICONV.
40
41 2021-04-19  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
42
43         build: Allow selection of TSS library.
44         + commit 93c88d0af36b70a406997b40c49bfc14c17b4cd2
45         * configure.ac: New option --with-tss to force the use of a
46         specific TSS library.
47
48         gpg: Fix showpref to list AEAD feature.
49         + commit 86f446fd446fcc7295ecf6b37a3f4cca45a165f1
50         * g10/keyedit.c (show_prefs): Show 'AEAD' if flags.aead is set.
51
52 2021-04-19  Werner Koch  <wk@gnupg.org>
53
54         gpg,gpgsm: Move use-keyboxd to the new conf file common.conf.
55         + commit d13c5bc244ce1daed285424d920171fc2bcd7290
56         * common/comopt.c, common/comopt.h: New.
57         * common/Makefile.am: Add them.
58         * g10/gpg.c: Include comopt.h.
59         (main): Also parse common.conf.
60         * sm/gpgsm.c: Include comopt.h.
61         (main): Set a flag for the --no-logfile option.  Parse common.conf.
62
63         * tools/gpgconf-comp.c (known_options_gpg): Remove "use-keyboxd", add
64         pseudo option "use_keyboxd".
65         (known_pseudo_options_gpg): Add pseudo option "use_keyboxd".
66         (known_options_gpgsm): Remove "use-keyboxd".
67
68         * tests/openpgp/defs.scm (create-gpghome): Create common.conf.
69
70         * doc/examples/common.conf: New.
71
72 2021-04-16  Werner Koch  <wk@gnupg.org>
73
74         gpg: Lookup a missing public key of the current card via LDAP.
75         + commit d7e707170fbe2956deb3d81e2802d21352079722
76         * g10/getkey.c (get_seckey_default_or_card): Lookup a missing public
77         key from the current card via LDAP.
78         * g10/call-dirmngr.c: Include keyserver-intetnal.h.
79         (gpg_dirmngr_ks_get): Rename arg quick into flags.  Take care of the
80         new LDAP flag.
81         * g10/keyserver-internal.h (KEYSERVER_IMPORT_FLAG_QUICK): New.
82         Replace the use of the value 1 for the former quick arg.
83         (KEYSERVER_IMPORT_FLAG_LDAP): New.
84         * g10/keyserver.c (keyserver_get_chunk): Increase the reserved line
85         length.
86         * dirmngr/ks-action.c (ks_action_get): Add arg ldap_only.
87         * dirmngr/server.c (cmd_ks_get): Add option --ldap.
88
89         scd:p15: Support attribute KEY-FPR.
90         + commit 30f90fc8574be4c48ac8d3ff41479481414c0dee
91         * scd/app-p15.c: Include openpgpdefs.h.
92         (struct prkdf_object_s): Add fields have_keytime and ecdh_kdf.
93         (read_p15_info): Set ecdh_kdf.
94         (keygrip_from_prkdf): Flag that we have the keytime.
95         (send_keypairinfo): Send the key time only if valid.
96         (send_key_fpr_line): New.
97         (send_key_fpr): New.
98         (do_getattr): Add KEY-FPR.
99
100         common: New module to compute openpgp fingerprints.
101         + commit 2f2bdd9c0894eb43f719da8b529b4c7a46f742a0
102         * common/openpgp-fpr.c: New.
103         * common/Makefile.am (common_sources): Add it.
104
105 2021-04-13  Werner Koch  <wk@gnupg.org>
106
107         gpg: Do not use self-sigs-only for LDAP keyserver imports.
108         + commit 6c26e593df51475921410ac97e9227df6b258618
109         * dirmngr/ks-engine-ldap.c (ks_ldap_get): Print a SOURCE status.
110         * g10/options.h (opts): New field expl_import_self_sigs_only.
111         * g10/import.c (parse_import_options): Set it.
112         * g10/keyserver.c (keyserver_get_chunk): Add special options for LDAP.
113
114 2021-04-13  Jakub Jelen  <jjelen@redhat.com>
115
116         common: Fix memory leaks.
117         + commit a16f726f9404f173705cc3bef71daee38d2c094b
118         * common/name-value.c (do_nvc_parse): Free NAME.
119         * common/recsel.c (recsel_parse_expr): Release SE_HEAD and EXPR_BUFFER.
120
121         kbx: Fix memory leak.
122         + commit 51bbd99a3c9b09a78e766a312d97a1d40372c6cd
123         * kbx/keybox-update.c (blob_filecopy): Goto leave instead of return.
124
125         tools: Fix memory leaks.
126         + commit 4c8be54cc430bbebd41fd7c452ff4ff9e8ff2bd5
127         * tools/gpgsplit.c (write_part): Free BLOB on error.
128
129         scd: Fix memory leaks.
130         + commit 7cbe29c4fb4f593e194b6c25cb31633b4a6e0b2b
131         * scd/apdu.c (apdu_dev_list_start): Free DL.
132         * scd/app-nks.c (pubkey_from_pk_file): Fix typo in condition.
133
134         agent,kbx: Add LIBASSUAN_CLFAGS.
135         + commit cd66b2eb0d34b135175899362e191fff81588608
136         * agent/Makefile.am (gpg_preset_passphrase_CFLAGS, t_protect_CFLAGS):
137         Add LIBASSUAN_CFLAGS.
138         * kbx/Makefile.am (libkeybox_a_CFLAGS, libkeybox509_a_CFLAGS):
139         Likewise.
140
141 2021-04-12  Werner Koch  <wk@gnupg.org>
142
143         scd:p15: Match private keys with certificates also by labels.
144         + commit ecb9265b8dc03a153044e19be804d4c2d2caa4e8
145         * scd/app-p15.c (cdf_object_from_label): New.
146         (cdf_object_from_certid): Fallback to label matching.
147         (read_p15_info): Ditto.
148         (keygrip_from_prkdf): Ditto.  Replace duplicated code by a call to
149         cdf_object_from_objid.
150
151 2021-04-08  Werner Koch  <wk@gnupg.org>
152
153         scd:nks: Handle APP_READKEY_FLAG_INFO.
154         + commit 63320ba2f8147ee86f4406c9590f6b28cad4771d
155         * scd/app-nks.c (keygripstr_from_pk_file): Fix ignored error.
156         (get_nks_tag): New.
157         (do_learn_status_core): Use it.  Make sure not to mange the
158         KEYPAIRINFO line if no usage is known.
159         (do_readkey): Output the KEYPAIRINFO for the keygrip case.
160
161         scd: Fix duplicate output of KEYPAIRINFO by readkey command.
162         + commit 22fd48e48d007a0cba6c8a8f6ad6cb4fe7470534
163         * scd/app-help.c (app_help_get_keygrip_string_pk): Make HEXKEYGRIP
164         parm optional.
165         * scd/command.c (do_readkey): Remove duplicate output of keypairinfo
166         lines.
167
168 2021-04-08  NIIBE Yutaka  <gniibe@fsij.org>
169
170         gpg: Ed448 and X448 are only for v5.
171         + commit 36355394d865f5760075e62267d70f7a7d5dd671
172         * g10/keygen.c (parse_key_parameter_part): Generate with version 5
173         packet, when it's Ed448 or X448.
174
175         scd: Fix CCID driver for SCM SPR332/SPR532.
176         + commit ab66c4357595b8a10ca25fd735f439fe795919b2
177         * scd/ccid-driver.c (ccid_vendor_specific_pinpad_setup): New.
178         (ccid_vendor_specific_setup): Only send CLEAR_HALT.
179         (ccid_transceive_secure): Each time, use send_escape_cmd.
180
181         common: Fix gnupg_wait_processes, by skipping invalid PID.
182         + commit d82dae5d2229a30dbc78aadc4d544d30dac76a1c
183         * common/exechelp-posix.c (gnupg_wait_processes): Skip invalid PID.
184
185 2021-04-07  Werner Koch  <wk@gnupg.org>
186
187         Release GnuPG 2.3.0.
188         + commit c922a798a341261f1aafaf7c1c0217e4ce3e3acf
189
190
191 2021-04-01  Werner Koch  <wk@gnupg.org>
192
193         gpgconf: Return a new pseudo option compliance_de_vs.
194         + commit a78475fbb7b60ca96137fbe179d8b939cfe2cd89
195         * tools/gpgconf-comp.c (known_pseudo_options_gpg): Add
196         "compliance_de_vs".
197         * g10/gpg.c (gpgconf_list): Returh that pseudo option.
198
199         common: Make the compliance check more robust.
200         + commit 1d1ec1146c04415c7051af62e133459a4537c945
201         * common/compliance.c (get_compliance_cache): New.
202         (gnupg_rng_is_compliant): Use per mode cache.
203         (gnupg_gcrypt_is_compliant): Ditto.
204
205         card: New flag --reread for LIST.
206         + commit c727951a2440913bbab5b250c9bd2bb1d35ab0d7
207         * tools/gpg-card.c (cmd_list): Add flag --reread.
208         * tools/card-call-scd.c (scd_learn): New arg reread.
209
210         * tools/card-call-scd.c (release_card_info): Fix releasing of the new
211         label var.
212
213         scd: New flag --reread for LEARN.
214         + commit ff87f4e578f412332ae59fdab016f0a5304baaf9
215         * scd/command.c (cmd_learn): Add flag --reread.
216         * scd/app-common.h (struct app_ctx_s): New field need_reset.
217         * scd/app.c (write_learn_status_core): Set need_reset if we notice an
218         error after returning from a reread.  Change all callers of card
219         functions to return GPG_ERR_CARD_RESET so that that app is not anymore
220         used.
221
222         scd:p15: New flag APP_LEARN_FLAG_REREAD.
223         + commit e17d3f866057543d142d63379fd4f4a36d79147f
224         * scd/app-p15.c (do_deinit): Factor code out to ...
225         (release_lists, release_tokeninfo): new.
226         (read_ef_tokeninfo): Reset all data before reading.
227         (read_p15_info): Ditto.
228         (do_learn_status): Implement reread flag.
229
230 2021-03-31  Werner Koch  <wk@gnupg.org>
231
232         scd: Replace all assert macros by the log_assert macro.
233         + commit 1c16878efd0bcf036f56abef93d64ac41ce9e95b
234
235
236         build: Require automake 1.16.3.
237         + commit 6ca540715139899137e1f86c7e1dcbd0288f15b3
238         * configure.ac (min_automake_version): Bump to 1.16.3
239
240 2021-03-31  NIIBE Yutaka  <gniibe@fsij.org>
241
242         build: Update gpg-error.m4.
243         + commit 8d6152a4cfd8a4cf176c01f99e1d49eeecab4367
244         * m4/gpg-error.m4: Update from libgpg-error.
245
246 2021-03-30  Werner Koch  <wk@gnupg.org>
247
248         card: Print the key's label if available.
249         + commit 0d6f276f61c583d776687029c715b1ee4280e4ed
250         * tools/gpg-card.h (struct key_info_s): Add field 'label'.
251         * tools/card-call-scd.c (learn_status_cb): Parse KEY-LABEL.
252         (scd_learn): Always request KEY-LABEL.
253         * tools/gpg-card.c (nullnone): New.
254         (list_one_kinfo, list_card): Use it.  Print the label.
255
256         scd:p15: Return labels for keys and certificates.
257         + commit 7f9126363265a6b6fe4223d68fc4e87678c4ddfc
258         * scd/app-p15.c (send_certinfo): Extend certinfo.
259         (do_getattr): Support KEY-LABEL.
260
261         scd:p15: For CardOS make use of ISO7816_VERIFY_NOT_NEEDED.
262         + commit 651c07a7301c33229af051d83edbf898bae52e8b
263         * scd/app-p15.c (verify_pin): Take care of verify status.
264
265         scd:p15: Return the creation time of the keys.
266         + commit de4d3c99aa58ee06ae978d59e7e3aa7bace1c440
267         * scd/app-p15.c (struct prkdf_object_s): Add keytime and keyalgostr.
268         (keygrip_from_prkdf): Set them.
269         (send_keypairinfo): Extend KEYPAIRINFO.
270
271 2021-03-30  NIIBE Yutaka  <gniibe@fsij.org>
272
273         build: Fix for make distcheck, no EPS support.
274         + commit d1bac0a3be7081a4bfc7f813f9d626e1396ad5c1
275         * Makefile.am (AM_DISTCHECK_DVI_TARGET): Specify 'pdf'.
276         * doc/Makefile.am (EXTRA_DIST, BUILT_SOURCES): Remove EPS files.
277         (gnupg.dvi): Remove.
278
279 2021-03-29  Werner Koch  <wk@gnupg.org>
280
281         scd:p15: Make RSA with SHA512 work with CardOS.
282         + commit 592f48011790e30d4bcfd9093eb58b786c8c9a8b
283         * scd/app-p15.c (do_sign): Rewrite.
284
285         agent: Skip unknown unknown ssh curves seen on cards.
286         + commit 2d2391dfc25cfe160581b1bb4b4b8fc4764ac304
287         * agent/command-ssh.c (ssh_handler_request_identities): Skip unknown
288         curves.
289
290         scd:p15: Support ECDSA and ECDH for CardOS.
291         + commit a494b29af9cc9c4c8c8323bae20e845d5a390448
292         * scd/iso7816.c (iso7816_pso_csv): New.
293         * scd/app-help.c (app_help_pubkey_from_cert): Uncompress a point if
294         needed.
295
296         * scd/app-p15.c (CARD_PRODUCT_RSCS): New.
297         (struct prkdf_object_s): Add fields is_ecc, token_label, and
298         tokenflags.
299         (do_deinit): Free new fields.
300         (cardproduct2str): New.
301         (read_ef_prkdf): Set new is_ecc flag.
302         (read_ef_tokeninfo): Store some data and move Tokeninfo diags to ...
303         (read_p15_info): here.  set the product info here after all data has
304         been gathered.
305         (send_keypairinfo): Chnage the way the gpgusage flags are used.
306         (make_pin_prompt): If the token has a label and the current cert has
307         no CN, show the label as holder info.
308         (do_sign): Support ECDSA.  Take care of the gpgusage flags.
309         (do_decipher): Support ECDH.  Take care of the gpgusage flags.
310
311         gpg: Allow ECDH with a smartcard returning just the x-ccordinate.
312         + commit f129b0e97730b47d62482fba9599db39b526f3d2
313         * g10/ecdh.c (extract_secret_x): Add extra safety check. Allow for
314         x-only coordinate.
315
316 2021-03-28  Werner Koch  <wk@gnupg.org>
317
318         gpgconf: Do not i18n an empty string to the PO files meta data.
319         + commit 18d884f8411a0ca263a8aa588bb49eb0dae9ee19
320         * tools/gpgconf-comp.c (my_dgettext): Ignore empty strings.
321
322 2021-03-26  Werner Koch  <wk@gnupg.org>
323
324         tests: Make sure the built keyboxd is used by the tests.
325         + commit a5e72b663b3649c939d32d6526b5e2b3347dedd9
326         * tests/openpgp/defs.scm (tool): Add keyboxd.
327         * tests/openpgp/setup.scm: Ditto.
328
329         gpgconf: Fix another argv overflow if --homedir is used.
330         + commit 057131159b445d2d49392e95c677ad7b4cd4ae9c
331         * tools/gpgconf-comp.c (gc_component_check_options): Increase array.
332
333         gpgconf: Fix argv overflow if --homedir is used.
334         + commit d3d57a1bc88ece0c12c91f54b089482cce92c5a0
335         * tools/gpgconf-comp.c (gc_component_launch): Fix crasg due to too
336         small array.
337         (gpg_agent_runtime_change): Fix error message.
338         (scdaemon_runtime_change): Ditto.
339         (tpm2daemon_runtime_change): Ditto.
340         (dirmngr_runtime_change): Ditto.
341         (keyboxd_runtime_change): Ditto.
342
343         agent: Add debug output for failed RSA signature verification.
344         + commit 6de1ec3ba59fa54ab60b2923ba9caa77fc9d5281
345         * agent/pksign.c (agent_pksign_do): Support ECC and DSA verification
346         and print some debug info in the error case.
347
348         common: New function to uncompress an ECC public key.
349         + commit 935765b451aadc63fbba763a4a00f4efa0254436
350         * common/sexputil.c (ec2os): New.
351         (uncompress_ecc_q_in_canon_sexp): New.
352
353         * common/t-sexputil.c (fail2): new.
354         (test_ecc_uncompress): New.
355         (main): Run new test.
356
357 2021-03-26  NIIBE Yutaka  <gniibe@fsij.org>
358
359         scd: Fix PC/SC error handling at apdu_dev_list_start.
360         + commit d4e5979c630c2960cf1fd5796f1060419e71cb04
361         * scd/apdu.c (PCSC_E_NO_READERS_AVAILABLE): Add.
362         (pcsc_error_to_sw): Handle PCSC_E_NO_READERS_AVAILABLE.
363         (apdu_dev_list_start): Return error correctly.
364
365 2021-03-24  Werner Koch  <wk@gnupg.org>
366
367         card: Add option --use-default-pin to command "login".
368         + commit 73bad368dacf5334bf78af15b243d06fd1273849
369         * tools/gpg-card.c (cmd_login): Add option.
370
371         scd:p15: Make $SIGNKEY et al determination more fault tolerant.
372         + commit 964363e788210f96a471e31ffa8fd17b534c0aa8
373         * scd/app-p15.c (do_getattr): Change how we use gpgUsage to figure out
374         the keys to use.
375
376 2021-03-24  NIIBE Yutaka  <gniibe@fsij.org>
377
378         gpg: Fix v5 signature for clearsign.
379         + commit 14ef703ad65850fa22d394c4d521ba602ff2cc8d
380         * g10/sign.c (clearsign_file): Prepare EXTRAHASH.
381
382         gpg: Support ECDH with v5 key.
383         + commit 90a5b4e648b3c8a6fe645df7e61654dfdb3548be
384         * g10/ecdh.c (build_kdf_params): Use the first 20 octets.
385         * g10/pkglue.c (pk_encrypt): Remove length check to 20.
386         * g10/pubkey-enc.c (get_it): Likewise.
387
388 2021-03-23  Werner Koch  <wk@gnupg.org>
389
390         gpgconf: Fix listing of default_pubkey_algo.
391         + commit a107b24ddb45c9eef432d456f302c1acea3af27c
392         * tools/gpgconf-comp.c (known_options_gpg, known_options_gpgsm): No
393         flags needed for pseudo options.
394         (known_pseudo_options_gpg, known_pseudo_options_gpgsm): New.
395         (gc_component): Add field known_pseudo_options.
396         (struct read_line_wrapper_parm_s): New.
397         (read_line_wrapper): New.
398         (retrieve_options_from_program): Use read_line_wrapper to handle
399         pseudo options.
400
401 2021-03-22  Werner Koch  <wk@gnupg.org>
402
403         kbxd: Group the options.
404         + commit ed82ef91459f72b955f4e342ab88a7a0949c436b
405         * kbx/keyboxd.h (opt): Remove unused field 'batch'.
406         * kbx/keyboxd.c (opts): Remove --batch.  Add group descriptions.
407
408 2021-03-22  NIIBE Yutaka  <gniibe@fsij.org>
409
410         gpg: Support exporting Ed448 SSH key.
411         + commit 1524a942b645d9facbedd9ed4a472e343838b6a1
412         * common/openpgp-oid.c (oid_ed448, openpgp_oidbuf_is_ed448): New.
413         (openpgp_oid_is_ed448): New.
414         * common/util.h (openpgp_oid_is_ed448): New.
415         * g10/export.c (export_one_ssh_key): Support Ed448 key.
416
417         gpg: Fix exporting SSH key.
418         + commit 0b45c5a9941094bd4529c3bf5b1cb8ce2584b9a4
419         * g10/export.c (export_one_ssh_key): Finish base 64 encoder before
420         writing out the comment string.
421
422 2021-03-19  Werner Koch  <wk@gnupg.org>
423
424         card: Support OpenPGP.1 and OpenPGP.2 for readcert and writecert.
425         + commit 475644e049436c49de7620a1539515479ad2aa4f
426         * tools/gpg-card.c (cmd_writecert): Allow the other key references.
427         (cmd_readcert): Ditto.
428
429         scd:openpgp: Allow reading and writing user certs for keys 1 and 2.
430         + commit 37b1c5c2004c1147a13b388863aaa8f0caf7d71f
431         * scd/iso7816.c (CMD_SELECT_DATA): New.
432         (iso7816_select_data): New.
433         * scd/app-openpgp.c (do_readcert): Allow OpenPGP.1 and OPENPGP.2
434         (do_writecert): Ditto.
435         (do_setattr): Add CERT-1 and CERT-2.
436
437         scd:openpgp: Rename an internal variable.
438         + commit bbdb48ec0ddd99ce23fcba42949c00a2594fb9a5
439         * scd/app-openpgp.c (struct app_local_s): s/extcap_v3/is_v3/.
440         s/max_certlen_3/max_certlen.  Change users.
441
442         scd:openpgp: Small speedup reading card properties.
443         + commit d5fb5983232cf4d60cf6aa00d0ae5a16cf948e19
444         * scd/app-openpgp.c (struct app_local_s): Add new flag.
445         (get_cached_data): Force chace use if flag is set.
446         (app_select_openpgp): Avoid reading DO 6E multiple times.
447
448 2021-03-18  Werner Koch  <wk@gnupg.org>
449
450         scd:p15: Allow to use an auth object label with cmd CHECKPIN.
451         + commit 85082a83c2c1bda50fe6b7aa2ac68cef4faca4c7
452         * scd/app-p15.c (prepare_verify_pin): Allow for PRKDF to be NULL.
453         (make_pin_prompt): Ditto.
454         (verify_pin): Ditto.
455         (do_check_pin): Allow using the Label to specify a PIN.
456
457         card: Print PIN descriptions and fix number of printed retry counters.
458         + commit 1ac189f2df6cedab3a133baca69558fdf6a908d4
459         * tools/gpg-card.h (struct card_info_s): Add fields nmaxlen, nchvinfo,
460         and chvlabels.
461         * tools/card-call-scd.c (release_card_info): Free chvlabels.
462         (learn_status_cb): Parse CHV-LABEL.  Set nmaxlen and nchvinfo.
463         * tools/gpg-card.c (list_retry_counter): Print CHV labels.
464
465         scd:p15: New attribute CHV-LABEL.
466         + commit ef29a960bf06005c34093cd9a6bca5a202ed359a
467         * scd/app-p15.c (parse_common_obj_attr): Map spaces in the lapel to
468         underscores.
469         (read_ef_aodf): Prettify printing of the type.
470         (do_getattr): New attribute CHV-LABEL
471         (do_learn_status): Emit CHV-LABEL.
472         (verify_pin): Distinguish the PIN prompts.
473
474         agent: Simplify a function.
475         + commit 26215cb211ad93ad9cc51fb4f8257b9e3c254a4e
476         * agent/findkey.c (agent_public_key_from_file): Use a membuf instead
477         of handcounting space.
478
479 2021-03-16  Werner Koch  <wk@gnupg.org>
480
481         scd:p15: Implement CHV-STATUS attribute.
482         + commit bf1d7bc3697c7d650994ba94d3704af189594657
483         * scd/command.c (send_status_direct): Return an error.
484         * scd/app-p15.c (do_learn_status): Emit CHV-STATUS.
485         (compare_aodf_objid): New.
486         (do_getattr): Implement CHV-STATUS.
487
488         card: Generalize the CHV counter printing.
489         + commit e4c2d7be22ffb47b41a3b6c1152bd75dceed74e2
490         * tools/gpg-card.c (list_retry_counter): New.  Factored out from the
491         other functions.
492         (cmd_verify): Re-read the chv status.
493
494 2021-03-16  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
495
496         build: Check for the IBM TSS tools to run the tpm2d tests.
497         + commit c0f50811fcf81e5ebe2df326342081cfdacfbbfc
498         * configure.ac (TEST_LIBTSS): Make that conditional depend on the
499         detection of tssstartup.
500
501         build: Fix distcheck when tpm2dtests are run.
502         + commit ad481666ea6ef3743041ec6d043a3e6901ebab33
503         * tests/tpm2dtests/Makefile.am (EXTRA_DIST): Distribute test files.
504         (CLEANFILES): Make sure to remove log files.
505
506 2021-03-15  James Bottomley  <James.Bottomley@HansenPartnership.com>
507
508         tests:tpm2d: add missing start_sw_tpm.sh script.
509         + commit a788f2e8306d80f7f3df34eb62ec7ce1a62d48e1
510         * tests/tpm2dtests/start_sw_tpm.sh: New.
511         * tests/tpm2dtests/Makefile.am: Add.
512
513 2021-03-15  Werner Koch  <wk@gnupg.org>
514
515         gpg: New option --no-auto-trust-new-key.
516         + commit 1523b5f76f6e600c4f2d153b49a807ff2dc8d268
517         * g10/gpg.c (oNoAutoTrustNewKey): New.
518         (opts): Add --no-auto-trust-new-key.
519         (main): Set it.
520         * g10/options.h (opt): Add flags.no_auto_trust_new_key.
521
522         build: new option to disable building of tpm2daemon.
523         + commit 8d6123faa8cae0bad6f82c9021e9ac6686b2f55d
524         * configure.ac (build_tpmd): New configure option --disable-tpm2d
525         (BUILD_WITH_TPM2D): New.
526         * Makefile.am (tests): Use conditionally BUILD_TPM2D instead of
527         HAVE_LIBTSS.
528         * build-aux/speedo.mk (speedo_pkg_gnupg_configure) [W32]: Do not build
529         tpm2d.
530         * autogen.rc: Ditto.
531
532 2021-03-15  NIIBE Yutaka  <gniibe@fsij.org>
533
534         scd: Add handling of Ed448 key.
535         + commit b743942a9719be59f1da67cd338248fe7ee5aeab
536         * scd/app-openpgp.c (struct app_local_s): Add ecc.algo field.
537         (send_key_attr): Use ecc.algo field.
538         (ecc_read_pubkey): Use ecc.algo field.
539         (ecc_writekey): Ed448 means EdDSA.
540         (parse_algorithm_attribute): Set ecc.algo field from card.
541         Add checking for Ed25519 for ECC_FLAG_DJB_TWEAK flag.
542
543         scd: Fix count_sos_bits handling.
544         + commit f482e4bd121ff2862bfb53a82f1d5c2cf3524a10
545         * scd/app-openpgp.c (count_sos_bits): Handle an exceptional case.
546
547         common: Fix the NBITS of Ed448in OIDTABLE.
548         + commit 373b52e69a6ca609a663a0c4a018358fdf52dc7e
549         common/openpgp-oid.c (oidtable): Ed448 uses 456-bit signature.
550
551 2021-03-12  Werner Koch  <wk@gnupg.org>
552
553         scd: New option --pcsc-shared.
554         + commit 5732e7a8e97cebf8e850c472e644e2a9b040836f
555         * scd/scdaemon.h (opt): Add field opcsc_shared.
556         * scd/scdaemon.c (opcscShared): New.
557         (opts): Add "--pcsc-shared".
558         (main): Set flag.
559         * scd/apdu.c (connect_pcsc_card): Use it.
560         (pcsc_get_status): Take flag in account.
561         * scd/app-openpgp.c (cache_pin): Bypass in shared mode.
562         (verify_chv2: Do not auto verify chv1 in shared mode.
563         * scd/app-piv.c (cache_pin): By pass caceh in shared mode.
564
565 2021-03-12  NIIBE Yutaka  <gniibe@fsij.org>
566
567         scd: Fix computing fingerprint for ECC with SOS.
568         + commit 95156ef9bfb6a3a525454d50ae2f5b538ccbd774
569         * scd/app-openpgp.c (count_sos_bits): New.  Count as sos_write does.
570         (store_fpr): For ECC, use count_sos_bits.
571
572         gpg: Fix compute_fingerprint for ECC with SOS.
573         + commit cfc1497efa8c98cf490f5efc9b280a6ec44514bd
574         * g10/keyid.c (hash_public_key): Tweak NBITS just as sos_write does.
575
576 2021-03-11  Valtteri Vuorikoski  <vuori@notcom.org>
577
578         scd:piv: Improve APT parser compatibility.
579         + commit 8cad11d13b15b0ef672545b06450dfbea1fef18e
580         * scd/app-piv.c (app_select_piv): Allow for full AID.
581
582 2021-03-11  Werner Koch  <wk@gnupg.org>
583
584         gpg: New option --force-sign-key.
585         + commit fe02ef04500c1b35cd27132fb99ac1961f555193
586         * g10/gpg.c (oForceSignKey,opts): New option "--force-sign-key".
587         (main): Set it.
588         * g10/options.h (opt): New flag flags.force_sign_key.
589         * g10/keyedit.c (sign_uids): Use new flag.
590
591 2021-03-11  James Bottomley via Gnupg-devel  <gnupg-devel@gnupg.org>
592
593         tpmd2: Add Support for the Intel TSS.
594         + commit b9c560e3a400da83073b232ee12fae090b21d20c
595         * configure.ac: Check for Intel TSS.
596         * tpm2d/intel-tss.h: New.
597         * tpm2d/tpm2.h (HAVE_INTEL_TSS): Use the Intel code.
598
599 2021-03-10  James Bottomley  <James.Bottomley@HansenPartnership.com>
600
601         tpm2d: add tests for the tpm2daemon.
602         + commit 6720f1343aef9342127380b155c19e12c92d65ac
603         * configure.ac: Detect TPM emulator and enable tests.
604         * tests/tpm2dtests/: New test suite.
605         * tests/Makefile.am: Run tests.
606
607         gpg: Add new command keytotpm to convert a private key to TPM format.
608         + commit 92b601fceec7da64939591001dba94e202f6e6a0
609         * agent/command.c (cmd_keytotpm): New.
610         (agent/command.c): Register new command KEYTOTPM.
611         * g10/call-agent.c (agent_keytotpm): New.
612         * g10/keyedit.c (cmdKEYTOTPM): New command "keytotpm".
613         (keyedit_menu): Implement.
614
615         agent: Add new shadow key type and functions to call tpm2daemon.
616         + commit 1f995b9ba42b76c1d83b484e5362548a54a70dab
617         * agent/call-tpm2d.c: New.
618         * divert-tpm2.c: New.
619         * agent/Makefile.am: Add new files.
620         * agent/agent.h (DAEMON_TPM2D): New.  Add stub fucntions.
621         * agent/call-daemon.c (GNUPG_MODULE_NAME_TPM2DAEMON): New.
622         * agent/command.c (do_one_keyinfo): Handle tpmv2.
623         * agent/gpg-agent.c (oTpm2daemonProgram): New.
624         (opts): New option --tpm2daemon-program.
625         (parse_rereadable_options): Handle option.
626         * agent/pkdecrypt.c (agent_pkdecrypt): Divert to tpm2d.
627         (agent_pksign_do): Ditto.
628         ---
629
630         A new shadow key type: "tpm2-v1" is introduced signalling that the
631         shadowed key is handled by the tpm2daemon.  A function to identify
632         this type is introduced and diversions to the tpm2daemon functions are
633         conditioned on this function for pkign and pkdecrypt where the same
634         diversions to scd are currently done.  The (info) field of the
635         shadowed key stores the actual TPM key.  The TPM key is encrypted so
636         only the physical TPM it was created on can read it (so no special
637         protection is required for the info filed), but if the (info) field
638         becomes corrupt or damaged, the key will be lost (unlike the token
639         case, where the key is actually moved inside the token).
640
641         Note, this commit adds handling for existing TPM format shadow keys,
642         but there is still no way to create them.
643
644
645         Additional changes:
646         * Add ChangeLog entries.
647         * Some minor indentation fixes.
648         * agent/Makefile.am (gpg_agent_SOURCES): Change to make distcheck
649           work.
650         * agent/agent.h [!HAVE_LIBTSS]: Do not return -EINVAL but an
651           gpg_error_t.  Mark args as unused.
652         * agent/protect.c (agent_is_tpm2_key): Free BUF.
653
654         tpm2d: Add tpm2daemon code.
655         + commit 62a7854816b8f3661fb41f05463289e5b96663ee
656         * tpm2d: New directory.
657         * Makefile.am (SUBDIRS): Add directory.
658         * configure.ac: Detect libtss and decide whether to build tpm2d.
659         * am/cmacros.am: Add a define.
660         * util.h (GNUPG_MODULE_NAME_TPM2DAEMON): New.
661         * common/homedir.c (gnupg_module_name): Add tpm2d.
662         * common/mapstrings.c (macros): Add "TPM2DAEMON".
663         * tools/gpgconf.h (GC_COMPONENT_TPM2DAEMON): New.
664         * tools/gpgconf-comp.c (known_options_tpm2daemon): New.
665         (gc_component): Add TPM2.
666         (tpm2daemon_runtime_change): New.
667         * tpm2d/Makefile.am: New.
668         * tpm2d/command.c: New.
669         * tpm2d/ibm-tss.h: New.
670         * tpm2d/tpm2.c: New.
671         * tpm2d/tpm2.h: New.
672         * tpm2d/tpm2daemon.c: New.
673         * tpm2d/tpm2daemon.h: New.
674
675         ---
676         This commit adds and plumbs in a tpm2daemon to the build to mirror the
677         operation of scdaemon.  The architecture of the code is that
678         tpm2daemon.c itself is pretty much a clone of scd/scdaemon.c just with
679         updated function prefixes (this argues there could be some further
680         consolidation of the daemon handling code).  Note that although this
681         commit causes the daemon to be built and installed, nothing actually
682         starts it or uses it yet.
683
684         Command handling
685         ----------------
686
687         command.c is copied from the command handler in scd.c except that the
688         command implementation is now done in terms of tpm2 commands and the
689         wire protocol is far simpler.  The tpm2daemon only responds to 4
690         commands
691
692         IMPORT:    import a standard s-expression private key and export it to
693                    TPM2 format.  This conversion cannot be undone and the
694                    private key now can *only* be used by the TPM2.  To anyone
695                    who gets hold of the private key now, it's just an
696                    encrypted binary blob.
697
698         PKSIGN:    create a signature from the tpm2 key.  The TPM2 form private
699                    key is retrieved by KEYDATA and the hash to be signed by
700                    EXTRA.  Note there is no hash specifier because the tpm2
701                    tss deduces the hash type from the length of the EXTRA
702                    data.  This is actually a limitation of the tpm2 command
703                    API and it will be interesting to see how this fares if the
704                    tpm2 ever supports say sha3-256 hashes.
705
706         PKDECRYPT: decrypt (RSA case) or derive (ECC case) a symmetric key.
707                    The tpm2 for private key is retrieved by KEYDATA and the
708                    information used to create the symmetric key by EXTRA.
709
710         KILLTPM2D: stop the daemon
711
712         All the tpm2 primitives used by command.c are in tpm2.h and all the
713         tpm2 specific gunk is confined to tpm2.c, which is the only piece of
714         this that actually does calls into the tss library.
715
716
717         Changes from James' patch:
718
719         - gpgconf: The displayed name is "TPM" and not "TPM2".  That
720           string is used by GUIs and should be something the user
721           understands.  For example we also use "network" instead
722           of "Dirmngr".
723         - Removed some commented includes.
724         - Use 16 as emulation of GPG_ERR_SOURCE_TPM2.
725         - Silenced a C90 compiler warning and flags unused parameters.
726         - Removed "if HAVE_LIBS" from tpm2/Makefile.am and add missing
727           files so that make distcheck works.
728
729 2021-03-10  Werner Koch  <wk@gnupg.org>
730
731         scd:p15: Support special extended usage flags for OpenPGP keys.
732         + commit 08b5ac492afc6c6e7eaaa1f70d67c81cbda2c9be
733         * scd/app-p15.c (struct gpgusage_flags_s): New.
734         (struct prkdf_object_s): Add field gpgusage.
735         (struct app_local_s): Add field any_gpgusage.
736         (dump_gpgusage_flags): New.
737         (read_p15_info): Parse athe gpgusage flags.
738         (do_getattr): Take care of the gpgusage flags.
739
740 2021-03-08  Werner Koch  <wk@gnupg.org>
741
742         sm: Init nPth which might be used by some helper code.
743         + commit a4021d9be4aeac7429bf6a8e9f336dbb62cacfc4
744         * sm/gpgsm.c: Include npth.h.
745         (main): Init nPth.
746
747         w32: Cleanup use of pid_t in call-daemon.
748         + commit 33c492dcb955bff01fffae31fb7750f88e07b8ff
749         * agent/call-daemon.c (struct wait_child_thread_parm_s) [W32]: Do not
750         use HANDLE for pid_t.
751         (wait_child_thread): Ditto.
752
753         w32: Change spawn functions to use Unicode version of CreateProcess.
754         + commit cf2f6d8a3f0594c03c383b4989a3041e9c4536d7
755         * common/exechelp-w32.c (gnupg_spawn_process): Change to use
756         CreateProcessW.
757         (gnupg_spawn_process_fd): Ditto.
758         (gnupg_spawn_process_detached): Ditto.
759         * g10/exec.c (w32_system): Ditto.
760
761 2021-03-08  NIIBE Yutaka  <gniibe@fsij.org>
762
763         scd: Fix for X448.
764         + commit fc99f77b14b6c2cdfb547607651922c16863dcf0
765         * scd/app-openpgp.c (do_decipher): Support with no prefix.
766
767 2021-03-05  Werner Koch  <wk@gnupg.org>
768
769         w32: Always use Unicode for console input and output.
770         + commit 8c41b8aac3efb78178fe1eaf52d8d1bbc44941a8
771         * common/init.c (_init_common_subsystems) [W32]: Set the codepage to
772         UTF-8 for input and putput.  Switch gettext to UTF-8.
773         * tools/gpgconf.c (main): Display the input and output codepage if
774         they differ.
775         * g10/gpg.c (utf8_strings) [W32]: Make sure this is always set.
776
777         w32: Free memory allocated by new function w32_write_console.
778         + commit 31b708e268ebb725307856865f34a61670a35586
779         * common/ttyio.c (w32_write_console): Free buffer.
780
781         common,w32: Allow Unicode input and output with the console.
782         + commit f165c8a737cc968554c9d78932c69869456108ff
783         * common/ttyio.c (do_get) [W32]: Use ReadConsoleW.
784         (w32_write_console): New.
785         (tty_printf, tty_fprintf) [W32]: Use new function.
786
787         common: Re-indent ttyio.c and remove EMX, RISCOS, and CE support.
788         + commit 8622f53994249d8fb49a488cfe480ffbeb8cbfba
789         * common/ttyio.c: Remove cruft like EMX and RISCOS support.  Translate
790         a few strings.  Re-indent.
791
792 2021-03-04  Werner Koch  <wk@gnupg.org>
793
794         common: Rename w32-misc.c to w32-cmdline.c.
795         + commit 7262d602d802c4a3840097d5de217fcfb9728b49
796         * common/w32-misc.c: Rename to ....
797         * common/w32-cmdline.c: this.
798         * common/Makefile.am: Adjust.
799
800         common,w32: Implement globing of command line args.
801         + commit 089c9439674e8ecbc64f0ba924e6fb447bbc2b9d
802         * common/w32-misc.c [W32]: Include windows.h
803         (struct add_arg_s): New.
804         (add_arg): New.
805         (glob_arg): New.
806         (parse_cmdstring): Add arg argvflags and set it.
807         (w32_parse_commandline): Add arg r_itemsalloced.  Add globing.
808
809         * common/init.c (prepare_w32_commandline): Mark glob created items as
810         leaked.
811
812         * common/t-w32-cmdline.c : Include windows.h
813         (test_all): Add simple glob test for Unix.
814         (main): Add manual test mode for Windows.
815
816         common,w32: Refine the command line parsing for \ in quotes.
817         + commit 20c60076866904187a09393de596deef286116f8
818         * common/t-w32-cmdline.c (test_all): Add new test cases.
819         * common/w32-misc.c (strip_one_arg): Add arg endquote.
820         (parse_cmdstring): Take care of backslashes in quotes.
821
822         gpg: Prepare for globing with UTF-8.
823         + commit 8e15506d6680bbee85bc01453da28fc90b4cb673
824         * g10/gpg.c (_dowildcard): Remove.
825         (my_strusage): Enable wildcards using our new system.
826
827         common: First take on handling Unicode command line args.
828         + commit deb6c94362c0f179de1cac18707aad2f51a21e10
829         * common/w32-misc.c: New.
830         * common/t-w32-cmdline.c: New.
831         * common/init.c: Include w32help.h.
832         (prepare_w32_commandline): New.
833         (_init_common_subsystems) [W32]: Call prepare_w32_commandline.
834
835         * common/Makefile.am (common_sources) [W32]: Add w32-misc.c
836         (module_tests): Add t-w32-cmdline
837         (t_w32_cmdline_LDADD): New.
838
839 2021-03-01  Nicolas Fella via Gnupg-devel  <gnupg-devel@gnupg.org>
840
841         gpg: Keep temp files when opening images via xdg-open.
842         + commit be2da244565822ad1f268f84dc88a23e5aa8d26a
843         * g10/photoid.c (get_default_photo_command): Change parameter for
844         xdg-open.
845
846 2021-02-25  Werner Koch  <wk@gnupg.org>
847
848         scd:p15: Read out the access flags.
849         + commit d51a5ca1084c69c0ed304126a7aaa0a648b2eba6
850         * scd/app-p15.c (struct keyaccess_flags_s): New.
851         (struct prkdf_object_s): Add field accessflags.
852         (dump_keyusage_flags): New.
853         (dump_keyaccess_flags): New.
854         (parse_keyaccess_flags): New.
855         (parse_common_key_attr): Return access flags.
856         (read_ef_prkdf): Parse the access flags.  Allow for ECkeys.
857         (read_ef_pukdf): Ditto.  Use new functions for printing.
858         (read_p15_info): Use new fucntion for printing.
859
860         sm: Do not print certain issuer not found diags in quiet mode.
861         + commit a170f0e73f38e474b6d4463433fe344eca865fa5
862         * sm/certchain.c (find_up_dirmngr): Print one diagnostic only in
863         verbose mode.  Do not print issuer not found diags in quiet mode.
864         * sm/minip12.c (parse_bag_data): Add missing verbose condition.
865
866         sm: Fix issuer certificate look error due to legacy error code.
867         + commit 473b83d1b9efe51fcca68708580597dddf3f50b7
868         * sm/certchain.c (find_up): Get rid of the legacy return code -1 and
869         chnage var name rc to err.
870         (gpgsm_walk_cert_chain): Change var name rc to err.
871         (do_validate_chain): Get rid of the legacy return code -1.
872
873 2021-02-24  Werner Koch  <wk@gnupg.org>
874
875         scd:p15: Get the label value of all objects for better diagnostics.
876         + commit cfdaf2bcc85b3b6f16904006f239b400a3487ff8
877         * scd/app-p15.c (struct cdf_object_s): Add fields authid, authidlen,
878         and label.
879         (struct prkdf_object_s): Add field label.
880         (struct aodf_object_s): Ditto.
881         (release_cdflist): Free new fields.
882         (release_prkdflist): Free new field.
883         (release_aodf_object): Ditto.
884         (parse_common_obj_attr): Return the label.
885         (read_ef_prkdf): Store the label.
886         (read_ef_pukdf): Ditto.
887         (read_ef_cdf): Use parse_common_obj_attr and store authid and label.
888         Print them im verbose mode.
889         (read_ef_aodf): Store the label and print it.
890
891         sm: Silence some output on --quiet.
892         + commit 615d2e4fb15859320ea0ebec1bb457c692c57f0a
893         * sm/encrypt.c (gpgsm_encrypt): Take care of --quiet.
894         * sm/gpgsm.c: Include minip12.h.
895         (set_debug): Call p12_set_verbosity.
896         * sm/import.c (parse_p12): Dump keygrip only in debug mode.
897         * sm/minip12.c (opt_verbose, p12_set_verbosity): New.
898         (parse_bag_encrypted_data): Print info messages only in verbose mode.
899
900 2021-02-23  Werner Koch  <wk@gnupg.org>
901
902         scd:p15: Make it code work again for D-Trust cards.
903         + commit 33aaa37e5bc0beb75305cdf9d8be850daccaee5e
904         * scd/app-p15.c (select_and_read_binary): Allow to skip the select.
905         (select_and_read_record): Return the statusword.  Silence error
906         message for SW_FILE_STRUCT.
907         (select_ef_by_path): Fix selection with a home_DF.
908         (read_first_record): Fallback to read_binary for CardOS and return
909         info about this.
910         (read_ef_prkdf): Use info from read_first_record to decide whether to
911         use record or binary mode.
912         (read_ef_pukdf): Ditto.
913         (read_ef_aodf): Ditto.
914         (read_ef_cdf): Ditto.  New arg cdftype for diagnostics.
915         (read_p15_info): Pass cdftype.
916
917         * scd/apdu.h (SW_FILE_STRUCT): New.
918         * scd/apdu.c (apdu_strerror): Map that one to a string.
919         * scd/iso7816.c (map_sw): and to a gpg-error.
920
921 2021-02-22  Werner Koch  <wk@gnupg.org>
922
923         scd: Fix readkey --info in case a readkey command is available.
924         + commit 2490f4e8e1d1feecb44aefa79bd71f5f8b06c9a4
925         * scd/command.c (do_readkey): Make --info also work if a readkey
926         command is available.
927
928         * scd/app-p15.c (cdf_object_from_certid): Fix a but introduced with
929         the previous commit.
930
931         scd:p15: Extract extended usage flagsand act upon them.
932         + commit 488eaedc9a332d8164dea22e469354fc10b0a253
933         * scd/app-p15.c: Add a couple of oid constants.
934         (struct cdf_object_s): Replace fields image and imagelen by cert.
935         (struct prkdf_object_s): Add extusage flags
936         (send_keypairinfo): Use them.
937         (cdf_object_from_certid): Factor parts out to ...
938         (cdf_object_from_objid): new function.
939         (read_ef_prkdf): Move info printing to ...
940         (read_p15_info): here.  Fill the extusage flags.
941         (readcert_by_cdf): Cache the ksba cert object instead of the binary
942         cert.
943         * scd/app.c (select_additional_application): Fix a log_debug call.
944         (scd_update_reader_status_file): Ditto.
945
946         sm: Extend the list of known OIDs.
947         + commit 4c9b509d2402f79668e502a9db5879280a4f683b
948         * sm/keylist.c (oidtranstbl): Add a couple of OIDs and mark them for
949         key usage.
950
951 2021-02-19  Werner Koch  <wk@gnupg.org>
952
953         build: Remove now obsolete HAVE_NEWER_LIBGCRYPT AM conditional.
954         + commit 5573ab714b92f6ee899a816998e56e1238f4c573
955         * configure.ac (HAVE_NEWER_LIBGCRYPT): Remove conditional.
956         * tools/Makefile.am (gpg_pair_tool_SOURCES):  We build it always.
957
958         scd: Minor tweak for easier backporting.
959         + commit 6d4280b13ddc928ff6bc41bdf482030f0f814fdb
960         * scd/app-common.h (APP_CARD): New.  Use it in app-*.c to access
961         app->card.
962
963 2021-02-18  Werner Koch  <wk@gnupg.org>
964
965         po: Change translatability of a fallback string.
966         + commit 0be4861762c21ebfb4c2e28bb9a3e5cfbc08e1a9
967         * agent/call-pinentry.c (setup_genpin): Do not make the fallback
968         translatable.
969
970         speedo: Update w32 stuff from 2.2.
971         + commit 919a969354d4021f2e64a948b4c224cd37323713
972         * build-aux/speedo.mk: Update from 2.2.  Add target w32-msi-release.
973         * build-aux/speedo/w32/inst.nsi: Fix location of doc files.
974         * build-aux/speedo/w32/wixlib.wxs: Add gpg-card and fix a wrong name.
975         * Makefile.am (release): Support a WITH_MSI variable.
976         (wixlibfile): Improve copying to archive.
977         (release): Use AMTAR instead of TAR.
978
979 2021-02-17  Werner Koch  <wk@gnupg.org>
980
981         dirmngr: Support new gpgNtds parameter in LDAP keyserver URLs.
982         + commit ab7dc4b524c3e2ad5153acfdbfa879a9e62d2dbe
983         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): Support a new gpgNtds
984         extension.
985         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Do ldap_init always with
986         hostname - which is NULL and thus the same if not given.  Fix minor
987         error in error code handling.
988
989 2021-02-16  NIIBE Yutaka  <gniibe@fsij.org>
990
991         build: Update gpg-error.m4 again.
992         + commit 3fa1fa747b61867076e344c3eb07a66826c1983a
993         * m4/gpg-error.m4: Update from libgpg-error.
994
995 2021-02-15  NIIBE Yutaka  <gniibe@fsij.org>
996
997         build: Update gpg-error.m4.
998         + commit 985e85dc0e6c54aa465a2af610c5a04fc10649a0
999         * m4/gpg-error.m4: Update from libgpg-error.
1000
1001 2021-02-12  NIIBE Yutaka  <gniibe@fsij.org>
1002
1003         build: Update gpg-error.m4.
1004         + commit e1e3f1db4660b5416828aeb636a7f767fadcc7a4
1005         * m4/gpg-error.m4: Update from libgpg-error.
1006
1007         build: Fix library dependency of g13 test program.
1008         + commit 83e0a9d6b990aa517bc338b578f7faf393ae1b0d
1009         * g13/Makefile.am (t_common_ldadd): Add GPG_ERROR_LIBS.
1010
1011 2021-02-10  Werner Koch  <wk@gnupg.org>
1012
1013         gpg: Do not allow old cipher algorithms for encryption.
1014         + commit 825dd7220ff6079cbe2d0df7fde93526c077fb6d
1015         * g10/gpg.c: New option --allow-old-cipher-algos.
1016         (set_compliance_option): Set --rfc4880bis explictly to SHA256 and
1017         AES256.  Allow old cipher algos for OpenPGP, rfc4880, and rfc2440.
1018         * g10/options.h (opt): Add flags.allow_old_cipher_algos.
1019         * g10/misc.c (print_sha1_keysig_rejected_note): Always print the note
1020         unless in --quiet mode.
1021         * g10/encrypt.c (setup_symkey): Disallow by default algos with a
1022         blocklengt < 128.
1023         (encrypt_crypt): Ditto.  Fallback by default to AES instead of 3DES.
1024         * g10/pkclist.c (algo_available): Take care of old cipher also.
1025         (select_algo_from_prefs): Use AES as implicit algorithm by default.
1026
1027         * tests/openpgp/defs.scm (create-gpghome): Set allow-old-cipher-algos.
1028
1029         Remove obsolete M4 macros.
1030         + commit 6e730c18816fbb3e074d93840396ed18f00ab7e2
1031         * m4/gnupg-pth.m4: Remove.
1032         * m4/libcurl.m4: Remove.
1033
1034         Require GpgRT version 1.41.
1035         + commit 2b75b256054427119a284792540243c3471267d4
1036         * configure.ac (NEED_GPG_ERROR_VERSION): Rename to NEED_GPGRT_VERSION
1037         and set to 1.41.
1038         * common/sysutils.c (gnupg_access): Remove code for older gpgrt
1039         versions.
1040         * kbx/backend-sqlite.c: Ditto.
1041         * sm/gpgsm.c (main): Ditto.
1042
1043 2021-02-09  Werner Koch  <wk@gnupg.org>
1044
1045         build: Make make distcheck work again.
1046         + commit f9e4dae08d7caed741d35916c46b8302e098d521
1047         * m4/Makefile.am (EXTRA_DIST): Remove isc-posix.m4
1048
1049         tools: Remove the symcryptrun tool.
1050         + commit 209b7113f3493bd829ec5c90275ff95a273d9dd4
1051         * tools/symcryptrun.c: Remove.
1052         * tools/Makefile.am: Ditto.
1053         * doc/tools.texi: Remove man page.
1054         * configure.ac: Remove build option and tests used only by this tool.
1055         * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Do not build
1056         symcryptrun.
1057
1058 2021-02-05  NIIBE Yutaka  <gniibe@fsij.org>
1059
1060         gpg: Fix selection of key.
1061         + commit 390f597868a5b5934f21f81ebf6ff110b6792283
1062         * g10/getkey.c (pubkey_cmp): Handle the case of TRUST_EXPIRED.
1063
1064 2021-02-02  Werner Koch  <wk@gnupg.org>
1065
1066         gpg: Remove support for PKA.
1067         + commit 7f3ce66ec56a5aea6170b7eb1bda5626eb208c83
1068         * g10/gpg.c (oPrintPKARecords): Remove.
1069         (opts): Remove --print-pka-records.
1070         (main): Remove "pka-lookups","pka-trust-increase" and other PKA stuff.
1071         * g10/options.h (EXPORT_DANE_FORMAT): Remove.
1072         (VERIFY_PKA_LOOKUPS, VERIFY_PKA_TRUST_INCREASE): Remove.
1073         (KEYSERVER_HONOR_PKA_RECORD): Remove.
1074         * g10/packet.h (pka_info_t): Remove.
1075         (PKT_signature): Remove flags.pka_tried and pka_info.
1076         * g10/parse-packet.c (register_known_notation): Remove
1077         "pka-address@gnupg.org".
1078         * g10/pkclist.c (check_signatures_trust): Remove PKA stuff.
1079         * g10/call-dirmngr.c (gpg_dirmngr_get_pka): Remove.
1080         * g10/export.c (parse_export_options): Remove "export-pka".
1081         (do_export): Adjust for this.
1082         (write_keyblock_to_output): Ditto.
1083         (do_export_stream): Ditto.
1084         (print_pka_or_dane_records): Rename to ...
1085         (print_dane_records): this and remove two args. Remove PKA printing.
1086         * g10/free-packet.c (free_seckey_enc, cp_pka_info): Adjust for removed
1087         pka_info field.
1088         * g10/getkey.c (get_pubkey_byname): Make AKL_PKA a dummy.
1089         * g10/keyserver.c: Remove "honor-pka-record".
1090         (keyserver_import_pka): Remove.
1091         * g10/mainproc.c (get_pka_address): Remove.
1092         (pka_uri_from_sig): Remove.
1093         (check_sig_and_print): Remove code for PKA.
1094
1095         gpg: Remove more or less useless tool gpgcompose.
1096         + commit fde7d833573d358b2c5b5eb7d837bc27c6dcb3d1
1097         * g10/gpgcompose.c: Remove
1098
1099         gpg: Remove experimental feature to export w/o user-ids.
1100         + commit 3491faa3bb62c1c96c6dd5947516128b2a966535
1101         * g10/options.h (IMPORT_DROP_UIDS, EXPORT_DROP_UIDS): Remove.
1102         * g10/import.c (parse_import_options): Remove option import-drop-uids.
1103         (import_one_real): Remove drop uids code.
1104         (remove_all_uids): Remove function.
1105         * g10/export.c (parse_export_options): Remove option export-drop-uids.
1106         (do_export_one_keyblock): Remove drop uids code.
1107
1108         card: List keys of pkcs#15 cards.
1109         + commit a06c79b6143fc49e6f5169b8a9f53c691031d6ca
1110         * tools/gpg-card.c (list_p15): New.
1111         (list_card): Call it.
1112
1113         scd:p15: Read PuKDF and minor refactoring.
1114         + commit 0c080ed5791ecf1606d1c2fddc0c55362fd171d3
1115         * scd/app-p15.c (pukdf_object_t): New.
1116         (struct app_local_s): Add field public_key_info.
1117         (release_pukdflist): New.
1118         (select_and_read_record): No diagnostic in case of not_found.
1119         (read_first_record): New.  Factored out from the read_ef_ fucntions.
1120         (read_ef_pukdf): New.  Basically a copy of read_ef_prkdf for now.
1121         (read_p15_info): Also read the public keys.
1122
1123         (cardtype2str): New.
1124         (read_ef_tokeninfo): Print a string with the cardtype.
1125
1126 2021-02-01  Werner Koch  <wk@gnupg.org>
1127
1128         sm: Add a few OIDs and merge OID tables.
1129         + commit 0737dc8187a0eb9ca4661e2ad45954c718daa451
1130         * sm/keylist.c (OID_FLAG_KP): New.
1131         (key_purpose_map): Merge into ...
1132         (oidtranstbl): this.
1133         (get_oid_desc): New arg 'matchflag'.  Use function in place of direct
1134         access to key_purpose_map.
1135
1136 2021-01-28  Werner Koch  <wk@gnupg.org>
1137
1138         Include the library version in the compliance checks.
1139         + commit 90c514868ff5fcf6d39490d4874ac3a31ba9e85f
1140         * common/compliance.c (gnupg_gcrypt_is_compliant): New.
1141         (gnupg_rng_is_compliant): Also check library version.
1142         * g10/mainproc.c (proc_encrypted): Use new function.
1143         (check_sig_and_print): Ditto.
1144         * sm/decrypt.c (gpgsm_decrypt): Ditto.
1145         * sm/encrypt.c (gpgsm_encrypt): Ditto.
1146         * sm/verify.c (gpgsm_verify): Ditto
1147
1148 2021-01-27  Werner Koch  <wk@gnupg.org>
1149
1150         scd:p15: Make file selection more robust.
1151         + commit 1e197c29ed95d021f5693cd3652b6acb07d928ea
1152         * scd/app-p15.c: Include host2net.h.
1153         (DEFAULT_HOME_DF): New.
1154         (select_and_read_binary): Replace slot by app.  Change callers.  Use
1155         select_ef_by_path.
1156         (select_and_read_record): ditto.
1157         (select_ef_by_path): Make use use the home_df.
1158         (parse_certid): Adjust for always set home_df.
1159         (print_tokeninfo_tokenflags): Ditto.
1160         (app_select_p15): Take the home_df from the FCI returned by select.
1161
1162         scd: Define new status word.
1163         + commit 7620473cd007c074b0625a678caa6105a4c87142
1164         * scd/apdu.h (SW_NO_CURRENT_EF): New.
1165
1166         scd:p15: Factor the commonKeyAttributes parser out.
1167         + commit 5bcbc8cee310067aa3cc48665b0fb0595c64ae4d
1168         * scd/app-p15.c (read_ef_prkdf): Fix detection of unsupported key
1169          objects.  Factor some code out to ...
1170         (parse_common_key_attr): new.
1171
1172         gpg: Fix ugly error message for an unknown symkey algorithm.
1173         + commit b08418d22cc898c9d135217e07ca77f3daf3c9e9
1174         * g10/mainproc.c (proc_symkey_enc): Do not continue with an unknown
1175         algorithm.
1176
1177 2021-01-26  Werner Koch  <wk@gnupg.org>
1178
1179         scd:p15: Factor the commonObjectAttributes parser out.
1180         + commit fb84674d6c645a423b8ed9835437d25e4893e183
1181         * scd/app-p15.c (parse_common_obj_attr): New.
1182         (read_ef_prkdf): Use new function.
1183         (read_ef_aodf): Ditto.
1184
1185         scd:p15: First step towards real CardOS 5 support.
1186         + commit fc287c0552b0fe489c66bb493879f4330c34f287
1187         * scd/iso7816.c (iso7816_select_path): Add arg from_cdf.
1188         * scd/app-nks.c (do_readkey): Adjust for this change.
1189
1190         * scd/app-p15.c (CARD_TYPE_CARDOS_53): New.
1191         (IS_CARDOS_5): New.
1192         (card_atr_list): Add standard ATR for CardOS 5.3.
1193         (select_and_read_binary): Remove the fallback to record read hack.
1194         (select_and_read_record): New.
1195         (select_ef_by_path): Rework and support CardOS feature.
1196         (read_ef_prkdf): Use read record for CardOS.
1197         (read_ef_cdf): Ditto.
1198         (read_ef_aodf): Ditto.  Also fix bug in the detection of other
1199         unsupported attribute types.
1200         (verify_pin): Use IS_CARDOS_5 macro.
1201         (app_select_p15): Force direct method for CardOS.
1202
1203 2021-01-25  Werner Koch  <wk@gnupg.org>
1204
1205         agent: Support ssh-agent extensions for environment variables.
1206         + commit 224e26cf7b67f22bb0140133eac6b4ad24f3b1b7
1207         * common/session-env.c (session_env_list_stdenvnames): Extend to allow
1208         return all names as one string.
1209         * agent/command-ssh.c (SSH_REQUEST_EXTENSION): New.
1210         (SSH_RESPONSE_EXTENSION_FAILURE): New.
1211         (request_specs): Add handler for the extension command.
1212         (ssh_handler_extension): New.
1213
1214 2021-01-21  Werner Koch  <wk@gnupg.org>
1215
1216         scd:p15: Show the ATR as part of the TokenInfo diagnostics.
1217         + commit 60499d98940d4b7a1673b8584cafe0f7ac2901dd
1218         * scd/app-p15.c (read_ef_tokeninfo): Print the ATR in verbose mode.
1219
1220 2021-01-19  Werner Koch  <wk@gnupg.org>
1221
1222         Require Libgcrypt 1.9.
1223         + commit 9500432b7ae10d98b30c58de4357e2ffb93bf795
1224         * configure.ac: Require at least Libgcrypt 1.9.0.  Remove all
1225         GCRYPT_VERSION_NUMBER dependent code.
1226
1227 2021-01-12  Werner Koch  <wk@gnupg.org>
1228
1229         tools: Add option --clock to watchgnupg.
1230         + commit 93d5d7ea2a8b110b3ad88be25f2f67d706361e44
1231         * tools/watchgnupg.c (print_fd_and_time) [ENABLE_LOG_CLOCK]: Use
1232         clock_gettime.
1233         (print_version): New option --clock.
1234
1235 2021-01-11  Werner Koch  <wk@gnupg.org>
1236
1237         gpg,w32: Fix gnupg_remove.
1238         + commit b6967d31912912ad3c0a2ff6bf6eb9822a194562
1239         * common/sysutils.c (map_w32_to_errno): New.
1240         (gnupg_w32_set_errno): New.
1241         (gnupg_remove) [w32]: Set ERRNO
1242
1243 2021-01-06  Ingo Klöcker  <dev@ingo-kloecker.de>
1244
1245         I meant "SHA-2 digests" in the previous commit.
1246         + commit 7eef40cc1143fb19132786ebcca1c9a6c9a85e6e
1247
1248
1249         scd:nks: Add support for signing plain SHA-3 digests.
1250         + commit 8fe976d5b9a0f2902868737dd502c749565222a6
1251         * scd/app-nks.c (do_sign): Handle plain SHA-3 digests and verify
1252         encoding of ASN.1 encoded hashes.
1253
1254 2020-12-30  Werner Koch  <wk@gnupg.org>
1255
1256         wkd: Minor permission fix for created files.
1257         + commit c008e8d20e12c8845403ad7dad499f6a196ecc6a
1258         * tools/wks-util.c (wks_cmd_install_key): Don't set u+x on the file.
1259         (ensure_policy_file): No need to make the policy file group writable.
1260
1261 2020-12-21  Werner Koch  <wk@gnupg.org>
1262
1263         common: Remove superfluous debug output from dotlock.c.
1264         + commit fc0eaa9add3c9bc93d4404988be3e1eb8f88ffa2
1265         * common/dotlock.c (dotlock_create_unix): Remove debug output.
1266
1267         doc: Explain LDAP keyserver parameters.
1268         + commit e0cbb97925a109fee7c0a7450bcac120f2766ed2
1269
1270
1271 2020-12-18  Werner Koch  <wk@gnupg.org>
1272
1273         dirmngr: Do not block threads in LDAP keyserver calls.
1274         + commit 355e2992c043dd3241a9e838255f01418490ef33
1275         * dirmngr/ks-engine-ldap.c: Wrap some ldap calls.
1276
1277 2020-12-17  Werner Koch  <wk@gnupg.org>
1278
1279         gpg: New AKL method "ntds"
1280         + commit 4a3836e2b2f9a91995d5ce058820e1121298f548
1281         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Change the new
1282         support for KEYDB_SEARCH_MODE_MAIL.
1283         (ks_ldap_get): Add a debug.
1284         * g10/options.h (AKL_NTDS): New.
1285         * g10/keyserver.c (keyserver_import_ntds): New.
1286         (keyserver_get_chunk): Allow KEYDB_SEARCH_MODE_MAIL.
1287         * g10/getkey.c (parse_auto_key_locate): Support "ntds".
1288         (get_pubkey_byname): Ditto.
1289
1290         dirmngr: Support "ldap:///" for the current AD user.
1291         + commit 1194e4f7e2dff620e0da87f212f3a35f8021b142
1292         * dirmngr/http.h (struct parsed_uri_s): Add field ad_current.
1293         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): Set it.
1294         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Take care of ad_current.
1295
1296         dirmngr: Allow LDAP searches via fingerprint.
1297         + commit 2cadcce3e877c857bb8859574762b59b9c193b44
1298         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Add arg
1299         serverinfo and allow searching by fingerprint.
1300         (ks_ldap_get, ks_ldap_search): First connect then create teh filter.
1301
1302 2020-12-15  Werner Koch  <wk@gnupg.org>
1303
1304         dirmngr: Store all version 2 schema attributes.
1305         + commit a2434ccabdd1956876b44e05e07c3c3630c50f8f
1306         * g10/call-dirmngr.c (ks_put_inq_cb): Emit "fpr" records.
1307         * dirmngr/ks-engine-ldap.c (extract_attributes): Add args
1308         extract-state and schemav2.  Add data for the new schema version.
1309         remove the legacy code to handle UIDs in the "pub" line.
1310         (ks_ldap_put): Set new attributes for NTDS use the fingerprint as CN.
1311
1312 2020-12-14  Werner Koch  <wk@gnupg.org>
1313
1314         dirmngr: Support the new Active Directory schema.
1315         + commit e9ddd61fe979b1b8e1a4801f7f916d0222397245
1316         * dirmngr/ks-engine-ldap.c (SERVERINFO_): New constants.
1317         (my_ldap_connect): Relace args pgpkeyattrp and real_ldapp by a new
1318         serverinfo arg.  Set the new info flags.
1319         (ks_ldap_get): Adjust for change.
1320         (ks_ldap_search): Ditto.
1321         (ks_ldap_put): Ditto.  Replace xmalloc by xtrymalloc.  Change the DN
1322         for use with NTDS (aka Active Directory).
1323         * doc/ldap/gnupg-ldap-init.ldif (pgpSoftware): Update definition of
1324         pgpVersion.
1325         * doc/ldap/gnupg-ldap-ad-init.ldif: New.
1326         * doc/ldap/gnupg-ldap-ad-schema.ldif: New.
1327
1328         dirmngr: Do not store the useless pgpSignerID in the LDAP.
1329         + commit cc056eb534c1b8f7d1a90af3b9ecb9d6b2f322fa
1330         * dirmngr/ks-engine-ldap.c (extract_attributes): Do not store the
1331         pgpSignerID.
1332         * g10/call-dirmngr.c (ks_put_inq_cb): Do not emit sig records.
1333
1334         dirmngr: Fix adding keys to an LDAP server.
1335         + commit 37a899d0e4fd49512d522e7f6f86b6968309fece
1336         * dirmngr/ks-engine-ldap.c (ks_ldap_put): Extract attribites into
1337         addlist.
1338
1339 2020-12-11  NIIBE Yutaka  <gniibe@fsij.org>
1340
1341         scd:nks: Support READKEY with keygrip and for "NKS-IDLM" keyref.
1342         + commit 3b392630881350baabeba16fa760bad04be94d03
1343         * scd/app-nks.c (do_readkey): Allow KEYGRIP access.
1344         Support NKS-IDLM.XXXX keyref.
1345
1346         scd:nks: Factor out pubkey retrieval from keygrip handling.
1347         + commit b7c087375d84c31ab8a645cd81e6b1e6185cb30d
1348         * scd/app-nks.c (pubkey_from_pk_file): New.
1349         (keygripstr_from_pk_file): Use pubkey_from_pk_file.
1350
1351 2020-12-10  NIIBE Yutaka  <gniibe@fsij.org>
1352
1353         scd:nks: Add support of KEYGRIP for do_readcert.
1354         + commit 4020cd9d656264bec5e7fb5e45c5e06eff8656c3
1355         * scd/app-nks.c (do_readcert): Support KEYGRIP.
1356
1357         scd:nks: Factor out iteration over filelist.
1358         + commit 6c4365847666cefac73ccc743a99fac473da2186
1359         * scd/app-nks.c (iterate_over_filelist): New.
1360         (do_with_keygrip): Use iterate_over_filelist.
1361
1362 2020-12-09  Werner Koch  <wk@gnupg.org>
1363
1364         wks-client: Improve an error message.
1365         + commit c7c88648b71b8ce3a5507946afb91761fc6d931e
1366         * tools/gpg-wks-client.c (read_confirmation_request): Print trust
1367         letter.
1368
1369 2020-12-09  NIIBE Yutaka  <gniibe@fsij.org>
1370
1371         scd:ccid:spr532: Extend abort_cmd for initialization time.
1372         + commit a9aa30ed2c2c399c2baa6a5aa2624d8fdee6286f
1373         * scd/ccid-driver.c (abort_cmd): Add INIT argument to support
1374         synchronize until success, even ignoring timeout.
1375         (bulk_in): Normal use case of abort_cmd.
1376         (ccid_vendor_specific_init): Initial use case of abort_cmd.
1377
1378         scd:ccid: Call libusb_clear_halt in ccid_vendor_specific_setup.
1379         + commit f50373027222f28ab9d37843178a5d44cc1e3cc0
1380         * scd/ccid-driver.c (ccid_vendor_specific_setup): Only for SPR532,
1381         call libusb_clear_halt.
1382
1383         scd:ccid: Revert the addition of libusb_clear_halt for EP_INTR.
1384         + commit ffabc29d5eadfe81b9f62b7d4fe6e858b191354d
1385         * scd/ccid-driver.c (ccid_setup_intr): Don't call libusb_clear_halt.
1386
1387 2020-12-08  NIIBE Yutaka  <gniibe@fsij.org>
1388
1389         scd:yubikey: Fix support of Yubikey NEO.
1390         + commit 946555ea3ceb823b95ed13654ae4fd667daa4337
1391         * scd/app-openpgp.c (get_public_key): Yubikey NEO also has this issue.
1392
1393         agent: Allow decryption with card but no file.
1394         + commit eda3c688fc2e85c7cd63029cb9caf06552d203b4
1395         * agent/pkdecrypt.c (agent_pkdecrypt): Support decryption with card
1396         but without a stub key.
1397
1398         agent: Clean up the API of agent_pkdecrypt.
1399         + commit 9beab36dfa39106f6efd1bb89551a581bcf9df60
1400         * agent/agent.h (agent_pkdecrypt): Use gpg_error_t type.
1401         * agent/pkdecrypt.c (agent_pkdecrypt): Use gpg_error_t type.
1402
1403         agent: Allow pksign operation with card but no file.
1404         + commit cbb0e069f55bc45037bbd69d54ce23dae2af2ac6
1405         * agent/pksign.c (agent_pksign_do): Add support with no file.
1406
1407 2020-12-07  Ingo Klöcker  <dev@ingo-kloecker.de>
1408
1409         gpg: Make quick-gen-key with algo "card" work for keys without keytime.
1410         + commit 255d33d65126df00bc036580d0b32735d7178c8b
1411         * g10/keygen.c (quick_generate_keypair): Set pCARDKEY flag if algostr
1412         is "card" or "card/...".
1413
1414 2020-12-07  NIIBE Yutaka  <gniibe@fsij.org>
1415
1416         gpg,card: Allow no version information of Yubikey.
1417         + commit 1cd615afe3010d2c3919de489d7c9a78513c8694
1418         * g10/call-agent.c (learn_status_cb): Assume >= 2 when no version.
1419         * tools/card-call-scd.c (learn_status_cb): Likewise.
1420
1421 2020-12-03  NIIBE Yutaka  <gniibe@fsij.org>
1422
1423         scd:nks: Fix caching keygrip (more).
1424         + commit 87d2c579cc38c1d2787945650125fb0e0336652c
1425         * scd/app-nks.c (keygripstr_from_pk_file): Distinguish by APP_ID.
1426
1427         scd: Fix KEYINFO command with --data option.
1428         + commit 54b88ae4606265f3d51c1ca603dbf846f3dfd678
1429         * scd/command.c (cmd_keyinfo): Handle --data option correctly.
1430
1431         scd:openpgp: Fix writing ECC key to card.
1432         + commit a25c99b156ca9acaa7712e9c09a6df0a7a23c833
1433         * scd/app-openpgp.c (build_privkey_template): Adding another argument
1434         of ecc_d_fixed_len to handle variable-size MPI.
1435
1436 2020-12-02  Werner Koch  <wk@gnupg.org>
1437
1438         kbx: Better error message in case of a crippled Libgcrypt.
1439         + commit 63ed2054a1f3cfbdff5cda390952f10a512dab83
1440         * kbx/keybox-openpgp.c (keygrip_from_keyparm): Detect missing curve.
1441
1442 2020-12-01  Jens Meißner  <meissner@b1-systems.de>
1443
1444         doc: Add parameters for batch generation of ECC keys.
1445         + commit 4f9ac5dac093300ac18fd3732bffdd2a3fc38776
1446         * doc/gpg.texi: Add parameters for batch generation of ECC keys.
1447
1448 2020-11-30  Werner Koch  <wk@gnupg.org>
1449
1450         scd:nks: Minor additions to the basic IDLM application support.
1451         + commit 806547d9d243b26c2275fc00c645ee39d258b49b
1452         * scd/app-nks.c (filelist): Use special value -1 for IDLM pubkeys.
1453         (keygripstr_from_pk_file): Handle special value.
1454         (do_readcert): Ditto.
1455         (do_writecert): Ditto.
1456
1457 2020-11-27  Werner Koch  <wk@gnupg.org>
1458
1459         card: Let the APDU command prints a description of the status word.
1460         + commit ad469609b101fe6c1128135180fef8eae13279ff
1461         * tools/card-call-scd.c (scd_apdu_strerror): New.
1462         * tools/gpg-card.c (cmd_apdu): Print a description.
1463
1464         scd: New getinfo sub-command apdu_strerror.
1465         + commit 0e34683a6c4b037aa50ca0f97ddb9d5c4e499084
1466         * scd/apdu.c (apdu_strerror): Add missing status codes.
1467         * scd/command.c (cmd_getinfo): New sub-command apdu_strerror.
1468
1469         card: Netkey improvement for passwd.
1470         + commit 5804db1a13d2cf8f4010d1257c586bed978c3173
1471         * tools/gpg-card.c (cmd_passwd) [Netkey]: No Standard/QES menu if the
1472         card does not support it.  Print no error in cases the user canceled.
1473
1474 2020-11-27  NIIBE Yutaka  <gniibe@fsij.org>
1475
1476         scd:ccid-driver: Fix pinpad error handling for cancel/timeout.
1477         + commit bb591222c3c5cb1a1750b1b1dd26d0bc53b347cb
1478         * scd/apdu.h (SW_HOST_UI_CANCELLED, SW_HOST_UI_TIMEOUT): New.
1479         * scd/ccid-driver.h (CCID_DRIVER_ERR_UI_CANCELLED): New.
1480         (CCID_DRIVER_ERR_UI_TIMEOUT): New.
1481         * scd/ccid-driver.c (bulk_in): Handle PIN input cancel/timeout error.
1482         * scd/iso7816.c (map_sw): Support SW_HOST_UI_CANCELLED and
1483         SW_HOST_UI_TIMEOUT.
1484
1485 2020-11-26  Werner Koch  <wk@gnupg.org>
1486
1487         agent: Fix YK s/n and prettify the request card prompt for Yubikeys.
1488         + commit 7113263a00d8c9b09f0dfdb9590bfe2bab1bc776
1489         * agent/divert-scd.c (ask_for_card): Detect and re-format the Yubikey
1490         prompt.
1491         * scd/app.c (app_munge_serialno): Fix Yubikey s/n munging.
1492         (card_get_dispserialno): Ditto.
1493         * scd/app-openpgp.c (get_disp_serialno): Remove.
1494         (get_prompt_info): Use app_get_dispserialno.--
1495
1496         scd: Do not try to use a non-enabled app after card switching.
1497         + commit d784e763495c8d53e29a2debdd9c0e0578f15a6a
1498         * scd/app.c (app_dump_state): Also print the refcount.
1499         (maybe_switch_app): Make sure the app exists on the card.
1500
1501         scd: Add special serialno compare for OpenPGP cards.
1502         + commit 764c69a841abc1a4dff2fa86b4cd0b63ec737860
1503         * scd/app.c (is_same_serialno): New.
1504         (check_application_conflict): Use this.
1505         (select_application): Ditto.
1506         (app_switch_current_card): Ditto.
1507         * scd/app-openpgp.c (check_keyidstr): Ignore the card version and also
1508         compare case insensitive.
1509
1510 2020-11-26  NIIBE Yutaka  <gniibe@fsij.org>
1511
1512         gpg: Report an error for receiving key from agent.
1513         + commit 605ab99912ac632363d1b4378a710229e40ca99e
1514         * g10/export.c (do_export_one_keyblock): Report an error.
1515
1516         scd,nks: Fix caching keygrip.
1517         + commit 920154370834ad8d947aed19c9d914a27dde6baa
1518         * scd/app-nks.c (keygripstr_from_pk_file): Identify by cfid if
1519         available.
1520
1521 2020-11-25  Werner Koch  <wk@gnupg.org>
1522
1523         scd:p15: Print the internal card type.
1524         + commit 00037f499db830c75fee2111dfbef72fa11bd98a
1525         * scd/app-p15.c (read_ef_tokeninfo): Print the internal card type.
1526
1527         scd:p15: Improve support for some CardOS based cards.
1528         + commit c7b9a4ee439eca5a4bde4781f7d8983af3b9201e
1529         * scd/iso7816.c (iso7816_read_binary_ext): Add optional arg r_sw and
1530         change callers.
1531         (iso7816_read_record): Factor all code out to ...
1532         (iso7816_read_record_ext): new.
1533         * scd/app-p15.c (select_and_read_binary): Fallback to record reading.
1534         (read_ef_aodf): Clear EOF error.
1535
1536         scd: Rework the handling of the displayed serial number.
1537         + commit 3a8250c02031080c6c8eebd5dea03f5f87f9ddd7
1538         * scd/app.c (app_new_register): Call app_munge_serialno for Yubikeys.
1539         (app_munge_serialno): Handle Yubikey serial numbers.
1540         (card_get_serialno): Remove special Yubikey treatment.  Drop arg
1541         is_canonical.
1542         (app_get_serialno): Clear ERRNO on error.
1543         (card_get_dispserialno): New.  Also change formatting of Yubikey and
1544         OpenPGP numbers to match those printed on the card.
1545         (app_get_dispserialno): New.
1546         * scd/app-openpgp.c (do_getattr): Use app_get_dispserialno.
1547         (yubikey_get_serialno): Remove.
1548         * scd/app-piv.c (get_dispserialno): Remove.
1549         (do_getattr): Use app_get_dispserialno.
1550
1551 2020-11-25  NIIBE Yutaka  <gniibe@fsij.org>
1552
1553         scd: Fix an error return for READKEY.
1554         + commit c3a20c88fb30b0fc4ce50a01de97fae333003682
1555         * scd/command.c (cmd_readkey): Return when error.
1556
1557         scd,nks: Fix SEGV for learn for older card.
1558         + commit 006944b856ee2202905290e8a2f5523a7877d444
1559         * scd/app-nks.c (keygripstr_from_pk_file): Set algostr.
1560
1561 2020-11-20  NIIBE Yutaka  <gniibe@fsij.org>
1562
1563         gpg: Change API of agent_scd_serialno.
1564         + commit 777019faf0b8f10a897c3ee477d35f9b29f02224
1565         * g10/call-agent.c (agent_scd_serialno): Extend API to allow with
1566         R_SERIALNO == NULL.
1567         * g10/card-util.c (card_status): Use NULL for agent_scd_serialno.
1568         (factory_reset): Likewise.
1569         * g10/skclist.c (build_sk_list): Likewise.
1570
1571         Fix the previous comment changes help doc string.
1572         + commit cc8b99d18e26397028ca185e44d0886a94cc1bf6
1573         * scd/command.c (hlp_learn): Fix the doc string.
1574
1575 2020-11-19  Werner Koch  <wk@gnupg.org>
1576
1577         gpgconf: Also print revision of libksba.
1578         + commit 4070f302e4decc8d54d1305cbd30f6dab052ef7e
1579         * dirmngr/dirmngr.c (get_revision_from_blurb): Fix detection of empty
1580         string.
1581         (gpgconf_versions): Print ksba revision.
1582
1583 2020-11-19  NIIBE Yutaka  <gniibe@fsij.org>
1584
1585         agent: Fix creating shadow key on card key generation.
1586         + commit 8ddadbbdbbe20b9e87eb2bfa142577e26dae297e
1587         * agent/command.c (cmd_readkey): Fix handling --card option.
1588
1589         gpg: Fix --card-edit command.
1590         + commit e45455d3020ca8f21c54112b6dfb1cc9bd3f2623
1591         * g10/card-util.c (get_info_for_key_operation): Revert the change.
1592
1593 2020-11-18  NIIBE Yutaka  <gniibe@fsij.org>
1594
1595         build: Update to newer autoconf constructs.
1596         + commit d66fb3aa53a6c4a815fe35a15e3c61886c5df628
1597         * acinclude.m4 (GNUPG_CHECK_ENDIAN): Use AC_COMPILE_IFELSE instead of
1598         AC_TRY_COMPILE.  Use AC_RUN_IFELSE instead of AC_TRY_RUN.
1599         (GNUPG_BUILD_PROGRAM): Use AS_HELP_STRING instead of AC_HELP_STRING.
1600         * configure.ac: Use AC_USE_SYSTEM_EXTENSIONS instead of AC_GNU_SOURCE.
1601         Use AS_HELP_STRING instead of AC_HELP_STRING.
1602         (AC_ISC_POSIX): Replace by AC_SEARCH_LIBS.
1603         (AC_TYPE_SIGNAL): Remove.
1604         * m4/isc-posix.m4: Remove.
1605         * m4/codeset.m4: Update from gnulib.
1606         * m4/gettext.m4: Update from gnulib.
1607         * m4/lcmessage.m4: Update from gnulib.
1608         * m4/socklen.m4: Update from gnulib.
1609         * m4/ldap.m4: Use AS_HELP_STRING instead of AC_HELP_STRING.
1610         Use AC_LINK_IFELSE instead of AC_TRY_LINK.
1611         Use AC_RUN_IFELSE instead of AC_TRY_RUN.
1612         * m4/gpg-error.m4: Update from libgpg-error.
1613         * m4/readline.m4: Update from libgpg-error.
1614         * m4/npth.m4: Update from npth.
1615         * m4/libassuan.m4: Update from libassuan.
1616         * m4/libgcrypt.m4: Update from libgcrypt.
1617         * m4/ksba.m4: Update from libksba.
1618         * m4/ntbtls.m4: Update from ntbtls.
1619         * common/signal.c [!HAVE_DOSISH_SYSTEM] (init_one_signal): Replace
1620         RETSIGTYPE to void.
1621         [!HAVE_DOSISH_SYSTEM] (got_fatal_signal, got_usr_signal): Likewise.
1622
1623         build: Use modern Autoconf check for types.
1624         + commit aeeb8e975dc740cb79954de7fec4fcfe902d3a42
1625         * common/types.h: Use HAVE_TYPE_BYTE, HAVE_USHORT_TYPEDEF,
1626         HAVE_ULONG_TYPEDEF, HAVE_U16_TYPEDEF, and HAVE_TYPE_U32.
1627         * configure.ac (byte, ushort, ulong, u16, u32): Use AC_CHECK_TYPES.
1628
1629 2020-11-13  Werner Koch  <wk@gnupg.org>
1630
1631         gpg: Fix the encrypt+sign hash algo preference selection for ECDSA.
1632         + commit e37c2e184448f64e285f925ab9636b5f21be99f7
1633         * g10/keydb.h (pref_hint): Change from union to struct and add field
1634         'exact'.  Adjust callers.
1635         * g10/pkclist.c (algo_available): Take care of the exact hint.
1636         * g10/sign.c (sign_file): Rework the hash detection from
1637         recipient prefs.
1638
1639 2020-11-12  Werner Koch  <wk@gnupg.org>
1640
1641         gpgconf: Yet another fix for --apply-profile.
1642         + commit e546cc78b75978a696298f2fcc072faeb7f69be4
1643         * tools/gpgconf.c (main): Use gnupg_homedir instead of
1644         default_homedir.  Check for existance of the directory.
1645
1646 2020-11-11  Werner Koch  <wk@gnupg.org>
1647
1648         w32: Replace some fopen by es_fopen.
1649         + commit d574213ce21c495d9432eeb5956e8857826876c6
1650         * agent/protect-tool.c (read_file): Replace fopen by es_fopen.
1651         * dirmngr/dirmngr-client.c (read_pem_certificate):  Ditto.
1652         (read_certificate): Ditto.
1653         * g10/keydb.c (rt_from_file): Ditto.
1654         * kbx/kbxutil.c (read_file): Ditto.
1655         * g10/plaintext.c (get_output_file) [__riscos__]: Remove code.
1656
1657 2020-11-11  NIIBE Yutaka  <gniibe@fsij.org>
1658
1659         gpg: Fix the previous commit.
1660         + commit dd2703096f3ee7f4b6b96e2b649daf85aa8d6030
1661         * g10/delkey.c (do_delete_key): Fix the condition for the error.
1662
1663 2020-11-10  NIIBE Yutaka  <gniibe@fsij.org>
1664
1665         gpg: In batch mode, delete-secret-key is not okay without --yes.
1666         + commit f9bbc751633f38f58fecb71c33aae735e9b30241
1667         * g10/delkey.c (do_delete_key): Emit an error when not --yes.
1668
1669         gpg: Fix agent_delete_key interaction.
1670         + commit 9854369a729b9fde43eac2e2f7154f5187378787
1671         * g10/call-agent.c (agent_delete_key): Set up CTX.
1672
1673 2020-11-09  Werner Koch  <wk@gnupg.org>
1674
1675         card: Run factory-reset in locked stated also in gpg-card.
1676         + commit 12fd10791f1dec4ec42810d7b92c69e1ae2327b9
1677         * tools/card-call-scd.c (scd_apdu): Add more pseudo APDUs.
1678         * tools/card-misc.c (send_apdu): Handle them.
1679         * tools/gpg-card.c (cmd_factoryreset): Use lock commands.
1680
1681         card: Run factory-reset in locked stated.
1682         + commit 8fb0d5e3c775f40e321689b35431d81425406237
1683         * scd/command.c (reset_notify): Add option --keep-lock.
1684         (do_reset): Add arg keep_lock.
1685         (cmd_lock): Send progress status.
1686         * g10/call-agent.c (agent_scd_apdu): Add more pseudo APDUs.
1687         * g10/card-util.c (send_apdu): Ditto.
1688         (factory_reset): Use lock commands.
1689
1690         gpg: Do not print rejected digest algo notes with --quiet.
1691         + commit e08e1d62d089a154ec5d7c80cd58e8e3b18d2d6b
1692         * g10/misc.c (print_digest_rejected_note): Do not print in quiet mode.
1693         (print_sha1_keysig_rejected_note): Ditto.
1694
1695 2020-11-09  NIIBE Yutaka  <gniibe@fsij.org>
1696
1697         gpg: Fix SOS handling when exporting SSH key with libgcrypt 1.8.
1698         + commit bf3a9377d147d8a83d9c71ca5a7284897c913951
1699         * g10/export.c (key_to_sshblob): Fix SOS correctly.
1700
1701         agent: Fix SOS handling with libgcrypt 1.8.
1702         + commit ba4f68416742eb241ec5490d16f88b0eb0bdc811
1703         * agent/cvt-openpgp.c (apply_protection): Handle opaque MPI.
1704
1705 2020-11-06  Werner Koch  <wk@gnupg.org>
1706
1707         agent: Minor tweaks to the new genpin inquiry.
1708         + commit c896112fa3f7f3289b5198bfac992160feb0ad0a
1709         * agent/call-pinentry.c (generate_pin): Use STRING random which is
1710         sufficient for a passphrase.
1711         (inq_cb): s/rc/err/.  Do not print two errors in case generate_pin
1712         fails.  Lowercase strings as per GNU standards.
1713         (setup_genpin): Fix translation test.
1714         (setup_qualitybar): Ditto.
1715
1716 2020-11-06  Andre Heinecke  <aheinecke@gnupg.org>
1717
1718         agent: Add genpin inquiry for pinentry.
1719         + commit 557ddbde32585c534626b57a595a2ccf28fd585e
1720         * agent/call-pinentry.c (agent_get_passphrase): Setup genpin.
1721         (do_getpin): Update with new name for inquire callback.
1722         (inq_quality): Rename to inq_cb and add genpin support.
1723         (inq_cb): Renamed form inq_quality.
1724         (generate_pin): New helper to generate a pin.
1725         (agent_askpin): Fix some typos.
1726         (setup_genpin): Provide new strings for pinentry.
1727
1728 2020-11-05  Ben Kibbey  <bjk@luxsci.net>
1729
1730         gpg: Add canceled status message.
1731         + commit 31e47dfad0f40e31e8b3113b933696e8e4105136
1732         * common/status.h (STATUS_CANCELED_BY_USER): New.
1733         * g10/passphrase.c (passphrase_to_dek): Send STATUS_CANCELED_BY_USER
1734         instead of STATUS_MISSING_PASSPHRASE when canceled is set.
1735
1736 2020-11-05  NIIBE Yutaka  <gniibe@fsij.org>
1737
1738         scd: Use lock_slot for apdu_send_direct.
1739         + commit f808012ac2cf67ec563da178d963f300a7f2564d
1740         * scd/apdu.c (apdu_send_direct): Use lock_slot.
1741
1742         scd: Internal CCID driver: Fix a race condition on close.
1743         + commit 484bafda4dbf5ffe9e7c41ef24fbc5bd791a3b32
1744         * scd/ccid-driver.c (ccid_require_get_status): For VENDOR_SCM reader,
1745         return 0 only at the initial call.
1746         (bulk_in): Don't detect an error for VENDOR_SCM reader, just kicking
1747         the loop, to invoke scd_update_reader_status_file, which calls
1748         ccid_slot_status again.
1749         (ccid_slot_status): Move the call of ccid_vendor_specific_setup to...
1750         (ccid_get_atr): ... here.
1751
1752 2020-11-04  Werner Koch  <wk@gnupg.org>
1753
1754         speedo,w32: Install gpg-check-pattern and example profiles.
1755         + commit f5a81953e172a7bb4d02f2dc0e398f379c39ec84
1756         * doc/examples/vsnfd.prf: Rename to VS-NfD.prf.
1757         * doc/examples/Automatic.prf: New.
1758         * doc/Makefile.am (examples): Adjust.
1759         * build-aux/speedo/w32/inst.nsi: Install gpg-check-pattern.exe and 3
1760         example files.
1761         * build-aux/speedo/w32/wixlib.wxs: Add new files.
1762
1763         g13: Include a now missing header file.
1764         + commit b7f4e2d71fe3dee680f834cfc3dd620352830147
1765         * g13/create.c: Include sysutuls.h
1766
1767         gpgconf: Make sure the homedir exists for --apply-profile.
1768         + commit 7d95f2e7e7a09e3d433d449b117e3470f9dd38c7
1769         * tools/gpgconf.c (main) <aApplyDefaults, aApplyProfile>: Create the
1770         standard home directory.
1771
1772         common: Fix duplicate implementation of try_make_homedir.
1773         + commit dabc314b71378f585fac2753149f3358e32ec621
1774         * g10/openfile.c (try_make_homedir): Move core of the code to ...
1775         * common/homedir.c (gnupg_maybe_make_homedir): new.
1776         * sm/keydb.c (try_make_homedir): Implement using new function.
1777
1778         * common/homedir.c: Include i18n.h.
1779         * po/POTFILES.in: Add common/homedir.c.
1780
1781 2020-11-04  Andre Heinecke  <aheinecke@gnupg.org>
1782
1783         w32: Add another pinentry search path.
1784         + commit c8f6f6bbc8b203e633d382aa84862807c1aeb3d1
1785         * common/homedir.c (get_default_pinentry_name): Try ../bin/pinentry.exe
1786
1787         w32: Add windows subsystem variant of gpgconf.
1788         + commit e2659f4bf603693c43af0444239bc52744291edc
1789         * tools/Makefile.am (gpgconf-w32): New target. Builds gpgconf with
1790         subsystem windows.
1791         * build-aux/speedo/w32/wixlib.wxs: Package it.
1792
1793 2020-11-03  Werner Koch  <wk@gnupg.org>
1794
1795         w32: Fix strftime problem on Windows.
1796         + commit e8aae18b997b3fdbfac86c644be94044aa67224d
1797         * common/gettime.c: Include locale.h.
1798         (asctimestamp): Increase buffer.  On Windows use setlocale.
1799
1800         gpg: Switch to AES256 for symmetric encryption in de-vs mode.
1801         + commit d1f2a6d9f71cf50318f4891c84aeedb975553896
1802         * g10/gpg.c (set_compliance_option): For AES256 and SHA256 in de-vs
1803         mode.
1804         * g10/encrypt.c (setup_symkey): Add extra compliance check.
1805         (encrypt_simple): Avoid printing a second error oncplinace failure.
1806
1807 2020-11-02  Werner Koch  <wk@gnupg.org>
1808
1809         gpg: Allow setting notations with the empty string as value.
1810         + commit e1bafa3574ccd56d9f8f8c1deb3d8fb9fd7025cc
1811         * g10/misc.c (pct_expando): Catch special case of the empty string.
1812         Also map a NULL to the empty string.
1813         * g10/photoid.c (show_photos): Make an empty string used as command
1814         fail.
1815
1816         build: Remove m4 macro defs which are not anymore used.
1817         + commit 6397cf5fbe3bbc1f616431b011f76e031a387d4c
1818         * configure.ac (GNUPG_FUNC_MKDIR_TAKES_ONE_ARG): Do not use.
1819         * acinclude.m4 (GNUPG_FUNC_MKDIR_TAKES_ONE_ARG): Remove unused macro
1820         defs.
1821         (GNUPG_CHECK_FAQPROG): Ditto.
1822         (GNUPG_CHECK_DOCBOOK_TO_TEXI): Ditto.
1823         (GNUPG_CHECK_MLOCK): Ditto.
1824
1825         gpg: Do not use weak digest algos if selected by recipient prefs.
1826         + commit 15746d60d492f5792e4a179ab0a08801b4049695
1827         * g10/misc.c (is_weak_digest): New.
1828         (print_digest_algo_note): Use it here.
1829         * g10/sig-check.c (check_signature_end_simple): Use it.
1830         * g10/sign.c (hash_for): Do not use recipient_digest_algo if it is in
1831         the least of weak digest algorithm.
1832
1833 2020-11-02  Ingo Klöcker  <dev@ingo-kloecker.de>
1834
1835         gpg: Fix iteration over signatures.
1836         + commit b004701adca89ba85f75e12a4d284297147fe4f2
1837         * g10/keyedit.c (keyedit_quick_revsig): Take signature of correct node
1838
1839 2020-11-02  NIIBE Yutaka  <gniibe@fsij.org>
1840
1841         kbx: Don't put zero-byte for ECC.
1842         + commit 8211d0bc3ba5ed15d0668050c08a6e28228b08a4
1843         * kbx/keybox-openpgp.c (parse_key): Only put zero for non-ECC.
1844
1845         gpg: Fix debug output for key_check_all_keysigs with opaque MPI.
1846         + commit 90c3d623ce37695a1eb29c0a7276b23490d14603
1847         * g10/key-check.c (key_check_all_keysigs): Handle opaque MPI.
1848
1849         gpg: Fix check_signature2 for opaque MPI.
1850         + commit 029ba6dc961c683d6683c97667d3c0e103738aa4
1851         * g10/sig-check.c (check_signature2): Handle the case of opaque MPI.
1852
1853         gpg: Change the API for checksum to use const qualifier.
1854         + commit 21d8927f794bd901b13feaaac6d31d463349a64f
1855         * g10/main.h (checksum): Use const.
1856         * g10/misc.c (checksum): Use const.
1857
1858         gpg: Fix counting buffer size in check_signature2.
1859         + commit 3151210e455f14848921fac838a5064749258d9f
1860         * g10/sig-check.c (check_signature2): Use GCRYMPI_FMT_PGP.
1861
1862 2020-10-30  NIIBE Yutaka  <gniibe@fsij.org>
1863
1864         gpg: Fix SOS handling with libgcrypt version <= 1.8.
1865         + commit 813e24108a139c8059dad8bc679b2ab76b807ed9
1866         * g10/misc.c (checksum_mpi): Don't depend new feature
1867         of gcry_mpi_print which supports opaque MPI.
1868
1869         gpg: Fix first zero-byte case for SOS handling.
1870         + commit dd4fb1c8f668f78fbcf5052e80c5c40d4cdad20c
1871         * g10/export.c (transfer_format_to_openpgp): Check the first byte.
1872         * g10/pkglue.c (sexp_extract_param_sos): Likewise.
1873
1874 2020-10-28  Werner Koch  <wk@gnupg.org>
1875
1876         gpg: New command --quick-revoke-sig.
1877         + commit 243f9176e799b2328f2e5bed93099bfc474fdc5a
1878         * g10/gpg.c (enum cmd_and_opt_values): Add aQuickRevSig.
1879         (opts): Add --quick-revoke-sig.
1880         (main): Implement.
1881         * g10/keyedit.c (quick_find_keyblock): Add arg 'want_secret' and
1882         adjust all callers.
1883         (keyedit_quick_revsig): new.
1884         * g10/revoke.c (get_default_sig_revocation_reason): New.
1885         * g10/keylist.c (cmp_signodes): Make global.
1886
1887 2020-10-27  Werner Koch  <wk@gnupg.org>
1888
1889         gpg: Sort the signatures in standard key listings.
1890         + commit 742e2729f4bcadfeb93260107462f4faa108d3b2
1891         * g10/gpg.c (parse_list_options): Add "sort-sigs".
1892         (main): Make it the default.
1893         * g10/options.h (LIST_SORT_SIGS): New.
1894         * g10/keylist.c (cmp_signodes): New.
1895         (list_keyblock_print): Sort signatures and factor signature printing
1896         code out to ...
1897         (list_signature_print): new.
1898
1899 2020-10-27  NIIBE Yutaka  <gniibe@fsij.org>
1900
1901         scd: Handle canonical serialno and app specific serialno differently.
1902         + commit e59d2b3632d8c778bd2c4375a1c3ba9c786c4360
1903         * scd/app-common.h (card_get_serialno): Add IS_CANONICAL arg.
1904         * scd/app.c (app_send_devinfo): Use app specific serialno.
1905         (card_get_serialno): Support two different cases.
1906         (app_get_serialno): Return app specific serialno.
1907         (send_serialno_and_app_status): Return canonical serialno.
1908         * scd/command.c (cmd_serialno): Return app specific serialno.
1909         (cmd_learn): Return canonical serialno.
1910
1911 2020-10-26  Werner Koch  <wk@gnupg.org>
1912
1913         g10: Make call to agent_scd_serialno more robust.
1914         + commit 0f780b1aebb1b1bde219401735a1c24c1f0a7978
1915         * g10/call-agent.c (agent_scd_serialno): Make sure that NULL is stored
1916         on error at r_serialno.
1917         * g10/card-util.c (card_status): Simplify freeing of seriaono.
1918         (factory_reset): Ditto.
1919
1920 2020-10-26  NIIBE Yutaka  <gniibe@fsij.org>
1921
1922         scd: Flush the cache when writing cert data object.
1923         + commit 8264b10d33e46d2caac2f2c38ccb5f764c31ad77
1924         * scd/app-piv.c (do_writecert): Flush the cache of the data object.
1925
1926         gpg: Fix double free on error.
1927         + commit a153d0f7691486efe0aadfb1e226544ae6d20ffd
1928         * g10/card-util.c (card_status): Check an error return.
1929
1930         gpg,tools: Fix detecting OpenPGP card by serialno.
1931         + commit 157f1de64e437cecd75335e9f4077ba9835e3da0
1932         * tools/gpg-card.c (list_openpgp): Use ->apptype to determine card's
1933         APP.
1934         * g10/card-util.c (get_info_for_key_operation): Likewise.
1935         (current_card_status): Even if its SERIALNO is not like OpenPGP card,
1936         it's OpenPGP card when app says so.
1937
1938         scd: Internal CCID driver thing only for SPR532.
1939         + commit 31def32eeed8cff705ca827e4bbc0bfcc80c512f
1940         * scd/ccid-driver.c (ccid_vendor_specific_setup): New.  Limit
1941         only for SPR532, excluding other readers by SCM.
1942         (ccid_slot_status): Use ccid_vendor_specific_setup.
1943
1944 2020-10-24  NIIBE Yutaka  <gniibe@fsij.org>
1945
1946         scd: Internal CCID driver limiting only for SPR532.
1947         + commit 3c6b5dfa2a2379a5f5eaa052f7dbc73462097425
1948         * scd/ccid-driver.c (ccid_vendor_specific_init): Only do that for
1949         SPR532.
1950
1951 2020-10-23  Werner Koch  <wk@gnupg.org>
1952
1953         common: Allow building with released libgpg-error.
1954         + commit 32f336d9555f18464d72a5068c290ab82ee92617
1955         * common/sysutils.c (gnupg_access) [W32]: Fix for older libgpgrt.
1956
1957 2020-10-23  NIIBE Yutaka  <gniibe@fsij.org>
1958
1959         scd: Handle Yubikey's multiple apps and serialno.
1960         + commit 2d4de4b6f06c87cd0f72b2a0d09950e1b50841b2
1961         * scd/app-common.h (yubikey_get_serialno): New.
1962         * scd/app-openpgp.c (yubikey_get_serialno): New.
1963         * scd/app.c (card_get_serialno): Use OpenPGP app's serialno,
1964         when it's enabled for Yubikey.
1965         (send_serialno_and_app_status): Use card_get_serialno, not
1966         directly accessing ->serialno.
1967
1968         scd: Use app_get_serialno for app_getattr.
1969         + commit c8cc35dd2c106d91a793667690c0b200560d5d2d
1970         * scd/app.c (app_getattr): Use app_get_serialno.
1971
1972         scd: Don't overwrite serialno for Yubikey.
1973         + commit 65c91e601ae93aee1a5fa399d4a5d4498ad76eda
1974         * scd/app-openpgp.c (app_select_openpgp): Keep ->serialno.
1975
1976         scd,openpgp: Use app_get_serialno function to get SERIALNO.
1977         + commit 41505f0ae544535b524a409d87aa2540607fc9a4
1978         * scd/app-openpgp.c (check_keyidstr): Don't directly access
1979         app->serialno, but use app_get_serialno.
1980         (do_with_keygrip): Likewise.
1981
1982 2020-10-21  Werner Koch  <wk@gnupg.org>
1983
1984         common: New functions gnupg_opendir et al.
1985         + commit 7e22e08e2ab09cd3c2317f5e80e8ee47d46eff4b
1986         * common/sysutils.h (struct gnupg_dirent_s): New.
1987         * common/sysutils.c: Include dirent.h.
1988         (struct gnupg_dir_s): New.
1989         (gnupg_opendir, gnupg_readdir, gnupg_closedir): New.  Change all
1990         callers of opendir, readdir, and closedir to use these functions.
1991
1992         w32: Make gnupg_remove and gnupg_rename_file Unicode aware.
1993         + commit 9a0197b6fe412cfc66b0cece521267180e454416
1994         * common/sysutils.c (w32_rename): New.
1995         (gnupg_rename_file) [W32]: Support Unicode.
1996         (gnupg_remove) [W32]: Support Unicode.  Drop Windows-CE support.
1997
1998 2020-10-20  Werner Koch  <wk@gnupg.org>
1999
2000         Replace all calls to stat by gnupg_stat.
2001         + commit 18e5dd7b03ced51611c9ba1345cf498a0aaf14a6
2002         * common/sysutils.c (gnupg_stat): New.
2003         * common/sysutils.h: Include sys/stat.h.
2004
2005         Replace most calls to open by a new wrapper.
2006         + commit 4dcef0e17836e8725c31a3b76f2bf7144345c808
2007         * common/sysutils.c (any8bitchar) [W32]: New.
2008         (gnupg_open): New.  Replace most calls to open by this.
2009         * common/iobuf.c (any8bitchar) [W32]: New.
2010         (direct_open) [W32]: Use CreateFileW if needed.
2011
2012         w32: Allow Unicode filenames for dotlock.
2013         + commit b47c355b18d9537ccc3dd3e80cc1825b018ecff7
2014         * common/dotlock.c (any8bitchar) [W32]: New.
2015         (dotlock_create_w32): Use strconcat and CreateFileW.
2016
2017         * common/t-dotlock.c: Source include dotlock.c and modify to allow
2018         manual testing on Windows.
2019
2020         Replace all calls to access by gnupg_access.
2021         + commit c94ee1386e0d5cdac51086c4d5b92de59c09c9b5
2022         * common/sysutils.c (gnupg_access): New.  Replace all calls to access
2023         by this wrapper.
2024         * common/homedir.c (w32_shgetfolderpath): Change to return UTF-8
2025         directory name.
2026         (standard_homedir): Adjust for change.
2027         (w32_commondir, gnupg_cachedir): Ditto.
2028
2029 2020-10-09  NIIBE Yutaka  <gniibe@fsij.org>
2030
2031         gpg,ecc: Fix SOS handling when receiving from agent.
2032         + commit 228836f79f64559c9582ac2d475e50af57684bf8
2033         * g10/export.c (transfer_format_to_openpgp): It's not simple opaque
2034         MPI, but SOS.
2035
2036         agent: Fix SEGV when debuging for cache enabled.
2037         + commit 33cb1655f1b7c597d1ebdcb38447648477e6ac9f
2038         * agent/cache.c (agent_get_cache): Avoid dereferencing NULL.
2039
2040 2020-10-05  Werner Koch  <wk@gnupg.org>
2041
2042         gpgsm: Fix detection of too old keyboxd.
2043         + commit 4eb9ce847825e8c6a07ce27d303c56233e85d007
2044         * sm/keydb.c (warn_version_mismatch): Add arg ctrl and pass on.
2045         (create_new_context): Pass ctrl to warn function.
2046
2047         dirmngr: Minor cleanup for better readability.
2048         + commit b258f8de7e9fc436d72c4d4ff8f98e9b86d2f3f5
2049         * dirmngr/ldap.c (start_default_fetch_ldap): Rename to
2050         start_cacert_fetch_ldap and remove arg attr.  Instead use
2051         "cACertificate" directly.
2052         * dirmngr/crlfetch.c (ca_cert_fetch): Change the only caller.
2053         (start_cert_fetch_ldap): Rename arg for clarity.
2054
2055         dirmngr: Add warning on the use of --add-servers.
2056         + commit 210575d8826ea61e4914e4b61eff7b875c972b85
2057         * tools/gpgconf-comp.c (known_options_dirmngr): Degrade add-servers to
2058         expert mode.
2059
2060         gpg: Switch to ed25519+cv25519 as default algo.
2061         + commit ff31dde456f32950f0df6c974b4c41f1d650d68f
2062         * g10/keygen.c (DEFAULT_STD_KEY_PARAM): Change to former future
2063         default ago.
2064         (ask_algo): Change default and also the way we indicate the default
2065         algo in the list of algos.
2066         (ask_curve): Indicate the default curve.
2067
2068         keyboxd: Fix duplicates when listing keys by uid.
2069         + commit 194034f813a09a0021e6aa82d64ea0693b37c8d0
2070         * kbx/backend-sqlite.c (struct be_sqlite_local_s): Add fields
2071         lastubid_valid and lastubid.
2072         (run_sql_prepare): Add optional extra2 arg and chage callers.
2073         (run_select_statement): Add an ORDER BY clause to most SELECTs.
2074         (be_sqlite_search): Skip duplicated keyblocks in a search.
2075
2076 2020-10-04  Werner Koch  <wk@gnupg.org>
2077
2078         build: Fix SENDMAIL define for a PATH with spaces.
2079         + commit 6c36b8bb23bb033aaae5f1dff3b38d8e0e44717c
2080         * configure.ac: Fix use of $PATH
2081
2082         (cherry picked from commit 77e416741abb0a871733bd46cbc81329859de96e)
2083
2084 2020-10-02  Werner Koch  <wk@gnupg.org>
2085
2086         gpgconf: New option --show-versions.
2087         + commit 357ad9ae29677c1676b56d2b81282e2f78ec8040
2088         * tools/gpgconf.c: Include exechelp.h.  New option --show-versions.
2089         (get_revision_from_blurb): New.
2090         (show_version_gnupg): New.
2091         (show_version_libgcrypt): New.
2092         (show_version_gpgrt): New.
2093         (show_versions_via_dirmngr): New.
2094         (show_versions): New.
2095         * tools/gpgconf-comp.c (GPGNAME): Remove unused macro.
2096         * dirmngr/dirmngr.c (main): New internal option --gpgconf-versions.
2097         (get_revision_from_blurb): New.
2098         (gpgconf_versions): New.
2099
2100         w32: Silence warning due to recent change of split_fields.
2101         + commit 371228a244232f2b74181e0aa3c44d698df840ce
2102         * common/compliance.c (gnupg_rng_is_compliant): Make fields const.
2103
2104         gpg: Fix parameter parsing form ed448.
2105         + commit e824e27d36021a868c855244d22c7d40a88a396e
2106         * g10/keygen.c (parse_key_parameter_part): Set algo also for 448.
2107
2108 2020-10-01  Andre Heinecke  <aheinecke@gnupg.org>
2109
2110         doc: Remove enable-extended-key-format in vsnfd.
2111         + commit d84862cf109c75ae30ed5e2531b4554083c6a558
2112         * doc/examples/vsnfd.prf: Remove enable-extended-key-format
2113
2114 2020-09-30  NIIBE Yutaka  <gniibe@fsij.org>
2115
2116         scd: Internal CCID driver: More fix for SPR532.
2117         + commit 920f258eb6018ecec1d63bad6a0fb0772f72affa
2118         * scd/ccid-driver.c (bulk_in): Handle the case of missing intr_cb.
2119
2120         scd: Report any error for LEARN command.
2121         + commit 862d9c6face9b4ad61f6e59bf1ba9b5f5d05c58c
2122         * scd/app-openpgp.c (do_learn_status): Report any error.
2123
2124 2020-09-29  NIIBE Yutaka  <gniibe@fsij.org>
2125
2126         scd: Internal CCID driver fix.
2127         + commit 1444203ca32ccfa4bd5097d2d49565c4055c620b
2128         * scd/ccid-driver.c (intr_cb): More useful debug output.
2129         (ccid_slot_status): Remove redundant condition.
2130
2131         scd: Internal CCID driver: Call libusb_clear_halt at ccid_setup_intr.
2132         + commit 6af978713e4c69d7814f47e709f1dfb3fe9076d1
2133         * scd/ccid-driver.c (ccid_setup_intr): Reset the endpoint.
2134         (ccid_vendor_specific_init): Don't call libusb_clear_halt.
2135
2136 2020-09-28  NIIBE Yutaka  <gniibe@fsij.org>
2137
2138         scd: Internal CCID driver: Fix a failure path.
2139         + commit d561c936a217627bc29aac628a8d01f7003dcd28
2140         * scd/ccid-driver.c (ccid_open_usb_reader): On error, call
2141         libusb_release_interface.
2142
2143         scd: Internal CCID: Handle LIBUSB_ERROR_TIMEOUT at ccid_get_atr.
2144         + commit b1e8072320c19246962beb6d67dc5784b5a72364
2145         * scd/ccid-driver.c (ccid_slot_status): Handle LIBUSB_ERROR_TIMEOUT.
2146
2147         scd: Internal CCID: Clear the handle after use.
2148         + commit c5e8ef3ab980012b64f5894f437e2ff568b02f43
2149         * scd/apdu.c (close_ccid_reader): Clear the handle.
2150         (open_ccid_reader): Likewise.
2151
2152         scd: Change handling of SPR532 card reader.
2153         + commit 684a52dffa8b7f79b26fe53b3ab10d7748a8fb37
2154         * scd/ccid-driver.c (ccid_vendor_specific_init): Put some workaround
2155         for SPR532 initialization.
2156         (ccid_slot_status): Send ESCape command after GetSlotStatus.
2157
2158 2020-09-25  Werner Koch  <wk@gnupg.org>
2159
2160         keyboxd: Make use of the config table.
2161         + commit f8fbd9e7346ee0c3b09271ec2cdb589282eae1c9
2162         * kbx/backend-sqlite.c (DATABASE_VERSION): New.
2163         (table_definitions): Make column name of table config unique.
2164         (create_or_open_database): Read and set the database version.
2165         (get_config_value, set_config_value): New.
2166
2167 2020-09-25  NIIBE Yutaka  <gniibe@fsij.org>
2168
2169         scd: For PC/SC, send the ESC command at init for SPR532 reader.
2170         + commit 93e3c97889120dd17d79b7c8dd04293553785c9b
2171         * scd/apdu.c (struct reader_table_s): Remove is_spr532.
2172         (pcsc_vendor_specific_init): Send the ESC command for SPR532.
2173         (pcsc_pinpad_verify, pcsc_pinpad_modify): Remove no_lc hack.
2174
2175         scd: For SPR532, submit the ESCape command at initialization.
2176         + commit 4fae55f8ee11b3f710524e5e8b8a91b159949f2d
2177         * scd/ccid-driver.c (ccid_vendor_specific_init): Submit the ESC
2178         command for VENDOR_SCM.
2179         (ccid_transceive_secure): Don't submit the ESC command every time.
2180
2181 2020-09-24  Werner Koch  <wk@gnupg.org>
2182
2183         gpg: New experimental import option "bulk-import"
2184         + commit d49a945b12d98fadd0d37f4e50b5e02799e16305
2185         * g10/options.h (IMPORT_BULK): New.
2186         * g10/import.c (parse_import_options): Add "bulk-import".
2187         * g10/call-keyboxd.c (in_transaction): New var.
2188         (gpg_keyboxd_deinit_session_data): Run a commit if in bulk import
2189         mode.
2190         (create_new_context): Run a begin transaction if in bulk import mode.
2191
2192         keyboxd: New command TRANSACTION.
2193         + commit c2b14f5d6852fb9efaca8aeec7961e9d036203e8
2194         * kbx/backend-sqlite.c (be_sqlite_rollback): New.
2195         (be_sqlite_commit): New.
2196         (be_sqlite_search): Take care of global transactions.
2197         (be_sqlite_store): Ditto.
2198         (be_sqlite_delete): Ditto.
2199         * kbx/frontend.c (kbxd_rollback, kbxd_commit): New.
2200         * kbx/keyboxd.h (opt): Add vars for transactions.
2201         * kbx/kbxserver.c (struct server_local_s): Add fields next_session and
2202         client_pid.
2203         (session_list): New var.
2204         (cmd_transaction): New.
2205         (register_commands): Register command.
2206         (kbxd_start_command_handler): Store pids and track sessions.  Do a
2207         final rollback.
2208
2209         tests: Integrate --use-keyboxd into the OpenPGP test suite.
2210         + commit b19a60c6f7e892635db9e22499a7a44087c86c41
2211         * tests/openpgp/all-tests.scm (all-tests): Replace extended-key-format
2212         mode with a new keyboxd mode.
2213         * tests/openpgp/defs.scm (create-gpghome): Ditto.
2214         * tests/openpgp/gpgv.scm: Adjust for keyboxd mode.
2215         * tests/openpgp/issue2419.scm: Fix to allow setting a log-file into
2216         gpg.conf for debugging.
2217
2218         keyboxd: Implement multiple search descriptions.
2219         + commit 25ad3c22d79d06c16a5fc652b0a6e3ffd99ad2b6
2220         * kbx/kbx-client-util.c (kbx_client_data_simple): New.
2221         * kbx/backend-sqlite.c (struct be_sqlite_local_s): Add field descidx.
2222         (be_sqlite_search): Use that.
2223         * g10/call-keyboxd.c (keydb_search): Implement multi mode.
2224
2225         keyboxd: Fix UDPATE keyblob SQL statement.
2226         + commit 1f89d50537b3b16165e921df60734ce6203650cb
2227         * kbx/backend-sqlite.c: Always use ?NNN for SQL parameters.
2228
2229         tests: Fix convenience function to run gpg.
2230         + commit 97798eec4b77470b3aecdbee9729fa76b8550dfe
2231         * tests/openpgp/defs.scm (pipe:gpg): Remove stray dash.
2232
2233         keyboxd: Remove unused variables.
2234         + commit 0ac003b4576392ca3e930304a98bbf8183ab5f8b
2235         * kbx/kbx-client-util.c (datastream_thread): No need to set PK_NO and
2236         UID_NO.
2237
2238         keyboxd: Integrate into gpgconf.
2239         + commit acaeba2dbdb9bbd68a823c671d5c3577fef5d26d
2240         * common/asshelp.c (lock_spawning): Use a dedicated name for keyboxd.
2241         * common/homedir.c (keyboxd_socket_name): New.
2242         (gnupg_module_name): Put keyboxd into libexecdir.
2243         * tools/gpgconf-comp.c (known_options_keyboxd): New.
2244         (gc_component): Add entry for keyboxd.
2245         (keyboxd_runtime_change): New.
2246         (gc_component_launch): Support keyboxd.
2247         * tools/gpgconf.c (list_dirs): Emit new item keyboxd-socket.
2248         (main): Also remove keyboxd socket.
2249
2250 2020-09-24  NIIBE Yutaka  <gniibe@fsij.org>
2251
2252         scd: Fix CCID internal driver for interrupt transfer.
2253         + commit 7cbb513a2dc150a90a30c53316970df2a439d494
2254         * scd/ccid-driver.c (intr_cb): Handle the case of multiple messages.
2255
2256 2020-09-22  Werner Koch  <wk@gnupg.org>
2257
2258         gpg: Set the found-by flags in the keyblock in keyboxd mode.
2259         + commit 183509756179fadd95d1cc740047b94dc16bb279
2260         * g10/keydb-private.h (struct keydb_handle_s): Add fields to return
2261         the ordinals of the last found blob.
2262         * g10/call-keyboxd.c (keydb_get_keyblock): Pass them to the keyblock
2263         parser.
2264
2265         sm: Fix returning of the ephemeral flag in keyboxd mode.
2266         + commit b810320b1bf76209dc1087cb91ca34232d9268c3
2267         * sm/keydb.c (search_status_cb): Skip over the ubid.
2268
2269         common: Fix name of keyboxd.
2270         + commit c81a7b09368a474de4e3572fbb527d1597408ab1
2271         * common/homedir.c (gnupg_module_name): Fix name.
2272
2273         keyboxd: Extend PUBKEY_INFO status line with an uid ordinal.
2274         + commit 0e892bda4e0bf9db9116d7d5585d4e7b0d2eae57
2275         * kbx/backend-sqlite.c (table_definitions): Add column UINO to
2276         userids.
2277         (be_sqlite_local_s): Add fields select_col_uidno and
2278         select_col_subkey.
2279         (run_select_statement): Also select subkey or uidno column.
2280         (be_sqlite_search): Return their values.
2281         (store_into_userid): Store the UIDNO.
2282         * kbx/backend-support.c (be_return_pubkey): Extend PUBKEY_INFO.
2283
2284         kbx: Add bounds check to detect corrupt keyboxes.
2285         + commit e0a312bfd646485ae8a0ae5e26720fc1667c5490
2286         * kbx/keybox-dump.c (_keybox_dump_blob): Fix the fixmes.
2287
2288 2020-09-21  Werner Koch  <wk@gnupg.org>
2289
2290         scd: Extend KEYPAIRINFO with an algorithm string.
2291         + commit 26da47ae53d51e16ae6867cd419ddbf124a94933
2292         * scd/app-openpgp.c (send_keypair_info): Emit the algo string as part
2293         of a KEYPAIRINFO.
2294         * scd/command.c (do_readkey): Ditto.
2295         * scd/app-piv.c (do_readkey): Ditto.
2296         * scd/app-nks.c (do_learn_status_core): Ditto.
2297         (struct fid_cache_s): Add field algostr.
2298         (flush_fid_cache): Release it.
2299         (keygripstr_from_pk_file): Fill it and add it to the cache.  Use a
2300         single exit label.
2301         * scd/app-help.c (app_help_get_keygrip_string_pk): Add new arg
2302         r_algostr.  Change all callers.
2303
2304         sm: Implement delete key in keyboxd mode.
2305         + commit c772770574ea2d337f8745ff304b1b8acd8a2e4c
2306         * sm/keydb.c (keydb_delete): Implement keyboxd mode.
2307         (keydb_update_cert): Disable unused function.
2308         * kbx/backend-sqlite.c (be_sqlite_delete): Delete from issuer.
2309
2310 2020-09-18  NIIBE Yutaka  <gniibe@fsij.org>
2311
2312         agent: Fix regression for access through the extra secket.
2313         + commit 8a84a71f3a58a3e943f238b70743cd6408477eba
2314         * agent/command.c (cmd_keyinfo): Allow KEYINFO command for one key.
2315         (cmd_scd): Allow SCD command to invoke GETINFO, GETATTR, and
2316         KEYINFO --list=encr sub commands.
2317
2318         common,agent,dirmngr,g10,tools: Fix split_fields API.
2319         + commit dfdcf14738976c6b236f4fa1c3b68af351024b3c
2320         * common/stringhelp.h (split_fields): Use const * for the strings in
2321         the ARRAY.
2322         (split_fields_colon): Likewise.
2323         * common/stringhelp.c (split_fields, split_fields_colon): Fix
2324         the implementation.
2325         * agent/call-scd.c, agent/command.c: Follow the change.
2326         * common/t-stringhelp.c, dirmngr/loadswdb.c: Likewise.
2327         * g10/call-agent.c, tools/card-call-scd.c: Likewise.
2328         * tools/card-yubikey.c, tools/gpg-card.c: Likewise.
2329         * tools/gpg-card.h, tools/gpg-wks-client.c: Likewise.
2330         * tools/gpgconf-comp.c, tools/gpgconf.c: Likewise.
2331         * tools/wks-util.c: Likewise.
2332
2333 2020-09-16  NIIBE Yutaka  <gniibe@fsij.org>
2334
2335         scd: Clear PIN cache when changing key attributes.
2336         + commit 8ff36630277f05fbe4e43c7d757eb90da8645e3f
2337         * scd/app-openpgp.c (change_keyattr): Clear all PINs.
2338
2339         scd: Clear caching PIN at KDF setup.
2340         + commit f4c07fc3d3c32e96d4306f6daa60b6de7fba7dc5
2341         * scd/app-openpgp.c (do_setattr): Clear PINs.
2342
2343         scd: Add better support for KDF feature.
2344         + commit 316a8cbc7523560d999e46eb524165db11682210
2345         * scd/app-openpgp.c (do_setattr): Handle kdf-seup "off" for Gnuk.
2346
2347         gpg,scd: Fix handling of KDF feature.
2348         + commit 8dfd0ebfd8cf2b6bcecbd91c8f7fad6db583aa5a
2349         * g10/card-util.c (kdf_setup): Fix the default value.
2350         * scd/app-openpgp.c (do_setattr): Support kdf-setup "off" by
2351         Zeitcontrol.  Make sure Gnuk and Yubikey work well.
2352
2353 2020-09-15  NIIBE Yutaka  <gniibe@fsij.org>
2354
2355         scd: Fix the use case of verify_chv2 by CHECKPIN.
2356         + commit 6e51f2044aebb885ea81dae259db1b7f477b1c44
2357         * scd/app-openpgp.c (verify_chv2): Call verify_a_chv with chvno=1
2358         when needed.
2359
2360 2020-09-11  Werner Koch  <wk@gnupg.org>
2361
2362         scd:piv: Avoid conflict when writing a cert.
2363         + commit fbc1b199fdc8fd9a4ab422f005b4eb521b594c5c
2364         * scd/app-piv.c (map_curve_name_to_oid): New.
2365         (my_cmp_public_key): New.
2366         (do_writecert): Replace simple memcmp by cmp_canon_sexp.
2367
2368         common: New function cmp_canon_sexp.
2369         + commit b6ba6a79ce9336f1b53f16f3d1190dd009fb166e
2370         * common/sexputil.c (cmp_canon_sexp): New.
2371         (cmp_canon_sexp_def_tcmp): New.
2372         * common/t-sexputil.c (test_cmp_canon_sexp): Add a simple test.
2373
2374         keyboxd: Implement lookup by short and long keyid.
2375         + commit 9a94db1f662a1c5973b57b25e25aeab1bc33250e
2376         * kbx/backend-sqlite.c: Change definition of column KID.
2377         (kid_from_mem): Remove.
2378         (kid_from_u32): Rewrite.
2379         (run_sql_bind_int64): Remove.
2380         (run_select_statement): Implement lookup by short keyid.  Fix lookup
2381         by long keyid.
2382         (store_into_fingerprint): Adjust kid arg.
2383
2384         keyboxd: Add ephemeral and revoked flag to the sqlite backend.
2385         + commit 616c60d93dfab27dde00e1489c6c51340ec93b6c
2386         * kbx/backend-support.c (be_return_pubkey): Add args is_ephemeral and
2387         is_revoked.  Adjust callers.
2388         * kbx/backend-sqlite.c: Alter table pubkey to add new columns.
2389         (run_select_statement): Add new column to all selects.
2390         (be_sqlite_search): Return the new flags.
2391
2392 2020-09-10  Andre Heinecke  <aheinecke@gnupg.org>
2393
2394         doc: Update and extend module overview.
2395         + commit d62797ebcc15ffac52664fe08759d18a92491ddc
2396         * doc/gnupg-module-overview.svg: Add examples of GPGME aware
2397         applications
2398
2399 2020-09-10  Werner Koch  <wk@gnupg.org>
2400
2401         sm: Implement initial support for keyboxd.
2402         + commit ed6ebb696e4063dc664d7ee74fc492025881c459
2403         * sm/gpgsm.h (MAX_FINGERPRINT_LEN): New.
2404         * sm/keydb.c (struct keydb_local_s): Change definition of
2405         search_result.
2406         (keydb_get_cert): Implement keyboxd mode.
2407         (keydb_get_flags): Temporary hack for keyboxd mode.  Needs to be
2408         fixed.
2409         (struct store_parm_s, store_inq_cb): New.
2410         (keydb_insert_cert): Implement keyboxd mode.
2411         (keydb_locate_writable): Make static.
2412         (keydb_search_reset): Implement keyboxd mode.
2413         (search_status_cb): New.
2414         (keydb_search): Implement keyboxd mode. Replace return code -1 by
2415         GPG_ERR_NOT_FOUND.
2416         (keydb_set_cert_flags): Replace return code -1 by GPG_ERR_NOT_FOUND.
2417         * sm/keylist.c (list_cert_colon): Adjust for replacement of -1 by
2418         GPG_ERR_NOT_FOUND.
2419         (list_internal_keys): Ditto.
2420         * sm/sign.c (add_certificate_list): Ditto.
2421         * sm/certchain.c (find_up_search_by_keyid): Ditto.
2422         (find_up_external, find_up, find_up_dirmngr): Ditto.
2423         (gpgsm_walk_cert_chain): Ditto.
2424         (get_regtp_ca_info): Ditto.
2425         * sm/certlist.c (gpgsm_add_to_certlist): Ditto.
2426         (gpgsm_find_cert): Ditto.
2427         * sm/delete.c (delete_one): Ditto.
2428         * sm/export.c (gpgsm_export): Ditto.
2429         (gpgsm_p12_export): Ditto.
2430         * sm/import.c (gpgsm_import_files): Ditto.
2431
2432         keyboxd: Add basic support for X.509.
2433         + commit c9677d416e6ff190c589af35b514a01a787085fb
2434         * kbx/keybox-blob.c (x509_email_kludge): Rename to ...
2435         (_keybox_x509_email_kludge): this and make global.
2436         * kbx/backend.h: Include ksba.h.
2437         * kbx/backend-support.c (be_get_x509_serial): New.
2438         (be_get_x509_keygrip): New.
2439         * kbx/backend-sqlite.c (table_definitions): New table 'issuers'.
2440         (run_select_statement): Implements modes ISSUER, ISSUER_SN, SUBJECT.
2441         (store_into_userid): Add arg override_mbox.
2442         (store_into_issuer): New.
2443         (be_sqlite_store): Implement x509 part.
2444
2445         keyboxd: Use D-lines instead of a separate thread.
2446         + commit 6fcc263c182fc49d9ba2d1bd7649b4af1e9f3e3a
2447         * kbx/kbx-client-util.c (kbx_client_data_new): Add arg 'dlines'.
2448         * g10/call-keyboxd.c (open_context): Set DLINES to true.
2449         * sm/keydb.c (open_context): Ditto.
2450
2451         keyboxd: Add options --openpgp and --x509 to SEARCH.
2452         + commit 29977e21d18188e16e50fee95a95e05fdbd97caf
2453         * kbx/keyboxd.h (struct server_control_s): Replace the two request
2454         objects by just one.  Add filter flags.
2455         * kbx/kbxserver.c (cmd_search): Add options --openpgp and --x509.
2456         (cmd_killkeyboxd): Do not return GPG_ERR_EOF.
2457         * kbx/frontend.c (kbxd_release_session_info): Adjust for the new
2458         request object.
2459         (kbxd_search, kbxd_store, kbxd_delete): Ditto.
2460         * kbx/backend-sqlite.c (struct be_sqlite_local_s): Add filter flags.
2461         (run_sql_prepare): Add optional arg 'extra'.  Change callers.
2462         (run_sql_bind_ntext): New.
2463         (run_sql_bind_text): Just call run_sql_bind_ntext.
2464         (run_select_statement): Add ctrl arg.  Implement the filter flags.
2465
2466         * g10/call-keyboxd.c (keydb_search): Use the --openpgp option.
2467
2468         gpg-connect-agent: Catch signals so that SIGPIPE is ignored.
2469         + commit 3cf9bb4d73cfe78d3d48734e7c8a65d9a98112a5
2470         * dirmngr/server.c (cmd_killdirmngr): Return 0.
2471         * tools/gpg-connect-agent.c (main): Catch signals.
2472
2473         dirmngr: Fix the pool keyserver case for a single host in the pool.
2474         + commit 5a87011c46b5b01659c3cbc3c7a04da94ae5ca9e
2475         * dirmngr/ks-engine-hkp.c (map_host): Set R_HOSTNAME also for
2476         localhost and if there is no pool.
2477
2478         dirmngr: Align the gnutls use of CAs with the ntbtls code.
2479         + commit faabc49797df43c4904b6230f83e8c6677e88b22
2480         * dirmngr/http.c (http_session_new) <gnutls>: Use only the special
2481         pool certificate for the default keyserver.
2482
2483 2020-09-10  NIIBE Yutaka  <gniibe@fsij.org>
2484
2485         scd: Flush KDF DO (0x00F9) when it's being set.
2486         + commit d4cb774ddd8830836c9c87a90db01f749ac8d67c
2487         * scd/app-openpgp.c (do_setattr): Call flush_cache_item always.
2488
2489 2020-09-09  Werner Koch  <wk@gnupg.org>
2490
2491         agent: Keep some permissions of private-keys-v1.d.
2492         + commit 8ed85ef3de9cdeee86e281a8b46be1bd49a36e7a
2493         * common/sysutils.c (modestr_to_mode): Re-implement.
2494         (gnupg_chmod): Support keeping of permissions.
2495
2496         kbx: Change X.509 S/N search definition.
2497         + commit adec6a84f6ee176764391da358ae150f92b1f1e4
2498         * kbx/keybox-search-desc.h (struct keydb_search_desc): Do not overload
2499         SNLLEN with a hex flag.  Add SNHEX.
2500         * kbx/keybox-search.c (keybox_search): Adjust.
2501         * common/userids.c (classify_user_id): Adjust.
2502         * sm/keydb.c (keydb_search_desc_dump): Adjust.
2503         * g10/keydb.c (keydb_search_desc_dump): Adjust.
2504
2505 2020-09-08  NIIBE Yutaka  <gniibe@fsij.org>
2506
2507         gpg,tools: Add handling of supported algorithms by a card.
2508         + commit 2bc1ec294422504e2d2e5d20716aba68f1c2b0d7
2509         * g10/call-agent.h (struct agent_card_info_s): Add supported_keyalgo.
2510         * g10/call-agent.c (learn_status_cb): Parse KEY-ATTR-INFO.
2511         (agent_release_card_info): Release supported_keyalgo.
2512         * tools/gpg-card.h (struct card_info_s): Add supported_keyalgo.
2513         * tools/card-call-scd.c (learn_status_cb): Parse KEY-ATTR-INFO.
2514         (release_card_info): Release supported_keyalgo.
2515
2516         scd: Add a workaround for Yubikey.
2517         + commit 0db9c83555b4a8a0c52f96e96ec20dbfd3d75272
2518         * scd/app-openpgp.c (get_public_key): Handle wrong code for Yubikey.
2519
2520 2020-09-07  NIIBE Yutaka  <gniibe@fsij.org>
2521
2522         scd: Fix handling 0x00FA to support OpenPGP card 3.4.
2523         + commit 270c49b8c6eaf99df7b417f9d0e45eba0acfb423
2524         * scd/app-openpgp.c (data_objects): It may be longer.
2525
2526 2020-09-04  Werner Koch  <wk@gnupg.org>
2527
2528         gpg: Initialize a parameter to silence valgrind.
2529         + commit 65eb1569809a3c42e8afb064f6194fac2e34a03a
2530         * g10/keygen.c (read_parameter_file): Initialize nline.
2531         * g10/textfilter.c (copy_clearsig_text): Initialize bufsize.
2532
2533 2020-09-04  NIIBE Yutaka  <gniibe@fsij.org>
2534
2535         scd: Support GET DATA response with no header for DO 0x00FA.
2536         + commit 43bbc25b0f57dec24412886ff46041e0b1f3de26
2537         * scd/app-openpgp.c (do_getattr): Support Gnuk, as well.
2538
2539         scd: Parse "Algorithm Information" data object in scdaemon.
2540         + commit eba2563dabbb4f61537900289fbe3ae113904733
2541         * scd/app-openpgp.c (data_objects): 0x00FA for binary data.
2542         (do_getattr): Parse the data and send it in status lines.
2543         (get_algorithm_attribute_string): New.
2544
2545 2020-09-03  Werner Koch  <wk@gnupg.org>
2546
2547         sm: New options to prepare the use of keyboxd.
2548         + commit 046f419f806036248c058c4bd44368f8596287b7
2549         * sm/Makefile.am (AM_CFLAGS): Add npth flags.
2550         (common_libs): Use npth version of the lib.
2551         (gpgsm_LDADD): Add npth libs.
2552         * sm/gpgsm.c (oUseKeyboxd, oKeyboxdProgram): New.
2553         (opts): New options --use-keyboxd and --keyboxd-program.
2554         (main): Set them.
2555         (gpgsm_deinit_default_ctrl): New.
2556         (main): Call it.
2557         * sm/server.c (gpgsm_server): Ditto.
2558         * sm/gpgsm.h (opt): Add fields use_keyboxd and keyboxd_program.
2559         (keydb_local_s): New type.
2560         (struct server_control_s): Add field keybd_local.
2561         * sm/keydb.c: Include assuan.h, asshelp.h, and kbx-client-util.h.
2562         (struct keydb_local_s): New.
2563         (struct keydb_handle): Add fields for keyboxd use.
2564         (gpgsm_keydb_deinit_session_data): New.
2565         (warn_version_mismatch): New.
2566         (create_new_context): New.
2567         (open_context): New.
2568         (keydb_new): Implement keyboxd mode.
2569         (keydb_release): Ditto.
2570         (keydb_get_resource_name): Ditto.
2571
2572         * sm/keydb.c: Add stub support for all other functions.
2573
2574         sm: Add arg ctrl to keydb_new.
2575         + commit a7d006293ec84532cc1972cd2f990198eadf1a1a
2576         * sm/keydb.c (keydb_new): Add arg and change all callers.
2577
2578 2020-09-03  NIIBE Yutaka  <gniibe@fsij.org>
2579
2580         scd: Add handling of "Algorithm Information" DO.
2581         + commit 90d0072165cc5c6888f14462392a211de0c4b232
2582         * cd/app-openpgp.c (data_objects): Add 0x00FA.
2583         (do_getattr): Add KEY-ATTR-INFO.
2584
2585 2020-09-02  Werner Koch  <wk@gnupg.org>
2586
2587         gpg: Fix segv importing certain keys.
2588         + commit 8ec9573e57866dda5efb4677d4454161517484bc
2589         * g10/key-check.c (key_check_all_keysigs): Initialize issuer.
2590
2591         keyboxd: Restructure client access code.
2592         + commit 497db0b5bcd688c4e2144ba167bd2ac485069d1b
2593         * kbx/kbx-client-util.c: New.
2594         * kbx/kbx-client-util.h: New.
2595         * kbx/Makefile.am (client_sources): New.
2596         * g10/keydb.c (parse_keyblock_image): Rename to keydb_parse_keyblock
2597         and make global.
2598         * g10/call-keyboxd.c: Include kbx-client-util.h.
2599         (struct keyboxd_local_s): Remove struct datastream.  Add field kcd.
2600         Remove per_session_init_done.
2601         (lock_datastream, unlock_datastream): Remove.
2602         (prepare_data_pipe, datastream_thread): Remove.
2603         (keydb_get_keyblock_do_parse): Remove.
2604         (gpg_keyboxd_deinit_session_data): Release the KCD object.
2605         (open_context): Use of kbx_client_data_new.
2606         (keydb_get_keyblock): Simplify.
2607         (keydb_search): Use kbx_client_data_cmd and _wait.
2608
2609         keyboxd: Fix user id based queries.
2610         + commit 4d839f5a8083e1ddd4767c838f56a4079f846c6d
2611         * kbx/backend-sqlite.c (run_select_statement): Add the missing join
2612         for user id bases queries.
2613
2614         common: New helper function gnupg_close_pipe.
2615         + commit 2042f5a4641f4e43137b7683077b4d733d216417
2616         * common/exechelp-posix.c (gnupg_close_pipe): New.
2617         * common/exechelp-w32.c (gnupg_close_pipe): New.
2618
2619 2020-09-01  Werner Koch  <wk@gnupg.org>
2620
2621         Use only one copy of the warn_server_mismatch function.
2622         + commit 2cd8bae23d7382588cf096df3eed83e02331a2bf
2623         * common/asshelp.c (warn_server_version_mismatch): New.  Actually a
2624         slightly modified version of warn_version_mismatch found in other
2625         modules.
2626         * common/status.c (gnupg_status_strings): New.
2627         * g10/cpr.c (write_status_strings2): New.
2628         * g10/call-agent.c (warn_version_mismatch): Use the new unified
2629         warn_server_version_mismatch function.
2630         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
2631         * g10/call-keyboxd.c (warn_version_mismatch): Ditto.
2632         * sm/call-agent.c (warn_version_mismatch): Ditto.
2633         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
2634         * tools/card-call-scd.c (warn_version_mismatch): Ditto.
2635
2636 2020-08-28  Werner Koch  <wk@gnupg.org>
2637
2638         sm: Fix a bug in the rfc2253 parser.
2639         + commit 16c1d8a14e98894408f30349cab68ff17ef6b35e
2640         * sm/certdump.c (parse_dn_part): Fix parser flaw.
2641
2642 2020-08-28  NIIBE Yutaka  <gniibe@fsij.org>
2643
2644         common: Fix fallback handling to utf-8.
2645         + commit 393dcdd61c3b2da00a97176c647d9bd1c908ceba
2646         * common/utf8conv.c (handle_iconv_error): Set NO_TRANSLATION.
2647
2648 2020-08-27  Werner Koch  <wk@gnupg.org>
2649
2650         scd: New option to APDU command to return the ATR as data.
2651         + commit a0a4744bd0640e587b33ec3dae819ec4054f0472
2652         * scd/command.c (cmd_apdu): Add new option --data-atr.
2653         * tools/gpg-card.c (cmd_apdu): Use that here.  Also fix the --exlen
2654         option and do not print the statusword in atr mode.
2655         * tools/card-call-scd.c (scd_apdu): Detect atr mode anddon't assume a
2656         status word.
2657
2658         scd: Fix reading of the ATR for card type detection.
2659         + commit 95b5a852e269e602ade6a07ed468e9072c247b8c
2660         * scd/app.c (app_new_register): Do not use apdu_get_slot.
2661
2662         dirmngr: Print the last alert message returned by NTBTLS.
2663         + commit 05358d73841149f64dc5d620f4b8855255e7f4da
2664         * dirmngr/http.c (send_request): Print the last TLS alert.
2665
2666 2020-08-27  NIIBE Yutaka  <gniibe@fsij.org>
2667
2668         scd: Add heuristics to identify cardtype.
2669         + commit 9f148360a2bf04672b43ef7cec48e21d44b06ae1
2670         * scd/app-common.h (cardtype_t): Add CARDTYPE_GNUK and
2671         CARDTYPE_ZEITCONTROL.
2672         * scd/app.c (strcardtype): Handle CARDTYPE_GNUK and
2673         CARDTYPE_ZEITCONTROL.
2674         (app_new_register): Detect Gnuk and Zeit Control implementation
2675         by examining its ATR string.
2676
2677         scd: Add condition for VERIFY with 0x82.
2678         + commit af189be481df02a77e088aa0a60a1fc02dfa12bf
2679         * scd/app-openpgp.c (verify_chv2): Check availability of keys in
2680         question.
2681
2682 2020-08-26  Werner Koch  <wk@gnupg.org>
2683
2684         build: Silence gcc warning -Wformat-zero-length.
2685         + commit 90a87d96eaf5b97cd53cb0ee0495b646be7b84bb
2686         * configure.ac: Avoid useless gcc warning.  We use an empty string
2687         quite often, for example in log_printhex.
2688
2689 2020-08-25  Werner Koch  <wk@gnupg.org>
2690
2691         gpg: Remove left over debug output from recent change.
2692         + commit fc1a1857551c05135d54e2e620e609fda59d5bca
2693         * g10/import.c (collapse_subkeys): Remove debug out.
2694
2695         examples: Simplify vsnfd.prf.
2696         + commit 40acc5ef3ef73494e67d88ea310503e5bf08bc36
2697         * doc/examples/vsnfd.prf: Remove default-new-key-algo option.
2698
2699         sm: Do not require a default keyring for --gpgconf-list.
2700         + commit e7677da479c4fb5abd0339de807b27c0f487d2e0
2701         * sm/gpgsm.c (main): No default keyring for gpgconf mode.
2702
2703         gpgconf: Silence warnings from parsing the options files.
2704         + commit ad1254b59d41e127879fc9f495d392316135b4a5
2705         * tools/gpgconf-comp.c (retrieve_options_from_program): Set verbose
2706         flag for the arg parser only in --verbose mode.
2707
2708         agent: Allow using --gogconf-list even if HOME does not exist.
2709         + commit b17846e4fd02f65b24ada306855fb110c56c5e73
2710         * agent/gpg-agent.c (main): Do not create directories in gpgconf mode.
2711
2712         gpgconf,w32: New debug command --show-codepages.
2713         + commit 32021dfa5bcaa056c18e4ec40fdcd0f8b7de382b
2714         * tools/gpgconf.c (aShowCodepages): New.
2715         (opts): New command --show-codepages.
2716         (main) [W32]: Implement
2717
2718         gpg: Collapse duplicate subkeys.
2719         + commit 633c1fea5f0dc4cb270c22ee41c24e1ec0706204
2720         * g10/options.h (IMPORT_COLLAPSE_UIDS): New.
2721         (IMPORT_COLLAPSE_SUBKEYS): New.
2722         * g10/gpg.c (main): Make them the default.
2723         * g10/import.c (parse_import_options): New import options
2724         "no-collapse-uids" and "no-collapse_subkeys".
2725         (collapse_subkeys): New.
2726         (import_one_real): Collapse subkeys and allow disabling the collapsing
2727         using the new options.
2728         (read_key_from_file_or_buffer): Always collapse subkeys.
2729         * g10/keyedit.c (fix_keyblock): Call collapse_subkeys.
2730
2731 2020-08-21  Werner Koch  <wk@gnupg.org>
2732
2733         gpgtar,w32: Handle Unicode file names.
2734         + commit 34e7703a962809921e83770f20f3eb66599265d1
2735         * tools/gpgtar.c (oUtf8Strings): New.
2736         (opts): Add option --utf8-strings.
2737         (parse_arguments): Set option.
2738         * tools/gpgtar.h (opt): Add field utf8strings.
2739         * tools/gpgtar-create.c (name_to_utf8): New.
2740         (fillup_entry_w32): Use that.
2741         (scan_directory): Ditto.
2742         (scan_directory) [W32]: Convert file name to utf8.
2743         (gpgtar_create): Convert pattern.
2744
2745         common: Use gpgrt functions for mkdir and chdir.
2746         + commit eec70e539e44c288068f26f190d52a5718fd3a10
2747         * common/sysutils.c (gnupg_mkdir): Divert to gpgrt_mkdir.
2748         (gnupg_chdir): Divert to gpgrt_chdir
2749
2750         common,w32: Do not assume the ANSI code during string conversion.
2751         + commit 5305ce17ff7a68ecc88c5ae8c4bec5897df6322f
2752         * common/utf8conv.c (get_w32_codepage): New.
2753         (wchar_to_native): Use instead oc CP_ACP.
2754         (native_to_wchar): Ditto.
2755
2756         common: Strip trailing CR,LF from w32_strerror.
2757         + commit 33fd55ca6f3efc50c260469179788e9f725ddc58
2758         * common/stringhelp.c (w32_strerror): Strip trailing CR,LF.
2759         * common/iobuf.c (iobuf_get_filelength): Use -1 and not 0 for the
2760         arg to w32_strerror.
2761
2762 2020-08-20  Werner Koch  <wk@gnupg.org>
2763
2764         gpgtar: Make --files-from and --null work as described.
2765         + commit e276f63e4a80e8d1cb1ba5621cedaeb0ccda956d
2766         * tools/gpgtar-create.c (gpgtar_create): Add args files_from and
2767         null_names.  Improve reading from a file.
2768         * tools/gpgtar.c: Make global vars static.
2769         (main): Remove tests for --files-from and --null option combinations.
2770         Pass option variables to gpgtar_create.
2771
2772         build: New configure option --disable-tests.
2773         + commit 32aac55875f324f8c3d85dad8483604eae65e3e8
2774         * configure.ac: Add option --disable-tests.  Print warnings in the
2775         summary.
2776         (DISABLE_TESTS): New am_conditional.
2777
2778         gpg: Fix regression for non-default --passphrase-repeat option.
2779         + commit b8c4dd902df34faa4d23efb2bb4ac222c8bbdbdb
2780         * agent/command.c (cmd_get_passphrase): Take care of --repeat with
2781         --newsymkey.
2782
2783 2020-08-19  Werner Koch  <wk@gnupg.org>
2784
2785         gpg,gpgsm: Record the creation time of a private key.
2786         + commit 4031c42bfd0135874a5b362df175de93a19f1b51
2787         * sm/call-agent.c (gpgsm_agent_genkey): Pass --timestamp option.
2788         (gpgsm_agent_import_key): Ditto.
2789         * g10/call-agent.c (agent_genkey): Add arg timestamp and pass it on.
2790         (agent_import_key): Ditto.
2791         * g10/import.c (transfer_secret_keys): Pass the creation date to the
2792         agent.
2793         * g10/keygen.c (common_gen): Ditto.
2794
2795 2020-08-19  NIIBE Yutaka  <gniibe@fsij.org>
2796
2797         gpg: Fix condition of string_to_aead_algo.
2798         + commit 1d66b518ca83e8d315283682b1e504f1e171a0b1
2799         * g10/misc.c (string_to_aead_algo): Only compare if not NULL.
2800
2801         dns: Fix memory use-after-free.
2802         + commit cc0d53905ce9306b51bace2682ae3d1d122c7881
2803         * dirmngr/dns.c (dns_res_stub): Fix RESCONF usage.
2804
2805         common: Fix iobuf.c.
2806         + commit f58d441bee7e93e6344f833acc1412b3be2f6818
2807         * common/iobuf.c (iobuf_cancel): Initialize DUMMY.
2808         (do_iobuf_fdopen): Initialize LEN.
2809         (iobuf_read_line): Fix the loop condition.
2810
2811         Silence compiler warnings.
2812         + commit f3e424d4e7273e60e69747ca4936149af7b6482a
2813         * common/openpgp-oid.c (map_openpgp_pk_to_gcry): Use cast for enum
2814         conversion.
2815         * dirmngr/dns-stuff.c (get_dns_srv): Use explicit conversion from
2816         int to float.
2817         * sm/gpgsm.c (parse_keyserver_line): Initialize ERR.
2818
2819         scd: Fix possible uninitialized variables.
2820         + commit 4fa0a65676a29cb53ee242caf13c393f7573c9a3
2821         * scd/app-openpgp.c (do_change_pin): Initialize resultlen2.
2822         (do_change_pin): Don't call wipe_and_free on the error path.
2823         Initialize bufferlen2.
2824
2825 2020-08-17  Werner Koch  <wk@gnupg.org>
2826
2827         agent: Allow to pass a timestamp to genkey and import.
2828         + commit 0da923a1240ac78d60c92cdd8488c4e405c3243b
2829         * agent/command.c (cmd_genkey): Add option --timestamp.
2830         (cmd_import_key): Ditto.
2831         * agent/genkey.c (store_key): Add arg timestamp and change callers.
2832         (agent_genkey): Ditto.
2833         * agent/findkey.c (write_extended_private_key): Add args timestamp and
2834         new key to write a Created line.
2835         (agent_write_private_key): Add arg timestamp.
2836         (agent_write_shadow_key): Ditto.
2837          agent/protect-tool.c (agent_write_private_key): Ditto as dummy arg.
2838
2839 2020-08-14  Werner Koch  <wk@gnupg.org>
2840
2841         Add --chuid to gpg, gpg-card, and gpg-connect-agent.
2842         + commit 6bcb609e1b2a507caa2e1a078178709d808b590b
2843         * g10/gpg.c (oChUid): New.
2844         (opts): Add --chuid.
2845         (main): Implement --chuid.  Delay setting of homedir until the new
2846         chuid is done.
2847         * sm/gpgsm.c (main): Delay setting of homedir until the new chuid is
2848         done.
2849         * tools/gpg-card.c (oChUid): New.
2850         (opts): Add --chuid.
2851         (changeuser): New helper var.
2852         (main): Implement --chuid.
2853         * tools/gpg-connect-agent.c (oChUid): New.
2854         (opts): Add --chuid.
2855         (main): Implement --chuid.
2856
2857 2020-08-13  Werner Koch  <wk@gnupg.org>
2858
2859         gpg: Ignore personal_digest_prefs for ECDSA keys.
2860         + commit 53d84f98157070f24dc861f1a75980474d074ddb
2861         * g10/sign.c (hash_for): Simplify hash algo selection for ECDSA.
2862
2863 2020-08-12  Werner Koch  <wk@gnupg.org>
2864
2865         scd: Log info about CCIDs with permission problems.
2866         + commit 2af884c64354182b1903d7a77df07e877f5ed7ba
2867         * scd/apdu.c (open_ccid_reader): Add arg r_cciderr.
2868         (apdu_open_reader): Print a note on EPERM of the USB device.
2869
2870         scd: Map some error codes from libusb to ccid-driver error codes.
2871         + commit 9a8d7e41bba1926158a21ebdda542241493ef983
2872         * scd/ccid-driver.h (CCID_DRIVER_ERR_USB_*): New error codes.
2873         * scd/apdu.h: New SW_HOST error codes.
2874         * scd/apdu.c (host_sw_string): Print them
2875         * scd/ccid-driver.c (map_libusb_error): New.
2876         (ccid_open_usb_reader, bulk_in, abort_cmd): Map libusb error codes.
2877         * scd/iso7816.c (map_sw): Map new codes to gpg-error.
2878
2879         common: Pass the WAYLAND_DISPLAY envvar along.
2880         + commit 3944430ffeaa032719fd82f8eaa118b3f326b8ed
2881         * common/session-env.c (stdenvnames): Add WAYLAND_DISPLAY.
2882
2883 2020-08-10  Werner Koch  <wk@gnupg.org>
2884
2885         scd:piv: Allow signing using PSS.
2886         + commit cbf203801e021e0f4d4143ecc92296ae7d0f0dd7
2887         * scd/app-piv.c (do_sign): Allow for PSS.
2888
2889         agent: Add option --pss to pksign to be used by smartcards.
2890         + commit bb096905b9ee1f5175efee1ab6c98045a26a2678
2891         * agent/command.c (cmd_sethash): Add option --pss and allow for
2892         --hash=null.
2893         * agent/agent.h (struct server_control_s): Add digest.is_pss and
2894         zero where needed.
2895         * agent/pksign.c (agent_pksign_do): Allow for PSS with cards.
2896         * scd/command.c (cmd_pksign): Add for --hash=none.
2897
2898 2020-08-07  NIIBE Yutaka  <gniibe@fsij.org>
2899
2900         gpg: Fix trustdb for v5key.
2901         + commit 373c975859a55f942276d6078f27ee33570bf2d5
2902         * g10/keydb.h (fpr20_from_pk): New.
2903         * g10/keyid.c (fpr20_from_pk): New.
2904         * g10/tdbio.c (tdbio_search_trust_byfpr): Use fpr20_from_pk.
2905         * g10/trustdb.c (keyid_from_fpr20): New.
2906         (verify_own_keys): Use keyid_from_fpr20.
2907         (tdb_update_ownertrust): Use fpr20_from_pk.
2908         (update_min_ownertrust): Likewise.
2909         (update_validity): Likewise.
2910
2911         gpg: Fix short key ID for v5key.
2912         + commit 20982bbd7539d2032f4d6249a2654c245445521d
2913         * g10/keyid.c (keyid_from_pk): Return keyid[0] for v5key.
2914         * g10/keyring.c (keyring_search): Handle short key ID for v5key.
2915
2916 2020-08-06  Werner Koch  <wk@gnupg.org>
2917
2918         gpgsm: New option --chuid.
2919         + commit 646a30fd394a739ef653556b1a7b2eeebda95951
2920         * sm/gpgsm.c (oChUid, opts): New option --chuid.
2921         (main): Implement option.
2922
2923         gpgconf: New option --chuid.
2924         + commit d10f45184c4482036c41f4818c84c0725a0c2c94
2925         * tools/gpgconf.c (oChUid, opts): New option --chuid.
2926         (main): Implement.
2927
2928         common: New helper function gnupg_chuid.
2929         + commit 8ff00ef0de871ca43076b00df4871c3165ced001
2930         * common/sysutils.c (try_set_envvar): New.
2931         (gnupg_chuid): New.
2932
2933 2020-08-06  NIIBE Yutaka  <gniibe@fsij.org>
2934
2935         kbx: Support v5key for short kid and long kid.
2936         + commit df531848a9618131921d584baba81c128f94de68
2937         * kbx/keybox-search.c (has_short_kid): Support v5key.
2938         (has_long_kid): Likewise.
2939
2940 2020-08-05  Werner Koch  <wk@gnupg.org>
2941
2942         gpg: Add level 16 to --gen-random.
2943         + commit d847f0651ab4304129145b55353501636b4e4728
2944         * g10/gpg.c (main): Add that hack.
2945
2946 2020-08-04  Werner Koch  <wk@gnupg.org>
2947
2948         sm: Also show the SHA-256 fingerprint.
2949         + commit e7d70923901eeb6a2c26445aee9db7e78f6f7f3a
2950         * sm/keylist.c (list_cert_colon): Emit a new "fp2" record.
2951         (list_cert_raw): Print the SHA2 fingerprint.
2952         (list_cert_std): Ditto.
2953
2954 2020-08-03  NIIBE Yutaka  <gniibe@fsij.org>
2955
2956         w32: Fix cast from intptr_t of _get_osfhandle.
2957         + commit 8e04cf969e95ccaa31bbaa7333938af1ea7476c6
2958         * common/exectool.c (gnupg_exec_tool_stream): Cast to unsigned long.
2959
2960 2020-07-31  NIIBE Yutaka  <gniibe@fsij.org>
2961
2962         agent: Fix coercion for pinentry_pid handling.
2963         + commit da3a4c54a8ce8a7dc442c70bda9b7eda22d43e57
2964         * agent/call-pinentry.c (start_pinentry): Don't use pid_t.
2965
2966         scd: Silence compiler warning.
2967         + commit 2a34a2afea5fcb5f4ed206afa110650db3dd7ef0
2968         * scd/app-openpgp.c (build_ecc_privkey_template): Fix allocation size.
2969
2970 2020-07-30  NIIBE Yutaka  <gniibe@fsij.org>
2971
2972         w32: Add NETLIBS for sm/t-minip12.
2973         + commit c1f81eb9fc2544a417ebc2ce19b04541525da684
2974         * sm/Makefile.am (t_minip12_LDADD): Add NETLIBS.
2975
2976         w32: More adding NETLIBS.
2977         + commit 5fa4427419c875e46d051ae6ed376d5ad6037401
2978         * common/Makefile.am (t_common_ldadd): Add $(NETLIBS).
2979
2980         w32: Add link to $(NETLIB) for -lws2_32.
2981         + commit d69f5570ee5e1b099e39fdf64e18add23ff5c815
2982         * dirmngr/Makefile.am (dirmngr_LDADD): Add $(NETLIBS).
2983         * sm/Makefile.am (gpgsm_LDADD): Ditto.
2984         * tools/Makefile.am (gpg_wks_client_LDADD): Ditto.
2985
2986 2020-07-27  NIIBE Yutaka  <gniibe@fsij.org>
2987
2988         kbx: Fix short KID and long KID handling for FPR32.
2989         + commit fa4a2bd7a1ba8d4bda5f9cec0826104f50142d4f
2990         * kbx/keybox-search.c (blob_cmp_fpr_part): For FPR32, it's
2991         the first part in the fingerprint.
2992
2993 2020-07-17  NIIBE Yutaka  <gniibe@fsij.org>
2994
2995         scd: Fix closing reader and reeleasing context in PC/SC.
2996         + commit daa2cec6a543f06a2e408d97a80a5041027f16a9
2997         * scd/apdu.c (close_pcsc_reader): Unlock the reader_table_lock.
2998         (apdu_dev_list_finish): Release the context when no readers.
2999
3000         Use gpgrt's new option parser for symcryptrun.
3001         + commit f484ac2b2d2ea176db1a70d961a778180147d9b2
3002         * tools/symcryptrun.c: Follow API change of the new option parser.
3003
3004         scd: PC/SC: Don't release the context when it's in use.
3005         + commit 46d185f60397f68830bfdfb99627b29aea5016f1
3006         * scd/apdu.c (close_pcsc_reader): Check if it's not in the loop.
3007
3008         gpg-card: Fix type of historyname.
3009         + commit 43000b0434b47a72608b41d67054ba42db21b699
3010         * tools/gpg-card.c (interactive_loop): Remove const qualifier.
3011
3012 2020-07-16  Werner Koch  <wk@gnupg.org>
3013
3014         gpg: Do not close stdout after --export-ssh-key.
3015         + commit 5c514a274ca8ac6be875818237e2e1bbc0c6a2a5
3016         * g10/export.c (export_ssh_key): Do not close stdout.
3017
3018 2020-07-16  NIIBE Yutaka  <gniibe@fsij.org>
3019
3020         common: Avoid undefined behavior of left shift operator.
3021         + commit 8abf065307ff4a7ea873fe59f76173bf17dac241
3022         * common/iobuf.c (block_filter): Handle an error earlier.
3023         Make sure it's unsigned.
3024
3025 2020-07-15  NIIBE Yutaka  <gniibe@fsij.org>
3026
3027         regexp: Import change from JimTcl.
3028         + commit 91cb46d948db234be1ea8092f5db9e14294f1b79
3029         * regexp/jimregexp.h, regexp/jimregexp.c: Fix from JimTcl.
3030
3031 2020-07-14  Werner Koch  <wk@gnupg.org>
3032
3033         agent: Fix regression with --newsymkey in loopback mode.
3034         + commit 0a6af6dc12998ef7b19673ad05d11e82f826de9d
3035         * agent/command.c (cmd_get_passphrase): Never repeat in loopback mode;
3036         same as with !OPT_NEWSYMKEY.
3037
3038 2020-07-13  NIIBE Yutaka  <gniibe@fsij.org>
3039
3040         dirmngr: Handle EAFNOSUPPORT at connect_server.
3041         + commit 109d16e8f644da97ed9c00e6f9010a53097f587a
3042         * dirmngr/http.c (connect_server): Skip server with EAFNOSUPPORT.
3043
3044 2020-07-10  NIIBE Yutaka  <gniibe@fsij.org>
3045
3046         gpg: For decryption, support use of a key with no 'encrypt' usage.
3047         + commit 31ae0718ba10c3b1b670ba6131b4995de24aa7a1
3048         * g10/pubkey-enc.c (get_session_key): Don't skip at no PUBKEY_USAGE_ENC.
3049         Emit information the key has no 'encrypt' usage.
3050
3051 2020-07-08  Werner Koch  <wk@gnupg.org>
3052
3053         Do not use the pinentry's qualitybar.
3054         + commit 999d25d47d45a0f594c84d51c041da0b24d68c5d
3055         * agent/genkey.c (agent_ask_new_passphrase): No qualitybar.
3056         * g10/call-agent.c (agent_get_passphrase): Ditto.
3057         * sm/call-agent.c (gpgsm_agent_ask_passphrase): Ditto.
3058
3059         gpg: Use integrated passphrase repeat entry also for -c.
3060         + commit a6a4bbf6debd925a23c22eea86a562f061fdfe6c
3061         * g10/call-agent.c (agent_get_passphrase): Add arg newsymkey.
3062         * g10/passphrase.c (passphrase_get): Add arg newsymkey.
3063         (passphrase_to_dek): Pass it on.
3064
3065         agent: New option --newsymkey for GET_PASSPHRASE.
3066         + commit eace4bbe1ded8b01f9ad52ebc1871f2fd13c3a08
3067         * agent/call-pinentry.c (agent_get_passphrase): Add arg pininfo.
3068         * agent/genkey.c (check_passphrase_constraints): New arg no_empty.
3069         * agent/command.c (reenter_passphrase_cmp_cb): New.
3070         (cmd_get_passphrase): Add option --newsymkey.
3071
3072 2020-07-07  Werner Koch  <wk@gnupg.org>
3073
3074         gpg: Fix flaw in symmetric algorithm selection in mixed mode.
3075         + commit 6864bba78e76a1ff72aec140ae9f4e752454c463
3076         * g10/encrypt.c (setup_symkey): Use default_cipher_algo function
3077         instead of the fallback s2k_cipher_algo.  Fix error code.
3078         (encrypt_simple): Use setup_symkey.
3079
3080 2020-07-03  Werner Koch  <wk@gnupg.org>
3081
3082         sm: Exclude rsaPSS from de-vs compliance mode.
3083         + commit 969abcf40cdfc65f3ee859c5e62889e1a8ccde91
3084         * common/compliance.h (PK_ALGO_FLAG_RSAPSS): New.
3085         * common/compliance.c (gnupg_pk_is_compliant): Add arg alog_flags and
3086         test rsaPSS.  Adjust all callers.
3087         (gnupg_pk_is_allowed): Ditto.
3088         * sm/misc.c (gpgsm_ksba_cms_get_sig_val): New wrapper function.
3089         (gpgsm_get_hash_algo_from_sigval): New.
3090         * sm/certcheck.c (gpgsm_check_cms_signature): Change type of sigval
3091         arg.  Add arg pkalgoflags.  Use the PK_ALGO_FLAG_RSAPSS.
3092         * sm/verify.c (gpgsm_verify): Use the new wrapper and new fucntion to
3093         also get the algo flags.  Pass algo flags along.
3094
3095 2020-07-02  Werner Koch  <wk@gnupg.org>
3096
3097         scd:nks: Implement writecert for the Signature card v2.
3098         + commit c1663c690b29d2dea8bc782c42de5eca08a24cc9
3099         * scd/iso7816.c (CMD_UPDATE_BINARY): New.
3100         (iso7816_update_binary): New.
3101         * scd/app-nks.c (do_deinit): Factor some code out to...
3102         (flush_fid_cache): new.
3103         (do_writecert): New.
3104         (app_select_nks): Register new handler.
3105
3106         dirmngr: Silence annoying warning for missing default ldap server file.
3107         + commit f55a05a69ba07eb2ed354a9275e71e94c5e362aa
3108         * dirmngr/dirmngr.c (parse_ldapserver_file): Add arg ignore_enoent.
3109         (main): Use that arg for the default file.
3110
3111         Support a history file in gpg-card and gpg-connect-agent.
3112         + commit d70b8769c888f42896ae3ef4972bf82e9b5a0c32
3113         * common/gpgrlhelp.c (read_write_history): New.
3114         (gnupg_rl_initialize): Register new function.
3115         * common/ttyio.c (my_rl_rw_history): New var.
3116         (tty_private_set_rl_hooks): Add arg read_write_history.
3117         (tty_read_history): New.
3118         (tty_write_history): New.
3119         * tools/gpg-card.c (HISTORYNAME): New.
3120         (oNoHistory): New enum value.
3121         (opts): New option --no-history.
3122         (cmd_history): New.
3123         (cmds): New command "history".
3124         (interactive_loop): Read and save the history.
3125         * tools/gpg-connect-agent.c (HISTORYNAME): New.
3126         (opts): New option --no-history.
3127         (main): Read and save the history.  New command /history.
3128
3129 2020-06-30  Werner Koch  <wk@gnupg.org>
3130
3131         scd:nks: Fix certificate read problem with TCOS signature card v2.
3132         + commit 07aef873ebc77241e9a2be225537319f6fc15a41
3133         * scd/app-nks.c (filelist): Add a dedicated key entry for ESIGN.
3134         (do_readcert): Test for the app_id.
3135
3136         scd: Change how the removed card flag is set.
3137         + commit 58b091df831f61c8d3551114f2480d36e73de2da
3138         * scd/command.c (cmd_serialno): Set/clear card removed flags for all
3139         connections using the current card.
3140
3141         card: Better detect removed cards.  Add TCOS PIN menu.
3142         + commit fb10b6cba43f4ed8675093ac25f461de4dacdce9
3143         * tools/card-call-scd.c (scd_change_pin): Add arg 'nullpin'.
3144         * tools/gpg-card.h (struct card_info_s): Add field 'card_removed'.
3145         * tools/gpg-card.c (fixup_scd_errors): New.
3146         (maybe_set_card_removed): New.
3147         (list_one_kinfo): Change type of first arg to get access to INFO.  Set
3148         card_removed flag.
3149         (list_all_kinfo): Improve label alignment.
3150         (cmd_list): Check that the current card is still available.
3151         (cmd_passwd): Add option --nullpin and menu to chnage TCOS PINs.
3152         (dispatch_command): Handle card_removed flag.
3153         (interactive_loop): Ditto.
3154
3155 2020-06-30  NIIBE Yutaka  <gniibe@fsij.org>
3156
3157         ecc: Support Ed448/X448 key generation.
3158         + commit 45398518fb76e2b859d2d48cf4cdbc11fbbda4fa
3159         * g10/keygen.c (ask_curve): Support Ed448/X448 keys.
3160         (generate_keypair): Support switch to X448 key.
3161
3162 2020-06-29  Werner Koch  <wk@gnupg.org>
3163
3164         scd: Shorten cardio debug output for all zeroes.
3165         + commit 9b6f574928546e6905a92c3e74d72478f1585c66
3166         * scd/apdu.c (all_zero_p): New.
3167         (send_le): Use it.
3168
3169         sm: Fix regression in Friday's commit.
3170         + commit 4f1c257c03667497d642930884b65c4f2245adbd
3171         * sm/gpgsm.c (main): Set ERR also for encrypt.
3172
3173 2020-06-26  Werner Koch  <wk@gnupg.org>
3174
3175         sm: Try not to output a partial new message after an error.
3176         + commit ccbb0cfeefed096a9841b6557d10eef12d55b721
3177         * sm/gpgsm.c (main) <aSign,aEncr>:  Uses gpgrt_fcancel on error.
3178
3179         sm: Print the serial number of a cert also in decimal.
3180         + commit 208a90197317fb9746ecf54a1d14acbeeddfbd18
3181         * sm/certdump.c: Include membuf.h.
3182         (gpgsm_print_serial_decimal): New.
3183         * sm/keylist.c (list_cert_raw): Print s/n also in decimal
3184         (list_cert_std): Ditto.
3185
3186 2020-06-25  Werner Koch  <wk@gnupg.org>
3187
3188         scd:nks: Fix remaining tries warning in --reset mode.
3189         + commit 2429e8559844e27de478d7e90834a714b3748834
3190         * scd/app-nks.c (do_change_pin): Chnage computaion of 'remaining'.
3191
3192         card: Add  password change menu for NKS cards.
3193         + commit 28c069db3bb5a1065de69bcc0435c8415df87e5b
3194         * tools/gpg-card.c (cmd_passwd): Add menu for NKS.  Add option
3195         --reset.
3196
3197         sm: Fix support verification of nistp521 signatures.
3198         + commit 17a25c14f1ed1199898ad618c17204eafd5524c1
3199         * sm/certcheck.c (do_encode_md): Fix obvious bug.
3200
3201 2020-06-24  James Bottomley  <James.Bottomley@HansenPartnership.com>
3202             Werner Koch  <wk@gnupg.org>
3203
3204         agent: separate out daemon handling infrastructure for reuse.
3205         + commit f541e1d95a91d4764c7ed0df10c293bfd493dd41
3206         * agent/call-scd.c: Factor re-usable code out to ...
3207         * agent/call-daemon.c: new.  Store infos in an array to allow for
3208         other backend daemons.
3209         * agent/Makefile.am (gpg_agent_SOURCES): Add new file.
3210         * agent/agent.h: Include assuan.h.
3211         (enum daemon_type): New.
3212         (opt): Replace scdaemon_program by daemon_program array.  Replace
3213         scd_local by a array d_local.  Change users accordingly.
3214
3215 2020-06-24  Werner Koch  <wk@gnupg.org>
3216
3217         gpgconf: Fix regression in --launch and --kill from March.
3218         + commit 2d8f060679bafed27909a5ad54b7f74a9f8dd51b
3219         * tools/gpgconf.h (gc_component_id_t): Align order with gc_component
3220         array.
3221
3222 2020-06-24  NIIBE Yutaka  <gniibe@fsij.org>
3223
3224         gpg,agent: Support Ed448 signing.
3225         + commit a763bb2580b0d586a80b8ccd3654f41e49604f4f
3226         * agent/pksign.c (do_encode_eddsa): First argument is NBITs,
3227         so that it can support Ed448, as well as Ed25519.
3228         (agent_pksign_do): Follow the change.
3229         * agent/sexp-secret.c (fixup_when_ecc_private_key): No fix-up needed
3230         for Ed448, it's only for classic curves.
3231         * common/openpgp-oid.c (oidtable): Add Ed448.
3232         * common/sexputil.c (get_pk_algo_from_key): Ed448 is only for EdDSA.
3233         * g10/export.c (match_curve_skey_pk): Ed448 is for EdDSA.
3234         * g10/keygen.c (gen_ecc): Support Ed448 with the name of "ed448".
3235         (ask_algo, parse_key_parameter_part): Handle "ed448".
3236         * g10/pkglue.c (pk_verify): Support Ed448.
3237         (pk_check_secret_key): Support Ed448.
3238         * g10/sign.c (hash_for): Defaults to SHA512 for Ed448.
3239         (make_keysig_packet): Likewise.
3240
3241 2020-06-23  NIIBE Yutaka  <gniibe@fsij.org>
3242
3243         ecc: Use "cv448" to specify key using X448.
3244         + commit c94eea15d6847c08d2d9ff1c7608953f25fea67d
3245         * common/openpgp-oid.c (oidtable): Use "cv448".
3246         (oid_cv448): Rename from oid_x448.
3247         (openpgp_oidbuf_is_cv448, openpgp_oid_is_cv448): Likewise.
3248         * common/util.h (openpgp_oid_is_cv448): Follow the change.
3249         * g10/ecdh.c (pk_ecdh_generate_ephemeral_key): Likewise.
3250         * g10/keygen.c (gen_ecc, ask_algo): Use "cv448".
3251         (parse_key_parameter_part): Likewise.
3252         * g10/pkglue.c (get_data_from_sexp): Fix for debug output.
3253
3254 2020-06-19  NIIBE Yutaka  <gniibe@fsij.org>
3255
3256         agent: Use get_pk_algo_from_key.
3257         + commit 4bdade5b0bea1816a2479c73abc71b41f09ba727
3258         * agent/findkey.c (key_parms_from_sexp, is_eddsa): Remove.
3259         (agent_pk_get_algo): Remove.
3260         * agent/pksign.c (agent_pksign_do): Use get_pk_algo_from_key.
3261
3262         agent: Clean up for getting info from SEXP.
3263         + commit d2e4aa5ee4c5128547cc45c2e1ac35fdc5c00f45
3264         * agent/agent.h (agent_is_dsa_key, agent_is_eddsa_key): Remove.
3265         (agent_pk_get_algo): New.
3266         * agent/findkey.c (agent_pk_get_algo): New.
3267         * agent/pksign.c (do_encode_dsa): Use generic GCRY_PK_ECC.
3268         (agent_pksign_do): Use agent_pk_get_algo.
3269
3270         agent: A little clean up.
3271         + commit abc6a3100a33122ba3673b578a2b364a6b45d252
3272         * agent/findkey.c (agent_is_eddsa_key): Remove dead case.
3273
3274 2020-06-17  Werner Koch  <wk@gnupg.org>
3275
3276         agent: Fix regression in 'd' fixup code for shadowed keys.
3277         + commit d1e1c622d55e783ae5bf601249598f0da8d5e688
3278         * agent/sexp-secret.c (fixup_when_ecc_private_key): Ignore shadowed
3279         keys.
3280
3281         sm: Support verification of nistp521 signatures.
3282         + commit 596212e71abf33b30608348b782c093dace83110
3283         * sm/certcheck.c (do_encode_md): Take care of nistp521.
3284
3285 2020-06-09  Werner Koch  <wk@gnupg.org>
3286
3287         gpg: Fix for new SOS changes when used with Libgcrypt < 1.8.6.
3288         + commit eeb599c9e261586a664430058b7cfad7025a503f
3289         * g10/free-packet.c (is_mpi_copy_broken): New.
3290         (my_mpi_copy): Mix gcry_mpi_copy.
3291
3292         gpg: Extend the TRUST_ status lines.
3293         + commit 96f1ed5468002330ea21d9ad32ac3b464bb40b1a
3294         * g10/pkclist.c (write_trust_status): Add arg mbox.
3295         (check_signatures_trust): Appenmd mbox to the status lines.
3296
3297 2020-06-09  NIIBE Yutaka  <gniibe@fsij.org>
3298
3299         gpg: Use bytes for ECDH.
3300         + commit da5e0bc31b4c6f16ed5ff9b35063f3b03eb7ff16
3301         * g10/ecdh.c (extract_secret_x): Use byte * instead of MPI.
3302         (prepare_ecdh_with_shared_point): Use char * instead of MPI.
3303         (pk_ecdh_encrypt_with_shared_point): Likewise.
3304         (pk_ecdh_decrypt): Likewise.
3305         * g10/pkglue.h (pk_ecdh_encrypt_with_shared_point, pk_ecdh_decrypt):
3306         Change declaration.
3307         * g10/pkglue.c (get_data_from_sexp): New.
3308         (pk_encrypt): Use get_data_from_sexp instead of get_mpi_from_sexp.
3309         Follow the change of pk_ecdh_encrypt_with_shared_point.
3310         * g10/pubkey-enc.c (get_it): Follow the change of pk_ecdh_decrypt.
3311
3312         gpg: Add X448 support.
3313         + commit e9760eb9e70b9804c988dafe01851f6600869d9e
3314         * common/openpgp-oid.c (oidtable): Add X448.
3315         (oid_x448,openpgp_oidbuf_is_x448,openpgp_oid_is_x448): New.
3316         * common/util.h (openpgp_oid_is_x448): New.
3317         * g10/ecdh.c (gen_k): Add handling of opaque MPI and support
3318         endianness.
3319         (pk_ecdh_generate_ephemeral_key): X448 requires opaque MPI.
3320         * g10/keygen.c (gen_ecc): Add support for X448.
3321         (ask_algo, parse_key_parameter_part): Likewise.
3322
3323         gpg,ecc: Handle external representation as SOS with opaque MPI.
3324         + commit f5bc94555458123f93d8b07816a68fb7485421e1
3325         * g10/pkglue.h (sexp_extract_param_sos): New.
3326         * g10/build-packet.c (sos_write): New.
3327         (do_key, do_pubkey_enc, do_signature): Use sos_write for ECC.
3328         * g10/export.c (cleartext_secret_key_to_openpgp): Use
3329         sexp_extract_param_sos.
3330         (transfer_format_to_openpgp): Use opaque MPI for ECC.
3331         * g10/keygen.c (ecckey_from_sexp): Use sexp_extract_param_sos.
3332         * g10/keyid.c (hash_public_key): Handle opaque MPI for SOS.
3333         * g10/parse-packet.c (sos_read): New.
3334         (parse_pubkeyenc,parse_signature,parse_key): Use sos_read for ECC.
3335         * g10/pkglue.c (sexp_extract_param_sos): New.
3336         (pk_verify): Handle opaque MPI for SOS.
3337         (pk_encrypt): Use sexp_extract_param_sos.
3338         * g10/seskey.c (encode_session_key): Use opaque MPI.
3339         * g10/sign.c (do_sign): Use sexp_extract_param_sos.
3340
3341 2020-06-08  Werner Koch  <wk@gnupg.org>
3342
3343         gpg: If possible TRUST values now depend on signer's UID or --sender.
3344         + commit 5c2080f4670a768787f5cb4ed5c32e0946837883
3345         * g10/mainproc.c (check_sig_and_print): Add failsafe check for PK.
3346         Pass KEYBLOCK down do check_signatures_trust.  Protect existsing error
3347         ocde in case the signature expired.
3348         * g10/pkclist.c (is_in_sender_list): New.
3349         (check_signatures_trust): Add args keyblock and pk.  Add new uid based
3350         checking code.
3351         * g10/test-stubs.c, g10/gpgv.c: Adjust stubs.
3352
3353 2020-06-08  NIIBE Yutaka  <gniibe@fsij.org>
3354
3355         agent: Fix the condition to detect leading 0x00 problem.
3356         + commit e2e5736842299ebfb8263b674d5cbfb9b784d70f
3357         * agent/sexp-secret.c (fixup_when_ecc_private_key): Use curve name
3358         to identify the issue.
3359
3360 2020-06-05  NIIBE Yutaka  <gniibe@fsij.org>
3361
3362         agent,ecc: Use of opaque MPI for ECC, fixup 'd'.
3363         + commit 47c1c329ed823a562185f86e98ac903605104f11
3364         * agent/Makefile.am: Add sexp-secret.c.
3365         * agent/agent.h: New function declarations.
3366         * agent/sexp-secret.c: New.
3367         * agent/findkey.c (agent_key_from_file): Use sexp_sscan_private_key.
3368         * agent/protect-tool.c (read_and_unprotect): Fix up private part,
3369         calling fixup_when_ecc_private_key.
3370
3371         agent: For ECC, use opaque MPI for key representation.
3372         + commit 2b118516240b4bddd34c68c23a99bea56682a509
3373         * agent/cvt-openpgp.c (scan_pgp_format): New with SOS support.
3374         (do_unprotect): Use scan_pgp_format, handle opaque MPI for ECC.
3375         (convert_from_openpgp_main): Use opaque MPI for ECC.
3376         (apply_protection): Set GCRYMPI_FLAG_USER1 flag for encrypted secret.
3377         (extract_private_key): Use "/qd" for ECC, opaque MPI.
3378
3379         agent,ssh: Tighten condition for EdDSA.
3380         + commit a7d46c78e242e72f6ff681f6fe56ffc4dcb74a18
3381         * agent/command-ssh.c (ssh_key_to_blob): Prepare for non-prefixed
3382         point representation of EdDSA.
3383
3384         agent: Remove duplicated code for EdDSA.
3385         + commit 2e988546c59ba25bf9e63521112c0c3c73b012f1
3386         * agent/command-ssh.c (ssh_receive_key): Curve is "Ed25519".
3387         Use sexp_key_construct always.
3388
3389         agent: Clean up do_encode_md.
3390         + commit 4c0b12f817f15862111a01493aaadce943410ee9
3391         * agent/pksign.c (do_encode_md): Directly use sexp_build.
3392
3393 2020-06-03  Werner Koch  <wk@gnupg.org>
3394
3395         doc: Minor enhancement for reproducibility.
3396         + commit 074ab108e768b2f946d789c1f3a7f14a65e07c52
3397         * doc/Makefile.am (defsincdate): In no repo mode and with
3398         SOURCE_DATE_EPOCH set, use that instead of blanking the date.
3399
3400         card: Improve openpgp key writing in "writecert".
3401         + commit 4f6e0e12cbd3444b9e6ea5e4b92ea5b3072a3e17
3402         * tools/card-keys.c (struct export_key_status_parm_s): New.
3403         (export_key_status_cb): New.
3404         (get_minimal_openpgp_key): New.
3405         * tools/gpg-card.c (cmd_writecert): Allow writing a keyblock directly
3406         from an existing gpg key.
3407
3408         gpg: Improve generation of keys stored on card (brainpool,cv25519).
3409         + commit 48251cf9a7d3776667342f4705ac3de89bd75534
3410         * g10/keygen.c (ask_key_flags_with_mask): Allow more than ECDH for
3411         legacy curves.
3412         (ask_algo): Tweak mapping of ECC to OpenPGP algos
3413         (parse_key_parameter_part): Ditto.
3414         (generate_subkeypair): Create the subkey with the time stored on the
3415         card.
3416
3417         sm: Fix recently introduced regression in CSR creation.
3418         + commit 7558128e16d7fc20b9c40bf7e150ca08bbb4467f
3419         * sm/certreqgen.c (create_request): Also set SIGKEYLEN.
3420
3421 2020-05-29  NIIBE Yutaka  <gniibe@fsij.org>
3422
3423         scd: Fix condition for C5 data object for newer Yubikey.
3424         + commit f3df8dbb696fed192501fa7f741c2e0e0936a3d5
3425         * scd/app-openpgp.c (compare_fingerprint): Relax the condition.
3426
3427 2020-05-28  Werner Koch  <wk@gnupg.org>
3428
3429         card: Allow to store and retrieve keyblocks in OpenPGP cards.
3430         + commit 2d9592e78f4978307e378e07d6c170a28000a494
3431         * tools/gpg-card.c: Include tlv.h.
3432         (cmd_writecert): Add option --openpgp.
3433         (cmd_readcert): Ditto.
3434
3435         card: New command "apdu"
3436         + commit ed0759f39be04dd6108237f5ed03c7cfd1cb4642
3437         * tools/card-call-scd.c (scd_apdu): Add optional arg 'options'.
3438         * tools/gpg-card.c (cmd_apdu): New.
3439         (enum cmdids): Add cmdAPDU.
3440         (dispatch_command): Add command "apdu".
3441         (interactive_loop): Ditto.
3442
3443 2020-05-27  Werner Koch  <wk@gnupg.org>
3444
3445         card: Update card info after "generate".
3446         + commit 94d31660c6db22c3b539f440994d286f687c273f
3447         * tools/gpg-card.c (cmd_generate): Re-read the card on success.
3448
3449         scd:openpgp: New KEY-STATUS attribute.
3450         + commit 21496761226c1020a98e3ec7dd2b9dd013d4386b
3451         * scd/app-openpgp.c (do_getattr): Return KEY-STATUS
3452
3453         card: Add command "bye"
3454         + commit 08310849a28071fbca761fa4ca18702b39092947
3455         * tools/gpg-card.c: Add command "bye" as alias for "quit".
3456         * tools/gpg-connect-agent.c (main): Add "/quit" as alias for "/bye"
3457
3458         card: Take care of removed and re-inserted cards.
3459         + commit 46a3de4b5acb37274ddd132499a3243e1f92b506
3460         * tools/gpg-card.c (cmd_list): Take care of the need_sn_cmd flag.
3461         (cmd_factoryreset): Clear that flag.
3462         (dispatch_command): Set flag after a reset and after a
3463         CARD_NOT_PRESENT error.
3464
3465 2020-05-26  Werner Koch  <wk@gnupg.org>
3466
3467         card: Implement UID command and print capabilities.
3468         + commit c2a47475ba0f6bd1de80e92dd91949501256025e
3469         * tools/card-call-scd.c (learn_status_cb): Return the full value for
3470         UIF.  Add info about SM, MCL3, and PD.
3471         * tools/gpg-card.h (struct card_info_s): Add corresponding fields.
3472         * tools/gpg-card.c (list_openpgp): Print capabilities.  Print the
3473         permanent flag for UIF.
3474         (cmd_uif): Implement.
3475
3476         scd:openpgp: Add attribute "UIF" for convenience.
3477         + commit 11f0700282c1eeaee8db6686c38aca0900271351
3478         * scd/app-openpgp.c (do_getattr): New attrubute "UIF".
3479         (do_learn_status): Use that.
3480
3481         scd: Fix Yubikey app switching problem.
3482         + commit 20090886706e2af6723ca11e292272fc00cffe07
3483         * scd/app.c (select_all_additional_applications_internal): Re-select
3484         first app.  Add arg 'ctrl'.
3485
3486 2020-05-22  NIIBE Yutaka  <gniibe@fsij.org>
3487
3488         gpg: Clean up ECDH code path (5).
3489         + commit 510bda7d3754801be18a592694578589fe503fb8
3490         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Now, it's only for
3491         encrytion.
3492         (pk_ecdh_decrypt): Use prepare_ecdh_with_shared_point and move decrypt
3493         code path in original pk_ecdh_encrypt_with_shared_point here.
3494         * g10/pkglue.h (pk_ecdh_encrypt_with_shared_point): Change API.
3495         * g10/pkglue.c (pk_encrypt): Follow the change.
3496
3497         gpg: Clean up ECDH code path (4).
3498         + commit 64d93271bfce1968ebe61324b900875dbd6dd2eb
3499         * g10/ecdh.c (prepare_ecdh_with_shared_point): New.
3500         (pk_ecdh_encrypt_with_shared_point): Fixing error paths for closing
3501         the cipher handle, use prepare_ecdh_with_shared_point.
3502
3503         gpg: Clean up ECDH code path (3).
3504         + commit 80c02d13d9994abae9e67c3554528352c621cd9b
3505         * g10/ecdh.c (derive_kek): New.
3506         (pk_ecdh_encrypt_with_shared_point): Use derive_kek.
3507
3508         gpg: Clean up ECDH code path (2).
3509         + commit a973d9113840282468015eb26f07f2b32f977d70
3510         * g10/ecdh.c (build_kdf_params): New.
3511         (pk_ecdh_encrypt_with_shared_point): Use build_kdf_params, and check
3512         things before extract_secret_x.
3513
3514         gpg: Clean up ECDH code path (1).
3515         + commit 960d37644cbbe2a234352d0bc58095e2b0371eec
3516         * g10/ecdh.c (extract_secret_x): New.
3517         (pk_ecdh_encrypt_with_shared_point): Use extract_secret_x.
3518
3519 2020-05-20  NIIBE Yutaka  <gniibe@fsij.org>
3520
3521         dirmngr: dns: Fix allocation of string buffer in stack.
3522         + commit 30eef28bc0f5deaa1b4b7f04293a6527524280a9
3523         * dirmngr/dns.h (dns_strsection, dns_strclass)
3524         (dns_strtype): Change APIs.
3525         * dirmngr/dns.c (dns_p_lines): Use __dst for dns_strsection.
3526         (dns_rr_print): Use __dst for dns_strclass and dns_strtype.
3527         (dns_trace_dump): Likewise.
3528         (dns_ai_print): Use __dst for dns_strtype.
3529         (dns_strsection): Add an argument __dst for storage.
3530         (dns_strclass, dns_strtype): Likewise.
3531         (parse_packet): Use __dst for dns_strsection.
3532         (send_query): Use __dst for dns_strtype.
3533         (isection): Use __dst for dns_strsection.
3534         (iclass): Use __dst for dns_strclass.
3535         (itype): Use __dst for dns_strtype.
3536
3537 2020-05-19  Werner Koch  <wk@gnupg.org>
3538
3539         sm: Create ECC certificates with AKI and SKI by default.
3540         + commit 44676819f2873705b78849e7b2fd22214b691642
3541         * sm/certreqgen.c (create_request): Create AKI and SKI by default.
3542
3543         common: New function to extract Q from an ECC key.
3544         + commit 3cd9dac7e0976643c6e4b6537cf363b2b12d422f
3545         * common/sexputil.c (get_ecc_q_from_canon_sexp): New.
3546
3547 2020-05-18  Werner Koch  <wk@gnupg.org>
3548
3549         sm: Support creation of EdDSA certificates.
3550         + commit 6dc3846d78192e393be73c16c72750734a9174d1
3551         * sm/misc.c (transform_sigval): Support EdDSA.
3552         * sm/certreqgen.c (create_request): Support EdDSA cert creation.
3553         * sm/certcheck.c (gpgsm_check_cert_sig): Map some ECC algo OIDs to
3554         hash algos.
3555         * sm/call-agent.c (struct sethash_inq_parm_s): New.
3556         (sethash_inq_cb): New.
3557         (gpgsm_agent_pksign): Add mode to pass plain data for EdDSA.
3558
3559         agent: Allow to use SETHASH for arbitrary data.
3560         + commit b18fb0264abdb6cb0a99ba0ba941dc9a6e35f74a
3561         * agent/agent.h (struct server_control_s): Add field digest.data.
3562         * agent/gpg-agent.c (agent_deinit_default_ctrl): Free that field.
3563         * agent/command.c (reset_notify): Ditto.
3564         (start_command_handler): ditto.
3565         (cmd_sethash): Add new option --inquire.
3566         * agent/call-scd.c (agent_card_pksign): For now return an error if
3567         inquire mode was used.
3568         * agent/command-ssh.c (ssh_handler_sign_request): Make sure
3569         digest.data is cleared.
3570         * agent/divert-scd.c (divert_pksign): Implement inquire mode.
3571         * agent/pksign.c (agent_pksign_do): Ditto.
3572
3573 2020-05-13  Werner Koch  <wk@gnupg.org>
3574
3575         sm: Support import and verification of EdDSA certificates.
3576         + commit b1694987bb6484405d41d34046a5290176feadd0
3577         * sm/certdump.c (gpgsm_get_serial): New.
3578         * sm/certcheck.c (gpgsm_check_cert_sig): Support EdDSA signatures.
3579
3580 2020-05-11  Werner Koch  <wk@gnupg.org>
3581
3582         sm: Support signing using ECDSA.
3583         + commit f44d395bdfec464b1e2a0a1aef39561e6e48a45c
3584         * sm/gpgsm.h (struct certlist_s): Add helper field pk_algo.
3585         * sm/sign.c (gpgsm_sign): Store the public key algo.  Take the hash
3586         algo from the curve.  Improve diagnostic output in verbose mode.
3587
3588 2020-05-08  Werner Koch  <wk@gnupg.org>
3589
3590         sm: Allow decryption using dhSinglePass-stdDH-sha1kdf-scheme.
3591         + commit 68b857df13c8a4e6cae5e3a29fd065bf90764547
3592         * sm/decrypt.c (ecdh_decrypt): Support
3593         dhSinglePass-stdDH-sha1kdf-scheme.  Factor key derive code out to ...
3594         (ecdh_derive_kek): new global function.  Allow for hashs shorter than
3595         the key.
3596         (hash_ecc_cms_shared_info): Make file-only.
3597         * sm/encrypt.c (ecdh_encrypt): Replace derive code by a call to the
3598         new ecdh_derive_kek.  Add test code to create data using
3599         dhSinglePass-stdDH-sha1kdf-scheme.
3600         * sm/gpgsm.h (opt): Add member force_ecdh_sha1kdf.
3601         * sm/gpgsm.c: Add option --debug-force-ecdh-sha1kdf.
3602
3603         sm: Print algorithm infos in data decryption mode.
3604         + commit 439c9b5cb55044f13d4af6563f4e791093d510b0
3605         * common/sexputil.c (cipher_mode_to_string): New.
3606         * sm/decrypt.c (prepare_decryption): Show cipher algo and mode.
3607         (gpgsm_decrypt): Show key algo and fingerprint
3608
3609         sm: Cleanup the use of GCRY_PK_ECC and GCRY_PK_ECDSA.
3610         + commit 34b628db4618a8712536aea695f934b0286e7b18
3611         * common/sexputil.c (pubkey_algo_to_string): New.
3612         * sm/certcheck.c (do_encode_md): Replace GCRY_PK_ECDSA by GCRY_PK_ECC.
3613         * sm/certreqgen-ui.c (check_keygrip): Add all ECC algorithms.
3614         * sm/gpgsm.c (our_pk_test_algo): Also allow EdDSA.
3615         * sm/verify.c (gpgsm_verify): Map ECC algo to ECDSA.  Use new pubkey
3616         algo name function
3617
3618         sm: Improve readability of the data verification output.
3619         + commit a759fa963a42e0652134130029217270b6d5d00b
3620         * sm/verify.c (gpgsm_verify): Print the used algorithms.
3621
3622 2020-05-07  Werner Koch  <wk@gnupg.org>
3623
3624         card: Allow listing of NKS cards.
3625         + commit 94966347452632f8140fae70f7fcbadcc2b81071
3626         * tools/card-call-scd.c (learn_status_cb): Always fill chvinfo.
3627         * tools/gpg-card.h (struct card_info_s): Increase size of chvinfo and
3628         chvmaxlen.
3629         * tools/gpg-card.c (list_nks): New.
3630         (print_a_version): Support single part version numbers.
3631         (list_card): Call list_nks.
3632
3633         scd:nks: Add framework to support IDKey cards.
3634         + commit 1f6a39092fe4b5f02bc4741a0a23d102d30f4063
3635         * scd/app-nks.c (NKS_APP_IDLM): New.
3636         (struct app_local_s): Replace NKS_VERSION by the global APPVERSION.
3637         (do_learn_status): Always send CHV-STATUS.
3638         (find_fid_by_keyref): Basic support for IDLM only use.
3639         (do_learn_status_core): Ditto.
3640         (do_readcert): Ditto.
3641         (verify_pin): Ditto.
3642         (parse_pwidstr): Ditto.
3643         (do_with_keygrip): Ditto.
3644         (switch_application): Ditto.
3645         (app_select_nks): Fallback to IDLM.
3646
3647         scd:nks: Get the PIN prompts right for the Signature Card.
3648         + commit aecc008acb64ebbb6c667c4a128af4e61da57f84
3649         * scd/app-nks.c (get_dispserialno): Move more to the top.
3650         (do_getattr): Add $DISPSERIALNO and SERIALNO.  Make CHV-STATUS work
3651         with NKS15.
3652         (verify_pin): Use dedicated min. PIN lengths.
3653         (parse_pwidstr): Support NKS15
3654
3655         sm: Print the key types as standard key algorithm strings.
3656         + commit 5c29d25e6c7c0a5a63ab4c46d4624217307adb78
3657         * sm/fingerprint.c (gpgsm_get_key_algo_info): Factor code out to ...
3658         (gpgsm_get_key_algo_info2): new.
3659         (gpgsm_pubkey_algo_string): New.
3660         * sm/keylist.c (list_cert_colon): Put curve into field 17
3661         (list_cert_raw): Print the unified key algotithm string instead of the
3662         algo and size.
3663         (list_cert_std): Ditto.
3664
3665         scd:nks: Support decryption using ECDH.
3666         + commit af45d884aa1c3eccbc6972a2e5197ece3fd1987a
3667         * scd/app-nks.c (struct fid_cache_s): Add field 'algo'.
3668         (keygripstr_from_pk_file): Add arg 'r_algo' to return the algo.
3669         (find_fid_by_keyref): Ditto.
3670         (get_dispserialno): New.
3671         (make_prompt): New.
3672         (verify_pin): Provide better prompts.
3673         (do_decipher): Support ECDH.
3674         (parse_pwidstr): Add hack tospecify any pwid..
3675         (do_change_pin): Support Signature Card V2.0 (NKS15) style NullPIN.
3676         Provide a better prompt.
3677
3678         sm: Support decryption of ECDH data using a smartcard.
3679         + commit ee6d29f1797e06977ae3d2edae9edc1165c6f144
3680         * sm/decrypt.c (ecdh_decrypt): Add arg nbits and detect bare secret.
3681         (prepare_decryption): Add arg nbits and pass on.
3682         (gpgsm_decrypt): Pass size of curve to prepare_decryption.
3683
3684 2020-05-05  Werner Koch  <wk@gnupg.org>
3685
3686         scd: Extend an internal function to also return the algo.
3687         + commit 314859d7e7de5010ca1e9d90b83acf3bc8493631
3688         * scd/app-help.c (app_help_get_keygrip_string_pk): Add optional arg
3689         r_algo.  Change all callers.
3690         (app_help_get_keygrip_string): Ditto.
3691
3692 2020-05-04  Werner Koch  <wk@gnupg.org>
3693
3694         scd:nks: Add do_with_keygrip and implement a cache.
3695         + commit 1e72a1a218490c0fc07811a02ddad6cc38913f77
3696         * scd/app-nks.c (struct fid_cache_s): New.
3697         (struct app_local_s): Add field 'fid_cache'.
3698         (do_deinit): Release the cache.
3699         (keygripstr_from_pk_file): Implement the cache.
3700         (find_fid_by_keyref): New
3701         (do_sign, do_decipher): Use new function.
3702         (do_with_keygrip): New.
3703
3704         sm: Support encryption using ECDH keys.
3705         + commit d5051e31a8fc07c339253c6b82426e0d0115a20a
3706         * sm/decrypt.c (hash_ecc_cms_shared_info): Make global.
3707         * sm/encrypt.c (ecdh_encrypt): New.
3708         (encrypt_dek): Add arg PK_ALGO and support ECDH.
3709         (gpgsm_encrypt): Pass PK_ALGO.
3710
3711 2020-04-27  Werner Koch  <wk@gnupg.org>
3712
3713         sm: Add support to export ECC private keys.
3714         + commit 5da6925a334c68d736804d8f19a684a678409d99
3715         * sm/minip12.c [TEST]: Remove test code.  Include util.h, tlv.h. and
3716         openpgpdefs.h.  Remove the class and tag constants and replace them by
3717         those from tlv.h.
3718         (builder_add_oid, builder_add_mpi): New.
3719         (build_key_sequence): Rename to ...
3720         (build_rsa_key_sequence): this.
3721         (build_ecc_key_sequence): New.
3722         (p12_build): Call RSA or ECC builder.
3723         (p12_raw_build): Ditto.
3724         * sm/export.c (gpgsm_p12_export): Use correct armor header for ECC.
3725         (sexp_to_kparms): Support ECC.
3726
3727         * sm/t-minip12.c: New to replace the former TEST code in minip12.h.
3728
3729 2020-04-24  Werner Koch  <wk@gnupg.org>
3730
3731         common: Add an easy to use DER builder.
3732         + commit 5ea878274ef51c819368f021c69c518b9aef6f82
3733         * common/tlv-builder.c: New.
3734         * common/tlv.c: Remove stuff only used by GnuPG 1.
3735         (put_tlv_to_membuf, get_tlv_length): Move to ...
3736         * common/tlv-builder.c: here.
3737         * common/tlv.h (tlv_builder_t): New.
3738
3739 2020-04-23  Werner Koch  <wk@gnupg.org>
3740
3741         sm: Support decryption of ECDH data.
3742         + commit 95d83cf906177fe9f00e88ae42d4c118c7db4371
3743         * sm/decrypt.c: Include tlv.h.
3744         (string_from_gcry_buffer): New.
3745         (hash_ecc_cms_shared_info): New.
3746         (ecdh_decrypt): New.
3747         (prepare_decryption): Support ECDH.  Add arg pk_algo.
3748         (gpgsm_decrypt): Lift some variables from an inner code block.
3749
3750         common: Add functions to help create DER objects.
3751         + commit 5d015b38eb9f828acf522fa89e4944f3b343678c
3752         * common/tlv.c (put_tlv_to_membuf): New.
3753         (get_tlv_length): New.
3754         * common/tlv.h: Include membuf.h.
3755
3756 2020-04-21  Werner Koch  <wk@gnupg.org>
3757
3758         sm: Support import of PKCS#12 encoded ECC private keys.
3759         + commit 8dfef5197af9f655697e0095c6613137d51c91e7
3760         * sm/minip12.c: Include ksba.h.
3761         (oid_pcPublicKey): New const.
3762         (parse_bag_data): Add arg 'r-curve'.  Support parsing of ECC private
3763         keys.
3764         (p12_parse): Add arg 'r_curve'.
3765         * sm/import.c (parse_p12): Support ECC import.
3766
3767 2020-04-17  Werner Koch  <wk@gnupg.org>
3768
3769         scd:nks: Allow retrieving certificates from a Signature Card v.20.
3770         + commit f05a32e5c9db7d0840c74fccc350a9e0ff5fb819
3771         * scd/app-nks.c: Major rework to support non-RSA cards.
3772
3773         scd: Detect missing card in "getinfo all_active_apps".
3774         + commit 3633ca6e21f7feb97b6690025614575bb6909f8b
3775         * scd/app.c (send_card_and_app_list): Detect no app case.
3776
3777 2020-04-16  Werner Koch  <wk@gnupg.org>
3778
3779         sm: Always allow authorityInfoAccess lookup if CRLs are also enabled.
3780         + commit bbb7edb8807b7d3c8bb5284d8fdf21adb67cd87d
3781         * sm/certchain.c (find_up): Disable external lookups in offline mode.
3782         Always allow AKI lookup if CRLs are also enabled.
3783
3784         sm: Lookup missing issuers first using authorityInfoAccess.
3785         + commit f5efbd5a1169ca7700f430a4a26ba086e603c887
3786         * sm/call-dirmngr.c (gpgsm_dirmngr_lookup): Add optional arg URL and
3787         adjust all callers.
3788         * sm/certchain.c (oidstr_caIssuers): New.
3789         (struct find_up_store_certs_s): Add additional fields.
3790         (find_up_store_certs_cb): Store the fingerprint.
3791         (find_up_via_auth_info_access): New.
3792         (find_up): Try the AIA URI first.
3793
3794         dirmngr: Allow http URLs with "LOOKUP --url"
3795         + commit 7f1be1ea524ee53d8c7b628e0305b61ebad4ab25
3796         * dirmngr/crlfetch.c (read_cert_via_http): New.
3797         (fetch_cert_by_url): Implement http scheme.
3798
3799         gpg: Make AEAD modes subject to compliance checks.
3800         + commit cec397e00240829495de2b487fe60d997d810c03
3801         * g10/decrypt-data.c (decrypt_data): Move aead algo detection up.
3802
3803 2020-04-15  Werner Koch  <wk@gnupg.org>
3804
3805         gpg: Fix broken setting of AEAD algo.
3806         + commit df0edaf91a220f8c6dffbfd1f795e229858b096b
3807         * g10/main.h (DEFAULT_AEAD_ALGO): Set to OCB.
3808
3809         sm,dirmngr: Restrict allowed parameters used with rsaPSS.
3810         + commit c0d5c673542b3d517c33fe1a9ab26bcda1a5a95f
3811         * sm/certcheck.c (extract_pss_params): Check the used PSS params.
3812         * dirmngr/crlcache.c (finish_sig_check): Ditto.
3813         * dirmngr/validate.c (check_cert_sig): Ditto.
3814
3815 2020-04-15  NIIBE Yutaka  <gniibe@fsij.org>
3816
3817         regexp: Fix generation of _unicode_mapping.c.
3818         + commit 50b320952e99ea20f9b77c6c501280fe37fd2598
3819         * configure.ac (AWK_HEX_NUMBER_OPTION): Detect GNU Awk.
3820         * regexp/Makefile.am: Use AWK_HEX_NUMBER_OPTION.
3821         * regexp/parse-unidata.awk: Don't use strtonum.
3822
3823 2020-04-14  Werner Koch  <wk@gnupg.org>
3824
3825         sm: Support rsaPSS verification also for CMS signatures.
3826         + commit 6c28d9343ea6df9cda1b69e77751a9e958eb3d70
3827         * sm/certcheck.c (gpgsm_check_cert_sig): Factor PSS parsing out to ...
3828         (extract_pss_params): new.
3829         (gpgsm_check_cms_signature): Implement PSS.
3830
3831 2020-04-09  Werner Koch  <wk@gnupg.org>
3832
3833         dirmngr: Support rsaPSS also in the general validate module.
3834         + commit ba34f1415366d91d1831d717ec310ddda33f9cc4
3835         * dirmngr/validate.c (hash_algo_from_buffer): New.
3836         (uint_from_buffer): New.
3837         (check_cert_sig): Support rsaPSS.
3838         * sm/certcheck.c (gpgsm_check_cert_sig): Fix small memory leak on
3839         error.
3840
3841         sm,dirmngr: Support rsaPSS signature verification.
3842         + commit b45ab0ca08f8d6f9831192210b9ab141f4e450cf
3843         * sm/certcheck.c (hash_algo_from_buffer): New.
3844         (uint_from_buffer): New.
3845         (gpgsm_check_cert_sig): Handle PSS.
3846         * dirmngr/crlcache.c (hash_algo_from_buffer): New.
3847         (uint_from_buffer): New.
3848         (start_sig_check): Detect PSS and extract hash algo.  New arg to
3849         return a PSS flag.
3850         (finish_sig_check): New arg use_pss.  Extract PSS args and use them.
3851         (crl_parse_insert): Pass use_pss flag along.
3852
3853         common: New function to map hash algo names.
3854         + commit 5d5b70ae0f515290a3d64daa1d687fe8c8477f76
3855         * common/sexputil.c (hash_algo_to_string): New.
3856
3857         scd:p15: Return a display S/N via Assuan.
3858         + commit bfedc760efdcf606da7c214e84d12a10ee4cbcc0
3859         * scd/app-p15.c (make_pin_prompt): Factor some code out to ...
3860         (get_dispserialno): this.
3861         (do_getattr): Use new fucntion for a $DISPSERIALNO.
3862
3863 2020-04-08  NIIBE Yutaka  <gniibe@fsij.org>
3864
3865         gpg: ECDH: Accept longer padding.
3866         + commit fd79cadf7ba5ce45dfb5e266975f58bf5c7ce145
3867         * g10/pubkey-enc.c (get_it): Remove check which mandates shorter
3868         padding.
3869
3870 2020-04-07  Werner Koch  <wk@gnupg.org>
3871
3872         scd:p15: Show a pretty PIN prompt.
3873         + commit 9ec8d984be4676126843d5aa7dfd0b7d71eff13c
3874         * scd/app-p15.c (struct prkdf_object_s): New fields common_name and
3875         serial_number.
3876         (release_prkdflist): Free them.
3877         (keygrip_from_prkdf): Parse cert and set them.
3878         (any_control_or_space): New.
3879         (make_pin_prompt): New.
3880         (verify_pin): Construct a pretty PIN prompt.
3881         (do_sign): Remove debug output.
3882
3883         scd: Return GPG_ERR_BAD_PIN on 0x63Cn status word.
3884         + commit f28795b615c3042f6eb7c9d941e232d0da50efbc
3885         * scd/iso7816.c (map_sw): Detect 0x63Cn status code.
3886
3887         scd: Factor common PIN status check out.
3888         + commit 60d018f6a91c4c90b8ecf13f88ac4256699f4007
3889         * scd/iso7816.h (ISO7816_VERIFY_ERROR): New.
3890         (ISO7816_VERIFY_NO_PIN): New.
3891         (ISO7816_VERIFY_BLOCKED): New.
3892         (ISO7816_VERIFY_NULLPIN): New.
3893         (ISO7816_VERIFY_NOT_NEEDED): New.
3894         * scd/iso7816.c (iso7816_verify_status): New.
3895         * scd/app-nks.c (get_chv_status): Use new function.
3896         * scd/app-piv.c (get_chv_status): Ditto.
3897         (verify_chv): Ditto.
3898
3899         scd:p15: Fix decrypt followed by sign problem for D-Trust cards.
3900         + commit 42ddcc87f4bca40d605d133b6cdb4e761a49a1c9
3901         * scd/iso7816.c (iso7816_select_mf): New.
3902         * scd/app-p15.c (card_product_t): New.
3903         (struct app_local_s): Add field 'card_product'.
3904         (read_ef_tokeninfo): Detect D-Trust card.
3905         (prepare_verify_pin): Switch to D-Trust AID.
3906         (do_decipher): Restore a SE for D-TRust cards.  Chnage the passing
3907         indicator to 0x81.
3908
3909 2020-04-06  NIIBE Yutaka  <gniibe@fsij.org>
3910
3911         tools: Use internal regexp routines.
3912         + commit 7ee2a9687da9560a5d17c7046c87c2f7a6733d5c
3913         * tools/gpg-check-pattern.c: Use jimregexp.h.
3914
3915 2020-04-03  Werner Koch  <wk@gnupg.org>
3916
3917         scd:p15: Emit MANUFACTURER, $ENCRKEYID, $SIGNKEYID.
3918         + commit aa60645b997d23ac2958f75fd349c1cd7b8af902
3919         * scd/app-p15.c (read_ef_tokeninfo): Store manufacturer_id.
3920         (do_getattr): Implement MANUFACTURER, $ENCRKEYID and $SIGNKEYID.
3921         (send_keypairinfo): Also print usage flags.
3922
3923         gpg,card: Use the new MANUFACTURER attribute.
3924         + commit 15352b0eac335e7993fcd7720106a3a7d22caae1
3925         * tools/gpg-card.h (struct card_info_s): Add manufacturer fields.
3926         * tools/card-call-scd.c (release_card_info): Release them.
3927         (learn_status_cb): Parse MANUFACTURER attribute.
3928         * tools/gpg-card.c (get_manufacturer): Remove.
3929         (list_card): Use the new attribute.
3930         * g10/call-agent.h (struct agent_card_info_s): Add manufacturer fields.
3931         * g10/call-agent.c (agent_release_card_info): Release them.
3932         (learn_status_cb): Parse MANUFACTURER attribute.
3933         * g10/card-util.c (get_manufacturer): Remove.
3934         (current_card_status): Use new attribute.
3935
3936         scd:openpgp: New attribute "MANUFACTURER".
3937         + commit 541a6a903e79c9146a379f5c6c0fb34e6c2b42c4
3938         * scd/app-openpgp.c (get_manufacturer): New..
3939         (do_getattr): Add new attribute "MANUFACTURER".
3940         (do_learn_status): Always print it.
3941
3942 2020-04-03  NIIBE Yutaka  <gniibe@fsij.org>
3943
3944         gpg: Add regular expression support.
3945         + commit ba247a114c75a84473c11c1484013b09fbb9bcd1
3946         * AUTHORS, COPYING.other: Update.
3947         * Makefile.am (SUBDIRS): Add regexp sub directory.
3948         * configure.ac (DISABLE_REGEX): Remove.
3949         * g10/Makefile.am (needed_libs): Add libregexp.a.
3950         * g10/trustdb.c: Remove DISABLE_REGEX support.
3951         * regexp/LICENSE, regexp/jimregexp.c, regexp/jimregexp.h,
3952           regexp/utf8.c, regexp/utf8.h: New from Jim Tcl.
3953         * regexp/UnicodeData.txt: New from Unicode.
3954         * regexp/Makefile.am, regexp/parse-unidata.awk: New.
3955         * tests/openpgp/Makefile.am: Remove DISABLE_REGEX support.
3956         * tools/Makefile.am: Remove DISABLE_REGEX support.
3957
3958 2020-04-02  Werner Koch  <wk@gnupg.org>
3959
3960         scd:p15: Implement do_with_keygrip and capabilities.
3961         + commit 61c5b0767fac4c2d7fe95cdbc6d0f0a94878c813
3962         * scd/app-p15.c (prepare_verify_pin): Allow use without an AODF.
3963         (verify_pin): Ditto.
3964         (do_with_keygrip): Implement capability restrictions.
3965
3966         scd:p15: Rename some variables and functions for clarity.
3967         + commit 8149742ddfea6c76898786cb7de7c92bbf8aab0a
3968         * scd/app-p15.c: Rename keyinfo to prkdf.
3969
3970         scd: Use Gcrypt usage constants for the do_with_keygrip capabilities.
3971         + commit 5b7b42e2b2b7ba7b88f89ff4b4ee7baf0eef2a04
3972         * scd/command.c (cmd_keyinfo): Use Gcrypt constants for CAP.
3973         * scd/app-openpgp.c (do_with_keygrip): Adjust for them.
3974         * scd/app-piv.c (do_with_keygrip): Ditto.
3975
3976 2020-04-02  NIIBE Yutaka  <gniibe@fsij.org>
3977
3978         scd: New command DEVINFO.
3979         + commit 2ccbcfec121f768574a59aa2ecff22d8b422d61b
3980         * scd/app.c (notify_cond): New condition variable.
3981         (app_send_devinfo, app_wait): New.
3982         (scd_update_reader_status_file): Kick NOTIFY_COND.
3983         (initialize_module_command): Initialize NOTIFY_COND.
3984         * scd/command.c (struct server_local_s):  Add watching_status.
3985         (cmd_devinfo): New.
3986         (register_commands): Add DEVINFO command.
3987         (send_client_notifications): Write status change to DEVINFO channel.
3988         * scd/scdaemon.h (app_wait, app_send_devinfo): New.
3989
3990 2020-04-01  Werner Koch  <wk@gnupg.org>
3991
3992         scd:p15: Cache the PIN.
3993         + commit 29f8f52bf8161c238c26389ab178caa98801234e
3994         * scd/app-p15.c (struct prkdf_object_s): Add flag pin_verified.
3995         (verify_pin): Make use of it.
3996
3997         scd:p15: Run a keygrip_from_prkdf before verify_pin.
3998         + commit 132d82c1582009013af5c7bdb17cbaaa8807c70e
3999         * scd/app-p15.c (do_sign): Move keygrip_from_prkdf before PIN
4000         verification.
4001         (do_decipher): Add keygrip_from_prkdf.
4002
4003         scd:p15: Support decryption with CardOS 5 cards.
4004         + commit ca4391399c690a45270cca30f03ac564c394c1f6
4005         * scd/app-p15.c (do_decipher): New.
4006
4007         scd:p15: Factor PIN verification out to a new function.
4008         + commit 375b1454875ff079efc122e33b1216b412eecfaf
4009         * scd/app-p15.c (do_sign): Factor code out to ...
4010         (prepare_verify_pin, verify_pin): new functions.
4011
4012         sm: Fix a warning in an es_fopencooie function.
4013         + commit c7ff8c59b9252f8f27cabee3fea503f06c7d46ff
4014         * sm/certdump.c (format_name_writer): Take care of a flush request.
4015
4016 2020-03-31  Werner Koch  <wk@gnupg.org>
4017
4018         scd:p15: Support signing with CardOS 5 cards.
4019         + commit 103c1576b73ed75b771a8ffd1c97628651b99797
4020         * scd/app-help.c (app_help_get_keygrip_string_pk): Add optional arg
4021         r_pkey and change all callers.
4022         (app_help_get_keygrip_string): Ditto.
4023         * scd/app-p15.c (struct cdf_object_s): Use bit flags
4024         (struct aodf_object_s): Ditto.  Add field 'fid'.
4025         (struct prkdf_object_s): Ditto.  Add fields keygrip, keyalgo, and
4026         keynbits.
4027         (parse_certid): Allow a keygrip instead of a certid aka keyref.
4028         (read_ef_aodf): Store the FID.
4029         (keygripstr_from_prkdf): Rename to ...
4030         (keygrip_from_prkdf): this.  Remove arg r_gripstr and implement cache.
4031         Change callers to directly use the values from the object.  Also store
4032         the algo and length of the key ion the object.
4033         (keyref_from_keyinfo): New. Factored out code.
4034         (do_sign): Support SHA-256 and >2048 bit RSA keys.
4035         (do_with_keygrip): New.
4036         (app_select_p15): Register new function.
4037
4038         scd:p15: Read certificates in extended mode.
4039         + commit 2bdd4fc7b6cfd9ac5410d20f1cee66567a6b24c5
4040         * scd/app-p15.c (readcert_by_cdf): Allow reading in extended mode.
4041
4042         scd: Add function for binary read in extended mode.
4043         + commit c9ad81070a2bb1116d3f096a440c43e57e6f933a
4044         * scd/iso7816.c (iso7816_read_binary): Factor code out to ...
4045         (iso7816_read_binary_ext): new function.  Add arg extended_mode.
4046
4047 2020-03-30  Werner Koch  <wk@gnupg.org>
4048
4049         scd:p15: Detect CardOS 5 cards and print some basic infos.
4050         + commit 8a68d497f1dd0b124318eb47db9da0c4b64c8b8b
4051         * scd/app-p15.c (read_ef_odf): Detect the home_DF on the fly.  Silence
4052         the garbage warning for null bytes.
4053         (print_tokeninfo_tokenflags): New.
4054         (read_ef_tokeninfo): Print manufacturer, label, and flags.
4055         (app_select_p15): No need to use the app_get_slot macro.
4056         (CARD_TYPE_CARDOS_50): New const.
4057         (card_atr_list): Detect CardOS 5.0
4058
4059         agent: Print an error if gpg-protect reads the extended key format.
4060         + commit c5c21a064671dc8e461434d19cbde67b89df25e2
4061         * agent/protect-tool.c (read_key): Detect simple extended key format.
4062
4063         sm: Fix possible NULL deref in error messages of --gen-key.
4064         + commit 9c5c7c6f602c84589cd5c93a85a27b416e744338
4065         * sm/certreqgen.c: Protect printing the liniernur in case of !R.
4066
4067 2020-03-27  Werner Koch  <wk@gnupg.org>
4068
4069         sm: Consider certificates w/o CRL DP as valid.
4070         + commit 0b583a555e75fbb9140310390a267febd3329a12
4071         * sm/certchain.c (is_cert_still_valid): Shortcut if tehre is no DP.
4072         * common/audit.c (proc_type_verify): Print "n/a" if a cert has no
4073         distribution point.
4074         * sm/gpgsm.h (opt): Add field enable_issuer_based_crl_check.
4075         * sm/gpgsm.c (oEnableIssuerBasedCRLCheck): New.
4076         (opts): Add option --enable-issuer-based-crl-check.
4077         (main): Set option.
4078
4079         scd:openpgp: Allow PKSIGN with keygrip also for OPENPGP.3.
4080         + commit 4c4999b8185ace55eb5f3a6fa7d3dc0a77267b63
4081         * scd/app-openpgp.c (check_keyidstr): Add optional arg r_use_auth to
4082         test also for OpenPGP.3.
4083         (do_sign): Enable that new mode.
4084
4085 2020-03-27  NIIBE Yutaka  <gniibe@fsij.org>
4086
4087         gpgsm: Fix the previous commit.
4088         + commit e06a8e3e87f044a5bf6ee06f92cc4fd2a0914863
4089
4090
4091 2020-03-26  NIIBE Yutaka  <gniibe@fsij.org>
4092
4093         gpgsm: Support key generation with ECC.
4094         + commit 49ea53b755f0fef468055a1493e790735908f865
4095         * sm/certreqgen.c (pKEYCURVE): New.
4096         (read_parameters): Add pKEYCURVE handling.
4097         (proc_parameters): Support ECC key generation.
4098
4099         gpgsm: Remove restriction of key generation (only RSA).
4100         + commit 238707db8b05a385af5419e606ea5110ace31d2b
4101         * sm/certreqgen.c (proc_parameters): Remove checking GCRY_PK_RSA.
4102
4103 2020-03-19  Werner Koch  <wk@gnupg.org>
4104
4105         gpgconf: Take care of --homedir when reading/updating options.
4106         + commit c1844ca7520f9a67bff85ee4fbf49c6725668289
4107         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Remove unused var.
4108         (scdaemon_runtime_change): Ditto.
4109         (dirmngr_runtime_change): Ditto.
4110         (gc_component_check_options): Pass --homedir if needed.
4111         (retrieve_options_from_program): Take care of --homedir.
4112
4113 2020-03-18  Werner Koch  <wk@gnupg.org>
4114
4115         gpg: Also allow a v5 fingerprint for --trusted-key.
4116         + commit 4287f89557b3bc9ab2876331e1bcb143d759fb47
4117         * g10/trustdb.c (tdb_register_trusted_key): Add case for 32 octet
4118         fingerprints.
4119
4120 2020-03-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4121
4122         gpg: Update --trusted-key to accept fingerprint as well as long key id.
4123         + commit 810ea2cc684480c6aadceb2a10dd00f3fa67f2fb
4124         * g10/trustdb.c (tdb_register_trusted_key): accept fingerprint as well
4125         as long key ID.
4126         * doc/gpg.texi: document that --trusted-key can accept a fingerprint.
4127
4128 2020-03-18  Werner Koch  <wk@gnupg.org>
4129             gniibe@fsij.org
4130
4131         gpg: Fix key expiration and usage for keys created at the Epoch.
4132         + commit 161a098be6f9d50fb5f7e120baee81e75d6eb5ad
4133         * g10/getkey.c (merge_selfsigs_main): Take a zero key creation time in
4134         account.
4135
4136 2020-03-14  Werner Koch  <wk@gnupg.org>
4137
4138         gpgconf: Further simplify the gpgconf option processing.
4139         + commit 451cd1b3928172b312ca2597c3318e6e9e8be97d
4140         * common/gc-opt-flags.h (GC_OPT_FLAG_RUNTIME): Move to ...
4141         * tools/gpgconf-comp.c: here.
4142         (known_options_scdaemon): Remove "options".
4143         (known_options_dirmngr): Remove "options".
4144         (known_options_gpgsm): Remove "options".
4145         (known_options_gpg): Remove "options" and "keyserver".
4146         (struct gc_option_s): Rename active t gpgconf_list.
4147         (gc_component_list_options): Do not act upon active.
4148         (option_check_validity): Ditto.
4149         (is_known_option): Make it work correctly for unknown options.
4150         (retrieve_options_from_program): Use renamed flag gpgconf_list only to
4151         detect duplicated items from --gpgconf-list.  Do not set runtime.
4152         Only e set the options if set by --gpgconf-list; never clear them.
4153         * agent/gpg-agent.c: Simplify the --gpgconf-list output.
4154         * dirmngr/dirmngr.c: Ditto.
4155         * g10/gpg.c: Ditto.
4156         * kbx/keyboxd.c: Ditto.
4157         * scd/scdaemon.c: Ditto.
4158         * sm/gpgsm.c: Ditto.
4159         * tests/openpgp/gpgconf.scm: Use "compliance" instead of "keyserver"
4160         for the string arg test.
4161
4162         gpg: New option --auto-key-import.
4163         + commit 6b306f45f4fbe36b90cec4685aabb267a61e283f
4164         * g10/gpg.c (opts): New options --auto-key-import,
4165         --no-auto-key-import, and --no-include-key-block.
4166         (gpgconf_list): Add them.
4167         * g10/options.h (opt): Add field flags.auto_key_import.
4168         * g10/mainproc.c (check_sig_and_print): Use flag to enable that
4169         feature.
4170         * tools/gpgconf-comp.c: Give the new options a Basic config level.
4171
4172 2020-03-13  Werner Koch  <wk@gnupg.org>
4173
4174         gpg: Make use of the included key block in a signature.
4175         + commit 6a4443c8425fd548020553b22d5a16ffad98371f
4176         * g10/import.c (read_key_from_file): Rename to ...
4177         (read_key_from_file_or_buffer): this and add new parameters.  Adjust
4178         callers.
4179         (import_included_key_block): New.
4180         * g10/packet.h (PKT_signature): Add field flags.key_block.
4181         * g10/parse-packet.c (parse_signature): Set that flags.
4182         * g10/sig-check.c (check_signature2): Add parm forced_pk and change
4183         all callers.
4184         * g10/mainproc.c (do_check_sig): Ditto.
4185         (check_sig_and_print): Try the included key block if no key is
4186         available.
4187
4188         gpg: New option --include-key-block.
4189         + commit 865d485180240369a20d3be14d0c6499783df2b5
4190         * common/openpgpdefs.h (SIGSUBPKT_KEY_BLOCK): New.
4191         * g10/gpg.c (oIncludeKeyBlock): New.
4192         (opts): New option --include-key-block.
4193         (main): Implement.
4194         * g10/options.h (opt): New flag include_key_block.
4195         * g10/parse-packet.c (dump_sig_subpkt): Support SIGSUBPKT_KEY_BLOCK.
4196         (parse_one_sig_subpkt): Ditto.
4197         (can_handle_critical): Ditto.
4198         * g10/sign.c (mk_sig_subpkt_key_block): New.
4199         (write_signature_packets): Call it for data signatures.
4200
4201         gpg: Add property "fpr" for use by --export-filter.
4202         + commit 32493ce50ad880de7b548d7870c6040a8233a8f5
4203         * g10/export.c (push_export_filters): New.
4204         (pop_export_filters): New.
4205         (export_pubkey_buffer): Add args prefix and prefixlen.  Adjust
4206         callers.
4207         * g10/import.c (impex_filter_getval): Add property "fpr".
4208         * g10/main.h (struct impex_filter_parm_s): Add field hexfpr.
4209
4210 2020-03-12  Werner Koch  <wk@gnupg.org>
4211
4212         gpgconf: Rewrite the gpgconf-comp module.
4213         + commit b4f1159a5bd7b2799d7d35e883e0632ebf3339c8
4214         * tools/gpgconf.h (gc_component_t): Change type to ...
4215         (gc_component_id_t): this.
4216         (GC_COMPONENT_ANY): New, so that we can use that in gpgconf-comp.c
4217         directly.
4218         * tools/gpgconf-comp.c: Major rework.
4219
4220 2020-03-06  Werner Koch  <wk@gnupg.org>
4221
4222         gpg: Re-group the options in the --help output.
4223         + commit 41eb5108ce59244d961df43bbf73b8aa6e95e9cd
4224         * g10/gpg.c (opts): Change oLoadExtensions, oStrict, and oNoStrict to
4225         use ARGPARSE_ignore and remove the code in the option switch.
4226
4227         agent: Re-group the options in the --help output.
4228         + commit c693b7f4ade97357c33b410728bb741674255487
4229         * agent/gpg-agent.c (oGreeting): Remove non existant dummy option.
4230
4231         gpgconf: Support reading global options (part 2).
4232         + commit 4423e9dcde5e1a8d73ff7386942fe3c0c4b917fc
4233         * tools/gpgconf-comp.c: Remove all regular option descriptions.  They
4234         are now read in from the component.  Also remove a few meanwhile
4235         obsolete options.
4236         * agent/gpg-agent.c: Add option description which were only set in
4237         gpgconf-comp.c.
4238         * dirmngr/dirmngr.c: Ditto.
4239         * scd/scdaemon.c: Ditto.
4240         * sm/gpgsm.c: Ditto.
4241         * g10/gpg.c: Ditto.
4242
4243 2020-03-05  Werner Koch  <wk@gnupg.org>
4244
4245         gpgconf: Support reading global options (part 1).
4246         + commit d2425d1495f4fe4f5c3a79d7dc5571fda00849d8
4247         * tools/gpgconf.c (main): Set the coinfig directories.
4248         * tools/gpgconf-comp.c (gc_backend): Change the name of the config
4249         files.
4250         (struct gc_option): Add new field 'attr'.
4251         (retrieve_options_from_program): Rewrite to use gpgrt_argparser.
4252
4253 2020-03-04  Werner Koch  <wk@gnupg.org>
4254
4255         common: Add xreallocarray function.
4256         + commit 6fa1808cb7639f0f3745b78c4b7ce902e42b228c
4257         * common/miscellaneous.c (xreallocarray): New func.
4258         * common/util.h (xtryreallocarray): New macro.
4259
4260 2020-03-03  Werner Koch  <wk@gnupg.org>
4261
4262         gpgconf: Always use xmalloc.
4263         + commit 178b3772ff79148b496715da1b8ca5ba86caf2bc
4264         * tools/gpgconf-comp.c: Fix spelling of "cannot".  Use log_assert
4265         instead of a plain assert.
4266         (gc_percent_escape, percent_deescape): Fail on malloc error.
4267
4268 2020-02-28  NIIBE Yutaka  <gniibe@fsij.org>
4269
4270         scd: Fix the previous commit.
4271         + commit 19f70b5072b2ef80759ced83fe0dac9cf4dde830
4272         * scd/app-openpgp.c (do_setattr): Flush the KDF DO just before setting.
4273
4274         scd: Improve setattr for KDF.
4275         + commit 3ba7c9bcf7f19b0a308499fcf3dbbb15da38799a
4276         * scd/app-openpgp.c (do_setattr): For setting KDF DO, support standard
4277         OpenPGP card, which needs to update PIN.
4278
4279         scd: Fix pinpad handling when KDF enabled.
4280         + commit 11da441016222337284c519ff56aca34e3042373
4281         * scd/app-openpgp.c (do_getattr): Send the KDF DO information.
4282
4283 2020-02-25  Werner Koch  <wk@gnupg.org>
4284
4285         gpg: Re-enable versioned config files.
4286         + commit 79f2318aa5c54c57220aa73251635d21cee0ccfa
4287         * g10/gpg.c (main): Use ARGPARSE_FLAG_USERVERS.
4288
4289         gpg: Re-add checking of config file permissions.
4290         + commit 7e8f28653c1b4305758a61c064d793e32ba633d5
4291         * g10/gpg.c (main): Re-add permission checking of the user config
4292         file.  Re-add code to check against the SE-Linux secured file list.
4293         (get_default_configname): Remove unused func.
4294         * configure.ac (SAFE_VERSION, SAFE_VERSION_DOT)
4295         (SAFE_VERSION_DASH): Remove.
4296
4297 2020-02-22  Werner Koch  <wk@gnupg.org>
4298
4299         Use gpgrt's new option parser for the new keyboxd.
4300         + commit 833c04334a53530bd40d7dd815b6a0f1ffef296d
4301         * kbx/keyboxd.c: Switch to the new option parser and enable a global
4302         conf file.
4303
4304         agent,dirmngr: Re-read the user specified config file.
4305         + commit 941a48f9b12b4c470686321bf4fd58c23b6cf86d
4306         * agent/gpg-agent.c (reread_configuration): Use a two-part config
4307         file.
4308         * dirmngr/dirmngr.c (reread_configuration): Ditto.
4309
4310         Remove the now obsolete argparse code.
4311         + commit cdbe10b762f38449b86da69076209324b0c99982
4312         * tests/gpgscm/main.c: Switch to the new option parser.
4313         * common/argparse.c, common/argparse.h: Remove.
4314         * common/init.c (_init_common_subsystems): Do not call obsolete func.
4315         * common/Makefile.am (common_sources): Remove those files.
4316
4317 2020-02-21  Werner Koch  <wk@gnupg.org>
4318
4319         Use gpgrt's new option parser for the remaining daemons.
4320         + commit ba463128ce65a0f347643f7246a8e097c5be19f1
4321         * scd/scdaemon.c: Switch to the new option parser and enable a global
4322         conf file.
4323         * dirmngr/dirmngr.c: Ditto.
4324         * g13/g13.c: Ditto.
4325         * g13/g13-syshelp.c: Ditto.  Do not force verbose mode.
4326         * dirmngr/dirmngr_ldap.c: Switch to the new option parser.
4327         * dirmngr/dirmngr-client.c: Switch to the new option parser.
4328
4329         Use gpgrt's new option parser for the tools.
4330         + commit 3bc004decd289810bc1b6ad6fb8f47e45c770ce6
4331         * agent/preset-passphrase.c: Switch to the new option parser.
4332         * agent/protect-tool.c: Ditto.
4333         * kbx/kbxutil.c: Ditto.
4334         * tools/gpg-card.c: Ditto.
4335         * tools/gpg-check-pattern.c: Ditto.
4336         * tools/gpg-connect-agent.c: Ditto.
4337         * tools/gpg-pair-tool.c: Ditto.
4338         * tools/gpg-wks-client.c: Ditto.
4339         * tools/gpg-wks-server.c: Ditto.
4340         * tools/gpgconf.c: Ditto.
4341         * tools/gpgsplit.c: Ditto.
4342         * tools/gpgtar.c: Ditto.
4343
4344 2020-02-20  Werner Koch  <wk@gnupg.org>
4345
4346         Use gpgrt's new option parser for gpgc, gpgsm, and gpg-agent.
4347         + commit 2c823bd878fcdbcc4f6c34993e1d0539d9a6b237
4348         * g10/gpgv.c: Use new option parser.
4349         * sm/gpgsm.c: Ditto.
4350         * agent/gpg-agent.c: Ditto.
4351         (opts): Add option --no-options.
4352
4353         gpg: Use gpgrt's new option parser to provide a global conf file.
4354         + commit 0e8f6e2aa98c212442001036fb5178cd6cd8af59
4355         * common/util.h: Remove argparse.h.
4356         * common/argparse.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS.
4357         * configure.ac (GPGRT_ENABLE_ARGPARSE_MACROS): Define.
4358         * agent/gpg-agent.c: Undef GPGRT_ENABLE_ARGPARSE_MACROS and include
4359         argparse.h.  Do this also for all main modules which use our option
4360         parser except for gpg.  Replace calls to strusage by calls to
4361         gpgrt_strusage everywhere.
4362
4363         * g10/gpg.c (opts): Change type to gpgrt_opt_t.  Flag oOptions and
4364         oNoOptions with ARGPARSE_conffile and ARGPARSE_no_conffile.
4365         (main): Change type of pargs to gpgrt_argparse_t.  Rework the option
4366         parser to make use of the new gpgrt_argparser.
4367
4368 2020-02-19  Werner Koch  <wk@gnupg.org>
4369
4370         card: New option --info for command list and select by s/n.
4371         + commit ee911df979e9b53787162367865ca24682adae6e
4372         * tools/gpg-card.c (cmd_list): add option --info.  Factor soem code
4373         out to ...
4374         (print_card_list): new.
4375
4376 2020-02-19  NIIBE Yutaka  <gniibe@fsij.org>
4377
4378         gpg: Fix default-key selection when card is available.
4379         + commit 41913d76f7db4a7dabab26c1bc439c96ad86712f
4380         * g10/getkey.c (get_seckey_default_or_card): Handle the case
4381         when card key is not suitable for requested usage.
4382
4383 2020-02-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4384
4385         Spelling cleanup.
4386         + commit 0904b8ef348a52335c378bee6dc90a978885d66f
4387         No functional changes, just fixing minor spelling issues.
4388
4389         ---
4390
4391         Most of these were identified from the command line by running:
4392
4393           codespell \
4394             --ignore-words-list fpr,stati,keyserver,keyservers,asign,cas,iff,ifset \
4395             --skip '*.po,ChangeLog*,help.*.txt,*.jpg,*.eps,*.pdf,*.png,*.gpg,*.asc' \
4396             doc g13 g10 kbx agent artwork scd tests tools am common dirmngr sm \
4397             NEWS README README.maint TODO
4398
4399 2020-02-19  Nick Piper  <nick.piper@cgi.com>
4400
4401         doc: Correction of typo in documentation of KEY_CONSIDERED.
4402         + commit 0e1cbabc0ad4fe2ca9644fffb5cf27b1a8a1509f
4403
4404
4405 2020-02-17  NIIBE Yutaka  <gniibe@fsij.org>
4406
4407         scd: Disable pinpad if it's impossible by KDF DO.
4408         + commit 95c7498b76231d3297541172d878f6a26702539b
4409         * scd/app-openpgp.c (struct app_local_s): Add pinpad.disabled field.
4410         (do_getattr): Set pinpad.disabled field.
4411         (check_pinpad_request): Use the pinpad.disabled field.
4412         (do_setattr): Update pinpad.disabled field.
4413
4414 2020-02-15  Werner Koch  <wk@gnupg.org>
4415
4416         gpgsm: Fix import of some CR,LF ternminated certificates.
4417         + commit 6248739799fd4a877529089375e2a4103d33e6f4
4418         * common/ksba-io-support.c (base64_reader_cb): Detect the END tag and
4419         don't just rely on the padding chars.  This could happen only with
4420         CR+LF termnmated PEM files.  Also move the detection into the invalid
4421         character detection branch for a minor parser speedup.
4422
4423 2020-02-13  Werner Koch  <wk@gnupg.org>
4424
4425         build: New configure option --disable-keyboxd.
4426         + commit 6cac2bd0382eb7ed0d249f077522516e64fc1d8f
4427         * configure.ac: Add option --dsiable-keyboxd
4428         * kbx/Makefile.am: Do not build keyboxd in that case.
4429
4430         scd: Print the main app name also for not fully supported cards.
4431         + commit 11d917c7796dc748e2d798d327a045ba295994f4
4432         * scd/app.c (send_serialno_and_app_status): Add fallback.
4433
4434         card: Fix openpgp subkey listing.
4435         + commit e582d8f5b2c1bac8b6ccdfd6412b621a2584eb7f
4436         * tools/gpg-card.c (list_one_kinfo): Fix printing of the subkeys.
4437
4438         gpg: New option --full-timestrings.
4439         + commit 86312b920a1d5817903d7175e9c2109bcf521b7c
4440         * g10/options.h (opt): Add flags.full_timestrings.
4441         * g10/gpg.c (oFullTimestrings): New.
4442         (opts): New option.
4443         (main): Set new flag.
4444         * g10/keyid.c (dateonlystr_from_pk): New.
4445         (dateonlystr_from_sig): New.
4446         (datestr_from_pk): Divert to isotimestamp if requested.
4447         (datestr_from_sig): Ditto.
4448         (expirestr_from_pk): Ditto.
4449         (expirestr_from_sig): Ditto.
4450         (revokestr_from_pk): Ditto.
4451         * g10/import.c (impex_filter_getval): Use dateonlystr_from_sig and
4452         dateonlystr_from_pk.
4453
4454         gpg: Changes to allow direct key generation from an OpenPGP card.
4455         + commit 14ac350f868ca71492c20c7b682d0b55b4893c9c
4456         * g10/call-agent.h (struct keypair_info_s): Add fields keytime and
4457         usage.
4458         * g10/call-agent.c (struct keypairinfo_cb_parm_s): New.
4459         (scd_keypairinfo_status_cb): Rework to store parsed KEYPAIRINFO data.
4460         (agent_scd_keypairinfo): Change accordingly.
4461         (agent_scd_readkey): Add arg ctrl and change callers.  Change return
4462         arg from an strlist_t to a keypair_info_t.
4463         (readkey_status_cb): Use KEYPAIRINFO instead of KEY-TIME.
4464         * g10/keygen.c (pSUBKEYCREATIONDATE): New.
4465         (pAUTHKEYCREATIONDATE): New.
4466         (get_parameter_u32): Allow for new parameters.
4467         (do_create_from_keygrip): For card keys use direct scd call which does
4468         not create a stub file.
4469         (ask_algo): Rework to use the new keypair_info_t as return from
4470         agent_scd_keypairinfo.
4471         (parse_key_parameter_part): Likewise.  Also get and return the key
4472         creation time using a arg.
4473         (parse_key_parameter_string): New args r_keytime and r_subkeytime.
4474         (parse_algo_usage_expire): New arg r_keytime.
4475         (proc_parameter_file): Ignore the explict pCREATIONDATE for card keys.
4476         (quickgen_set_para): New arg keytime.
4477         (quick_generate_keypair): Get the keytimes and set the pCARDKEY flag.
4478         (generate_keypair): Likewise.
4479         (do_generate_keypair): Implement the cardkey with keytime thingy.
4480         (generate_subkeypair): Use the keytime parameters.
4481         * g10/keygen.c (pAUTHKEYCREATIONDATE): New.  Not yet set but may come
4482         handy later.
4483         (get_parameter_u32): Take care of that.
4484         (do_generate_keypair): For cardkeys sign with the current time.
4485
4486         card: Take the key creation time from the KEYPAIRINFO.
4487         + commit e63f8bee4044e0cc9ebc1f9c0f9f6b63660d45e8
4488         * tools/card-call-scd.c (learn_status_cb): Adjust for recent change.
4489
4490         scd:openpgp: Return key creation time as part of KEYPARIINFO.
4491         + commit 1ad84aabb410e56bea074b82a06fe32b2897b660
4492         * scd/app-openpgp.c (send_keypair_info): Reaturn the key creation time
4493         as part of a KEYPAIRINFO.
4494         (do_readkey): Do not return the KEY-TIME anymore.
4495
4496         agent: Allow signing with card key even without a stub key.
4497         + commit 638526d37fee0a1febac9d29fab384b913819fc9
4498         * agent/call-scd.c (agent_card_serialno): Allow NULL for R_SERIAL.
4499         (struct readkey_status_parm_s): New.
4500         (readkey_status_cb): New.
4501         (agent_card_readkey): Add optional arg R_KEYREF and change all
4502         callers.
4503         * agent/findkey.c (key_parms_from_sexp): Allow also a "public-key".
4504         * agent/divert-scd.c (ask_for_card): Allow for SHADOW_INFO being NULL.
4505         * agent/pksign.c (agent_pksign_do): Fallback to sign with an on-card
4506         if there is no stub key yet.  Create the stub key.  Also fixed a
4507         misnaming between s_pkey and s_skey.
4508
4509 2020-02-12  Werner Koch  <wk@gnupg.org>
4510
4511         gpg: Rename the struct card_key_info_s.
4512         + commit 8c63430d1a40a70ff8b4ddf1ed0fcabf9c0afbcc
4513         * g10/call-agent.h (struct card_key_info_s): Rename to ...
4514         (struct keypair_info_s): this.
4515         (keypair_info_t): New.  Use this everywhere instead of
4516         card_key_info_s.
4517         * g10/call-agent.c (agent_scd_free_keyinfo): Rename to ..
4518         (free_keypair_info): this.  Change all callers.
4519
4520         card: Fix parsing of the received card_list.
4521         + commit 125c959677d55a8cf663c2dc248a3fc6f9be50bb
4522         * tools/card-call-scd.c (scd_cardlist): Allow for SERIALNO without any
4523         apps.
4524
4525         card: List more info for an OpenPGP key.
4526         + commit 1abfce82bd525de2976c31b83bb0e67e33364e58
4527         * tools/gpg-card.h (struct pubkey_s): Add field created.
4528         * tools/card-keys.c (parse_key_record): Set that field.
4529         * tools/gpg-card.c (print_shax_fpr): Print the fingerprint without
4530         spaces for easier c+p.
4531         (list_one_kinfo): Print the actual used fingerprint and creation date
4532         from the keyblock.
4533
4534         card: New option --no-key-lookup.
4535         + commit 2c6092bc5d794ae36cbf2f6b62337dc23f57bf3e
4536         * tools/gpg-card.h (opt): Add var no_key_lookup.
4537         * tools/gpg-card.c (oNoKeyLookup): New const.
4538         (opts): New option --no-key-lookup.
4539         (list_one_kinfo): Add arg no_key_lookup and implement.
4540         (list_all_kinfo): Add arg no_key_lookup.
4541         (list_openpgp, list_piv, list_card): Ditto.
4542         (cmd_list): New option --no-key-lookup.
4543
4544 2020-02-11  Werner Koch  <wk@gnupg.org>
4545
4546         gpg: Improve key creation direct from the card.
4547         + commit 9c719c9c1ff34cc06a0fef2bfe29cfd7182753eb
4548         * g10/call-agent.c (readkey_status_cb): New.
4549         (agent_scd_readkey): Add new arg r_keytime and allow NULL for
4550         r_result.  Change all callers.
4551         (agent_readkey): Minor code reformatting.
4552         * g10/keygen.c (pCARDKEY): New.
4553         (struct para_data_s): Add u.bool.
4554         (get_parameter_bool): New.
4555         (do_create_from_keygrip): Add arg cardkey and make use of it.
4556         (ask_algo): Add args r_cardkey and r_keytime.  Read the keytime of the
4557         selected card key and return it.
4558         (generate_keypair): Store CARDKEY and KEYTIME.
4559         (do_generate_keypair): Pass CARDKEY to do_create_from_keygrip.
4560         (generate_subkeypair): Ditto.
4561
4562         scd:openpgp: Send a KEY-TIME status with READKEY.
4563         + commit 77ea916533c5ca918b17ce83f6cc1b1afbd31e55
4564         * scd/app-openpgp.c (retrieve_fprtime_from_card): New.
4565         (do_readkey): Send a KEY_TIME status.
4566
4567         card: First code to actually create openpgp keys.
4568         + commit 6bc7318ef55017e1aca6e52899fd0b223da7cfc1
4569         * tools/gpg-card.c (generate_all_openpgp_card_keys): Add demo key
4570         generation.
4571         (generate_key): Allow generatiing one OpenPGP key.
4572
4573         scd:openpgp: Optional allow for lowercase keyrefs.
4574         + commit 323548acd9defde0a8ea7d74c18cd4a1b339ff2e
4575         * scd/app-openpgp.c (do_readkey): Use case insensitive match of the
4576         keyref.
4577         (do_writekey, do_sign, do_auth, do_decipher): Ditto.
4578
4579         scd:openpgp: Allow auto-changing of the key attributes in genkey.
4580         + commit d7d75da50543bc7259c5a6e6367b58cbca7f1b7b
4581         * scd/app-openpgp.c (struct app_local_s): Add field keyalgo.
4582         (parse_algorithm_attribute): Store the new keyalgo field.
4583         (change_keyattr): Change info message.
4584         (change_keyattr_from_string): Rewrite to also accept a keyref and a
4585         keyalgo string.
4586         (do_genkey): Change the keyattr if a keyalgo string is given.
4587
4588         common: Extend the openpgp_curve_to_oid function.
4589         + commit 24095101a5069f15a9aea7512498ac436a76814a
4590         * common/openpgp-oid.c (openpgp_curve_to_oid): Add optional arg R_NBITS.
4591         Change all callers.
4592
4593 2020-02-10  Werner Koch  <wk@gnupg.org>
4594
4595         doc: Improve the warning section of the gpg man page.
4596         + commit 113a8288b85725f7726bb2952431deea745997d8
4597         * doc/gpg.texi: Update return valeu and warning sections.
4598
4599 2020-02-10  Werner Koch  <wk@gnupg.org>
4600             Tomáš Mráz
4601
4602         build: Always use EXTERN_UNLESS_MAIN_MODULE pattern.
4603         + commit 6aff8a132815a84bab69401c1e7de96ec549fbf2
4604         * common/util.h (EXTERN_UNLESS_MAIN_MODULE): Add the definion only
4605         here but now without the Norcroft-C.  Change all other places where it
4606         gets defined.
4607         * common/iobuf.h (iobuf_debug_mode): Declare unconditionally as
4608         extern.
4609         * common/iobuf.c (iobuf_debug_mode): Define it here.
4610         * agent/gpg-agent.c (INCLUDED_BY_MAIN_MODULE): Define here and also in
4611         all main modules of all other programs.
4612
4613         * g10/main.h: Put util.h before the local header files.
4614
4615 2020-02-10  Werner Koch  <wk@gnupg.org>
4616
4617         gpg: Make really sure that --verify-files always returns an error.
4618         + commit 5681b8eaa44005afdd30211b47e5fb1a799583dd
4619         * g10/verify.c (verify_files): Track the first error code.
4620
4621         card: Remove command "key-attr" and hack on "generate".
4622         + commit 438b7881ba0bf4e5fd8e5d5212601e5691f2aafe
4623         * tools/gpg-card.h (struct key_attr): Remove.
4624         (struct key_info_s): Remove key_attr.  Add keyalgo and keyalgo_id.
4625         * tools/card-call-scd.c (learn_status_cb): Rework the key-attr info.
4626         * tools/gpg-card.c (list_one_kinfo): Always show the algorithm; if
4627         there is no key show the key attributes instead.
4628         (list_openpgp): Do not print the "Key attributes".
4629         (generate_key): Factor the repalce key pormpt out to ...
4630         (ask_replace_keys): new.
4631         (generate_openpgp): Rename to generate_all_openpgp_card_keys and add
4632         an algo parameter.
4633         (generate_generic): Rename to generate_key.  Prepare generation of a
4634         single OpenPGP key.
4635         (cmd_generate): Revamp.
4636         (ask_card_rsa_keysize): Remove.
4637         (ask_card_keyattr): Remove.
4638         (do_change_keyattr): Remove.
4639         (cmd_keyattr): Remove.
4640         (enum cmdids): Remove cmdKEYATTR.
4641         (cmds): Ditto.
4642         (dispatch_command): Ditto.
4643         (interactive_loop): Ditto.
4644
4645         scd:openpgp: Let the genkey function also accept a full keyref.
4646         + commit fb6ff7ead7dff33541b595f3e8d5342f9c7a6d6c
4647         * scd/app-openpgp.c (send_key_attr): Use log_assert.
4648         (do_genkey): Allow prefix.
4649
4650         common: Extend the new get_keyalgo_string function.
4651         + commit 332a72f7340895e7db1e9c5f89046f722bb7465b
4652         * common/openpgp-oid.c (openpgp_oid_or_name_to_curve): New.
4653         (get_keyalgo_string): Use it.
4654
4655 2020-02-09  Werner Koch  <wk@gnupg.org>
4656
4657         common: Remove duplicated call to a function.
4658         + commit d1c518cdc9330c2dd4034efc544de0dd6ec73ea1
4659         * common/openpgp-oid.c (openpgp_oid_to_str): Remove duplicated call.
4660
4661         common: New function get_keyalgo_string.
4662         + commit 3a1fa13eedb969b561bae18cd3d7c2fb0b63d6ab
4663         * common/openpgp-oid.c (struct keyalgo_string_s): New.
4664         (keyalgo_strings): New.
4665         (keyalgo_strings_size, keyalgo_strings_used): New.
4666         (get_keyalgo_string): New.
4667
4668         common: Add OpenPGP<->Gcrypt pubkey id mapping functions.
4669         + commit 49c891a9bfac24a1d95e76d33d44a49426247777
4670         * g10/misc.c (map_pk_gcry_to_openpgp): Move to ...
4671         * common/openpgp-oid.c (map_gcry_pk_to_openpgp): here and rename.
4672         Change all 4 callers.
4673         (map_openpgp_pk_to_gcry): New.
4674
4675         card: Support brainpool curves in the generate command.
4676         + commit 9df9996b415ee671a0f22b6936745f829884eda2
4677         * tools/gpg-card.c (cmd_generate): Add brainpool curves and dummy name
4678         "help".
4679
4680 2020-02-03  Werner Koch  <wk@gnupg.org>
4681
4682         sm: New option --issuer-der for the listkey commands.
4683         + commit 2e5ab34496fe7e1b9bd2194ab59a58cf44ca9d1e
4684         * sm/server.c (do_listkeys): Implement new option.
4685
4686 2020-01-21  Werner Koch  <wk@gnupg.org>
4687
4688         dirmngr: Fix building w/o LDAP support.
4689         + commit d8973975e7636ec0f007575a0bede92147d835f8
4690         * dirmngr/Makefile.am: Conditionally build dirmngr_ldap.
4691
4692         gpg: Fix printing of keyring name (regression in master)
4693         + commit bf931299e846fa47bcabe3716ec82af7c3290ce5
4694         * g10/keydb.c (keydb_get_resource_name):
4695
4696 2020-01-20  Werner Koch  <wk@gnupg.org>
4697
4698         tools: Let watchgnupg determine the socket name via gpgconf.
4699         + commit e0d9181ad11aaf7e68231db4b3708978a9a52fd6
4700         * tools/watchgnupg.c: Include sys/wait.h.
4701         (GNUPG_DEF_COPYRIGHT_LINE): Add a default value for standalone
4702         building.
4703         (get_logname): New.
4704         (main): Use a default socket name and add option --homedir.
4705
4706 2020-01-17  Werner Koch  <wk@gnupg.org>
4707
4708         gpgconf,w32: Print a warning for a suspicious homedir.
4709         + commit 7f12fb55f9757cd68147eca8f162c85378538405
4710         * tools/gpgconf.c (list_dirs): Check whether the homedir has been
4711         taken from the registry.
4712
4713 2020-01-17  NIIBE Yutaka  <gniibe@fsij.org>
4714
4715         gpg: Prefer card key on use in multiple subkeys situation.
4716         + commit 8748c50bfaa8df2b1e59c301d15fd6b9ddbd9c47
4717         * g10/call-agent.c (keyinfo_status_cb): Parse more fields.
4718         (agent_probe_secret_key): Use KEYINFO and returns bigger value
4719         representing the preference.
4720         * g10/getkey.c (finish_lookup): For subkeys, select one
4721         by using value of agent_probe_secret_key.
4722
4723         gpg: Prepare enhancement of agent_probe_secret_key.
4724         + commit 853d5b7677ea01f65c9bc5160cd8509b62f486f7
4725         * g10/call-agent.c (agent_probe_secret_key): Change semantics of
4726         return value.
4727         * g10/call-agent.h (agent_probe_secret_key): Change comment.
4728         * g10/delkey.c (do_delete_key): Follow the change.
4729         * g10/getkey.c (get_seckey, parse_def_secret_key): Likewise.
4730         (finish_lookup, have_secret_key_with_kid): Likewise.
4731         * g10/gpgv.c (agent_probe_secret_key): Likewise.
4732         * g10/keyedit.c (keyedit_menu, quick_find_keyblock): Likewise.
4733         (show_key_with_all_names_colon): Likewise.
4734         * g10/revoke.c (gen_desig_revoke, gen_revoke): Likewise
4735         * g10/test-stubs.c (agent_probe_secret_key): Likewise.
4736
4737 2020-01-16  Werner Koch  <wk@gnupg.org>
4738
4739         card: Allow switching of cards and applications.
4740         + commit bd85f9232ad639d4acba443272147c4fc01b1b65
4741         * tools/card-call-scd.c (struct card_cardlist_parm_s): Add field
4742         with_apps.
4743         (card_cardlist_cb): Handle the new with_apps flag.
4744         (scd_switchcard): New.
4745         (scd_switchapp): New.
4746         (scd_applist): New.
4747         (scd_serialno): Pass --all also in --demand mode.
4748
4749         * tools/gpg-card.c (cmd_list): Simplify switching of cards.  Add
4750         switching of alls.  Print a list of apps per card.
4751
4752         scd: New commands SWITCHCARD and SWITCHAPP.
4753         + commit 718555874efcbad502112449c7d15025cb193628
4754         * scd/app.c: Include membuf.h.
4755         (app_switch_current_card): New.
4756         (send_card_and_app_list): Factor code out to ...
4757         (send_serialno_and_app_status): new.
4758         (app_send_card_list): New.
4759         (app_send_active_apps): New.
4760         (app_switch_active_app): New.
4761         * scd/command.c (cmd_switchcard): New.
4762         (cmd_switchapp): New.
4763         (register_commands): Register new commands.
4764         (cmd_getinfo): New sub-commands "active_apps" and "all_active_apps".
4765
4766         scd:piv: Remove debug code from a recent commit.
4767         + commit dd61164410ee185750d1aa55ee0e33dcab8f4542
4768         * scd/app-piv.c (ask_and_prepare_chv): here.
4769
4770         gpg: Print better debug info in case of broken sig subpackets.
4771         + commit 3ccad75d76b9c17b9495c48df8dd4be46d3b3105
4772         * g10/parse-packet.c (enum_sig_subpkt): Print a hexdump.
4773
4774 2020-01-16  NIIBE Yutaka  <gniibe@fsij.org>
4775
4776         gpg: Use "SCD KEYINFO" to get available card keys.
4777         + commit 8edd4b8b8cdcbdcf1986214d6d17cadb604ddf54
4778         * g10/skclist.c (enum_secret_keys): Don't use agent_scd_cardlist and
4779         agent_scd_serialno, but agent_scd_keyinfo.
4780
4781         gpg: Add agent_scd_keyinfo to retrieve available card keys.
4782         + commit 8240a70c31a8e1617de64c42168cf3299b85b39e
4783         * g10/call-agent.c (card_keyinfo_cb, agent_scd_free_keyinfo)
4784         (agent_scd_keyinfo): New.
4785         * g10/call-agent.h: Define new functions.
4786
4787         gpg: default-key: Simply don't limit by capability.
4788         + commit 1aa2a0a46dc19e108b79dc129a3b0c5576d14671
4789         * g10/getkey.c (parse_def_secret_key): Remove the check.
4790
4791 2020-01-15  NIIBE Yutaka  <gniibe@fsij.org>
4792
4793         gpg: Cert only key should be usable with --default-key.
4794         + commit 9287f9e87b215e79fdb7fb9dfdf2b47666e6ea2f
4795         * g10/getkey.c (parse_def_secret_key): Allow cert-only key.
4796
4797 2020-01-13  Werner Koch  <wk@gnupg.org>
4798
4799         scd: Make the PIN cache robust against wrongdoing of gpg-agent.
4800         + commit 2dd6b4b998dd6e156e2e75ede0f40fb768c69f40
4801         * scd/app-openpgp.c (struct app_local_s): New field pincache.
4802         (cache_pin): Set it.
4803         (pin_from_cache): Consult it.
4804         * scd/app-piv.c (struct app_local_s): New field pincache.
4805         (cache_pin): Set it.
4806         (pin_from_cache): Consult it.
4807
4808         scd:piv: Implement PIN cache.
4809         + commit 60502c3606ee425d07c84b175ab310368c12b0ad
4810         * scd/command.c (pincache_put): Add arg pinlen and change all callers
4811         to provide it.
4812         * scd/app-piv.c (cache_pin): New.
4813         (pin_from_cache): New.
4814         (ask_and_prepare_chv): Add args no_cache and r_unpaddedpinlen.  Take
4815         PIN from the cache.  Return the unpadded length.
4816         (verify_chv): Add arg ctrl.  Cache the PIN.
4817         (do_change_chv): Clear PIN cache.
4818
4819         agent: Avoid multiple calls to scd for KEYINFO.
4820         + commit 2e86cca7f4181310bebfd795c059369ba03a8d8b
4821         * agent/command.c (struct server_local_s): Add last_card_keyinfo.
4822         (eventcounter): Add maybe_key_change.
4823         (cmd_genkey, cmd_scd, cmd_import_key, cmd_delete_key): Bump new
4824         counter.
4825         (cmd_keyinfo): Cache the keyinfo from the card.
4826         (start_command_handler): Release the cache.
4827
4828         agent: Replace free by xfree in recently added code.
4829         + commit aaef0fc3a743d06012c4a7fd8caa80d969863cc9
4830         * agent/call-scd.c (agent_card_free_keyinfo): Use xfree.
4831
4832         gpg,sm: Avoid useless ASFW diagnostic in loopback mode.
4833         + commit 14aa797bb8f3f7d3f4ef66b8fcdac7439000b49a
4834         * common/sysutils.c (inhibit_set_foregound_window): New var.
4835         (gnupg_inhibit_set_foregound_window): New func.
4836         (gnupg_allow_set_foregound_window): Use var.
4837         * g10/gpg.c (main): Inhibit in loopback mode.
4838         * sm/gpgsm.c (main): Ditto.
4839
4840         scd: Fix memory leak in command READKEY.
4841         + commit 2b843be5ac9f37c9faf2d9ab720eafceb3d534ad
4842         * scd/command.c (cmd_readcert): Replace xstrdup by xtrystrdup.
4843         (cmd_readkey): Ditto.  Fix memory leak.
4844
4845         scd: Make SERIALNO --all work correctly and use it.
4846         + commit 0e48aa084921c77944d4802c86ac33c607c519af
4847         * scd/app.c (maybe_switch_app): Factor reselect code out to ...
4848         (run_reselect): new.
4849         (app_write_learn_status): Tweak diagnostics.
4850         (app_do_with_keygrip): Run reselect if a card has more than one
4851         switchable application.
4852
4853         * agent/call-scd.c (agent_card_serialno): Ditto.
4854         * tools/card-call-scd.c (start_agent): Use option --all with SERIALNO.
4855         (scd_serialno): Ditto.
4856
4857 2020-01-13  NIIBE Yutaka  <gniibe@fsij.org>
4858
4859         agent: handle SSH operation by KEYGRIP.
4860         + commit 15028627a1655b7ad1835fbd0a32cf30debe807a
4861         * agent/command-ssh.c (card_key_available): Supply KEYINFO argument.
4862         Call agent_card_readkey by KEYGRIP of KEYINFO.
4863         Don't use $AUTHKEYID, but IDSTR of KEYINFO.
4864         (ssh_handler_request_identities): Follow the change of
4865         card_key_available.
4866
4867         agent: Extend agent_card_getattr with KEYGRIP.
4868         + commit c31266716dd69fee7bd64cf1e33d7631cd328e72
4869         * agent/agent.h (struct card_key_info_s): KEYGRIP null terminated.
4870         (agent_card_getattr): Add KEYGRIP argument.
4871         * agent/call-scd.c (agent_card_getattr): Handle KEYGRIP argument.
4872         (card_keyinfo_cb): Make KEYGRIP null terminated.
4873         * agent/command.c (cmd_readkey): Follow the change.
4874
4875 2020-01-10  NIIBE Yutaka  <gniibe@fsij.org>
4876
4877         scd: Implement direct access by KEYGRIP for GETATTR and READKEY.
4878         + commit 0cfded4bb1484366c785c268f2fb1061c7be5fdb
4879         * scd/app-openpgp.c (do_readkey): Handle KEYGRIP access.
4880         * scd/command.c (do_readkey): New.
4881         (cmd_readkey): Use do_readkey supporting KEYGRIP access.
4882         (cmd_getattr): Supporting KEYGRIP access.
4883
4884 2020-01-09  Werner Koch  <wk@gnupg.org>
4885
4886         scd:openpgp: Implement PIN cache.
4887         + commit 63bda3aad8ec4163b0241f64e8b587d665d650c3
4888         * scd/app-openpgp.c (wipe_and_free, wipe_and_free_string): Use them
4889         everywere where we do a wipememory followed by a free.
4890         (pin2hash_if_kdf): Change interface.  The input PIN is not anymore
4891         changed.  Further there are no more assumptions about the length of
4892         the provided buffer.
4893         (cache_pin): Restructure.
4894         (chvno_to_keyref): New.
4895         (pin_from_cache): New.
4896         (verify_a_chv): Add arg CTRL.  Adjust for changed pin2hash_if_kdf.
4897         Chache and retrieve the PIN here.
4898         (verify_chv2): Do not cache the PIN here.
4899         (build_enter_admin_pin_prompt): Add arg 'r_remaining'.
4900         (verify_chv3): Adjust for changed pin2hash_if_kdf.  Implement the PIN
4901         cache.
4902         (do_change_pin): Clear the PIN cache.  Do not change the PIN here.
4903         Lots of adjustments to cope with the chnaged pin2hash_if_kdf.
4904         (do_sign): Do not cache the PIN here.
4905
4906         scd: Use a scdaemon internal key to protect the PIN cache IPC.
4907         + commit ce5a7fb72b599de592a087867768ac1f81fd2989
4908         * agent/call-scd.c (handle_pincache_put): Do not decrypt.
4909         (handle_pincache_get): New.
4910         (inq_needpin): Call it.
4911         * scd/command.c (set_key_for_pincache): New.
4912         (pincache_put): Restructure and set key.
4913         (pincache_get): Ditto.
4914
4915 2020-01-09  NIIBE Yutaka  <gniibe@fsij.org>
4916
4917         agent: SSH: SCD KEYINFO to list available keys.
4918         + commit 57b8ed61ab93dd5aa73159f6db8adeb83d54b85f
4919         * agent/agent.h (agent_card_cardlist): Remove.
4920         (agent_card_keyinfo): Add CAP argument.
4921         * agent/call-scd.c (card_cardlist_cb): Remove.
4922         (agent_card_cardlist): Remove.
4923         (agent_card_keyinfo): Support CAP constraint.
4924         * agent/command-ssh.c (card_key_list): Remove.
4925         (ssh_handler_request_identities): Use SCD KEYINFO command.
4926         * agent/command.c (cmd_keyinfo): Follow the API change.
4927         * agent/divert-scd.c (ask_for_card): Likewise.
4928
4929 2020-01-07  Werner Koch  <wk@gnupg.org>
4930
4931         scd: First changes to implement a PIN cache.
4932         + commit fbf97a7856bd2f80a1714f63417c59d6c604d333
4933         * scd/command.c (pincache_put): New.  Uses a dummy key for now.
4934         (pincache_get): New.
4935         * scd/app.c (select_application): Flush the PIN cache.
4936         (scd_update_reader_status_file): Ditto.
4937         (maybe_switch_app): Call the new prep_reselect function.
4938         (app_write_learn_status): Ditto.
4939         * scd/app-openpgp.c (cache_pin): New helper to cache a PIN.
4940         (verify_chv2): Call it.
4941         (verify_chv3): Call it.
4942         (clear_chv_status): Call it.
4943         (do_change_pin): Call it.
4944
4945         * scd/app-common.h (struct app_ctx_s): Add function 'prep_select'.
4946         * scd/app-openpgp.c (do_prep_reselect): New stub function.
4947         (app_select_openpgp): Set new stub function.
4948         * scd/app-piv.c (do_prep_reselect): New stub function.
4949         (app_select_piv): Set new stub function.
4950
4951         * scd/app-common.h (struct app_ctx_s): Add parameter ctrl to setattr,
4952         sign, auth, decipher, and check_pin.  Change all implementations and
4953         callers to pass such a parameter.
4954
4955         agent: First changes to support a PIN cache for scdaemon.
4956         + commit d5c00354bb02ae6cb2e3a72136a1a95cb2db7f3f
4957         * agent/agent.h (CACHE_MODE_PIN): New.
4958         * agent/cache.c (housekeeping): Special handling of new new mode.
4959         (agent_flush_cache): Ditto.  Add arg 'pincache_only' and change
4960         caller.
4961         (agent_put_cache): Support new mode.
4962         (agent_get_cache): Ditto.
4963         * agent/call-scd.c (wait_child_thread): Flush the entire PIN cache.
4964         (start_scd): Ditto.
4965         (agent_card_killscd): Ditto.
4966         (handle_pincache_put): New.  Uses a dummy encryption key for now.
4967         (pincache_put_cb): New.
4968         (inq_needpin): Prepare for PINCACHE_GET inquiry.
4969         (learn_status_cb): Handle the PINENTRY_PUT status line.
4970         (get_serialno_cb): Ditto
4971         (agent_card_pksign): Ditto.
4972         (padding_info_cb): Ditto.
4973         (agent_card_readcert): Ditto.
4974         (agent_card_readkey): Ditto.
4975         (agent_card_writekey): Ditto.
4976         (card_getattr_cb): Ditto.
4977         (card_cardlist_cb): Ditto.
4978         (card_keyinfo_cb): Ditto.
4979         (pass_status_thru): Ditto.
4980
4981         kbx: Make sure the tables are joined in a select.
4982         + commit 41a882443622fe08ebaa75bf358e83630bbb8631
4983         * kbx/backend-sqlite.c (run_select_statement): Join the tables.
4984
4985 2020-01-03  Werner Koch  <wk@gnupg.org>
4986
4987         scd: Minor fix for readibility.
4988         + commit c0625c15c1fb6d06202669eb8caff2710377952d
4989         * scd/command.c (open_card_with_request): Use NULL instead of
4990         APPTYPE_NULL.
4991
4992 2020-01-02  Werner Koch  <wk@gnupg.org>
4993
4994         kbx: Initial support for an SQLite backend.
4995         + commit f4da1455c7ab858ea9007d0813774c6d04cd4576
4996         * kbx/backend-sqlite.c: New.
4997         * kbx/Makefile.am (keyboxd_SOURCES): Add it.
4998         (keyboxd_CFLAGS, keyboxd_LDADD): Add SQLite flags.
4999         * kbx/backend.h (enum database_types): Add DB_TYPE_SQLITE.
5000         (be_sqlite_local_t): New typedef.
5001         (struct db_request_part_s): Add field besqlite.
5002         * kbx/backend-support.c (strdbtype): Add string for DB_TYPE_SQLITE.
5003         (be_generic_release_backend): Support SQLite.
5004         (be_release_request): Ditto.
5005         (be_find_request_part): Ditto.
5006         (is_x509_blob): Rename to ...
5007         (be_is_x509_blob): this and make global.
5008         * kbx/frontend.c (kbxd_set_database): Detect ".db" suffix and use that
5009         for SQLite.
5010         (kbxd_search): Support SQLite
5011         (kbxd_store): Ditto.
5012         (kbxd_delete): Ditto.
5013         * kbx/frontend.h (kbxd_store_modes): Move to ...
5014         * kbx/keyboxd.h (enum kbxd_store_modes): here.
5015         * kbx/keyboxd.c (main): USe pubring.db for now.  This is a temporary
5016         hack.
5017
5018         * kbx/backend-kbx.c (be_kbx_delete): Remove unused var cert.
5019
5020 2019-12-23  Werner Koch  <wk@gnupg.org>
5021
5022         gpg: Fix output of --with-secret if a pattern is given.
5023         + commit 59d49e4a0ac2ed27803507cb7d2c6af166527bd5
5024         * g10/keylist.c (list_one): Probe for a secret key in --with-secret
5025         mode.
5026
5027         kbx: Change keyboxd to work only with one database.
5028         + commit 8a556c23a29776b2b5aa1d563e779b6ae0139dff
5029         * kbx/frontend.c (the_database): New var.
5030         (db_desc_t): Remove.
5031         (kbxd_add_resource): Renamed to ...
5032         (kbxd_set_database): this.  Simplify.
5033         (kbxd_search): Change to use only one database.
5034         (kbxd_store): Ditto.
5035         (kbxd_delete): Ditto.
5036
5037 2019-12-19  NIIBE Yutaka  <gniibe@fsij.org>
5038
5039         scd: Enhance KEYINFO command to limit listing with capability.
5040         + commit b2a2df174b216881387ae849770d875cd74984c2
5041         * scd/app-common.h: Add CAPABILITY argument to the WITH_KEYGRIP.
5042         (app_do_with_keygrip): Likewise.
5043         * scd/app-openpgp.c (send_keyinfo_if_available): New.
5044         (do_with_keygrip): Support listing with CAPABILITY.
5045         * scd/app-piv.c (do_with_keygrip): Likewise.
5046         * scd/app.c (maybe_switch_app): Supply the argument.
5047         (app_do_with_keygrip): Add CAPABILITY argument.
5048         * scd/command.c (cmd_pksign, cmd_pkauth): Supply the argument.
5049         (cmd_pkdecrypt): Likewise.
5050         (cmd_keyinfo): Support listing with CAPABILITY.
5051
5052 2019-12-06  Werner Koch  <wk@gnupg.org>
5053
5054         sm: Add special case for expired intermediate certificates.
5055         + commit d246f317c04862cacfefc899c98da182ee2805a5
5056         * sm/gpgsm.h (struct server_control_s): Add field 'current_time'.
5057         * sm/certchain.c (find_up_search_by_keyid): Detect a corner case.
5058         Also simplify by using ref-ed cert objects in place of an anyfound
5059         var.
5060
5061         dirmngr: Tell gpg about WKD looks resulting from a cache.
5062         + commit 8a6ecc6ff52b9ec045e200cc200977707278f89c
5063         * dirmngr/server.c (proc_wkd_get): Print new NOTE status
5064         "wkd_cached_result".
5065         * g10/call-dirmngr.c (ks_status_cb): Detect this and print a not ein
5066         verbose mode.
5067
5068 2019-12-04  Werner Koch  <wk@gnupg.org>
5069
5070         gpg: Use AKL for angle bracketed mail address with -r.
5071         + commit 1abb39fdaf44c2477719fbea43ef8042d8b9033e
5072         * g10/getkey.c (get_pubkey_byname): Extend is_mbox checking.
5073         (get_best_pubkey_byname): Ditto.
5074
5075 2019-11-28  Werner Koch  <wk@gnupg.org>
5076
5077         gpg: Change the way v5 fingerprints are printed.
5078         + commit d2ff62dbdf891319e6db5850c6077c85e5eb784e
5079         * g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): Increase by one.
5080         * g10/keyid.c (format_hexfingerprint): Change v5 key formatting.
5081
5082         gpg: Implement insert, update, and delete via keyboxd.
5083         + commit 7244666926929f3b2475d8cab50db3ff620cdbe3
5084         * g10/call-keyboxd.c (struct store_parm_s): New.
5085         (store_inq_cb): New.
5086         (keydb_update_keyblock): Implement the keyboxd part.
5087         (keydb_insert_keyblock): Ditto.
5088         (keydb_delete_keyblock): Ditto.
5089         (keydb_search_reset): Clear ubid flag.  Also use the correct union
5090         member for building the search string.
5091
5092         kbx: Add new command DELETE.
5093         + commit 490e0cd0bab8d8d06ffdc5b8977964d5a76a8df0
5094         * kbx/kbxserver.c (cmd_delete): New.
5095         * kbx/frontend.c (kbxd_delete): New.
5096         * kbx/backend-kbx.c (be_kbx_delete): New.
5097
5098         kbx: Redefine the UBID which is now the primary fingerprint.
5099         + commit 915297705af6f1db74dacf0d6665b83eb0a58459
5100         * common/util.h (UBID_LEN): New.  Use it at all places.
5101         * kbx/keybox-blob.c (create_blob_finish): Do not write the UBID item.
5102         * kbx/keybox-dump.c (print_ubib): Remove.
5103         (_keybox_dump_blob): Do not print the now removed ubid flag.
5104         * kbx/keybox-search-desc.h (struct keydb_search_desc): Use constants
5105         for the size of the ubid and grip.
5106         * kbx/keybox-search.c (blob_cmp_ubid): New.
5107         (has_ubid): Make it a simple wrapper around blob_cmp_ubid.
5108         (keybox_get_data): Add arg 'r_ubid'.
5109
5110         * kbx/frontend.h (enum kbxd_store_modes): New.
5111         * kbx/kbxserver.c (cmd_store): Add new option --insert.
5112
5113         * kbx/backend-cache.c (be_cache_initialize): New.
5114         (be_cache_add_resource): Call it here.
5115         * kbx/backend-kbx.c (be_kbx_seek): Remove args 'fpr' and 'fprlen'.
5116         (be_kbx_search): Get the UBID from keybox_get_data.
5117         * kbx/backend-support.c (be_fingerprint_from_blob): Replace by ...
5118         (be_ubid_from_blob): new.  Change all callers.
5119
5120         * kbx/frontend.c (kbxd_add_resource): Temporary disable the cache but
5121         use the new cache init function.
5122         (kbxd_store): Replace arg 'only_update' by 'mode'.  Seek using the
5123         ubid.  Take care of the mode.
5124
5125 2019-11-27  Werner Koch  <wk@gnupg.org>
5126
5127         dirmngr: Replace no-strict-overflow pragma by wrapv pragma.
5128         + commit f59455d054a79068ebf480cd28f02993c1facf3b
5129         * dirmngr/dirmngr.c (time_for_housekeeping_p): Build with --fwrapv.
5130         Replace protecting macro.
5131
5132         gpg: Move a keydb function to another file.
5133         + commit 61f41cdce5b60b9df05d6531ab1b7aab84ada659
5134         * g10/keydb.c (build_keyblock_image): Move to ...
5135         * g10/build-packet.c (build_keyblock_image): here.
5136
5137 2019-11-26  Werner Koch  <wk@gnupg.org>
5138
5139         dirmngr: Rework of the LDAP code, part 1.
5140         + commit 264c15c72fe050f5e8d2f1cb2444a459df6fe99f
5141         * dirmngr/http.h (struct parsed_uri_s): Add flag is_ldap.
5142         * dirmngr/http.c (do_parse_uri): Set flag.  Do not error out for a
5143         missing slashes in an http scheme if NO_SCHEME_CHECK is active.
5144         * dirmngr/t-http.c (main): Print new flag.
5145         * dirmngr/ks-engine-ldap.c (ks_ldap_help): Use flag instead of
5146         checking the scheme.
5147         * dirmngr/ldap-parse-uri.c (ldap_uri_p): Re-implement using
5148         http_parse_uri.
5149         * dirmngr/t-ldap-parse-uri.c (main): Add option --verbose.
5150
5151         dirmngr: Make building with a TLS library mandatory.
5152         + commit 1009e4e5f71347a1fe194e59a9d88c8034a67016
5153         * configure.ac: Do not build dirmngr if no TLS is available.
5154         * dirmngr/http.c: Remove all uses of the USE_TLS macro.
5155
5156         doc: Fixed variable naming.
5157         + commit 8fb14d3b3f9c5c27ff8b9f0e7e7207ec388687ff
5158         * kbx/keybox.h: Fix naming of arguments.
5159         * scd/ccid-driver.c (print_error) [TEST]: Add missing break.  Note
5160         that this is anyway an impossible case.
5161
5162 2019-11-25  Werner Koch  <wk@gnupg.org>
5163
5164         agent: Improve --debug-pinentry diagnostics.
5165         + commit c8783b3a204b371d44b8953429652101cf2e4d1b
5166         * agent/call-pinentry.c (atfork_cb): Factor code out to ...
5167         (atfork_core): new.
5168
5169 2019-11-23  Werner Koch  <wk@gnupg.org>
5170
5171         wkd: Let --install-key write a template policy file.
5172         + commit 50cd1a58f3a612704a0056386e1d5cd7cb28d57d
5173         * tools/wks-util.c (ensure_policy_file): New.
5174         (wks_cmd_install_key): Call it.
5175
5176 2019-11-19  NIIBE Yutaka  <gniibe@fsij.org>
5177
5178         po: Apply removal of dirmngr/ldap-wrapper-ce.c.
5179         + commit 116dfb20013b73b950bbcee1d1f6c2a5d1d7ffdd
5180         * po/POTFILES.in: Update.
5181
5182 2019-11-18  Werner Koch  <wk@gnupg.org>
5183
5184         dirmngr,gpg: Better diagnostic in case of bad TLS certificates.
5185         + commit d9c7935188483dae381c12e7eef19072bbade4b3
5186         * doc/DETAILS: Specify new status code "NOTE".
5187         * dirmngr/ks-engine-http.c (ks_http_fetch): Print a NOTE status for a
5188         bad TLS certificate.
5189         * g10/call-dirmngr.c (ks_status_cb): Detect this status.
5190
5191         dirmngr: Forward http redirect warnings to gpg.
5192         + commit ae9acb8745c1654b446b3cd5b9322b235723d9cb
5193         * dirmngr/http.c: Include dirmngr-status.h
5194         (http_prepare_redirect): Emit WARNING status lines for redirection
5195         problems.
5196         * dirmngr/http.h: Include fwddecl.h.
5197         (struct http_redir_info_s): Add field ctrl.
5198         * dirmngr/ks-engine-hkp.c (send_request): Set it.
5199         * dirmngr/ks-engine-http.c (ks_http_fetch): Set it.
5200         * g10/call-dirmngr.c (ks_status_cb): Detect the two new warnings.
5201
5202 2019-11-15  NIIBE Yutaka  <gniibe@fsij.org>
5203
5204         scd,ccid: Fix detection of supported readers with pinpad.
5205         + commit 1cb9a831f6eedfa4c8950b8a7706ea77b74693f7
5206         * scd/ccid-driver.c (ccid_transceive_secure): When not supported,
5207         return CCID_DRIVER_ERR_NOT_SUPPORTED.
5208
5209 2019-11-12  Werner Koch  <wk@gnupg.org>
5210
5211         dirmngr: Use IPv4 or IPv6 interface only if available.
5212         + commit 12def3a84e0358528347107dc88cfe740a54941f
5213         * dirmngr/dns-stuff.c (cached_inet_support): New variable.
5214         (dns_stuff_housekeeping): New.
5215         (check_inet_support): New.
5216         * dirmngr/http.c (connect_server): Use only detected interfaces.
5217         * dirmngr/dirmngr.c (housekeeping_thread): Flush the new cache.
5218
5219 2019-11-12  Andre Heinecke  <aheinecke@gnupg.org>
5220
5221         dirmngr: Tune down err on missing ldapservers file.
5222         + commit 40daa0bc0bc87a521713d7dd1568f3874759a143
5223         * dirmngr/dirmngr.c (parse_ldapservers_file): Tune down error
5224         in case no such file exists.
5225
5226 2019-11-11  Werner Koch  <wk@gnupg.org>
5227
5228         dirmngr: Remove cruft from dirmngr_ldap.
5229         + commit 4c295646ba0e175743e6be13457308c1e6d21dd3
5230         * configure.ac (USE_LDAPWRAPPER): Remove ac_define and conditional.
5231         * dirmngr/Makefile.am: Remove USE_LDAPWRAPPER and considere true.
5232         * dirmngr/ldap-wrapper-ce.c: Remove.
5233         * dirmngr/ldap-wrapper.c: Remove USE_LDAPWRAPPER stuff. Minor chnages
5234         to debug output.
5235         * dirmngr/dirmngr_ldap.c: Remove USE_LDAPWRAPPER stuff.  Remove
5236         my_ldap macros.
5237         (fetch_ldap) [W32]: Use ldap_sslinit.
5238
5239         gpg: Forbid the creation of SHA-1 third-party key signatures.
5240         + commit dd18be979e138dd3712315ee390463e8ee1fe8c1
5241         * g10/sign.c (SIGNHINT_KEYSIG, SIGNHINT_SELFSIG): New.
5242         (do_sign): Add arg signhints and inhibit SHA-1 signatures.  Change
5243         callers to pass 0.
5244         (complete_sig): Add arg signhints and pass on.
5245         (make_keysig_packet, update_keysig_packet): Set signhints.
5246
5247         dirmngr: Rename an enum value for clarity.
5248         + commit eebd43d5b688e99131fcbf8f8292a485b91402a2
5249         * dirmngr/ldapserver.h: Rename LDAPSERVER_OPT.
5250
5251 2019-11-09  Werner Koch  <wk@gnupg.org>
5252
5253         gpgsm: Allow sepcification of ldaps servers.
5254         + commit 6e1c99bc397382f1ea2ba9d61a64328410adc95f
5255         * sm/gpgsm.h (struct keyserver_spec): Add field use_ldaps.
5256         * sm/gpgsm.c (parse_keyserver_line): Parse flags.
5257         * sm/call-dirmngr.c (prepare_dirmngr): Send ldaps flag to the dirmngr.
5258
5259         * dirmngr/dirmngr.h (struct ldap_server_s): Add field use_ldaps.
5260         * dirmngr/ldapserver.c (ldapserver_parse_one): Parse flags.
5261         * dirmngr/ldap.c (start_cert_fetch_ldap): Call wrapper with --tls.
5262
5263         * dirmngr/dirmngr_ldap.c: New option --tls.
5264         (fetch_ldap): Make use of that option.
5265
5266 2019-11-07  Werner Koch  <wk@gnupg.org>
5267
5268         gpg: Fix a potential loss of key sigs during import with self-sigs-only.
5269         + commit 6701a38f8e4a35ba715ad37743b8505bfd089541
5270         * g10/import.c (import_one_real): Don't do the final clean in the
5271         merge case.
5272
5273         gpg: Add option --allow-weak-key-signatures.
5274         + commit e624c41dbafd33af82c1153188d14de72fcc7cd8
5275         * g10/gpg.c (oAllowWeakKeySignatures): New.
5276         (opts): Add --allow-weak-key-signatures.
5277         (main): Set it.
5278         * g10/options.h (struct opt): Add flags.allow_weak_key_signatures.
5279         * g10/misc.c (print_sha1_keysig_rejected_note): New.
5280         * g10/sig-check.c (check_signature_over_key_or_uid): Print note and
5281         act on new option.
5282
5283         gpg: Print rfc4880bis note only in verbose mode.
5284         + commit f4047f56058cf9be2aa362fc439846ce930da8c7
5285         * g10/gpg.c (main): Change condition for an info diagnostic.
5286
5287 2019-11-06  Werner Koch  <wk@gnupg.org>
5288
5289         gpg: Remove an unused variable.
5290         + commit fd88b8847a371a2927f52afceeeb457b64cce162
5291         * g10/delkey.c (do_delete_key): here.
5292
5293         gpg: Do not require --batch when using --log-file.
5294         + commit 584b65ad7e937710a4fc6db42d6849bb3449d6ef
5295         * g10/gpg.c (main): Remove a long standing FIXME.
5296
5297 2019-10-28  NIIBE Yutaka  <gniibe@fsij.org>
5298
5299         scd,ccid: Fix GEMPC_EZIO handling.
5300         + commit c6702d77d936b3e9d91b34d8fdee9599ab94ee1b
5301         * scd/ccid-driver.c (ccid_transceive_secure): Fix for 08e6:34c2.
5302
5303 2019-10-17  NIIBE Yutaka  <gniibe@fsij.org>
5304
5305         gpg: More fix of get_best_pubkey_byname.
5306         + commit e2c2b0fb2d9b31fa1b61803d04919645a9149996
5307         * g10/getkey.c (get_best_pubkey_byname): Remove useless req_usage
5308         setting of CTX.
5309
5310         gpg: Fix two other cases in get_best_pubkey_byname.
5311         + commit 286d4c607574e91f590512a1385bb3320cf8da77
5312         * g10/getkey.c (pubkey_cmp): Handle a primary key with
5313         PUBKEY_USAGE_ENC, and make sure new key is for encryption.
5314         (get_best_pubkey_byname): Add comment for ranking.
5315
5316         doc: Fix documentation about --locate-keys.
5317         + commit 627a990f8e306d4f34bc503b303dc8b13616029e
5318         * doc/gpg.texi (--locate-keys): Remove mentioning signing keys.
5319
5320 2019-10-16  NIIBE Yutaka  <gniibe@fsij.org>
5321
5322         gpg: Fix get_best_pubkey_byname to consider the first match.
5323         + commit f2734381ae1431e395a0bed16df2f4d5d13aa2c5
5324         * g10/getkey.c (get_best_pubkey_byname): Always use PK0 to search
5325         by get_pubkey_byname.  Add initial call to pubkey_cmp to fill
5326         BEST at first before the loop.
5327
5328 2019-10-15  Werner Koch  <wk@gnupg.org>
5329
5330         gpg: Also delete key-binding signature when deleting a subkey.
5331         + commit d1bc12d1b66e0657969a8eb846bdcd9bee717a7c
5332         * g10/delkey.c (do_delete_key): Simplify and correct subkey deletion.
5333
5334 2019-10-15  NIIBE Yutaka  <gniibe@fsij.org>
5335
5336         gpg: Put the first key in candidates correctly.
5337         + commit 44604209c1cfe18532d13eda63d8c1f86a6e12ec
5338         * g10/getkey.c (get_best_pubkey_byname): After the call of
5339         get_pubkey_byname, set up CTX with KEYDB_SEARCH_MODE_LONG_KID to enter
5340         the loop.
5341
5342         scd,ccid: Add 08e6:34c2 (GEMPC_EZIO).
5343         + commit c933c15d587a1c0df3f4b3bf37d8d15164dd318f
5344         * scd/ccid-driver.c (ccid_transceive_secure): Add pinpad support
5345         for 08e6:34c2 which supports extended APDU exchange.
5346
5347 2019-10-09  NIIBE Yutaka  <gniibe@fsij.org>
5348
5349         gpg: The first key should be in candidates.
5350         + commit 7535f1d47a35e30f736f0e842844555f7a4a9841
5351         * g10/getkey.c (get_best_pubkey_byname): Handle the first key
5352         as the initial candidate for the selection.
5353
5354 2019-10-07  Werner Koch  <wk@gnupg.org>
5355
5356         kbx: Implement update for the STORE command.
5357         + commit f4bdf8e590877e9bfddfd19a4e4167f6531c9fb1
5358         * kbx/backend-kbx.c (be_kbx_update): New.
5359         * kbx/frontend.c (kbxd_store): Call it.
5360
5361 2019-10-07  NIIBE Yutaka  <gniibe@fsij.org>
5362
5363         gpg: Fix a memory leak in get_best_pubkey_byname.
5364         + commit e28572116fe4c586ba9d1e8f27389bf3f06e036b
5365         * g10/getkey.c (get_best_pubkey_byname): Free the public key parts.
5366
5367 2019-10-03  Werner Koch  <wk@gnupg.org>
5368
5369         gpg: Ignore all SHA-1 signatures in 3rd party key signatures.
5370         + commit 7d9aad63c4f1aefe97da61baf5acd96c12c0278e
5371         * g10/sig-check.c (check_signature_over_key_or_uid): No cut-off date
5372         and remove debug output.
5373
5374         gpg: Be prepared for chosen-prefix SHA-1 collisions in key signatures.
5375         + commit c4f2d9e3e1d77d2f1f168764fcdfed32f7d1dfc4
5376         * g10/sig-check.c (check_signature_over_key_or_uid): Reject cewrtain
5377         SHA-1 based signatures.
5378
5379 2019-10-01  Werner Koch  <wk@gnupg.org>
5380
5381         gpg: Read the UBID from the keybox and detect wrong blob type.
5382         + commit 63dbc817e7dcc6edc757281f09e1ca80500ab2d1
5383         * g10/keydb-private.h (struct keydb_handle_s): Add fields for UBID.
5384         * g10/call-keyboxd.c (search_status_cb): New.
5385         (keydb_search): Set new UBID fields.
5386
5387         kbx: Add first version of STORE command to keyboxd.
5388         + commit c7293a4d125c4675c86ecdee0f2f3186fc4bdaf7
5389         * kbx/Makefile.am (keyboxd_CFLAGS): -DKEYBOX_WITH_X509.
5390         (keyboxd_LDADD): Add libksba.
5391         * kbx/kbxserver.c (cmd_store): New.
5392         * kbx/frontend.c (kbxd_store): New.
5393         * kbx/backend-support.c (is_x509_blob): New.
5394         (be_fingerprint_from_blob): New.
5395         * kbx/backend-kbx.c (be_kbx_seek): Add args FPR and FPRLEN.
5396         (be_kbx_insert): New.
5397
5398         common: New function hex2fixedbuf.
5399         + commit 61765136cf92be2884603bc3fac020a1c6ed91f4
5400         * common/convert.c (hex2fixedbuf): New.
5401
5402 2019-09-30  Werner Koch  <wk@gnupg.org>
5403
5404         gpg: Fix --recv-key in case of a given fingerprint.
5405         + commit a605dbb430b1f73ef974ad54f74679dfc0eefb18
5406         * g10/keyserver.c (keyserver_retrieval_screener): Compare against
5407         actual length.
5408
5409         gpg: Fix expand GPG groups when resolving a key.
5410         + commit ec81c437e71b4c630a799ed29447cc5e3db162cd
5411         * g10/expand-group.c (expand_group): Add arg prepend_input.
5412         * g10/pkclist.c (build_pk_list): Adjust for it.
5413         * g10/getkey.c (key_byname): Keep the expanded names in the CTX and
5414         don't premature free them.
5415         (get_pubkey_byname): Append the namelist to the extra_list.
5416
5417 2019-09-27  Werner Koch  <wk@gnupg.org>
5418
5419         gpg: Fix a recently introduced printf format buglet.
5420         + commit b966a7c142ab6341f4149d55e2609dbb9914acec
5421         * g10/parse-packet.c (dump_sig_subpkt): Fix format error.
5422
5423         kbx: Fix error code return in keyboxd.
5424         + commit 8e574130482167dc7d2e2888cc80ad6584345e3d
5425         * kbx/frontend.c (kbxd_add_resource): Print a diagnostic on error.
5426         * kbx/backend-kbx.c (be_kbx_add_resource): Acttually returh the error
5427         code.
5428
5429         kbx: Store the UBIB in the blob.
5430         + commit 0af1c6447dc0f981ab7306e3bef520f37aded167
5431         * kbx/keybox-blob.c (create_blob_header): New blob flag UBIB.
5432         (create_blob_finish): Write the UBIB.
5433         * kbx/keybox-dump.c (print_ubib): New.
5434         (_keybox_dump_blob): Print UBIB flag.
5435         * kbx/keybox-search.c (has_ubid): Compare the stored UBIB if
5436         available.
5437
5438         kbx,gpg: Allow lookup using a UBID.
5439         + commit 4be79b5abeae82b9840e6aa93874f743e13c6df7
5440         * common/userids.c (classify_user_id): Detect UBIDs.
5441         * kbx/backend-cache.c (blob_table_put): Store the public key type.
5442         (be_cache_search): Add search mode for UBIDs.
5443         * kbx/backend.h (struct db_request_part_s): Add cache.seqno_ubid.
5444         * g10/keydb.c (keydb_search_desc_dump): Fix printing of keygrip.  Add
5445         ubid printing.
5446         * g10/call-keyboxd.c (keydb_search): Support search by UBID.
5447
5448         kbx: First take on a cache for the keyboxd.
5449         + commit 280e9c9cfac31ae5ac874c928eee063cc922e27e
5450         * kbx/backend.h (enum database_types): Add DB_TYPE_CACHE.
5451         (struct db_request_part_s): Add seqno fields.
5452         (struct db_request_s): Add infos for the cache backend.
5453         * kbx/backend-support.c (struct backend_handle_s): Add 'backend_id'.
5454         (strdbtype): Support DB_TYPE_CACHE.
5455         (be_generic_release_backend): Ditto.
5456         (be_find_request_part): New.
5457         (be_return_pubkey): New arg UBID and chnage status name.
5458         * kbx/backend-cache.c: New.
5459         * kbx/backend-kbx.c (be_kbx_init_request_part): New.
5460         (be_kbx_search): Factor some code out to a support function.
5461         (be_kbx_seek): New.
5462         * kbx/frontend.c (kbxd_add_resource): Support DB_TYPE_CACHE.
5463         (kbxd_search): Support the NEXR operation with the cache.
5464         * kbx/keybox-search-desc.h (KEYDB_SEARCH_MODE_UBID): New.
5465         (struct keydb_search_desc): Add field u.ubid.
5466         * kbx/keybox-search.c (has_ubid): New.
5467         (keybox_search): Support the UBID search.
5468
5469 2019-09-20  NIIBE Yutaka  <gniibe@fsij.org>
5470
5471         build: Build gpg-pair-tool only when there is newer libgcrypt.
5472         + commit bb5ed9fe1abfcbb6128325508366bc802eb576c5
5473         * configure.ac (HAVE_NEWER_LIBGCRYPT): New.
5474         * tools/Makefile.am: Conditionalize build of gpg-pair-tool.
5475
5476 2019-09-19  NIIBE Yutaka  <gniibe@fsij.org>
5477
5478         tools: Fix gpg-pair-tool to follow new API.
5479         + commit 7c81e5cb97c77244be164daf7a80e29f6b6e437b
5480
5481
5482         tools: Don't prepare G in gpg-pair-tool.
5483         + commit b928de70e072fce15d7bba39f370d32dd8b74095
5484         * tools/gpg-pair-tool.c (create_dh_keypair): Use NULL for G.
5485
5486         tools: Use new API of libgcrypt for gpg-pair-tool.
5487         + commit f22a00416149448172bf8110d466d65c87962cae
5488         * tools/gpg-pair-tool.c (create_dh_keypair): Just use
5489         gcry_random_bytes for secret.  Call gcry_ecc_mul_point
5490         with G to get the public key.
5491         (compute_master_secret): Use gcry_ecc_mul_point.
5492
5493 2019-09-17  NIIBE Yutaka  <gniibe@fsij.org>
5494
5495         scd,pcsc: Use HANDLE for context and card.
5496         + commit 49671b76eae2c7d1edb13ed927654d0c11d879f1
5497         * scd/apdu.c (HANDLE): New.
5498
5499 2019-09-12  NIIBE Yutaka  <gniibe@fsij.org>
5500
5501         scd: Remove old fallback logic from CCID to PC/SC.
5502         + commit 980d0234d31699e51051e0cc6002ad177b6e7136
5503         * scd/apdu.c (apdu_dev_list_start): Return an error on failure.
5504
5505         scd,pcsc: Support "reader-port" option for PC/SC reader.
5506         + commit 6d750fe7fc4224924f13ef578010a26cdbe0a67b
5507         * scd/apdu.c (apdu_open_reader): Skip use of a reader if it's not the
5508         one specified when it is specified.
5509
5510         scd,pcsc: Remove the restriction of no-scanning in PC/SC.
5511         + commit c569e49d1764d2573aec5684f9cee397bdd8ccb1
5512         * scd/apdu.h (app_open_reader): Remove the last argument.
5513         * scd/apdu.c (app_open_reader): Ditto.
5514         * scd/app.c (select_application): Don't supply APP_EMPTY.
5515
5516 2019-09-11  NIIBE Yutaka  <gniibe@fsij.org>
5517
5518         scd,pcsc: Fix examining the list of readers.
5519         + commit 92be4e87eec984a3f3737339c311761d2650c55a
5520         * scd/apdu.c (apdu_dev_list_start): Traverse the string+NUL carefully.
5521
5522         scd,pcsc: Fix for initializing PC/SC.
5523         + commit 441106cdf0fdd310e3b36370186849167db11345
5524         * scd/apdu.c (pcsc_init): Load it at first.
5525         (apdu_open_reader): Check for the CCID internal driver.
5526
5527         scd,pcsc: Support multiple card readers.
5528         + commit e8534f899915a039610973a84042cbe25a5e7ce2
5529         * scd/apdu.c (close_pcsc_reader, apdu_init): Clear pcsc.rdrname.
5530         (pcsc_init): Load of PC/SC module moved from ...
5531         (open_pcsc_reader): ... here.
5532         (apdu_dev_list_start): Add support for PC/SC.
5533         (apdu_dev_list_finish): Likewise.
5534         (apdu_open_reader): Likewise.
5535
5536         scd,pcsc: Use a single context.
5537         + commit 1080e91efd60cb41c2d6dbafaee810e5967a3161
5538         * scd/apdu.c (pcsc): New variable.
5539         (struct reader_table_s): Remove pcsc.context from member.
5540         (pcsc_get_status, connect_pcsc_card): Use pcsc.context.
5541         (close_pcsc_reader): Release pcsc.context here with reference count.
5542         (pcsc_init): New.
5543         (open_pcsc_reader): Don't call pcsc_establish_context here.  Call
5544         close_pcsc_reader instead of pcsc_release_context.
5545         (apdu_open_reader): Call pcsc_init if needed.
5546         (apdu_init): Initialize pcsc.count and pcsc.context.
5547
5548         scd: Clean up the structure for future fix of PC/SC.
5549         + commit f44aa290c1368a3119b2323664c0f356195c4206
5550         * scd/apdu.c (struct dev_list): Rename from ccid_table, with void*.
5551         (open_ccid_reader): Follow the change.
5552         (apdu_dev_list_start, apdu_dev_list_finish): Likewise.
5553         (apdu_open_reader): Likewise.
5554         * scd/ccid-driver.c (ccid_dev_scan): Use void *.
5555         (ccid_dev_scan_finish, ccid_get_BAI, ccid_open_usb_reader): Likewise.
5556         * scd/ccid-driver.h: Change the APIs.
5557
5558 2019-09-10  Werner Koch  <wk@gnupg.org>
5559
5560         gpg: First rough implementation of keyboxd access for key lookup.
5561         + commit ce9906b008c94c2aa4ac770a981d1e1e0b8aea47
5562         * g10/Makefile.am: Add nPth flags.
5563         * g10/gpg.c: Include npth.h.
5564         (gpg_deinit_default_ctrl): Deinit call-keyboxd local data.
5565         (main): Init nPth.
5566         * g10/keydb-private.h (struct keydb_handle_s): Add field 'kbl' and
5567         remove the search result and the assuan context.
5568         * g10/call-keyboxd.c (struct keyboxd_local_s): Add more fields.
5569         (lock_datastream, unlock_datastream): New.
5570         (gpg_keyboxd_deinit_session_data): Adjust for changed data structures.
5571         (prepare_data_pipe): New.
5572         (open_context): Return kbl instead of an Assuan context.  Init mutexes
5573         etc.
5574         (close_context): Merge into ...
5575         (keydb_release): here.  Adjust for changed data structures.
5576         (datastream_thread): New.
5577         (keydb_get_keyblock): Implement datastream stuff.
5578         (keydb_search): Ditto.
5579
5580         * common/asshelp.c (wait_for_sock): Add arg connect_flags.
5581         (start_new_service): Set FDPASSING flag for the keyboxd.
5582
5583         kbx: Allow fd-passing for the keyboxd.
5584         + commit 6c327b4dd6d8041b84f856ffc2a7d82b352d273f
5585         * kbx/kbxserver.c: Include host2net.h
5586         (struct server_local_s): Add field outstream.
5587         (prepare_outstream): New.
5588         (kbxd_writen): New.
5589         (kbxd_write_data_line): Write to file descrptor.  Disable the slow
5590         human reader friendly data line formatting.
5591         (cmd_search, cmd_next): Disable data logging.
5592         (kbxd_start_command_handler): Add OUTPUT command.
5593         * kbx/keyboxd.c (main): Enable log monitor.
5594
5595         common: Allow a readlimit for iobuf_esopen.
5596         + commit 2f0fdab8aabdf408495163ef99b2d4d111f74692
5597         * common/iobuf.c (file_es_filter_ctx_t): Add fields use_readlimit and
5598         readlimit.
5599         (file_es_filter): Implement them.
5600         (iobuf_esopen): Add new arg readlimit.
5601         * g10/decrypt-data.c (decrypt_data): Adjust for change.
5602         * g10/import.c (import_keys_es_stream): Ditto.
5603
5604 2019-09-10  Andre Heinecke  <aheinecke@gnupg.org>
5605
5606         doc: Fix distchek for generated eps file.
5607         + commit c69a37dcbdc8db47489fbf744f58bb61399d223f
5608         * doc/Makefile.am (EXTRA_DIST, BUILT_SOURCES): Add
5609         gnupg-module-overview.eps, gnupg-card-architecture.eps
5610         (DISTCLEANFILES): Remove them.
5611
5612 2019-09-09  Werner Koch  <wk@gnupg.org>
5613
5614         gpg: New option --use-keyboxd.
5615         + commit aba82684fe14289cf62b4694bc398f3a274b4762
5616         * g10/gpg.c (oUseKeyboxd,oKeyboxdProgram): New consts.
5617         (opts): New options --use-keyboxd and --keyboxd-program.
5618         (main): Implement them.
5619         * g10/keydb.c: Move some defs out to ...
5620         * g10/keydb-private.h: new file.
5621         * g10/keydb.c: prefix function names with "internal" and move original
5622         functions to ...
5623         * g10/call-keyboxd.c: new file.  Divert to the internal fucntion if
5624         --use-keyboxd is used.  Add a CTRL arg to most fucntions and change
5625         all callers.
5626         * g10/Makefile.am (common_source): Add new files.
5627         (noinst_PROGRAMS): Do bot build gpgcompose.
5628
5629         kbx: Fix keyboxd search first.
5630         + commit 5e00c1773d8fd44ba95b39a48e12b0ec94ac8cbe
5631         * kbx/kbxserver.c (cmd_next): Switch to mode next if needed.
5632
5633         kbx: Allow searching from start.
5634         + commit 1545b948e1c8e8fa4873d434fb790a88ed96091c
5635         * kbx/kbxserver.c (cmd_search): Detect empty pattern.
5636
5637 2019-09-06  Stephan Mueller  <smueller@chronox.de>
5638
5639         gpg: expand GPG groups when resolving a key.
5640         + commit e825aea2ba3529c333d7ec2c76e63998cb83d999
5641         * g10/expand-group.c: New
5642         * g10/pkclist.c: Extract expand_group and expand_id into expand-group.c.
5643         * g10/keydb.h: Add prototypes of expand_id and expand_group.
5644         * g10/getkey.c: Use expand_group before resolving key references.
5645         * g10/Makefile.am: Compile expand-group.c.
5646
5647 2019-09-06  Werner Koch  <wk@gnupg.org>
5648
5649         gpg: Make --quiet work on --send-keys.
5650         + commit d9c4c3776b8ec3261e13693e230dd480b1127b18
5651         * g10/keyserver.c (keyserver_put): Act upon --quiet.
5652
5653 2019-09-05  Werner Koch  <wk@gnupg.org>
5654
5655         gpg: Prepare parser for the new attestation certificates.
5656         + commit 209caaff66fbe96df144e6b1474435992e087fa4
5657         * common/openpgpdefs.h (SIGSUBPKT_ATTST_SIGS): New.
5658         * g10/keydb.h (IS_ATTST_SIGS): New.
5659         (IS_CERT): Include the new one.
5660         * g10/sign.c (mk_notation_policy_etc): Do not put notations into
5661         attestation key signatures.
5662         * g10/parse-packet.c (dump_sig_subpkt): Add new arg digest_algo.
5663         Print the attestation sigs.
5664         (parse_one_sig_subpkt): Support SIGSUBPKT_ATTST_SIGS.
5665         (can_handle_critical): Ditto.
5666         (enum_sig_subpkt): Pass digest algo to dump_sig_subpkt.
5667
5668         gpg: Rework the signature subpacket iteration function.
5669         + commit e1d9be730ca07e10a20df5ef60d7562030f10676
5670         * g10/parse-packet.c (enum_sig_subpkt): Replace first arg by two args
5671         so that the entire signature packet is available.  Change all callers.
5672         (parse_sig_subpkt): Ditto.
5673
5674         scd: Implement auto-switching between Yubikey apps.
5675         + commit 7febb4f2476742936b829424ad23df662b37f4b4
5676         * scd/app.c (apptype_from_keyref): New.
5677         (maybe_switch_app): Add arg 'keyref' and use this also for switching.
5678         Change all callers to pass a keyref if needed.
5679
5680         scd:openpgp: Avoid PIN caching issues after re-select.
5681         + commit 5d9eb060b764d45152edb266cd8a08f5724ad709
5682         * scd/app-openpgp.c (do_reselect): Clear PIN cache flags.
5683
5684         scd:piv: Allow the keygrip as alternative to a keyref.
5685         + commit 947b44e835dec5967d400a9391d8746fb3f759df
5686         * scd/app-piv.c (find_dobj_by_keyref): Allow the keygrip as input.
5687
5688         scd: Improve locking of app_do_with_keygrip.
5689         + commit c8d739a356d3dacdf63fa2d722d117401cf52caf
5690         * scd/app.c (app_do_with_keygrip): Lock once per card.
5691
5692         scd: New debug flag "app".
5693         + commit 4e701953fec6efb10aaf34373e648b1dcafba054
5694         * scd/scdaemon.h (DBG_APP_VALUE, DBG_APP): New.
5695         * scd/scdaemon.c (debug_flags): Add "app".
5696         * scd/app.c (xstrapptype): New.
5697         (app_readcert, app_readkey, app_getattr): Add debug output.
5698         (app_setattr, app_sign, app_auth): Ditto.
5699         (app_writecert, app_writekey, app_change_pin): Ditto.
5700         (app_check_pin): Ditto.
5701
5702 2019-09-05  NIIBE Yutaka  <gniibe@fsij.org>
5703
5704         agent: Fix ask_for_card to allow a key on multiple cards.
5705         + commit 9f39e0167d0642bcfb9bcabcbc7f8160b39a20ee
5706         * agent/divert-scd.c (ask_for_card): Don't use SERIALNO to select
5707         card, but use KEYGRIP.
5708
5709 2019-09-04  Werner Koch  <wk@gnupg.org>
5710
5711         scd: New sub-command cmd_has_option for GETINFO.
5712         + commit fed9c93e05af4aeeb2fe9af81200fc7a745f2dec
5713         * scd/command.c (cmd_getinfo): Add cmd_has_option sub-command.
5714
5715         scd: Add option --all to the SERIALNO command.
5716         + commit 9a0d8f2d8906d2f37c2755c4695b91c27c8acc2f
5717         * scd/command.c (cmd_serialno): Add option --all.
5718         (open_card_with_request): Implement that option.
5719         * scd/app.c (select_all_additional_applications_internal): New.
5720         (select_additional_application): Add mode to call new function.
5721
5722         scd: Fix Error checking in additioal app selection.
5723         + commit fa258379424c6d48538b054b8dc7c1ab5c2d4290
5724         * scd/app.c (select_additional_application): Return error for unknown
5725         NAME.
5726
5727         scd: Add option --multi to the LEARN command.
5728         + commit 5cf5a04bae03d622a42753735c60dfab3b24ade8
5729         * scd/app-common.h (APP_LEARN_FLAG_MULTI): New.
5730         * scd/command.c (cmd_learn): Add option --multi.
5731         * scd/app.c (app_write_learn_status): Factor some code out to ...
5732         (write_learn_status_core): new.
5733         (app_write_learn_status): Implement flag --multi.
5734
5735         scd: Use a macro for the flag parameter of learn_status.
5736         + commit 2cdea776cd6db13c8f4ff45c89bd3292f216b186
5737         * scd/app-common.h (APP_LEARN_FLAG_KEYPAIRINFO): New flag macro..
5738         * scd/command.c (cmd_learn): Pass that flag instead of a plain number.
5739         * scd/app-nks.c (do_learn_status_core): Use new flag.
5740         * scd/app-p15.c (do_learn_status): Ditto.
5741         * scd/app-piv.c (do_learn_status): Ditto.
5742         * scd/app-sc-hsm.c (do_learn_status): Ditto.
5743         * scd/app.c (app_write_learn_status): Ditto.
5744
5745 2019-08-23  Werner Koch  <wk@gnupg.org>
5746
5747         gpg,sm: Implement keybox compression run and release lock in gpgsm.
5748         + commit e64f0dfd72de548837f630bccd249a87451b89c5
5749         * g10/keydb.c (keydb_add_resource): Call keybox_compress.
5750         * sm/keydb.c (keydb_add_resource): Release the lock after a compress.
5751
5752         kbx: Include deleted records into the --stats output.
5753         + commit 5ef0d7a795cf2462314ea0cb72c7efa7243ab405
5754         * kbx/keybox-dump.c (_keybox_dump_file): Take deleted records in
5755         account.
5756
5757         kbx: Fix regression in compression trigger from July 18.
5758         + commit 30aaa4ba007210aa043c3d524415495a4d9fd17f
5759         * kbx/keybox-update.c (keybox_compress): Change condition back.
5760         Also use make_timestamp for CUT_TIME.
5761
5762         gpg: Allow --locate-external-key even with --no-auto-key-locate.
5763         + commit d058d80ed0d5edeff6d85108054b1dfd45ddad7d
5764         * g10/getkey.c (akl_empty_or_only_local): New.
5765         * g10/gpg.c (DEFAULT_AKL_LIST): New.
5766         (main): Use it here.
5767         (main) <aLocateExtKeys>: Set default AKL if none is set.
5768
5769         gpg: Silence some warning messages during -Kv.
5770         + commit d7aca1bef68589134b36395901b92496a7a37392
5771         * g10/options.h (glo_ctrl): Add flag silence_parse_warnings.
5772         * g10/keylist.c (list_all): Set that during secret key listsings.
5773         * g10/parse-packet.c (unknown_pubkey_warning): If new flag is set do
5774          not print info message normally emitted inh verbose mode.
5775         (can_handle_critical_notation, enum_sig_subpkt): Ditto.
5776         (parse_signature, parse_key, parse_attribute_subpkts): Ditto.
5777
5778         gpg: Do not show two informational diagnostics with quiet.
5779         + commit f14ddeb89c4519cd7ccf52c4595b93ab11ccbda1
5780         * g10/trustdb.c (verify_own_keys): Silence informational diagnostic.
5781
5782         gpgconf: Suggest the use of --gpgconf-test on --launch problems.
5783         + commit 2a45800b2f8043d2533403eaadf8736d15ad7017
5784         * tools/gpgconf-comp.c (gc_component_launch): Change suggestion.
5785
5786 2019-08-22  Werner Koch  <wk@gnupg.org>
5787
5788         gpg: Extend --quick-gen-key for creating keys from a card.
5789         + commit d3f5d8544fdb43082ff34b106122bbf0619a0ead
5790         * g10/keygen.c (parse_key_parameter_part): Add arg R_KEYGRIP and
5791         support the special algo "card".
5792         (parse_key_parameter_string): Add args R_KEYGRIP and R_SUBKEYGRIP.
5793         Handle the "card" algo.  Adjust callers.
5794         (parse_algo_usage_expire): Add arg R_KEYGRIP.
5795         (quickgen_set_para): Add arg KEYGRIP and put it into the parameter
5796         list.
5797         (quick_generate_keypair): Handle algo "card".
5798         (generate_keypair): Also handle the keygrips as returned by
5799         parse_key_parameter_string.
5800         (ask_algo): Support ed25519 from a card.
5801
5802 2019-08-22  NIIBE Yutaka  <gniibe@fsij.org>
5803
5804         gpg: Factor export_ssh_key.
5805         + commit 6f760e6eb0e8820d386b33c28cb14210adfc6aef
5806         * g10/export.c (export_one_ssh_key): Factor out.
5807         (export_ssh_key): Use export_one_ssh_key.
5808
5809         dns: Fix irrelevant use of tmpfile.
5810         + commit e00e68135c01351ed66fed3c4453a1b13c8d522f
5811         * dirmngr/dns.c (dns_trace_open): Don't use tmpfile.
5812
5813 2019-08-21  Werner Koch  <wk@gnupg.org>
5814
5815         gpg: In a list of card keys show the standard keys.
5816         + commit ce403c74dbc9c027b823910f22338269e625f76f
5817         * g10/keygen.c (ask_algo): Identify the standard keys.
5818
5819         scd:nks: Extend keypairinfo with usage flags.
5820         + commit 0d2c9ef29c1741845df2d56f0024f87eab42efb3
5821         * scd/app-nks.c (do_learn_status_core): Return usage.
5822
5823         (cherry picked from commit 0a9053eff0406c6799ee201013194200c0ed3487)
5824
5825         scd:nks: Support attributes $ENCRKEYID and $SIGNKEYID.
5826         + commit 671e54d62c39a9e196d13714cb67c2f3c38f2fa0
5827         * scd/app-nks.c (do_getattr): Add new attributes.
5828
5829         gpg: New option --use-only-openpgp-card.
5830         + commit c97c2e578dd173ef5e7916a3aa539b3a65a7d86d
5831         * g10/gpg.c (opts): Add option.
5832         (main): Set flag.
5833         * g10/options.h: Add flags.use_only_openpgp_card.
5834         * g10/call-agent.c (start_agent): Implement option.
5835
5836 2019-08-21  NIIBE Yutaka  <gniibe@fsij.org>
5837
5838         scd: Fix check_application_conflict.
5839         + commit 6fae96094c973be880919f3a7798ca69d9365b69
5840         * scd/scd/app.c (check_application_conflict): Compare APPTYPE.
5841
5842         scd: Fix selecting additional APP.
5843         + commit 8dc19d35e854264cfe503cdbb9e5ccafa9bc97d0
5844         * scd/app.c (select_additional_application_internal): Factor out.
5845         (select_additional_application): Getting the lock and call
5846         select_additional_application_internal, set current_apptype, then.
5847         (select_application): Call select_additional_application_internal
5848         for Yubikey.
5849
5850         scd: Fix how select_additional_application is called.
5851         + commit 4781c4a86608b57f9d1daf55b9b2970130fe6120
5852         * scd/app.c (check_application_conflict): Check against current APP.
5853         (select_additional_application): Update current_apptype of CTRL.
5854
5855         scd: Fix resetting CARD_CTX.
5856         + commit 09d000babb71990ef1b3f42017a67516bb994388
5857         * scd/app.c (deallocate_card): Don't call scd_clear_current_app.
5858         (card_reset): Reset ctrl->current_apptype.
5859         * scd/command.c (open_card_with_request): Likewise.
5860         (send_client_notifications): Likewise.
5861         (scd_clear_current_app): Remove.
5862
5863         scd: Fix switching to another APP.
5864         + commit d4f135c34b332f1f833617a7f1ef0bdbff5eb589
5865         * scd/app.c (select_additional_application): Initialize card of APP.
5866         Break after the selection.
5867         Don't free APP if success.
5868
5869 2019-08-20  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
5870
5871         doc: fix minor spelling and tense errors.
5872         + commit b7793c3af32b2d99359022f805636953a50d8c68
5873         * doc/{gpg,gpgsm,wks}.texi: minor orthographic cleanup.
5874
5875         doc: clarify CARD event counter.
5876         + commit cba6e1bd7242e8b8c6822f4e93368cb315b5524b
5877         * doc/gpg-agent.texi: improve documentation of CARD entry in
5878         GETEVENTCOUNTER description.
5879
5880 2019-08-08  Andre Heinecke  <aheinecke@intevation.de>
5881
5882         speedo, w32: Add w32-wixlib target for MSI package.
5883         + commit 0b7088dc8035e8d5832c89085eea3b288de67710
5884         * Makefile.am (EXTRA_DIST): Add wixlib.wxs
5885         * build-aux/speedo.mk (w32-wixlib): New target.
5886         (w32-release): Build wixlib if WIXPREFIX is set.
5887         (help): Add documentation.
5888         * build-aux/speedo/w32/wixlib.wxs
5889
5890 2019-08-08  Werner Koch  <wk@gnupg.org>
5891
5892         build: Sign all Windows binaries.
5893         + commit 4964691861796ad6e7bd59dd553a617f68676b2b
5894         * build-aux/speedo.mk (AUTHENTICODE_SIGNHOST): New.
5895         (AUTHENTICODE_TOOL): New.
5896         (AUTHENTICODE_FILES): New.
5897         (installer): Sign listed files.
5898         (AUTHENTICODE_SIGNHOST): New macro.
5899         (sign-installer): Use that macro instead of direct use of osslsigncode.
5900
5901 2019-08-07  NIIBE Yutaka  <gniibe@fsij.org>
5902
5903         scd: Remove fallback mechanism to PC/SC.
5904         + commit 100642e776964219936e493315eb8b7c99742f41
5905         * scd/apdu.c [HAVE_LIBUSB] (apdu_open_reader): Simply let it fail.
5906
5907 2019-08-06  NIIBE Yutaka  <gniibe@fsij.org>
5908
5909         agent: Fix an error path of agent_get_confirmation.
5910         + commit bb82ad018a7bf93bd704cf44e51cd086e41a4ad5
5911         * agent/call-pinentry.c (agent_get_confirmation): Make sure
5912         unlock_pinentry is always called.
5913
5914 2019-08-06  Werner Koch  <wk@gnupg.org>
5915
5916         kbx: Add framework for the SEARCH command.
5917         + commit 5ea6250cc5761612d17ca4fb34eed096f26e2826
5918         * kbx/backend-kbx.c: New.
5919         * kbx/backend-support.c: New.
5920         * kbx/backend.h: New.
5921         * kbx/frontend.c: New.
5922         * kbx/frontend.h: New.
5923         * kbx/kbxserver.c: Implement SEARCH and NEXT command.
5924         * kbx/keybox-search-desc.h (enum pubkey_types): New.
5925         * kbx/keybox-search.c (keybox_get_data): New.
5926         * kbx/keyboxd.c (main): Add a standard resource.
5927
5928         kbx: Allow writing using a estream.
5929         + commit 1f980d23af8b818ed8246ec6bf13b9c61b963ec0
5930         * kbx/keybox-file.c (_keybox_write_header_blob): New optional arg
5931         stream.  Change callers.
5932
5933         tools: New option --keyboxd for gpg-connect-agent.
5934         + commit 0611f548bcd3c772084d6c3111dc88a09a67f65a
5935         * configure.ac: New option --keyboxd-pgm.
5936         (KEYBOXD_NAME, KEYBOXD_DISP_NAME): New ac_defines.
5937         * common/util.h: Add substitutes for new error codes.
5938         (GNUPG_MODULE_NAME_KEYBOXD): New.
5939         * common/homedir.c (gnupg_module_name): Support
5940         GNUPG_MODULE_NAME_KEYBOXD.
5941         * common/asshelp.c (SECS_TO_WAIT_FOR_KEYBOXD): New.
5942         (wait_for_sock): Support keyboxd.
5943         (start_new_service): Ditto.
5944         (start_new_keyboxd): New.
5945         * tools/gpg-connect-agent.c: New options --keyboxd and
5946         --keyboxd-program.
5947         (start_agent): Implement new option.
5948
5949 2019-08-06  NIIBE Yutaka  <gniibe@fsij.org>
5950
5951         common: Fix line break handling, finding a space.
5952         + commit f588dd8d1766de48c90a5501cf2d537f256d003e
5953         * common/name-value.c (assert_raw_value): Correctly find a space.
5954
5955         gpg: Don't report NO_SECKEY for valid key.
5956         + commit d8a49bbcd1b1d40ab0ddadac0dbb16a5d75c626e
5957         * g10/mainproc.c (proc_encrypted): Report status of STATUS_NO_SECKEY
5958         only when some error occurred.
5959
5960 2019-08-05  Werner Koch  <wk@gnupg.org>
5961
5962         common: Remove code duplication for service starting.
5963         + commit e22ebf357050f98558b428502a565fc3dc256932
5964         * common/homedir.c (gpg_agent_socket_name): New.
5965         * common/asshelp.c (start_new_service): New.  Based on
5966         start_new_gpg_agent.
5967         (start_new_gpg_agent): Divert to start_new_service.
5968         (start_new_dirmngr): Ditto.
5969
5970 2019-08-05  NIIBE Yutaka  <gniibe@fsij.org>
5971
5972         sm: Support AES-256 key.
5973         + commit ef2424144a070c9199e40424ec8d9b5a9919aa72
5974         * sm/decrypt.c (prepare_decryption): Handle a case for AES-256.
5975
5976 2019-08-02  Werner Koch  <wk@gnupg.org>
5977
5978         common: Change yet unused status_printf function.
5979         + commit d8a84594abe4be933756db07b987dc8bcd79c8b9
5980         * common/asshelp2.c (status_printf): Rename to status_no_printf.
5981         (status_printf): New.
5982
5983 2019-07-26  NIIBE Yutaka  <gniibe@fsij.org>
5984
5985         sm: Fix error checking of decryption result.
5986         + commit 15fe78184cc66ce6e657a6e949a522d7821f8a1c
5987         * sm/call-agent.c (gpgsm_agent_pkdecrypt): Fix condition.
5988
5989 2019-07-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
5990
5991         gpg,gpgsm: Handle pkdecrypt responses with/without NUL terminators.
5992         + commit 3ba091ab8c93c87741a451f579d63dd500d7621d
5993         * g10/call-agent.c (agent_pkdecrypt): accept but do not require
5994         NUL-terminated data from the agent.
5995         * sm/call-agent.c (gpgsm_agent_pkdecrypt): accept but do not require
5996         NUL-terminated data from the agent.
5997
5998 2019-07-25  NIIBE Yutaka  <gniibe@fsij.org>
5999
6000         gpg: photoid: Use standard spawn API.
6001         + commit fd9e6ae22eb93aa5140b56e1b0fa14e6402d6099
6002         * g10/photoid.c (exec_write, exec_read, exec_finish): Remove.
6003         (setup_input_file): Rename from make_tempdir.
6004         (expand_args): Drop support of 'o' and 'O'.
6005         (fill_command_argv, run_with_pipe, create_temp_file) New.
6006         (show_photo): New with gnupg_spawn_process_fd and gnupg_wait_process.
6007         (show_photos): Call show_photo.
6008
6009         gpg: photoid: Move functions from exec.c.
6010         + commit c57c5004ec6cc7dc7b7a4f250516199a8a1e31fc
6011         * g10/exec.c (w32_system): Expose to public.
6012         (exec_write, exec_read, exec_finish, make_tempdir, expand_args): Move
6013         to photoid.c.
6014         * g10/exec.h: Likewise.
6015         * g10/photoid.c (exec_write, exec_read, exec_finish, make_tempdir)
6016         (expand_args): Move here.
6017
6018         scd: Handle CCID bwi of time extension.
6019         + commit 996c497a864d820af06333014b2c5f74d1054866
6020         * scd/ccid-driver.c (bulk_in): Increase timeout by the multiplier
6021         value as defined section 6.2.6 in CCID specification.
6022
6023         scd: Fix bBWI value.
6024         + commit 858dc9564326e65e6d8771af160d4513aea1e4eb
6025         * scd/ccid-driver.c (ccid_transceive_apdu_level): Use bBWI=0 for APDU
6026         level transfer.
6027         (ccid_transceive): Use bBWI=0 or the value returend by WTX for TPDU
6028         level transfer.
6029
6030 2019-07-24  NIIBE Yutaka  <gniibe@fsij.org>
6031
6032         common: Fix the previous commit.
6033         + commit 044379772fc5b0f39c6a36809722e702808b6ec3
6034         * common/asshelp.c [HAVE_W32_SYSTEM] (start_new_gpg_agent): Use
6035         gnupg_spawn_process_detached.
6036         (start_new_dirmngr): Likewise.
6037
6038         common: Use gnupg_spawn_process_fd to invoke gpg-agent/dirmngr.
6039         + commit b1c56cf9e2bb51abfd47747128bd2a6285ed1623
6040         * common/asshelp.c (start_new_gpg_agent): Call gnupg_spawn_process_fd
6041         and gnupg_wait_process.
6042         (start_new_dirmngr): Likewise.
6043
6044         common,w32: Fix cast from gnupg_fd_t to call _open_osfhandle.
6045         + commit a64411c607d5450e786c3207b9023394574c979b
6046         * common/sysutils.c (translate_sys2libc_fd): Use intptr_t.
6047         (gnupg_tmpfile): Likewise.
6048
6049 2019-07-23  NIIBE Yutaka  <gniibe@fsij.org>
6050
6051         gpg: A little clean up.
6052         + commit 7bfbb9fa7e7693cd7f19a8d130aa0a9a82825d5d
6053         * g10/keyserver.c: Don't include exec.h.
6054         * g10/photoid.c (image_type_to_string): It's constant.
6055         * g10/photoid.h (image_type_to_string): Likewise.
6056
6057 2019-07-22  NIIBE Yutaka  <gniibe@fsij.org>
6058
6059         scd: Error code map fix for older Yubikey.
6060         + commit 13bc0431ff1ce51246694208df611cc4561fb4b3
6061         * scd/iso7816.c (map_sw): Recognize 6A86.
6062
6063 2019-07-19  NIIBE Yutaka  <gniibe@fsij.org>
6064
6065         gpg: The option --passphrase= can be empty.
6066         + commit fcd766719a6e8f18f4be4c0f91e12aa157ca5506
6067         * g10/gpg.c (opts): Use ARGPARSE_o_s for oPassphrase to allow
6068         empty string.
6069
6070         card: Fix showing KDF object attribute.
6071         + commit 98f4eff7ffde106ae4f60739d1104282430ac14f
6072         * g10/call-agent.c (learn_status_cb): Parse the KDF DO.
6073         * g10/card-util.c (current_card_status): Show it correctly.
6074
6075         scd: Support "[CHV3]" attribute for keyid string.
6076         + commit 57565d5f975d3c00853bb49678d63ee8b896b741
6077         * scd/app-openpgp.c (check_keyidstr0: Relax the check.
6078
6079         card: Support disabling KDF functionality.
6080         + commit 9c0cd9d07546698ab66cedd06c503e6b698593f9
6081         * g10/card-util.c (kdf_setup): Can be "off".
6082
6083 2019-07-18  Werner Koch  <wk@gnupg.org>
6084
6085         kbx: Allow "gpgsm --faked-system-time" to kick off a compression run.
6086         + commit 824ca6f042dc69edaf67bf9d4e875be75babab00
6087         * kbx/keybox-update.c (keybox_compress): Use make_timestamp.
6088
6089 2019-07-18  NIIBE Yutaka  <gniibe@fsij.org>
6090
6091         gpg: More check for symmetric key encryption.
6092         + commit 44be675b759d27bac310c2de8bae1b7882a26b65
6093         * g10/dek.h (DEK): Use debugger friendly type of unsigned int.
6094         * g10/mainproc.c (symkey_decrypt_seskey): Add another check.
6095
6096 2019-07-16  NIIBE Yutaka  <gniibe@fsij.org>
6097
6098         doc: Fix description of the field 11.
6099         + commit 4195ce15f4942245a29ef20ace42ad0f27e82ffd
6100         * doc/DETAILS: Fix.
6101
6102         dirmngr: Don't add system CAs for SKS HKPS pool.
6103         + commit 75e0ec65170b7053743406e3f3b605febcf7312a
6104         * dirmngr/http.c [HTTP_USE_GNUTLS] (http_session_new): Clear
6105         add_system_cas.
6106
6107 2019-07-12  Werner Koch  <wk@gnupg.org>
6108
6109         scd: Remove useless GNUPG_SCD_MAIN_HEADER macro.
6110         + commit fb1c8978f57b8f92e2ea9d10afc1d133656c9706
6111         * scd/apdu.c (): Remove never set and useless macro.
6112         * scd/ccid-driver.c: Ditto.
6113         * scd/iso7816.c: Ditto.
6114
6115 2019-07-12  NIIBE Yutaka  <gniibe@fsij.org>
6116
6117         doc: Dependencies for figures are only for maintainers.
6118         + commit 58bab1a8784b0dbae70b5d74757cd56484292d1c
6119         * doc/Makefile.am [MAINTAINER_MODE] (.svg.eps, etc.): Enable only
6120         when maintainer-mode.
6121
6122         Fix a reference in comment.
6123         + commit 4e601c7643fcfa3d8babcce58daa4c6c6a42d338
6124         * common/openpgp-s2k.c: Fix.
6125
6126         gpg: Don't try decryption by session key when NULL.
6127         + commit 89303b9998ea30d87b4c60dd48097dbe5e986a89
6128         * g10/mainproc.c (proc_encrypted): Only call get_session_key when
6129         PKENC_LIST is not NULL.
6130         Return GPG_ERR_BAD_KEY, instead of GPG_ERR_NO_SECKEY, when
6131         it's encrypted only by symmetric key.
6132
6133 2019-07-11  NIIBE Yutaka  <gniibe@fsij.org>
6134
6135         agent: Relax the handling of pinentry error for keyboard grab.
6136         + commit 02d8b383833bac0382e910a2058b11b127acfd4d
6137         * agent/call-pinentry.c (start_pinentry): It's not fatal when
6138         pinentry doesn't support no-grab/grab option.
6139
6140         scd: Fix internal CCID driver, so that -DTEST works.
6141         + commit b31060425226b45deb21915bf5cd8b6ba62bd098
6142         * scd/ccid-driver.c: Support a test program by ccid-driver.
6143
6144         scd: Fix debug logging of the internal CCID driver.
6145         + commit 2536bf276189a474a3a1ca9716368cf5d991b0d6
6146         * scd/ccid-driver.c [GNUPG_MAJOR_VERSION] (DEBUGOUT): Use log_debug.
6147
6148         gpg: Fix getting User ID.
6149         + commit 29c7fb4053d207c163802642babbdbb6f885727e
6150         * g10/getkey.c (user_id_db): Remove, as no use anymore.
6151         (get_user_id_string): Use cache_get_uid_bykid.
6152         (get_user_id_byfpr): Use cache_get_uid_byfpr.
6153         * g10/objcache.c (cache_get_uid_byfpr): New.
6154         * g10/objcache.h (cache_get_uid_byfpr): New.
6155
6156 2019-07-10  NIIBE Yutaka  <gniibe@fsij.org>
6157
6158         gpg: Improve import slowness.
6159         + commit 33c17a8008c3ba3bb740069f9f97c7467f156b54
6160         * g10/import.c (read_block): Avoid O(N^2) append.
6161         (sec_to_pub_keyblock): Likewise.
6162
6163         gpg: Fix keyring retrieval.
6164         + commit a7a043e82555a9da984c6fb01bfec4990d904690
6165         * g10/keyring.c (keyring_get_keyblock): Avoid O(N^2) append.
6166
6167 2019-07-09  Werner Koch  <wk@gnupg.org>
6168
6169         gpg: Do not try the import fallback if the options are already used.
6170         + commit a29156d5a650702ad79fe11f45782bc4bc159c13
6171         * g10/import.c (import_one): Check options.
6172
6173         gpg: Fix regression in option "self-sigs-only".
6174         + commit eec150eca78a053193a0994a96482791b5da36be
6175         * g10/import.c (read_block): Make sure KEYID is availabale also on a
6176         pending packet.
6177
6178 2019-07-09  NIIBE Yutaka  <gniibe@fsij.org>
6179
6180         sm: Fix card access.
6181         + commit 37d758e5f2b5d07dc937098cf48096cf35ea61e4
6182         * sm/call-agent.c (gpgsm_scd_pksign): Cast to integer for %b.
6183
6184         scd: ccid-driver: Initial getting ATR more robustly.
6185         + commit c51a5685554a06e00ae1e99070b44613b2f8d417
6186         * scd/ccid-driver.c (send_power_off): New.
6187         (do_close_reader): Use send_power_off.
6188         (ccid_get_atr): Add error recovery.
6189
6190 2019-07-08  NIIBE Yutaka  <gniibe@fsij.org>
6191
6192         scd: Fix keygrip search.
6193         + commit 39c40e572c5632f836d089dce49224f947244bf2
6194         * scd/app.c (app_do_with_keygrip): Break the entire loop.
6195
6196 2019-07-05  Werner Koch  <wk@gnupg.org>
6197
6198         gpg: With --auto-key-retrieve prefer WKD over keyservers.
6199         + commit 96bf8f477805bae58cfb77af8ceba418ff8aaad9
6200         * g10/mainproc.c (check_sig_and_print): Print a hint on how to make
6201         use of the preferred keyserver.  Remove keyserver lookup just by the
6202         keyid.  Try a WKD lookup before a keyserver lookup.
6203
6204         wkd: Change client/server limit back to 64 KiB.
6205         + commit b0e8724b102535c27a8c973ec038d340858a8eb8
6206         * tools/wks-receive.c (decrypt_data): Change limit.
6207
6208 2019-07-05  NIIBE Yutaka  <gniibe@fsij.org>
6209
6210         sm: Return the last error for pubkey decryption.
6211         + commit 38b9da7de3350b1e56b85a058cdb1fdded78cf6d
6212         * sm/decrypt.c: Use TMP_RC for ksba_cms_get_issuer_serial,
6213         and return the last error when no key is available.
6214         Fix the error report with TMP_RC for second call of
6215         ksba_cms_get_issuer_serial.
6216
6217         gpg: Return the last error for pubkey decryption.
6218         + commit 6cc4119ec03be61c78189a0bec99372035289b91
6219         * g10/mainproc.c (proc_encrypted): Check ->result against -1.
6220         When c->dek == NULL, put GPG_ERR_NO_SECKEY only when not set.
6221         * g10/pubkey-enc.c (get_session_key): Set k->result by the result of
6222         get_it.
6223         When no secret key is available for some reasons, return the last
6224         specific error, if any.
6225
6226 2019-07-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6227
6228         dirmngr: fix handling of HTTPS redirections during HKP.
6229         + commit 064aeb14c9b869e114e9ec789526fad8da657230
6230         * dirmngr/ks-engine-hkp.c (send_request): Reinitialize HTTP session when
6231         following a HTTP redirection.
6232
6233 2019-07-04  Werner Koch  <wk@gnupg.org>
6234
6235         gpg: Add "self-sigs-only" and "import-clean" to the keyserver options.
6236         + commit 23c978640812d123eaffd4108744bdfcf48f7c93
6237         * g10/gpg.c (main): Change default.
6238
6239         gpg: Avoid printing false AKL error message.
6240         + commit 91a6ba32347a21c9029728eec96b8ff80f944629
6241         * g10/getkey.c (get_pubkey_byname): Add special traeatment for default
6242         and skipped-local.
6243
6244         gpg: New command --locate-external-key.
6245         + commit d00c8024e58822e0623b3fad99248ce68a8b7725
6246         * g10/gpg.c (aLocateExtKeys): New.
6247         (opts): Add --locate-external-keys.
6248         (main): Implement that.
6249         * g10/getkey.c (get_pubkey_byname): Implement GET_PUBKEY_NO_LOCAL.
6250         (get_best_pubkey_byname): Add arg 'mode' and pass on to
6251         get_pubkey_byname.  Change callers.
6252         * g10/keylist.c (public_key_list): Add arg 'no_local'.
6253         (locate_one): Ditto.  Pass on to get_best_pubkey_byname.
6254
6255         gpg: Make the get_pubkey_byname interface easier to understand.
6256         + commit 9980f81da765f88a65604ab083563bf15ccdb425
6257         * g10/keydb.h (enum get_pubkey_modes): New.
6258         * g10/getkey.c (get_pubkey_byname): Repalce no_akl by a mode arg and
6259         change all callers.
6260
6261 2019-07-03  Werner Koch  <wk@gnupg.org>
6262
6263         dirmngr: Avoid endless loop in case of HTTP error 503.
6264         + commit 8b113bb148f273524682252233b3c65954e1419e
6265         * dirmngr/ks-engine-hkp.c (SEND_REQUEST_EXTRA_RETRIES): New.
6266         (handle_send_request_error): Use it for 503 and 504.
6267         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Pass a new var for
6268         extra_tries.
6269
6270         dirmngr: Do not rewrite the redirection for the "openpgpkey" subdomain.
6271         + commit 37f0c55c7be3fc4912237f2bc72466aef6f8aa36
6272         * dirmngr/http.c (same_host_p): Consider certain subdomains to be the
6273         same.
6274
6275 2019-07-02  Peter Lebbing  <peter@digitalbrains.com>
6276
6277         Mention --sender in documentation.
6278         + commit cf92f7d96f83e5af7d2c232c8450c2c7d900ade8
6279
6280
6281 2019-07-01  Werner Koch  <wk@gnupg.org>
6282
6283         gpg: Fallback to import with self-sigs-only on too large keyblocks.
6284         + commit 3a403ab04eeb45f12b34f9d9c421dac93eaf2160
6285         * g10/import.c (import_one): Rename to ...
6286         (import_one_real): this.  Do not print and update stats on keyring
6287         write errors.
6288         (import_one): New.  Add fallback code.
6289
6290         gpg: New import and keyserver option "self-sigs-only"
6291         + commit 2e349bb6173789e0e9e42c32873d89c7bc36cea4
6292         * g10/options.h (IMPORT_SELF_SIGS_ONLY): New.
6293         * g10/import.c (parse_import_options): Add option "self-sigs-only".
6294         (read_block): Handle that option.
6295
6296         gpg: Make read_block in import.c more flexible.
6297         + commit 894b72d796c826b1c7e1df788e16874cd051e672
6298         * g10/import.c: Change arg 'with_meta' to 'options'.  Change callers.
6299
6300 2019-07-01  NIIBE Yutaka  <gniibe@fsij.org>
6301
6302         tools: gpgconf: Killing order is children-first.
6303         + commit 7c877f942a344e7778005840ed7f3e20ace12f4a
6304         * tools/gpgconf-comp.c (gc_component_kill): Reverse the order.
6305
6306 2019-06-28  NIIBE Yutaka  <gniibe@fsij.org>
6307
6308         agent: Close a dialog cleanly when gpg/ssh is killed for CONFIRM.
6309         + commit 374a0775546b6241ca2dd10836202c50300d8e91
6310         * agent/call-pinentry.c (watch_sock_start): Factor out
6311         from do_getpin.
6312         (watch_sock_end): Likewise.
6313         (do_getpin): Use those functions.
6314         (agent_get_confirmation): Likewise.
6315         (popup_message_thread): Likewise.
6316
6317 2019-06-25  Werner Koch  <wk@gnupg.org>
6318
6319         scd: Do not conflict if a card with another serialno is demanded.
6320         + commit 92ba831758cff0262504ac51e5df7a439844327c
6321         * scd/app.c (check_application_conflict): Add args to pass a serialno.
6322         * scd/command.c (open_card_with_request): Pass the serialno to
6323         check_application_conflict.
6324
6325         scd: Return a stable list with "getinfo card_list".
6326         + commit c8e62965bc90eabff5c4b7cb349bd8e41584c01b
6327         * scd/app.c (compare_card_list_items): New.
6328         (app_send_card_list): Sort the card objects by slot.
6329
6330         scd: Add an re-select mechanism to switch apps.
6331         + commit d803b3bb3c084b6bce4d2bd161db50dc45442e5b
6332         * scd/app-common.h (struct app_ctx_s): Add func ptr 'reselect'.
6333         * scd/app-piv.c (do_reselect): New.
6334         (app_select_piv): Move AID constant to file scope.
6335         * scd/app-openpgp.c (do_reselect): New.
6336         (app_select_openpgp): Move AID constant to file scope.
6337         * scd/app.c (apptype_from_name): New.
6338         (check_application_conflict): Check against all apps of the card.
6339         Always set current_apptype.
6340         (select_additional_application): New.
6341         (maybe_switch_app): New.
6342         (app_write_learn_status, app_readcert, app_readkey, app_getattr)
6343         (app_setattr, app_sign, app_auth, app_decipher, app_writecert)
6344         (app_writekey, app_genkey, app_change_pin, app_check_pin): Use it here.
6345         (app_do_with_keygrip): Force reselect on success.
6346         (app_new_register): Move setting of CURRENT_APPTYPE to ...
6347         (select_application): here so that it will be set to the requested
6348         card.
6349         * scd/command.c (open_card_with_request): Select additional
6350         application if possible.
6351
6352 2019-06-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6353
6354         spelling: Fix "synchronize"
6355         + commit d7d1ff45574ed935d07642964a529a358b11a1a7
6356
6357
6358 2019-06-21  Werner Koch  <wk@gnupg.org>
6359
6360         scd: Take the card look while running app->with_keygrip.
6361         + commit b304c006a3c9ba186fb2510859df7f02a0acad25
6362         * scd/app.c (app_do_with_keygrip): Lock the card.
6363
6364         scd: Take the lock earlier in the function dispatchers.
6365         + commit 0400a4eb1782e7a4aea5b04492c93939c6b9799a
6366         * scd/app.c: Chnage all function dispatcher.
6367
6368         scd: Add code to check whether app switching is possible.
6369         + commit 1b78e4951ed7a66ec71ca036e7680148a63143be
6370         * scd/app.c (check_conflict): Fold into ...
6371         (check_application_conflict): this and adjust callers.  Return a
6372         different error code if it is possible to switch apps.
6373
6374         scd: Track the currently selected app.
6375         + commit 91e2931caac9b914efa0a4524effaaa5948ebd00
6376         * scd/scdaemon.h (struct server_control_s): Add 'current_apptype'.
6377         * scd/command.c (scd_clear_current_app): New.
6378         * scd/app.c (app_new_register): Set it.
6379         (deallocate_card): Clear it.
6380
6381         scd: Simplify inclusion of app-common.h.
6382         + commit 43dcf93407d6d2b87b6e7db74fd05fd237495bfe
6383         * scd/scdaemon.h: Include app-common.h.  Remove inclusion of that
6384         header from all other files.
6385         (card_t, app_t): Move typedef to ...
6386         * scd/app-common.h: here.  Use them in the defs.
6387
6388         gpg: Very minor code cleanup.
6389         + commit 4256e9f0f1bf27ed2e93ca3890003ead208ef6df
6390         * g10/decrypt-data.c (decrypt_data): Remove superfluous test.
6391
6392         scd: Use enums for cardtype and apptype.
6393         + commit 9551275857c1f9a75fee5736fa6c3cf361364f22
6394         * scd/app-common.h (cardtype_t): New.
6395         (apptype_t): New.
6396         (struct card_ctx_s): Change type of cardtype.
6397         (struct app_ctx_s): Change type of apptype.  Adjust all users.
6398         * scd/app.c (struct app_priority_list_s): Add field apptype.
6399         (strcardtype): New.  Use as needed.
6400         (strapptype): New.  Use as needed.
6401
6402 2019-06-20  NIIBE Yutaka  <gniibe@fsij.org>
6403
6404         po: Update Japanese Translation.
6405         + commit 0ccb5ddef18f04b86855530838af4cbb9b8aa30b
6406
6407
6408         tools: Fix error handling for gpg-pair-tool.
6409         + commit d5287f43fd4def68901519a4c1d471b81ee86ed0
6410         * tools/gpg-pair-tool.c (read_message): Initialize ERR.
6411
6412 2019-06-19  Werner Koch  <wk@gnupg.org>
6413
6414         scd: Split data structures into app and card related objects.
6415         + commit 5a5288d051a551a1a8f169225e62572f6ee8cb10
6416         * scd/app-common.h (struct card_ctx_s): New.
6417         (struct app_ctx_s): Factor card specific fields out to card_ctx_s.
6418         (app_get_slot): New.
6419         * scd/scdaemon.h (card_t): New.
6420         (struct server_control_s): Rename field app_ctx to card_ctx and change
6421         all users.
6422         * scd/app-dinsig.c: Use app_get_slot and adjust for chang in card
6423         related fields.
6424         * scd/app-geldkarte.c: Ditto.
6425         * scd/app-nks.c: Ditto.
6426         * scd/app-openpgp.c: Ditto.
6427         * scd/app-p15.c: Ditto.
6428         * scd/app-sc-hsm.c: Ditto.
6429         * scd/app.c: Lost of changes to adjust for the changed data
6430         structures.  Change all callers.
6431         (app_list_lock): Rename to card_list_lock.
6432         (app_top): Remove.
6433         (card_top): New.
6434         (lock_app): Rename to lock_card and change arg type.
6435         (unlock_app): Rename to unlock_card.
6436         (app_dump_state): Print card and app info.
6437         (app_reset): Rename to card_reset.
6438         (app_new_register): Change for the new data structure.
6439         (deallocate_card): Dealloc card and all apps.
6440         (app_ref): Rename to card_ref.
6441         (app_unref): Rename to card_unref.
6442         (app_unref_locked): Rename to card_unref_locked.
6443         (card_get_serialno): New.
6444         * scd/command.c (cmd_pkdecrypt): Actually use the looked up card and
6445         former app object and not the standard one from the context.
6446
6447 2019-06-18  NIIBE Yutaka  <gniibe@fsij.org>
6448
6449         scd: KEYINFO: Send LF for --data.
6450         + commit c3dd53a65dc9ea2c4814e24079f0270c2fef14c6
6451         * scd/command.c (send_keyinfo): Send LF for --data.
6452
6453 2019-06-17  Werner Koch  <wk@gnupg.org>
6454
6455         scd:piv: Add the do_with_keygrip feature.
6456         + commit e900bf29737b3f7a09f749a271f2c5d7b59c49eb
6457         * scd/app-piv.c (do_with_keygrip): New.
6458         (app_select_piv): Register function.
6459
6460         scd: Add explict functions for 'app' reference counting.
6461         + commit c594dcfc93486cd26e193aa5c82bb8a8f30ab57b
6462         * scd/app.c (app_ref): New.
6463         (app_unref): New.
6464         (release_application): Renamed to ...
6465         (app_unref_locked): this and remove arg locked_already.  Change
6466         callers to use this or app_ref.
6467         * scd/command.c (open_card_with_request):
6468         (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): Use app_ref and app_unref
6469         instead of accessing the counter directly.
6470
6471         scd: Slight change to app->fnc.do_with_keygrip.
6472         + commit 70f7b262877b1e751d8557dc04a09a420e9d8a8f
6473         * scd/app-openpgp.c (do_with_keygrip): Return a real error code to
6474         avoid misinterpretation of the result.  Also fix the case for a too
6475         small buffer.
6476
6477         scd: Use the correct gpg for the v1.0 OpenPGP card hack.
6478         + commit 479c2775d5df64432c1bf64faae7f9abd3042850
6479         * scd/app-openpgp.c (get_public_key): Use gnupg_module_name instead of
6480         just "gpg".
6481
6482 2019-06-14  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6483
6484         fix up 6562de7475b21cd03c7b1a83a591fa563c589f5b.
6485         + commit 6e46862abd2c2e82f245e381c3f08c5829fb61e6
6486
6487
6488 2019-06-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6489
6490         doc/gpgsm: explain what "policy-file" refers to.
6491         + commit 6562de7475b21cd03c7b1a83a591fa563c589f5b
6492         A new user who sees "policy-file" and searches naively through the
6493         documentation to find it again won't be able to tell what this refers
6494         to, since "policies.txt" doesn't otherwise match the search string
6495         "policy".  This gives them a fighting chance at finding the
6496         documentation.
6497
6498 2019-06-07  NIIBE Yutaka  <gniibe@fsij.org>
6499
6500         gpgparsemail: Die on parse error, printing errno thing.
6501         + commit 1e9d61fb95e4813225a40f720231196abdb83992
6502         * tools/gpgparsemail.c (parse_message): Revert the change.
6503         * tools/rfc822parse.c (transition_to_body): Set ERRNO.
6504         (transition_to_header, insert_header): Likewise.
6505
6506 2019-06-06  NIIBE Yutaka  <gniibe@fsij.org>
6507
6508         scd: Bring back --card-timeout option as deprecated.
6509         + commit 72fe8d652fce6cb9104bb07ef0fb811cbab3303a
6510         * doc/scdaemon.texi (card-timeout): Add.
6511         * scd/scdaemon.c (main): Revert the change.
6512
6513         gpgparsemail: Die on parse error (not abort).
6514         + commit c13e459ffeffb8c5387c44b3c04bb92b7111a75b
6515         * tools/gpgparsemail.c (parse_message): Don't use ERRNO.
6516         * tools/rfc822parse.c (transition_to_body): Return -1.
6517         (transition_to_header, insert_header): Likewise.
6518
6519 2019-06-04  Werner Koch  <wk@gnupg.org>
6520
6521         sm: Print a better diagnostic for encryption certificate selection.
6522         + commit 9bf650db022b6b65bbfa74c311cdc3e6b73d3b44
6523         * sm/certlist.c (gpgsm_add_to_certlist): Add diagnostic and fold two
6524         similar branches.
6525
6526 2019-06-04  NIIBE Yutaka  <gniibe@fsij.org>
6527
6528         g10: Block signals in g10_exit.
6529         + commit 537fbe13af6a70e105982c4b69c1bcc3908ffb08
6530         * g10/gpg.c (g10_exit): Block all signals before calling
6531         emergency_cleanup.
6532
6533         agent: Allow TERM="".
6534         + commit 0076bef2026a87c4c0e05bad7d322638b1de3f37
6535         * agent/call-pinentry.c (start_pinentry): When TERM is none,
6536         don't send OPTION ttytype to pinentry.
6537
6538         agent: Add pinentry_loopback_confirm declaration.
6539         + commit 3a1bb0081087c0604ed681642114934ffe607fa1
6540         * agent/agent.h (pinentry_loopback_confirm): New.
6541
6542         scd: Remove unsupported --card-timeout option.
6543         + commit 4262933ef6f7530b4ad55646250a6763de9bf103
6544         * doc/scdaemon.texi (card-timeout): Remove.
6545         * scd/scdaemon.c (main): Remove oCardTimeout handling.
6546
6547         g10,agent: Support CONFIRM for --delete-key.
6548         + commit 20acc7c0226550530085a674ef1bb41ebfa39408
6549         * agent/call-pinentry.c (agent_get_confirmation): Add call of
6550         pinentry_loopback_confirm.
6551         (agent_popup_message_start): Likewise.
6552         (agent_popup_message_stop): Return if it's loopback mode.
6553         * agent/command.c (pinentry_loopback_confirm): New.
6554
6555         * g10/call-agent.c (default_inq_cb): Support "CONFIRM" inquery
6556         when PINENTRY_MODE_LOOPBACK mode.
6557         (confirm_status_cb): New.
6558         (agent_delete_key): Supply confirm_status_cb to set the description
6559         string for confirmation.
6560
6561         doc: Add a section for gpg-check-pattern.
6562         + commit eaf3b89d11156cc055644fc50761e1692e791e84
6563         * doc/Makefile.am: Add gpg-check-pattern.1.
6564         * doc/tools.texi (GPG-CHECK-PATTERN): New.
6565
6566 2019-06-03  Werner Koch  <wk@gnupg.org>
6567
6568         Return better error code for some getinfo IPC commands.
6569         + commit f2ac6742d403a5a95d84ac7cdcf8913c39297bcb
6570         * agent/command.c (cmd_getinfo): Return GPG_ERR_FALSE as boolean False.
6571         * g13/server.c (cmd_getinfo): Ditto.
6572         * sm/server.c (cmd_getinfo): Ditto.
6573
6574 2019-05-29  NIIBE Yutaka  <gniibe@fsij.org>
6575
6576         agent: Add A-flag for KEYINFO output for card.
6577         + commit 6790eaf9529209e36099d9520821a3b8ad02ccef
6578         * agent/command.c (do_one_keyinfo): Add ON_CARD argument to put
6579         A-flag.
6580         (cmd_keyinfo): Call agent_card_keyinfo to offer additional information
6581         if it's on card.
6582
6583 2019-05-28  Werner Koch  <wk@gnupg.org>
6584
6585         dirmngr: Allow for other hash algorithms than SHA-1 in OCSP.
6586         + commit 405f41007c35ef52bf85c7c2686dab01fdf2c950
6587         * dirmngr/ocsp.c (do_ocsp_request): Remove arg md.  Add args r_sigval,
6588         r_produced_at, and r_md.  Get the hash algo from the signature and
6589         create the context here.
6590         (check_signature): Allow any hash algo.  Print a diagnostic if the
6591         signature does not verify.
6592
6593         dirmngr: Improve finding OCSP cert.
6594         + commit 4699e294cc9e59f35262adca26ca291927acca9e
6595         * dirmngr/certcache.c (find_cert_bysubject): Add better debug output
6596         and try to locate by keyid.
6597
6598         agent: Make an MD encoding function more robust.
6599         + commit a2a90717466a88756bbdc6b11577cfee061fc1a8
6600         * agent/pksign.c (do_encode_md): Use ascii_tolower and avoid
6601         uninitalized TMP in the error case.
6602
6603 2019-05-28  NIIBE Yutaka  <gniibe@fsij.org>
6604
6605         agent: Remove unused agent_show_message.
6606         + commit 19415a265253a5ab72e79493d2f40c7e4441d81e
6607         * agent/call-pinentry.c (agent_show_message): Remove.
6608         * agent/genkey.c (take_this_one_anyway): Rename from
6609         take_this_one_anyway2.  Remove a dead path calling agent_show_message.
6610         (check_passphrase_constraints): Use take_this_one_anyway.
6611
6612 2019-05-27  Werner Koch  <wk@gnupg.org>
6613
6614         sm: Avoid confusing diagnostic for the default key.
6615         + commit 521e7d4644ed365ab2de3dfaa6c3728ca10ba79b
6616         * sm/certlist.c (cert_usage_p): Add arg 'silent' and change all
6617         callers.
6618         (gpgsm_cert_use_sign_p): Add arg 'silent' and pass to cert_usage_p.
6619         Change all callers.
6620         * sm/sign.c (gpgsm_get_default_cert): Set SILENT when calling
6621         gpgsm_cert_use_sign_p
6622
6623         gpg: Fixed i18n markup of some strings.
6624         + commit b6289af9738ddbc533defba0aefd950a9ca21ff1
6625         * g10/tofu.c: Removed some translation markups which either make no
6626         sense or are not possble.
6627
6628         gpg: Allow deletion of subkeys with --delete-[secret-]key.
6629         + commit cc6069ac6ecd57dcbb808f28d54fd9f89dc55014
6630         * common/userids.c (classify_user_id): Do not set the EXACT flag in
6631         the default case.
6632         * g10/export.c (exact_subkey_match_p): Make static,
6633         * g10/delkey.c (do_delete_key): Implement subkey only deleting.
6634
6635 2019-05-23  NIIBE Yutaka  <gniibe@fsij.org>
6636
6637         agent: Stop scdaemon after reload when disable_scdaemon.
6638         + commit 7158a5696dc84e1ebd2b523ab83a43a32423181d
6639         * agent/call-scd.c (agent_card_killscd): New.
6640         * agent/gpg-agent.c (agent_sighup_action): Call agent_card_killscd.
6641
6642         g10: Copy expiredate from primary key when marked expired.
6643         + commit 265e6d670682e661cec89657c3330b0b388ca0a7
6644         * g10/getkey.c (merge_selfsigs): Update ->expiredate of subkey.
6645
6646 2019-05-21  Werner Koch  <wk@gnupg.org>
6647
6648         gpg: Do not bail on an invalid packet in the local keyring.
6649         + commit 4c7d63cd5b02ebfd09933bebd1312e01958b3e20
6650         * g10/keydb.c (parse_keyblock_image): Treat invalid packet special.
6651
6652         gpg: Do not allow creation of user ids larger than our parser allows.
6653         + commit 156788a43c20e38cd52f4f725395aff2c72142ff
6654         * g10/parse-packet.c: Move max packet lengths constants to ...
6655         * g10/packet.h: ... here.
6656         * g10/build-packet.c (do_user_id): Return an error if too data is too
6657         large.
6658         * g10/keygen.c (write_uid): Return an error for too large data.
6659
6660         gpg: Unify the the use of the print_pubkey_info functions.
6661         + commit 126caa34bbdb36f40514643b9d6f5ead3240c735
6662         * g10/keylist.c (format_seckey_info): Remove.
6663         (print_pubkey_info, print_seckey_info): Remove.
6664         (format_key_info): New.
6665         (print_key_info): New.
6666         (print_key_info_log): New.
6667         * g10/card-util.c (current_card_status): Use print_key_info and remove
6668         the useless condition on KEYBLOCK.
6669         * g10/delkey.c (do_delete_key): Replace print_pubkey_info and
6670         print_seckey_info by print_key_info.
6671         * g10/keyedit.c (menu_addrevoker): Replace print_pubkey_info by
6672         print_key_info.
6673         * g10/pkclist.c (do_we_trust_pre): Ditto.
6674         * g10/revoke.c (gen_desig_revoke): Ditto.
6675         (gen_revoke): Ditto.  Also use print_key_info_log instead of separate
6676         functions.
6677
6678 2019-05-21  NIIBE Yutaka  <gniibe@fsij.org>
6679
6680         scd: Fix for SCARD_IO_REQUEST structure.
6681         + commit 1eb93d9229c54baa5f1b7ccf7d105d3692c51a4d
6682         * scd/apdu.c (struct pcsc_io_request_s): Use pcsc_dword_t for Windows.
6683
6684         agent: For SSH key, don't put NUL-byte at the end.
6685         + commit 479f7bf31ce405e558d844c3eb576b463a8697e5
6686         * agent/command-ssh.c (ssh_key_to_protected_buffer): Update
6687         the length by the second call of gcry_sexp_sprint.
6688
6689 2019-05-20  Werner Koch  <wk@gnupg.org>
6690             Matheus Afonso Martins Moreira
6691
6692         gpg: Do not delete any keys if --dry-run is passed.
6693         + commit 110a4550179fd1faeee8d2f17a33ed7807a397ae
6694         * g10/delkey.c (do_delete_key): Don't delete the keyblock on dry runs.
6695         Do not clear the ownertrust.  Do not let the agent delete the key.
6696
6697 2019-05-17  Werner Koch  <wk@gnupg.org>
6698
6699         gpg: Fix using --decrypt along with --use-embedded-filename.
6700         + commit 386bacd9741639d7f5e83c81628d3cad78407197
6701         * g10/options.h (opt): Add flags.dummy_outfile.
6702         * g10/decrypt.c (decrypt_message): Set this global flag instead of the
6703         fucntion local flag.
6704         * g10/plaintext.c (get_output_file): Ignore opt.output if that was
6705         used as a dummy option aslong with --use-embedded-filename.
6706
6707         gpg: Improve the photo image viewer selection.
6708         + commit 7e5847da0f3d715cb59d05adcd9107b460b6411b
6709         * g10/exec.c (w32_system): Add "!ShellExecute" special.
6710         * g10/photoid.c (get_default_photo_command): Use the new ShellExecute
6711         under Windows and fallbac to 'display' and 'xdg-open' in the Unix
6712         case.
6713         (show_photos): Flush stdout so that the output is shown before the
6714         image pops up.
6715
6716 2019-05-16  Werner Koch  <wk@gnupg.org>
6717
6718         kbx: Fix an endless loop under Windows due to an incomplete fix.
6719         + commit 6fc5df1e10129f3171d80cf731f310b9e8d97c26
6720         * kbx/keybox-search.c (keybox_search):  We need to seek to the last
6721         position in all cases not just when doing a NEXT.
6722
6723         gpgconf: Before --launch check that the config file is fine.
6724         + commit 50c2f76ae65d4ee793876865011fa97c85f38ac2
6725         * tools/gpgconf-comp.c (gc_component_launch): Check the conf file.
6726         * tools/gpgconf.c (gpgconf_failure): Call log_flush.
6727
6728         scd: Remove unused cruft from GnuPG 1.x.
6729         + commit 79c99921e35921140c83d7c101829d95f038f3da
6730         * scd/apdu.c: Remove code used only by GnuPG 1.
6731         * scd/app-openpgp.c: Ditto.
6732         * scd/ccid-driver.c: Ditto.
6733         * scd/iso7816.c: Ditto.
6734
6735 2019-05-16  NIIBE Yutaka  <gniibe@fsij.org>
6736
6737         agent,scd: Scan and load all public keys for availability.
6738         + commit dc35b25195e564affdea7969a7c4ea4e200ab45f
6739         * agent/divert-scd.c (ask_for_card): Scan by SERIALNO command.
6740         * scd/app-openpgp.c (do_with_keygrip): Make sure to load pubkey.
6741
6742 2019-05-15  NIIBE Yutaka  <gniibe@fsij.org>
6743
6744         agent: Support scdaemon operation using KEYGRIP.
6745         + commit 1091f22511e1a8259eb5c998f5c207ee95723a4a
6746         * agent/agent.h (struct card_key_info_s): New.
6747         (divert_pksign, divert_pkdecrypt): New API.
6748         * agent/call-scd.c (card_keyinfo_cb): New.
6749         (agent_card_free_keyinfo, agent_card_keyinfo): New.
6750         * agent/divert-scd.c (ask_for_card): Having GRIP argument,
6751         ask scdaemon with agent_card_keyinfo.
6752         (divert_pksign, divert_pkdecrypt): Ditto.
6753         * agent/pkdecrypt.c (agent_pkdecrypt): Supply GRIP.
6754         * agent/pksign.c (agent_pksign_do): Ditto.
6755
6756         scd: Don't put newline at the end of status.
6757         + commit 01730529f20882cd98882a61408e9bee960c86f1
6758         * scd/command.c (send_keyinfo): Remove newline.
6759
6760 2019-05-15  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6761
6762         gpg: enable OpenPGP export of cleartext keys with comments.
6763         + commit 392e59a3d487e174edcea570e69a0f946c55a19a
6764         * g10/export.c (cleartext_secret_key_to_openpgp): ignore trailing
6765         sublists in private-key S-expression.
6766
6767 2019-05-15  Werner Koch  <wk@gnupg.org>
6768
6769         gpgconf: Support --homedir for --launch.
6770         + commit a4be077abdbf286e3dcdeb0553ba0e74b7e2df5f
6771         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Simplify because
6772         gnupg_homedir already returns abd absolute name.
6773         (scdaemon_runtime_change): Ditto.
6774         (dirmngr_runtime_change): Ditto.
6775         (gc_component_launch): Support --homedir.
6776
6777         sm: Add a couple of debug calls to the keydb module.
6778         + commit 6e041b7b356c3adba714e98f4ecf0dd007375390
6779         * sm/gpgsm.h (DBG_CLOCK_VALUE, DBG_CLOCK): New.
6780         (DBG_LOOKUP_VALUE, DBG_LOOKUP): New.
6781         * sm/gpgsm.c: new debug flags "lookup" and "clock"
6782         * sm/keydb.c: Add log_clock calls to most functions.
6783         (keydb_search_desc_dump): New.
6784         (keydb_search) [DBG_LOOKUP]: Print descrh decription.
6785         * sm/keylist.c (list_cert_std): Flush FP in debug mode to better
6786         syncronize the output with the debug output
6787
6788 2019-05-15  NIIBE Yutaka  <gniibe@fsij.org>
6789
6790         scd: Fix return value for KEYINFO command.
6791         + commit 62c29af63203400947569c5965a8cf05a22fcd4c
6792         * scd/command.c (cmd_keyinfo): Return GPG_ERR_NOT_FOUND if none.
6793
6794 2019-05-14  Werner Koch  <wk@gnupg.org>
6795
6796         kbx: Fix deadlock in gpgsm on Windows due to a sharing violation.
6797         + commit 49b236af0ecbb6df67513feb4b63851f2e159ea2
6798         * kbx/keybox-init.c (keybox_lock) [W32]: Use _keybox_close_file
6799         instead of fclose so that a close is done if the file is opened by
6800         another handle.
6801         * kbx/keybox-search.c (keybox_search): Remember the last offset and
6802         use that in NEXT search mode if we had to re-open the file.
6803
6804         sm: Change keydb code to use the keybox locking.
6805         + commit 22e274f839f9a6c9a511648f29cae497f6492c97
6806         * kbx/keybox-init.c (keybox_lock): New arg TIMEOUT.  Change all
6807         callers to pass -1 when locking.
6808         * sm/keydb.c (struct resource_item): Remove LOCKANDLE.
6809         (struct keydb_handle): Add KEEP_LOCK.
6810         (keydb_add_resource): Use keybox locking instead of a separate dotlock
6811         for testing whether we can run a compress.
6812         (keydb_release): Reset KEEP_LOCK.
6813         (keydb_lock): Set KEEP_LOCK.
6814         (unlock_all): Take care of KEEP_LOCK.
6815         (lock_all): Use keybox_lock instead of dotlock fucntions.
6816         (keydb_delete): Remove arg UNLOCK.
6817         * sm/delete.c (delete_one): Adjust keydb_delete.  Due to the KEEP_LOCK
6818         the keydb_release takes care of unlocking.
6819
6820 2019-05-14  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6821
6822         agent: correct length for uri and comment on 64-bit big-endian platforms
6823         + commit 5651b2c460a7898027c1765c2063c302606b5f85
6824         * agent/findkey.c (agent_public_key_from_file): pass size_t as int to
6825         gcry_sexp_build_array's %b.
6826
6827 2019-05-14  Werner Koch  <wk@gnupg.org>
6828
6829         gpg: Do not print a hint to use the deprecated --keyserver option.
6830         + commit 7102d9b798b0985412007d3bf8b954959e4adec7
6831         * g10/keyserver.c (keyserver_search): Remove a specialized error
6832         message.
6833
6834 2019-05-14  NIIBE Yutaka  <gniibe@fsij.org>
6835
6836         g10: Fix possible null dereference.
6837         + commit 802a2aa300bad3d4385d17a2deeb0966da4e737d
6838         * g10/armor.c (armor_filter): Access ->d in the internal loop.
6839
6840 2019-05-13  Werner Koch  <wk@gnupg.org>
6841
6842         gpg: Change update_keysig_packet to replace SHA-1 by SHA-256.
6843         + commit 484d6ba5896acfa3dcf73d9536bcf5e006579b5f
6844         * g10/sign.c (update_keysig_packet): Convert digest algo when needed.
6845
6846         gpg: Cleanup use of make_keysig_packet.
6847         + commit d07666412d4317460c6f03b3ffd03edf4a715ef7
6848         * g10/sign.c (make_keysig_packet): Remove obsolete arg diegst_algo
6849         which was always passed as 0.  Change all callers.
6850
6851         * g10/gpgcompose.c (signature): Warn when trying to set a digest algo.
6852
6853 2019-05-13  NIIBE Yutaka  <gniibe@fsij.org>
6854
6855         build: Update m4/iconv.m4.
6856         + commit 1cd2aca03b8807c6f8e4929ace462bb606dcd53f
6857         * m4/iconv.m4: Update from gettext 0.20.1.
6858
6859 2019-05-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6860
6861         doc: correct documentation for gpgconf --kill.
6862         + commit 9662538be6afc8beee0f2654f9a8f234c5dac016
6863         * doc/tools.texi(gpgconf): Correct documentation for gpgconf --kill.
6864
6865 2019-05-07  Werner Koch  <wk@gnupg.org>
6866
6867         agent: If a Label is make sure that label is part of the prompt.
6868         + commit 69e0b080f06b66eee96327617c6fbffe8a88d586
6869         * agent/findkey.c (has_comment_expando): New.
6870         (agent_key_from_file): Modify DESC_TEXT.
6871
6872         agent: Allow the use of "Label:" in a key file.
6873         + commit 5388537806411c19ea84db8c4419f410be9ac616
6874         * agent/findkey.c (linefeed_to_percent0A): New.
6875         (read_key_file): Add optional arg 'keymeta' and change all callers.
6876         (agent_key_from_file): Prefer "Label:" over the comment for protected
6877         keys.
6878
6879         common: New functions nvc_delete_named and nvc_get_string.
6880         + commit b5985d0ca21ca376f22c050857bfda05592cebef
6881         * common/name-value.c (nvc_delete_named): New.
6882         (nvc_get_string): New.
6883
6884 2019-05-07  NIIBE Yutaka  <gniibe@fsij.org>
6885
6886         scd: Support direct use of app with PKSIGN/PKAUTH/PKDECRYPT.
6887         + commit c856ee7312c9eeb7d79a30189a49f70986420364
6888         * scd/command.c (cmd_pksign, cmd_pkauth, cmd_pkdecrypt): When length
6889         of keyidstr is 40, it is considered as a keygrip for direct use.
6890
6891 2019-05-03  Werner Koch  <wk@gnupg.org>
6892
6893         agent: Put Token lines into the key files.
6894         + commit bdf252e76ada0056bec2ee7940255f32552328c5
6895         * agent/findkey.c (write_extended_private_key): Add args serialno and
6896         keyref.  Write a Token line if that does not yet exist.
6897         (agent_write_private_key): Add args serialno and keyref and change all
6898         callers.
6899         (agent_write_shadow_key): Skip leading spaces.
6900         * agent/keyformat.txt: Improve extended key format docs.
6901
6902         common: In private key mode write "Key:" always last in name-value.
6903         + commit c9fa28bfad297b17e76341ffb40383ce92da5d44
6904         * common/name-value.c (nvc_write): Take care of Key. Factor some code
6905         out to ...
6906         (write_one_entry): new.
6907
6908         gpg: Use just the addrspec from the Signer's UID.
6909         + commit bd6ecbb8f8e92fe4a7fed40fcf470eb83bda0927
6910         * g10/parse-packet.c (parse_signature): Take only rthe addrspec from a
6911         Signer's UID subpacket.
6912
6913 2019-04-30  Werner Koch  <wk@gnupg.org>
6914
6915         sm: Add yet inactive options to support authenticode.
6916         + commit 5f3864fb647237f862bbe7e26763dffa0e945202
6917         * sm/gpgsm.c (opts): New options --authenticode and --attribute.
6918         * sm/gpgsm.h (opt): Add vars authenticode and attribute_list.
6919         * sm/sign.c (add_signed_attribute): New but inactive.
6920         (gpgsm_sign): Use new options.
6921
6922 2019-04-29  Andre Heinecke  <aheinecke@gnupg.org>
6923
6924         common,w32: Breakaway detached childs when in job.
6925         + commit 03df28b18b92b3fd3d2ba1000903c088dc5b0fcf
6926         * common/exechelp-w32.c (gnupg_spawn_process_detached): Add
6927         CREATE_BREAKAWAY_FROM_JOB creation flag if required.
6928
6929 2019-04-25  NIIBE Yutaka  <gniibe@fsij.org>
6930
6931         scd: Add new command: KEYINFO.
6932         + commit 874bc970ba6ec243ff474ef090242e0f7be6a7bc
6933         * scd/app-common.h (struct app_ctx_s): Add with_keygrip function.
6934         * scd/app-openpgp.c (do_with_keygrip): New.
6935         * scd/app.c (app_do_with_keygrip): New.
6936         * scd/command.c (cmd_keyinfo): New.
6937         (send_keyinfo): New.
6938
6939 2019-04-23  NIIBE Yutaka  <gniibe@fsij.org>
6940
6941         po: Update Japanese Translation.
6942         + commit d5443b918dd3b8ccb3c4fdd8fe9d70d84aa312ff
6943
6944
6945         scd: Allow KEYGRIP as KEYIDSTR.
6946         + commit e769609cd3c12d2e26955538399172016f78d2d4
6947         * scd/app-openpgp.c (struct app_local_s): Add keygrip_str.
6948         (store_keygrip): New.
6949         (read_public_key): Call store_keygrip to hold keygrip.
6950         (get_public_key): Likewise.
6951         (send_keypair_info): Use stored keygrip_str.
6952         (check_keyidstr): Allow use of KEYGRIP.
6953         (do_check_pin): Allow use of KEYGRIP of signing slot.
6954
6955 2019-04-22  NIIBE Yutaka  <gniibe@fsij.org>
6956
6957         scd: Factor out a function to check keyidstr.
6958         + commit b0f0791e4ade845b2a0e2a94dbda4f3bf1ceb039
6959         * scd/app-openpgp.c (check_keyidstr): New.
6960         (do_sign, do_auth, do_decipher, do_check_pin): Use check_keyidstr.
6961
6962 2019-04-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6963
6964         gpgconf: correct capitalization of "Tor"
6965         + commit ea7d85ff658c000f5f469e0a869af0e512e8c59f
6966         * tools/gpgconf-comp.cb (gc_options_dirmngr): correct capitalization
6967         of Tor.
6968
6969 2019-04-18  Andre Heinecke  <aheinecke@intevation.de>
6970
6971         g10: Fix double free when locating by mbox.
6972         + commit e57954ed278cb5e6e725005b1ecaf7ce70006ce0
6973         * g10/getkey.c (get_best_pubkey_byname): Set new.uid always
6974         to NULL after use.
6975
6976 2019-04-17  NIIBE Yutaka  <gniibe@fsij.org>
6977
6978         g10: Fix a memory leak.
6979         + commit a861f9343d6e6d18064e4e54aeb914c5a10b2095
6980         * g10/import.c (import): Care PNDING_PKT on error.
6981
6982 2019-04-16  NIIBE Yutaka  <gniibe@fsij.org>
6983
6984         common: Fix AWK portability.
6985         + commit b6f0b0efa19e0434024bc16e246032b613fd448a
6986         * common/Makefile.am: Use pkg_namespace.
6987         * common/mkstrtable.awk: Use pkg_namespace.  Regexp fix.
6988
6989 2019-04-13  Werner Koch  <wk@gnupg.org>
6990
6991         gpg: New caching functions.
6992         + commit 64a5fd37271a3e454c0d59ac3500e1a1b232e4f7
6993         * g10/objcache.c: New.
6994         * g10/objcache.h: New.
6995         * g10/Makefile.am (common_source): Add them.
6996         * g10/gpg.c: Include objcache.h.
6997         (g10_exit): Call objcache_dump_stats.
6998         * g10/getkey.c: Include objcache.h.
6999         (get_primary_uid, release_keyid_list): Remove.
7000         (cache_user_id): Remove.
7001         (finish_lookup): Call the new cache_put_keyblock instead of
7002         cache_user_id.
7003         (get_user_id_string): Remove code for mode 2.
7004         (get_user_id): Implement using cache_get_uid_bykid.
7005
7006 2019-04-12  Werner Koch  <wk@gnupg.org>
7007
7008         gpg: Cache a once computed fingerprint in PKT_public_key.
7009         + commit 60f384592144de53c9a5f5e11d7f73ce863aa94f
7010         * g10/packet.h (PKT_public_key): Add fields fpr and fprlen.
7011         * g10/keyid.c (do_fingerprint_md): Remove.
7012         (compute_fingerprint): New.
7013         (keyid_from_pk): Simplify.
7014         (fingerprint_from_pk): Simplify.
7015         (hexfingerprint): Avoid using extra array.
7016
7017 2019-04-11  Werner Koch  <wk@gnupg.org>
7018
7019         gpg: Accept also armored data from the WKD.
7020         + commit 1b1f649deaeba963ed7240b27f848004db0b051f
7021         * g10/keyserver.c (keyserver_import_wkd): Clear NO_ARMOR.
7022
7023         gpg: Set a limit of 5 to the number of keys imported from the WKD.
7024         + commit 40595b57936e39ee2a4d58b1dd19edea7537a471
7025         * g10/import.c (import): Limit the number of considered keys to 5.
7026         (import_one): Return the first fingerprint in case of WKD.
7027
7028 2019-04-11  Andre Heinecke  <aheinecke@gnupg.org>
7029
7030         speedo,w32: Install gpg-card.exe.
7031         + commit b30351496dd3056462c8db25c03fed6d2aa00e9b
7032         * build-aux/speedo/w32/inst.nsi: Install gpg-card.exe
7033
7034 2019-04-05  Werner Koch  <wk@gnupg.org>
7035
7036         gpg: Fix printing of the user id during import.
7037         + commit ea32842d5c2e2d262d32791130d7eae5c8c3edcf
7038         * g10/getkey.c (struct keyid_list): Add field fprlen.
7039         (cache_user_id): Set and test it.
7040         (get_user_id_byfpr): Make static, add arg fprlen and use it.
7041         (get_user_id_byfpr_native): Add arg fprlen and change all callers.
7042
7043 2019-04-04  Werner Koch  <wk@gnupg.org>
7044
7045         scd:piv: Fix RSA decryption.
7046         + commit 958172cc3acb7172bc5e1fa76efafe26695ed402
7047         * scd/app-piv.c (do_decipher): Fixup leading zero byte.
7048
7049 2019-04-04  NIIBE Yutaka  <gniibe@fsij.org>
7050
7051         scd: Better handling of timeout and time extension.
7052         + commit f1cf799a37f320d33cae445c74f3fc1936dd9995
7053         * scd/ccid-driver.c (CCID_CMD_TIMEOUT_LONGER): Remove.
7054         (ccid_transceive): Don't use x4 blindly for bBWI, but use dynamically
7055         determined value.  Use value from variable wait_more for bulk_in.
7056         Set wait_more by the value of time extension request.
7057
7058 2019-04-03  Werner Koch  <wk@gnupg.org>
7059
7060         gpg: Improve the code to decrypt using PIV cards.
7061         + commit 2c9b68f28de1ce9a6a18d091caba01ddd4707774
7062         * g10/call-agent.c (agent_scd_keypairinfo): Add arg 'keyref'.
7063         * g10/keygen.c (ask_algo): Adjust.
7064         * g10/skclist.c (enum_secret_keys): Request the keyref directly.
7065
7066         scd: New options --info and --info-only for READKEY.
7067         + commit 679b8f1c045476bd6e0a1f1565379263143994ee
7068         * scd/command.c (cmd_readkey): New options --info and --info-only.
7069         * scd/app.c (app_readkey): New arg 'flags'.
7070         * scd/app-common.h (APP_READKEY_FLAG_INFO): New.
7071         (struct app_ctx_s): New args 'ctrl' and 'flags' for member readkey.
7072         Change all implementers.
7073         * scd/app-nks.c (do_readkey): Stub implementation of
7074         APP_READKEY_FLAG_INFO.
7075         * scd/app-openpgp.c (do_readkey): Implement APP_READKEY_FLAG_INFO.
7076         * scd/app-piv.c (do_readkey): Ditto.
7077
7078         gpg: Allow decryption using PIV cards.
7079         + commit ec6a6779236a89d4784a6bb7de0def9cc0f9e8a4
7080         * g10/call-agent.c (struct getattr_one_parm_s): New.
7081         (getattr_one_status_cb): New.
7082         (agent_scd_getattr_one): New.
7083         * g10/pubkey-enc.c (get_it): Allow the standard leading zero byte from
7084         pkcs#1.
7085         * g10/skclist.c (enum_secret_keys): Handle non-OpenPGP cards.
7086
7087         scd: New standard attributes $ENCRKEYID and $SIGNKEYID.
7088         + commit 2b1135cf920cf3d863813d60f032d476dcccfb58
7089         * g10/call-agent.c (agent_scd_keypairinfo): Use --keypairinfo.
7090         * sm/call-agent.c (gpgsm_agent_scd_keypairinfo): Ditto.
7091         * scd/app-openpgp.c (do_getattr): Add attributes "$ENCRKEYID" and
7092         "$SIGNKEYID".
7093         * scd/app-piv.c (do_getattr): Ditto.
7094
7095         gpg: Avoid endless loop if a card's serial number can't be read.
7096         + commit 1f688e0d1dba4dd7a311d416d06d654ed7b4290d
7097         * g10/skclist.c (enum_secret_keys): Move list forward on error.
7098
7099         card: Allow card selection with LIST.
7100         + commit bcca3acb87c36213fef9311236ea949d006f759c
7101         * tools/card-call-scd.c (start_agent): Request serialno only whean
7102         started.
7103         (scd_serialno): Allow NULL for r_serialno.
7104         * tools/gpg-card.c (cmd_factoryreset): Use changed scd_serialno.
7105         (cmd_list): New.
7106         (dispatch_command): Use cmd_list for cmdLIST.
7107         (interactive_loop): Ditto.
7108
7109         gpg: Print modern style key info for non-decryptable keys.
7110         + commit 2d3392c147a24e49ee4658d4a50fafd68599fba3
7111         * g10/mainproc.c (print_pkenc_list): Simplify.
7112
7113 2019-04-02  Werner Koch  <wk@gnupg.org>
7114
7115         gpg: Allow direct key generation from card with --full-gen-key.
7116         + commit a480182f9d7ec316648cb64248f7a0cc8f681bc3
7117         * g10/call-agent.c (agent_scd_readkey): New.
7118         * g10/keygen.c (ask_key_flags): Factor code out to ..
7119         (ask_key_flags_with_mask): new.
7120         (ask_algo): New mode 14.
7121
7122         common: Extend function pubkey_algo_string.
7123         + commit f952226043824cbbeb8517126b5266926121c4e8
7124         * common/sexputil.c (pubkey_algo_string): Add arg R_ALGOID.
7125         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Adjust.
7126         * tools/gpg-card.c (list_one_kinfo): Ditto.
7127
7128         dirmngr: Improve domaininfo cache update algorithm.
7129         + commit e100ace7f8a729bbe30d9f4ed157a7a229a04eb0
7130         * dirmngr/domaininfo.c (struct domaininfo_s): Add field keepmark.
7131         (insert_or_update): Implement new update algorithm.
7132
7133 2019-04-01  Werner Koch  <wk@gnupg.org>
7134
7135         sm: Show the usage flags when generating a key from a card.
7136         + commit 9ed1aa56c4bbf44e00b731d6807ada9e95c91bd7
7137         * g10/call-agent.c (scd_keypairinfo_status_cb): Also store the usage
7138         flags.
7139         * sm/call-agent.c (scd_keypairinfo_status_cb): Ditto.
7140         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Print the usage flags.
7141
7142         gpg: Prepare card code to allow other than OpenPGP cards.
7143         + commit e47524c34a2a9f53c2507f67a0b41b460cee78b7
7144         * g10/call-agent.c (start_agent): Use card app auto selection.
7145         * g10/card-util.c (current_card_status): Print the Application type.
7146         (card_status): Put empty line between card listings.
7147
7148         gpg: New card function agent_scd_keypairinfo.
7149         + commit 0fad61de159acf39e38a04f28f162f0beb0e77d6
7150         * g10/call-agent.c (scd_keypairinfo_status_cb)
7151         (agent_scd_keypairinfo): New.  Taken from gpgsm.
7152
7153         gpg: Remove two unused card related functions.
7154         + commit 334b16b868e771b983263ed20c200869e7e51198
7155         * g10/call-agent.c (inq_writekey_parms): Remove.
7156         (agent_scd_writekey): Remove.
7157         (agent_clear_pin_cache): Remove this stub.
7158
7159         gpg: Remove unused arg in a card related function.
7160         + commit 3a4534d82682f69788da3cf4a445e38fbaf6b98e
7161         * g10/call-agent.c (agent_scd_setattr): Remove unused arg serialno.
7162
7163 2019-03-29  Werner Koch  <wk@gnupg.org>
7164
7165         dirmngr: Better for error code for http status 413.
7166         + commit 21b674097442a54ae889a90d708639b257ba43db
7167         * dirmngr/ks-engine-hkp.c (send_request): New case for 413.
7168         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
7169         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
7170
7171 2019-03-28  Werner Koch  <wk@gnupg.org>
7172
7173         scd: New option --application-priority.
7174         + commit 97feef8ee94a5e1cb9daba82f108eb62122c7910
7175         * scd/scdaemon.c (oApplicationPriority): New.
7176         (opts): Add "application_priority".
7177         (main): Process option.
7178         * scd/app.c (app_update_priority_list): New.
7179         (get_supported_applications): Take apps from global list.
7180
7181         * tools/gpgconf-comp.c (gc_options_scdaemon): Add option.
7182
7183         card: For passwd add a PIV menu and make the OpenPGP menu optional.
7184         + commit 80c069b5e1ad6fbd547de59f332eb3fabb68c572
7185         * tools/gpg-card.c (get_selection): New.
7186         (cmd_passwd): Reworked.
7187
7188         card: Allow "yubikey disable" only for Yubikey-5 and later.
7189         + commit 2f761251c5730a9ad113fa58466addc9c2372da8
7190         * tools/card-yubikey.c (yubikey_commands): Add new arg INFO and test
7191         for Yubikey-5.
7192         * tools/gpg-card.c (cmd_yubikey): Pass info to yubikey_commands.
7193
7194 2019-03-27  Werner Koch  <wk@gnupg.org>
7195
7196         scd: Support reading the Yubikey 4 firmware version.
7197         + commit 5a3055eb722e61126748e83564e1bba42807d722
7198         * scd/app.c (app_new_register): Detect yk4 version numbers.
7199
7200 2019-03-27  Trevor Bentley  <trevor@yubico.com>
7201
7202         gpg: Don't use EdDSA algo ID for ECDSA curves.
7203         + commit 4324560b2c0bb76a1769535c383424a042e505ae
7204         * g10/keygen.c (ask_curve): Change algo ID to ECDSA if it changed from
7205         an EdDSA curve.
7206
7207 2019-03-26  Werner Koch  <wk@gnupg.org>
7208
7209         sm: Allow decryption even if expired other keys are configured.
7210         + commit aa58d2a49b3d416d9d6a0691a89f2bc8bc8649ad
7211         * sm/gpgsm.c (main): Add special handling for bad keys in decrypt
7212         mode.
7213
7214         agent: Allow other ssh fingerprint algos in KEYINFO.
7215         + commit 3c7a1f3aea7f6e8137a93ef2166ff329688f5445
7216         * agent/command.c (cmd_keyinfo): Allow for --ssh-fpr=ALGO.  Default to
7217         the standard algo.
7218
7219 2019-03-25  Werner Koch  <wk@gnupg.org>
7220
7221         wkd: New command --print-wkd-url for gpg-wks-client.
7222         + commit 70c97a862aa586c314a64190d1e489a272e552ea
7223         * tools/gpg-wks-client.c (aPrintWKDURL): New.
7224         (opts): Add option.
7225         (main): Implement.
7226         * tools/wks-util.c (wks_cmd_print_wkd_url): New.
7227
7228 2019-03-25  Andre Heinecke  <aheinecke@gnupg.org>
7229
7230         sm, w32: Translate logger and status fd to handles.
7231         + commit e4e0804ed123516fa00f8a876a862b2c6d34ba5c
7232         * sm/gpgsm.c (main): Call translate_sys2libc_fd_int to
7233         convert the FDs.
7234
7235 2019-03-25  NIIBE Yutaka  <gniibe@fsij.org>
7236
7237         libdns: Don't use _[A-Z] which are reserved names.
7238         + commit 8d1b5982138c104f3c50663738892fa110193059
7239         * dirmngr/dns.c: Use the identifiers of "*_instance" instead of
7240         reserved "_[A-Z]".
7241
7242 2019-03-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7243
7244         doc: fix formatting error.
7245         + commit b30528f48780c9917ec8ba3b3d163fba5c740d92
7246
7247
7248 2019-03-22  Werner Koch  <wk@gnupg.org>
7249
7250         wkd: New command --print-wkd-hash for gpg-wks-client.
7251         + commit e847cf1df7aa55ac2af7efd39ca05882258acbfe
7252         * tools/gpg-wks-client.c (aPrintWKDHash): New.
7253         (opts) : Add "--print-wkd-hash".
7254         (main): Implement that command.
7255         (proc_userid_from_stdin): New.
7256         * tools/wks-util.c (wks_fname_from_userid): Add option HASH_ONLY.
7257         (wks_cmd_print_wkd_hash): New.
7258
7259         scd: Refactor the app selection code.
7260         + commit 393269948c883afb770bb536f03045254d13b911
7261         * scd/app.c (app_priority_list): New.
7262
7263 2019-03-18  Andre Heinecke  <aheinecke@gnupg.org>
7264
7265         speedo: Fix installer build with NSIS-3.
7266         + commit b98799ce964df1743478dc3d0cc503f51c4b6733
7267         * build-aux/speedo.mk: Add charset for nsis 3.
7268
7269 2019-03-18  Werner Koch  <wk@gnupg.org>
7270
7271         gpg: Allow import of PGP desktop exported secret keys.
7272         + commit 5205512fc092c53c0a52c8379ef2a129ce6e58a9
7273         * g10/import.c (NODE_TRANSFER_SECKEY): New.
7274         (import): Add attic kludge.
7275         (transfer_secret_keys): Add arg only_marked.
7276         (resync_sec_with_pub_keyblock): Return removed seckeys via new arg
7277         r_removedsecs.
7278         (import_secret_one): New arg r_secattic.  Change to take ownership of
7279         arg keyblock.  Implement extra secret key import logic.  Factor some
7280         code out to ...
7281         (do_transfer): New.
7282         (import_matching_seckeys): New.
7283
7284 2019-03-15  Werner Koch  <wk@gnupg.org>
7285
7286         gpg: Avoid importing secret keys if the keyblock is not valid.
7287         + commit f799e9728bcadb3d4148a47848c78c5647860ea4
7288         * g10/keydb.h (struct kbnode_struct): Replace unused field RECNO by
7289         new field TAG.
7290         * g10/kbnode.c (alloc_node): Change accordingly.
7291         * g10/import.c (import_one): Add arg r_valid.
7292         (sec_to_pub_keyblock): Set tags.
7293         (resync_sec_with_pub_keyblock): New.
7294         (import_secret_one): Change return code to gpg_error_t.   Return an
7295         error code if sec_to_pub_keyblock failed.  Resync secret keyblock.
7296
7297         gpg: During secret key import print "sec" instead of "pub".
7298         + commit f64477db86568bdc28c313bfeb8b95d8edf05a3c
7299         * g10/keyedit.c (show_basic_key_info): New arg 'print_sec'.  Remove
7300         useless code for "sub" and "ssb".
7301         * g10/import.c (import_one): Pass FROM_SK to show_basic_key_info.  Do
7302         not print the first  keyinfo in FROM_SK mode.
7303         printing.
7304
7305         gpg: Simplify an interactive import status line.
7306         + commit f06b6fe47f56a15ac426665c3d9661d4b104696f
7307         * g10/cpr.c (write_status_printf): Escape CR and LF.
7308         * g10/import.c (print_import_check): Simplify by using
7309         write_status_printf and hexfingerprint.
7310
7311         gpg: Fix recently introduced use after free.
7312         + commit 3e1f3df6183b2ed2cadf2af2383063891e2c53bd
7313         * g10/mainproc.c (proc_plaintext): Do not use freed memory.
7314
7315 2019-03-14  Werner Koch  <wk@gnupg.org>
7316
7317         kbx: Unify the fingerprint search modes.
7318         + commit bdda31a26bc69b6ee72e964510db113645de76ef
7319         * kbx/keybox-search-desc.h (KEYDB_SEARCH_MODE_FPR16)
7320         (KEYDB_SEARCH_MODE_FPR20, KEYDB_SEARCH_MODE_FPR32): Remove.  Switch
7321         all users to KEYDB_SEARCH_MODE_FPR along with the fprlen value.
7322
7323         gpg: Make rfc4880bis the default.
7324         + commit caf4b3fc16e97eb175c46f45f5770d02becb862d
7325         * g10/gpg.c (set_compliance_option, main): Change CO_GNUPG to include
7326         rfc4880bis features.
7327         (main): Change rfc4880bis warning to a note.
7328
7329         gpg: Implement v5 keys and v5 signatures.
7330         + commit 01c87d4ce23bc9fc44ec5301c2c6bf2ce615c375
7331         * g10/build-packet.c (gpg_mpi_write): New optional arg
7332         R_NWRITTEN.  Allow NULL for OUT.  Change all callers.
7333         (do_key): Support v5 keys.
7334         (build_sig_subpkt_from_sig): Support 32 byte fingerprints.
7335         * g10/parse-packet.c (parse_signature): First try to set the keyid
7336         from the issuer fingerprint.
7337         (parse_key): Support v5 keys.
7338         (create_gpg_control): Better make sure to always allocate the static
7339         size of the struct in case future compilers print warnings.
7340         * g10/keyid.c (hash_public_key): Add v5 support.
7341         (keyid_from_pk): Ditto.
7342         (keyid_from_fingerprint): Ditto.
7343         (fingerprint_from_pk): Ditto.
7344         * g10/keygen.c (KEYGEN_FLAG_CREATE_V5_KEY): New.
7345         (pVERSION, pSUBVERSION): New.
7346         (add_feature_v5): New.
7347         (keygen_upd_std_prefs): Call it.
7348         (do_create_from_keygrip): Add arg keygen_flags and support the v5
7349         flag.
7350         (common_gen): Support the v5 flag.
7351         (parse_key_parameter_part): New flags v4 and v5.
7352         (parse_key_parameter_string): Add args for version and subversion.
7353         (read_parameter_file): New keywords "Key-Version" and
7354         "Subkey-Version".
7355         (quickgen_set_para): Add arg 'version'.
7356         (quick_generate_keypair, generate_keypair): Support version parms.
7357         (do_generate_keypair): Support v5 key flag.
7358         (generate_subkeypair): Ditto.
7359         (generate_card_subkeypair): Preparse for keyflags.
7360         (gen_card_key): Ditto.
7361         * g10/sig-check.c (check_signature2): Add args extrahash and
7362         extrahashlen.
7363         (check_signature_end): Ditto.
7364         (check_signature_end_simple): Ditto.  Use them.
7365         * g10/mainproc.c (proc_plaintext): Put extra hash infor into the
7366         control packet.
7367         (do_check_sig): Add args extrahas and extrahashlen and pass them on.
7368         (issuer_fpr_raw): Support 32 byte fingerprint.
7369         (check_sig_and_print): get extra hash data and pass it on.
7370
7371         kbx: Add support for 32 byte fingerprints.
7372         + commit f40e9d6a528521d12795e1a6cc15c849b216be92
7373         * common/userids.c (classify_user_id): Support 32 byte fingerprints.
7374         * kbx/keybox-search-desc.h (KEYDB_SEARCH_MODE_FPR32): New.
7375         (struct keydb_search_desc): Add field fprlen.
7376         * kbx/keybox-defs.h (struct _keybox_openpgp_key_info): Add field
7377         version and increase size of fpr to 32.
7378         * kbx/keybox-blob.c: Define new version 2 for PGP and X509 blobs.
7379         (struct keyboxblob_key): Add field fprlen and increase size of fpr.
7380         (pgp_create_key_part_single): Allow larger fingerprints.
7381         (create_blob_header): Implement blob version 2 and add arg want_fpr32.
7382         (_keybox_create_openpgp_blob): Detect the need for blob version 2.
7383         * kbx/keybox-search.c (blob_get_first_keyid): Support 32 byte
7384         fingerprints.
7385         (blob_cmp_fpr): Ditto.
7386         (blob_cmp_fpr_part): Ditto.
7387         (has_fingerprint): Add arg fprlen and pass on.
7388         (keybox_search): Support KEYDB_SEARCH_MODE_FPR32 and adjust for
7389         changed has_fingerprint.
7390         * kbx/keybox-openpgp.c (parse_key): Support version 5 keys.
7391         * kbx/keybox-dump.c (_keybox_dump_blob): Support blob version 2.
7392
7393         * g10/delkey.c (do_delete_key): Support KEYDB_SEARCH_MODE_FPR32.
7394         * g10/export.c (exact_subkey_match_p): Ditto.
7395         * g10/gpg.c (main): Ditto.
7396         * g10/getkey.c (get_pubkey_byfprint): Adjust for changed
7397         KEYDB_SEARCH_MODE_FPR.
7398         * g10/keydb.c (keydb_search_desc_dump): Support
7399         KEYDB_SEARCH_MODE_FPR32 and adjust for changed KEYDB_SEARCH_MODE_FPR.
7400         (keydb_search): Add new arg fprlen and change all callers.
7401         * g10/keyedit.c (find_by_primary_fpr): Ditto.
7402         * g10/keyid.c (keystr_from_desc): Ditto.
7403         * g10/keyring.c (keyring_search): Ditto.
7404         * g10/keyserver.c (print_keyrec): Ditto.
7405         (parse_keyrec): Ditto.
7406         (keyserver_export): Ditto.
7407         (keyserver_retrieval_screener): Ditto.
7408         (keyserver_import): Ditto.
7409         (keyserver_import_fprint): Ditto.
7410         (keyidlist): Ditto.
7411         (keyserver_get_chunk): Ditto.
7412
7413         * g10/keydb.c (keydb_search): Add new arg fprlen and change all
7414         callers.
7415
7416         * sm/keydb.c (keydb_search_fpr): Adjust for changed
7417         KEYDB_SEARCH_MODE_FPR.
7418
7419         gpg: Implemented latest rfc4880bis version 5 packet hashing.
7420         + commit a21ca3a1eff4722dea778cca4abe14a873ccebdf
7421         * configure.ac (AC_CHECK_SIZEOF): Test size_t.
7422         * g10/sig-check.c (check_signature_end_simple): Support v5 signatures
7423         as per current rfc4880bis.  For correctness also allow for N > 2^32.
7424         * g10/sign.c (pt_extra_hash_data_t): New.
7425         (hash_sigversion_to_magic): New arg EXTRAHASH.
7426         (write_plaintext_packet): New arg R_EXTRAHASH.
7427         (write_signature_packets): Pass EXTRAHASH.
7428         (sign_file): Ditto.
7429         (sign_symencrypt_file): Ditto.
7430
7431 2019-03-14  NIIBE Yutaka  <gniibe@fsij.org>
7432
7433         Fix the previous commit.
7434         + commit f199b627ce512c8495af5c9bd1c81127ccde3ca0
7435         * g10/ecdh.c (kek_params_table): Revert the change.
7436         * scd/app-openpgp.c (ecdh_params): Use CIPHER_ALGO_AES256
7437         for 384-bit key.
7438
7439 2019-03-13  NIIBE Yutaka  <gniibe@fsij.org>
7440
7441         g10: Fix symmetric cipher algo constant for ECDH.
7442         + commit af3efd149f555d36a455cb2ea311ff81caf5124c
7443         * g10/ecdh.c (kek_params_table): Use CIPHER_ALGO_AES192 for
7444         ECC strength 384, according to RFC-6637.
7445
7446 2019-03-11  Werner Koch  <wk@gnupg.org>
7447
7448         dirmngr: Avoid testing for Tor with --gpgconf-list.
7449         + commit 9f37e93dd741a5436ff412955628806ae84725ca
7450         * dirmngr/dirmngr.c (post_option_parsing): Do not call set_tor_mode.
7451         (dirmngr_sighup_action): Call it here.
7452         (main): Call it here unless in --gpgconf-list mode.
7453
7454 2019-03-07  Werner Koch  <wk@gnupg.org>
7455
7456         common: Minor rework of tty_get.
7457         + commit b7de105e0a836bd4d7bd558f8e699d88ab0cafec
7458         * common/ttyio.c (do_get): Re-indent and remove the checking for char
7459         values larger than 0xa0.  Use explicy control character checking.
7460
7461         dirmngr: Add CSRF protection exception for protonmail.
7462         + commit 134c3c16523b1a267ebdd2df6339240fd9e1e3b3
7463         * dirmngr/http.c (same_host_p): Add exception table.
7464
7465 2019-03-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7466
7467         gpgv: Improve documentation for keyring choices.
7468         + commit 096c2aa705f85289ff8b610da1dd9181e4c904fd
7469         * doc/gpgv.texi: Improve documentation for keyring choices
7470
7471 2019-03-06  Werner Koch  <wk@gnupg.org>
7472
7473         gpgtar: Make option -C work for archive creation.
7474         + commit b3a7a5140784b5a015107b5c5c73b15ae44e71dc
7475         * tools/gpgtar-create.c (gpgtar_create): Switch to the -C directory.
7476
7477         agent: Re-introduce --enable-extended-key-format.
7478         + commit 91ae3e7fb66271691f6fe507262a62fc7e2663a3
7479         * agent/gpg-agent.c (oEnableExtendedKeyFormat): Re-introduce.
7480         (parse_rereadable_options): Handle it in a special way.
7481         * agent/protect.c (agent_protect): Be safe and set use_ocb only to 1
7482         or 0.
7483         * tools/gpgconf-comp.c: Add --enable-extended-key-format again.
7484
7485         gpgtar: Improve error messages.
7486         + commit 72feb8fa8280aba674573a1afc955a92e8065242
7487         * tools/gpgtar.h (struct tarinfo_s): New.
7488         * tools/gpgtar.c (cmd, skip_crypto, files_from, null_names): Move
7489         global vars more to the top.
7490         (set_cmd): Rename 'cmd' to 'c'.
7491         * tools/gpgtar-list.c (parse_header): Add arg 'info' and improve error
7492         messages.
7493         (read_header): Add arg 'info' and update counter.
7494         (skip_data): Ditto.
7495         (gpgtar_list): Pass info object to read functions.
7496         (gpgtar_read_header): Add arg 'info'.
7497         * tools/gpgtar-extract.c (gpgtar_extract): add arg 'info' and pass on.
7498         (extract_regular): Add arg 'info' and update counter.
7499
7500         agent: Default to extended key format.
7501         + commit 05eff1f6623c272fcabd4e238842afc832710324
7502         * agent/gpg-agent.c (oDisableExtendedKeyFormat, oNoop): New.
7503         (oEnableExtendedKeyFormat): Remove.
7504         (opts): Make --enable-extended-key-format a dummy option.  Add
7505         disable-extended-key-format.
7506         (parse_rereadable_options): Implement oDisableExtendedKeyFormat.
7507
7508         card: Allow PEM encoded certificates in "writecert".
7509         + commit 4e1f04a4cd30859507218395e630e886801ae2b7
7510         * tools/gpg-card.c (cmd_writecert): Convert from base64.
7511
7512         card: Print the keyref also for non-initialized slots.
7513         + commit 772bba34ea089b3a00f0b1ea5138ba7422c95180
7514         * tools/gpg-card.c (list_one_kinfo): Add arg label_keyref and change
7515         callers.
7516
7517 2019-03-06  NIIBE Yutaka  <gniibe@fsij.org>
7518
7519         agent: Fix detection of exit of scdaemon.
7520         + commit 2abad7585a004586e27ead6ab8c9c57ce5ed1326
7521         * agent/call-scd.c (start_scd): Acquire START_SCD_LOCK for
7522         SCD_LOCAL_LIST.  Move common case code to fast path.
7523         Release START_SCD_LOCK before calling unlock_scd.
7524         When new CTX is allocated, clear INVALID flag.
7525         (agent_reset_scd): Serialize the access to SCD_LOCAL_LIST by
7526         START_SCD_LOCK.
7527
7528 2019-03-05  Werner Koch  <wk@gnupg.org>
7529
7530         card: Print card version.  Check for bad Yubikeys.
7531         + commit 8d4af54ddd039d47e9c4803559193fcca97f0a46
7532         * scd/app.c (app_new_register): Set card version for Yubikeys.
7533         (app_write_learn_status): Print CARDVERSION and APPVERSION.
7534         * tools/card-call-scd.c (learn_status_cb): Detect them.
7535         * tools/gpg-card.h (struct card_info_s): Add appversion and
7536         cardversion.
7537         * tools/gpg-card.c (list_openpgp): Remove version printing from serial
7538         number.
7539         (print_a_version): New.
7540         (list_card): Print card and app version.
7541         (cmd_generate): Do not allow broken Yubikeys.
7542
7543         scd: Rename a shared info field name.
7544         + commit 64caa6a08298119b10dc36ddd27b357cb47825b5
7545         * scd/app-piv.c (app_select_piv):
7546         * scd/app-common.h (struct app_ctx_s): Rename 'card_version' to
7547         'cardversion'.  Rename all users.  Add 'appversion'.
7548
7549         scd:piv: Implement import of private keys for Yubikeys.
7550         + commit e897e1e255ef9870dfd1639d6f4e97bdf4e83b34
7551         * scd/app-piv.c (concat_tlv_list): Add arg 'secure' and adjust
7552          callers.
7553         (writekey_rsa, writekey_ecc): New.
7554         (do_writekey): New.
7555         (do_writecert): Provide a better error message for an empty cert.
7556         (app_select_piv): Register do_writekey.
7557         * scd/iso7816.c (iso7816_send_apdu): New.
7558         * scd/app-common.h (APP_WRITEKEY_FLAG_FORCE): New.
7559         * agent/command.c (cmd_keytocard): Make the timestamp optional.
7560         * tools/card-call-scd.c (inq_writekey_parms): Remove.
7561         (scd_writekey): Rewrite.
7562         * tools/gpg-card.c (cmd_writekey): New.
7563         (enum cmdids): Add cmdWRITEKEY.
7564         (dispatch_command, interactive_loop): Call cmd_writekey.
7565
7566         gpg: Make invalid primary key algos obvious in key listings.
7567         + commit db87132b10664718b7db6ec1dad584b54d1fb265
7568         * g10/keylist.c (print_key_line): Print a warning for invalid algos.
7569
7570         agent: Minor change to the KEYTOCARD command.
7571         + commit bcc89a6df24c79690436340f65c7ab13c65c2c45
7572         * agent/command.c (cmd_keytocard): Make timestamp optional.  Use
7573         modern parser function.
7574         * agent/call-scd.c (agent_card_writekey): Rename an arg and for
7575         clarity return gpg_error_t instead of int.
7576         * agent/divert-scd.c (divert_writekey): Ditto.
7577
7578 2019-03-01  Werner Koch  <wk@gnupg.org>
7579
7580         sm: Print Yubikey attestation extensions with --dump-cert.
7581         + commit 86c241a8c9a952ea8007066b70b04f435e2e483e
7582         * sm/keylist.c (oidtranstbl): Add Yubikey OIDs.
7583         (OID_FLAG_HEX): New.
7584         (print_hex_extn): New.
7585         (list_cert_raw): Make use of that flag.
7586
7587         scd:piv: Add feature to read Yubikey attestation certificates.
7588         + commit 51df13d9ec8e89c4236e2f4a9ae3647963c30783
7589         * scd/app-piv.c (do_readcert): Add hack to read Yubikey attestaions.
7590
7591         scd:piv: Allow writecert to only write matching certs.
7592         + commit 696d4c290dd4945b693263721f606b5049b9569d
7593         * scd/app-piv.c (do_readkey): Read the key from the cert here instead
7594         of letting the upper layer do this.
7595         (do_writecert): Check that the cert matches the key and that a key has
7596         already been generated.
7597
7598         card: Remove the "admin" command.
7599         + commit 280baee72dcb0ca54ce99b524bc2125cbc38e0e4
7600         * tools/gpg-card.c (cmd_passwd): Remove arg allow_admin.
7601         (enum cmdids): Rename cmdAUTHENTICATE to cmdAUTH and cmdFACTORYRESET
7602         to cmdFACTRST.
7603         (cmds): Remove column 'admin_only'.
7604         (interactive_loop): Remove admin_only stuff.
7605
7606 2019-02-28  Werner Koch  <wk@gnupg.org>
7607
7608         sm: Don't mark a cert as de-vs compliant if it leads to SHA-1 sigs.
7609         + commit 2c75af9f65d15653ed1bc191f1098ae316607041
7610         * sm/keylist.c (print_compliance_flags): Also check the diges_also.
7611
7612 2019-02-27  NIIBE Yutaka  <gniibe@fsij.org>
7613
7614         agent: PKSIGN should return signature in same format for card.
7615         + commit 0173b249cfb7f02f94911ec759630d81f312e0bd
7616         * agent/pksign.c (agent_pksign_do):
7617
7618 2019-02-26  Werner Koch  <wk@gnupg.org>
7619
7620         scd: Simplify the app_readkey parameters.
7621         + commit c2235d994dbb1d7ddba20f89a7c02f4a27b0610c
7622         * scd/app-help.c (app_help_pubkey_from_cert): New.
7623         * scd/command.c (cmd_readkey): Refactor to use that new function and
7624         handle the --advanced flag only here.
7625         * scd/app.c (app_readkey): Remove parm advanced.
7626         * scd/app-common.h (struct app_ctx_s): Remove parm advanced from the
7627         readkey member.
7628         * scd/app-nks.c (do_readkey): Adjust for removed parm.
7629         * scd/app-piv.c (do_readkey): Ditto.
7630         * scd/app-openpgp.c (do_readkey): Ditto.
7631
7632         conf: New option --show-socket.
7633         + commit ac485b4f253ad6bbd2bc648650b56d60fc82f89d
7634         * tools/gpgconf-comp.c (gc_component_t): Move this enum to ...
7635         * tools/gpgconf.h: here.
7636         * tools/gpgconf.c (oShowSocket): New.
7637         (opts): Add new option.
7638         (main): Implement new option.
7639
7640 2019-02-26  NIIBE Yutaka  <gniibe@fsij.org>
7641
7642         libdns: Avoid using compound literals (8).
7643         + commit 371ae25f8f6f2d1ac030bf984bca479393a5ed43
7644         * dirmngr/dns.h (dns_quietinit): Remove.
7645         (dns_hints_i_new): Remove.
7646
7647         libdns: Avoid using compound literals (7).
7648         + commit d661acd483236d34720a4959fc816d05f89c2cb7
7649         * dirmngr/dns.h (DNS_OPTS_INIT, dns_opts): Remove.
7650         * dirmngr/dns-stuff.c (libdns_res_open): Use zero-ed, and initialized
7651         automatic variable for opts.
7652         * dirmngr/dns.c (send_query, resolve_query, resolve_addrinfo):
7653         Likewise.
7654
7655         libdns: Avoid using compound literals (6).
7656         + commit 6501e59d3685bb58753c9caea729a4b0eca3942a
7657         * dirmngr/dns.h (dns_rr_i_new): Remove.
7658         (dns_rr_i_init): Remove unused second argument.
7659         * dirmngr/dns.c (dns_p_dump, dns_hints_query, print_packet)
7660         (parse_packet): Use automatic variable for struct dns_rr_i.
7661         (dns_d_cname): No need to call dns_rr_i_init after memset 0.
7662         (dns_rr_i_init): Remove unused second argument.  Return nothing.
7663         * dirmngr/dns-stuff.c (resolve_addr_libdns, get_dns_cert_libdns)
7664         (getsrv_libdns): Follow the change of dns_rr_i_init.
7665
7666         libdns: Avoid using compound literals (5).
7667         + commit a1ccfe2b37847cce0db2fb94a7365c9fa501eda4
7668         * dirmngr/dns.h (dns_rr_foreach): Don't use dns_rr_i_new.
7669         Call dns_rr_grep with NULL.
7670         * dirmngr/dns.c (dns_rr_grep): Support NULL for error_.
7671
7672         libdns: Avoid using compound literals (4).
7673         + commit 7313a112f9c7ada61d24285313d2e2d069a672e8
7674         * dirmngr/dns.h (dns_d_new*): Remove.
7675         * dirmngr/dns.c (parse_packet): Use dns_d_init with automatic
7676         variable.
7677         (parse_domain): Likewise.
7678
7679         libdns: Avoid using compound literals (3).
7680         + commit 72efb7840258808cd892b90d871ea1cc1c31d7f5
7681         * dirmngr/dns.h (dns_p_new): Remove.
7682         * dirmngr/dns.c (dns_hosts_query): Use dns_p_init with automatic
7683         variable.
7684         (dns_hints_query, dns_res_glue, parse_packet, query_hosts)
7685         (send_query, show_hints, echo_port): Likewise.
7686
7687         libdns: Avoid using compound literals (2).
7688         + commit 455ef62d29a112de05897139716265d07e4c6ae3
7689         * dirmngr/dns.h (dns_strsection1, dns_strsection3): Remove.
7690         (dns_strclass1, dns_strclass3): Remove.
7691         (dns_strtype1, dns_strtype3): Remove.
7692         (dns_strsection, dns_strclass, dns_strtype): Directly use the
7693         function.
7694         * dirmngr/dns.c (dns_strsection): Use automatic variable.
7695         (dns_strclass, dns_strtype): Likewise.
7696
7697         libdns: Avoid using compound literals.
7698         + commit 1c405499388fd5bed0968ab5c6c5d1b3373537b9
7699         * dirmngr/dns.c (dns_inet_pton, dns_so_tcp_keep): Use automatic
7700         variables.
7701         (dns_poll, dns_send_nopipe): Likewise, adding const qualifier.
7702
7703 2019-02-25  Werner Koch  <wk@gnupg.org>
7704
7705         scd: PIV: Always require a PIN for signing with 9C.
7706         + commit a481d17432bf7cca19ca71b6aa5ccd9aee2b3baa
7707         * scd/app-piv.c (verify_chv): Add arg 'force'.
7708         (do_sign): Use force for 0x9c.
7709
7710         card: Rename gpg-card-tool to gpg-card.
7711         + commit 28de5c0ea53373c56a4405fe6b08d194682dd1de
7712         * tools/card-tool-keys.c: Rename to card-keys.c.
7713         * tools/card-tool-misc.c: Rename to card-misc.c.
7714         * tools/card-tool-yubikey.c: Rename to card-yubikey.c.
7715         * tools/card-tool.h: Rename to gpg-card.h.
7716         * tools/gpg-card-tool-w32info.rc: Rename to gpg-card-w32info.rc
7717         * doc/card-tool.texi: Rename top gpg-card.texi
7718
7719         agent: Fix for suggested Libgcrypt use.
7720         + commit a12c3a566e2e4b10bc02976a2819070877ee895c
7721         * agent/divert-scd.c (divert_pkdecrypt): Skip a flags parameter.
7722
7723 2019-02-25  NIIBE Yutaka  <gniibe@fsij.org>
7724
7725         gpgscm: Build well even if NDEBUG defined.
7726         + commit e140c6d4f581be1a60a34b67b16430452f3987e8
7727         * gpgscm/scheme.c (gc_reservation_failure): Fix adding ";".
7728         [!NDEBUG] (scheme_init_custom_alloc): Don't init seserved_lineno.
7729
7730 2019-02-22  NIIBE Yutaka  <gniibe@fsij.org>
7731
7732         scd: internal driver: Submit SET_INTERFACE control transfer.
7733         + commit 611faf1579a56925994d53eb08e1290a4b3958cf
7734         * scd/ccid-driver.c (ccid_open_usb_reader): Alway submit SET_INTERFACE
7735         control transfer.
7736
7737 2019-02-21  Werner Koch  <wk@gnupg.org>
7738
7739         sm: Fix certificate creation with key on card.
7740         + commit c1000c673814e552923cf1361346d7dfeee55608
7741         * sm/certreqgen.c (create_request): Fix for certmode.
7742
7743         card: Print usage info for each key.
7744         + commit 7317aeb3f448c98dcfa9c04f49b9a69d81c26776
7745         * tools/card-call-scd.c (learn_status_cb): Handle extended
7746         KEYPARIRINFO.
7747         * tools/card-tool.h (struct key_info_s): Add field 'usage'.
7748         * tools/gpg-card-tool.c (list_one_kinfo): Show usage flags.
7749
7750         scd: Extend KEYPAIRINFO by key usage info.
7751         + commit 5e21ef2d556ca65b7869bf16ab465f3511601e1e
7752         * scd/app-openpgp.c (send_keypair_info): Append usage string.
7753         * scd/app-piv.c (struct data_object_s): Remove column 'binary'.  Add
7754         column 'usage'.
7755         (dump_all_do): Adjust for removed 'binary'.
7756         (send_keypair_and_cert_info): Append usage string.
7757
7758         card: Print the keyref in the listing.
7759         + commit 3384ba6c1c421cfa674dbd8294dc655d7320534e
7760         * tools/gpg-card-tool.c (list_one_kinfo): Print the keyref.
7761
7762         scd: Don't let the "undefined" app cause a conflict error.
7763         + commit 5ecc7a02609dde65096ddb12e0ff8f6bce3b774a
7764         * scd/app.c (check_conflict): Ignore "undefined".
7765
7766         sm: Prepare algo mapping to handle values > 255.
7767         + commit d7a54ca461ad75e4fab77a2f1b25986c7637762a
7768         * sm/misc.c (transform_sigval): Allow for larger values of MDALGO and
7769         PKALGO.
7770
7771 2019-02-21  NIIBE Yutaka  <gniibe@fsij.org>
7772
7773         scd: Clear CHV status on timeout error.
7774         + commit 2013cb5ee667610de35f8b92c2f979f5caa09d4c
7775         * scd/app-openpgp.c (clear_chv_status): New.
7776         (do_change_pin): Use clear_chv_status.
7777         (do_sign): Call clear_chv_status on GPG_ERR_TIMEOUT.
7778         (do_auth, do_decipher): Likewise.
7779
7780         scd: Handle ack button timeout as GPG_ERR_TIMEOUT.
7781         + commit bd15aa34ab8ad10adbb7540a8845b4a2600437b6
7782         * scd/apdu.h (SW_ACK_TIMEOUT): New.
7783         * scd/iso7816.c (map_sw): Return GPG_ERR_TIMEOUT for SW_ACK_TIMEOUT.
7784
7785         tests: Add "disable-scdaemon" in gpg-agent.conf.
7786         + commit 64b7c6fd1945bc206cf56979633dfca8a7494374
7787         * tests/openpgp/defs.scm: Add "disable-scdaemon".  Remove
7788           "scdaemon-program".
7789         * tests/gpgme/gpgme-defs.scm, tests/gpgsm/gpgsm-defs.scm: Likewise.
7790         * tests/inittests, tests/pkits/inittests: Add "disable-scdaemon"
7791
7792 2019-02-19  NIIBE Yutaka  <gniibe@fsij.org>
7793
7794         agent: Terminate pinentry process gracefully, by watching socket.
7795         + commit c395f8315362793409be54aca630ce6e903ea984
7796         * agent/call-pinentry.c (watch_sock): New.
7797         (do_getpin): Spawn the watching thread.
7798
7799         agent: Minor change for pinentry status handling.
7800         + commit 99aa54323f97937613e02d8c2da91544e1fe7bcf
7801         * agent/call-pinentry.c (struct entry_parm_s): Add status.
7802         (do_getpin): Use param->status.
7803         (agent_askpin): Copy param->status. to pininfo.
7804
7805         agent: Factor out the getpin interaction.
7806         + commit ada797f477f923bee36d67c8e49f728ae7adb9e9
7807         * agent/call-pinentry.c (do_getpin): New.
7808         (agent_askpin, agent_get_passphrase): Use do_getpin.
7809
7810 2019-02-18  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
7811
7812         sm: Support generation of card-based ed25519 CSR.
7813         + commit 3cbdf896e6919333b5423001ab58c01a04363386
7814         * sm/call-agent.c (gpgsm_scd_pksign): Allow SHA512. Create proper
7815         S-expression for EdDSA signature.
7816         * sm/certreqgen.c (create_request): Force use of SHA512 when
7817         using a ed25519 key.
7818         * sm/misc.c (transform_sigval): Insert OID for ed25519.
7819
7820 2019-02-15  Damien Goutte-Gattat via Gnupg-devel  <gnupg-devel@gnupg.org>
7821
7822         sm: Support generation of card-based ECDSA CSR.
7823         + commit 74e9b579ca273fc07be090bb5fb7800a97b1b452
7824         * sm/call-agent.c (gpgsm_scd_pksign): Identify type of signing key
7825         and format resulting S-expression accordingly.
7826         * sm/misc.c (transform_sigval): Support ECDSA signatures.
7827
7828 2019-02-14  Ingvar Hagelund  <ingvar@redpill-linpro.com>
7829
7830         po: Correct a simple typo in the Norwegian translation.
7831         + commit b89f1790e0b9f3196a2382a9b9ff5f461c58a449
7832
7833
7834 2019-02-13  Werner Koch  <wk@gnupg.org>
7835
7836         card: New command "yubikey".
7837         + commit 7e1cd2cd416f852fc039af310e3df1ce395d89a9
7838         * tools/card-tool-yubikey.c: New.
7839         * tools/Makefile.am (gpg_card_tool_SOURCES): Add it.
7840         * tools/card-call-scd.c (scd_apdu): Allow returning data.
7841         * tools/card-tool-misc.c (send_apdu): New.  Move from gpg-card-tool.c
7842         and let it return data.  Change all callers.
7843
7844         * tools/gpg-card-tool.c (cmd_writecert): Prepend the certref with the
7845         current application type.
7846         (cmd_yubikey): New.
7847
7848 2019-02-11  Werner Koch  <wk@gnupg.org>
7849
7850         scd: Implement decryption for PIV cards.
7851         + commit 43b14b4cc227311aa77b1fc1d9577c5f7d3eda86
7852         * scd/app-piv.c (do_decipher): New.
7853
7854         scd: For PIV cards used NO_AUTH instead of BAD_PIN.
7855         + commit b2838694402ce0cfc2ef70451bf0e6677b875ca9
7856         * common/util.h (GPG_ERR_NO_AUTH, GPG_ERR_BAD_AUTH): Add replacement
7857         codes for gpgrt < 1.36.
7858         * scd/app-piv.c (auth_adm_key):
7859         (do_genkey, do_writecert): Use better error codes.
7860
7861 2019-02-08  Werner Koch  <wk@gnupg.org>
7862
7863         scd: Implement RSA signing for PIV cards.
7864         + commit 53beea56afecde76f0f4ca93fc50ca59298a093e
7865         * scd/app-piv.c (concat_tlv_list): New.
7866         (get_key_algorithm_by_dobj): Rename args for clarity.
7867         (do_auth): factor all code out to ...
7868         (do_sign): new.  Implement RSA signing.
7869
7870         sm: In --gen-key with "key from card" show also the algorithm.
7871         + commit 0328976c94adc2c518c7a7763a35319a0000c5e2
7872         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Get and show algo.
7873
7874         common: Provide function to get public key algo names in our format.
7875         + commit 03bf8e967adb2dd13329ba1089deb419d49e55c0
7876         * tools/card-tool-misc.c (pubkey_algo_string): Move to  ...
7877         * common/sexputil.c (pubkey_algo_string): here.
7878
7879         card: Make "generate" work for PIV cards.
7880         + commit a1cb4a940f308ba21ecc002b044efccf0c547784
7881         * tools/card-call-scd.c (scd_genkey_cb): Make createtime optional.
7882         (scd_genkey_cb):  Ditto.  Add arg algo.
7883         * tools/gpg-card-tool.c (cmd_generate): Add options and factor card
7884         specific code out to ...
7885         (generate_openpgp, generate_generic): new functions.
7886
7887         scd: Allow generating ECC curves on PIV cards.
7888         + commit b349adc5c0d00d2fc405a45bd078f1580b5610cc
7889         * scd/app-piv.c (genkey_parse_ecc): New.
7890         (get_keygrip_by_tag): Call that one.
7891         (do_readkey): Call that one.
7892         * scd/command.c (cmd_genkey): Add option --algo.
7893
7894         common: New functions get_option_value and ascii_strupr.
7895         + commit e2f18023b3b3b7e55b35218f65e37448d1011172
7896         * common/server-help.c (get_option_value): New.
7897         * common/stringhelp.c (ascii_strupr): New.
7898
7899 2019-02-07  Werner Koch  <wk@gnupg.org>
7900
7901         card: Print the used algorithm of all keys.
7902         + commit b79bc877f2ad4d08e7de377cf4bf616b981b3c5f
7903         * tools/card-call-scd.c (scd_readkey): New.
7904         * tools/card-tool-misc.c (pubkey_algo_string): New.
7905         * tools/gpg-card-tool.c (list_one_kinfo): Print the algo.
7906
7907         card: Fix a NULL-ptr deref in key listings.
7908         + commit df6ba6dfd235fddb7645bc16573da1a6a7e6b49d
7909         * tools/card-tool-keys.c (get_matching_keys): Fix segv.
7910         * tools/gpg-card-tool.c (main): Init info.
7911
7912         scd: Store a new PIV public key in the certificate DO.
7913         + commit 5bf1212000f48243642ace0f708fd27446879b9e
7914         * scd/app-piv.c (struct genkey_result_s): Remove type and all users.
7915         (send_keypair_and_cert_info): Print certinfo only if we got a cert..
7916         (readcert_by_tag): Add arg r_mechanism and implement reading of public
7917         keys.
7918         (get_keygrip_by_tag): Use a public key to compute the keygrip.
7919         (do_readcert): Make sure to only return a certificate.
7920         (do_readkey): Read public key from the DO if a certificate is missing.
7921         (get_key_algorithm_by_dobj): Get the algorithm also from a public key.
7922         (does_key_exist): String changes.
7923         (do_genkey): Remove result caching and store public key in the DO.
7924
7925         card: Support reading and writing PIV certificates.
7926         + commit fcec5b40e589b2ef201efb89f22a952feb4a9069
7927         * scd/app-piv.c (add_tlv): New.
7928         (put_data): New.
7929         (do_writecert): New.
7930         (do_setattr): Remove usused special mode 0.
7931         * tools/gpg-card-tool.c (cmd_writecert): Allow other cards than
7932         OPENPGP.
7933         (cmd_readcert): Ditto.
7934
7935 2019-02-06  Werner Koch  <wk@gnupg.org>
7936
7937         scd: Add genkey command to app-piv (rsa-only)
7938         + commit b5b1f721582df9d0379cb68b4faeceed32a56e49
7939         * scd/app-piv.c (struct genkey_result_s): new.
7940         (struct app_local_s): add member genkey_results.
7941         (do_deinit): Free that one.
7942         (flush_cached_data): Extend to delete all items.
7943         (keyref_from_dobj): New.
7944         (do_readkey): New.
7945         (do_auth): Use keyref_from_dobj.
7946         (does_key_exist): New.
7947         (genkey_parse_rsa): New.
7948         (do_genkey): New.
7949
7950         scd: Make app_genkey and supporting ISO function more flexible.
7951         + commit 9a9cb0257aebb1480b999fdf9d90904083eb8e3c
7952         * scd/app.c (app_genkey): Add arg keytype.
7953         * scd/app-common.h (struct app_ctx_s): Fitto for the genkey member.
7954         * scd/command.c (cmd_genkey): Adjust for change.
7955         * scd/iso7816.c (do_generate_keypair): Replace arg read_only by new
7956         args p1 and p2.
7957         (iso7816_read_public_key): Adjust for this.
7958         (iso7816_generate_keypair): Add new args p1 and p2.
7959         * scd/app-openpgp.c (do_genkey): Adjust for changes.
7960
7961         scd: Fix parameter name of app_change_key.
7962         + commit c26af8ac263ea006ed32e110a09271e4bfbf1f37
7963         * scd/app-common.h (APP_GENKEY_FLAG_FORCE): New.
7964         * scd/app.c (app_change_pin): Rename arg reset_mode to flags and
7965         change from int to unsigned int.
7966
7967         scd: Implement PIN changing and unblocking for PIV cards.
7968         + commit e9e876cb5572670322aa1d3462d64c75c03974d9
7969         * scd/app-piv.c: Some refactoring
7970         (do_change_chv): Implement.
7971
7972 2019-02-05  Werner Koch  <wk@gnupg.org>
7973
7974         scd: Allow standard keyref scheme for app-openpgp.
7975         + commit 3231ecdafd71ac47b734469b07170756979ede72
7976         * scd/app-openpgp.c (do_change_pin): Allow prefixing the CHVNO with
7977         "OPENPGP."
7978         * tools/card-call-scd.c (scd_change_pin): Change API to use strings.
7979         * tools/gpg-card-tool.c (cmd_passwd): Adjust for change.
7980         (cmd_unblock): Ditto.
7981
7982 2019-01-31  Werner Koch  <wk@gnupg.org>
7983
7984         card: Implement non-interactive mode.
7985         + commit 1c0fa3e6f74692d5e9b5f08cda523f0fcec305eb
7986         * tools/card-tool.h (opt): Add field 'initialized'.
7987         * tools/card-call-scd.c (scd_learn): Set it.
7988         * tools/gpg-card-tool.c (main): Reworked.
7989         (dispatch_command): New.
7990
7991         card: New command 'authenticate'.
7992         + commit da383257404cde9689bc58259ef3f46e9903bf34
7993         * tools/card-tool-misc.c (hex_to_buffer): New.
7994         * tools/gpg-card-tool.c (get_data_from_file): Change to allow returning
7995         a string.
7996         (cmd_authenticate): New.
7997         (cmds): Add command "authenticate".
7998
7999         scd: Add DES authentication for PIV card.
8000         + commit 1d57450f3e71b198e66e155a8ebbfab452f58ffc
8001         * scd/app-piv.c (flush_cached_data): New.
8002         (auth_adm_key): New.
8003         (set_adm_key): New.
8004         (do_setattr): New.
8005         * scd/command.c (MAXLEN_SETATTRDATA): New.
8006         (cmd_setattr): Add an inquire option.
8007
8008 2019-01-30  Werner Koch  <wk@gnupg.org>
8009
8010         card: Cache the results from gpg and gpgsm.
8011         + commit 0107984f9f55f84e4842642bceefd2181ec09dab
8012         * tools/card-tool-keys.c (keyblock_cache): New var.
8013         (release_keyblock): Factor code out to a new do_release_keyblock.  Add
8014         a cache.
8015         (flush_keyblock_cache): New.
8016         (get_matching_keys): Use the cache.
8017         * tools/gpg-card-tool.c (cmds): Add command "reset".
8018         (interactive_loop): Implement reset.
8019
8020         card: Print matching OpenPGP and X.509 data.
8021         + commit 833f27a6a7e059e38bccaf360f05e72e4403545a
8022         * tools/card-tool-keys.c: New.
8023         * tools/Makefile.am (gpg_card_tool_SOURCES): Add file.
8024         * tools/card-tool.h (struct pubkey_s, pubkey_t): New.
8025         (struct userid_s, userid_t): New.
8026         (struct keyblock_s, keyblock_t): New.
8027         * common/util.h (GNUPG_PROTOCOL_): New const
8028         * tools/gpg-card-tool.c (aTest): Add temporary command.
8029         (list_one_kinfo): Print info from gpg and gpgsm.
8030
8031         gpg: Emit an ERROR status if no key was found with --list-keys.
8032         + commit 140fda8c61422ec055c3f7e214cc35706c4320dd
8033         * g10/keylist.c (list_one): Emit status line.
8034
8035         common: Add kludge to allow silencing gnupg_exec_tool_stream.
8036         + commit 1fd3d864b4eceaf45b33e754e5d832b7ccc0d17f
8037         * common/exectool.c (read_and_log_buffer_t): Take care of a --quiet
8038         argument.
8039         (gnupg_exec_tool_stream): Ditto.
8040
8041         gpg: Allow generating Ed25519 key from an existing key.
8042         + commit 346a98fabe03adf2e202e36fc2aa24b1c2571154
8043         * g10/misc.c (map_pk_gcry_to_openpgp): Add EdDSA mapping.
8044
8045         common: New function decode_c_string.
8046         + commit 6ecedd0b25b6b1a33be63b99f2a8256370000521
8047         * common/miscellaneous.c (decode_c_string): New.
8048
8049 2019-01-29  Werner Koch  <wk@gnupg.org>
8050
8051         gpg: Implement searching keys via keygrip.
8052         + commit c128667b3cba749dd14262e032d4c260a2b0acd3
8053         * kbx/keybox-defs.h (struct _keybox_openpgp_key_info): Add field grip.
8054         * kbx/keybox-openpgp.c (struct keyparm_s): New.
8055         (keygrip_from_keyparm): New.
8056         (parse_key): Compute keygrip.
8057         * kbx/keybox-search.c (blob_openpgp_has_grip): New.
8058         (has_keygrip): Call it.
8059
8060         common: Provide some convenient OpenPGP related constants.
8061         + commit f382984966a31a4cbe572bce5370590c5490ed1e
8062         * common/openpgpdefs.h (OPENPGP_MAX_NPKEY): New.
8063         (OPENPGP_MAX_NSKEY): New.
8064         (OPENPGP_MAX_NSIG): New.
8065         (OPENPGP_MAX_NENC): New.
8066         * g10/packet.h: Define PUBKEY_MAX using the new consts.
8067
8068         common: New helper functions for OpenPGP curve OIDs.
8069         + commit 4a1558d0c7190cf13d35385e47291a7aa121be3e
8070         * common/openpgp-oid.c (openpgp_oidbuf_to_str): Factor most code out
8071         to ...
8072         (openpgp_oidbuf_to_str): new.
8073         (openpgp_oidbuf_is_ed25519): New.
8074         (openpgp_oidbuf_is_cv25519): New.
8075
8076         card: Support factory reset for Yubikey PIV application.
8077         + commit 79bed504e51034d960fcb858fb643901cad85913
8078         * scd/app-common.h (struct app_ctx_s): Add field cardtype.
8079         * scd/app.c (app_new_register): Set cardtype for yubikey.
8080         (app_getattr): Add CARDTYPE.
8081         (app_write_learn_status): Emit new attribute.
8082         * scd/app-piv.c (do_getattr): Add CHV-USAGE.
8083         (do_learn_status): Emit it.
8084         * tools/card-tool.h (struct card_info_s): Add field cardtype.
8085         * tools/card-call-scd.c (learn_status_cb): Parse "CARDTYPE".
8086
8087         * tools/gpg-card-tool.c (list_piv): Print PIN usage policy.
8088         (list_card): Print card type.
8089         (cmd_factoryreset): Implement for Yubikey with PIV.
8090
8091         card: Print keyinfo for PIV cards.
8092         + commit 9325c92284bb346d11c3591bb2ea88095989361a
8093         * scd/app-piv.c (do_learn_status): Print CHV-STATUS.
8094         * tools/card-tool.h (struct card_info_s): Rename chvretry to chvinfo.
8095         * tools/card-call-scd.c (learn_status_cb): Depend CHV-STATUS on app
8096         type.
8097         * tools/gpg-card-tool.c (list_piv): New.
8098
8099         card: Make printing of key information more flexible.
8100         + commit 237880175f59d372011cd2e20bb49726eeccf058
8101         * tools/card-tool-misc.c: New.
8102         * tools/card-tool.h: Rewored data structures for key infos.
8103         * tools/gpg-card-tool.c: Ditto.
8104         * tools/card-call-scd.c: Ditto.
8105
8106 2019-01-28  NIIBE Yutaka  <gniibe@fsij.org>
8107
8108         agent: Clear bogus pinentry cache, when it causes an error.
8109         + commit 02a2633a7f0b7d91aa48ea615fb3a0edfd6ed6bb
8110         * agent/agent.h (PINENTRY_STATUS_*): Expose to public.
8111         (struct pin_entry_info_s): Add status.
8112         * agent/call-pinentry.c (agent_askpin): Clearing the ->status
8113         before the loop, let the assuan_transact set ->status.  When
8114         failure with PINENTRY_STATUS_PASSWORD_FROM_CACHE, it returns
8115         soon.
8116         * agent/findkey.c (unprotect): Clear the pinentry cache,
8117         when it causes an error.
8118
8119 2019-01-27  Werner Koch  <wk@gnupg.org>
8120
8121         card: Implement the bulk of OpenPGP stuff into gpg-card-tool.
8122         + commit 1c9251004592415b27988064ae20504dd1c37f57
8123         * tools/card-call-scd.c: New.
8124         * tools/card-tool.h: new.
8125         * tools/gpg-card-tool.c: Largely extended.
8126
8127 2019-01-26  Werner Koch  <wk@gnupg.org>
8128
8129         gpg: Fix just changed agent_get_s2k_count.
8130         + commit 54f88afba4564e62e51fe6e22beabbdee75f91ac
8131         * g10/call-agent.c (agent_get_s2k_count): Actually return the count.
8132
8133         gpg: Move S2K encoding function to a shared file.
8134         + commit ec13b1c562e34c0fcbc7b848ab6dc187b79cf2c1
8135         * g10/passphrase.c (encode_s2k_iterations): Move function to ...
8136         * common/openpgp-s2k.c: new file.  Remove default intialization code.
8137         * common/openpgpdefs.h (S2K_DECODE_COUNT): New to keep only one copy.
8138         * g10/call-agent.c (agent_get_s2k_count): Change to return the count
8139         and print an error.
8140         * agent/protect.c: Include openpgpdefs.h
8141         * g10/card-util.c (gen_kdf_data): Adjust for changes
8142         * g10/gpgcompose.c: Include call-agent.h.
8143         (sk_esk): Adjust for changes.
8144         * g10/passphrase (passphrase_to_dek): Adjust for changes.
8145         * g10/main.h (S2K_DECODE_COUNT): Remove macro.
8146
8147 2019-01-25  Werner Koch  <wk@gnupg.org>
8148
8149         scd: Improve app selection for app "undefined".
8150         + commit 0415b80227c52620bece3ae7502f38f24a23e59d
8151         * scd/app.c (app_new_register): Don't bail out early in undefined
8152         mode.
8153
8154         scd: Fix flushing of CA-FPR data objects.
8155         + commit c9f4c1f0de06672c6ae2b793d86cc001d131f9a6
8156         * scd/app-openpgp.c (do_setattr): Add new table item to flush a
8157         different tag.
8158
8159 2019-01-25  NIIBE Yutaka  <gniibe@fsij.org>
8160
8161         agent: Support --mode=ssh option for CLEAR_PASSPHRASE.
8162         + commit ae966bbe9b16ed68a51391afdde615339755e22d
8163         * agent/command.c (cmd_clear_passphrase): Add support for SSH.
8164
8165         dirmngr: Fix initialization of assuan's nPth hook.
8166         + commit 1f8817475f59ede3f28f57edc10ba56bbdd08b49
8167         * dirmngr/dirmngr.c (main): Move assuan_set_system_hooks to...
8168         (thread_init): ... here.
8169
8170 2019-01-24  Werner Koch  <wk@gnupg.org>
8171
8172         common: Extend function percent_data_escape.
8173         + commit 055f8854d3f49b8d06105d20f344f5ac10e4f6a6
8174         * common/percent.c (percent_data_escape): Add new args prefix and
8175         plus_escape.
8176         * agent/command.c (cmd_put_secret): Adjust for changed function
8177
8178         * common/t-percent.c (test_percent_data_escape): Extend test for the
8179         prefix.
8180         (test_percent_data_escape_plus): new test for the plus escaping.
8181
8182 2019-01-23  NIIBE Yutaka  <gniibe@fsij.org>
8183
8184         scd: Support PASSWD --clear for OpenPGP card.
8185         + commit fec75a3868da72196f76aca95c7ab07debb7dc04
8186         * scd/app-openpgp.c (do_change_pin): Implement handling
8187         APP_CHANGE_FLAG_CLEAR.
8188
8189 2019-01-22  Werner Koch  <wk@gnupg.org>
8190
8191         gpg: Stop early when trying to create a primary Elgamal key.
8192         + commit f97dc55ff1b041071bc3cbe98aa761bf77bb7ac8
8193         * g10/misc.c (openpgp_pk_test_algo2): Add extra check.
8194
8195         card-tool: Add skeleton for new tool.
8196         + commit e6d613711a327d63511601dd42aeff34e09ec95a
8197         * tools/gpg-card-tool.c: New.
8198         * tools/gpg-card-tool-w32info.rc: New.
8199         * tools/Makefile.am: Add new tool.
8200
8201         common: Add generic status print function.
8202         + commit 03cf23b43ec5fea8a355d3ba2200e86a8efc589b
8203         * common/status.c (gnupg_set_status_fd): New.
8204         (gnupg_status_printf): New.
8205         * po/Makevars (XGETTEXT_OPTIONS): Add gnupg-status_printf.
8206
8207 2019-01-21  Werner Koch  <wk@gnupg.org>
8208
8209         scd: Support CHV-STATUS and CHECKPIN for PIV.
8210         + commit fa9d703de5c70ae925e8ca6604073506f24d641a
8211         * scd/app-piv.c (parse_pin_keyref): New.
8212         (get_chv_status): New.
8213         (do_getattr): Add name CHV-STATUS.
8214         (verify_pin): Add arg keyref to support other PINs.
8215         (do_change_pin): New.  Right now limited to --clear.
8216         (do_check_pin): New.
8217         (app_select_piv): Register new commands.
8218
8219         scd: Add option --clear to PASSWD.
8220         + commit 29929e65521279eabc98a67c766fe485057405a9
8221         * scd/command.c (cmd_passwd): Add option --clear.
8222         (send_status_printf): New.
8223         * scd/app-common.h (APP_CHANGE_FLAG_CLEAR): New.
8224         * scd/app-nks.c (do_change_pin): Return an error if that option is
8225         used.
8226         * scd/app-openpgp.c (do_change_pin): Ditto.
8227
8228 2019-01-20  Werner Koch  <wk@gnupg.org>
8229
8230         scd: Add very basic support for PIV cards.
8231         + commit ec56996029d95d4bd26e1badfe207232270c6247
8232         * scd/app-piv.c: New.
8233         * scd/Makefile.am (card_apps): Add app-piv.c
8234         * scd/app.c (app_new_register): Try to get a Yubikey serial number.
8235         Detect the PIV application.
8236         (get_supported_applications): Add "piv".
8237
8238         scd: One new and one improved 7816 function.
8239         + commit 70bb5c7931598590b1acfae90bf4657f5911d2d3
8240         * scd/apdu.c (apdu_send_direct): New arg R_SW.
8241         * scd/command.c (cmd_apdu): Ditto.
8242         * scd/iso7816.c (iso7816_apdu_direct): New arg R_SW.
8243         (iso7816_general_authenticate): New.
8244         * scd/app-nks.c (get_chv_status, get_nks_version): Pass NULL for new
8245         arg.
8246
8247 2019-01-17  Werner Koch  <wk@gnupg.org>
8248
8249         ssh: Simplify the curve name lookup.
8250         + commit d93797c8a7892fe26672c551017468e9f8099ef6
8251         * agent/command-ssh.c (struct ssh_key_type_spec): Add field
8252         alt_curve_name.
8253         (ssh_key_types): Add some alternate curve names.
8254         (ssh_identifier_from_curve_name): Lookup also bey alternative names
8255         and return the canonical name.
8256         (ssh_key_to_blob): Simplify the ECDSA case by using gcry_pk_get_curve
8257         instead of the explicit mapping.
8258         (ssh_receive_key): Likewise.  Use ssh_identifier_from_curve_name to
8259         validate the curve name.  Remove the reverse mapping because since
8260         GnuPG-2.2 Libgcrypt 1.7 is required.
8261         (ssh_handler_request_identities): Log an error message.
8262
8263 2019-01-16  NIIBE Yutaka  <gniibe@fsij.org>
8264
8265         gpg: Report STATUS_NO_SECKEY when it is examined.
8266         + commit dafffa95b2317bcb80fff1fd6d2bc7b4e6b1e206
8267         * g10/packet.h (struct pubkey_enc_list): Add result.
8268         * g10/mainproc.c (proc_pubkey_enc): Initialize ->result.
8269         (proc_encrypted): Report STATUS_NO_SECKEY status.
8270         * g10/pubkey-enc.c (get_session_key): Set ->result.
8271
8272 2019-01-07  NIIBE Yutaka  <gniibe@fsij.org>
8273
8274         scd: Fix for USB INTERRUPT transfer.
8275         + commit 5ab3bc422a5cc1a646c168b547f2b6538b3a4ffa
8276         * scd/ccid-driver.c (intr_cb): When LIBUSB_TRANSFER_NO_DEVICE,
8277         just handle this event as failure.
8278
8279 2019-01-03  Werner Koch  <wk@gnupg.org>
8280
8281         scd: Add two variants to the set of ISO7816 functions.
8282         + commit 405feca2bdeeb620dc406667a702035a123ae848
8283         * scd/iso7816.c (iso7816_select_application_ext): New.
8284         (iso7816_get_data_odd): New.
8285
8286         scd: Support "READKEY --advanced" for all cards.
8287         + commit cca2b87e79cda212a33c13efdd2b2830295d2efe
8288         * scd/command.c (cmd_readkey): Reformat for advanced mode.
8289
8290 2018-12-18  Werner Koch  <wk@gnupg.org>
8291
8292         wks: Do not use compression for the encrypted data.
8293         + commit 70a8db0333e3c22403b3647f8b5f924f6dace719
8294         * tools/gpg-wks-client.c (encrypt_response): Add arg -z0.
8295         * tools/gpg-wks-server.c (encrypt_stream): Ditto.
8296
8297 2018-12-18  NIIBE Yutaka  <gniibe@fsij.org>
8298
8299         scd: Fix description string.
8300         + commit e6b7e0ff9990813ac9f11b2d9d92596d6379ebfe
8301         * scd/app-openpgp.c (data_objects): Capitalize the word for usage.
8302
8303 2018-12-17  Werner Koch  <wk@gnupg.org>
8304
8305         Silence a few compiler warnings new with gcc 8.
8306         + commit 40c307fa8d0e813f2aa57806f25b8b0063cc2be3
8307         * dirmngr/dns.c: Include gpgrt.h.  Silence -Warray-bounds also gcc.
8308         * tools/gpg-pair-tool.c (command_respond): Init two vars to silence
8309         gcc.
8310
8311 2018-12-12  NIIBE Yutaka  <gniibe@fsij.org>
8312
8313         card: Suppress error message by agent_scd_cardlist.
8314         + commit ebf775eb16fef27bd1f27319a5483d04dcf95a9a
8315         * g10/call-agent.c (agent_scd_cardlist): Add
8316         FLAG_FOR_CARD_SUPPRESS_ERRORS.
8317
8318 2018-12-11  Werner Koch  <wk@gnupg.org>
8319
8320         agent: Make the S2K calibration time runtime configurabe.
8321         + commit cbcc8c19541fe8407f3b6588fce1535c64cf6b25
8322         * agent/protect.c (s2k_calibration_time): New file global var.
8323         (calibrate_s2k_count): Use it here.
8324         (get_calibrated_s2k_count): Replace function static var by ...
8325         (s2k_calibrated_count): new file global var.
8326         (set_s2k_calibration_time): New function.
8327         * agent/gpg-agent.c (oS2KCalibration): New const.
8328         (opts): New option --s2k-calibration.
8329         (parse_rereadable_options): Parse that option.
8330
8331         dirmngr: Retry another server from the pool on 502, 503, 504.
8332         + commit 05ef6282784495a77f4faf76c0de5bc85dfecf06
8333         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Add arg
8334         http_status and handle it.
8335         (ks_hkp_search): Get http_status froms end_request and pass on to
8336         handle_send_request_error.
8337         (ks_hkp_get): Ditto.
8338         (ks_hkp_put): Ditto.
8339
8340         dirmngr: New function http_status2string.
8341         + commit dc61f4ecea5c9815cb00aeb25439978337c1fd64
8342         * dirmngr/http.c (http_status2string): New.
8343
8344         gpg: In search-keys return "Not found" instead of "No Data".
8345         + commit e7252ae57f3c9da557f23295268f74dd25fee3a1
8346         * g10/keyserver.c (keyserver_search): Check for NO_DATA.
8347
8348 2018-12-11  Tomi Leppänen  <tomi.leppanen@jolla.com>
8349
8350         tools: Use POSIX compatible arguments for find.
8351         + commit 2c35e67e3475ec38ff49953d79bd0f734d6db542
8352         * tools/addgnupghome (filelist): Remove bashism.
8353
8354 2018-12-05  NIIBE Yutaka  <gniibe@fsij.org>
8355
8356         g10: Fix print_pubkey_info new line output.
8357         + commit e154fba30ba0d5f29040a33f5c1b5c25b441b69f
8358         * g10/keylist.c (print_pubkey_info): Reverse the condition.
8359
8360 2018-12-04  Werner Koch  <wk@gnupg.org>
8361
8362         wks: Fix filter expression syntax flaw.
8363         + commit 0c36ec241d285545f286069843de4f663cd274a3
8364         * tools/wks-util.c (wks_get_key, wks_filter_uid): The filter
8365         expression needs a space before the value.
8366         (install_key_from_spec_file): Replace es_getline by es_read_line and
8367         remove debug output.
8368
8369         gpg: Prepare revocation keys for use with v5 keys.
8370         + commit c6e2ee020784de63edfa83c76095e086eae49eef
8371         * g10/packet.h (struct revocation_key): Add field 'fprlen'.
8372         * g10/parse-packet.c (parse_revkeys): Set fprlen and allow for v5
8373         keys.  Also fix reading of unitialized data at place where
8374         MAX_FINGERPRINT_LEN is used.
8375         * g10/revoke.c (gen_desig_revoke): Allow for v5 keys and use fprlen.
8376         Do an explicit compare to avoid reading unitialized data.
8377         * g10/sig-check.c (check_revocation_keys): Use the fprlen.
8378         * g10/getkey.c (merge_selfsigs_main): Do an explicit copy to avoid
8379         reading unitialized data.
8380         * g10/import.c (revocation_present): Use fprlen.
8381         * g10/keyedit.c (show_key_with_all_names): Use fprlen.
8382         (menu_addrevoker): Use fprlen.  Allow for v5 keys.
8383         * g10/keygen.c (keygen_add_revkey): Use fprlen.
8384         (parse_revocation_key): Allow for v5 keys.
8385         * g10/keyid.c (keyid_from_fingerprint): Allow for v5 keys.  Print a
8386         better error message in case of bogus fingerprints.
8387         * g10/keylist.c (print_revokers): Use fprlen.
8388
8389         wks: Allow reading of --install-key arguments from stdin.
8390         + commit ba46a359b9d6549b74ec8401ea39bad434d87564
8391         * tools/wks-util.c (install_key_from_spec_file): New.
8392         (wks_cmd_install_key): Call it.
8393         * tools/gpg-wks-client.c (main): Allow --install-key w/o arguments.
8394         * tools/gpg-wks-server.c (main): Ditto.
8395
8396         gpg: New list-option "show-only-fpr-mbox".
8397         + commit 0e8bf204791ebfd0c9a8e4b49fbadf998ec62e49
8398         * g10/gpg.c (parse_list_options): Add option "show-only-fpr-mbox".
8399         * g10/options.h (LIST_SHOW_ONLY_FPR_MBOX): New.
8400         * g10/keylist.c (list_keyblock_simple): New.
8401         (list_keyblock): Call it.
8402         (list_all): Do not print the keyring name in LIST_SHOW_ONLY_FPR_MBOX
8403         mode.
8404
8405         wks: Create sub-directories.
8406         + commit 73e5b0ec9b9ba5e04e55f8c42d81e23df7c3afe0
8407         * tools/wks-util.c (wks_compute_hu_fname): Stat and create directory
8408         if needed.
8409
8410         wks: Add new commands --install-key and --remove-key to the client.
8411         + commit 602b1909632925d5a2e0778c102d66109795c627
8412         * tools/gpg-wks-client.c (aInstallKey, aRemoveKey, oDirectory): New.
8413         (opts): Add "--install-key", "--remove-key" and "-C".
8414         (parse_arguments): Parse them.
8415         (main): Check that the given directory exists.  Implement the new
8416         commands.
8417
8418         wks: Move a few server functions to wks-util.
8419         + commit 99094c992c20dd22971beb3527cfda109cd1df89
8420         * tools/gpg-wks-server.c (write_to_file): Move to ...
8421         * tools/wks-util.c: here.
8422         * tools/gpg-wks-server.c (compute_hu_fname): Move to ...
8423         * tools/wks-util.c (wks_compute_hu_fname): here.
8424         * tools/gpg-wks-server.c (fname_from_userid): Move to ...
8425         * tools/wks-util.c (wks_fname_from_userid): here.
8426         * tools/gpg-wks-server.c (command_install_key): Move to ...
8427         * tools/wks-util.c (wks_cmd_install_key): here and change caller.
8428         * tools/gpg-wks-server.c (command_remove_key): Move to ...
8429         * tools/wks-util.c (wks_cmd_remove_key): here and change callers.
8430
8431 2018-12-04  NIIBE Yutaka  <gniibe@fsij.org>
8432
8433         build: Remove --with-*-prefix from configure_opts.
8434         + commit 802b23289cc9b43a56e5032c2681eb21d4014784
8435         * autogen.rc (configure_opts): Remove --with-*-prefix.
8436
8437 2018-12-01  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
8438
8439         g10/mainproc: disable hash contexts when --skip-verify is used.
8440         + commit 73e74de0e33bbb76300f96a4174024779047df06
8441         * g10/mainproc.c (proc_plaintext): Do not enable hash contexts when
8442         opt.skip_verify is set.
8443
8444         common/iobuf: fix memory wiping in iobuf_copy.
8445         + commit 654e353d9b20f10fa275e7ae10cc50480654f079
8446         * common/iobuf.c (iobuf_copy): Wipe used area of buffer instead of
8447         first sizeof(char*) bytes.
8448
8449         common/mischelp: use platform memory zeroing function for wipememory.
8450         + commit 2a650772b4e1c78a4fd20bc88433930e5551fe9c
8451         * common/mischelp.h (wipememory): Replace macro with function
8452         prototype.
8453         (wipememory2): Remove.
8454         * common/mischelp.c (wipememory): New.
8455         * configure.ac (AC_CHECK_FUNCS): Check for 'explicit_bzero'.
8456
8457 2018-11-30  Werner Koch  <wk@gnupg.org>
8458
8459         scd: Add strerror to new error message.
8460         + commit 3a90efb7cf13532cc82b45c11a7abdadfe0c81f1
8461         * agent/call-scd.c (wait_child_thread): Add %s.
8462
8463         gpg: Improve error message about failed keygrip computation.
8464         + commit cd64af003d4b6b46b69dbd575f73d53359ae0bcc
8465         * g10/keyid.c (keygrip_from_pk): Print the fingerprint on failure.
8466
8467 2018-11-28  NIIBE Yutaka  <gniibe@fsij.org>
8468
8469         scd: Serialize opening device by select_application.
8470         + commit 47106ac435e891ced67f0ad9bb6b2ee12098c880
8471         * scd/app.c (app_new_register): Don't lock APP_LIST_LOCK here.
8472         (select_application): Lock with APP_LIST_LOCK earlier.
8473
8474 2018-11-27  NIIBE Yutaka  <gniibe@fsij.org>
8475
8476         agent: Better serialization for scdaemon access.
8477         + commit 483e63f9b5faead819ddd28308902ef43bf298ab
8478         * agent/call-scd.c (unlock_scd): Move lock before accessing IN_USE.
8479         (wait_child_thread): Add log_info for Windows, and fixed log_error
8480         message.
8481
8482 2018-11-26  Andre Heinecke  <aheinecke@intevation.de>
8483
8484         w32: Fix linkage of gpg-pair-tool.
8485         + commit f12fcd907903742bde3ebb7ffef244c92d6d1611
8486         * tools/Makefile.am (gpg_pair_tool_LDADD): Add W32SOCKLIBS.
8487
8488 2018-11-26  NIIBE Yutaka  <gniibe@fsij.org>
8489
8490         agent: Have a thread to wait for the child process of scdaemon.
8491         + commit 40c7923ea881881a48de8f303b0870ec5910e13d
8492         * agent/call-scd.c (wait_child_thread): New.
8493         (start_scd): Create a thread for wait_child_thread.
8494         (agent_scd_check_aliveness): Remove.
8495
8496         agent: Defer calling assuan_release when it's still in use.
8497         + commit 9fb3f0f3f79e74166cce8e0781e97043f25890cc
8498         * agent/call-scd.c (struct scd_local_s): Remove LOCK, introduce IN_USE
8499         and INVALID flags.
8500         (unlock_scd): Call assuan_release when CTX is invalid.
8501         (start_scd): Set IN_USE.
8502         (agent_scd_check_aliveness): Don't call assuan_release when it's in use.
8503
8504         agent: Clean up SCDaemon management.
8505         + commit f45d6124696cc92ccdec09841b8182679c377997
8506         * agent/call-scd.c (struct scd_local_s): Remove ctrl_backlink.
8507         (start_scd): Don't assign to the field.
8508         (agent_scd_check_aliveness): Fix typo in comment.
8509
8510 2018-11-22  Werner Koch  <wk@gnupg.org>
8511
8512         dirmngr: Avoid possible CSRF attacks via http redirects.
8513         + commit fa1b1eaa4241ff3f0634c8bdf8591cbc7c464144
8514         * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
8515         (http_redir_info_t): New.
8516         * dirmngr/http.c (do_parse_uri): Set new fields.
8517         (same_host_p): New.
8518         (http_prepare_redirect): New.
8519         * dirmngr/t-http-basic.c: New test.
8520         * dirmngr/ks-engine-hkp.c (send_request): Use http_prepare_redirect
8521         instead of the open code.
8522         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
8523
8524 2018-11-16  Werner Koch  <wk@gnupg.org>
8525
8526         gpg: Start using OCB mode by default with Libgcrypt 1.9.
8527         + commit 1e700961ddf4c54ec5a03a697fe00d7eb606fdff
8528         * g10/main.h (GCRYPT_VERSION_NUMBER): Fix type in condition.
8529
8530 2018-11-15  NIIBE Yutaka  <gniibe@fsij.org>
8531
8532         card: Display UIF setting.
8533         + commit e955ca245ea08e68ae2397f1583c8728d72acbd8
8534         * g10/call-agent.h (agent_card_info_s): Add UIF fields.
8535         * g10/call-agent.c (learn_status_cb): Put UIF DOs info.
8536         * g10/card-util.c (current_card_status): Output for UIF.
8537
8538         scd: Make "learn" report about KDF data object.
8539         + commit 05d163aebc04db109ec5e004eb04a4b3796f6421
8540         * scd/app-openpgp.c (do_learn_status): Report KDF attr.
8541         * g10/card-util.c (current_card_status): Output KDF for with_colons.
8542
8543         card: Display if KDF is enabled or not.
8544         + commit a5542a4a702c2210facf58a98bc8d3d16089b6ab
8545         * g10/call-agent.h (kdf_do_enabled): New field.
8546         * g10/call-agent.c (learn_status_cb): Set kdf_do_enabled if available.
8547         * g10/card-util.c (current_card_status): Inform the availability.
8548
8549 2018-11-14  Werner Koch  <wk@gnupg.org>
8550
8551         Remove the gpg-zip script.
8552         + commit 8b8ea802ca071c911158cab0203245a16a69125c
8553         * tools/gpg-zip.in: Remove.
8554         * m4/tar-ustar.m4: Remove.
8555
8556 2018-11-14  NIIBE Yutaka  <gniibe@fsij.org>
8557
8558         agent: Simplify agent_popup_message_stop.
8559         + commit 804a77edd9472d44606641b7772550521e1ba271
8560         * agent/call-pinentry.c (agent_popup_message_stop): Just kill it.
8561
8562 2018-11-13  Werner Koch  <wk@gnupg.org>
8563
8564         dirmngr: Support the new WKD draft with the openpgpkey subdomain.
8565         + commit 914fa3be22bf8848a97a7dd405a040d6ef31e2fd
8566         * dirmngr/server.c (proc_wkd_get): Implement new openpgpkey subdomain
8567         method.
8568
8569 2018-11-13  NIIBE Yutaka  <gniibe@fsij.org>
8570
8571         build: Update libgcrypt.m4 and ntbtls.m4.
8572         + commit d58fe697acefd435ec01503dae574d6c99dfedae
8573         * m4/libgcrypt.m4: Update from master.
8574         * m4/ntbtls.m4: Update from master.
8575
8576 2018-11-12  Andre Heinecke  <aheinecke@intevation.de>
8577
8578         dirmngr: Add FLUSHCRLs command.
8579         + commit 678e4706ee614a6b7e543e2a80072d75405dd4db
8580         Summary:
8581         * dirmngr/crlcache.c (crl_cache_flush): Also deinit the cache.
8582         * dirmngr/server.c (hlp_flushcrls, cmd_flushcrls): New.
8583         (register_commands): Add FLUSHCRLS.
8584
8585 2018-11-12  Werner Koch  <wk@gnupg.org>
8586
8587         common: Prepare for parsing mail sub-addresses.
8588         + commit 6b9f772914624cc673ba26d49b6e3adc32dd7e0a
8589         * common/mbox-util.c (mailbox_from_userid): Add arg subaddress and
8590         implement.  Change all callers to pass false for it.
8591
8592         * common/t-mbox-util.c (run_mbox_no_sub_test): New.
8593         (run_filter): Add arg no_sub.
8594         (main): Call new test and add option --no-sub.
8595
8596 2018-11-11  Werner Koch  <wk@gnupg.org>
8597
8598         common: Add --filter option to t-mbox-util.
8599         + commit b3095c95ef9d2d76b49a6ad1b946fca590380dc9
8600         * common/t-mbox-util.c (run_filter): New.
8601         (main): Add option parser.
8602
8603 2018-11-09  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
8604
8605         g10/mainproc: avoid extra hash contexts when decrypting AEAD input.
8606         + commit b46382dd47731231ff49b59c486110a25e08e985
8607         * g10/mainproc.c (mainproc_context): New member
8608         'seen_pkt_encrypted_aead'.
8609         (release_list): Clear 'seen_pkt_encrypted_aead'.
8610         (proc_encrypted): Set 'seen_pkt_encrypted_aead'.
8611         (have_seen_pkt_encrypted_aead): New.
8612         (proc_plaintext): Do not enable extra hash contexts when decryption
8613         AEAD input.
8614
8615 2018-11-08  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
8616
8617         g10/armor: optimize radix64 to binary conversion.
8618         + commit 643ec7c642dc75191e712963d2bb460ac247e09b
8619         * g10/armor.c (asctobin): Larger look-up table for fast path.
8620         (initialize): Update 'asctobin' initialization.
8621         (radix64_read): Add fast path for radix64 to binary conversion.
8622
8623         g10/armor: optimize binary to radix64 conversion.
8624         + commit e8142cc69a2ae5a5d0a238bc9f88841067359af8
8625         * g10/armor.c (bintoasc): Change to read-only.
8626         (initialize): Use const pointer for 'bintoasc'.
8627         (armor_output_buf_as_radix64): New function for faster binary to
8628         radix64 conversion.
8629         (armor_filter): Use new conversion function.
8630
8631         g10/armor: use libgcrypt's CRC24 implementation.
8632         + commit e486d4f0259f27906d2c2869cc01b3aa31aaa0a6
8633         * g10/armor.c (CRCINIT, CRCPOLY, CRCUPDATE, crc_table): Remove.
8634         (new_armor_context): Open libgcrypt CRC24 context.
8635         (release_armor_context): Close CRC24 context.
8636         (initialize): Remove CRC table generation.
8637         (get_afx_crc): New.
8638         (check_input, fake_packet, radix64_read, armor_filter): Update to use
8639         CRC24 context.
8640         * g10/filter.h (armor_filter_context_t): Replace crc intermediate value
8641         with libgcrypt md context pointer.
8642
8643         common/iobuf: optimize iobuf_read_line.
8644         + commit 2b5718c1f76851160115f455c3a9383b04521347
8645         * common/iobuf.c (iobuf_read_line): Add fast path for finding '\n'
8646         character in buffer.
8647
8648         g10/armor: remove unused unarmor_pump code.
8649         + commit 47424881b27d4b3bae2925265b2008cda0c2933f
8650         * g10/armor.c (unarmor_state_e, unarmor_pump_s, unarmor_pump_new)
8651         (unarmor_pump_release, unarmor_pump): Remove.
8652         * g10/filter.h (UnarmorPump, unarmor_pump_new, unarmor_pump_release)
8653         (unarmor_pump): Remove.
8654
8655         g10/armor: fix eof checks in radix64_read.
8656         + commit a571bb8df52d6f2727876e086790dd037c9948ad
8657         * g10/armor.c (radix64_read): Check EOF with '!afx->buffer_len' instead
8658         of 'c == -1', as 'c' is never set to this value.
8659
8660         g10/decrypt-data: use iobuf_read for higher performance.
8661         + commit 5d6c080522e1666943b75c99124fb69b985b6941
8662         * g10/decrypt-data.c (fill_buffer): Use iobuf_read instead of iobuf_get
8663         for reading data.
8664
8665         g10/decrypt-data: use fill_buffer in more places.
8666         + commit e2b9095de35ac4d402b077d5484b4131700a9925
8667         * g10/decrypt-data.c (mdc_decode_filter, decode_filter): Use
8668         fill_buffer.
8669
8670 2018-11-08  NIIBE Yutaka  <gniibe@fsij.org>
8671
8672         gpgcompose: Fix --sk-esk.
8673         + commit 69930f6884a934207f7aa523cf6d2b8e22dfe666
8674         * g10/gpgcompose.c (sk_esk): Copy the result content correctly.
8675         Don't forget to free the result.
8676
8677         g10: Fix log_debug formatting.
8678         + commit 7fc3decc2e038be905d47701c7ce196ed86a725b
8679         * g10/cipher-aead.c (do_flush): No cast is correct.
8680         * g10/decrypt-data.c (aead_underflow): No cast needed.
8681         Use "%j" for uint64_t for chunklen.
8682
8683 2018-11-06  NIIBE Yutaka  <gniibe@fsij.org>
8684
8685         g10: Fix print_keygrip for smartcard.
8686         + commit 01b77ebbb71d47ba276d3a1af9595fdcd9b48f5f
8687         * g10/card-util.c (print_keygrip): Use tty_fprintf.
8688
8689 2018-11-05  Werner Koch  <wk@gnupg.org>
8690
8691         wks: New option --with-colons for gpg-wks-client.
8692         + commit e3a1e80d13487c9336640a99b2f6d385d7d6f55c
8693         * tools/gpg-wks.h (opt): Add field with_colons.
8694         * tools/gpg-wks-client.c (oWithColons): New const.
8695         (opts, parse_arguments): Add option --with-colons.
8696         (main): Change aSupported to take several domains in --with-colons
8697         mode.
8698         (command_send): Factor policy getting code out to ...
8699         (get_policy_and_sa): New function.
8700         (command_supported): Make use of new function.
8701
8702         speedo: Remove obsolete configure option of gpgme.
8703         + commit d7323bb2d957fbeb8192c0ecbd99b1d14d302912
8704         * build-aux/speedo.mk (speedo_pkg_gpgme_configure): Remove
8705         --disable-w32-qt option.
8706
8707         dirmngr: Fix LDAP port parsing.
8708         + commit a3a5a2451924640588e5ecc03a1d4ba6a6ba94a5
8709         * dirmngr/misc.c (host_and_port_from_url): Fix bad port parsing and a
8710         segv for a missing slash after the host name.
8711
8712 2018-11-02  NIIBE Yutaka  <gniibe@fsij.org>
8713
8714         build: Update *.m4 from libraries.
8715         + commit 8e84efbe35633275e260712ba38a505e3f9d0898
8716         * m4/gpg-error.m4: Update from master.
8717         * m4/ksba.m4: Ditto.
8718         * m4/libassuan.m4: Ditto.
8719         * m4/libgcrypt.m4: Ditto.
8720         * m4/npth.m4: Ditto.
8721         * m4/ntbtls.m4: Ditto.
8722
8723 2018-10-31  NIIBE Yutaka  <gniibe@fsij.org>
8724
8725         build: Update *.m4 from libraries.
8726         + commit fd7aee6a97134fdf48a496841241f8ae25736e61
8727         * m4/gpg-error.m4: Update from master.
8728         * m4/ksba.m4: Ditto.
8729         * m4/libassuan.m4: Ditto.
8730         * m4/libgcrypt.m4: Ditto.
8731         * m4/npth.m4: Ditto.
8732         * m4/ntbtls.m4: Ditto.
8733
8734 2018-10-26  Werner Koch  <wk@gnupg.org>
8735
8736         build: By default build wks-tools on all Unix platforms.
8737         + commit b83fed64f8051279a8f36e024c1f12f7f13c4716
8738
8739
8740         wkd: Add option --directory to the server.
8741         + commit f248416bc9792e80bb0785302058131de49d7639
8742         * tools/gpg-wks-server.c (opts): Add '--directory',
8743         (main): Explain how to set correct permissions.
8744         (command_list_domains): Create an empty policy file and remove the
8745         warning for an empty policy file.
8746
8747 2018-10-26  NIIBE Yutaka  <gniibe@fsij.org>
8748
8749         kbx: Increase size of field for fingerprint.
8750         + commit 4249e9a2bf028f007d1ddaac730f636e5c6da20f
8751         * kbx/keybox-search-desc.h (fpr): Increase the size.
8752
8753 2018-10-25  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8754
8755         all: fix more spelling errors.
8756         + commit a7c5d65eb50355274c1b5b047c02c653f518900a
8757
8758
8759         headers: fix spelling.
8760         + commit b39ece7d35401302879062d9d4bec25b1249ae7e
8761
8762
8763 2018-10-25  Werner Koch  <wk@gnupg.org>
8764
8765         dirmngr: Fix out of scope use of a var in the keyserver LDAP code.
8766         + commit 2b57a8159cdc3b212a4efc68787b40cafcd91ebe
8767         * dirmngr/ks-engine-ldap.c (extract_attributes): Don't use a variabale
8768         out of scope and cleanup the entire pgpKeySize block.
8769
8770 2018-10-25  NIIBE Yutaka  <gniibe@fsij.org>
8771
8772         g10,scd: Improve UIF support.
8773         + commit 0240345728a84d8f235ce05889e83963e52742eb
8774         * g10/call-agent.c (learn_status_cb): Parse "bt" flag.
8775         * g10/call-agent.h: New member field "bt".
8776         * g10/card-util.c (uif): Limit its access only when it is supported.
8777         * scd/app-openpgp.c (do_setattr): Allow access to UIF objects only
8778         when there is a button.
8779
8780 2018-10-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8781
8782         all: fix spelling and typos.
8783         + commit 54eb375ff14e2a93cea70eab35719be4d25f51ca
8784
8785
8786         doc: fix spelling mistakes.
8787         + commit ef540d1af0649ebf1add190d0ab095e957658b7e
8788
8789
8790 2018-10-24  Werner Koch  <wk@gnupg.org>
8791
8792         agent: Fix possible uninitalized use of CTX in simple_pwquery.
8793         + commit bafcf7095159493a656382997f8b0d0bb11a20e8
8794         * common/simple-pwquery.c (agent_open): Clear CTX even on early error.
8795
8796         agent: Fix possible release of unitialize var in a genkey error case.
8797         + commit 2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc
8798         * agent/command.c (cmd_genkey): Initialize 'value'.
8799
8800         ssh: Fix possible infinite loop in case of an read error.
8801         + commit 7385e1babf6eef586c79ad23f8e541aaf608c4e5
8802         * agent/command-ssh.c (ssh_handler_add_identity): Handle other errors
8803         than EOF.
8804
8805         tools: Fix FILE memory leak in gpg-connect-agent.
8806         + commit 378719f25fe00d46393541f4a4f79e04484c3000
8807         * tools/gpg-connect-agent.c (do_open): dup the fileno and close the
8808         stream.
8809
8810         sm: Use the correct string in an error message.
8811         + commit 793fd8d876777c24c4d5072301fa530333d6e1d9
8812         * sm/gpgsm.c (main): Fix error message.
8813
8814         gpg: Unfinished support for v5 signatures.
8815         + commit 64a1e86fc06d89c980a196c61d2b6d77d167565e
8816         * g10/parse-packet.c (parse_signature): Allow for v5 signatures.
8817         * g10/sig-check.c (check_signature_end_simple): Support the 64bit v5
8818         byte count.
8819         * g10/sign.c (hash_sigversion_to_magic): Ditto.
8820         (write_signature_packets): Request v5 sig for v5 keys.  Remove useless
8821         condition.
8822         (make_keysig_packet): Request v5 sig for v5 keys.
8823
8824 2018-10-22  Werner Koch  <wk@gnupg.org>
8825
8826         dirmngr: Prepare for updated WKD specs with ?l= param.
8827         + commit 256a280c51f9ea862e4bfb0bb530c2a96f9088f9
8828         * dirmngr/server.c (proc_wkd_get): Tack the raw local address to the
8829         request.
8830
8831         agent: Fix build regression for Windows.
8832         + commit 68b8096b6617cdad09c99d7eda2035176807e78f
8833         * agent/command-ssh.c (get_client_info): Turn client_uid into an int.
8834         Fix setting of it in case of a failed getsocketopt.
8835         * agent/command.c (start_command_handler): Fix setting of the pid and
8836         uid for Windows.
8837
8838         dirmngr: In verbose mode print the OCSP responder id.
8839         + commit 0a7f446c189201ca6e527af08b44da756b343209
8840         * dirmngr/ocsp.c (ocsp_isvalid): Print the responder id.
8841
8842 2018-10-15  Werner Koch  <wk@gnupg.org>
8843
8844         tools: Replace duplicated code in mime-maker.
8845         + commit f03928b16c4fb00077d22d8ec141575ef6d26913
8846         * tools/rfc822parse.c (HEADER_NAME_CHARS): New.  Taken from
8847         mime-maker.c.
8848         (rfc822_valid_header_name_p): New.  Based on code from mime-maker.c.
8849         (rfc822_capitalize_header_name): New.  Copied from mime-maker.c.
8850         (capitalize_header_name): Remove.  Replace calls by new func.
8851         (my_toupper, my_strcasecmp): New.
8852         * tools/mime-maker.c: Include rfc822parse.h.
8853         (HEADER_NAME_CHARS, capitalize_header_name): Remove.
8854         (add_header): Replace check and capitalization by new functions.
8855
8856 2018-10-15  NIIBE Yutaka  <gniibe@fsij.org>
8857
8858         scd: Fix signing authentication status.
8859         + commit 78f542e1f4495195db2e668f9cd41657fb1afc77
8860         * scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing.
8861
8862 2018-10-12  NIIBE Yutaka  <gniibe@fsij.org>
8863
8864         agent: Fix message for ACK button.
8865         + commit 4ed941ff26783c4fabfe2079029f8e436eb7e340
8866         * agent/divert-scd.c (getpin_cb): Display correct message.
8867
8868 2018-10-11  NIIBE Yutaka  <gniibe@fsij.org>
8869
8870         scd: Support "acknowledge button" feature.
8871         + commit 7a5a4c4cac8709f7c413e94cd0b40f4123baa1e5
8872         * scd/apdu.c (set_prompt_cb): New member function.
8873         (set_prompt_cb_ccid_reader): New function.
8874         (open_ccid_reader): Initialize with set_prompt_cb_ccid_reader.
8875         (apdu_set_prompt_cb): New.
8876         * scd/app.c (lock_app, unlock_app): Add call to apdu_set_prompt_cb.
8877         * ccid-driver.c (ccid_set_prompt_cb): New.
8878         (bulk_in): Call ->prompt_cb when timer extension.
8879         * scd/command.c (popup_prompt): New.
8880
8881         agent: Support --ack option for POPUPPINPADPROMPT.
8882         + commit 827529339a4854886dbb5625238e7e01013efdcd
8883         * agent/divert-scd.c (getpin_cb): Support --ack option.
8884
8885 2018-10-10  Werner Koch  <wk@gnupg.org>
8886
8887         gpg: Don't take the a TOFU trust model from the trustdb,
8888         + commit 150a33df41944d764621f037038683f3d605aa3f
8889         * g10/tdbio.c (tdbio_update_version_record): Never store a TOFU model.
8890         (create_version_record): Don't init as TOFU.
8891         (tdbio_db_matches_options): Don't indicate a change in case TOFU is
8892         stored in an old trustdb file.
8893
8894 2018-10-08  Werner Koch  <wk@gnupg.org>
8895
8896         gpg: Fix extra check for sign usage of a data signature.
8897         + commit b6275f3bda8edff34274c5b921508567f491ab9c
8898         * g10/sig-check.c (check_signature_end_simple):
8899
8900         gpg: Make --skip-hidden-recipients work again.
8901         + commit 79f165d7a8bcc26972712bb0f0cc554d5c3d4e42
8902         * g10/pubkey-enc.c (get_session_key): Take care of
8903         opt.skip_hidden_recipients.
8904
8905 2018-10-02  Werner Koch  <wk@gnupg.org>
8906
8907         gpg: New options import-drop-uids and export-drop-uids.
8908         + commit 8e83493dae426fe36a0e0081198b10db1e103ff1
8909         * g10/options.h (IMPORT_DROP_UIDS): New.
8910         (EXPORT_DROP_UIDS): New.
8911         * g10/import.c (parse_import_options): Add option "import-drop-uids".
8912         (import_one): Don't bail out with that options and no uids found.
8913         Also remove all uids.
8914         (remove_all_uids): New.
8915         * g10/export.c (parse_export_options): Add option "export-drop-uids".
8916         (do_export_one_keyblock): Implement option.
8917
8918 2018-10-02  NIIBE Yutaka  <gniibe@fsij.org>
8919
8920         common: Fix gnupg_reopen_std.
8921         + commit 50b02dba2060a8969da47b18d9c0ecdccbd30db4
8922         * common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat.
8923
8924 2018-09-27  NIIBE Yutaka  <gniibe@fsij.org>
8925
8926         g10,scd: Support UIF changing command.
8927         + commit 0cb65564e022fface5ada4de8e0c2c4c3d0ac8ad
8928         * g10/card-util.c (uif, cmdUIF): New.
8929         (card_edit): Add call to uif by cmdUIF.
8930         * scd/app-openpgp.c (do_getattr): Support UIF-1, UIF-2, and UIF-3.
8931         (do_setattr): Likewise.
8932         (do_learn_status): Learn UIF-1, UIF-2, and UIF-3.
8933
8934 2018-09-18  NIIBE Yutaka  <gniibe@fsij.org>
8935
8936         g10: Fix memory leak for --card-status.
8937         + commit fe8b6339542f3b1228b5fd56fc710ea3b07a3a2b
8938         * g10/card-util.c (card_status): Release memory of serial number.
8939
8940 2018-09-14  NIIBE Yutaka  <gniibe@fsij.org>
8941
8942         g10: Fix another memory leak.
8943         + commit 60c880bda5c9b821fd2968cf89c38c37be3c1a7b
8944         * g10/skclist.c (enum_secret_keys): Use SK_LIST instead of pubkey_t.
8945
8946         g10: Fix memory leak (more).
8947         + commit 2eb481e8cc1c37378cf68a06557c4a7a625d315c
8948         * g10/skclist.c (enum_secret_keys): Free SERIALNO on update.
8949
8950         g10: Fix memory leak in enum_secret_keys.
8951         + commit 64c5c45e2aa4a12d939680b9d51c8b26d61c5e9d
8952         * g10/skclist.c (enum_secret_keys): Don't forget to call
8953         free_public_key in the error return paths.
8954
8955 2018-09-11  NIIBE Yutaka  <gniibe@fsij.org>
8956
8957         Revert "dirmngr: hkp: Avoid potential race condition when some hosts die."
8958         + commit 69bab1cba07a8259b85a7911c2824724667803a4
8959         This reverts commit 04b56eff118ec34432c368b87e724bce1ac683f9.
8960
8961         dirmngr: Serialize access to hosttable.
8962         + commit 995aded58724a1a07704493b311be5222b3f82a2
8963         * dirmngr/dirmngr.h (ks_hkp_init): New.
8964         * dirmngr/dirmngr.c (main): Call ks_hkp_init.
8965         * dirmngr/ks-engine-hkp.c (ks_hkp_init): New.
8966         (ks_hkp_mark_host): Serialize access to hosttable.
8967         (ks_hkp_print_hosttable, make_host_part): Likewise.
8968         (ks_hkp_housekeeping, ks_hkp_reload): Likewise.
8969
8970 2018-09-10  NIIBE Yutaka  <gniibe@fsij.org>
8971
8972         common: Use iobuf_get_noeof to avoid undefined behaviors.
8973         + commit f80346f42df4bdc7d0a9741c3922129aceae4f81
8974         * common/iobuf.c (block_filter): Use iobuf_get_noeof.
8975
8976         agent: Fix error code check from npth_mutex_init.
8977         + commit adce73b86fd49d5bbb8884231a26cc7533d400e2
8978         * agent/call-pinentry.c (initialize_module_call_pinentry): It's an
8979         error when npth_mutex_init returns non-zero.
8980
8981 2018-09-07  Werner Koch  <wk@gnupg.org>
8982
8983         dirmngr: Emit SOURCE status also on NO_DATA.
8984         + commit bee65edfbc8cc2c369e5941cc9d1a01a0519b388
8985         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Send SOURCE status also on
8986         NO DATA error.
8987         (ks_hkp_get): Ditto.
8988         * g10/call-dirmngr.c (gpg_dirmngr_ks_search): Print "data source" info
8989         also on error.
8990         (gpg_dirmngr_ks_get): Ditto.
8991
8992 2018-09-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
8993
8994         dirmngr: hkp: Avoid potential race condition when some hosts die.
8995         + commit 04b56eff118ec34432c368b87e724bce1ac683f9
8996         * dirmngr/ks-engine-hkp.c (select_random_host): Use atomic pass
8997         through the host table instead of risking out-of-bounds write.
8998
8999 2018-09-07  NIIBE Yutaka  <gniibe@fsij.org>
9000
9001         g10: Fix memory leak.
9002         + commit 7c96cc67e108f3a9514a4222ffac2f9f9a2ab19e
9003         * g10/import.c (read_block): Call free_packet to skip the packet.
9004
9005 2018-09-06  NIIBE Yutaka  <gniibe@fsij.org>
9006
9007         gpgscm: Suppress warnings for GCC > 6.
9008         + commit 99c17b970bc0ca7e0cff7fe031c6f9feb05af3ff
9009         * tests/gpgscm/scheme.c (CASE): Use unused attribute for GCC > 6.
9010         (FALLTHROUGH): New for fallthrough.
9011         (Eval_Cycle): Use FALLTHROUGH.  Remove not-needed comment of
9012         fallthrough.
9013
9014         Fix use of strncpy, which is actually good to use memcpy.
9015         + commit 625ced6e672daa892d334323cce6b3d42a6f929f
9016         * common/ssh-utils.c (get_fingerprint): Use memcpy.
9017         * g10/build-packet.c (string_to_notation): Use memcpy.
9018
9019 2018-09-05  Werner Koch  <wk@gnupg.org>
9020
9021         kbx: Add framework for a public key daemon.
9022         + commit 512be1d04b98a9d6a9067bd34c16513089a0db9f
9023         * kbx/keyboxd.c: New.
9024         * kbx/keyboxd.h: New.
9025         * kbx/kbxserver.c: New.
9026         * kbx/keyboxd-w32info.rc: New.
9027         * kbx/Makefile.am (EXTRA_DIST): Add new rc file.
9028         (resource_objs): Ditto.
9029         (libexec_PROGRAMS): New.
9030         (common_libs, commonpth_libs): New.
9031         (kbxutil_LDADD): Use here.
9032         (keyboxd_SOURCES): New.
9033         (keyboxd_CFLAGS): New.
9034         (keyboxd_LDADD): New.
9035         (keyboxd_LDFLAGS): New.
9036         (keyboxd_DEPENDENCIES): new.
9037         ($(PROGRAMS)): Extend.
9038
9039         common: New function status_printf.
9040         + commit d4489be467e7229e17fb17a0489bf711d6ce66d6
9041         * common/asshelp2.c (set_assuan_context_func): New.
9042         (status_printf): New.
9043         * po/Makevars (XGETTEXT_OPTIONS): Add status_printf
9044
9045 2018-08-29  Werner Koch  <wk@gnupg.org>
9046
9047         gpg: Explain error message in key generation with --batch.
9048         + commit 1bfe766bcf3959135333900934f1a15c9b96c3cf
9049         * g10/keygen.c (generate_keypair): Show more info.
9050
9051         gpg: Remove unused function get_pubkeys.
9052         + commit ed8fe21e6612401846fc4af8631f0136dc633c67
9053         * g10/getkey.c (get_pubkeys): Remove.
9054         (pubkey_free): Remove and use code directly ...
9055         (pubkeys_free): ... here.
9056
9057         gpg: New option --known-notation.
9058         + commit 3da835713fb6220112d988e1953f3d84beabbf6a
9059         * g10/gpg.c (oKnownNotation): New const.
9060         (opts): Add option --known-notation.
9061         (main): Set option.
9062         * g10/parse-packet.c (known_notations_list): New local var.
9063         (register_known_notation): New.
9064         (can_handle_critical_notation): Rewrite to handle the new feature.
9065         Also print the name of unknown notations in verbose mode.
9066
9067 2018-08-28  Werner Koch  <wk@gnupg.org>
9068
9069         gpg: Refresh expired keys originating from the WKD.
9070         + commit 7f172404bfcf719b9b1af4a182d4803525ebff7c
9071         * g10/getkey.c (getkey_ctx_s): New field found_via_akl.
9072         (get_pubkey_byname): Set it.
9073         (only_expired_enc_subkeys): New.
9074         (get_best_pubkey_byname): Add support to refresh expired keys from the
9075         WKD.
9076
9077         gpg: Remove unused arg from a function.
9078         + commit db67ccb759426c1173761574b14bdfe6a76394c2
9079         * g10/getkey.c (get_best_pubkey_byname): Remove unused arg 'no_akl'.
9080         Change both callers.
9081
9082 2018-08-27  Werner Koch  <wk@gnupg.org>
9083
9084         gpg: Prepare for longer card fingerprints.
9085         + commit 108702ccae8ff1e5fec3b8e710f06a03637244c7
9086         * g10/call-agent.h (agent_card_info_s): Rename the "*valid" fields to
9087         "*len".
9088         * g10/call-agent.c (unhexify_fpr): Change to take a FPRLEN and to
9089         return the actual length.
9090         (agent_release_card_info): Adjust for these changes.
9091         * g10/card-util.c (print_sha1_fpr): Rename to print_shax_fpr and add
9092         arg FPRLEN.  Change all callers to pass the length.
9093         (print_sha1_fpr_colon): Rename to print_shax_fpr_colon and add arg
9094         FPRLEN.  Change all callers to pass the length.
9095         (fpr_is_zero): Add arg FPRLEN.
9096         (fpr_is_ff): Ditto.
9097         (show_card_key_info): Use the new functions.
9098         * g10/skclist.c (enum_secret_keys): Use MAX_FINGERPRINT_LEN.
9099
9100 2018-08-27  NIIBE Yutaka  <gniibe@fsij.org>
9101
9102         g10: Fix enum_secret_keys for card keys.
9103         + commit b823788d200902f34c632026934cf0e43152b73e
9104         * g10/skclist.c (enum_secret_keys): Since "KEY-FPR" returns
9105         fingerprint in binary, change it to hex string.
9106
9107         g10: Prefer to available card keys for decryption.
9108         + commit 84cc55880a5815155328229beb309326472bfd82
9109         * g10/skclist.c (enum_secret_keys): Add logic to prefer
9110         decryption keys on cards.
9111
9112         g10: Move enum_secret_keys to skclist.c.
9113         + commit 03a8de7def4195b9accde47c1dcb84279361936d
9114         * g10/getkey.c (enum_secret_keys): Move to...
9115         * g10/skclist.c (enum_secret_keys): ... here.
9116
9117         g10: Fix comment of enum_secret_keys.
9118         + commit 6bb93fc295e712ddf9b461dfe650211caf16a844
9119         * g10/getkey.c (enum_secret_keys): Fix comment for usage of
9120         enum_secret_keys, following the previous change.
9121
9122         g10: Enumerated keys for decryption should be unique.
9123         + commit 30153c65f0875f9a62838f6347bcdcedd6114d35
9124         * g10/getkey.c (enum_secret_keys): Collecting keys in the context,
9125         check duplicate to make sure returning only unique keys.
9126         * g10/pubkey-enc.c (get_session_key): Now, it's the responsibility of
9127         enum_secret_keys to free keys.
9128
9129         g10: Change decryption key selection for public key encryption.
9130         + commit ce2f71760155b71a71418fe145a557c99bd52290
9131         * g10/mainproc.c (struct mainproc_context): It's now pubkey_enc_list.
9132         (do_proc_packets): Remove the first arg CTRL.  Fix call of
9133         proc_pubkey_enc.
9134         (release_list): Handle pubkey_enc_list.
9135         (proc_pubkey_enc): Remove the first arg CTRL.  Simply put the packet
9136         to pubkey_enc_list.
9137         (print_pkenc_list): Remove the last arg FAILED.
9138         (proc_encrypted): Only call print_pkenc_list once.
9139         Handle DEK here.
9140         (proc_packets, proc_signature_packets, proc_signature_packets_by_fd)
9141         (proc_encryption_packets): Fix call of do_proc_packets.
9142         * g10/packet.h (struct pubkey_enc_list): Define.
9143         * g10/pubkey-enc.c (get_it): Change the second argument K.
9144         (get_session_key): Select session key by LIST, using enum_secret_keys.
9145         * g10/gpgv.c (get_session_key): Change the second argument K.
9146         * g10/test-stubs.c (get_session_key): Likewise.
9147
9148 2018-08-10  NIIBE Yutaka  <gniibe@fsij.org>
9149
9150         g10: Fix undefined behavior when EOF in parsing packet for S2K.
9151         + commit 1b309d9f6199a91caa0ca0b97b92d599e00b736e
9152         * g10/parse-packet.c (parse_symkeyenc): Use iobuf_get_noeof.
9153         (parse_key): Likewise.
9154
9155 2018-07-27  Werner Koch  <wk@gnupg.org>
9156
9157         gpg: Set a limit for a WKD import of 256 KiB.
9158         + commit e88f56f1937ac92f6a3b94e50b6db2649ec0be41
9159         * g10/call-dirmngr.c (MAX_WKD_RESULT_LENGTH): New.
9160         (gpg_dirmngr_wkd_get): Use it.
9161
9162         dirmngr: Validate SRV records in WKD queries.
9163         + commit ebe727ef596eefebb5eff7d03a98649ffc7ae3ee
9164         * dirmngr/server.c (proc_wkd_get): Check the returned SRV record names
9165         to mitigate rogue DNS servers.
9166
9167         common: New function to validate domain names.
9168         + commit ddee9f9409fb5a089883eab0fadef7b9b7e61e72
9169         * common/mbox-util.c (is_valid_domain_name): New.
9170         * common/t-mbox-util.c (run_dns_test): New test.
9171
9172 2018-07-26  Jiří Keresteš  <jiri.kerestes@trustica.cz>
9173
9174         scd: Add support for Trustica Cryptoucan.
9175         + commit 967d3649d24aba623133808e8d01675dff389fbb
9176
9177
9178 2018-07-25  Werner Koch  <wk@gnupg.org>
9179
9180         dirmngr: Print a WARNING status for DNS config problems.
9181         + commit bd4048c533165fd82340354d7229fcc2220db5a5
9182         * dirmngr/dirmngr-status.h: New.
9183         * dirmngr/dirmngr.h: Include dirmngr-status.h and move some prototypes
9184         to that file.
9185         * dirmngr/t-support.c: New.
9186         * dirmngr/Makefile.am (dirmngr_SOURCES): Add dirmngr-status.h.
9187         (t_common_src): Add t-support.c.
9188         * dirmngr/server.c (dirmngr_status_printf): Bypass if CTRL is NULL.
9189         * dirmngr/dns-stuff.c: Include dirmngr-status.h.
9190         (libdns_init): Print WARNING status line.  Change call callers to take
9191         and pass a CTRL argument.
9192         * g10/call-dirmngr.c (ks_status_cb): Print info for new WARNING
9193         status.
9194
9195 2018-07-24  Werner Koch  <wk@gnupg.org>
9196
9197         gpg: Use 128 MiB as default AEAD chunk size.
9198         + commit 9aa1b368efd4edf51b6d056339bffb726de5162b
9199         * g10/gpg.c (oDebugAllowLargeChunks): New.
9200         (opts): New option --debug-allow-large-chunks.
9201         (main): Implement that option.
9202
9203 2018-07-09  Werner Koch  <wk@gnupg.org>
9204
9205         gpg: Remove multiple subkey bindings during export-clean.
9206         + commit 76989d5bd89ed11f5b3656dc4748fcfc939a46dc
9207         * g10/key-clean.c (clean_one_subkey_dupsigs): New.
9208         (clean_all_subkeys): Call it.
9209
9210         gpg: Let export-clean remove expired subkeys.
9211         + commit c2fd65ec8498a08ee36ca52d99b6b014f6db8d93
9212         * g10/key-clean.h (KEY_CLEAN_NONE, KEY_CLEAN_INVALID)
9213         (KEY_CLEAN_ENCR, KEY_CLEAN_AUTHENCR, KEY_CLEAN_ALL): New.
9214         * g10/key-clean.c (clean_one_subkey): New.
9215         (clean_all_subkeys): Add arg CLEAN_LEVEL.
9216         * g10/import.c (import_one): Call clean_all_subkeys with
9217         KEY_CLEAN_NONE.
9218         * g10/export.c (do_export_stream): Call clean_all_subkeys depedning on
9219         the export clean options.
9220
9221         gpg: Split key cleaning function for clarity.
9222         + commit 6c3567196f7e72552f326ce07dccbcce31926e5d
9223         * g10/key-clean.c (clean_key): Rename to clean_all_uids and split
9224         subkey cleaning into ...
9225         (clean_all_subkeys): new.  Call that always after the former clean_key
9226         invocations.
9227
9228 2018-07-06  Werner Koch  <wk@gnupg.org>
9229
9230         gpg: Move key cleaning functions to a separate file.
9231         + commit 135e46ea480d749b8a9692f71d4d0bfdadd8ee2f
9232         * g10/trust.c (mark_usable_uid_certs, clean_sigs_from_uid)
9233         (clean_uid_from_key, clean_one_uid, clean_key): Move to ...
9234         * g10/key-clean.c: new file.
9235         * g10/key-clean.h: New.
9236         * g10/Makefile.am (gpg_sources): Add new files.
9237         * g10/export.c, g10/import.c, g10/keyedit.c, g10/trustdb.c: Include
9238         new header.
9239         * g10/trustdb.h (struct key_item, is_in_klist): Move to ...
9240         * g10/keydb.h: here.
9241
9242 2018-07-05  Werner Koch  <wk@gnupg.org>
9243
9244         po: Add flag options for xgettext.
9245         + commit cb71573f376235036c98143155e964a15cfcb250
9246         * po/Makevars (XGETTEXT_OPTIONS): Add --flag options.
9247
9248         gpg: Prepare for signatures with ISSUER_FPR but without ISSUER.
9249         + commit f7526c7bc754acf68bde0b79c785e875a9365d60
9250         * g10/getkey.c (get_pubkey_for_sig): New.
9251         (get_pubkeyblock_for_sig): New.
9252         * g10/mainproc.c (issuer_fpr_raw): Give global scope.
9253         (check_sig_and_print): Use get_pubkeyblock_for_sig.
9254         * g10/pkclist.c (check_signatures_trust): Use get_pubkey_for_sig.
9255         * g10/sig-check.c (check_signature2): Ditto.
9256         (check_signature_over_key_or_uid): Ditto.
9257
9258         tools: Add experimental code for a pairing protocol.
9259         + commit faf3c70c7715ba86eb56fdccc6cf831bf87b2ee0
9260         * configure.ac (GNUPG_CACHE_DIR): New const.
9261         * tools/Makefile.am (libexec_PROGRAMS): Add gpg-pair-tool.
9262         (gpg_pair_tool_SOURCES, gpg_pair_tool_CFLAGS)
9263         (gpg_pair_tool_LDADD): New.
9264         * tools/gpg-pair-tool.c: New.
9265
9266 2018-07-04  Werner Koch  <wk@gnupg.org>
9267
9268         gpg: Ignore too large user ids during import.
9269         + commit 01cd66f9faf1623833e6afac84164de5a136ecff
9270         * g10/import.c (read_block): Add special treatment for bad user ids
9271         and comment packets.
9272
9273         gpg: Extra check for sign usage when verifying a data signature.
9274         + commit 214b0077264e35c079e854a8b6374704aea45cd5
9275         * g10/sig-check.c (check_signature_end_simple): Check sign usage.
9276
9277 2018-07-03  NIIBE Yutaka  <gniibe@fsij.org>
9278
9279         g10: Fix memory leak for PKT_signature.
9280         + commit 996febbab21eb9283b0634e51303a36b318734a6
9281         * g10/getkey.c (buf_to_sig): Free by free_seckey_enc.
9282         * g10/gpgcompose.c (signature): Likewise.
9283         * g10/sign.c (write_signature_packets): Likewise.
9284
9285 2018-07-02  Werner Koch  <wk@gnupg.org>
9286
9287         agent: New commands PUT_SECRET and GET_SECRET.
9288         + commit 8a915cd9faf052b4faa3c415f2ac5aa8d6ea1efe
9289         * agent/agent.h (CACHE_MODE_DATA): New const.
9290         * agent/cache.c (DEF_CACHE_TTL_DATA): new.
9291         (housekeeping): Tweak for CACHE_MODE_DATA.
9292         (cache_mode_equal): Ditto.
9293         (agent_get_cache): Ditto.
9294         (agent_put_cache): Implement CACHE_MODE_DATA.
9295         * agent/command.c (MAXLEN_PUT_SECRET): New.
9296         (parse_ttl): New.
9297         (cmd_get_secret): New.
9298         (cmd_put_secret): New.
9299         (register_commands): Register new commands.
9300
9301         common: New function percent_data_escape.
9302         + commit 58baf40af641f8cbf597e508a292e85ae94688f1
9303         * common/percent.c (percent_data_escape): New.
9304         * common/t-percent.c (test_percent_data_escape): New.
9305
9306         agent: Fix segv running in --server mode.
9307         + commit 3978df943dc7a4781a23382be2d3b4a96a04f71f
9308         * agent/command.c (start_command_handler): Do not write to
9309         CLIENT_CREDS after an error.
9310
9311 2018-07-02  NIIBE Yutaka  <gniibe@fsij.org>
9312
9313         libdns: For SOCKS connection, just fails.
9314         + commit 1aacd12471935a354cfd85ee1805edc7eb16e6c5
9315         * dirmngr/dns.c (dns_res_exec): If it's DNS_SO_SOCKS_CONN, don't
9316         iterate to other server, but return the error immediately.
9317
9318 2018-06-21  Werner Koch  <wk@gnupg.org>
9319
9320         gpg: Print revocation reason for "rev" records.
9321         + commit 592deeddb9bf4ae9b3e236b439e2f39644eb6d46
9322         * g10/main.h: Add prototype.
9323         * g10/keylist.c (list_keyblock_print): Print revocation info.
9324         (list_keyblock_colon): Ditto.
9325
9326         * g10/test-stubs.c (get_revocation_reason): New stub.
9327         * g10/gpgv.c (get_revocation_reason): New stub.
9328
9329         gpg: Print revocation reason for "rvs" records.
9330         + commit b7cd2c2093ae1b47645be50fa1d431a028187cad
9331         * g10/import.c (get_revocation_reason): New.
9332         (list_standalone_revocation): Extend function.
9333
9334         gpg: Let --show-keys print revocation certificates.
9335         + commit 386b9c4f25b28fd769d7563f2d86ac3a19cc3011
9336         * g10/import.c (list_standalone_revocation): New.
9337         (import_revoke_cert): Call new function.
9338
9339         build: Remove duplicates from AC_CHECK_FUNCS.
9340         + commit 7e9aa307f76cdf2f624d43a35a8266e8b4e473f9
9341         * configure.ac (AC_CHECK_FUNCS): Fold most calls into one.
9342
9343 2018-06-20  NIIBE Yutaka  <gniibe@fsij.org>
9344
9345         libdns: Let kernel to decide the local port.
9346         + commit 861f1da0731bf29dcb9221c4f22c76b40ec15a78
9347         * dirmngr/dns.c (LEAVE_SELECTION_OF_PORT_TO_KERNEL): New.
9348         (dns_socket): Don't select ephemeral port in user space.
9349
9350 2018-06-19  Werner Koch  <wk@gnupg.org>
9351
9352         wks: Take name of sendmail from configure.
9353         + commit 08147f8bbdca40c98c2a094fa48fab15b8339c80
9354         * configure.ac (NAME_OF_SENDMAIL): New ac_define.
9355         * tools/send-mail.c (run_sendmail): Use it.
9356
9357 2018-06-18  NIIBE Yutaka  <gniibe@fsij.org>
9358
9359         libdns: Fix for non-FQDN hostname.
9360         + commit a4a054bf14fa855715faee01a152755c4e2a74f7
9361         * dirmngr/dns.c (dns_resconf_open): Clear search[0] for non-FQDN
9362         hostname.
9363
9364 2018-06-15  NIIBE Yutaka  <gniibe@fsij.org>
9365
9366         libdns: Fix connect and try next nameserver when ECONNREFUSED.
9367         + commit bcdbf8b8ebe9d61160e0b007dabe1b6462ffbc93
9368         * dirmngr/dns.c (dns_so_check): When EINVAL, release the association
9369         by connect with AF_UNSPEC and try again.  Also try again for
9370         ECONNREFUSED.
9371         (dns_res_exec): Try next nameserver when ECONNREFUSED.
9372
9373         libdns: Clear struct sockaddr_storage by zero.
9374         + commit 1c0b6681e4f322b88ac35d1f21c03d3cfc35fc23
9375         * dirmngr/dns.c (dns_resconf_pton): Clear SS.
9376         (dns_resconf_setiface): Clear ->IFACE.
9377         (dns_hints_root, send_query): Clear SS.
9378
9379 2018-06-14  NIIBE Yutaka  <gniibe@fsij.org>
9380
9381         libdns: Sync to upstream.
9382         + commit 3e6ad302eaf3a4a9f3e60379133b3dfdbe0e1b2d
9383         * dirmngr/dns.c (dns_nssconf_loadfile): Handle exclamation mark.
9384
9385         dirmngr: Fix recursive resolver mode.
9386         + commit 5b40338f12762cd74238c2d2b3101c33dd2d0ed3
9387         * dirmngr/dns-stuff.c (libdns_init): Initialize options.recurse.
9388
9389 2018-06-12  Werner Koch  <wk@gnupg.org>
9390
9391         Some preparations to eventuallt use gpgrt_argparse.
9392         + commit cb52eb76b3ba0269742c5322e10a2b5151dafaf2
9393         * configure.ac (GNUPG_DEF_COPYRIGHT_LINE: New.
9394         * tools/watchgnupg.c (print_version): USe this macro.
9395         * common/init.c (_init_common_subsystems): Register argparse
9396         functions.
9397
9398         Require libgpg-error 1.29 and remove internal logging functions.
9399         + commit 440472663d608660343c54f09172c851f5127c9c
9400         * configure.ac (NEED_GPG_ERROR_VERSION): Set to 1.29
9401         * common/util.h: Remove replacement error codes.
9402         * common/logging.h: Remove fallback to internal logging functions.
9403         * common/logging.c: Remove.
9404         * common/Makefile.am (common_sources): Remove logging.c
9405
9406         gpg: Do not import revocations with --show-keys.
9407         + commit fe621cc64b13b00914633630f28b4b417892d629
9408         * g10/import.c (import_revoke_cert): Add arg 'options'.  Take care of
9409         IMPORT_DRY_RUN.
9410
9411 2018-06-12  NIIBE Yutaka  <gniibe@fsij.org>
9412
9413         card: Fix memory leak for fetch-url sub command.
9414         + commit 8f99299a54a0ac09f9c90c1085b704db78973fda
9415         * g10/card-util.c (fetch_url): Release INFO.
9416
9417 2018-06-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
9418
9419         gpg: Add new usage option for drop-subkey filters.
9420         + commit 2ddfb5bef920919443309ece9fa2930282bbce85
9421         * g10/import.c (impex_filter_getval): Add new "usage" property for
9422         drop-subkey filter.
9423
9424 2018-06-11  Werner Koch  <wk@gnupg.org>
9425
9426         gpg: Set some list options with --show-keys.
9427         + commit d2bc66f241a66cc95140cbb3a07555f6301290ed
9428         * g10/gpg.c (main): Set some list options.
9429
9430 2018-06-08  Werner Koch  <wk@gnupg.org>
9431
9432         gpg: Sanitize diagnostic with the original file name.
9433         + commit 13f135c7a252cc46cff96e75968d92b6dc8dce1b
9434         * g10/mainproc.c (proc_plaintext): Sanitize verbose output.
9435
9436 2018-06-07  Werner Koch  <wk@gnupg.org>
9437
9438         gpg: Improve import's repair-key duplicate signature detection.
9439         + commit 26746fe65d14a00773473c2d0d271406a5105bca
9440         * g10/key-check.c (key_check_all_keysigs): Factor some code out to ...
9441         (remove_duplicate_sigs): new.
9442         (key_check_all_keysigs): Call remove_duplicate_sigs again after
9443         reordering.
9444
9445         gpg: Fix import's repair-key duplicate signature detection.
9446         + commit 26bce2f01d2029ea2b8a8dbbe36118e3c83c5cba
9447         * g10/packet.h (PKG_siganture): Add field 'help_counter'.
9448         * g10/key-check.c (sig_comparison): Take care of HELP_COUNTER.
9449         (key_check_all_keysigs): De-duplicate on a per-block base.
9450
9451         gpg: Improve verbose output during import.
9452         + commit 1bc6b5174248ba4d83d648ef6d6f4550540d1f20
9453         * g10/import.c (chk_self_sigs): Print the subkeyid in addition to the
9454         keyid.
9455         (delete_inv_parts): Ditto.
9456
9457 2018-06-06  Werner Koch  <wk@gnupg.org>
9458
9459         agent: Add DBUS_SESSION_BUS_ADDRESS et al. to the startup list.
9460         + commit 7ffc1ac7dd95d4cc1897a4c36d5cd628741c12f2
9461         * agent/gpg-agent.c (agent_copy_startup_env): Replace explicit list
9462         with the standard list.
9463
9464         gpg: Also detect a plaintext packet before an encrypted packet.
9465         + commit 344b548dc71657d0285d93f78f17a2663b5e586f
9466         * g10/mainproc.c (proc_encrypted): Print warning and later force an
9467         error.
9468
9469         gpg: New command --show-keys.
9470         + commit 257661d6ae0ca376df758c38fabab2316d10e3a9
9471         * g10/gpg.c (aShowKeys): New const.
9472         (opts): New command --show-keys.
9473         (main): Implement command.
9474         * g10/import.c (import_keys_internal): Don't print stats in show-only
9475         mode.
9476         (import_one): Be silent in show-only mode.
9477
9478 2018-06-05  NIIBE Yutaka  <gniibe@fsij.org>
9479
9480         g10: Remove bogus comment.
9481         + commit d2e6b3ea1d70db1039a828fb3a978a4504f8f0c5
9482         * g10/mainproc.c (proc_pubkey_enc): Remove a comment.
9483
9484 2018-05-31  Werner Koch  <wk@gnupg.org>
9485
9486         gpg: Print a hint on how to decrypt a non-mdc message anyway.
9487         + commit 874e391665405fc413a69f2ffacdb94bb08da7ff
9488         * g10/mainproc.c (proc_encrypted): Print a hint for legacy ciphers w/o
9489         MDC.  Also print a dedicated status error code
9490
9491 2018-05-30  Werner Koch  <wk@gnupg.org>
9492
9493         gpg: Ignore the multiple message override options.
9494         + commit d3d41146b33040eb65eaaaffcfc7b4211e60bd95
9495         * g10/gpg.c (oAllowMultisigVerification)
9496         (oAllowMultipleMessages, oNoAllowMultipleMessages): Remove.
9497         (opts): Turn --allow-multisig-verification, --allow-multiple-messages
9498         and --no-allow-multiple-messages into NOPs
9499         * g10/options.h (struct opt): Remove flags.allow_multiple_messages.
9500         * g10/mainproc.c (proc_plaintext): Assume allow_multiple_messages is
9501         false.
9502
9503         gpg: Detect multiple literal plaintext packets more reliable.
9504         + commit 97183b5c0fae05fcda942caa7df14ee6a133d846
9505         * g10/mainproc.c (proc_encrypted): Bump LITERALS_SEEN.
9506
9507 2018-05-29  Werner Koch  <wk@gnupg.org>
9508
9509         gpg: Remove PGP6 compliance mode.
9510         + commit b2c05d691247a79fb46f75b653cbc4bf518c1c2a
9511         * g10/gpg.c: Make --pgp6 an alias for --pgp7.
9512         * common/compliance.h (gnupg_compliance_mode): Remove CO_PGP6.
9513         * g10/options.h (PGP6): Remove.  Adjust all users.
9514
9515         gpg: Remove MDC options.
9516         + commit 253e8bdd9014cbe6dc06adce9d9dd2f8f4b31709
9517         * g10/gpg.c: Tuen options --force-mdc, --no-force-mdc, --disable-mdc
9518         and --no-disable-mdc into NOPs.
9519         * g10/encrypt.c (use_mdc): Simplify.  MDC is now almost always used.
9520         (use_aead): Ignore MDC options. Print warning for missing MDC feature
9521         flags.
9522         * g10/pkclist.c (warn_missing_mdc_from_pklist): Rename to ...
9523         (warn_missing_aead_from_pklist): this and adjust.
9524
9525         gpg: Fix detection of the AEAD feature flag.
9526         + commit af4a5dbe575f304838db358aaeb45741f149d0a7
9527         * g10/getkey.c (fixup_uidnode): Use bitmask 0x02.
9528
9529 2018-05-15  Werner Koch  <wk@gnupg.org>
9530
9531         gpg: Hard fail on a missing MDC even for legacy algorithms.
9532         + commit d1431901f0143cdc7af8d1a23387e0c6b5bb613f
9533         * g10/mainproc.c (proc_encrypted): Require an MDC or AEAD
9534         * tests/openpgp/defs.scm (create-gpghome): Use --ignore-mdc-error to
9535         allow testing with the current files.
9536
9537         gpg: Turn --no-mdc-warn into a NOP.
9538         + commit 96350c5d5afcbc7f66c535e38b9fcc7355622855
9539         * g10/gpg.c (oNoMDCWarn): Remove.
9540         (opts): Make --no-mdc-warn a NOP.
9541         (main): Don't set var.
9542         * g10/options.h (struct opt): Remove 'no_mdc_var'.
9543         * g10/cipher-cfb.c (write_header): Assume opt.no_mdc_warn is false.
9544         * g10/mainproc.c (proc_encrypted): Ditto.
9545
9546 2018-05-07  Ineiev  <ineiev@gnu.org>
9547
9548         doc: Update description of displayed trust values.
9549         + commit ed12a1dabaf928e8620fc26ca426c935e1a8a880
9550         * doc/trust-values.texi: New file.
9551         * doc/Makefile.am (EXTRA_DIST): Add trust-values.texi.
9552         * doc/gnupg.texi (Trust Values): New chapter.
9553         * doc/gpg.texi (OpenPGP Key Management): Update the description
9554         of how trust values are displayed, replace table with a reference
9555         to Trust Values.
9556         * doc/gpg.texi (GPG Examples): Add @mansect trust values.
9557
9558 2018-05-02  Werner Koch  <wk@gnupg.org>
9559
9560         Release 2.2.7.
9561         + commit d31d149196832ed6b8849017d8bcd0852c6ca96c
9562
9563
9564         gpg: Fix minor memory leak in the compress filter.
9565         + commit d26363e4f1933781c86cbe87077fbf1b9a2b64d8
9566         * g10/compress.c (push_compress_filter2): Return an error if no filter
9567         was pushed.
9568         (push_compress_filter): Ditto.
9569         (handle_compressed): Free CFX if no filter was pushed.
9570         * g10/import.c (read_block): Ditto.
9571
9572         gpg: Fix "Too many open files" when using --multifile.
9573         + commit f7f3043653abe699602f910ddd09c1405675c7f6
9574         * common/miscellaneous.c (is_file_compressed): Don't cache the file.
9575
9576         dirmngr: Implement timeout for dirmngr_ldap under Windows.
9577         + commit 007dde93cc3971cb51d08e8c082e172506ae7f80
9578         * dirmngr/dirmngr_ldap.c (alarm_thread) [W32]: New.
9579         (set_timeout): Implement for W32.
9580
9581         build: New configure option to help with nPth debugging.
9582         + commit ddfd39e91a532fd31cd0c20c5d4cf9643acc58bd
9583         * configure.ac: Add option --enable-npth-debug
9584
9585 2018-05-02  Andre Heinecke  <aheinecke@intevation.de>
9586
9587         common,w32: Hide spawned processes by default.
9588         + commit 3bd793256e2e4be52075d50ccf2df70c4a2e1a0f
9589         * common/exechelp-w32.c (gnupg_spawn_process): Use SW_HIDE
9590         instead of SW_MINIMIZE.
9591
9592 2018-04-30  Werner Koch  <wk@gnupg.org>
9593
9594         dirmngr: Sleep in the ldap wrapper thread.
9595         + commit a598bbeeafa30f7854230eed212b76d5c5c77f86
9596         * dirmngr/ldap-wrapper.c (wrapper_list): Rename to reaper_list.
9597         (ldap_reaper_thread): Protect all list modification with a mutex.  Use
9598         a condition var to wake up the reaper thread.
9599
9600 2018-04-27  Werner Koch  <wk@gnupg.org>
9601
9602         dirmngr: Use the LDAP wrapper process also for Windows.
9603         + commit f9fbfc64e402bd41815a68426f55565fa6d5c726
9604         * dirmngr/ldap-wrapper.c: Revamp module to make use of es_poll for
9605         portability.
9606         * configure.ac: Always use the ldap wrapper.
9607
9608         dirmngr: Silence log output from dirmngr_ldap.
9609         + commit d22506a343cec61b7d1a48c970b63a8458b267ab
9610         * dirmngr/dirmngr_ldap.c: Remove assert.h.
9611         (main): Replace assert by log_assert.
9612         * dirmngr/ldap.c (run_ldap_wrapper): Use debug options to pass
9613         verbose options to dirmngr_ldap.
9614         (start_cert_fetch_ldap): Ditto.
9615
9616 2018-04-26  Werner Koch  <wk@gnupg.org>
9617
9618         dirmngr: Lower the dead host resurrection time to 1.5h.
9619         + commit 5789afc840cf79ba2a8cebd9d772ef9c3868c5e9
9620         * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): Decrease.
9621         (INITIAL_HOSTTABLE_SIZE): Increase because the old values was likely
9622         for development.
9623
9624         dirmngr: Fix handling of CNAMEed keyserver pools.
9625         + commit cc66108253c58583d6bad3d1e2da2b004701d0f0
9626         * dirmngr/ks-engine-hkp.c (map_host): Don't use the cname for HTTPHOST.
9627         * dirmngr/server.c (make_keyserver_item): Map keys.gnupg.net.
9628
9629 2018-04-25  Werner Koch  <wk@gnupg.org>
9630
9631         dirmngr: Add the used TLS library to the debug output.
9632         + commit bb8894760fe87cf46a42599f11eab7e7c7a8eb71
9633         * dirmngr/http.c (send_request): Print the used TLS library in debug
9634         mode.
9635
9636         dirmngr: Allow redirection from https to http for CRLs.
9637         + commit 1de4462974113ac18cf98f903e97cd1127fa842f
9638         * dirmngr/ks-engine.h (KS_HTTP_FETCH_NOCACHE): New flag.
9639         (KS_HTTP_FETCH_TRUST_CFG): Ditto.
9640         (KS_HTTP_FETCH_NO_CRL): Ditto.
9641         (KS_HTTP_FETCH_ALLOW_DOWNGRADE): Ditto.
9642         * dirmngr/ks-engine-http.c (ks_http_fetch): Replace args send_no_cache
9643         and extra_http_trust_flags by a new flags arg.  Allow redirectiong
9644         from https to http it KS_HTTP_FETCH_ALLOW_DOWNGRADE is set.
9645         * dirmngr/loadswdb.c (fetch_file): Call with KS_HTTP_FETCH_NOCACHE.
9646         * dirmngr/ks-action.c (ks_action_get): Ditto.
9647         (ks_action_fetch): Ditto.
9648         * dirmngr/crlfetch.c (crl_fetch): Call with the appropriate flags.
9649
9650         dirmngr: Implement CRL fetching via https.
9651         + commit 705d8e9cf0d109005b3441766270c0e584f7847d
9652         * dirmngr/http.h (HTTP_FLAG_TRUST_CFG): New flag.
9653         * dirmngr/http.c (http_register_cfg_ca): New.
9654         (http_session_new) [HTTP_USE_GNUTLS]: Implement new trust flag.
9655         * dirmngr/certcache.c (load_certs_from_dir): Call new function.
9656         (cert_cache_deinit): Ditto.
9657         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
9658         * dirmngr/ks-engine-http.c (ks_http_fetch): Add new args
9659         'send_no_cache' and 'extra_http_trust_flags'.  Change all callers to
9660         provide the default value.
9661         * dirmngr/crlfetch.c (crl_fetch): Rewrite to make use of
9662         ks_http_fetch.
9663
9664 2018-04-25  NIIBE Yutaka  <gniibe@fsij.org>
9665
9666         g10: Fix printing the keygrip with --card-status.
9667         + commit 71903eee89496e3f1d0a24536bced6ff16df6783
9668         * g10/card-util.c (current_card_status): Keygrip for Auth is 3.
9669
9670 2018-04-24  Werner Koch  <wk@gnupg.org>
9671
9672         dirmngr: Fallback to CRL if no default OCSP responder is configured.
9673         + commit 460e3812be711bd18195053d74aa736215f21eee
9674         * dirmngr/server.c (cmd_isvalid): Use option second arg to trigger
9675         OCSP checkibng.  Fallback to CRL if no default OCSP responder has been
9676         configured.
9677         * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Adjust accordingly.
9678
9679 2018-04-20  Andre Heinecke  <aheinecke@intevation.de>
9680
9681         dirmngr: More binary I/O on Windows for CRLs.
9682         + commit 64c1fddb253061a9773c6c4ed2a9c5a54702d21b
9683         * dirmngr/crlcache.c (lock_db_file, crl_cache_insert): Open cache
9684         file in binary mode.
9685
9686         doc: Remove unneccesary empty flags in vsndf.prf.
9687         + commit a44ed3d9a1ad5bd96694f10ea5523c517982017e
9688         * doc/examples/vsnfd.prf (max-cache-ttl): Remove empty flags.
9689
9690 2018-04-16  emma peel  <emma.peel@aktivix.org>
9691
9692         po: more updates to Spanish translation.
9693         + commit acd6d5ff7436bb7fba171ced3294046a14fb777d
9694
9695
9696         po: correct attribution for Spanish translation.
9697         + commit 21b2e88a7e6c3d7313773c9ffb3e0d1fb2af45df
9698
9699
9700         po: correct label tags in Polish translation.
9701         + commit a5290dace7f85d66272af3e14f9f2bc43d2a4af8
9702
9703
9704         po: correct label tags in Finnish translation.
9705         + commit e12475429578add12a53fb2232cb45dc9e2aae1b
9706
9707
9708 2018-04-15  Werner Koch  <wk@gnupg.org>
9709
9710         build: New target "release" to automate the release process.
9711         + commit 3b1ee413a65bf566aa8e5f29a5a2cd5a94e66faa
9712         * Makefile.am (RELEASE_ARCHIVE_DIR): New.
9713         (RELEASE_SIGNING_KEY): New.
9714         (AM_DISTCHECK_CONFIGURE_FLAGS): Remove removed --enable-gpg2-is-gpg,
9715         (RELEASE_NAME, RELEASE_W32_STEM_NAME): New.
9716         (release, sign-release): New.
9717
9718 2018-04-13  NIIBE Yutaka  <gniibe@fsij.org>
9719
9720         g10: Fix memory leak in check_sig_and_print.
9721         + commit f747b8f0734338baa1e608b193b213aca2c577e8
9722         * g10/mainproc.c (check_sig_and_print): Free the public key.
9723
9724         g10: Push compress filter only if compressed.
9725         + commit c31abf84659dbda5503dd9f3aa3449520bcd1b84
9726         * g10/compress.c (handle_compressed): Fix memory leak.
9727
9728 2018-04-12  Werner Koch  <wk@gnupg.org>
9729
9730         gpg: Extend the "sig" record in --list-mode.
9731         + commit 69c3e7acb744e1e5606a4d946e3b948704cfbbae
9732         * g10/getkey.c (get_user_id_string): Add arg R_NOUID.  Change call
9733         callers.
9734         (get_user_id): Add arg R_NOUID.  Change call callers.
9735         * g10/mainproc.c (issuer_fpr_string): Make global.
9736         * g10/keylist.c (list_keyblock_colon): Print a '?' for a missing key
9737         also in --list-mode.  Print the "issuer fpr" field also if there is an
9738         issuer fingerprint subpacket.
9739
9740         gpg: Extend the ERRSIG status line with a fingerprint.
9741         + commit 23a714598c247d78cfda46a6dc338b17e17cc194
9742         * g10/mainproc.c (issuer_fpr_raw): New.
9743         (issuer_fpr_string): Re-implement using issuer_fpr_rtaw.
9744         (check_sig_and_print): Don't free ISSUER_FPR.  Use ISSUER_FPR_RAW.
9745         Use write_status_printf.  Extend ERRSIG status.
9746
9747         gpg: Relax printing of STATUS_FAILURE.
9748         + commit e2bd152a928d79ddfb95fd2f7911c80a1a8d5a21
9749         * g10/gpg.c (g10_exit): Print STATUS_FAILURE only based on passed
9750         return code and not on the presence of any call to log_error.
9751
9752         agent,dirmngr: Add "getenv" to the getinfo command.
9753         + commit bbb5bfacc0d1f179cfec94fd32fee01a09df0f1d
9754         * agent/command.c (cmd_getinfo): Add sub-command getenv.
9755         * dirmngr/server.c (cmd_getinfo): Ditto.
9756
9757 2018-04-12  Andre Heinecke  <aheinecke@intevation.de>
9758
9759         build: Update getswdb version check to 2.2.
9760         + commit 327fece0aed2c9974659c72304f9fd1f461d460c
9761         * build-aux/getswdb.sh: Check for gnupg22_ver gnupg21_ver no
9762         longer exists.
9763
9764 2018-04-11  Werner Koch  <wk@gnupg.org>
9765
9766         gpg: New option --no-symkey-cache.
9767         + commit 789d240cb40ab36406a7c57ad49897e0bafbb41e
9768         * g10/gpg.c (oNoSymkeyCache): New.
9769         (opts): Add that option.
9770         (main): Set var.
9771         * g10/options.h (struct opt): New field no_symkey_cache.
9772         * g10/passphrase.c (passphrase_to_dek): Implement that feature.
9773
9774 2018-04-10  Werner Koch  <wk@gnupg.org>
9775
9776         agent: Improve the unknown ssh flag detection.
9777         + commit 9f69dbeb902ac447adbc92937cd451c4e909f234
9778         * agent/command-ssh.c (ssh_handler_sign_request): Simplify detection
9779         of flags.
9780
9781 2018-04-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
9782
9783         agent: unknown flags on ssh signing requests cause an error.
9784         + commit 381c46818ffa4605d0ca39818fe317de445eb6de
9785         * agent/command-ssh.c (ssh_handler_sign_request): if a flag is passed
9786         during an signature request that we do not know how to apply, return
9787         GPG_ERR_UNKNOWN_OPTION.
9788
9789         agent: change documentation reference for ssh-agent protocol.
9790         + commit 55435cdd4fe4fbfbcba1098bb715ecd6171ba2d8
9791         * agent/command-ssh.c: repoint documentation reference.
9792
9793 2018-04-09  Werner Koch  <wk@gnupg.org>
9794
9795         Release 2.2.6.
9796         + commit 6fbe2ddbaf5123ae444c95fdf8da67840f794c76
9797
9798
9799         gpg,w32: Fix empty homedir when only a drive letter is used.
9800         + commit 6da7aa1e7c80d214bd9dccb21744919ae191f2c8
9801         * common/homedir.c (copy_dir_with_fixup): New.
9802         (default_homedir): Use here.
9803         (gnupg_set_homedir): And here .
9804
9805         doc: Document --key-edit:change-usage.
9806         + commit a4e26f2ee852003707857ab0635b783acb89a2f8
9807         * g10/keyedit.c (menu_changeusage): Make strings translatable.
9808
9809 2018-04-06  Werner Koch  <wk@gnupg.org>
9810
9811         gpg: Check that a key may do certifications.
9812         + commit 1a5d95e7319e7e6f0dd11064a26cbbc371b05214
9813         * g10/sig-check.c (check_signature_end_simple): Check key usage for
9814         certifications.
9815         (check_signature_over_key_or_uid): Request usage certification.
9816
9817         gpg: Emit FAILURE stati now in almost all cases.
9818         + commit 0336e5d1a7b9d46e06c838e6a98aecfcc9542882
9819         * g10/cpr.c (write_status_failure): Make it print only once.
9820         * g10/gpg.c (wrong_args): Bump error counter.
9821         (g10_exit): Print a FAILURE status if we ever did a log_error etc.
9822         (main): Use log_error instead of log_fatal at one place.  Print a
9823         FAILURE status for a bad option.  Ditto for certain exit points so
9824         that we can see different error locations.
9825
9826         gpg: Re-indent sig-check.c and use signature class macros.
9827         + commit 5ba74a134db431530884f03eea5410a68dbfe0f5
9828         * g10/keydb.h (IS_BACK_SIG): New.
9829         * g10/sig-check.c: Re-indent and use macros.
9830
9831 2018-04-06  NIIBE Yutaka  <gniibe@fsij.org>
9832
9833         agent: Support SSH signature flags.
9834         + commit 80b775bdbb852aa4a80292c9357e5b1876110c00
9835         * agent/command-ssh.c (SSH_AGENT_RSA_SHA2_256): New.
9836         (SSH_AGENT_RSA_SHA2_512): New.
9837         (ssh_handler_sign_request): Override SPEC when FLAGS
9838         is specified.
9839
9840 2018-04-05  NIIBE Yutaka  <gniibe@fsij.org>
9841
9842         g10: Let card-edit/key-attr show message when change.
9843         + commit 870527df0dd704c994928348c8c2910030776680
9844         * g10/card-util.c (ask_card_rsa_keysize): Don't show message here.
9845         (ask_card_keyattr): Show message when change, also for ECC.
9846
9847 2018-04-04  NIIBE Yutaka  <gniibe@fsij.org>
9848
9849         tests: Fix no gpg-agent upon removal of GNUPGHOME.
9850         + commit 83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73
9851         * tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add
9852         teadown-fn.
9853         * tests/gpgsm/export.scm: Use -no-atexit version and stop-agent.
9854         * tests/openpgp/decrypt-session-key.scm: Likewise.
9855         * tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
9856         * tests/openpgp/defs.scm (have-opt-always-trust): Likewise.
9857         (setup-environment-no-atexit): New.
9858         (start-agent): Support no use of atexit.
9859         * tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New.
9860         * tests/migrations/common.scm (untar-armored): Follow the change
9861         of with-ephemeral-home-directory.
9862
9863 2018-04-03  NIIBE Yutaka  <gniibe@fsij.org>
9864
9865         scd: Writing KDF resets auth state.
9866         + commit cb1731c23cddfa524d3f51cfd82029bff853a073
9867         * scd/app-openpgp.c (do_setattr): Clear auth state.
9868
9869 2018-04-02  NIIBE Yutaka  <gniibe@fsij.org>
9870
9871         g10: Fix filtering by PK->REQ_USAGE.
9872         + commit a17d2d1f690ebe5d005b4589a5fe378b6487c657
9873         * g10/getkey.c (get_pubkey_byfprint): Filter by PK->REQ_USAGE.
9874
9875 2018-03-30  NIIBE Yutaka  <gniibe@fsij.org>
9876
9877         g10: Fix card-edit/kdf-setup for single salt.
9878         + commit 130ad98240c066383fa0a99bcf5e0ec72bc0dff9
9879         * g10/card-util.c (gen_kdf_data): Use SALT_USER.
9880
9881         g10,scd: Support single salt for KDF data object.
9882         + commit 0c097575a9cd923f648fb5bb695893d46400c3ad
9883         * g10/card-util.c (gen_kdf_data): Support single salt.
9884         (kdf_setup): Can have argument for single salt.
9885         * scd/app-openpgp.c (pin2hash_if_kdf): Support single salt.
9886
9887         g10: Add "key-attr" command for --card-edit.
9888         + commit 820380335a20391e0998fb1ba32ebfb9accedc5b
9889         * g10/card-util.c (key_attr): New explicit command.
9890         (generate_card_keys, card_generate_subkey): Don't ask key attr change.
9891         (card_edit): Add for cmdKEYATTR.
9892
9893         scd: Support changing key attribute back to RSA.
9894         + commit 29692718768c28c524be6306081ab1852e75fe07
9895         * scd/app-openpgp.c (change_rsa_keyattr): Try usual RSA.
9896
9897 2018-03-29  NIIBE Yutaka  <gniibe@fsij.org>
9898
9899         g10: Support key attribute change at --card-edit/generate.
9900         + commit a1515b3bbc10a210040dda3b482bcdb933fa8d7c
9901         * g10/card-util.c (ask_card_rsa_keysize): Drop support for magic
9902         number 25519 for ed25519/cv25519.  Rename from ask_card_keyattr.
9903         (ask_card_keyattr): Support ECC, as well as RSA.
9904         (do_change_keyattr): Support ECC dropping magical number 25519.
9905         * g10/keygen.c (ask_curve): Allow call from outside, adding last arg
9906         of CURRENT.
9907         (generate_keypair): Follow the change of ask_curve.
9908         (generate_subkeypair): Likewise.
9909
9910         g10: check_pin_for_key_operation should be just before genkey.
9911         + commit 02d7bb819ff44cc90212568dd6ce24ae1dc5d17f
9912         * g10/card-util.c (generate_card_keys): Check PIN later.
9913         (card_generate_subkey): Likewise.
9914
9915 2018-03-28  NIIBE Yutaka  <gniibe@fsij.org>
9916
9917         g10: Change ask_curve so that it can be used outside.
9918         + commit e610d51f0de11154050915b951bcc5c53c940f5e
9919         * g10/call-agent.h (struct key_attr): New.
9920         * g10/keygen.c (ask_curve): Return const char *.  No allocation.
9921         (quick_generate_keypair): Follow the change.
9922         (generate_keypair, generate_subkeypair): Likewise.
9923         (parse_algo_usage_expire): Return const char *.
9924
9925 2018-03-27  NIIBE Yutaka  <gniibe@fsij.org>
9926
9927         agent,scd: Use pointer to represent HANDLE.
9928         + commit 96918346beeca7a46de9f03f19502373994c21bc
9929         * agent/call-scd.c [HAVE_W32_SYSTEM] (start_scd): Format with %p.
9930         * scd/command.c [HAVE_W32_SYSTEM] (option_handler): Use void *.
9931
9932 2018-03-27  Werner Koch  <wk@gnupg.org>
9933
9934         agent: Make the request origin a part of the cache items.
9935         + commit 02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e
9936         * agent/cache.c (agent_put_cache): Add arg 'ctrl' and change all
9937         callers to pass it.
9938         (agent_get_cache): Ditto.
9939
9940         * agent/cache.c (struct cache_items_s): Add field 'restricted'.
9941         (housekeeping): Adjust debug output.
9942         (agent_flush_cache): Ditto.
9943         (agent_put_cache): Ditto.  Take RESTRICTED into account.
9944         (agent_get_cache): Ditto.
9945
9946 2018-03-26  Werner Koch  <wk@gnupg.org>
9947
9948         gpg: Auto-fix a broken trustdb with just the version record.
9949         + commit eb68c2d3d1b03a18cd24406fa46d4c30cb13d9f7
9950         * g10/tdbio.c (get_trusthashrec): Create hashtable on error.
9951
9952         gpg: Pass CTRL arg to get_trusthashrec.
9953         + commit a750ebebf35a392f1c72d6aee5618df0d9f25ff7
9954         * g10/tdbio.c (get_trusthashrec): Add arg CTRL.
9955         (tdbio_search_trust_byfpr): Ditto.
9956         (tdbio_search_trust_bypk): Ditto.
9957
9958         gpg: Return better error codes in case of a too short trustdb.
9959         + commit 403aa70c52e56614d65490dea9344113f9cf3d29
9960         * g10/tdbio.c (tdbio_read_record): Return GPG_ERR_EOF.
9961         (tdbio_new_recnum): Never return on error.
9962         (lookup_hashtable): Print a more descriptive error in case of !TABLE.
9963
9964         gpg: Fix trustdb updates without lock held.
9965         + commit 456a3a8e93ea14f821e0e98fb515f284ece98685
9966         * g10/tdbio.c (is_locked): Turn into a counter.
9967         (take_write_lock, release_write_lock): Implement recursive locks.
9968
9969         gpg: Disable unused code parts in tdbio.c.
9970         + commit 5f00531463ebc0e606c502696962426007545bb7
9971         * g10/tdbio.c (in_transaction): Comment this var.
9972         (put_record_into_cache): Comment the transaction code.
9973         (tdbio_sync): Ditto
9974
9975 2018-03-23  Werner Koch  <wk@gnupg.org>
9976
9977         sm: Add OPTION request-origin.
9978         + commit 137644c9cb58deaaba6850f2763d9c5f9241cb0b
9979         * sm/server.c: Include shareddefs.h.
9980         (option_handler): Add option.
9981
9982         gpg,sm: New option --request-origin.
9983         + commit 2cd35df5db3c4dfe37616dcfb1fcc644959449ef
9984         * g10/gpg.c (oRequestOrigin): New const.
9985         (opts): New option --request-origin.
9986         (main): Parse that option.
9987         * g10/options.h (struct opt): Add field request_origin.
9988         * g10/call-agent.c (start_agent): Send option to the agent.
9989         * sm/gpgsm.c (oRequestOrigin): New const.
9990         (opts): New option --request-origin.
9991         (main): Parse that option.
9992         * sm/gpgsm.h (struct opt): Add field request_origin.
9993         * sm/call-agent.c (start_agent): Send option to the agent.
9994
9995         agent: New OPTION pretend-request-origin.
9996         + commit 05c55ee260edc07cd19da56dfd00347bfe3f529c
9997         * common/shareddefs.h (request_origin_t): New.
9998         * common/agent-opt.c (parse_request_origin): New.
9999         (str_request_origin): New.
10000         * agent/command.c (option_handler): Implement new option.
10001
10002 2018-03-23  NIIBE Yutaka  <gniibe@fsij.org>
10003
10004         build: Fix the manual source field.
10005         + commit 5400a5bb77bddcb14c94d9405312d6181322b090
10006
10007
10008 2018-03-22  Werner Koch  <wk@gnupg.org>
10009
10010         gpg: Implement --dry-run for --passwd.
10011         + commit 165bc38cefbc03515403b60b704cabf4dc0b71f4
10012         * g10/keyedit.c (change_passphrase): Take care of --dry-run.
10013
10014 2018-03-22  NIIBE Yutaka  <gniibe@fsij.org>
10015
10016         scd: Support KDF DO setup.
10017         + commit 0152ba7c987443d641ce1091c79f90ef2cc46498
10018         * g10/call-agent.c (learn_status_cb): Parse the capability for KDF.
10019         * g10/card-util.c (gen_kdf_data, kdf_setup): New.
10020         (card_edit): New admin command cmdKDFSETUP to call kdf_setup.
10021         * scd/app-openpgp.c (do_getattr): Emit KDF capability.
10022
10023 2018-03-21  Werner Koch  <wk@gnupg.org>
10024
10025         gpg: Fix out-of-bound read in subpacket enumeration.
10026         + commit 983f7b2acbd1e7580652bbeb0c3d64f9dd19d9e4
10027         * g10/parse-packet.c (enum_sig_subpkt): Check buflen before reading
10028         the type octet.  Print diagnostic.
10029
10030         Change license of argparse.c back to LGPLv2.1.
10031         + commit fa0ed1c7e2eee7c559026696e6b21acc882a97aa
10032         * common/argparse.c, common/argparse.h: Change license
10033
10034 2018-03-19  NIIBE Yutaka  <gniibe@fsij.org>
10035
10036         scd: signal mask should be set just after npth_init.
10037         + commit 11bbd99477ef5ba5b7db0c17607b10af03c68afb
10038         * scd/scdaemon.c (setup_signal_mask): New.
10039         (main): Call setup_signal_mask.
10040         (handle_connections): Remove signal mask setup.
10041
10042 2018-03-16  NIIBE Yutaka  <gniibe@fsij.org>
10043
10044         scd: Better user interaction for factory-reset.
10045         + commit 2c85e202bc30231b9555100dec0c490c60d7b88c
10046         * g10/card-util.c (factory_reset): Dummy PIN size is now 32-byte.
10047         Connect the card again at the last step.
10048
10049 2018-03-15  NIIBE Yutaka  <gniibe@fsij.org>
10050
10051         scd: Fix suspend/resume handling for CCID driver.
10052         + commit fd23a0524d8060ed12d87c679b7823686614aaee
10053         * scd/ccid-driver.c (intr_cb): Try submitting INTERRUPT urb
10054         to see if it's suspend/resume.
10055
10056 2018-03-13  NIIBE Yutaka  <gniibe@fsij.org>
10057
10058         scd: After fatal error, shutdown a reader.
10059         + commit c84bae69e9e02923f7180e09d161cb0b13257436
10060         * scd/apdu.c (pcsc_send_apdu): Notify main loop after
10061         fatal errors.
10062
10063         scd: Fix for GNU/Linux suspend/resume.
10064         + commit 71e5282c25ba812c7091e587edd721839bc4c2ac
10065         * configure.ac (require_pipe_to_unblock_pselect): Default is "yes".
10066         * scd/scdaemon.c (scd_kick_the_loop): Minor clean up.
10067
10068 2018-03-12  NIIBE Yutaka  <gniibe@fsij.org>
10069
10070         scd: Fix typo in previous commit.
10071         + commit 655f0b9ad0138e6f960bf4befaf0eea569256614
10072
10073
10074 2018-03-09  NIIBE Yutaka  <gniibe@fsij.org>
10075
10076         scd: More fix with PC/SC for Windows.
10077         + commit 1e27c0e04cd3280d498dc8b72d2e410f6287f656
10078         * scd/apdu.c (pcsc_get_status): Return status based on CURRENT_STATUS.
10079         Add debug log.
10080
10081 2018-03-08  NIIBE Yutaka  <gniibe@fsij.org>
10082
10083         scd: Fix status check when using PC/SC.
10084         + commit f8b8b6aac2ca1cb34d7a346aee1d874e7650557b
10085         * scd/apdu.c (struct reader_table_s): Add field of current_state.
10086         (new_reader_slot): Initialize current_state.
10087         (pcsc_get_status): Keep the status in READER_TABLE array.
10088         Return SW_HOST_NO_READER when PCSC_STATE_CHANGED.
10089         * scd/scdaemon.c (handle_connections): Silence a warning.
10090
10091 2018-03-06  Werner Koch  <wk@gnupg.org>
10092
10093         agent: Also evict cached items via a timer.
10094         + commit f060cb5c63923d6caec784f65f3bb0aadf52f795
10095         * agent/cache.c (agent_cache_housekeeping): New func.
10096         * agent/gpg-agent.c (handle_tick): Call it.
10097
10098 2018-03-01  Werner Koch  <wk@gnupg.org>
10099
10100         gpg: Print the keygrip with --card-status.
10101         + commit fd595c9d3642dba437fbe0f6e25d7aaaae095f94
10102         * g10/call-agent.h (agent_card_info_s): Add fields grp1, grp2 and
10103         grp3.
10104         * g10/call-agent.c (unhexify_fpr): Allow for space as delimiter.
10105         (learn_status_cb): Parse KEYPARIINFO int the grpX fields.
10106         * g10/card-util.c (print_keygrip): New.
10107         (current_card_status): Print "grp:" records or with --with-keygrip a
10108         human readable keygrip.
10109
10110 2018-02-28  Andre Heinecke  <aheinecke@intevation.de>
10111
10112         gpgconf, w32: Allow UNC paths.
10113         + commit e43844c3b0b9ec93b7f2a88752bcd6b6244aacfb
10114         * tools/gpgconf-comp.c (get_config_filename): Allow UNC paths.
10115
10116 2018-02-28  Werner Koch  <wk@gnupg.org>
10117
10118         gpg: Avoid writing a zero length last chunk in AEAD mode.
10119         + commit f2c09203b98b83669a460dc8161283de96022536
10120         * g10/cipher-aead.c (write_header): Do not call set_nonce_and_ad.
10121         (write_final_chunk): Do not increase chunkindex.
10122         (do_flush): Call set_nonce_and_ad immediately before the first
10123         encryption of a chunk.  Bump up the chunkindex after writing the tag.
10124         (do_free): Do not insert a zero length last chunk.
10125         * g10/decrypt-data.c (aead_underflow): Fix the corresponding bug.
10126
10127         gpg: Merge two functions in cipher-aead.c.
10128         + commit 047506a03d21739b5b922f6b3fd9f059b0b137c5
10129         * g10/cipher-aead.c (set_nonce, set_additional_data): Merge into ...
10130         (set_nonce_and_ad): new function.
10131         (write_auth_tag): Print error message here.
10132         (do_flush): Rename var newchunk to finalize.
10133
10134 2018-02-27  Werner Koch  <wk@gnupg.org>
10135
10136         gpg: Simplify the AEAD decryption function.
10137         + commit 618b86325f776f7250ad2bb09680e4bb427d7e50
10138         * g10/decrypt-data.c (aead_set_nonce, aead_set_ad): Merge into ...
10139         (aead_set_nonce_and_ad): new single function.  Change callers.
10140         (decrypt_data): Do not set the nonce and ad here.
10141         (aead_underflow): Get rid of the LAST_CHUNK_DONE hack.
10142
10143         gpg: Factor common code out of the AEAD decryption function.
10144         + commit ad989373f1a46139ed0fbc4d4a91069b78617ad9
10145         * g10/decrypt-data.c (aead_underflow): Factor reading and checking
10146         code code out to ...
10147         (fill_buffer, aead_checktag): new functions.
10148
10149         gpg: Rename cipher.c to cipher-cfb.c.
10150         + commit b703ba725dadca8298a0c69365225f9a7ff60ae2
10151         * g10/cipher.c: Rename to ...
10152         * g10/cipher-cfb.c: this.
10153
10154         gpg: Fix corner cases in AEAD encryption.
10155         + commit ebb0fcf6e0bd6997eff4097ddda94955134212af
10156         * g10/cipher-aead.c (write_final_chunk): Do not bump up the chunk
10157         index if the previous chunk was empty.
10158         * g10/decrypt-data.c (aead_underflow): Likewise.  Also handle a other
10159         corner cases.  Add more debug output.
10160
10161 2018-02-23  Werner Koch  <wk@gnupg.org>
10162
10163         gpg: Try to mitigate the problem of wrong CFB symkey passphrases.
10164         + commit cbc7bacf2ff95aebb427bb244c719143a9001f3c
10165         * g10/mainproc.c (symkey_decrypt_seskey): Check for a valid algo.
10166
10167 2018-02-22  Michał Górny  <mgorny@gentoo.org>
10168
10169         dirmngr: Handle failures related to missing IPv6 gracefully.
10170         + commit ecfc4db3a2f8bc2652ba4ac4de5ca1cd13bfcbec
10171         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Handle two more
10172         error codes.
10173
10174 2018-02-22  Werner Koch  <wk@gnupg.org>
10175
10176         build: Update swdb tags and include release info from 2.2.5.
10177         + commit 7853190cfe2953fdac066b4f3256edc206896144
10178
10179
10180         Release 2.2.5.
10181         + commit 9581a65ccc10daededc05c55391a04022f794a4a
10182
10183
10184         gpg: Don't let gpg return failure on an invalid packet in a keyblock.
10185         + commit b375d50ee4ce52c9b0f0855ec155be027642fb05
10186         * g10/keydb.c (parse_keyblock_image): Use log_info instead of
10187         log_error for skipped packets.
10188         * g10/keyring.c (keyring_get_keyblock): Ditto.
10189
10190 2018-02-22  NIIBE Yutaka  <gniibe@fsij.org>
10191
10192         g10: Select a secret key by checking availability under gpg-agent.
10193         + commit 88e766d3915c2919e9968148ebb30463d4a673e4
10194         * g10/getkey.c (finish_lookup): Add WANT_SECRET argument to confirm
10195         by agent_probe_secret_key.
10196         (get_pubkey_fromfile, lookup): Supply WANT_SECRET argument.
10197
10198 2018-02-20  Werner Koch  <wk@gnupg.org>
10199
10200         wks: Add special mode to --install-key.
10201         + commit 685a5e1558b2252ac895637fb857f6f7bb85ea7b
10202         * tools/gpg-wks-client.c (get_key_status_parm_s)
10203         (get_key_status_cb, get_key): Move to ...
10204         * tools/wks-util.c: ...here.
10205         (get_key): Rename to wks_get_key.
10206         * tools/gpg-wks-server.c: Include userids.h.
10207         (command_install_key): Allow use of a fingerprint.
10208
10209         wks: Implement server command --install-key.
10210         + commit ee474856ec16ff11d922d8503fb3ede77129c4aa
10211         * tools/wks-util.c (wks_filter_uid): Add arg 'binary'.
10212         * tools/gpg-wks-server.c (main): Expect 2 args for --install-key.
10213         (write_to_file): New.
10214         (check_and_publish): Factor some code out to ...
10215         (compute_hu_fname): ... new.
10216         (command_install_key): Implement.
10217
10218         wks: Support alternative submission address.
10219         + commit 1877603761911ea5b1c15f4aef11a2cf86a8682c
10220         * tools/gpg-wks.h (policy_flags_s): Add field 'submission_address'.
10221         * tools/wks-util.c (wks_parse_policy): Parse that field.
10222         (wks_free_policy): New.
10223         * tools/gpg-wks-client.c (command_send): Also try to take the
10224         submission-address from the policy file.  Free POLICY.
10225         * tools/gpg-wks-server.c (process_new_key): Free POLICYBUF.
10226         (command_list_domains): Free POLICY.
10227
10228 2018-02-15  Werner Koch  <wk@gnupg.org>
10229
10230         kbx: Fix detection of corrupted keyblocks on 32 bit systems.
10231         + commit 5e3679ae395e7a7e44f218f07bbe487429f1b279
10232         * kbx/keybox-search.c (blob_cmp_fpr): Avoid overflow in OFF+LEN
10233         checking.
10234         (blob_cmp_fpr_part): Ditto.
10235         (blob_cmp_name): Ditto.
10236         (blob_cmp_mail): Ditto.
10237         (blob_x509_has_grip): Ditto.
10238         (keybox_get_keyblock): Check OFF and LEN using a 64 bit var.
10239         (keybox_get_cert): Ditto.
10240
10241 2018-02-15  NIIBE Yutaka  <gniibe@fsij.org>
10242
10243         gpg: Fix reversed messages for --only-sign-text-ids.
10244         + commit ca138d5bf36accde2fd755249b470a8dc8743c95
10245         * g10/keyedit.c (keyedit_menu): Fix messages.
10246
10247 2018-02-14  Katsuhiro Ueno  <uenobk@gmail.com>
10248
10249         agent: Avoid appending a '\0' byte to the response of READKEY.
10250         + commit df97fe24807826ddc2af0e45e416fb81c5666f88
10251         * agent/command.c (cmd_readkey): Set pkbuflen to the length of the output
10252         without an extra '\0' byte.
10253
10254 2018-02-14  Werner Koch  <wk@gnupg.org>
10255
10256         sm: Fix minor memory leak in --export-p12.
10257         + commit 80719612b7e92aff5887f2a68d550a24f350722c
10258         * sm/export.c (gpgsm_p12_export): Free KEYGRIP.
10259
10260 2018-02-14  Katsuhiro Ueno  <uenobk@gmail.com>
10261
10262         sm: Fix a wrong key parameter in an exported private key file.
10263         + commit 29aac7798085ee38da5107698618890ae7593c96
10264         * sm/export.c (sexp_to_kparms): Fix the computation of array[6],
10265         which must be 'd mod (q-1)' but was 'p mod (q-1)'.
10266
10267 2018-02-14  Werner Koch  <wk@gnupg.org>
10268
10269         common: Use new function to print status strings.
10270         + commit f19ff78f0fbfc2793d8a9ab0173486bf712871ac
10271         * common/asshelp2.c (vprint_assuan_status_strings): New.
10272         (print_assuan_status_strings): New.
10273         * agent/command.c (agent_write_status): Replace by call to new
10274         function.
10275         * dirmngr/server.c (dirmngr_status): Ditto.
10276         * g13/server.c (g13_status): Ditto.
10277         * g13/sh-cmd.c (g13_status): Ditto.
10278         * sm/server.c (gpgsm_status2): Ditto.
10279         * scd/command.c (send_status_info): Bump up N.
10280
10281 2018-02-13  Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
10282
10283         scd: Improve KDF-DO support.
10284         + commit 25f3b69129015c54392636818c8846e236f5cb2c
10285         * scd/app-openpgp.c (pin2hash_if_kdf): Check the content of KDF DO.
10286
10287 2018-02-12  NIIBE Yutaka  <gniibe@fsij.org>
10288
10289         scd: Fix handling for Data Object with no data.
10290         + commit 0a3bec2c2525935362f87dce93d7df2c8d498498
10291         * scd/app-openpgp.c (get_cached_data): Return NULL for Data Object
10292         with no data.
10293
10294 2018-02-09  Andre Heinecke  <aheinecke@intevation.de>
10295
10296         doc: Add compliance de-vs to gpgsm in vsnfd.prf.
10297         + commit e0658b19d93b38ed9ebd07734c4678acdde1607d
10298         * doc/examples/vsnfd.prf: Set complaince mode for gpgsm.
10299
10300 2018-02-07  NIIBE Yutaka  <gniibe@fsij.org>
10301
10302         scd: Use pipe to kick the loop on NetBSD.
10303         + commit 015fe1c47b91da340e9df6bed908e0747ae8c60b
10304         * configure.ac (HAVE_PSELECT_NO_EINTR): New.
10305         * scd/scdaemon.c (scd_kick_the_loop): Write to pipe.
10306         (handle_connections): Use pipe.
10307
10308 2018-02-06  Werner Koch  <wk@gnupg.org>
10309
10310         gpg: Fix packet length checking in symkeyenc parser.
10311         + commit 8305739fe857ed3378f885bb43777fd518dd1060
10312         * g10/parse-packet.c (parse_symkeyenc): Move error printing to the
10313         end.  Add additional check to cope for the 0je extra bytes needed for
10314         AEAD.
10315
10316 2018-01-29  NIIBE Yutaka  <gniibe@fsij.org>
10317
10318         tests: Fix for NetBSD with __func__.
10319         + commit 64aa98c8a05513d9c00f53a2b880d80f9035333e
10320         * tests/asschk.c: Don't define __func__ if available.
10321
10322 2018-01-28  Werner Koch  <wk@gnupg.org>
10323
10324         gpg: Rename a misnomed arg in open_outfile.
10325         + commit 303310d05e708dd58dcf7b7d8e8634cd5085bc7e
10326         * g10/openfile.c (open_outfile): Rename inp_fd to out_fd.
10327
10328 2018-01-27  Werner Koch  <wk@gnupg.org>
10329
10330         dirmngr: Improve assuan error comment for cmd keyserver.
10331         + commit f8e868d9dfb6fc1390e421e7993a1d076309ed83
10332         * dirmngr/server.c: Add error comment in case --resolve fails in
10333         ensure_keyserver.
10334
10335 2018-01-26  NIIBE Yutaka  <gniibe@fsij.org>
10336
10337         agent: Fix sending connecting process uid to pinentry.
10338         + commit 660eafa3a9f68e116e9b0597edc317d8ff90f9b2
10339         * agent/command-ssh.c (get_client_info): Use LOCAL_PEERCRED.
10340
10341         agent: Fix last commit.
10342         + commit d7207b39b71d1b07c4cddac602f29ec583f6d1ad
10343         * configure.ac: Check ucred.h as well as sys/ucred.h.
10344         * agent/command-ssh.c: Add inclusion of ucred.h.
10345
10346         agent: More fix for get_client_pid for portability.
10347         + commit 08e686a6a6d5bcb5410228b388745d09686b260c
10348             * configure.ac: Check sys/ucred.h instead of ucred.h.
10349             * agent/command-ssh.c: Include sys/ucred.h.
10350
10351 2018-01-24  Werner Koch  <wk@gnupg.org>
10352
10353         gpg: New maintainer option --debug-set-iobuf-size.
10354         + commit db7661b5a297a58c95fa9873d43f31d697b8feb3
10355         * g10/gpg.c (opts): Add new option.
10356         (opt_set_iobuf_size): New var.
10357         (set_debug): Set the option.
10358         * tests/openpgp/armor.scm: Use this option to revert the buffer size
10359         to the one which used to exhibit the tested bugs.
10360
10361         iobuf: Increase the size of the buffer.  Add iobuf_set_buffer_size.
10362         + commit bfc11816444512b4ebcc6617d3c3b5988e753de3
10363         * common/iobuf.c (IOBUF_BUFFER_SIZE): Rename to
10364         DEFAULT_IOBUF_BUFFER_SIZE and increase to 64k.
10365         (iobuf_buffer_size): New var.  Always use this instead of the macro.
10366         (iobuf_set_buffer_size): New.
10367         (struct file_filter_ctx_t): Add field delayed_rc.
10368         (file_filter) [!W32]: Try to fill the supplied buffer.
10369
10370         gpg: Fix AEAD encryption for chunk sizes other than 64 KiB.
10371         + commit ff1bdc23d9f1693c1add7c1fe8d218b7bf743e31
10372         * g10/cipher-aead.c (do_flush): Init ERR.  Fix remaining chunklen
10373         computation.
10374         (do_free): Add dummy encryption.  Close the cipher handle.
10375         * g10/decrypt-data.c (aead_underflow): Rewrite.
10376
10377         gpg: Rename a variable in decrypt-data for clarity.
10378         + commit 83a15fa88e91d277811b6d030c4aa40c4fb3e6ad
10379         * g10/decrypt-data.c (decode_filter_context_s): Rename field 'defer'
10380         to 'holdback' and replace 'defer_filled' flag into 'holdbacklen'.
10381         Change all users.
10382
10383 2018-01-23  Werner Koch  <wk@gnupg.org>
10384
10385         gpg: New option --chunk-size.
10386         + commit f3ef8b0dcaede1c85da0dff8eeceda6a994f0b28
10387         * g10/gpg.c (opts): New option --chunk-size.
10388         (oChunkSize): New const.
10389         (build_list_aead_test_algo, build_list_aead_algo_name): New.
10390         (my_strusage): List AEAD algos.
10391         (main): Implement --chunk-size..
10392         * g10/options.h (struct opt): Add field 'chunk_size'.
10393         (DBG_IPC): Remove duplicated macro.
10394         * g10/main.h (DEFAULT_AEAD_ALGO): Depend on Libgcrypt version.
10395         * g10/misc.c (openpgp_aead_test_algo): Ditto.
10396
10397         * g10/cipher-aead.c: Silence if not in debug mode.
10398         * g10/decrypt-data.c: Ditto.
10399
10400         gpg: Copy the AEAD prefs to the user ID struct.
10401         + commit 112e02ee89b78369c1c50e672873e726cbfeb994
10402         * g10/getkey.c (fixup_uidnode): Copy the AEAD prefs.
10403
10404         gpg: Clear the symmetric passphrase cache for encrypted session keys.
10405         + commit 278d87465685e0aa415e0333de1d27e79d1608f0
10406         * g10/mainproc.c (proc_symkey_enc): Clear the symmetric key cache on
10407         error.
10408         (proc_encrypted): Need to take are of the checksum error.
10409
10410         gpg: Implement AEAD for SKESK packets.
10411         + commit 9aab9167bca38323973e853845ca95ae8e9b6871
10412         * g10/packet.h (PKT_symkey_enc): Add field aead_algo.
10413         * g10/build-packet.c (do_symkey_enc): Support version 5 packets.
10414         * g10/parse-packet.c (parse_symkeyenc): Ditto.
10415         * g10/encrypt.c (encrypt_symmetric): Force using a random session
10416         key in AEAD mode.
10417         (encrypt_seskey): Add and support arg aead_algo.
10418         (write_symkey_enc): Ditto.
10419         (encrypt_simple): Adjust accordingly.
10420         (encrypt_filter): Ditto.
10421         * g10/gpgcompose.c (sk_esk): For now call encrypt_seskey without AEAD
10422         support.
10423         * g10/mainproc.c (symkey_decrypt_seskey): Support AEAD.  Nver call BUG
10424         but return an error.
10425         (proc_symkey_enc): Call symkey_decrypt_seskey in a bug compatible way.
10426
10427         * g10/import.c (check_prefs): Check AEAD preferences.
10428         * g10/keyedit.c (show_prefs): Print AEAD preferences.
10429
10430 2018-01-22  Werner Koch  <wk@gnupg.org>
10431
10432         gpg: Unify AEAD parameter retrieval.
10433         + commit da3015e3c05030fe709c8f922486e73d06d1d16a
10434         * g10/pkclist.c (select_aead_from_pklist): Return the AEAD_algo.
10435         * g10/encrypt.c (use_aead): Return the AEAD algo.
10436         (encrypt_simple): Adjust for this change.
10437         (encrypt_crypt): Ditto.
10438         (encrypt_filter): Ditto.
10439         * g10/sign.c (sign_symencrypt_file): Ditto.
10440
10441         * g10/misc.c (MY_GCRY_CIPHER_MODE_EAX): New.
10442         (openpgp_aead_algo_info): New.
10443         * g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
10444         (write_header): Use new fucntion.
10445         * g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): Remove.
10446         (decrypt_data): Use new function.  Also allow for chunkbytes other
10447         than 10.
10448
10449         gpg: Refactor function encrypt_seskey.
10450         + commit 0131d4369a81a51bf7bb328cc81a3bb082ed1a94
10451         * g10/encrypt.c (encrypt_seskey): Allocate the buffer for the
10452         encrypted key and returns that buffer and its length.
10453         (encrypt_simple): Adjust for above change.
10454         (write_symkey_enc): Ditto.
10455
10456 2018-01-22  NIIBE Yutaka  <gniibe@fsij.org>
10457
10458         scd: Support KDF Data Object of OpenPGPcard V3.3.
10459         + commit 91303b7df9c3e810cfcd4920f78bac6f8b7df2b2
10460         * scd/app-openpgp.c (do_getattr, do_setattr): Add KDF support.
10461         (pin2hash_if_kdf): New.
10462         (verify_a_chv): Add PINLEN arg.  Use pin2hash_if_kdf.
10463         (verify_chv2, do_sign): Follow the change of verify_a_chv.
10464         (verify_chv3, do_change_pin): Use pin2hash_if_kdf.
10465
10466 2018-01-21  Werner Koch  <wk@gnupg.org>
10467
10468         gpg: Support EAX if for latest Libgcrypt.
10469         + commit 7356d6ec50ea24bc9449187e1c2b3ecd717b789f
10470         * g10/cipher-aead.c (MY_GCRY_CIPHER_MODE_EAX): New.
10471         (write_header): Use it.
10472         * g10/decrypt-data.c (MY_GCRY_CIPHER_MODE_EAX): New.
10473         (decrypt_data): Use it.
10474         * g10/misc.c (openpgp_aead_test_algo): Allow EAX.
10475
10476         gpg: First take on PKT_ENCRYPTED_AEAD.
10477         + commit 3f4ca85cb0cf58006417f4f7faafaa9a1f1bdf22
10478         * common/openpgpdefs.h (PKT_ENCRYPTED_AEAD): New const.
10479         * g10/dek.h (DEK): Increase size of use_aead to 4 bits.
10480         * g10/filter.h (cipher_filter_context_t):  Add new fields for AEAD.
10481         * g10/packet.h (PKT_encrypted): Add fields aead_algo, cipher_algo, and
10482         chunkbyte.
10483         * g10/build-packet.c (do_encrypted_aead): New.
10484         (build_packet): Call it.
10485         * g10/parse-packet.c (dump_sig_subpkt): Handle SIGSUBPKT_PREF_AEAD.
10486         (parse_one_sig_subpkt, can_handle_critical): Ditto.
10487         (parse_encrypted): Clear new PKT_ENCRYPTED fields.
10488         (parse_encrypted_aead): New.
10489         (parse): Call it.
10490         * g10/gpg.c (main): Take care of --rfc4880bis option when checking
10491         compliance.
10492         * g10/cipher-aead.c: Replace the stub by real code.
10493         * g10/decrypt-data.c (decode_filter_ctx_t): Add fields for use with
10494         AEAD.
10495         (aead_set_nonce): New.
10496         (aead_set_ad): New.
10497         (decrypt_data): Support AEAD.
10498         (aead_underflow): New.
10499         (aead_decode_filter): New.
10500         * g10/encrypt.c (use_aead): Make that new fucntion work.
10501         (encrypt_simple): Use default_aead_algo() instead of EAX.
10502         * g10/mainproc.c (proc_encrypted): Support AEAD.
10503         (do_proc_packets): Support PKT_ENCRYPTED_AEAD.
10504
10505 2018-01-18  Werner Koch  <wk@gnupg.org>
10506
10507         gpg: Fix the use of future-default with --quick-add-key.
10508         + commit e1e35db510c9222e7a7dc208c2e49df556954170
10509         * g10/keygen.c (parse_key_parameter_part): Add arg clear_cert.
10510         (parse_key_parameter_string): Add arg suggested_use and implement
10511         fallback.  Change callers to pass 0 for new arg.
10512         (parse_algo_usage_expire): Pass the parsed USAGESTR to
10513         parse_key_parameter_string so that it can use it in case a subkey is
10514         to be created.
10515
10516 2018-01-10  Werner Koch  <wk@gnupg.org>
10517
10518         gpg: Add stub function for encrypting AEAD.
10519         + commit 81d71818d054a5faa9153fd52a4b79bbbb71e9d5
10520         * g10/cipher.c (cipher_filter): Rename to cipher_filter_cfb.
10521         * g10/cipher-aead.c: New.  Right now only with a stub function.
10522         * g10/Makefile.am (gpg_sources): Add file.
10523         * g10/encrypt.c (encrypt_simple): Push either cipher_filter_cfb or
10524         cipher_filter_aead.
10525         (encrypt_crypt): Ditto.
10526         (encrypt_filter): Ditto.
10527         * g10/sign.c (sign_symencrypt_file): Ditto.
10528
10529         gpg: New option --force-aead.
10530         + commit 4e2ba546cdccbbc6d3e29867ee5671fd44d74e67
10531         * g10/dek.h (DEK): Turn fields use_mdc, algo_printed and symmetric
10532         into single bit vars.  Make sure they are always set to 1 or 0.
10533         (DEK): New field use_aead.
10534         * g10/options.h (struct opt): New field force_aead.
10535         * g10/pkclist.c (select_aead_from_pklist): New.
10536         * g10/gpg.c (oForceAEAD): New const.
10537         (opts): New options "--force-aead".
10538         (main): Set new option.
10539         * g10/encrypt.c (use_aead): New.
10540         (encrypt_simple): Implement new flags DEK.use_aead.
10541         (encrypt_crypt): Ditto.
10542         (encrypt_filter): Ditto.
10543         * g10/sign.c (sign_symencrypt_file): Ditto.
10544
10545         gpg: Add option and preference framework for AEAD.
10546         + commit 8217cd49364b9f81b390f7ca6a608dd946f93efc
10547         * common/openpgpdefs.h (aead_algo_t): New.
10548         (SIGSUBPKT_PREF_AEAD): New.
10549         * g10/gpg.c (oAEADAlgo, oPersonalAEADPreferences): New.
10550         (opts): New options --aead-algo and --personal-aead-preferences.
10551         (set_compliance_option): Clar aead algo.
10552         (main): Parse and check the new options
10553         * g10/options.h (struct opt): Add fields def_aead_algo and
10554         personal_aead_prefs.
10555         * g10/packet.h (PREFTYPE_AEAD): New enum value.
10556         (PKT_user_id): Add field flags.aead.
10557         (PKT_public_key): Add field flags.aead.
10558         * g10/pkclist.c (select_algo_from_prefs): Support PREFTYPE_AEAD.
10559         * g10/getkey.c (fixup_uidnode): Set AEAD flag.
10560         (merge_selfsigs): Ditto.
10561         * g10/kbnode.c (dump_kbnode): Show aead flag.
10562         * g10/keyedit.c (show_prefs): Ditto.
10563         (show_key_with_all_names_colon): Ditto.
10564         * g10/keygen.c (aead_presf, n_aead_prefs): New vars.
10565         (set_one_pref): Suppport PREFTYPE_AEAD.
10566         (keygen_set_std_prefs): Parse AEAD preferences.
10567         (keygen_get_std_prefs): Ditto.
10568         (add_feature_aead): New.
10569         (keygen_upd_std_prefs): Call that and build AEAD pref  packet.
10570         * g10/main.h (DEFAULT_AEAD_ALGO): New const.
10571         * g10/misc.c (openpgp_aead_test_algo): New.
10572         (openpgp_aead_algo_name): New.
10573         (string_to_aead_algo): New.
10574         (default_aead_algo): New.
10575
10576 2018-01-09  Andre Heinecke  <aheinecke@intevation.de>
10577
10578         doc: Note pinentry-mode for passphrase opts.
10579         + commit 6fb5713f4a6976900cc70c140e61043b6ef688d1
10580         * doc/gpg.texi (--passphrase, --passphrase-file, --passphrase-fd):
10581         Note that pinentry-mode needs to be loopback.
10582
10583 2018-01-08  Werner Koch  <wk@gnupg.org>
10584
10585         gpg: Print all keys with --decrypt --list-only.
10586         + commit 339b3301ee8410fe3bbdebb66a6e83801d79d40d
10587         * g10/mainproc.c (proc_pubkey_enc): Use dedicated error code for
10588         list-only and put the key into PKENC_LIST.
10589         (print_pkenc_list): Take care of the new error code.
10590
10591 2018-01-01  Werner Koch  <wk@gnupg.org>
10592
10593         gpg: Allow "futuredefault" as alias for "future-default".
10594         + commit 4d3c500f4793eb263940ff5ef87ec4ead63c9b4b
10595         * g10/keygen.c (parse_key_parameter_string): Allow "futuredefault" and
10596         use case-insensitive matching
10597         (quick_generate_keypair): Ditto.
10598         (parse_algo_usage_expire): Ditto.
10599
10600 2017-12-29  Werner Koch  <wk@gnupg.org>
10601
10602         gpg: Allow the use of "cv25519" and "ed25519" in the keygen parms.
10603         + commit 412bb7a801f242d47a82712080cce6ddbb843166
10604         * g10/keygen.c (gen_ecc): Map curve names.
10605
10606 2017-12-27  NIIBE Yutaka  <gniibe@fsij.org>
10607
10608         scd: Fix for inactive card at start by internal CCID driver.
10609         + commit 4f88b0f56134af2ce56d434b7acd47fcf9b6f7cf
10610         * scd/ccid-driver.c (do_close_reader): Set NULL on close.
10611         (bulk_in): Move DEBUGOUT and check by EP_INTR.
10612         (ccid_get_atr): Clear powered_off flag after initial status check.
10613
10614 2017-12-22  Werner Koch  <wk@gnupg.org>
10615
10616         kbx: Simplify by removing custom memory functions.
10617         + commit f3ba66781a07af2e32f5887e6e15acdd4822a431
10618         * kbx/keybox-util.c (keybox_set_malloc_hooks): Remove.
10619         (_keybox_malloc, _keybox_calloc, keybox_realloc)
10620         (_keybox_free): Remove.
10621         (keybox_file_rename): Remove.  Was not used.
10622         * sm/gpgsm.c (main): Remove call to keybox_set_malloc_hooks.
10623         * kbx/kbxutil.c (main): Ditto.
10624         * kbx/keybox-defs.h: Remove all separate includes.  Include util.h.
10625         remove convenience macros.
10626         * common/logging.h (return_if_fail): New.  Originally from
10627         keybox-defs.h but now using log_debug.
10628         (return_null_if_fail): Ditto.
10629         (return_val_if_fail): Ditto.
10630         (never_reached): Ditto.
10631
10632 2017-12-20  Werner Koch  <wk@gnupg.org>
10633
10634         common: Use larger buffer for homedir in case of 64 bit UIDs.
10635         + commit 290348e349e8d56a856f187a08e913f2ed525b3c
10636         * common/homedir.c (_gnupg_socketdir_internal): Enlarge PREFIX by 6
10637         bytes for "/gnupg".
10638
10639         Release 2.2.4.
10640         + commit 558b17593ae97b8a07d06bf0d6af1a626b304501
10641
10642
10643 2017-12-19  Petr Pisar  <petr.pisar@atlas.cz>
10644
10645         po: Update Czech translation.
10646         + commit 43aaf60449036e870cc25b77fbb7312cf3fb534c
10647
10648
10649 2017-12-19  Ineiev  <ineiev@gnu.org>
10650
10651         po: Update Russian translation.
10652         + commit c7b8ec6c8e57797f0b77dbf7fca85fb600323328
10653
10654
10655 2017-12-19  Werner Koch  <wk@gnupg.org>
10656
10657         wks: New server options --check, --with-dir, with-file.
10658         + commit 7449063b1af2eef73d621a69cdb2fb713ab1ae6c
10659         * tools/gpg-wks-server.c (aCheck, oWithDir, oWithFile): New const.
10660         (opts): New options --check, --with-dir, and --with-file.
10661         (main): Call command_check_key.
10662         (command_list_domains): Implement option --with-dir.
10663         (fname_from_userid): New.
10664         (command_check_key): New.
10665         (command_remove_key): Implement existsing command.
10666         (command_revoke_key): Call command_remove_key as a simple
10667         implementation.
10668
10669 2017-12-18  Werner Koch  <wk@gnupg.org>
10670
10671         conf: New option --status-fd.
10672         + commit 482e000b8a7e336f342a7fac3b7379257e944b6e
10673         * tools/gpgconf.c (oStatusFD): New const.
10674         (opts): New option --status-fd.
10675         (statusfp): New var.
10676         (set_status_fd): New.
10677         (gpgconf_write_status): New.
10678         (gpgconf_failure): New.
10679         (main): Set status fd and replace exit by gpgconf_failure.
10680         * tools/gpgconf-comp.c: Repalce exit by gpgconf_failure.
10681         (gc_process_gpgconf_conf): Print a few warning status messages.
10682
10683         gpgconf: Show --compliance in expert mode.
10684         + commit d74c40cef0a97cd98aa05f13b1541a94eda502a6
10685         * tools/gpgconf-comp.c (gc_options_gpg): Set compliance to expert.
10686         (gc_options_gpgsm): Ditto.
10687
10688         sm: Allow explicit setting of the default --compliance=gnupg.
10689         + commit 8c878ae4c9dfa9fe26aa15f4f9db3e86833575e9
10690         * sm/gpgsm.c (main): Allow setting of the default compliance.
10691         * tools/gpgconf-comp.c (gc_options_gpgsm): Add "compliance".
10692
10693 2017-12-18  NIIBE Yutaka  <gniibe@fsij.org>
10694
10695         po: Update Japanese translation.
10696         + commit e3ddeff66e8c08a37ddf8b6510d69579c245e192
10697         * po/ja.po: Fix message with no "%s".
10698
10699         po: Update Japanese translation.
10700         + commit 77e2fcb4ffbad8577a2cf41f17bf92dec6a93ad8
10701         * po/ja.po: Fix message with no "%s".
10702
10703 2017-12-13  Werner Koch  <wk@gnupg.org>
10704
10705         gpg: Print a warning for too much data encrypted with 3DES et al.
10706         + commit 416cf9e9be5d2daf0ef629208031989699b3653f
10707         * g10/filter.h (cipher_filter_context_t): Remove unused filed
10708         'create_mdc'.  Turn field 'header' into a bit field.  Add new fields
10709         'short_blklen_warn' and 'short_blklen_count'.
10710         * g10/cipher.c (write_header): Print a warning if MDC is not used.
10711         (cipher_filter): Print a warning for long messages encrypted with a
10712         short block length algorithm.
10713
10714         gpg: Simplify cipher:write_header.
10715         + commit b5333e13cbc9db354ed90762190bf70605a02d1f
10716         * g10/cipher.c (write_header): Use write_status_printf.
10717
10718         gpg: Simplify default_recipient().
10719         + commit 9f641430dcdecbd7ee205d407cb19bb4262aa95d
10720         * g10/pkclist.c (default_recipient): Use hexfingerprint.
10721
10722         gpg: Return an error from hexfingerprint on malloc error.
10723         + commit cd26c5482b10bee7658959ae913f2ddb83190587
10724         * g10/keyid.c (hexfingerprint): Return NULL on malloc failure.  Chnage
10725         all callers.
10726
10727         gpg: Remove some xmallocs.
10728         + commit 29119a6492eda5dd7920e45e7f2faa043d436591
10729         * g10/getkey.c (get_pubkeys): Do not use xmalloc.
10730
10731 2017-12-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
10732
10733         gpg: default-preference-list: prefer SHA512.
10734         + commit 8ede3ae29a39641a2f98ad9a4cf61ea99085a892
10735         * g10/keygen.c (keygen_set_std_prefs): when producing default internal
10736         personal-digest-preferences, keep the same order.  When publishing
10737         external preferences, state preference for SHA512 first.
10738
10739 2017-12-12  Werner Koch  <wk@gnupg.org>
10740
10741         Change backlog from 5 to 64 and provide option --listen-backlog.
10742         + commit c81a447190d2763ac4c64b2e74e22e824da8aba3
10743         * agent/gpg-agent.c (oListenBacklog): New const.
10744         (opts): New option --listen-backlog.
10745         (listen_backlog): New var.
10746         (main): Parse new options.
10747         (create_server_socket): Use var instead of 5.
10748         * dirmngr/dirmngr.c: Likewise.
10749         * scd/scdaemon.c: Likewise.
10750
10751         build: New configure option --enable-run-gnupg-user-socket.
10752         + commit 17efcd2a2acdc3b7f00711272aa51e5be2476921
10753         * configure.ac: (USE_RUN_GNUPG_USER_SOCKET): New ac_define.
10754         * common/homedir.c (_gnupg_socketdir_internal): Add extra directories.
10755
10756 2017-12-11  Werner Koch  <wk@gnupg.org>
10757
10758         dirmngr: Check for WKD support at session end.
10759         + commit 20b52be9ca29b0bc843fc68a279cb72728ede72f
10760         * dirmngr/domaininfo.c (insert_or_update): Copy the name.
10761         * dirmngr/misc.c (copy_stream): Allow arg OUT to be NULL.
10762         * dirmngr/server.c (set_error): Protect CTX.
10763         (dirmngr_status): Protect against missing ASSUAN_CTX.
10764         (dirmngr_status_help): Ditto.
10765         (dirmngr_status_printf): Ditto.
10766         (cmd_wkd_get): Factor code out to ...
10767         (proc_wkd_get): new func.  Support silent operation with no CTX.
10768         (task_check_wkd_support): New.
10769
10770         dirmngr: Add a background task framework.
10771         + commit f2997adee0455c8c0fa391a853ec1b0c9fc43342
10772         * dirmngr/workqueue.c: New.
10773         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new file.
10774         * dirmngr/server.c (server_local_s): New field session_id.
10775         (cmd_wkd_get): Add a task.
10776         (task_check_wkd_support): New stub function.
10777         (cmd_getinfo): New sub-commands "session_id" and "workqueue".
10778         (start_command_handler): Add arg session_id and store it in
10779         SERVER_LOCAL.
10780         (dirmngr_status_helpf): New.
10781         * dirmngr/dirmngr.h (wqtask_t): New type.
10782         * dirmngr/dirmngr.c (main): Pass 0 as session_id to
10783         start_command_handler.
10784         (start_connection_thread): Introduce a session_id and pass it to
10785         start_command_handler.  Run post session tasks.
10786         (housekeeping_thread): Run global workqueue tasks.
10787
10788         dirmngr: Limit the number of cached domains for WKD.
10789         + commit 7a663c296e687f12ccd9a21d414de780feb4dfcf
10790         * dirmngr/domaininfo.c (MAX_DOMAINBUCKET_LEN): New.
10791         (insert_or_update): Limit the length of a bucket chain.
10792         (domaininfo_print_stats): Print just one summary line.
10793
10794         (cherry picked from commit 26f08343fbccdbaa177c3507a3c5e24a5cf94a2d)
10795
10796         dirmngr: Keep track of domains used for WKD queries.
10797         + commit 6c1dcd79cf0977844179d9a7b189c10af5e42a7e
10798         * dirmngr/domaininfo.c: New file.
10799         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
10800         * dirmngr/server.c (cmd_wkd_get): Check whether the domain is already
10801         known and tell domaininfo about the results.
10802
10803         Adjust for changed macro names in libgpg-error master.
10804         + commit 34defc9bce91d66fa8c9481ebe6e78b612e570dc
10805         * common/logging.h (GPGRT_LOGLVL_): New replacement macros for older
10806         libgpg-error versions.
10807
10808 2017-12-08  NIIBE Yutaka  <gniibe@fsij.org>
10809
10810         agent: Fix description of shadow format.
10811         + commit 5c121d44443b0a96ec6ea82b90717e3dbafd2cc5
10812         * agent/keyformat.txt, agent/protect.c, agent/t-protect.c: Fix.
10813
10814 2017-12-07  Werner Koch  <wk@gnupg.org>
10815
10816         build: Do not define logging.h constants for libgpg-error dev versions.
10817         + commit 2fedf8583bcc493f587c90bc9632d25dfd10bd10
10818         * common/logging.h [GPGRT_LOG_WITH_PREFIX]: Do not define the log
10819         constants.
10820
10821 2017-12-07  NIIBE Yutaka  <gniibe@fsij.org>
10822
10823         agent: Change intialization of assuan socket system hooks.
10824         + commit b9677ba16f6b386896781a751e4b2fc839e3ec81
10825         * agent/gpg-agent.c (initialize_modules): Add hook again.
10826         (main): Remove setting of the system houk but add scoket system hook
10827         setting after assuan initialization.
10828
10829 2017-12-06  NIIBE Yutaka  <gniibe@fsij.org>
10830
10831         agent: Set assuan system hooks before call of assuan_sock_init.
10832         + commit 1524ba9656f0205d8c6ef504f773b832a7a12ab9
10833         * agent/gpg-agent.c (initialize_modules): Move assuan_set_system_hooks.
10834         (main): ... here, just before assuan_sock_init.
10835
10836 2017-12-04  NIIBE Yutaka  <gniibe@fsij.org>
10837             Damien Goutte-Gattat  <dgouttegattat@incenp.org>
10838
10839         g10: Fix regexp sanitization.
10840         + commit 0d0b9eb0d4f99e8d293a4ce4b90921a879905115
10841         * g10/trustdb.c (sanitize_regexp): Only escape operators.
10842
10843 2017-11-27  Werner Koch  <wk@gnupg.org>
10844
10845         Use the gpgrt log functions if possible.
10846         + commit b56dfdfc1865ceb7c3c025d79996e049faee7fdf
10847         * common/logging.c: Do not build any code if we can use the gpgrt_log
10848         functions.
10849         (log_logv_with_prefix): Rename to log_logv_prefix and change order of
10850         args so that this function matches its printf like counterpart
10851         gpgrt_logv_prefix.  Change all callers.
10852         (log_debug_with_string): Rename to log_debug_string. Change all
10853         callers.
10854         (log_printhex): Move first arg to end so that this function matches
10855         its printf like counterpart gpgrt_log_printhex.  Change all callers.
10856         * common/logging.h: Divert to gpgrt/libgpg-error if we can use the
10857         gpgrt_log functions.
10858         (bug_at): Add inline versions if we can use the gpgrt_log functions.
10859         * configure.ac (GPGRT_ENABLE_LOG_MACROS): Add to AH_BOTTOM.
10860         (mycflags): Add -Wno-format-zero-length.
10861
10862 2017-11-26  Werner Koch  <wk@gnupg.org>
10863
10864         gpg: Do not read from uninitialized memory with --list-packets.
10865         + commit 4cf3cc6e3d48c8400466ca29c3f1c22ed2da6c2c
10866         * g10/parse-packet.c (parse_plaintext): Fill up the allocated NAME.
10867
10868 2017-11-24  Werner Koch  <wk@gnupg.org>
10869
10870         agent: New option --auto-expand-secmem.
10871         + commit 18af15249de5f826c3fa8d1d40e876734adcd0cf
10872         * agent/gpg-agent.c (oAutoExpandSecmem): New enum value.
10873         (opts): New option --auto-expand-secmem.
10874         (main): Implement that option.
10875
10876 2017-11-22  Werner Koch  <wk@gnupg.org>
10877
10878         gpg: Fix memory leaking for long inputs via --command-fd.
10879         + commit ea28ea18f3ee6c9f5e69986f39848398b58e242e
10880         * g10/cpr.c (do_get_from_fd): Free the old buffer.
10881
10882 2017-11-21  NIIBE Yutaka  <gniibe@fsij.org>
10883
10884         scd: Enable card removal check after select_application.
10885         + commit 0bb7fd0cab2d53cd0d44b21301b23edfe817e66b
10886         * scd/apdu.c (open_ccid_reader): Fix error handling of ccid_get_atr.
10887         * scd/app.c (select_application): Always kick the loop if new APP.
10888         * scd/ccid-driver.c (ccid_open_usb_reader): Don't setup at open.
10889         (ccid_slot_status): Setup interrupt transfer when !ON_WIRE.
10890
10891 2017-11-20  Werner Koch  <wk@gnupg.org>
10892
10893         Release 2.2.3.
10894         + commit 97f4feaaca8da4dcf1ca09a2016693155016f06b
10895
10896
10897         build: Use -Werror only for the check.
10898         + commit 04d9833e71cc9d0c087faec091c29b0b6cf69488
10899         * configure.ac: Do not add -Werror to mycflags.
10900
10901         gpg-agent: Avoid getting stuck in shutdown pending state.
10902         + commit 7ffedfab8909a45a4b0347a5f7b52222e8439f1d
10903         * agent/gpg-agent.c (handle_connections): Always check inotify fds.
10904
10905 2017-11-20  NIIBE Yutaka  <gniibe@fsij.org>
10906
10907         agent: Use clock or clock_gettime for calibration.
10908         + commit 760aa8aadafb747f33a1461ab0c2570b5ae43716
10909         * agent/protect.c (calibrate_get_time): Use clock or clock_gettime.
10910
10911         build: Check -Wlogical-op flag availability with -Werror.
10912         + commit 3ecd1a41be7c880976987d13e88342c98f37e064
10913         * configure.ac: Use -Werror.
10914
10915         build: BSD make support for yat2m.
10916         + commit e1984969cac06a88c7e6f5e49e5c3104d10a847d
10917         * configure.ac (YAT2M): Only define when found.
10918         * doc/Makefile.am: Portability fix.
10919
10920 2017-11-17  Werner Koch  <wk@gnupg.org>
10921
10922         dirmngr: Fix double free of a hash context in the error case.
10923         + commit 2aa106d6a4e2b09c257e8d769895d93ebb7f7edf
10924         * dirmngr/crlcache.c: Clearly document that this fucntions takes
10925         ownership of MD.
10926         (abort_sig_check): Allow NULL for MD.
10927         (crl_parse_insert): Immediately set MD to NULL.  Remove check for md
10928         before a calling abort_sig_check.
10929
10930 2017-11-15  Werner Koch  <wk@gnupg.org>
10931
10932         assuan: Fix exponential decay for first second.
10933         + commit 0cfdd3b57d592fb6baa7dafe8fde124e8a6c7798
10934         * common/asshelp.c (wait_for_sock): Round SECSLEFT.
10935         * dirmngr/dirmngr.c (main): Take care of --debug-wait also in dameon
10936         mode.
10937         * common/sysutils.c (gnupg_usleep) [HAVE_NANOSLEEP]: Fix nanosleep use.
10938
10939         common: Change log_clock to printf style.
10940         + commit 8704304699bcbc1c10d0315ec7d25a1ae05c9905
10941         * common/logging.c (log_clock): Use do_logv.
10942
10943         common: Tweak new code to keep already translated strings.
10944         + commit 4a7fe9a596b639a0edb08502f20cb293129e5a33
10945         * common/asshelp.c (wait_for_sock): Replace NAME by WHICH and adjust
10946         caller.  Revert to use the former strings.
10947
10948 2017-11-15  Andre Heinecke  <aheinecke@intevation.de>
10949
10950         w32: Fix default registry path.
10951         + commit 4f5afaf1fdb5cb13859aca390ccb5a1ba1dba00c
10952         * configure.ac (GNUPG_REGISTRY_DIR): Remove leading backslash.
10953
10954 2017-11-15  Werner Koch  <wk@gnupg.org>
10955
10956         gpg: Repurpose the ISO defined DO "sex" to "salutation".
10957         + commit 166f3f9ec40888e10cb0c51017944bfc57503fc1
10958         * g10/card-util.c (current_card_status): String changes.
10959         (change_sex): Description change.
10960         (cmds): Add "salutation"; keep "sex" as an alias.
10961
10962 2017-11-15  Andre Heinecke  <aheinecke@intevation.de>
10963
10964         gpgtar: Prefer --set-filename over implicit name.
10965         + commit 878b8bfdcc3a8becfc46b9287a2d14cd3c875f28
10966         * tools/gpgtar-extract.c: Prefer opt.filename over filename
10967         for the directory prefix.
10968
10969 2017-11-15  Werner Koch  <wk@gnupg.org>
10970
10971         gpg: Print AKL info only in verbose mode.
10972         + commit b062ea5bc25157c942047b3fe7f5182a06106340
10973         * g10/getkey.c (get_pubkey_byname): Print info only in verbose mode.
10974
10975 2017-11-14  Werner Koch  <wk@gnupg.org>
10976
10977         dirmngr: Check for WKD support at session end.
10978         + commit d4e2302d8f4a1ff52d56da4f8e3a5d1c6303822d
10979         * dirmngr/domaininfo.c (insert_or_update): Copy the name.
10980         * dirmngr/misc.c (copy_stream): Allow arg OUT to be NULL.
10981         * dirmngr/server.c (set_error): Protect CTX.
10982         (dirmngr_status): Protect against missing ASSUAN_CTX.
10983         (dirmngr_status_help): Ditto.
10984         (dirmngr_status_printf): Ditto.
10985         (cmd_wkd_get): Factor code out to ...
10986         (proc_wkd_get): new func.  Support silent operation with no CTX.
10987         (task_check_wkd_support): New.
10988
10989         dirmngr: Add a background task framework.
10990         + commit 96a4fbecd1acf946dcde20bef4752c539dae196b
10991         * dirmngr/workqueue.c: New.
10992         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new file.
10993         * dirmngr/server.c (server_local_s): New field session_id.
10994         (cmd_wkd_get): Add a task.
10995         (task_check_wkd_support): New stub function.
10996         (cmd_getinfo): New sub-commands "session_id" and "workqueue".
10997         (start_command_handler): Add arg session_id and store it in
10998         SERVER_LOCAL.
10999         (dirmngr_status_helpf): New.
11000         * dirmngr/dirmngr.h (wqtask_t): New type.
11001         * dirmngr/dirmngr.c (main): Pass 0 as session_id to
11002         start_command_handler.
11003         (start_connection_thread): Introduce a session_id and pass it to
11004         start_command_handler.  Run post session tasks.
11005         (housekeeping_thread): Run global workqueue tasks.
11006
11007 2017-11-14  Andre Heinecke  <aheinecke@intevation.de>
11008
11009         sm, w32: Fix initial keybox creation.
11010         + commit 5ecef193bc2144e6d51a6bd5727bfd08a0d28b66
11011         * sm/keydb.c (maybe_create_keybox): Open new keybox in bin mode.
11012
11013 2017-11-14  Werner Koch  <wk@gnupg.org>
11014
11015         dirmngr: Limit the number of cached domains for WKD.
11016         + commit 26f08343fbccdbaa177c3507a3c5e24a5cf94a2d
11017         * dirmngr/domaininfo.c (MAX_DOMAINBUCKET_LEN): New.
11018         (insert_or_update): Limit the length of a bucket chain.
11019         (domaininfo_print_stats): Print just one summary line.
11020
11021 2017-11-13  Werner Koch  <wk@gnupg.org>
11022
11023         dirmngr: Keep track of domains used for WKD queries.
11024         + commit 65038e6852185c20413d8f6602218ee636413b77
11025         * dirmngr/domaininfo.c: New file.
11026         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
11027         * dirmngr/server.c (cmd_wkd_get): Check whether the domain is already
11028         known and tell domaininfo about the results.
11029
11030         gpg-agent: Avoid getting stuck in shutdown pending state.
11031         + commit 5d83eb9226c0ce608ec284d8c9bc22ce84a00c25
11032         * agent/gpg-agent.c (handle_connections): Always check inotify fds.
11033
11034 2017-11-13  NIIBE Yutaka  <gniibe@fsij.org>
11035
11036         tests: Handle the case with DISABLE_REGEX.
11037         + commit 80b904543486a2f12087bc34a6049ede4eb75940
11038         * tests/openpgp/Makefile.am [DISABLE_REGEX] (EXTRA_DIST, XTESTS):
11039           Conditionalize.
11040         * tests/openpgp/all-tests.scm (all-tests): Input file is Makefile.
11041
11042 2017-11-13  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
11043
11044         tests: Run the trust-pgp-4 test again.
11045         + commit a1fe3708d0894c138f6dd75d2a6bd22c64359172
11046         * tests/openpgp/Makefile.am (XTESTS): Add trust-pgp-4.scm.
11047         (EXTRA_DIST): Remove the test file from EXTRA_DIST.
11048
11049 2017-11-09  NIIBE Yutaka  <gniibe@fsij.org>
11050             Damien Goutte-Gattat  <dgouttegattat@incenp.org>
11051
11052         g10: Fix regexp sanitization.
11053         + commit ccf3ba92087e79abdeaa0208795829b431c6f201
11054         * g10/trustdb.c (sanitize_regexp): Only escape operators.
11055
11056 2017-11-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11057
11058         assuan: Use exponential decay for first 1s of spinlock.
11059         + commit 149041b0b917f4298239fe18b5ebd5ead71584a6
11060         * common/asshelp.c (wait_for_sock): instead of checking the socket
11061         every second, we check 10 times in the first second (with exponential
11062         decay).
11063
11064         assuan: Reorganize waiting for socket.
11065         + commit 0471ff9d3bf8d6b9a359f3c426d70d0935066907
11066         * common/asshelp.c (wait_for_sock): New function, collecting
11067         codepaths from...
11068         (start_new_gpg_agent) here and...
11069         (start_new_dirmngr) here.
11070
11071 2017-11-07  Werner Koch  <wk@gnupg.org>
11072
11073         Release 2.2.2.
11074         + commit 5bd515005032f9340bd73e4346bbd0aef8518074
11075
11076
11077         dirmngr: Reduce default LDAP timeout to 15 seconds.
11078         + commit 30f21f8b0fa6844a9bba3f24dc41b3ac32170109
11079         * dirmngr/dirmngr.c (DEFAULT_LDAP_TIMEOUT): Change to 15.
11080         * dirmngr/dirmngr_ldap.c (DEFAULT_LDAP_TIMEOUT): Ditto.
11081
11082         (cherry picked from commit ab7ac827041b5cd97bbca7a75b0930072dd6611f)
11083
11084         dirmngr: Reduce default LDAP timeout to 15 seconds.
11085         + commit ab7ac827041b5cd97bbca7a75b0930072dd6611f
11086         * dirmngr/dirmngr.c (DEFAULT_LDAP_TIMEOUT): Change to 15.
11087         * dirmngr/dirmngr_ldap.c (DEFAULT_LDAP_TIMEOUT): Ditto.
11088
11089         speedo: Include software versions in the W32 README.
11090         + commit 23bfac6d1a8bd2d0af5a6fac3ba3a6e986d6c9e8
11091         (cherry picked from commit f9f72ffbfa9fd7d1a7a1823697d116d76155b407)
11092
11093 2017-11-07  Ineiev  <ineiev@gnu.org>
11094
11095         po: Update Russian translation.
11096         + commit 1941287c9d2c9e666bad1bd330db169f0e3d6b6c
11097
11098
11099 2017-11-07  Werner Koch  <wk@gnupg.org>
11100
11101         speedo: Include software versions in the W32 README.
11102         + commit f9f72ffbfa9fd7d1a7a1823697d116d76155b407
11103
11104
11105 2017-11-07  NIIBE Yutaka  <gniibe@fsij.org>
11106
11107         po: Update Japanese translation.
11108         + commit 96d441b315ec5c9f329596cfda28ac13a8bfa21a
11109
11110
11111         agent: Use clock or clock_gettime for calibration.
11112         + commit 380bce13d94ff03c96e39ac1d834f382c5c730a1
11113         * agent/protect.c (calibrate_get_time): Use clock or clock_gettime.
11114
11115 2017-11-06  Werner Koch  <wk@gnupg.org>
11116
11117         tests: Minor imporvement in agent invocation.
11118         + commit 42308224d1fce64c666aed2be5eb4ef42e8aced4
11119         * tests/openpgp/defs.scm (create-gpghome): Add s2k-count.
11120
11121         agent: New GETINFO sub-commands "s2k_count_cal" and "s2k_time".
11122         + commit 3607ab2cf382296cb398a92d5ec792239960bf7b
11123         * agent/command.c (cmd_getinfo): New sub-commands.
11124         * agent/protect.c (get_standard_s2k_count): Factor some code out to ...
11125         (get_calibrated_s2k_count): new.
11126         (get_standard_s2k_time): New.
11127
11128         (cherry picked from commit 52d41c8b0f4af6278d18d8935399ddad16a26856)
11129
11130         agent: New option --s2k-count.
11131         + commit 78a6d0ce88ae14d8324fbab3aee3286b17e49259
11132         * agent/agent.h (opt): New field 's2k_count'.
11133         * agent/gpg-agent.c (oS2KCount): New enum value.
11134         (opts): New option --s2k-count.
11135         (parse_rereadable_options): Set opt.s2k_count.
11136
11137         agent: New GETINFO sub-commands "s2k_count_cal" and "s2k_time".
11138         + commit 52d41c8b0f4af6278d18d8935399ddad16a26856
11139         * agent/command.c (cmd_getinfo): New sub-commands.
11140         * agent/protect.c (get_standard_s2k_count): Factor some code out to ...
11141         (get_calibrated_s2k_count): new.
11142         (get_standard_s2k_time): New.
11143
11144         agent: New option --s2k-count.
11145         + commit f7212f1d11aad5d910d2c77b2e5c6ab31a0e786e
11146         * agent/agent.h (opt): New field 's2k_count'.
11147         * agent/gpg-agent.c (oS2KCount): New enum value.
11148         (opts): New option --s2k-count.
11149         (parse_rereadable_options): Set opt.s2k_count.
11150
11151 2017-11-06  NIIBE Yutaka  <gniibe@fsij.org>
11152
11153         g10: Unattended key generation "Key-Grip" and "Subkey-Grip".
11154         + commit 680161647ad56d1ca92988f80bcc4d6fcb20b1eb
11155         * g10/keygen.c (pSUBKEYGRIP): New.
11156         (read_parameter_file): Add "Key-Grip" and "Subkey-Grip".
11157         (do_generate_keypair): Support pSUBKEYGRIP.
11158
11159         g10: Simplify "factory-reset" procedure.
11160         + commit f183b9768b42a6792c55a6129488bd8fbf5e8e6d
11161         * g10/card-util.c (factory_reset): Simplify.
11162
11163 2017-11-02  Ineiev  <ineiev@gnu.org>
11164
11165         po: Update Russian translation.
11166         + commit 6070f5a61d4d17ff437c69e1b708d49d107c22dc
11167
11168
11169 2017-11-02  Werner Koch  <wk@gnupg.org>
11170
11171         gpg: Introduce magic value 25519 to switch a card to ECC.
11172         + commit acb300543422c660c87ac2f0211a42f792a65cc4
11173         * g10/card-util.c (ask_card_keyattr): Handle special value 25519.
11174         (do_change_keyattr): Allow changing to cv25519/ed25519.
11175         (generate_card_keys): Ditto.
11176         (card_generate_subkey): Ditto.
11177
11178         gpg: Rename two card related functions in card-util.
11179         + commit de3a740c2e1156e58d2f94faa85c051740c8988e
11180         * g10/card-util.c (ask_card_rsa_keysize): Rename to ask_card_keyattr.
11181         (do_change_rsa_keysize): Rename to do_change_keyattr.
11182
11183         gpg: Unifiy the message for re-configuring cards.
11184         + commit 922bae8082f2f8d696ea0e7d7e9e4d986789bdfc
11185         * g10/card-util.c (ask_card_keyattr): Print "rsaNNNN".
11186
11187         gpg: Introduce magic value 25519 to switch a card to ECC.
11188         + commit ea09b6cded9d31a8ebd91878553c3eaa2b76e817
11189         * g10/card-util.c (show_keysize_warning): Slightly change the text.
11190         (ask_card_keyattr): Handle special value 25519.
11191         (do_change_keyattr): Allow changing to cv25519/ed25519.
11192         (generate_card_keys): Ditto.
11193         (card_generate_subkey): Ditto.
11194
11195 2017-11-02  NIIBE Yutaka  <gniibe@fsij.org>
11196
11197         agent: Fix returning GPG_ERR_NOT_FOUND wrongly.
11198         + commit 3da47d19df89d302c0ea25921f4bd8ce55705afe
11199         * agent/learncard.c (agent_handle_learn): Find SERIALNO.
11200
11201         agent: Fix returning GPG_ERR_NOT_FOUND wrongly.
11202         + commit 5e96fe72e477d09e35ccee48af0fd9ab2b3ae409
11203         * agent/learncard.c (agent_handle_learn): Find SERIALNO.
11204
11205 2017-11-01  NIIBE Yutaka  <gniibe@fsij.org>
11206
11207         common: Accept the Z-suffix for yymmddThhmmssZ format.
11208         + commit 0e5bd473a07f188615c4fce26b73bb452d689d68
11209         * common/gettime.c (isotime_p): Accept the Z suffix.
11210
11211 2017-11-01  Werner Koch  <wk@gnupg.org>
11212
11213         gpg: Rename two card related functions in card-util.
11214         + commit f795f4529d8ab5a05db1cc1960abd34390bfae1b
11215         * g10/card-util.c (ask_card_rsa_keysize): Rename to ask_card_keyattr.
11216         (do_change_rsa_keysize): Rename to do_change_keyattr.
11217
11218 2017-11-01  NIIBE Yutaka  <gniibe@fsij.org>
11219
11220         g10: Unattended key generation "Key-Grip" and "Subkey-Grip".
11221         + commit 6c63a04569c07c9c2817c7c530a92ccfa58155cc
11222         * g10/keygen.c (pSUBKEYGRIP): New.
11223         (read_parameter_file): Add "Key-Grip" and "Subkey-Grip".
11224         (do_generate_keypair): Support pSUBKEYGRIP.
11225
11226 2017-10-30  NIIBE Yutaka  <gniibe@fsij.org>
11227
11228         g10: Simplify "factory-reset" procedure.
11229         + commit d63b7966cdd72548c60466c620de5cd6104a779e
11230         * g10/card-util.c (factory_reset): Simplify.
11231
11232 2017-10-27  NIIBE Yutaka  <gniibe@fsij.org>
11233
11234         agent: Clean up pinentry access locking.
11235         + commit 3924e1442c6625a2b57573a1a634a5ec56b09a29
11236         * agent/agent.h (struct server_control_s): Rename PINENTRY_ACTIVE.
11237         * agent/call-pinentry.c (entry_owner): Remove.
11238         (agent_reset_query): Use thread private object of PINENTRY_ACTIVE.
11239         (unlock_pinentry): Add CTRL to arguments to access thread private.
11240         Check and decrement PINENTRY_ACTIVE for recursive use.
11241         (start_pinentry): Check and increment PINENTRY_ACTIVE for recursion.
11242         (agent_askpin): Follow the change of unlock_pinentry API.
11243         (agent_get_passphrase, agent_get_confirmation): Likewise.
11244         (agent_show_message, agent_popup_message_start): Likewise.
11245         (agent_popup_message_stop, agent_clear_passphrase): Likewise.
11246
11247         agent: Allow recursive use of pinentry.
11248         + commit 4738256f2e0d22302377c9ec7b2ae3999338e6c6
11249         * agent/agent.h (struct server_control_s): Add pinentry_level.
11250         * agent/call-pinentry.c (agent_popup_message_stop): Not clear
11251         ENTRY_CTX here.
11252         (unlock_pinentry): Handle recursion.  Clear ENTRY_CTX here.
11253         (start_pinentry): Allow recursive use.
11254
11255         agent: Clean up pinentry access locking.
11256         + commit fb7828676cc2c01047498898378711e049f73fee
11257         * agent/agent.h (struct server_control_s): Rename PINENTRY_ACTIVE.
11258         * agent/call-pinentry.c (entry_owner): Remove.
11259         (agent_reset_query): Use thread private object of PINENTRY_ACTIVE.
11260         (unlock_pinentry): Add CTRL to arguments to access thread private.
11261         Check and decrement PINENTRY_ACTIVE for recursive use.
11262         (start_pinentry): Check and increment PINENTRY_ACTIVE for recursion.
11263         (agent_askpin): Follow the change of unlock_pinentry API.
11264         (agent_get_passphrase, agent_get_confirmation): Likewise.
11265         (agent_show_message, agent_popup_message_start): Likewise.
11266         (agent_popup_message_stop, agent_clear_passphrase): Likewise.
11267
11268 2017-10-26  NIIBE Yutaka  <gniibe@fsij.org>
11269
11270         agent: Allow recursive use of pinentry.
11271         + commit 3b66a256e3760e88066ca11b7b49d924e42aa46b
11272         * agent/agent.h (struct server_control_s): Add pinentry_level.
11273         * agent/call-pinentry.c (agent_popup_message_stop): Not clear
11274         ENTRY_CTX here.
11275         (unlock_pinentry): Handle recursion.  Clear ENTRY_CTX here.
11276         (start_pinentry): Allow recursive use.
11277
11278         agent, tests: Support --disable-scdaemon build case.
11279         + commit 05cb87276c21c3a47226c75026fa46a955553dd9
11280         * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON.
11281         * tests/openpgp/defs.scm (create-gpghome): Likewise.
11282         * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise.
11283
11284         Fix comment of configure.
11285         + commit b13972dfbf7224478652038725ab0d2cb41b7303
11286         * configure.ac (BUILD_WITH_DIRMNGR): Comment fix.
11287
11288         agent, tests: Support --disable-scdaemon build case.
11289         + commit bf26c08b95389718ba07f12789d372c6f438134f
11290         * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON.
11291         * tests/openpgp/defs.scm (create-gpghome): Likewise.
11292         * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise.
11293
11294         Fix comment of configure.
11295         + commit 3549dce4f5a726f5350ac2f20d83ba9f84cc23b4
11296         * configure.ac (BUILD_WITH_DIRMNGR): Comment fix.
11297
11298 2017-10-24  Werner Koch  <wk@gnupg.org>
11299
11300         gpg: Avoid superfluous sig check info during import.
11301         + commit 84af859e391a757877c9a1d78e35face983e6d23
11302         * g10/key-check.c (print_info): New.
11303         (key_check_all_keysigs): Print sig checking results only in debug
11304         mode.  Prettify the stats info and suppress them in quiet mode.
11305
11306         build: New configure option --enable-werror.
11307         + commit 812fe29bff42cf7dbd07e0becc55b2ada340dd97
11308         * configure.ac: Implement that option.
11309
11310         build: Do not mess with CFLAGS in configure.
11311         + commit e417aaf69817fcb4a73c38077853dc940a2deabc
11312         * configure.ac: Do not mess with the user provided CFLAGS.
11313
11314 2017-10-24  Rainer Perske  <rainer.perske@uni-muenster.de>
11315
11316         sm: Do not expect X.509 keyids to be unique.
11317         + commit 1067403c8a7fb51decf30059e46901b5ee9f5b37
11318         * sm/certlist.c (gpgsm_find_cert): Add arg allow_ambiguous and use it.
11319         * sm/call-dirmngr.c (inq_certificate): Pass true to ALLOW_AMBIGUOUS
11320         (run_command_inq_cb): Ditto.
11321         * sm/gpgsm.c (main): Pass false.
11322         * sm/server.c (cmd_passwd): Pass false.
11323
11324 2017-10-24  Werner Koch  <wk@gnupg.org>
11325
11326         gpgconf: Ignore non-installed components with --apply-profile.
11327         + commit 6e808ae4700dc5e95bf4cc2d5c063df582c234d0
11328         * tools/gpgconf-comp.c (retrieve_options_from_program): Add arg
11329         only_installed.
11330         (gc_component_retrieve_options): Use this if we want to process all
11331         components.
11332
11333         gpg: Improve the "secret key available" notice in keyedit.c.
11334         + commit 560d85ecff4246133d185dc29395f07c918b5556
11335         * g10/keyedit.c (KEYEDIT_NEED_SUBSK): New.
11336         (cmds): Add this flag to keytocard, bkuptocard, expire, and passwd.
11337         (keyedit_menu): Check whether only subkeys are available and take care
11338         of that in the command check and in the HELP listing.  Also print a
11339         different notice if only subkeys are available.
11340
11341         gpg: Remove unused flags from keyedit.c.
11342         + commit 016538d82867c40a21bc7cbf44ec386f4699077f
11343         * g10/keyedit.c (KEYEDIT_NOT_SK, KEYEDIT_ONLY_SK): Remove.
11344         (cmds): Remove them.
11345
11346 2017-10-19  Werner Koch  <wk@gnupg.org>
11347
11348         gpg: Fix creating on-disk subkey with on-card primary key.
11349         + commit 44fb3fbc85b32552c91f32f099b6b246c12ce0cc
11350         * g10/keygen.c (generate_subkeypair): Ignore error code issued for
11351         trying to verify a card based key.
11352
11353         gpg: Print sec/sbb with --import-option import-show or show-only.
11354         + commit 2c7dccca9b617780a3ea760adf460bb3b77f90f3
11355         * g10/import.c (import_one): Pass FROM_SK to list_keyblock_direct.
11356
11357         gpg: Make --dry-run and show-only work for secret keys.
11358         + commit 68c8619114fd5f24cb6bfb9e0f25c428a8805323
11359         * g10/import.c (import_secret_one): Check for dry-run before
11360         transferring keys.
11361
11362 2017-10-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
11363
11364         dirmngr: Do not follow https-to-http redirects.
11365         + commit 1ba308aa0356a57c21c4c8c2dac75b4d62b8aac3
11366         * dirmngr/ks-engine-http.c (ks_http_fetch): Forbid redirects from
11367         a https URI to a http URI.
11368
11369 2017-10-19  NIIBE Yutaka  <gniibe@fsij.org>
11370
11371         g10: Fix find_and_check_key for multiple keyrings.
11372         + commit d07de3862710d88bc80d6f6c5ca8da5cf38ff0eb
11373         * g10/pkclist.c (find_and_check_key): Call get_validity on a specific
11374         keyblock.
11375
11376 2017-10-19  Werner Koch  <wk@gnupg.org>
11377
11378         gpg: Keep a lock during the read-update/insert cycle in import.
11379         + commit 7c73db3d31c6457dfbdc82a8dc89951c023f0603
11380         * g10/keydb.c (keydb_handle): New field 'keep_lock'.
11381         (keydb_release): Clear that flag.
11382         (keydb_lock): New function.
11383         (unlock_all): Skip if KEEP_LOCK is set.
11384         * g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if
11385         requested.
11386
11387         gpg: Improve keydb handling in the main import function.
11388         + commit 8448347b5bdee56e6f9938a93ea92fe4d3c8800c
11389         * g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ...
11390         (get_keyblock_byfprint_fast): .. new function.
11391         * g10/import.c (revocation_present): s/int rc/gpg_error_t err/.
11392         (import_one): Use get_keyblock_byfprint_fast to get the keyblock and a
11393         handle.  Remove the now surplus keyblock fetch in the merge branch.
11394
11395         gpg: Simplify keydb handling of the main import function.
11396         + commit 752cae6dd2ee8982a34c796a3f168ae538f7938c
11397         * g10/import.c (import_keys_internal): Return gpg_error_t instead of
11398         int.  Change var names.
11399         (import_keys_es_stream): Ditto.
11400         (import_one): Ditto.  Use a single keydb_new and simplify the use of
11401         of keydb_release.
11402
11403         sm: Fix colon listing of fields > 12 in crt records.
11404         + commit 1bf5cbd3ef01b7f5fdcfa30c882047b924dcf3f0
11405         * sm/keylist.c (print_capabilities): Move colon printing ...
11406         (list_cert_colon): to here.
11407
11408 2017-10-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11409
11410         agent: Send pinentry the uid of connecting process where possible.
11411         + commit 28aa6890588cc108639951bb4bef03ac17743046
11412         * agent/agent.h (server_control_s): Add field 'client_uid'.
11413         * agent/call-pinentry.c (start_pinentry): Add uid field to assuan
11414         option "owner" sent to pinentry.
11415         * agent/command-ssh.c (peer_info_s): New static struct.
11416         (get_client_pid): Rename to...
11417         (get_client_info): Here, and extract uid in addition to pid.
11418         (start_command_handler_ssh): Use get_client_info() instead of
11419         get_client_pid().
11420         * agent/command.c (start_command_handler): Try assuan_get_peercred,
11421         and only fall back to assuan_get_pid when assuan_get_peercred fails.
11422
11423 2017-10-19  NIIBE Yutaka  <gniibe@fsij.org>
11424
11425         g10: Fix find_and_check_key for multiple keyrings.
11426         + commit 995c46ea77cff5b99b2fca17b547d6525a4f227e
11427         * g10/pkclist.c (find_and_check_key): Call get_validity on a specific
11428         keyblock.
11429
11430 2017-10-18  Werner Koch  <wk@gnupg.org>
11431
11432         gpg: Keep a lock during the read-update/insert cycle in import.
11433         + commit 645f30ad310a518a863eb7bd3e11251a7e7f2eca
11434         * g10/keydb.c (keydb_handle): New field 'keep_lock'.
11435         (keydb_release): Clear that flag.
11436         (keydb_lock): New function.
11437         (unlock_all): Skip if KEEP_LOCK is set.
11438         * g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if
11439         requested.
11440
11441         gpg: Improve keydb handling in the main import function.
11442         + commit 3bb06531d38b85be295308e826a50a1a7ba935ec
11443         * g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ...
11444         (get_keyblock_byfprint_fast): .. new function.
11445         * g10/import.c (revocation_present): s/int rc/gpg_error_t err/.
11446         (import_one): Use get_keyblock_byfprint_fast to get the keyblock and a
11447         handle.  Remove the now surplus keyblock fetch in the merge branch.
11448
11449         gpg: Simplify keydb handling of the main import function.
11450         + commit d353287f721ffb56627d55bef04cc770ff0a8681
11451         * g10/import.c (import_keys_internal): Return gpg_error_t instead of
11452         int.  Change var names.
11453         (import_keys_es_stream): Ditto.
11454         (import_one): Ditto.  Use a single keydb_new and simplify the use of
11455         of keydb_release.
11456
11457         gpg: Fix wrong Tofu DB consistency check.
11458         + commit 18e5946aef458cd95fdce4a04e144747b52b0472
11459         * g10/tofu.c (build_conflict_set): Do not assume MAX_FINGERPRINT_LEN
11460         is the size of the fingerprint.
11461
11462 2017-10-17  Werner Koch  <wk@gnupg.org>
11463
11464         gpg,sm: New option --with-key-screening.
11465         + commit 825abec0e7f38667a34dce3025fc2f3a05001dde
11466         * common/pkscreening.c: New.
11467         * common/pkscreening.h: New.
11468         * common/Makefile.am (common_sources): Add them.
11469         * g10/gpg.c (opts): New option --with-key-screening.
11470         * g10/options.h (struct opt): New field with_key_screening.
11471         * g10/keylist.c: Include pkscreening.h.
11472         (print_pk_screening): New.
11473         (list_keyblock_print): Call it.
11474         (print_compliance_flags): Call it.
11475         * sm/gpgsm.c (opts): New option --with-key-screening.
11476         * sm/gpgsm.h (scruct opt): New field with_key_screening.
11477         * sm/keylist.c:  Include pkscreening.h.
11478         (print_pk_screening): New.
11479         (print_compliance_flags): Call it.  Add new arg cert.
11480         (list_cert_colon): Pass arg cert
11481         (list_cert_std): Call print_pk_screening.
11482         * sm/fingerprint.c (gpgsm_get_rsa_modulus): New.
11483
11484         sm: Fix colon listing of fields > 12 in crt records.
11485         + commit 69e579d78545aee5096a5d170e1cb9e511a09a90
11486         * sm/keylist.c (print_capabilities): Move colon printing ...
11487         (list_cert_colon): to here.
11488
11489 2017-10-06  Neal H. Walfield  <neal@g10code.com>
11490
11491         gpg: Fix comparison.
11492         + commit 1ed21eee79749b976b4a935f2279b162634e9c5e
11493         * g10/gpgcompose.c (literal_name): Complain if passed zero arguments,
11494         not one or fewer.
11495
11496 2017-09-28  Werner Koch  <wk@gnupg.org>
11497
11498         gpg: Workaround for junk after --trusted-key.
11499         + commit b509d81cab030cca6abf0d878e1fc884eda344e6
11500         * g10/trust.c (register_trusted_key): Cut off everthing starting as a
11501         hash sign.
11502
11503 2017-09-27  Werner Koch  <wk@gnupg.org>
11504
11505         gpg: Prepare for a longer fingerprint.
11506         + commit ecbbafb88d920e713439b6b1b8e1b41a6f8d0e38
11507         * g10/card-util.c (change_cafpr): Use MAX_FINGERPRINT_LEN.
11508         * g10/cipher.c (write_header): Use snprintf.
11509         * g10/gpg.h (MAX_FINGERPRINT_LEN): Change to 32.
11510         (MAX_FORMATTED_FINGERPRINT_LEN): Change to 59
11511         * g10/keyid.c (format_hexfingerprint): Add v5 fingerprint format.
11512         * g10/tofu.c (get_policy): Use MAX_FINGERPRINT_LEN for the buffer but
11513         keep the raw length for now.
11514
11515         common: Add constant KEYGRIP_LEN.
11516         + commit 76c80021d4da0755dbb04bd5d42f32015cba0b9a
11517         * common/util.h (KEYGRIP_LEN): New.
11518         * g10/call-agent.c (agent_probe_any_secret_key): Use that constant.
11519         * g10/keyid.c (keygrip_from_pk): Ditto.
11520
11521         gpg: Let --debug clock time sign and verify.
11522         + commit 6aa4478c78cb34cf3d0ae5c752525110947bd247
11523         * configure.ac (ENABLE_LOG_CLOCK): New ac_define and option.
11524         * common/logging.c (log_clock): Use ENABLE_LOG_CLOCK to enable
11525         timestamp printing.
11526         * g10/call-agent.c (agent_pksign): Time signing.
11527         * g10/sig-check.c (check_signature_end_simple): Time verification.
11528
11529 2017-09-26  NIIBE Yutaka  <gniibe@fsij.org>
11530
11531         g10: Select a secret key by checking availability under gpg-agent.
11532         + commit 0a76611294998ae34b9d9ebde484ef8ad3a9a3a6
11533         * g10/getkey.c (finish_lookup): Add WANT_SECRET argument to confirm
11534         by agent_probe_secret_key.
11535         (get_pubkey_fromfile, lookup): Supply WANT_SECRET argument.
11536
11537 2017-09-20  NIIBE Yutaka  <gniibe@fsij.org>
11538
11539         agent: Fix cancellation handling for scdaemon.
11540         + commit 9f5e50e7c85aa8b847d38010241ed570ac114fc3
11541         * agent/call-scd.c (cancel_inquire): Remove.
11542         (agent_card_pksign, agent_card_pkdecrypt, agent_card_writekey)
11543         (agent_card_scd): Don't call cancel_inquire.
11544
11545         scd: Distinguish cancel by user and protocol error.
11546         + commit 2396055c096884d521c26b76f26263a146207c24
11547         * scd/apdu.h (SW_HOST_CANCELLED): New.
11548         * scd/apdu.c (host_sw_string): Support SW_HOST_CANCELLED.
11549         (pcsc_error_to_sw): Return SW_HOST_CANCELLED for PCSC_E_CANCELLED.
11550         * scd/iso7816.c (map_sw): Return GPG_ERR_INV_RESPONSE for
11551         SW_HOST_ABORTED and GPG_ERR_CANCELED for SW_HOST_CANCELLED.
11552
11553 2017-09-19  NIIBE Yutaka  <gniibe@fsij.org>
11554
11555         common: Accept the Z-suffix for yymmddThhmmssZ format.
11556         + commit ba8afc4966cca1f6aaf9b2a9bfc3220782306c2b
11557         * common/gettime.c (isotime_p): Accept the Z suffix.
11558
11559 2017-09-19  Werner Koch  <wk@gnupg.org>
11560
11561         Release 2.2.1.
11562         + commit 355ca9e9498740fb6294eec451507b4891ae01ec
11563
11564
11565 2017-09-19  NIIBE Yutaka  <gniibe@fsij.org>
11566
11567         common: Fix gnupg_wait_processes.
11568         + commit eeb3da6eb717ed6a1a1069a7611eb37503e8672d
11569         * common/exechelp-posix.c (gnupg_wait_processes): Loop for r_exitcodes
11570         even if we already see an error.
11571
11572 2017-09-18  Werner Koch  <wk@gnupg.org>
11573
11574         dirmngr: Use system certs if --hkp-cacert is not used.
11575         + commit df692a6167be5486f9a29da003a00292fd895176
11576         * dirmngr/certcache.c (any_cert_of_class): New var.
11577         (put_cert): Set it.
11578         (cert_cache_deinit): Clear it.
11579         (cert_cache_any_in_class): New func.
11580         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Add hack to
11581         override empty list of HKP certs.
11582
11583         wks: Create a new user id if provider wants mailbox-only.
11584         + commit 50c8b6c88f5d9f4b6c4e9c03aee31fe29afa94b8
11585         * tools/gpg-wks-client.c (get_key): Add arg 'exact'.
11586         (add_user_id): New.
11587         (command_send): Create new user id.
11588
11589         wks: Send only the newest UID to the server.
11590         + commit 7f7f5d06fa5aa3a3c5ab8d2e59ee76207bfdeaa0
11591         * tools/wks-util.c (list_key_status_cb): Rename to key_status_cb.
11592         (wks_filter_uid): New.
11593         (wks_list_key): Allow FPR to be NULL.  Return an error if no
11594         fingerprint was found.
11595         * tools/gpg-wks-server.c (process_new_key)
11596         (check_and_publish): Remove now useless extra check for FPR.
11597         * tools/gpg-wks-client.c (command_check): Ditto.
11598         (command_send): Filter out the newest uid.
11599
11600         wks: Print the UID creation time with gpg-wks-client --check.
11601         + commit a0035986a8615df056182bb9af775b8b7b22003d
11602         * tools/gpg-wks.h (uidinfo_list_s): Add field 'created'.
11603         * tools/wks-util.c (append_to_uidinfo_list): Add arf 'created'.
11604         (wks_list_key): Pass timestamp to append_to_uidinfo_list.
11605         * tools/gpg-wks-client.c (command_check): Print UID creation time.
11606
11607         wks: Use dedicated type to convey user ids.
11608         + commit 4e0696de897cac6a34d55a69d8889faf26f1a923
11609         * tools/gpg-wks.h (uidinfo_list_s, uidinfo_list_t): New.
11610         * tools/wks-util.c (append_to_uidinfo_list): New.
11611         (free_uidinfo_list): New.
11612         (wks_list_key): Change arg r_mboxes to uidinfo_list_t.  Use
11613         append_to_uidinfo_list.
11614         * tools/gpg-wks-server.c (sserver_ctx_s): Replace strlist_t by
11615         uidinfo_list_t.
11616         (process_new_key): Ditto.
11617         (check_and_publish): Ditto.
11618         (command_receive_cb): Replace free_strlist by free_uidinfo_list.
11619         * tools/gpg-wks-client.c (command_check): Replace strlist_t by
11620         uidinfo_list_t.  Also print user id in verbose mode.
11621
11622 2017-09-13  Werner Koch  <wk@gnupg.org>
11623
11624         gpgv: Initialize compliance checker.
11625         + commit 006ca124ed95845d43af8c14d7ab2bc085b47b4c
11626         * g10/gpgv.c (main): Call gnupg_initialize_compliance.
11627
11628 2017-09-12  Werner Koch  <wk@gnupg.org>
11629
11630         wks: Add hack for the broken posteo system.
11631         + commit a821b4f5567d02c3329c2b94a73dcbe12e6699a2
11632         * tools/gpg-wks-client.c (command_send): Additional hack for posteo.
11633         Check the protocol-version flag.
11634
11635         wks: Add new policy flag protocol-version.
11636         + commit 332c9eaa2a3c7cae90b389cdaa2c149c5595fb4d
11637         * tools/gpg-wks.h (policy_flags_s): Add field protocol_version.
11638         * tools/wks-util.c (wks_parse_policy): Add new policy flag.
11639
11640         gpg: Fix "Fix key generation with only an email part".
11641         + commit 8b5a2474f21dd4f1aa2a283e2f57d75e42742af5
11642         * g10/keygen.c (proc_parameter_file): Don't check the result of
11643         stpcpy.
11644
11645         wks: Use unencrypted draft-1 mode for posteo.de.
11646         + commit c65a7bba7331975d20910f90cf648b6ecc5410f0
11647         * tools/gpg-wks-client.c (command_send): Allow sending in draft-1
11648         mode.
11649
11650         tools: New function mime_maker_add_body_data.
11651         + commit 7d15ee88980f88ca62fc7de9492dd08e54d0f0f1
11652         * tools/mime-maker.c (mime_maker_add_body_data): New.
11653
11654 2017-09-11  Alon Bar-Lev  <alon.barlev@gmail.com>
11655
11656         sm: Move qualified.txt from datadir into sysconfdir.
11657         + commit 384a3748d9022b7ae3f629c13f92e204565fea3d
11658         * doc/Makefile.am: Move qualified.txt into examples.
11659         * doc/qualified.txt: Move into examples, remove trailing spaces.
11660         * doc/examples/README: Document qualified.txt.
11661         * doc/gpgsm.texi: Move qualified.txt from datadir into sysconfdir.
11662         * sm/qualified.c (read_list): Move qualified.txt from datadir into
11663         sysconfdir.
11664
11665 2017-09-11  NIIBE Yutaka  <gniibe@fsij.org>
11666
11667         tests: Fix a test which specifies expiration date.
11668         + commit a172759b5088ae086c0caa2e7d4d0ea346b28a90
11669         * tests/openpgp/quick-key-manipulation.scm: Fix expiration time
11670         comparison.
11671
11672         scd: Fix for large ECC keys.
11673         + commit 827abe01a72a50eab1cdcde78985b42a4a8480fb
11674         * scd/app-openpgp.c (do_decipher): Support larger length.
11675
11676 2017-09-11  Werner Koch  <wk@gnupg.org>
11677
11678         gpg: Fix key generation with only an email part.
11679         + commit 7089dcc54099a4909ce7d386c07ab87e1398e2eb
11680         * g10/keygen.c (proc_parameter_file): Special case the email only
11681         case.
11682
11683 2017-09-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11684
11685         agent: compile-time configuration of s2k calibration.
11686         + commit 926d07c5fa05de05caef3a72b6fe156606ac0549
11687         * configure.ac: add --with-agent-s2k-calibration=MSEC, introduces
11688         AGENT_S2K_CALIBRATION (measured in milliseconds)
11689         * agent/protect.c (calibrate_s2k_count): Calibrate based on
11690         AGENT_S2K_CALIBRATION.
11691
11692         gpg: default to AES-256.
11693         + commit 73ff075204df09db5248170a049f06498cdbb7aa
11694         * g10/main.h (DEFAULT_CIPHER_ALGO): Prefer AES256 by default.
11695
11696         gpg: default to 3072-bit RSA keys.
11697         + commit 909fbca19678e6e36968607e8a2348381da39d8c
11698         * agent/command.c (hlp_genkey): update help text to suggest the use of
11699         3072 bits.
11700         * doc/wks.texi: Make example match default generation.
11701         * g10/keygen.c (DEFAULT_STD_KEY_PARAM): update to
11702         rsa3072/cert,sign+rsa3072/encr, and fix neighboring comment,
11703         (gen_rsa, get_keysize_range): update default from 2048 to 3072).
11704         * g10/keyid.c (pubkey_string): update comment so that first example
11705         is the default 3072-bit RSA.
11706
11707         gpgsm: default to 3072-bit keys.
11708         + commit 7955262151a5c755814dd23414e6804f79125355
11709         * doc/gpgsm.texi, doc/howto-create-a-server-cert.texi: : update
11710         default to 3072 bits.
11711         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): update default to
11712         3072 bits.
11713         * sm/certreqgen.c (proc_parameters): update default to 3072 bits.
11714         * sm/gpgsm.c (main): print correct default_pubkey_algo.
11715
11716 2017-09-08  NIIBE Yutaka  <gniibe@fsij.org>
11717
11718         tests: Fix a test which specifies expiration date.
11719         + commit 17f764dd4972a063fe09c4b9d2846e8efcb25c7a
11720         * tests/openpgp/quick-key-manipulation.scm: Fix expiration time
11721         comparison.
11722
11723 2017-08-29  NIIBE Yutaka  <gniibe@fsij.org>
11724
11725         scd: Fix for large ECC keys.
11726         + commit ff7ccd284c327a5b1c89603f157089177dac9d13
11727         * scd/app-openpgp.c (do_decipher): Support larger length.
11728
11729 2017-08-28  Werner Koch  <wk@gnupg.org>
11730
11731         Release 2.2.0.
11732         + commit 9d80fb8e000189e61c173c39f1e1ca417566a7fc
11733
11734
11735 2017-08-27  Werner Koch  <wk@gnupg.org>
11736             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
11737
11738         scd: Convey the correct length for Le.
11739         + commit 45d5f5800afe6613f338a26f361cb5e03e861129
11740         * scd/app-openpgp.c (determine_rsa_response): Round bits up.
11741
11742 2017-08-24  Werner Koch  <wk@gnupg.org>
11743
11744         gpg: Fix memory leak while running --check-trustdb.
11745         + commit 13821e15fb9bdddfce79d88731c0f151724b2371
11746         * g10/trustdb.c (update_min_ownertrust): Free PK.
11747
11748         gpg: Fix memory leak in sig-check.
11749         + commit b065a696344eac3007dbd5642143ecaaeebab43a
11750         * g10/sig-check.c (check_signature_over_key_or_uid): Remove useless
11751         condition.  Actually free when SIGNER was allocated by us.
11752
11753         build: Remove obsolete option from autogen.rc.
11754         + commit 02a5df614a369519ad7781f95dc977e24a0d4277
11755         * autogen.rc: Remove --enable-gpg2-is-gpg.
11756
11757 2017-08-23  Werner Koch  <wk@gnupg.org>
11758
11759         gpgconf: Swap "auto-key-retrieve" and "no-auto-key-retrieve".
11760         + commit 565e486b8028f9e3cc51ebc5202666b598042175
11761         * g10/gpg.c (gpgconf_list): Announce "auto-key-retrieve".
11762         (main): Simplify setting of KEYSERVER_AUTO_KEY_RETRIEVE.
11763         * tools/gpgconf-comp.c: Make "no-auto-key-retrieve" invisible.  Make
11764         "auto-key-retrieve" an expert option.
11765
11766         tests: Do not run trust-pgp-4.scm.
11767         + commit b917cb66b79597520788cd9264889942247a3377
11768         * tests/openpgp/Makefile.am (XTESTS): Remove test.
11769         (EXTRA_DIST): Add test file.
11770
11771         build: Change SWDB tag "gnupg21" to "gnupg22".
11772         + commit 008ae0bd868cb49ad4d67fc8c71707cd2a162137
11773         * configure.ac (GNUPG_SWDB_TAG): New ac_define.  Set it to "gnupg22".
11774         * tools/gpgconf.c (query_swdb): Use it.
11775         * build-aux/speedo.mk: Change tag "gnupg21" to "gnupg22".
11776         * Makefile.am (distcheck-hook): Ditto.
11777
11778 2017-08-23  Åka Sikrom  <a4@hush.com>
11779
11780         po: Update Norwegian translation.
11781         + commit fd0e5b60bed1cfc2aed7b2e13cc449f355eac051
11782
11783
11784 2017-08-23  Andre Heinecke  <aheinecke@intevation.de>
11785
11786         agent: Fix string translation for Windows.
11787         + commit 6158811304937b592601ef30c29c5a5cdbaa88ea
11788         * agent/agent.h (L_): Define agent_Lunderscore when simple
11789         gettext is used.
11790
11791 2017-08-22  NIIBE Yutaka  <gniibe@fsij.org>
11792
11793         po: Update Japanese translation.
11794         + commit e6fa6b0ce823effd721c807b2b292287af91c642
11795
11796
11797 2017-08-21  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
11798
11799         tests: Add tests for the PGP trust model.
11800         + commit c23a69970ba38edae9d3b2603825d18fbb732423
11801         * tests/openpgp/trust-pgp-1.scm: New file.
11802         * tests/openpgp/trust-pgp-2.scm: New file.
11803         * tests/openpgp/trust-pgp-3.scm: New file.
11804         * tests/openpgp/trust-pgp-4.scm: New file.
11805         * tests/openpgp/trust-pgp/common.scm: New file.
11806         * tests/openpgp/trust-pgp/scenario1.asc: New file.
11807         * tests/openpgp/trust-pgp/scenario2.asc: New file.
11808         * tests/openpgp/trust-pgp/scenario3.asc: New file.
11809         * tests/openpgp/trust-pgp/scenario4.asc: New file.
11810         * tests/openpgp/trust-pgp/alice.sec.asc: New file.
11811         * tests/openpgp/trust-pgp/bobby.sec.asc: New file.
11812         * tests/openpgp/trust-pgp/carol.sec.asc: New file.
11813         * tests/openpgp/trust-pgp/david.sec.asc: New file.
11814         * tests/openpgp/trust-pgp/frank.sec.asc: New file.
11815         * tests/openpgp/trust-pgp/grace.sec.asc: New file.
11816         * tests/openpgp/trust-pgp/heidi.sec.asc: New file.
11817         * tests/openpgp/Makefile.am (XTESTS): Add new tests.
11818         (TEST_FILES): Add new files.
11819         (EXTRA_DIST): Add new common file.
11820
11821         tests: Move some functions into a common module.
11822         + commit cbe54b28bf3610204e12c50c0606df37337a1156
11823         * tests/openpgp/tofu.scm (gettrust): Moved to the common defs.scm
11824         module.
11825         (checktrust): Likewise.
11826         * tests/openpgp/defs.scm (gettrust): New function.
11827         (checktrust): Likewise.
11828
11829         gpgconf: Make WoT settings configurable by gpgconf.
11830         + commit 0161225457e0609509d0d5f4b80a60a1071b4b48
11831         * tools/gpgconf-comp.c (gc_options_gpg): Add max-cert-depth,
11832         completes-needed, and marginals-needed options.
11833         * g10/gpg.c (gpgconf_list): Likewise.
11834
11835 2017-08-21  Justus Winter  <justus@g10code.com>
11836
11837         gpgscm: Fix -Wimplicit-fallthrough warnings.
11838         + commit 6e596b2a745ae7a75a69038cf00ab4bbae1cebaa
11839         * tests/gpgscm/scheme.c (CASE): Rearrange so that the case statement
11840         is at the front.
11841         (Eval_Cycle): Improve fallthrough annotations.
11842
11843 2017-08-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11844
11845         gpg: default to --no-auto-key-retrieve.
11846         + commit e6f84116abca2ed49bf14b2e28c3c811a3717227
11847         * g10/gpg.c (main): remove KEYSERVER_AUTO_KEY_RETRIEVE from the
11848         default keyserver options.
11849         * doc/gpg.texi: document this change.
11850
11851 2017-08-10  Justus Winter  <justus@g10code.com>
11852
11853         tests: Improve documentation.
11854         + commit 23107ba20f8b4eb5482b480ad6a8af6b39d2bfeb
11855         * tests/openpgp/README: Add quickstart instructions, how to use
11856         shell.scm, remove no longer used MKDATA.
11857
11858 2017-08-09  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
11859
11860         g10: Write status error on error of --quick-revoke-uid.
11861         + commit 977fc5f0eb9fdee19e66bea8cd2eb5414789b485
11862         * g10/keyedit.c (keyedit_quick_revuid): Write status error on error.
11863
11864 2017-08-09  Werner Koch  <wk@gnupg.org>
11865
11866         Release 2.1.23.
11867         + commit e8ffa9a6ca5d76660b67207cd1157068e48483de
11868
11869
11870         po: Update German translation.
11871         + commit 2059dbf201963c6f229698ae80c6c774b1f686c8
11872
11873
11874 2017-08-08  Werner Koch  <wk@gnupg.org>
11875
11876         build: New configure option --enable-all-tests.
11877         + commit fb21aa8b50367e2afa13bad73fc21d6f01a97e18
11878         * configure.ac: New option --enable-all-tests.
11879         * tests/gpgscm/ffi.c (ffi_init): New gloabl var *run-all-tests*.
11880         * tests/openpgp/all-tests.scm (all-tests): Use that var instead
11881         of *maintainer-mode*.
11882         * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Add --enable-all-tests.
11883
11884         gpgscm: Make the test summary stand out.
11885         + commit 0bd19dae1161a71053d794e4f75e66f70445f9f0
11886         * tests/gpgscm/tests.scm (test-pool): Add delimiter lines.
11887
11888         sm: Always print the keygrip in colon mode.
11889         + commit 0a8e20c4c639f0c491e2af5ac5fb97005196422b
11890         * sm/keylist.c (list_cert_colon): Always print the keygrip as
11891         described in the manual.
11892
11893 2017-08-08  Justus Winter  <justus@g10code.com>
11894
11895         gpg: Add option '--disable-dirmngr'.
11896         + commit c4506f624ed6854aa0ba1629aa2d1d43eb26900d
11897         * doc/gpg.texi: Document new option.
11898         * g10/call-dirmngr.c (create_context): Fail if option is given.
11899         * g10/gpg.c (cmd_and_opt_values): New value.
11900         (opts): New option.
11901         (gpgconf_list): Add new option.
11902         (main): Handle new option.
11903         * g10/options.h (struct opt): New field 'disable_dirmngr'.
11904         * tools/gpgconf-comp.c (gc_options_gpg): New option.
11905
11906 2017-08-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11907
11908         systemd-user: Drop redundant After=*.socket.
11909         + commit 81074c3b0211854a2dc94600dc892224201536f5
11910         * doc/examples/systemd-user/*.service: Drop redundant After=*.socket
11911         directive.
11912
11913         systemd-user: Drop RefuseManualStart=true.
11914         + commit 407da18254dfebcacfaee16952ef0b617b1626ea
11915         * doc/examples/systemd-user/*.service: drop RefuseManualStart=true
11916
11917 2017-08-07  Justus Winter  <justus@g10code.com>
11918
11919         tests: Do not run all tests unless in maintainer mode.
11920         + commit b0112dbca91e720a4ff622ad0e88d99eba56203a
11921         * configure.ac: Leak the maintainer mode flag into 'config.h'.
11922         * tests/gpgscm/ffi.c: Pass it into the scheme environment.
11923         * tests/openpgp/all-tests.scm: Only run tests against non-default
11924         configurations (keyring, extended-key-format) in maintainer mode.
11925
11926 2017-08-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11927
11928         Fix spelling.
11929         + commit a611cba142470c52f3303c512f77ae7d195cc41f
11930         * doc/gpg.texi: s/occured/occurred/
11931
11932         Simple typo fix.
11933         + commit f011d8763a009612c858a287cf7cc6a1f1a6d32a
11934         * agent/gpg-agent.c: Correct spelling in comment.
11935
11936 2017-08-05  Werner Koch  <wk@gnupg.org>
11937
11938         gpg: Install gpg by default under the name gpg.
11939         + commit a69464b0b6dac88b360a13d3faf19dd7f2a0e02b
11940         * configure.ac: Remove option --enable-gpg2-is-gpg.  Add option
11941         --enable-gpg-is-gpg2.
11942         * build-aux/speedo.mk (speedo_pkg_gnupg_configure): Remove
11943         --enable-gpg2-is-gpg.
11944
11945         gpg: gpgconf needs to support the now default --auto-key-retrieve.
11946         + commit 69e97d909d586160cc0631c9a6f4d3f24bb0c682
11947         * tools/gpgconf-comp.c (gc_options_gpg): Re-add "auto-key_retrieve".
11948
11949 2017-08-04  Werner Koch  <wk@gnupg.org>
11950
11951         gpg: Fix memory leak in parse_auto_key_locate.
11952         + commit b70e86fd1050fc6da07a177ed142ae9882b4dd0d
11953         * g10/getkey.c (parse_auto_key_locate): Fix freeing of OPTIONS.
11954
11955         tests: Adjust tests for changed --auto-key-locate default.
11956         + commit 0767eada1479c0fa9d4b75781a8c2afb67bdbf90
11957         * tests/openpgp/defs.scm (create-gpghome): Disable new defaults.
11958
11959         gpg: Make --no-auto-key-retrieve gpgconf-igurable.
11960         + commit 9bb13a0e819334681caca38c9074bd7bfc04e45e
11961         * g10/gpg.c (gpgconf_list): Print no-auto-key-retrieve instead of
11962         auto-key-retrieve.
11963         * tools/gpgconf-comp.c (gc_options_gpg): Replace auto-key-retrieve by
11964         no-auto-key-retrieve and chnage level from invisible to advanced.
11965
11966         gpg: Default to --auto-key-locate "local,wkd" and --auto-key-retrieve.
11967         + commit 7e1fe791d188b078398bf83c9af992cb1bd2a4b3
11968         * g10/gpg.c (main): Add KEYSERVER_AUTO_KEY_RETRIEVE to the default
11969         keyserver options.  Set the default for --auto-key-locate to
11970         "local,wkd".  Reset that default iff --auto-key-locate has been given
11971         in the option file or in the commandline.
11972         * g10/getkey.c (parse_auto_key_locate): Work on a copy of the arg.
11973
11974         agent: Make --no-grab the default.
11975         + commit 3d78ae4d3de08398fabae5821045a3a1da6dadbe
11976         * agent/gpg-agent.c (oGrab): New const.
11977         (opts): New option --grab.  Remove description for --no-grab.
11978         (parse_rereadable_options): Make --no-grab the default.
11979         (finalize_rereadable_options): Allow --grab to override --no-grab.
11980         (main) <gpgconflist>: Add "grab".
11981         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add "grab".
11982
11983         gpg: Avoid double fingerprint printing with import-show.
11984         + commit b54d75fb1dcfa2cebb3a2497b81ffb49acac2056
11985         * g10/import.c (import_one) <IMPORT_SHOW>: Take care of fingerprint
11986         options.
11987
11988         gpg: New import option show-only.
11989         + commit d9fabcc1989d7235ea0294874803295a30f8711b
11990         * g10/options.h (IMPORT_DRY_RUN): New.
11991         * g10/import.c (parse_import_options): Add "show-only".
11992         (import_one): use that as alternative to opt.dry_run.
11993
11994 2017-08-03  Werner Koch  <wk@gnupg.org>
11995
11996         wks: Allow gpg-wks-client --supported with just the domain name.
11997         + commit 6cba56d436b56ea5e60042144a8a75a2e80007c8
11998         * tools/gpg-wks-client.c (command_supported): Hack for missing local
11999         part.
12000
12001 2017-08-02  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12002
12003         g10: Always save standard revocation certificate in file.
12004         + commit dcfb01959802b27869528dda1d9a4f5e79574bb5
12005         * g10/revoke.c (gen_standard_revocation): Set opt.outfile to NULL
12006         temporarily to create certificate in right place.
12007
12008 2017-08-01  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12009
12010         Revert "g10: Always save standard revocation certificate in file."
12011         + commit 624cd2d0bf6cc6dd1b79654295dc76f5b2d6d70b
12012         This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.
12013
12014         g10: Always save standard revocation certificate in file.
12015         + commit ebc65ff459e6c228fb7406e375819a9fe5637abe
12016         * g10/main.h (open_outfile): New parameter NO_OUTFILE.
12017         * g10/openfile.c (open_outfile): New parameter NO_OUTFILE.  If given,
12018         never use opt.outfile.
12019         * g10/revoke.c (create_revocation): If FILENAME is true, also set
12020         NO_OUTFILE to true (for standard revocation certificates).
12021         * g10/dearmor.c, g10/encrypt.c, g10/export.c, g10/revoke.c,
12022         g10/sign.c: Adjust all other callers.
12023
12024         artwork: Add icons.
12025         + commit a8d0b8d2333ddab703d1e346e06c106eeeedfd53
12026         * artwork/icons/index.css: New file.
12027         * artwork/icons/index.html: New file.
12028         * artwork/icons/lock-12.png: New file.
12029         * artwork/icons/lock-128.png: New file.
12030         * artwork/icons/lock-16.png: New file.
12031         * artwork/icons/lock-24.png: New file.
12032         * artwork/icons/lock-256.png: New file.
12033         * artwork/icons/lock-32.png: New file.
12034         * artwork/icons/lock-48.png: New file.
12035         * artwork/icons/lock-64.png: New file.
12036         * artwork/icons/lock-wing-12.png: New file.
12037         * artwork/icons/lock-wing-128.png: New file.
12038         * artwork/icons/lock-wing-16.png: New file.
12039         * artwork/icons/lock-wing-24.png: New file.
12040         * artwork/icons/lock-wing-256.png: New file.
12041         * artwork/icons/lock-wing-32.png: New file.
12042         * artwork/icons/lock-wing-48.png: New file.
12043         * artwork/icons/lock-wing-64.png: New file.
12044         * artwork/icons/lock-wing.svg: New file.
12045         * artwork/icons/lock.svg: New file.
12046         * artwork/icons/wing-12.png: New file.
12047         * artwork/icons/wing-128.png: New file.
12048         * artwork/icons/wing-16.png: New file.
12049         * artwork/icons/wing-24.png: New file.
12050         * artwork/icons/wing-256.png: New file.
12051         * artwork/icons/wing-32.png: New file.
12052         * artwork/icons/wing-48.png: New file.
12053         * artwork/icons/wing-64.png: New file.
12054         * artwork/icons/wing.svg: New file.
12055
12056 2017-08-01  Werner Koch  <wk@gnupg.org>
12057
12058         gpg,sm: Error out on compliance mismatch while decrypting.
12059         + commit 4e117f206beb38287ddcd3251fb7baabadfbddbb
12060         * g10/pubkey-enc.c (get_session_key): Bail out if the algo is not
12061         allowed in the current compliance mode.
12062         * sm/decrypt.c (gpgsm_decrypt): Ditto.
12063
12064 2017-08-01  NIIBE Yutaka  <gniibe@fsij.org>
12065
12066         Simple typo fix.
12067         + commit fde9a8cc6c849fb21f3e6782dbd5c6bc863357eb
12068         * tools/rfc822parse.c: Fix.
12069
12070         po: Update Japanese translation.
12071         + commit 02b571947b9442604faa7509478cd8577c2c0b9c
12072
12073
12074 2017-07-31  Werner Koch  <wk@gnupg.org>
12075
12076         dirmngr,w32: Fix http connection timeout problem.
12077         + commit 482fd5758c1b7e1b33c4cb50656e586a3ae16815
12078         * dirmngr/http.c (connect_with_timeout) [W32]: Take care of EAGAIN.
12079
12080         Explain the "server is older than xxx warning".
12081         + commit 4ad5bc1b6d72483123963c894ee1412b2ceb99b4
12082         * g10/call-agent.c (warn_version_mismatch): Print a note on how to
12083         restart the servers.
12084         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
12085         * sm/call-agent.c (warn_version_mismatch): Ditto.
12086         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
12087
12088 2017-07-28  Werner Koch  <wk@gnupg.org>
12089
12090         Release 2.1.22.
12091         + commit 7d335ff496b129ee6f33c4ca25bd7a6631a4b590
12092
12093
12094         po: Update German translation.
12095         + commit 339f672dad94b4e0000fd2d3a1f272a4861c91c3
12096
12097
12098         agent: Make --ssh-fingerprint-digest re-readable.
12099         + commit 6c9899bede6ecb2ccf7336d12724090f36a6aa3d
12100         * agent/gpg-agent.c (main): Move oSSHFingerprintDigest to ...
12101         (parse_rereadable_options): here.
12102         (opts): Change its description.
12103         (main) <aGPGConfList>: Include this option.
12104         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add option at expert
12105         level.
12106
12107         gpg,sm: String changes for compliance diagnostics.
12108         + commit efe187e8a2b583defdcd9d4b96e3dc83f95bef0d
12109
12110
12111         agent: For OCB key files return Bad Passprase instead of Checksum Error.
12112         + commit 5cf95157c5db88dd599ac4d48f619782179b1438
12113         * agent/protect.c (do_decryption): Map error checksum to bad
12114         passpharse protection
12115
12116         * agent/call-pinentry.c (unlock_pinentry): Don't munge the error
12117         source for corrupted protection.
12118
12119         gpg: Minor rework for better readibility of get_best_pubkey_byname.
12120         + commit 1c35e29af95c46475f297d2bd70a5f3bd49d45b1
12121         * g10/getkey.c (get_best_pubkey_byname): Change return type to
12122         gpg_error_t.  Use var name err instead of rc.  Move a
12123         gpg_error_from_syserror closer to the call.
12124
12125         gpg: Fix segv in get_best_pubkey_byname.
12126         + commit 6496dc1f9d2aef3bf8cf950da2434c96f7a0145c
12127         * g10/getkey.c (get_best_pubkey_byname): Init NEW.
12128
12129         agent: Minor cleanup (mostly for documentation).
12130         + commit 5516ef47a22dfdf9cdf56107f34d2bda9e46deec
12131         * agent/command.c (cmd_pksign): Change var name 'rc' to 'err'.
12132         * agent/findkey.c (read_key_file): Ditto.  Change return type to
12133         gpg_error_t.  On es_fessk failure return a correct error code.
12134         (agent_key_from_file): Change var name 'rc' to 'err'.
12135         * agent/pksign.c (agent_pksign_do): Ditto.  Change return type to
12136         gpg_error_t.  Return a valid erro code on malloc failure.
12137         (agent_pksign): Ditto.  Change return type to gpg_error_t.  replace
12138         xmalloc by xtrymalloc.
12139         * agent/protect.c (calculate_mic): Change return type to gpg_error_t.
12140         (do_decryption): Ditto.  Do not init RC.
12141         (merge_lists): Change return type to gpg_error_t.
12142         (agent_unprotect): Ditto.
12143         (agent_get_shadow_info): Ditto.
12144
12145 2017-07-27  Werner Koch  <wk@gnupg.org>
12146
12147         gpg: Tweak compliance checking for verification.
12148         + commit 6502bb0d2af5784918ebb74242fff6f0a72844bf
12149         * common/compliance.c (gnupg_pk_is_allowed): Rework to always allow
12150         verification.
12151         * g10/mainproc.c (check_sig_and_print): Print a con-compliant warning.
12152         * g10/sig-check.c (check_signature2): Use log_error instead of
12153         log_info.
12154
12155         gpg,sm: Allow encryption (with warning) to any key in de-vs mode.
12156         + commit 1bd22a85b4f06324037b3500d2fa8af62733c926
12157         * g10/encrypt.c (encrypt_crypt): Do not abort for a non-compliant key.
12158         * sm/encrypt.c (gpgsm_encrypt): Ditto.
12159
12160         gpg,sm: Fix compliance checking for decryption.
12161         + commit a0d0cbee7654ad7582400efaa92d493cd8e669e9
12162         * common/compliance.c (gnupg_pk_is_compliant): Remove the Elgamal
12163         signing check.  We don't support Elgamal signing at all.
12164         (gnupg_pk_is_allowed) <de-vs>: Revert encryption/decryption for RSA.
12165         Check the curvenames for ECDH.
12166         * g10/pubkey-enc.c (get_session_key): Print only a warning if the key
12167         is not compliant.
12168         * sm/decrypt.c (gpgsm_decrypt): Ditto.  Use the same string as in gpg
12169         so that we have only one translation.
12170
12171         gpg: Avoid output to the tty during import.
12172         + commit fcb62fe20f45290bf95703ec3bf4d0b361fa4339
12173         * g10/key-check.c (key_check_all_keysigs): Add arg mode and change all
12174         output calls to use it.
12175         * g10/keyedit.c (keyedit_print_one_sig): Add arg fp and chnage all
12176         output calls to use it.
12177         (keyedit_menu): Adjust for changes.
12178         * g10/gpgcompose.c (keyedit_print_one_sig): Add dummy arg fp.
12179         * g10/import.c (import_one): Call key_check_all_keysigs with output to
12180         the log stream.
12181
12182 2017-07-26  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12183
12184         g10: Make sure exactly one fingerprint is output with --quick-gen-key.
12185         + commit 94eea0ed2c8b47cb0fe02b22cbe668705a5fe0d0
12186         * g10/keygen.c (do_generate_keypair): Only set fpr in
12187         list_keyblock_direct invocation if neither --fingerprint nor
12188         --with-fingerprints are given.
12189
12190 2017-07-26  Werner Koch  <wk@gnupg.org>
12191
12192         doc: Add man pages form gpg-wks-server and gpg-wks-client.
12193         + commit be636c3cfca178927b09ef4154c3e555d6f5b1c4
12194         * doc/wks.texi: New.
12195         * doc/gnupg.texi: Include wks.texi.
12196         * doc/Makefile.am (gnupg_TEXINFOS): Add wks.texi.
12197         (myman_pages): Add new man pages.
12198
12199         wks: Fix program names in the usage diagnostics.
12200         + commit c76398da5b15df2086f68bc26b7fde75219976c7
12201         * tools/gpg-wks-client.c (my_strusage): Add case 12.
12202         * tools/gpg-wks-server.c (my_strusage): Add case 12:
12203
12204 2017-07-26  Andre Heinecke  <aheinecke@intevation.de>
12205
12206         doc: Update vsnfd profile example.
12207         + commit 4f569c69075fddbaea588544a6625c28cb4cb8f4
12208         * doc/examples/vsnfd.prf: Use rsa3072
12209
12210 2017-07-26  Werner Koch  <wk@gnupg.org>
12211
12212         dirmngr: Do not use a blocking connect in Tor mode.
12213         + commit c5e5748480952e5bcedb16f6ce6ef7e435acb3c7
12214         * dirmngr/http.c (http_raw_connect): Disable the timeout in Tor mode.
12215         (send_request): Ditto.
12216
12217         dirmngr: Auto-enable Tor on startup or reload.
12218         + commit fd68bdb61ec4f8441da6d3023a8da4315df54cec
12219         * dirmngr/dirmngr.c (dirmngr_use_tor): Test for Tor availibility.
12220
12221         agent,dirmngr: Check for homedir removal also using stat(2).
12222         + commit d50c2eff8d6931586c527edb3dea98dbc6facdec
12223         * agent/gpg-agent.c (have_homedir_inotify): New var.
12224         (reliable_homedir_inotify): New var.
12225         (main):  Set reliable_homedir_inotify.
12226         (handle_tick): Call stat on the homedir.
12227         (handle_connections): Mark availibility of the inotify watch.
12228         * dirmngr/dirmngr.c (handle_tick): Call stat on the homedir.
12229         (TIMERTICK_INTERVAL_SHUTDOWN): New.
12230         (handle_connections): Depend tick interval on the shutdown state.
12231
12232         agent: Lengthen timertick interval on Unix to 4 seconds.
12233         + commit f4ec7697a9c2d7587794d3bd75efbb0b51d6562f
12234         * agent/gpg-agent.c (TIMERTICK_INTERVAL): Same value for Windows and
12235         Unix.
12236
12237 2017-07-25  Werner Koch  <wk@gnupg.org>
12238
12239         common: Strip trailing slashes from the homedir.
12240         + commit 24c7aa0d58e3768690dd8ebef0e8e01af7e80f83
12241         * common/homedir.c (default_homedir): Strip trailing slashes.
12242         (gnupg_set_homedir): Ditto.
12243
12244         w32: Also change the directory on daemon startup.
12245         + commit 0ef50340ef68b2541d9a1aafa71f5400aef4dc7e
12246         * agent/gpg-agent.c (main): Always to the chdir.
12247         * dirmngr/dirmngr.c (main): Ditto.
12248         * scd/scdaemon.c (main): Ditto.
12249
12250         common: New functions gnupg_daemon_rootdir and gnupg_chdir.
12251         + commit 226f143ca01cf335c7c4e3e94c96fb9d271eccc9
12252         * common/sysutils.c (gnupg_chdir): New.
12253         * common/homedir.c (gnupg_daemon_rootdir): New.
12254         * agent/gpg-agent.c (main): Use these functions instead chdir("/").
12255         * dirmngr/dirmngr.c (main): Ditto.
12256         * scd/scdaemon.c (main): Ditto.
12257
12258         gpg: Update key origin info during import merge.
12259         + commit 166d0d7a2439f30c0a250faadc16ce3453447d71
12260         * g10/import.c (update_key_origin): New.
12261         (merge_blocks): Add arg curtime.
12262         (import_one): Pass curtime to merge_blocks.  Call update_key_origin.
12263
12264         gpg: Store key origin for new userids during import merge.
12265         + commit 84c993d9325fc000acac7950b2dfeefa5976df3b
12266         * g10/import.c (apply_meta_data): Rename to ...
12267         (insert_key_origin): this.  Factor code out to ...
12268         (insert_key_origin_pk, insert_key_origin_uid): new funcs.
12269         (import_one): Move insert_key_origin behind clean_key.
12270         (merge_blocks): Add args options, origin, and url.
12271         (append_uid): Rename to ...
12272         (append_new_uid): this.  Add args options, curtime, origin, and url.
12273         Call insert_key_origin_uid for new UIDs.
12274
12275 2017-07-25  NIIBE Yutaka  <gniibe@fsij.org>
12276
12277         dirmngr: Add annotation for fallthrough.
12278         + commit d40b4a41a8d60292fd4b5b951a19883e31090179
12279         * dirmngr/dns.c: Add /* FALL THROUGH */ to clarify.
12280
12281 2017-07-24  Werner Koch  <wk@gnupg.org>
12282
12283         gpg: Extend --key-origin to take an optional URL arg.
12284         + commit 87b5421ca84bbea68217c9ed771ee8c0a98a4d0c
12285         * g10/getkey.c (parse_key_origin): Parse appended URL.
12286         * g10/options.h (struct opt): Add field 'key_origin_url'.
12287         * g10/gpg.c (main) <aImport>: Pass that option to import_keys.
12288         * g10/import.c (apply_meta_data): Extend for file and url.
12289         * g10/keyserver.c (keyserver_fetch): Pass the url to
12290         import_keys_es_stream.
12291
12292         gpg: Store key origin info for new keys from a keyserver.
12293         + commit 2ca0381d077d766593db26f4215b8eddee8d7963
12294         * g10/keyserver.c (keyserver_get_chunk): Use KEYORG_KS if request was
12295         done by fingerprint.
12296         * g10/import.c (apply_meta_data): Implement that.
12297
12298         gpg: Store key origin info for new DANE and WKD retrieved keys.
12299         + commit e7068bf92ec5ca5d440346d43a382c1f625b924d
12300         * g10/import.c (apply_meta_data): Remove arg 'merge'.  Add arg 'url'.
12301         Implement WKD and DANE key origin.
12302         (import_keys_internal): Add arg 'url' and change all callers.
12303         (import_keys_es_stream): Ditto.
12304         (import): Ditto.
12305         (import_one): Ditto.
12306         * g10/keylist.c (list_keyblock_print): Fix update URL printing.
12307         * g10/call-dirmngr.c (gpg_dirmngr_wkd_get): Add arg 'r_url' to return
12308         the SOURCE.  Pass ks_status_cb to assuan_transact.
12309         * g10/keyserver.c (keyserver_import_wkd): Get that URL and pass it to
12310         the import function.
12311
12312         gpg: Filter keys received via DANE.
12313         + commit f6f0dd4d5ea85e0b16e96d7678b1d508182049a8
12314         * g10/keyserver.c (keyserver_import_cert): Use an import filter in
12315         DANE mode.
12316
12317         dirmngr: Print a SOURCE status for WKD requests.
12318         + commit e97548223948222a5c22acdf3775c7f93c1e17a9
12319         * dirmngr/server.c (cmd_wkd_get): Print a SOURCE status.
12320
12321         dirmngr: New function dirmngr_status_printf.
12322         + commit 9b88cfa0962f28894658cff8777fe7a217c6f700
12323         * dirmngr/server.c (dirmngr_status_printf): New.
12324
12325 2017-07-24  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12326
12327         g10: Make sure to emit NEED_PASSPHRASE on --import of secret key.
12328         + commit 872137b5921dd297e7d2c1def6e3868b7595feb5
12329         * call-agent.h (agent_import_key): Add keyid parameters.
12330         * call-agent.c (agent_import_key): Set keyid parameters.
12331         * import.c (transfer_secret_keys): Pass keyid parameters.
12332
12333         w32: Change directory on daemon startup.
12334         + commit 78ebc62604d77600b9865950610717d28c6027a2
12335         * agent/gpg-agent.c [HAVE_W32_SYSTEM]: Include <direct.h>.
12336         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
12337         * dirmngr/dirmngr.c [HAVE_W32_SYSTEM]: Include <direct.h>.
12338         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
12339         * scd/scdaemon.c [HAVE_W32_SYSTEM]: Include <direct.h>.
12340         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
12341
12342         g10: Make sure to emit NEED_PASSPHRASE on --export-secret-key.
12343         + commit d8e46f10698da0bee4cd58d95f1f9832bdda0c5f
12344         * call-agent.h (agent_export_key): Add keyid parameters.
12345         * call-agent.c (agent_export_key): Set keyid parameters.
12346         * export.c (receive_seckey_from_agent): Pass keyid parameters.
12347
12348 2017-07-24  NIIBE Yutaka  <gniibe@fsij.org>
12349
12350         scd: Use unsigned int for fields.
12351         + commit 45e40487fb7bb51228c96c8966e38c643a9b9ba5
12352         * scd/app-openpgp.c (data_objects): Use unsigned ints.
12353
12354         dirmngr: More minor fix.
12355         + commit ade4b2744c848e07b87afa4f186256c2a2ef1d13
12356         * dirmngr/http.c (send_request): Care the case of !USE_TLS.
12357
12358         dirmngr: More minor fixes.
12359         + commit 789401e9557db13422f47a8c09e693f3cee0132b
12360         * dirmngr/http.c (http_verify_server_credentials): Duplicated const.
12361         * dirmngr/ldap.c (parse_one_pattern): Add comment.
12362
12363         dirmngr: Minor fix for Windows.
12364         + commit 274602820cfbb15c7cdb4525acd9793bdb472e78
12365         * dirmngr/http.c (connect_with_timeout): Use FD2INT.
12366
12367         agent: Minor fix for Windows.
12368         + commit 328fca187253c069e3630bd387a71f6d16e9820a
12369         * agent/command-ssh.c (serve_mmapped_ssh_request): Add const
12370         qualifier.
12371
12372 2017-07-21  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12373
12374         g10: Avoid caching passphrase for failed symmetric encryption.
12375         + commit e4c720fa3b31ebd3e9d764c6eab02729cf06124c
12376         * g10/mainproc.c (proc_encrypted): If error code is GPG_ERR_CIPHER_ALGO,
12377         assume the symmetric passphrase was wrong and invalidate the cache.
12378
12379 2017-07-21  Werner Koch  <wk@gnupg.org>
12380
12381         gpg: Extend --quick-set-expire to allow subkey expiration setting.
12382         + commit b55b72bb815ad5870456b89c3a011fa00991b4a8
12383         * g10/keyedit.c (keyedit_quick_set_expire): Add new arg subkeyfprs.
12384         (menu_expire): Rename arg force_mainkey to unattended and allow
12385         unattended changing of subkey expiration.
12386         * g10/gpg.c (main): Extend --quick-set-expire.
12387
12388         gpg: Fix possible double free of the card serialno.
12389         + commit e888f7af6571ecd3994fd55cc18c9e2df7fd0c60
12390         * g10/free-packet.c (copy_public_key): Copy fields serialno and
12391         updateurl.
12392
12393         gpg: Use macros to check the signature class.
12394         + commit 5818ff0ae314af08548fcc23df2b807736144a00
12395         * g10/import.c: Use the extistin macros for better readability.
12396
12397 2017-07-21  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12398
12399         g10: Clean keyblock on initial commit.
12400         + commit 609bbdf3614fbadeba7a6cbdfdf5004b23516a64
12401         * g10/import.c (import_one): If option import-clean is set,
12402         also clean on initial import, not only for merge.
12403
12404 2017-07-21  NIIBE Yutaka  <gniibe@fsij.org>
12405
12406         scd: Fix SEGV in CCID driver.
12407         + commit d8a55da715ce8447b0686f321fa43d00be34a467
12408         * scd/ccid-driver.c (intr_cb): Only kick the loop for removal.
12409         (bulk_in): Don't set POWERED_OFF when interrupt transfer is enabled.
12410
12411         g10: Don't limit at the frontend side for card capability.
12412         + commit a76b6cf9709c0a2a89fa2887075491b80f3d9608
12413         * g10/card-util.c (MAX_GET_DATA_FROM_FILE): New.
12414         (get_data_from_file): Use MAX_GET_DATA_FROM_FILE.
12415         (change_url, change_login, change_private_do): Don't limit.
12416
12417         scd: Add debug message for v3 card.
12418         + commit 892e86b0dc69193ddff018bf9b3938509dd72cb3
12419         * scd/app-openpgp.c (show_caps): Output more messages.
12420
12421 2017-07-20  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12422
12423         doc: Clarify wording of export-attributes.
12424         + commit cea4313644b531ef87b8c8e4bfddde4388cbbe0d
12425         * doc/gpg.texi: Clarify wording of export-attributes.
12426
12427 2017-07-20  Werner Koch  <wk@gnupg.org>
12428
12429         gpg: New option --with-key-origin.
12430         + commit 165cdd8121bbf80bfe2da071539d3578630f198f
12431         * g10/getkey.c (parse_key_origin): Factor list out as ...
12432         (key_origin_list): new struct.
12433         (key_origin_string): New.
12434         * g10/gpg.c (oWithKeyOrigin): New const.
12435         (opts): New option --with-key-origin.
12436         (main): Implement option.
12437         * g10/options.h (struct opt): New flag with_key_origin.
12438         * g10/keylist.c (list_keyblock_print): Print key origin info.
12439         (list_keyblock_colon): Ditto.
12440
12441         common: New function print_utf9_string.
12442         + commit bddc2e04f1ddc18be20efc0f0508be401b345f42
12443         * common/miscellaneous.c (print_utf8_string): New.
12444
12445         gpg: Make function mk_datestr public.
12446         + commit 3ee314dde16d1d69ddf840cdb8b5aa186c592262
12447         * g10/keydb.h (MK_DATESTR_SIZE): New.
12448         * g10/keyid.c (mk_datestr): Make public.  Add arg bufsize and use
12449         snprintf.  Change arg atime to u32.
12450         (datestr_from_pk): Simplify.
12451         (datestr_from_sig): Ditto.
12452         (expirestr_from_pk): Ditto.
12453         (expirestr_from_sig): Ditto.
12454         (revokestr_from_pk): Ditto.
12455
12456 2017-07-20  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12457
12458         g10: Return proper error when gpg-agent fails to start during probe.
12459         + commit 9998b162b47931fb8a8ed961d53418d505358888
12460         * g10/getkey.c (lookup): Return immediately on any other error than
12461         GPG_ERR_NO_SECKEY from agent_probe_any_secret_key.
12462
12463 2017-07-20  NIIBE Yutaka  <gniibe@fsij.org>
12464
12465         scd: Support longer data length for special DOs for v3 card.
12466         + commit 69614d55018ddb8678d8904a52e648931f480d72
12467         * scd/app-openpgp.c (data_objects): Special DOs like "Login Data",
12468         "URL", "Private DO N" can be longer size >= 256.
12469         (struct app_local_s): Define bits for v3 card.
12470         (get_cached_data): Use extcap.max_special_do for special DOs.
12471         (app_select_openpgp): Detect if extcap_v3, kdf_do, and other bits.
12472
12473         common: logstream fix.
12474         + commit 84146b3ec44943f06c66a603de19094b930ad446
12475         * common/logging.c (set_file_fd): Don't close es_stderr.
12476
12477         dnsmngr: Fix use of CPP.
12478         + commit cc12cf386b620e658fa93a0bd40477bc16d85d98
12479         * dirmngr/dns.c (HAVE_STATIC_ASSERT, HAVE___ATOMIC_FETCH_ADD)
12480         (DNS_HAVE_SOCKADDR_UN, HAVE_SOCK_NONBLOCK): Don't use defined
12481         to be expanded for expression evaluation.
12482
12483 2017-07-19  Justus Winter  <justus@g10code.com>
12484
12485         dirmngr: Forbid redirects from .onion to clearnet URIs.
12486         + commit e7fc6e3bf0eb6ffe53e1f099d28ce45cef4a8a87
12487         * dirmngr/ks-engine-hkp.c (send_request): Forbid redirects from .onion
12488         to clearnet URIs.
12489         * dirmngr/ks-engine-http.c (ks_http_fetch): Likewise.
12490
12491 2017-07-19  Werner Koch  <wk@gnupg.org>
12492
12493         gpg: Avoid asking by fpr and then by keyid during auto-key-retrieve.
12494         + commit 2e5459457473eb4b3e7b2b14815cb94faa66e8bb
12495         * g10/mainproc.c (check_sig_and_print): Track key server request via
12496         fingerprint.
12497
12498 2017-07-19  Justus Winter  <justus@g10code.com>
12499
12500         dirmngr: Implement TLS over http proxies.
12501         + commit da91d2106a17c796ddb066a34db92d33b21c81f7
12502         * dirmngr/http.c (send_request): If a http proxy is to be used, and we
12503         want to use TLS, try to use the CONNECT method to get a connection to
12504         the target server.
12505
12506         dirmngr: Log http response in debug mode.
12507         + commit e7eabe66b6409c1f5225b751ea5c2d456a3856e6
12508         * dirmngr/http.c (parse_response): Log http response in debug mode.
12509
12510         dirmngr: Amend TLS handling.
12511         + commit 1ba220e68149fdb197accf4a15b0a11126c8b431
12512         * dirmngr/http.c (http_wait_response): Get the 'use_tls' flag from the
12513         write cookie, not from the URI.
12514
12515         dirmngr: Fix connecting to http proxies.
12516         + commit 46a4a0c0e77e19f9589088bb87357c33142c3f04
12517         * dirmngr/http.c (send_request): Do not use the 'srvtag' intended for
12518         the target host to connect to the http proxy.
12519
12520         dirmngr: Fix handling of proxy URIs.
12521         + commit 73d4781e4595634548269bafe46aeb7674c5b219
12522         * dirmngr/http.c (send_request): We do not support socks4.
12523
12524 2017-07-19  NIIBE Yutaka  <gniibe@fsij.org>
12525
12526         gpgconf: Make vars read-only explicitly.
12527         + commit 99791184ac4c7486ccdefc150b9921cd923428b9
12528         * tools/gpgconf-comp.c (gc_backend, gc_arg_type, gc_level, gc_flag)
12529         (gc_component): Add const qualifier.
12530
12531         Fix usage of ARGPARSE_OPTS.
12532         + commit fa63db89f9581186ed758c502d4e69914b774157
12533         * agent/gpg-agent.c, agent/preset-passphrase.c,
12534         dirmngr/dirmngr-client.c, dirmngr/dirmngr_ldap.c, kbx/kbxutil.c,
12535         tools/gpg-check-pattern.c, tools/gpgconf.c, tools/gpgsplit.c,
12536         tools/symcryptrun.c: Use ARGPARSE_end.
12537
12538 2017-07-18  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12539
12540         common: Allow abbreviations of standard options.
12541         + commit f17862d47d184d7f6ef883778cf63801365599a0
12542         * argparse.h (ARGPARSE_SHORTOPT_HELP, ARGPARSE_SHORTOPT_VERSION,
12543         ARGPARSE_SHORTOPT_WARRANTY, ARGPARSE_SHORTOPT_DUMP_OPTIONS): New
12544         macros.
12545         (ARGPARSE_end): Add some placeholders for standard options.
12546         * argparse.c (arg_parse): Fill in missing standard options so
12547         default machinery works.  Check for standard options in new way.
12548         Do not write out standard options for --dump-options.
12549
12550 2017-07-18  Justus Winter  <justus@g10code.com>
12551
12552         gpgscm,w32: Fix testing for absolute paths.
12553         + commit 2e1342b78b020f5b28359b08a4f63cf11479602f
12554         * tests/gpgscm/main.c (path_absolute_p): New function.
12555         (load): Use new function.
12556
12557         dirmngr: Honor http keyserver URLs.
12558         + commit b231959728a0056094134e0fca8cc916c24ef37e
12559         * dirmngr/http.c (parse_uri): Keep an unmodified copy of the URI.
12560         * dirmngr/http.h (struct parsed_uri_s): New field 'original'.
12561         * dirmngr/ks-action.c (ks_action_get): Properly handle http and https
12562         URLs.
12563
12564         dirmngr: Fix memory leak.
12565         + commit ebb35ed7110d1a29061dfb4ccb9038645b20d7f4
12566         * dirmngr/http.c (parse_uri): Properly free partial results.
12567
12568         dirmngr: Fix memory leak.
12569         + commit 3d670fa973a03ea88b5f9459b3222a951136dd7a
12570         * dirmngr/http.c (http_release_parsed_uri): Free 'params'.
12571
12572 2017-07-17  Werner Koch  <wk@gnupg.org>
12573
12574         gpg,sm: Check compliance of the RNG.
12575         + commit a149afe338d61d86985c533cde5e7dbcd31e8698
12576         * common/compliance.c (gnupg_rng_is_compliant): New.
12577         * g10/call-agent.c (start_agent) [W32]: Check rng compliance.
12578         * sm/call-agent.c (start_agent) [W32]: Ditto.
12579         * g10/encrypt.c (encrypt_simple, encrypt_crypt): Check that the RNG is
12580         compliant.
12581         * sm/encrypt.c (gpgsm_encrypt): Ditto.
12582         * g10/sign.c (do_sign): Ditto.
12583         * sm/sign.c (gpgsm_sign): Ditto.
12584
12585         agent: New GETINFO sub-command jent_active.
12586         + commit bbbd0db34b4e387f8dc089fb7d69fdcf2ed91a01
12587         * agent/command.c (cmd_getinfo): Implement it for gcrypt >= 1.8.
12588
12589         common: New function split_fields_colon.
12590         + commit 849467870ee1c10e0a7b1e89cfc9e8214e4963fe
12591         * common/stringhelp.c (split_fields_colon): New.
12592         * common/t-stringhelp.c (test_split_fields_colon): New test.
12593         (main): Call that test.
12594
12595 2017-07-14  Justus Winter  <justus@g10code.com>
12596
12597         tests: Improve 'shell.scm' script.
12598         + commit 58eafd11ed5501c0b72fcb553eb3e097ad29b3c6
12599         * tests/openpgp/defs.scm (create-file): Unlink file first.
12600         * tests/openpgp/shell.scm: Ask whether to import legacy test keys or
12601         not, and whether to drop 'batch' from the configuration.  Add paths to
12602         all the programs to 'PATH'.
12603
12604         gpgscm: Library improvements.
12605         + commit b4d25082fd4502ec01d511c22fecd60d513b81f4
12606         * tests/gpgscm/repl.scm (prompt-yes-no?): New function.
12607         * tests/gpgscm/tests.scm (pathsep-split): Likewise.
12608         (pathsep-join): Likewise.
12609         (with-path): Use the new function.
12610
12611         gpgscm: Fail early if the test setup fails.
12612         + commit 7a6e6ad2880bbff54a75ff608d0ec97d6c405733
12613         * tests/gpgscm/tests.scm (make-environment-cache): Check status code
12614         of setup script.
12615
12616         gpg: Fix importing keys.
12617         + commit 956da89193370d5aa970cff5b77f605534481a02
12618         * g10/import.c (import_one): Fix error handling.
12619
12620 2017-07-13  Werner Koch  <wk@gnupg.org>
12621
12622         gpg: Pass key origin values to import functions.
12623         + commit 330212efb927c119bb5135856f8582c0e4e2e6b7
12624         * g10/import.c (import_keys_stream): Remove this unused function.
12625         (import_keys_internal): Add arg origin.
12626         (import_keys): Ditto.
12627         (import_keys_es_stream): Ditto.
12628         (import): Ditto.
12629         (import_one): Ditto.
12630         (apply_meta_data): New stub.
12631         (import_secret_one): Pass 0 for ORIGIN.
12632         * g10/keyserver.c (keyserver_get_chunk): For now pass 0 for ORIGIN.
12633         (keyserver_fetch): Add arg origin.
12634         (keyserver_import_cert): Pass KEYORG_DANE for ORIGIN.
12635         (keyserver_import_wkd): Pass KEYORG_WKD for ORIGIN.
12636         * g10/gpg.c (main): Pass OPT.KEY_ORIGIN to import_keys and
12637         keyserver_fetch.
12638         * g10/card-util.c (fetch_url): Pass KEYORG_URL for ORIGIN.
12639
12640         gpg: New option --key-origin.
12641         + commit fa1155e89ebb4b16ee95549b8ab72672df3a0c54
12642         * g10/keydb.h (KEYORG_): Rename to KEYORG_.
12643         * g10/packet.h (PKT_user_id): Rename field keysrc to keyorg.  Adjust
12644         users.
12645         (PKT_public_key): Ditto.
12646         (PKT_ring_trust): Ditto.
12647         * g10/options.h (struct opt): Add field key_origin.
12648         * g10/getkey.c (parse_key_origin): New.
12649         * g10/gpg.c (oKeyOrigin): New.
12650         (opts): Add "keys-origin".
12651         (main): Set option.
12652
12653 2017-07-13  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12654
12655         doc: Document gnupg version requirement for gpg-preset-passphrase.
12656         + commit 877a321d011deb3e8501aa9cc5e9f9cd0b19dddf
12657
12658
12659 2017-07-13  Justus Winter  <justus@g10code.com>
12660
12661         gpgscm: Make loading of modules less verbose.
12662         + commit f78fe1a4ec9d343199e1f424dd09e2937c913412
12663         * tests/gpgscm/main.c (load): Increase logging threshold.
12664
12665         gpgscm: Make it impossible to catch '*interpreter-exit*'.
12666         + commit bce02a8b0f0e51775a4ee5536ccf35efc1f15ca6
12667         * tests/gpgscm/init.scm (throw'): Make it impossible to catch
12668         '*interpreter-exit*'.  This fixes 'exit' (and with it 'fail') inside
12669         'catch' statements.
12670
12671 2017-07-10  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12672
12673         tofu: Compare squares instead of square roots.
12674         + commit d24594976686983c7186cbe4e78153888a13b6e4
12675         * g10/Makefile.am (tofu_source) [USE_TOFU]: Remove sqrtu32.h and
12676         sqrtu32.c.
12677         * g10/sqrtu32.h, g10/sqrtu32.c: Removed files.
12678         * g10/tofu.c: Compare squares instead of square roots.
12679
12680         speedo: Provide a vagrantfile to test speedo in an isolated VM.
12681         + commit 1455b406e63dd262938e49da5f83c05c17c60a8d
12682         * build-aux/Vagrantfile: New file.
12683
12684 2017-07-06  Neal H. Walfield  <neal@g10code.com>
12685
12686         doc: Improve TOFU documentation.
12687         + commit 243b2a570c30586e19b8c88e43b282d62d8eb77c
12688         * doc/gpg.texi: Improve TOFU documentation.
12689
12690 2017-07-05  Werner Koch  <wk@gnupg.org>
12691
12692         agent: Use MAX_PASSPHRASE_LEN (255) also for the loopback.
12693         + commit 3681ee7dc1e9d8c94fdb046d7be0bbcfeba1cfe9
12694         * agent/call-pinentry.c (agent_get_passphrase): Reduce maximum
12695         passphrase length as conveyed to the loopback to MAX_PASSPHRASE_LEN.
12696         * agent/genkey.c (agent_ask_new_passphrase): Extend the maximum
12697         passphrase as conveyed to the loopback to MAX_PASSPHRASE_LEN.
12698
12699         doc: Update yat2m to take care of SOURCE_DATE_EPOCH.
12700         + commit 139de02b93773615bdd95e04a7f0c1ad73b4f6fb
12701         * doc/yat2m.c (main): Set a default for OPT_DATE.
12702
12703         doc: Prefer an installed version of yat2m.
12704         + commit f6faa058749846de18cb34f1cc79867bb0029922
12705         * configure.ac (YAT2M): Check for tool.
12706         * doc/Makefile.am (yat2m-stamp): Use installed tool if possible.
12707
12708 2017-07-01  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
12709
12710         doc: Document obsolete option in gpgsm.  Closes T2231.
12711         + commit 7fb724c61655c6f75c61572d65a46e21ae112574
12712         * doc/gpgsm.texi: Mark --prefer-system-dirmngr as obsolete.
12713
12714 2017-06-28  Werner Koch  <wk@gnupg.org>
12715
12716         agent: Fix option --debug-wait.
12717         + commit ecd6c0160f49ae83001dfd150df6b1238fc479d5
12718         * agent/gpg-agent.c (opts): Typo fix.
12719
12720 2017-06-26  Justus Winter  <justus@g10code.com>
12721
12722         agent: Support unprotected ssh keys.
12723         + commit 273964798592cd479c111f47e8ce46d5b1999d6a
12724         * agent/command-ssh.c (ssh_key_to_protected_buffer): If the empty
12725         passphrase is supplied, do not protect the key.
12726
12727         tests: Improve test.
12728         + commit b49b1a87ac2695e3892fb001878da59fbc92fa37
12729         * tests/openpgp/ssh-export.scm: Split output at any whitespace.
12730
12731 2017-06-23  Werner Koch  <wk@gnupg.org>
12732
12733         agent: Shutdown on removal of the home directory.
12734         + commit 1ead1ca818bddabc3bca22c195be667993eb3e2e
12735         * common/sysutils.c (gnupg_inotify_watch_delete_self): New.
12736         * agent/gpg-agent.c (handle_connections): Rename my_inotify_fd to
12737         sock_inotify_fd.
12738         (handle_connections): Add home_inotify_fd to watch the home directory.
12739
12740         build: Add missing LIBASSUAN_CFLAGS to dirmngr/.
12741         + commit 815ecdf08a4285c75892cf9ab72feb13f3bcf590
12742         * dirmngr/Makefile.am (t_http_CFLAGS): Add LIBASSUAN_CFLAGS.
12743         (t_ldap_parse_uri_CFLAGS): Ditto.
12744         (t_dns_stuff_CFLAGS): Ditto.
12745
12746         gpg,gpgsm: Emit status code ENCRYPTION_COMPLIANCE_MODE.
12747         + commit f31dc2540acf7cd7f09fd94658e815822222bfcb
12748         * common/status.h (STATUS_ENCRYPTION_COMPLIANCE_MODE): New.
12749         * g10/encrypt.c (encrypt_crypt): Emit new status code.
12750         * sm/encrypt.c (gpgsm_encrypt): Ditto.
12751
12752 2017-06-21  Justus Winter  <justus@g10code.com>
12753
12754         gpg: Close cached keydb handle in gpgv.
12755         + commit a68a98233ab83f0c7b90e6e588b882085fe59d91
12756         * g10/gpgv.c (main): Close cached handle.
12757
12758         tests: Add test for gpgv.
12759         + commit 62274d3c309d8948405c2f966bef507638b4d5c6
12760         * tests/openpgp/Makefile.am (XTESTS): Add the new test.
12761         * tests/openpgp/gpgv.scm: New file.
12762         * tests/openpgp/signed-messages.scm: Likewise.
12763         * tests/openpgp/verify.scm: Move the signed messages to the new file
12764         and load it.
12765
12766         gpg: Fix printing keyserver URLs and notation data.
12767         + commit 890a3a70f2e1340d90c7f499358467979b182719
12768         * g10/keylist.c (show_keyserver_url): Print to 'fp', not to 'stdout'.
12769         (show_notation): Likewise.
12770
12771 2017-06-20  Justus Winter  <justus@g10code.com>
12772
12773         dirmngr: Properly handle SRV records.
12774         + commit 48aae8167dcae80d43b08167a88d9eb170781a04
12775         * dirmngr/ks-engine-hkp.c (enum ks_protocol): New type.
12776         (struct hostinfo_s): New flags indicating whether we already did a
12777         A lookup, or a SRV lookup per protocol.  Turn 'port' into an array.
12778         (create_new_hostinfo): Initialize new fields.
12779         (add_host): Update the port for the given protocol.
12780         (map_host): Simplify hosttable lookup misses.  Check the SRV records
12781         for both protocols on demand, do the A lookup just once.  Return the
12782         correct port.
12783
12784         dirmngr: Refactor variable-sized array code.
12785         + commit fc4834d213af031b456c49c1ba5b5ef8873d1f18
12786         * dirmngr/ks-engine-hkp.c (struct hostinfo_s): Add explicit length and
12787         size fields.
12788         (MAX_POOL_SIZE): New macro.
12789         (create_new_hostinfo): Initialize new fields.
12790         (host_in_pool_p): Adapt.
12791         (select_random_host): Likewise.
12792         (add_host): Likewise.  Move the resizing logic here.
12793         (hostinfo_sort_pool): New function.
12794         (map_host): Simplify.  Move the resizing logic away from here.
12795         (ks_hkp_mark_host): Adapt.
12796         (ks_hkp_print_hosttable): Likewise.
12797
12798         gpg: Fix error handling.
12799         + commit badc1cdae52bd434e5fac2e4275575afeccc2837
12800         * g10/keygen.c (generate_subkeypair): Handle errors from pinentry.
12801
12802 2017-06-19  Werner Koch  <wk@gnupg.org>
12803
12804         gpg,gpgsm: Fix compliance check for DSA and avoid an assert.
12805         + commit 3621dbe52584bc8b417f61b5370ebaa5598db956
12806         * common/compliance.c (gnupg_pk_is_compliant): Swap P and Q for DSA
12807         check.  Explicitly check for allowed ECC algos.
12808         (gnupg_pk_is_allowed): Swap P and Q for DSA check.
12809         * g10/mainproc.c (proc_encrypted): Simplify SYMKEYS check.  Replace
12810         assert by debug message.
12811
12812 2017-06-19  Justus Winter  <justus@g10code.com>
12813
12814         gpgscm: Limit the number of parallel jobs.
12815         + commit 61ef43546ba9f0209692a1569d2f033436566a02
12816         * ffi.c (do_wait_processes): Suppress the timeout error.
12817         * tests.scm (semaphore): New definition.
12818         (test-pool): Only run a bounded number of tests in parallel.
12819         (test::started?): New function.
12820         (run-tests-parallel): Do not report results, do not start the tests.
12821         (run-tests-sequential): Adapt.
12822         (run-tests): Parse the number of parallel jobs.
12823
12824         gpgscm: Improve option parsing.
12825         + commit e555e7ed7de20fbbb1e3b005c32e292f29cc4a58
12826         * tests/gpgscm/tests.scm (flag): Accept arguments of the form
12827         '--foo=bar'.
12828
12829         gpgscm: Improve error handling of foreign functions.
12830         + commit 6639aedaee051e8104d7f63b9a5812abf79440ed
12831         * tests/gpgscm/ffi.scm (ffi-fail): Do not needlessly join the error
12832         message.
12833
12834         gpgscm: Improve error reporting.
12835         + commit 4c8be58fd46bb16332e84ab8ce978087dc5c68a3
12836         * tests/gpgscm/init.scm (throw'): Guard against 'args' being atomic.
12837         * tests/gpgscm/scheme.c (Eval_Cycle): Remove any superfluous colons in
12838         error messages.
12839
12840         tests: Run the OpenPGP tests using the new extended key format.
12841         + commit b766d3d1034e6068a91755ada68f7f7dbe2943b6
12842         * tests/openpgp/all-tests.scm: Generalize a bit, and also add a
12843         variant that uses the new extended key format.
12844         * tests/openpgp/defs.scm (create-gpghome): Conditionally enable the
12845         new extended key format.
12846
12847 2017-06-19  Werner Koch  <wk@gnupg.org>
12848
12849         Change license of some files to LGPLv2.1.
12850         + commit 3419a339d9c4e800bf30e9021e05982d8c1021c1
12851         * COPYING.LIB: Rename to COPYING.LGPL3.
12852         * COPYING.LGPL21: New.
12853         * COPYING.GPL2: New.
12854         * Makefile.am: Distribute them.
12855         * AUTHORS: Update license pointers.  Add BSI as copyright holder.
12856         * common/compliance.c, common/compliance.h: Add BSI copyright notice.
12857         Break overlong lines.
12858         * dirmngr/loadswdb.c: Add BSI copyright notices.
12859         * dirmngr/server.c: Ditto.
12860         * tools/call-dirmngr.c: Change license to LGPLv2.1.  Add BSI
12861         copyright notice.
12862         * tools/call-dirmngr.h: Ditto.
12863         * tools/gpg-wks-client.c: Ditto.
12864         * tools/gpg-wks-server.c: Ditto.
12865         * tools/gpg-wks.h: Ditto.
12866         * tools/mime-maker.c: Ditto.
12867         * tools/mime-maker.h: Ditto.
12868         * tools/mime-parser.c: Ditto.
12869         * tools/mime-parser.h: Ditto.
12870         * tools/send-mail.c: Ditto.
12871         * tools/send-mail.h: Ditto.
12872         * tools/wks-receive.c: Ditto.
12873         * tools/wks-util.c: Ditto.
12874         * tools/rfc822parse.c, tools/rfc822parse.h: Change license to LGPLv2.1.
12875
12876 2017-06-19  Justus Winter  <justus@g10code.com>
12877
12878         gpg: Disable compliance module for other GnuPG components.
12879         + commit 6e23416fe61d4130918f2d1bf6e1f98d102c4610
12880         * common/compliance.c (gnupg_{pk,cipher,digest}_is_compliant): Return
12881         false if the module is not initialized.
12882         (gnupg_{pk,cipher,digest}_is_allowed): Return true if the module is
12883         not initialized.
12884         (gnupg_status_compliance_flag): Do not assert that the module is
12885         initialized.
12886         (gnupg_parse_compliance_option): Likewise.
12887         (gnupg_compliance_option_string): Likewise.
12888
12889 2017-06-14  Justus Winter  <justus@g10code.com>
12890
12891         gpg: Check and fix keys on import.
12892         + commit 9b12b45aa5e67d4d422bf75a3879df1d52dbe67f
12893         * doc/gpg.texi: Document the new import option.
12894         * g10/gpg.c (main): Make the new option default to yes.
12895         * g10/import.c (parse_import_options): Parse the new option.
12896         (import_one): Act on the new option.
12897         * g10/options.h (IMPORT_REPAIR_KEYS): New macro.
12898
12899         gpg: Refactor key checking and fixing.
12900         + commit 404fa8211b6188a0abe83ef43a4b44d528c0b035
12901         * g10/Makefile.am (gpg_sources): Add new files.
12902         * g10/gpgcompose.c (keyedit_print_one_sig): New stub.
12903         * g10/keyedit.c (sig_comparison): Move to new module.
12904         (check_all_keysigs): Likewise.
12905         (fix_keyblock): Adapt callsite.
12906         (keyedit_menu): Likewise.
12907         * g10/key-check.c: New file.
12908         * g10/key-check.h: Likewise.
12909
12910 2017-06-13  Justus Winter  <justus@g10code.com>
12911
12912         gpg: Refactor keyedit module.
12913         + commit 8095d16b3ef6b5f01ec351824855708149f1c1c3
12914         * g10/Makefile.am (gpg_SOURCES): Add new file.
12915         * g10/keyedit.c (NODFLG_*): Move flags to the new header file.
12916         (print_one_sig): Export symbol and rename accordingly.
12917         (print_and_check_one_sig): Adapt accordingly.
12918         (check_all_keysigs): Likewise.
12919         * g10/keyedit.h: New file.
12920         * g10/main.h: Drop declarations, include new header.
12921
12922         dirmngr: Implement querying nameservers over IPv6.
12923         + commit 15d2a009931f44a60b9df6325f837add208459d6
12924         * dirmngr/dns.c (dns_so_check): Reinitialize sockets on address family
12925         mismatch.
12926         (enum dns_res_state): New states for querying over IPv6.
12927         (dns_res_exec): Implement the new states by copying and modifying the
12928         IPv4 variants.  Branch to their respective counterparts if the current
12929         list of resolvers using the current address family is exhausted.
12930
12931 2017-06-13  Werner Koch  <wk@gnupg.org>
12932
12933         gpg: Disable keydb handle caching only for W32.
12934         + commit e80925171ddb20c7e76c1db88c15ce2d9b09db86
12935         * g10/getkey.c (getkey_end) [!W32]: Re-enable caching.
12936
12937         common: Fix -Wswitch warning.
12938         + commit 7c91b48f0e80266cf7491c2bb7d8aabc12362643
12939         * common/compliance.c (gnupg_digest_is_allowed): Don't include
12940         GCRY_MD_WHIRLPOOL because it is not a digest_algo_t.
12941
12942 2017-06-11  Neal H. Walfield  <neal@g10code.com>
12943
12944         gpg: Send gpgcompose --help output to stdout, not stderr.
12945         + commit 7aeac20f12ed257d3d159b304afeeac7f406c9d2
12946         * g10/gpgcompose.c (show_help): Send gpgcompose --help output to
12947         stdout, not stderr.
12948
12949         gpg: Improve some output of gpgcompose.
12950         + commit cb0484e0762a1ce05d00d949f4b70162e2f7b82c
12951
12952
12953         gpg: Support 'gpgcompose --encrypted-pop --help'
12954         + commit 4ddf4e114c8df06d89144e857b7601de0b7e5a7c
12955         * g10/gpgcompose.c (encrypted_pop_options): New variable.
12956         (encrypted_pop): Support the --help option.
12957
12958         gpg: Remove dead code.
12959         + commit 8a9066865688cf17594b2bdde4b260b0ef36d68e
12960         * g10/gpgcompose.c (filter_pop): F->PKTTYPE will never be
12961         PKT_ENCRYPTED_MDC.
12962         (encrypted_pop): Likewise and there is no option --encrypted-mdc-pop.
12963
12964 2017-06-08  Marcus Brinkmann  <mb@g10code.com>
12965
12966         artwork: Add new banner.
12967         + commit bc5503b2bf273b51d5dc59617e596f1cfb742fbc
12968         * artwork/banner/banner-full.png: New file.
12969         * artwork/banner/banner-rectangle.png: New file.
12970         * artwork/banner/banner.svg: New file.
12971         * artwork/banner/Bungee-Regular.ttf: New file.
12972         * artwork/banner/Raleway-license.txt: New file.
12973         * artwork/banner/banner-half.png: New file.
12974         * artwork/banner/banner-skyscraper.png: New file.
12975         * artwork/banner/Bungee-license.txt: New file.
12976         * artwork/banner/Raleway-ExtraBold.ttf: New file.
12977         * artwork/banner/Raleway-SemiBold.ttf: New file.
12978
12979 2017-06-08  Justus Winter  <justus@g10code.com>
12980
12981         common,gpg,sm: Restrict the use of algorithms according to CO_DE_VS.
12982         + commit a64a55e10420cf11e00062b590dffe5d0c3e8192
12983         * common/compliance.c (gnupg_pk_is_allowed): New function.
12984         (gnupg_cipher_is_allowed): Likewise.
12985         (gnupg_digest_is_allowed): Likewise.
12986         * common/compliance.h (enum pk_use_case): New definition.
12987         (gnupg_pk_is_allowed): New prototype.
12988         (gnupg_cipher_is_allowed): Likewise.
12989         (gnupg_digest_is_allowed): Likewise.
12990         * g10/decrypt-data.c (decrypt_data): Restrict use of algorithms using
12991         the new predicates.
12992         * g10/encrypt.c (encrypt_crypt): Likewise.
12993         * g10/gpg.c (main): Likewise.
12994         * g10/pubkey-enc.c (get_session_key): Likewise.
12995         * g10/sig-check.c (check_signature2): Likewise.
12996         * g10/sign.c (do_sign): Likewise.
12997         * sm/decrypt.c (gpgsm_decrypt): Likewise.
12998         * sm/encrypt.c (gpgsm_encrypt): Likewise.
12999         * sm/gpgsm.c (main): Likewise.
13000         * sm/sign.c (gpgsm_sign): Likewise.
13001         * sm/verify.c (gpgsm_verify): Likewise.
13002
13003         gpg: Fix computation of compliance with CO_DE_VS.
13004         + commit b03fab09e188f7bb10237d4f20455e4026737e4e
13005         * g10/mainproc.c (proc_encrypted): Symmetric encryption is also in
13006         compliance with CO_DE_VS.
13007
13008 2017-06-08  Werner Koch  <wk@gnupg.org>
13009
13010         dirmngr: Implement HTTP connect timeouts of 15 or 2 seconds.
13011         + commit 9b43220b8ad1a5c1cd51de3bbfff7ccbcc3fa877
13012         * dirmngr/dirmngr.c (oConnectTimeout, oConnectQuickTimeout): New
13013         enums.
13014         (opts): New options --connect-timeout and --connect-quick-timeout.
13015         (DEFAULT_CONNECT_TIMEOUT): New.
13016         (DEFAULT_CONNECT_QUICK_TIMEOUT): New.
13017         (parse_rereadable_options): Handle new options.
13018         (post_option_parsing): New.  Use instead of direct calls to
13019         set_debug() and set_tor_mode ().
13020         (main): Setup default timeouts.
13021         (dirmngr_init_default_ctrl): Set standard connect timeout.
13022         * dirmngr/dirmngr.h (opt): New fields connect_timeout and
13023         connect_quick_timeout.
13024         (server_control_s): New field timeout.
13025         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass timeout to
13026         http_raw_connect.
13027         * dirmngr/ks-engine-hkp.c (send_request): Call
13028         http_session_set_timeout.
13029         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
13030         * dirmngr/server.c (cmd_wkd_get, cmd_ks_search, cmd_ks_get)
13031         (cmd_ks_fetch): Implement --quick option.
13032
13033         dirmngr: Allow a timeout for HTTP and other TCP connects.
13034         + commit 5b9025cfa1f9b1c67ddf2f6bf87d863e780cf157
13035         * dirmngr/http.c: Include fcntl.h.
13036         (http_session_s): Add field 'connect_timeout'.
13037         (http_session_new): Clear that.
13038         (http_session_set_timeout): New function.
13039         (my_wsagetlasterror) [W32]: New.
13040         (connect_with_timeout): New function.
13041         (connect_server): Add arg 'timeout' and call connect_with_timeout.
13042         (send_request): Add arg 'timeout' and pass it to connect_server.
13043         (http_raw_connect): Add arg 'timeout'.
13044         (http_open): Pass TIMEOUT from the session to connect_server.
13045
13046         gpg: Avoid failure exit when scdaemon is disabled but not needed.
13047         + commit 17e5afd80f247c356f03c71e8b61da424ffedabb
13048         * g10/call-agent.c (warn_version_mismatch): Use log_info if error is
13049         "not supported".
13050
13051 2017-06-07  Justus Winter  <justus@g10code.com>
13052
13053         common: Add cipher mode to compliance predicate.
13054         + commit e051e396156211449568afa0ca7505dc13eaa3b4
13055         * common/compliance.c (gnupg_cipher_is_compliant): Add mode parameter.
13056         * common/compliance.h (gnupg_cipher_is_compliant): Likewise.
13057         * g10/mainproc.c (proc_encrypted): Adapt callsite.
13058         * sm/decrypt.c (gpgsm_decrypt): Likewise.
13059
13060         common,gpg,sm: Initialize compliance module.
13061         + commit 21fc2508c979a8202dd8ca7fa7b801e0d62a5ceb
13062         * common/compliance.c (gnupg_initialize_compliance): New function.
13063         * common/compliance.h (gnupg_initialize_compliance): New prototype.
13064         * g10/gpg.c (main): Use the new function.
13065         * sm/gpgsm.c (main): Likewise.
13066
13067         common,gpg: Move the compliance option printer.
13068         + commit f440cf73eab0b0e75e3cb2e8c9e70a77f20ef1dc
13069         * common/compliance.c (gnupg_compliance_option_string): New function.
13070         * common/compliance.h (gnupg_compliance_option_string): New prototype.
13071         * g10/encrypt.c (write_pubkey_enc_from_list): Update callsite.
13072         * g10/gpg.c (main): Likewise.
13073         * g10/keyedit.c (keyedit_menu): Likewise.
13074         * g10/pkclist.c (build_pk_list): Likewise.
13075         * g10/main.h (compliance_option_string): Remove prototype.
13076         * g10/misc.c (compliance_option_string): Remove function.
13077
13078         common,gpg,sm: Move the compliance option parser.
13079         + commit 842d233d408457cfa9a8473a6748472956f44e84
13080         * common/compliance.c (gnupg_parse_compliance_option): New function.
13081         * common/compliance.h (struct gnupg_compliance_option): New type.
13082         (gnupg_parse_compliance_option): New prototype.
13083         * g10/gpg.c (parse_compliance_option): Remove function.
13084         (compliance_options): New variable.
13085         (main): Adapt callsite.
13086         * sm/gpgsm.c (main): Use the new common function.
13087         * sm/gpgsm.h (opt): New field 'compliance'.
13088
13089         gpg: Improve compliance with CO_DE_VS.
13090         + commit 027ce4ba37be1d052bca2f6109fe810ef57f4038
13091         * g10/gpg.c (set_compliance_option): The specification, section 4.1.1,
13092         forbids the use of encryption without integrity protection.
13093
13094 2017-06-07  Andre Heinecke  <aheinecke@intevation.de>
13095
13096         speedo: Fix a minor memleak in the installer.
13097         + commit 13dc75a4e7cc2959003c08940fc53c6ece7b77e4
13098         * build-aux/speedo/w32/g4wihelp.c (path_remove): Free path_new on
13099         early return.
13100
13101 2017-06-06  Andre Heinecke  <aheinecke@intevation.de>
13102
13103         speedo: Fix source tar call ambiguity.
13104         + commit 96acbdd7265f504d06783adfd6322a6675c41c0a
13105         * build-aux/speedo.mk (dist-source): Expand exclude-vc to
13106         exclude-vcs.
13107
13108 2017-06-01  Justus Winter  <justus@g10code.com>
13109
13110         gpg: Report compliance with CO_DE_VS.
13111         + commit be8ca8852629786266db4d3d69b2c2fb03bd6365
13112         * common/compliance.c (gnupg_pk_is_compliant): Add DSA with certain
13113         parameters.
13114         (gnupg_cipher_is_compliant): New function.
13115         (gnupg_digest_is_compliant): Likewise.
13116         * common/compliance.h (gnupg_cipher_is_compliant): New prototype.
13117         (gnupg_digest_is_compliant): Likewise.
13118         * common/status.h (STATUS_DECRYPTION_COMPLIANCE_MODE): New status.
13119         (STATUS_VERIFICATION_COMPLIANCE_MODE): Likewise.
13120         * doc/DETAILS: Document the new status lines.
13121         * g10/mainproc.c (proc_encrypted): Compute compliance with CO_DE_VS
13122         and report that using the new status line.
13123         (check_sig_and_print): Likewise.
13124         * sm/decrypt.c (gpgsm_decrypt): Likewise.
13125         * sm/verify.c (gpgsm_verify): Likewise.
13126
13127         common: Improve checking for compliance with CO_DE_VS.
13128         + commit 3b70f62423041e614332b90d782576ee6868a030
13129         * common/compliance.c (gnupg_pk_is_compliant): Only certain RSA key
13130         sizes are compliant.
13131
13132         gpg,common: Move the compliance framework.
13133         + commit 8a012280e0f0a462c094d106355aa436fceb1b76
13134         * common/Makefile.am (common_sources): Add new files.
13135         * common/compliance.c: New file.  Move 'gnupg_pk_is_compliant' here,
13136         and tweak it to not rely on types private to gpg.
13137         * common/compliance.h: New file.  Move the compliance enum here.
13138         * g10/keylist.c (print_compliance_flags): Adapt callsite.
13139         * g10/main.h (gnupg_pk_is_compliant): Remove prototype.
13140         * g10/misc.c (gnupg_pk_is_compliant): Remove function.
13141         * g10/options.h (opt): Use the new compliance enum.
13142         * sm/keylist.c (print_compliance_flags): Use the common functions.
13143
13144 2017-05-31  Justus Winter  <justus@g10code.com>
13145
13146         gpg: Fix compliance computation.
13147         + commit 02af509dfc2b893720aa0c7b380fd7736b2bafd0
13148         * g10/misc.c (gnupg_pk_is_compliant): Compare against CO_RFC2440, not
13149         RFC2440 which is actually a predicate.
13150
13151         sm: Simplify code.
13152         + commit f9cb15b385f64f7c9403670f03632f81a874f213
13153         * sm/verify.c (gpgsm_verify): Simplify by using a newer gcrypt
13154         interface.
13155
13156         doc: Improve documentation.
13157         + commit 485b5a6e6dfe7aa545afa926e060d516ae911e42
13158         * doc/gpgsm.texi: Mention that '--with-key-data' implies
13159         '--with-colons'.
13160
13161 2017-05-31  NIIBE Yutaka  <gniibe@fsij.org>
13162
13163         agent: Fix error from do_encryption.
13164         + commit c03e0eb01dc4632432d0472a6f8051142082bea4
13165         * agent/protect.c (do_encryption): Don't mask failure of OUTBUF
13166         allocation.
13167
13168         scd: Fix error code on failure at usb_init.
13169         + commit 8defb21d34410d000c8b776e0e3a1edd04762638
13170         * scd/ccid-driver.c (ccid_dev_scan): Return GPG_ERR_ENODEV.
13171
13172         scd: Handle a failure of libusb_init.
13173         + commit 5c33649782bf255af5a55f16eac5e85f059b00bf
13174         * scd/ccid-driver.c (ccid_get_reader_list, ccid_dev_scan): Handle
13175         failure.
13176
13177 2017-05-30  Andre Heinecke  <aheinecke@intevation.de>
13178
13179         gpg: Disable keydb handle caching.
13180         + commit d3d640b9cc98dd0d06b49a2e4d46eb67af96fe29
13181         * g10/getkey.c (getkey_end): Disable caching of the open keydb
13182         handle.
13183
13184 2017-05-30  NIIBE Yutaka  <gniibe@fsij.org>
13185
13186         agent: Fix memory leaks.
13187         + commit 996544626ea416c173a940db47f47f9e5cbd844c
13188         * agent/divert-scd.c (ask_for_card): Free WANT_KID and WANT_SN_DISP.
13189         * agent/gpg-agent.c (create_server_socket): Free UNADDR.
13190
13191 2017-05-25  Werner Koch  <wk@gnupg.org>
13192
13193         dirmngr: This towel should better detect a changed resolv.conf.
13194         + commit de3a0988ef9addccd6b5c7950fb8797afbc3978d
13195         * dirmngr/dns-stuff.c (resolv_conf_changed_p): Fix initialization time
13196         issue.
13197
13198         dirmngr: Re-init libdns resolver on towel change of resolv.conf.
13199         + commit b5f356e9fba2d99909f8f54d7b7e6836bed87b68
13200         * dirmngr/dns-stuff.c: Include sys/stat.h.
13201         (RESOLV_CONF_NAME): New macro to replace a string.
13202         (resolv_conf_changed_p): New.
13203         (libdns_init): Call new function
13204         (libdns_res_open): Ditto.
13205
13206 2017-05-24  Justus Winter  <justus@g10code.com>
13207
13208         agent: Make digest algorithms for ssh fingerprints configurable.
13209         + commit 525f2c482abb6bc2002eb878b03558fb43e6b004
13210         * agent/agent.h (opt): New field 'ssh_fingerprint_digest'.
13211         * agent/command-ssh.c (data_sign, ssh_identity_register): Honor the
13212         option for strings used to communicate with the user.
13213         * agent/findkey.c (agent_modify_description): Likewise.
13214         * agent/gpg-agent.c (cmd_and_opt_values): New value.
13215         (opts): New option '--ssh-fingerprint-digest'.
13216         (parse_rereadable_options): Set the default to MD5 for now.
13217         (main): Handle the new option.
13218         * doc/gpg-agent.texi: Document the new option.
13219
13220         agent: Write both ssh fingerprints to 'sshcontrol' file.
13221         + commit a5f046d99a084b6a95268f03c1b588e8b78083cb
13222         * agent/command-ssh.c (add_control_entry): Hand in the key, write both
13223         the MD5- and the SHA256-based fingerprint to the 'sshcontrol' file
13224         when adding ssh keys.
13225         (ssh_identity_register): Adapt callsite.
13226
13227         common: Correctly render SHA256-based ssh fingerprints.
13228         + commit 3a07a69dfc87b4fff610740d3dde8e23f0d2f8bc
13229         * common/ssh-utils.c (dummy_realloc): New function.
13230         (dummy_free): Likewise.
13231         (get_fingerprint): Prepend the fingerprint with the name of the digest
13232         algorithm.  Correctly render SHA256-based ssh fingerprints.
13233         * common/t-ssh-utils.c (sample_keys): Add SHA256 hashes for the keys.
13234         (main): Add an option to dump the keys to gather fingerprints, also
13235         print the SHA256 fingerprint for keys given as arguments, and check
13236         the SHA256 fingerprints of the test keys.
13237
13238         common: Support different digest algorithms for ssh fingerprints.
13239         + commit 3ac1a9d3a018816233a855faff059b4e0657a0f1
13240         * common/ssh-utils.c (get_fingerprint): Add and honor 'algo' parameter.
13241         (ssh_get_fingerprint{,_string}): Likewise.
13242         * common/ssh-utils.h (ssh_get_fingerprint{,_string}): Update prototypes.
13243         * common/t-ssh-utils.c (main): Adapt accordingly.
13244         * agent/command-ssh.c (agent_raw_key_from_file): Likewise.
13245         (ssh_identity_register): Likewise.
13246         * agent/command.c (do_one_keyinfo): Likewise.
13247         * agent/findkey.c (modify_description): Likewise.
13248
13249 2017-05-22  NIIBE Yutaka  <gniibe@fsij.org>
13250
13251         agent: Add const qualifier for read-only table.
13252         + commit 509e4a4d7491daf496b21e5892f4f63ab90e8e21
13253         * agent/call-pinentry.c (start_pinentry): Add const to tbl.
13254         * agent/command-ssh.c (request_specs): Add const.
13255         (ssh_key_types): Likewise.
13256         (request_spec_lookup): Add const to the return value and SPEC.
13257         (ssh_request_process): Likewise.
13258         * agent/protect.c (protect_info): Add const.
13259         (agent_unprotect): Add const to algotable.
13260
13261         g10: Fix default-key selection for signing, possibly by card.
13262         + commit fbb2259d22e6c6eadc2af722bdc52922da348677
13263         * g10/call-agent.c (warn_version_mismatch): Revert.
13264         (start_agent): Suppress version mismatch if relevant.
13265         * g10/getkey.c (get_seckey_default_or_card): New.
13266         * g10/skclist.c (build_sk_list): Use get_seckey_default_or_card.
13267
13268 2017-05-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
13269
13270         doc: Fix spellings.
13271         + commit 3713f67026467f63f80649c92ac4cc7973589855
13272
13273
13274         docs: Point to https://dev.gnupg.org/ .
13275         + commit 705da1eb23aef92c42d6d657b20a0984b104f72f
13276         Replace mentions of bugs.gnupg.org with https://dev.gnupg.org/.  Since
13277         the project has transitioned to a better workflow for supporting
13278         contributions, we should ensure that our documentation points to the
13279         right place.
13280
13281 2017-05-17  Justus Winter  <justus@g10code.com>
13282
13283         gpgscm: Fix checking for opcode arguments.
13284         + commit aae50e0b6a61549e226e0c7785260ad517f0ffff
13285         * tests/gpgscm/scheme.c (Eval_Cycle): Update 'pcd' after dispatching
13286         an instruction.
13287
13288         tests: Fix agent teardown in release builds.
13289         + commit 0e1729bb993648deca84a2664ae78edc848d7003
13290         * tests/openpgp/defs.scm (start-agent,stop-agent): Use gpg-conf which
13291         will properly use the '--build-prefix' argument to make gpgconf use
13292         tools from the build directory.
13293
13294 2017-05-17  NIIBE Yutaka  <gniibe@fsij.org>
13295
13296         g10: Fix gpgcompose.c.
13297         + commit ae95a7f5335e605fcd71fbe4a18ed384c88d590a
13298         * g10/gpgcompose.c (show_help): Check return value.
13299
13300         g10: Suppress error for card availability check.
13301         + commit a8dd96826f8484c0ae93c954035b95c2a75c80f2
13302         * g10/call-agent.c (start_agent): Add semantics for card; Suppress
13303         error for card check.
13304         (warn_version_mismatch): Ignore an error for scdaemon.
13305         (agent_scd_serialno): Call start_agent with
13306         FLAG_FOR_CARD_SUPPRESS_ERRORS.
13307
13308 2017-05-16  Justus Winter  <justus@g10code.com>
13309
13310         tests: Configure the environments to use scdaemon from build tree.
13311         + commit 386a7bbb245dd3ab7c4156a554adbe75d82bdf49
13312         * tests/gpgme/gpgme-defs.scm: Use the scdaemon from the build tree
13313         when writing a 'gpg-agent.conf'.
13314         * tests/gpgsm/gpgsm-defs.scm: Likewise.
13315         * tests/openpgp/defs.scm: Likewise.
13316
13317 2017-05-15  Werner Koch  <wk@gnupg.org>
13318
13319         Release 2.1.21.
13320         + commit 9574820329128f0ea8a98f9bfc0e77c73c3e0ec0
13321
13322
13323         po: Update German translation.
13324         + commit 4bd079dbdb44067688377156413dd32a82a89d22
13325
13326
13327         gpg: Do not mark ", " translatable.
13328         + commit 2d381b0f0ba97657e9fb2971eca6648bb77dd2cc
13329         * g10/tofu.c (ask_about_binding): Remove useless translation markers.
13330
13331 2017-05-15  Andre Heinecke  <aheinecke@intevation.de>
13332
13333         dirmngr,w32: Fix ldap crl read on windows.
13334         + commit abe3a9043f86b48b92ddcec47197e032e35a6f4f
13335         Summary:
13336         * dirmngr/ldap-wrapper-ce.c (outstream_cookie_s): Add buffer_read_pos.
13337         (buffer_get_data): Use seperate read pos.
13338
13339 2017-05-15  Werner Koch  <wk@gnupg.org>
13340
13341         common: Let format_text return an error.
13342         + commit 00b7767bc6fe309aa20375c859ebf708cfc7b9ea
13343         * common/stringhelp.c (format_text): Return NULL on error.
13344         * common/t-stringhelp.c (test_format_text): Adjust for change.
13345         * g10/gpgcompose.c (show_help): Abort on out of core.
13346         * g10/tofu.c (ask_about_binding): Abort on format_text error.
13347         (show_statistics): Ditto.
13348         (show_warning): Ditto.
13349
13350 2017-05-11  Justus Winter  <justus@g10code.com>
13351
13352         tests: Also run all OpenPGP tests using keyrings.
13353         + commit bc01d62dc5d520e138499df5d80fb50f9e87e3e8
13354         * tests/openpgp/all-tests.scm: Run each test twice, once with public
13355         keys stored in a keybox, once with a keyring.
13356         * tests/openpgp/defs.scm (create-gpghome): Create a public keyring to
13357         make GnuPG use that instead of creating a keybox if '--use-keyring' is
13358         given.
13359         * tests/openpgp/setup.scm: Fix flag handling and usage.
13360
13361         tests: Make it possible to run all tests using our infrastructure.
13362         + commit f4365790daa1d1400c7f0fe73ac9a6d25f0c6d0a
13363         * Makefile.am (TESTS_ENVIRONMENT): New variable.
13364         (check-all): New phony target to run all tests.
13365         * tests/gpgme/gpgme-defs.scm (have-gpgme?): New function that tests
13366         whether the GPGME test suite is available instead of exiting the
13367         process.
13368         * tests/gpgscm/init.scm (export): New macro.
13369         * tests/gpgscm/tests.scm (run-tests): New function.
13370         (load-tests): Likewise.
13371         * tests/gpgme/run-tests.scm: Simplify and move the parsing of the list
13372         of tests to 'all-tests.scm'.
13373         * tests/gpgsm/run-tests.scm: Likewise.
13374         * tests/migrations/run-tests.scm: Likewise.
13375         * tests/openpgp/run-tests.scm: Likewise.
13376         * tests/gpgme/Makefile.am: To select the tests to run, use the
13377         variable 'TESTS'.  This harmonizes the interface with the automake
13378         test suite.
13379         * tests/gpgsm/Makefile.am: Likewise.
13380         * tests/migrations/Makefile.am: Likewise.
13381         * tests/openpgp/Makefile.am: Likewise.
13382         * tests/openpgp/README: Likewise.
13383         * agent/all-tests.scm: New file.
13384         * common/all-tests.scm: Likewise.
13385         * g10/all-tests.scm: Likewise.
13386         * g13/all-tests.scm: Likewise.
13387         * tests/gpgme/all-tests.scm: Likewise.
13388         * tests/gpgsm/all-tests.scm: Likewise.
13389         * tests/migrations/all-tests.scm: Likewise.
13390         * tests/openpgp/all-tests.scm: Likewise.
13391         * tests/run-tests.scm: Likewise.
13392
13393         tests: Move the makefile parser.
13394         + commit 78d6a25a2db22ad2ae30d57ca980c0400cfef726
13395         * tests/gpgme/gpgme-defs.scm (parse-makefile, parse-makefile-expand):
13396         Move...
13397         * tests/gpgscm/makefile.scm: ... here.
13398         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
13399
13400         gpgscm: Make it possible to set the logfile name.
13401         + commit 29ef34cc4cb23e7b743dbf4cc8e5761f06076b9a
13402         * tests/gpgscm/tests.scm (test): Only set the default log filename
13403         when it has not been set before.
13404
13405 2017-05-10  NIIBE Yutaka  <gniibe@fsij.org>
13406
13407         g10, sm, dirmngr, common: Add comment for fall through.
13408         + commit 0ce94a9698104d9bfc73d5a37478189564c96eb4
13409         * common/b64dec.c (b64dec_proc): Comment to clarify.
13410         * dirmngr/cdblib.c (cdb_make_put): Use same pattern to clarify.
13411         * dirmngr/dirmngr-client.c (read_pem_certificate): Likewise.
13412         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Likewise.
13413         * g10/armor.c (unarmor_pump): Likewise.
13414         * g10/gpg.c (main): Likewise.
13415         * g10/import.c (read_block): Likewise.
13416         * g10/keygen.c (make_backsig): Likewise.
13417         * g10/pkclist.c (check_signatures_trust):  Likewise.
13418         * sm/gpgsm.c (main): Likewise.
13419
13420         g10: Stop compiler warning for t-stutter.
13421         + commit 98b759119c81c5b39f34f8a9a7b6a57e91ad6470
13422         * g10/t-stutter.c (do_test): Refer current_test_group_failed.
13423
13424 2017-05-08  Justus Winter  <justus@g10code.com>
13425
13426         gpg: Properly account for ring trust packets.
13427         + commit 22739433e98be80e46fe7d01d52a9627c1aebaae
13428         * g10/keyring.c (keyring_get_keyblock): Use the parser's packet count
13429         instead of counting ourself.
13430         * g10/packet.h (struct parse_packet_ctx_s): New field
13431         'n_parsed_packets'.
13432         (init_parse_packet): Initialize new field.
13433         * g10/parse-packet.c (parse): Count packets.
13434
13435 2017-05-04  Justus Winter  <justus@g10code.com>
13436
13437         tests: Support tests that are expected to fail.
13438         + commit d6b46462f8c5c705ffb7cf8af03465a926aa11d3
13439         * tests/gpgscm/tests.scm (test-pool): Rework reporting.  Filter using
13440         the computed test status instead of the return value.  Also print the
13441         new categories 'failed expectedly' and 'passed unexpectedly'.
13442         (test): If a test ends with a bang (!), it is expected to fail.  Adapt
13443         status, status-string, and xml accordingly.
13444
13445         tests: Add function to dump packets.
13446         + commit eab0138e3179f247180a639a91570e5ee2c6ad0e
13447         * tests/openpgp/defs.scm (gpg-dump-packets): New function.
13448
13449 2017-05-03  Andre Heinecke  <aheinecke@intevation.de>
13450
13451         speedo,w32: Fix silent user mode installation.
13452         + commit d378cc34a8d3d5053cf0c5ac7aa731c1bcefee22
13453         * build-aux/speedo/w32/inst.nsi (AddToPath): Move account
13454         check here.
13455         (PrintNonAdminWarning): Remove is_user_install variable.
13456
13457 2017-05-03  Justus Winter  <justus@g10code.com>
13458
13459         gpgscm: Create and re-use frame objects.
13460         + commit 8a168a6d4052ec31fed77c79bb96ffdd32bf9646
13461         * tests/gpgscm/scheme-private.h (struct scheme): New field
13462         'frame_freelist'.
13463         * tests/gpgscm/scheme.c (enum scheme_types): New type 'T_FRAME'.
13464         (type_to_string): Handle new type.
13465         (settype): New macro.
13466         (gc_disable): Make sure there is at least one frame in the free list.
13467         (mark): Handle frame objects.
13468         (finalize_cell): Likewise.
13469         (dump_stack_initialize): Initialize free list.
13470         (dump_stack_free): Simplify.
13471         (frame_length): New variable.
13472         (dump_stack_make_frame): New function.
13473         (frame_slots): Likewise.
13474         (frame_payload): New macro.
13475         (dump_stack_allocate_frame): New function.
13476         (dump_stack_deallocate_frame): Likewise.
13477         (dump_stack_preallocate_frame): Likewise.
13478         (_s_return): Unpack frame object and deallocate it.
13479         (s_save): Wrap state in an frame object.
13480         (dump_stack_mark): Mark the free list.
13481
13482         gpgscm: Merge opexe_0.
13483         + commit 9c6407d17e0cb9f4a370b1b83e7816577ec7d29d
13484         * tests/gpgscm/scheme-private.h (struct scheme): Remove field 'op'.
13485         * tests/gpgscm/scheme.c (opexe_0): Inline into 'Eval_Cycle'.
13486         (_Error_1): Return the opcode to evaluate next.
13487         (Error_1): Do not return, but set the opcode and goto dispatch.
13488         (Error_0): Likewise.
13489         (s_goto): Likewise.
13490         (s_return): Likewise.
13491         (s_return_enable_gc): Likewise.
13492         (s_thread_to): Remove superfluous cast.
13493         (_s_return): Return the opcode to evaluate next.
13494         (scheme_init_custom_alloc): Adapt to removal of field 'op'.
13495
13496 2017-05-03  Andre Heinecke  <aheinecke@intevation.de>
13497
13498         speedo,w32: Allow installation as normal user.
13499         + commit cacfd4bce94704b531f68ee76fb40789e44fde67
13500         * build-aux/speedo/w32/g4wihelp.c (ENV_HK_USER, ENV_REG_USER):
13501         New defines.
13502         (path_add): Handle is_user_install variable. Don't abort
13503         if Path reg key does not exist. Fix crash if Path reg key
13504         does not contain a semicolon.
13505         (path_remove): Handle is_user_install variable. Fix crash
13506         if Path reg key does not exist.
13507         * build-aux/speedo/w32/inst.nsi: Remove obsolete HAVE_STARTMENU
13508         this was double guarded with WITH_GUI. Add Multiuser plugin and
13509         defines for this. Use SHCTX instead of HKLM / HKCU.
13510         (PrintNonAdminWarning): Only Warn and don't abort.
13511
13512 2017-05-02  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
13513
13514         g10: Remove skeleton options files.
13515         + commit 201f86803017c1db373023f7b506d4a0dc644bbc
13516         * build-aux/speed/w32/inst.nsi: stop installing skeleton files.
13517         * doc/gpg.texi: stop documenting skeleton files.
13518         * g10/Makefile.am: stop installing skeleton files.
13519         * g10/openfile.c (copy_options_file): Remove.
13520         (try_make_homedir): do not call copy_options_file.
13521
13522 2017-04-27  NIIBE Yutaka  <gniibe@fsij.org>
13523
13524         g10: For signing, prefer available card key when no -u option.
13525         + commit 97a2394ecafaa6f58e4a1f70ecfd04408dc15606
13526         * g10/skclist.c (build_sk_list): Ask gpg-agent if card is available.
13527         Then, use the card key if any.
13528
13529 2017-04-26  NIIBE Yutaka  <gniibe@fsij.org>
13530
13531         g10: Minor clean up.
13532         + commit 2262a80c5f44433a08bc0e21b77d9efe51596f21
13533         * g10/main.h (complete_sig): Remove declaration.
13534         * g10/sign.c (complete_sig): Make it static.
13535
13536 2017-04-25  NIIBE Yutaka  <gniibe@fsij.org>
13537             Tomas Mraz
13538
13539         dirmngr: Fix aliasing problem in dns.c.
13540         + commit 247932f367f856e7ce91528e14f0aaf838150857
13541         * dirmngr/dns.c (dns_ai_setent): Care about aliasing.
13542
13543 2017-04-25  NIIBE Yutaka  <gniibe@fsij.org>
13544
13545         tests: Remove *.conf.tmpl from Makefile.
13546         + commit 7851d73fd7f424f9a649690e1cb3055feb792c51
13547         * tests/openpgp/Makefile.am (TEST_FILES): Remove gpg.conf.tmpl
13548         and gpg-agent.conf.tmpl.
13549
13550         g10: invalidate the fd cache for keyring.
13551         + commit 116cfd60779fbb3540da629db54dc2e148f4a3a2
13552         * g10/keyring.c (keyring_search_reset): Don't keep the FD cache.
13553
13554 2017-04-24  Andre Heinecke  <aheinecke@intevation.de>
13555
13556         w32: Enable wildcard expansion with mingw-w64.
13557         + commit 2e71bf30f038ca0e142acbb6f650ce029105f8a2
13558         * g10/gpg.c: Define _dowildcard = -1;
13559
13560 2017-04-24  Justus Winter  <justus@g10code.com>
13561
13562         tests: Fix Python detection.
13563         + commit ef1922b3b19df0aa7f8c15d503c603f76fc13f82
13564         * tests/gpgme/gpgme-defs.scm (python): Fix Python detection.
13565
13566         gpgscm: Refactor cell finalization.
13567         + commit d2f6798621d751cd6ae6f091c4a2af4569c5b8aa
13568         * tests/gpgscm/scheme.c (finalize_cell): Use switch, return whether
13569         the cell may be freed.
13570         (gc): Update callsite.
13571
13572         gpgscm: Tweak error message display.
13573         + commit 78547bfe8a885579438a17abadca02b62cce2844
13574         * tests/gpgscm/init.scm (throw'): If the first argument to the error
13575         is a string, display it as such.
13576
13577         tests: Deduplicate and simplify code.
13578         + commit 06a177ceea529269a7404740c60416bd6a4567b1
13579         * tests/gpgme/gpgme-defs.scm (create-file): Move...
13580         * tests/gpgsm/gpgsm-defs.scm (create-file): ... likewise...
13581         * tests/openpgp/defs.scm (create-file): Here.
13582         (create-gpghome): Use 'create-file'.
13583         * tests/openpgp/gpg-agent.conf.tmpl: Delete file.
13584         * tests/openpgp/gpg.conf.tmpl: Likewise.
13585
13586         gpgscm: Fix test.
13587         + commit 9ae63b9caefdf3e925c5928667fcd9227132d27f
13588         * tests/gpgscm/t-child.scm: Use 'string-length' on the string.
13589
13590         gpgscm: Improve syntax checking.
13591         + commit 4aab0e6ac7f2887a6f38f0cb95365dd7c30b4b18
13592         * tests/gpgscm/scheme.c (opexe_0): Make sure closure arguments are
13593         symbols.
13594
13595         gpgscm: Emit JUnit-style XML reports.
13596         + commit ee715201ae784e840b6136393289e6dbd6f4c540
13597         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
13598         * tests/gpgscm/lib.scm (string-translate): New function.
13599         * tests/gpgscm/main.c (main): Load new file.
13600         * tests/gpgscm/tests.scm (dirname): New function.
13601         (test-pool): Record execution times, emit XML report.
13602         (test): Record execution times, record log file name, emit XML report.
13603         (run-tests-parallel): Write XML report.
13604         (run-tests-sequential): Likewise.
13605         * tests/gpgscm/xml.scm: New file.
13606         * tests/gpgme/Makefile.am (CLEANFILES): Add 'report.xml'.
13607         * tests/gpgsm/Makefile.am: Likewise.
13608         * tests/migrations/Makefile.am: Likewise.
13609         * tests/openpgp/Makefile.am: Likewise.
13610
13611         gpgscm: Make logging less verbose and more useful.
13612         + commit 679920781a25ae5c0e49d4bd78e6926fd661778f
13613         * tests/gpgscm/tests.scm (call-with-io): When being verbose, include
13614         the pid in the output, and avoid duplicating the command arguments.
13615
13616         gpgscm: Make test framework less functional.
13617         + commit a71f4142e13e2cc26ef0cd62f56a1ccb7ce678ee
13618         * tests/gpgscm/tests.scm (test-pool, tests): Previously, these methods
13619         updated objects by creating new updated copies of the object being
13620         manipulated.  This made the code awkward without any benefit,
13621         therefore I change it to just update the object.
13622
13623         gpgscm: Move 'trace' and 'stringify'.
13624         + commit f03d6897be904da58cad76b4bd07729922b47616
13625         * tests/gpgscm/tests.scm (trace, stringify): Move...
13626         * tests/gpgscm/lib.scm: ... here.
13627
13628         gpgscm: Avoid fruitless garbage collection cycles.
13629         + commit 245860ecaf8b9e82ca577385abd453ac92ffcd26
13630         * tests/gpgscm/scheme-private.h (CELL_MINRECOVER): New macro.
13631         * tests/gpgscm/scheme.c (_get_cell): Move the heuristic to get more
13632         cells...
13633         (gc): ... here where every caller benefits from the optimization.
13634
13635 2017-04-20  NIIBE Yutaka  <gniibe@fsij.org>
13636
13637         g13: Fix for Solaris.
13638         + commit 10519270d36586c536bfb6c4cda8ac17c01f4976
13639         * configure.ac: Check sys/mkdev.h.
13640         * g13/sh-dmcrypt.c: Include sys/mkdev.h.
13641
13642 2017-04-18  NIIBE Yutaka  <gniibe@fsij.org>
13643
13644         dirmngr: Fix final close of LISTEN_FD.
13645         + commit 4b2581dc0ea1d03e70023bb0748aa0c21c0a2173
13646         * dirmngr/dirmngr.c (handle_connections): Close LISTEN_FD.
13647
13648         dirmngr: Fix API difference for Windows.
13649         + commit 0d0a7efa8fa0accc1da851917376e2328ef33c96
13650         * dirmngr/http.c (read_server, write_server): Use assuan_fd_t.
13651         (http_wait_response): Use FD2INT to get unsigned integer fd.
13652         (read_server, write_server): Likewise.
13653         (simple_cookie_read, simple_cookie_write): Use assuan_fd_t.
13654
13655 2017-04-17  NIIBE Yutaka  <gniibe@fsij.org>
13656
13657         agent: More minor change.
13658         + commit 9296aed4bd2ad09d23339e658264e557c5312585
13659         * agent/command.c (cmd_pksign): Remove redundant assignment.
13660
13661         agent: Minor cleanup.
13662         + commit 45c52cca1401b930878a8f901b63cfbb22e9e327
13663         * agent/command-ssh.c (ssh_key_to_protected_buffer): Not touch ERR.
13664         * agent/command.c (cmd_genkey, cmd_import_key): Clean up.
13665
13666         tests: Minor memory fix.
13667         + commit b9440aa3693a4bb91e1ba8ff09e2d93ff22dd70a
13668         * tests/openpgp/fake-pinentry.c (get_passphrase): Free the memory.
13669
13670         g10: Fix parse_ring_trust.
13671         + commit 256e861bce3dc9aba8fab4df47a40cae3bede175
13672         * g10/parse-packet.c (parse_ring_trust): Fix condition.
13673
13674         g10: Minor fixes.
13675         + commit 0dec0cc281dfa26db89f8cc5ee002dea5c2b2e81
13676         * g10/export.c (cleartext_secret_key_to_openpgp): No initialization.
13677         (do_export_one_keyblock): Initialize with GPG_ERR_NOT_FOUND.
13678         * g10/getkey.c (get_best_pubkey_byname): Add non-null check.
13679         * g10/tofu.c (tofu_set_policy): ERR initialize to 0.
13680
13681         g10: Fix import/export filter property match.
13682         + commit af5f8ecf51f5e1f33e832d4946d02313b78a0536
13683         * g10/import.c (impex_filter_getval): Fix to "else if".
13684
13685 2017-04-14  NIIBE Yutaka  <gniibe@fsij.org>
13686
13687         agent: Clean up error initialize/return.
13688         + commit 36c4e540f1a4992675ee6e0acca1231325457079
13689         * agent/call-pinentry.c (start_pinentry): Return RC.
13690         * agent/command-ssh.c (ssh_handler_request_identities): Don't set ERR.
13691         * agent/findkey.c (try_unprotect_cb): Return ERR.
13692         (unprotect): Don't set RC.
13693         * agent/gpg-agent.c (handle_connections): Don't set fd.
13694
13695         dirmngr: More fix for test program.
13696         + commit adb77d095b3958482863a17c83746f33945638dc
13697         * dirmngr/t-http.c (main): Care about no TLS.
13698
13699         dirmngr: More fix for Windows.
13700         + commit 4771bad610eb59e701fe8e53468e2af22d45eeb0
13701         * dirmngr/http.c (simple_cookie_read, simple_cookie_write): Only
13702         valid with HTTP_USE_NTBTLS.
13703         (_my_socket_new): Simply cast to int since it's for debug.
13704         (_my_socket_ref, _my_socket_unref): Likewise.
13705
13706 2017-04-13  NIIBE Yutaka  <gniibe@fsij.org>
13707
13708         dirmngr: Fix http.c for sockaddr_storage.
13709         + commit 86dcb03134fd4957d51ebaa06b7991239f9ee56a
13710         dirmngr/http.c (use_socks): Use sockaddr_storage.
13711         (my_sock_new_for_addr, connect_server): Likewise.
13712
13713         dirmngr: Fix alignment of ADDR.
13714         + commit 892b33bb2c57785927ea6652091191da2deed464
13715         * dirmngr/dns-stuff.h (dns_addrinfo_s): Use struct sockaddr_storage
13716         for size and alignment.
13717         * dirmngr/dns-stuff.c (resolve_name_libdns): Follow the change.
13718         (resolve_dns_name): Use struct sockaddr_storage.
13719         (resolve_addr_standard, resolve_dns_addr): Likewise.
13720         (resolve_dns_addr): Likewise.
13721
13722         dirmngr: Fix thread key type.
13723         + commit 37018adce6ea4920b34d59afcfe4f55f716b3086
13724         * dirmngr/dirmngr.c (my_tlskey_current_fd): Use npth_key_t.
13725
13726         common, g10: Fix enumeration types.
13727         + commit 74258278efacd7069e8c1df8ff6fc3f4675d713e
13728         * common/openpgpdefs.h (CIPHER_ALGO_PRIVATE10, PUBKEY_ALGO_PRIVATE10)
13729         (DIGEST_ALGO_PRIVATE10, COMPRESS_ALGO_PRIVATE10): New.
13730         * g10/misc.c (map_pk_gcry_to_openpgp): Add type conversion.
13731         (map_cipher_openpgp_to_gcry, openpgp_cipher_algo_name)
13732         (openpgp_pk_test_algo2, map_md_openpgp_to_gcry)
13733         (pubkey_get_npkey): Add default handling.
13734
13735         dirmngr: More fix for Windows.
13736         + commit 5af104b541ed430a54eb0163a1d29e1d043f9377
13737         * dirmngr/dns.c (socket_fd_t, STDCALL): New.
13738         (dns_te_initname): Use.
13739
13740 2017-04-12  NIIBE Yutaka  <gniibe@fsij.org>
13741
13742         dirmngr: Fix type of sock.
13743         + commit 6755b3b505f79a5a233b18e85f57a0d3a455e664
13744         * dirmngr/http.c (send_request): Use assuan_fd_t for SOCK.
13745
13746         tools: Fix condition for gpg-connect-agent.
13747         + commit f52f6af834cc488d11612e349e4af023d69a45f4
13748         * tools/gpg-connect-agent.c (start_agent): Add paren.
13749
13750         dirmngr: Fix possible null reference.
13751         + commit 7ae1857c90ab43ad9e31f0fb6dbd37f25cc37278
13752         * dirmngr/dns.c (dns_error_t dns_trace_fput): Check NULL.
13753
13754         common: Simplify format_text.
13755         + commit 7b4edf14bb16fbe786e55b829a208960396ce8df
13756         * common/stringhelp.c (format_text): Don't allow IN_PLACE formatting.
13757         * common/stringhelp.h: Change the API with no IN_PLACE.
13758         * common/t-stringhelp.c (test_format_text): Follow the change.
13759         * g10/gpgcompose.c (show_help): Likewise.
13760         * g10/tofu.c (format_conflict_msg_part1, ask_about_binding)
13761         (show_statistics, show_warning): Likewise.
13762
13763         gpgscm: Fix test program.
13764         + commit 7f9032d4a8ce53ce1a972bd3c1f8d20b3776756b
13765         * tests/gpgscm/t-child.c (main): Fix for setmode.
13766
13767         dirmngr: Fix plus1_ns.
13768         + commit 60d9a9e6b4ae3af029596d14732c02f49203326d
13769         * dirmngr/dns.c (plus1_ns): Fix the initial implementation.
13770
13771         scd: Handle unexpected suspend/resume by CCID driver.
13772         + commit f053f99ed0b0c6de7b7c4a07cbd7f7d213ddf0db
13773         * scd/ccid-driver.c (bulk_in): Handle unexpected failure.
13774
13775         dirmngr: Fix dns-stuff.c in another way.
13776         + commit bd0c94939faf8ccfc117fb595e9bc0105edcafa4
13777         * dirmngr/dns-stuff.c (T_CERT): Define our own.
13778
13779         Revert "dirmngr: Fix dns-stuff.c."
13780         + commit 0b904ddea8bddaa2fd7893a9dce1df1cb5e36b00
13781         This reverts commit 1538523156be568046f632d1775eae30ea8bd556.
13782
13783         dirmngr: Fix dns-stuff.c.
13784         + commit 1538523156be568046f632d1775eae30ea8bd556
13785         * dirmngr/dns-stuff.c: Don't include arpa/nameser.h.
13786
13787         agent: Simplify stream_read_cstring.
13788         + commit c64763c3a74ecc61c2f6c5edb679a2a3879d79e7
13789         * agent/command-ssh.c (stream_read_cstring): Just call
13790         stream_read_string.
13791
13792         dirmngr: Use a function to increment network short.
13793         + commit 64904ce627b6b0661acf15b5b70103c4842bb0f3
13794         * dirmngr/dns.c (plus1_ns): New.
13795         (dns_p_push): Use it.
13796
13797         g10: Minor clean up for export.c.
13798         + commit 05218829589f6d4b09933fa19f568c2019367d5c
13799         * g10/export.c (export_ssh_key): Check IDENTIFIER for error.
13800         Release base64 thing on error of get_membuf.
13801
13802 2017-04-11  NIIBE Yutaka  <gniibe@fsij.org>
13803
13804         g13: Include sys/sysmacros.h if available.
13805         + commit c3cc9551dcc89cc25c0a0ec16d8eb12c1c221638
13806         * configure.ac: Add test for sys/sysmacros.h.
13807         * g13/sh-dmcrypt.c: Include sys/sysmacros.h.
13808
13809 2017-04-11  Justus Winter  <justus@g10code.com>
13810
13811         tests: Fix distcheck.
13812         + commit 00be2a92625e832e8dd621f2a8f72b124c6d50ca
13813         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'gnupg.scm'.
13814
13815         tests: Avoid relying on implicit gpg commands.
13816         + commit cde626e7f7349a73d58ec3236ab3b43dec852bb5
13817         * tests/openpgp/armdetach.scm: Always use an explicit command instead
13818         of relying on gpg to guess what we want.
13819         * tests/openpgp/armdetachm.scm: Likewise.
13820         * tests/openpgp/armencrypt.scm: Likewise.
13821         * tests/openpgp/armencryptp.scm: Likewise.
13822         * tests/openpgp/armor.scm: Likewise.
13823         * tests/openpgp/armsignencrypt.scm: Likewise.
13824         * tests/openpgp/armsigs.scm: Likewise.
13825         * tests/openpgp/clearsig.scm: Likewise.
13826         * tests/openpgp/compression.scm: Likewise.
13827         * tests/openpgp/conventional-mdc.scm: Likewise.
13828         * tests/openpgp/conventional.scm: Likewise.
13829         * tests/openpgp/decrypt-dsa.scm: Likewise.
13830         * tests/openpgp/decrypt.scm: Likewise.
13831         * tests/openpgp/detach.scm: Likewise.
13832         * tests/openpgp/detachm.scm: Likewise.
13833         * tests/openpgp/ecc.scm: Likewise.
13834         * tests/openpgp/encrypt-dsa.scm: Likewise.
13835         * tests/openpgp/encrypt-multifile.scm: Likewise.
13836         * tests/openpgp/encrypt.scm: Likewise.
13837         * tests/openpgp/encryptp.scm: Likewise.
13838         * tests/openpgp/seat.scm: Likewise.
13839         * tests/openpgp/signencrypt-dsa.scm: Likewise.
13840         * tests/openpgp/signencrypt.scm: Likewise.
13841         * tests/openpgp/sigs-dsa.scm: Likewise.
13842         * tests/openpgp/sigs.scm: Likewise.
13843
13844         tests: Make tests more robust.
13845         + commit 1b28d9dbe0260b2a4645c4b5caae11d9f375c942
13846         * tests/openpgp/defs.scm (have-opt-always-trust): Execute in empty
13847         ephemeral home directory.  This prevents gpg from picking up the
13848         configuration from the current gnupghome (if any).
13849         * tests/migrations/common.scm (untar-armored): Likewise.
13850
13851         tests: Move common functionality.
13852         + commit ccd2187212c12b84c86a10fd4417a16536243179
13853         * tests/openpgp/defs.scm (with-home-directory,
13854         with-ephemeral-home-directory): Move...
13855         * tests/gpgscm/gnupg.scm: ... to this new file.
13856         * tests/gpgscm/main.c (main): Load the new file.
13857
13858 2017-04-11  NIIBE Yutaka  <gniibe@fsij.org>
13859
13860         dirmngr: Fix build for Windows.
13861         + commit 3133402241167ccad70fa888a47ffcbe04e7b4c5
13862         * dirmngr/ldap-wrapper-ce.c (outstream_cookie_writer): Use
13863         gpgrt_ssize_t.
13864
13865         g10,tools: Fix bzlib.h include order.
13866         + commit 03d77b60befa4e2f8437a80ac429cca3e54688f8
13867         * g10/compress-bz2.c: Include bzlib.h after gcrypt.h.
13868         * tools/gpgsplit.c: Likewise.
13869
13870         g10: Minor clean up for TOFU.
13871         + commit f079822b2ce06c18b7ea45efed2d29b54e38f04d
13872         * g10/tofu.c (ask_about_binding): Fix for qualifier.
13873
13874         common: Portability fix for logging.c.
13875         + commit 456c5cdb2d72bba77e2a30c8fdb1c1cebbe9b1d2
13876         * common/logging.c (S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Avoid
13877         duplicated definition.
13878
13879         tools: Portability fix for gpgparsemail.
13880         + commit a1446163d584cdc3003c7d5b5fc6d74737c1732d
13881         * tools/rfc822parse.c (my_stpcpy): Rename from stpcpy.
13882
13883 2017-04-10  Justus Winter  <justus@g10code.com>
13884
13885         gpgscm: Fix opcode dispatch.
13886         + commit 1b6adab41d386b587f65e5c6f14a63859ac1226b
13887         * tests/gpgscm/scheme.c (opexe_0): Consider 'op', not 'sc->op'.  The
13888         former is the opcode we are currently executing.
13889
13890         gpgscm: Mmap script files.
13891         + commit c7f0d90592fd0348a3818ac897f91e6859584146
13892         * tests/gpgscm/main.c (load): Try to mmap the script.
13893         * tests/gpgscm/scheme.c (scheme_load_memory): New function, a
13894         generalization of 'scheme_load_string'.
13895         * tests/gpgscm/scheme.h (scheme_load_memory): New prototype.
13896
13897         gpgscm: Refactor checking for opcode arguments.
13898         + commit f3d1f6867792deeb9a2a63744ee9b076c41c58f3
13899         * tests/gpgscm/scheme.c (op_code_info): Fix type, add forward
13900         declaration.
13901         (check_arguments): New function.
13902         (Eval_cycle): Use the new function.
13903
13904         gpgscm: Improve syntax dispatch.
13905         + commit b628e62b5b9f7ed5cbb1bfe34727b5ee8129f7d4
13906         * tests/gpgscm/scheme.c (assign_syntax): Add opcode parameter, store
13907         opcode in the tag.
13908         (syntaxnum): Add sc parameter, retrieve opcode from tag.
13909         (opexe_0): Adapt callsite.
13910         (scheme_init_custom_alloc): Likewise.
13911
13912         gpgscm: Make tags mandatory.
13913         + commit a1ad5d6a30cf72d9b7e7bb449985dc69d5e01c4b
13914         * tests/gpgscm/opdefines.h: Make tags mandatory.
13915         * tests/gpgscm/scheme.c: Likewise.
13916         * tests/gpgscm/scheme.h: Likewise.
13917
13918         gpgscm: Add and use opcode for reversing a list in place.
13919         + commit e1bb9326dc381ae2711a81ab621e21a66388bcbd
13920         * tests/gpgscm/lib.scm (string-split-pln): Use 'reverse!'.
13921         (string-rtrim): Likewise.
13922         * tests/gpgscm/opdefines.h (reverse!): New opcode.
13923         * tests/gpgscm/scheme.c (opexe_0): Handle new opcode.
13924
13925         gpgscm: Deduplicate code.
13926         + commit 3e91019a92b9bb3bb5a8cd62336b4cf65964e45b
13927         * tests/gpgscm/scheme.c (oblist_add_by_name): Deduplicate.
13928         (new_slot_spec_in_env): Likewise.
13929
13930         gpgscm: Move dispatch table into rodata.
13931         + commit 7dff6248bddd5583988ac562318cf0d76a409d0e
13932         * tests/gpgscm/opdefines.h: Use 0 instead of NULL.
13933         * tests/gpgscm/scheme.c (op_code_info): Use char arrays instead of
13934         pointers, make arity parameters smaller.
13935         (INF_ARG): Adapt.
13936         (_OP_DEF): Likewise.
13937         (dispatch_table): Likewise.
13938         (procname): Likewise.
13939         (Eval_cycle): Likewise.
13940         (scheme_init_custom_alloc): Likewise.
13941
13942         gpgscm: Use more threaded code.
13943         + commit 6f217d116d1a12c6093bb253dbfa349bc81bc90b
13944         * tests/gpgscm/scheme.c (opexe_0): Use 's_thread_to' instead of
13945         's_goto' wherever possible.
13946
13947         gpgscm: Remove now obsolete dispatcher function from the opcodes.
13948         + commit e7ed9822e20ee4bbb4cdd9eca8121b4ade87e5ce
13949         * tests/gpgscm/opdefines.h: Remove now obsolete dispatcher function
13950         from the opcodes.
13951         * tests/gpgscm/scheme-private.h (_OP_DEF): Adapt.
13952         * tests/gpgscm/scheme.c (dispatch_func): Remove type declaration.
13953         (op_code_info): Remove 'func'.
13954         (_OP_DEF): Adapt.
13955         (Eval_Cycle): Always call 'opexe_0'.
13956
13957         gpgscm: Merge 'opexe_6'.
13958         + commit ddf444828b9b3f75d964473a2c0e77f75f094cf4
13959         * tests/gpgscm/scheme.c (opexe_6): Merge into 'opexe_0'.
13960         * tests/gpgscm/opdefines.h: Adapt.
13961
13962         gpgscm: Merge 'opexe_5'.
13963         + commit 1379df44537b67b7c2fbc0fb5bc6f7945a5d7ebb
13964         * tests/gpgscm/scheme.c (opexe_5): Merge into 'opexe_0'.
13965         * tests/gpgscm/opdefines.h: Adapt.
13966
13967         gpgscm: Merge 'opexe_4'.
13968         + commit 4f835104b9475e7d585d859b85e7d0d4cfe9aab3
13969         * tests/gpgscm/scheme.c (opexe_4): Merge into 'opexe_0'.
13970         * tests/gpgscm/opdefines.h: Adapt.
13971
13972         gpgscm: Merge 'opexe_3'.
13973         + commit d591ab65d37ee467ca91ad851ab236f2985c1ee2
13974         * tests/gpgscm/scheme.c (opexe_3): Merge into 'opexe_0'.
13975         * tests/gpgscm/opdefines.h: Adapt.
13976
13977         gpgscm: Merge 'opexe_2'.
13978         + commit 6cad38228f6ebfdc8e52960223b492597aff26a0
13979         * tests/gpgscm/scheme.c (opexe_2): Merge into 'opexe_0'.
13980         * tests/gpgscm/opdefines.h: Adapt.
13981
13982         gpgscm: Merge 'opexe_1'.
13983         + commit 154af876f05b773bf3a860fcb4cc41066da27beb
13984         * tests/gpgscm/scheme.c (opexe_1): Merge into 'opexe_0'.
13985         * tests/gpgscm/opdefines.h: Adapt.
13986
13987 2017-04-10  NIIBE Yutaka  <gniibe@fsij.org>
13988
13989         agent: Use "ll" length specifier when time_t is larger.
13990         + commit 170660ed11b56145dea4865e751ae5aff1681fe2
13991         * agent/command.c (cmd_keytocard): Use KEYTOCARD_TIMESTAMP_FORMAT.
13992
13993         scd: Relax a condition for p15 driver.
13994         + commit 7501f2e9c4e6fd94a191b381d52ec2fe1d103e29
13995         * scd/app-p15.c (read_ef_aodf): Fix.
13996
13997         scd: Relax a condition for p15 driver.
13998         + commit 3c1ad96f1ce838daf2d861b33e6611f6d3043d25
13999         * scd/app-p15.c (read_ef_aodf): Remove possibly redundant condition.
14000
14001         scd: Remove "special transport" support.
14002         + commit 34199ef677bb40eadf0da696a111f7036bc3187e
14003         * scd/ccid-driver.c (transports, my_sleep, prepare_special_transport)
14004         (writen): Remove.
14005         (ccid_dev_scan, ccid_dev_scan_finish, ccid_get_BAI): Only for USB.
14006         (ccid_open_reader, do_close_reader, bulk_out, bulk_in, abort_cmd)
14007         (ccid_poll, ccid_transceive): Likewise.
14008
14009 2017-04-07  Justus Winter  <justus@g10code.com>
14010
14011         gpgscm: Allocate small integers in the rodata section.
14012         + commit 8640fa880d7050917f4729f2c0cb506e165ee446
14013         * tests/gpgscm/Makefile.am (gpgscm_SOURCES): Add new file.
14014         * tests/gpgscm/scheme-private.h (struct cell): Move number to the top
14015         of the union so that we can initialize it.
14016         (struct scheme): Remove 'integer_segment'.
14017         * tests/gpgscm/scheme.c (initialize_small_integers): Remove function.
14018         (small_integers): New variable.
14019         (MAX_SMALL_INTEGER): Compute.
14020         (mk_small_integer): Adapt.
14021         (mark): Avoid marking objects already marked.  This allows us to run
14022         the algorithm over objects in the rodata section if they are already
14023         marked.
14024         (scheme_init_custom_alloc): Remove initialization.
14025         (scheme_deinit): Remove deallocation.
14026         * tests/gpgscm/small-integers.h: New file.
14027
14028         gpgscm: Make global data constant when possible.
14029         + commit c9c3fe883271868d3b2dd287d295cf6a8f8ffc05
14030         * tests/gpgscm/scheme-private.h (struct scheme): Make 'vptr' const.
14031         * tests/gpgscm/scheme.c (num_zero): Statically initialize and turn
14032         into constant.
14033         (num_one): Likewise.
14034         (charnames): Change type so that it can be stored in rodata.
14035         (is_ascii_name): Adapt slightly.
14036         (assign_proc): Make argument const char *.
14037         (op_code_info): Make some fields const char *.
14038         (tests): Make const.
14039         (dispatch_table): Make const.  At least it can be made read-only after
14040         relocation.
14041         (Eval_Cycle): Adapt slightly.
14042         (vtbl): Make const.
14043
14044         gpgscm: Remove arbitrary limit on number of cell segments.
14045         + commit 56638c28adc1bbe9fc052b92549a50935c0fe99c
14046         * tests/gpgscm/scheme-private.h (struct scheme): Remove fixed-size
14047         arrays for cell segments, replace them with a pointer to the new
14048         'struct cell_segment' instead.
14049         * tests/gpgscm/scheme.c (struct cell_segment): New definition.
14050         (_alloc_cellseg): Allocate the header within the segment, return a
14051         pointer to the header.
14052         (_dealloc_cellseg): New function.
14053         (alloc_cellseg): Insert the segments into a list.
14054         (_get_cell): Allocate a new segment if less than a quarter of
14055         CELL_SIGSIZE is recovered during garbage collection.
14056         (initialize_small_integers): Adapt callsite.
14057         (gc): Walk the list of segments.
14058         (scheme_init_custom_alloc): Remove initialization of removed field.
14059         (scheme_deinit): Adapt deallocation.
14060
14061         gpgscm: Fix compact vector encoding.
14062         + commit bf8b5e9042b3d86d419b2ac1987a9298c9d21500
14063         * tests/gpgscm/scheme-private.h (struct cell): Use uintptr_t for
14064         '_flags'.  This way, '_flags' has the size of a machine word.
14065
14066 2017-04-07  Werner Koch  <wk@gnupg.org>
14067
14068         gpg: Fix printing of offline taken subkey.
14069         + commit 547bc01d57528ecc27b3b5e16797967a7f88fecf
14070         * g10/keylist.c (list_keyblock_print): Set SECRET to 2 and not 0x32.
14071
14072 2017-04-07  NIIBE Yutaka  <gniibe@fsij.org>
14073
14074         scd: Internal CCID reader cleanup.
14075         + commit cc420d34880e2a050b39f969873974cfc35fa5c3
14076         * scd/ccid-reader.c (scan_usb_device): Only for scan mode, so, rename
14077         from scan_or_find_usb_device.
14078         (scan_devices): Likewise.  Remove support of special transport types.
14079         (ccid_get_reader_list): Simplify.
14080         (abort_cmd): Fix error return.
14081         (send_escape_cmd): Fix for RESULTLEN == NULL.
14082         (ccid_transceive_secure): Remove unnecessary var updates.
14083
14084         scd: Don't keep CCID reader open when card is not available.
14085         + commit 3c93595d701c59cbc9b67a7fd0bcde7ee0fada1a
14086         * scd/apdu.c (open_ccid_reader): Fail if no ATR.
14087
14088         agent: Serialize access to passphrase cache.
14089         + commit ebe12be034f052cdec871f0d8ad1bfab85d7b943
14090         * agent/cache.c (encryption_lock): Remove.
14091         (cache_lock): New.  Now, we have coarse grain lock to serialize
14092         entire cache access.
14093         (initialize_module_cache): Use CACHE_LOCK.
14094         (init_encryption, new_data): Remove ENCRYPTION_LOCK.
14095         (agent_flush_cache, agent_put_cache, agent_get_cache): Lock the cache.
14096
14097 2017-04-06  Justus Winter  <justus@g10code.com>
14098
14099         gpgscm: Avoid mutating integer.
14100         + commit f1dc34f502a68673e7a29f3fcf57b8dc6a4fac89
14101         * tests/gpgscm/scheme.c (opexe_5): Do not modify the integer in-place
14102         while printing an vector.  Integer objects may be shared, so they must
14103         not be mutated.
14104
14105         gpgscm: Initialize unused slots in vectors.
14106         + commit b83903f59ec5d49ac579f263da70ebc8dc3645b5
14107         * tests/gpgscm/scheme.c (get_vector_object): Initialize unused slots
14108         at the end of vectors.
14109
14110         tests: Fix distcheck.
14111         + commit 23f00f109ddba595db4f73a6182750177c7dd75d
14112         * tests/Makefile.am (SUBDIRS): Add 'pkits' again.  Simply dropping it
14113         makes 'make distcheck' unhappy.
14114         * tests/pkits/Makefile.am (TESTS): Remove all tests.
14115
14116         tests: Disable 'pkits' test suite.
14117         + commit af1c1a57e46a00a32d83c1a58c5f3ef6f4a1c1d1
14118         * tests/Makefile.am (SUBDIRS): Drop 'pkits'.
14119         * tests/pkits/common.sh: Fix locating 'PKITS_data.tar.bz2'.
14120         * tests/pkits/inittests: Likewise.
14121
14122         tests: Make test more robust.
14123         + commit 94645311f8a3e9ae33643512f87fbef41bf0556f
14124         * tests/openpgp/4gb-packet.scm: Skip if we do not have BZIP2.
14125         * tests/openpgp/defs.scm (have-compression-algo?): New function.
14126
14127 2017-04-05  Justus Winter  <justus@g10code.com>
14128
14129         tests: Fix setup of ephemeral home directories.
14130         + commit 01e84d429aeeb1450012ff0576a6a24de50693c6
14131         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Set
14132         GNUPGHOME and cwd to the ephemeral directory before calling the setup
14133         function.
14134
14135 2017-04-04  Justus Winter  <justus@g10code.com>
14136
14137         tests: Fix setup of ephemeral home directories.
14138         + commit 32b75fb7743f35936d7014fce33c90ba97dfa374
14139         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Create
14140         configuration files when we enter the context.
14141         * tests/openpgp/setup.scm: Do not use an ephemeral home directory.
14142         Tests should always use the cwd.
14143         * tests/gpgsm/setup.scm: Likewise.
14144         * tests/gpgsm/export.scm: Add explicit constructor function.
14145         * tests/openpgp/decrypt-session-key.scm: Likewise.
14146         * tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
14147
14148         gpgscm: Fix copying values.
14149         + commit 6261611d3786f19fd84ccc79f45a89cadac518e8
14150         * tests/gpgscm/scheme.c (copy_value): New function.
14151         (mk_tagged_value): Use new function.
14152         (opexe_4): Likewise for OP_SAVE_FORCED.
14153
14154         gpgscm: Simplify get-output-string operation.
14155         + commit a80d4a9b50ad47eae1f8c740dd73804311e38783
14156         * tests/gpgscm/scheme.c (opexe_4): Simplify 'get-output-string'.
14157
14158         gpgscm: Simplify substring operation.
14159         + commit d858096c99705ccf2e115475f81c4cf88edbeebf
14160         * tests/gpgscm/scheme.c (opexe_2): Simplify 'substring'.
14161
14162 2017-04-04  NIIBE Yutaka  <gniibe@fsij.org>
14163
14164         agent: Minor fix for get_client_pid.
14165         + commit 5744d2038bd17b8b1be4e73d0ad3bc41772efe96
14166         * agent/command-ssh.c (get_client_pid): Use 0 to initialize.
14167
14168 2017-04-03  Werner Koch  <wk@gnupg.org>
14169
14170         Release 2.1.20.
14171         + commit e7eb9b12deaf7ebe26967bfb56e980b7efeebdc3
14172
14173
14174         dirmngr: New option --disable-ipv6.
14175         + commit 3533b854408fa93734742b2ee12b62aa0d55ff28
14176         * dirmngr/dirmngr.h (struct opt): Add field 'disable_ipv6'.
14177         * dirmngr/dirmngr.c (oDisableIPv6): New const.
14178         (opts): New option --disable-ipv6.
14179         (parse_rereadable_options): Set that option.
14180         * dirmngr/dns-stuff.c (opt_disable_ipv6): New var.
14181         (set_dns_disable_ipv6): New.
14182         (resolve_name_standard): Make use of it.
14183         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Take care of
14184         OPT.DISABLE_IPV6.
14185         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
14186         (send_request): Ditto.
14187         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
14188         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
14189
14190         dirmngr,w32: Silence the 'certificate already cached' message.
14191         + commit fce36d7ec87be14b874813db277781c87a64ea87
14192         * dirmngr/certcache.c (load_certs_from_w32_store): Silenece an info
14193         message.
14194
14195         dirmngr: Handle EIO which is sometimes returned by cookie functions.
14196         + commit cc32ddbcba8c53d3e2cad952d72f62dc73911042
14197         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Handle EIO.
14198
14199         dirmngr: Always print a warning for a missing /etc/hosts.
14200         + commit 35c843c815306f36d1efbc52f5e2f6bac3f67aec
14201         * dirmngr/dns-stuff.c (libdns_init): No Windows specific handling of a
14202         missing /etc/hosts.
14203
14204         dirmngr: Do not assume that /etc/hosts exists.
14205         + commit 5d873f288e86edfb684f4dd57ac36466b06494a4
14206         * dirmngr/dns-stuff.c (libdns_init): Do not bail out.
14207
14208         po: Update the German translation.
14209         + commit c7be01dae914c183dd99bd531a388c794d858c61
14210
14211
14212         gpgconf: Add --enable-extended-key-format for the agent.
14213         + commit d23052b04ebb0ac731aa351650c4084f080c640b
14214         * tools/gpgconf-conf.c: Add option.
14215         * agent/gpg-agent.c (main) <aGPGConfList>: Add option.
14216
14217 2017-04-03  Justus Winter  <justus@g10code.com>
14218
14219         gpgscm: Slightly improve the procedure dispatch.
14220         + commit 90932bdad607d06f4f040e3457caddba79ba8b7e
14221         * tests/gpgscm/scheme.c (procnum): Procedures always have an integer
14222         number, so we can safely use the cheaper 'ivalue_unchecked'.
14223
14224 2017-04-03  Werner Koch  <wk@gnupg.org>
14225
14226         gpg: Handle critical marked 'Reason for Revocation'.
14227         + commit 3f6d949011f485613bb4bd3e06a2643be79cce40
14228         * g10/parse-packet.c (can_handle_critical): Add
14229         SIGSUBPKT_REVOC_REASON.
14230
14231 2017-04-02  Werner Koch  <wk@gnupg.org>
14232
14233         agent: Use OCB for key protection with --enable-extended-key-format.
14234         + commit d24375271b97e45deaeb1ef0a8434c64066ba2e8
14235         * agent/protect.c (PROT_DEFAULT_TO_OCB): Remove macro.
14236         (agent_protect): Make the default protection mode depend on the extend
14237         key format option.
14238
14239 2017-04-01  Werner Koch  <wk@gnupg.org>
14240
14241         kbx: Unify blob reading functions.
14242         + commit 0039d7107bcdfce6f3b02b46ff0495cfba07882a
14243         * kbx/keybox-file.c (_keybox_read_blob): Remove.
14244         (_keybox_read_blob2): Rename to ....
14245         (_keybox_read_blob): this.  Make arg options.  Change all callers.
14246         * kbx/keybox-search.c (keybox_search): Factor fopen call out to ...
14247         (open_file): new.
14248         (keybox_seek): Als use open_file.
14249
14250 2017-03-31  Werner Koch  <wk@gnupg.org>
14251
14252         gpg: Avoid multiple open calls to the keybox file.
14253         + commit 5556eca5acd46983bff0b38a1ffbc2f07fbaba9f
14254         * g10/keydb.h (KEYDB_HANDLE): Move typedef to ...
14255         * g10/gpg.h: here.
14256         (struct server_control_s): Add field 'cached_getkey_kdb'.
14257         * g10/gpg.c (gpg_deinit_default_ctrl): Release that keydb handle.
14258         * g10/getkey.c (getkey_end): Cache keydb handle.
14259         (get_pubkey): Use cached keydb handle.
14260         * kbx/keybox-search.c (keybox_search_reset): Use lseek instead of
14261         closing the file.
14262
14263         gpg: Pass CTRL also to getkey_end.
14264         + commit aca5f494a88776d4974bfa9b0b65cb60c1b42040
14265         * g10/getkey.c (getkey_end): Add arg CTRL.  Change all callers.
14266
14267         gpg: Print more stats for the keydb and the signature cache.
14268         + commit 3a10de3bfd785aefb0150e82b6dbbc7cb9f208c8
14269         * g10/sig-check.c (sig_check_dump_stats): New.
14270         (cache_stats): New struct.
14271         (check_key_signature2): Update stats.
14272         * g10/gpg.c (g10_exit): Call new function.
14273         * g10/keydb.c (kid_not_found_cache_count): Replace by ...
14274         (kid_not_found_stats): ... new struct.  Change users.
14275         (keydb_stats): New struct.  Update the counters.
14276         (keydb_dump_stats): Print all stats.
14277
14278         gpg: Assert that an opaque parameter is really what we expect.
14279         + commit 52ba5e67cad4311d0ddbc4f2979e20afd0161d1f
14280         * g10/gpg.h (SERVER_CONTROL_MAGIC): New const.
14281         (server_control_s): Add field 'magic'.
14282         * g10/gpg.c (gpg_init_default_ctrl): Init MAGIC.
14283         * g10/import.c (impex_filter_getval): Assert MAGIC.
14284
14285 2017-03-30  Justus Winter  <justus@g10code.com>
14286
14287         gpg: Consistent use of preprocessor conditionals.
14288         + commit 5e89144cbca36c1e7eb814b3aad4b7c46cd4efbf
14289         * g10/parse-packet.c: Use '#if' instead of '#ifdef' when checking
14290         DEBUG_PARSE_PACKET.  This fixes the build with '#define
14291         DEBUG_PARSE_PACKET 0'.
14292
14293         common: Avoid undefined behavior.
14294         + commit 214fa9012296d796b78f1a3106d656639cf50aef
14295         * common/iobuf.c (iobuf_read_line): Do not consider 'length' if
14296         'buffer' is NULL.
14297
14298 2017-03-30  Werner Koch  <wk@gnupg.org>
14299
14300         gpg: Remove the use of the signature information from a KBX.
14301         + commit a6142dbdbc5783043deb847dc64998c421860941
14302         * g10/keydb.c (keyblock_cache): Remove field SIGSTATUS.
14303         (keyblock_cache_clear): Adjust for that removal.
14304         (parse_keyblock_image): Remove arg SIGSTATUS.  Remove the signature
14305         cache setting; this is now done in the parser.
14306         (keydb_get_keyblock): Do not set SIGSTATUS.
14307         (build_keyblock_image): Remove arg SIGSTATUS and simplify.  Change
14308         caller.
14309         * kbx/keybox-blob.c: Explain that the signature information is not
14310         anymore used.
14311         (_keybox_create_openpgp_blob): Remove arg SIGSTATUS and change
14312         callers.
14313         * kbx/keybox-search.c (keybox_get_keyblock): Remove arg R_SIGSTATUS
14314         and change callers.
14315         * kbx/keybox-update.c (keybox_insert_keyblock): Likewise.
14316
14317         gpg: Fix actual leak and possible leaks in the packet parser.
14318         + commit 7bf24e8146116a30c4c9d7b6dbf8bbb27fc35971
14319         * g10/packet.h (struct parse_packet_ctx_s): Change LAST_PKT deom a
14320         pointer to its struct.
14321         (init_parse_packet): Adjust for LAST_PKT not being a pointer.
14322         * g10/parse-packet.c (parse): Ditto. Free the last packet before
14323         storing a new one in case of a deep link.
14324         (parse_ring_trust): Adjust for LAST_PKT not being a pointer.
14325         * g10/free-packet.c (free_packet): Ditto.
14326         * g10/t-keydb-get-keyblock.c (do_test): Release keyblock.
14327
14328         gpg: Fix export porting of zero length user ID packets.
14329         + commit 64665404e43051fa50ee030766347e24b7d1e4d5
14330         * g10/build-packet.c (do_user_id): Avoid indeterminate length header.
14331
14332         gpg: Revamp reading and writing of ring trust packets.
14333         + commit a8895c99a7d0750132477d80cd66caaf3a709113
14334         * g10/parse-packet.c (parse_trust): Rename to ...
14335         (parse_ring_trust): this.  Change args and implement new ring trust
14336         packet format.
14337         (parse): Add special ring trust packet handling.
14338         * g10/packet.h (PKT_user_id): New fields KEYUPDATE, UPDATEURL, and
14339         KEYSRC.
14340         (PKT_public_key): Ditto.
14341         (RING_TRUST_SIG, RING_TRUST_KEY, RING_TRUST_UID): New consts.
14342         (PKT_ring_trust): New.
14343         (struct packet_struct): Remove member RING_TRUST.
14344         (strcu parse_packet_ctx_s): Add field SKIP_META.
14345         (init_parse_packet): Init SKIPT_META.
14346         * g10/free-packet.c (release_public_key_parts): Free UDPATEURL.
14347         (free_user_id): Ditto.
14348         * g10/mainproc.c (list_node): Remove printing of non-documented "rtv"
14349         lines.
14350         * g10/build-packet.c (build_packet_and_meta): New.
14351         (do_ring_trust): New.
14352         * g10/export.c (write_keyblock_to_output): Use build_packet_and_meta
14353         in backup mode.
14354         (do_export_one_keyblock): Ditto.
14355         * g10/import.c (read_block): Add arg WITH_META.  Skip ring trust
14356         packets if that ism not set.
14357         (import): Call read_block WITH_META in restore mode.
14358         * g10/keydb.h (KEYSRC_UNKNOWN, KEYSRC_FILE, KEYSRC_KS, KEYSRC_PREF_KS)
14359         (KEYSRC_WKD, KEYSRC_WKD_SD, KEYSRC_DANE): New constants.  They are not
14360         yet used, though.
14361         * g10/keydb.c (parse_keyblock_image): Allow ring trust packets.
14362         (build_keyblock_image): Ditto.  Use build_packet_and_meta.
14363         * g10/keyring.c (keyring_get_keyblock): Remove specila treatment of
14364         ring trust packets.
14365         (write_keyblock): Use build_packet_and_meta.  Remove special treatment
14366         of ring trust packets and initialization of the signature caches.
14367
14368 2017-03-29  Werner Koch  <wk@gnupg.org>
14369
14370         gpg: Extend free_packet to handle a packet parser context.
14371         + commit afa86809087909a8ba2f9356588bf90cc923529c
14372         * g10/packet.h (struct parse_packet_ctx_s): Add fields LAST_PKT and
14373         FREE_LAST_PKT.
14374         (init_parse_packet): Clear them.
14375         (deinit_parse_packet): New macro.  Change all users if
14376         init_parse_packet to also call this macro.
14377         * g10/free-packet.c (free_packet): Add arg PARSECTX and handle shallow
14378         packet copies in the context.  Change all callers.
14379         * g10/parse-packet.c (parse): Store certain packets in the parse
14380         context.
14381
14382         gpg: Change parse_packet to take a context.
14383         + commit 0526c99164d3531b5ec763ffc672407eb24b2296
14384         * g10/packet.h (struct parse_packet_ctx_s): New.
14385         (parse_packet_ctx_t): New type.
14386         (init_parse_packet): New macro.
14387         * g10/parse-packet.c (parse_packet, dbg_parse_packet): Change to take
14388         a parse context.  Change all callers to provide a context instead of
14389         directly supplying the input stream.
14390         (search_packet, dbg_search_packet): Ditto.
14391         (copy_all_packets, dbg_copy_all_packets): Init an use a parse context.
14392         (copy_some_packets, dbg_copy_some_packets): Ditto.
14393         (skip_some_packets, dbg_skip_some_packets): Ditto.
14394
14395         gpg: Export ring trust packets in backup mode.
14396         + commit f5b565a5b8de3f2a3d98bc1a655e18333aee223b
14397         * g10/export.c (write_keyblock_to_output): Export ring trust packets.
14398
14399 2017-03-28  Justus Winter  <justus@g10code.com>
14400
14401         tests,w32: Fix importing the extra key for GPGME's keylist test.
14402         + commit b20780658ebb1e1245db18c04db3e815399cf706
14403         * tests/gpgme/wrap.scm: Qualify the tests name with the extension for
14404         executables (if any).
14405
14406 2017-03-28  Werner Koch  <wk@gnupg.org>
14407
14408         gpg: Prepare for listing last_update and key origin data.
14409         + commit 4af389c9721fa534ed06a64b80705b631575c775
14410         * g10/keylist.c (list_keyblock_colon): Add empty fields 19 and 20.
14411
14412 2017-03-28  Justus Winter  <justus@g10code.com>
14413
14414         tests: Fix distcheck.
14415         + commit 5128cd74c029d57491a79ca9e918c81facdf1b76
14416         * tests/openpgp/Makefile.am (sample_msgs): Add all missing sample
14417         messages.
14418
14419         tests: Add test for '--decrypt --unwrap'.
14420         + commit 211d71f19c24da94f4c58014606125c1a29d86a2
14421         * tests/openpgp/Makefile.am (XTESTS): Add new test.
14422         * tests/openpgp/decrypt-unwrap-verify.scm: New file.
14423
14424         g10: Fix memory leak.
14425         + commit 6d3edfd972c1114f43f6b35773dc25e0256f48f4
14426         * g10/decrypt-data.c (decrypt_data): Free 'filename'.
14427
14428 2017-03-27  Justus Winter  <justus@g10code.com>
14429
14430         common: Fix connecting to the agent.
14431         + commit caf00915532e6e8e509738962964edcd14fb0654
14432         * common/homedir.c (_gnupg_socketdir_internal): Fix error handling.
14433
14434 2017-03-27  NIIBE Yutaka  <gniibe@fsij.org>
14435
14436         g10: Support specifying SERIALNO for --card-status.
14437         + commit c1e6302b347caf852a056b9c721469ccb51f44da
14438         * g10/gpg.c (main): Allow an argument for --card-status.
14439         * g10/card-util.c (current_card_status): Rename from card_status.
14440         (card_status): New, which supports multiple cards.
14441         (get_one_name): Use current_card_status.
14442
14443         scd: Change the order of applications when accessed.
14444         + commit d58275703f035e8cfd58cd1c2d0d5ac7dc59e110
14445         * scd/app.c (select_application): Move the app to top.
14446
14447         scd: Fix timeout handling for key generation.
14448         + commit 0848cfcce738150b53bfb65b78efc1e6dc9f3d26
14449         * scd/ccid-driver.c (CCID_CMD_TIMEOUT): Back to original value.
14450         (CCID_CMD_TIMEOUT_LONGER): New.
14451         (ccid_transceive): Add kludge for key generation.
14452
14453 2017-03-24  Werner Koch  <wk@gnupg.org>
14454
14455         gpg: Improve check for already compressed packets.
14456         + commit 0b3770c421a35b64823a805fa8d49ddd5c653d50
14457         * common/miscellaneous.c (is_openpgp_compressed_packet): New.
14458         (is_file_compressed): Rerad 2 more bytes and call new function.
14459
14460         agent: New option --enable-extended-key-format.
14461         + commit 2c237c13628a88ba23742da34ea18d3e205d7c53
14462         * agent/gpg-agent.c (oEnableExtendedKeyFormat): New const.
14463         (opts): New option --enable-extended-key-format.
14464         (parse_rereadable_options): Set option
14465         * agent/findkey.c (write_extended_private_key): Add arg 'update'.
14466         (agent_write_private_key): Implement new option.
14467
14468         agent: New option --stub-only for DELETE_KEY.
14469         + commit 6fab7bba879d7794e32112cf3eddd8d87130a5d7
14470         * agent/findkey.c (agent_delete_key): Add arg 'only_stubs'.
14471         * agent/command.c (cmd_delete_key): Add option --stub-only.
14472
14473 2017-03-23  Werner Koch  <wk@gnupg.org>
14474
14475         common: Implicitly do a gpgconf --create-socketdir.
14476         + commit 26086b362ff47d21b1abefaf674a6464bf0a8921
14477         * common/homedir.c (_gnupg_socketdir_internal): Create the
14478         sub-directory.
14479
14480         tests: Use gpgconf to stop the agent.
14481         + commit 2c9d9ac55ea455a5ec26428989dced0311ed46cc
14482         * tests/openpgp/defs.scm (stop-agent): Swap order of actions.  Kill
14483         all daemons using gpgconf.
14484         * tools/gpgconf.c (main) <aRemoveSocketDir>: Try to remove known
14485         socketfails on rmdir failure.  Do no fail for ENONET.
14486
14487 2017-03-23  Justus Winter  <justus@g10code.com>
14488
14489         gpgscm: Make test cleanup more robust.
14490         + commit 178b6314ab2d2268873067314744c8af74dc331e
14491         * tests/gpgscm/tests.scm (mkdtemp-autoremove): New function that
14492         cleans up at interpreter shutdown.
14493         (run-tests-parallel): Use the new function.
14494         (run-tests-sequential): Likewise.
14495         (make-environment-cache): Execute setup with an temporary working
14496         directory.
14497
14498 2017-03-21  Justus Winter  <justus@g10code.com>
14499
14500         tests: Test '--quick-set-primary-uid'.
14501         + commit fde885bbc47a4bf14a8570ac62e68adc8cf47a6e
14502         * tests/openpgp/quick-key-manipulation.scm: Test
14503         '--quick-set-primary-uid'.
14504
14505         tests,w32: Use GetTempPath to get the path for temporary files.
14506         + commit d17840c3f40111beaf97d96ad3ca52047976e221
14507         * tests/gpgscm/ffi.c (do_get_temp_path): New function.
14508         (ffi_init): Make function available.
14509         * tests/gpgscm/tests.scm (mkdtemp): Use the new function.
14510
14511 2017-03-21  Werner Koch  <wk@gnupg.org>
14512
14513         gpg: New command --quick-set-primary-uid.
14514         + commit 74c1f30ad6616186f0ab9dbaf34db6c17b1e40c4
14515         * g10/gpg.c (aQuickSetPrimaryUid): New const.
14516         (opts): New command --quick-set-primary-uid.
14517         (main): Implement it.
14518         * g10/keyedit.c (keyedit_quick_adduid): Factor some code out to ...
14519         (quick_find_keyblock): new func.
14520         (keyedit_quick_revuid): Use quick_find_keyblock.
14521         (keyedit_quick_set_primary): New.
14522
14523 2017-03-21  Justus Winter  <justus@g10code.com>
14524
14525         dirmngr: Fix error handling.
14526         + commit 483c1288a8f86dc6bf93d0d3f2865ecc246aecba
14527         * dirmngr/dns-stuff.c (libdns_init): Convert error before printing it.
14528
14529         dirmngr: Load the hosts file into libdns.
14530         + commit 88f1505f0613894d5544290a170119eb538921e5
14531         * dirmngr/dns-stuff.c (libdns_init): Actually load the hosts file into
14532         libdns.
14533
14534         tests: Create temporary directories in '/tmp'.
14535         + commit 06f1f163e96f1039304fd3cf565cf9de1ca45849
14536         * tests/gpgscm/tests.scm (mkdtemp): Create temporary directories in
14537         '/tmp' on UNIX, or in '%Temp' on Windows.
14538         * tests/migrations/common.scm (run-test): Turn error into a warning.
14539         * tests/openpgp/defs.scm (start-agent): Likewise.
14540
14541 2017-03-20  Justus Winter  <justus@g10code.com>
14542
14543         tests: Remove debugging remnants.
14544         + commit ceb4b245752bb1fb43fde7e99f8d904ab8a9b5e2
14545         * tests/gpgme/gpgme-defs.scm (run-python-tests?): Remove 'trace's.
14546
14547         tests: Fail if we cannot create the socket directory.
14548         + commit d75d20909d9f60d33ffd210def92278c0f383aad
14549         * tests/migrations/common.scm (run-test): Turn warning into an error.
14550         * tests/openpgp/defs.scm (start-agent): Likewise.
14551
14552 2017-03-20  Werner Koch  <wk@gnupg.org>
14553
14554         gpg: Add new field no 18 to the colon listing.
14555         + commit fe0b37e123ded51cc5f4cb5e3547fdfbce37a43e
14556         * g10/misc.c (gnupg_pk_is_compliant): New.
14557         * g10/keylist.c (print_compliance_flags): New.
14558         (list_keyblock_colon): Call it here.
14559         * sm/keylist.c (print_compliance_flags): New.
14560         (list_cert_colon): Call it here.
14561
14562         gpg: Remove unused stuff.
14563         + commit e2c63a13e2fa4ce39af8471a34c06d73ff3ee6f6
14564         * g10/OPTIONS: Remove.
14565         * g10/options.h (struct opt): Remove 'shm_coprocess'.
14566
14567 2017-03-17  Neal H. Walfield  <neal@g10code.com>
14568
14569         tests: Add test for issue 2959.
14570         + commit fb9d68d636490ca88925051f48b08963c324aed1
14571         * tests/openpgp/tofu.scm: Add test for --tofu-default-policy=ask.
14572
14573         gpg: Make sure the conflict set includes the current key.
14574         + commit b1106b4d640325c60a7212a4a44e4f67c0e3312d
14575         * g10/tofu.c (get_trust): Sanity check CONFLICT_SET after calling
14576         get_policy.  If POLICY is 'auto' and the default policy is 'ask', make
14577         sure CONFLICT_SET includes the current key.
14578
14579 2017-03-17  Werner Koch  <wk@gnupg.org>
14580
14581         dirmngr: Ignore warning alerts in the GNUTLS handshake.
14582         + commit 69c521df422a6c9a6b0a93e45c9373a8b6ceb28e
14583         * dirmngr/http.c (send_request) [GNUTLS]: Don't bail out on warning
14584         alerts.
14585
14586 2017-03-17  Justus Winter  <justus@g10code.com>
14587
14588         gpgscm: Simplify hash tables.
14589         + commit 6a3f857224eab108ae38e6259194b01b0ffdad8b
14590         * tests/gpgscm/scheme.c (oblist_add_by_name): We now always get a
14591         slot.  Simplify accordingly.
14592         (oblist_find_by_name): Always return the slot.
14593         (vector_elem_slot): New function.
14594         (new_slot_spec_in_env): We now always get a slot.  Remove parameter
14595         'env'.  Simplify accordingly.
14596         (find_slot_spec_in_env): Always return a slot.
14597         (new_slot_in_env): Adapt callsite.
14598         (opexe_0): Likewise.
14599         (opexe_1): Likewise.
14600         (scheme_define): Likewise.
14601
14602         gpgscm: Remove framework for immediate values.
14603         + commit 38c955599f7c6c20faeec57d8e1df7d2c0eeba18
14604         * tests/gpgscm/scheme.c (IMMEDIATE_TAG): Remove macro.
14605         (is_immediate): Likewise.
14606         (set_immediate): Likewise.
14607         (clr_immediate): Likewise.
14608         (enum scheme_types): Set the LSB in every value.
14609         (fill_vector): Adapt.
14610         (vector_elem): Likewise.
14611         (set_vector_elem): Likewise.
14612         (mark): Likewise.
14613         (gc): Test for the LSB to tell typeflags apart from pointers stored in
14614         the same memory location.
14615
14616 2017-03-16  NIIBE Yutaka  <gniibe@fsij.org>
14617
14618         agent,g10: Remove redundant SERIALNO request.
14619         + commit 8c8ce8711d9c938fcb982b0341e6b052742cb887
14620         * agent/learncard.c (agent_handle_learn): Don't call
14621         agent_card_serialno.  Get the serialno in status response.
14622         * g10/call-agent.c (agent_scd_learn): Don't request "SCD SERIALNO".
14623         (agent_scd_serialno): New.
14624         (card_cardlist_cb, agent_scd_cardlist): New.
14625
14626 2017-03-15  Justus Winter  <justus@g10code.com>
14627
14628         tests: Fix using tools from the build directory.
14629         + commit a98459d3f4ec3d196fb0adb0e90dadf40abc8c81
14630         * tests/openpgp/defs.scm (gpg-conf'): Explicitly pass the build prefix
14631         to gpgconf here...
14632         (gpg-components): ... instead of only here.
14633
14634         tests: Dump the tools that the tests are going to use.
14635         + commit c7833eca38fdb8d9ba7b59438ea87d651b8bf7ba
14636         * tests/openpgp/setup.scm: Dump the tools that the tests are going to
14637         use.  This will help us diagnose problems with the tests picking the
14638         wrong paths in the future.
14639
14640         build: Remove '--disable-tools' configuration option.
14641         + commit 6993e42088c191f18468317ba2b5b8fbc8c3edff
14642         * Makefile.am (SUBDIRS): Unconditionally include 'tools'.
14643         * configure.ac: Remove '--disable-tools' configuration option.
14644
14645 2017-03-15  NIIBE Yutaka  <gniibe@fsij.org>
14646
14647         g10: Fix check of serialno.
14648         + commit 61785b679c542bbd789395fa632eb8b5133b01ad
14649         * g10/card-util.c (card_status): Fix.
14650
14651         g10: Remove unused function.
14652         + commit ed3248219e921ee24f6f1b2985abb7e0945d70e9
14653         * g10/call-agent.c (select_openpgp): Remove.
14654
14655         tests: Fix running python condition.
14656         + commit a672ddec03f96475866d712b28be18b3fab43aef
14657         * tests/gpgme/gpgme-defs.scm (run-python-tests?): We need Python.
14658
14659 2017-03-14  Justus Winter  <justus@g10code.com>
14660
14661         tests: Skip Python tests if the bindings are not built.
14662         + commit d82abbb1b6e80d5980e6259ddcfc770e65a6b1b3
14663         * tests/gpgme/wrap.scm (python): Move variable...
14664         * tests/gpgme/gpgme-defs.scm (python): ... here.
14665         (run-python-tests?): New function.
14666         * tests/gpgme/run-tests.scm: Only run Python tests if the bindings can
14667         be located in GPGME's build directory.
14668
14669 2017-03-13  Werner Koch  <wk@gnupg.org>
14670
14671         gpg: Flush stdout before printing stats with --check-sigs.
14672         + commit 9a77b3b6e41f97b1209ad61c04b3dd33242ecae8
14673         * g10/keylist.c (print_signature_stats): Flush stdout.
14674         (list_keyblock_colon): Use es_flush instead of fflush.
14675
14676 2017-03-09  Justus Winter  <justus@g10code.com>
14677
14678         tests: Run the tests for the Python bindings of GPGME.
14679         + commit 046a15a88c83b40a753b4ad7ecc1456efa5b527f
14680         * tests/gpgme/gpgme-defs.scm (create-file): Write lines.
14681         (create-gpgmehome): Extend function to create the right environment
14682         for the Python tests.
14683         * tests/gpgme/run-tests.scm: Make an environment cache for the Python
14684         tests and enable them.
14685         * tests/gpgme/wrap.scm: Do not hardcode the path of the Python
14686         interpreter.
14687
14688         tests: Rework environment setup.
14689         + commit cca91a3f8f7e3e36b7149fc93f7b6df11d21eb1d
14690         * tests/gpgscm/tests.scm (test::scm): Add a setup argument.
14691         (test::binary): Likewise.
14692         (run-tests-parallel): Remove setup parameter.
14693         (run-tests-sequential): Likewise.
14694         (make-environment-cache): New function that handles the cache
14695         protocol.
14696         * tests/gpgme/run-tests.scm: Adapt accordingly.
14697         * tests/gpgsm/run-tests.scm: Likewise.
14698         * tests/migrations/run-tests.scm: Likewise.
14699         * tests/openpgp/run-tests.scm: Likewise.
14700
14701 2017-03-08  Werner Koch  <wk@gnupg.org>
14702
14703         wks: Put stdout into binary mode for Windows at another place.
14704         + commit ed5575ec550ff16b0b901a23c6aa3eb3d47b0575
14705         * tools/wks-util.c (wks_send_mime): Set stdout to binary.
14706
14707         wks: Put stdout into binary mode for Windows.
14708         + commit 5c83759364272b19ceafbef46d057f0430a12698
14709         * tools/send-mail.c (send_mail_to_file): Call es_set_binary.
14710
14711 2017-03-08  Justus Winter  <justus@g10code.com>
14712
14713         build: Use macOS' compatibility macros to enable all features.
14714         + commit dd60e868d2bf649a33dc96e207ffd3b8ae4d35af
14715         * configure.ac: On macOS, use the compatibility macros to expose every
14716         feature of the libc.  This is the equivalent of _GNU_SOURCE on GNU
14717         libc.
14718
14719         g10: Move more flags into the flag bitfield.
14720         + commit 2649fdfff5d9e227025956e015b67502fd4962c4
14721         * g10/packet.h (PKT_user_id): Move 'is_primary', 'is_revoked', and
14722         'is_expired' into the flags bitfield, and drop the prefix.
14723         * g10/call-dirmngr.c: Adapt accordingly.
14724         * g10/export.c: Likewise.
14725         * g10/getkey.c: Likewise.
14726         * g10/import.c: Likewise.
14727         * g10/kbnode.c: Likewise.
14728         * g10/keyedit.c: Likewise.
14729         * g10/keylist.c: Likewise.
14730         * g10/keyserver.c: Likewise.
14731         * g10/mainproc.c: Likewise.
14732         * g10/pkclist.c: Likewise.
14733         * g10/pubkey-enc.c: Likewise.
14734         * g10/tofu.c: Likewise.
14735         * g10/trust.c: Likewise.
14736         * g10/trustdb.c: Likewise.
14737
14738 2017-03-08  Werner Koch  <wk@gnupg.org>
14739
14740         dirmngr: Do not put a keyserver into a new dirmngr.conf.
14741         + commit 8f028642239fa992c6c059e3c1b4421a1813c827
14742         * g10/dirmngr-conf.skel: Do not define keyservers.
14743
14744         doc: Add a note to the trust model direct.
14745         + commit f0257b4a86b73f5b956028e68590b6d2a23ea4da
14746         * doc/gpg.texi (GPG Configuration Options): Add note.  Chnage Index
14747         from trust-mode:foo to trust-model:foo.
14748
14749 2017-03-07  Justus Winter  <justus@g10code.com>
14750
14751         Revert "build: Improve CFLAGS handling."
14752         + commit b71384c8054ce2f245ccfae02b8ee81e1adfc512
14753         This reverts commit 4b57359ef3ce0b87e15889e12ef0fcd23f62dcb4.
14754
14755         build: Improve CFLAGS handling.
14756         + commit 4b57359ef3ce0b87e15889e12ef0fcd23f62dcb4
14757         * configure.ac: Strip any flags matching '-Werror' from CFLAGS before
14758         running the tests, and add them back later on.
14759
14760 2017-03-07  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
14761
14762         gpgscm: Use system strlwr if available.
14763         + commit c22a2a89d3bd3d08b3abb8e4e33df32b480338ec
14764         * tests/gpgscm/scheme.c: Define local strlwr only when HAVE_STRLWR is
14765         not defined in config.h.
14766         * tests/gpgscm/scheme-config.h: Remove hack.
14767
14768 2017-03-07  Justus Winter  <justus@g10code.com>
14769
14770         gpg: Do not allow the user to revoke the last valid UID.
14771         + commit 591b6a9d879cbcabb089d89a26d3c3e0306054e1
14772         * g10/keyedit.c (keyedit_quick_revuid): Merge self signatures, then
14773         make sure that we do not revoke the last valid UID.
14774         (menu_revuid): Make sure that we do not revoke the last valid UID.
14775         * tests/openpgp/quick-key-manipulation.scm: Demonstrate that
14776         '--quick-revoke-uid' can not be used to revoke the last valid UID.
14777
14778 2017-03-07  NIIBE Yutaka  <gniibe@fsij.org>
14779
14780         tools: Removal of -Icommon.
14781         + commit 80fb1a8a05b2194af16027555b09bbd5d48ec9ac
14782         * tools/gpg-wks-server.c: Follow the change.
14783
14784         More change for common.
14785         + commit d6c7bf1f8ab8899faba2fb81a35b096921c38f3c
14786         * g10, scd, test, tools: Follow the change of removal of -Icommon.
14787
14788         Remove -I option to common.
14789         + commit 70aca95d6816082b289fceca8eabfcf718a6b701
14790         * dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common.
14791         * g10/Makefile.am (AM_CPPFLAGS): Ditto.
14792         * g13/Makefile.am (AM_CPPFLAGS): Ditto.
14793         * kbx/Makefile.am (AM_CPPFLAGS): Ditto.
14794         * scd/Makefile.am (AM_CPPFLAGS): Ditto.
14795         * sm/Makefile.am (AM_CPPFLAGS): Ditto.
14796         * tools/Makefile.am (AM_CPPFLAGS): Ditto.
14797         * Throughout: Follow the change.
14798
14799 2017-03-07  Justus Winter  <justus@g10code.com>
14800
14801         tests: Avoid overflowing signed 32 bit time_t.
14802         + commit de3838372ae3cdecbd83eea2c53c8e2656d93052
14803         * tests/openpgp/quick-key-manipulation.scm: Use expiration times in
14804         the year 2038 instead of 2105 to avoid overflowing 32 bit time_t.
14805         time_t is used internally to parse the expiraton time from the iso
14806         timestamp.
14807
14808 2017-03-07  NIIBE Yutaka  <gniibe@fsij.org>
14809
14810         agent: Resolve conflict of util.h.
14811         + commit 176e07ce10d892fa7c7b96725b38b2fec9a1f916
14812         * agent/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common.
14813         * agent/call-pinentry.c, agent/call-scd.c: Follow the change.
14814         * agent/command-ssh.c, agent/command.c, agent/cvt-openpgp.c: Ditto.
14815         * agent/divert-scd.c, agent/findkey.c, agent/genkey.c: Ditto.
14816         * agent/gpg-agent.c, agent/pksign.c, agent/preset-passphrase.c: Ditto.
14817         * agent/protect-tool.c, agent/protect.c, agent/trustlist.c: Ditto.
14818         * agent/w32main.c: Ditto.
14819
14820         agent: Add include files.
14821         + commit bf03925751abb739f2fd9d631694d3dd33decf92
14822         * agent/command-ssh.c: Add sys/socket.h and sys/un.h.
14823
14824         agent: Fix get_client_pid for portability.
14825         + commit f7f806afa5083617f4aba02fc3b285b06a7d73d4
14826         * configure.ac: Simply check getpeerucred and ucred.h, and structure
14827         members.
14828         * agent/command-ssh.c: Include ucred.h.
14829         (get_client_pid) [HAVE_STRUCT_SOCKPEERCRED_PID]: Use sockpeercred
14830         structure for OpenBSD.
14831         [LOCAL_PEERPID]: Use LOCAL_PEERPID for macOS.
14832         [LOCAL_PEEREID]: Use LOCAL_PEEREID for NetBSD.
14833         [HAVE_GETPEERUCRED]: Use getpeerucred for OpenSolaris.
14834
14835         common: Fix warning for portability.
14836         + commit b9ab733fc0dd2ca2a7eaac0bde3a817c07af36c5
14837         * common/localename.c (do_nl_locale_name): We don't use CATEGORY.
14838
14839         tools: More portable for openpty use.
14840         + commit ce37ada87139ef418401f9f35439007a8c04a856
14841         * configure.ac (AC_CHECK_HEADERS): Add util.h libutil.h and termios.h.
14842         * tools/symcryptrun.c: Include those headers.
14843
14844         scd: Close THE_EVENT handle.
14845         + commit cc933a96f8e83bc66fb69ed33d9593acdd60c929
14846         * scd/scdaemon.c (handle_connections): Close the handle.
14847
14848 2017-03-06  Justus Winter  <justus@g10code.com>
14849
14850         tests: Harmonize temporary and socket directory handling.
14851         + commit 7e19786a5ddef637d1d9d21593fecf5a36b6f372
14852         * tests/gpgscm/tests.scm (mkdtemp): Do not magically obey the
14853         environment variable 'TMP', make sure to always return an absolute
14854         path.
14855         * tests/gpgme/Makefile.am (TMP): Drop variable.
14856         (TESTS_ENVIRONMENT): Drop 'TMP'.
14857         * tests/gpgme/gpgme-defs.scm (create-gpgmehome): Start the agent.  Do
14858         not create private key store, the agent does that for us.
14859         * tests/gpgsm/Makefile.am (TMP): Drop variable.
14860         (TESTS_ENVIRONMENT): Drop 'TMP'.
14861         * tests/gpgme/gpgme-defs.scm (create-gpgsmhome): Start the agent.  Do
14862         not create private key store, the agent does that for us.
14863         * tests/migrations/Makefile.am (TMP): Drop variable.
14864         (TESTS_ENVIRONMENT): Drop 'TMP'.
14865         * tests/migrations/common.scm (gpgconf): New variable.
14866         (run-test): Create and remove socket directory.
14867         * tests/migrations/extended-pkf.scm (src-tarball): Remove variable.
14868         (setup): Remove function.
14869         (trigger-migration): Likewise.
14870         Use 'run-test' to execute the test.
14871         * tests/migrations/from-classic.scm (src-tarball): Remove variable.
14872         (setup): Remove function.
14873         Use 'run-test' to execute the tests.
14874         * tests/openpgp/Makefile.am (TMP): Drop variable.
14875         (TESTS_ENVIRONMENT): Drop 'TMP'.
14876         * tests/openpgp/README: Do not mention 'TMP'.
14877         * tests/openpgp/defs.scm (with-home-directory): New macro.
14878         (create-legacy-gpghome): Do not create private key store, the agent
14879         does that for us.
14880         (start-agent): Make sure to terminate the right agent with 'atexit'.
14881
14882         gpgscm: Fix creation of temporary directories.
14883         + commit 171e4314ebd3ff74af3dcdc8bd68e1100e8910ea
14884         * tests/gpgscm/ffi.c (do_mkdtemp): Use a larger buffer for the
14885         template.
14886
14887 2017-03-06  Werner Koch  <wk@gnupg.org>
14888
14889         wks: Set published keys world-readable.
14890         + commit e3589110e01dc6ad04463351ec2ce17201556d09
14891         * tools/gpg-wks-server.c (check_and_publish): Set the permissions.
14892
14893         gpg: Fix attempt to double free an UID structure.
14894         + commit 4a130bbc2c2f4be6e8c6357512a943f435ade28f
14895         * g10/getkey.c (get_best_pubkey_byname): Set released .UID to NULL.
14896
14897 2017-03-06  NIIBE Yutaka  <gniibe@fsij.org>
14898
14899         scd: Fix compiler warnings for app-openpgp.c.
14900         + commit e6ca015ae182a6dbb0466441efc17c99683e9375
14901         * scd/app-openpgp.c (retrieve_key_material): Remove touching I.
14902         (do_change_pin): Make sure going to leave if PINVALUE == 0.
14903         (rsa_writekey): Emit simpler log.
14904
14905         scd: More cleanup of old code.
14906         + commit 9bf39ed75ddbd35908bcd0996f55325ff801619a
14907         * scd/app-dinsig.c (do_sign): Remove assignment to HASHALGO.
14908         * scd/app-p15.c (parse_keyusage_flags): Remove assign to MASK.
14909         (read_ef_aodf): Likewise.
14910         (read_ef_cdf): Change the control to parse_error.
14911         * scd/app-sc-hsm.c (parse_keyusage_flags): Remove assign to MASK.
14912         (read_ef_prkd): Remove assign to S.
14913         (read_ef_prkd): Check if PRKDF is not null.
14914         (read_ef_cd): Likewise for CDF.
14915
14916         scd: Clean up old code.
14917         + commit cb6337329d3c858c695a7e56e2fc31d9d50ca3fe
14918         * scd/apdu.c (CT_init, CT_data, CT_close): Remove.
14919         (ct_error_string, ct_activate_card, close_ct_reader, reset_ct_reader)
14920         (ct_get_status, ct_send_apdu, open_ct_reader): Remove.
14921         (new_reader_slot) [NEED_PCSC_WRAPPER]: Remove fd and pid handling.
14922         (writen, readn): Remove.
14923         (pcsc_get_status, pcsc_send_apdu, control_pcsc, close_pcsc_reader)
14924         (reset_pcsc_reader, open_pcsc_reader): Only DIRECT version.
14925         (apdu_open_one_reader): Remove CT_api handling.
14926         (apdu_get_status_internal, send_le): Fix to stop warnings.
14927
14928         scd: Fix API of select_file/_path.
14929         + commit 0703de01c8fbc417a99ecf8e950fc306b8c8ac9c
14930         * scd/iso7816.c (iso7816_select_file, iso7816_select_path): Remove
14931         unused arguments.
14932         * scd/app-dinsig.c (do_readcert): Follow the change.
14933         * scd/app-help.c (app_help_read_length_of_cert): Likewise.
14934         * scd/app-nks.c (keygripstr_from_pk_file, do_readcert, do_readkey)
14935         (switch_application): Likewise.
14936         * scd/app-p15.c (select_and_read_binary, select_ef_by_path)
14937         (micardo_mse, app_select_p15): Likewise.
14938         * scd/app.c (app_new_register): Likewise.
14939
14940         agent: For SSH, robustly handling scdaemon's errors.
14941         + commit 4ce4f2f683a17be3ddb93729f3f25014a97934ad
14942         * agent/command-ssh.c (card_key_list): Return 0 when
14943         agent_card_serialno returns an error.
14944         (ssh_handler_request_identities): Handle errors for card listing
14945         and proceed to other cases.
14946
14947 2017-03-03  Werner Koch  <wk@gnupg.org>
14948
14949         dirmngr: Fix commit de6d8313.
14950         + commit 67c203b6bf8d6dd489ceef3391f609986e7b7a49
14951         * dirmngr/http-common.c (get_default_keyserver): Fix assert.
14952
14953 2017-03-03  NIIBE Yutaka  <gniibe@fsij.org>
14954
14955         scd: Fix scd_kick_the_loop.
14956         + commit f9acc7d18bb90f47dafe7e32ae92f567756d6b12
14957         * scd/scdaemon.c (notify_fd): Remove.
14958         (the_event) [W32]: New.
14959         (main_thread_pid) [!W32]: New.
14960         (handle_signal): Handle SIGCONT.
14961         (scd_kick_the_loop): Use signal on UNIX and event on Windows.
14962         (handle_connections): Likewise.
14963
14964 2017-03-03  Werner Koch  <wk@gnupg.org>
14965
14966         gpg: Fix possible segv when attribute packets are filtered.
14967         + commit 5f6f3f5cae8a95ed469129f9677782c17951dab3
14968         * g10/import.c (impex_filter_getval): Handle PKT_ATTRIBUTE the same as
14969         PKT_USER_ID
14970         (apply_drop_sig_filter): Ditto.
14971
14972         gpg: Add new variables to the import and export filters.
14973         + commit 1813f3be23bdab5a42070424c47cb8daa9d9e6b7
14974         * g10/import.c (impex_filter_getval): Add new variables "expired",
14975         "revoked", and "disabled".
14976
14977 2017-03-02  Werner Koch  <wk@gnupg.org>
14978
14979         tools: Fix compile error with older gcc versions.
14980         + commit b1f48da02b474e985161aa2778d7b602a13c4292
14981         * tools/mime-parser.h: Include rfc822parse.h.
14982         (struct rfc822parse_context): Remove duplicate definition.
14983
14984         dirmngr: Rearrange files to fix de6d831.
14985         + commit 1890896fe698c55d15160a53aa6c5c22dc424031
14986         * dirmngr/http-common.c: New.
14987         * dirmngr/http-common.h: New.
14988         * dirmngr/Makefile.am (dirmngr_SOURCES): Add them.
14989         (t_http_SOURCES): Add them.
14990         (t_ldap_parse_uri_SOURCES): Add them.
14991         * dirmngr/misc.c (get_default_keyserver): Move to ...
14992         * dirmngr/http-common.c: here.
14993         * dirmngr/http.c: Include http-common.h instead of misc.h.
14994         * dirmngr/http-ntbtls.c: Ditto.
14995
14996         dirmngr: Let --gpgconf-list return the default keyserver.
14997         + commit de6d8313f6df32aaa151bee74e1db269ac1e0fed
14998         * dirmngr/misc.c (get_default_keyserver): New.
14999         * dirmngr/http.c: Include misc.h
15000         (http_session_new): Use get_default_keyserver instead of hardwired
15001         "hkps.pool.sks-keyservers.net".
15002         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
15003         * dirmngr/dirmngr.c (main) <aGPGCongList>: Return default keyserver.
15004
15005 2017-03-02  Justus Winter  <justus@g10code.com>
15006
15007         gpg: Always initialize the trust db when generating keys.
15008         + commit 0c4d0620d327e8a2069532a5519afefe867a47d6
15009         * g10/gpg.c (main): Always initialize the trust db when generating
15010         keys.
15011         * g10/keygen.c (do_generate_keypair): We can now assume that there is
15012         a trust db.
15013
15014         gpg: Fix (quick) key generation with --always-trust.
15015         + commit 4735ab96aa5577d40ba7b3f72d863057198cc6a7
15016         * g10/keygen.c (do_generate_keypair): Only update the ownertrust if we
15017         do have a trust database.
15018         * g10/trustdb.c (have_trustdb): New function.
15019         * g10/trustdb.h (have_trustdb): New prototype.
15020         * tests/openpgp/quick-key-manipulation.scm: Remove workaround.
15021
15022 2017-03-02  Werner Koch  <wk@gnupg.org>
15023
15024         agent: Improve error message for the KEYTOCARD command.
15025         + commit d6f0f368763006abf08818bfefcd32ecedb5c20a
15026         * agent/command.c (cmd_keytocard): Always use leave_cmd.  Simplify
15027         timestamp checking and do an early test with an appropriate error
15028         message.
15029
15030 2017-03-02  Justus Winter  <justus@g10code.com>
15031
15032         g10: Signal an error when trying to revoke non-existant UID.
15033         + commit 62d21a4ab4029b32ea129f1cf3a0e1f22e2fb7b0
15034         * g10/keyedit.c (keyedit_quick_revuid): Signal an error when trying to
15035         revoke non-existant UID.
15036         * tests/openpgp/quick-key-manipulation.scm: Test that.
15037
15038         tests: Log information about ssh, add comments to test.
15039         + commit 74cb3b230c1f99afc5fd09bccc24186a63b154b0
15040         * tests/openpgp/ssh-import.scm (ssh-version-string): New variable, and
15041         log the binary and version used in the test.
15042         (ssh-supports?): Document how we test what algorithms are supported by
15043         ssh, and log ssh-keygen's replies.
15044
15045         common,tools: Always escape newlines when escaping data.
15046         + commit e064c75b08a523f738108428fe0c417a46e66238
15047         * common/stringhelp.c (do_percent_escape): Always escape newlines.
15048         * tools/gpgconf-comp.c (gc_percent_escape): Likewise.
15049
15050 2017-03-01  Werner Koch  <wk@gnupg.org>
15051
15052         Release 2.1.19.
15053         + commit 4a28c212b35739ce951bd41cfc6ef1a215846b2e
15054
15055
15056         build: Add kludge for "make distcheck" in a release build.
15057         + commit 246b27921b5dc34f367d879402725784aaee2494
15058         * configure.ac: New option --enable-gnupg-builddir-envvar.
15059         (ENABLE_GNUPG_BUILDDIR_ENVVAR): New ac_define.
15060         * common/homedir.c (gnupg_set_builddir_from_env): Consider
15061         ENABLE_GNUPG_BUILDDIR_ENVVAR.
15062         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Rename to ...
15063         (AM_DISTCHECK_CONFIGURE_FLAGS): this to be future proof.  Add option
15064         --enable-gnupg-builddir-envvar.
15065
15066 2017-03-01  Yuri Chornoivan  <yurchor@ukr.net>
15067
15068         po: Update Ukrainian translation.
15069         + commit c7f2a59833728e99e00449da2ddb10cf66693e7e
15070
15071
15072 2017-03-01  Ineiev  <ineiev@gnu.org>
15073
15074         po: Update Russian translation.
15075         + commit 280c724fe26bfd861ac74abc71e221795d8947f0
15076
15077
15078 2017-03-01  Werner Koch  <wk@gnupg.org>
15079
15080         gpg: Make --export-options work with --export-secret-keys.
15081         + commit 891ab23411b7f20ef37d8bde81d9857b083235df
15082         * g10/export.c (export_seckeys): Add arg OPTIONS and pass it to
15083         do_export.
15084         (export_secsubkeys): Ditto.
15085         * g10/gpg.c (main): Pass opt.export_options to export_seckeys and
15086         export_secsubkeys
15087
15088         gpg: Allow creating keys using an existing ECC key.
15089         + commit 2bbdeb8ee87a6c7ec211be16391a11b7c6030bed
15090         * common/sexputil.c (get_pk_algo_from_canon_sexp): Remove arg R_ALGO.
15091         Change to return the algo id.  Reimplement using get_pk_algo_from_key.
15092         * g10/keygen.c (check_keygrip): Adjust for change.
15093         * sm/certreqgen-ui.c (check_keygrip): Ditto.
15094
15095 2017-02-28  Werner Koch  <wk@gnupg.org>
15096
15097         gpg: Do not require a trustdb for decryption.
15098         + commit e182542e90cbeff4f2ac6c8d71061356d7cdcdea
15099         * g10/trustdb.c (init_trustdb): Add and implement arg NO_CREATE.
15100         Change to return an error code.  Change all callers to to pass False
15101         for NO_CREATE.
15102         (tdb_get_ownertrust): New arg NO_CREATE.  Call init_trustdb to test
15103         for a non-existing trustdb.  Change all callers to to pass False for
15104         NO_CREATE.
15105         (tdb_get_min_ownertrust): Ditto.
15106         * g10/trust.c (get_ownertrust_with_min): Add arg NO_CREATE.  Call
15107         init_trustdb for a quick check.
15108         (get_ownertrust_info): Add arg NO_CREATE.
15109         (get_ownertrust_string): Ditto.
15110         * g10/gpgv.c (get_ownertrust_info): Adjust stub.
15111         * g10/test-stubs.c (get_ownertrust_info): Ditto.
15112         * g10/mainproc.c (list_node): Call get_ownertrust_info with NO_CREATE
15113         set.
15114         * g10/pubkey-enc.c (get_it): Ditto.
15115
15116 2017-02-28  Justus Winter  <justus@g10code.com>
15117
15118         gpgscm: Improve parsing.
15119         + commit e4583ae14e52482ab390c102d071755f91ab211d
15120         * tests/gpgscm/scheme.c (port_increment_current_line): Avoid creating
15121         the same integer if the delta is zero.  This happens a lot during
15122         parsing, and puts pressure on the memory allocator.
15123
15124         gpgscm: Fix calculating the line number.
15125         + commit 058c97f9fc485405246b1adfcc905c1891550652
15126         * tests/gpgscm/scheme.c (opexe_5): Only increment the line number on
15127         newlines.
15128
15129         gpg,tools: Make auto-key-retrieve configurable via gpgconf.
15130         + commit d379a0174cca595204b32da9a66c513a1304e6d0
15131         * g10/gpg.c (gpgconf_list): Add 'auto-key-retrieve'.
15132         * tools/gpgconf-comp.c (gc_options_gpg): Likewise.
15133
15134         tests: Improve support for gpgconf.
15135         + commit 41900175cf046dd9abe3d7a6805f6a403d68df15
15136         * tests/openpgp/defs.scm: Improve high-level inteface to gpgconf.
15137         * tests/openpgp/gpgconf.scm: Adapt.
15138         * tests/openpgp/tofu.scm: Use it to select the trust model.
15139
15140         gpg,tools: Make trust-model configurable via gpgconf.
15141         + commit ebeccd73eb85f9027f0985d77dfe901266c6ddef
15142         * g10/gpg.c (gpgconf_list): Add 'trust-model'.
15143         * tools/gpgconf-comp.c (gc_options_gpg): Likewise.
15144
15145         gpgscm: Track source locations in every kind of ports.
15146         + commit 7cc57e2c63d0fa97569736419db5c76117e7685b
15147         * tests/gpgscm/scheme-private.h (struct port): Move location
15148         information out of the union.
15149         * tests/gpgscm/scheme.c (mark): All ports need marking now.
15150         (gc): Likewise all ports on the load stack.
15151         (port_clear_location): Adapt accordingly.  Also, add an empty function
15152         for !SHOW_ERROR_LINE.
15153         (port_increment_current_line): Likewise.
15154         (port_reset_current_line): Drop function in favor of...
15155         (port_init_location): ... this new function.
15156         (file_push): Simplify.
15157         (file_pop): Likewise.
15158         (port_rep_from_filename): Likewise.
15159         (port_rep_from_file): Likewise.
15160         (port_rep_from_string): Also initialize the location.
15161         (port_rep_from_scratch): Likewise.
15162         (port_close): Simplify and generalize.
15163         (skipspace): Likewise.
15164         (token): Likewise.
15165         (_Error_1): Generalize.
15166         (opexe_5): Likewise.
15167         (scheme_deinit): Simplify and generalize.
15168         (scheme_load_named_file): Likewise.
15169         (scheme_load_string): Also initialize the location.
15170
15171 2017-02-28  Werner Koch  <wk@gnupg.org>
15172
15173         gpgv,w32: Fix --status-fd.
15174         + commit 8a67dc4c4324b617b5a3fea51c59c674488544d6
15175         * g10/gpgv.c (main): Use translate_sys2libc_fd_int for --status-fd.
15176
15177         w32: Make pipes really pollable.
15178         + commit 1192449207f41b26be8950b04df84a52c8a2a886
15179         * common/exectool.c (gnupg_exec_tool_stream) [W32]: Use _get_osfhandle
15180         to print the fd for the command line.
15181         * common/exechelp-w32.c (create_pipe_and_estream): Use es_sysopen so
15182         that the streams are actually pollable.
15183
15184 2017-02-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15185
15186         dirmngr: Avoid warnings during non-ntbtls build.
15187         + commit f5782e11a560fd590221042391254c810a42e45f
15188         * dirmngr/t-http.c (my_http_tls_verify_cb): Avoid warnings when not
15189         using ntbtls.
15190
15191         trustdb: Respect --quiet during --import-ownertrust.
15192         + commit ddf01a67d6388d988f1db50a06facb21c14d9426
15193         * g10/tdbdump.c (import_ownertrust): If opt.quiet is set, do not send
15194         log_info messages.
15195
15196 2017-02-26  Manish Goregaokar  <manish@mozilla.com>
15197
15198         g10: fix typo.
15199         + commit 64ec21bebd3f136722e608649906b59c6add6947
15200         I already have copyright assignment with the FSF for GDB. I don't
15201         think I'll need to do the DCO thing.
15202
15203 2017-02-24  Werner Koch  <wk@gnupg.org>
15204
15205         gpgv: New options --log-file and --debug.
15206         + commit 7af5d61c6e210210c777be9e6e87720dd4a055d9
15207         * g10/gpgv.c (oLoggerFile, oDebug): New consts.
15208         (opts): Add options --log-file and --debug.
15209         (main): Implement options.
15210
15211 2017-02-24  Andre Heinecke  <aheinecke@intevation.de>
15212
15213         speedo,w32: Fix gpg-wks-client installation.
15214         + commit 49b4a676148523b51beca3ae929e9d78ed7ba110
15215         * build-aux/speedo/w32/inst.nsi: gpg-wks-client is an exe.
15216
15217 2017-02-23  Werner Koch  <wk@gnupg.org>
15218
15219         dirmngr: Add new debug flag "extprog"
15220         + commit 22b69b9edfdf6e6172239cbd1075ffe29077d339
15221         * dirmngr/dirmngr.h (DBG_EXTPROG_VALUE, DBG_EXTPROG): New macros.
15222         * dirmngr/dirmngr.c (debug_flags): Add flag "extprog".
15223         (handle_connections): Use a macro instead of -1 for an invalid socket.
15224         * dirmngr/loadswdb.c (verify_status_cb): Debug the gpgv call.
15225
15226         wks: Make sure that the draft 2 request is correctly detected.
15227         + commit d30e17ac62dea8913b7f353971d546b6b1a09bd5
15228         * tools/gpg-wks.h (WKS_DRAFT_VERSION): New.
15229         * tools/wks-receive.c (new_part): Move test wks draft version to ...
15230         (t2body): new callback.
15231         (wks_receive): Register this callback.
15232         * tools/gpg-wks-server.c (send_confirmation_request): Emit draft
15233         version header.
15234         (send_congratulation_message): Ditto.
15235         * tools/gpg-wks-client.c (decrypt_stream_parm_s): New.
15236         (decrypt_stream_status_cb): Check DECRYTPION_KEY status.
15237         (decrypt_stream): Get infor from new callback.
15238         (process_confirmation_request): New arg 'mainfpr'.  Check that it
15239         matches the decryption key.
15240         (read_confirmation_request): Check that the decryption key has been
15241         generated by us.
15242         (command_send): Use macro from draft version header.
15243         (send_confirmation_response): Emit draft version header.
15244
15245         wks: New callback for the mime parser.
15246         + commit a2090250829fe8989be2afc8cf41ba2a022072fc
15247         * tools/mime-parser.c (mime_parser_context_s): New field 't2body'.
15248         (parse_message_cb): Call that callback.
15249         (mime_parser_set_t2body): New.
15250
15251         gpg: Emit new status DECRYPTION_KEY.
15252         + commit effa80e0b5fd8cf9e31a984afe391c2406edee8b
15253         * common/status.h (STATUS_DECRYPTION_KEY): New.
15254         * g10/pubkey-enc.c (get_it): Emit that status.
15255
15256         dirmngr,w32: Make https with ntbtls work.
15257         + commit a42bf00b4edce789999aa3bdfce235cf726463ae
15258         * dirmngr/http.c (simple_cookie_functions): New.
15259         (send_request) [HTTP_USE_NTBTLS, W32]: Use es_fopencookie.
15260         (cookie_read): Factor some code out to ...
15261         (read_server): new.
15262         (simple_cookie_read, simple_cookie_write) [W32]: New.
15263
15264 2017-02-22  Werner Koch  <wk@gnupg.org>
15265
15266         scd,agent: Improve the OpenPGP PIN prompt texts.
15267         + commit f98c8cb013033c08e98ebedcc0e084fbd2a85b0c
15268         * scd/app-openpgp.c (get_prompt_info): Change texts.
15269         * agent/call-pinentry.c (struct entry_features): New.
15270         (getinfo_features_cb): New.
15271         (start_pinentry): Set new fucntion as status callback.
15272         (build_cmd_setdesc): New.  Replace all snprintf for SETDESC by this
15273         one.
15274
15275 2017-02-22  Andre Heinecke  <aheinecke@intevation.de>
15276
15277         scd: Nitpicks on the improved card prompts.
15278         + commit 143ca039e1e81140ae520cc1025f8e25c01acc80
15279         * src/app-openpgp.c (get_prompt_info): Change wording and order
15280         slightly.
15281
15282 2017-02-22  Werner Koch  <wk@gnupg.org>
15283
15284         scd: Improve the prompts for OpenPGP cards.
15285         + commit e3944f34e3220f96fb1be449eb6f3d7360bc2d0b
15286         * scd/app-openpgp.c (get_disp_name): New.
15287         (get_disp_serialno): New.
15288         (get_prompt_info): New.
15289         (build_enter_admin_pin_prompt): Rework the prompt texts.  Factor some
15290         code out to ...
15291         (get_remaining_tries): New.
15292         (verify_a_chv): Print a remaining counter also for the standard PIN.
15293         Rework the prompt texts.
15294
15295         * agent/divert-scd.c (ask_for_card): Pretty format an OpenPGP serial
15296         no.
15297
15298         agent: Prepend the description to a PIN prompt.
15299         + commit 6488ffb767733a2cf92ca5ba3e61fc0c53e0f673
15300         * agent/divert-scd.c (has_percent0A_suffix): New.
15301         (getpin_cb): Prepend DESC_TEXT to the prompt.
15302         * agent/findkey.c (modify_description): Rename to ...
15303         (agent_modify_description): this.  MAke global.  Add kludge to remove
15304         empty parentheses from the end.
15305         (agent_key_from_file, agent_delete_key): Adjust for above change.
15306         * agent/pksign.c (agent_pksign_do): Modify DESC_TEXT also when
15307         diverting to a card.
15308
15309         agent: Prepare to pass an additional parameter to the getpin callback.
15310         + commit 78d875a0f83bc046279b951aea76cd74f3c44fd8
15311         * agent/call-scd.c (writekey_parm_s, inq_needpin_s): Merge into ...
15312         (inq_needpin_parm_s): new struct.  Add new field 'getpin_cb_desc'.
15313         Change users to set all fields.
15314         (inq_needpin): Pass GETPIN_CB_DESC to the GETPIN_CB.
15315         (agent_card_pksign): Add arg 'desc_text' and change arg 'getpin_cb' to
15316         take an additional arg 'desc_text'.
15317         (agent_card_pkdecrypt): Ditto.
15318         (agent_card_writekey): Change arg 'getpin_cb' to take an additional
15319         arg 'desc_text'.
15320         (agent_card_scd): Ditto.
15321         * agent/divert-scd.c (getpin_cb): Add new arg 'desc_text'.
15322         (divert_pksign): Add new arg 'desc_text' and pass is to
15323         agent_card_pksign.
15324         (divert_pkdecrypt): Add new arg 'desc_text' and pass is to
15325         agent_card_pkdecrypt.
15326         * agent/pkdecrypt.c (agent_pkdecrypt): Pass DESC_TEXT to
15327         divert_pkdecrypt.
15328         * agent/pksign.c (agent_pksign_do):  Pass DESC_TEXT to
15329         divert_pksign.
15330
15331 2017-02-22  NIIBE Yutaka  <gniibe@fsij.org>
15332
15333         tests: No spelling fix for test text.
15334         + commit ef424353f342f80ca6d18ede8b63c1b02215d105
15335         * tests/openpgp/verify.scm (msg_ed25519_rshort): Revert the spelling
15336         fix.
15337
15338 2017-02-21  Werner Koch  <wk@gnupg.org>
15339
15340         dirmngr: Add special treatment for the standard hkps pool to ntbtls.
15341         + commit 831d014550863026dfefa774c961a21bd20c1e48
15342         * dirmngr/validate.h (VALIDATE_FLAG_SYSTRUST): Remove
15343         (VALIDATE_FLAG_EXTRATRUST): Remove
15344         (VALIDATE_FLAG_TRUST_SYSTEM): New.
15345         (VALIDATE_FLAG_TRUST_CONFIG): New.
15346         (VALIDATE_FLAG_TRUST_HKP): New.
15347         (VALIDATE_FLAG_TRUST_HKPSPOOL): New.
15348         (VALIDATE_FLAG_MASK_TRUST): New.
15349         * dirmngr/validate.c (check_header_constants): New.
15350         (validate_cert_chain): Call new function.  Simplify call to
15351         is_trusted_cert.
15352         * dirmngr/crlcache.c (crl_parse_insert): Pass
15353         VALIDATE_FLAG_TRUST_CONFIG to validate_cert_chain
15354         * dirmngr/server.c (cmd_validate): Use VALDIATE_FLAG_TRUST_SYSTEM and
15355         VALIDATE_FLAG_TRUST_CONFIG.
15356         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Check provided TLS
15357         context.  Set trustclass flags using the new VALIDATE_FLAG_TRUST
15358         values.
15359
15360         * dirmngr/certcache.c (cert_cache_init): Load the standard pool
15361         certificate prior to the --hkp-cacerts.
15362
15363         dirmngr: Load --hkp-cacert values into the certificate cache.
15364         + commit d1625a9a82b1e5d96bbbf2132c49c53108565ae1
15365         * dirmngr/dirmngr.c (hkp_cacert_filenames): New var.
15366         (parse_rereadable_options): Store filenames from --hkp-cacert in the
15367         new var.
15368         (main, dirmngr_sighup_action): Pass that var to cert_cache_init.
15369         * dirmngr/certcache.c (cert_cache_init): Add arg 'hkp_cacert' and load
15370         those certs.
15371         (load_certs_from_file): Use autodetect so that PEM and DER encodings
15372         are possible.
15373
15374         dirmngr: Load "sks-keyservers.netCA.pem" into the cache.
15375         + commit 9741aa24d9056b56cd5366ff5379bd8a3e6118df
15376         * dirmngr/certcache.c (load_certs_from_file): Always build this
15377         function.  Add args 'trustclasses' and 'no_error'.  Pass TRUSTCLASSES
15378         to put_cert.
15379         (load_certs_from_system): Pass CERTTRUST_CLASS_SYSTEM to
15380         load_certs_from_file.
15381         (cert_cache_init): Try to load "sks-keyservers.netCA.pem".  Don't make
15382         function fail in an out-of-core condition.
15383
15384         dirmngr: Implement trust classes for the cert cache.
15385         + commit 50b9828eacc39c1ca75cb8313db896e4bdc8b270
15386         * dirmngr/certcache.h (CERTTRUST_CLASS_SYSTEM): New.
15387         (CERTTRUST_CLASS_CONFIG): New.
15388         (CERTTRUST_CLASS_HKP): New.
15389         (CERTTRUST_CLASS_HKPSPOOL): New.
15390         * dirmngr/certcache.c (MAX_EXTRA_CACHED_CERTS): Rename to ...
15391         (MAX_NONPERM_CACHED_CERTS): this.
15392         (total_extra_certificates): Rename to ...
15393         (total_nonperm_certificates): this.
15394         (total_config_certificates): Remove.
15395         (total_trusted_certificates): Remove.
15396         (total_system_trusted_certificates): Remove.
15397         (cert_item_s): Remove field 'flags'.  Add fields 'permanent' and
15398         'trustclasses'.
15399         (clean_cache_slot): Clear new fields.
15400         (put_cert): Change for new cert_item_t structure.
15401         (load_certs_from_dir): Rename arg 'are_trusted' to 'trustclass'
15402         (load_certs_from_file): Use CERTTRUST_CLASS_ value for put_cert.
15403         (load_certs_from_w32_store): Ditto.
15404         (cert_cache_init): Ditto.
15405         (cert_cache_print_stats): Rewrite.
15406         (is_trusted_cert): Replace arg 'with_systrust' by 'trustclasses'.
15407         Chnage the test.
15408         * dirmngr/validate.c (allowed_ca): Pass CERTTRUST_CLASS_CONFIG to
15409         is_trusted_cert.
15410         (validate_cert_chain): Pass CERTTRUST_CLASS_ values to
15411         is_trusted_cert.
15412
15413         dirmngr: New Assuan option "http-crl".
15414         + commit 493c142e582ff5ef1b5fdfcb9653715ef43e83e9
15415         * dirmngr/dirmngr.h (server_control_s): New flag 'http_no_crl'.
15416         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Set this flag.
15417         * dirmngr/server.c (option_handler): New option "http-crl"
15418         * dirmngr/http.h (HTTP_FLAG_NO_CRL): New flag.
15419         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Consult this flag.
15420         * dirmngr/ks-engine-hkp.c (send_request): Set flag depending on CTRL.
15421         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
15422
15423         * dirmngr/t-http.c (main): New option --no-crl.
15424
15425         dirmngr: Add a magic field to the http structs.
15426         + commit 39c745038181edd097e188434b3f9c971ed3987f
15427         * dirmngr/http.c (HTTP_SESSION_MAGIC): New.
15428         (http_session_s): New field 'magic'.
15429         (HTTP_CONTEXT_MAGIC): New.
15430         (http_context_s): New field 'magic'.
15431         (my_ntbtls_verify_cb): Assert MAGIC.
15432         (fp_onclose_notification): Ditto.
15433         (session_unref): Ditto.  Reset MAGIC.
15434         (http_session_new): Set MAGIC.
15435         (http_open): Ditto.
15436         (http_raw_connect): Ditto.
15437         (http_close): Assert MAGIC.  Reset MAGIC.
15438
15439         * dirmngr/t-http.c (my_http_tls_verify_cb): MArk HTTP_FLAGS unused.
15440
15441 2017-02-21  NIIBE Yutaka  <gniibe@fsij.org>
15442
15443         g10: Support primary key generation by keygrip.
15444         + commit 3fc69224b7b22ad1df1395ebcb21549384839cd1
15445         * g10/keygen.c (para_name): Add pKEYGRIP.
15446         (generate_keypair): Use pKEYGRIP for key generation.
15447         (do_generate_keypair): Call do_create_from_keygrip with pKEYGRIP.
15448
15449 2017-02-20  Werner Koch  <wk@gnupg.org>
15450
15451         dirmngr: Setup a log handler for ntbtls.
15452         + commit a022baa4a487eec769411255a64088450c4c8a49
15453         * dirmngr/dirmngr.c (my_ntbtls_log_handler) [HTTP_USE_NTBTLS]: New.
15454         (main) [HTTP_USE_NTBTLS]: Register log handler.
15455
15456         common: New function log_logv_with_prefix.
15457         + commit 3e9512e557d95c7dc36835365b127b25f6a5cdd9
15458         * common/logging.c (do_logv): Add arg 'prefmt' and print it.  Chnage
15459         call callers to pass NULL.
15460         (log_logv_with_prefix): New.
15461
15462         dirmngr.c: Make http.c build without any TLS support.
15463         + commit e174893262d8de0f52faa8abe4fc0402719a35d8
15464         * dirmngr/http.c (http_session_new): Remove used of tls_prority.
15465
15466          dirmngr: Make t-http.c work again with gnutls - second try.
15467         + commit 81ea24b8637ac08e44e9e44816689413c2ae7e08
15468         * dirmngr/t-http.c: Always include ksba.h.
15469
15470         dirmngr: Make t-http.c work again with gnutls.
15471         + commit f923873863fd863d71349f20f5568f80aecc020b
15472         * dirmngr/Makefile.am (t_http_CFLAGS, t_http_LDADD): Add KSBA flags
15473         and libs.
15474
15475 2017-02-19  Werner Koch  <wk@gnupg.org>
15476
15477         dirmngr: First take on ntbtls cert verification.
15478         + commit 64fffd0ce2a4fd9cba152cf07497b585410cc652
15479         * dirmngr/http-ntbtls.c: New.
15480         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
15481         * dirmngr/dirmngr.h (SERVER_CONTROL_MAGIC): New.
15482         (server_conrol_s): Add field 'magic',
15483         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Set MAGIC.
15484         (dirmngr_deinit_default_ctrl): Set MAGIC to deadbeef.
15485         * dirmngr/http.c (my_ntbtls_verify_cb): New.
15486         (http_session_new) [HTTP_USE_NTBTLS]: Remove all CA setting code.
15487         (send_request) [HTTP_USE_NTBTLS]: Set the verify callback.  Do not call
15488         the verify callback after the handshake.
15489         * dirmngr/ks-engine-hkp.c (send_request): Pass
15490         gnupg_http_tls_verify_cb to http_session_new.
15491         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
15492
15493         * dirmngr/t-http.c (my_http_tls_verify_cb): New.
15494         (main): Rename option --gnutls-debug to --tls-debug.
15495         (main) [HTTP_USE_NTBTLS]: Create a session.
15496
15497 2017-02-18  Werner Koch  <wk@gnupg.org>
15498
15499         dirmngr: Add per-session verify callback to http.c.
15500         + commit a74902cccde539ee2bd216caec0da6eb54b67c1b
15501         * dirmngr/http.h (http_verify_cb_t): New type.
15502         * dirmngr/http.c (http_session_s): Add fields flags, verify_cb, and
15503         verify_cb_value.
15504         (http_session_new): Remove arg tls_priority.  Add args verify_cb and
15505         verify-cb_value.  Store them in the session object.
15506         (send_request): Use per-session verify callback.
15507         (http_verify_server_credentials) [HTTP_USE_NTBTLS]: Return
15508         GPG_ERR_NOT_IMPLEMENTED.
15509         * dirmngr/ks-engine-hkp.c (send_request): Adjust for changed
15510         http_session_new.
15511         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
15512         * dirmngr/t-http.c (main): Ditto.
15513
15514         * dirmngr/server.c (do_get_cert_local): Replace xmalloc by malloc.
15515
15516 2017-02-17  Werner Koch  <wk@gnupg.org>
15517
15518         dirmngr: Strip the default https port from the Host: header.
15519         + commit cd32ebd152a522e362469ab969d91f8d49f28a60
15520         * dirmngr/http.c (send_request): Strip the default https port.
15521
15522         dirmngr: Add option --no-crl to the VALIDATE cmd.
15523         + commit f07811ee2c0a8044551e2ec063eda61cff7f6e39
15524         * dirmngr/validate.h: Remove enums VALIDATE_MODE_*.
15525         (VALIDATE_FLAG_SYSTRUST, VALIDATE_FLAG_EXTRATRUST)
15526         (VALIDATE_FLAG_CRL, VALIDATE_FLAG_RECURSIVE)
15527         (VALIDATE_FLAG_OCSP, VALIDATE_FLAG_TLS)
15528         (VALIDATE_FLAG_NOCRLCHECK): New constants.
15529         * dirmngr/validate.c (validate_cert_chain): Change arg 'mode' to
15530         'flags'.  Change code accordingly.  Remove NO-CRL in TLS mode kludge.
15531         * dirmngr/crlcache.c (crl_parse_insert): Change to use flag values for
15532         the validate_cert_chain call.
15533         * dirmngr/server.c (cmd_validate): Ditto.  Add new option --no-crl.
15534
15535         dirmngr: Add options --tls and --systrust to the VALIDATE cmd.
15536         + commit 070211eb990f5ea41271eba432b6a6b485cef7c7
15537         * dirmngr/certcache.h (certlist_s, certlist_t): New.
15538         * dirmngr/certcache.c (read_certlist_from_stream): New.
15539         (release_certlist): New.
15540         * dirmngr/server.c (MAX_CERTLIST_LENGTH): New.
15541         (cmd_validate): Add options --tls and --systrust.  Implement them
15542         using a kludge for now.
15543         * dirmngr/validate.c (validate_cert_chain): Support systrust
15544         checking.  Add kludge to disable the CRL checking for tls mode.
15545
15546         dirmngr: Remove use of hardcoded numbers in validate.
15547         + commit ed99af030d19305dd7cd41c41ac581306cb91fd5
15548         * dirmngr/validate.c (enum cert_usage_modes): New.
15549         (cert_usage_p): Change type of arg MODE.  Use enums instead of
15550         hardwired values.  Use a switch instead of tricky bit tests.
15551         (cert_use_cert_p, cert_use_ocsp_p, cert_use_crl_p): Adjust.
15552
15553         * dirmngr/validate.c (cert_usage_p): Rename to check_cert_usage.
15554         (cert_use_cert_p): Rename to check_cert_use_cert.
15555         (cert_use_ocsp_p): Rename to check_cert_use_ocsp.
15556         (cert_use_crl_p): Rename to check_cert_use_crl.
15557
15558         * dirmngr/validate.h (VALIDATE_MODE_CERT_SYSTRUST): New.
15559         (VALIDATE_MODE_TLS, VALIDATE_MODE_TLS_SYSTRUST): New.
15560
15561 2017-02-17  NIIBE Yutaka  <gniibe@fsij.org>
15562
15563         agent: No cards is not an error.
15564         + commit dea4b3c742acbd195d6ab12b279b4dda315f2582
15565         * agent/command-ssh.c (card_key_list): Care the case of no cards.
15566
15567         agent: Send back all public keys for available cards.
15568         + commit 3f4f64b6ac0d7160fd9e1301f95820894b219c3f
15569         * agent/call-scd.c (card_cardlist_cb, agent_card_cardlist): New.
15570         * agent/command-ssh.c (card_key_list): New.
15571         (ssh_handler_request_identities): Call card_key_list and loop for the
15572         list to send public keys for all available cards.
15573
15574 2017-02-17  Justus Winter  <justus@g10code.com>
15575
15576         gpgscm: Guard use of tagged expressions.
15577         + commit aab6ba0bb60528b9e816e430be51170cf39611b0
15578         * tests/gpgscm/init.scm (vm-history-print): Check that the tag added
15579         to expressions when parsing source files matches the expected format.
15580         * tests/gpgscm/lib.scm (assert): Likewise.
15581
15582 2017-02-17  NIIBE Yutaka  <gniibe@fsij.org>
15583
15584         scd: Fix RESET command handling (more).
15585         + commit 99d4dfe83661d05ef3a20ed04e6cec5647536738
15586         * scd/app-common.h (struct app_ctx_s): Add reset_requested.
15587         * scd/app.c (app_reset): Locking APP, set reset_requested.
15588         (deallocate_app): Release the lock.
15589         (release_application): Add LOCKED_ALREADY argument.
15590         (scd_update_reader_status_file): Hold the lock when accessing APP.
15591         When reset_requested is set, close the reader and deallocate APP.
15592         * scd/command.c (open_card_with_request, cmd_restart): Follow the
15593         change of release_application.
15594         (send_client_notifications): Here it calls release_application holding
15595         the lock.
15596
15597 2017-02-16  Werner Koch  <wk@gnupg.org>
15598
15599         dirmngr,w32: Load all system provided certificates.
15600         + commit 7006352da773d82c47797bbf11e570ecafac6501
15601         * dirmngr/certcache.c (CERTOPENSYSTEMSTORE) [W32]: New type.
15602         (CERTENUMCERTIFICATESINSTORE) [W32]: New type.
15603         (CERTCLOSESTORE) [W32]: New type.
15604         (load_certs_from_file) [W32]: Do not build.
15605         (load_certs_from_w32_store) [W32]: New.
15606         (load_certs_from_system) [W32]: Call new function.
15607
15608         dirmngr: Load all system provided certificates.
15609         + commit 9a1a5ca0bc2cfb17ccf632de3e134b6d789c6855
15610         * configure.ac: Add option --default-trust-store.
15611         (DEFAULT_TRUST_STORE_FILE): New ac_define.
15612         * dirmngr/certcache.c: Include ksba-io-support.h.
15613         (total_trusted_certificates, total_system_trusted_certificates): New.
15614         (put_cert): Manage the new counters.
15615         (cert_cache_deinit): Reset them.
15616         (cert_cache_print_stats): Print them.
15617         (is_trusted_cert): Add arg WITH_SYSTRUST.  Change all callers to pass
15618         false.
15619         (load_certs_from_file): New.
15620         (load_certs_from_system): New.
15621         (cert_cache_init): Load system certificates.
15622
15623         common: Rename remaining symbols in ksba-io-support.
15624         + commit e1dfd862367cf91b66abe86bd73664409354bb14
15625         * common/ksba-io-support.c (gpgsm_reader_eof_seen): Rename to ...
15626         (gnupg_ksba_reader_eof_seen): this.  Change all callers.
15627         (gpgsm_destroy_reader): Rename to ...
15628         (gnupg_ksba_destroy_reader): this.  Change all callers.
15629         (gpgsm_finish_writer): Rename to ...
15630         (gnupg_ksba_finish_writer): this.  Change all callers.
15631         (gpgsm_destroy_writer): Rename to ...
15632         (gnupg_ksba_destroy_writer): this.  Change all callers.
15633         * common/ksba-io-support.c (struct base64_context_s): Rename to ...
15634         (gnupg_ksba_io_s): this.
15635         * common/ksba-io-support.h (base64_context_s): Ditto.
15636         (Base64Context): Rename this typedef to ...
15637         (gnupg_ksba_io_t): this.  Change all users.
15638
15639         common: Remove gpgsm dependencies from ksba-io-support.
15640         + commit 28c31524be84f20b34573c78bd3a94a81e4b1d61
15641         * common/ksba-io-support.c: Include ksba-io-support.h instead of
15642         ../sm/gpgsm.h.  Include util.h.
15643         (writer_cb_parm_s): Remove const from 'pem_name'.
15644         (gpgsm_destroy_writer): Free 'pem_name'.
15645         (gpgsm_create_reader): Rename to ...
15646         (gnupg_ksba_create_reader): this.  Replace args CTRL and
15647         ALLOW_MULTI_PEM by a new arg FLAGS.  Change the code to evaluate
15648         FLAGS.  Change all callers to pass the FLAGS.
15649         (gpgsm_create_writer): Rename to ...
15650         (gnupg_ksba_create_writer): this.  Replace arg CTRL by new arg FLAGS.
15651         Add arg PEM_NAME.  Evaluate FLAGS.  Store a copy of PEM_NAME.  Change
15652         all callers to pass the FLAGS and PEM_NAME.
15653
15654         common: Change license of ksba-io-support.c.
15655         + commit 919e76b407ac557b0f518ec03f3cc59e9e5740c9
15656         * common/ksba-io-support.c: Change from GPLv3+ to LGPLv3+/GPLv2+.
15657
15658         sm,common: Move ksba reader and writer support to common/.
15659         + commit 04bfa6fe6597b8ffcec61cbcacdc7eb137444e80
15660         * sm/base64.c: Rename to ...
15661         * common/ksba-io-support.c: this.
15662         * common/ksba-io-support.h: New.
15663         * common/Makefile.am (common_sources): Add new files.
15664         * sm/Makefile.am (gpgsm_SOURCES): Remove base64.c
15665
15666         dirmngr: Prepare certcache for forthcoming changes.
15667         + commit 5c4e67afd6385b48065de6a0f2dd0bfd936ab90b
15668         * dirmngr/certcache.c (cert_item_s): Rename 'flags.loaded' to
15669         'flags.config'.  Add 'flags.systrust'.
15670         (total_loaded_certificates): Rename to total_config_certificates.
15671         (put_cert): Rename args for clarity.  Set SYSTRUST flag.
15672         (load_certs_from_dir): Make sure put_cert does not set the SYSTRUST
15673         flag.
15674
15675         dirmngr: Replace stpcpy chains by strconcat.
15676         + commit aef60abe6a1772e18634984a94bd70f57d57ccdd
15677         * dirmngr/certcache.c (find_cert_bysn): Use strconcat.
15678         (find_cert_bysubject): Ditto.
15679         * dirmngr/http.c (store_header): Ditto.
15680         * dirmngr/ldap.c (make_url): Ditto.
15681         * dirmngr/server.c (get_cert_local_ski): Ditto.
15682         (do_get_cert_local): Use xstrconcat.
15683
15684 2017-02-16  NIIBE Yutaka  <gniibe@fsij.org>
15685
15686         scd: Minor fixes to silence compiler warnings.
15687         + commit 7a666ccb44f43c4efbaa51c1ca16fc0b37c3399d
15688         * scd/app.c (app_reset): Initialize ERR.
15689         * scd/scdaemon.c (scd_kick_the_loop, handle_connections): Catch the
15690         return value.
15691
15692 2017-02-15  Werner Koch  <wk@gnupg.org>
15693
15694         libdns: Workaround for bracketed numerical addresses.
15695         + commit a3509e12b6626a585ce7da6ceed8cfddcba2460f
15696         * dirmngr/dns-stuff.c (resolve_name_libdns): Work around an
15697         incompatibility between the glibc resolver and libdns.
15698
15699         dirmngr: Do PTR lookups only for 'keyserver --hosttable'.
15700         + commit a75325faf163275674a91971e75f1018035ca348
15701         * dirmngr/ks-engine-hkp.c (hostinfo_s): Remove fields v4addr and
15702         v5addr and add fields iporname and iporname_valid.
15703         (create_new_hostinfo): Clear them.
15704         (add_host): Remove the code to set the v4addr and v6addr fields.
15705         (ks_hkp_print_hosttable): Remove printing of the fields.  Compute the
15706         iporname field and display it.
15707         (ks_hkp_reload): Force re-computing of the iporname field in
15708         ks_hkp_print_hosttable.
15709
15710         dirmngr: Avoid PTR lookup for hosts in a pool.
15711         + commit da2ba20868093e3054d18adc2b1bc56cb23e4ba7
15712         * dirmngr/ks-engine-hkp.c (add_host): Don't to a PTR lookup for hosts
15713         in a pool.
15714
15715 2017-02-15  Justus Winter  <justus@g10code.com>
15716
15717         tests,build: Fix distcheck.
15718         + commit 2f7b6cb279ea0ee27364fbb2b12df47e76166a39
15719         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'time.scm'.
15720
15721         tests: Test and document other ways to create keys.
15722         + commit 90d383f1eb07fc823518dea10eb15ca390f5cf8e
15723         * doc/gpg.texi: Clarify usage and expiration arguments for key
15724         generation.
15725         * tests/openpgp/quick-key-manipulation.scm: Test all variants.
15726
15727         tests: Check expiration times of created keys.
15728         + commit 127e1e532da4083ccd3c307555b6177fab16f408
15729         * tests/gpgscm/ffi.c (do_get_time): New function.
15730         (ffi_init): Expose new function.
15731         * tests/gpgscm/ffi.scm (get-time): Document new function.
15732         * tests/gpgscm/time.scm: New file.
15733         * tests/openpgp/quick-key-manipulation.scm: Use the new facilities to
15734         check the expiration times of created keys.
15735         * tests/openpgp/tofu.scm: Use the new module.
15736
15737 2017-02-15  NIIBE Yutaka  <gniibe@fsij.org>
15738
15739         scd: Fix RESET command handling.
15740         + commit e2792813a55e091c51be7b1b089a71beb6466f1d
15741         * scd/app.c (release_application_internal): Remove.
15742         (release_application): Merge release_application_internal.
15743         (app_reset): Kick the loop and let close the reader.  Sleep is
15744         required here to wait closing.
15745         (scd_update_reader_status_file): When APP is no use, close it.
15746
15747 2017-02-14  Werner Koch  <wk@gnupg.org>
15748
15749         gpg: Make --export-ssh-key work for the primary key.
15750         + commit b456e5be91dc064fc9509ea86edab113721ed299
15751         * g10/export.c (export_ssh_key): Also check the primary key.
15752
15753 2017-02-13  Werner Koch  <wk@gnupg.org>
15754
15755         dirmngr: Do a DNS lookup even if it is missing from nsswitch.conf.
15756         + commit dee026d761ae3d7594c3dbc5b3fa842df53cc189
15757         * dirmngr/dns-stuff.c (libdns_init): Do not print error message for a
15758         missing nsswitch.conf.  Make sure that tehre is a DNS entry.
15759
15760         gpgconf: No ENOENT warning with --change-options et al.
15761         + commit 30dac0486b6357e84fbe79c612eea940b654e4d1
15762         * tools/gpgconf-comp.c (retrieve_options_from_program): Check ERRNO
15763         before printing a warning.
15764
15765         gpg: Print a warning if no command has been given.
15766         + commit 810adfd47801fc01e45fb71af9f05c91f7890cdb
15767         * g10/gpg.c (main): Print in the default case.
15768
15769 2017-02-13  Justus Winter  <justus@g10code.com>
15770
15771         g13: Fix build on macOS.
15772         + commit f8ce31a7bf1ee85e5010b628a66e6f69486e5213
15773         * g13/Makefile.am (t_common_ldadd): Add iconv.
15774
15775 2017-02-13  NIIBE Yutaka  <gniibe@fsij.org>
15776
15777         scd: Fix use case of PC/SC.
15778         + commit da4c132cca2c6df81243c9660b7348268a848f88
15779         * scd/apdu.c (apdu_open_reader): Add an argument APP_EMPTY.
15780         When CCID driver fails to open, try PC/SC if APP is nothing.
15781         * scd/app.c (select_application): Supply arg if APP is nothing.
15782
15783 2017-02-10  Werner Koch  <wk@gnupg.org>
15784
15785         gpg: Fix memory leak in the error case of signature creation.
15786         + commit 5996c7bf99f3a681393fd9589276399ebc956cff
15787         * g10/sign.c (write_signature_packets): Free SIG.  Also replace
15788         xcalloc by xtrycalloc.
15789
15790 2017-02-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15791
15792         common: Avoid warning about implicit declaration of gnupg_fd_valid.
15793         + commit 8810314e377a9cb6612150a57cf99260ed0bb9f6
15794         * common/logging.c: Add #include "sysutils.h".
15795
15796 2017-02-08  Justus Winter  <justus@g10code.com>
15797
15798         gpg,common: Make sure that all fd given are valid.
15799         + commit 6823ed46584e753de3aba48a00ab738ab009a860
15800         * common/sysutils.c (gnupg_fd_valid): New function.
15801         * common/sysutils.h (gnupg_fd_valid): New declaration.
15802         * common/logging.c (log_set_file): Use the new function.
15803         * g10/cpr.c (set_status_fd): Likewise.
15804         * g10/gpg.c (main): Likewise.
15805         * g10/keylist.c (read_sessionkey_from_fd): Likewise.
15806         * g10/passphrase.c (set_attrib_fd): Likewise.
15807         * tests/openpgp/Makefile.am (XTESTS): Add the new test.
15808         * tests/openpgp/issue2941.scm: New file.
15809
15810 2017-02-07  Justus Winter  <justus@g10code.com>
15811
15812         tests: Skip key types not supported by OpenSSH.
15813         + commit 56aa85f88f6b35fb03a2dc1a95882d49a74290e3
15814         * tests/openpgp/ssh-import.scm (path): New variable.
15815         (ssh,ssh-keygen,ssh-version,ssh-supports?): Likewise.
15816
15817 2017-02-07  Werner Koch  <wk@gnupg.org>
15818
15819         wks: Add WKS-Phase headers to the server messages.
15820         + commit b30ac663cec82c89ca9a3e87e65b36d2552f1533
15821         * tools/gpg-wks-server.c (send_confirmation_request): Add custom
15822         header.
15823         (send_congratulation_message): Ditto.
15824
15825 2017-02-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15826
15827         po: Manual updates of nl translation.
15828         + commit aa3f08794bfc809821e2fc30a09a5ae23925c645
15829         * po/nl.po: Apply several minor manual cleanups to nl.po that were
15830         previously applied to all the other localizations.
15831
15832         po: Copied missing nl.po translation from the 2.0 branch.
15833         + commit 8a9d4b55b09d04482b46055f0a60f01b86738df3
15834         * po/nl.po: Copy from 2.0 branch.
15835
15836         gpg: Fix aliases --list-key, --list-sig, and --check-sig.
15837         + commit f31120a5aa40b6e4e89d41d1d5d34e0f7da173b4
15838         * g10/gpg.c (opts): Define commands with ARGPARSE_c
15839         instead of ARGPARSE_s_n.
15840
15841 2017-02-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15842
15843         doc: Clarify abbreviation of --help.
15844         + commit f2b276dffbe2435b17abf2b3c51684d3636f3f11
15845         * doc/gpg.texi: clarify abbreviation of --help.
15846
15847 2017-02-03  Werner Koch  <wk@gnupg.org>
15848
15849         agent: Tell pinentry the hostname the agent is running on.
15850         + commit 042fe711c76f6377cedb8f83a73ba386cee34bb7
15851         * agent/call-pinentry.c [!W32]: Incluse utsname.h
15852         (start_pinentry): Pass nodename to OPTION/owner.
15853
15854         agent: Tell the Pinentry the client's pid.
15855         + commit 309f464a5952c7d7504b875bf4853914b1242346
15856         * configure.ac: Check for SO_PEERCRED et al.
15857         * agent/agent.h (server_control_s): Add field 'client_pid'.
15858         * agent/command.c (start_command_handler): Set CLIENT_PID.
15859         * agent/command-ssh.c (get_client_pid): New.
15860         (start_command_handler_ssh): Set CLIENT_PID.
15861         * agent/call-pinentry.c (start_pinentry): Tell Pinentry the client-pid.
15862
15863         gpg: More diagnostics for a launched pinentry.
15864         + commit 7052a0d77cf8f3a445b252a809d29be445788625
15865         * agent/call-pinentry.c (start_pinentry): Call getinfo/ttyinfo.
15866         * g10/server.c (gpg_proxy_pinentry_notify): Simplify the output so
15867         that we do not change the code when adding new fields to
15868         PINENTRY_LAUNCHED.
15869
15870 2017-02-02  Neal H. Walfield  <neal@g10code.com>
15871
15872         gpg: Don't assume that strtoul interprets "" as 0.
15873         + commit 407f5f9baea5591f148974240a87dfb43e5efef3
15874         * g10/tofu.c (show_statistics): If there are not records, return 0
15875         instead of NULL.
15876
15877         tests: Improve description of test.
15878         + commit 64be8e1e8607944687f3ae45ec64aa30bf4fdf6f
15879         * tests/openpgp/issue2929.scm: Improve description of test.
15880
15881         Revert "Revert "tests: Add test demonstrating issue2929.""
15882         + commit e596b21f4b78dd27489e677699cc4ba648051b3f
15883         This reverts commit 59048b0f1aa77313573a1004cd3a9f02692a7521.
15884
15885         gpg: Ensure TOFU bindings associated with UTKs are registered as usual.
15886         + commit 769272ba87f282a69e8d5f9bb27c86e6bec4496b
15887         * g10/tofu.c (get_trust): Call get_policy before short-circuiting the
15888         policy lookup for ultimately trusted keys to make sure the binding is
15889         added to the bindings table, if necessary.
15890
15891         gpg: If there is a TOFU conflict, elide the too few message warning.
15892         + commit a08c781739e7561093f32b732c4991f2bd817ec2
15893         * g10/tofu.c (tofu_get_validity): If there was a conflict, don't also
15894         print out a warning about too few messages.
15895
15896         gpg: Only print out TOFU statistics for conflicts in interactive mode.
15897         + commit 027b81b35fe36692005b8dba22d9eb2db05e8c80
15898         * g10/tofu.c (get_trust): Add arguments POLICYP and CONFLICT_SETP.  If
15899         they are not NULL, return the policy and conflict set (if there is
15900         one), respectively.  Update callers.  If MAY_ASK is FALSE, don't print
15901         out the statistics.
15902         (tofu_register_encryption): If there is a conflict and we haven't yet
15903         printed the statistics about the conflicting bindings, do so now.
15904         (tofu_get_validity): Likewise.
15905
15906         gpg: Add newline to output.
15907         + commit 74268180e5a3acc827f3a369f1fe5971f3bbe285
15908         * g10/tofu.c (ask_about_binding): Add newline to output.
15909
15910         gpg: Remove period at end of warning.
15911         + commit 6f9d8a956b2ca0f5a0eb7acc656fc17af2f2de47
15912         * g10/tofu.c (tofu_register_encryption): Remove period at end of
15913         warning.
15914
15915 2017-02-01  Werner Koch  <wk@gnupg.org>
15916
15917         dirmngr: New option --no-use-tor and internal changes.
15918         + commit 7440119e729d3fdedda8a9b44b70f8959beea8d7
15919         * dirmngr/dns-stuff.c (disable_dns_tormode): New.
15920         * dirmngr/dirmngr.c (oNoUseTor): New const.
15921         (opts): New option --no-use-tor.
15922         (tor_mode): New var.
15923         (parse_rereadable_options): Change to use TOR_MODE.
15924         (dirmngr_use_tor): New.
15925         (set_tor_mode): Call disable_dns_tormode.  Implement oNoUseTor.
15926         * dirmngr/dirmngr.h (opt): Remove field 'use_tor'.  Replace all
15927         references by a call to dirmngr_use_tor().
15928         * dirmngr/server.c (cmd_getinfo): Distinguish between default and
15929         enforced TOR_MODE.
15930
15931 2017-02-01  NIIBE Yutaka  <gniibe@fsij.org>
15932
15933         scd: Fix regression tracking the connection count.
15934         + commit 8ddc9268f6aedef0e178b174b89245c33d8189dd
15935         * scd/scdaemon.c (get_active_connection_count): New.
15936         (start_connection_thread): Bump ACTIVE_CONNECTIONS up and down.
15937         * scd/command.c (cmd_getinfo): Add subcommand "connections".
15938
15939 2017-01-31  Justus Winter  <justus@g10code.com>
15940
15941         gpgscm: Tune the hash tables.
15942         + commit 2e78aa6ff770849415f8eb71ca70c8886e9564c8
15943         * tests/gpgscm/scheme.c (oblist_initial_value): Increase the size of
15944         the hash table based on the number of symbols used after initializing
15945         the interpreter.
15946         (new_frame_in_env): Increase the size of the hash table based on the
15947         number of variables in the global environement.
15948
15949         gpgscm: Optimize environment lookups and insertions.
15950         + commit b85d509a8f5c2e6200b8051ca1593c019abce90b
15951         * tests/gpgscm/scheme.c (pointercmp): New function.
15952         (new_slot_spec_in_env): Add and use slot for insertions.
15953         (find_slot_spec_in_env): New variant of 'find_slot_in_env' that
15954         returns the slot on failures.
15955         (find_slot_in_env): Express using the new function.
15956         (new_slot_in_env): Update callsite.
15957         (opexe_0): Optimize lookup-or-insert.
15958         (opexe_1): Likewise.
15959         (scheme_define): Likewise.
15960
15961         gpgscm: Fix build with list environments.
15962         + commit 874424ee3cc795eae9972b6259a2cc4dcdbb868e
15963         * tests/gpgscm/scheme.c (new_slot_spec_in_env): Provide preallocation
15964         inforomation if USE_ALIST_ENV.
15965
15966         gpgscm: Optimize symbol lookups and insertions.
15967         + commit cea6d114b60deaecfbc2eb1aedbdfb7e6700922f
15968         * tests/gpgscm/scheme.c (oblist_find_by_name): Keep the list of
15969         symbols sorted, return the slot where a new symbol must be inserted on
15970         lookup failures.
15971         (oblist_add_by_name): Add the new symbol at the given slot.
15972         (mk_symbol): Adjust callsite.
15973         (gensym): Likewise.
15974         (assign_syntax): Likewise.
15975
15976         gpgscm: Fix build with object list.
15977         + commit 8f0ecb16cbb3798ad18be5f05b826db2aa1aaa00
15978         * tests/gpgscm/scheme.c (oblist_add_by_name): Provide preallocation
15979         information if USE_OBJECT_LIST.
15980
15981         gpgscm: Remove unused functions.
15982         + commit 2076cdaf6b93bc73223819895cc7a67323d8cee7
15983         * tests/gpgscm/scheme.c (check_cell_alloced): Remove function.
15984         (check_range_alloced): Likewise.
15985
15986 2017-01-31  Werner Koch  <wk@gnupg.org>
15987
15988         dirmngr: Require --allow-version-check even if --use-tor is used.
15989         + commit b0e8376e19072ec3c590273c69ab3e8e5edfdaca
15990         * dirmngr/dirmngr.c (housekeeping_thread): Load swdb only if the
15991         option is set.
15992
15993 2017-01-31  NIIBE Yutaka  <gniibe@fsij.org>
15994
15995         scd: Remove --debug-disable-ticker option.
15996         + commit e17fa5c75d76af4d4684ee810cb446ecd5110560
15997         * scd/scdaemon.c (ticker_disabled): Remove.
15998         (handle_tick, need_tick): Remove.
15999         (handle_connections): Don't check ticker_disabled.
16000
16001         scd: Fix SERIALNO for multiple devices.
16002         + commit f08d37af049bf1718b301644020658dd2bb07638
16003         * scd/app.c (select_application): Fix the logic if periodical check is
16004         needed.  If it is needed for newly found device(s), kick the loop.
16005         (scd_update_reader_status_file): Return value if select(2) should be
16006         called with timeout.
16007         * scd/ccid-driver.c (ccid_require_get_status): Don't return 0 for
16008         token with no interrupt transfer for now.
16009         * scd/command.c (open_card_with_request): Fix scan by SERIALNO.
16010         * scd/scdaemon.c (update_usb): Remove.
16011         (handle_connections): Evaluate need_tick after handle_tick.
16012
16013 2017-01-30  Justus Winter  <justus@g10code.com>
16014
16015         gpgscm: Use a compact vector representation.
16016         + commit 49e2ae65e892f93be7f87cfaae3392b50a99e4b1
16017         * tests/gpgscm/scheme-private.h (struct cell): Add a compact vector
16018         representation.
16019         * tests/gpgscm/scheme.c (vector_length): Use new representation.
16020         (vector_size): New macro.
16021         (get_vector_object): Use the new representation.
16022         (fill_vector): Likewise.
16023         (vector_elem): Likewise.
16024         (set_vector_elem): Likewise.
16025         (mark): Likewise.
16026         (gc): Likewise.  Be careful not to confuse immediate values for type
16027         flags.
16028         (finalize_cell): Vectors now require finalization.
16029
16030         gpgscm: Provide framework for immediate values.
16031         + commit e343984fc50e87830905614dc87f83f810551ad1
16032         * tests/gpgscm/scheme.c (IMMEDIATE_TAG): New macro.
16033         ({is,set,clr}_immediate): Likewise.
16034         (enum scheme_types): Make type tags disjoint from immediate values.
16035         (TYPE_BITS): We need one more bit now.
16036         (ADJ,T_MASKTYPE): Compute values.
16037
16038         gpgscm: Fix setting the line of the first gc reservation.
16039         + commit d27a4435bd8c0f0971d51ddf454422fc77d48271
16040         * tests/gpgscm/scheme.c (_gc_disable): Negate guard.
16041
16042         gpgscm: Introduce macro for the vector length.
16043         + commit 489edf84c9a9c2122cef1b4e678154521525b54a
16044         * tests/gpgscm/scheme.c (vector_length): New macro.
16045         (get_vector_object): Use the new macro.
16046         (oblist_add_by_name): Likewise.
16047         (oblist_find_by_name): Likewise.
16048         (oblist_all_symbols): Likewise.
16049         (mk_vector): Likewise.
16050         (mark): Likewise.
16051         (new_slot_spec_in_env): Likewise.
16052         (find_slot_spec_in_env): Likewise.
16053         (opexe_2): Likewise.
16054         (opexe_5): Likewise.
16055
16056         Revert "tests: Add test demonstrating issue2929."
16057         + commit 59048b0f1aa77313573a1004cd3a9f02692a7521
16058         This reverts commit 5aafa56dffefe3fac55b9d0555c7c86e8a07f072.
16059
16060 2017-01-30  NIIBE Yutaka  <gniibe@fsij.org>
16061
16062         scd: Fix GetSlotStatus.
16063         + commit 2a025039c1817c7f75c35a898884849a8e5dc926
16064         * scd/apdu.c (get_status_reader): Add ON_WIRE arg, here.
16065         (ct_get_status, pcsc_get_status_direct, pcsc_get_status_wrapped)
16066         (pcsc_get_status, get_status_ccid, my_rapdu_get_status): Likewise.
16067         (reset_pcsc_reader_wrapped, open_pcsc_reader_wrapped): Follow the
16068         change.
16069         (apdu_get_status_internal): It's lower-level driver which judge
16070         it's not needed.  Otherwise, it can't detect the removal.
16071         * scd/ccid-driver.c (ccid_slot_status): After the POWERED_OFF check,
16072         we can skip sending GetSlotStatus packet on wire, when no need.
16073
16074         scd: Don't send GET_STATUS packet if not needed.
16075         + commit 7c8eee4d396a751d41fd1ee1e1b87b851fca172a
16076         * scd/apdu.c (apdu_get_status_internal): Add ON_WIRE arg.
16077         (apdu_connect): Call apdu_get_status_internal with ON_WIRE enabled.
16078         (apdu_get_status): For periodical check, call apdu_get_status_internal
16079         with ON_WIRE disabled.
16080
16081         scd: Fix cancel INTERRUPT transfer.
16082         + commit 216afba0d99582d0fbae1d6e925f4ddb349d9de3
16083         * scd/ccid-driver.c (do_close_reader): Don't lock events, but check the
16084         return value of libusb_cancel_transfer.
16085
16086 2017-01-27  NIIBE Yutaka  <gniibe@fsij.org>
16087
16088         scd: More changes on watching removal of card/reader.
16089         + commit f3d9b2582bcaa1936b4fed5ec42a889b02df2f42
16090         * scd/app-common.h (struct app_ctx_s): Rename field to
16091         periodical_check_needed.
16092         * scd/scdaemon.c (update_usb): Rename from update_fdset_for_usb.
16093         Don't use libusb_get_pollfds any more.
16094         (scd_kick_the_loop): New.
16095         (need_tick): Follow the rename.
16096         (handle_connections): No libusb event handling here.
16097         * scd/app.c (app_new_register): Follow the change of rename.
16098         (select_application, scd_update_reader_status_file): Likewise.
16099         * scd/ccid-driver.c (ccid_usb_thread_is_alive): New.
16100         (intr_cb): Call scd_kick_the_loop.
16101         (ccid_usb_thread): New.  Thread to invoke INTERRUPT callback.
16102         (ccid_open_usb_reader): Add thread invocation.
16103         (ccid_require_get_status): Remove
16104         LIBUSB_WORKS_EXPECTED_FOR_INTERRUPT_ENDP.
16105         (do_close_reader): Carefully handle handle->transfer.
16106         (get_escaped_usb_string): Insert npth_unprotect/npth_protect.
16107         (do_close_reader, bulk_out, bulk_in, abort_cmd, ccid_slot_status)
16108         (ccid_transceive, ccid_transceive_secure): Likewise.
16109
16110         scd: Fix release of transfer object.
16111         + commit f92fe33f11c44f14fd31682259fcd231e8fa9e75
16112         * scd/ccid-driver.c (intr_cb): Handle LIBUSB_TRANSFER_CANCELLED.
16113         (do_close_reader): When callback is active, call
16114         libusb_cancel_transfer and wait callback is fired off.
16115
16116         scd: Improve watching USB device removal.
16117         + commit 25cc8575da9a9b8bf60c64c8059cb5f73cc52e1d
16118         * scd/apdu.c(struct reader_table_s): Add require_get_status.
16119         (apdu_connect): Change return value meaning.  Call apdu_reset here.
16120         * scd/app.c (app_new_register): Add require_get_status.
16121         (select_application): Use the return value of apdu_connect.
16122         (scd_update_reader_status_file): Call update_fdset_for_usb with
16123         checking all_have_intr_endp.
16124         (app_list_start, app_list_finish): Remove.
16125         * scd/ccid-driver.c (struct ccid_driver_s): Add transfer.
16126         (intr_cb): Don't call libusb_transfer in this callback.
16127         (ccid_require_get_status): New.
16128         (do_close_reader): Call libusb_transfer here.
16129         * scd/scdaemon.c (update_fdset_for_usb): Remove the first argument.
16130
16131         scd: Wake up the select when new USB scan.
16132         + commit 031e3fa7b9a6770a4de1a184555250feeba0d26f
16133         * scd/scdaemon.c (update_fdset_for_usb): Wake up the select(2).
16134         (handle_connections): Use a kind of "self-pipe" technique.
16135
16136 2017-01-26  NIIBE Yutaka  <gniibe@fsij.org>
16137
16138         scd: Only submit apdu_get_status when needed.
16139         + commit 881dcdfd84ebad36bff20c895e629025bed9d94e
16140         * scd/apdu.c (apdu_dev_list_finish): Return Boolean value if
16141         all device support INTERRUPT transfer.
16142         * scd/ccid-driver.c (ccid_dev_scan_finish): Likewise.
16143         * scd/app.c (app_new_register): Fix initial value of card_status.
16144         (select_application): Call update_fdset_for_usb.
16145         (scd_update_reader_status_file): Ditto.
16146         * scd/scdaemon.c (update_fdset_for_usb, need_tick): New.
16147         (handle_connections): Call handle_tick when select returns.
16148         Let select watch USB file descriptors, too.
16149         Call libusb_handle_events_timeout_completed for INTERRUPT transfer.
16150
16151         scd: Fix APP reference counting.
16152         + commit 9b06633c811e8815c07d744f20b45405cb082367
16153         * scd/app.c (scd_update_reader_status_file): Don't call another
16154         release_application_internal.
16155         * scd/command.c (open_card_with_request): Don't require APPTYPE !=
16156         NULL.
16157
16158         scd: Add INTERRUPT endp support to CCID driver.
16159         + commit bb5ceb78c333129a44c0144f2cf49b17ede898f1
16160         * scd/app.c (scd_update_reader_status_file): Fix releas of APP.
16161         * scd/ccid-driver.c (struct ccid_driver_s): Add INTR_BUF.
16162         (intr_cb, ccid_setup_intr): New.
16163         (ccid_open_usb_reader): Call ccid_setup_intr.
16164         (ccid_slot_status): Return CCID_DRIVER_ERR_NO_READER when removed.
16165
16166 2017-01-25  Justus Winter  <justus@g10code.com>
16167
16168         gpg: Fix searching for mail addresses in keyrings.
16169         + commit 3f4f20ee6eff052c88647b820d9ecfdbd8df0f40
16170         * g10/keyring.c (compare_name): Fix KEYDB_SEARCH_MODE_MAIL* searches
16171         in keyrings when the UID is a plain addr-spec.
16172
16173         tests,w32: Fix GPGME tests requiring a pinentry.
16174         + commit 02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba
16175         * tests/gpgme/gpgme-defs.scm: Use our fake pinentry, and configure it
16176         to supply the correct passphrase.
16177
16178         tests,w32: Fix gpgsm signature verification test.
16179         + commit 7d5a0ed792133d875fcedb6e23a9a3682f1a23f9
16180         * tests/gpgsm/verify.scm: Use 'call-with-binary-output-file' to avoid
16181         automatic line-ending conversion.
16182
16183         agent: Fix double free.
16184         + commit e175152ef7515921635bf1e00383e812668d13fc
16185         * agent/cache.c (agent_store_cache_hit): Make sure the update is
16186         atomic.
16187
16188         tests: Skip GPGME tests that are not built.
16189         + commit 5f2da5d439debf44615a97de788d8f720b517972
16190         * tests/gpgme/wrap.scm: Skip tests that are not built.
16191
16192         tests,w32: Fix locating GPGME's tests on Windows.
16193         + commit 6ecd8b3e71632bbcca524ad735c83bdc2a4c4a4a
16194         * tests/gpgme/run-tests.scm: Qualify the test with the executable
16195         extension.
16196
16197 2017-01-24  Werner Koch  <wk@gnupg.org>
16198
16199         gpg: Print a warning on Tor problems.
16200         + commit 770b75a746836773909af25ccb9b480e61cea677
16201         * dirmngr/ks-engine-hkp.c (tor_not_running_p): New.
16202         (map_host): Call that to print a warning.
16203         (handle_send_request_error): Ditto and avoid marking the host dead.
16204         Also print a tor_config_problem warning.  Add arg CTRL; adjust callers
16205         to pass that new arg.
16206         * g10/call-dirmngr.c (ks_status_cb): Detect and print the new
16207         warnings.
16208
16209         dirmngr: Simplify error returning inside http.c.
16210         + commit 51e5a5e5a46279809848b4ab4419f35045336010
16211         * dirmngr/http.c (connect_server): Change to return an gpg_error_t
16212         and to store socket at the passed address.
16213         (http_raw_connect, send_request): Adjust accordingly.
16214
16215         dirmngr: New option --disable-ipv4.
16216         + commit 72736af86a501592d974d46ff754a63959e183bd
16217         * dirmngr/dirmngr.c (oDisableIPv4): New const.
16218         (opts): New option --disable-ipv4.
16219         (parse_rereadable_options): Set that option.
16220         * dirmngr/dirmngr.h (opt): New field 'disable_ipv4'.
16221         * dirmngr/dns-stuff.c (opt_disable_ipv4): bew var.
16222         (set_dns_disable_ipv4): New.
16223         (resolve_name_standard): Skip v4 addresses when OPT_DISABLE_IPV4 is
16224         set.
16225         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
16226         (send_request): Pass HTTP_FLAG_IGNORE_IPv4 if opt.disable_v4 is set.
16227         * dirmngr/crlfetch.c (crl_fetch): Ditto.
16228         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Ditto.
16229         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
16230         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
16231
16232 2017-01-24  Justus Winter  <justus@g10code.com>
16233
16234         tools: Use platform abstraction for I/O.
16235         + commit 73d6572bd0f260c5aa1e191a1ba4859ec6fa262c
16236         * tools/gpg-connect-agent.c (main): Use a gpgrt_stream_t for
16237         'script_fp'.  Adapt accordingly.
16238
16239         tools: Use platform abstraction for I/O.
16240         + commit 77b8aff4e1bb641f497e63230a5006ab70e6c3a8
16241         * tools/gpgconf-comp.c (retrieve_options_from_file): Use a
16242         gpgrt_stream_t for 'list_file'.  Adapt accordingly.
16243         (copy_file): Likewise for 'src' and 'dst'.
16244         (change_options_file): Likewise for 'src_file' and 'dest_file'.
16245         (change_options_program): Likewise for 'src_file' and 'dest_file'.
16246         (gc_process_gpgconf_conf): Likewise for 'config'.
16247
16248         tools: Use platform abstraction for renaming files.
16249         + commit bfd75e9492fc4edd86f4049a62304943a7b2a29a
16250         * tools/gpgconf-comp.c (gc_component_change_options): Use
16251         'gnupg_rename_file'.  Also, block signals across all renames in an
16252         attempt to make the whole process atomic.
16253
16254         tools: Add comments explaining the functions parameters.
16255         + commit 82e309ad06884e54693f4856412984331febdda0
16256         * tools/gpgconf-comp.c (change_options_file): Add comments explaining
16257         the functions parameters.
16258         (change_options_program): Likewise.
16259
16260         tools: Improve error handling.
16261         + commit b0348fdb26637b0bcbd68a96c1746a1613b309af
16262         * tools/gpgconf-comp.c (gp_component_change_options): Improve error
16263         handling when reading from stdin.
16264
16265         tools: Fix memory leak.
16266         + commit 5b28f025085b386e0ec49535d4cd3f875a414eb0
16267         * tools/gpgconf-comp.c (change_options_file): Fix leak.
16268
16269         tests: Add test demonstrating issue2929.
16270         + commit 5aafa56dffefe3fac55b9d0555c7c86e8a07f072
16271         * tests/openpgp/Makefile.am (XTESTS): Add new test.
16272         * tests/openpgp/issue2929.scm: New file.
16273
16274         tests: Enable gpgconf test.
16275         + commit 628ff843466b42309f850b8d65b13cf5f586b81f
16276         * tests/openpgp/Makefile.am (XTESTS): Re-add gpgconf.scm.
16277
16278 2017-01-23  Werner Koch  <wk@gnupg.org>
16279
16280         Release 2.1.18.
16281         + commit f8289b1d28f501d2f37bf9ccb5e42f7fb27b4688
16282
16283
16284         build: Change make distcheck configure and temp. remove gpgconf.scm.
16285         + commit 25e029823813e190a18b601af60efcb1fb3b84af
16286         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Also test gpgtar and
16287         wks-tools.  Disable ntbtls.
16288         * tests/openpgp/Makefile.am (XTESTS): Temporary remove gpgconf.scm.
16289
16290         Fix format string errors and some missing error case initialization.
16291         + commit af5979a42b9468ffe0f3ac6de5a77d982c5cf8a0
16292         * common/logging.c (do_logv): Remove extra parentheses in comparison.
16293
16294         * dirmngr/dns-stuff.c (resolve_addr_libdns): Init RES so that
16295         dns_res_close is given a defined value in the error case.
16296
16297         * dirmngr/http.c (cookie_read, cookie_write) [HTTP_USE_NTBTLS]: Fix
16298         format string char.
16299
16300         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Remove duplicate "const".
16301         * dirmngr/ks-engine-http.c (ks_http_help): Ditto.
16302         * dirmngr/ks-engine-kdns.c (ks_kdns_help): Ditto.
16303         * dirmngr/ks-engine-ldap.c (ks_ldap_help): Ditto.
16304
16305         * scd/app-p15.c (send_keypairinfo, do_getattr): Fix format string
16306         char.
16307         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Init PID for the
16308         error case.
16309         (scdaemon_runtime_change): Ditto.
16310         (dirmngr_runtime_change): Ditto.
16311
16312         * tools/gpgconf.c (query_swdb): Init VALUE_SIZE_UL.
16313
16314         dirmngr: On SIGHUP mark all keyservers alive.
16315         + commit 3ca3da8fc4ef802b8cceec5fde398a07b4888848
16316         * dirmngr/ks-engine-hkp.c (ks_hkp_reload): New.
16317         * dirmngr/dirmngr.c (dirmngr_sighup_action): Call it.
16318
16319 2017-01-23  Gaetan Bisson  <bisson@archlinux.org>
16320
16321         libdns: Hack to skip negation term.
16322         + commit d4c0187dd93163f12e9f953366adef81ecf526a6
16323         * dirmngr/dns.c (dns_nssconf_loadfile): Skip negation terms in
16324         nsswitch.conf parser.
16325
16326 2017-01-23  Werner Koch  <wk@gnupg.org>
16327
16328         dirmngr: Print debug message only with --debug.
16329         + commit 9ae0b81e4ff08712da642456d0164f81924a91e4
16330         * dirmngr/dns-stuff.c (libdns_init): Call log_debug only if opt_debug
16331         is set.
16332
16333 2017-01-23  Phil Pennock  <gnupg-devel@spodhuis.org>
16334
16335         dirmngr: Handle missing nsswitch.conf.
16336         + commit 88ade475c56ac3712d6bd6d41ae38e1421dcb320
16337         * dirmngr/dns-stuff.c (libdns_init): Fallback to files,dns.
16338
16339 2017-01-23  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
16340
16341         gpg: Fix misleading log message when checking regexp.
16342         + commit a85731ada2d361eacddc5ae92f80d34792dd4b5e
16343         * src/trustdb.c (check_regexp): Correctly print whether the
16344         regexp matched or not.
16345
16346 2017-01-23  Werner Koch  <wk@gnupg.org>
16347
16348         gpg: New export and import options "backup" and "restore".
16349         + commit 953d4ec6afd1b42feb7465ee57e48d72f033019a
16350         * g10/export.c (parse_export_options): Add "backup" and its alias
16351         "export-backup".
16352         (do_export_one_keyblock): Export ring trust packets in backup mode.
16353         * g10/import.c (parse_import_options): Add "restore" and its alias
16354         "import-restore".
16355         (read_block): Import ring trust packets.
16356
16357 2017-01-23  NIIBE Yutaka  <gniibe@fsij.org>
16358
16359         scd: Fix INTERRUPT transfer.
16360         + commit 21c9ebb908c2ad2e322e7a13e59e5880494c4d67
16361         * scd/ccid-driver.c (find_endpoint): Don't return Bulk endpoint as
16362         Interrupt endpoint.
16363         (ccid_poll): Call libusb_interrupt_transfer.
16364
16365 2017-01-19  Werner Koch  <wk@gnupg.org>
16366
16367         build: Print a commit id in the generated ChangeLog.
16368         + commit e926f30a1cda75f6334b79c303b5134f0441a3dc
16369         * build-aux/gitlog-to-changelog: Print an extra line with the commit
16370         id.
16371
16372         common: Fix buffer copy code again.
16373         + commit e031b3c16cfec583c4322c84d299b355f0849c77
16374         * common/exectool.c (my_error_from_errno): Remove.
16375         (copy_buffer_do_copy): Do without var RC.
16376         (copy_buffer_flush): Ditto.  Use ERRNO instead of es_write return
16377         code.
16378         (gnupg_exec_tool): Correctly return errors from es_read.
16379
16380 2017-01-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
16381
16382         gpg: Allow to freeze faked system time.
16383         + commit 3daeef702b2e6a42f0f396b828f86ffc3f33fc88
16384         * g10/gpg.c (main): If the parameter for --faked-system-time
16385         ends with a '!', freeze time at the specified point.
16386         * common/gettime.c (gnupg_set_time): Allow to freeze the time
16387         at an arbitrary time instead of only the current time.
16388         * doc/gpg.texi: Update documentation for --faked-system-time.
16389
16390 2017-01-19  Werner Koch  <wk@gnupg.org>
16391
16392         common: Clarify use of vars in buffer copy code.
16393         + commit 55c9212a2338bf0b07c8cf3a69bcedaa28d48d43
16394         * common/exectool.c (my_error_from_errno): New.
16395         (copy_buffer_do_copy): Use separate vars for errno values and
16396         gpg-error values for clarity.  s/assert/log_assert/.
16397         (copy_buffer_flush): Ditto.
16398         (gnupg_exec_tool_stream): Use gpg_err_code when testing.
16399
16400 2017-01-19  NIIBE Yutaka  <gniibe@fsij.org>
16401
16402         dirmngr: Add setup of CA for NTBTLS.
16403         + commit 367349b4dcc97718f8ae1163d1389d2a46fc3453
16404         * dirmngr/http.c [HTTP_USE_NTBTLS] (http_session_new): Add CA by
16405         ntbtls_set_ca_chain.
16406
16407 2017-01-18  Justus Winter  <justus@g10code.com>
16408
16409         common: Fix flushing copy buffers.
16410         + commit 34fa2d79a07a079be472c3ff486debfdac8c6070
16411         * common/exectool.c (copy_buffer_flush): Write and flush the data, but
16412         do not hide EAGAIN from the caller.
16413         (gnupg_exec_tool_stream): Retry on EAGAIN.
16414
16415 2017-01-18  Werner Koch  <wk@gnupg.org>
16416
16417         agent: Reduce sleep time in the progress callback.
16418         + commit 3d356d165aed7d76a3ea811b1d24ed0a05ac90d4
16419         * agent/gpg-agent.c (agent_libgcrypt_progress_cb): Reduce sleep time
16420         from 100ms to 1ms or use gpgrt_yield when build against a recent
16421         libgpg-error.
16422
16423         gpgconf: Allow "all" for --launch, --kill, and --reload.
16424         + commit 2312248b2e3adffa52d8a3ac4f24fe2c88f0f569
16425         * tools/gpgconf-comp.c (gc_component_launch): Allow -1 for COMPONENT.
16426         (gc_component_kill): Ditto.
16427         (gc_component_reload): For robustness change the condition to < 0.
16428         * tools/gpgconf.c (main) <aLaunch, aKill, aReload>: Support argument
16429         "all".
16430
16431         gpg: Remove unused definitions.
16432         + commit 701f54eccf3da3319dd6d74f46b852c64d90bc52
16433         * g10/keydb.h (rt_UNKNOWN, rt_RING): Remove constants.
16434         (keyblock_pos_struct, KBPOS): Remove struct and type.
16435
16436 2017-01-18  NIIBE Yutaka  <gniibe@fsij.org>
16437
16438         scd: Cleanup SERIALNO protocol.
16439         + commit 79cea89774e6327b6785e22b7057f9e3e188ac2b
16440         * scd/app.c (app_get_serial_and_stamp): Remove.
16441         (app_get_serialno): New.
16442         (app_write_learn_status): Use send_status_direct.
16443         (app_getattr): Use app_get_serialno for SERIALNO and
16444         send with send_status_direct.
16445         * scd/app-openpgp.c (do_getattr): Likewise.
16446         * scd/command.c (cmd_serialno): Don't send TIMESTAMP of 0.
16447         (cmd_learn): Likewise.  Don't inquire with TIMESTAMP of 0.
16448
16449         scd: Add "card_list" sub command for GETINFO.
16450         + commit 8b1f24a29ebc7651437c01990215a55b1136dae0
16451         * scd/app.c (app_send_card_list): New.
16452         * scd/command.c (cmd_getinfo): Fix "status" sub command.
16453         Add "card_list" sub command.
16454
16455 2017-01-17  Werner Koch  <wk@gnupg.org>
16456
16457         build: Handle packages with dashes in --find-version.
16458         + commit a09f258b1412209763222e2e81bab79663e4d685
16459         * autogen.sh (--find-version): Improve version extraction.
16460         * (--help): Extend.
16461
16462         gpg: Clean bogus subkey binding when cleaning a key.
16463         + commit 356323768a1a29138581d0aceed0336ab8be0d5c
16464         * g10/trust.c (clean_key): Also clean bogus subkey bindings.
16465
16466         gpg: Sync print of additional sig data in --edit-key.
16467         + commit 766c25018b288a7185c6da6adac0dec01a64e94a
16468         * g10/keylist.c (show_policy_url): Implement MODE -1.
16469         (show_keyserver_url): Ditto.
16470         (show_notation): Ditto.
16471         * g10/keyedit.c (print_one_sig): Print policy URL, keyserver URL and
16472         notation data to the tty.
16473
16474         common: Remove unused function tty_print_string.
16475         + commit bae42e543799a428e59bad870aed9719dd6e6e45
16476         * common/ttyio.c (tty_print_string): Rename to ...
16477         (do_print_string): this.  Make local.  Simplify FP case by using
16478         print_utf8_buffer.  Change caller.
16479
16480         gpg: Prepare some key cleaning function for use with secret key packets.
16481         + commit adbfbf608e75cdd72ae7b3a538b91bc0e236a18f
16482         * g10/trust.c (mark_usable_uid_certs): Allow use of secret key packets.
16483         (clean_sigs_from_uid): Ditto.
16484         (clean_uid_from_key): Ditto.
16485         (clean_one_uid): Ditto.
16486         (clean_key): Ditto.
16487
16488 2017-01-16  Werner Koch  <wk@gnupg.org>
16489
16490         dirmngr: Implement hkps lookups using literal addresses.
16491         + commit e6aebfe3d0f16c483296fd125b66a44017fe15f4
16492         * dirmngr/ks-engine-hkp.c (map_host): For literal addresses do a
16493         reverse lookup.
16494
16495         dirmngr: Allow reverse DNS lookups in Tor-mode.
16496         + commit 9850124c7bdf0a0e7c1866abc85f3437257d7095
16497         * dirmngr/dns-stuff.c (resolve_dns_name): Move up in the file.
16498         (resolve_addr_libdns): New.
16499         (resolve_dns_addr): Divert to resolve_dns_addr.
16500
16501         dirmngr: Avoid network queries for literal IP addresses.
16502         + commit daae97bc14742c75408c4eb05808a2102cfe2bcf
16503         * dirmngr/dns-stuff.c (resolve_name_libdns): USe flags AI_NUMERICHOST
16504         for literal IP addresses.
16505         (resolve_name_standard): Ditto.
16506
16507         dirmngr: Fix URL creation for literal IPv6 addresses in HKP.
16508         + commit 82646bbf1a5a7d745da81b239a12667a51703dc1
16509         * dirmngr/dns-stuff.c (is_ip_address): Make the return value depend on
16510         the address family.
16511         * dirmngr/ks-engine-hkp.c (map_host): Rename arg R_POOLNAME to
16512         R_HTTPHOST because that is its purpose.  Note that the former
16513         behaviour of storing a NULL to indicate that it is not a pool has not
16514         been used.
16515         (make_host_part): Ditto.
16516         (make_host_part): Make sure that literal v6 addresses are correclty
16517         marked in the constructed URL.
16518
16519 2017-01-16  Justus Winter  <justus@g10code.com>
16520
16521         tests: Improve GPGHOME handling.
16522         + commit 8b1611a9605b636db3e07a9d81016a11b318724c
16523         * tests/openpgp/defs.scm (GPGHOME): New variable.
16524         * tests/openpgp/ssh-import.scm: Remove redundant code, use 'path-join'.
16525         * tests/openpgp/tofu.scm: Likewise.
16526
16527 2017-01-16  NIIBE Yutaka  <gniibe@fsij.org>
16528
16529         agent: Ask specific SERIALNO for pksign/pkdecrypt.
16530         + commit 0801f49b0dc7102943f0e9fa51061f50f5708ca6
16531         * agent/call-scd.c (agent_card_serialno): Add DEMAND argument.
16532         * agent/command-ssh.c (card_key_available): Follow the change.
16533         * agent/learncard.c (agent_handle_learn): Likewise.
16534         * agent/divert-scd.c (ask_for_card): Use DEMAND argument.
16535
16536         scd: Add --demand option for SERIALNO.
16537         + commit 2e6f1c99d4f66a23a752092397e20a84964edf48
16538         * scd/app.c (select_application): Add SERIALNO_BIN and SERIALNO_BIN_LEN
16539         arguments.  Return matched APP with a serial number when specified.
16540         * scd/command.c (open_card): Modify for the implicit open only.
16541         (open_card_with_request): New for explicit open and support match with a
16542         serial number.
16543         (cmd_serialno): Support --demand option.
16544         (cmd_learn, cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkauth)
16545         (cmd_pkdecrypt, cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
16546         (cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_apdu): Follow
16547         the change of open_card.
16548
16549 2017-01-12  Werner Koch  <wk@gnupg.org>
16550
16551         build: Make autogen.sh more POSIX friendly (next try)
16552         + commit 3db76c9277d918dec9721a6439f4db3b3c06aba3
16553         * autogen.sh: Fix dd count to 5.
16554
16555         gpg: Rename a var to avoid a shadowing warning.
16556         + commit c99a09f111c5980ae034faaea61a00d9ad60463c
16557         * g10/keygen.c (keygen_set_std_prefs): Rename variable.
16558
16559         tests: Fix t-gettime for a time_t of 64 and a long of 32 bit.
16560         + commit 5c0777e1ca02ff1767755c417b64d6f78e02f475
16561         * configure.ac (AC_CHECK_HEADERS): Add stdint.h.
16562         * common/t-gettime.c: Include stdint.h.
16563         (UINTMAX_C): Define replacement.
16564         (test_isotime2epoch): Use UINTMAX_C for the >32 bit constants.
16565
16566         build: Make autogen.sh more POSIX friendly.
16567         + commit 3c00b52f7cb0fbd756c0bbe5134b8f2d69c60dd1
16568         * autogen.sh: Replace non POSIX "cp -a" and "head -c".
16569
16570         libdns: Silence -Wstrict-prototypes on some function ptrs.
16571         + commit 97372b39cd9b4c84a083eadbf072fff77799617f
16572         * dirmngr/dns.c (dns_rrtype): Ignore -Wstrict-prototypes warning.
16573
16574         libdns: Provide replacement for EPROTO.
16575         + commit 0fadff9cdde47e42f7e428bc903b3626c67ba9c0
16576         * dirmngr/dns.c (EPROTO) ![EPROTO]: Define to EPROTONOSUPPORT.
16577
16578 2017-01-11  Werner Koch  <wk@gnupg.org>
16579
16580         dirmngr: After a connection failure log a hint if Tor is not running.
16581         + commit 20dfcfe08c618d23134d5d6efef7676b090f30d3
16582         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Check whether
16583         Tor is running.
16584
16585         dirmngr: Mark hosts dead on ENETDOWN.
16586         + commit 76fb2febde10da8237bbe7613830b51af2a45139
16587         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Take care of
16588         ENETDOWN.
16589
16590         dirmngr: Fix Tor access for v6 addresses.
16591         + commit 09aeac41c97bc8ecb44a09886c7fdbd9a6ec5c7f
16592         * dirmngr/http.c (use_socks): New.
16593         (my_sock_new_for_addr): New.
16594         (connect_server): Replace assuan_sock_new by my_sock_new_for_addr.
16595
16596         dirmngr: Remove warnings about unused global variables.
16597         + commit 915864e7f0315b0c96315d0bcd48b1b93592353a
16598         * dirmngr/crlcache.c (oidstr_issuingDistributionPoint): Comment.
16599         * dirmngr/ocsp.c (oidstr_certHash): Comment.
16600
16601         dirmngr: Implement debug option "network" for http.
16602         + commit da894c48ec3393e7c815f575daa5a52ab37cc102
16603         * dirmngr/dirmngr.c (parse_rereadable_options): Set http debugging.
16604
16605         dirmngr: Add debug code to http.c.
16606         + commit 02ab4b0085f8b4cdfe163d25ddd0fc80753d7f4a
16607         * dirmngr/http.c (opt_verbose, opt_debug): New vars.
16608         (http_set_verbose): New function.
16609         (_my_socket_new): Add debug output.
16610         (_my_socket_ref, _my_socket_unref, session_unref): Call log_debug if
16611         OPT_DEBUG has ben set to 2 in a debugger.
16612         (http_session_new, http_session_ref): Ditto.
16613         (send_request, http_start_data): Print debug output for the request.
16614         (parse_response): Change to use log_debug_string for the response.
16615
16616         common: New function log_debug_with_string.
16617         + commit 088d71d3671e74eb088386026f0e439a7e3b5543
16618         * common/logging.c (do_logv): Factor some code out to ...
16619         (print_prefix): new.
16620         (log_logv): Add arg EXTRASTRING and print it.  Change all callers to
16621         pass NULL for it.
16622         (log_debug_with_string): New.  Uses EXTRASTRING.
16623
16624 2017-01-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16625
16626         common: Avoid unnecessary ambiguity in argparse.
16627         + commit 7249ab0f95d1f6cb8ee61eefedc79801bb56398f
16628         * common/argparse.c (find_long_option): Avoid unnecessary ambiguity.
16629
16630 2017-01-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16631
16632         systemd-user: Enable "systemctl --user reload {dirmngr,gpg-agent}"
16633         + commit a20a450ac4ef10847fd59a5fd3acbbd2bfcaa6a2
16634         * doc/examples/systemd-user/*.service: Add ExecReload directives to
16635           indicate the canonical way to reload the services.
16636
16637         GnuPG recommends reloading the agent and dirmngr with "gpgconf
16638         --reload".  if anyone is running them as systemd user services, they
16639         might ask them to reload in the systemd way, so teach systemd the
16640         right thing to do.
16641
16642 2017-01-10  Justus Winter  <justus@g10code.com>
16643
16644         tests: Improve gpgconf test.
16645         + commit 88e42ef08d65d4d1bc29c6cea48df19ca0d5e2bd
16646         * tests/openpgp/defs.scm (valgrind): New variable.
16647         (gpg-config): Fix clearing an option.
16648         * tests/openpgp/gpgconf.scm: Also toggle 'quiet'.
16649
16650         tools: Fix memory leaks and improve error handling.
16651         + commit 1f5caf90bfaaaf7b9d8c06c12087aeeae3748032
16652         * tools/gpgconf-comp.c (gc_option_free): New function.
16653         (gc_components_free): Likewise.
16654         (gc_components_init): Likewise.
16655         (retrieve_options_from_program): Use 'xfree', fix memory leak.
16656         (change_options_program): Improve error handling.
16657         (gc_component_change_options): Fix memory leaks.
16658         * tools/gpgconf.c (main): Initialize components.
16659         * tools/gpgconf.h (gc_components_init): New prototype.
16660
16661         tests: Add test for gpgconf.
16662         + commit c8cfc62125aceee0ca48aab5c8a9fea1ec1ef652
16663         * tests/openpgp/Makefile.am (XTESTS): Add new test.
16664         * tests/openpgp/defs.scm (percent-encode): New function.
16665         (gpg-conf): Generalize so that we can feed stdin.
16666         (gpg-config): New function.
16667         * tests/openpgp/gpgconf.scm: New file.
16668
16669         common: Fix fallback code.
16670         + commit bfd6a490129ffc7c7ac8776bf5a5da3b1ddf6d42
16671         * common/logging.c (_log_assert): Fix the variant for compilers that
16672         do not support __FUNCTION__.
16673         * common/logging.h (_log_assert): Likewise.
16674
16675 2017-01-09  Werner Koch  <wk@gnupg.org>
16676
16677         dirmngr: Use "pgpkey-hkps" and "pgpkey-hkp" for SRV record lookups.
16678         + commit 0cc975d8a1cd54115938202432e43263b8893ea4
16679         * dirmngr/ks-engine-hkp.c (map_host): Chnage arg NO_SRV to SRVTAG.
16680         (make_host_part): Rewrite.
16681
16682         dirmngr: Do not use a SRV record for HKP if a port was specified.
16683         + commit c2cbe2f87c480c62239dc4c2cbb352acd98cd267
16684         * dirmngr/http.h (parsed_uri_s): Add field EXPLICIT_PORT.
16685         * dirmngr/http.c (do_parse_uri): That it.
16686         * dirmngr/ks-engine-hkp.c (map_host): Add arg NO_SRV.
16687         (make_host_part): Ditto.
16688         (ks_hkp_resolve): Set NO_SRV from EXPLICIT_PORT.
16689         (ks_hkp_search): Ditto.
16690         (ks_hkp_get): Ditto.
16691         (ks_hkp_put): Ditto.
16692
16693 2017-01-08  Werner Koch  <wk@gnupg.org>
16694
16695         dirmngr: Implement experimental SRV record lookup for WKD.
16696         + commit 88dc3af3d4ae1afe1d5e136bc4c38bc4e7d4cd10
16697         * dirmngr/server.c (cmd_wkd_get): Support SRV records.
16698
16699         dirmngr: Improve debug output for TLS.
16700         + commit 714faea4fa7f30d42e9986358214a99aa8fa57b3
16701         * dirmngr/misc.c (dump_cert): Also print SubjectAltNames.
16702
16703         dirmngr: Change internal SRV lookup API.
16704         + commit 16078f3deea5b82ea26e2f01dbd3ef3a5ce25410
16705         * dirmngr/dns-stuff.c (get_dns_srv): Add args SERVICE and PROTO.
16706         * dirmngr/http.c (connect_server): Simplify SRV lookup.
16707         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
16708         * dirmngr/t-dns-stuff.c (main): Adjust for changed get_dns_srv.
16709
16710         dirmngr: Strip root zone suffix from libdns SRV results.
16711         + commit 9fa94aa10778bbd680315e93b23175423e338c40
16712         * dirmngr/dns-stuff.c (getsrv_libdns): Strip trailing dot from the
16713         target.
16714
16715 2017-01-06  Werner Koch  <wk@gnupg.org>
16716
16717         agent,w32: Fix annoying output to DebugView.
16718         + commit 8d774904c8066d8c0f19cfffe2d568979bb8c470
16719         * agent/gpg-agent.c (startup_fd_list): Do not define for W32.
16720         (main) [W32]: Do not call get_all_open_fds.
16721
16722 2017-01-06  NIIBE Yutaka  <gniibe@fsij.org>
16723
16724         scd: Fix for --disable-ccid for scdaemon.
16725         + commit 858e14cd794e2a6125d51e652a754bbe26def997
16726         * scd/apdu.c (apdu_dev_list_finish): Don't call ccid_dev_scan_finish
16727         with no table.
16728         (apdu_open_reader): Only increment when it's zero.
16729
16730         scd: Fix for --disable-ccid-driver.
16731         + commit 62268a2732dddca7a05ca4cf45d0e4338c7dc3c4
16732         * scd/apdu.c [HAVE_LIBUSB] (apdu_dev_list_start): Conditionalize.
16733         [HAVE_LIBUSB] (apdu_dev_list_finish, apdu_open_reader): Likewise.
16734
16735         scd: Support multiple readers by CCID driver.
16736         + commit 8a41e73c31adb86d4a7dca4da695e5ad1347811f
16737         * scd/apdu.c (new_reader_slot): Lock is now in apdu_dev_list_start.
16738         (close_pcsc_reader_direct, close_ccid_reader): RDRNAME is handled...
16739         (apdu_close_reader): ... by this function now.
16740         (apdu_prepare_exit): Likewise.
16741         (open_ccid_reader): Open with dev_list.
16742         (apdu_dev_list_start, apdu_dev_list_finish): New.
16743         (apdu_open_one_reader): New.
16744         (apdu_open_reader): Support multiple readers.
16745         * scd/app.c (select_application): With SCAN, opening all readers
16746         available, and register as new APP.
16747         (app_write_learn_status): app->ref_count == 0 is valid for APP which is
16748         not yet used.
16749         (app_list_start, app_list_finish): New.
16750         * scd/ccid-driver.c (struct ccid_driver_s): Remove RID and BCD_DEVICE.
16751         Add BAI.
16752         (parse_ccid_descriptor): BCD_DEVICE is now on the arguments.
16753         (ccid_dev_scan, ccid_dev_scan_finish): New.
16754         (ccid_get_BAI, ccid_compare_BAI, ccid_open_usb_reader): New.
16755         (ccid_open_reader): Support multiple readers.
16756         (ccid_set_progress_cb, ccid_close_reader): No RID any more.
16757
16758 2017-01-05  Werner Koch  <wk@gnupg.org>
16759
16760         Silence two -Wlogical-op warnings.
16761         + commit 6170eb809033c9d144abf3b1f31f8b936878cdd4
16762         * common/tlv.c (parse_ber_header): Avoid compiler warning about a
16763         duplicate condition.
16764         * tools/gpgtar-create.c (pattern_valid_p): Likewise.
16765
16766 2017-01-05  Justus Winter  <justus@g10code.com>
16767
16768         tests: New test for --{show,override}-session-key.
16769         + commit 168c8c9d79a817c1f08a9ef976dab377f8c4c69e
16770         * tests/openpgp/Makefile.am (XTESTS): Add new test.
16771         * tests/openpgp/decrypt-session-key.scm: New file.
16772
16773         tests: Fix macro.
16774         + commit 4ded213698123a425393b89a800fda2a4ec5229d
16775         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Make
16776         hygienic, use define-macro, do not change to the ephemeral home
16777         directory.
16778         * tests/gpgsm/setup.scm: Change to the ephemeral home directory.
16779         * tests/openpgp/setup.scm: Likewise.
16780
16781 2017-01-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16782
16783         g10: avoid warning when --disable-tofu.
16784         + commit 38671cfe5a2a40bb991619f4cb992c42b5f1e8cd
16785         If configured with --disable-tofu, we see compiler warnings about an
16786         unused variable.  This should remove those warnings.
16787
16788 2017-01-04  Justus Winter  <justus@g10code.com>
16789
16790         tests,w32: Fix locating the components.
16791         + commit 28e149609da44fab600f6a11b385d1c8ca8e7eb9
16792         * tests/openpgp/defs.scm (percent-decode): New function.
16793         (bin-prefix): New variable.
16794         (installed?): Likewise.
16795         (tool-hardcoded): Use the new variables.
16796         (gpg-conf): Use the new function to decode the values.
16797         (gpg-components): Do not use '--build-prefix' when 'installed?'.
16798
16799 2017-01-03  Werner Koch  <wk@gnupg.org>
16800
16801         dirmngr: Make sure Tor mode is also set for DNS on SIGHUP.
16802         + commit 969512401603639e4467ede7d892f1b02582c2c9
16803         * dirmngr/dns-stuff.c (enable_dns_tormode): Always succeed.
16804         (reload_dns_stuff): Reset tor port.
16805         * dirmngr/dirmngr.c (set_tor_mode): Also enable Tor mode for DNS.
16806         (main): Remove warning that Tor mode may not fully work.
16807         * dirmngr/server.c (cmd_dns_cert): Remove explicit Tor for DNS
16808         initialization.
16809         * dirmngr/t-dns-stuff.c (main): Remove option --new-circuit and error
16810         checking for enable_dns_tormode.
16811
16812         dirmngr: New debug message on correctly initialized libdns.
16813         + commit 0004d52ba2f1245c84f95a151342ad99fd72ca3d
16814         * dirmngr/dns-stuff.c (libdns_init): Add debug level diagnostic on
16815         success.
16816
16817 2017-01-02  Justus Winter  <justus@g10code.com>
16818
16819         common: Turn assertions into expressions.
16820         + commit a1e0d4a1e75fc6e6c3392a4e1d1d27005b38d6cc
16821         * common/logging.h (log_assert): Turn this into an expression so it
16822         can be used in expressions.
16823
16824         tests: Fix faked time in the TOFU test.
16825         + commit 6d065198337b5242889723481bfa9ce81aa108bb
16826         * tests/openpgp/tofu.scm (GPG): Fix time delta.
16827
16828 2017-01-02  Werner Koch  <wk@gnupg.org>
16829
16830         g13: Improve printing of debug infos.
16831         + commit 5b6ebfb9244602d9de31d61c7eceb0c45ac8aa49
16832         * g13/g13tuple.c (all_printable): Make it work.
16833
16834         Replace use of variable-length-arrays.
16835         + commit 6b84ecbf312d98ac8cce9fe5facdc815bc742fa1
16836         * common/t-iobuf.c (main): Replace variable-length-array.
16837         * g10/gpgcompose.c (mksubpkt_callback): Ditto.
16838         (encrypted): Ditto.
16839         * g10/t-stutter.c (log_hexdump): Ditto.
16840         (oracle_test): Ditto.
16841         * g10/tofu.c (get_policy): Ditto.  Use "%zu" for size_t.
16842         * scd/app-openpgp.c (ecc_writekey): Replace variable-length-array.
16843         Check for zero length OID_LEN.
16844
16845 2017-01-02  Justus Winter  <justus@g10code.com>
16846
16847         gpgscm: Fail if too many arguments are given.
16848         + commit b0e14bd6ff8401b12b2b39f75aef94d3ad28017f
16849         * tests/gpgscm/scheme.c (opexe_0): Enable check.
16850         * tests/gpgscm/tests.scm (test::report): Remove superfluous argument.
16851
16852         gpgscm: Add 'finally', rework all macros.
16853         + commit b79274a3b7e58f88e9a8c1dc1fb24dd3e983543c
16854         * tests/gpgscm/init.scm (finally): New macro.
16855         * tests/gpgscm/tests.scm (letfd): Rewrite.
16856         (with-working-directory): Likewise.
16857         (with-temporary-working-directory): Likewise.
16858         (lettmp): Likewise.
16859
16860         gpgscm: Use boxed values for source locations.
16861         + commit e8b843508dac96e9d0a3140954dd5a3618669cec
16862         * tests/gpgscm/scheme-private.h (struct port): Use boxed values for
16863         filename and current line.  This allows us to use the same Scheme
16864         object for labeling all expressions in a file.
16865         * tests/gpgscm/scheme.c (file_push): Use boxed type for filename.
16866         (mark): Mark location objects of port objects.
16867         (gc): Mark location objects in the load stack.
16868         (port_clear_location): New function.
16869         (port_reset_current_line): Likewise.
16870         (port_increment_current_line): Likewise.
16871         (file_pop): Adapt accordingly.
16872         (port_rep_from_filename): Likewise.
16873         (port_rep_from_file): Likewise.
16874         (port_close): Likewise.
16875         (skipspace): Likewise.
16876         (token): Likewise.
16877         (_Error_1): Likewise.
16878         (opexe_0): Likewise.
16879         (opexe_5): Likewise.
16880         (scheme_deinit): Likewise.
16881         (scheme_load_file): Likewise.
16882         (scheme_load_named_file): Likewise.
16883
16884 2017-01-02  Werner Koch  <wk@gnupg.org>
16885
16886         dirmngr: Strip root zone suffix from libdns cname results.
16887         + commit b200e636ab20d2aa93d9f71f3789db5a04af0a56
16888         * dirmngr/dns-stuff.c (resolve_name_libdns): Strip trailing dot.
16889         (get_dns_cname_libdns): Ditto.
16890
16891 2016-12-30  NIIBE Yutaka  <gniibe@fsij.org>
16892
16893         scd: Fix select_application.
16894         + commit 337690441fcb19343fe56b139f5649bed7d25c83
16895         * scd/app.c (select_application): Fix the condition for open.
16896
16897         scd: Fix card removal monitor.
16898         + commit f300e12a793d59deb1a369713384eaabfa39b3e6
16899         * scd/app.c (app_reset): Call send_client_notification with REMOVAL.
16900         (scd_update_reader_status_file): Likewise.
16901         * scd/command.c (send_client_notifications): Distinguish removal.
16902
16903 2016-12-29  NIIBE Yutaka  <gniibe@fsij.org>
16904
16905         scd: Improve internal CCID driver.
16906         + commit cdc8d0bd933b958db878861587322bc541b580b3
16907         * scd/ccid-driver.c (scan_or_find_usb_device): Don't scan for
16908         configuration but use active configuration.  Support alt_setting.
16909         (scan_or_find_devices): Support alt_setting.
16910         (ccid_open_reader): Support alt_setting.
16911
16912         scd: Fix a race condition for new_reader_slot.
16913         + commit c48cf7e32ffa02ebdf00265543344c611bef0431
16914         * scd/apdu.c (reader_table_lock, apdu_init): New.
16915         (new_reader_slot): Serialize by reader_table_lock.
16916         * scd/app.c (lock_app, unlock_app, app_new_register): Fix error code
16917         usage.
16918         (initialize_module_command): Call apdu_init.
16919         * scd/scdaemon.c (main): Handle error for initialize_module_command.
16920
16921 2016-12-28  NIIBE Yutaka  <gniibe@fsij.org>
16922
16923         scd: APP centric approach for device management.
16924         + commit 4cc9fc5eb9bd91d943c185d59da4a2b4cb885ee6
16925         * scd/app.c (lock_app): Rename from lock_reader and use internal field
16926         of APP.
16927         (unlock_app): Likewise.
16928         (app_dump_state): Use APP.
16929         (application_notify_card_reset): Remove.
16930         (check_conflict): Change API for APP, instead of SLOT.
16931         (check_application_conflict): Likewise.
16932         (release_application_internal): New.
16933         (app_reset): New.
16934         (app_new_register): New.
16935         (select_application): Change API for APP, instead of SLOT.
16936         (deallocate_app, release_application): Modify for manage link.
16937         (report_change): New.
16938         (scd_update_reader_status_file): Moved from command.c and
16939         use APP list, instead of VREADER.
16940         (initialize_module_command): Moved from command.c.
16941
16942         * scd/command.c (TEST_CARD_REMOVAL): Remove.
16943         (IS_LOCKED): Simplify.
16944         (vreader_table): Remove.
16945         (vreader_slot, update_card_removed): Remove.
16946         (do_reset): Call app_reset.
16947         (get_current_reader): Remove.
16948         (open_card): Add SCAN arg.
16949         (cmd_serialno): No retry, since retry is done in lower layer in apdu.c.
16950         No do_reset, since it is done in lower layer.
16951         Add clearing card_removed flag.
16952         (cmd_disconnect): Call apdu_disconnect.
16953         (send_client_notifications): Modify for APP.
16954         (update_reader_status_file): Remove.
16955
16956         scd: Simplify monitoring card removal.
16957         + commit f9882d8336feea96e3b5e250e9093f8cca01e08b
16958         * scd/apdu.c (struct reader_table_s): Remove any_status, last_status,
16959         status, and change_counter field.
16960         (new_reader_slot, dump_reader_status, ct_activate_card, open_ct_reader)
16961         (connect_pcsc_card, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
16962         (open_ccid_reader, apdu_reset): Follow the change.
16963         (ct_dump_reader_status): Remove.
16964         (apdu_get_status_internal, apdu_get_status): Remove CHANGED arg.
16965         (apdu_connect): Follow the change.
16966         * scd/command.c (struct vreader_s): Remove reset_failed, any, and
16967         changed field.
16968         (cmd_getinfo, update_reader_status_file): Follow the change.
16969
16970 2016-12-27  NIIBE Yutaka  <gniibe@fsij.org>
16971
16972         scd: Improve internal CCID driver.
16973         + commit c7ec9c42246033e14ebad679d11f3b1fbeed23b7
16974         * scd/ccid-driver.c (scan_or_find_usb_device): Fix return value.
16975         Support device with multiple CCID interfaces.  Fix the case with
16976         READERNO.  Support partial string match of "reader-port" like PC/SC
16977         driver.
16978
16979 2016-12-23  NIIBE Yutaka  <gniibe@fsij.org>
16980
16981         dirmngr: Fix for --disable-libdns usage.
16982         + commit d26c51825e2255fe58305cbc1cd74fa43f80d93e
16983         * dirmngr/dns-stuff.c (enable_recursive_resolver, set_dns_nameserver)
16984         (reload_dns_stuff): Conditionalize with USE_LIBDNS.
16985         (get_h_errno_as_gpg_error): Map HOST_NOT_FOUND to GPG_ERR_NO_NAME.
16986
16987 2016-12-22  Neal H. Walfield  <neal@g10code.com>
16988
16989         tools: Show a clearer error message if a server doesn't support WKS.
16990         + commit 1909e994cb87d6c6866a465f0c20a456d4df46cc
16991         * tools/gpg-wks-client.c (command_send): If we fail to lookup the
16992         submission address, print a better error message.  If it is because
16993         the corresponding file doesn't exist, provide the hint that the server
16994         probably doesn't support WKS.
16995
16996 2016-12-22  Werner Koch  <wk@gnupg.org>
16997
16998         wks: Let the client ignore missing policy flags.
16999         + commit e917dfcd973a3ebbf5eb584e819ffa89f932bfef
17000         * tools/gpg-wks-client.c (command_send): Ignore missing policy flags.
17001
17002 2016-12-22  NIIBE Yutaka  <gniibe@fsij.org>
17003
17004         scd: Clean up internal API for APP.
17005         + commit 8431f5a7e88e1f42d75c4a4b61f4aa9b35457204
17006         * scd/app-common.h (app_readcert, app_readkey, app_setattr, app_sign,
17007         app_auth, app_decipher, app_get_challenge, app_check_pin): Add CTRL as
17008         the second argument.
17009         * scd/app.c: Supply CTRL to lock_reader calls.
17010         * scd/command.c (cmd_readcert, cmd_readkey, cmd_pksign, cmd_auth,
17011         cmd_pkdecrypt, cmd_setattr, cmd_random, cmd_checkpin): Follow the
17012         change.
17013
17014 2016-12-21  Justus Winter  <justus@g10code.com>
17015
17016         gpgscm: Guard use of union member.
17017         + commit 6e96cdd41a0e55b672309431062f37c4a4a9f485
17018         * tests/gpgscm/scheme.c (opexe_5): Check that we have a file port
17019         before accessing filename.  Fixes a crash on 32-bit architectures.
17020
17021 2016-12-20  Werner Koch  <wk@gnupg.org>
17022
17023         tests: Avoid skipping exectool tests.
17024         + commit 6204f8104fea42d706a68e77e2dc0bca4704bddc
17025         * common/t-exectool.c (test_executing_true): Try also /usr/bin/true.
17026         (test_executing_false): Try also /usr/bin/false.
17027
17028 2016-12-20  Justus Winter  <justus@g10code.com>
17029
17030         tests: Add test suite for gpgsm.
17031         + commit 36c14139285982def6ad942d4b2d8bef7ed4ea76
17032         * configure.ac (AC_CONFIG_FILES): Add new file.
17033         * tests/Makefile.am (SUBDIRS): Add new directory.
17034         * tests/gpgsm/32100C27173EF6E9C4E9A25D3D69F86D37A4F939: New file.
17035         * tests/gpgsm/Makefile.am: Likewise.
17036         * tests/gpgsm/cert_dfn_pca01.der: Likewise.
17037         * tests/gpgsm/cert_dfn_pca15.der: Likewise.
17038         * tests/gpgsm/cert_g10code_test1.der: Likewise.
17039         * tests/gpgsm/decrypt.scm: Likewise.
17040         * tests/gpgsm/encrypt.scm: Likewise.
17041         * tests/gpgsm/export.scm: Likewise.
17042         * tests/gpgsm/gpgsm-defs.scm: Likewise.
17043         * tests/gpgsm/import.scm: Likewise.
17044         * tests/gpgsm/plain-1.cms.asc: Likewise.
17045         * tests/gpgsm/plain-2.cms.asc: Likewise.
17046         * tests/gpgsm/plain-3.cms.asc: Likewise.
17047         * tests/gpgsm/plain-large.cms.asc: Likewise.
17048         * tests/gpgsm/run-tests.scm: Likewise.
17049         * tests/gpgsm/setup.scm: Likewise.
17050         * tests/gpgsm/shell.scm: Likewise.
17051         * tests/gpgsm/sign.scm: Likewise.
17052         * tests/gpgsm/verify.scm: Likewise.
17053
17054         tests: Add macro managing ephemeral home directories.
17055         + commit c067a012c764218b94ce8de2914615a895a75f3e
17056         * tests/openpgp/defs.scm (with-ephemeral-home-directory): New macro.
17057         * tests/openpgp/setup.scm: Use the new macro.
17058
17059         tests: Move argument parser.
17060         + commit a30c0a6972cabde3858108e9020e900696094843
17061         * tests/gpgme/gpgme-defs.scm (flag): Move...
17062         * tests/gpgscm/tests.scm: ... over here.
17063
17064         tests: Add missing encrypted sample, cleanup samples handling.
17065         + commit e2ed3c1597daf3188ddce049cc3c50113d56f1b9
17066         * tests/openpgp/Makefile.am (TEST_FILES): Add new file.
17067         * tests/openpgp/defs.scm (plain-files): Add 'plain-large'.
17068         (all-files): New variable.
17069         (create-sample-files): New function.
17070         (create-legacy-gpghome): Use new function.
17071         * tests/openpgp/plain-large.asc: New file.
17072
17073 2016-12-20  Werner Koch  <wk@gnupg.org>
17074
17075         Release 2.1.17.
17076         + commit ade32464a25fdb35cc0f39e46d303ceba68ea8f6
17077
17078
17079         sm: Remove wrong example from gpgsm --help.
17080         + commit 13465e708bb67e816e4fb3a37c117ad91dc6383f
17081         * sm/gpgsm.c (opts): Remove group 303.
17082
17083         dirmngr: New option --resolver-timeout.
17084         + commit 81c012787fabf734d9c952c6f18ecac21929d4d8
17085         * dirmngr/dns-stuff.c (DEFAULT_TIMEOUT): New.
17086         (opt_timeout): New var.
17087         (set_dns_timeout): New.
17088         (libdns_res_open): Set the default timeout.
17089         (libdns_res_wait): Use configurable timeout.
17090         (resolve_name_libdns): Ditto.
17091
17092         * dirmngr/dirmngr.c (oResolverTimeout): New const.
17093         (opts): New option --resolver-timeout.
17094         (parse_rereadable_options): Set that option.
17095         (main) <aGPGConfList>: Add --nameserver and --resolver-timeout.
17096         * tools/gpgconf-comp.c (gc_options_dirmngr): Add --resolver-timeout
17097         and --nameserver.
17098
17099         * dirmngr/http.c (connect_server): Fix yesterday introduced bug in
17100         error diagnostic.
17101
17102 2016-12-19  Werner Koch  <wk@gnupg.org>
17103
17104         dirmngr: Fix problems with the getsrv function.
17105         + commit af8b68fae39b1378c769e0de6ba6437ea1aac7e3
17106         * dirmngr/dns-stuff.c (opt_debug, opt_verbose): New vars.
17107         (set_dns_verbose): New func.
17108         (libdns_switch_port_p): Add debug output.
17109         (resolve_dns_name): Ditto.
17110         (get_dns_cert): Ditto.
17111         (get_dns_cname): Ditto.
17112         (getsrv_libdns, getsrv_standard): Change SRVCOUNT to an unsigend int.
17113         (getsrv): Rename to ...
17114         ((get_dns_srv): this.  Add arg R_COUNT and return an error.  Add debug
17115         output.
17116         * dirmngr/http.c: Adjust for chnaged getsrv().
17117         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
17118         * dirmngr/t-dns-stuff.c (main): Ditto.  Call set_dns_verbose.
17119         * dirmngr/dirmngr.c (parse_rereadable_options): Call set_dns_verbose.
17120
17121         build: Add target to sign the windows installer.
17122         + commit 284ec54495dddc9eb0232e959cf994234097578a
17123         * build-aux/speedo.mk (w32-sign-installer): New.
17124         (AUTHENTICODE_KEY): New.
17125         (installer-from-source): Use cp instead of mv.  Factor code out to ...
17126         (MKSWDB_commands): new macro.
17127         (sign-installer): New.
17128
17129 2016-12-19  Justus Winter  <justus@g10code.com>
17130
17131         tests: Use the common test framework for the migration tests.
17132         + commit 65a0d6a24e6299682793f213a9d2bae17c5b12d9
17133         * tests/migrations/Makefile.am (reqired_pgms): Add 'gpgscm'.
17134         (TESTS_ENVIRONMENT): Populate.
17135         (TESTS): Rename to 'XTESTS'.
17136         (xcheck): New target.
17137         (EXTRA_DIST): Add new files.
17138         (CLEANFILES): Remove log files.
17139         * tests/migrations/common.scm: Honor 'verbose', fix paths.
17140         * tests/migrations/run-tests.scm: New file.
17141         * tests/migrations/setup.scm: Likewise.
17142
17143         tests: Use sequential test runner if only one test is given.
17144         + commit 0bf16d702665a269ce5ef724c927fbbd8f7f1ce9
17145         * tests/openpgp/run-tests.scm: Use sequential test runner if only one
17146         test is given.
17147
17148 2016-12-19  Werner Koch  <wk@gnupg.org>
17149
17150         dirmngr,w32: Hack around a select problem.
17151         + commit d51499fdc522a696f23c6776c3ab248742f4e06a
17152         * dirmngr/dns.c (FD_SETSIZE): Bump up to 1024.
17153         (dns_poll): Return an error instead of hitting an assertion failure.
17154
17155 2016-12-19  Neal H. Walfield  <neal@g10code.com>
17156
17157         test: Extend TOFU tests to also check the days with signatures.
17158         + commit aec89a7297bae30f79a63fdc830530e82bab6170
17159         * tests/openpgp/tofu.scm (GPGTIME): Define the "standard" base time.
17160         (faketime): New function.
17161         (days->seconds): Likewise.
17162         (GPG): Use faketime.
17163         (check-counts): Also check the number of expected days with signatures
17164         and encryptions.  Update callers.  Extend tests.
17165
17166 2016-12-19  Justus Winter  <justus@g10code.com>
17167
17168         tests: New test for --delete-[secret-]keys.
17169         + commit a1afc450e182af02ad5e6f6ba79e9dc4332ca2bc
17170         * tests/openpgp/Makefile.am (XTESTS): Add new test.
17171         * tests/openpgp/defs.scm (keys): New variable.
17172         (have-public-key?): New function.
17173         (have-secret-key?): Likewise.
17174         (have-secret-key-file?): Likewise.
17175         * tests/openpgp/delete-keys.scm: New file.
17176         * tests/openpgp/quick-key-manipulation.scm: Move the accessors to
17177         'defs.scm'.
17178
17179         gpgscm: Change associativity of ::.
17180         + commit a45dc0849da0d944ec8c759bc8e3e733b1eb0079
17181         * tests/gpgscm/scheme.c (mk_atom): Change associativity of the ::
17182         infix-operator.  This makes it possible to naturally express accessing
17183         nested structures (e.g. a::b::c).
17184
17185         gpgscm: Display location when assertions fail.
17186         + commit 3949cbd1128585c9b810713aeffaa1455fb5aed9
17187         * tests/gpgscm/lib.scm (assert): Use location information if
17188         available.
17189
17190         gpgscm: Make exception handling more robust.
17191         + commit df00745d6eed7034b218a0c482a46d975425798a
17192         * tests/gpgscm/init.scm (throw'): Check that args is a list.
17193
17194 2016-12-19  Andre Heinecke  <aheinecke@intevation.de>
17195
17196         speedo,w32: Use nsExec::ExecToLog to avoid popups.
17197         + commit 026bbf0d5ee4510967e5f1dd3db2dee4687b0612
17198         * build-aux/speedo/w32/inst.nsi: Use ExecToLog instead of
17199         ExecWait.
17200
17201 2016-12-19  Werner Koch  <wk@gnupg.org>
17202
17203         Remove unused debug flags and add "dns" and "network".
17204         + commit e384405b6e251629fb36bcbba4f5f9ac15a39d10
17205         * g10/options.h (DBG_CARD_IO_VALUE, DBG_CARD_IO): Remove.
17206         * g10/gpg.c (debug_flags): Remove "cardio".
17207         * agent/agent.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove.
17208         * agent/gpg-agent.c (debug_flags): Remove "command".
17209         * scd/scdaemon.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove.
17210         * scd/scdaemon.c (debug_flags): Remove "command".
17211         * dirmngr/dirmngr.h (DBG_DNS_VALUE, DBG_DNS): New.
17212         (DBG_NETWORK_VALUE, DNG_NETWORK): New.
17213         * dirmngr/dirmngr.c (debug_flags): Add "dns" and "network".
17214
17215 2016-12-17  Werner Koch  <wk@gnupg.org>
17216
17217         dirmngr: Fix setup of libdns for W32.
17218         + commit e77b924fec1082faae48cdd2ff8474874a22bdf7
17219         * configure.ac (DNSLIB) {W32]: Add -liphlpapi.
17220         * dirmngr/dns-stuff.c [W32]: Include iphlpapi.h and define
17221         WIN32_LEAN_AND_MEAN.
17222         (libdns_init) [W32]: Use GetNetworkParams to get the nameserver.
17223         * dirmngr/t-dns-stuff.c (init_sockets): New.
17224         (main): Call it.
17225
17226 2016-12-16  Werner Koch  <wk@gnupg.org>
17227
17228         dirmngr: Auto-switch from Tor port to Torbrowser port.
17229         + commit 024dbd7162fc1a7694176ebad3c21ee3ea67c024
17230         * dirmngr/dns-stuff.c (libdns_tor_port): New var.
17231         (set_dns_nameserver): Clear that var.
17232         (libdns_init): Init var to the default port.
17233         (libdns_switch_port_p): New func.
17234         (resolve_dns_name): Use function to switch the port
17235         (get_dns_cert): Ditto.
17236         (getsrv): Ditto.
17237         (get_dns_cname): Ditto.
17238
17239         dirmngr: Use one context for all libdns queries.
17240         + commit c4e8a3194d6b92f596a6483e486c645de7d2ddd1
17241         * dirmngr/dns-stuff.c (libdns_reinit_pending): New var.
17242         (enable_recursive_resolver): Set var.
17243         (set_dns_nameserver): Ditto.
17244         (libdns_init): Avoid double initialization.
17245         (libdns_deinit): New.
17246         (reload_dns_stuff): New.
17247         (libdns_res_open): Act upon LIBDNS_REINIT_PENDING.
17248         * dirmngr/t-dns-stuff.c (main): Call reload_dns_stuff to release
17249         memory.
17250         * dirmngr/dirmngr.c (cleanup): Ditto.
17251         (dirmngr_sighup_action): Call reload_dns_stuff to set
17252         LIBDNS_REINIT_PENDING.
17253
17254         dirmngr: Pass Tor credentials to libdns.
17255         + commit ddb48086833f8b86f0f0d69b21a23f245090ea7a
17256         * dirmngr/dns-stuff.c (tor_credentials): Replace by ...
17257         (tor_socks_user, tor_socks_password): new vars.
17258         (enable_dns_tormode): Set these new vars.
17259         (libdns_res_open): Tell libdns the socks credentials.
17260
17261         dirmngr: Factor common libdns code out.
17262         + commit 59d3c3e4baffff52548fb5d1766ebf02dd8e1bec
17263         * dirmngr/dns-stuff.c (libdns_res_open): New.  Replace all libdns_init
17264         and dns-res_open by a call to this func.
17265         (libdns_res_submit): New wrapper.  Replace all dns_res_sumbit calls.
17266         (libdns_res_wait): New function.
17267         (resolve_name_libdns): Replace loop by libdns_res_wait.
17268         (get_dns_cert_libdns): Ditto.
17269         (getsrv_libdns): Ditto.
17270
17271         gpg,sm: A few more option for --gpgconf-list.
17272         + commit 48671f295ff233765689b6a73021f83ab845a28f
17273         * g10/gpg.c (gpgconf_list): Add --compliance and
17274         --default-new-key-algo.
17275         (parse_compliance_option):
17276         * sm/gpgsm.c (main) <gpgconf-list>: Add --enable-crl-checks.
17277
17278         gpgconf: New command --apply-profile.
17279         + commit 76cd64a5baf6057b199c01f7999b327f1f4a87bc
17280         * tools/gpgconf.c (aApplyProfile): New.
17281         (opts): New command --apply-profile.
17282         (main): Implement that command.
17283         * tools/gpgconf-comp.c (option_check_validity): Add arg VERBATIM.
17284         (change_options_program): Ditto.
17285         (change_one_value): Ditto.
17286         (gc_component_change_options): Ditto.
17287         (gc_apply_profile): New.
17288
17289         gpgconf: Fix --apply-defaults.
17290         + commit 6ca3c28da46873416822bf6ab7893db6c56a49d6
17291         * tools/gpgconf-comp.c: Skip pinentry also in process_all mode.
17292
17293 2016-12-16  Justus Winter  <justus@g10code.com>
17294
17295         doc: Mention extra information in pinentry status lines.
17296         + commit 12a5265afa7f87ad92fb571e0882e57b07a3c267
17297         * doc/DETAILS: Mention that 'PINENTRY_LAUNCHED may carry extra
17298         information.
17299
17300         sm: Fix agent communication.
17301         + commit 3c7d6a1769ed6cc90d86247a814a0dce341512a3
17302         * sm/call-agent.c (gpgsm_agent_pksign): Fix passing the control handle
17303         to the callback.
17304         (gpgsm_scd_pksign): Likewise.
17305         (gpgsm_agent_reaedkey): Likewise.
17306
17307 2016-12-16  Neal H. Walfield  <neal@g10code.com>
17308
17309         doc: Fix manual.
17310         + commit a165fa09be4bfbeb97ebe25d551a9045255e5028
17311         * doc/gpg.texi: Remove comment about options being parsed in-order.
17312         They aren't.
17313
17314         g10: Use total days, not total messages to compute TOFU validity.
17315         + commit 4a2c210b75d4266e289712e73a42c286aabb07f0
17316         * g10/tofu.c (write_stats_status): Use the number of days with
17317         signatures / encryptions to compute the validity, not the total number
17318         of signatures / encryptions.
17319         (BASIC_TRUST_THRESHOLD): Adjust given the new semantics.
17320         (FULL_TRUST_THRESHOLD): Likewise.
17321
17322         g10: Extend TOFU_STATS to emit <sign-days> and <encyrption-days>
17323         + commit 94f6b9010d2e80a75ccbb21426faf0b30195f1ab
17324         * doc/DETAILS: Add SIGN-DAYS and ENCRYPT-DAYS to the TOFU_STATS status
17325         line.
17326         * g10/tofu.c (write_stats_status): Take additional parameters
17327         signature_days and encryption_days.  Update callers.  Include them in
17328         the tfs record and TOFU status lines.
17329         (show_statistics): Compute the number of days on which we saw a
17330         message signed by FINGERPRINT, and the number of days on which we
17331         encrypted a message to it.
17332
17333 2016-12-16  Justus Winter  <justus@g10code.com>
17334
17335         doc: Improve section on unattended key generation.
17336         + commit ca02a8b78fca8815388a859962584d75169ae3ee
17337         * doc/gpg.texi: Improve the subsection on unattended key generation by
17338         suggesting the quick key manipulation interface as an alternative, and
17339         by suggesting alternatives to '%pubring' and '%secring'.  Simplify
17340         examples accordingly.
17341
17342         doc: Add documentation for programmatic use of GnuPG.
17343         + commit 116a78eb869c4c589228bd0d6deff7c7a9f92dfb
17344         * doc/gpg.texi: New subsections on programmatic use of GnuPG,
17345         ephemeral home directories, and the quick key manipulation interface.
17346
17347 2016-12-16  Neal H. Walfield  <neal@g10code.com>
17348
17349         g10: On a TOFU conflict, write the conflicting keys to the status fd.
17350         + commit fea9da4a8afab6f3a49cdbbcc4a7a21f27a6d3e8
17351         * g10/tofu.c (ask_about_binding): Emit all of the conflicting keys and
17352         their statistics on the status fd.
17353         (get_trust): Likewise, if we don't call ask_about_binding.
17354         (show_statistics): Have the caller pass the policy as returned by
17355         get_policy.  Add argument only_status_fd and don't emit any output on
17356         stdout if it is set.  Update callers.
17357
17358         g10: Add missing space.
17359         + commit 6caa2d0ba2bfc0ae93878738b0169483f6b6b462
17360         * g10/tofu.c (tofu_register_encryption): Add missing space.
17361
17362 2016-12-15  Justus Winter  <justus@g10code.com>
17363
17364         g10: Avoid translating simple error messages.
17365         + commit 6b16b02109f4bb5b934e456667ff4c0ba7bc85fd
17366         * g10/gpg.c (main): Avoid translating arguments to 'wrong_args'.
17367
17368         g10: Rework the --quick-* interface.
17369         + commit 41ad04d403de05abe54280d2a84aa51a603194e4
17370         * g10/gpg.c (opts): Rename options.
17371         (main): Update errors.
17372         * doc/gpg.texi: Update accordingly.
17373
17374         g10: Rename 'card-edit' to 'edit-card'.
17375         + commit 6e4396723e9e5865015ebf7033628fa3919cf7d1
17376         * g10/gpg.c (opts): Rename option.
17377         * g10/call-agent.c (agent_scd_learn): Update comment.
17378         * doc/gpg.texi: Update accordingly.
17379
17380         g10: Spell out --desig-revoke.
17381         + commit 3c691097ca144e9a1d4c9185636c59a848bec85c
17382         * g10/gpg.c (opts): Rename option.
17383         * doc/gpg.texi: Update accordingly.
17384
17385         g10: Shorten unreasonably long option.
17386         + commit c252627c6fd93bc305c5a5a2f013c3de2d45c6b0
17387         * g10/gpg.c (opts): Rename 'generate-revocation-certificate' to
17388         'generate-revocation'.
17389         * doc/gpg.texi: Update accordingly.
17390         * po: Update translations.
17391
17392         doc: Add aliases of all changed options.
17393         + commit bc6b76ef26f31c54ae1c29c761b8ecc437fcf565
17394         * doc/gpg.texi: Add the old version of every option that was updated
17395         with the last change set.
17396         * doc/gpgsm.texi: Likewise.
17397
17398 2016-12-15  Werner Koch  <wk@gnupg.org>
17399
17400         dirmngr: First patch to re-enable Tor support.
17401         + commit 2d1760ffe2ff46b77bd0f38db8b781d9564ae999
17402         * dirmngr/dns-stuff.c (SOCKS_PORT, TOR_PORT, TOR_PORT2): New
17403         constants.
17404         (libdns_init): Start adding tor support.
17405         (resolve_name_libdns): Pass socks hosts to dns_res_open.
17406         (get_dns_cert_libdns): Ditto.
17407         (getsrv_libdns): Ditto.
17408         (get_dns_cname_libdns): Ditto.
17409
17410 2016-12-15  Justus Winter  <justus@g10code.com>
17411
17412         build: Fix distcheck.
17413         + commit 0e2055c7d30d987a7a74923a7080b80cce470601
17414         * tests/gpgme/Makefile.am (CLEANFILES): New variable, clean test logs.
17415
17416 2016-12-14  Justus Winter  <justus@g10code.com>
17417
17418         tests: Reuse GPGME's tests.
17419         + commit 948cca9c99e701a1668bb5fd6e25f07e35381b4d
17420         * configure.ac (AC_CONFIG_FILES): Add new Makefile.
17421         * tests/Makefile.am (SUBDIRS): Add new directory.
17422         * tests/gpgme/Makefile.am: New file.
17423         * tests/gpgme/gpgme-defs.scm: Likewise.
17424         * tests/gpgme/run-tests.scm: Likewise.
17425         * tests/gpgme/setup.scm: Likewise.
17426         * tests/gpgme/wrap.scm: Likewise.
17427
17428         common: Support locating components in the build tree.
17429         + commit ca1e9749bfb069d90aa44efbf6f3d611b6104c1b
17430         * common/homedir.c (gnupg_build_directory): New variable.
17431         (gnupg_module_name_called): Likewise.
17432         (gnupg_set_builddir): New function.
17433         (gnupg_set_builddir_from_env): Likewise.
17434         (gnupg_module_name): Support locating components in the build tree.
17435         * common/util.h (gnupg_set_builddir): New prototype.
17436         * tests/openpgp/defs.scm (tools): Drop 'gpg and 'gpg-agent.
17437         (tool): Rename to 'tool-hardcoded.
17438         (gpg-conf): New function, with accessors for the results.
17439         (gpg-components): New variable.
17440         (tool): New function.
17441         * tools/gpgconf.c (enum cmd_and_opt_values): New key.
17442         (opts): New option '--build-prefix'.
17443         (main): Handle new option.
17444
17445         tests: Rework check for trust models.
17446         + commit 55dc81125abc43cd3cc8db951fc3b8a81767942d
17447         * tests/openpgp/defs.scm (gpg-has-option?): New function.
17448         (have-opt-always-trust): Use a simpler test for that option.  This way
17449         that is less distracting when we run the tests with verbose=3.
17450
17451 2016-12-14  Werner Koch  <wk@gnupg.org>
17452
17453         dirmngr: New configure option --disable-libdns.
17454         + commit d34a2bb410c7c770d26430d69ff77bd83fc407f1
17455         * configure.ac: Add option --disable-libdns
17456         (USE_LIBDNS): New ac_subst and am_conditional.
17457         (USE_C99_CFLAGS): Set only if libdns is used.
17458         * dirmngr/Makefile.am (dirmngr_SOURCES): Move dns.c and dns.h to ...
17459         (dirmngr_SOURCES) [USE_LIBDNS0: here.
17460         (t_common_src): Ditto.
17461         * dirmngr/dirmngr.c (oRecursiveResolver): New constant.
17462         (opts): New option "--recursive-resolver".
17463         (parse_rereadable_options): Set option.
17464         * dirmngr/t-dns-stuff.c (main): Add option --recursive-resolver.
17465         * dirmngr/server.c (cmd_getinfo): Depend output of "dnsinfo" on the
17466         new variables.
17467         * dirmngr/dns-stuff.c: Include dns.h only if USE_DNSLIB is defined.
17468         Also build and call dnslib functions only if USE_DNSLIB is defined.
17469         (recursive_resolver): New var.
17470         (enable_recursive_resolver): New func.
17471         (recursive_resolver_p): New func.
17472
17473         dirmngr: Implement CERT record lookup via libdns.
17474         + commit 3c2a7918eac024b5e1258ea9b272b4e8a1f1af43
17475         * dirmngr/dns-stuff.c (get_dns_cert_libdns): New.
17476         (get_dns_cert_standard): Fix URL malloc checking.
17477
17478         dirmngr: Implement CNAME and SRV record lookup via libdns.
17479         + commit 4c13e4e3debe0e55e86ae29c095f2d86eb0a6f11
17480         * dirmngr/dns-stuff.c (dns_free): New macro.
17481         (libdns): Move var to the top.
17482         (libdns_error_to_gpg_error): Map error codes to the new gpg-error
17483         codes.
17484         (resolve_name_libdns): Restructure code.
17485         (getsrv_libdns): New.
17486         (get_dns_cname_libdns): New.
17487
17488         dirmngr: Fix bugs in the standard resolver code.
17489         + commit 4a030f682ef48542ed324b28207f2c2b4847dbef
17490         * dirmngr/dns-stuff.c: Include dirmngr-err.h to set the correct error
17491         source.
17492         (get_h_errno_as_gpg_error): New.
17493         (get_dns_cert_libdns): Fix error code.
17494         (getsrv_libdns): Add arg R_COUNT and return an error code.
17495         (getsrv_standard): Ditto.  Fix handling of res_query errors and
17496         provide the correct size for the return buffer.
17497         (getsrv): Adjust for changed worker functions.
17498         (get_dns_cname_standard): Fix handling of res_query errors and provide
17499         the correct size for the return buffer.
17500
17501         dirmngr: Require a c99 compiler.
17502         + commit 392966aed9b2a5e1456c671e5d13b561a27e4bb2
17503         * configure.ac (USE_C99_CFLAGS): New ac_subst.  Set to -std=gnu99 for
17504         gcc.
17505         * dirmngr/Makefile.am (AM_CFLAGS): Add USE_C99_CFLAGS.
17506         (t_http_CFLAGS): Ditto.
17507         (t_ldap_parse_uri_CFLAGS): Ditto.
17508         (t_dns_stuff_CFLAGS): Ditto.
17509
17510         doc: Add license notes for libdns.
17511         + commit d84f5a88233c073a82fd47728574b001343784ee
17512         * COPYING.other: New.
17513         * Makefile.am (EXTRA_DIST): Add it.
17514         * AUTHORS: Add info on libdns.
17515         * build-aux/speedo/w32/pkg-copyright.txt: Add license terms.
17516
17517         common: Add replacements for error codes from gpg-error 1.26.
17518         + commit aae68a3ccd3d9870162b3ffd49eae08d5bf1b1e1
17519
17520
17521 2016-12-14  Justus Winter  <justus@g10code.com>
17522
17523         dirmngr: New libdns snapshot.
17524         + commit f8ab2c4c70ad15c4b2e45492606fb94ddaccdac7
17525
17526
17527         dirmngr: Add basic libdns support.
17528         + commit f6acd0426453d3a18536ca69d63baa0d971082ef
17529         * dirmngr/dns.c: New file.
17530         * dirmngr/dns.h: New file.
17531         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new files.
17532         * dirmngr/dns-stuff.c: Include dns.h.xxx use libdns
17533         (libdns): New global var for the libdns state.
17534         (libdns_error_to_gpg_error): New.
17535         (libdns_init): New.
17536         (resolve_name_libdns): New.
17537         (get_dns_cert_libdns): New stub.
17538         (getsrv_libdns): New stub.
17539         (get_dns_cname_libdns): New stub.
17540
17541         dirmngr,build: Remove support for ADNS.
17542         + commit 2e734a3ce159de8fb60df2bd5d454f98ca710717
17543         * autogen.rc: Remove '--with-adns' argument.
17544         * configure.ac: Remove check for ADNS.
17545         * dirmngr/dns-stuff.c: Remove all code that uses ADNS.
17546         * dirmngr/server.c (cmd_getinfo): Update status line.
17547         * doc/dirmngr.texi: Do not mention ADNS.
17548
17549 2016-12-14  NIIBE Yutaka  <gniibe@fsij.org>
17550
17551         dirmngr: Improve ntbtls support.
17552         + commit 57aa42ce9b28bc17ac24491d595766fbf80762af
17553         * dirmngr/http.c [HTTP_USE_NTBTLS] (close_tls_session): Release.
17554         (send_request): Call ntbtls_set_transport.
17555         (cookie_read, cookie_write): Implement.
17556         (cookie_close): Add initial implementation for ntbtls.
17557
17558 2016-12-13  Justus Winter  <justus@g10code.com>
17559
17560         g10,sm: Spell out --passwd.
17561         + commit c1c35fb887061de05661f3411eda97546e1a52d7
17562         * g10/gpg.c (opts): Spell out option.
17563         * sm/gpgsm.c (opts): Likewise.
17564         * doc/gpg.texi: Update accordingly.
17565         * doc/gpgsm.texi: Likewise.
17566
17567         g10: Spell out --gen-revoke.
17568         + commit ec1bd3ae685e95563e38077ab3c1655fd55dea07
17569         * g10/gpg.c (opts): Spell out option.
17570         * doc/gpg.texi: Update accordingly.
17571         * po: Update translations.
17572
17573         g10: Spell out --full-gen-key.
17574         + commit 09163a6390bd9713f3a7946de739765b30ef6f64
17575         * g10/gpg.c (opts): Spell out option.
17576         (main): Likewise.
17577         * g10/keygen.c (generate_keypair): Likewise.
17578         * doc/gpg.texi: Update accordingly.
17579
17580         g10,sm: Spell out --gen-key.
17581         + commit 892c827e72b1396e3b58e2f8869cc48328a2b59c
17582         * g10/gpg.c (opts): Spell out option.
17583         * sm/gpgsm.c (opts): Likewise.
17584         * doc/gpg.texi: Update accordingly.
17585
17586         g10,sm: Spell out --check-sigs.
17587         + commit 9147737f1c6894f38b855f3cf38cd33122a1ae2a
17588         * g10/gpg.c (opts): Spell out option.
17589         * sm/gpgsm.c (opts): Likewise.
17590         * doc/gpg.texi: Update accordingly.
17591
17592         g10,sm: Spell out --list-sigs.
17593         + commit a6d6e4afe488bc05ee730e85da6a9505c6cd245a
17594         * g10/gpg.c (opts): Spell out option.
17595         * sm/gpgsm.c (opts): Likewise.
17596         * doc/gpg.texi: Update accordingly.
17597
17598         g10: Hyphenate --clearsign.
17599         + commit 04754ce3a704b1e6d38cb9a28dacf2821dc3f15f
17600         * g10/gpg.c (opts): Hyphenate option.
17601         * doc/gpg.texi: Update accordingly.
17602         * po: Update translations.
17603         * tests/openpgp: Update tests.
17604
17605         g10: Spell out --recv-keys.
17606         + commit ca598152345b40f3a236227dfc63ae04ddf777d7
17607         * g10/gpg.c (opts): Spell out option.
17608         * doc/gpg.texi: Update accordingly.
17609
17610         g10: Create expiring keys in quick key generation mode.
17611         + commit dd3dde07a9a46130ac01d849f8edf0566e44f11f
17612         * doc/gpg.texi: Document that fact.
17613         * g10/keygen.c (quick_generate_keypair): Use a default value.
17614         * tests/openpgp/quick-key-manipulation.scm: Test that fact.
17615
17616         gpgscm: Print failed and skipped tests.
17617         + commit 429891a704057437517cb0b45d11392b40fa1ee8
17618         * tests/gpgscm/tests.scm (test-pool::report): Print failed and skipped
17619         tests at the end.
17620
17621         gpgscm: Generalize the test runner.
17622         + commit d43dabf4607d3bcfc217eb9aea34d093f5aa698f
17623         * tests/gpgscm/tests.scm (test::scm) Add explicit name argument.
17624         (test::binary): Likewise.  Also, add missing unquote.
17625         * tests/openpgp/run-tests.scm: Adapt accordingly.
17626
17627         gpgscm: Move the test runner to the Scheme library.
17628         + commit 1a176b92a8aad42056ed2c4e1f49a5feb40770cf
17629         * tests/openpgp/run-tests.scm: Move most of the code...
17630         * tests/gpgscm/tests.scm: ... here.
17631
17632         tests: Refactor test runner.
17633         + commit fe36e63763c9c595bb057ac50160d2aff7c7a63f
17634         * tests/openpgp/run-tests.scm (locate-test): New function.
17635         (test): Factor-out the code starting the child process.
17636         (test::binary): New function.
17637
17638         gpgscm: Improve library functions.
17639         + commit e3876f16eb237bdeb9f79aca2e7db5e9e2d86686
17640         * tests/gpgscm/tests.scm (absolute-path?): New function.
17641         (canonical-path): Use the new function.
17642         * tests/gpgscm/lib.scm (string-split-pln): New function.
17643         (string-indexp, string-splitp): Likewise.
17644         (string-splitn): Express using the above function.
17645         (string-ltrim, string-rtrim): Fix corner case.
17646         (list->string-reversed): New function.
17647         (read-line): Fix performance.
17648
17649 2016-12-12  Werner Koch  <wk@gnupg.org>
17650
17651         gpg: Fix memory leak in ecc key generation.
17652         + commit 98433c70431dfbde99b0e89416856d1eef9ebc88
17653         * g10/keygen.c (ecckey_from_sexp): Release curve.
17654
17655         gpg: Do not use a fixed string for --gpgconf-list:default_pubkey_algo.
17656         + commit f1304ee9b21e6ceac6c13d04ceddd23fadb5c7f1
17657         * g10/keygen.c (get_default_pubkey_algo): New.
17658         (parse_key_parameter_string): Use it.
17659         * g10/gpg.c (gpgconf_list): Take value from new function.
17660
17661         gpg: Fix algo string parsing of --quick-addkey.
17662         + commit 522e6f798db9f3f3a9e0123fdc389a86ac69dedf
17663         * g10/keygen.c (parse_key_parameter_string): Fix handling of PART==1.
17664         (parse_key_parameter_part): Use default key size if only "rsa", "dsa",
17665         or "elg" is given.
17666
17667 2016-12-09  Justus Winter  <justus@g10code.com>
17668
17669         g10: Create keys that expire in simple key generation mode.
17670         + commit d568a1561642ed9b7b7b6282b86c56786d10a956
17671         * g10/keygen.c (default_expiration_interval): New variable.
17672         (generate_keypair): Use the new default.
17673
17674         tests: Add a test for '--quick-addkey'.
17675         + commit b778d8deedf344c8116362633925b8153c7f1bf1
17676         * tests/openpgp/quick-key-manipulation.scm: Test '--quick-addkey'.
17677
17678         tests: New test using all available compression algorithms.
17679         + commit 59f1562c25119a4fe27411e6350f2149d6147148
17680         * tests/openpgp/Makefile.am (XTESTS): Add new test.
17681         * tests/openpgp/compression.scm: New file.
17682         * tests/openpgp/defs.scm (all-compression-algos): New variable.
17683
17684         g10: List compression algorithms using human-readable names.
17685         + commit c8100fc0faadf8ba35e4df32b4760cc975e3a83d
17686         * g10/gpg.c (list_config): List all enabled compression algorithms
17687         under the key 'compressname'.
17688
17689         g10: Fix memory leak.
17690         + commit 3de9bad359e28ced4a2539e411d222ffd82a4a62
17691         * g10/sign.c (do_sign): Release old signature data.
17692
17693 2016-12-08  Werner Koch  <wk@gnupg.org>
17694
17695         common: Skip the Byte Order Mark in conf files.
17696         + commit 5c7d58222834793629a30248e72b6ea96e832dc4
17697         * common/argparse.c (optfile_parse): Detect and skip the UTF-8 BOM.
17698
17699         Fix 2 compiler warnings.
17700         + commit cb4c7abb774e2d95806d8b0ec6ea5cd130c1b5b8
17701         * dirmngr/loadswdb.c: Set ERR on malloc failure.
17702         * g10/passphrase.c (passphrase_to_dek): Initialize all fields of
17703         HELP_S2K.
17704
17705         wks: New option --status-fd for gpg-wks-client.
17706         + commit 4a04277ad112e0966296133795f93cf6a3daa48e
17707         * tools/wks-util.c: Include status.h.
17708         (statusfp): New global var.
17709         (wks_set_status_fd): New func.
17710         (wks_write_status): New func.
17711         * tools/gpg-wks-client.c: Include status.h.
17712         (oStatusFD): New constant.
17713         (opts): New option --status-fd.
17714         (parse_arguments): Handle that option.
17715         (main): Return STATUS_SUCCESS or STATUS_FAILURE.
17716
17717 2016-12-08  Justus Winter  <justus@g10code.com>
17718
17719         gpgscm: Better error reporting.
17720         + commit e7429b1ced0c69fa7901f888f8dc25f00fc346a4
17721         * tests/gpgscm/ffi.scm: Move the customized exception handling and
17722         atexit logic...
17723         * tests/gpgscm/init.scm: ... here.
17724         (throw): Record the current history.
17725         (throw'): New function that is history-aware.
17726         (rethrow): New function.
17727         (*error-hook*): Use the new throw'.
17728         * tests/gpgscm/main.c (load): Fix error handling.
17729         (main): Save and use the 'sc->retcode' as exit code.
17730         * tests/gpgscm/repl.scm (repl): Print call history.
17731         * tests/gpgscm/scheme.c (_Error_1): Make a snapshot of the history,
17732         use it to provide a accurate location of the expression causing the
17733         error at runtime, and hand the history trace to the '*error-hook*'.
17734         (opexe_5): Tag all lists at parse time with the current location.
17735         * tests/gpgscm/tests.scm: Update calls to 'throw', use 'rethrow'.
17736
17737         gpgscm: Keep a history of calls for error messages.
17738         + commit 404e8a4136bbbab39df7dd5119841e131998cc15
17739         * tests/gpgscm/init.scm (vm-history-print): New function.
17740         * tests/gpgscm/opdefines.h: New opcodes 'CALLSTACK_POP', 'APPLY_CODE',
17741         and 'VM_HISTORY'.
17742         * tests/gpgscm/scheme-private.h (struct history): New definition.
17743         (struct scheme): New field 'history'.
17744         * tests/gpgscm/scheme.c (gc): Mark objects in the history.
17745         (history_free): New function.
17746         (history_init): Likewise.
17747         (history_mark): Likewise.
17748         (add_mod): New macro.
17749         (sub_mod): Likewise.
17750         (tailstack_clear): New function.
17751         (callstack_pop): Likewise.
17752         (callstack_push): Likewise.
17753         (tailstack_push): Likewise.
17754         (tailstack_flatten): Likewise.
17755         (callstack_flatten): Likewise.
17756         (history_flatten): Likewise.
17757         (opexe_0): New variable 'callsite', keep track of the expression if it
17758         is a call, implement the new opcodes, record function applications in
17759         the history.
17760         (opexe_6): Implement new opcode.
17761         (scheme_init_custom_alloc): Initialize history.
17762         (scheme_deinit): Free history.
17763         * tests/gpgscm/scheme.h (USE_HISTORY): New macro.
17764
17765         gpgscm: Add flag TAIL_CONTEXT.
17766         + commit 01256694f006405c54bc2adef63ef0c8f07da9ee
17767         * tests/gpgscm/scheme.c (S_FLAG_TAIL_CONTEXT): New macro.  This flag
17768         indicates that the interpreter is evaluating an expression in a tail
17769         context (see R5RS, section 3.5).
17770         (opexe_0): Clear and set the flag according to the rules layed out in
17771         R5RS, section 3.5.
17772         (opexe_1): Likewise.
17773
17774         gpgscm: Add flags to the interpreter.
17775         + commit a4a69163d9d7e4d9f3339eb5cda0afb947180b26
17776         * tests/gpgscm/scheme-private.h (struct scheme): Add field 'flags'.
17777         * tests/gpgscm/scheme.c (S_OP_MASK): New macro.
17778         (S_FLAG_MASK, s_set_flag, s_clear_flag, s_get_flag): Likewise.
17779         (_s_return): Unpack the encoded opcode and flags.
17780         (s_save): Encode the flags along with the opcode.  Use normal
17781         integers to encode the result.
17782         (scheme_init_custom_alloc): Initialize 'op' and 'flags'.
17783
17784         gpgscm: Implement tags.
17785         + commit fcf5aea44627def43425d03881e20902e7c0331e
17786         * tests/gpgscm/opdefines.h: Add opcodes to create and retrieve tags.
17787         * tests/gpgscm/scheme.c (T_TAGGED): New macro.
17788         (mk_tagged_value): New function.
17789         (has_tag): Likewise.
17790         (get_tag): Likewise.
17791         (mark): Mark tag.
17792         (opexe_4): Implement new opcodes.
17793         * tests/gpgscm/scheme.h (USE_TAGS): New macro.
17794
17795 2016-12-08  Werner Koch  <wk@gnupg.org>
17796
17797         gpg: Fix the fix out-of-bounds access.
17798         + commit a75790b74095828f967c012eff7033f570d93077
17799         * g10/tofu.c (build_conflict_set): Revert to int* and fix calloc.
17800
17801         wks: New option --check for gpg-wks-client.
17802         + commit d8c5e8ccfdb53cc327f7520fc7badc31d0c9c666
17803         * tools/call-dirmngr.c (wkd_get_key): New.
17804         * tools/gpg-wks-client.c (aCheck): New constant.
17805         (opts): New option "--check".
17806         (main): Call command_check.
17807         (command_check): New.
17808
17809         tools: Move a function from gpg-wks-server to wks-util.c.
17810         + commit c3138decd77d788906885b638b344d0d1faf32c0
17811         * tools/gpg-wks-server.c (list_key_status_cb): Remove.
17812         (list_key): Move to ...
17813         * tools/wks-util.c (wks_list_key): here and rename.  Add new args
17814         R_FPR and R_MBOXES and remove the CTX.
17815         (list_key_status_cb): New.
17816         * tools/wks-util.c: Include ccparray.h, exectool.h, and mbox-util.h.
17817         * tools/gpg-wks-server.c (process_new_key): Replace list_key by
17818         wks_list_key.
17819         (check_and_publish): Ditto.
17820
17821 2016-12-08  Justus Winter  <justus@g10code.com>
17822
17823         gpgscm: Generalize 'for-each-p'.
17824         + commit a2bedc8ac6fcdcd1de0a9fa3d540006481387dff
17825         * tests/gpgscm/tests.scm (for-each-p): Generalize to N lists like
17826         for-each.
17827         (for-each-p'): Likewise.
17828
17829         g10: Fix out-of-bounds access.
17830         + commit 3b5b94ceab7c0ed9501c5cf54b4efa17fcd7300a
17831         * g10/tofu.c (build_conflict_set): Use 'char'.
17832
17833 2016-12-08  Werner Koch  <wk@gnupg.org>
17834
17835         tools: Fix use of uninitialized var in mime-maker.
17836         + commit dd03667ab1062bba3b9413c3f8007d63302d1b31
17837         * tools/mime-maker.c (ensure_part): Make sure to set R_PARENT on
17838         error.
17839         (add_missing_headers): Ensure that ERR is set on success.
17840
17841         * tools/wks-util.c (wks_parse_policy): Fix indentation.
17842
17843         tools: Fix memleak in gpgconf.
17844         + commit b265969154741bf9f93167699fe7ddda1d485265
17845         * tools/gpgconf.c (main): Free SOCKETDIR.
17846
17847         gpg: Fix portability problem.
17848         + commit c3008bffac68b6f31e9ae9bad837cdce5de7c0db
17849         * g10/tofu.c (build_conflict_set): Replace variable dynamic array.
17850
17851 2016-12-07  Justus Winter  <justus@g10code.com>
17852
17853         tests: Add test for '--quick-set-expire'.
17854         + commit dec2ae31a46a0f41886c7ad228865cc573f2dea9
17855         * tests/openpgp/quick-key-manipulation.scm: Test '--quick-set-expire'.
17856
17857         tests: Improve quick key manipulation test.
17858         + commit 92df40a3a2ae471fbba00d6d7040230404931fd4
17859         * tests/openpgp/quick-key-manipulation.scm: Do not update the trust
17860         database, rather be more specific when filtering the user ids.
17861
17862 2016-12-06  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17863
17864         agent: Respect --enable-large-secmem.
17865         + commit 8636ad5023a1bdc527add40a5508f8c5b7c35221
17866         * agent/gpg-agent.c (main): Initialize secmem to the configured buffer
17867         size.
17868
17869 2016-12-06  Justus Winter  <justus@g10code.com>
17870
17871         tests: Add test importing a revocation certificate.
17872         + commit e352ead43fbb0180e1f1c71bf1a000d1954eb777
17873         * tests/openpgp/Makefile.am (XTESTS): Add new test.
17874         * tests/openpgp/import-revocation-certificate.scm: New file.
17875         * tests/openpgp/samplemsgs/revoke-2D727CC768697734.asc: Likewise.
17876
17877         tests: Rename 'error' to 'fail'.
17878         + commit 5b5d881f47c82f320abf440c20b7a1bac078a987
17879         * tests/gpgscm/tests.scm (error): Rename to 'fail'.  'error' is a
17880         primitive function (an opcode) of the TinySCHEME vm, and 'error' is
17881         also defined by R6RS.  Better avoid redefining that.  Fix all call
17882         sites.
17883         * tests/openpgp/4gb-packet.scm: Adapt.
17884         * tests/openpgp/decrypt-multifile.scm: Likewise.
17885         * tests/openpgp/ecc.scm: Likewise.
17886         * tests/openpgp/export.scm: Likewise.
17887         * tests/openpgp/gpgtar.scm: Likewise.
17888         * tests/openpgp/gpgv-forged-keyring.scm: Likewise.
17889         * tests/openpgp/import.scm: Likewise.
17890         * tests/openpgp/issue2015.scm: Likewise.
17891         * tests/openpgp/issue2346.scm: Likewise.
17892         * tests/openpgp/issue2419.scm: Likewise.
17893         * tests/openpgp/key-selection.scm: Likewise.
17894         * tests/openpgp/mds.scm: Likewise.
17895         * tests/openpgp/multisig.scm: Likewise.
17896         * tests/openpgp/setup.scm: Likewise.
17897         * tests/openpgp/signencrypt.scm: Likewise.
17898         * tests/openpgp/ssh-import.scm: Likewise.
17899         * tests/openpgp/tofu.scm: Likewise.
17900         * tests/openpgp/verify.scm: Likewise.
17901
17902         tests: Remove debugging display.
17903         + commit 89ac071eb4c7539e98c7dc17e11f57c620b54e90
17904         * tests/openpgp/tofu.scm: Remove debugging display.
17905
17906 2016-12-06  Neal H. Walfield  <neal@g10code.com>
17907
17908         tests: Update distributed files.
17909         + commit 87972fdef2cd853fb97624d0765686674a19e3c4
17910         * tests/openpgp/Makefile.am (TEST_FILES): Remove tofu-keys.asc,
17911         tofu-keys-secret.asc, tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and
17912         tofu-EE37CF96-1.txt.  Add tofu/conflicting/1C005AF3.gpg,
17913         tofu/conflicting/1C005AF3-secret.gpg, tofu/conflicting/1C005AF3-1.txt,
17914         tofu/conflicting/1C005AF3-2.txt, tofu/conflicting/1C005AF3-3.txt,
17915         tofu/conflicting/1C005AF3-4.txt, tofu/conflicting/1C005AF3-5.txt,
17916         tofu/conflicting/B662E42F.gpg, tofu/conflicting/B662E42F-secret.gpg,
17917         tofu/conflicting/B662E42F-1.txt, tofu/conflicting/B662E42F-2.txt,
17918         tofu/conflicting/B662E42F-3.txt, tofu/conflicting/B662E42F-4.txt,
17919         tofu/conflicting/B662E42F-5.txt, tofu/conflicting/BE04EB2B.gpg,
17920         tofu/conflicting/BE04EB2B-secret.gpg, tofu/conflicting/BE04EB2B-1.txt,
17921         tofu/conflicting/BE04EB2B-2.txt, tofu/conflicting/BE04EB2B-3.txt,
17922         tofu/conflicting/BE04EB2B-4.txt, tofu/conflicting/BE04EB2B-5.txt and
17923         tofu/conflicting/README.
17924
17925         doc: Improve the text in the gpg manual.
17926         + commit 7572d270fcda1614648c6f08d711d5096ffebbe6
17927         * doc/gpg.texi: Improve the text.
17928
17929         g10: Avoid a memory leak.
17930         + commit 6102099985c1b82b6c0bba0464c1f913cc673e96
17931         * g10/gpg.c (main): Free KB when we're done with it.
17932
17933         tests: Change (interactive-shell) to start an interactive shell.
17934         + commit db6d8cfdc118131f497596ef1ffc121949377754
17935         * tests/gpgscm/tests.scm (interactive-shell): Start an interactive
17936         shell.
17937
17938         tests: Check the signature count in the TOFU TFS record.
17939         + commit 17c717d7c92d9a52101fea7e396fc133322a8786
17940         * tests/openpgp/tofu.scm: Check the signature count in the TOFU TFS
17941         record.
17942
17943         tests: Replace data used by the TOFU conflict test.
17944         + commit d5b18d6c55d65e8df2dd112651e3b9b3d9e6e27a
17945         * tests/openpgp/tofu-2183839A-1.txt: Remove file.
17946         * tests/openpgp/tofu-BC15C85A-1.txt: Remove file.
17947         * tests/openpgp/tofu-EE37CF96-1.txt: Remove file.
17948         * tests/openpgp/tofu-keys-secret.asc: Remove file.
17949         * tests/openpgp/tofu-keys.asc: Remove file.
17950         * tests/openpgp/tofu/conflicting/1C005AF3.gpg: New file.
17951         * tests/openpgp/tofu/conflicting/1C005AF3-secret.gpg: New file.
17952         * tests/openpgp/tofu/conflicting/1C005AF3-1.txt: New file.
17953         * tests/openpgp/tofu/conflicting/1C005AF3-2.txt: New file.
17954         * tests/openpgp/tofu/conflicting/1C005AF3-3.txt: New file.
17955         * tests/openpgp/tofu/conflicting/1C005AF3-4.txt: New file.
17956         * tests/openpgp/tofu/conflicting/1C005AF3-5.txt: New file.
17957         * tests/openpgp/tofu/conflicting/B662E42F.gpg: New file.
17958         * tests/openpgp/tofu/conflicting/B662E42F-secret.gpg: New file.
17959         * tests/openpgp/tofu/conflicting/B662E42F-1.txt: New file.
17960         * tests/openpgp/tofu/conflicting/B662E42F-2.txt: New file.
17961         * tests/openpgp/tofu/conflicting/B662E42F-3.txt: New file.
17962         * tests/openpgp/tofu/conflicting/B662E42F-4.txt: New file.
17963         * tests/openpgp/tofu/conflicting/B662E42F-5.txt: New file.
17964         * tests/openpgp/tofu/conflicting/BE04EB2B.gpg: New file.
17965         * tests/openpgp/tofu/conflicting/BE04EB2B-secret.gpg: New file.
17966         * tests/openpgp/tofu/conflicting/BE04EB2B-1.txt: New file.
17967         * tests/openpgp/tofu/conflicting/BE04EB2B-2.txt: New file.
17968         * tests/openpgp/tofu/conflicting/BE04EB2B-3.txt: New file.
17969         * tests/openpgp/tofu/conflicting/BE04EB2B-4.txt: New file.
17970         * tests/openpgp/tofu/conflicting/BE04EB2B-5.txt: New file.
17971         * tests/openpgp/tofu/conflicting/README: New file.
17972         * tests/openpgp/tofu.scm: Update accordingly.
17973
17974         g10: Remove dead code.
17975         + commit bd9ebe1404c1395edd0e029023a9e780c90f6d73
17976         * g10/tofu.c (tofu_set_policy_by_keyid): Remove function.
17977
17978 2016-12-05  Werner Koch  <wk@gnupg.org>
17979
17980         gpg: New option --quick-set-expire.
17981         + commit 41b3d0975de65d1654f5e37c626d7c9b7c9a7a4d
17982         * g10/gpg.c (aQuickSetExpire): New.
17983         (opts): New option --quick-set-expire.
17984         (main): Implement option.
17985         * g10/keyedit.c (menu_expire): Add args FORCE_MAINKEY and
17986         NEWEXPIRATION.  Change semantics of the return value.  Change caller.
17987         (keyedit_quick_set_expire): New.
17988
17989 2016-12-05  Justus Winter  <justus@g10code.com>
17990
17991         tests: New test for '--enarmor' and '--dearmor'.
17992         + commit fae4d06b0ccaa9803e0c0da56c327b0bcfffcac5
17993         * tests/openpgp/Makefile.am (XTESTS): Add new test.
17994         * tests/openpgp/enarmor.scm: New file.
17995
17996 2016-12-03  Werner Koch  <wk@gnupg.org>
17997
17998         gpg: Fix error code arg in ERRSIG status line.
17999         + commit ef10c348bffc7dad19e1832bebc453755d209420
18000         * g10/mainproc.c (check_sig_and_print): Use gpg_err_code to return an
18001         error code in ERRSIG.
18002
18003 2016-12-02  Werner Koch  <wk@gnupg.org>
18004
18005         gpg: New option --default-new-key-algo.
18006         + commit ce29272e24e7b718b8fca9b84bc728e65f3dea24
18007         * common/openpgp-oid.c (openpgp_is_curve_supported): Add optional arg
18008         R_ALGO and change all callers.
18009         * common/util.h (GPG_ERR_UNKNOWN_FLAG): New error code.
18010         * g10/options.h (struct opt): Add field DEF_NEW_KEY_ALGO.
18011         * g10/gpg.c (oDefaultNewKeyAlgo): New enum.
18012         (opts): New option "--default-new-key-algo".
18013         (main): Set the option.
18014         * g10/keygen.c: Remove DEFAULT_STD_ FUTURE_STD_ constants and replace
18015         them by ...
18016         (DEFAULT_STD_KEY_PARAM, FUTURE_STD_KEY_PARAM): new string constants.
18017         (get_keysize_range): Remove arg R_DEF and return that value instead.
18018         Change all callers.
18019         (gen_rsa): Use get_keysize_range instead of the removed
18020         DEFAULT_STD_KEYSIZE.
18021         (parse_key_parameter_part): New function.
18022         (parse_key_parameter_string): New function.
18023         (quick_generate_keypair): Refactor using parse_key_parameter_string.
18024         (generate_keypair): Ditto.
18025         (parse_algo_usage_expire): Ditto.
18026
18027 2016-12-02  Neal H. Walfield  <neal@g10code.com>
18028
18029         g10: Improve debugging output.
18030         + commit cd532bb7b866e104304e2443cc942799c385daa5
18031         * g10/tofu.c (string_to_long): Improve debugging output.
18032         (string_to_ulong): Likewise.
18033
18034 2016-12-01  Neal H. Walfield  <neal@g10code.com>
18035
18036         g10: In the TOFU module, make strings easier to translate.
18037         + commit bd1a1d8582abcfd7f29812942fa70f88d0aec7cf
18038         * g10/tofu.c: Remove dead code.
18039         (time_ago_str): Simplify implementation since we only want the most
18040         significant unit.
18041         (format_conflict_msg_part1): Use ngettext.
18042         (ask_about_binding): Likewise and only emit full sentences.
18043         (show_statistics): Likewise.
18044
18045 2016-12-01  Werner Koch  <wk@gnupg.org>
18046
18047         dirmngr: Add option --standard-resolver.
18048         + commit 304566d3327ef0a85188cce3109d46d5ff47177a
18049         * dirmngr/dirmngr.c (oStandardResolver): New constant.
18050         (opts): New option --standard-resolver.
18051         (parse_rereadable_options): Set option.
18052         * dirmngr/dns-stuff.c: Refactor all code to support the new option.
18053         (standard_resolver): New var.
18054         (enable_standard_resolver, standard_resolver_p): New func.
18055         * dirmngr/http.c (connect_server): Remove USE_DNS_SRV build
18056         conditional.
18057         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
18058         * dirmngr/server.c (cmd_getinfo) <dnsinfo>: Take care of new option
18059         * configure.ac (HAVE_ADNS_IF_TORMODE): Remove var ADNSLIB.  ac_define
18060         USE_ADNS in the adns checking code.  Remove options --disable-dns-srv
18061         and --disable-dns-cert.  Always look for the system resolver.  Print
18062         warning if no system resolver was found.
18063         (USE_DNS_CERT, USE_DNS_SRV): Remove ac_defines.
18064         (HAVE_SYSTEM_RESOLVER): New ac_define.
18065         (USE_DNS_SRV): Remove am_conditional; not used anyway.
18066
18067         gpg: Let only Dirmngr decide whether CERT is supported.
18068         + commit 86efc3ee53abaf1e22b53c1b360c51829e476115
18069         * g10/getkey.c (parse_auto_key_locate): Do not build parts depending
18070         on USE_DNS_CERT.
18071
18072 2016-12-01  Justus Winter  <justus@g10code.com>
18073
18074         tests,build: Fix distcheck.
18075         + commit fbdfe6a514a95fb46f2b811a13709024e2baf252
18076         * tests/openpgp/Makefile.am (sample_msgs): Add messages required for
18077         the new test 'verify-multifile.scm'.
18078
18079         tests: Add test for '--verify --multifile'.
18080         + commit 12af8e84a32df728462da09a00a8bec24a487720
18081         * tests/openpgp/Makefile.am (XTESTS): Add new test.
18082         * tests/openpgp/verify-multifile.scm: New file.
18083
18084 2016-11-30  Justus Winter  <justus@g10code.com>
18085
18086         tests: Add test for '--encrypt --multifile'.
18087         + commit 3c0569e99498c7470ebdb639b4c5ae829af92761
18088         * tests/openpgp/Makefile.am (XTESTS): Add new test.
18089         * tests/openpgp/encrypt-multifile.scm: New file.
18090
18091 2016-11-29  Werner Koch  <wk@gnupg.org>
18092
18093         agent,dirmngr: Tiny restructuring.
18094         + commit aa6ab9e0bc67fe9ce5601047e84ea4a875e8eb64
18095         * agent/gpg-agent.c (handle_connections): Add a comment.
18096         * dirmngr/dirmngr.c (main): Move assuan_sock_close of the listening
18097         socket to ...
18098         (handle_connections): here.  Add a comment why we keep the
18099         listening socket open during a shutdown.
18100
18101         agent,dirmngr: Handle corner case in shutdown mode.
18102         + commit 854adc8ae19749e44cb79dfa0c5401f48012b13a
18103         * agent/gpg-agent.c (handle_connections): Keep on selecting on the
18104         inotify fd even when a shutdown is pending.
18105         * dirmngr/dirmngr.c (handle_connections): Ditto.  Also simplifyy the
18106         use of the HAVE_INOTIFY_INIT cpp conditional.
18107
18108         gpgsm: Allow decryption with a card returning a PKCS#1 stripped key.
18109         + commit 8489b12211098ad58c008cfb74b5cb91849cf68d
18110         * sm/decrypt.c (prepare_decryption): Handle a 16 byte session key.
18111
18112         agent,w32: Initialize nPth in server mode.
18113         + commit 81d6e98cdf4caa3aa92398fc3b8bed397b40f58d
18114         * agent/gpg-agent.c (main) [W32]: Call initialize_modules in server
18115         mode.
18116
18117         gpg: Make --decrypt with output '-&nnnn' work.
18118         + commit a5910e00ace882b8a17169faf4607163ab454af9
18119         * g10/plaintext.c (get_output_file): Check and open special filename
18120         before falling back to stdout.
18121
18122         gpg,sm: Merge the two versions of check_special_filename.
18123         + commit 60b4982836a00ef6b2a97d16f735b3f6b74dce62
18124         * sm/gpgsm.c (check_special_filename): Move to ..
18125         * common/sysutils.c (check_special_filename): here.  Add arg
18126         NOTRANSLATE.
18127         (allow_special_filenames): New local var.
18128         (enable_special_filenames): New public functions.
18129         * sm/gpgsm.c (allow_special_filenames): Remove var.
18130         (main): Call enable_special_filenames instead of setting the var.
18131         (open_read, open_es_fread, open_es_fwrite): Call
18132         check_special_filename with 0 for NOTRANSLATE.
18133         * common/iobuf.c (special_names_enabled): Remove var.
18134         (iobuf_enable_special_filenames): Remove func.
18135         (check_special_filename): Remove func.
18136         (iobuf_is_pipe_filename): Call new version of the function with
18137         NOTRANSLATE set.
18138         (do_open): Ditto.
18139         * g10/gpg.c (main): Call enable_special_filenames instead of
18140         iobuf_enable_special_filenames.
18141         * g10/gpgv.c (main): Ditto.
18142
18143 2016-11-29  Justus Winter  <justus@g10code.com>
18144
18145         g10: Fix memory leak.
18146         + commit 52385a2ba1bf7e53f500ffde5fd34f28e69cf76b
18147         * g10/decrypt.c (decrypt_messages): Properly decrease the reference
18148         count of the armor filters after pushing them.
18149
18150         tools,build: Build WKS tools against libintl.
18151         + commit 9fb5e9c14557f7567cbc7c50b9881b7d7bfa2f12
18152         * tools/Makefile.am (gpg_wks_server_LDADD): Link against libintl.
18153         (gpg_wks_client_LDADD): Likewise.
18154
18155 2016-11-29  Neal H. Walfield  <neal@g10code.com>
18156
18157         Improve some comments.
18158         + commit 522f74f7e377135cf098b6b0b9b35284c1dfc963
18159
18160
18161         g10: Extend TOFU_STATS to always show the validity.
18162         + commit 2f27cb12e30c9f6e780354eecc3ff0039ed52c63
18163         * doc/DETAILS (TOFU_STATS): Rename the VALIDITY field to SUMMARY.  Add
18164         a new field called VALIDITY.
18165         * g10/tofu.c (write_stats_status): Update output accordingly.
18166
18167 2016-11-29  Justus Winter  <justus@g10code.com>
18168
18169         tests: Add test for '--decrypt --multifile'.
18170         + commit bde4fddadc75ad6071e3fc6c0980905de14c03cb
18171         * tests/openpgp/Makefile.am (XTESTS): Add new test.
18172         * tests/openpgp/decrypt-multifile.scm: New file.
18173
18174         gpgscm: Avoid truncating pointers.
18175         + commit e062bc4da8062b822ee85096d9adfcbca8dcb56a
18176         * tests/gpgscm/scheme.c (_alloc_cellseg): Avoid truncating pointers on
18177         systems where sizeof(unsigned long) < sizeof(void *).
18178
18179 2016-11-29  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18180
18181         dirmngr: Lazily launch ldap reaper thread.
18182         + commit f6728d13e8e544dbd4b9351ed981613e5504293f
18183         * dirmngr/dirmngr.c (main): Avoid calling ldap_wrapper_launch_thread()
18184         Before we need it.
18185         * dirmngr/ldap-wrapper.c (ldap_wrapper): Call
18186         ldap_wrapper_launch_thread() just in time (before any attempt to use
18187         an ldap subprocess).
18188
18189 2016-11-29  Werner Koch  <wk@gnupg.org>
18190
18191         build: Remove more keywords from the generated ChangeLog.
18192         + commit ecc126a7cef371e3b88e65715ba37fb77e92ea0f
18193         * build-aux/gitlog-to-changelog (parse_amend_file): Generalize keyword
18194         removal.
18195
18196 2016-11-28  Justus Winter  <justus@g10code.com>
18197
18198         tests: Add test for the ssh key export.
18199         + commit 47b8b9e2ce5af7fba117ae0b00e10bec414dcfb0
18200         * tests/openpgp/Makefile.am (XTESTS): Add new test.
18201         (sample_keys): Add new files.
18202         * tests/openpgp/samplekeys/authenticate-only.pub.asc: New file.
18203         * tests/openpgp/samplekeys/authenticate-only.sec.asc: Likewise.
18204         * tests/openpgp/ssh-export.scm: Likewise.
18205
18206         g10: Fix iteration over getkey results.
18207         + commit 4db9a425644dccaf81b51ebc97b32a9cc21941a4
18208         * g10/getkey.c (getkey_next): Only ask 'lookup' for the exact match if
18209         our caller requested the key.  Fixes a crash in 'lookup'.
18210
18211         tests: Rename ssh test.
18212         + commit cc1d21342659a7def5d662d0547579f9e0d3b109
18213         * tests/openpgp/ssh.scm: Rename to 'ssh-import.scm'.
18214         * tests/openpgp/Makefile (XTESTS): Likewise.
18215
18216 2016-11-25  NIIBE Yutaka  <gniibe@fsij.org>
18217
18218         scd: Support OpenPGP card V3 for RSA.
18219         + commit b89e63e5c326af71470124b410e6429cbd2b5c43
18220         * scd/app-openpgp.c (struct app_local_s): Remove max_cmd_data and
18221         max_rsp_data fields as Extended Capabilities bits are different.
18222         (get_cached_data) Use extcap.max_certlen_3.
18223         (get_one_do): Don't use exmode=1.
18224         (determine_rsa_response): New.
18225         (get_public_key, do_genkey): Call determine_rsa_response.
18226         (do_sign): Use keyattr[0].rsa.n_bits / 8, instead of max_rsp_data.
18227         (do_auth): Use keyattr[2].rsa.n_bits / 8, instead of max_rsp_data.
18228         (do_decipher): Likewise with Use keyattr[1].rsa.n_bits / 8.
18229         (show_caps): Remove max_cmd_data and max_rsp_data.
18230         (app_select_openpgp): Likewise.
18231
18232 2016-11-23  Justus Winter  <justus@g10code.com>
18233
18234         gpgscm: Make 'reverse' compatible with 'reverse_in_place'.
18235         + commit 005d326d19ba28005182205f25edc4f7499ec0b5
18236         * tests/gpgscm/scheme.c (reverse): Update prototype, add terminator
18237         argument.
18238         (opexe_4): Update callsite.
18239
18240         gpgscm: Clean sweeped cells.
18241         + commit 3fb9954c43425775a517060959dad01fa00238f7
18242         * tests/gpgscm/scheme.c (gc): Zero typeflag and car of free cells.
18243
18244         gpgscm: Fix initialization of 'sink'.
18245         + commit 7856e3efaad7614979bc0b91379a0a4dcbc739d5
18246         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Also initialize
18247         cdr.
18248
18249 2016-11-23  Neal H. Walfield  <neal@g10code.com>
18250
18251         g10: Avoid gratuitously loading a keyblock when it is already available.
18252         + commit 03a65a53231cc3132a50a1871e81a512c44da169
18253         * g10/trust.c (get_validity): Add new, optional parameter KB.  Only
18254         load the keyblock if KB is NULL.  Update callers.
18255         (get_validity): Likewise.
18256         * g10/trustdb.c (tdb_get_validity_core): Likewise.
18257
18258 2016-11-22  Neal H. Walfield  <neal@g10code.com>
18259
18260         g10: Use es_fopen instead of open.
18261         + commit bfeafe2d3f9bbaa7f11f3ad870a446141c038b0d
18262         * g10/tofu.c: Don't include <utime.h>, <fcntl.h> or <unistd.h>.
18263         (busy_handler): Replace use of open with es_fopen.
18264
18265         g10: If the set of UTKs changes, invalidate any changed policies.
18266         + commit 44c17bcb003a3330f595a6ab144e8439b7b630cb
18267         * g10/trustdb.c (tdb_utks): New function.
18268         * g10/tofu.c (check_utks): New function.
18269         (initdb): Call it.
18270         * tests/openpgp/tofu.scm: Modify test to check the effective policy of
18271         keys whose effective policy changes when we change the set of UTKs.
18272
18273 2016-11-22  NIIBE Yutaka  <gniibe@fsij.org>
18274
18275         scd: Fix receive buffer size.
18276         + commit 5c2db9dedfe9dbb14ffec24751ca23a69cead94e
18277         * scd/apdu.c (send_le): Fix the size, adding two for status
18278         bytes to Le.
18279
18280 2016-11-22  Justus Winter  <justus@g10code.com>
18281
18282         gpgscm: Refactor.
18283         + commit a3b258d1d15953816e0567511ecc527a4ccdd626
18284         * tests/gpgscm/scheme.c (opexe_0): Reduce code duplication.
18285
18286         gpgscm: Fix property lists.
18287         + commit d8df80427238cdbb9ae0f6dae8bc7e9c24f6e265
18288         * tests/gpgscm/opdefines.h (put, get): Check arguments.  Also rename
18289         to 'set-symbol-property' and 'symbol-property', the names used by
18290         Guile, because put and get are too unspecific.
18291         * tests/gpgscm/scheme.c (hasprop): Only symbols have property lists.
18292         (get_property): New function.
18293         (set_property): Likewise.
18294         (opexe_4): Use the new functions.
18295
18296         gpgscm: Fix installation of error handler.
18297         + commit 7b4e2ea274ace22245264f1759279390d0300a62
18298         * tests/gpgscm/ffi.scm: Set '*error-hook*' again so that the
18299         interpreter will use our function.
18300
18301         gpgscm: Use a static pool of cells for small integers.
18302         + commit 66834eb838a8892d088f6b7332084a64d9f15008
18303         * tests/gpgscm/scheme-private.h (struct scheme): New fields for the
18304         static integer cells.
18305         * tests/gpgscm/scheme.c (_alloc_cellseg): New function.
18306         (alloc_cellseg): Use the new function.
18307         (MAX_SMALL_INTEGER): New macro.
18308         (initialize_small_integers): New function.
18309         (mk_small_integer): Likewise.
18310         (mk_integer): Return a small integer if possible.
18311         (_s_return): Do not free 'op' if it is a small integer.
18312         (s_save): Use a small integer to box the opcode.
18313         (scheme_init_custom_alloc): Initialize small integers.
18314         (scheme_deinit): Free chunk of small integers.
18315         * tests/gpgscm/scheme.h (USE_SMALL_INTEGERS): New macro.
18316
18317         tests: Delay querying the avaliable algorithms.
18318         + commit 893a3f7fb46021961914a8acdf1292a80e3eba93
18319         * tests/openpgp/defs.scm: Set verbosity earlier, turn 'all-*-algos'
18320         into promises.
18321         * tests/openpgp/conventional-mdc.scm: Force the promises.
18322         * tests/openpgp/conventional.scm: Likewise.
18323         * tests/openpgp/encrypt-dsa.scm: Likewise.
18324         * tests/openpgp/encrypt.scm: Likewise.
18325         * tests/openpgp/gpgtar.scm: Likewise.
18326         * tests/openpgp/sigs.scm: Likewise.
18327
18328         g10: Fix memory leak.
18329         + commit 6ce14a805f1da687dfb8535db57730d5c7403db7
18330         * g10/tofu.c (tofu_notice_key_changed): Remove spurious duplicate call
18331         to 'hexfingerprint'.
18332
18333 2016-11-21  Neal H. Walfield  <neal@g10code.com>
18334
18335         g10: Cache the effective policy.  Recompute it when required.
18336         + commit 037f9de09298a31026ea2ab5fbd4a599b11cc34f
18337         * g10/tofu.c (initdb): Add column effective_policy to the bindings
18338         table.
18339         (record_binding): New parameters effective_policy and set_conflict.
18340         Save the effective policy.  If SET_CONFLICT is set, then set conflict
18341         according to CONFLICT.  Otherwise, preserve the current value of
18342         conflict.  Update callers.
18343         (get_trust): Don't compute the effective policy here...
18344         (get_policy): ... do it here, if it was not cached.  Take new
18345         parameters, PK, the public key, and NOW, the time that the operation
18346         started.  Update callers.
18347         (show_statistics): New parameter PK.  Pass it to get_policy.  Update
18348         callers.
18349         (tofu_notice_key_changed): New function.
18350         * g10/gpgv.c (tofu_notice_key_changed): New stub.
18351         * g10/import.c (import_revoke_cert): Take additional argument CTRL.
18352         Pass it to keydb_update_keyblock.
18353         * g10/keydb.c (keydb_update_keyblock): Take additional argument CTRL.
18354         Update callers.
18355         [USE_TOFU]: Call tofu_notice_key_changed.
18356         * g10/test-stubs.c (tofu_notice_key_changed): New stub.
18357         * tests/openpgp/tofu.scm: Assume that manually setting a binding's
18358         policy to auto does not cause the tofu engine to forget about any
18359         conflict.
18360
18361         g10: Correctly parameterize ngettext.
18362         + commit 182efc5b5d20ac0d43501a22f349a23dc06a27a4
18363         * g10/tofu.c (ask_about_binding): Correctly parameterize ngettext.
18364
18365         g10: Don't use the same variable for multiple SQL compiled statements.
18366         + commit 7142b293c870d73ce0146bfb90e6a556e0079650
18367         * g10/tofu.c (struct tofu_dbs_s): Remove unused field
18368         record_binding_update2.  Replace register_insert with
18369         register_signature and register_encryption.
18370         (tofu_register_signature): Don't use dbs->s.register_insert, but
18371         dbs->s.register_signature.
18372         (tofu_register_encryption): Don't use dbs->s.register_insert, but
18373         dbs->s.register_encryption.
18374
18375         g10: Add a convenience function for checking if a key is a primary key.
18376         + commit 91a0483c5db8ee4510981448a705981ee1cce199
18377         * g10/keydb.h (pk_is_primary): New function.
18378         * g10/tofu.c (get_trust): Use it.
18379         (tofu_register_signature): Likewise.
18380         (tofu_register_encryption): Likewise.
18381         (tofu_set_policy): Likewise.
18382         (tofu_get_policy): Likewise.
18383
18384 2016-11-21  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18385
18386         doc: Ship example gpg-agent-browser.socket in examples/systemd-user/.
18387         + commit 0540cfbee455b197edd89b602a4b47ebf0be8588
18388         * doc/Makefile.am: Ship gpg-agent-browser.socket alongside the other
18389         systemd user service example files.
18390
18391 2016-11-21  NIIBE Yutaka  <gniibe@fsij.org>
18392
18393         agent: Fix npth + daemon mode problem.
18394         + commit 9a707a223a3d45ccf245dee7989ca144e4e6bb49
18395         * agent/gpg-agent.c (main): Remove duplicated initialization in daemon
18396         mode.
18397
18398 2016-11-18  Werner Koch  <wk@gnupg.org>
18399
18400         Release 2.1.16.
18401         + commit 0a641ad25d8c3b91dc32bb9f3f1ae49ae539a4f7
18402
18403
18404 2016-11-18  Ineiev  <ineiev@gnu.org>
18405
18406         po: Update Russian translation.
18407         + commit 11aaa9c6d4ed3e47de45b4aee925ab1065120988
18408
18409
18410 2016-11-18  NIIBE Yutaka  <gniibe@fsij.org>
18411
18412         g10: Fix flags to open for lock of ToFU.
18413         + commit 1c0b140cccfb884c6d07785c3284b9df06dccd3c
18414         * g10/tofu.c (busy_handler): Fix the flags and utime is not needed.
18415
18416 2016-11-18  Werner Koch  <wk@gnupg.org>
18417
18418         dirmngr: Use a longer timer tick interval.
18419         + commit 833eef974ad4721b9b3e247bae9c890476a936ce
18420         * dirmngr/dirmngr.c (TIMERTICK_INTERVAL): Always use 60 seconds like
18421         we did for WindowsCE.
18422
18423 2016-11-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18424
18425         dirmngr: More w32 system daemon cleanup.
18426         + commit b3a917201207898059c048dd101344765201b03c
18427         * dirmngr/dirmngr.c (handle_tick): Remove w32 tests for
18428         shutdown_pending; no longer needed.
18429
18430 2016-11-18  NIIBE Yutaka  <gniibe@fsij.org>
18431
18432         g10: Fix creating a lock for ToFU.
18433         + commit b2e1b17efa952afcf7aeec8b15e9d0088dba587a
18434         * g10/tofu.c (busy_handler): Add third argument which is mandatory for
18435         O_CREATE flag.
18436
18437         scd: Don't limit to ST-2xxx for PC/SC.
18438         + commit b6066ab18a67195817babaf9eccf896c2b3c7b0e
18439         * scd/apdu.c (pcsc_vendor_specific_init): Only check vender ID.
18440
18441 2016-11-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18442
18443         dirmngr: Use a default keyserver if none is explicitly set.
18444         + commit 8fb482252436b3b4b0b33663d95d1d17188ad1d9
18445         * configure.ac: Define DIRMNGR_DEFAULT_KEYSERVER.
18446         * dirmngr/server.c (ensure_keyserver): Use it if no keyservers are set.
18447         * doc/dirmngr.texi: Document this behavior.
18448
18449         dirmngr: Add system CAs if no hkp-cacert is given.
18450         + commit 7c1613d41566f7d8db116790087de323621205fe
18451         * dirmngr/dirmngr.c (http_session_new): If the user isn't talking to
18452         the HKPS pool, and they have not specified any hkp-cacert, then we
18453         should default to the system CAs, rather than nothing.
18454         * doc/dirmngr.texi: Document choice of CAs.
18455
18456         dirmngr: Register hkp-cacert even if the file doesn't exist yet.
18457         + commit c4e02a3b7ad6ee1da6bfc439921378bdbd5c029c
18458         * dirmngr/dirmngr.c (parse_readable_options): If we're unable to turn
18459         an argument for hkp-cacert into an absolute filename, terminate
18460         completely.
18461         * dirmngr/http.c (http_register_tls_ca): Show a warning if file is not
18462         immediately accessible, but register it anyway.
18463
18464 2016-11-17  Justus Winter  <justus@g10code.com>
18465
18466         gpgscm: Re-enable the garbage collector in case of errors.
18467         + commit 4f189325a409bb08f7a8eabfac3f4579288cf5c5
18468         * tests/gpgscm/scheme.c (opexe_0): Enable gc before calling 'Error_1'.
18469
18470         gpgscm: Fix string.
18471         + commit fc53a4d06eaf891143ab4efec9caffe31ebc2bc0
18472         * tests/gpgscm/scheme.c (type_to_string): Fix string.
18473
18474 2016-11-17  Werner Koch  <wk@gnupg.org>
18475
18476         dirmngr: Auto-sownload the swdb.lst.
18477         + commit bd91f92ace09263e3a91177f2a1644379baeb08a
18478         * dirmngr/dirmngr.h (struct opt): Add field allow_version_check.
18479         * dirmngr/dirmngr.c (oAllowVersionCheck): New.
18480         (opts): Add --allow-version-check.
18481         (network_activity_seen): New variable.
18482         (parse_rereadable_options): Set opt.allow_version_check.
18483         (main) <aGPGConfList>: Do not anymore set the no change flag for
18484         Windows.  Add allow-version-check.
18485         (netactivity_action): Set network_activity_seen.
18486         (housekeeping_thread): Call dirmngr_load_swdb.
18487         * tools/gpgconf-comp.c (gc_options_dirmngr): Add allow-version-check.
18488         Make "use-tor" available at Basic level.
18489
18490         dirmngr: Improve downloading of swdb.lst.
18491         + commit c45ca316a54665915ae08399484db271566db7c0
18492         * dirmngr/loadswdb.c (time_of_saved_swdb): Aslo return the "verified"
18493         timestamp.
18494         (dirmngr_load_swdb): Avoid unnecessary disk or network access witout
18495         FORCE.  Do not update swdb.lst if it did not change.
18496
18497         gpgconf: Change the displayed names of the components.
18498         + commit d8da5bc50b856db3445435780311c9f8e52a5144
18499
18500
18501 2016-11-16  Werner Koch  <wk@gnupg.org>
18502
18503         dirmngr: Add command to only load the swdb.
18504         + commit 52c10a280af6ce06eb1732ff35b095f2b8d24b9f
18505         * dirmngr/loadswdb.c: New.
18506         * dirmngr/Makefile.am (dirmngr_SOURCES): Add that file.
18507         * dirmngr/server.c: Remove includes cpparray.h and exectool.h.
18508         (cmd_loadswdb): New.
18509         (parse_version_number,parse_version_string): Remove.
18510         (my_mktmpdir, cmp_version): Remove.
18511         (fetch_into_tmpdir): Remove.
18512         (struct verify_swdb_parm_s): Remove.
18513         (verify_swdb_status_cb): Remove.
18514         (cmd_versioncheck): Remove.
18515         (register_commands): Register LOADSWDB.  Remove VERSIONCHECK.
18516
18517         scd,dirmngr: Keep the standard fds when daemonizing.
18518         + commit 4839e6d002a8ad1f7d3260792c3c9641e258f342
18519         * dirmngr/dirmngr.c (main): Before calling setsid do not close the
18520         standard fds but connect them to /dev/null.
18521         * scd/scdaemon.c (main): Ditto.  Noet that the old test for a log
18522         stream was even reverted.
18523
18524         common: Rename keybox_file_rename to gnupg_rename_file.
18525         + commit c4506a3f15bba5d257cb4c6738800c5e00ecc9a2
18526         * kbx/keybox-util.c (keybox_file_rename): Rename to ...
18527         * common/sysutils.c (gnupg_rename_file): this.  Change all callers.
18528
18529         wks: Always build gpg-wks-client.
18530         + commit c564790df723beef031d83802bd7830737bd330a
18531         * tools/Makefile.am (gpg_wks_client): Remove macro.
18532         (libexec_PROGRAMS): Add gpg-wks-client.
18533
18534         gpg: New option --override-session-key-fd.
18535         + commit 43bfaf2c5417ede621c0a07721952ea549a7a139
18536         * g10/gpg.c (oOverrideSessionKeyFD): New.
18537         (opts): Add option --override-session-key-fd.
18538         (main): Handle that option.
18539         (read_sessionkey_from_fd): New.
18540
18541 2016-11-15  Werner Koch  <wk@gnupg.org>
18542
18543         gpgv: New option --enable-special-filenames.
18544         + commit 500e594c2da530e69a63fc1a40d173458682fa0e
18545         * g10/gpgv.c (oEnableSpecialFilenames): New.
18546         (opts): Add option --enable-special-filenames.
18547         (main): Implement that option.
18548
18549         gpg: Add new compliance mode "de-vs".
18550         + commit b47603a0ac24902c5bb000f8ef27cfb99aceeb81
18551         * g10/options.h (CO_DE_VS): New.
18552         (GNUPG): Also allow CO_DE_VS.
18553         * g10/gpg.c (oDE_VS): New.
18554         (parse_compliance_option): Add "de-vs".
18555         (set_compliance_option): Set "de-vs".
18556         * g10/misc.c (compliance_option_string): Return a description string.
18557         (compliance_failure): Ditto.
18558         * g10/keygen.c (ask_algo): Take care of CO_DE_VS.
18559         (get_keysize_range): Ditto.
18560         (ask_curve): Add new field to CURVES and trun flags into bit flags.
18561         Allow only Brainpool curves in CO_DE_VS mode.
18562
18563         gpg: Use usual free semantics for packet structure free functions.
18564         + commit 8ea3b4c4102dc67ed83d4419b7171e422fc01047
18565         * g10/free-packet.c (free_attributes): Turn function into a nop for a
18566         NULL arg.
18567         (free_user_id): Ditto.
18568         (free_compressed): Ditto.
18569         (free_encrypted): Ditto.
18570         (free_plaintext): Ditto.
18571         (release_public_key_parts): Avoid extra check for NULL.
18572         * g10/getkey.c (get_best_pubkey_byname): Ditto.
18573
18574 2016-11-15  Justus Winter  <justus@g10code.com>
18575
18576         g10: Optimize key iteration.
18577         + commit 12834e84aca9d74800245f0f2f2e6b5123e76173
18578         * g10/getkey.c (get_best_pubkey_byname): Use the node returned by
18579         'getkey_next' instead of doing another lookup.
18580
18581         g10: Fix memory leak.
18582         + commit d20107f6da094edd782947abb357abae5129a12c
18583         * g10/getkey.c (finish_lookup): Clarify that we do not return a
18584         reference.
18585         (lookup): Clarify the relation between RET_KEYBLOCK and RET_FOUND_KEY.
18586         Check arguments.  Actually release the node if it is not returned.
18587
18588         g10: Fix iteration over getkey results.
18589         + commit 1d03cc77e1706f7da653153ad4b58c61e4fd2573
18590         * g10/getkey.c (getkey_next): Fix invocation of 'lookup'.  If we want
18591         to use RET_FOUND_KEY, RET_KEYBLOCK must be valid.
18592
18593         g10: Fix use-after-free.
18594         + commit bd60742925414e0ef2a497df827c1913ea211a44
18595         * g10/getkey.c (pubkey_cmp): Make a copy of the user id.
18596         (get_best_pubkey_byname): Free the user ids.
18597
18598 2016-11-15  Werner Koch  <wk@gnupg.org>
18599
18600         sm: New stub option --compliance.
18601         + commit 26c7c1d72c5f2acb3edb58d610c09a635c87bdbf
18602         * sm/gpgsm.c (oCompliance): New.
18603         (opts): Add "--compliance".
18604         (main): Implement as stub.
18605
18606 2016-11-15  NIIBE Yutaka  <gniibe@fsij.org>
18607
18608         g10: Fix memory leak.
18609         + commit 1f7639ebbe58af1b581b0be7809da9ee55482992
18610         * g10/keyedit.c (menu_adduid): Don't copy 'sig'.
18611
18612 2016-11-15  Werner Koch  <wk@gnupg.org>
18613
18614         gpg: New option --compliance.
18615         + commit f86b1a15ad4bb7bcc1e9f7d209aabcb23641f7df
18616         * g10/gpg.c (oCompliance): New.
18617         (opts): Add "--compliance".
18618         (parse_tofu_policy): Use a generic description string for "help".
18619         (parse_compliance_option): New.
18620         (main): Add option oCompliance.  Factor out code for compliance
18621         setting to ...
18622         (set_compliance_option): new.
18623
18624 2016-11-15  Justus Winter  <justus@g10code.com>
18625
18626         g10: Fix memory leak.
18627         + commit 809d67e74014cb563efd965744fd11f87bbae743
18628         * g10/keyedit.c (menu_adduid): Deallocate 'sig'.
18629
18630         gpgscm: Mark cells requiring finalization.
18631         + commit 64a58e23c38db8658423bbe26fcd650330e24a88
18632         * tests/gpgscm/scheme.c (T_FINALIZE): New macro.
18633         (mk_port): Use the new macro.
18634         (mk_foreign_object): Likewise.
18635         (mk_counted_string): Likewise.
18636         (mk_empty_string): Likewise.
18637         (gc): Only call 'finalize_cell' for cells with the new flag.
18638
18639         gpgscm: Recover more cells.
18640         + commit 93cc322ac06d3045a24aece90091f7f80f3dacb8
18641         * tests/gpgscm/scheme.c (_s_return): Recover the cell holding the
18642         opcode.
18643
18644 2016-11-14  Justus Winter  <justus@g10code.com>
18645
18646         g10: Fix memory leak.
18647         + commit 2cd281c4def1ea881b92b9aba18c1892f89c1870
18648         * g10/mainproc.c (check_sig_and_print): Free 'pk'.
18649
18650         gpgscm: Avoid cell allocation overhead.
18651         + commit 83c184a66b73f312425b01008f0495610e5329a4
18652         * tests/gpgscm/scheme-private.h (struct scheme): New fields
18653         'inhibit_gc', 'reserved_cells', and 'reserved_lineno'.
18654         * tests/gpgscm/scheme.c (GC_ENABLED): New macro.
18655         (USE_GC_LOCKING): Likewise.
18656         (gc_reservations): Likewise.
18657         (gc_reservation_failure): New function.
18658         (_gc_disable): Likewise.
18659         (gc_disable): New macro.
18660         (gc_enable): Likewise.
18661         (gc_enabled): Likewise.
18662         (gc_consume): Likewise.
18663         (get_cell_x): Consume reserved cell if garbage collection is disabled.
18664         (_get_cell): Assert that gc is enabled.
18665         (get_cell): Only record cell in the list of recently allocated cells
18666         if gc is enabled.
18667         (get_vector_object): Likewise.
18668         (gc): Assert that gc is enabled.
18669         (s_return): Add comment, adjust call to '_s_return'.
18670         (s_return_enable_gc): New macro.
18671         (_s_return): Add flag 'enable_gc' and re-enable gc if set.
18672         (oblist_add_by_name): Use the new facilities to protect the
18673         allocations.
18674         (new_frame_in_env): Likewise.
18675         (new_slot_spec_in_env): Likewise.
18676         (s_save): Likewise.
18677         (opexe_0): Likewise.
18678         (opexe_1): Likewise.
18679         (opexe_2): Likewise.
18680         (opexe_5): Likewise.
18681         (opexe_6): Likewise.
18682         (scheme_init_custom_alloc): Initialize the new fields.
18683
18684 2016-11-14  NIIBE Yutaka  <gniibe@fsij.org>
18685
18686         scd: Fix status info encoding.
18687         + commit 4ee4d0b02172cf56d9582bb99e32a65c75315b25
18688         * scd/command.c (send_status_info): Do percent plus encoding correctly.
18689
18690 2016-11-12  Werner Koch  <wk@gnupg.org>
18691
18692         agent: Improve concurrency when Libgcrypt 1.8 is used.
18693         + commit 6bf698197222bf6081c249c815aebb075e8ec820
18694         * agent/gpg-agent.c (thread_init_once): Tell Libgcrypt to reinit the
18695         system call clamp.
18696         (agent_libgcrypt_progress_cb): Do not sleep if Libgcrypt is recent
18697         enough.
18698
18699 2016-11-11  Werner Koch  <wk@gnupg.org>
18700
18701         agent: Kludge to mitigate blocking calls in Libgcrypt.
18702         + commit 4473db1ef24031ff4e26c9a9de95dbe898ed2b97
18703         * agent/gpg-agent.c (agent_libgcrypt_progress_cb): Sleep for 100ms on
18704         "need_entropy".
18705
18706         dirmngr: Prepare to trigger jobs by network activity.
18707         + commit 7b04a43c05834b937b32a596f1941e9728add5fa
18708         * dirmngr/http.c (netactivity_cb): New.
18709         (http_register_netactivity_cb): New.
18710         (notify_netactivity): New.
18711         (connect_server): Call that function.
18712         * dirmngr/dirmngr.c (main): Call http_register_netactivity_cb.
18713         (netactivity_action): New stub handler.
18714
18715 2016-11-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18716
18717         agent: Clean up comments.
18718         + commit e51912f467fda963c7abcfcd4082d6eb084ba5be
18719         * agent/agent.h: Clean up comments.
18720
18721 2016-11-10  Werner Koch  <wk@gnupg.org>
18722
18723         gpg,sm: Add STATUS_ERROR keydb_search and keydb_add-resource.
18724         + commit 5d13581f4737c18430f6572dd4ef486d1ad80dd1
18725         * g10/keydb.c (keydb_add_resource): Make ANY_REGISTERED
18726         file-global.  Write a STATUS_ERROR.
18727         (maybe_create_keyring_or_box): Check for non-accessible but existant
18728         file.
18729         (keydb_search): Write a STATUS_ERROR if no keyring has been registered
18730         but continue to return NOT_FOUND.
18731         * sm/keydb.c (keydb_add_resource): Rename ANY_PUBLIC to ANY_REGISTERED
18732         and make file-global.  Write a STATUS_ERROR.
18733         (keydb_search): Write a STATUS_ERROR if no keyring has been registered
18734         but continue to return NOT_FOUND.  Also add new arg CTRL and change
18735         all callers to pass it down.
18736
18737         sm: Remove unused arg SECRET from keydb functions.
18738         + commit c8044c6e335f044d7386b9e8869bc4a0d3adff70
18739         * sm/keydb.c (struct resource_item): Remove field 'secret'.
18740         (keydb_add_resource): Remove arg 'secret' and change all callers.
18741         (keydb_new): Ditto.
18742
18743 2016-11-10  Justus Winter  <justus@g10code.com>
18744
18745         gpgscm: Recover cells from the list of recently allocated cells.
18746         + commit ee08677d63a900cea85228024861a4f5c5a87c69
18747         * tests/gpgscm/scheme.c (ok_to_freely_gc): Recover cells.
18748
18749         gpgscm: Recover cells used to maintain interpreter state.
18750         + commit e0cbd3389e2dd6ec19ee3a4c7bad81fa0f1907f5
18751         * tests/gpgscm/scheme.c (free_cell): New function.
18752         (free_cons): Likewise.
18753         (_s_return): Use the new function to recover cells used to save the
18754         state of the interpreter in 's_save'.  This reduces the need to do a
18755         garbage collection considerably.
18756
18757         gpgscm: Reduce opcode dispatch overhead.
18758         + commit d3a98ff5bc972a4c9b01b9e5338a4a59b5b4ac48
18759         * tests/gpgscm/scheme.c (s_thread_to): New macro.
18760         (CASE): Likewise.
18761         (opexe_[0-6]): Use 'CASE' instead of 'case' statements, replace
18762         's_goto' with 's_thread_to' where applicable.
18763
18764         gpgscm: Make the compile-hook configurable.
18765         + commit 568cfcde45a0d6c456d8f8be1ea0e408416badad
18766         * tests/gpgscm/scheme-private.h (struct scheme): Make field
18767         'COMPILE_HOOK' optional.
18768         * tests/gpgscm/scheme.c (opexe_0): Fix guard.
18769         (scheme_init_custom_alloc): Conditionally initialize 'COMPILE_HOOK'.
18770         * tests/gpgscm/scheme.h (USE_COMPILE_HOOK): Define to 1 by default.
18771
18772         gpgscm: Drop obsolete commented-out code.
18773         + commit 9ee184bc0afaea06785d836ed175b851b9ae532f
18774         * tests/gpgscm/scheme.c (opexe_5): Drop obsolete code.
18775
18776         gpgscm: Remove dubious stack implementation.
18777         + commit d7c5799c282a03dcce0e3d327075233353cb76cc
18778         * tests/gpgscm/scheme-private.h (struct scheme): Remove related fields.
18779         * tests/gpgscm/scheme.c: Drop all !USE_SCHEME_STACK code.
18780         * tests/gpgscm/scheme.h (USE_SCHEME_STACK): Remove macro.
18781
18782 2016-11-10  Werner Koch  <wk@gnupg.org>
18783
18784         gpg: Improve error message for --quick-gen-key.
18785         + commit 088d955bd8a6ec8bbf76c8a4c01eb08499d1d9fa
18786         * g10/keygen.c (parse_algo_usage_expire): Use a different error
18787         message for an unknown algorithm name.
18788
18789         dirmngr: Improve concurrency in the non-adns case.
18790         + commit c7ea98cd3d44abf00e32c081e5049ad1d0b1f12c
18791         * dirmngr/dns-stuff.c (map_adns_status_to_gpg_error): New.
18792         (resolve_name_adns, get_dns_cert, get_dns_cname): Use that function.
18793         (getsrv) [!USE_ADNS]: Call res_query outside of nPth.
18794
18795 2016-11-08  Justus Winter  <justus@g10code.com>
18796
18797         tests: Fix environment setup.
18798         + commit 1062953d5132af674aacfc6372e3e9f066c5d145
18799         * tests/openpgp/defs.scm (setup-legacy-environment): Do not call
18800         'setup-environment' because that will start the agent, and hence
18801         register the atexit function twice.
18802
18803         Fixes: a55393cb5f4b331cb3a715c7d9a8b91f7606f337
18804
18805         tests: Log and display output from tests when run in parallel.
18806         + commit 2a7615c48ed79e6b28710cc293ce30c812b2e5b0
18807         * tests/openpgp/run-tests.scm (test): Add field 'logfd'.
18808         (test::new, test::set-*): Adapt accordingly.
18809         (test::set-logfd): New function.
18810         (test::open-log-file): Likewise.
18811         (test::run-sync): Use the new function.
18812         (test::run-async): Likewise.
18813         (test::report): Replay the log.
18814         (run-tests-parallel): Reverse the results to restore the original
18815         order.
18816
18817         tests: Simplify test.
18818         + commit 4dd4801bfa4c3f7ba279b3d171a8ed299dbffaaa
18819         * tests/openpgp/issue2417.scm: Simplify.
18820
18821         gpgscm: Expose seek and associated constants.
18822         + commit 591d61d80f4f81176f7e236df794922df9e001a1
18823         * tests/gpgscm/ffi.c (do_seek): New function.
18824         (ffi_init): Expose 'seek' and 'SEEK_{SET,CUR,END}'.
18825         * tests/gpgscm/lib.scm: Document the new function.
18826
18827         gpgscm: Fix error message.
18828         + commit d4454837cd60981c2863955b11c9e1cc8f9e3833
18829         * tests/gpgscm/ffi.c (do_wait_processes): Fix and improve error
18830         messages.
18831
18832         tests,w32: Make cleanup more robust.
18833         + commit dd13b2a561e31045fd3d3576bab99543cd4eb6cc
18834         * tests/openpgp/run-tests.scm (run-tests-parallel): Catch errors when
18835         removing the working directory.  On Windows this can fail if there is
18836         still a process using one of the files there.
18837         (run-tests-sequential): Likewise.
18838
18839         common,w32: Simplify locking.
18840         + commit 7cbb0803847b8db618d39ff50ae6015e409ab1ae
18841         * common/asshelp.c (lock_spawning): Use the same code on Windows that
18842         we use on all other platforms.
18843         (unlock_spawning): Likewise.
18844
18845 2016-11-07  Justus Winter  <justus@g10code.com>
18846
18847         tests: Write a log file for each test.
18848         + commit 26df829fa22f027ca4a5eaf155cdaa2123afbdd5
18849         * tests/openpgp/Makefile.am (CLEANFILES): Delete logs.
18850         * tests/openpgp/run-tests.scm (test::run-sync): Write logs.
18851
18852         gpgscm: Generalize splice to write to multiple sinks.
18853         + commit abe0cc7a21d2b0b5c77cc525b999d1ede2d29185
18854         * tests/gpgscm/ffi.c (ordinal_suffix): New function.
18855         (do_splice): Generalize splice to write to multiple sinks.
18856         * tests/gpgscm/lib.scm (splice): Document this fact.
18857
18858         gpgscm: Drop 'len' argument from splice.
18859         + commit 4d98a72b88cf167295e1ecd6125b9c7a11b6239f
18860         * tests/gpgscm/ffi.c (do_splice): Drop 'len' argument, no-one uses it.
18861         * tests/gpgscm/lib.scm (splice): Document foreign function.
18862
18863         tests: Move environment creation and teardown into each test.
18864         + commit a55393cb5f4b331cb3a715c7d9a8b91f7606f337
18865         * tests/gpgscm/tests.scm (log): New function.
18866         * tests/openpgp/run-tests.scm (run-tests-parallel): Do not run the
18867         startup and teardown scripts.
18868         (run-tests-sequential): Likewise.
18869         * tests/openpgp/setup.scm: Move all functions...
18870         * tests/openpgp/defs.scm: ... here and make them less verbose.
18871         (setup-environment): New function.
18872         (setup-legacy-environment): Likewise.
18873         (start-agent): Make less verbose, run 'stop-agent' at interpreter
18874         exit.
18875         (stop-agent): Make less verbose.
18876         * tests/openpgp/finish.scm: Drop file.
18877         * tests/openpgp/Makefile.am (EXTRA_DIST): Drop removed file.
18878         * tests/openpgp/4gb-packet.scm: Use 'setup-environment' or
18879         'setup-legacy-environment' as appropriate.
18880         * tests/openpgp/armdetach.scm: Likewise.
18881         * tests/openpgp/armdetachm.scm: Likewise.
18882         * tests/openpgp/armencrypt.scm: Likewise.
18883         * tests/openpgp/armencryptp.scm: Likewise.
18884         * tests/openpgp/armor.scm: Likewise.
18885         * tests/openpgp/armsignencrypt.scm: Likewise.
18886         * tests/openpgp/armsigs.scm: Likewise.
18887         * tests/openpgp/clearsig.scm: Likewise.
18888         * tests/openpgp/conventional-mdc.scm: Likewise.
18889         * tests/openpgp/conventional.scm: Likewise.
18890         * tests/openpgp/decrypt-dsa.scm: Likewise.
18891         * tests/openpgp/decrypt.scm: Likewise.
18892         * tests/openpgp/default-key.scm: Likewise.
18893         * tests/openpgp/detach.scm: Likewise.
18894         * tests/openpgp/detachm.scm: Likewise.
18895         * tests/openpgp/ecc.scm: Likewise.
18896         * tests/openpgp/encrypt-dsa.scm: Likewise.
18897         * tests/openpgp/encrypt.scm: Likewise.
18898         * tests/openpgp/encryptp.scm: Likewise.
18899         * tests/openpgp/export.scm: Likewise.
18900         * tests/openpgp/finish.scm: Likewise.
18901         * tests/openpgp/genkey1024.scm: Likewise.
18902         * tests/openpgp/gpgtar.scm: Likewise.
18903         * tests/openpgp/gpgv-forged-keyring.scm: Likewise.
18904         * tests/openpgp/import.scm: Likewise.
18905         * tests/openpgp/issue2015.scm: Likewise.
18906         * tests/openpgp/issue2417.scm: Likewise.
18907         * tests/openpgp/issue2419.scm: Likewise.
18908         * tests/openpgp/key-selection.scm: Likewise.
18909         * tests/openpgp/mds.scm: Likewise.
18910         * tests/openpgp/multisig.scm: Likewise.
18911         * tests/openpgp/quick-key-manipulation.scm: Likewise.
18912         * tests/openpgp/seat.scm: Likewise.
18913         * tests/openpgp/shell.scm: Likewise.
18914         * tests/openpgp/signencrypt-dsa.scm: Likewise.
18915         * tests/openpgp/signencrypt.scm: Likewise.
18916         * tests/openpgp/sigs-dsa.scm: Likewise.
18917         * tests/openpgp/sigs.scm: Likewise.
18918         * tests/openpgp/ssh.scm: Likewise.
18919         * tests/openpgp/tofu.scm: Likewise.
18920         * tests/openpgp/use-exact-key.scm: Likewise.
18921         * tests/openpgp/verify.scm: Likewise.
18922         * tests/openpgp/version.scm: Likewise.
18923         * tests/openpgp/issue2346.scm: Likewise and simplify.
18924
18925         tests: Do not allow tests to be run in a shared environment.
18926         + commit ac078469cbafe85cf771fca84f376740850d10b0
18927         * tests/openpgp/README: Update.
18928         * tests/openpgp/run-tests.scm (run-tests-parallel-shared): Drop
18929         function.
18930         (run-tests-parallel-isolated): Rename to 'run-tests-parallel'.
18931         (run-tests-sequential-shared): Drop function.
18932         (run-tests-sequential-isolated): Rename to 'run-tests-sequential'.
18933
18934         tests: Fix build.
18935         + commit 37751d2b194bc33539f5b9ea0e02e9f209d2bcf6
18936         * tests/openpgp/Makefile.am: Drop dependency on 'mk-tdata'.
18937
18938         Fixes: 70215ff470c82d144e872057dfa5a478cc9195f2
18939
18940 2016-11-07  Werner Koch  <wk@gnupg.org>
18941
18942         wks: Encrypt all client mails also the target key,
18943         + commit 56e1864aa337f36317534db521fd4434d70e0784
18944         * tools/gpg-wks-client.c (encrypt_response): Add arg FINGERPRINT.
18945         (send_confirmation_response): Ditto.
18946         (process_confirmation_request): Parse out fingerprint and pass
18947         send_confirmation_response.
18948
18949 2016-11-07  Justus Winter  <justus@g10code.com>
18950
18951         tests,tools: Reimplement 'mk-tdata' in Scheme.
18952         + commit 70215ff470c82d144e872057dfa5a478cc9195f2
18953         * tests/openpgp/defs.scm (tools): Drop 'mk-tdata'.
18954         * tests/openpgp/setup.scm (make-test-data): New function.
18955         * tests/openpgp/verify.scm: Avoid 'mk-tdata'.
18956         * tools/Makefile.am (noinst_PROGRAMS): Drop 'mk-tdata'.
18957         * tools/mk-tdata.c: Drop file.
18958
18959         gpgscm,w32: Provide schemish file handling for binary files.
18960         + commit 413cc50345557e0a516f33b98e8aab19bbc8b4fe
18961         * tests/gpgscm/lib.scm (call-with-binary-input-file): New function.
18962         (call-with-binary-output-file): Likewise.
18963
18964         gpgscm: Add support for pseudo-random numbers.
18965         + commit 6e677f9b55fdb610e93134042ee41ee5c641cbdf
18966         * tests/gpgscm/ffi.c (do_getpid): New function.
18967         (do_srandom): Likewise.
18968         (random_scaled): Likewise.
18969         (do_random): Likewise.
18970         (do_make_random_string): Likewise.
18971         (ffi_init): Expose the new functions.
18972         * tests/gpgscm/lib.scm: Document the new functions.
18973
18974         g10: Fix crash.
18975         + commit 5840353d8bbcd9e75374f3bdb2547ffa7bbea897
18976         * g10/getkey.c (get_best_pubkey_byname): If 'get_pubkey_byname' does
18977         not return a getkey context, then it can return at most one key,
18978         therefore there is nothing to rank.  Also, always initialize '*retctx'
18979         to be on the safe side.
18980
18981         Fixes: ab89164be02012f1bf159c971853b8610e966301
18982
18983 2016-11-04  Justus Winter  <justus@g10code.com>
18984
18985         gpgscm: Fix printing strings containing zero bytes.
18986         + commit 1f45878a72f23d4bae08d73b614096b485f35274
18987         * tests/gpgscm/scheme.c (atom2str): Fix computing the length of Scheme
18988         strings.  Scheme strings can contain zero bytes.
18989
18990         gpgscm: Implement 'atexit'.
18991         + commit 43f8006f5c75e3d15fe200e2fa41587a73bfb07b
18992         * tests/gpgscm/ffi.scm (throw): Run *run-atexit-handlers* when
18993         terminating the interpreter.
18994         (*atexit-handlers*): New variable.
18995         (*run-atexit-handlers*): New function.
18996         (atexit): Likewise.
18997         * tests/gpgscm/main.c (main): Run *run-atexit-handlers* at normal
18998         interpreter shutdown.
18999
19000 2016-11-04  NIIBE Yutaka  <gniibe@fsij.org>
19001
19002         scd: Fix length error for READKEY.
19003         + commit cd00b07ec26c3408e6aee66957b08c6fd319b700
19004         * scd/app-openpgp.c (do_readkey): Decrement the length.
19005
19006         scd: Add --advanced option for READKEY.
19007         + commit f9da935c3eb302e75a80def51128fb6f669661d7
19008         * scd/command.c (cmd_readkey) : Support ADVANCED arg.
19009         * scd/app.c (app_readcert): Add ADVANCED arg.
19010         * scd/app-openpgp.c (do_readkey): Implement ADVANCED arg.
19011         * scd/app-nks.c (do_readkey): Error return with GPG_ERR_NOT_SUPPORTED.
19012
19013 2016-11-03  Werner Koch  <wk@gnupg.org>
19014
19015         agent: Extend the PINENTRY_LAUNCHED inquiry and status.
19016         + commit c1ea0b577a468030d2b006317ba27fc1746c4b14
19017         * agent/call-pinentry.c (start_pinentry): Get flavor and version and
19018         pass it to agent_inq_pinentry_launched.
19019         * agent/command.c (agent_inq_pinentry_launched): Add arg EXTRA.
19020         * g10/server.c (gpg_proxy_pinentry_notify): Print a new diagnostic.
19021
19022 2016-11-03  Justus Winter  <justus@g10code.com>
19023
19024         g10: Improve and unify key selection for -r and --locate-keys.
19025         + commit ab89164be02012f1bf159c971853b8610e966301
19026         * g10/getkey.c (struct pubkey_cmp_cookie): New type.
19027         (key_is_ok, uid_is_ok, subkey_is_ok): New functions.
19028         (pubkey_cmp): Likewise.
19029         (get_best_pubkey_byname): Likewise.
19030         * g10/keydb.h (get_best_pubkey_byname): New prototype.
19031         * g10/keylist.c (locate_one): Use the new function.
19032         * g10/pkclist.c (find_and_check_key): Likewise.
19033         * tests/openpgp/Makefile.am (XTESTS): Add new test.
19034         (TEST_FILES): Add new files.
19035         * tests/openpgp/key-selection.scm: New file.
19036         * tests/openpgp/key-selection/0.asc: Likewise.
19037         * tests/openpgp/key-selection/1.asc: Likewise.
19038         * tests/openpgp/key-selection/2.asc: Likewise.
19039         * tests/openpgp/key-selection/3.asc: Likewise.
19040         * tests/openpgp/key-selection/4.asc: Likewise.
19041
19042         gpgscm,tests: Add new functions to the test environment.
19043         + commit 1ec07cbc209f247fd85704f5701564e31aa56d0b
19044         * tests/gpgscm/lib.scm (first, last, powerset): New functions.
19045         * tests/gpgscm/tests.scm (interactive-shell): New function.
19046         * tests/openpgp/Makefile.am (EXTRA_DIST): Add new file.
19047         * tests/openpgp/README: Document 'interactive-shell'.
19048         * tests/openpgp/shell.scm: New file.
19049
19050 2016-11-03  Werner Koch  <wk@gnupg.org>
19051
19052         gpgconf: Add a new field to the --query-swdb output.
19053         + commit d10b67b9bc32e8feff1be86e6646fc23e58fe45d
19054         * tools/gpgconf.c (query_swdb): Insert new field with the installed
19055         version.  Check that the supplied version does not contain a colon.
19056
19057 2016-11-02  Werner Koch  <wk@gnupg.org>
19058
19059         gpgconf: Add command --query-swdb.
19060         + commit 0ed6a6df5aa421a9c5cdb1e63867f0deee79af9e
19061         * tools/gpgconf.c (aQuerySWDB): New.
19062         (opts): Add --query-swdb.
19063         (valid_swdb_name_p): New.
19064         (query_swdb): New.
19065         (main): Implement command --query-swdb.
19066
19067         common: Improve compare_string_versions.
19068         + commit 488b183811fc25c1ae49b4730491accf1adf518e
19069         * common/stringhelp.c: Include limits.h.
19070         (compare_version_strings): Change semantics to behave like strcmp.
19071         Include the patch lebel in the comparison.  Allow checking a single
19072         version string.
19073         * common/t-stringhelp.c (test_compare_version_strings): Adjust test
19074         vectors and a few new vectors.
19075         * g10/call-agent.c (warn_version_mismatch): Adjust to new sematics.
19076         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
19077         * sm/call-agent.c (warn_version_mismatch): Ditto.
19078         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
19079
19080 2016-11-02  Justus Winter  <justus@g10code.com>
19081
19082         gpgscm: Fix inclusion of readline header.
19083         + commit 60ad1a7f37ffc10e601e69a3e2d2bb14af510257
19084         * tests/gpgscm/ffi.c: Define magic macro to prevent the completion
19085         function from redefined.
19086
19087 2016-11-02  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19088
19089         build: Fix misspelled dirmngr.
19090         + commit 5e693ddfbe44d149ce0d9393d699c613ad5ea706
19091
19092
19093         Spelling: correct spelling of "passphrase".
19094         + commit 68b59bbc42ba9ec69496758743924d54a95742f0
19095         There were several different variant spellings of "passphrase".  This
19096         should fix them all for all English text.
19097
19098         I did notice that po/it.po contains multiple instances of
19099         "passhprase", which also looks suspect to me, but i do not know
19100         Italian, so i did not try to correct it.
19101
19102 2016-11-02  Justus Winter  <justus@g10code.com>
19103
19104         g10,w32: Fix build on Windows.
19105         + commit 5d4f1408d0dd055d412ae44bb4a0f28f74617f05
19106         * g10/tofu.c (begin_transaction): Use the new 'gnupg_usleep'.
19107
19108 2016-10-31  Werner Koch  <wk@gnupg.org>
19109
19110         common: New function gnupg_usleep.
19111         + commit ad491ceec6145b3781a05dc7b4a36052abeeb4b4
19112         * configure.ac (HAVE_NANOSLEEP): Test for nanosleep.
19113         * common/sysutils.c: Always include time.h.
19114         (gnupg_usleep): New.
19115
19116 2016-10-31  Andre Heinecke  <aheinecke@intevation.de>
19117
19118         w32: Fix PKG_CONFIG_LIBDIR in --build-w32.
19119         + commit 3b6b8fe32af7568ff51066d4c2e3679df6dea86f
19120         * autogen.sh: Point pkg-config to the right location.
19121
19122 2016-10-31  Neal H. Walfield  <neal@g10code.com>
19123
19124         g10: Avoid gratuitious SQLite aborts and starving writers.
19125         + commit 7a634e48b13c5d5d295b8fed9b429e1b2109a333
19126         * g10/tofu.c: Include <time.h>, <utime.h>, <fcntl.h> and <unistd.h>.
19127         (tofu_dbs_s): Add fields want_lock_file and want_lock_file_ctime.
19128         (begin_transaction): Only yield if DBS->WANT_LOCK_FILE_CTIME has
19129         changed since we took the lock.  Don't use gpgrt_yield to yield, but
19130         sleep for 100ms.  After taking the batch lock, update
19131         DBS->WANT_LOCK_FILE_CTIME.  Also take the batch lock the first time we
19132         take the real lock.  When taking the real lock, use immediate not
19133         deferred mode to avoid gratuitious aborts.
19134         (end_transaction): When dropping the outermost real lock, drop the
19135         batch lock.
19136         (busy_handler): New function.
19137         (opendbs): Set the busy handler to it when opening the DB.  Initialize
19138         CTRL->TOFU.DBS->WANT_LOCK_FILE.
19139         (tofu_closedbs): Free DBS->WANT_LOCK_FILE.
19140
19141 2016-10-30  Neal H. Walfield  <neal@g10code.com>
19142
19143         g10: Avoid reading in keys when possible.
19144         + commit eec365a02bd35d2d5c9e4d2c8d18bcd9180cf859
19145         * g10/tofu.c (build_conflict_set): If CONFLICT_SET contains a single
19146         element, don't bother to check for cross sigs.  Add parameter PK.
19147         Update callers.
19148
19149         g10: Fix bit setting.
19150         + commit 614ca00676bb8ca12b5107fec0e4ef8818445254
19151         * g10/tofu.c (build_conflict_set): Fix bit setting.
19152
19153 2016-10-28  Werner Koch  <wk@gnupg.org>
19154
19155         gpg: Enable the Issuer Fingerprint from rfc4880bis.
19156         + commit b6f08dbb0b45059cdbbb5d9be9725e437f42a8cc
19157         * g10/build-packet.c (build_sig_subpkt_from_sig): Always write the new
19158         Issuer Fingerprint sub-packet.
19159         * g10/mainproc.c (check_sig_and_print): Always consider that
19160         sub-packet.
19161
19162 2016-10-27  Werner Koch  <wk@gnupg.org>
19163
19164         dirmngr: Fix signature checking.
19165         + commit 5a1f6a0062488aaf345b1c73ba98a540e673d619
19166         * dirmngr/server.c: Include cpparray.h.
19167         (verify_swdb_parm_s): New.
19168         (verify_swdb_status_cb): New.
19169         (cmd_versioncheck): Use gpgv to correclty verify the signature.
19170         Rename some variable to comply with GNU standards.
19171
19172         gpg: Verify multiple detached signatures with different hash algos.
19173         + commit 8fced66be35db5ac2a6bfdb9bccb2c0e582d8256
19174         * g10/mainproc.c (proc_tree): Loose check.  Enable all algos.
19175
19176         common: Add GNUPG_MODULE_NAME_GPGV.
19177         + commit ece9ade4b44fb3d5d120cfd32b23632e5efd2134
19178         * common/util.h (GNUPG_MODULE_NAME_GPGV): New.
19179         * common/homedir.c (gnupg_module_name): Implement.
19180
19181 2016-10-27  Justus Winter  <justus@g10code.com>
19182
19183         g10: Fix iteration over getkey results.
19184         + commit 8ea72a776a88f3c851e812d258355be80caa1bc1
19185         * g10/getkey.c (getkey_next): Return the public key in PK even if
19186         RET_KEYBLOCK is NULL.
19187
19188         g10: Assert preconditions.
19189         + commit 66a0091d74768ab3a4a5342d3645e1834c59045a
19190         * g10/getkey.c (get_pubkey_byname): Assert preconditions.
19191
19192 2016-10-27  Werner Koch  <wk@gnupg.org>
19193
19194         dirmngr: Do not implement --supervised in Windows.
19195         + commit cf20b23c146c9e499263654644035796475de097
19196         * dirmngr/dirmngr.c (opts) [W32]: Remove --supervised.
19197         (main) [W32]: Ditto.
19198
19199         common: Remove debug output from gnupg_get_socket_name.
19200         + commit a9c8b5fbe7ae241bf45bdee15884abc7891aedf9
19201         * common/sysutils.c (gnupg_get_socket_name): Remove debug message and
19202         use my_error_from_syserror.
19203
19204 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
19205
19206         dirmngr: ADNS error handling fix.
19207         + commit 45dfc02b47f798f5a3b9973ca6a9f5a907d7e665
19208         * dirmngr/dns-stuff.c (resolve_name_adns, get_dns_cert, get_dns_cname):
19209         Use gpg_error and gpg_err_code_from_errno to compose the error value.
19210
19211 2016-10-27  Werner Koch  <wk@gnupg.org>
19212
19213         gpg: Convey --quick option to dirmngr for --auto-key-retrieve.
19214         + commit a15ed5a1fd5307b3ec1822daf3b138b187db0b5e
19215         * g10/call-dirmngr.c (gpg_dirmngr_ks_get): Add arg 'quick'.
19216         (gpg_dirmngr_wkd_get): Ditto.
19217         * g10/keyserver.c (keyserver_get): Add arg 'quick'.
19218         (keyserver_get_chunk): Add arg 'quick'.
19219         (keyserver_import_fprint): Ditto.  Change callers to pass 0 for it.
19220         (keyserver_import_keyid): Ditto.
19221         (keyserver_import_wkd): Ditto.
19222         * g10/mainproc.c (check_sig_and_print): Call the 3 fucntions with
19223         QUICK set.
19224
19225 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
19226
19227         common: Fix gnupg_inotify_has_name, differently.
19228         + commit 8b3d0d1a36cab83dafb98ccb7895144edb95e298
19229         * common/sysutils.c (gnupg_inotify_has_name): Use void * to stop the
19230         warning.
19231
19232         dirmngr: More ADNS error fix.
19233         + commit 6f1d8123d61b3efac94b4c61ee75bd947790ba42
19234         * dirmngr/dns-stuff.c (get_dns_cert, getsrv, get_dns_cname): Fix return
19235         value.
19236
19237         dirmngr: Fix error return for ADNS.
19238         + commit 8a9341b42cd1891090d45cc068bff84b2b3edb50
19239         * dirmngr/dns-stuff.c (resolve_name_adns): Use RET for return value.
19240
19241         g10: Fix ECDH, clarifying the format.
19242         + commit ca0ee4e381d0b6a57e4ddc8f4bb2390eb97a2540
19243         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Returns error when
19244         it's short.  Clarify the format.  Handle other prefixes correctly.
19245
19246         scd: Add 0x41 prefix for x-coordinate only result.
19247         + commit 6bbd97d6c771b2e2c7cfcff6d5a823f0fb44d443
19248         * scd/app-openpgp.c (do_decipher): When it's x-coordinate only, add the
19249         prefix 0x41.
19250
19251 2016-10-27  Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
19252
19253         g10: ECDH shared point format.
19254         + commit b648f28f9f8b889f1217a649ded1d45f261bb2bf
19255         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Improve handling of
19256         ECDH shared point format.
19257
19258 2016-10-27  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19259
19260         dirmngr: Implement --supervised command (for systemd, etc).
19261         + commit 75f8aaf5bc2dc7fcffe2987a572d489155c91eb9
19262         * dirmngr/dirmngr.c (main): Add new --supervised command, which is a
19263         mode designed for running under a process supervision system like
19264         systemd or runit.
19265         * doc/dirmngr.texi: document --supervised option.
19266
19267         agent,common: move get_socket_name() into common.
19268         + commit 6316b28e896957adb76a61a41d2e1c2a08d9f716
19269         * agent/gpg-agent.c (get_socket_name): move to ...
19270         * common/sysutils.c (gnupg_get_socket_name): ... here.
19271
19272         dirmngr: report actual socket name.
19273         + commit 6bb6ac56cca8135666387a0b9d88dd6b50311418
19274         * dirmngr/dirmngr.[ch] (dirmngr_get_current_socket_name): new function
19275         to report known socket name.
19276         * dirmngr/server.c (cmd_getinfo): use dirmngr_get_current_socket_name
19277         to report correct socket name.
19278
19279 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
19280
19281         common: Fix gnupg_inotify_has_name.
19282         + commit bc28f320fa6f5b9fcdb73dba5e6c582daf7992c5
19283         * common/sysutils.c (gnupg_inotify_has_name): Take care of the
19284         alignment.
19285
19286         dirmngr: Fix help string and argument.
19287         + commit 96414baf36b8e6385b71847c789d489ebe176a93
19288         * dirmngr/server.c (hlp_versioncheck): Add a newline.
19289         (cmd_versioncheck): Fix argument.
19290
19291 2016-10-26  Werner Koch  <wk@gnupg.org>
19292
19293         dirmngr: Fix hang due to deferred thread initialization.
19294         + commit d1ccab5176d7719328b287544b54b85e0277b146
19295         * dirmngr/dirmngr.c (main): Call ldap_wrapper_launch_thread after
19296         thread_init.
19297
19298         agent: Avoid double error message.
19299         + commit b77f95a4a675fd20f6eeb611f4e7b519eceb4ad3
19300         * agent/gpg-agent.c (map_supervised_sockets): Shorten error message.
19301         Remove unneeded diagnostic.
19302
19303         common: Use GPG_ERR_INV_VALUE instead of GPG_ERR_EINVAL.
19304         + commit ece13f177d948013b6f3df926406c0cd947abc25
19305         * common/sysutils.c (gnupg_inotify_watch_socket): Return
19306         GPG_ERR_INV_VALUE for a missing socket name and set proper error
19307         source.
19308
19309         tests: Improve portability of fake-pinentry.
19310         + commit 21b318452abbfe21c45c2a67dae0e3a81cff1090
19311         * tests/openpgp/fake-pinentry.c: Make all functions static.
19312         (get_passphrase): s/unlink/remove/ because that is standard C.
19313         (spacep): Rename to whitespace and change all callers.
19314         (main): Move macro out of if-then chain.
19315
19316 2016-10-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19317
19318         agent: --supervised mode improvements.
19319         + commit 27f6d5b9f4b6057ddeb9ace87a1e7e61ebac63e6
19320         * agent/gpg-agent.c (map_supervised_socket): if the agent is running
19321           in --supervised mode and is not actually given LISTEN_FDNAMES
19322           directives, require at least fd 3 to be open for listening.
19323
19324         common: avoid segfault.
19325         + commit 3b5f5e0eb02ecbdcf59722755f22a9d2f88de6e6
19326         * common/sysutils.c (gnupg_inotify_watch_socket): return EINVAL if
19327           socket_name is NULL, rather than segfaulting
19328
19329 2016-10-25  Justus Winter  <justus@g10code.com>
19330
19331         agent,tests,w32: Fix relaying pinentry user data, fix fake-pinentry.
19332         + commit 852b8f0b89d447536dfdf6cd4ea91615c75491ce
19333         * agent/call-pinentry.c (start_pinentry): Also send the user data
19334         using an Assuan 'OPTION' command.
19335         * tests/openpgp/fake-pinentry.c (get_passphrase): Fix updating
19336         passphrase file.
19337         (spacep): Include newline characters.
19338         (rstrip): New function.
19339         (main): Handle Windows line endings.  Handle the userdata option, and
19340         restart with the new options.
19341
19342         tests: Do not autostart gpg-agents on teardown.
19343         + commit f88f11a25665dca7490a09088aa24edf396e4c40
19344         * tests/openpgp/defs.c (stop-agent): Use '--no-autostart' when calling
19345         gpg-connect-agent.
19346
19347 2016-10-25  Werner Koch  <wk@gnupg.org>
19348
19349         dirmngr: Allow command VERSIONCHECK to handle 3 part version numbers.
19350         + commit b120f358c25cc846ca9d841d47e71ca1a7fe02e4
19351         * dirmngr/server.c (parse_version_string): Add arg MICRO and set it.
19352         (cmp_version): Extend to handle the MICRO part.
19353         (confucius_mktmpdir): Rename to my_mktmpdir.
19354         (my_mktmpdir): xstrconcat does not fail; use strconcat.
19355         (fetch_into_tmpdir): Improve error checking.
19356
19357         common: Use strconcat in gnupg_setenv.
19358         + commit 7983f8758703071710c11bf2a255efcd71836b65
19359         * common/sysutils.c (gnupg_setenv): Replace malloc+stpcpy by
19360         strconcat.  Indent cpp conditionals.
19361         (gnupg_unsetenv): Indent cpp conditionals.
19362
19363 2016-10-24  Werner Koch  <wk@gnupg.org>
19364
19365         gpg: Replace two sprintf calls.
19366         + commit 9d6146d6f9870fbfcec15cdc4becaf094d5a90e0
19367         * g10/keygen.c (print_status_key_created): Use snprintf for now.
19368         (ask_expire_interval): Replace xmalloc and sprintf by xasprintf.
19369
19370         agent: Minor cleanup for recent change in findkey.c.
19371         + commit 8c40b3b98d3ddeda79fde981e6539c5b3b09d9a2
19372         * agent/findkey.c (agent_write_private_key): Avoid label name error.
19373
19374         agent: Slightly change structure of cmd_readkey.
19375         + commit fdb653a33ea1a24d1159880624dbbcc0867865b5
19376         * agent/command.c (cmd_readkey): Avoid a leave label in the middle of
19377         the code.  Remove the special return.
19378
19379 2016-10-24  Kai Michaelis  <kai@gnupg.org>
19380
19381         dirmngr: Fix segfault in VERSIONCHECK.
19382         + commit 5e7dfd979d2d91800d90c3ce9a66755df3217682
19383         * dirmngr/server.c (cmd_versioncheck): The VERSIONCHECK command crashes
19384         when called without program version.
19385
19386 2016-10-24  NIIBE Yutaka  <gniibe@fsij.org>
19387
19388         scd: Use canonical curve name of libgcrypt.
19389         + commit b1828c17fc475def1ee9e06f083f513f568c241b
19390         * scd/app-openpgp.c (send_key_attr): Use curve instead of OID.
19391         (ecdh_params): New.
19392         (ecc_read_pubkey): Use ecdh_params.  Use curve name.
19393         (ecc_writekey): Likewise.
19394         (ecc_curve): Rename from ecc_oid.
19395         (parse_algorithm_attribute): Use ecc_curve.
19396         * g10/call-agent.c (learn_status_cb): Use openpgp_is_curve_supported to
19397         intern the curve name string.
19398         * g10/card-util.c (card_status): Conver curve name to alias for print.
19399
19400         common: Fix openpgp_is_curve_supported.
19401         + commit 945e7ab0ddedf5f58afd97d81e101939de5b5d89
19402         * common/openpgp-oid.c (openpgp_is_curve_supported): Support both of
19403         canonical name of the curve and alias.
19404
19405         g10: Fix card keygen for decryption.
19406         + commit acef0951646b47c87ccc1c616f0105a068e7ed86
19407         * g10/keygen.c (do_generate_keypair): Fix arguments.
19408
19409 2016-10-22  NIIBE Yutaka  <gniibe@fsij.org>
19410
19411         g10: More card key generation change.
19412         + commit 987bbb2276aeb6bee2793e8406e223717b605009
19413         * g10/keygen.c (gen_card_key): Add back ALGO as the second argument.
19414         Don't get ALGO by KEY-ATTR by this function.  It's caller to provide
19415         ALGO.  Don't do that by both of caller and callee.
19416         (generate_keypair): Only put paramerters needed.  Use parameters
19417         for ALGO to call gen_card_key.
19418         (generate_card_subkeypair): Get ALGO and call gen_card_key with it.
19419
19420 2016-10-21  Andre Heinecke  <aheinecke@intevation.de>
19421
19422         g10: Write first keybox record in binary mode.
19423         + commit f7e50634be71ce3028726f23edf14454109a04a8
19424         * g10/keydb.c (maybe_create_keyring_or_box): Open in binary mode.
19425
19426 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
19427
19428         g10,scd: Fix ECC keygen.
19429         + commit d2653b1a6db90aed073194a51fd61023d69773ec
19430         * g10/keygen.c (generate_keypair): For card key generation, fill
19431         parameters by KEY-ATTR.
19432
19433         * scd/app-openpgp.c (ecc_read_pubkey): OID should be freed at last,
19434         after its reference by OIDBUF is finished.
19435         (ecc_writekey): Likewise.
19436
19437         scd: Fix segfault changing key attr.
19438         + commit 693e657ff04756737dce025203c0deba480ea8de
19439         * asc/app-openpgp.c (change_keyattr_from_string): Release after
19440         allocated.
19441
19442 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
19443             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
19444
19445         g10: Don't ask keysize for for non-RSA card.
19446         + commit dafce6f698bec6e9d4c0125b90754d0687294e86
19447         * g10/card-util.c (card_status): Bug fix for keyno.
19448         (ask_card_rsa_keysize, do_change_rsa_keysize): Rename.
19449         (generate_card_keys): Only ask keysize when RSA.
19450         (card_generate_subkey): Likewise.
19451
19452         g10: Support ECC for gen_card_key.
19453         + commit 161cb22f13bcd8cbdb08558d9926b2168a8297ac
19454         * g10/keygen.c (gen_card_key): Remove the first argument of ALGO.
19455         (do_generate_keypair, generate_card_subkeypair): Follow the change.
19456
19457 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
19458
19459         Fix use cases of snprintf.
19460         + commit 6e85ac77af594035137950d801d8a1bacce548a3
19461         * agent/call-pinentry.c, agent/call-scd.c, agent/command.c,
19462         build-aux/speedo/w32/g4wihelp.c, common/get-passphrase.c,
19463         dirmngr/dirmngr.c, g10/call-agent.c, g10/cpr.c, g10/keygen.c,
19464         g10/openfile.c, g10/passphrase.c, scd/app-openpgp.c, scd/scdaemon.c,
19465         sm/call-agent.c, sm/call-dirmngr.c, sm/certreqgen.c: Fix assuming C99.
19466
19467         agent: Fix saving with FORCE=1.
19468         + commit 1ffd475f99eaff4e40950eda88702f8db9288eb5
19469         * agent/findkey.c (agent_write_private_key): Recover from an error of
19470         GPG_ERR_ENOENT when FORCE=1 and it is opened with "rb+".
19471
19472 2016-10-20  Justus Winter  <justus@g10code.com>
19473
19474         tests: Simplify test.
19475         + commit 71158d8d5f823888abc8588caa6497860ce59c06
19476         * tests/openpgp/quick-key-manipulation.scm: Avoid creating a temporary
19477         home directory, just make the uids unique.
19478
19479         tests: Flush stdout in the fake pinentry.
19480         + commit ca9597f080f70a8435daaeb5449bef0462a1402a
19481         * tests/openpgp/fake-pinentry.c (reply): Flush stdout.
19482
19483         common,w32: Fix setting environment variables on Windows.
19484         + commit 8c7c4faf3de28ca70a60e6b15f51c1b206e0ddd9
19485         * common/sysutils.c (gnupg_setenv): Also update the environment block
19486         maintained by the C runtime.
19487         (gnupg_unsetenv): Likewise.
19488         * tests/gpgscm/ffi.c (do_setenv): Fix error handling.
19489
19490         tests,w32: Cope with Windows line endings.
19491         + commit bf37916a23bd0929fc4a5f28c9a41f43c5a473f6
19492         * tests/openpgp/issue2015.scm: Rstrip line before comparison.
19493
19494         tests: Create and remove socket directories.
19495         + commit 2d794779e0fd9d9a1efc98e7bd77a296a25f4293
19496         * tests/openpgp/defs.scm (start-agent): Move function here and create
19497         the socket directory prior to starting the agent.
19498         (stop-agent): Move function here and remove the socket directory.
19499         * tests/openpgp/finish.scm: Adapt.
19500         * tests/openpgp/setup.scm: Likewise.
19501
19502 2016-10-20  NIIBE Yutaka  <gniibe@fsij.org>
19503
19504         agent, g10: Fix keygen.
19505         + commit 9a34e2142b426b98c73fd888102ea1596bbce62a
19506         * agent/command.c (cmd_readkey): Get length after card_readkey.
19507         * g10/keygen.c (gen_card_key): Fix off-by-one error.
19508
19509         scd: GENKEY updates the public key in APP.
19510         + commit b680f79cc112c4831293e259d7db2921bcd783a4
19511         * scd/app-openpgp.c (rsa_read_pubkey, ecc_read_pubkey): New.
19512         (read_public_key): New.
19513         (get_public_key, do_genkey): Use read_public_key.
19514
19515         g10: smartcard keygen change.
19516         + commit 980c037bedb968ddf155dd334c0a70b918a17759
19517         * g10/call-agent.c (scd_genkey_cb_append_savedbytes): Remove.
19518         (scd_genkey_cb): Only handle KEY-CREATED-AT and PROGRESS.
19519         (agent_scd_genkey): Remove INFO argument.  CREATETIME is now in/out
19520         argument.
19521         (agent_readkey): Use READKEY --card instead of SCD READKEY.
19522         * g10/keygen.c (gen_card_key): Use READKEY --card command of the agent
19523         to retrieve public key information from card and let the agent make
19524         a file for private key with shadow info.
19525
19526         agent: Add --card option for READKEY.
19527         + commit 82cbab906a3e72a98fdc16096f2f0451465969a2
19528         * agent/findkey.c (agent_write_shadow_key): New.
19529         * agent/command-ssh.c (card_key_available): Use agent_write_shadow_key.
19530         * agent/learncard.c (agent_handle_learn): Likewise.
19531         * agent/command.c (cmd_readkey): Add --card option.
19532
19533 2016-10-19  Kai Michaelis  <kai@gnupg.org>
19534
19535         dirmngr: improve VERSIONCHECK.
19536         + commit 72a99f582dad4cb4c3b05b97c7ebb8d537f10b79
19537         Replace strtok_r() and code formatting. Use code from libgpg-error for
19538         version comparison.
19539
19540 2016-10-18  Justus Winter  <justus@g10code.com>
19541
19542         common: Fix copying data to estreams.
19543         + commit 8dce5ee55a0268d196023224dcf3020306922490
19544         * common/exectool.c (copy_buffer_do_copy): Correctly account for
19545         partially written data in the event of errors.
19546
19547         common,w32: Communicate with child in non-blocking mode.
19548         + commit 05a1e412332dd980353a4e3e59bc75ba40bae7fc
19549         * common/exechelp-w32.c (gnupg_spawn_process): Open streams in
19550         non-blocking mode if requested.
19551
19552         common,w32: Extend gnupg_create_inbound_pipe et al.
19553         + commit f2d39a6d051413289c717b9cd2dc387a270b8e7c
19554         * common/exechelp-w32.c (do_create_pipe): Rename, add arguments, and
19555         create a stream if reqested.
19556         (gnupg_create_inbound_pipe): Use the extended function to open the
19557         stream if requested.
19558         (gnupg_create_outbound_pipe): Likewise.
19559         (gnupg_create_pipe): Update call site.
19560
19561         common,w32: Make use of default_errsource in exechelp.
19562         + commit 727ca74bb942464217e678012cccbfc347ae08a5
19563         * common/exechelp-posix.c (my_error_from_syserror, my_error): New.
19564         Use them instead of gpg_error and gpg_error_from_syserror.
19565
19566 2016-10-18  NIIBE Yutaka  <gniibe@fsij.org>
19567             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
19568
19569         scd: Support ECC key generation.
19570         + commit 34439da2d62b964a914ace66bae7e38f619582a4
19571         * scd/app-openpgp.c (get_public_key): Fix a message.
19572         (change_keyattr_from_string, ecc_writekey): Call mpi_release sooner.
19573         (do_genkey): Add ECC support.
19574
19575 2016-10-18  NIIBE Yutaka  <gniibe@fsij.org>
19576
19577         scd: minor cleanup to merge other works.
19578         + commit f1845f25dbea79c191427710fa56ed01e63a045b
19579         * scd/iso7816.c (do_generate_keypair): Use const char * for DATA.
19580         (iso7816_generate_keypair, iso7816_read_public_key): Likewise.
19581         * scd/app-openpgp.c (get_public_key): Follow the change.
19582         (do_genkey): Ditto.  Use ERR instead of RC.  Use u32 for CREATED_AT.
19583
19584 2016-10-17  Justus Winter  <justus@g10code.com>
19585
19586         gpgscm: Initialize nesting stack.
19587         + commit c2e713d9e25ef8b61e8eeb3c01ee1e31cb70b794
19588         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize nesting
19589         stack.
19590
19591 2016-10-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19592
19593         doc: Document how to manually shut down gpg-agent.
19594         + commit 869c06efa791bbc8330becdb3f13f7cf9506257e
19595         * doc/gpg-agent.texi: document "gpgconf --kill gpg-agent" for manual
19596           agent termination.
19597
19598         This was requested in a side-comment in https://bugs.debian.org/840669
19599
19600         doc: Point gpg-agent(1) at the right gpg manpage in SEE ALSO.
19601         + commit c53ce53ab1fa6a328c368f2a15e3ccd803f03ee2
19602         * doc/gpg-agent.texi (SEE ALSO): refer to @gpgname, instead of
19603           hard-coding "gpg2".
19604
19605 2016-10-17  NIIBE Yutaka  <gniibe@fsij.org>
19606
19607         scd: Fix keytocard for ECC.
19608         + commit 25428be52168fa9c581b7f11c95a5c63b25343b7
19609         * scd/app-openpgp.c (build_ecc_privkey_template): Size can be greater
19610         than 128 when it comes with public key for curve of larger field.
19611
19612         gpgconf: Fix for --homedir.
19613         + commit 70a8584ec4389209762eb65bb77f20f7881577be
19614         * tools/gpgconf-comp.c (gpg_agent_runtime_change,
19615         scdaemon_runtime_change, dirmngr_runtime_change): Provide the homedir
19616         arguments by --homedir when it's not default.
19617
19618 2016-10-16  Werner Koch  <wk@gnupg.org>
19619
19620         agent: Use straightforward names for the default socket names.
19621         + commit 0b0f9a3788cb5d3c26cec16cd24acc973069d280
19622         * configure.ac (GPG_AGENT_SOCK_NAME): Change name to *.extra.
19623         (GPG_AGENT_EXTRA_SOCK_NAME): Change name to *browser.
19624
19625 2016-10-15  Werner Koch  <wk@gnupg.org>
19626
19627         agent: Move inotify code to common and improve it.
19628         + commit 2f7d4c38c9e7bcc14e6e0bf219d688c40a4afecb
19629         * common/sysutils.c: Include sys/inotify.h.
19630         (my_error_from_syserror, my_error): New.
19631         (gnupg_inotify_watch_socket): New.
19632         (gnupg_inotify_has_name): New.
19633         * agent/gpg-agent.c: Do not include sys/inotify.h.
19634         (my_inotify_is_name): Remove.
19635         (handle_connections): Remove HAVE_INOTIFY_INIT protected code and use
19636         the new functions.
19637
19638 2016-10-14  Kai Michaelis  <kai@gnupg.org>
19639
19640         dirmngr: use gnupg_mkdtemp instead of mkstemp.
19641         + commit c318561ef4c97f0c2767aef377531d58174060a1
19642         MinGW on debian does not support mkstemp.
19643
19644         dirmngr: add VERSIONCHECK command.
19645         + commit f99c5fa1c970dc1122ac62371eb8d758f380ed57
19646         Given an application name and version VERSIONCHECK fetches the software
19647         version list from version.gnupg.org, verifies the signature and returns
19648         whenever the given version is older (UPDATE), current (CURRENT) or newer
19649         (ROLLBACK).
19650
19651 2016-10-13  Neal H. Walfield  <neal@g10code.com>
19652
19653         tests: Use shorter filenames.
19654         + commit 0c56ad5a8d89d69a9ed00571720b3b105f955214
19655         * tests/openpgp/tofu/cross-sigs/
19656           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.gpg: Rename from this...
19657         * tests/openpgp/tofu/cross-sigs/EC38277E-1.gpg: .. to this.
19658         * tests/openpgp/tofu/cross-sigs/
19659           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.txt: Rename from this...
19660         * tests/openpgp/tofu/cross-sigs/EC38277E-1.txt: .. to this.
19661         * tests/openpgp/tofu/cross-sigs/
19662           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.gpg: Rename from this...
19663         * tests/openpgp/tofu/cross-sigs/EC38277E-2.gpg: .. to this.
19664         * tests/openpgp/tofu/cross-sigs/
19665           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.txt: Rename from this...
19666         * tests/openpgp/tofu/cross-sigs/EC38277E-2.txt: .. to this.
19667         * tests/openpgp/tofu/cross-sigs/
19668           1938C3A0E4674B6C217AC0B987DB2814EC38277E-3.txt: Rename from this...
19669         * tests/openpgp/tofu/cross-sigs/EC38277E-3.txt: .. to this.
19670         * tests/openpgp/tofu/cross-sigs/
19671           1938C3A0E4674B6C217AC0B987DB2814EC38277E-secret.gpg: Rename from
19672           this...
19673         * tests/openpgp/tofu/cross-sigs/EC38277E-secret.gpg: .. to this.
19674         * tests/openpgp/tofu/cross-sigs/
19675           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.gpg: Rename from this...
19676         * tests/openpgp/tofu/cross-sigs/871C2247-1.gpg: .. to this.
19677         * tests/openpgp/tofu/cross-sigs/
19678           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.txt: Rename from this...
19679         * tests/openpgp/tofu/cross-sigs/871C2247-1.txt: .. to this.
19680         * tests/openpgp/tofu/cross-sigs/
19681           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.gpg: Rename from this...
19682         * tests/openpgp/tofu/cross-sigs/871C2247-2.gpg: .. to this.
19683         * tests/openpgp/tofu/cross-sigs/
19684           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.txt: Rename from this...
19685         * tests/openpgp/tofu/cross-sigs/871C2247-2.txt: .. to this.
19686         * tests/openpgp/tofu/cross-sigs/
19687           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.gpg: Rename from this...
19688         * tests/openpgp/tofu/cross-sigs/871C2247-3.gpg: .. to this.
19689         * tests/openpgp/tofu/cross-sigs/
19690           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.txt: Rename from this...
19691         * tests/openpgp/tofu/cross-sigs/871C2247-3.txt: .. to this.
19692         * tests/openpgp/tofu/cross-sigs/
19693           DC463A16E42F03240D76E8BA8B48C6BD871C2247-4.gpg: Rename from this...
19694         * tests/openpgp/tofu/cross-sigs/871C2247-4.gpg: .. to this.
19695         * tests/openpgp/tofu/cross-sigs/
19696           DC463A16E42F03240D76E8BA8B48C6BD871C2247-secret.gpg: Rename from
19697           this...
19698         * tests/openpgp/tofu/cross-sigs/871C2247-secret.gpg: .. to this.
19699         * tests/openpgp/Makefile.am (TEST_FILES): Update accordingly.
19700
19701         g10: Be more careful when checking if a binding is signed by a UTK.
19702         + commit 95d0f3e5eebd85dcf226dca14891a1215bfe93ae
19703         * g10/tofu.c (signed_by_utk): When checking if a key is signed by an
19704         ultimately trusted key, only consider the signatures on the specified
19705         user id.
19706         * tests/openpgp/tofu.scm: Add test for the above.
19707
19708         tests: Add test data to TEST_FILES.
19709         + commit d2d936fbe86d61b89cead95df633b2b575690e05
19710         * tests/openpgp/Makefile.am (TEST_FILES): Add new test data.
19711
19712         g10: Be more careful when checking cross signatures.
19713         + commit 4c0389f8eb19ae7dfd9c5d784a629b386d93cc5c
19714         * g10/tofu.c (cross_sigs): When checking cross signatures, only
19715         consider the signatures on the specified user id.
19716         * tests/openpgp/tofu.scm: Add test for the above.
19717         * tests/openpgp/tofu/cross-sigs/
19718           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.gpg:
19719           New file.
19720         * tests/openpgp/tofu/cross-sigs/
19721           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.txt: New file.
19722         * tests/openpgp/tofu/cross-sigs/
19723           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.gpg: New file.
19724         * tests/openpgp/tofu/cross-sigs/
19725           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.txt: New file.
19726         * tests/openpgp/tofu/cross-sigs/
19727           1938C3A0E4674B6C217AC0B987DB2814EC38277E-3.txt: New file.
19728         * tests/openpgp/tofu/cross-sigs/
19729           1938C3A0E4674B6C217AC0B987DB2814EC38277E-secret.gpg: New file.
19730         * tests/openpgp/tofu/cross-sigs/
19731           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.gpg: New file.
19732         * tests/openpgp/tofu/cross-sigs/
19733           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.txt: New file.
19734         * tests/openpgp/tofu/cross-sigs/
19735           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.gpg: New file.
19736         * tests/openpgp/tofu/cross-sigs/
19737           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.txt: New file.
19738         * tests/openpgp/tofu/cross-sigs/
19739           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.gpg: New file.
19740         * tests/openpgp/tofu/cross-sigs/
19741           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.txt: New file.
19742         * tests/openpgp/tofu/cross-sigs/
19743           DC463A16E42F03240D76E8BA8B48C6BD871C2247-4.gpg: New file.
19744         * tests/openpgp/tofu/cross-sigs/
19745           DC463A16E42F03240D76E8BA8B48C6BD871C2247-secret.gpg: New file.
19746         * tests/openpgp/tofu/cross-sigs/README: New file.
19747
19748         g10: Still check if the key is an UTK or cross signed in batch mode.
19749         + commit e09166c77273f459c8f87cab9224f85808af2cba
19750         * g10/tofu.c (get_trust): If POLICY is ask, but we can't ask, don't
19751         bail immediately.  Instead, check if the key in question is an
19752         ultimately trusted key or cross signed.
19753
19754         g10: If an sqlite operation fails, map the error code to GPG_ERR_GENERAL
19755         + commit 5bf92e51dfdfb4f4746ecd817d8d2240ed27ea74
19756         * g10/tofu.c (get_policy): If an sqlite operation fails, map the error
19757           code to GPG_ERR_GENERAL.
19758         (ask_about_binding): Likewise.
19759         (build_conflict_set): Likewise.
19760         (get_trust): Likewise.
19761         (show_statistics): Likewise.
19762         (tofu_register_signature): Likewise.
19763         (tofu_register_encryption): Likewise.
19764
19765         tests: Remove support for deprecated functionality.
19766         + commit 2282c3b761413dfa894300e70084bbd58908c0b1
19767         * tests/openpgp/tofu.scm: Don't remove tofu.d.  It's deprecated.
19768
19769 2016-10-12  Neal H. Walfield  <neal@g10code.com>
19770
19771         g10: When changing a TOFU binding's policy, update the conflict info.
19772         + commit 3ad17e72fa81d18c95732ddcd4def244f52bb5b1
19773         * g10/tofu.c (record_binding): Take an additional argument, CONFLICT.
19774         Set the binding's conflict accordingly.  Update callers.
19775
19776         g10: Make a singular string singular.
19777         + commit ca84f65c7cf2c6a08a01018519965a82e6c52cac
19778         * g10/tofu.c (ask_about_binding): Make the singular string singular.
19779
19780         g10: Correctly determine whether a binding has a conflict.
19781         + commit 6fdf37f0831949cb279de6dc6b247ab2ed53fe5a
19782         * g10/tofu.c (build_conflict_set): A binding has a conflict is
19783         conflict is *not* NULL, not if it is NULL.
19784
19785         g10: Fix a column's type in TOFU DB.
19786         + commit 78eda335fd1c29038b74b9cc912b6a4515fccd9f
19787         * g10/tofu.c (initdb): Change policy from a boolean to an integer.
19788
19789 2016-10-07  Justus Winter  <justus@g10code.com>
19790
19791         tests: Rework test environment setup.
19792         + commit cbbf0a7a8da1757fea29cff0daaa42a6bbb95b26
19793         * tests/openpgp/setup.scm: Import one keyring at a time.  This works
19794         around a yet to be investigated hang on Windows.  It is also much
19795         prettier.
19796
19797         tests: Improve handling of Windows newlines.
19798         + commit 1f76f8d8bc65fad98927c977baf4d5e36dafe52b
19799         * tests/gpgscm/lib.scm (string-split-newlines): New function.
19800         * tests/openpgp/default-key.scm: Use new function.
19801         * tests/openpgp/defs.scm: Likewise.
19802         * tests/openpgp/export.scm: Likewise.
19803         * tests/openpgp/import.scm: Likewise.
19804
19805         gpgscm: Improve test of low-level functions.
19806         + commit 11eac7eb2fa3392a9aa052f8f5bb9875129ab84b
19807         * tests/gpgscm/t-child.c: Print large amounts of data.
19808         * tests/gpgscm/t-child.scm: Test that this works.
19809
19810         gpgscm: Improve path handling.
19811         + commit dff266059813d22d1e2ba7e77279999cd41ceb75
19812         * tests/gpgscm/ffi.c (ffi_init): New Scheme variable '*win32*'.
19813         * tests/gpgscm/tests.scm (canonical-path): Correctly handle paths with
19814         drive letter on Windows.  Use 'path-join'.
19815         (path-expand): Use 'path-join'.
19816
19817         tools: Fix error handling.
19818         + commit 5afbfdfd59540cb882d891ff1f4afa73fe48f99a
19819         * tools/gpgtar-create.c (gpgtar_create): Do not crash if opening the
19820         tarball failed.
19821
19822 2016-10-07  NIIBE Yutaka  <gniibe@fsij.org>
19823
19824         agent: Fix get_socket_name.
19825         + commit fb3b3e1e7a4219f61a834fd07809898918611c2f
19826         * agent/gpg-agent.c (get_socket_name): Fix the size of copying.
19827
19828 2016-10-07  Werner Koch  <wk@gnupg.org>
19829
19830         gpg: Put extra parens around bit tests.
19831         + commit 5d43d28aa3c44c3a27fde823f467b0c4be1a58c2
19832         * g10/options.h (DBG_MPI): New.
19833         * g10/gpg.c (set_debug): Use macro or extra parens for binary operator.
19834         * g10/parse-packet.c (set_packet_list_mode): Use dbg macro.
19835
19836 2016-10-07  NIIBE Yutaka  <gniibe@fsij.org>
19837
19838         agent, dirmngr, scd: Fix init_common_subsystems.
19839         + commit fc0b392e766af8127094e8b529d25abb84ad1d65
19840         * common/init.c (_init_common_subsystems): Don't call
19841         gpgrt_set_syscall_clamp in this function.
19842         * agent/gpg-agent.c, dirmngr/dirmngr.c, scd/scdaemon.c: Call
19843         gpgrt_set_syscall_clamp after npth_init.
19844
19845 2016-10-06  Justus Winter  <justus@g10code.com>
19846
19847         common: Avoid pointer arithmetic on string literals.
19848         + commit 4aadc751f201f8f97c9c1f454e3a29803cce3edb
19849         * common/gettime.c (rfctimestamp): Use indexing instead.
19850         * common/signal.c (got_fatal_signal): Likewise.
19851
19852         g10: Fix singular term.
19853         + commit b0d2526bc4e5c663eeffe04500420c70cee98712
19854         * g10/tofu.c (ask_about_binding): Fix singular message.
19855
19856         g10: Use appropriate variant of 'abs'.
19857         + commit 73000d1ce0317210f5a9e5262404cc90258041ff
19858         * g10/tofu.c (ask_about_binding): Use 'labs' instead of 'abs'.
19859
19860         sm: Remove statement without effect.
19861         + commit 2d446759bd43ae38fbce9a18c955285ca535bc08
19862         * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Remove statement without
19863         effect.
19864
19865         g10: Fix testing for debug flag.
19866         + commit 6b626824c8e30b41c47724b5ccbf761937499512
19867         * g10/parse-packet.c (set_packet_list_mode): Fix testing for debug
19868         flag.
19869
19870         tools: Improve error handling.
19871         + commit 32f81f56a8be6d13dea0a64d24f52343c7e72c84
19872         * tools/gpg-wks-server.c (copy_key_as_binary): Initialize 'argv'.
19873
19874         gpgscm: Update callsite of 'gnupg_spawn_process'.
19875         + commit 07cfb3b27a77491eae818d57f6eb660e75fa013f
19876         * tests/gpgscm/ffi.c (do_spawn_process): Adapt to the changes to
19877         'gnupg_spawn_process'.
19878
19879 2016-10-05  Werner Koch  <wk@gnupg.org>
19880
19881         wks: Send key encrypted as required by draft -02.
19882         + commit 8ce800d21919eaaba7ed4f04f712292be310fd66
19883         * tools/gpg-wks-client.c (get_key): Encrypt.
19884         (encrypt_response): Take care of --fake-submission-addr.
19885
19886         wks: Add option --fake-submission-addr to gpg-wks-client.
19887         + commit e514a5b725f0c997cef4362808b2778a3faa9cf8
19888         * tools/gpg-wks-client.c (oFakeSubmissionAddr): New.
19889         (opts): Add option --fake-submission-addr.
19890         (fake_submission_addr): New variable.
19891         (parse_arguments): Set it.
19892         (command_send): Use --fake-submission-addr.
19893
19894         agent: Another minor fix to map_supervised_sockets.
19895         + commit 1cedc32c95c2e3c3ab98af23ddc2845d51e596c1
19896         * agent/gpg-agent.c (map_supervised_sockets): Remove debug message.
19897         Provide correct fd in the second error case.
19898
19899         agent: Fix npth + supervised mode problem.
19900         + commit f57dc2b1e6f28d164f882373535dbcb0d632ca17
19901         * agent/gpg-agent.c (main): Initialize modules in supervised mode.
19902
19903 2016-10-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19904
19905         agent: Fix error handling in map_supervised_sockets.
19906         + commit a2127c71dbf87c1710b43d91a733dd4c9b2953bc
19907         * agent/gpg-agent.c (map_supervised_sockets): the file descriptor to
19908           close on error is fd, not i.
19909
19910 2016-10-04  Werner Koch  <wk@gnupg.org>
19911
19912         agent: Streamline the supervised mode code.
19913         + commit 1a9c8d78ece2f31fdb1a8e2be049aa71053061fa
19914         * agent/gpg-agent.c (get_socket_path): Rename to ...
19915         (get_socket_name): this.  This is to comply with the GNU coding guide.
19916         Use xtrymalloc instead of malloc.  Do not build for W32.
19917         (map_supervised_sockets): Use strtokenize and set the the socket names
19918         here.
19919         (main): Adjust for above change.  Do not close the socket.
19920
19921         agent: Adjust cleanup for supervised mode.  Fix for W32.
19922         + commit afcfae7959f39e7d85309b9496e1f1cf9acd5cc2
19923         * agent/gpg-agent.c (opts) [W32]: Remove option --supervised.
19924         (is_supervised): Move from main() to global.
19925         (inhibit_socket_removal): New.
19926         (cleanup): Take care of supervise mode and INHIBIT_SOCKET_REMOVAL.
19927         (check_own_socket_thread): Set INHIBIT_SOCKET_REMOVAL instead of
19928         seting the socket names to empty.
19929
19930         agent: Adjust supervised mode for the new default socket names.
19931         + commit dc059af1ff007842e2633e686c87d05daf1d45e3
19932         * agent/gpg-agent.c (main): In supervised mode do not provide default
19933         socket names.  Unset DISPLAY and INSIDE_EMACS.  Use log_error and
19934         agent_exit.
19935
19936 2016-10-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
19937
19938         agent: Implement --supervised command (for systemd, etc).
19939         + commit 9f92b62a51d2d60f038fdbe01602865c5933fa95
19940         * agent/gpg-agent.c (get_socket_path): New function for POSIX systems
19941         to return the path for a provided unix-domain socket.
19942         (map_supervised_sockets): New function to inspect $LISTEN_FDS and
19943         $LISTEN_FDNAMES and map them to the specific functionality offered by
19944         the agent.
19945         (main): Add --supervised command.  When used, listen on already-open
19946         file descriptors instead of opening our own.
19947         * doc/gpg-agent.texi: Document --supervised option.
19948
19949 2016-10-04  Justus Winter  <justus@g10code.com>
19950
19951         build,w32: Unconditionally build tests.
19952         + commit 4a232d23a8f51bebf9ee382e480248b4bde30f28
19953         * configure.ac (run_tests, RUN_TESTS, RUN_GPG_TESTS): Remove
19954         variables.  They are misleadingly named, as they inhibit building the
19955         tests.  There is no reason not to build the tests even when
19956         cross-compiling, as they are only run if one does 'make check'.
19957         * Makefile: Adapt accordingly.
19958         * tests/Makefile.am: Adapt accordingly.  Avoid building 'asschk' on
19959         Windows as it uses non-portable functions.
19960
19961         tests,w32: Do not expose 'glob' to gpgscm.
19962         + commit 41b510f9c510f8fd1b59eb0c5dd2e2b2deaf0a1b
19963         * tests/gpgscm/ffi.c (do_glob): Remove function.
19964         (ffi_init): Likewise.
19965
19966         tests,w32: Avoid using 'glob'.
19967         + commit 949e70115eb2c04bd09da6477f6c433e6fd9a366
19968         * tests/openpgp/setup.scm: Avoid 'glob' which is not available on
19969         mingw.
19970
19971         tools: Ignore existing directories in gpgtar.
19972         + commit fbc83c0cdd390473c044953fb774571ffc636c6d
19973         * tools/gpgtar-extract.c (extract_directory): Ignore existing
19974         directories now that we have '--directory'.
19975
19976 2016-10-04  NIIBE Yutaka  <gniibe@fsij.org>
19977
19978         agent, dirmngr, scd: npth_init must be after fork.
19979         + commit eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d
19980         * agent/gpg-agent.c (thread_init_once, initialize_modules): New.
19981         (main): Make sure no daemonizing-fork call after npth_init, and no npth
19982         calls before npth_init, with care of npth calls by assuan hooks.
19983         * dirmngr/dirmngr.c (thread_init): New.
19984         (main): Make sure npth_init must not be called before daemonizing fork.
19985         * scd/scdaemon.c (main): Likewise.
19986
19987 2016-09-30  Werner Koch  <wk@gnupg.org>
19988
19989         agent: Remove the warning for the GKR hijacking.
19990         + commit a43739a2456a38c01704d8a52dca441055e29bc6
19991         * g10/call-agent.c (check_hijacking): Remove.
19992         (start_agent): Remove call.
19993
19994         agent: Create the extra sockets in the standard socket dir.
19995         + commit 80cc16e0728256f6b07a12980e1f3512cf2324fa
19996         * agent/gpg-agent.c (main): Take the socketdir in account for the
19997         default sockets.
19998         * tools/gpgconf.c (list_dirs): Add "agent-extra-socket" and
19999         "agent-browser-socket".
20000
20001         agent: Kludge to allow disabling of the extra sockets.
20002         + commit 95cf7afff074613825f4442fa131145a2c0d3cf7
20003         * agent/gpg-agent.c (main): Check for special socket names.
20004
20005         wks: Avoid long trustdb checks.
20006         + commit de67055aff916455cec89fab1d95177d3b383008
20007         * tools/wks-receive.c (verify_signature): Use --always-trust.
20008
20009 2016-09-30  Justus Winter  <justus@g10code.com>
20010
20011         build: Fix build against libiconv.
20012         + commit 6054e8aaecbd355bb7559697eecaadf2225189b8
20013         * agent/Makefile.am: Add INCICONV and LIBICONV.
20014         * common/Makefile.am: Likewise.
20015         * tools/Makefile.am: Likewise.
20016
20017         agent: Enable restricted, browser, and ssh socket by default.
20018         + commit e11686f973b35869d7b299ce4726003ac22e2e3a
20019         * agent/gpg-agent.c (main): Provide defaults for 'extra-socket' and
20020         'browser-socket', enable ssh socket by default, but do not emit the
20021         'SSH_AUTH_SOCK' variable unless it has been explicitly requested.
20022         * configure.ac (GPG_AGENT_{EXTRA,BROWSER}_SOCK_NAME): New definitions.
20023         * doc/gpg-agent.texi: Update documentation.
20024
20025         w32: Fix STARTTLS on LDAP connections.
20026         + commit 8d37018050373a47566bf8ea0d894da20ed292c7
20027         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Fix build against
20028         <winldap.h>.
20029
20030 2016-09-29  Werner Koch  <wk@gnupg.org>
20031
20032         wks: Partly implement draft-koch-openpgp-webkey-service-02.
20033         + commit 33800280da55a859e08dfa57f29144c89dd1bead
20034         * tools/gpg-wks.h (WKS_RECEIVE_DRAFT2): New.
20035         * tools/wks-receive.c: Include rfc822parse.h.
20036         (struct receive_ctx_s): Add fields PARSER, DRAFT_VERSION_2, and
20037         MULTIPART_MIXED_SEEN.
20038         (decrypt_data): Add --no-options.
20039         (verify_signature): Ditto.
20040         (new_part): Check for Wks-Draft-Version header.  Take care of text
20041         parts.
20042         (wks_receive): Set Parser and pass a flag value to RESULT_CB.
20043         * tools/gpg-wks-client.c (read_confirmation_request): New.
20044         (main) <aRead>: Call read_confirmation_request instead of
20045         process_confirmation_request.
20046         (command_receive_cb): Ditto.  Add arg FLAGS..
20047         (decrypt_stream_status_cb, decrypt_stream): New.
20048         (command_send): Set header Wks-Draft-Version.
20049         * tools/gpg-wks-server.c (struct server_ctx_s): Add field
20050         DRAFT_VERSION_2.
20051         (sign_stream_status_cb, sign_stream): New.
20052         (command_receive_cb): Set draft flag.
20053         (send_confirmation_request): Rework to implement protocol draft
20054         version 2.
20055
20056         * tools/gpg-wks.h (DBG_MIME_VALUE, DBG_PARSER_VALUE): New.
20057         (DBG_MIME, DBG_PARSER, DBG_CRYPTO): New.  Use instead of a plain
20058         opt.debug where useful.
20059         * tools/gpg-wks-client.c (debug_flags): Add "mime" and "parser".
20060         * tools/gpg-wks-server.c (debug_flags): Ditto.
20061
20062         tools: Convey signeddata also to the part_data callback in mime-parser.
20063         + commit c738f92c195d91662ddc7848cc3c92c7f091f1f8
20064         * tools/mime-parser.c (mime_parser_parse): Factor some code out to ...
20065         (process_part_data): new.
20066         ((mime_parser_parse): Also call process_part_data for signed data.
20067
20068         tools: Allow retrieval of signed data from mime-maker.
20069         + commit f776757ea94542e2f425840dddaf3e65b0ff7757
20070         * tools/mime-maker.c (find_part): New.
20071         (mime_maker_get_part): New.
20072
20073         tools: Change mime-maker to write out CR,LF.
20074         + commit 29db3be6e8dbc9b4dd52cd1781106fa9fa3954a5
20075         * tools/mime-maker.c (struct part_s): Add field PARTID.
20076         (struct mime_maker_context_s): Add field PARTID_COUNTER.
20077         (dump_parts): Print part ids.
20078         (mime_maker_add_header): Assign PARTID.
20079         (mime_maker_add_container): Ditto.
20080         (mime_maker_get_partid): New.
20081         (write_ct_with_boundary): Remove.
20082         (add_header): Strip trailing white spaces.
20083         (write_header): Remove trailing spaces trimming.  Add arg BOUNDARY.
20084         Handle emdedded LFs.
20085         (write_gap, write_boundary, write_body): New.
20086         (write_tree): Use new functions.
20087
20088         tools: Simplify the mime-maker container creation.
20089         + commit 95d60c6ce9e8a7a7741553af957978c1f91547c5
20090         * tools/mime-maker.c (struct part_s): Remove field MEDIATYPE.
20091         (release_parts): Ditto.
20092         (dump_parts): Print a body line only if tehre is a body.
20093         (mime_maker_add_header): Check for body or container.
20094         (mime_maker_add_container): Remove arg MEDIATYPE.  Change all callers.
20095         (mime_maker_end_container): New.
20096
20097         tools: Give mime parser callbacks access to the rfc822 parser.
20098         + commit 4ac138c84d0f344ca9442f90c96f0e1f76062a4a
20099         * tools/mime-parser.c (mime_parser_context_s): Add field MSG.
20100         (parse_message_cb): Set it.
20101         (mime_parser_rfc822parser): New.
20102         * tools/mime-parser.h: Declare rfc822parse_t for the new prototype.
20103
20104 2016-09-29  Justus Winter  <justus@g10code.com>
20105
20106         dirmngr: Fix STARTTLS on LDAP connections.
20107         + commit 9e6f8a55ed04f876635792125858ee76a948802a
20108         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Fix unfortunate typo.
20109
20110 2016-09-28  Werner Koch  <wk@gnupg.org>
20111
20112         gpg: Improve WKD by importing only the requested UID.
20113         + commit cbf2ac66692daa7a324108724698d60d6c7e473f
20114         * g10/keyserver.c: Include mbox-util.h.
20115         (keyserver_import_wkd): Do not use the global import options but
20116         employ an import filter.
20117
20118         gpg: Reject import if an import filter removed all user ids.
20119         + commit 80393661bdfa7ae0288644513575e8a5d708b084
20120         * g10/import.c (any_uid_left): New.
20121         (import_one): Check that a UID is left.
20122
20123         gpg: Make import filter data object more flexible.
20124         + commit c9237bf2ba2c49588576dcece756ebf5fe89aada
20125         * g10/main.h (import_filter_t): New.
20126         * g10/import.c (struct import_filter_s): Declare struct.
20127         (import_keep_uid, import_drop_sig): Replace by ...
20128         (import_filter): new.  Adjust all users.
20129         (cleanup_import_globals): Move code to ...
20130         (release_import_filter): new.
20131         (save_and_clear_import_filter): New.
20132         (restore_import_filter): New.
20133
20134         gpg: Make sure that internal key import is done with a binary stream.
20135         + commit 829949f3823c2306022928ce782f9c9d9c5f1cc8
20136         * g10/import.c (import_keys_internal): Open stream in binary mode.
20137
20138 2016-09-27  Justus Winter  <justus@g10code.com>
20139
20140         build: Do not link gpg-connect-agent against npth.
20141         + commit 20a16833ee2bb05f735377f705899302bcf2b4d3
20142         * tools/Makefile.am: Do not link gpg-connect-agent against npth.
20143
20144         build: Fix check for resolver library on macOS.
20145         + commit 2e64ccb0f96d615b1eb87e37f230a5d761aa9c36
20146         * configure.ac: Check for the mangled name of 'dn_skipname' first.
20147
20148         common: Correctly handle modules relying on npth.
20149         + commit 2b23a321ac0b07beeac1dfa8d71f223e66c49b71
20150         * common/Makefile.am (common_sources): Drop 'call-gpg.{c,h}'.
20151         (with_npth_sources): New variable.
20152         (libcommonpth_a_SOURCES): Use the new variable.
20153
20154 2016-09-27  NIIBE Yutaka  <gniibe@fsij.org>
20155
20156         agent, sm: Set CTX after start_agent.
20157         + commit 4e4843e735f32b5e79a51d8062da55bfaab6ad77
20158         * g10/call-agent.c (agent_keytocard): Assign parm.ctx after start_agent.
20159         * sm/call-agent.c (gpgsm_agent_pksign, gpgsm_scd_pksign)
20160         (gpgsm_agent_readkey, gpgsm_agent_scd_serialno)
20161         (gpgsm_agent_scd_keypairinfo, gpgsm_agent_marktrusted)
20162         (gpgsm_agent_passwd, gpgsm_agent_get_confirmation)
20163         (gpgsm_agent_ask_passphrase, gpgsm_agent_keywrap_key)
20164         (gpgsm_agent_export_key): Likewise.
20165
20166         dirmngr: Removal of no-libgcrypt.o.
20167         + commit 836b72363168cbb0051fc2356f61788468db211c
20168         * dirmngr/Makefile.am (dirmngr_ldap_LDADD): Remove no-libgcrypt.o.
20169
20170         agent: Allow only specific digest size for ECDSA.
20171         + commit 98bc6f480ac973dccce90378dc021a2e24e58704
20172         * agent/pksign.c (do_encode_dsa): Fix validation of digest size.
20173
20174 2016-09-22  Neal H. Walfield  <neal@g10code.com>
20175
20176         g10: When adding a user id, make sure the keyblock has been prepared.
20177         + commit df5353b95eefc13135e7df50a7c197f270d6080d
20178         * g10/keyedit.c (keyedit_quick_adduid): Call merge_keys_and_selfsig on
20179         KEYBLOCK before adding the user id.
20180         * tests/openpgp/quick-key-manipulation.scm: Make sure that the key
20181         capabilities don't change when adding a user id.
20182         (key-data): New function.
20183
20184 2016-09-20  Justus Winter  <justus@g10code.com>
20185
20186         tests: Add documentation, make interactive debugging possible.
20187         + commit 7e0379a75475abfd15e0623913795779ff0f40d7
20188         * tests/openpgp/README: Add documentation about debugging and
20189         interfacing with GnuPG.
20190         * tests/openpgp/run-tests.scm (test::run-sync): Hand stdin to the
20191         child so that we can use a repl in the tests.
20192
20193         tests: Port the quick key manipulation test to Scheme.
20194         + commit 6c4c0e3ac2aeafba7a2b7c2dd92a18be8aec92b1
20195         * tests/openpgp/Makefile.am (XTESTS): Add new test.
20196         * tests/openpgp/quick-key-manipulation.scm: New file.
20197
20198         tests: Remove list of tests from the test runner.
20199         + commit 49fae88fd170f2bdc12a1794a2637260e3c73a73
20200         * tests/openpgp/run-tests.scm: Drop hardcoded list.
20201
20202         tests: Reduce runtime of excessive test.
20203         + commit 988a04b98d42ff9cc9e62007ebcc0e4c03f4047d
20204         * tests/openpgp/conventional-mdc.scm: Use only two plaintexts when
20205         iterating over all cipher algorithms.
20206
20207         dirmngr: Fix type.
20208         + commit 285d193f1e1464495bce57bd0f323468515b4513
20209         * dirmngr/dns-stuff.c (get_dns_cert): Fix type in fallback code.
20210
20211 2016-09-20  Andre Heinecke  <aheinecke@intevation.de>
20212
20213         dirmngr: Open file CRL's in binary mode.
20214         + commit 4644c27514f34f5efc555d43672a25088a611a72
20215         * dirmngr/crlcache.c (crl_cache_load): Open file in binary mode.
20216
20217 2016-09-20  NIIBE Yutaka  <gniibe@fsij.org>
20218
20219         doc: Fix a xref usage.
20220         + commit b9b4ff857034df51e055ceddce567ca97e94e075
20221
20222
20223 2016-09-20  Ineiev  <ineiev@gnu.org>
20224
20225         doc: Do not end section names with "."
20226         + commit 8078d8246fa38c3e478fc9a542117468780ace00
20227
20228
20229 2016-09-20  NIIBE Yutaka  <gniibe@fsij.org>
20230
20231         doc: minor fix for @xref.
20232         + commit 9c1b3bc25a1b38c4eda31bf12ccc10d94bb05212
20233         * doc/yat2m.c (proc_texi_cmd): Captalize "see" for xref.
20234
20235 2016-09-20  Justus Winter  <justus@g10code.com>
20236
20237         doc: Implement simple '@ref'erences.
20238         + commit 91d5e6f805aaf24a3f1f03a95998f757dce04cb2
20239         * doc/yat2m.c (proc_texi_cmd): Handle '@ref'.
20240
20241 2016-09-20  Ineiev  <ineiev@gnu.org>
20242
20243         doc: Fix full stops.
20244         + commit 0eaab1af48f600b636183321e4a4e9c6bc361610
20245         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
20246         doc/instguide.texi, doc/scdaemon.texi, doc/specify-user-id.texi,
20247         doc/tools.texi: Fix.
20248
20249         doc: Fix spacings.
20250         + commit 32bcf8b73ede9c8f1469821a54dedc6be75241d2
20251         * doc/debugging.texi, doc/dirmngr.texi, doc/gpg-agent.texi,
20252         doc/gpg.texi, doc/tools.texi: Fix.
20253
20254         doc: Improve markup.
20255         + commit 377624207e9b2895ce00dfc4d1163d72f349841f
20256         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
20257         doc/howto-create-a-server-cert.texi, doc/scdaemon.texi,
20258         doc/specify-user-id.texi, doc/tools.texi: Fix.
20259
20260         doc: Replace rfc0123 with RFC-0123.
20261         + commit 9d2b7bff12b268638465da222ca7cc9042bba072
20262         * doc/gpg.texi, doc/gpgsm.texi, doc/specify-user-id.texi: Fix.
20263
20264         doc: Add missing description of datafile.
20265         + commit 789916281c25e737d8fb44add5ca61f8fd25de2f
20266         * doc/gpg.texi: Fix.
20267
20268         doc: Replace UTF8 with UTF-8.
20269         + commit 00d6d8bc8772e48b6f200d359e11eb93ab65f51f
20270         * doc/gpg.texi: Fix.
20271
20272         doc: Fix mistakes.
20273         + commit f25e04005af5831053ba194a09e3afa48d1e162b
20274         * doc/dirmngr.texi, doc/gpg.texi, doc/gpgsm.texi,
20275         doc/howto-create-a-server-cert.texi,
20276         doc/scdaemon.texi, doc/tools.texi: Fix.
20277
20278         doc: Eliminate inconsistent UK English.
20279         + commit 825c1dfb3ee4c1704f42eaf064161b9731c20134
20280         * doc/dirmngr.texi, doc/gpg-agent.texi, doc/scdaemon.texi,
20281         doc/tools.texi: Fix.
20282
20283         doc: Use the right reference commands.
20284         + commit f32689f833838a742243e94c900e98f5b59a5811
20285         * doc/debugging.texi, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
20286         doc/tools.texi: Fix.
20287
20288         doc: Fix "Not(e) that you can(not) abbreviate".
20289         + commit 20a27d8a57c4c990fcada4278a1ce2e6fc9043e9
20290         * doc/dirmngr.texi, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
20291         doc/scdaemon.texi, doc/tools.texi: Fix.
20292
20293         doc: Fix typos.
20294         + commit fa346508fe323e61cf157ee30c13301e1d2117c0
20295         * doc/debugging.texi, doc/dirmngr.texi, doc/glossary.texi
20296         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi
20297         * doc/instguide.texi, doc/opt-homedir.texi, doc/scdaemon.texi
20298         * doc/specify-user-id.texi, doc/tools.texi: Fix.
20299
20300         doc: Fix Martin Hellman's name.
20301         + commit 858af2b3473e436af53470d53cdac334edce9f09
20302         * doc/contrib.texi: Fix.
20303
20304 2016-09-19  Justus Winter  <justus@g10code.com>
20305
20306         tests: Refine the repl function.
20307         + commit 884e78efe1f3ba50513bf81c8b4804d22b25eac4
20308         * tests/gpgscm/repl.scm (repl): Add an argument 'environment'.
20309         (interactive-repl): Add an optional argument 'environment'.
20310
20311         tests: Implement interpreter shutdown using exceptions.
20312         + commit 9a0659a65c52378de1c4736a0eddf8518eb20948
20313         * tests/gpgscm/ffi.c (ffi_init): Rename 'exit' to '_exit'.
20314         * tests/gpgscm/ffi.scm (*interpreter-exit*): New variable.
20315         (throw): New function.
20316         (exit): New function.
20317
20318         tests: Correctly handle exceptions in resource handling macros.
20319         + commit 58007e52593e6b0f838de2e464ceeacf22757018
20320         * tests/gpgscm/tests.scm (letfd): Correctly release resources when an
20321         exception is thrown.
20322         (with-working-directory): Likewise.
20323         (with-temporary-working-directory): Likewise.
20324         (lettmp): Likewise.
20325
20326         tests: Refine exception handling.
20327         + commit ab483eff9a8254adf127cdee178e14ba74f0a2b3
20328         * tests/gpgscm/init.scm (catch): Bind all arguments to '*error*' in
20329         the error handler, update and fix comment.
20330         (*error-hook*): Revert to original definition.
20331         * tests/gpgscm/tests.scm (tr:do): Adapt accordingly.
20332         * tests/openpgp/issue2419.scm: Likewise.
20333
20334         tests: Use descriptive temporary file names.
20335         + commit 83a406b38a21d0eeb4963db824a27783c212d2fb
20336         * tests/gpgscm/ffi.c (do_get_isotime): New function.
20337         (ffi_init): Add parameter 'scriptname', bind new function and
20338         scriptname.
20339         * tests/gpgscm/ffi.h (ffi_init): Update prototype.
20340         * tests/gpgscm/main.c (main): Hand in the script name.
20341         * tests/gpgscm/tests.scm (mkdtemp): Use current time and script name
20342         for the names of temporary directories.
20343
20344 2016-09-19  Werner Koch  <wk@gnupg.org>
20345
20346         gpg: Fix regression in fingerprint printing.
20347         + commit 998643666c016dbacf10f813c22efc97deadec65
20348         * g10/keylist.c (list_keyblock_print): Do not depend calling
20349         print_fingerprint on opt.keyid_format.
20350
20351         dirmngr: Silence diagnostics about starting housekeeping.
20352         + commit 5bf1facc973eb6e0bfab0f8f17129534dec56e04
20353         * dirmngr/dirmngr.c (housekeeping_thread): Print info only in very
20354         verbose mode.
20355
20356 2016-09-19  Justus Winter  <justus@g10code.com>
20357
20358         g10: Fix memory leak.
20359         + commit 086d219d96caa3501048aff82a282481e07c195b
20360         * g10/tofu.c (build_conflict_set): Free 'kb_all'.
20361
20362 2016-09-19  Werner Koch  <wk@gnupg.org>
20363
20364         doc: Update license information.
20365         + commit 3899041cd2877ce9584c7bd149f232f35a07c399
20366         * tests/fake-pinentries/COPYING: Rename to  ...
20367         * COPYING.CC0: this.  Add a note on the scope of this license.
20368         * COPYING.LIB: Add a note on the scope of this license.
20369         * AUTHORS (License): Mention CC) license.
20370
20371         gpgscm: Fix gcrypt version check.
20372         + commit 47baeac50ccaaf06dc8b0cebece50f47754de6ca
20373         * tests/gpgscm/main.c (main): Check against required and not installed
20374         version.
20375
20376         gpg: Avoid malloc failure due to no key signatures.
20377         + commit 18bbefa27f9e47e1062ee4d7af09487632795ba7
20378         * g10/keyedit.c (check_all_keysigs): Check early for no key
20379         signatures.  Use xtrycalloc.
20380
20381 2016-09-17  NIIBE Yutaka  <gniibe@fsij.org>
20382
20383         Fix comment and format.
20384         + commit 7305d27f36148a7fb8c2f4ef5b94774cbd21b18e
20385         * agent/protect-tool.c (main): Fix comment.
20386         * doc/DETAILS (colon listings): Fix list.
20387         * tests/openpgp/multisig.test: Fix comment.
20388
20389 2016-09-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20390
20391         Fix more spelling.
20392         + commit 0d67241e317b172a258a910c02d90639e2b08fce
20393         * NEWS, acinclude.m4, agent/command-ssh.c, agent/command.c,
20394           agent/gpg-agent.c, agent/keyformat.txt, agent/protect-tool.c,
20395           common/asshelp.c, common/b64enc.c, common/recsel.c, doc/DETAILS,
20396           doc/HACKING, doc/Notes, doc/TRANSLATE, doc/dirmngr.texi,
20397           doc/faq.org, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
20398           doc/instguide.texi, g10/armor.c, g10/gpg.c, g10/keyedit.c,
20399           g10/mainproc.c, g10/pkclist.c, g10/tofu.c, g13/sh-cmd.c,
20400           g13/sh-dmcrypt.c, kbx/keybox-init.c, m4/pkg.m4, sm/call-dirmngr.c,
20401           sm/gpgsm.c, tests/Makefile.am, tests/gpgscm/Manual.txt,
20402           tests/gpgscm/scheme.c, tests/openpgp/gpgv-forged-keyring.scm,
20403           tests/openpgp/multisig.test, tests/openpgp/verify.scm,
20404           tests/pkits/README, tools/applygnupgdefaults,
20405           tools/gpg-connect-agent.c, tools/mime-maker.c, tools/mime-parser.c:
20406           minor spelling cleanup.
20407
20408         move some file encodings to UTF-8.
20409         + commit 215180d1ce6c93e2b4969d746c83ac4c055d25ef
20410         * dirmgnr/cdblib.c: comment used unnecesary hyphenation
20411         * dirmngr/crlcache.h: comment was iso-8859-1
20412         * doc/contrib.text: list contributors using UTF-8 (now we can
20413           acknowledge many more people using their preferred orthography)
20414
20415         At least one other files remains in a non-UTF-8 encoding, which i'm
20416         not sure what to do with:
20417
20418          - build-aux/speedo/w32/inst.nsi is ISO-8859-1, but maybe Windows needs
20419            it that way?
20420
20421 2016-09-16  Neal H. Walfield  <neal@g10code.com>
20422
20423         g10: On failure, propagate the return code.
20424         + commit 6e930f0e4077bc7aa3d28b1ba649a82d62427d87
20425         * g10/tofu.c (tofu_register_encryption): If get_trust fails, set RC.
20426
20427         g10: Don't ignore failure.  On failure, rollback.
20428         + commit 221b0bd0e5946edaea7135bc3b6f3c5c0fc6dbca
20429         * g10/tofu.c (tofu_set_policy): If record_binding fails, fail.  If the
20430         function fails, rollback the transaction.
20431
20432         g10: Load the key block if the supplied user id list is NULL.
20433         + commit c2e563421e4fd4f0910642aa7b171bcf0b374b01
20434         * g10/tofu.c (tofu_register_encryption): Load the key block if
20435         USER_ID_LIST is NULL.
20436
20437         g10: Use the accessor functions for accessing and comparing key ids.
20438         + commit af196342bf44ce6dc42111d37539dec7ee3b3d82
20439         * g10/tofu.c (get_trust): Use the pk_main_keyid accessor function.
20440         (tofu_register_signature): Likewise.
20441         (tofu_register_encryption): Likewise.
20442         (tofu_set_policy): Likewise and also use pk_keyid and keyid_cmp.
20443
20444 2016-09-16  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20445
20446         po: convert localizations to UTF-8.
20447         + commit 4ab8107063b641ed74fc4c9bf98304bcea573178
20448         * po/{it,et,pl,ro,gl,es,el,sk,pt,eo,hu}.po: convert to UTF-8
20449
20450         This was an automated conversion process, using:
20451
20452            for x in po/{it,et,pl,ro,gl,es,el,sk,pt,eo,hu}.po; do
20453                cs=$(grep charset= $x | cut -f2 -d= | cut -f1 -d\\)
20454                iconv -f $cs -t UTF-8 < $x >$x.tmp
20455                sed "s/$cs/UTF-8/" < $x.tmp > $x
20456                rm -f $x.tmp
20457            done
20458
20459 2016-09-16  NIIBE Yutaka  <gniibe@fsij.org>
20460
20461         scd: Add support of ECC pubkey attribute.
20462         + commit dd06d33655bc872a6310edac8e448419479d3312
20463         * scd/app-openpgp.c (ECC_FLAG_PUBKEY): New.
20464         (send_key_attr, get_public_key, ecc_writekey, do_auth, do_decipher)
20465         (parse_algorithm_attribute): Check ECC_FLAG_DJB_TWEAK.
20466         (build_ecc_privkey_template): Add ECC_Q and ECC_Q_LEN.
20467         Support offering public key when ECC_FLAG_PUBKEY sets.
20468         (ecc_writekey): Supply ECC_Q and ECC_Q_LEN.
20469         (parse_algorithm_attribute): Parse pubkey-required byte.
20470
20471 2016-09-15  Justus Winter  <justus@g10code.com>
20472
20473         g10: Add missing header.
20474         + commit c0e620cee86b5dacc941964bd187bba0dfa90eea
20475         * g10/trustdb.c: Include 'mbox-util.h'.
20476
20477 2016-09-15  Neal H. Walfield  <neal@g10code.com>
20478
20479         g10: Only consider bindings matching the signer's user id.
20480         + commit 3f7f7447316f57d002d683af4ad30ac5730b9ebe
20481         * g10/trustdb.c (tdb_get_validity_core): If the signer's user id
20482         subpacket is present, only consider matching user ids.
20483
20484         g10: Don't include the signature when printing a binding's validity.
20485         + commit dcc64663051f8af82abc11e2699649c3b35936db
20486         * g10/mainproc.c (check_sig_and_print): When printing information
20487         about a binding don't include the current signature.
20488
20489 2016-09-15  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20490
20491         tests/fake-pinentries: fake pinentries for downstream developers.
20492         + commit 3248182d1b5a03098ee797c980fa0f0ec06e716f
20493         * tests/fake-pinentries/README.txt and
20494           tests/fake-pinentries/fake-pinentry.{sh,py,pl,php}}: New public
20495           domain (CC0) files to encourage better test suite practices from
20496           downstream developers.
20497         * tests/fake-pinentries/COPYING (new): a copy of
20498           https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
20499
20500         spelling: conenction should be connection.
20501         + commit 167273ee9d3c04f29835aa2d12fde52eebf61efb
20502         * dirmngr/server.c, sm/server.c: s/conenction/connection/
20503
20504         spelling: correct achived to achieved.
20505         + commit 7fafc3c49901c118b47d4d13a41fb3575c1f9e4b
20506
20507
20508 2016-09-15  NIIBE Yutaka  <gniibe@fsij.org>
20509
20510         tests/gpgscm: Fix use of pointer.
20511         + commit 68eb5fbd37c31ed7c0c916656131eea7bb58d13d
20512         * tests/gpgscm/scheme-private.h (struct scheme): Use (void *) for
20513         alloc_seg.
20514         * tests/gpgscm/scheme.c (alloc_cellseg): Use (void *) for cp.  Use
20515         (void *) for coercion of address calculation.
20516
20517 2016-09-14  Neal H. Walfield  <neal@g10code.com>
20518
20519         g10: Fix whitespace.
20520         + commit 9799b5d18f8fd29872b75c4d70d370af2b4e9a89
20521         * g10/tofu.c (show_statistics): Fix whitespace.
20522
20523         g10: Correctly compute the euclidean distance.
20524         + commit 05b2b13efd8ecea86d31af863cbf82c8b38dc94f
20525         * g10/tofu.c (write_stats_status): Correctly compute the euclidean
20526         distance.
20527         (show_statistics): Likewise.
20528
20529         g10: Change the default TOFU policy for UTKs to good.
20530         + commit ca91caabb5798f67c69ee96657c7cb402e7db0df
20531         * g10/tofu.c (get_trust): Change the default TOFU policy for UTKs to
20532         good.
20533
20534         g10: Add missing static qualifier.
20535         + commit 9d62b79e62ef2690e6522fe1621140fbfc10695c
20536         * g10/tofu.c (cross_sigs): Add missing static qualifier.
20537
20538         g10: Default to the "good" TOFU policy for keys signed by a UTK.
20539         + commit 8df8aa13c795e400324a782fbaea578c8f2a1398
20540         * g10/tofu.c (signed_by_utk): New function.
20541         (get_trust): If a key is signed by an ultimately trusted key, then
20542         set any bindings to good.
20543
20544 2016-09-14  Werner Koch  <wk@gnupg.org>
20545
20546         gpg: Emit a new error status line in --quick-adduid.
20547         + commit f4e11f2e9e8f58fd5f0df3148e6d7ccef0f84232
20548         * g10/keyedit.c (menu_adduid): Emit an ERROR status for an existsing
20549         user id.
20550
20551         gpg: Allow use of "default" algo for--quick-addkey.
20552         + commit 0fd332bc1f6f1f10c96da0cc91203925d3ac81eb
20553         * g10/keygen.c (quick_generate_keypair): Write a status error.
20554         (parse_algo_usage_expire): Set a default curve.
20555
20556 2016-09-13  Werner Koch  <wk@gnupg.org>
20557
20558         gpg: Improve usability of --quick-gen-key.
20559         + commit 30a011cfd6ec172cc460e59f0904a26fe2d68632
20560         * g10/keygen.c (FUTURE_STD_): New constants.
20561         (parse_expire_string): Handle special keywords.
20562         (parse_algo_usage_expire): Allow "future-default".  Simplify call to
20563         parse_expire_string.
20564         (quick_generate_keypair): Always allow an expiration date.  Replace
20565         former "test-default" by "future-default".
20566
20567 2016-09-12  Werner Koch  <wk@gnupg.org>
20568
20569         gpg: Avoid mixing up status and colon line output.
20570         + commit 31fc420727f45dd081f8ad5d056da6675dad29f2
20571         * g10/keylist.c (list_keyblock_colon): Avoid calling functions which
20572         trigger a status line output before having printed a LF.
20573
20574 2016-09-12  Justus Winter  <justus@g10code.com>
20575
20576         tests: Simplify tofu test.
20577         + commit aa81e32df7189c3eb44d4c602fd63f5b3f6a9e49
20578         * tests/openpgp/tofu.scm: Simplify now that we only have one db
20579         format.
20580
20581 2016-09-10  Ben Kibbey  <bjk@luxsci.net>
20582
20583         Portability build fix.
20584         + commit eddcba038025cdbd58aaf67cafd6d83f0ea042d5
20585         * kbx/Makefile.am: Add NETLIBS.
20586         * dirmngr/Makefile.am: Ditto for dirmngr_ldap.
20587
20588         Fix symbol conflict.
20589         + commit 937ec53eff290c3d916faebc23218c9272671c02
20590         * g10/gpgcompose.c: Rename struct siginfo to signinfo.
20591
20592 2016-09-09  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20593
20594         gpg: print fingerprint regardless of keyid-format.
20595         + commit d757009a24eb856770fc3a3729e2f21f54d2a618
20596         * g10/keylist.c (print_fingerprint): use compact format independent of
20597           keyid-format; (print_key_line): always print the fingerprint
20598
20599 2016-09-08  Werner Koch  <wk@gnupg.org>
20600
20601         gpg: Remove option --yes from gpgv.
20602         + commit 30a9f53a0f2af6b98c26b8ddc0b4b87c38416f2a
20603         * g10/gpgv.c (opts): Remove --yes.
20604         (main): Always set opt.ANSWER_YES.
20605
20606         gpg: Add options --output and --yes to gpgv.
20607         + commit a8363b7d0bcc77b55226d5fe8f972214c968ddc3
20608         * g10/gpgv.c (oOutput, oAnswerYes): New.
20609         (opts): Add --output and --yes.
20610         (main): Implement options.
20611
20612         gpg: Make --output work with --verify.
20613         + commit bbe940c095f2bca7a1ca5f8e68ca1af98350a885
20614         * g10/mainproc.c (proc_plaintext): Handle opt.output.
20615
20616 2016-09-07  Werner Koch  <wk@gnupg.org>
20617
20618         dirmngr: Terminate on deletion of the socket file (Linux only).
20619         + commit 6308c300196ae85fd82ed383217219e0206640a4
20620         * dirmngr/dirmngr.c [HAVE_INOTIFY_INIT]: Include sys/inotify.h.
20621         (oDisableCheckOwnSocket): New.
20622         (opts): Add --disable-check-own-socket.
20623         (disable_check_own_socket): New var.
20624         (parse_rereadable_options): Set that var.
20625         (my_inotify_is_name) [HAVE_INOTIFY_INIT]: New.
20626         (handle_connections) [HAVE_INOTIFY_INIT]: New.
20627
20628 2016-09-07  Neal H. Walfield  <neal@g10code.com>
20629
20630         g10: Use the time a signature was seen, not the embedded time, for stats
20631         + commit bde29a46cedbbd2a5dfe7c91a6277c0a4ff50825
20632         * g10/tofu.c (ask_about_binding): Use the time that a signature was
20633         seen, not allegedly generated, when generating statistics.
20634
20635         tests: Don't use --tofu-db-format.
20636         + commit a937eef2d4e80cd43095802176d3db5e7fd94008
20637         * tests/openpgp/tofu.scm: Remove use of --tofu-db-format, which is
20638         deprecated.
20639
20640         g10: Check for a new binding a bit later.
20641         + commit ee06b3f7889bd99c28ac68f4781bda77d67eed00
20642         * g10/tofu.c (build_conflict_set): Check for the current key after
20643         looking for conflicts and removing any '!'.
20644
20645         g10: Change TOFU code to respect --faked-system-time.
20646         + commit 7b3e8572e3bb8a65d20577a48009251fdc7b1910
20647         * g10/tofu.c (record_binding): New parameter now.  Update callers.
20648         Don't use SQLite's strftime('%s','now') to get the current time, use
20649         NOW.
20650         (ask_about_binding): Likewise.
20651         (get_trust): New parameter now.  Update callers.
20652         (show_statistics): Likewise.
20653         (tofu_register_signature): Don't use SQLite's strftime('%s','now') to
20654         get the current time, use gnupg_get_time().
20655         (tofu_register_encryption): Likewise.
20656
20657         g10: Use the correct conversion function.
20658         + commit 56c18408d4955713d9c4e634367c7912d6564651
20659         * g10/tofu.c (show_statistics): Use string_to_ulong, not
20660         string_to_long.
20661
20662 2016-09-07  Werner Koch  <wk@gnupg.org>
20663
20664         gpg: Fix format string issues in tofu.
20665         + commit 97a67d42dc946b2d6ed81723d86e37002b5931b3
20666         * g10/tofu.c (write_stats_status): Use ulong for MESSSAGES.  Fix
20667         format strings.  Simplify by using the new write_status_printf.
20668
20669 2016-09-06  Neal H. Walfield  <neal@g10code.com>
20670
20671         g10: Make sure some functions are passed a primary key.
20672         + commit 13ddc17ddb266d74033d5739fec932034fa85c72
20673         * g10/tofu.c (get_trust): Make sure the caller provides a primary key.
20674         (tofu_register_signature): Likewise.
20675
20676         g10: Tweak TOFU's verbosity.
20677         + commit ee19eacd1d688d3a98cd66e5ef2f42079eb829f1
20678         * g10/tofu.c (time_ago_str): Only show the most significant unit.
20679         * g10/tofu.c (show_statistics): Tweak the output.
20680
20681         g10: Only show the TOFU warning once per key.
20682         + commit 67cef405cbfad2e53fc388dd6591ee4f7cb0d973
20683         * g10/tofu.c (show_statistics): Return whether to call show_warning.
20684         Move the warning from here...
20685         (show_warning): ... to this new function.
20686         (tofu_get_validity): If show_statistics returns a non-zero value, call
20687         show_warning.
20688
20689         g10: Record and show statistics for encrypted messages when using TOFU.
20690         + commit 875ac9216f1383851a82bd240cadb17c7112f6a8
20691         * g10/tofu.c: Include "sqrtu32.h".
20692         (struct tofu_dbs_s.s): Rename get_trust_gather_other_keys to
20693         get_trust_gather_signature_stats.  Add new field
20694         get_trust_gather_encryption_stats.
20695         (initdb): Create the encryptions table.
20696         (ask_about_binding): Show the encryption statistics too.
20697         (tofu_register): Rename from this...
20698         (tofu_register_signature): ... to this and update callers.
20699         (tofu_register_encryption): New function.
20700         (write_stats_status): Add parameters encryption_count,
20701         encryption_first_done and encryption_most_recent.  Update callers.
20702         Compute the trust using the euclidean distance of the signature and
20703         signature count.  Compare with twice the threshold.  Include
20704         encryption count information in the TFS and TOFU_STATS lines.
20705         (show_statistics): Also get information about the encrypted messages.
20706         * g10/trustdb.c (tdb_get_validity_core): Use it.
20707
20708         g10: Simplify the binding statistics shown for a TOFU conflict.
20709         + commit a9e6db6c7e23d9f4b8de59f5cabbf9eb6a59e626
20710         * g10/tofu.c (ask_about_binding): Simplify binding statistics.
20711
20712 2016-09-06  Justus Winter  <justus@g10code.com>
20713
20714         gpgscm: Fix detection of unbalanced parenthesis.
20715         + commit f2249b737055f84842778285bbeff5e61fa55225
20716         * tests/gpgscm/main.c (load): Print error message.
20717         * tests/gpgscm/scheme.c (opexe_0): Correctly report nesting level when
20718         loading files.
20719
20720         tests: Fix test.
20721         + commit 213b3cf465fb091dc0a205d1a08b88b950ffb85f
20722         * tests/openpgp/multisig.scm: Add missing parenthesis.
20723
20724 2016-09-06  Werner Koch  <wk@gnupg.org>
20725
20726         agent: Terminate on deletion of the socket file (Linux only).
20727         + commit 650356148af43ea619bec12e599a4981b147d5f8
20728         * configure.ac (AC_CHECK_FUNCS): Chec for inotify_init.
20729         * agent/gpg-agent.c [HAVE_INOTIFY_INIT]: Include sys/inotify.h.
20730         (my_inotify_is_name) [HAVE_INOTIFY_INIT]: New.
20731         (handle_connections) [HAVE_INOTIFY_INIT]: New.
20732
20733 2016-09-05  Justus Winter  <justus@g10code.com>
20734
20735         tests: Speed up the test suite.
20736         + commit 46c4333c372f0e1ad2aadc411490c2a330b4c5a6
20737         * tests/openpgp/run-tests.scm (test::run-sync): Pass additional
20738         arguments to the test.
20739         (test::run-sync-quiet): Likewise.
20740         (test::run-async): Likewise.
20741         (run-tests-{parallel,sequential}-isolated): Create a tarball of the
20742         gnupghome, then extract it for each test.
20743         * tests/openpgp/setup.scm: Refactor into functions, add an interface
20744         to tar-up the created environment, and untar it multiple times.
20745
20746         common: Restore a simpler variant of 'gnupg_wait_process'.
20747         + commit c97bde2dfeab23a84b4788d998934ac49ff5b797
20748         * common/exechelp-posix.c (gnupg_wait_process): Use the code prior to
20749         5ba4f604.
20750
20751         common: Fix error handling.
20752         + commit 845e2cc201d6a2cdb151e39e29516d26cb49311c
20753         * common/exechelp-posix.c (store_result): Use xtrymalloc.
20754         (gnupg_wait_processes): Likewise, and check result.
20755
20756 2016-09-05  Neal H. Walfield  <neal@g10code.com>
20757
20758         g10: Don't add user attributes to the TOFU DB.
20759         + commit 9082bde01cc18e32504ce39d55ea6dd3c05dddec
20760         * g10/trustdb.c (tdb_get_validity_core): Skip user attributes.
20761
20762 2016-09-05  Werner Koch  <wk@gnupg.org>
20763
20764         agent: Silence --debug IPC output for connections from self.
20765         + commit 0b99d1fd2a80b8efaacc731027d2b2ecd9eca699
20766         * agent/command.c (server_local_s): Add fields 'greeting_seen' and
20767         'connect_from_self'.
20768         (io_monitor): Do not log connections from self.
20769         (start_command_handler): Set flag 'connect_from_self'.
20770         * agent/gpg-agent.c (check_own_socket_thread): Disable logging.
20771         (do_start_connection_thread): Do not log conection start and
20772         termination if IPC debugging is enabled.
20773
20774         agent: Small improvement of the server's local state.
20775         + commit 2eeb5551c37659fdd59e8537fc77a9e7fb6a9204
20776         * agent/command.c (sserver_local_s): Change flags to use only one bit.
20777         (option_handler): Make an atoi return 1 or 0.
20778
20779 2016-09-05  Neal H. Walfield  <neal@g10code.com>
20780
20781         g10: Refactor cross sig check code.
20782         + commit 1f1f56e606c1cb28eec68c60bd8bcb7ab30805de
20783         * g10/tofu.c (BINDING_NEW): New enum value.
20784         (BINDING_CONFLICT): Likewise.
20785         (BINDING_EXPIRED): Likewise.
20786         (BINDING_REVOKED): Likewise.
20787         (ask_about_binding): Move cross sig check from here...
20788         (get_trust): ... and the conflict set building from here...
20789         (build_conflict_set): ... to this new function.
20790         (format_conflict_msg_part1): Replace parameter conflict with
20791         conflict_set.  Drop parameter fingerprint.  Update callers.
20792         (ask_about_binding): Drop unused parameter conflict and redundant
20793         parameter bindings_with_this_email_count.  Rename parameter
20794         bindings_with_this_email to conflict_set.  Update callers.
20795
20796 2016-09-05  Justus Winter  <justus@g10code.com>
20797
20798         tests: Update README.
20799         + commit 65a7563edbbab8f93fe901f932065687508788de
20800         * tests/openpgp/README: Update.
20801
20802         tests: Pass flags to test driver.
20803         + commit 059c79d8b447a3baa9ad0b4d3367bdb64dd2ef3b
20804         * tests/openpgp/Makefile.am (xcheck): Pass flags to 'run-tests.scm'.
20805
20806         common: Improve waiting for processes on POSIX.
20807         + commit e33111fcdac08ed2ddfbdf59b1f790569b42f695
20808         * common/exechelp-posix.c (struct terminated_child): New definition.
20809         (terminated_children): New variable.
20810         (store_result): New function.
20811         (get_result): Likewise.
20812         (gnupg_wait_process): Store results that were not requested and
20813         consider previously stored results.
20814
20815         waitpid(2) may return information about terminated children that we
20816         did not yet request, and there is no portable way to wait for a
20817         specific set of children.  As a workaround, we store the results of
20818         children for later use.
20819
20820 2016-09-05  Werner Koch  <wk@gnupg.org>
20821
20822         dirmngr: Exclude D lines from the IPC debug output.
20823         + commit de623474db3ba402c9bbd872ab6f932f46cbdde9
20824         * dirmngr/dirmngr.h: Include asshelp.h.
20825         * dirmngr/server.c (server_local_s): Add inhibit_dara_logging fields.
20826         (data_line_write): Implement logging inhibit.
20827         (data_line_cookie_close): Print non-logged D lines.
20828         (cmd_wkd_get, cmd_ks_get, cmd_ks_fetch): Do not log D lines.
20829         (dirmngr_assuan_log_monitor): New.
20830         * dirmngr/dirmngr.c (main): Register monitor function.
20831
20832         common: Add an assuan logging monitor.
20833         + commit 0ac671f8a2b65a4b339f615c6420287a549779fa
20834         * common/asshelp.c (my_log_monitor): New var.
20835         (my_libassuan_log_handler): Run that monitor.
20836         (setup_libassuan_logging): Add arg to set a log monitor and change all
20837         callers.
20838
20839         gpg: New export filter drop-subkey.
20840         + commit 0a4a03e5310946b0866a0f6a34031eda7a240162
20841         * g10/import.c (impex_filter_getval): Add properties for key packets.
20842         * g10/export.c (export_drop_subkey): New var.
20843         (cleanup_export_globals): Release that var.
20844         (parse_and_set_export_filter): Add filter "drop-subkey".
20845         (apply_drop_subkey_filter): New.
20846         (do_export_stream): Run that filter.
20847
20848         common: Add string operator gt,ge,le,lt to recsel.
20849         + commit 959cd8903fd012e63dbb156db56708dd3934b5df
20850         * common/recsel.c (recsel_parse_expr): Add them.
20851         (recsel_dump): Print them.
20852         (recsel_select): Evaluate them.
20853
20854         gpg: Use a common filter_getval for import and export.
20855         + commit c8e0d37f4152d1341ef562a190fce93a0386a759
20856         * g10/import.c (filter_getval): Rename to ...
20857         (impex_filter_getval): this.  Make global.
20858         (apply_keep_uid_filter, apply_drop_sig_filter): Adjust.
20859         * g10/export.c (filter_getval): Remove.
20860         (apply_drop_sig_filter): Use impex_filter_getval.
20861
20862 2016-09-03  NIIBE Yutaka  <gniibe@fsij.org>
20863
20864         scd: Fix an action after card removal.
20865         + commit f9e49c80e706a27d5e30d4b3237ff26367a67130
20866         * scd/command.c (update_card_removed): Call apdu_close_reader here.
20867
20868 2016-09-02  Werner Koch  <wk@gnupg.org>
20869
20870         wks: Add framework for policy flags.
20871         + commit 46362cbc0e2260e989820795a6e4245c72335172
20872         * tools/call-dirmngr.c (wkd_get_policy_flags): New.
20873         * tools/gpg-wks.h (struct policy_flags_s, policy_flags_t): New.
20874         * tools/wks-util.c (wks_parse_policy): New.
20875         * tools/gpg-wks-client.c (command_send): Get the policy flags to show
20876         a new info line.
20877         * tools/gpg-wks-server.c (get_policy_flags): New.
20878         (process_new_key): get policy flag and add a stub for "auth-submit".
20879         (command_list_domains): Check policy flags.
20880
20881         dirmngr: Add --policy-flags option to WKD_GET.
20882         + commit 505ee45106d6aa2902bbdd6326f8eb7527c273c4
20883         * dirmngr/server.c (cmd_wkd_get): Add new option.
20884
20885         common: Check read errors in name-value.c.
20886         + commit fc445b36fafc8a4cc3ce5a675ac42df7a9d9a02a
20887         * common/name-value.c: Check for read errors.
20888
20889 2016-09-02  NIIBE Yutaka  <gniibe@fsij.org>
20890
20891         scd: Release the card reader after card removal.
20892         + commit 8fe81055762d9c9e6f03fb7853a985c94ef73ac3
20893         * scd/command.c (update_reader_status_file): Call apdu_close_reader.
20894
20895         scd: Clean up unused shutdown method.
20896         + commit d1ae7103352fbda2a05f098379cd3043a0ab5566
20897         * scd/apdu.c (shutdown_ccid_reader, apdu_shutdown_reader): Remove.
20898         (reset_ccid_reader): Don't set shutdown_reader.
20899         * scd/ccid-driver.c (ccid_shutdown_reader): Remove.
20900
20901         agent: invoke scdaemon with --homedir.
20902         + commit 8b6c0bae33bdc36892f4595806665ce61f77dfd2
20903         * agent/call-scd.c (start_scd): Supply --homedir option when it's not
20904         default homedir.
20905
20906         po: Update Japanese translation.
20907         + commit afdfc954b35370fbf03aaf8dc0e496410923aa4e
20908
20909
20910 2016-09-01  Neal H. Walfield  <neal@g10code.com>
20911
20912         g10: End transaction earlier.
20913         + commit 85fad6c34c08b2850580e0644faba62d3a501b84
20914         * g10/tofu.c (ask_about_binding): End the transaction earlier.
20915
20916         g10: Don't consider cross-signed keys to be in conflict.
20917         + commit b410a3cb7683fc7c2a253e23130c44df42a6203c
20918         * g10/tofu.c (cross_sigs): New function.
20919         (ask_about_binding): If apparently conflicting keys are cross signed,
20920         then don't mark them as conflicting.
20921
20922 2016-09-01  Werner Koch  <wk@gnupg.org>
20923
20924         gpg: Avoid homedir creation by --list-config.
20925         + commit 38d369de13acb95208a0ed8d1cf82ac19173688f
20926         * g10/gpg.c (main): Do not register a key for the list config
20927         commands.
20928
20929         gpg: Simplify code to print VALIDSIG.
20930         + commit fde9fa81d3d3b25a929b532cc1960d9d9f454a0c
20931         * g10/mainproc.c (check_sig_and_print): Use hexfingerprint and
20932         write_status_printf.
20933
20934         gpg: Add new function write_status_printf.
20935         + commit 6bdadae00512b4907826f6754cdb220d06e1ac6d
20936         * g10/cpr.c (write_status_printf): New.
20937
20938         gpg: Fix printing of pubkey algo in --verbose signature verify.
20939         + commit 37e3c897252babc203447be9d2f286a4507875ad
20940         * g10/sig-check.c (check_signature2): Replace arg PK by R_PK and
20941         change the semantics.  Also clear the other R_ args on function entry,
20942         use gpg_error() and change retturn type to gpg_error_t.
20943         * g10/mainproc.c (do_check_sig): Add arg R_PK.
20944         (list_node): Pass NULL for new arg.
20945         (check_sig_and_print): Rework to make use of the returned PK.
20946
20947 2016-09-01  Neal H. Walfield  <neal@g10code.com>
20948
20949         g10: When asking about a TOFU binding conflict, default to unknown.
20950         + commit 3d44e5e8a8d1d8bf6cf5d387f50d75f84d804412
20951         * g10/tofu.c (ask_about_binding): Default to unknown.
20952
20953         g10: Add support for TRUST_NEVER.
20954         + commit f2e5cb6ffb55e49a05d452cd85e45f6f67c20abb
20955         * g10/pkclist.c (do_we_trust): Handle TRUST_NEVER, which can be
20956         returned by the TOFU trust model.
20957         (do_we_trust_pre): Print a different message if TRUSTLEVEL is
20958         TRUST_NEVER.
20959         (check_signatures_trust): Improve comment.
20960
20961         g10: Improve text.
20962         + commit 0cb0ea1633955fb7acd33fe993a4ae4e96e83ae3
20963         * g10/tofu.c (show_statistics): Improve the text (key and user id, not
20964         just key).
20965
20966         g10: Remove unused parameter.
20967         + commit 00c2850393ecc320f591f511c3534286964780c2
20968         * g10/tofu.c (show_statistics): Remove unused parameter sig_exclude.
20969         Update callers.
20970
20971 2016-09-01  Werner Koch  <wk@gnupg.org>
20972
20973         gpg: Copy the correct digest for use by TOFU.
20974         + commit 3e67b50490aef087b5769bb35145d23f6657780f
20975         * g10/mainproc.c (do_check_sig): Use the current digest algo.
20976
20977 2016-09-01  Neal H. Walfield  <neal@g10code.com>
20978
20979         g10: Be careful to not be in a transaction during long operations.
20980         + commit 4cbd2a690c5e5ed2dff49c1f4fc867b31fca689a
20981         * g10/tofu.c (begin_transaction): New parameter only_batch.  If set,
20982         only start a batch transaction if there is none and one has been
20983         requested.  Update callers.
20984         (tofu_suspend_batch_transaction): New function.
20985         (tofu_resume_batch_transaction): Likewise.
20986         (ask_about_binding): Take a ctrl_t, not a tofu_dbs_t.  Update
20987         callers.  Gather statistics within a transaction.  Suspend any batch
20988         transaction when getting user input.
20989         (get_trust): Take a ctrl_t, not a tofu_dbs_t.  Update callers.
20990         Enclose in a transaction.
20991         (tofu_get_validity): Use a batch transaction, not a normal
20992         transaction.
20993
20994 2016-09-01  Werner Koch  <wk@gnupg.org>
20995
20996         tests: Run test requiring the network only in maintainer-mode.
20997         + commit babeb6f8a9b1f8341652145bad58be6cd49e0712
20998         * dirmngr/Makefile.am (noinst_PROGRAMS, TESTS): Add module_net_tests.
20999         (module_tests): Move t-dns-test to ...
21000         (module_net_tests): here.
21001
21002 2016-08-31  Werner Koch  <wk@gnupg.org>
21003
21004         wks: Send a final message to the user.
21005         + commit 04c042f3f2a631bc6e772c33f8da5e7aa7b1902a
21006         * tools/gpg-wks-server.c (send_congratulation_message): New.
21007         (check_and_publish): Call it.
21008
21009         wks: Relax permission check for the top directory.
21010         + commit e4eac16330449f3893c11820c15e07d58fb807ff
21011         * tools/gpg-wks-server.c: Allow S_IXOTH for the top directory.
21012
21013 2016-08-31  Neal H. Walfield  <neal@g10code.com>
21014
21015         g10: On a TOFU conflict, show whether the uids are expired or revoked.
21016         + commit edfb6934caf16c6afcfd82d684d8ae9c79674d10
21017         * g10/tofu.c (struct signature_stats): Add fields is_expired and
21018         is_revoked.
21019         (signature_stats_prepend): Clear *stats when allocating it.
21020         (ask_about_binding): Also show whether the user ids are expired or
21021         revoked.
21022
21023         doc: Add a help text for tofu.conflict.
21024         + commit b69b2cb082e39a7eb56082fa80219f6f14fbd2b4
21025         * doc/help.txt (.gpg.tofu.conflict): New help text.
21026
21027         g10: Always trust ultimately trusted keys.
21028         + commit 28c235ae757e9036b0b96efc28931fa5cc74f7ee
21029         * g10/tofu.c (get_trust): Always return TRUST_ULTIMATE for ultimately
21030         trusted keys.
21031
21032         g10: Fix error detection.
21033         + commit 5b48960a8a2555db7bf992261de9e922838c9913
21034         * g10/tofu.c: first_seen == 0 is not an error.
21035
21036         g10: Update a key's TOFU policy in a transaction.
21037         + commit e4d5e3cb0d10e8f77c7100d42cfdb32051de1c18
21038         * g10/tofu.c (tofu_set_policy): Do the update in a transaction.
21039         * g10/gpg.c (main): Do a TOFU policy update in a batch transaction.
21040
21041         g10: Fix the show old policy functionality when changing a TOFU policy.
21042         + commit 247eef005cf4c34e9a82227e4ab7823e04911be4
21043         * g10/tofu.c (record_binding): Fix the show old policy functionality.
21044
21045         g10: Drop unused argument.
21046         + commit 70df5a8fd781d8774d835384ca28c4d8518bb9d0
21047         * g10/tofu.c (begin_transaction): Remove unused option only_batch.
21048
21049         gpg: Move state local to tofu.c to a private structure.
21050         + commit 268f6b7a3403d036882b4af384ba7ab2f8c8355f
21051         * g10/gpg.h (struct server_control_s.tofu): Move fields in_transaction
21052         and batch_update_started from here...
21053         * g10/tofu.c (struct tofu_dbs_s): ... to here.
21054
21055         gpg: Avoid name spaces clash with future sqlite versions (2).
21056         + commit b8184d2d74e5ddd5eb68836b53fe5568110e14dd
21057         * g10/gpgsql.h (gpgsql_arg_type): Rename SQLITE_ARG_END to
21058         GPGSQL_ARG_END, SQLITE_ARG_INT to GPGSQL_ARG_INT, SQLITE_ARG_LONG_LONG
21059         to GPGSQL_ARG_LONG_LONG, SQLITE_ARG_STRING to GPGSQL_ARG_STRING, and
21060         SQLITE_ARG_BLOB to GPGSQL_ARG_BLOB.
21061
21062 2016-08-31  Werner Koch  <wk@gnupg.org>
21063
21064         gpg: Fix regression in gpgv's printing of the keyid.
21065         + commit 76304a971fe507ea659b952932ea899463ab7166
21066         * g10/keyid.c (keystr): Take care of KF_NONE != KF_DEFAULT.
21067
21068 2016-08-30  Neal H. Walfield  <neal@g10code.com>
21069
21070         g10: Improve TOFU batch update code.
21071         + commit 371ae66e9d5c7524431773c4a479fcae1ea3b652
21072         * g10/gpg.h (tofu): Rename field batch_update_ref to
21073         batch_updated_wanted.
21074         * g10/tofu.c (struct tofu_dbs_s): Rename field batch_update to
21075         in_batch_transaction.
21076         (begin_transaction): Only end an extant batch transaction if we are
21077         not in a normal transaction.  When ending a batch transaction, really
21078         end it.  Update ctrl->tofu.batch_update_started when starting a batch
21079         transaction.
21080         (end_transaction): Only release a batch transaction if ONLY_BATCH is
21081         true.  When releasing a batch transaction, assert that there is no
21082         open normal transaction.  Only allow DBS to be NULL if ONLY_BATCH is
21083         true.
21084         (tofu_begin_batch_update): Don't update
21085         ctrl->tofu.batch_update_started.
21086         (opendbs): Call end_transaction unconditionally.
21087
21088         g10: If a key has no valid user ids, change TOFU to return TRUST_NEVER.
21089         + commit d0451440c036106895a291f9ca1c53c2d5159f8f
21090         * g10/tofu.c (tofu_get_validity): If a key has no valid (non-expired)
21091         user ids, change TOFU to return TRUST_NEVER.
21092
21093         g10: Change tofu_register & tofu_get_validity to process multiple uids.
21094         + commit 6052c147091935fc0321ba24f4a44146df70ef01
21095         * g10/tofu.c (tofu_register): Take a list of user ids, not a single
21096         user id.  Only register the bindings, don't compute the trust.  Thus,
21097         change return type to an int and remove the may_ask parameter.  Update
21098         callers.
21099         (tofu_get_validity): Take a list of user ids, not a single user id.
21100         Update callers.  Observe signatures made by expired user ids, but
21101         don't include them in the trust calculation.
21102
21103         g10: Support nested transactions on the TOFU DB.
21104         + commit 33e97813d72996d22a295773c64261f5588ce9dd
21105         * g10/gpg.h (struct server_control_s): New field in_transaction.
21106         * g10/tofu.c (struct tofu_dbs_s): Remove fields savepoint_inner and
21107         savepoint_inner_commit.
21108         (begin_transaction): Increment CTRL->TOFU.IN_TRANSACTION.  Name the
21109         savepoint according to the nesting level.
21110         (end_transaction): Name the savepoint according to the nesting level.
21111         Decrement CTRL->TOFU.IN_TRANSACTION.
21112         (rollback_transaction): Likewise.  Only ever rollback a non-batch
21113         transaction.
21114         (opendbs): Assert that there are no outstanding transactions.
21115
21116         g10: Print the info text in more situations.
21117         + commit 4c2abb221b29c9e8e0876fe986472b562ee1c99f
21118         * g10/tofu.c (ask_about_binding): Print the info text when the policy
21119         is ask and there are multiple bindings with the email address.
21120
21121         g10: Print the formatted text.
21122         + commit 0858f141a8b8d0c098a0c6097176b7225c4a9db8
21123         * g10/tofu.c (ask_about_binding): Print the formatted text, not the
21124         unformatted text.
21125
21126         g10: When showing a user id's trust, pass the current signature.
21127         + commit 8dda861ad80228da76cd5c97467008c87b8b6eee
21128         * g10/mainproc.c (check_sig_and_print): Consistently pass SIG to
21129         get_validity.
21130
21131 2016-08-29  Werner Koch  <wk@gnupg.org>
21132
21133         w32: Fix build regression due to 2aa0701.
21134         + commit 8b3e691ffbaaa218d309d5aaf8f37532308558ff
21135         * common/logging.c (fun_writer): Always declare 'name_for_err'.
21136
21137         gpgconf: Print the plain socket directory with --list-dirs.
21138         + commit 8e3fa5a4b205c534de2142e5d071712f957cf06a
21139         * tools/gpgconf.c (list_dirs): Add plain socketdir out.
21140
21141         common: Add a default socket name feature.
21142         + commit 2aa0701013f703ad93e17da3345c493c08aa04ee
21143         * common/logging.c (log_set_socket_dir_cb): New.
21144         (socket_dir_cb): New.
21145         (set_file_fd): Allow "socket://".
21146         (fun_writer): Implement default socket name.
21147         * common/init.c (_init_common_subsystems): Register default socket.
21148
21149         gpg: Make decryption of -R work w/o --try-secret-key or --default-key.
21150         + commit bdbd03608b6f508ac4732f9986a046de8a85a311
21151         * g10/getkey.c (enum_secret_keys): At state 3 enumerate the keys in all
21152         cases not just when --try-all-secrets is used.
21153
21154 2016-08-25  Werner Koch  <wk@gnupg.org>
21155
21156         gpg: Fix false negatives in Ed25519 signature verification.
21157         + commit 0a5a854510fda6e6990938a3fca424df868fe676
21158         * g10/pkglue.c (pk_verify): Fix Ed25519 signatrue values.
21159         * tests/openpgp/verify.scm (msg_ed25519_rshort): New
21160         (msg_ed25519_sshort): New.
21161         ("Checking that a valid Ed25519 signature is verified as such"): New.
21162
21163         common: Rename an odd named function.
21164         + commit 74a082bc10960b2d65d4d1e31152f988a40a2225
21165         * common/openpgp-oid.c (oid_crv25519): Rename to oid_cv25519.
21166         (openpgp_oid_is_crv25519): Rename to openpgp_oid_is_cv25519.  Change
21167         callers.
21168
21169         gpg: New option --with-tofu-info.
21170         + commit 19d12be3cea5b4ee8153287a2f2442913a5e07a1
21171         * g10/gpg.c (oWithTofuInfo): New.
21172         (opts): Add --with-tofu-info.
21173         (main): Set opt.with_tofu_info.
21174         * g10/options.h (struct opt): Add field WITH_TOFU_INFO.
21175         * g10/tofu.c (show_statistics): Add optional arg OUTFP and enter
21176         special mode if not NULL.  Change all callers.
21177         (tofu_write_tfs_record): New.
21178         * g10/keylist.c (list_keyblock_colon): Do not print the tofu policy as
21179         part of the "uid" record.  Print a new "tfs" record if the new option
21180         is set.
21181         * tests/openpgp/tofu.scm (getpolicy): Change from UID to TFS record.
21182
21183 2016-08-24  Werner Koch  <wk@gnupg.org>
21184
21185         gpg: Change TOFU_STATS to return timestamps.
21186         + commit 0f1f02acc1cdcc2cf74a97b05507bb1f062f8af2
21187         * g10/tofu.c (write_stats_status): Add arg FP to print a colon
21188         formated line.  Adjust for changed TOFU_STATS interface.
21189         (show_statistics): Let the query return timestamps and use
21190         gnupg_get-time to compute the "time ago" values.
21191
21192         common: Guarantee that gnupg_get_time does not return an error.
21193         + commit 5eb2682686b32bd82096924eeabd0c5bd347adfd
21194         * common/gettime.c (gnupg_get_time): Abor if time() failed.
21195         (gnupg_get_isotime): Remove now useless check.
21196         (make_timestamp): Remove check becuase we already checked this modulo
21197         the faked time thing.
21198
21199         wks: Add command --supported to gpg-wks-client.
21200         + commit 460568d341851ac79dd100e00e4eafcac1318148
21201         * tools/gpg-wks-client.c (aSupported): New.
21202         (opts): Add --supported.
21203         (parse_arguments): Ditto.
21204         (main): Call command_supported.
21205         (command_supported): New.
21206
21207 2016-08-22  Werner Koch  <wk@gnupg.org>
21208
21209         wks: Install gpg-wks-client under libexec.
21210         + commit c47386a11a32c5ed3b5a31fad5c3e9a9a020ca7b
21211         * tools/Makefile.am (bin_PROGRAMS): Move gpg-wks-client to ...
21212         (libexec_PROGRAMS): ...here.
21213
21214         common: Remove unused vars in simple-pwquery.
21215         + commit 62f3e0027724b23c0de5be6d1e66cfdeef7e7bc9
21216         * common/simple-pwquery.c (agent_send_option): Remove unused vars.
21217         (simple_query): Ditto.
21218         (agent_open): Ditto.  Return RC on error.
21219         (simple_pwquery): Remove unused vars.  Remove shadowing of 'p'.
21220
21221 2016-08-18  Werner Koch  <wk@gnupg.org>
21222
21223         Release 2.1.15.
21224         + commit 6bee88dd067e03e7767ceacf6a849d9ba38cc11d
21225
21226
21227         po: Update German translation.
21228         + commit 0a32153316855224acda268edb60b80d4e64b12f
21229
21230
21231 2016-08-18  Åka Sikrom  <a4@hush.com>
21232
21233         po: Update Norwegian translation.
21234         + commit ec88d7c8a9af864fad8ab5e0b9c4eb90ddcdd630
21235
21236
21237 2016-08-18  Ineiev  <ineiev@gnu.org>
21238
21239         po: Update Russian translation.
21240         + commit 6f6bfbf175653faa5cf560a7174e81a599247e80
21241
21242
21243 2016-08-18  Werner Koch  <wk@gnupg.org>
21244
21245         gpg: Add import filter "drop-sig".
21246         + commit 1b55e864421f88b8c8088639682767076abbeab0
21247         * g10/import.c (import_drop_sig): New variable.
21248         (cleanup_import_globals): Release that.
21249         (parse_and_set_import_filter): Add filter "drop-sig".
21250         (filter_getval): Implement properties for drop-sig.
21251         (apply_drop_sig_filter): New.
21252         (import_one): Apply that filter.
21253
21254         dirmngr: Remove all system daemon features.
21255         + commit d83ba4897bf217d1045c58d1b99e52bd31c58812
21256         * dirmngr/dirmngr.h (opts): Remove fields 'system_service' and
21257         'system_daemon'.
21258         * common/homedir.c (dirmngr_sys_socket_name): Remove.
21259         (dirmngr_user_socket_name): Rename to ...
21260         (dirmngr_socket_name): this.  Change call callers.
21261         * common/asshelp.c (start_new_dirmngr): Remove the system socket
21262         feature.
21263         * tools/gpgconf.c (list_dirs): Do not print "dirmngr-sys-socket".
21264         * sm/server.c (gpgsm_server): Adjust for removed system socket feature.
21265         * dirmngr/server.c (cmd_getinfo): Ditto.
21266         (cmd_killdirmngr): Remove check for system daemon.
21267         (cmd_reloaddirmngr): Ditto.
21268         * dirmngr/dirmngr.c (USE_W32_SERVICE): Remove macro.
21269         (aService): Remove.
21270         (opts): Remove --service.
21271         (w32_service_control): Remove.
21272         (real_main, call_real_main) [W32]: Remove wrapper.
21273         (main): Remove Windows system service feature.  Remove system dameon
21274         feature.  Use only the "~/.gnupg/dirmngr_ldapservers.conf" file.
21275         * dirmngr/certcache.c (load_certs_from_dir): Remove warning in the
21276         system dameon case.
21277         * dirmngr/crlcache.c (DBDIR_D): Always use "~/.gnupg/crls.d".
21278         * dirmngr/ocsp.c (validate_responder_cert): Do not call
21279         validate_cert_chain which was used only in system daemon mode.
21280         * dirmngr/validate.c (validate_cert_chain): Always use the code.
21281
21282         gpg: New option --sender.
21283         + commit de6e3217cde81df370926571e0fd65e468619803
21284         * g10/options.h (struct opt): Add field 'sender_list'.
21285         * g10/gpg.c: Include mbox-util.h.
21286         (oSender): New.
21287         (opts): Add option "--sender".
21288         (main): Parse option.
21289
21290 2016-08-16  Werner Koch  <wk@gnupg.org>
21291
21292         agent: Allow import of overly large keys.
21293         + commit b5d63e81d5c472647decc7687cef91fee0378eb8
21294         * agent/command.c (MAXLEN_KEYDATA): Double the size.
21295
21296 2016-08-14  Werner Koch  <wk@gnupg.org>
21297
21298         g13: Allow the use of a g13tab label for --mount.
21299         + commit f02ceb6c6e94c6fbfaeeafe728397be38107de4d
21300         * g13/mount.c (g13_mount_container): Do not run the first access check
21301         if syshelp is required.
21302
21303         g13: Implement --umount for dm-crypt.
21304         + commit b781113cf1391926dedf8dc943624d3bb9726318
21305         * g13/g13.c (main): Implement command --umount.
21306         * g13/mount.c (g13_umount_container): use the syshelper if needed.
21307         * g13/backend.c (be_umount_container): New.
21308         * g13/be-dmcrypt.c (be_dmcrypt_umount_container): New.
21309         * g13/call-syshelp.c (call_syshelp_run_umount): New.
21310         * g13/sh-cmd.c (cmd_umount): New.
21311         (register_commands): Register UMOUNT.
21312         * g13/sh-dmcrypt.c (sh_dmcrypt_umount_container): New.
21313
21314 2016-08-13  Werner Koch  <wk@gnupg.org>
21315
21316         g13: Fix double free bug.
21317         + commit c9a0bccc77c93c08d6980a1718dfaf238a559eb9
21318         * g13/sh-cmd.c (cmd_mount, cmd_resume): Do not xfree TIUPLES.
21319
21320         g13: Consider g13tab for a mount command.
21321         + commit 700920640211168ae1c97d0adef74ba8615d90bb
21322         * g13/sh-cmd.c (cmd_getkeyblob): New.
21323         (register_commands): Register it.
21324         * g13/call-syshelp.c (getkeyblob_data_cb): New.
21325         (call_syshelp_get_keyblob): New.
21326         * g13/mount.c: Include callsyshelp.h.
21327         (g13_mount_container): Ask syshelp whether the filename is managed by
21328         g13tab.  Call syshelp to get the encrypted keyblob in this case.
21329
21330         g13: Move some function around.
21331         + commit 37e932658cbd873ac96ff7e2067a97dffc2e0507
21332         * g13/keyblob.c (g13_keyblob_decrypt): Move to ...
21333         * g13/server.c: to here.
21334         * g13/suspend.c, g13/mount.c: Include server.h.
21335         * g13/Makefile.am (g13_syshelp_SOURCES): Add keyblob.c
21336
21337         g13: New command --find-device.
21338         + commit b57f55321295846d47144bd6b39fbbcac0127421
21339         * common/status.h (STATUS_BLOCKDEV: New.
21340         * g13/call-syshelp.c: Include "call-syshelp.h".
21341         (finddevice_status_cb, call_syshelp_find_device): New.
21342         * g13/g13.c (aFindDevice): New.
21343         (opts): Add "--find-device".
21344         (main): Implement --find-device.
21345         * g13/sh-cmd.c (cmd_finddevice): New.
21346         (register_commands): Register new command.
21347
21348 2016-08-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21349
21350         Avoid leading ": " in the log output when there are no prefixes.
21351         + commit 3a75ff65fba24ea2d024bd8fef633ab7d8f7d520
21352         * common/logging.c (do_logv): When no prefixes have been requested,
21353         omit the ": " separator, since there is nothing on the left-hand
21354         side of it.
21355
21356         Call log_set_prefix() with human-readable labels.
21357         + commit 61c2a1fa6d6cb345f9d81f4bdd3f8f8ddac1ea3e
21358         * agent/preset-passphrase.c, agent/protect-tool.c, dirmngr/dirmngr.c
21359         * dirmngr/t-http.c, g10/gpg.c, g10/gpgv.c, g13/g13-syshelp.c
21360         * g13/g13.c, kbx/kbxutil.c, scd/scdaemon.c, sm/gpgsm.c
21361         * tests/gpgscm/main.c, tools/gpg-check-pattern.c
21362         * tools/gpg-connect-agent.c, tools/gpgconf.c, tools/gpgtar.c
21363         * tools/symcryptrun.c: Invoke log_set_prefix() with
21364         human-readable labels.
21365
21366 2016-08-11  Werner Koch  <wk@gnupg.org>
21367
21368         gpg: New option --input-size-hint.
21369         + commit 70b5d7c43a57a44dad60c2c700a263610748d8f4
21370         * g10/options.h: Include stdint.h.
21371         (struct opt): Add field 'input_size_hint'.
21372         * g10/gpg.c (oInputSizeHint): New.
21373         (opts): Add --input-size-hint.
21374         (main): Set opt.input_size_hint.
21375         * g10/progress.c (write_status_progress): Use the hint.
21376
21377         common: New function string_to_u64.
21378         + commit 0698324cde3e0cef7eeb6cfd1640c5eefdf13698
21379         * common/stringhelp.c (string_to_u64): New.
21380         * dirmngr/http.c (longcounter_t): Remove.
21381         (struct cookie_s): Change content_length to uint64_t.
21382         (parse_response): Use string_to_u64.
21383
21384 2016-08-11  Justus Winter  <justus@g10code.com>
21385
21386         common: Remove compatibility code.
21387         + commit 72fa314b71e4ce8780f59b16d32cabf5d4bd5451
21388         * common/Makefile.am: Drop deleted files.
21389         * common/w32-afunix.c: Delete file.
21390         * common/w32-afunix.h: Likewise.
21391
21392         common: Rework the simple password query module.
21393         + commit 14479e2515439c73e385f37e8c2b3fc517b038b9
21394         * common/simple-pwquery.c (writen, readline): Drop.
21395         (agent_send_option, agent_send_all_options, agent_open): Just use
21396         libassuan.
21397         (simple_pw_set_socket): Simplify.
21398         (default_inq_cb): New function.
21399         (simple_pwquery, simple_query): Just use libassuan.
21400         * agent/Makefile.am (gpg_preset_passphrase_LDADD): Add libassuan.
21401         * tools/Makefile.am (symcryptrun_LDADD): Likewise.
21402
21403         common: Remove simple password query error codes.
21404         + commit 9e6503b7ce019aa417099ded1dda87b68c33f912
21405         * common/simple-pwquery.h: Remove mapping function.  Move all
21406         definitions of status codes...
21407         * common/simple-pwquery.c: ... here, and define them to meaningful gpg
21408         error values.
21409         * agent/preset-passphrase.c (preset_passphrase): Use error code as-is.
21410         (forget_passphrase): Likewise.
21411         * tools/symcryptrun.c (confucius_get_pass): Likewise.
21412
21413 2016-08-10  Werner Koch  <wk@gnupg.org>
21414
21415         gpg: Print the signer's UID during verification.
21416         + commit ed5c1b0b8a4790c4fb36a3129387f7c2ef5db302
21417         * g10/parse-packet.c (parse_signature): Sanitize the value stored in
21418         SIGNERS_UID.
21419         * g10/mainproc.c (issuer_fpr_string): New.
21420         (check_sig_and_print): Print the signers' UID.  Print the issuer
21421         fingerprint in --rfc4880bis mode.
21422
21423         common: New function try_make_printable_string.
21424         + commit f2ea7e539c9a22081e3159dcbca84f57f30724ca
21425         * common/stringhelp.c (sanitize_buffer): Remove.  Move code to ...
21426         * common/miscellaneous.c (try_make_printable_string): new.
21427         (make_printable_string): Call try_make_printable_string.
21428
21429 2016-08-10  Justus Winter  <justus@g10code.com>
21430
21431         tests: Fix distcheck.
21432         + commit a6acf1f6b39c5a607f61f643a5d21309ba58685d
21433         * tests/openpgp/issue2417.scm: Copy configuration.
21434
21435 2016-08-10  Werner Koch  <wk@gnupg.org>
21436
21437         gpg: Remove tofu database format "split".
21438         + commit 5b59999ce0dd1650ebe47a74a30ded6af00eeed3
21439         * g10/options.h (struct opt): Remove field tofu_db_format.
21440         * g10/gpg.h (server_control_s): Add fields tofu.batch_update_ref and
21441         tofu.batch_update_started.
21442         * g10/gpg.c (parse_tofu_db_format): Remove.
21443         (main): Make option --tofu-db-format obsolete.
21444         * g10/tofu.c: Major rework.  Remove the pretty complicated and slower
21445         split format and with that all the caching.  Use the dbs struct
21446         directly.  Move global vars for batch update into CTRL.  Change
21447         calling conventions of some function to take CTRL or DBS pointers
21448         instead of  the former low-level database pointer.
21449
21450 2016-08-10  Justus Winter  <justus@g10code.com>
21451
21452         g10: Fix opening of trust database.
21453         + commit a27410a251cd25ca96cd6743969c4db0a0fd553f
21454         * g10/tdbio.c (tdbio_set_dbname): This function explicitly checks for
21455         the file size, but handled the case of a zero-sized file incorrectly
21456         by returning success.  Fix this by initializing the database in that
21457         case.
21458         * tests/openpgp/Makefile.am (XTESTS): Add new test.
21459         * tests/openpgp/issue2417.scm: New file.
21460
21461         tests: Fix distcheck.
21462         + commit 194b1e979c7c547afd0dfea5b2496bdfa34b20f1
21463         * tests/openpgp/Makefile.am (EXTRA_DIST): Explicitly add setup and
21464         teardown scripts now that they no longer are included in the list of
21465         tests.
21466
21467         tests: Improve temporary directory handling.
21468         + commit d9240a3a4688c263632b4168ae2e04363bc91a3a
21469         * tests/gpgscm/ffi.c (ffi_init): Rename 'mkdtemp'.
21470         * tests/gpgscm/tests.scm (mkdtemp): New function that uses a sensible
21471         location and template if no arguments are given.
21472         (with-temporary-working-directory): Simplify accordingly.
21473         (make-temporary-file): Likewise.
21474         * tests/openpgp/run-tests.scm (run-tests-parallel-isolated): Likewise.
21475         (run-tests-sequential-isolated): Likewise.
21476
21477         gpgscm: Make the name of foreign functions more unique.
21478         + commit efe973dab7f69e2b1309446b2fbcd47ce0305399
21479         * tests/gpgscm/ffi-private.h (ffi_define_function_name): Add another
21480         underscore.
21481
21482         tests: Run each test in a clean environment.
21483         + commit e13f1ea8fff3964dc3008432f5c0f26aaa2eaa35
21484         * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Drop obsolete
21485         variables, add 'srcdir', use absolute paths.
21486         (TESTS): Rename to 'XTESTS' to avoid emitting the automake test
21487         runner.  Drop 'setup.scm' and 'finish.scm'.
21488         (xcheck): New target that runs 'run-tests.scm', our Scheme test suite
21489         runner.  It will run each test in a clean environment, isolated from
21490         the other tests.
21491         (EXTRA_DIST): Adapt accordingly.
21492         * tests/openpgp/README: Likewise.
21493
21494         tests: Make ssh test more robust.
21495         + commit b2b21580b68f3a9069562f99675b389a0d044713
21496         * tests/openpgp/ssh.scm: Drop the 'MD5:' which was not printed by
21497         previous ssh versions.
21498
21499 2016-08-10  NIIBE Yutaka  <gniibe@fsij.org>
21500
21501         agent: SSH support fix.
21502         + commit f14795d57f6c81709e9225dd3c5dfd3495cf1b2b
21503         * agent/command-ssh.c (ssh_handler_request_identities): Keep error
21504         message same.
21505
21506 2016-08-09  Werner Koch  <wk@gnupg.org>
21507
21508         agent: Fix regression in recent ssh changes.
21509         + commit e630f904993725c54ec63be00369589b7b7234d2
21510         * agent/command-ssh.c (sexp_key_construct): Lowercase the algo name.
21511
21512         gpg: Extend the PROGRESS line to give the used unit.
21513         + commit 16feb1e0ea9b5d3966f22f4ae047335b9d1b60e1
21514         * g10/progress.c (write_status_progress): Print the units parameter.
21515
21516 2016-08-09  Ben Kibbey  <bjk@luxsci.net>
21517
21518         Cleanup initialization of libgcrypt.
21519         + commit 49829c29e541546084950b8a153067db371d101a
21520         * common/init.c (init_common_subsystems): Initialize libgcrypt.
21521         * dirmngr/Makefile.am (dirmngr_ldap): Link with libgcrypt.
21522
21523 2016-08-09  NIIBE Yutaka  <gniibe@fsij.org>
21524
21525         agent: SSH support improvement.
21526         + commit ebf24e3b29766595204355d82f435a3e675bfbbc
21527         * agent/command-ssh.c (ssh_handler_request_identities): Skip a key with
21528         error, not giving up to handle the request itself.
21529         * agent/cvt-openpgp.c (extract_private_key): Support "ecdsa" key.
21530
21531 2016-08-08  Werner Koch  <wk@gnupg.org>
21532
21533         gpg: Cleanup of dek_to_passphrase function (part 2).
21534         + commit 491d6fdabb3d95905cd96d905e1f965ce8ff07e1
21535         * g10/passphrase.c (passphrase_get): Remove arg KEYID.  Change arg
21536         MODE to NOCACHE.
21537         (passphrase_to_dek): Remove args KEYID and PUBKEY_ALGO.  Split arg
21538         MODE into CREATE and NOCACHE.  Change all callers and adjust stubs.
21539         (passphrase_clear_cache): Remove args KEYID and ALGO.  They are not
21540         used.  Change caller.
21541
21542         gpg: Cleanup of dek_to_passphrase function (part 1).
21543         + commit 5b614973fe2d4b5ef402a3057c31c3ef3042a483
21544         * g10/passphrase.c (passphrase_to_dek_ext): Remove args CUSTDESC and
21545         CUSTPROMPT.  Merge into the passphrase_to_dek wrapper.
21546         (passphrase_get): Remove args CUSTOM_DESCRIPTION and CUSTOM_PROMPT.
21547
21548 2016-08-08  NIIBE Yutaka  <gniibe@fsij.org>
21549
21550         agent: More clean up of SSH support.
21551         + commit 591a8373a5d9567db9b1a1a48205e8a206c7b669
21552         * common/util.h (get_pk_algo_from_key): New.
21553         * common/sexputil.c (get_pk_algo_from_key): The implementation.
21554         * agent/gpg-agent.c: Remove include of openpgpdefs.h.
21555         * agent/command-ssh.c (struct ssh_key_type_spec): Use integer ALGO.
21556         (ssh_key_types): Update with GCRY_PK_*.
21557         (make_cstring, sexp_extract_identifier): Remove.
21558         (sexp_key_construct): Use gcry_pk_algo_name to get ALGO string.
21559         (ssh_key_to_blob): Use cadr to get value list.
21560         (ssh_key_type_lookup): Lookup with integer ALGO.
21561         (ssh_receive_key): Follow the change of ssh_key_type_lookup.
21562         (ssh_send_key_public): Likewise.  Use get_pk_algo_from_key to get ALGO.
21563
21564         tests: Add openpgp/gpgv-forged-keyring.scm.
21565         + commit 7dcad0d3503ac0d75e09efb16246dd78518986fc
21566         * tests/openpgp/gpgv-forged-keyring.scm: New.
21567         * tests/openpgp/forged-keyring.gpg: New.
21568         * tests/openpgp/Makefile.am (TESTS): Add gpgv-forged-keyring.scm.
21569         * tests/openpgp/defs.scm (tools): Add GPGV.
21570         (GPGV): New.
21571
21572 2016-08-06  Werner Koch  <wk@gnupg.org>
21573
21574         agent: Fix long standing regression tracking the connection count.
21575         + commit 40d16029ed8b334c371fa7f24ac762d47302826e
21576         * agent/gpg-agent.c (get_agent_active_connection_count): New.
21577         (do_start_connection_thread, start_connection_thread_ssh): Bump
21578         ACTIVE_CONNECTIONS up and down.
21579         * agent/command.c (cmd_getinfo): Add subcommand "connections".
21580
21581 2016-08-06  NIIBE Yutaka  <gniibe@fsij.org>
21582
21583         agent: Clean up SSH support.
21584         + commit 894789c3299dc47a8c1ccaaa7070382f0fae0262
21585         * agent/command-ssh.c (file_to_buffer): Remove.
21586         (ssh_handler_request_identities): Use agent_public_key_from_file.
21587
21588 2016-08-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21589
21590         gpg: Avoid publishing the GnuPG version by default.
21591         + commit c9387e41db7520d176edd3d6613b85875bdeb32c
21592         * g10/gpg.c (main): initialize opt.emit_version to 0
21593         * doc/gpg.texi: document different default for --emit-version
21594
21595 2016-08-04  Werner Koch  <wk@gnupg.org>
21596
21597         gpg: Make sure that keygrips are printed for each subkey.
21598         + commit c8cc804f56bfefba46641f2c7078fcd67b494bae
21599         * g10/keylist.c (list_keyblock_colon): Print an emprty grip in case of
21600         an error.
21601
21602         gpg: Always print the fingerprint in colons mode.
21603         + commit 54a1ed20e203dcafeacbe21eb147efa08255dbf5
21604         * g10/keylist.c (list_keyblock_colon): Remove arg FPR.  Always print
21605         fingerprint records.  For secret keys always print keygrip records.
21606
21607         tests: Use gpgconf to set the ssh socket envvar.
21608         + commit 0c2a745a2bc21e8f439930f7c0e5d1521c2fd44c
21609         * tests/openpgp/ssh.scm ("SSH_AUTH_SOCK"): Use gpgconf.
21610
21611         gpgconf: Add limited support for -0.
21612         + commit db6f3eb926619dfe6ed2a9be197c51f9a1b6198c
21613         * tools/gpgconf.h (opt): Add field 'null'.
21614         * tools/gpgconf.c: Add option --null/-0.
21615         (list_dirs): Use it here.
21616
21617 2016-08-04  Justus Winter  <justus@g10code.com>
21618
21619         tests: Update list of tests in Scheme test runner.
21620         + commit 05cb30052cdf1d308ff7da901cfa5a809cd49479
21621         * tests/openpgp/run-tests.scm: Add missing tests.
21622
21623         tests: Fix path to fake-pinentry.
21624         + commit 3566544d04a4b81e5dd8a2883304673b2cc2f108
21625         * tests/openpgp/defs.scm: Correctly compute the path to fake-pinentry.
21626
21627 2016-08-04  NIIBE Yutaka  <gniibe@fsij.org>
21628
21629         po: Update Japanese translation.
21630         + commit 89234f7f3643bad2daddc94569f1d651ec5c835e
21631
21632
21633         po: update Japanese translation.
21634         + commit 573e0f36190346e0263bea3ae12a389f4f598d55
21635
21636
21637         g10: Fix checking key for signature validation.
21638         + commit 6f284e6ed63f514b15fe610f490ffcefc87a2164
21639         * g10/sig-check.c (check_signature2): Not only subkey, but also primary
21640         key should have flags.valid=1.
21641
21642 2016-08-03  Justus Winter  <justus@g10code.com>
21643
21644         kbx: Add missing header file.
21645         + commit e3358b246d9380008a4ba7c8f2fe03659901adaf
21646         * kbx/keybox-update.c: Add missing header file.
21647
21648 2016-08-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21649
21650         More cleanup of "allow to".
21651         + commit dc107b78509807db375d3a382eb3376cd2183357
21652         * README, agent/command.c, agent/keyformat.txt, common/i18n.c,
21653           common/iobuf.c, common/keyserver.h, dirmngr/cdblib.c,
21654           dirmngr/ldap-wrapper.c, doc/DETAILS, doc/TRANSLATE,
21655           doc/announce-2.1.txt, doc/gpg.texi, doc/gpgsm.texi,
21656           doc/scdaemon.texi, doc/tools.texi, doc/whats-new-in-2.1.txt,
21657           g10/export.c, g10/getkey.c, g10/import.c, g10/keyedit.c, m4/ksba.m4,
21658           m4/libgcrypt.m4, m4/ntbtls.m4, po/ca.po, po/cs.po, po/da.po,
21659           po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po,
21660           po/fr.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po,
21661           po/nb.po, po/pl.po, po/pt.po, po/ro.po, po/ru.po, po/sk.po,
21662           po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po,
21663           scd/app-p15.c, scd/ccid-driver.c, scd/command.c, sm/gpgsm.c,
21664           sm/sign.c, tools/gpgconf-comp.c, tools/gpgtar.h: replace "Allow to"
21665           with clearer text.
21666
21667         In standard English, the normal construction is "${XXX} allows ${YYY}
21668         to" -- that is, the subject (${XXX}) of the sentence is allowing the
21669         object (${YYY}) to do something.  When the object is missing, the
21670         phrasing sounds awkward, even if the object is implied by context.
21671         There's almost always a better construction that isn't as awkward.
21672
21673         These changes should make the language a bit clearer.
21674
21675         dirmngr: Emit correct spelling of "superseded".
21676         + commit 436b28c23194fa77919967338d5a61a82d242153
21677         * dirmngr/crlcache.c (list_one_crl_entry): Spell superseded correctly.
21678         * dirmngr/ocsp.c (ocsp_invalid): Likewise.
21679
21680         This might break some tools which parse the existing output and expect
21681         misspellings, but i'm not sure there are many such tools, and we
21682         should use standardized orthography going forward.
21683
21684         Fix spelling and grammar.
21685         + commit cd45cf782b91ff0f6b023913963e5258ffcbf464
21686         * agent/learncard.c: s/coccured/occurred/
21687         * doc/dirmngr.texi: s/ommitted/omitted/, s/orginally/originally/,
21688           s/reponses/responses/i
21689         * doc/gpg-agent.texi, doc/dirmngr.texi, doc/gpg.texi: Fix "allows
21690           to" to more conventional english usage.
21691         * doc/tools.texi, g10/gpgcommpose.c, tests/openpgp/armor.scm,
21692           tests/openpgp/armor.test: s/occured/occurred/
21693         * tools/gpgsplit.c: s/calcualting/calculating/
21694         * sm/server.c: s/formated/formatted/
21695
21696 2016-08-03  Werner Koch  <wk@gnupg.org>
21697
21698         gpg,gpgsm: Block signals during keyring/keybox update.
21699         + commit 48a2c93a1886589d1a0e2a4a2173e0e81311200b
21700         * kbx/keybox-util.c (keybox_file_rename): Add arg BLOCK_SIGNALS.
21701         * kbx/keybox-update.c (rename_tmp_file): Block all signals when doing
21702         a double rename.
21703         * g10/keyring.c (rename_tmp_file): Block all signals during the double
21704         rename.
21705
21706         common: New file utilproto.c.
21707         + commit 3a2421c94015432caa49e166bc5bf5c4f80ab7c7
21708         * common/util.h: Factor prototypes from signal.c out to ...
21709         * common/utilproto.h: new.
21710         * common/Makefile.am (common_sources): Add new file.
21711
21712 2016-08-01  Justus Winter  <justus@g10code.com>
21713
21714         gpgsm: Fix machine-readable key listing.
21715         + commit 40365b28c3fdf087fd58401f5a6f42f9d7d29d20
21716         * sm/keylist.c (list_cert_colon): Drop superfluous colon.
21717
21718         tests: Distribute standalone test runner.
21719         + commit c971ff0823d9a649b32fd9f169a12abc3095246e
21720         * tests/openpgp/Makefile.am (EXTRA_DIST): Add missing file
21721         'run-tests.scm'.
21722
21723 2016-07-28  Justus Winter  <justus@g10code.com>
21724
21725         tests: Fix distcheck.
21726         + commit 9e799b0e4f131126b80a5d3272c36d52b8ba1720
21727         * tests/openpgp/Makefile.am (sample_msgs): New variable.
21728         (EXTRA_DIST): Also ship the sample msgs.
21729
21730 2016-07-27  Fredrik Fornwall  <fredrik@fornwall.net>
21731
21732         build: Fix check for Android.
21733         + commit 583a464c62ce8f7d70f5fdab2c7ea73ec3348d69
21734         * configure.ac: Match other Android targets as well.
21735
21736 2016-07-26  Justus Winter  <justus@g10code.com>
21737
21738         common: Fix iobuf_peek corner case.
21739         + commit b2572b0c386fd12ac6581fcce72f8d48cbfd27c7
21740         Previously, iobuf_peek on a file smaller than 'buflen' would hang.
21741
21742         * common/iobuf.c (underflow): Generalize by adding a target parameter.
21743         (iobuf_peek): Use this to prevent looping here.
21744         * tests/openpgp/Makefile.am (TESTS): Add new test.
21745         * tests/openpgp/setup.scm (dearmor): Move function...
21746         * tests/openpgp/defs.scm (dearmor): ... here.
21747         * tests/openpgp/issue2419.scm: New file.
21748         * tests/openpgp/samplemsgs/issue2419.asc: Likewise.
21749
21750         gpgscm: Do not shadow common function name in catch macro.
21751         + commit 046338b8494c036a5e717130d3eadce0291126fc
21752         * tests/gpgscm/init.scm (catch): Do not shadow 'exit'.
21753
21754         tests: Fix distcheck.
21755         + commit 66c0dab3c722c2766828515120775b106286334e
21756         * tests/openpgp/Makefile.am (samplekeys): Add missing key.
21757
21758         gpgscm: Make the verbose setting more useful.
21759         + commit f17aecbcd98103fcd2ece537be96930f354de656
21760         * tests/gpgscm/ffi.c (do_get_verbose): New function.
21761         (do_set_verbose): Likewise.
21762         (ffi_init): Turn *verbose* into a function, add *set-verbose!*.
21763         * tests/gpgscm/tests.scm (call): Adapt accordingly.
21764         (call-with-io): Dump output if *verbose* is high.
21765         (pipe-do): Adapt accordingly.
21766         * tests/openpgp/defs.scm: Set verbosity according to environment.
21767         * tests/openpgp/run-tests.scm (test): Adapt accordingly.
21768
21769         common: Avoid excessive stack use.
21770         + commit b3610badf691178bbbf0831af9aa6b6658c1948a
21771         * common/exectool.c (copy_buffer_shred): Make passing NULL a nop.
21772         (gnupg_exec_tool_stream): Allocate copy buffers from the heap.
21773
21774         common: Rework resource cleanup when handling errors.
21775         + commit 35132a8b119dbc3393ceb0d0874917905d1a6354
21776         * common/exectool.c (gnupg_exec_tool_stream): Rework error handling.
21777
21778         common: Add unit test for exectool.
21779         + commit fe40e9c53dc0710ff73e72d05ba8040874465b55
21780         * common/Makefile.am: Build new test.
21781         * common/t-exectool.c: New file.
21782
21783 2016-07-25  Justus Winter  <justus@g10code.com>
21784
21785         g10: Fix key import statistics.
21786         + commit 4ba11251aff578394000bf480f47160f0879c763
21787         'transfer_secret_keys' collects statistics on a subkey-basis, while
21788         the other code does not.  This leads to inflated numbers when
21789         importing secret keys.  E.g. 'count' is incremented by the main
21790         parsing loop in 'import', and again in 'transfer_secret_keys', leading
21791         to a total of 3 if one key with two secret subkeys is imported.
21792
21793         * g10/import.c (import_secret_one): Adjust to the fact that
21794         'transfer_secret_keys' collects subkey statistics.
21795         * tests/openpgp/Makefile.am (TESTS): Add new test.
21796         * tests/openpgp/issue2346.scm: New file.
21797         * tests/openpgp/samplekeys/issue2346.gpg: Likewise.
21798
21799 2016-07-22  Justus Winter  <justus@g10code.com>
21800
21801         gpgscm: Make function more general.
21802         + commit 9ee23a715d5dad6bf568a2deb1c55bf15601cf51
21803         * tests/gpgscm/tests.scm (in-srcdir): Accept more path fragments.
21804
21805         g10: Properly ignore legacy keys in the keyring cache.
21806         + commit d9839c9d303a01dc1032a6de311e034fe14e81da
21807         * g10/keyring.c (keyring_rebuild_cache): Properly ignore legacy keys
21808         in the keyring cache.
21809         * tests/migrations/Makefile.am (TESTS): Add new test.
21810         * tests/migrations/common.scm (GPG-no-batch): New variable.
21811         (run-test): New function.
21812         * tests/migrations/issue2276.scm: New file.
21813         * tests/migrations/issue2276.tar.asc: Likewise.
21814
21815 2016-07-21  Justus Winter  <justus@g10code.com>
21816
21817         g10: Fix error handling.
21818         + commit 45bb9a2a46e11bc13c6b39e7b4748b7de199018e
21819         * g10/tofu.c (show_statistics): Fix error handling, 0 is a valid
21820         duration.
21821
21822         g10: Drop superfluous begin transaction.
21823         + commit 8a6f8e1e397a2d676b211f2dbc6df4a80b67442d
21824         * g10/tofu.c (record_binding): We only need a transaction for the
21825         split format.
21826
21827         gpgscm: Make assert macro more accurate.
21828         + commit 699c6c9f4b44441ab3db7f942df5b81f4cd88b06
21829         * tests/gpgscm/lib.scm (assert): Print the representation of the
21830         failed expression.
21831
21832         gpgscm: Make error message more useful.
21833         + commit 7207b2fe45bcf884e029366a2677a570234bed2e
21834         * tests/gpgscm/scheme.c (opexe_0): Include names of missing function
21835         parameters in the error message.
21836
21837         g10: Fix crash.
21838         + commit 1af2fd44f0a66fd0d94c224319db0b128d42a288
21839         * g10/tofu.c (tofu_closedbs): Fix freeing database handles up to the
21840         cache limit.  Previously, this would crash if db_cache_count == count.
21841
21842 2016-07-20  NIIBE Yutaka  <gniibe@fsij.org>
21843
21844         scd: Fix card removal/reset on multiple contexts.
21845         + commit 1598a4476466822e7e9c757ac471089d3db4b545
21846         * scd/app.c (application_notify_card_reset): Add message for debug.
21847         *scd/command.c (update_card_removed): Call release_application and set
21848         SLOT -1 here.
21849         (struct server_local_s): Remove app_ctx_marked_for_release.
21850         (do_reset): Don't mark release but call release_application here.
21851         (open_card): Remove app_ctx_marked_for_release handling.
21852         (update_reader_status_file): Don't set SLOT here, so that it can be
21853         released the APP by application_notify_card_reset in
21854         update_card_removed.
21855
21856 2016-07-19  Justus Winter  <justus@g10code.com>
21857
21858         agent: Add known keys to sshcontrol.
21859         + commit 270f7f7b8b235cc93516566702e2a1d256605cca
21860         * agent/command-ssh.c (ssh_identity_register): Add a key to sshcontrol
21861         even if it is already in the private key store.
21862         * tests/openpgp/ssh.scm: Test this.
21863
21864         tests: Add test for ssh support.
21865         + commit d7a405de8325aa945ab791dcd3bc48272af33b86
21866         * tests/gpgscm/tests.scm (path-expand): New function.
21867         * tests/openpgp/Makefile.am (TESTS): Add new test.
21868         (sample_keys): Add new keys.
21869         (CLEANFILES): Clean ssh socket and control file.
21870         * tests/openpgp/fake-pinentry.c (main): Add a default passphrase.
21871         * tests/openpgp/gpg-agent.conf.tmpl: Enable ssh support.
21872         * tests/openpgp/samplekeys/ssh-dsa.key: New file.
21873         * tests/openpgp/samplekeys/ssh-ecdsa.key: Likewise.
21874         * tests/openpgp/samplekeys/ssh-ed25519.key: Likewise.
21875         * tests/openpgp/samplekeys/ssh-rsa.key: Likewise.
21876         * tests/openpgp/ssh.scm: Likewise.
21877
21878 2016-07-19  NIIBE Yutaka  <gniibe@fsij.org>
21879
21880         scd: Fix race conditions for release_application.
21881         + commit 0c1fd4e9884ed7c1edd1819762b9e8a77f606ed3
21882         * scd/command.c (do_reset, cmd_restart): Reset app_ctx before calling
21883         release_application.
21884
21885 2016-07-18  Justus Winter  <justus@g10code.com>
21886
21887         agent: Fix passphrase cache lookups.
21888         + commit f474249366e8e143c8e6eb7f7b1a74056e46fa1f
21889         CACHE_MODE_ANY is supposed to match any cache mode except
21890         CACHE_MODE_IGNORE, but the code used '==' to compare cache modes.
21891
21892         * agent/cache.c (cache_mode_equal): New function.
21893         (agent_set_cache): Use the new function to compare cache modes.
21894         (agent_get_cache): Likewise.
21895         * tests/openpgp/Makefile.am (TESTS): Add new test.
21896         * tests/openpgp/issue2015.scm: New file.
21897
21898 2016-07-15  Justus Winter  <justus@g10code.com>
21899
21900         build: Always build gpgtar.
21901         + commit 7f4dd24b880323a5b772719dafae829c288303a8
21902         We use gpgtar to unpack test data, hence we always build it.  If the
21903         user opts out, we simply don't install it.
21904
21905         * configure.ac: Add comment.
21906         * tests/migrations/Makefile.am (required_pgms): Make sure gpgtar is
21907         built.
21908         * tools/Makefile.am: Always build gpgtar, but do not install it if the
21909         user used '--disable-gpgtar'.
21910
21911 2016-07-15  Werner Koch  <wk@gnupg.org>
21912
21913         wks: Publish as binary file.
21914         + commit b7b37716b9d2cd1b71b5f7f0e4fb2c1a43eee90a
21915         * tools/gpg-wks-server.c (copy_key_as_binary): New.
21916         (check_and_publish): Use new function instead of rename.
21917
21918 2016-07-15  Justus Winter  <justus@g10code.com>
21919
21920         gpgscm: Fix linking.
21921         + commit c49c43d7e4229fd9f1bc55e17fa32fdc334dbef6
21922         * tests/gpgscm/Makefile.am: Add -lintl.
21923
21924         g10: Fix building without trust models.
21925         + commit d21efa398874be4a15e8283c5fc382fb90f562fd
21926         * g10/pkclist.c (write_trust_status): Fall back to the previous
21927         behavior.
21928
21929         tests: Check for gpgtar.
21930         + commit 12a887050a560c4cacaf95e4cdb0cc42d8b87aa1
21931         * tests/migrations/extended-pkf.scm: Skip test if gpgtar is not built.
21932         * tests/migrations/from-classic.scm: Likewise.
21933         * tests/openpgp/gpgtar.scm: Fix check for gpgtar.
21934
21935 2016-07-14  Werner Koch  <wk@gnupg.org>
21936
21937         Release 2.1.14.
21938         + commit 09c448202ffb4c26d7ec2028351a78e2d3680396
21939
21940
21941         po: Update the German translation.
21942         + commit 23c2491f94b94fa231bde8187eb958432555eff1
21943
21944
21945 2016-07-14  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
21946
21947         dirmngr: fix handling of HTTP redirections.
21948         + commit 60428c24fb29cb633c9392abb777bc4da88dbfba
21949         * dirmngr/ks-engine-http.c (ks_http_fetch): Reinitialize HTTP session
21950         when following a HTTP redirection.
21951
21952 2016-07-14  Werner Koch  <wk@gnupg.org>
21953
21954         gpg: Remove options --print-dane-records and --print-pka-records.
21955         + commit 1e9bc66a9a60de668890452d504eea3c3c614f7e
21956         * g10/gpg.c (main): Remove options but print a dedicated warning.
21957         * g10/options.h (struct opt): Remove fields 'print_dane_records' and
21958         'print_pka_records'.
21959         * g10/keylist.c (list_keyblock): Do not call list_keyblock_pka.
21960         (list_keyblock_pka): Remove.
21961
21962 2016-07-14  Åka Sikrom  <a4@hush.com>
21963
21964         po: Complete update of the Norwegian translation.
21965         + commit d6d7e4d218a1e2e2a88bc893b00967b032d194f8
21966
21967
21968 2016-07-14  Yuri Chornoivan  <yurchor@ukr.net>
21969
21970         Update Ukrainian translation.
21971         + commit 9427288ebb32141c196996315f93535fd7744901
21972
21973
21974 2016-07-14  Ineiev  <ineiev@gnu.org>
21975
21976         Update Russian translation.
21977         + commit 39c88870359bc75e9f72e08a7466fcff01bdc655
21978
21979
21980 2016-07-14  Werner Koch  <wk@gnupg.org>
21981
21982         gpg: Fix regression since 2.1 in --search-key with a fingerprint.
21983         + commit 0342369ce001b9dba04dc79e7a4eb66fbda278e7
21984         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Prefix fingerprint with 0x.
21985
21986         gpgscm: Use kludge to avoid improper use of ffi_schemify_name.
21987         + commit fb14bf0a95e361b0991067e3aea2902d54be811d
21988         * tests/gpgscm/ffi.c (ffi_schemify_name): Use xstrdup instead of
21989         strdup for now.
21990
21991         build: Require latest released libraries.
21992         + commit c98995efefbdebea8f53d54ba2df4217dfd31ad4
21993         * agent/protect.c (OCB_MODE_SUPPORTED): Remove macro.
21994         (do_encryption): Always support OCB.
21995         (do_decryption): Ditto.
21996         (agent_unprotect): Ditto.
21997         * dirmngr/server.c (is_tor_running): Unconditionally build this.
21998
21999 2016-07-13  Werner Koch  <wk@gnupg.org>
22000
22001         build: Update config.{guess,sub} to {2016-05-15,2016-06-20}.
22002         + commit 66b634f27f10e4c0cb21c3f201998497d0bb24ca
22003         * build-aux/config.guess: Update.
22004         * build-aux/config.sub: Update.
22005
22006         gpg: Fix regression due to the new --mimemode options.
22007         + commit 3b8ed7650d2d63b01ec80ecf9e493b80e3ac7ef8
22008         * g10/gpg.c (opts): Re-add oTextmodeShort.
22009
22010 2016-07-13  Daiki Ueno  <ueno@gnu.org>
22011
22012         gpg: Make --try-all-secrets work for hidden recipients.
22013         + commit 82b90eee100cf1c9680517059b2d35e295dd992a
22014         * g10/getkey.c (enum_secret_keys): Really enumerate all secret
22015         keys if --try-all-secrets is specified.
22016
22017 2016-07-13  Werner Koch  <wk@gnupg.org>
22018
22019         gpg: Do not print a the short keyid if the high word is zero.
22020         + commit 7b96a8d736934e65bb2adbc17059f84dfeaf95fb
22021         * g10/keyid.c (format_keyid): Always returh long keyid ifor KF_LONG.
22022
22023         gpg: New option --mimemode.
22024         + commit e148c3caa90fbadba32bdbfea9513392e3aea598
22025         * g10/gpg.c (oMimemode): New.
22026         (opts): Add --mimemode.
22027         (main): Use --mimemode only in rfc4880bis compliance mode.
22028         * g10/options.h (struct opt): Add field "mimemode".
22029         * g10/build-packet.c (do_plaintext): Allow for mode 'm'.
22030         * g10/encrypt.c (encrypt_simple, encrypt_crypt): Use 'm' if requested.
22031         * g10/plaintext.c (handle_plaintext): Handle 'm' mode.
22032         * g10/sign.c (write_plaintext_packet): Handle 'm' mode.
22033         (sign_file, sign_symencrypt_file): Use 'm' if requested.
22034
22035         wks: Use correct key for the confirmation.
22036         + commit 95810929f75bd718dbdf2cd1c0181137a45e2456
22037         * tools/gpg-wks-client.c (send_confirmation_response): Actually
22038         encrypt to the recipient.
22039
22040         wks: New server command --list-domains.
22041         + commit 44ecc33b4a7147d9c112a72f55a42b65cef4fe67
22042         * tools/gpg-wks-server.c (aListDomains): New.
22043         (opts): Add --list-domains.
22044         (parse_arguments): Implement.
22045         (main): Ditto.  Use only one final diagnostic message.
22046         (command_list_domains): New.
22047         (check_and_publish): Remove directory creation.
22048         (get_domain_list): New.
22049         (expire_pending_confirmations): Rewrite using a list of directories.
22050         (command_cron): Get domain list and pass to
22051         expire_pending_confirmations.
22052
22053 2016-07-13  NIIBE Yutaka  <gniibe@fsij.org>
22054
22055         agent: Fix envvars for UPDATESTARTUPTTY.
22056         + commit 7be218177701af316db75057c99ca674d53cf585
22057         agent/command.c (cmd_updatestartuptty): Use session_env_list_stdenvnames
22058         to get the list.
22059
22060 2016-07-12  Werner Koch  <wk@gnupg.org>
22061
22062         g13: Fix memleak.
22063         + commit acb27915f8646a875b6bb507ff46cd1bc330c02b
22064         * g13/g13tuple.c (create_tupledesc): Init refcount to 1.
22065
22066         wks: Add --cron command to gpg-wks-server.
22067         + commit 38eb5f81d223616e3ee34bdfb41c387ce4e7df22
22068         * tools/gpg-wks-server.c (PENDING_TTL): New.
22069         (expire_one_domain, expire_pending_confirmations): New.
22070         (command_cron): New.
22071         (main): Implement --cron.
22072
22073         wks: Try to send an encrypted confirmation back.
22074         + commit 5de41c4ecef32add89044b8a550a47cce8c6d61e
22075         * tools/gpg-wks-client.c (encrypt_response_status_cb): New.
22076         (encrypt_response): New.
22077         (send_confirmation_response): Encrypt the response.
22078
22079         * tools/gpg-wks-server.c (send_confirmation_request): Use freeing of
22080         BODY and BODYENC.
22081
22082         wks: Also create DANE record.
22083         + commit d3837e0435921bfa5587a50738f5924a5fdf976a
22084         * tools/gpg-wks-server.c (copy_key_as_dane): New.
22085         (check_and_publish): Also publish as DANE record.
22086
22087         gpg: Extend import-option import-export to print PKA or DANE.
22088         + commit 9b075575cdc5851b019aed5ca5d5e18416beec8e
22089         * g10/export.c (do_export_stream): Move PKA and DANE printing helper
22090         code to ...
22091         (print_pka_or_dane_records): this fucntion.
22092         (write_keyblock_to_output): Add arg OPTIOSN and call
22093         print_pka_or_dane_records if requested.
22094
22095         gpg: Move a function from import.c to export.c.
22096         + commit 0f5b105d96780a29cc58893285e6c38482e0cc2d
22097         * g10/import.c (write_keyblock_to_output): Move to ...
22098         * g10/export.c (write_keyblock_to_output): here.  Add arg WITH_ARMOR.
22099         Also make sure never to export ring trust packets.
22100
22101 2016-07-11  Werner Koch  <wk@gnupg.org>
22102
22103         gpgconf: Enhance --list-dirs.
22104         + commit 7732b332886792b2bbf47ecf7430e953f1c55a2c
22105         * tools/gpgconf.c (main) <aListDir>: Factor code out to ...
22106         (list_dirs): new.  Rewrite to use a table.  Allow selection of a
22107         items.  Add "agent-ssh-socket".
22108
22109 2016-07-09  NIIBE Yutaka  <gniibe@fsij.org>
22110
22111         gpgv: Tweak default options for extra security.
22112         + commit e32c575e0f3704e7563048eea6d26844bdfc494b
22113         * g10/gpgv.c (main): Set opt.no_sig _cache, so that it doesn't depend on
22114         cached status.  Similarly, set opt.flags.require_cross_cert for backsig
22115         validation for subkey signature.
22116
22117 2016-07-07  Werner Koch  <wk@gnupg.org>
22118
22119         gpg: Add export options "export-pka" and "export-dane".
22120         + commit cbe467e794f3be81b8da2bcb1732b5514b13b71d
22121         * g10/options.h (EXPORT_PKA_FORMAT): New.
22122         * g10/keylist.c (list_keyblock_pka): Do not use DANE flag.
22123         * g10/export.c: Include zb32.h.
22124         (parse_export_options): Add options "export-pka" and "export-dane".
22125         (do_export): Do not armor if either of these option is set.
22126         (print_pka_or_dane_records): New.
22127         (do_export_stream): Implement new options.
22128
22129         gpg: Split a too large export function.
22130         + commit b05878f32aa507aa9087d7c992b630840b5ad71c
22131         * g10/export.c (do_export_stream): Factor some code out to ...
22132         (do_export_one_keyblock): new.
22133
22134 2016-07-07  Justus Winter  <justus@g10code.com>
22135
22136         gpgscm: Capture output of spawned processes.
22137         + commit 2f61aa0ff11b194d20307751ab686c87cd47dd56
22138         * tests/gpgscm/tests.scm (call-check): Capture stdout and stderr, and
22139         return stdout if the child exited successfully, or include stderr in
22140         the error.
22141         * tests/openpgp/version.scm: Demonstrate this by checking the stdout.
22142
22143 2016-07-06  Werner Koch  <wk@gnupg.org>
22144
22145         doc: Escape file names in generated macros.
22146         + commit 511c2522b95333226a5e45e538fed29dd44c9be3
22147         * doc/mkdefsinc.c (print_filename): New.
22148         (main): Use it here.
22149
22150         wks: Let the server take the encrytion key from the file.
22151         + commit e5896da666551da5322b2ae5458d429b9e60241e
22152         * tools/gpg-wks-server.c (encrypt_stream): Change arg 'fingerprint' to
22153         'keyfile'.
22154         (store_key_as_pending): Add arg 'r_fname' to make of the keyfile.
22155         (send_confirmation_request): Add arg 'keyfile'.
22156         (process_new_key): Pass on the name of the keyfile.
22157
22158         gpg: New options --recipient-file and --hidden-recipient-file.
22159         + commit a479804c86bc24bfab101f39464db3ecfbaedf6d
22160         * g10/gpg.c (oRecipientFile, oHiddenRecipientFile): New.
22161         (opts): Add options --recipient-file and --hidden-recipient-file.
22162         (main): Implement them.  Also remove duplicate code from similar
22163         options.
22164         * g10/keydb.h (PK_LIST_FROM_FILE): New.
22165         (PK_LIST_SHIFT): Bump up.
22166         * g10/pkclist.c (expand_group): Take care of PK_LIST_FROM_FILE.
22167         (find_and_check_key): Add and implement arg FROM_FILE.
22168         (build_pk_list): Pass new value for new arg.
22169         * g10/getkey.c (get_pubkey_fromfile): New.
22170         * g10/gpgv.c (read_key_from_file): New stub.
22171         * g10/test-stubs.c (read_key_from_file): New stub.
22172         * g10/server.c (cmd_recipient): Add flag --file.
22173         * g10/import.c (read_key_from_file): New.
22174
22175         * tests/openpgp/defs.scm (key-file1): New.
22176         (key-file2): New.
22177         * tests/openpgp/setup.scm: Add their private keys and import the
22178         key-file1.
22179         * tests/openpgp/encrypt.scm: Add new test.
22180
22181         gpg: New option --no-keyring.
22182         + commit 073be51a866cb5600479c504a44ae5ac94a449a2
22183         * g10/gpg.c (oNoKeyring): New.
22184         (opts): Add "--no-keyring".
22185         (main): Do not register any keyring if the option is used.
22186
22187         gpg: Document use of node flags in import.c and remove unused args.
22188         + commit fdfde91595109e51a5b8fafd292244ad41dfb83d
22189         * g10/import.c (NODE_GOOD_SELFSIG): New.  Use instead of 1.
22190         (NODE_BAD_SELFSIG): New.  Use instead of 2.
22191         (NODE_DELETION_MARK): New.  Use instead of 4.
22192         (NODE_FLAG_A): New.  Use to mark new nodes in merge_blocks.
22193         (chk_self_sigs): Remove unused args FNAME and PK.
22194         (import_one): Adjust call.  Simplify error return because
22195         chk_self_sigs does not return an error code.
22196         (append_uid, append_key, merge_sigs, merge_keysigs): Remove unsued
22197         args FNAME and KEYID.
22198         (merge_blocks, import_one, import_secret_one)
22199         (import_revoke_cert): Remove unused arg FNAME.
22200
22201         gpg: Get rid of an unused arg in a function in getkey.c.
22202         + commit 7e0c48eb6f18a80142ca2a0f76fe8d270a4e5b33
22203         * g10/getkey.c (pk_from_block): Remove unused arg CTX.  Change all
22204         callers.
22205
22206         gpg: Change calling convention for a function in getkey.c.
22207         + commit 9385dfeb9dd6d83608a10c7896c341f585a25a2b
22208         * g10/getkey.c (merge_selfsigs): Remove arg CTX.  Add args REQ_USAGE
22209         and WANT_EXACT.
22210         (finish_lookup): Adjust caller.  Set LOOKUP_NOT_SELECTED here...
22211         (lookup): and not here.
22212
22213 2016-07-05  Werner Koch  <wk@gnupg.org>
22214
22215         gpg: Fix possible out-of-bounds read in is_armored.
22216         + commit 5d1a9c4dc823b418db6c4686da55ee3abdf023b0
22217         * g10/armor.c (check_input): Call is_armored only if LEN >= 2.
22218         (unarmor_pump): Use a 2 byte buffer for is_armored.
22219
22220 2016-07-05  Justus Winter  <justus@g10code.com>
22221
22222         tests: Honor environment variable 'TMP'.
22223         + commit 8270580a5a70874beeffcdd16221937db4bcdc93
22224         This fixes problems with long socket names, e.g. when doing distcheck.
22225
22226         * tests/gpgscm/tests.scm (path-join): New function.
22227         (with-temporary-working-directory): Honor 'TMP'.
22228         (make-temporary-file): Likewise.
22229         * tests/migrations/Makefile.am (TMP): Default to '/tmp'.
22230         (TESTS_ENVIRONMENT): Set 'TMP'.
22231         * tests/openpgp/Makefile.am (TMP): Default to '/tmp'.
22232         (TESTS_ENVIRONMENT): Set 'TMP'.
22233
22234         gpgscm: Improve robustness and compatibility.
22235         + commit f26fe4f73e8430d93c03d95a8a24fdabd078bb20
22236         * tests/gpgscm/ffi.c (do_getenv): Avoid gccism.
22237         (do_mkdtemp): Handle errors.
22238
22239         tests/migrations: Fix distcheck.
22240         + commit b70d08827ddb56423ad610b4ebaaaf9cc763512f
22241         * tests/migrations/Makefile.am (TESTS): Rename test.
22242         (TEST_FILES): Update list.
22243         (EXTRA_DIST): Add common.scm.
22244         * tests/migrations/common.scm (GPGTAR): New variable.
22245         (dearmor): Rename and untar archive.
22246         * tests/migrations/extended-private-key-format.scm: Rename.
22247         (setup): Update.
22248         * tests/migrations/extended-pkf.tar.asc: New file.
22249         * tests/migrations/extended-private-key-format.gpghome: Delete.
22250         * tests/migrations/from-classic.gpghome: Likewise.
22251         * tests/migrations/from-classic.scm (setup): Update.
22252         * tests/migrations/from-classic.tar.asc: New file.
22253
22254         tools/gpgtar: Provide --create and --extract.
22255         + commit 0b8a3358798b7028be872a923da2e275da67d592
22256         * tools/gpgtar.c (cmd_and_opt_values): New values.
22257         (opts): New actions.
22258         (parse_arguments): Handle new actions.
22259         * tests/openpgp/gpgtar.scm: Test new interface.
22260
22261         g10: Fix out-of-bounds read.
22262         + commit a6b87981f7ddef42b25703723162c647e312b125
22263         * g10/armor.c (use_armor_filter): We need two bytes for 'is_armored'.
22264
22265 2016-07-04  Werner Koch  <wk@gnupg.org>
22266
22267         wks: Add command --read to gpg-wks-client.
22268         + commit 8c8ae043b8d65cb79e0e99c5bdbdcbf34714bd0c
22269         * tools/gpg-wks-client.c (aRead): New.
22270         (opts): Add command "--read".
22271         (main): Implement that.
22272
22273         tests: Add a gettime test for sizeof (time_t) > 4.
22274         + commit 27d158ead4a2b9c52269ef28d050a49c786c7d13
22275         * common/t-gettime.c (test_isotime2epoch): Add 4 more tests.
22276
22277 2016-07-03  Werner Koch  <wk@gnupg.org>
22278
22279         gpg: Avoid spurious failures on keyblocks with no or only deleted nodes.
22280         + commit 9177a897732b3cebf3f15c97c1f613f71b6318fe
22281         * g10/import.c (write_keyblock_to_output): Clear ERR on success.
22282
22283         wks: Let the client only export the requested UID.
22284         + commit 1bfed0bbc5ec9d60d4fb3a0f5c865923ed3563e7
22285         * tools/gpg-wks-client.c (get_key): Export only the requested uid.
22286
22287         tools: Call sendmail directly from the wks tools.
22288         + commit 7705f310f1406fe49b45e16c371b09863313f24f
22289         * tools/send-mail.c, tools/send-mail.h: New.
22290         * tools/wks-util.c: New.
22291         * tools/Makefile.am (gpg_wks_server_SOURCES): Add them.
22292         (gpg_wks_client_SOURCES): Ditto.
22293         * tools/gpg-wks.h (opt): Add fields use_sendmail and output.
22294         * tools/gpg-wks-client.c: Add options --send and --output.  Rename
22295         command --send to --create.
22296         (command_send, send_confirmation_response): Output via wks_send_mime.
22297         * tools/gpg-wks-server.c:  Add options --send and --output.
22298         (send_confirmation_request): Output via wks_send_mime.
22299         (check_and_publish): Add hack for name-value bug.
22300
22301 2016-07-02  Werner Koch  <wk@gnupg.org>
22302
22303         tools: Add options to gpg-wks-server.
22304         + commit c619035d9cd0c9cef62facf5365321289051f9a0
22305         * tools/gpg-wks.h (opt): Add 'default_from' and 'extra_headers'.
22306         * tools/gpg-wks-server.c (oFrom, oHeader): New.
22307         (parse_arguments): Set them and check args.
22308         (get_submission_address): New.
22309         (send_confirmation_request): Set correct From address.  Add extra
22310         headers.
22311         (process_new_key): Return an error code.
22312
22313         tools: Extend mime-maker.c:mime_maker_add_header.
22314         + commit 0e36a1d1fb79c2b75c081616eed00075190b38aa
22315         * tools/mime-maker.c (add_header): Check header name and allow
22316         name-value syntax.
22317         (mime_maker_add_header): Add mode for a syntax check.
22318
22319         doc: Describe filter expressions.
22320         + commit 442efa9b3ff211c692b6967a944b3d9371ad1bb7
22321         * doc/gpg.texi: Remove some superfluous .E.
22322         (FILTER EXPRESSIONS): New.
22323
22324         yat2m: Fix table formatting.
22325         + commit aae3cdb61555db4efb26f522030c8303a731d4a9
22326         * doc/yat2m.c (proc_texi_cmd): Use .TQ for @itemx.  Print a .P at the
22327         end of a level 0 table.
22328
22329 2016-07-01  Werner Koch  <wk@gnupg.org>
22330
22331         gpg: New option --export-filter.
22332         + commit 7bfc86c938d11c14ea78b196c82ceba2a2f5317d
22333         * g10/gpg.c (oExportFilter): New.
22334         (opts): Add --export-filter.
22335         (main): Handle option.
22336         * g10/export.c: Include recsel.h, init.h, and mbox-util.h.
22337         (export_keep_uid): New global var.
22338         (cleanup_export_globals): New.
22339         (parse_and_set_export_filter): New.
22340         (filter_getval): New.
22341         (apply_keep_uid_filter): New.
22342         (do_export_stream): Apply filter if set.
22343
22344         gpg: New option --import-filter.
22345         + commit 5137bf73ccc98a72c2eeac148e4d4b5d58f0a854
22346         * g10/gpg.c (oImportFilter): New.
22347         (opts): Add --import-filter.
22348         (main): Handle option.
22349         * g10/import.c: Include recsel.h, init.h, and mbox-util.h.
22350         (import_keep_uid): New global var.
22351         (cleanup_import_globals): New.
22352         (parse_and_set_import_filter): New.
22353         (filter_getval): New.
22354         (apply_keep_uid_filter): New.
22355         (import_one): Apply filter if set.
22356
22357         gpg: Allow to cache the mbox in a user id struct.
22358         + commit f015552374d69e28292a12f2b91ab34d65c9b457
22359         * g10/packet.h (PKT_user_id): Add field 'mbox'.
22360         * g10/free-packet.c (free_user_id): Free that.
22361
22362         gpg: Make sure a user ID packet has always a terminating Nul in memory.
22363         + commit d8bce478be3ae9e401841a77d189ef3c81ccb757
22364         * g10/keygen.c (write_uid): Avoid overflow.
22365
22366         common: Add function to select records etc.
22367         + commit 681c6ef757a73fc1a63a552186e038db179494aa
22368         * common/recsel.c, common/recsel.h: New.
22369         * common/t-recsel.c: New.
22370
22371         common: Smart up register_mem_cleanup_func.
22372         + commit 6446a6b3dfd3b2e68b4285870f902ed1f86b0866
22373         * common/init.c (register_mem_cleanup_func): Avoid double registration.
22374
22375 2016-07-01  Justus Winter  <justus@g10code.com>
22376
22377         common: Annotate semi-static allocation.
22378         + commit 49fdd0887c84ed7f7b858b9e7ffa146fcb7f1e87
22379         * common/argparse.c (optfile_parse): Allow string arguments to leak.
22380
22381         g10: Fix memory leak.
22382         + commit 78aeb236fe4ff3a6d51b3095148e7086f2a6e9a8
22383         * g10/keyserver.c (parse_keyserver_uri): Free URI.
22384
22385         tools/gpgtar: Annotate semi-static allocation.
22386         + commit cff63da930b6b3f0253668911e0931713b2b584a
22387         * tools/gpgtar.c (shell_parse_argv): Annotate argument vector as
22388         leaked.
22389
22390         g10: Fix memory leak.
22391         + commit c454922ffa71929c810c6ff048d902498575302f
22392         * g10/import.c (transfer_secret_keys): Release curve from the previous
22393         iteration.
22394
22395         g10: Fix build with disabled kbnode cache.
22396         + commit ff77b92aae9c8e20cbc7fa7c294adcc6a8c2f614
22397         * g10/kbnode.c (release_unused_nodes): Fix build with disabled kbnode
22398         cache.
22399
22400         g10: Fix memory leak.
22401         + commit 44d4c695722d96b3bbef16f2843f62413b9670cd
22402         * g10/trustdb.c (tdb_get_validity_core): Fix kbnode leak.
22403
22404         g10: Fix memory leak.
22405         + commit 5fafd18d474da7b763f5b82c73b6ca4288e136d7
22406         * g10/keygen.c (keygen_set_std_prefs): Fix memory leak.
22407
22408         Fix trivial memory leaks in tests.
22409         + commit 6bfbc368f90b274192d3751274816091675f5109
22410         * dirmngr/t-ldap-parse-uri.c (check_ldap_escape_filter): Free result.
22411         * g10/t-stutter.c (main): Free file name.
22412
22413 2016-06-30  Justus Winter  <justus@g10code.com>
22414
22415         tools: Fix trivial memory leak.
22416         + commit 8f39185d7bfa0bc749f9ccf4a041d2da4eba24ff
22417         * tools/gpg-connect-agent.c (main): Fix trivial memory leak.
22418
22419         g10: Fix memory leak.
22420         + commit 401db0eebbcd28dca8f4059706bfbd18d8cc7528
22421         * g10/export.c (do_export_stream): Free secret parameters.
22422
22423         g10: Fix memory leak.
22424         + commit eb4cdbefb05795b77a8a72189eff246b84442caf
22425         * g10/keygen.c (read_parameter_file): Free 'line'.
22426
22427         g10: Fix memory leak.
22428         + commit 1de362af9094e0a1a0be60f77fbea7c5190a4dcc
22429         * g10/sign.c (mk_notation_policy_etc): Free 'mbox'.
22430
22431         common: Fix memory leak.
22432         + commit 6b9a89e4c7d6f19de62e0a908a8d80c98bf99819
22433         * g10/textfilter.c (copy_clearsig_text): Free buffer.
22434
22435         common: Fix memory leak.
22436         + commit d2d19063d3adf29340aeb39f14e1b1e9aacf41e7
22437         * common/iobuf.c (iobuf_set_partial_body_length_mode): Only create
22438         context if necessary.
22439
22440         common: Fix memory leak.
22441         + commit 9037c23979866e6e085b3e32f973bcba590a2635
22442         * common/simple-pwquery.c (agent_open): Free socket path.
22443
22444         g10: Fix keybox-related memory leaks.
22445         + commit 29beea6462cca32d3278b0f7f9364ff4342327b8
22446         * g10/keydb.c (keydb_release): Clear keyblock cache.
22447         (keydb_get_keyblock): Revert previous change.
22448         * kbx/keybox-blob.c (create_blob_finish): Free previous buffer, free
22449         fixups after applying them.
22450         (_keybox_release_blob): Free buffer.  Currently, the buffer has been
22451         extracted before the keybox is released, but this is the right thing
22452         to do here.
22453
22454         g10: Fix memory leak.
22455         + commit 5869f518cbd8b41b4c9880fc593216b9efeea430
22456         * g10/compress.c (release_context): Free buffers.
22457
22458         g10: Fix memory leak.
22459         + commit 84f262102be19334534cccc66ed7eceea2714527
22460         * g10/sign.c (write_plaintext_packet): Free packet.
22461
22462         g10: Fix memory leak.
22463         + commit abae8a9dc8a00cf46291ccb40644b3a7aa477307
22464         * g10/mainproc.c (release_list): Do not exit early if list is NULL,
22465         there are other resources that must be released.
22466
22467         gpgscm: Fix reallocating string ports.
22468         + commit 5003caa8fdc80afd5748835c06621014f83e6ec4
22469         * tests/gpgscm/scheme.c (realloc_port_string): Use memcpy because
22470         Scheme strings may contain 0s.
22471
22472         gpgscm: Free memory backing string ports.
22473         + commit 599ad21104e622acbd1230d90d6a23abf9145499
22474         * tests/gpgscm/scheme.c (finalize_cell): Free memory backing string
22475         ports.
22476
22477         gpgscm: Use the allocator from libgcrypt.
22478         + commit d4ede89981c769b0626ab2b37615da1d12a3b078
22479         * tests/gpgscm/main.c (main): Use the allocator from libgcrypt.
22480
22481         w32: Fix build.
22482         + commit dbcb342eaf1738798a5378d9ecd83c7946140d54
22483         * g10/keyedit.c (keyedit_quick_revuid): Fix call to
22484         'check_trustdb_stale'.
22485
22486 2016-06-30  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
22487
22488         g10: Implement gpg --quick-revuid.
22489         + commit 55d112eeb0743e90be46d15dbae67368ee7d4b50
22490         * g10/revoke.c (get_default_uid_revocation_reason): New.
22491         * g10/keyedit.c (menu_revuid): Break out creation of uid revocation
22492         into new function core_revuid.
22493         * g10/keyedit.c (keyedit_quick_revuid): New. Selects key and
22494         uid, invokes core_revuid.
22495         * g10/gpg.c (main): Handle --quick-revuid argument.
22496         * doc/gpg.texi: Document --quick-revuid.
22497
22498 2016-06-29  Werner Koch  <wk@gnupg.org>
22499
22500         tools: Add gpg-wks-client and gpg-wks-server.
22501         + commit 5d6c83deaa11327366b0038928200b9f9f85b426
22502         * configure.ac: Add option --enable-wks-tools
22503         * tools/gpg-wks-client.c: New.
22504         * tools/gpg-wks-server.c: New.
22505         * tools/gpg-wks.h: new.
22506         * tools/wks-receive.c: New.
22507         * tools/call-dirmngr.c, tools/call-dirmngr.h: New.
22508
22509         build: Improve GNUPG_BUILD_PROGRAM macro.
22510         + commit d8ee0d79a702c92a257884bab86183d32d16ff0e
22511         * acinclude.m4 (GNUPG_BUILD_PROGRAM): Allow for dash in options.
22512
22513         tools: Add modules for MIME parsing and creating.
22514         + commit c334fa8df0e3901857e1a277d3277a873ae4af74
22515         * tools/mime-maker.c: New.
22516         * tools/mime-maker.h: New.
22517         * tools/mime-parser.c: New.
22518         * tools/mime-parser.h: New.
22519
22520 2016-06-28  Justus Winter  <justus@g10code.com>
22521
22522         gpgscm: Fix memory leaks.
22523         + commit 9c67958c4737b34c60ef2076f57234eec155eb36
22524         * tests/gpgscm/ffi-private.h (ffi_schemify_name): Fix prototype.
22525         (ffi_define_function_name): Free schemified name.
22526         (ffi_define_function): Likewise.
22527         (ffi_define_constant): Likewise.
22528         (ffi_define_variable_pointer): Likewise.
22529         * tests/gpgscm/ffi.c (do_wait_processes): Free arrays.
22530         (ffi_schemify_name): Fix type.
22531         * tests/gpgscm/main.c (main): Free 'sc'.
22532
22533         gpgscm: Free file names.
22534         + commit 6cb2be91a7cc8a9b8ec42f3956adbb19347318e3
22535         * tests/gpgscm/scheme.c (scheme_load_named_file): Free file name.
22536
22537         gpgscm: Fix buffer overflow.
22538         + commit 56cebdc30c10eaec179a6911e308074264d876ae
22539         * tests/gpgscm/scheme.c (store_string): Avoid writing past allocated
22540         buffer.
22541
22542         g10: Fix memory leaks.
22543         + commit c57501cc5fa84dbaf560c0fc18853c9540e918af
22544         * g10/keydb.c (keydb_get_keyblock): Free 'sigstatus' and 'iobuf'.
22545         * g10/t-keydb-get-keyblock.c: Fix trivial memory leaks.
22546         * g10/t-keydb.c: Likewise.
22547
22548         common: Fix memory leaks.
22549         + commit c14ef10fc347d966a1efcb5c2000cbf3aaafa905
22550         * common/ccparray.c (ccparray_put): Free old array.
22551         * common/stringhelp.c (do_make_filename): Free 'home'.
22552         * common/t-convert.c: Fix trivial memory leaks.
22553         * common/t-iobuf.c: Likewise.
22554         * common/t-mbox-util.c: Likewise.
22555         * common/t-name-value.c: Likewise.
22556         * common/t-stringhelp.c: Likewise.
22557         * common/t-strlist.c: Likewise.
22558
22559 2016-06-28  Werner Koch  <wk@gnupg.org>
22560
22561         dirmngr: add option to retrieve extra WKS info.
22562         + commit b1e8e0d4b945e077966fb98175191aed056bd957
22563         * dirmngr/server.c (cmd_wkd_get): Add option --submission-address.
22564
22565         gpg: Add hack to --quick-gen-key to create Curve25519 keys.
22566         + commit 20ca075d9605e27e25a780bcc465c7371400ca61
22567         * g10/keygen.c (quick_generate_keypair): Add special algo string
22568         "test-default".
22569
22570         common: New function rfctimestamp.
22571         + commit 1ddf5b846fc058171af5f2784dad866b73eb0205
22572         * common/gettime.c (rfctimestamp): New.
22573
22574         common: Add missing header file for clarity.
22575         + commit 781e614e3b4586da27e54caca39b6a7ed42fc7c7
22576         * common/zb32.c: Include zb32.h.
22577
22578 2016-06-28  Justus Winter  <justus@g10code.com>
22579
22580         tools/gpgtar: Fix handling of '-'.
22581         + commit 4819f687c48c7972c39ae29c7af1e891a4d57360
22582         * tools/gpgtar-extract.c (gpgtar_extract): Use stdin if file is '-'.
22583         * tools/gpgtar-list.c (gpgtar_list): Likewise.
22584
22585         common: Close input stream.
22586         + commit d36f664bfdc39c05927cb6e14fe1b3ecb7b64bfa
22587         * common/exechelp-posix.c (gnupg_spawn_process): Also close the input
22588         stream in the child.
22589
22590         common: Fix copying data from the spawned child.
22591         + commit 8f79c31b4d465eeaf81c8046c35bb8c34512dd8d
22592         Fixes intermittent gpgtar failures.
22593
22594         * common/exectool.c (copy_buffer_do_copy): Initialize 'nwritten'.
22595         (gnupg_exec_tool_stream): Loop until all data is copied.
22596
22597 2016-06-28  NIIBE Yutaka  <gniibe@fsij.org>
22598
22599         g10: Fix --list-packets.
22600         + commit 52f65281f9743c42a48bf5a3354c9ab0ecdb681a
22601         * g10/gpg.c (main): Call set_packet_list_mode after assignment of
22602         opt.list_packets.
22603         * g10/mainproc.c (do_proc_packets): Don't stop processing with
22604         --list-packets as the comment says.
22605         * g10/options.h (list_packets): Fix the comment.
22606         * g10/parse-packet.c: Fix the condition for opt.list_packets.
22607
22608 2016-06-25  Werner Koch  <wk@gnupg.org>
22609
22610         build: Add aclocal macro from pkg-config.
22611         + commit b6872353bae778d11730f5d0afd2192750777647
22612         * m4/pkg.m4: New.
22613
22614         yat2m: Silence lint warnings and fix a printf format bug.
22615         + commit 22b9bea1c3d0e944aa539a87d79e47d92ca5309f
22616         * doc/yat2m.c (ATTR_PRINTF, ATTR_NR_PRINTF, ATTR_MALLOC): New.
22617         (die, err, inf, xmalloc, xcalloc): New prototypes with attributes.
22618         (get_section_buffer): Take care of !N_SECTIONS.
22619         (proc_texi_cmd): Cast precision format arg.
22620         (proc_texi_buffer): Do not set IN_CMD when not used afterwards.
22621
22622 2016-06-24  Werner Koch  <wk@gnupg.org>
22623
22624         gpg: New import option "import-export".
22625         + commit 7bca3be65e510eda40572327b87922834ebe07eb
22626         * g10/import.c (parse_import_options): Add option "import-export".
22627         (write_keyblock_to_output): New.
22628         (import_one): Implement option.
22629
22630 2016-06-23  Werner Koch  <wk@gnupg.org>
22631
22632         gpg: New import option "import-show".
22633         + commit 1e5959ec059ba41f4de1e2f953300bc040efc16f
22634         * g10/options.h (IMPORT_SHOW): New.
22635         * g10/import.c (parse_import_options): Add "import-show".
22636         (import_one): Implement that.
22637
22638         gpg: Do not print the validity after key generation.
22639         + commit 09c6f7135150efbbeb459d4ae0189a81e9d180f8
22640         * g10/keylist.c (struct keylist_context): Add field NO_VALIDITY.
22641         (list_keyblock_print): Take care of it.
22642         (list_keyblock_direct): Add arg NO_VALIDITY.
22643         * g10/keygen.c (do_generate_keypair): Merge keyblock and print w/o
22644         validity.
22645
22646         common: Fix possible small memory leak in b64dec.c.
22647         + commit c229ba4d8b9b16052ee0b9573bed7905be602cdf
22648         * common/b64dec.c (b64dec_finish): Always release TITLE.
22649
22650 2016-06-23  Justus Winter  <justus@g10code.com>
22651
22652         tests/openpgp: Fake the system time for the tofu test.
22653         + commit e584d6468a2e72cd01e55f46104f9f96b56c0b66
22654         The keys in the tofu test are set to expire on 2016-09-17.  Fake the
22655         system time for this test.
22656
22657         This commit includes changes to the old test as well, for those who
22658         need to backport it.
22659
22660         * tests/openpgp/gpg-agent.conf.tmpl: Drop trailing newlines.
22661         * tests/openpgp/tofu.scm: Fake system time.
22662         * tests/openpgp/tofu.test: Likewise.
22663
22664         gpgscm: Handle exceptions in the transformation monad.
22665         + commit 145910afc077e7a5df6cc8b10e180dfa6ce38cc3
22666         * tests/gpgscm/tests.scm (pipe:do): Raise errors.
22667         (tr:spawn): Catch and return errors.
22668         (tr:call-with-content): Likewise.
22669         (tr:{open,write-to,pipe-do,assert-identity,assert-weak-identity}):
22670         Adapt.
22671
22672         tests/openpgp: Improve tests.
22673         + commit 1e822654c1dcfc23a9ef689f4e18c0ebba18baca
22674         * tests/openpgp/multisig.scm: Simplify test.
22675         * tests/openpgp/setup.scm (dearmor): Use pipe.
22676
22677         gpgscm: Add types for special objects.
22678         + commit 332fa86982dc811640ac8643332d8375816e5b81
22679         * tests/gpgscm/scheme.c (enum scheme_types): Add types for boolean,
22680         nil, eof, and the sink object.
22681         (type_to_string): Handle new types.
22682         (scheme_init_custom_alloc): Give special objects a type.
22683
22684         gpgscm: Fix Scheme initialization.
22685         + commit e6e56adf208f194ecafda29bb1c1c06655348432
22686         This potentially causes a crash if the garbage collector marks an eof
22687         object.
22688
22689         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize
22690         'EOF_OBJ'.
22691
22692 2016-06-23  Werner Koch  <wk@gnupg.org>
22693
22694         common: Add dedicated private key functions to name-value.c.
22695         + commit 3ead21da80da4570e77036cc05303914c9b1f364
22696         * common/name-value.c (struct name_value_container): Add field
22697         'private_key_mode'.
22698         (my_error): New.  Use instead of gpg_error.
22699         (nvc_new_private_key): New.
22700         (nve_release): Add arg 'private_key_mode'.
22701         (nvc_release): Call nve_release with private_key_mode flag.
22702         (nvc_delete): Ditto.
22703         (_nvc_add): Do no special case "Key:" in non-private_key_mode.
22704         (nvc_get_private_key): Return error in non-private_key_mode.
22705         (nvc_set_private_key): Ditto.
22706         (nvc_parse):  Factor all code out to ...
22707         (do_nvc_parse): new.  Add arg 'for_private_key'.
22708         (nvc_parse_private_key): New.
22709         * agent/findkey.c (write_extended_private_key): Replace nvc_parse by
22710         nvc_parse_private_key.
22711         (read_key_file): Ditto.
22712
22713         * common/t-name-value.c (private_key_mode): New variable.
22714         (my_nvc_new): New.  Replace all callers.
22715         (test_key_extraction): Take mode in account.
22716         (run_tests): Ditto.
22717         (run_modification_tests): Ditto.
22718         (parse): Ditto.
22719         (main): Add option --parse and rename --parse to --parse-key.
22720
22721         common: Rename external symbols in name-value.c.
22722         + commit d74d23d860c1e5039bd595c31c846782c5cb8025
22723         * common/name-value.c, common/name-value.h: Rename symbol prefixes
22724         from "pkc_" to "nvc_" and from "pke_" to "nve_".  Change all callers.
22725
22726         common: Rename private-keys.c to name-value.c.
22727         + commit b841a883a2a66807aa427e65d49067584bedfbe2
22728         * common/private-keys.c: Rename to name-value.c.
22729         * common/private-keys.h: Rename to name-value.h.  Chage all users.
22730         * common/t-private-keys.c: Rename to t-name-value.c.
22731         * common/Makefile.am: Adjust accordingly.
22732
22733         common: Add PGP armor decoding to b64dec.
22734         + commit 3694579bc4eef27ed53e1845bf03be38c299ce76
22735         * common/b64dec.c (decoder_states): Add new states.
22736         (b64dec_proc): Handle PGP armored format.
22737
22738 2016-06-23  NIIBE Yutaka  <gniibe@fsij.org>
22739
22740         g10: Fix regression of card-edit/fetch.
22741         + commit 6f5ff1cfe449cf1f4cb7287bc57570eb794216b2
22742         * g10/card-util.c (fetch_url): Call keyserver_fetch instead of
22743         keyserver_import_fprint.
22744
22745 2016-06-21  Justus Winter  <justus@g10code.com>
22746
22747         tests/migrations: Convert to Scheme and re-enable.
22748         + commit f548383d9af912bf93217068cc8aa99a9a6eda93
22749         * configure.ac: Re-enable.
22750         * tests/Makefile.am: Likewise.
22751         * tests/migrations/Makefile.am (TESTS): Use Scheme tests.
22752         * tests/migrations/common.scm: New file.
22753         * tests/migrations/extended-private-key-format.scm: Likewise.
22754         * tests/migrations/from-classic.scm: Likewise.
22755         * tests/migrations/extended-private-key-format.test: Drop file.
22756         * tests/migrations/from-classic.test: Drop file.
22757
22758         gpgscm: Add more file handling functions.
22759         + commit c5e0ca5a59ebd91b67944ca125cc8cd73a9d243e
22760         * tests/gpgscm/ffi.c (do_glob): New function.
22761         (ffi_init): Define new function.
22762         * tests/gpgscm/tests.scm (basename-suffix): New function.x
22763
22764         tests/openpgp: Port the remaining tests to Scheme.
22765         + commit 0340fcdac864109e3dd6edee759efc96e4d3f84e
22766         * tests/openpgp/Makefile.am (TESTS): Add new tests.
22767         * tests/openpgp/defs.scm (gpg-with-colons): New function.
22768         (get-config): Use new function.
22769         * tests/openpgp/export.scm: New file.
22770         * tests/openpgp/tofu.scm: Likewise.
22771
22772         gpgscm: Improve test framework.
22773         + commit 65081c31e7536d8fb5effcc2c9aeeffc120c9a69
22774         * tests/gpgscm/lib.scm (echo): Move...
22775         * tests/gpgscm/tests.scm (echo): ... here.
22776         (info, error, skip): And use echo here.
22777         (file-exists?): New function.
22778         (tr:spawn): Check that source exists and if the sink has been created.
22779         (tr:call-with-content): Hand in optional arguments.
22780
22781         gpgscm: Use native string searching functions.
22782         + commit 5fbbc4b334a73150e709a4802cac99abd8ada61d
22783         * tests/gpgscm/ffi-private.h: Handle character arguments.
22784         * tests/gpgscm/ffi.c (do_string_index): New function.
22785         (do_string_rindex): Likewise.
22786         (do_string_contains): Likewise.
22787         (ffi_init): Define new functions.
22788         * tests/gpgscm/ffi.scm (ffi-define): New macro.
22789         * tests/gpgscm/lib.scm (string-index): Use native function,
22790         demonstrate behavior.
22791         (string-rindex): Likewise.
22792         (string-contains?): Likewise.
22793         Demonstrate behavior of various other functions.
22794         (read-all): Rework so that it can handle large files.
22795
22796         gpgscm: Improve error reporting.
22797         + commit d99949fc8cf541018267964629992d55c97ca9ab
22798         * tests/gpgscm/scheme.c (type_to_string): New function.
22799         (Eval_Cycle): Include actual type in error message.
22800
22801         gpgscm: Make memory allocation failures fatal.
22802         + commit 616582071a2c76c4fb529d4da549aa95ee5d78d6
22803         * tests/gpgscm/scheme.c (Eval_Cycle): Exit if we run out of memory.
22804
22805 2016-06-21  Werner Koch  <wk@gnupg.org>
22806
22807         sm: Do not install cacert and other root certificates.
22808         + commit c19b2061274cd50838e62a2acbdc7e7d24888e7e
22809         * doc/Makefile.am (dist_pkgdata_DATA): Move qualified.txt and
22810         com-certs.pem to ...
22811         (EXTRA_DIST): here.
22812
22813 2016-06-20  Werner Koch  <wk@gnupg.org>
22814
22815         gpg: Add experimental support for an issuer fpr.
22816         + commit 955baf04364721457cd99aad21942523cd50498c
22817         * common/openpgpdefs.h (SIGSUBPKT_ISSUER_FPR): New.
22818         * g10/build-packet.c (build_sig_subpkt_from_sig): Add arg PKSK and
22819         insert the issuer fpr if needed.
22820         * g10/sign.c (write_signature_packets): Pass signing key.
22821         (make_keysig_packet): Ditto.
22822         (update_keysig_packet): Ditto.
22823         * g10/parse-packet.c (dump_sig_subpkt): Print issuer fpr.
22824         (parse_one_sig_subpkt): Detect issuer fpr.
22825         (can_handle_critical): Add issuer fpr.
22826         * g10/mainproc.c (check_sig_and_print): Try to get key via fingerprint.
22827         * g10/gpgv.c (keyserver_import_fprint): New stub.
22828         * g10/test-stubs.c (keyserver_import_fprint): New stub.
22829
22830         gpg: New option --rfc4880bis.
22831         + commit ee2d9061d7abc36b857165a8395203a97380baa2
22832         * g10/options.h (struct opt): Add field flags.rfc4880bis.
22833         * g10/gpg.c (oRFC4880bis): new.
22834         (opts): add --rfc4880bis.
22835         (main): Implement that and print a warning.
22836
22837 2016-06-19  Niibe Yutaka  <gniibe@fsij.org>
22838
22839         scd: Reset nonnull_nad to zero for VENDOR_GEMPC.
22840         + commit 971064f8b7ad676326b2a468f688037a303717df
22841         * (parse_ccid_descriptor): nonnull_nad = 0 for all GEMPC device.
22842
22843 2016-06-17  Werner Koch  <wk@gnupg.org>
22844
22845         tests: Make make distcheck work again.
22846         + commit ce1689ea0720552ac900d7b2c4139caf24452018
22847         * Makefile.am (tests): Remove test code which would led to doubling
22848         calls to for e.g. "make distclean".
22849         * tests/Makefile.am: Typo fixes.
22850         * tests/gpgscm/Makefile.am (EXTRA_DIST): Fix name of License file.
22851         Add repl.scm.
22852         (check): Replace by check-local because check is a standard automake
22853         target.
22854         * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Replace gmake0sim by
22855         automake generated macro.
22856         (EXTRA_DIST): Add defs.scm
22857
22858         gpgscm: Silence compiler warnings.
22859         + commit dfe5282e5859409849a17d68b2b3a046370f65bd
22860         * tests/gpgscm/scheme.c (mk_integer): Rename arg NUM to N.
22861         (fill_vector): Ditto.
22862         (mark): Rename var NUM to N.
22863         (set_slot_in_env): Mark SC as unused.
22864         (is_any): Mark P as unused.
22865
22866         Add license notices for TinySCHEME.
22867         + commit dc1db12d2c4f9f12bc3f7de37f76293b316c3f35
22868         * tests/gpgscm/COPYING: Rename to ...
22869         * tests/gpgscm/LICENSE.TinySCHEME: this.
22870         * AUTHORS: Add a note about TinySCHEME.
22871         * build-aux/speedo/w32/pkg-copyright.txt: Add TinySCHEME notice.
22872
22873 2016-06-17  Justus Winter  <justus@g10code.com>
22874
22875         tests/openpgp: Reimplement tests in Scheme.
22876         + commit 9609cb20e4caee739b9fc4fd36797029d2970041
22877         * Makefile.am: Build the test infrastructure on Windows.
22878         * tests/openpgp/Makefile.am (required_pgms): Add gpgscm.
22879         (TESTS_ENVIRONMENT): Make sure gpgscm and the libraries are found.
22880         (TESTS): Replace tests with the new Scheme implementations.
22881         * tests/openpgp/4gb-packet.scm: New file.
22882         * tests/openpgp/README: Likewise.
22883         * tests/openpgp/armdetach.scm: Likewise.
22884         * tests/openpgp/armdetachm.scm: Likewise.
22885         * tests/openpgp/armencrypt.scm: Likewise.
22886         * tests/openpgp/armencryptp.scm: Likewise.
22887         * tests/openpgp/armor.scm: Likewise.
22888         * tests/openpgp/armsignencrypt.scm: Likewise.
22889         * tests/openpgp/armsigs.scm: Likewise.
22890         * tests/openpgp/clearsig.scm: Likewise.
22891         * tests/openpgp/conventional-mdc.scm: Likewise.
22892         * tests/openpgp/conventional.scm: Likewise.
22893         * tests/openpgp/decrypt-dsa.scm: Likewise.
22894         * tests/openpgp/decrypt.scm: Likewise.
22895         * tests/openpgp/default-key.scm: Likewise.
22896         * tests/openpgp/defs.scm: Likewise.
22897         * tests/openpgp/detach.scm: Likewise.
22898         * tests/openpgp/detachm.scm: Likewise.
22899         * tests/openpgp/ecc.scm: Likewise.
22900         * tests/openpgp/encrypt-dsa.scm: Likewise.
22901         * tests/openpgp/encrypt.scm: Likewise.
22902         * tests/openpgp/encryptp.scm: Likewise.
22903         * tests/openpgp/finish.scm: Likewise.
22904         * tests/openpgp/genkey1024.scm: Likewise.
22905         * tests/openpgp/gpgtar.scm: Likewise.
22906         * tests/openpgp/import.scm: Likewise.
22907         * tests/openpgp/mds.scm: Likewise.
22908         * tests/openpgp/multisig.scm: Likewise.
22909         * tests/openpgp/run-tests.scm: Likewise.
22910         * tests/openpgp/seat.scm: Likewise.
22911         * tests/openpgp/setup.scm: Likewise.
22912         * tests/openpgp/signencrypt-dsa.scm: Likewise.
22913         * tests/openpgp/signencrypt.scm: Likewise.
22914         * tests/openpgp/sigs-dsa.scm: Likewise.
22915         * tests/openpgp/sigs.scm: Likewise.
22916         * tests/openpgp/use-exact-key.scm: Likewise.
22917         * tests/openpgp/verify.scm: Likewise.
22918         * tests/openpgp/version.scm: Likewise.
22919
22920         tests/gpgscm: Add a TinySCHEME-based test driver.
22921         + commit d2ce3f9eee34e380536049c0c9d26ed66273f094
22922         * configure.ac: Add new component.
22923         * tests/Makefile.am: Likewise.
22924         * tests/gpgscm/Makefile.am: New file.
22925         * tests/gpgscm/ffi-private.h: Likewise.
22926         * tests/gpgscm/ffi.c: Likewise.
22927         * tests/gpgscm/ffi.h: Likewise.
22928         * tests/gpgscm/ffi.scm: Likewise.
22929         * tests/gpgscm/lib.scm: Likewise.
22930         * tests/gpgscm/main.c: Likewise.
22931         * tests/gpgscm/private.h: Likewise.
22932         * tests/gpgscm/repl.scm: Likewise.
22933         * tests/gpgscm/scheme-config.h: Likewise.
22934         * tests/gpgscm/t-child.c: Likewise.
22935         * tests/gpgscm/t-child.scm: Likewise.
22936         * tests/gpgscm/tests.scm: Likewise.
22937
22938         tests/gpgscm: Foreign objects support for TinySCHEME.
22939         + commit 56c36f2932fe2baf8e46efdea4315cf33f3c0338
22940         * tests/gpgscm/scheme-private.h (struct cell): Add 'foreign_object'.
22941         (is_foreign_object): New prototype.
22942         (get_foreign_object_{vtable,data}): Likewise.
22943         * tests/gpgscm/scheme.c (enum scheme_types): New type.
22944         (is_foreign_object): New function.
22945         (get_foreign_object_{vtable,data}): Likewise.
22946         (mk_foreign_object): Likewise.
22947         (finalize_cell): Free foreign objects.
22948         (atom2str): Pretty-print foreign objects.
22949         (vtbl): Add new functions.
22950         * tests/gpgscm/scheme.h (struct foreign_object_vtable): New type.
22951         (mk_foreign_object): New prototype.
22952         (struct scheme_interface): Add new functions.
22953
22954         Patch from Thomas Munro,
22955         https://sourceforge.net/p/tinyscheme/patches/13/
22956
22957         tests/gpgscm: Dynamically allocate string buffer.
22958         + commit 8e5ad9aabdd57457f76078924d33acb94b75a877
22959         * tests/gpgscm/scheme-config.h (strbuff{,_size}): Make buffer dynamic.
22960         * tests/gpgscm/scheme.c (expand_strbuff): New function.
22961         (putcharacter): Adapt length test.
22962         (readstrexp): Expand buffer if necessary.
22963         (scheme_init_custom_alloc): Initialize buffer.
22964         (scheme_deinit): Free buffer.
22965
22966         Patch from Thomas Munro,
22967         https://sourceforge.net/p/tinyscheme/patches/11/
22968
22969         tests/gpgscm: Make exception value available.
22970         + commit 3b100da9ada9171d873a796eaf3351d4fceed394
22971         * tests/gpgscm/init.scm (throw): Hand exception value to the handler.
22972         (catch): And bind it to *error*.
22973
22974         tests/gpgscm: Add package macro.
22975         + commit 2907381f4a7b422823b2304ebe550acbb2f66480
22976         * tests/gpgscm/init.scm: Add package macro from manual.
22977
22978         tests/gpgscm: Expose function to open streams as Scheme ports.
22979         + commit 55275b8e2b43a3420d85a1a931e02febaa1113e7
22980         * tests/gpgscm/scheme.c (vtbl): Add 'port_from_file' to the vtable.
22981         * tests/gpgscm/scheme.h (struct scheme_interface): New field
22982         'mk_port_from_file'.
22983
22984         tests/gpgscm: Nicer error message.
22985         + commit 13bba1357478815a85f5c0db3607ebb6cd574f56
22986         * tests/gpgscm/scheme.c (opexe_0): Include the value that we tried to
22987         evaluate as function-like in the error message.
22988
22989         tests/gpgscm: Fix error hook.
22990         + commit e02c1ccae13e4eb55afef8de4f29022c709404eb
22991         * tests/gpgscm/init.scm (*error-hook*): Fix error hook so that the
22992         whole error message is displayed.
22993
22994         tests/gpgscm: Handle unhandled enumeration values.
22995         + commit 133f25703a47e9bbc28c4532934f405ecdeb2de0
22996         * tests/gpgscm/scheme.c (opexe_{3,4}): Handle unhandled enumeration
22997         values in the opcode dispatching code.
22998
22999         tests/gpgscm: Verbatim import of latest TinySCHEME.
23000         + commit cb989504cdd4f0ff902d31af871dc3ee0d9419ac
23001         Revision 110 from svn://svn.code.sf.net/p/tinyscheme/code/trunk
23002
23003         * tests/gpgscm/COPYING: New file.
23004         * tests/gpgscm/Manual.txt: Likewise.
23005         * tests/gpgscm/init.scm: Likewise.
23006         * tests/gpgscm/opdefines.h: Likewise.
23007         * tests/gpgscm/scheme-private.h: Likewise.
23008         * tests/gpgscm/scheme.c: Likewise.
23009         * tests/gpgscm/scheme.h: Likewise.
23010
23011 2016-06-17  Werner Koch  <wk@gnupg.org>
23012
23013         scd: Make option --homedir work.
23014         + commit 4e41745b3ea3bb8ffc50af6bafeb1de9c928812f
23015         * scd/scdaemon.c (opts): Add --homedir.
23016
23017 2016-06-16  Werner Koch  <wk@gnupg.org>
23018
23019         Release 2.1.13.
23020         + commit b3df4e2ac6aa9b4154e923f71b4221533043e5ac
23021
23022
23023 2016-06-16  Yuri Chornoivan  <yurchor@ukr.net>
23024
23025         po: Update Ukrainian translation.
23026         + commit d4ce1b04431cf02ebc1bdc7150ad587d599f2a95
23027
23028
23029 2016-06-16  Ineiev  <ineiev@gnu.org>
23030
23031         po: Update Russian translation.
23032         + commit 2273e4f999325cdc9d275507cd07c7e95d62a377
23033
23034
23035 2016-06-16  Werner Koch  <wk@gnupg.org>
23036
23037         po: Update German translation.
23038         + commit 69f1b0b041c251abb66f000db173a602693bb18f
23039
23040
23041         Add missing files so that make distcheck works again,
23042         + commit 4d7d292cd5b616b209dfd4302a1deffe11b7be0e
23043         * tests/openpgp/Makefile.am (CLEANFILES): Add created file
23044         "passphrases".
23045         * tools/Makefile.am (EXTRA_DIST): Add no-libgcrypt.c.
23046
23047         tools: Fix typo in function name of symcryptrun.
23048         + commit e44dd878df58dab27c9cd411d80c4c81501e649a
23049         * tools/symcryptrun.c (main): Fix typo.
23050
23051 2016-06-15  Niibe Yutaka  <gniibe@fsij.org>
23052
23053         g10: Fix another race condition for trustdb access.
23054         + commit 35a3ce2acf78a95fecbccfd8db0560cca24232df
23055         * g10/tdbio.c (create_version_record): Call create_hashtable to always
23056         make hashtable, together with the version record.
23057         (get_trusthashrec): Remove call to create_hashtable.
23058
23059 2016-06-14  Werner Koch  <wk@gnupg.org>
23060
23061         gpg: Print the subkey's curve and not the primary key curve.
23062         + commit b56aebe76657ce6efa9c6819d5a8c2a31c2bbbba
23063         * g10/keylist.c (list_keyblock_colon): Use PK2 for the subkey's curve.
23064
23065         ldap: Improve info output for v3 fallback.
23066         + commit b7e3dfcf139284d30921cf44e7bab43d4244cc37
23067         * dirmngr/dirmngr_ldap.c (fetch_ldap): Do not use log_debug in an
23068         unprotected section.  Replace log_debug by log_info in verbose mode.
23069
23070 2016-06-14  Andre Heinecke  <aheinecke@intevation.de>
23071
23072         dirmngr: Try ldap protocol V3 as fallback.
23073         + commit f989b6ee0db96c36f13f093cbbcfd1d5b472d03c
23074         * dirmngr/dirmngr_ldap.c (fetch_ldap): Try V3 Protocol in case
23075         default Protocol gives error.
23076
23077         dirmngr: Print ldap error if bind fails.
23078         + commit 5faddcb2927a997e05fb34eb270982096d1fe3a4
23079         * dirmngr/dirmngr_ldap.c (fetch_ldap): Use ldap_err2string on bind
23080         return.
23081
23082 2016-06-14  Werner Koch  <wk@gnupg.org>
23083
23084         gpgsm: Allow ciphers AES192 and SERPENT256.
23085         + commit 5f9bd7a9e1ed4edcbb6c4e908d4bea5cd7dc9e68
23086         * sm/gpgsm.c (main): Add AES192 cipher.  Allow SERPENT256.
23087
23088         doc: Add files and envvars to a new index.
23089         + commit 2423238ee4c8a8c531dfe9e45c95f2760b638faa
23090         * doc/gnupg.texi: Define new index "ef".
23091         (Environment Index): New.
23092
23093         gpg: Avoid endless loop in a tofu error case.
23094         + commit f980cd2e0e4694a38038f518f290017087d4ce33
23095         * g10/tofu.c (get_trust): Do not jump to out.
23096
23097         gpg: Split tofu's get_trust function into several smaller ones.
23098         + commit 1affdf1efc42ed22dc023c92ca5134d5bcbf2686
23099         * g10/tofu.c (get_trust): Factor code out to ...
23100         (format_conflict_msg_part1): new and to ...
23101         (ask_about_binding): new.
23102
23103 2016-06-13  Werner Koch  <wk@gnupg.org>
23104
23105         gpg: Un-deprecate option --auto-key-retrieve.
23106         + commit 9e126af215143fddbdc3949681abb9ffdb9153bb
23107         * g10/gpg.c (main): Remove deprecation warning.
23108
23109         gpg: New option --disable-signer-uid, create Signer's UID sub-packet.
23110         + commit 61e7fd68c05ed185728e9da45f7a44a2323065ad
23111         * g10/gpg.c (oDisableSignerUID): New.
23112         (opts): New option '--disable-signer-uid'.
23113         (main): Set option.
23114         * g10/options.h (opt): Add field flags.disable_signer_uid.
23115         * g10/sign.c: Include mbox-util.h.
23116         (mk_notation_policy_etc): Embed the signer's uid.
23117         * g10/mainproc.c (check_sig_and_print): Do not use WKD for auto key
23118         retrieval if --disable-signer-uid is used.
23119
23120         gpg: Try Signer's User ID sub-packet with --auto-key-retrieve.
23121         + commit 08c82b1b55d28ffd09b859205b7686bcefae5011
23122         * g10/packet.h (PKT_signature): Add field 'signers_uid'.
23123         * g10/parse-packet.c (parse_signature): Set this field.
23124         * g10/free-packet.c (free_seckey_enc): Free field.
23125         (copy_signature): Copy field.
23126         * g10/mainproc.c (akl_has_wkd_method): New.
23127         (check_sig_and_print): Extend NEWSIG status.  If WKD is enabled try to
23128         locate a missing key via the signature's Signer's User ID sub-packet.
23129         Do this right before trying a keyserver lookup.
23130
23131 2016-06-11  Werner Koch  <wk@gnupg.org>
23132
23133         gpg: Remove C-99ism, re-indent, and simplify one function.
23134         + commit 334e993a71d3abb7d30cb5ee05d578cecf0c3f67
23135         * g10/call-agent.c (struct keyinfo_data): Rename to
23136         keyinfo_data_parm_s.
23137         (agent_get_keyinfo): Replace C-99 style init.
23138         (keyinfo_status_cb): Use new fucntion split_fields.
23139         * g10/export.c (match_curve_skey_pk): Add missings returns error
23140         cases.
23141         (cleartext_secret_key_to_openpgp): Better clear PK->PKEY first.
23142
23143         common: New function split_fields.
23144         + commit 5ba99d9302cd86aee99958b71075d5288bb430aa
23145         * common/stringhelp.c (split_fields): New.
23146         * common/t-stringhelp.c: Include assert.h.
23147         (test_split_fields): New.
23148         (main): Call test.
23149
23150 2016-06-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
23151
23152         g10: Export cleartext keys as cleartext.
23153         + commit c41c46fa84cabbed74a13ded51fc3a817a919367
23154         * g10/export.c (do_export_stream): If a key is stored by the agent in
23155         cleartext, then try to export it as cleartext.
23156         * tests/openpgp/export.test: For secret keys that are stored in
23157         cleartext, test should try to export without pinentry interaction.
23158
23159         g10: Allow receiving cleartext secret keys from agent.
23160         + commit a3cb72af79ee645eda212f31ab0b266f2c3d9f29
23161         * g10/export.c (match_curve_skey_pk): New function, testing whether an
23162         OpenPGP public key and an S-expression use the same curve.
23163         * g10/export.c (cleartext_secret_key_to_openpgp): New function,
23164         filling in the secret key parameters of a PKT_public_key object from
23165         a corresponding cleartext S-expression.
23166         * g10/export.c, g10/main.h (receive_seckey_from_agent): Add cleartext
23167         parameter, enabling retrieval of the secret key, unlocked.
23168         * g10/export.c (do_export_stream): Send cleartext as 0, keeping current
23169         behavior.
23170         * g10/keygen.c (card_store_key_with_backup): Use cleartext=0 to ensure
23171         that smartcard backups are all passphrase-locked.
23172
23173         g10: Add openpgp_protected flag to agent secret key export functions.
23174         + commit 7de74320767d15d915942a98ff47c00175a078ed
23175         * g10/call-agent.c, g10/call-agent.h (agent_export_key): Add
23176         openpgp_protected flag.
23177         * g10/export.c (receive_seckey_from_agent): Request openpgp_protected
23178         secret keys from agent.
23179         * agent/command.c (hlp_export_key): EXPORT_KEY help text: add a
23180         brief description of the effect of --openpgp.
23181
23182         g10: report whether key in agent is passphrase-protected or not.
23183         + commit 00f30cc01c79bbdff5cdc3be795f009f15d3845e
23184         * g10/call-agent.c, g10/call-agent.h (agent_get_keyinfo): add
23185           r_cleartext parameter to report whether a key is stored without
23186           passphrase protection.
23187         * g10/gpgv.c, g10/test-stubs.c: augment dummy agent_get_keyinfo to
23188           match new API.
23189         * g10/export.c, g10/keyedit.c, g10/keygen.c, g10/keylist.c,
23190           g10/sign.c: pass NULL to agent_get_keyinfo since we do not yet
23191           need to know whether agent is passphrase-protected.
23192
23193 2016-06-08  Werner Koch  <wk@gnupg.org>
23194
23195         Explicitly restrict socket permissions.
23196         + commit 8127043d549a5843ea1ba2dc6da4906fc2258d53
23197         * agent/gpg-agent.c (create_server_socket): Call chmod before listen.
23198         * scd/scdaemon.c (create_server_socket): Ditto.
23199         * dirmngr/dirmngr.c (main): Ditto.
23200
23201         w32: Fix recent build regression.
23202         + commit 6790115fd9059e066b4e6feb6b1e3876a1c1d522
23203         * common/homedir.c (_gnupg_socketdir_internal) [W32]: Add definition
23204         for NAME.
23205         * g10/gpg.c (main) [W32]:  Fix use og gnupg_homedir.
23206
23207         * agent/gpg-agent.c (remove_socket): Remove unused var P.
23208         * scd/scdaemon.c (cleanup): Ditto.
23209
23210         gpgconf: New commands --create-socketdir and --remove-socketdir.
23211         + commit cf4910419e09daf414f76ca2c8ab685c3d488ec1
23212         * tools/gpgconf.c: Include unistd.h.
23213         (aCreateSocketDir, aRemoveSocketDir): New.
23214         (opts): Add --create-socketdir and --remove-socketdir.
23215         (main): Implement them.
23216
23217         Implement /run/user/UID/gnupg based sockets.
23218         + commit aab8a0b05292b0d06e3001a0b289224cb7156dbd
23219         * common/homedir.c: Include sys/stat.h and zb32.h.
23220         (w32_portable_app, w32_bin_is_bin): Change type from int to byte.
23221         (non_default_homedir): New.
23222         (is_gnupg_default_homedir): New.
23223         (default_homedir): Set non_default_homedir.
23224         (gnupg_set_homedir): Set non_default_homedir and make
23225         the_gnupg_homedir and absolute directory name.
23226         (gnupg_homedir): Return an absolute directory name.
23227         (_gnupg_socketdir_internal): New.
23228         (gnupg_socketdir): Implement /run/user/ based sockets.
23229         * tools/gpg-connect-agent.c (get_var_ext): Replace now obsolete
23230         make_filename by xstrdup.
23231         * tools/gpgconf.c (main): Sue gnupg_homedir for the "homedir:" output.
23232
23233         gpgconf: Add option --homedir.
23234         + commit def512eb67c8a380f3b873cee0f156deef0b6dda
23235         * tools/gpgconf.c (opts): Add --homedir.
23236         (main): Set homedir.
23237
23238         Do not use no-libgcrypt dummy for tools.
23239         + commit 173fa97102fec68670a46ae1b460231e2a183c81
23240         * tools/Makefile.am (gpgconf_SOURCES): Remove no-libgcrypt.c.
23241         (gpgconf_LDADD): Add LIBGCRYPT_LIBS.
23242         (gpg_connect_agent_LDADD): Ditto.
23243         (gpgtar_LDADD): Ditto.
23244         * dirmngr/Makefile.am (dirmngr_client_LDADD): Ditto.
23245         (t_common_ldadd): Ditto.  Remove no-libgcrypt.o.
23246
23247         Do not try to remove the enclosing directory of sockets.
23248         + commit 0faf8951544f43790c412777a926c969540174bd
23249         * agent/gpg-agent.c (remove_socket): Do not remove the enclosing
23250         directory.
23251         * scd/scdaemon.c (cleanup): Ditto.
23252
23253 2016-06-07  Werner Koch  <wk@gnupg.org>
23254
23255         common: New function gnupg_socketdir.
23256         + commit 36550dde998fa1d497098050ca2d4e1a952ed6b6
23257         * common/homedir.c (gnupg_socketdir): New.
23258         * agent/gpg-agent.c (create_socket_name): Use new function instead of
23259         gnupg_homedir.
23260         (check_own_socket): Ditto.
23261         (check_for_running_agent): Ditto.
23262         * agent/preset-passphrase.c (main): Ditto.
23263         * common/asshelp.c (start_new_gpg_agent): Ditto.
23264         * scd/scdaemon.c (create_socket_name): Ditto.
23265         * tools/gpgconf.c (main): Ditto.
23266         * tools/symcryptrun.c (main): Ditto.
23267
23268         common: Remove homedir arg from start_new_{dirmngr,gpg_agent}.
23269         + commit fb88f37c40dc156fa0b5bfba4ac85f1e553fd7e9
23270         * common/asshelp.c (start_new_gpg_agent): Remove arg 'homedir' in
23271         favor of gnupg_homedir ().  Change all callers.
23272         (start_new_dirmngr): Ditto.
23273         * common/get-passphrase.c (gnupg_prepare_get_passphrase): Remove arg
23274         'homedir'.
23275
23276         Replace use of opt.homedir by accessor functions.
23277         + commit 22a7ef01aa2c0eb77bcc40174d09104acc35cab1
23278         * common/homedir.c (the_gnupg_homedir): New var.
23279         (gnupg_set_homedir): New.
23280         (gnupg_homedir): New.
23281         * g10/options.h (struct opt): Remove 'homedir' and replace all users
23282         by the new accessor functions.
23283         * g13/g13-common.h (struct opt): Ditto.
23284         * scd/scdaemon.h (struct opt): Ditto.
23285         * sm/gpgsm.h (struct opt): Ditto.
23286         * dirmngr/dirmngr.h (struct opt): Ditto.
23287         * agent/preset-passphrase.c (opt_homedir): Ditto.
23288         * agent/protect-tool.c (opt_homedir): Ditto.
23289
23290 2016-06-07  NIIBE Yutaka  <gniibe@fsij.org>
23291
23292         po: Update Japanese translation.
23293         + commit 650abbab716750d6087a457a25fa2efaaa3567cd
23294
23295
23296         gpg: Fix command line parsing of --quick-addkey and --quick-gen-key.
23297         + commit abeeb84a94be815a16e678b319cb5c8bffde2811
23298         * g10/gpg.c (main): Compose a block by curly braces.
23299
23300 2016-06-06  Werner Koch  <wk@gnupg.org>
23301
23302         gpg: Use --keyid-format=none by default.
23303         + commit 7257ea2d450238afa4d162fab8001f74782fe43f
23304         * g10/gpg.c (main): Init keyid_format to KF_NONE.
23305         * g10/keyid.c (format_keyid): Ditto.
23306         (keystrlen): Ditto.
23307
23308         gpg: Add option --with-subkey-fingerprint.
23309         + commit 1d1cb86694fb2223de1da0b3bfffb5c62f505847
23310         * g10/gpg.c (oWithSubkeyFingerprint): New.
23311         (opts): Add --with-subkey-fingerprint[s].
23312         (main): Set that option.
23313         * g10/options.h (struct opt): Add 'with_subkey_fingerprint'.
23314         * g10/keylist.c (list_keyblock_print): Print subkey fingerprint.
23315         (print_fingerprint): Tweak printing to use compact format if
23316         desirable.
23317
23318         gpg: Implement --keyid-format=none.
23319         + commit b047388d57443f584f1c1d6333aac5218b685042
23320         * g10/gpg.c (main): Add option "none" to --keyid-format.
23321         * g10/options.h (KF_NONE): New.
23322         * g10/keyid.c (format_keyid): Implement that.
23323         (keystr): Use format "long" is KF_NONE is in use.
23324         (keystr_with_sub): Ditto.
23325         * g10/keylist.c (list_keyblock_print): Adjust indentaion for KF_NONE.
23326         Factor some code out to ...
23327         (print_key_line): new.
23328         (print_fingerprint): Add mode 20.
23329         * g10/mainproc.c (list_node): Use print_key_line.  Replace MAINKEY by
23330         flags.primary in the PK.  Fix putting a " revoked..." string into the
23331         colons format.
23332         * g10/pkclist.c (do_edit_ownertrust): Use print_key_line.  This
23333         slightly changes the putput format.
23334         * g10/revoke.c (gen_standard_revoke): Use print_key_line.  This may
23335         also put "expires: " into the output.
23336
23337 2016-06-04  Werner Koch  <wk@gnupg.org>
23338
23339         w32: Require --enable-build-timestamp for the BUILD_HOSTNAME.
23340         + commit 79b7a8a9e0d41b743ceaee20dc47294359fe0d44
23341         * configure.ac (BUILD_HOSTNAME): Set to "<anon>" bey default.
23342         * build-aux/speedo.mk (speedo_pkg_gnupg_configure): Add
23343           --enable-build-timestamp.
23344
23345 2016-06-02  Werner Koch  <wk@gnupg.org>
23346
23347         gpg: Add the fingerprint to KEY_CREATED for subkeys.
23348         + commit 8d976a6b07c5a356631791b46b590328c1451f31
23349         * g10/keygen.c (print_status_key_created): Make more robust by
23350         allowing a NULL for PK.
23351         (generate_subkeypair): Use print_status_key_created.
23352         (generate_card_subkeypair): Ditto.
23353
23354         gpg: Try to use the passphrase from the primary for --quick-addkey.
23355         + commit 1b460f049e5c1c102d8b55ad28781688252c5a6b
23356         * agent/command.c (cmd_genkey): Add option --passwd-nonce.
23357         (cmd_passwd): Return a PASSWD_NONCE in verify mode.
23358         * g10/call-agent.c (agent_genkey): Add arg 'passwd_nonce_addr' and do
23359         not send a RESET if given.
23360         (agent_passwd): Add arg 'verify'.
23361         * g10/keygen.c (common_gen): Add optional arg 'passwd_nonce_addr'.
23362         (gen_elg, gen_dsa, gen_ecc, gen_rsa, do_create): Ditto.
23363         (generate_subkeypair): Use sepeare hexgrip var for the to be created
23364         for hexgrip feature.  Verify primary key first.  Make use of the
23365         passwd nonce.  Allow for a static passphrase.
23366
23367         gpg: Extend the --quick-gen-key command.
23368         + commit 01285f909e43e8d6a48fbcc77bb5af53d567d8a2
23369         * g10/keygen.c (quickgen_set_para): Add arg 'use'.
23370         (quick_generate_keypair): Add args 'algostr', 'usagestr', and
23371         'expirestr'.  Implement primary only key mode.
23372         (parse_algo_usage_expire): Set NBITS for the default algo.
23373         * g10/gpg.c (main): Extend --quick-gen-key command.
23374
23375         gpg: Improve the new parse_subkey_algostr_usagestr fucntion.
23376         + commit dcc4cd83821667be22e502af86139bb4bd41bdf7
23377         * g10/keygen.c (parse_usagestr): Allow "cert".
23378         (generate_subkeypair): Factor expire parsing out to ...
23379         (parse_subkey_algostr_usagestr): here.  Rename to ...
23380         (parse_algo_usage_expire): this.  Add arg 'for_subkey'.  Set CERT for
23381         primary key and check that it is not set for subkeys.
23382
23383         gpg: New command --quick-addkey.
23384         + commit 8f2a053a0ffa0430d01a53b4d491a3f0fff683eb
23385         * g10/keygen.c (DEFAULT_STD_SUBKEYUSE): New.
23386         (ask_keysize): Factor code out to ...
23387         (get_keysize_range, fixup_keysize): new.
23388         (parse_parameter_usage): Factor parsing out to  ...
23389         (parse_usagestr): new.  Allow use of "encr" as alias for "encrypt".
23390         (parse_subkey_algostr_usagestr): New.
23391         (generate_subkeypair): Add new args.  Implement unattended mode.
23392
23393         * g10/keyedit.c (keyedit_quick_sign): Factor some code out to ...
23394         (find_by_primary_fpr): new.
23395         (keyedit_quick_addkey): New.
23396         * g10/gpg.c (aQuickAddKey): New.
23397         (opts): Add --quick-addkey.
23398         (main): Implement.
23399
23400         gpg: Do not abort on certain invalid packets.
23401         + commit d837f6b0eadb14ea08c1c6030b4d6adaaee8778e
23402         * g10/build-packet.c (write_fake_data): Check for non-opaque data.
23403         * g10/seskey.c (do_encode_md): Return NULL instead of abort.
23404
23405         common: New function openpgp_is_curve_supported.
23406         + commit 072acb69be55e366e2da921e3953404765fa3928
23407         * common/openpgp-oid.c: Include openpgpdefs.h.
23408         (oidtable): Add field pubkey_algo.
23409         (openpgp_is_curve_supported): New.
23410
23411 2016-06-01  NIIBE Yutaka  <gniibe@fsij.org>
23412
23413         g10: Allow User ID length >= 256.
23414         + commit db1ecc8212defdd183abbb6b1407fcc8d2dc9552
23415         * build-packet.c (do_user_id): Call write_header2 with HDRLEN not set.
23416
23417 2016-05-31  Werner Koch  <wk@gnupg.org>
23418
23419         gpg: New status code NOTATION_FLAGS.
23420         + commit 67a4bc8d536f6997f14daff4c039abd48a172100
23421         * common/status.h (STATUS_NOTATION_FLAGS: New.
23422         * g10/packet.h (struct notation): Add flags.human.
23423         (notation_t): New typedef.
23424         * g10/build-packet.c (sig_to_notation): Set flags.human.
23425         * g10/keylist.c (show_notation): Write STATUS_NOTATION_FLAGS.
23426
23427 2016-05-28  Werner Koch  <wk@gnupg.org>
23428
23429         common: Add a status callback to gnupg_exec_tool_stream.
23430         + commit 239a4d53916b47b5b0f0167a9b2c7a8915bb9c52
23431         * common/exectool.h (exec_tool_status_cb_t): New.
23432         * common/exectool.c: Include missing exectool.h.
23433         (read_and_log_buffer_t): Replace array by pointer.
23434         (gnupg_exec_tool_stream): Add args 'status_cb' and 'status_cb_value'.
23435         Change all callers to pass NULL for them.  Malloc buffer for
23436         FDERRSTATE.
23437         (read_and_log_stderr): Implement status_fd feature.
23438
23439 2016-05-27  Werner Koch  <wk@gnupg.org>
23440
23441         common: Allow a second input stream for gnupg_exec_tool_stream.
23442         + commit 44a32455c8e41400ea96db4507c8a42bdb65b3b6
23443         * common/exechelp-posix.c (do_exec): Add arg 'except' and pass to
23444         close_all_fds.
23445         (gnupg_spawn_process): Add arg 'except'.  Change callers to pass NULL
23446         for it.
23447         * common/exechelp-w32.c (gnupg_spawn_process): Add dummy arg 'except'.
23448         * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
23449         * common/exectool.c (copy_buffer_do_copy): Allow NULL for SINK.
23450         (gnupg_exec_tool_stream): Add arg 'inextra'. Change callers to pass
23451         NULL for it.  Allow NULL for OUTPUT.
23452
23453         common: Simplify the fd closing patch 512c56a.
23454         + commit e6d9a2d07ed7aeac3944d8a7d1317c4a117356b4
23455         * common/exechelp-posix.c (get_max_fds): Use /proc/self.
23456
23457         common: Speedup closing fds before an exec.
23458         + commit 512c56af43027149e8beacf259746b8d7bf9b1a2
23459         * common/exechelp-posix.c [__linux__]: Include dirent.h.
23460         (get_max_fds) [__linux__]: Return the actual used highest fd.
23461
23462         tools: Improve debug output of rfc822parse.
23463         + commit ad75ca9c963bebbe02aae8d73e199a705764ae82
23464         * tools/rfc822parse.c (show_event): Add missing events.
23465
23466         build: Remove obsolete tests for funopen and fopencookie.
23467         + commit d755bcb89dbeaf6c7c1eca73ccabdf89b536c535
23468         * configure.ac (AC_CHECK_FUNCS): Remove tests for funopen.
23469
23470         common: Extend gnupg_create_inbound_pipe et al.
23471         + commit 5d991e333a1885adc40abd9d00c01fec4bd5d9d7
23472         * common/exechelp-posix.c (gnupg_create_inbound_pipe): Add args 'r_fp'
23473         and 'nonblock'.
23474         (gnupg_create_outbound_pipe): Ditto.
23475         * common/exechelp-w32.c (gnupg_create_inbound_pipe): Add non yet
23476         functional args 'r_fp' and 'nonblock'.
23477         (gnupg_create_outbound_pipe): Ditto.
23478         * common/exechelp-w32ce.c (gnupg_create_inbound_pipe): Ditto.
23479         (gnupg_create_outbound_pipe): Ditto.
23480
23481         common: Make use of default_errsource in exechelp.
23482         + commit 96c7901ec1c79be732570811223d3ea54875abfe
23483         * common/exechelp-posix.c (my_error_from_syserror, my_error): New.
23484         Use them instead of gpg_error and gpg_error_from_syserror.
23485         (create_pipe_and_estream): Remove arg ERRSOURCE and fix use of
23486         OUTBOUND which has a wrong name.  Adjust callers.
23487         (gnupg_spawn_process): Remove arg ERRSOURCE and replace by use of
23488         DEFAULT_ERRSOURCE.
23489         * common/exechelp-w32.c (gnupg_spawn_process): Ditto.
23490         * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
23491         * common/exectool.c (gnupg_exec_tool_stream):  Do not pass
23492         GPG_ERROR_FROM_SYSERROR.
23493         * tools/gpgconf-comp.c (gc_component_check_options): Ditto.
23494         (retrieve_options_from_program): Ditto.
23495
23496         gpg: Keep current and total of PROGESS status lines small enough.
23497         + commit 6c957c3d880c069bb843cc58fdcebb9fc344727e
23498         * g10/progress.c (progress_filter): Factor status wrote out to...
23499         (write_status_progress): New.  Scale values down.
23500
23501 2016-05-27  NIIBE Yutaka  <gniibe@fsij.org>
23502
23503         configure: Detection of libusb on FreeBSD.
23504         + commit b3e043ba905fdf2efcdadbd7022ac53f4408b748
23505         * configure.ac (LIBUSB_LIBS): Use LIBUSB_NAME for AC_CHECK_LIB.
23506
23507 2016-05-25  Werner Koch  <wk@gnupg.org>
23508
23509         build: Switch to new URL for swdb.lst.
23510         + commit 74028096e06d2904f77b74b373750264e5b7b1ea
23511
23512
23513 2016-05-24  Werner Koch  <wk@gnupg.org>
23514
23515         gpgtar: Simplify code by using ccparray.
23516         + commit 91bc7833836f19256d56984c94cacf44853ff5c8
23517         * tools/gpgtar-create.c (gpgtar_create): Use ccparray functions.
23518         * tools/gpgtar-extract.c (gpgtar_extract): Ditto.
23519         * tools/gpgtar-list.c (gpgtar_list): Ditto.
23520
23521         common: Add simple dynamic array function.
23522         + commit 2421f7f7ed74ed20372efd63a2efd58d3b55005c
23523         * common/ccparray.c: New.
23524         * common/ccparray.h: New.
23525         * common/t-ccparray.c: New.
23526         * common/Makefile.am (common_sources): Add files.
23527         (module_tests): Add test file.
23528         (t_ccparray_LDADD): New.
23529
23530 2016-05-23  Justus Winter  <justus@g10code.com>
23531
23532         tests: Test the pinentry interactions when exporting keys.
23533         + commit b9d1e099c3ec3163c86afe627ecbe028db1facf6
23534         * tests/openpgp/export.test: Test pinentry interactions.
23535
23536         tests: Add support for a passphrase queue to fake pinentry.
23537         + commit 4994153924e0948a657edddaef54a39a6001beff
23538         * tests/openpgp/fake-pinentry.c (get_passphrase): New function.
23539         (main): Add option --passphrasefile and read passphrases from it.
23540
23541         tests: Add logging to fake pinentry.
23542         + commit 41b10c66ec1dd33633386f4fc8013ddeab7737ca
23543         * tests/openpgp/fake-pinentry.c (log_stream): New variable.
23544         (reply): New function.
23545         (spacep,skip_options,option_value): Copy from common.
23546         (main): Parse arguments, add --logfile option, write logfile.
23547
23548         tests: Add export test.
23549         + commit a54e89a58576108fcae10ceeb4fc65822aecc170
23550         * tests/openpgp/Makefile.am (TESTS): Add new file.
23551         * tests/openpgp/export.test: New file.
23552
23553 2016-05-21  Werner Koch  <wk@gnupg.org>
23554
23555         gpg: Speed up key listing in Tofu mode.
23556         + commit 78bb08425af5b1edb7f3ef0119013529b3a9e4ba
23557         * g10/tofu.c (get_trust): Add arg PK.  Uses this instead of a an extra
23558         lookup of the public key by fingerrpint.
23559         (tofu_register): Pass PK to get_trust.
23560         (tofu_get_validity): Ditto.
23561
23562         *g10/tofu.c (tofu_register): Remove unused FINGERPRINT_PP.
23563
23564         gpg: Avoid name spaces clash with future sqlite versions.
23565         + commit b1ba460d8f3358342c2ee2927114d36e767a439f
23566         * g10/sqlite.c: Rename to gpgsql.c.  Change function prefixes to
23567         gpgsql_.
23568         * g10/sqlite.h: Rename to gpgsql.h.
23569         * g10/tofu.c: Adjust for changes.
23570
23571         gpg: Explicitly close a combined Tofu DB.
23572         + commit 006a6126131ffd59d9a47889ac031f932ecc5d0b
23573         * g10/tofu.c (tofu_closedbs): Close combined DB.
23574
23575         gpg: Store the Tofu meta handle for databases in CTRL.
23576         + commit 754b1c463034a634a678d8efc76c27fd46aad9b9
23577         * g10/gpg.h (struct tofu_dbs_s, tofu_dbs_t): New declarations.
23578         (struct server_control_s): Add field tofu.dbs.
23579         * g10/tofu.c (struct dbs): Rename to tofu_dbs_s.  Replace all users by
23580         by tofu_dbs_t.
23581         (opendbs):  Add arg CTRL.  Cache the DBS in CTRL.
23582         (closedbs): Rename to tofu_closedbs and make global.  Add arg CTRL.
23583         (tofu_register): Add arg CTRL.  Change all callers.  Do not call
23584         closedbs.
23585         (tofu_get_validity): Ditto.
23586         (tofu_set_policy): Ditto.
23587         (tofu_get_policy): Ditto.
23588         (tofu_set_policy_by_keyid): Add arg CTRL.
23589         * g10/gpg.c (gpg_deinit_default_ctrl): Call tofu_closedbs.
23590
23591         gpg: Pass CTRL object down to the trust functions.
23592         + commit 027c4e55522b8e18711a3331932a9869ab89ca26
23593
23594
23595         gpg: Fix the TOFU_STATS_LONG status.
23596         + commit fd973ee1c18aa8fe764e09ba4dff589309b2d78d
23597         * g10/tofu.c (show_statistics): Print TOFU STATS with formatting
23598         characters.
23599
23600 2016-05-19  Werner Koch  <wk@gnupg.org>
23601
23602         gpg: Print "[  never ]" instead of err for validity.
23603         + commit 437c97ab6a34ff1936001dd05209193b4466a81d
23604         * g10/trust.c (uid_trust_string_fixed): Handle NEVER.
23605
23606 2016-05-18  Werner Koch  <wk@gnupg.org>
23607
23608         dirmngr: Adjust the WKD lookup to specs version -01.
23609         + commit cf97769906337d65289ad58225a5ecc53c715550
23610         * dirmngr/server.c (cmd_wkd_get): Remove second occurrence of the
23611         domain part.
23612
23613 2016-05-17  Werner Koch  <wk@gnupg.org>
23614
23615         gpg: Emit new status line KEY_CONSIDERED.
23616         + commit ff71521d9698c7c5df94831a1398e948213af433
23617         * common/status.h (STATUS_KEY_CONSIDERED): New.
23618         * g10/getkey.c: Include status.h.
23619         (LOOKUP_NOT_SELECTED, LOOKUP_ALL_SUBKEYS_EXPIRED): New.
23620         (finish_lookup): Add arg R_FLAGS.  Count expired and revoked keys and
23621         set flag.  Check a requested usage before checking for expiraion or
23622         revocation.
23623         (print_status_key_considered): New.
23624         (lookup): Print new status.
23625
23626 2016-05-11  NIIBE Yutaka  <gniibe@fsij.org>
23627
23628         g10: Fix signature checking.
23629         + commit 83a90a916e8e2f8e44c3b11d11e1dd75f65a87fb
23630         * g10/sig-check.c (check_signature_over_key_or_uid): Fix call to
23631         walk_kbnode.
23632
23633 2016-05-10  Werner Koch  <wk@gnupg.org>
23634
23635         gpg: Allow unattended deletion of secret keys.
23636         + commit ac9ff644b12c4dfa55d466af8ae6af54d1646893
23637         * agent/command.c (cmd_delete_key): Make the --force option depend on
23638         --disallow-loopback-passphrase.
23639         * g10/call-agent.c (agent_delete_key): Add arg FORCE.
23640         * g10/delkey.c (do_delete_key): Pass opt.answer_yes to
23641         agent_delete_key.
23642
23643 2016-05-09  Werner Koch  <wk@gnupg.org>
23644
23645         gpg: Fix buglet in the check_all_keysigs function.
23646         + commit 693838f0125d5d0c963fa3771b1bd117702af697
23647         * g10/keyedit.c (sig_comparison): Actually compare the pubkey
23648         algorithms.
23649
23650         gpg: Request a "save" after cmd "check" fixed something.
23651         + commit d33b35f7481caa0dcb25f9fa7d6c5bb27895297a
23652         * g10/keyedit.c (keyedit_menu) <cmdCHECK>: Set modified.
23653
23654 2016-05-09  NIIBE Yutaka  <gniibe@fsij.org>
23655
23656         po: Update Japanese translation.
23657         + commit ff870d59f067d3c5415e231c02a50d5dceac7e48
23658
23659
23660 2016-05-04  Werner Koch  <wk@gnupg.org>
23661
23662         Release 2.1.12.
23663         + commit 00df5b1236cac5c7a48638a4613278c5aab486f8
23664
23665
23666         speedo,w32: Remove the installation directory page.
23667         + commit fb1e9df48465c2f77a65dddd257572fdc79d9450
23668         * build-aux/speedo/w32/inst.nsi (MUI_PAGE_DIRECTORY): Remove.
23669
23670         gpg: Fix const char pointer mismatch with gettext.
23671         + commit 920b1421b35d1404b8360bd8feac0be659840543
23672         * g10/tofu.c (get_trust): Use const char *.
23673
23674         speedo: Build sqlite with static-libgcc.
23675         + commit edce430b039b313cc2d79402a7bd21347490c3be
23676         * build-aux/speedo/patches/sqlite.patch: New.
23677         * Makefile.am (EXTRA_DIST): Add file.
23678
23679         speedo: Also try patch files w/o version number.
23680         + commit 9ea258fa5b45bb5454ee3f5906df5d5eebdec0dd
23681         * build-aux/speedo.mk (SPKG_template): Try such a patch file.
23682
23683 2016-05-04  Andre Heinecke  <aheinecke@intevation.de>
23684
23685         speedo,w32: Install sqlite.
23686         + commit 2b78223d7587c68e2e27a3d7b365219228da7947
23687         * build-aux/speedo/w32/inst.nsi (-sqlite, -un.sqlite): New.
23688
23689         speedo,w32: Fix uninstallation.
23690         + commit 5ec76fd0c300b52366cf8d1407fe1c8de3a8a9d4
23691         * build-aux/speedo/w32/inst.nsi (-un.gnupg): Delete distsigkey and
23692         dirmngr-conf.skel
23693
23694         speedo,w32: Install localisation.
23695         + commit 3f58fc64666101e160e9b13fedb6cdaebeb91a7a
23696         * build-aux/speedo/w32/inst.nsi (-libgpg-error, GnuPG): Install l10n.
23697         (-un.libgpg-error, -un.gnupg): Uninstall l10n files.
23698
23699 2016-05-04  Werner Koch  <wk@gnupg.org>
23700
23701         tests: Disable the migrations tests.
23702         + commit d696eb396a9c88319358da4333feb653994d5408
23703         * tests/Makefile.am (SUBDIRS): Remove migrations.
23704         * configure.ac (AC_CONFIG_FILES): Remove migrations Makefile.
23705
23706 2016-05-04  Ineiev  <ineiev@gnu.org>
23707
23708         po: Update Russian translation.
23709         + commit 4fd13ab78dd228d8ff85659cddc2076af8728ebe
23710
23711
23712 2016-05-04  Werner Koch  <wk@gnupg.org>
23713
23714         po: Update German translation.
23715         + commit 75f31cdd42eed3555952ac478055d52af841f702
23716
23717
23718         Some minor string changes and fixed a printf format.
23719         + commit d00625dae60f26617d2e1bd4f22c6b35a4e92c91
23720         * g10/build-packet.c (notation_value_to_human_readable_string): Use
23721         %zu for size_t.
23722
23723         build: Update config.{guess,sub} to 2016-04-02 and 2016-03-30.
23724         + commit 04cc7c3786d91881f83a72799dab058476602a31
23725         * build-aux/config.guess: Update.
23726         * build-aux/config.sub: Update.
23727
23728         agent: Make --allow-loopback-pinentry the default.
23729         + commit 3ef0938cfd8637e9801369f142eb8dd564f2ca61
23730         * agent/gpg-agent.c (oNoAllowLoopbackPinentry): New.
23731         (opts): Add --no-allow-loopback-pinentry.  Hide
23732         description of --allow-loopback-pinentry.
23733         (parse_rereadable_options): Set opt.allow_loopback_pinentry by
23734         default.
23735         (main): Replace allow-loopback-pinentry by no-allow-loopback-pinentry
23736         in the gpgconf list.
23737         * tools/gpgconf-comp.c (gc_options_gpg_agent): Ditto.
23738
23739 2016-05-03  Werner Koch  <wk@gnupg.org>
23740
23741         common: Print https URLs in help messages.
23742         + commit 9e28617e260261de3972c20698b5a01561330e1c
23743         * common/argparse.c (strusage): Print https URLS.
23744
23745         tests: Silence output of some tests.
23746         + commit 33aacc3d4bbd6a82d7e7ceca058970879741b7da
23747         * common/t-exechelp.c (print_open_fds): Silence non-verbose output.
23748         (test_close_all_fds): Ditto.
23749         * common/t-session-env.c (show_stdnames): Indent output.
23750         * g10/test.c (TEST): Silence non-verbose okay output.
23751         (exit_tests): Ditto.
23752         * tools/gpg-zip.in (tar_verbose_opt): Add option --quiet.
23753         * tests/openpgp/gpgtar.test (GPGZIP): Pass option --quiet.
23754         * tests/openpgp/mds.test: Indent MD5 notice.
23755         * tests/openpgp/version.test: Indent --version output.
23756
23757         gpg: Emit status lines TOFU_STATS and TOFU_STATS_LONG.
23758         + commit 83865be35cff5355a5c4575cc3b50609819b0baa
23759         * g10/tofu.c (NO_WARNING_THRESHOLD): Rename to BASIC_TRUST_THRESHOLD.
23760         (FULL_TRUST_THRESHOLD): New.
23761         (write_stats_status): New.
23762         (show_statistics): Call new function.  Print TOFU_STATS_LONG.
23763
23764 2016-05-02  Werner Koch  <wk@gnupg.org>
23765
23766         gpg: Extend TRUST_foo status lines with the trust model.
23767         + commit ae1889320b822d48f7118a29391605e9ac992701
23768         * g10/trustdb.h (TRUST_FLAG_TOFU_BASED): New.
23769         * g10/trustdb.c (trust_model_string): Lowercase the strings.  Add arg
23770         "model" and change callers to call with OPT.TRUST_MODEL.
23771         * g10/tofu.c (tofu_wot_trust_combine): Set TRUST_FLAG_TOFU_BASED.
23772         * g10/pkclist.c (write_trust_status): New.
23773         (check_signatures_trust): Call new function.
23774
23775         gpg: Improve line wrapping for a tofu message.
23776         + commit 5cef6118580fe658a27d32e85696d88775ad417a
23777         * g10/tofu.c (time_ago_str): Mark non-breakable spaces.
23778         (show_statistics): Remove marks.
23779
23780         gpg: Re-format some tofu messages.
23781         + commit d73e83c3b678add11a5754e199e528aeb39ec8ce
23782         * common/status.h (STATUS_TOFU_USER, STATUS_TOFU_STATS)
23783         (STATUS_TOFU_STATS_SHORT, STATUS_TOFU_STATS_LONG): New.
23784         * g10/tofu.c (NO_WARNING_THRESHOLD): New.
23785         (record_binding, tofu_register): Take care of --dry-run.
23786         (show_statistics): Print STATUS_TOFU_USER.  Reformat some messages.
23787         Fix the ngettext/strcmp thing.  Use log_string instead of log_info.
23788         Use NO_WARNING_THRESHOLD constant.
23789         (get_trust): Use format_text and print a compact fingerprint.
23790
23791 2016-05-02  NIIBE Yutaka  <gniibe@fsij.org>
23792
23793         scd: More fix of error return path.
23794         + commit 6677d8b61446eb5760a30a2488c992d6e895a9ed
23795         * scd/command.c (open_card): Return GPG_ERR_ENODEV on the failure of
23796         apdu_connect.
23797
23798 2016-04-29  Werner Koch  <wk@gnupg.org>
23799
23800         common: Extend log_string to indent lines.
23801         + commit 35f4b6aafdf1889ed1ae569af5852f47738fe993
23802         * common/logging.c (do_logv): Add indentation when called via
23803         log_string.
23804
23805         gpg: Factor some code code out of tofu.c.
23806         + commit dcad99c98616a6031ddfde313c920339e4012378
23807         * g10/tofu.c (string_to_long): New.
23808         (string_to_ulong): New.
23809         (get_single_unsigned_long_cb): Replace strtol/strtoul by new function.
23810         (get_single_long_cb): Ditto.
23811         (signature_stats_collect_cb):  Ditto.
23812         (get_policy): Ditto.
23813         (show_statistics): Ditto.  Uese es_free instead of free.
23814
23815         gpg: Remove all assert.h and s/assert/log_assert/.
23816         + commit 64bfeafa52a5ed3fa82bdc0ce7ef0edddeef188c
23817
23818
23819         common: Improve log_assert.
23820         + commit 9740dff9f4d18ba764dc7173d4902e94e3f0c2e8
23821         * common/logging.c (bug_at): Do not i18n the string.
23822         (_log_assert): New.
23823         * common/logging.h (log_assert): Use new function and pass line
23824         information.
23825
23826 2016-04-28  NIIBE Yutaka  <gniibe@fsij.org>
23827
23828         scd: Fix error return path.
23829         + commit cb4fee8bb645745ff199f7428e19226d5bc63dab
23830         * scd/ccid-driver.c (bulk_in): Remove EAGAIN handling.
23831         Handle LIBUSB_ERROR_NO_DEVICE to return CCID_DRIVER_ERR_NO_READER.
23832
23833 2016-04-27  NIIBE Yutaka  <gniibe@fsij.org>
23834
23835         scd: Fix memory leaks.
23836         + commit 508b0deb70d39d388149be9a63fab24cc956a239
23837         * scd/ccid-driver.c (scan_or_find_usb_device): Return on
23838         LIBUSB_ERROR_NO_MEM.  Free CONFIG before return except on error.
23839         (scan_or_find_devices): Free device list.
23840
23841 2016-04-27  Werner Koch  <wk@gnupg.org>
23842
23843         gpg: Add experimental AKL method "wkd" and option --with-wkd-hash.
23844         + commit 87de9e19edf0311ca0342e15ef44ebe40e32861e
23845         * g10/getkey.c (parse_auto_key_locate): Add method "wkd".
23846         (get_pubkey_byname): Implement that method.  Also rename a variable.
23847         * g10/call-dirmngr.c (gpg_dirmngr_wkd_get): New.
23848         * g10/keyserver.c (keyserver_import_wkd): New.
23849         * g10/test-stubs.c (keyserver_import_wkd): Add stub.
23850         * g10/gpgv.c (keyserver_import_wkd): Ditto.
23851         * g10/options.h (opt):  Add field 'with_wkd_hash'.
23852         (AKL_WKD): New.
23853
23854         * g10/gpg.c (oWithWKDHash): New.
23855         (opts): Add option --with-wkd-hash.
23856         (main): Set that option.
23857         * g10/keylist.c (list_keyblock_print): Implement that option.
23858
23859         dirmngr: Add experimental command WKD_GET.
23860         + commit c83c6f212e9bc98a9ea8dd8102bc16edd1a03050
23861         * dirmngr/server.c (cmd_wkd_get): New.
23862         (register_commands): Add command WKD_GET.
23863
23864         dirmngr: Use system provided root CAs with KS_FETCH.
23865         + commit c3aeda82b8d00b87a5af72b4075c487c10dfdf6b
23866         * dirmngr/ks-engine-http.c (ks_http_fetch): Use HTTP_FLAG_TRUST_SYS.
23867
23868 2016-04-26  Werner Koch  <wk@gnupg.org>
23869
23870         http: Allow to request system defined CAs for TLS.
23871         + commit fd765df6a7883c3d841abeb657330a1aab4b7756
23872         * dirmngr/http.h (HTTP_FLAG_TRUST_DEF, HTTP_FLAG_TRUST_SYS): New.
23873         * dirmngr/http.c (http_session_new): Add arg "flags".
23874         * dirmngr/ks-engine-hkp.c (send_request): Use new flag
23875         HTTP_FLAG_TRUST_DEF for the new arg of http_session_new.
23876         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
23877         * dirmngr/t-http.c (main): Ditto.
23878
23879 2016-04-25  Werner Koch  <wk@gnupg.org>
23880
23881         common: Minor fixes for the new private-keys.c.
23882         + commit b7fa4960c292ef1a290d32b7f46bb741bbfc0923
23883         * common/private-keys.c (my_error_from_syserror): New.  Use it in
23884         place of gpg_error_from_syserror.
23885         (_pkc_add, pkc_lookup, pke_next_value): Use ascii_strcasecmp.
23886         (pkc_parse): Use xtrystrdup and append_to_strlist_try as intended.
23887
23888         (_pkc_add): Add braces around if-statement.
23889
23890         common: Use new function to print a failure of xtrymalloc.
23891         + commit 8776abbe02935e720018f3ef6ffd48f21435ff8b
23892         * common/miscellaneous.c (xoutofcore): New.
23893         * common/strlist.c (append_to_strlist): Use instead of abort.
23894         (append_to_strlist_try): Use xtrymalloc instead of xmalloc.
23895
23896 2016-04-21  Justus Winter  <justus@g10code.com>
23897
23898         common: Add support for the new extended private key format.
23899         + commit 12af2630cf4d1a39179179925fac8f2cce7504ff
23900         * agent/findkey.c (write_extended_private_key): New function.
23901         (agent_write_private_key): Detect if an existing file is in extended
23902         format and update the key within if it is.
23903         (read_key_file): Handle the new format.
23904         * agent/keyformat.txt: Document the new format.
23905         * common/Makefile.am: Add the new files.
23906         * common/private-keys.c: New file.
23907         * common/private-keys.h: Likewise.
23908         * common/t-private-keys.c: Likewise.
23909         * common/util.h (alphap, alnump): New macros.
23910         * tests/migrations: Add test demonstrating that we can cope with the
23911         new format.
23912
23913         common: Add 'free_strlist_wipe' which wipes memory.
23914         + commit c6d1f2f08c68efe7e80887219064a8ce6365128f
23915         * common/strlist.c (free_strlist_wipe): New function.
23916         * common/strlist.h (free_strlist_wipe): New prototype.
23917
23918         common: Add 'append_to_strlist_try' which can fail.
23919         + commit 95303ee11df12f284e98d02dba993eda9e425383
23920         * common/strlist.c (append_to_strlist): Use the new function.
23921         (append_to_strlist_try): New function.
23922         * common/strlist.h (append_to_strlist_try): New prototype.
23923
23924         agent: Convert key format document to org.
23925         + commit 342cc488890241b41e49f50886617115342721d6
23926         * agent/keyformat.txt: Convert to org mode.
23927
23928         tests: Make migration test more robust and silent.
23929         + commit 0c35e09278514f1e3377a4b0a9b1f44dd39b1bf4
23930         * tests/migrations/from-classic.test: Fix in-tree build, silence test.
23931
23932 2016-04-21  Werner Koch  <wk@gnupg.org>
23933
23934         w32: Use --enable-gpg2-is-gpg by default.
23935         + commit d81de224ecd542922dda649a492dd9550509d7bc
23936         * autogen.rc: Add option also for plain Windows.
23937
23938         w32: Replace libiconv DLL by iconv feature of libgpg-error.
23939         + commit bd4d65615b3a5360d455b99e77bd113ad90f1539
23940         * configure.ac: Do nor require libiconv for W32.
23941         * common/utf8conv.c [W32]: Do not incluce iconv.h.  Request
23942         libgpg-error iconv macros.
23943         (jnlib_iconv): Use ICONV_CONST macro.
23944         * build-aux/speedo/w32/inst.nsi [!WITH_GUI]: Do not install libiconv.
23945         * build-aux/speedo.mk (speedo_spkgs) [!WITH_GUI]: Likewise.
23946
23947 2016-04-20  Justus Winter  <justus@g10code.com>
23948
23949         agent: Sanitize permissions of the private key directory.
23950         + commit f8adf1a3234655877a4f985d627d98567507002c
23951         * agent/gpg-agent.c (create_private_keys_directory): Set permissions.
23952         * common/sysutils.c (modestr_to_mode): New function.
23953         (gnupg_mkdir): Use new function.
23954         (gnupg_chmod): New function.
23955         * common/sysutils.h (gnupg_chmod): New prototype.
23956         * tests/migrations/from-classic.test: Test migration with existing
23957         directory.
23958
23959         tests: Test the migration from a classic GnuPG home directory.
23960         + commit defbc70b4a16264e067daf76678ecfb9d030dee4
23961         * configure.ac: Add new directory.
23962         * tests/Makefile.am (SUBDIRS): Likewise.
23963         * tests/migrations/Makefile.am: New file.
23964         * tests/migrations/from-classic.gpghome/pubring.gpg.asc: Likewise.
23965         * tests/migrations/from-classic.gpghome/secring.gpg.asc: Likewise.
23966         * tests/migrations/from-classic.gpghome/trustdb.gpg.asc: Likewise.
23967         * tests/migrations/from-classic.test: Likewise.
23968
23969 2016-04-20  Werner Koch  <wk@gnupg.org>
23970
23971         speedo: Use swdb.lst to define the SQLite version.
23972         + commit 2385b9f1ddc4938e45c01a12a804f4b77d253305
23973         * build-aux/speedo.mk: Change sqlite to use our mirror and the
23974         swdb.lst file.
23975         * build-aux/speedo/w32/inst.nsi: gpg is now build and installed as
23976         gpg.
23977
23978 2016-04-19  Werner Koch  <wk@gnupg.org>
23979
23980         gpg: Improve UID selction of --quick-sign-key.
23981         + commit d02de6c0a4a55a2720cfa5caddcbfc4ce988a2ec
23982         * g10/keyedit.c (keyedit_quick_sign): Improve UID selection and print
23983         error for non-found userids.
23984
23985         gpg: Avoid debug like output at start of --edit-key.
23986         + commit 085b19fc9aa7f2f9b82a97824b117e71390964ec
23987         * g10/keyedit.c (check_all_keysigs): Print info only after something
23988         has been modified.
23989
23990 2016-04-15  Andre Heinecke  <aheinecke@intevation.de>
23991
23992         dirmngr: Fix https never reported in general help.
23993         + commit 6272f24312f2efe8707a7712858c85cd5a42e6fa
23994         * dirmngr/ks-engine-http.c (ks_hkp_help): Also print https
23995         when supported and no uri provided.
23996
23997         dirmngr: Fix https incorrectly reported in help.
23998         + commit a0642856b25622c81d3464979c47ff2a30af58fa
23999         * dirmngr/ks-engine-http.c (ks_hkp_help): Only print https if tls
24000         is supported.
24001
24002 2016-04-14  Werner Koch  <wk@gnupg.org>
24003
24004         agent: Fix regression due to recent commit 4159567.
24005         + commit 8c3fb2360f154a971d2a390e4937acb22a44a8c2
24006         * agent/protect.c (do_encryption): Fix CBC hashing.
24007
24008         agent: Allow gpg-protect-tool to handle openpgp-native protection.
24009         + commit 6df75ec70afeb1a5ad9a00557e1245e1514c37b5
24010         * agent/protect-tool.c (read_and_unprotect): Add arg ctrl and pass to
24011         agent_unprotect.
24012         (main): Allocate a simple CTRL object and pass it to
24013         read_and_unprotect.
24014         (convert_from_openpgp_native): Remove stub.
24015         (agent_key_available, agent_get_cache): New stubs.
24016         (agent_askpin): New emulation for the one in call-pinentry.c.
24017         (agent_write_private_key): New to dump key.
24018         * agent/Makefile.am (gpg_protect_tool_SOURCES): Add cvt-openpgp.c
24019
24020         tests: Set fake-pinentry's stdout and stdin to _IOLBF.
24021         + commit 94504b3d5af126abb591dedda1ca0f0970822f55
24022         * tests/openpgp/fake-pinentry.c (main): Call setvbuf.  Show passphrase
24023         at startup.  Increase buffer.
24024
24025 2016-04-12  Werner Koch  <wk@gnupg.org>
24026
24027         agent: Implement new protection mode openpgp-s2k3-ocb-aes.
24028         + commit 4159567f7ed7a1139fdc3a6c92988e1648ad84ab
24029         * agent/protect.c (agent_protect): Add arg use_ocb.  Change all caller
24030         to pass -1 for default.
24031         * agent/protect-tool.c: New option --debug-use-ocb.
24032         (oDebugUseOCB): New.
24033         (opt_debug_use_ocb): New.
24034         (main): Set option.
24035         (read_and_protect): Implement option.
24036
24037         * agent/protect.c (OCB_MODE_SUPPORTED): New macro.
24038         (PROT_DEFAULT_TO_OCB): New macro.
24039         (do_encryption): Add args use_ocb, hashbegin, hashlen, timestamp_exp,
24040         and timestamp_exp_len.  Implement OCB.
24041         (agent_protect): Change to support OCB.
24042         (do_decryption): Add new args is_ocb, aadhole_begin, and aadhole_len.
24043         Implement OCB.
24044         (merge_lists): Allow NULL for sha1hash.
24045         (agent_unprotect): Change to support OCB.
24046         (agent_private_key_type): Remove debug output.
24047
24048         indent: Help Emacs not to get confused by conditional compilation.
24049         + commit 7faf131c8b8710419df3dc13a1228d1977c55f53
24050         * agent/protect.c (calibrate_get_time) [W32]: Use separate function
24051         calls for W32 and W32CE.
24052
24053 2016-04-07  Justus Winter  <justus@g10code.com>
24054
24055         g10: Fix exporting secret keys of certain sizes.
24056         + commit 02cf1357dd5ee34a57371f55b9d312b8b9e3a7e8
24057         * g10/build-packet.c (do_key): Do not use the header length specified
24058         by the public key packet from the keyring, but let 'write_header2'
24059         compute the required length.
24060
24061 2016-04-06  Justus Winter  <justus@g10code.com>
24062
24063         Revert "g10: Support armored keyrings in gpgv."
24064         + commit 76ca869197e304daa5a8dd96ea43113ec7b28354
24065         This reverts commit abb352de51bc964c06007fce43ed6f6caea87c15.
24066
24067 2016-04-05  Justus Winter  <justus@g10code.com>
24068
24069         dirmngr: Autodetect PEM format in dirmngr-client.
24070         + commit 9354293b8c9f234939bc04182f15e2fe512e914e
24071         * dirmngr/dirmngr-client.c (init_asctobin): New function.
24072         (main): Move the initialization code to the new function.
24073         (read_pem_certificate): Initialize base64 table.
24074         (read_certificate): Try to decode certificates given in files as PEM
24075         first.
24076
24077 2016-04-05  Werner Koch  <wk@gnupg.org>
24078
24079         build: Fix for: Build gpgcompose only in maintainer mode.
24080         + commit f45ed07a0fffa3adbc75b9d5726108a066927599
24081         * g10/Makefile.am (noinst_PROGRAMS): Always add module_tests.
24082
24083         doc: Install gpg and gpgv man pages under the correct name.
24084         + commit 4dc4fb1c14b3096bb1cdc5923c0d1eb419036805
24085         * doc/mkdefsinc.c (main): Add double include guard.  Set variable
24086         gpgtwohack. Define macros gpgname and gpgvname.
24087         * doc/gpg.texi: Remove macro definition for gpgname.  Use Texinfo var
24088         gpgtwohack to prepare the man pages.  Use @gpgname everywhere.
24089         * doc/gpgv.texi: Likewise.
24090         * doc/Makefile.am (myman_pages): Remove gpg2.1 and gpgv2.1 but add
24091         them depending on USE_GPG2_HACK.
24092
24093         build: Build gpgcompose only in maintainer mode.
24094         + commit 4b5341dc333983a15f649601fdddc42ba9161433
24095         * g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose only in maintainer
24096         mode.
24097
24098         gpg: Replace use of "gpg2" by GPG_NAME.
24099         + commit 7b58a1118d98543ed6854447d7b403877638ba54
24100
24101
24102 2016-04-04  Werner Koch  <wk@gnupg.org>
24103
24104         Now build "gpg" binary but install as "gpg2"
24105         + commit 96bcd4220f1f1313afe12097d8dc62342ac8de0d
24106         * configure.ac (USE_GPG2_HACK): New ac_define am_conditional.
24107         * common/homedir.c (gnupg_module_name): Replace use of macro
24108         NAME_OF_INSTALLED_GPG.
24109         * g10/keygen.c (generate_keypair): Ditto.
24110         * g10/Makefile.am (bin_PROGRAMS): Remove.
24111         (noinst_PROGRAMS): Add gpg or gpg2 and gpgv or gpg2.
24112         (gpg2_hack_list): New.
24113         (use_gpg2_hack): New.
24114         (gpg2_SOURCES): Rename to gpg_SOURCES.
24115         (gpgv2_SOURCES): Rename to gpgv_SOURCES.
24116         (gpg2_LDADD): Rename to gpg_LDADD.
24117         (gpgv2_LDADD): Rename to gpgv_LDADD.
24118         (gpg2_LDFLAGS): Rename to gpg_LDFLAGS.
24119         (gpgv2_LDFLAGS): Rename to gpgv2_LDFLAGS.
24120         (install-exec-hook): Remove WinCE specific rules and add new rules.
24121         (uninstall-local): Uninstall gpg/gpg2 and gpgv/gpgv2.
24122         * tests/openpgp/Makefile.am (required_pgms): s/gpg2/gpg/.
24123         * tests/openpgp/defs.inc: Ditto.
24124         * tests/openpgp/gpgtar.test: Ditto.
24125         * tests/openpgp/mkdemodirs: Ditto.
24126         * tests/openpgp/signdemokey: Ditto.
24127
24128         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Remove obsolete
24129         --enable-mailto, add --enable-gpg2-is-gpg.
24130
24131         tests: Add missing file.
24132         + commit c6ed863491ec3a1e0fcf9cbe2c93c87468306c29
24133         * tests/openpgp/Makefile.am (TEST_FILES): Add plain-largeo.asc.
24134
24135 2016-04-04  Justus Winter  <justus@g10code.com>
24136
24137         g10: Support armored keyrings in gpgv.
24138         + commit abb352de51bc964c06007fce43ed6f6caea87c15
24139         * doc/gpgv.texi: Document the feature.
24140         * g10/Makefile.am (gpgv2_SOURCES): Add dearmor.c.
24141         * g10/dearmor.c (dearmor_file): Add sink argument.
24142         * g10/gpg.c (main): Adapt accordingly.
24143         * g10/gpgv.c (make_temp_dir): New function.
24144         (main): De-armor keyrings.
24145         * g10/main.h (dearmor_file): Adapt prototype.
24146
24147         tests: Fix default key test.
24148         + commit dd5902cc45bae7582f8a0bc91a0a7f4d8ae45d8c
24149         * tests/openpgp/default-key.test: Avoid using the option
24150         '--trust-model' unconditionally.
24151
24152 2016-04-01  Justus Winter  <justus@g10code.com>
24153
24154         build: Check for conflicting trust model options.
24155         + commit 6060ea898fda499211c9d5030fff41d58f899fb0
24156         * configure.ac: Disable TOFU if configured without trust models, and
24157         check for conflicting options.
24158
24159         g10: Remove option --always-trust if compiled without trust models.
24160         + commit b74185b6eaeaae4754726ff203e11977777f568c
24161         * g10/gpg.c (opts): Remove option --always-trust if compiled without
24162         trust models.
24163
24164 2016-03-31  Justus Winter  <justus@g10code.com>
24165
24166         speedo,w32: Build libsqlite3.
24167         + commit e7171f559590422cc52dbcb8d78d94569b31012f
24168         * build-aux/speedo.mk (speedo_spkgs): Add libsqlite3 on w32.
24169         (libsqlite3_ver): New variable.
24170         (speedo_pkg_libsqlite3_tar): Likewise.
24171
24172         g10: Use gpg-error abstraction of sched_yield.
24173         + commit 8be9dab2dd2f83ca922c01542c63b404e34bdfd9
24174         * g10/tofu.c (begin_transaction): Use 'gpgrt_yield'.
24175
24176 2016-03-29  Werner Koch  <wk@gnupg.org>
24177
24178         gpg: Fix NULL-segv for missing tofu DB.
24179         + commit e2c5781788f765815532410a77077ddbb72513e9
24180         * g10/tofu.c (opendb): Guard call to timeout function.
24181
24182 2016-03-22  Werner Koch  <wk@gnupg.org>
24183
24184         gpg: Improve message when asking for key capabilities.
24185         + commit fc30c079a348436868968850dabf653b91f82419
24186         * g10/keygen.c (ask_key_flags): Improve message.
24187
24188         gpg: Remove the extra prompt for Curve25519.
24189         + commit 7f919063d3e426104fe58ae779a9a066140014c1
24190         * g10/keygen.c (MY_USE_ECDSADH): New macro local to ask_curve.
24191         (ask_curve): Use a fixed table of curve names and reserve a slot for
24192         Curve448.  Simplify CurveNNNN/EdNNNN switching.
24193         (ask_curve): Remove the Curve25519 is non-standard prompt.
24194
24195 2016-03-19  Werner Koch  <wk@gnupg.org>
24196
24197         gpg: Silence trustdb computation with --quiet.
24198         + commit af9a4afbf0b518c8acff98e50135b2beb6c722c3
24199         * g10/trustdb.c (validate_keys): Do not print log_info stuff in quiet
24200         mode.
24201
24202 2016-03-17  Werner Koch  <wk@gnupg.org>
24203
24204         sm: Always create a keybox header when creating a new keybox.
24205         + commit 1aad5c6277ea3852ff57bbf680f61c9136ce4d5c
24206         * sm/keydb.c (maybe_create_keybox): Create the header blob.
24207
24208 2016-03-17  Neal H. Walfield  <neal@g10code.com>
24209
24210         doc: Improve documentation of --enable-large-rsa.
24211         + commit 1dc7f55a4095ee42ce2d8c3eb41b7162edf2ca2e
24212         * doc/gpg.texi (--enable-large-rsa): Improve text.
24213
24214 2016-03-17  NIIBE Yutaka  <gniibe@fsij.org>
24215
24216         agent: allow removal of the shadowed key.
24217         + commit 8588c2dbc4c4d1b53796f3dbe8489b932dca7a60
24218         * agent/findkey.c (agent_delete_key): Remove the key when asked.
24219
24220 2016-03-16  NIIBE Yutaka  <gniibe@fsij.org>
24221
24222         g10: Add const qualifier.
24223         + commit b752d2c93778e6a1c1de3eddf8fc725b0ddd354e
24224         * g10/gpgcompose.c (show_help): Those are strings not to be modified.
24225
24226 2016-03-15  Werner Koch  <wk@gnupg.org>
24227
24228         gpg: Do not rely on a certain evaluation order.
24229         + commit 60b34f96f4f390670462d719c0d797e622cee4d4
24230         * g10/keyedit.c (print_and_check_one_sig): Call check_key_signature
24231         before derefing IS_SELFSIG.
24232
24233 2016-03-14  Werner Koch  <wk@gnupg.org>
24234
24235         scd: Add manufacturer id 0x000a.
24236         + commit 834b84c0ee4990393daa5e44afbab5b0aaed0758
24237         * g10/card-util.c (get_manufacturer): Add it.
24238
24239 2016-03-10  Kevin J. McCarthy  <kevin@8t8.us>
24240
24241         g10: Silence message if --quiet is given.
24242         + commit 4f578cb2fc192f44070bb0d18dffaa3863ed0d92
24243         * g10/getkey.c (parse_def_secret_key): Silence message if --quiet is
24244         given.
24245
24246 2016-03-08  Neal H. Walfield  <neal@g10code.com>
24247
24248         gpg: Add a new test.
24249         + commit b17577eac6b7599a4bab6fd3ecb04715aa01367c
24250         * g10/Makefile.am (EXTRA_DIST): Add t-stutter-data.asc.
24251         (module_tests): Add t-stutter.
24252         (t_stutter_SOURCES): New variable.
24253         (t_stutter_LDADD): New variable.
24254
24255 2016-03-07  Justus Winter  <justus@g10code.com>
24256
24257         sm: Implement pinentry loopback and reading passphrases from fd.
24258         + commit eea139c56ef55081d8cd8df2a35ce507386e0f17
24259         * doc/gpgsm.texi: Document '--pinentry-mode' and '--passphrase-fd'.
24260         * sm/Makefile.am (gpgsm_SOURCES): Add new files
24261         * sm/call-agent.c (struct default_inq_parm_s): New definition.
24262         (start_agent): Pass in the pinentry mode.
24263         (default_inq_cb): Handle 'PASSPHRASE' and 'NEW_PASSPHRASE' inquiries.
24264         Adapt all call sites to the new callback cookie.
24265         * sm/gpgsm.c (cmd_and_opt_values): Add new values.
24266         (opts): Add new options.
24267         (main): Handle new options.
24268         * sm/gpgsm.h (struct opt): Add field 'pinentry_mode'.
24269         * sm/passphrase.c: New file.
24270         * sm/passphrase.h: Likewise.
24271
24272         sm: Remove unused argument '--fixed-passphrase'.
24273         + commit 53ed98eda77ff2dcf390cebd0cec9f2665661863
24274         * doc/gpgsm.texi: Drop description.
24275         * sm/gpgsm.c (cmd_and_opt_values): Drop enum value.
24276         (opts): Drop argument.
24277         (main): Drop argument handling.
24278         * sm/gpgsm.h (struct opt): Drop field 'fixed_passphrase'.
24279
24280         kbx: Avoid undefined behavior.
24281         + commit a68ca5a90457ac97eee4efd7fdea596d27c54697
24282         * kbx/keybox-file.c (_keybox_read_blob2): Cast to unsigned int before
24283         shifting.
24284
24285 2016-03-07  NIIBE Yutaka  <gniibe@fsij.org>
24286
24287         scd: Bug fix for a device with multiple interfaces.
24288         + commit 7a32f87cccddb40521bfdd4eb2d0dc9c88fb3fe5
24289         * scd/ccid-driver.c (scan_or_find_usb_device): Use IFC_NO when
24290         accessing interface information.
24291
24292 2016-03-04  Justus Winter  <justus@g10code.com>
24293
24294         build: Make libusb a hard requirement if the ccid driver is requested.
24295         + commit e997552161b2dd8aabf350adee14e208e1545aef
24296         * configure.ac: Print an error message and die if the internal ccid
24297         driver is requested but no suitable libusb is found.
24298
24299         g10: Drop superfluous declaration.
24300         + commit 1e4b7823008daea1a22a6f0f9b379fdec37a4cd4
24301         * g10/main.h (disable_core_dumps): Drop declaration.
24302
24303         g10: Guard code against errors.
24304         + commit 40f6529ceeea806fc011135a9fa3a3590a9534ac
24305         * g10/keygen.c (do_generate_keypair): Check for errors, in which case
24306         'pri_psk' is NULL.
24307
24308 2016-03-03  Justus Winter  <justus@g10code.com>
24309
24310         dirmngr: Add more missing CFLAGS.
24311         + commit 9f0ba5089e664447c36cee3d9249f95e4ea39957
24312         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
24313         'GCRYPT_CFLAGS'.
24314         (t_dns_stuff_CFLAGS): Likewise.
24315
24316         tests/openpgp: Skip gpgtar test if it has not been built.
24317         + commit a883d4c0f8125e809c144ec69e76c9f522102d8f
24318         * tests/openpgp/gpgtar.test: Check if executable exists.
24319
24320 2016-03-02  Neal H. Walfield  <neal@g10code.com>
24321
24322         gpg: Add new program gpgcompose.
24323         + commit d040628ddf2c09ddc9581ff365680a568ad24278
24324         * g10/packet.h: Include "util.h".
24325         * g10/encrypt.c (encrypt_seskey): Don't mark as static.
24326         * g10/gpgcompose.c: New file.
24327         * g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose.
24328         (gpg2_SOURCES): Split everything but gpg.c into...
24329         (gpg_sources): ... this new variable.
24330         (gpgcompose_SOURCES): New variable.
24331         (gpgcompose_LDADD): Likewise.
24332         (gpgcompose_LDFLAGS): Likewise.
24333
24334         gpg: More robustly detect valid non-armored OpenPGP messages.
24335         + commit 605276ef8cd449bfd574ae6c498fa5d7d265c5c7
24336         * g10/armor.c (is_armored): More robustly detect valid non-armored
24337         OpenPGP messages.
24338
24339         common: Provide a function for mapping packet types to strings.
24340         + commit 24e0f1d56e6f56e7fb52b5c6bdb100131e12dfe3
24341         * common/openpgpdefs.h (pkttype_str): New function.
24342
24343         gpg: Rename pop_filter to iobuf_pop_filter and export it.
24344         + commit 1463f9b9624fae97cc89df3aa4546655ee893f7c
24345         * common/iobuf.c (pop_filter): Rename from this...
24346         (iobuf_pop_filter): ... to this.  Don't mark it as static.
24347
24348         gpg: Split write_pubkey_enc_from_list.
24349         + commit 7eac4942b537c4b3710d34e6adb9c5d36338f38b
24350         * g10/encrypt.c (write_pubkey_enc_from_list): Split the body of this
24351         function out into...
24352         (write_pubkey_enc): ... this new function.
24353
24354         gpg: Allow the caller to write the contents of a plaintext packet.
24355         + commit 2fdb950471bd36f046672254ff26ca94797cc9f1
24356         * g10/build-packet.c (do_plaintext): Change the semantics such that if
24357         PT->BUF is NULL, it is the caller's responsibility to write the
24358         content (and disable partial body length mode, if appropriate).
24359
24360         gpg: Add a new function for creating binary notations.
24361         + commit 1a624586149f9e34206e5d5e1ba0b7d2b7004c80
24362         * g10/build-packet.c (blob_to_notation): New function.
24363
24364         gpg: Refactor the printing of binary notations.
24365         + commit fd2d00ccf558b1ac1184967d8702ef01cd60bf60
24366         * g10/build-packet.c (sig_to_notation): Break printing of binary
24367         notations into...
24368         (notation_value_to_human_readable_string): ... this new function.
24369         Provide a small preview of the binary data substituting non-printable
24370         characters with '?'.
24371
24372 2016-03-02  Uldis Anšmits  <uldis.ansmits@tieto.com>
24373
24374         tests/openpgp: Make tests more portable.
24375         + commit 1cdb744d91ab33563fc0b3156fb05694caa55278
24376         * tests/openpgp/default-key.test: Avoid 'grep -q'.
24377         * tests/openpgp/gpgtar.test: Avoid 'grep -qe' and 'diff -q'.
24378         * tests/openpgp/use-exact-key.test: Avoid 'grep -q'.
24379
24380 2016-03-02  Justus Winter  <justus@g10code.com>
24381
24382         common: Consolidate Assuan server argument handling.
24383         + commit e77c85577d1bdd77ad3b81907145fd68f2653c01
24384         * common/Makefile.am (common_sources): Add new files.
24385         * common/server-help.c: New file.
24386         * common/server-help.h: Likewise.
24387         * agent/command.c: Drop argument handling primitives in favor of using
24388         the consolidated ones.
24389         * dirmngr/server.c: Likewise.
24390         * g10/server.c: Likewise.
24391         * g13/server.c: Likewise.
24392         * scd/command.c: Likewise.
24393         * sm/server.c: Likewise.
24394
24395 2016-03-01  Justus Winter  <justus@g10code.com>
24396
24397         dirmngr: Add missing CFLAGS.
24398         + commit 9a1778abcae0a7afe33be8e02b6d9a909463cd54
24399         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
24400         'GPG_ERROR_CFLAGS'.
24401         (t_dns_stuff_CFLAGS): Likewise.
24402
24403         tools: Drop superfluous include.
24404         + commit 3a1d142f9b71721a631cf2037665e9def60aa384
24405         * tools/gpgtar.c: Do not include unused 'npth.h'.
24406
24407 2016-02-26  Werner Koch  <wk@gnupg.org>
24408
24409         gpg: Prettify a 2 octet hex output.
24410         + commit 2de0d41219a522e01f050d475b3ddecb9173fc7d
24411         * g10/sig-check.c (check_key_signature2): Wrap line and use %02x.
24412
24413 2016-02-25  Neal H. Walfield  <neal@g10code.com>
24414
24415         gpg: Show debugging info if a sig with an unsupported sig class is used.
24416         + commit 87515e39295e4b7eaec1641c38e1ac32e8d39a91
24417         * g10/sig-check.c (check_key_signature2): If SIG->CLASS is
24418         unsupported, show some debugging information.  Don't use BUG to fail.
24419         Just return GPG_ERR_BAD_SIGNATURE.
24420
24421         gpg: More carefully encode a packet's length.
24422         + commit 960f5e26f2cda3ac6e6b30548fa808a690c39ffc
24423         * g10/build-packet.c (write_header2): Make sure the length bits are
24424         cleared.  Fail if HDRLEN is set and the specified length can't be
24425         encoded in the available space.
24426
24427         gpg: Avoid directly twiddling bits.
24428         + commit 105a5629c7e938ec7b3c9c338ebe7bdfee4cfdad
24429         * g10/build-packet.c (do_plaintext): Use ctb_new_format_p to check the
24430         packet's format.
24431         (write_header2): Likewise.
24432
24433         gpg: Add some asserts.
24434         + commit c9636a1acc952eb8e1355089bc2e229dece98165
24435         * g10/build-packet.c (ctb_new_format_p): New function.
24436         (ctb_pkttype): New function.
24437         (do_user_id): Add some asserts.
24438         (do_key): Likewise.
24439         (do_symkey_enc): Likewise.
24440         (do_pubkey_enc): Likewise.
24441         (do_plaintext): Likewise.
24442         (do_encrypted): Likewise.
24443         (do_encrypted_mdc): Likewise.
24444         (do_compressed): Likewise.
24445         (do_signature): Likewise.
24446         (do_signature): Likewise.
24447         (write_header2): Likewise.
24448
24449         gpg: Avoid an unnecessary copy.
24450         + commit 512bc72e1f8544341529174142273d857f45540c
24451         * g10/build-packet.c (sig_to_notation): Avoid an unnecessary copy of
24452         the data: the size of the packet is fixed.
24453
24454 2016-02-23  Neal H. Walfield  <neal@g10code.com>
24455
24456         common: Reduce buffer size.
24457         + commit 75861b663bbb37214143c2ff7b1b4d1d10ba2657
24458         * common/iobuf.c (iobuf_copy): Change buffer size from 1 MB to 32 KB.
24459
24460         common: Improve a function's documentation and comments.
24461         + commit 14d27b2cadf9b0bb413f2b8bad2d81c1d370c2e7
24462         * common/iobuf.c (iobuf_set_partial_body_length_mode): Fix
24463         documentation and comment.  Add an assert.
24464
24465         common: Add log_assert.
24466         + commit f57a91afb69c58f9d8d9632801650f28c7dc1e0d
24467         * common/logging.h (log_assert): New macro.
24468
24469         gpg: Use higher-level functions.
24470         + commit 33ac735a781325c4d47cdf6216813866ab93562e
24471         * g10/build-packet.c (do_symkey_enc): Use iobuf_write instead of
24472         iobuf_put in a loop.  Use iobuf_copy instead of iobuf_read and
24473         iobuf_write in a loop.  Move the memory wiping from here...
24474         * common/iobuf.c (iobuf_copy): ... to here.
24475
24476         common: Check for an error before reading.
24477         + commit 8066f8a3470f9d2f3682a28641a7b09eca29a105
24478         * common/iobuf.c (iobuf_copy): If DEST has a pending error, don't
24479         start copying.
24480
24481         common: More accurately name function.
24482         + commit 903466e124841cb29f518afa6b7706d490737ac3
24483         * common/iobuf.c (iobuf_set_partial_block_mode): Rename from this...
24484         (iobuf_set_partial_body_length_mode): ... to this.  Update callers.
24485
24486 2016-02-23  Werner Koch  <wk@gnupg.org>
24487
24488         g13: Add commands --suspend and --remove.
24489         + commit f7968db30b0e0ccae038e354568accb0a05d877c
24490         * g13/g13.c (aSuspend, aResume): New.
24491         (opts): Add commands --suspend and --resume.
24492         (main): Implement dummy command aUmount.  Implement commands aResume
24493         and aSuspend.
24494         * g13/sh-cmd.c (cmd_suspend): New.
24495         (cmd_resume): New.
24496         (register_commands): Add commands RESUME and SUSPEND.
24497         * g13/server.c (cmd_suspend): New.
24498         (cmd_resume): New.
24499         (register_commands): Add commands RESUME and SUSPEND.
24500         * g13/be-dmcrypt.c (be_dmcrypt_suspend_container): New.
24501         (be_dmcrypt_resume_container): New.
24502         * g13/backend.c (be_suspend_container): New.
24503         (be_resume_container): New.
24504         * g13/suspend.c, g13/suspend.h: New.
24505         * g13/mount.c (parse_header, read_keyblob_prefix, read_keyblob)
24506         (decrypt_keyblob, g13_is_container): Move to ...
24507         * g13/keyblob.c: new file.
24508         (keyblob_read): Rename to g13_keyblob_read and make global.
24509         (keyblob_decrypt): Rename to g13_keyblob_decrypt and make global.
24510         * g13/sh-dmcrypt.c (check_blockdev): Add arg expect_busy.
24511         (sh_dmcrypt_suspend_container): New.
24512         (sh_dmcrypt_resume_container): New.
24513         * g13/call-syshelp.c (call_syshelp_run_suspend): New.
24514         (call_syshelp_run_resume): New.
24515
24516         g13: Run mount after dmsetup.
24517         + commit f26867928c451443769fecc41c3283e077e8c49f
24518         * g13/g13-syshelp.c (main): Reject userids with a slash.
24519         * g13/sh-dmcrypt.c (sh_dmcrypt_mount_container): Run mount if a
24520         mountpoint is known.
24521
24522 2016-02-23  Justus Winter  <justus@g10code.com>
24523
24524         tests/openpgp: Qualify executables with extension.
24525         + commit ede0061febe5b2edde6a1a79d599e3c7c0faed5a
24526         * tests/openpgp/Makefile.am (required_pgms): Qualify executables with
24527         '$EXEEXT'.
24528
24529         tests/openpgp: Reimplement 'pinentry.sh' in c.
24530         + commit 01dcc2cf2f2f00235ffa7d0718ecb468370980cc
24531         * tests/openpgp/Makefile.am: Build new program.
24532         * tests/openpgp/defs.inc: Use the new program.
24533         * tests/openpgp/fake-pinentry.c: New file.
24534
24535         tests/openpgp: Avoid dependency on source files.
24536         + commit 785a7f463ec4e937304ce1263c5e6a46e8079137
24537         * tests/openpgp/plain-largeo.asc: New file.
24538         * tests/openpgp/version.test: Dearmor the new file instead of relying
24539         on the source being present.
24540
24541         tests/openpgp: Fix file removal.
24542         + commit 629284120ff359b98a178b6cddf0e005e5f4db1a
24543         * tests/openpgp/version.test: Fix file removal.
24544
24545         common/exechelp: Provide a way to wait for multiple processes.
24546         + commit 5ba4f6047b84e4cfdb3e6bc88e574ca7a455da81
24547         * common/exechelp-posix.c (gnupg_wait_process): Generalize to
24548         'gnupg_wait_processes'.
24549         * common/exechelp-w32.c (gnupg_wait_process): Likewise.
24550         * common/exechelp-w32ce.c (gnupg_wait_process): New function stub.
24551         * common/exechelp.h (gnupg_wait_process): New prototype.
24552
24553         common/exechelp: Add general pipe function.
24554         + commit 9f4a8d4ea173b4b4cb4d4f06b4004d43e2f4b97a
24555         * common/exechelp-posix.c (gnupg_create_pipe): New function.
24556         * common/exechelp-w32.c (INHERIT_{READ,WRITE,BOTH}): New macros.
24557         (create_inheritable_pipe): Generalize so that both ends can be
24558         inherited.
24559         (do_create_pipe): Rename argument accordingly.
24560         (gnupg_create_{in,out}bound_pipe): Use new flags.
24561         (gnupg_create_pipe): New function.
24562         (gnupg_spawn_process): Use new flags.
24563         * common/exechelp-w32ce.c (gnupg_create_pipe): New stub.
24564         * common/exechelp.h (gnupg_create_pipe): New prototype.
24565
24566         common/exechelp: Mute the Windows version.
24567         + commit 54acc87c1e0b100accbfd02cfce59a897f2f0ce1
24568         * common/exechelp-w32.c (gnupg_wait_process): Do not print an error if
24569         the exit code can be returned.  This makes the Windows version behave
24570         like the POSIX version.
24571
24572         common/exechelp: Avoid magic numbers.
24573         + commit 709e2a7e9a3197e8ded4be0b05c138e8d5adbca6
24574         * common/exechelp-w32.c (do_create_pipe): Use symbolic names.
24575
24576         common/exechelp: Disable debugging by default.
24577         + commit 5d8f7b16c8490d6951772fa98c1f075a952cc571
24578         * common/exechelp-w32.c (DEBUG_W32_SPAWN): Set to 0.
24579
24580         common/exechelp: Fix handle leak.
24581         + commit dd670366d7aedb07e9420d1f8575197acfae1914
24582         * common/exechelp-w32.c (gnupg_spawn_process_detached): Close process
24583         handle.
24584
24585         common/exechelp: Fix opening the 'nul' device.
24586         + commit 8857590006266da200427f2d4f9e8c27fbc89ed9
24587         * common/exechelp-w32.c (gnupg_spawn_process): Fix opening the 'nul'
24588         device.
24589
24590         common/exechelp: Fix error handling.
24591         + commit f5a4b6a3a39a2b78d33769184d6133d5e256e02c
24592         * common/exechelp-w32.c (gnupg_spawn_process): Close the right handle.
24593
24594         common/exechelp: Fix pipe creation.
24595         + commit b0125ae9850973b89010517b1dbce04125a51d51
24596         * common/exechelp-w32.c (gnupg_spawn_process): Fix the creation of the
24597         input pipe.
24598
24599         tools/mk-tdata: Fix data generation on Windows.
24600         + commit 661ba477e01b796db161fa612b46c353393c6b10
24601         * tools/mk-tdata.c (main): Set stdout to binary mode to avoid newline
24602         conversion.
24603
24604 2016-02-19  Neal H. Walfield  <neal@g10code.com>
24605
24606         gpg: Systematically detect and fix signatures that are out of order.
24607         + commit 2d1d795481bc011447284f8ce0a3ae96a08daf17
24608         * g10/keyedit.c (sig_comparison): New function.
24609         (fix_key_signature_order): Merge functionality into...
24610         (check_all_keysigs): ... this function.  Rewrite to eliminate
24611         duplicates and use a systematic approach to detecting and moving
24612         signatures that are out of order instead of a heuristic.
24613         (fix_keyblock): Don't call fix_key_signature_order.  Call
24614         check_all_keysigs instead after collapsing the uids.
24615
24616         gpg: Split check_key_signature2.
24617         + commit 44cdb9d73f1a0b7d2c8483a119b9c4d6caabc1ec
24618         * g10/sig-check.c (hash_uid_node): Rename from this...
24619         (hash_uid_packet): ... to this.  Take a PKT_user_id instead of a
24620         KBNODE.
24621         (check_key_signature2): Split the basic signature checking
24622         functionality into...
24623         (check_signature_over_key_or_uid): ... this new function.
24624
24625         gpg: Split print_and_check_one_sig.
24626         + commit 5fbd80579aea0f75ca1d2700515c5b8747a75c7d
24627         * g10/keyedit.c (print_and_check_one_sig): Split the print
24628         functionality into...
24629         (print_one_sig): ... this new function.
24630
24631         gpg: Split the function check_signature_end.
24632         + commit ac5aea95455372145f3f06df2b4c1584d759d660
24633         * g10/sig-check.c (check_signature_end): Break the basic signature
24634         check into...
24635         (check_signature_end_simple): ... this new function.
24636
24637         gpg: Use format_keyid rather than manually formatting the keyid.
24638         + commit 10671c3a4c18ea26035a5819a9f2b8fd6c7e41ea
24639         * g10/keyedit.c (menu_addrevoker): Use format_keyid rather than
24640         manually formatting the keyid.
24641         * g10/keygen.c (card_write_key_to_backup_file): Likewise.
24642
24643         gpg: Initialize the primary key when generating a key.
24644         + commit bf9d1248c80205795e26156f67aff0b3f796cfce
24645         * g10/keygen.c (do_generate_keypair): Initialize
24646         pri_psk->flags.primary, pri_psk->keyid and pri_psk->main_keyid.
24647
24648         gpg: Add accessor & utility functions for pk->keyid and pk->main_keyid.
24649         + commit c45633a571bf663bc7f3610fc481acded6acfc19
24650         * g10/keydb.h (keyid_cmp): New function.
24651         * g10/keyid.c (pk_keyid): New function.
24652         (pk_main_keyid): New function.
24653         (keyid_copy): New function.
24654         (pk_keyid_str): New function.
24655         * g10/packet.h (PKT_public_key): Update comments for main_keyid and
24656         keyid.
24657
24658 2016-02-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
24659
24660         gpgparsemail: Allow weirdly-mixed pkcs7 signatures.
24661         + commit 7e7f35a2d7d40267a4dd30791df77420efeebfa7
24662         * tools/gpgparsemail.c: Add and check info->signing_protocol_2.
24663
24664         gpg: Clean up dangling agent_open and agent_closed declarations.
24665         + commit 813df2fe6656e55bea4d0be07cc964a140218412
24666         * g10/keydb.h: Remove agent_open, agent_close declarations/
24667         * g10/migrate.c: #include <unistd.h> for access()
24668
24669 2016-02-16  Werner Koch  <wk@gnupg.org>
24670
24671         w32: Make scdaemon build again due to libusb problem.
24672         + commit e1ceff16765b0342531709cf97d03ef0158c29d5
24673         * configure.ac: Add hack to disable libusb for Windows.  Also use
24674         $host instead of $target in the switch
24675          --
24676
24677         The new test for libusb does not support cross-compiling.  As a quick
24678         workaround we disable libusb for Windows because we can't use it anyway.
24679
24680         w32: Do not error out if gpgconf is not installed.
24681         + commit 44b02e1beb4f38f26551d932827d5317fddd27c2
24682         * common/homedir.c (check_portable_app): Remove error message.
24683
24684 2016-02-16  Neal H. Walfield  <neal@g10code.com>
24685
24686         gpg: Make ASCII armor decoding more robust to encoding errors.
24687         + commit 2f02ed75a9671a7aae36968d5a1618f71b491325
24688         * g10/armor.c (radix64_read): If the = is followed by the string "3D",
24689         check if the following four characters are valid radix 64 and are
24690         followed by a new line.  If so, warn and ignore the '3D'.
24691
24692 2016-02-16  Werner Koch  <wk@gnupg.org>
24693
24694         doc: Add a gnupg-module-overview picture.
24695         + commit a1c11283af759c1045a8bb75815db325f415ded4
24696         * doc/gnupg-module-overview.svg: New.
24697         * doc/debugging.texi (Component interaction): New.
24698         * doc/Makefile.am (EXTRA_DIST): Add PNG and PDF versions of
24699         gnupg-module-overview.svg.  Remove two eps files.
24700         (BUILT_SOURCES): Add gnupg-module-overview.pdf and .png.  Remove
24701         gnupg-card-architecture.epsl
24702         (gnupg_TEXINFOS): Add gnupg-module-overview.svg
24703         (gnupg.dvi): New.
24704         (DISTCLEANFILES): Remove build eps files.
24705
24706 2016-02-15  NIIBE Yutaka  <gniibe@fsij.org>
24707
24708         common, g10: Fix indentation to silence GCC-6.
24709         + commit ea9cfcfbf76de232221f31787c53d5f46361a9f0
24710         * common/iobuf.c (iobuf_ioctl): Fix.
24711         * g10/encrypt.c (encrypt_filter): Likewise.
24712         * g10/keyring.c (prepare_search): Likewise.
24713
24714         dirmngr: fix for memory alignment.
24715         + commit 6fbe12a51e8fe2649ffe5a8a02aa93026a8f02cd
24716         * dirmngr/dns-stuff.c (get_dns_cert): Cast through void *.
24717         (getsrv, get_dns_cname): Make sure it's aligned for HEADER.
24718
24719 2016-02-14  Werner Koch  <wk@gnupg.org>
24720
24721         gpg: Add hidden key-edit subcommand "change-usage".
24722         + commit 9b28b82e7c40d1eacc446d5932cd613c56378ed8
24723         * g10/keyedit.c (cmdCHANGEUSAGE): New.
24724         (cmds): Add command "change-usage".
24725         (keyedit_menu): Handle that command.
24726         (menu_changeusage): New.
24727         * g10/keygen.c (keygen_add_key_flags): New.
24728         (ask_key_flags): Add optional arg current.
24729
24730 2016-02-14  Neal H. Walfield  <neal@g10code.com>
24731
24732         gpg: Improve API documentation.
24733         + commit 9663b088480cef6734a3c5892d5ddbbd60ecc1a4
24734         * g10/seskey.c (make_session_key): Improve documentation.
24735         (encode_session_key): Improve documentation.
24736         * g10/encrypt.c (encrypt_seskey): Remove gratuitous initialization.
24737         * g10/dek.h (DEK): Improve documenation.
24738
24739         gpg: Fix calc_header_length when LEN is 0 and improve documentation.
24740         + commit 5cdde08ea869ef02111f618ad782d392a296eb7f
24741         * g10/build-packet.c (calc_header_length): Return the correct haeder
24742         size when LEN is 0.  Fix documentation.
24743
24744         gpg: Fix format_keyid when dynamically allocating the buffer.
24745         + commit c0268c449d0f3d23be5ec7b92fe92e7e078166cf
24746         * g10/keyid.c (format_keyid): Return a char *, not a const char *.  If
24747         BUFFER is NULL, then set LEN to the static buffer's size.
24748
24749         common: Fix comment.
24750         + commit ad43dc6cfc2b610a4e34fe55811bd937f9c3238b
24751         * common/iobuf.c (iobuf_flush_temp): Fix comment.
24752
24753 2016-02-13  Werner Koch  <wk@gnupg.org>
24754
24755         g13: Require a confirmation before g13 is used for DM-Crypt.
24756         + commit 86f3bb144ad75461eb9b7ac1e59046ac75efccac
24757         * g13/g13-syshelp.c (g13_syshelp_i_know_what_i_am_doing):
24758         * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Call it.
24759         (sh_dmcrypt_mount_container): Call it.
24760
24761         g13: Second chunk of code to support dm-crypt.
24762         + commit b0e6ab1109d05fc664f46e17d721fe9b01d38115
24763         * g13/be-dmcrypt.c, g13/be-dmcrypt.h: New.
24764         * g13/Makefile.am (g13_SOURCES): Add them.
24765         * g13/backend.c: Include be-dmcrypt.h and call-syshelp.h.
24766         (no_such_backend): Rename to _no_such_backend and provide replacement
24767         macro.
24768         (be_is_supported_conttype): Support DM-Crypt.
24769         (be_take_lock_for_create): Call set_segvice for DM-Crypt.
24770         (be_create_new_keys): Make it a dummy for DM-Crypt.
24771         (be_create_container): Call be_dmcrypt_create_container.
24772         (be_mount_container): call be_dmcrypt_mount_container.
24773         * g13/g13-syshelp.c (main): Enable verbose mode.
24774         * g13/g13tuple.c (get_tupledesc_data): New.
24775         * g13/g13tuple.h (unref_tupledesc): New.
24776         * g13/g13.h (server_control_): Add field "recipients".
24777         * g13/g13.c (main): Fix setting of recipients via cmdline.
24778         (g13_deinit_default_ctrl): Release recipients list.
24779         (g13_request_shutdown): New.  Replace all direct update of
24780         shutdown_pending by calls this function.
24781         * g13/server.c (server_local_s): Remove field recipients which is now
24782         part of CTRL.
24783         (reset_notify, cmd_recipient, cmd_create): Adjust for this change.
24784         * g13/create.c (encrypt_keyblob): Rename to g13_encrypt_keyblob.
24785         (g13_create_container): Support DM-Crypt.
24786         * g13/mount.c (parse_header): Allow for meta data copies.
24787         (g13_mount_container): Support DM-Crypt.
24788         * g13/sh-cmd.c (cmd_create): Make it work.
24789         (cmd_mount): New.
24790         * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Make it work.
24791         (sh_dmcrypt_mount_container): New.
24792
24793         g13: Improve dump_keyblob.
24794         + commit 13f745b50dc7031755faadb2d3476a6b6aafc739
24795         * g13/g13tuple.c: Include keyblob.h.
24796         (find_tuple_uint): Factor code out to ...
24797         (convert_uint): new.
24798         (all_printable): New.
24799         * g13/mount.c (dump_keyblob: Move and rename to ...
24800         * g13/g13tuple.c (dump_tupledesc): here.  Revamp and pretyy print uint
24801         values.
24802
24803         g13: Define 3 new tags.
24804         + commit 59fc3507d18072833559f227ecab8aa00cad9466
24805         * g13/keyblob.h (KEYBLOB_TAG_CONT_NSEC): New.
24806         (KEYBLOB_TAG_ENC_NSEC): New.
24807         (KEYBLOB_TAG_ENC_OFF): New.
24808
24809         g13: Rename utils.c to g13tuple.c.
24810         + commit 82d12156ef5f948d44934ed44d79d24cc9e94366
24811         * g13/utils.c: Rename to g13tuple.c.
24812         * g13/utils.h: Rename to g13tuple.h.  Change all users.
24813         * g13/Makefile.am: Adjust accordingly
24814
24815         g13: Add functions to handle uint in a keyblob.
24816         + commit 4f152f3276b6d40d2568a27e74903dd18b41d752
24817         * g13/utils.c (append_tuple_uint): New.
24818         (find_tuple_uint): New.
24819         * g13/t-utils.c: New.
24820         * g13/Makefile.am (noinst_PROGRAMS, TESTS): New.
24821         (module_tests, t_common_ldadd): New.
24822         (t_utils_SOURCES, t_utils_LDADD): New.
24823
24824         g13: Re-factor high level create code.
24825         + commit dc1dbc43a6bfb2f3e6a1cc2ca089e0318b3af0ed
24826         * g13/create.c (g13_create_container): Factor some code out to ...
24827         * g13/backend.c (be_take_lock_for_create): new.
24828
24829         g13: Return an error for non-existing device.
24830         + commit 3087197008d2b12bf9f0d7d1f2aca500db816e7c
24831         * g13/sh-cmd.c (cmd_device): Set ERR.
24832
24833         g13: Fix releasing of a syshelp context.
24834         + commit 6390beca54f55e8d36ff767b99ae9ff68b15f10e
24835         * g13/call-syshelp.c (call_syshelp_release): Allow a NULL arg.
24836
24837         g13: Switch over to common/exectool.c.
24838         + commit c5d7045dafcfb569c11c90c04ea7a75328c80084
24839         * g13/sh-exectool.c: Remove.  It has been replaced by common/exectool.c.
24840         * g13/Makefile.am (g13_syshelp_SOURCES): Remove sh-exectool.c
24841         * g13/sh-blockdev.c: Include exectool.h.  Change sh_exec_tool to
24842         gnupg_exec-tool.
24843         * g13/sh-dmcrypt.c: Ditto.
24844
24845         common: Make gnupg_exec_tool conform to spec.
24846         + commit d19d6e1856c9a1acbf48e8b2e39b3d9171aa9f7f
24847         * common/exectool.c (gnupg_exec_tool): Allocate extra byte.  Allow
24848         zero length read.  Append hidden byte.  Release memory on error.
24849
24850         g13: First chunk of code to support dm-crypt.
24851         + commit 81494fd30d3815502247a721f50d9eadf86a73fa
24852         * g13/call-syshelp.c, g13/call-syshelp.h: New.
24853         * g13/g13-syshelp.c, g13/g13-syshelp.h: New.
24854         * g13/sh-cmd.c: New.
24855         * g13/sh-blockdev.c: New.
24856         * g13/sh-exectool.c: New.
24857         * g13/sh-dmcrypt.c: New.
24858         * g13/Makefile.am (sbin_PROGRAMS): Add g13-syshelp.c
24859         (g13_syshelp_SOURCES): New.
24860         (g13_syshelp_LDADD): New.
24861
24862         * g13/g13.c (opts): Add option --type.
24863         (g13_deinit_default_ctrl): New.
24864         (main): Implement that option.  Call g13_deinit_default_ctrl.
24865         * g13/g13.h (struct call_syshelp_s): New declaration.
24866         (server_control_s): Add field syshelp_local.
24867         * g13/keyblob.h (KEYBLOB_TAG_CREATED): New.
24868         (KEYBLOB_TAG_ALGOSTR): New.
24869         (KEYBLOB_TAG_HDRCOPY): New.
24870         * g13/backend.c (be_parse_conttype_name): New.
24871         (be_get_detached_name): Add CONTTYPE_DM_CRYPT.
24872
24873         tests: Remove some harmless warnings in regression tests.
24874         + commit d711f5c7697cd4bc5dc6d9fd01706cabc771dad2
24875         * tests/openpgp/gpg-agent.conf.tmpl: Remove --use-standard-socket.
24876
24877 2016-02-12  Neal H. Walfield  <neal@g10code.com>
24878
24879         common: Change simple_query to ignore status messages.
24880         + commit acac103ba5772ae738ce5409d17feab80596cde6
24881         * common/simple-pwquery.c (simple_query): Ignore status messages.
24882
24883 2016-02-12  NIIBE Yutaka  <gniibe@fsij.org>
24884
24885         g10: Make sure to have the directory for trustdb.
24886         + commit d9f9b3be036747c9f55060aed47896f951bfb853
24887         * g10/tdbio.c (tdbio_set_dbname): Return earlier if !CREATE.  Check
24888         the directory and create it if none before calling take_write_lock.
24889
24890 2016-02-02  Neal H. Walfield  <neal@g10code.com>
24891
24892         doc: Note that rngd can also be used to quickly generate insecure keys.
24893         + commit 75311cfe18071b94c66121a9785b133b6df345a3
24894         * doc/gpg-agent.texi (Agent Options): Add comment to the description
24895         of --debug-quick-random that rngd can also be used to quickly generate
24896         key.
24897
24898 2016-01-27  Werner Koch  <wk@gnupg.org>
24899
24900         scd: Fix size_t/int mismatch in libusb.
24901         + commit 3d952a2fe5da9d84c20d3debdcc1e425b08781c6
24902         * scd/ccid-driver.c (bulk_in, abort_cmd, ccid_poll): Change msglen to
24903         int.
24904
24905         scd: Fix detection of libusb.
24906         + commit 1b90b52a56b4f808ad29a7ef79aeafc03c7424b4
24907         * configure.ac (HAVE_LIBUSB): Clear if no header file was found.
24908         (LIBUSB_LIBS): Ditto.
24909
24910         dirmngr: Build fix for FreeBSD (EAI macros)
24911         + commit 4d67144142f04184b835e50314eb21b882b9e00a
24912         * dirmngr/dns-stuff.c (map_eai_to_gpg_error): Map EAI_NODATA and
24913         EAI_ADDRFAMILY only if defined.
24914
24915 2016-01-27  NIIBE Yutaka  <gniibe@fsij.org>
24916
24917         scd: Migrate to new API of libusb 1.0.
24918         + commit d0d97089706286fafd3c8ff56f3b5bf7ac07c6e0
24919         * configure.ac (LIBUSB_CPPFLAGS): New.
24920         * scd/Makefile.am (AM_CPPFLAGS): Add LIBUSB_CPPFLAGS.
24921         * scd/ccid-driver.c: Use libusb 1.0 API.
24922
24923 2016-01-26  Werner Koch  <wk@gnupg.org>
24924
24925         Release 2.1.11.
24926         + commit e9e5e83ec14459c2fc9060c54fc8e7381b541acd
24927
24928
24929 2016-01-26  Andre Heinecke  <aheinecke@intevation.de>
24930
24931         gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32.
24932         + commit 3e50236d4ecc3601b2641bf4273a0ff64bb5fdc4
24933         * common/utf8conv.c (wchar_to_utf8): Factor code out to ...
24934         (wchar_to_cp): new.
24935         (utf8_to_wchar): Factor code out to ...
24936         (cp_to_wchar): new.
24937         (wchar_to_native): New.
24938         (native_to_wchar): New.
24939         * tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar.
24940         (scan_directory): Use wchar_to_native.
24941
24942 2016-01-26  NIIBE Yutaka  <gniibe@fsij.org>
24943
24944         g10: Fix segfault on unsupported curve.
24945         + commit b8bb16c6c08d3c2947f1ff67419b36eb203c5c1a
24946         * g10/call-agent.c (learn_status_cb): Don't use NULL for strcmp.
24947
24948         sm: small fix for GCC 6.
24949         + commit d33a34004bef028068538f099c32a0e292a004c3
24950         * sm/export.c (insert_duptable): Use unsigned 0.
24951
24952 2016-01-25  Werner Koch  <wk@gnupg.org>
24953             Daiki Ueno  <ueno@gnu.org>
24954
24955         gpg: Print PROGRESS status lines during key generation.
24956         + commit fbe1cf67aadc5a33cf815ddbcfc9669e43caa123
24957         * g10/call-agent.c (cache_nonce_status_cb): Rewrite by using
24958         has_leading_keyword.  Handle PROGRESS lines.
24959
24960 2016-01-25  Werner Koch  <wk@gnupg.org>
24961
24962         agent: Send PROGRESS status lines to the client.
24963         + commit ee87c653bf4b495714e8e6b024d0a8ace3a33452
24964         * agent/gpg-agent.c (struct progress_dispatch_s): New.
24965         (progress_dispatch_list): New.
24966         (main): Register libgcrypt pogress handler.
24967         (agent_libgcrypt_progress_cb): New.
24968         (agent_set_progress_cb): New.
24969         (unregister_progress_cb): New.
24970         (agent_deinit_default_ctrl): Call unregister.
24971         * agent/command.c (progress_cb): New.
24972         (start_command_handler): Register progress callback.
24973
24974         speedo: Allow use of SHA-256 checksums.
24975         + commit 039a55716b8abd22ce23a96dce34cf2dc4be1862
24976         * build-aux/getswdb.sh: Add option --find-sha256sum.
24977         * build-aux/speedo.mk (libgpg_error_sha2): New var.  Also for all
24978         other packages.
24979         (SHA2SUM): New.
24980         (SETVARS, SETVARS_W64): Prefer sha256sum over sha1sum.
24981         (installer-from-source): Create swdb fragment.
24982
24983 2016-01-22  Werner Koch  <wk@gnupg.org>
24984
24985         dirmngr: Indicate that serial numbers are hexadecimal.
24986         + commit 12c665b36cdc4b7189549698fc4cc1b3523b18f5
24987         * dirmngr/misc.c (hexify_data): Add arg with_prefix.  Adjust all
24988         callers.
24989         * dirmngr/crlcache.c (cache_isvalid): Print "0x" in front of the S/N.
24990
24991         dirmngr: Provide the keyserver pool name even if there is no CNAME.
24992         + commit 77bceb2902dd489443073d91836ea54376c60bf6
24993         * dirmngr/ks-engine-hkp.c (map_host): Fix setting of r_poolname.
24994
24995 2016-01-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
24996             wk@gnupg.org
24997
24998         dirmngr: Use sks-keyservers CA by default for the hkps pool.
24999         + commit afb8696126ff0babaab23e884ff5da008281e3b7
25000         * dirmngr/Makefile.am (dist_pkgdata_DATA): Add sks-keyservers.netCA.pem.
25001         * dirmngr/http.c (http_session_new): Add optional arg
25002         intended_hostname and set a default cert.
25003         * dirmngr/ks-engine-hkp.c (send_request): Pass httphost to
25004         http_session_new.
25005
25006 2016-01-22  Werner Koch  <wk@gnupg.org>
25007
25008         gpg: Allow new user ids with only the mail address.
25009         + commit fc0c71dfe5ea8f1c683101948c23f5d2064ee4cd
25010         * g10/keygen.c (ask_user_id): Allow empty name.
25011
25012 2016-01-21  Werner Koch  <wk@gnupg.org>
25013
25014         gpg: Improve header text of the auto-created revocations.
25015         + commit bb99b40bd1e624f58ca806ca16dc73d4d594a30a
25016         * g10/revoke.c (gen_standard_revoke): Improve header text for the
25017         file.  Add info output.
25018
25019         gpg: Make --auto-key-retrieve work with dirmngr configured server.
25020         + commit 09117e769a093467cb47154f36d7dda613313e33
25021         * g10/call-dirmngr.c (gpg_dirmngr_ks_list): Make R_KEYSERVER optional.
25022         * g10/keyserver.c (keyserver_any_configured): New.
25023         (keyserver_put): Remove arg keyserver because this will always receive
25024         opt.keyserver which is anyway used when connecting dirmngr.  Do not
25025         check opt.keyserver.
25026         (keyserver_import_cert): Replace opt.keyserver by
25027         keyserver_any_configured.
25028         * g10/mainproc.c (check_sig_and_print): Ditto.
25029         * g10/import.c (revocation_present): Ditto.
25030         * g10/getkey.c (get_pubkey_byname): Ditto.
25031         * g10/gpgv.c (keyserver_any_configured): Add stub.
25032         * g10/test-stubs.c (keyserver_any_configured): Add stub.
25033
25034 2016-01-20  Werner Koch  <wk@gnupg.org>
25035
25036         gpg: Silence message about ignoring revoked user ids.
25037         + commit bdb61351776c038d668310d9b5e5c32588ef6519
25038         * g10/trustdb.c (tdb_get_validity_core): Print message only in debug
25039         mode.
25040
25041         agent: New option --pinentry-timeout.
25042         + commit 499743387f4d07847a2842358bc54f9237e0c2a7
25043         * agent/gpg-agent.c (oPinentryTimeout): New.
25044         (opts): Add new option.
25045         (parse_rereadable_options): PArse that option.
25046         (main): Tell gpgconf about this option.
25047         * agent/call-pinentry.c (start_pinentry): Send option to Pinentry.
25048         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add Option.
25049
25050 2016-01-19  Werner Koch  <wk@gnupg.org>
25051
25052         gpg: Streamline use of error messages in tofu.c.
25053         + commit cfa41890bb5ff306c07dad295136601fe47566a7
25054         * g10/tofu.c: Make use of print_further_info to reduce the number of
25055         different error messages to be translated.  Also streamline some
25056         messages.
25057
25058         common: Add substitute code for libgpg-error < 1.22.
25059         + commit 8b7f64f9dfc80b2a0ad235996b47369c2ba9b48f
25060         * common/util.h (GPG_ERR_DB_CORRUPTED): New.
25061
25062         gpg: Add function print_further_info.
25063         + commit d96e76d15f61812b950b64a60bc47117785a9dac
25064         * g10/misc.c (print_further_info): New.
25065
25066 2016-01-18  Werner Koch  <wk@gnupg.org>
25067
25068         g10: Improve strings printed by tofu.c.
25069         + commit 79778a8dd5f61a6b7abeeb44b75d82932db788b7
25070         * g10/tofu.c: Include ttyio.h.  Change many strings to help
25071         translating.  Make use of ngettext wehere needed.
25072         (CONTROL_L): New.
25073         (TIME_AGO_UNIT_SMALL_NAME): Remove this and all similar *_NAME macros.
25074         (time_ago_unit): Remove.
25075         (get_trust): Use tty_prints and cpr_get only for the actual prompt.
25076         Add Ctrl-L hack.
25077         (show_statistics): Use two English strings for singular and plural.
25078
25079         * po/POTFILES.in: Add tofu.c.
25080
25081         gpg: Use "days" in "...newer than..." diagnostics.
25082         + commit 9309bda9581715d304305c8c5116f2cbb31aec77
25083         * g10/sig-check.c (check_signature_metadata_validity): Use days if
25084         useful.
25085
25086         Use ngettext for some strings.
25087         + commit 437965e5622612941ed0fa55584811c65069242e
25088         * scd/app-openpgp.c (build_enter_admin_pin_prompt): Use ngettext for
25089         some diagnostics.
25090         (do_genkey): Ditto.
25091         * g10/keyedit.c (check_all_keysigs, menu_delsig, menu_clean): Ditto.
25092         * g10/keylist.c (print_signature_stats): Ditto.
25093         * g10/keyserver.c (keyserver_refresh): Ditto.
25094         * g10/sig-check.c (check_signature_metadata_validity): Ditto.
25095         * g10/sign.c (do_sign): Ditto.
25096         * g10/trustdb.c (reset_trust_records): Ditto.
25097         (validate_keys): Use a table like diagnostic output.
25098
25099 2016-01-15  Werner Koch  <wk@gnupg.org>
25100
25101         kbx,w32: Use shorter retry intervals for keybox_file_rename.
25102         + commit 3cccd5a83b96e4558642dcdf5d974f64ebdb9817
25103         * kbx/keybox-util.c (keybox_file_rename): Restart retry intervals
25104         after 800ms.
25105
25106 2016-01-14  Werner Koch  <wk@gnupg.org>
25107
25108         w32: Fix deadlock introduced by keybox_file_rename.
25109         + commit 663c5d129a8f400cc6eb8ab7b91772d6e578152d
25110         * g10/keyring.c (keyring_lock) [W32]: Flush the close cache before
25111         locking.
25112         * kbx/keybox-init.c (keybox_lock) [W32]: Close the file before
25113         locking.
25114
25115         gpg: Detect race between pubring.gpg and pubring.kbx use.
25116         + commit 3b1248e007a6bf830a3230ee2d9cc548205ec31a
25117         * g10/keydb.c (maybe_create_keyring_or_box): Detect race condition.
25118
25119         kbx: New function keybox_file_rename to replace rename.
25120         + commit 8241ed59d05e06252647b26477ed5c2f84895a26
25121         * kbx/keybox-util.c: Include windows.h.
25122         (keybox_file_rename): New.
25123         * kbx/keybox-update.c (rename_tmp_file): Replace remove+rename by
25124         keybox_file_rename.
25125         * g10/keyring.c (rename_tmp_file): Ditto.
25126
25127         kbx: Add function keybox_tmp_names to avoid code duplication.
25128         + commit f5cceef115f0307664956d01c48b1b397fdad4b3
25129         * kbx/keybox-update.c (create_tmp_file): Move some code to...
25130         * kbx/keybox-util.c (keybox_tmp_names): new.
25131         * g10/keyring.c: Include keybox.h.
25132         (create_tmp_file): Replace parts by keybox_tmp_names.
25133
25134         gpg: Make --list-options show-usage the default.
25135         + commit 360534bde770f4845669de223154216d249b954b
25136         * g10/gpg.c (main): Add LIST_SHOW_USAGE.
25137
25138 2016-01-13  Werner Koch  <wk@gnupg.org>
25139
25140         kbx: Change return type of search functions to gpg_error_t.
25141         + commit c7ca0f73dbe7c080b79f93f90f00ba2396fc4bd0
25142         * kbx/keybox-search.c (keybox_search_reset): Change return type to
25143         gpg_error_t.
25144         (keybox_search): Ditto.  Also handle GPG_ERR_EOF.
25145         * sm/keydb.c (keydb_search_reset): Ditto.
25146
25147         gpg: Improve error code from lock_all.
25148         + commit 9b6c91469a804c60289a2ed21334dfd856c294bb
25149         * g10/keydb.c (lock_all): Do not clobber RC during failur cleanup.
25150
25151         kbx: Improve and fix keybox_lock.
25152         + commit 8f1368d5e3f7654ad9cb100053535f728dff2344
25153         * kbx/keybox-init.c (keybox_lock): Make sure ERR is initialized.  Get
25154         error codes from dotlock functions.
25155
25156         common: Make sure dotlock functions set a proper ERRNO.
25157         + commit 4aceebf36f103eb380e21d12a1f08b7d6ea7cc8e
25158         * common/dotlock.c (map_w32_to_errno): New.
25159         (read_lockfile): Return a proper ERRNO.
25160         (dotlock_create_unix): Do not let log functions clobber ERRNO.
25161         (dotlock_take_unix): Ditto.
25162         (dotlock_release_unix): Ditto.
25163         (dotlock_create_w32): Set proper ERRNO.
25164         (dotlock_take_w32): Ditto.
25165         (dotlock_release_w32): Ditto.
25166
25167         kbx: Implement keybox_lock for use by gpg.
25168         + commit 160862978628b07ed5150ec2c8abad6af1656bc3
25169         * kbx/keybox-defs.h: Include dotlock.h and logging.h.
25170         (CONST_KB_NAME): Remove.  Replace usage by KB_NAME.
25171         (struct keybox_name): Add field "lockhd".
25172         * kbx/keybox-init.c (keybox_register_file): Init LOCKHD.
25173         (keybox_lock): Chnage to return gpg_error_t.  Implement locking.
25174
25175         gpg: Make sure to mark a duplicate registered keybox as primary.
25176         + commit 9dc355ad3ae0026ab04c424dc984d748b8fad393
25177         * kbx/keybox-init.c (keybox_register_file): Change interface to return
25178         the token even if the file has already been registered.
25179         * g10/keydb.c (primary_keyring): Rename to primary_keydb.
25180         (maybe_create_keyring_or_box): Change return type to gpg_error_t.
25181         (keydb_add_resource): Ditto. s/rc/err/.
25182         (keydb_add_resource): Mark an already registered as primary.
25183         * sm/keydb.c (maybe_create_keybox): Change return type to gpg_error_t.
25184         (keydb_add_resource): Ditto. s/rc/err/.
25185         (keydb_add_resource): Adjust for changed keybox_register_file.
25186
25187 2016-01-13  NIIBE Yutaka  <gniibe@fsij.org>
25188
25189         Fix to support git worktree.
25190         + commit 96237b9a63a50aed1884cb06f84279b977d6a8fa
25191         * autogen.sh, Makefile.am, doc/Makefile.am: Use -e for testing .git.
25192
25193 2016-01-12  Werner Koch  <wk@gnupg.org>
25194
25195         ssh: Accept OpenSSH *cert-v01 key variants.
25196         + commit e2f984b4afffaa89bdeba2f5d447b5681237177e
25197         * agent/command-ssh.c (SPEC_FLAG_WITH_CERT): New.
25198         (ssh_key_types): Add OpenSSH cert types.
25199         (stream_read_string): Allow a dummy read.
25200         (ssh_receive_mpint_list): Pass SPEC by reference.
25201         (ssh_receive_mpint_list): New arg CERT and use it.
25202         (ssh_receive_key): Read certificate into an estream object and modify
25203         parser to make use of that object.
25204
25205 2016-01-12  NIIBE Yutaka  <gniibe@fsij.org>
25206
25207         common: Fix iobuf API of filter function for alignment.
25208         + commit 4b4639b0b04dc82c550fa711dd7193e13fc4a428
25209         * common/iobuf.h: Fix comment.
25210
25211         common: Fix iobuf API of filter function for alignment.
25212         + commit 3f52c7da3940ec06572270d511000dc7fe9c27d2
25213         * common/iobuf.h (IOBUFCTRL_DESC): Change the call semantics.
25214         * common/iobuf.c (iobuf_desc): Add the second argument DESC.
25215         (print_chain, iobuf_close, do_open, iobuf_sockopen, iobuf_ioctl)
25216         (iobuf_push_filter2, pop_filter, iobuf_write_temp): Change calls
25217         of iobuf_desc.
25218         (file_filter, file_es_filter, sock_filter, block_filter): Fill the
25219         description.
25220         * common/t-iobuf.c (every_other_filter, double_filter): Likewise.
25221         * g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c,
25222         g10/decrypt-data.c, g10/encrypt.c, g10/mdfilter.c, g10/progress.c,
25223         g10/textfilter.c: Likewise.
25224
25225 2016-01-11  Werner Koch  <wk@gnupg.org>
25226
25227         gpg: Fix NULL de-ref for ambiguous key check in --export-ssh-keys.
25228         + commit b280aa6423c9492e8c5a9afa57339d06d957996d
25229         * g10/getkey.c: Allow arg RET_KEYBLOCK to be NULL.
25230
25231 2016-01-09  Werner Koch  <wk@gnupg.org>
25232
25233         tools: Remove gpgkey2ssh.
25234         + commit eb9c021631174fde4c1c444bbc533a7a46d570cd
25235         * tools/gpgkey2ssh.c: Remove.
25236         * tools/Makefile.am (bin_PROGRAMS): Ditto.
25237
25238 2016-01-08  Werner Koch  <wk@gnupg.org>
25239
25240         gpg: Support ECDSA keys with --export-ssh-key.
25241         + commit b2da3951a395366bf1644bc4c4eb42d657effe17
25242         * g10/export.c (key_to_sshblob): Add hack for ECDSA.
25243
25244         gpg: New command --export-ssh-key.
25245         + commit 4970868d8d84d3a64b067e5aafc9f097621758d3
25246         * g10/export.c: Include membuf.h and host2net.h.
25247         (key_to_sshblob): New.
25248         (export_ssh_key): New.
25249         * g10/gpg.c (aExportSshKey): New.
25250         (opts): Add command.
25251         (main): Implement that command.
25252
25253         gpg: Add an exact search flag to the PK struct.
25254         + commit 34bca9cd4b8517795833cb754b0d5b1dd33b08ed
25255         * g10/getkey.c (merge_selfsigs_subkey): Clear exact flag.
25256         (finish_lookup): Set exact flag.
25257         * g10/packet.h (PKT_public_key): Add field flags.exact.
25258
25259         Print warnings if old daemon versions are used.
25260         + commit 2aa42baaf3dd7c3ae613ae0c61760a17c8adfcd0
25261         * common/status.h (STATUS_WARNING): New.
25262         * g10/call-agent.c (warn_version_mismatch): New.
25263         (start_agent): Call warn function.
25264         * g10/call-dirmngr.c: Include status.h.
25265         (warn_version_mismatch): New.
25266         (create_context): Call warn function.
25267         * sm/call-agent.c (warn_version_mismatch): New.
25268         (start_agent): Call warn function.
25269         (gpgsm_agent_learn): Call warn function.
25270         * sm/call-dirmngr.c (warn_version_mismatch): New.
25271         (prepare_dirmngr): Call warn function.
25272
25273         common: New function compare_version_strings.
25274         + commit 4d7ac43ff71fdadfd2e04621f74840a82fbe788a
25275         * common/stringhelp.c (parse_version_number): New.
25276         (parse_version_string): New.
25277         (compare_version_strings): New.
25278         * common/t-stringhelp.c (test_compare_version_strings): New.
25279         (main): Call test.  Return ERRCOUNT instead of 0.
25280
25281         common: New function get_assuan_server_version.
25282         + commit 496643291e1e346434e9c98405c5a370957eb7d3
25283         * common/asshelp.c: Include membuf.h.
25284         (get_assuan_server_version): New.
25285         * g10/call-agent.c (agent_get_version): Use new function.
25286
25287         common: New put_membuf_cb to replace static membuf_data_cb.
25288         + commit 833ba5faa1340aff80a205acbb701d4ae1d594d0
25289         * common/membuf.c (put_membuf_cb): New.
25290         * agent/call-scd.c (membuf_data_cb): Remove.  Change callers to use
25291         put_membuf_cb.
25292         * common/get-passphrase.c (membuf_data_cb): Ditto.
25293         * g10/call-agent.c (membuf_data_cb): Ditto.
25294         * sm/call-agent.c (membuf_data_cb): Ditto.
25295
25296 2016-01-07  Werner Koch  <wk@gnupg.org>
25297
25298         gpg: Return an error code from keygrip_from_pk.
25299         + commit 8fd406c317ad7c2e375ae4f7d20656dadf6d7fcc
25300         * g10/keyid.c (keygrip_from_pk): Return an error code.
25301
25302         gpg: Avoid warnings about possible NULL deref.
25303         + commit 8a56a38387c10c02ba0790c655dd5c1d08e4a724
25304         * g10/getkey.c (cache_public_key): Protect deref of CE which actually
25305         can't happen.
25306         * g10/keygen.c (quickgen_set_para): s/sprintf/snprintf/.
25307         * g10/tofu.c (end_transaction, rollback_transaction): Allow NULL for
25308         DB.
25309         * g10/trustdb.c (update_min_ownertrust): Remove useless clearling of
25310         ERR.
25311
25312         gpg: Fix warnings about useless assignments.
25313         + commit 008aa6e6d4b213c3a0d15509eb46cf168b6f2c94
25314         * g10/armor.c (parse_hash_header): Remove duplicate var assignment.
25315         * g10/getkey.c (cache_user_id): Ditto.
25316         * g10/keygen.c (ask_curve): Ditto.  This also fixes a small memory
25317         leak.
25318
25319         * g10/keygen.c (proc_parameter_file): Remove useless assignment or
25320         pointer increment.
25321         (generate_keypair): Ditto.
25322         * g10/getkey.c (finish_lookup, lookup): Ditto.
25323         * g10/card-util.c (change_pin): Ditto.
25324         * g10/gpg.c (main) <aVerify>: Ditto.
25325         * g10/import.c (import): Ditto.
25326         (print_import_check): Ditto
25327         * g10/keyring.c (do_copy): Ditto.
25328         * g10/tdbio.c (tdbio_read_record): Ditto.
25329         * g10/trustdb.c (tdb_update_ownertrust): Ditto.
25330         (update_validity): Ditto.
25331
25332         * g10/server.c (cmd_passwd): Remove useless call to skip_options.
25333
25334         sm: Avoid warnings about useless assignments.
25335         + commit 126aebbb82667d160c8c4435898efeb3b43c4ec8
25336         * sm/call-dirmngr.c (prepare_dirmngr): Remove setting of ERR.
25337         (unhexify_fpr): Remove useless computation on N.
25338         * sm/certchain.c (do_validate_chain): Remove clearing of RC.  Remove
25339         useless setting of RC.
25340         * sm/fingerprint.c (gpgsm_get_keygrip): Remove setting of RC.
25341         * sm/gpgsm.c (build_list): Replace final stpcpy by strcpy.
25342         * sm/keydb.c (keydb_clear_some_cert_flags): Remove clearing of RC.
25343         * sm/server.c (cmd_getauditlog): Comment unused skip_options.
25344
25345         kbx: Avoid warnings about useless assignments.
25346         + commit 0de7d61437bd0bfbe645d5eed7a62df03129fb32
25347         * kbx/keybox-dump.c (_keybox_dump_blob): Remove setting of IN_RANGE
25348         and the last increment of P.
25349
25350         gpg: Fix DNS cert lookup returning an URL.
25351         + commit a41638acf4808caa619f4f3f4c0dcd12be00d6f8
25352         * g10/call-dirmngr.c (dns_cert_status_cb): Store URL status in the URL
25353         param.  The old code was entirely buggy (c+p error).
25354
25355 2016-01-06  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
25356
25357         Fix keystrlen to work when OPT.KEYID_FORMAT is KF_DEFAULT.
25358         + commit 2c3e67430d9b523c85c81ae562223fd51e3608cc
25359         * g10/keyid.c (keystrlen): If opt.keyid_format is KF_DEFAULT unset,
25360         default to KF_SHORT.
25361         (format_keyid): Default to KF_SHORT, not KF_0xLONG.
25362
25363 2016-01-06  Werner Koch  <wk@gnupg.org>
25364
25365         gpg: Silence some regression tests.
25366         + commit c7389ae90fa4a70766400cc241ff6a45aa750324
25367         * g10/test.c (TEST): Print diagnostics only in verbose mode.
25368
25369         gpg: Avoid using an uninitialized SALT on premature EOF.
25370         + commit 85cc7449fb00ac85b0c2eecd22bd38b23f33edf5
25371         * g10/parse-packet.c (parse_key): Check for premature end of salt.
25372
25373         gpg: Silence warnings found by static analyzer.
25374         + commit 09accc0e3d74e6289bed40b5bfc6479981cabfe4
25375         * g10/keyedit.c (change_passphrase): Remove useless init of ANY.
25376         (keyedit_quick_adduid): Remove useless setting of ERR.
25377         * g10/parse-packet.c (parse_key): Remove PKTLEN from condition because
25378         it has been checked before the loop.
25379         (parse_plaintext): Remove useless init of PKTLEN.
25380
25381         kbx: Avoid faulty fclose in an error case.
25382         + commit db82b6131d437bf6ba34db0e08b7dfa9edb11e45
25383         * kbx/keybox-update.c (blob_filecopy): Do not close an uninitialized
25384         file pointer after a failure to create a temp file.
25385         * kbx/keybox-openpgp.c (next_packet): Remove duplicate assignment of
25386         PKTLEN.
25387
25388         dirmngr: Silence one regression test.
25389         + commit 6deafb92abe100ff67e3a0a230a39e8c0ad41900
25390         * dirmngr/t-dns-stuff.c (main): Do not print info during standard
25391         "make check".
25392
25393         common: Avoid warnings about useless assignments.
25394         + commit e64317c15e9960f3173d374e589f7c3565a4ad08
25395         * common/b64enc.c (b64enc_finish): Remove var assignment which is not
25396         used later.
25397         * common/iobuf.c (file_filter): Ditto.
25398         * common/tlv.c (do_find_tlv): Ditto.
25399         * common/userids.c (classify_user_id): Ditto.
25400
25401         tests: Use info and error instead of a plain echo.
25402         + commit 1fbfa1bf0a6ad0dc7ed67d12252643c2c6c7370a
25403         * tests/openpgp/4gb-packet.test: Use error and info.
25404
25405         common: Do not deref vars in tests after a fail().
25406         + commit 0a00115ee2049ab2357b7a14a51c7da185ffcabd
25407         * common/t-convert.c (test_bin2hex): Turn if conditions into if-else
25408         chains to avoid accessing unchecked data.
25409         (test_bin2hexcolon): Ditto.
25410         * common/t-mapstrings.c (test_map_static_macro_string): Ditto.
25411         * common/t-stringhelp.c (test_percent_escape): Ditto.
25412         (test_make_filename_try): Ditto.
25413         (test_make_absfilename_try): Ditto.
25414         * common/t-timestuff.c (test_timegm): Ditto.
25415
25416 2016-01-05  Werner Koch  <wk@gnupg.org>
25417
25418         gpg: Align notes about minimal keysize with actual checks.
25419         + commit e70f7a54f29d727def2cfe9ea5ab9d461b4ce842
25420         * g10/keygen.c (ask_keysize): Use 768 for the minimal value for DSA in
25421         export mode.  Improve readability.
25422
25423 2016-01-05  NIIBE Yutaka  <gniibe@fsij.org>
25424
25425         agent: Fix RSA verification for card.
25426         + commit ff3b607fc879b70665c187500022cc63e2a0cd86
25427         * agent/pksign.c (agent_pksign_do): Use S-exp of public key, instead
25428         of shadowed key.
25429
25430 2016-01-04  Neal H. Walfield  <neal@g10code.com>
25431
25432         gpg: Fix double free.
25433         + commit 575c15a090913d86cf8d75b2bc4471e371f234b9
25434         * g10/getkey.c (get_pubkeys): Fix double free.
25435
25436 2015-12-24  NIIBE Yutaka  <gniibe@fsij.org>
25437
25438         agent: IMPORT_KEY with --force option fix.
25439         + commit 79b51bb8727bd3485229ac8ff5987558156d5d83
25440         * agent/cvt-openpgp.c (convert_from_openpgp_main): Add an option not
25441         to check existing key.
25442         (convert_from_openpgp): Ditto.
25443         (convert_from_openpgp_native): Call convert_from_openpgp_main with
25444         dontcare_exist=0.
25445         * agent/command.c (cmd_import_key): Call with dontcare_exist=force.
25446
25447         g10: Use --force when importing key for bkuptocard.
25448         + commit 5ca57f1a697e875bae5a5c73f1a580c42ca75343
25449         * g10/call-agent.c (agent_import_key): Add an argument FORCE.
25450         * g10/import.c (transfer_secret_keys): Likewise.
25451         (import_secret_one): Call transfer_secret_keys with FORCE=0.
25452         * g10/keyedit.c (keyedit_menu): Call with FORCE=1.
25453
25454         g10: Remove subcommand checkbkupkey for --key-edit.
25455         + commit 44aee35e69540510617aea4b886ef845590960fe
25456         * g10/keyedit.c (keyedit_menu): Remove cmdCHECKBKUPKEY support.
25457
25458         g10: Allow relative path for specifying the file for bkuptocard.
25459         + commit ee433d2b00c93b5a4e4ed54b9fb5806361df1b71
25460         * g10/keyedit.c (keyedit_menu): Assume the file is under GNUPGHOME.
25461         Also support tilda expansion.
25462
25463         g10: fix regression of bkuptocard subcommand in --edit-key.
25464         + commit 40959add1ba0efc1f4aa87fa075fa42423eff73c
25465         * g10/keyedit.c (keyedit_menu): Call transfer_secret_keys.
25466         * g10/import.c (transfer_secret_keys): Make it global function.
25467         Allow stats==NULL.
25468
25469         agent: Support --force option for IMPORT_KEY.
25470         + commit e684c634df814b12d399dcdc375c35d3e9a137af
25471         * agent/command.c (cmd_keywrap_key): New option --force.
25472
25473 2015-12-23  Werner Koch  <wk@gnupg.org>
25474
25475         gpg: Rename struct pubkey to pukey_s and add pubkey_t.
25476         + commit a9cbdcfd9c364557787f4a173cc59f14c067946e
25477         * g10/keydb.h (struct pubkey): Rename to pubkey_s.
25478         (pubkey_t): New.  Change all struct pubkey_s to use this type.
25479         * g10/getkey.c (get_pubkeys): Rename arg keys to r_keys.
25480
25481         gpg: Simplify status message code from commit b30c15bf.
25482         + commit 363ed2e892adc97fae97111bb56b64f9f809e8d5
25483         * g10/keygen.c (card_write_key_to_backup_file): Simplify by using
25484         hexfingerprint.
25485
25486         gpg: Add standard free() semantic to pubkey_free.
25487         + commit 04c9cddda95f2a8ca5c0cf10bb3dd6accf56cf45
25488         * g10/getkey.c (pubkey_free): Check for NULL arg.
25489
25490         gpg: Fix use of assert from commit dc417bf0.
25491         + commit ef7b7e91600f35b4d682a6267001a8d30f0fa49f
25492         * g10/keydb.c (keydb_update_keyblock): De-ref after the assert.  Use
25493         %zu for size_t.
25494
25495         gpg: Do not translate debug output.
25496         + commit b0c9867fb74d5a00335e6606d5bdcc5342ce26cd
25497         * g10/getkey.c (parse_def_secret_key): Do not make strings passed to
25498         log_debug translatable.
25499
25500 2015-12-23  NIIBE Yutaka  <gniibe@fsij.org>
25501
25502         scd: Fix commit b30c15bf (again).
25503         + commit aecf1a3c57ca8bf8050a3743b62fe142ccf9eb22
25504         * g10/keygen.c (do_generate_keypair): Clear the variable S.
25505
25506 2015-12-22  Neal H. Walfield  <neal@g10code.com>
25507
25508         gpg: Fix type.
25509         + commit 5c759924fb92b6de7ab3baed7871e5114ebd2505
25510         * g10/keygen.c (card_write_key_to_backup_file): Change n to a size_t.
25511
25512         gpg: Fix error message.
25513         + commit 4654384fe7a4dcee113dacf27c398b13dea5d0be
25514         * g10/getkey.c (parse_def_secret_key): Fix error message.
25515
25516         gpg: Don't check for ambiguous keys.
25517         + commit 7195b94345b0bb937477dc47fc5ec27fb108a099
25518         * g10/gpg.c (struct result): Move from here...
25519         * g10/keydb.h (struct pubkey): ... to here.  Update users.
25520         * g10/gpg.c (check_user_ids): Move from here...
25521         * g10/getkey.c (get_pubkeys): ... to here.  Update users.  Use
25522         get_pubkey_byname to look up the keys (this also prunes invalid keys).
25523         (pubkey_free): New function.
25524         (pubkeys_free): New function.
25525         * g10/gpg.c (main): Don't check for ambiguous key specifications.
25526
25527         gpg: Lazily evaluate --default-key.
25528         + commit dc52995d85048ed12ae8b9f330e9ca41a4030aae
25529         * g10/gpg.c (main): If --encrypt-to-default-key is specified, don't
25530         add --default-key's value to REMUSR here...
25531         * g10/pkclist.c (build_pk_list): ... do it here.
25532         * tests/openpgp/Makefile.am (TESTS): Add default-key.test.
25533         * tests/openpgp/default-key.test: New file.
25534
25535         gpg: Remove unused parameter.
25536         + commit ffe0b7a6dd6bfaec62f81f511b3caf08978bb269
25537         * g10/pkclist.c (build_pk_list): Remove parameter use, which is always
25538         called set to PUBKEY_USAGE_ENC.  Update callers.
25539
25540         gpg: Improve check for ambiguous keys.
25541         + commit 4103850c2e51274984f69443dee34295cbb8c282
25542         * g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
25543         encryption-only keys when a signing key is needed and vice-versa.
25544
25545         gpg: Fix TOCTTOU when updating keyblocks.
25546         + commit dc417bf0c555a7416d0aedde6645fd1087660f92
25547         * g10/keydb.c (keydb_update_keyblock): Don't replace the record at the
25548         current offset.  After taking the lock, extract the fingerprint from
25549         the keyblock, find it and then replace it.
25550
25551         Only add the user supplied CFLAGS after running any autoconf tests.
25552         + commit 02eb9fc9d5863abcfed6af704e618f8cac7cc2e8
25553         * configure.ac: Only add the user supplied CFLAGS after running any
25554         autoconf tests.
25555
25556         gpg: Suppress a warning.
25557         + commit 1cceba163b17b5e9fd7c89e5b40e3d7e1cffc885
25558         * dirmngr/dns-stuff.c (enable_dns_tormode): Reference new_circuit to
25559         avoid a warning when ADNS is not available.
25560
25561         gpg: Remove dead code.
25562         + commit 4143cc1c3783c54a6f733f08a4739e4e5fb0c8b3
25563         * kbx/keybox-defs.h (struct keybox_found_s): Remove unused fields
25564         offset and n_packets.
25565
25566         gpg: Display the key that is invalid, not the search description.
25567         + commit 7fe4be0416cdc9269011bc4213b8a22d6ced295c
25568         * g10/getkey.c (parse_def_secret_key): Display the key that is
25569         invalid, not the search description.
25570
25571         gpg: Mark more options as coming from the config file (when this holds)
25572         + commit 478ca6c75bbf529f95974224dfb7d71bd5860a96
25573         * g10/gpg.c (main): When --default-key or --encrypt-to-default-key is
25574         taken from the config file, note this.
25575
25576         gpg: Use enums instead of defines.
25577         + commit ee8a8ec1cf4605e5af427f9c8b01b3609c82cbe7
25578         * g10/keydb.h (PK_LIST_ENCRYPT_TO): Change from a macro to an enum.
25579         (PK_LIST_HIDDEN): Likewise.
25580         (PK_LIST_CONFIG): Likewise.
25581         (PK_LIST_SHIFT): Likewise.n
25582
25583 2015-12-21  NIIBE Yutaka  <gniibe@fsij.org>
25584
25585         po: Update Japanese translation.
25586         + commit d8392299f311f8cfcf8bc02679dd3ae7ef8cc6d7
25587
25588
25589         g10: clean up of headers for card.
25590         + commit ab9a9bce77d014159c68460f5a7c263fb72f3c1c
25591         * g10/main.h (save_unprotected_key_to_card): Remove.
25592         * g10/options.h (ctapi_driver, pcsc_driver, disable_ccid): Remove.
25593
25594 2015-12-21  Werner Koch  <wk@gnupg.org>
25595
25596         common: New file fwddecl.h.
25597         + commit 98f9e14323bf806f674b3cc259e19ef6219b4378
25598         * common/util.h (server_control_s, ctrl_t): Move to ...
25599         * common/fwddecl.h: New file.
25600         * common/call-gpg.h: Replace typedef by fwddecl.h.  Change include
25601         protection macro name.
25602         * common/Makefile.am (common_sources): Add fwddecl.h.
25603
25604 2015-12-18  Werner Koch  <wk@gnupg.org>
25605
25606         build: Add required macro for pkg-config.
25607         + commit af142854a73567836a0ca44ad62900469c23d531
25608         * configure.ac (PKG_PROG_PKG_CONFIG): New.
25609
25610 2015-12-18  NIIBE Yutaka  <gniibe@fsij.org>
25611
25612         g10: Remove deprecated internal functions.
25613         + commit 72eaff1aa610f3c89a755f212760157e1932d847
25614         * g10/keygen.c (do_ask_passphrase, generate_raw_key)
25615         (gen_card_key_with_backup, save_unprotected_key_to_card): Remove.
25616
25617         g10: Fix a regression for generating card key with backup.
25618         + commit b30c15bf7c5336c4abb1f9dcd974cd77ba6c61a7
25619         * g10/main.h (receive_seckey_from_agent): Declare.
25620         * g10/keygen.c (card_write_key_to_backup_file): New.
25621         (card_store_key_with_backup): New.
25622         (do_generate_keypair): Create a key on host for encryption key when
25623         backup is requested.  Then, call card_store_key_with_backup.
25624
25625 2015-12-17  NIIBE Yutaka  <gniibe@fsij.org>
25626
25627         g10: factor out a function for secret key retrieval.
25628         + commit e644aa7f5943174e3f7ba9408af71531fd125a0b
25629         * g10/export.c (receive_seckey_from_agent): New.
25630         (do_export_stream): Use it.
25631
25632 2015-12-16  Neal H. Walfield  <neal@g10code.com>
25633
25634         gpg: When checking for ambiguous keys, ignore invalid keys.
25635         + commit fc010b6c7fe14e609734e448775fa384421bdef1
25636         * g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
25637         disabled, revoked and expired keys (if appropriate for the provided
25638         option).
25639
25640 2015-12-15  Werner Koch  <wk@gnupg.org>
25641
25642         common: Use default_errsource for call-gpg and exectool.
25643         + commit 4ffe44c5874ed655d82adfa7a85439fab91cde03
25644         * common/call-gpg.c (my_error_from_syserror, my_error_from_errno): New.
25645         Use these wrappers.
25646         * common/exectool.c (my_error_from_syserror): New.  Use these
25647         wrappers.
25648
25649         gpg: Reduce number of strings to translate.
25650         + commit 345ec7323d643528d2f904765708b5ecfe51f57b
25651         * g10/getkey.c (parse_def_secret_key): Do not make debug messages
25652         translatable.  Make use of print_reported_error.
25653
25654         gpg: New function to printed a detailed error code.
25655         + commit 2ea1aebc924c3f0b2269f83cb1b80c75d9fa069c
25656         * g10/misc.c (print_reported_error): New.
25657
25658 2015-12-15  Neal H. Walfield  <neal@g10code.com>
25659
25660         gpg: Improve the keyblock cache's transparency.
25661         + commit f369efd6712148dc7ed40dba6d1ff5b0e169431a
25662         * kbx/keybox-search.c (keybox_seek): New function.
25663         * g10/keydb.c (keydb_search): When reading from the cache, seek to
25664         just after the cached record.
25665
25666         gpg: Improve the keyblock cache's transparency.
25667         + commit 2e4e10c1dcd8dfeafec51f44ebf26acfeb770c41
25668         * kbx/keybox-search.c (keybox_offset): New function.
25669         * g10/keydb.c (struct keyblock_cache): Add fields resource and offset.
25670         (keyblock_cache_clear): Reset HD->KEYBLOCK_CACHE.RESOURCE and
25671         HD->KEYBLOCK_CACHE.OFFSET.
25672         (keydb_search): Don't use the cached result if it comes before the
25673         current file position.  When caching an entry, also record the
25674         position at which it was found.
25675
25676         gpg: Use more descriptive names.
25677         + commit 0ea186db645da2b51a7e71f46793d447f2de5e3d
25678         * g10/keyring.c (KR_NAME): Rename this...
25679         (KR_RESOURCE): ... to this.  Update users.
25680         (struct keyring_name): Rename this...
25681         (struct keyring_resource): ... to this.  Update users.
25682         (struct off_item): Rename this...
25683         (struct key_present): ... to this.  Update users.
25684         (OffsetHashTable): Rename this...
25685         (key_present_hash_t): ... to this.  Update users.
25686         (kr_offtbl): Rename this...
25687         (key_present_hash): ... to this.  Update users.
25688         (kr_offtbl_ready): Rename this...
25689         (key_present_hash_ready): ... to this.  Update users.
25690         (KEY_PRESENT_HASH_BUCKETS): New define.  Replace use of literals
25691         with this.
25692         (new_offset_item): Rename this...
25693         (key_present_value_new): ... to this.  Update users.
25694         (release_offset_items): Drop dead code.
25695         (new_offset_hash_table): Rename this...
25696         (key_present_hash_new): ... to this.  Update users.
25697         (release_offset_hash_table): Drop dead code.
25698         (lookup_offset_hash_table): Rename this...
25699         (key_present_hash_lookup): ... to this.  Update users.
25700         (update_offset_hash_table): Rename this...
25701         (key_present_hash_update): ... to this.  Drop unused parameter off.
25702         Update users.
25703         (update_offset_hash_table_from_kb): Rename this...
25704         (key_present_hash_update_from_kb): ... to this.  Drop unused parameter
25705         off.  Update users.
25706
25707 2015-12-15  NIIBE Yutaka  <gniibe@fsij.org>
25708
25709         sm: Handle gcry_pk_encrypt return value.
25710         + commit 4ee881bff4c8fdfa4b3b7a4b7afab611471e97f1
25711         * sm/encrypt.c (encrypt_dek): Don't ignore failure of gcry_pk_encrypt.
25712
25713 2015-12-14  Werner Koch  <wk@gnupg.org>
25714
25715         common: Change license of isascii.c to all-premissive,
25716         + commit 7baca033070e7811f75e2021100adf8e6a48907f
25717         * common/isascii.c: Change.
25718
25719         common: Change license of some modules to LGPLv3+/GPLv2+.
25720         + commit 7d129a7391115ff1d6a3541078a37a630ab7819f
25721         * common/status.c: Change from GPLv3 to LGPLv3+/GPLv2+.
25722         * common/status.h: Ditto.
25723         * common/yesno.c: Ditto.
25724         * common/common-defs.h: Ditto.
25725         * common/gettime.h: Ditto.
25726         * common/keyserver.h: Ditto.
25727
25728         common: Change license for exectool to LGPLv3+/GPLv2+.
25729         + commit 467e18b74b4790dcbdf3c816206d2fbaf170a12a
25730         * common/exectool.c, common/exectool.h: Change license.
25731
25732         common: Rename sh-exectool to exectool.
25733         + commit d80e1bc430bf64debdb6b08f0b7e5c42836781fa
25734         * common/sh-exectool.c: Rename to exectool.c.
25735         * common/sh-exectool.h: Rename to exectool.h.
25736         * common/Makefile.am (common_sources): Adjust for rename.
25737         * common/exectool.c (sh_exec_tool_stream): Rename to
25738         gnupg_exec-tool-stream.
25739         (sh_exec_tool): Rename to gnupg_exec_tool.
25740         * tools/gpgtar-create.c (gpgtar_create): Adjust for changes.
25741         * tools/gpgtar-extract.c: Adjust for changes.
25742         * tools/gpgtar-list.c: Adjust for changes.
25743
25744 2015-12-14  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
25745
25746         gpg: Print ownertrust in TOFU+PGP trust model.
25747         + commit f5aa51aaacfe13ab9528aa9b88d8ce8eb61362fc
25748         * g10/keyedit.c: Print ownertrust in TOFU+PGP trust model.
25749
25750 2015-12-14  Neal H. Walfield  <neal@g10code.com>
25751
25752         gpg: Fix --default-key checks.
25753         + commit e573e6188dada4d70f6897aa2fda3c3af8c50441
25754         * g10/getkey.c (parse_def_secret_key): Don't just check if a secret
25755         key is available for the public key, also consider subkeys.  Also
25756         check that the key has the signing capability, is not revoked, is not
25757         expired and is not disabled.  Print a warning if there was a least one
25758         value passed to --default-key and all were ignored.
25759
25760 2015-12-14  NIIBE Yutaka  <gniibe@fsij.org>
25761
25762         scd: Fix regression for generating RSA keys on card.
25763         + commit d40975cbe8ff86fcc4a1b4963fdffc66ddee85ce
25764         * scd/app-openpgp.c (do_genkey): Strip leading zeros for fingerprint
25765         computation.
25766
25767 2015-12-12  Werner Koch  <wk@gnupg.org>
25768
25769         gpg: Use a regular type instead of a void* for import stats.
25770         + commit 4d3395ef1fcde0b8c454c09956863959d590ede6
25771         * g10/import.c (struct stats_s): Rename to import_stats_s.  Change all
25772         users.
25773         * g10/main.h (import_stats_t): New.  Change fucntions to use this
25774         instead of a void pointer.
25775
25776         Remove replacements for libgpg-error < 1.21.
25777         + commit f0ae40b0c901e5f5c04c6ed5b2ab96ab7340b2bd
25778         * common/util.h: Remove replacement macros for libgpg-error<1.21.
25779         * common/types.h: Ditto.
25780         * common/mischelp.h: Ditto.
25781         * common/t-mapstrings.c: Include t-support.h before stringhelp.h
25782         * common/t-stringhelp.c: Ditto.
25783         * common/t-support.h: Always include gpg-error.h.
25784         * kbx/keybox-search.c: Do not include stringhelp.h so that keybox-defs
25785         comes first.
25786
25787 2015-12-11  Neal H. Walfield  <neal@g10code.com>
25788
25789         gpg: Fix buffer overflow.
25790         + commit 1605e34fc365edd473aac15c9b4e5aadc1d95cf5
25791         * g10/keydb.c (keydb_search_desc_dump): Fix buffer overflow.
25792
25793 2015-12-11  Justus Winter  <justus@g10code.com>
25794
25795         agent: Improve error handling.
25796         + commit 25f0f053cd306200a6211b5cf397838a59835ee7
25797         * agent/pksign.c (agent_pksign_do): Improve error handling.
25798
25799         Fix required libgpg-error version.
25800         + commit d6e01493cad6ff32f356185c7a2d2b5c2b86a937
25801         * configure.ac (NEED_GPG_ERROR_VERSION): We need version 1.21 for the
25802         poll interface.
25803
25804 2015-12-11  Neal H. Walfield  <neal@g10code.com>
25805
25806         gpg: Don't error out if a key occurs multiple times in the keyring.
25807         + commit 6dc37c5fb60acbfd5ba2ab979852383eac8944e0
25808         * g10/gpg.c (check_user_ids): Don't error out if a key occurs multiple
25809         times in the keyring.  Instead, print a warning.  When printing out
25810         fingerprint prints, use format_hexfingerprint to format them.
25811
25812 2015-12-10  Daniel Hoffend  <dh@dotlan.net>
25813
25814         scd: Fix removal of unplugged usb readers on Windows.
25815         + commit d1a97585c5e73fbc7d4cf90e38f76ffc5aea305f
25816         * scd/apdu.c (pcsc_error_to_sw): map PCSC_E_NO_SERVICE and
25817         PCSC_E_SERVICE_STOPPED to the internal SW_HOST_NO_READER error code.
25818
25819 2015-12-07  Justus Winter  <justus@g10code.com>
25820
25821         tests: Add some more gpgtar tests.
25822         + commit 1c8eae95a8b3b89bc0f49cb5f4938101634583dc
25823         * tests/openpgp/gpgtar.test: Add more tests.
25824
25825         dirmngr: Initialize http status code.
25826         + commit 71726b627dcff015dc12568021b31d8ccede788a
25827         * dirmngr/ks-action.c (ks_action_search): Initialize 'http_status' as
25828         it is unused if LDAP is used to search for keys.
25829
25830 2015-12-04  Daiki Ueno  <ueno@gnu.org>
25831
25832         gpg: Write ERROR status on delete-key cancellation.
25833         + commit b5cd68852d0e3485c9e13a8ddb70f05f36a65cb9
25834         * g10/delkey.c (do_delete_key): Write ERROR status code with the error
25835         location "delete_key.secret", when the user cancelled the operation on
25836         Pinentry.
25837
25838 2015-12-04  Justus Winter  <justus@g10code.com>
25839
25840         dirmngr: Stricter handling of http error codes.
25841         + commit 6d64ef869dfbcb7aaa802b80ed648393147e40d8
25842         * dirmngr/ks-action.c (ks_action_search): Only retry if the keyserver
25843         responded with a '404 Not Found'.
25844         * dirmngr/ks-engine-hkp.c (send_request): Return http status code.
25845         (ks_hkp_search): Likewise.
25846         (ks_hkp_{get,put}): Adapt call to 'send_request'.
25847         * dirmngr/ks-engine.h (ks_hkp_search): Update prototype.
25848
25849         dirmngr: Really search all keyservers for patterns.
25850         + commit 6ac57a482f7ae02db1bee4e4b861288fc6905adc
25851         * dirmngr/ks-action.c (ks_action_search): Search all configured
25852         keyservers for the given patterns.
25853
25854         dirmngr: Handle http status '501 Not Implemented'.
25855         + commit a8308ba5231682ce7c7d591a17e7e940fbd63189
25856         * dirmngr/ks-engine-hkp.c (send_request): Handle status 501 and return
25857         GPG_ERR_NOT_IMPLEMENTED.
25858
25859         tools/gpgtar: Implement symmetric encryption.
25860         + commit 582e684a48eb4f3716cecf7dc73eb93046efcfad
25861         * tests/openpgp/gpgtar.test: Add test case.
25862         * tools/gpgtar-create.c (gpgtar_create): Pass '--symmetric' flag to
25863         gpg.
25864         * tools/gpgtar.c (parse_arguments): We do handle the argument now.
25865
25866         tools/gpgtar: Implement signing.
25867         + commit 45c814f348c89acd8d21d0607ffcf68e5c5c399e
25868         * tests/openpgp/gpgtar.test: Test signing.
25869         * tools/gpgtar-create.c (gpgtar_create): Add 'sign' option, add the
25870         appropriate gpg arguments to implement signing and selecting the local
25871         user.
25872         * tools/gpgtar.c (parse_options): We do handle '--local-user' now.
25873         (main): Handle signing, encrypting, and doing both when creating an
25874         archive.
25875         * tools/gpgtar.h (gpgtar_create): Update prototype.
25876
25877         tools/gpgtar: Use the new exectool helper.
25878         + commit 0c0dafd8e89bb702e856c661c1561e10cdcaf37f
25879         * tools/Makefile.am: gpgtar now requires neither npth nor libassuan.
25880         * tools/gpgtar-create.c (gpgtar_create): Use the new 'sh-exectool'
25881         helper.
25882         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
25883         * tools/gpgtar-list.c (gpgtar_list): Likewise.
25884         * tools/gpgtar.c (main): Set default gpg program.  Drop the
25885         initialization of npth and libassuan.
25886
25887         common: Add a stream interface to 'sh-exectool'.
25888         + commit a81aca6e1c2a4529d416d1989f15d7338d2ee81e
25889         * common/sh-exectool.c (struct copy_buffer): Add infrastructure for
25890         copying between streams.
25891         (copy_buffer_{init,shred,do_copy,flush}): New functions.
25892         (sh_exec_tool_stream): Rework 'sh_exec_tool' to operate on streams.
25893         (nop_free): New function.
25894         (sh_exec_tool): Express this in terms of 'sh_exec_tool_stream'.
25895         * common/sh-exectool.h (sh_exec_tool_stream): New prototype.
25896
25897         common: Add header file and build the new code.
25898         + commit d955cb5e0700c6d2b6b26cb210b5a176d22d4235
25899         * common/Makefile.am (common_sources): Add new files.
25900         * common/sh-exectool.h: New file.
25901
25902 2015-12-04  Werner Koch  <wk@gnupg.org>
25903
25904         common: Add code to execute a helper.
25905         + commit 2ae07f826aa551db8adf714158fce962790a6b54
25906         * common/sh-exectool.c: New file.
25907
25908         Release 2.1.10.
25909         + commit 9fadfdb3109f7ea42aaaa9d745b64c6c90cb8233
25910
25911
25912 2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>
25913
25914         po: Japanese translation.
25915         + commit 762fcc027b0b4cc88c1f633804de619273d6a8b9
25916
25917
25918 2015-12-04  Werner Koch  <wk@gnupg.org>
25919
25920         speedo,w32: Improve installer.
25921         + commit 0fe3614d9afe42ecf80bbc932366ceeaba0a0ecc
25922         * build-aux/speedo/w32/inst.nsi (SEC_gnupg): Install dirmngr.conf and
25923         distsigkey.gpg.
25924         (un.gnupglast): Stop dirmngr.
25925
25926         gpg: Do not pre-check keys given on the command line.
25927         + commit 28311d1fa56bfbd801103a8475597459132874f4
25928         * g10/keydb.h (PK_LIST_ENCRYPT_TO, PK_LIST_HIDDEN, PK_LIST_CONFIG)
25929         (PK_LIST_SHIFT): New.
25930         * g10/pkclist.c (build_pk_list): Use them here.
25931         * g10/gpg.c (check_user_ids, main): Ditto.
25932
25933         * g10/gpg.c (main): Set PK_LIST_CONFIG for REMUSR and LOCUSR.
25934         (check_user_ids): Skip check for command line specified options.
25935
25936         dirmngr: Add command to print the resolver version.
25937         + commit 4ff2cae7dee36ffee854c5f05c3e8ee9eb0308dd
25938         * dirmngr/server.c (cmd_getinfo): Add sub-command "dnsinfo".
25939
25940         gpg: Allow "help" as value for --tofu-policy.
25941         + commit 59f6192cb766612ad215bc6a3af13d5b137139e4
25942         * g10/gpg.c (parse_tofu_policy): Add keyword "help".
25943         (parse_tofu_db_format): Ditto.
25944
25945         Do not translate messages printed with log_debug.
25946         + commit 218a52787a87be6b7481a39f87d212d6ef594e97
25947         * common/asshelp.c (start_new_gpg_agent): Do not i18n string.
25948         (start_new_dirmngr): Ditto.
25949         * g10/mainproc.c (proc_encrypted): Ditto.  Print only if debug is
25950         enabled.
25951
25952 2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>
25953
25954         scd: Fix for removing the prefix.
25955         + commit f03976f1101f539a2782cd9e87d640fc32a022db
25956         * scd/app-openopg.c (do_decipher): Fix the condition.
25957
25958         scd: Simplify saving application context.
25959         + commit 9639af5f16a7ed908cbce2415330b9fcd88edc90
25960         * scd/app.c (lock_table): Remove LAST_APP field.
25961         (lock_reader, app_dump_state, application_notify_card_reset)
25962         (release_application): Follow the change.
25963         (check_conflict): New.
25964         (check_application_conflict): Lock the slot and call check_conflict.
25965         (select_application): Call check_conflict and not use LAST_APP.
25966
25967         scd: More fix for Curve25519 prefix handling.
25968         + commit f747adfa21551e083bc947540c64c94a96dcc059
25969         * scd/app-openpgp.c (do_decipher): Handle trancated cipher text.
25970         Also fix xfree bug introduced.
25971
25972 2015-12-03  Werner Koch  <wk@gnupg.org>
25973
25974         scd: Another fix for Curve25519 prefix handling.
25975         + commit e28f2e7a2f265af8bbdb4979e9679b4396dccdd5
25976         * scd/app-openpgp.c (do_decipher): Check 0x02 also for 16+1 byte long
25977         INDATA.
25978         (do_decipher): Fix integer arithmetic in void pointer.
25979         (do_decipher): Add missing memcpy.
25980
25981         build: Avoid dependecy problems in "make distcheck".
25982         + commit 0f61599ed0bd1cc6842067d040bb58ec0a451715
25983         * doc/Makefile.am (gnupg.texi): Depend on defs.inc.
25984
25985         build: Change how caller provided CFLAGS are used by configure.
25986         + commit 4e9957250eee3521dc979912a4818e58ffddc5b8
25987         * configure.ac: Append instead of prepend caller provided CFLAGS.
25988
25989         gpg: Add variant of 'key "%s" not found: %s' error message.
25990         + commit 5e2c5e9ec5b75fae886e1294adbdb7ad2ac12827
25991         * g10/gpg.c (check_user_ids): Change error message.
25992         * g10/delkey.c (do_delete_key): Ditto.
25993
25994         gpg: Make keyidlist more robust in case of errors.
25995         + commit 50a568e7380752454c029eac2b57d8803b1cb287
25996         * g10/keyserver.c (keyidlist): Clear *KLIST on error.
25997
25998         gpg: Take care of keydb_new returning NULL.
25999         + commit a28ac99efead8be73ea1704abe1611ccc4811c54
26000         * g10/keydb.c (keydb_new): Print an error message if needed.  Also use
26001         xtrycalloc because we return an error anyway.
26002         * g10/delkey.c (do_delete_key): Handle error retruned by keydb_new.
26003         * g10/export.c (do_export_stream): Ditto.
26004         * g10/getkey.c (get_pubkey): Ditto.
26005         (get_pubkey_fast): Ditto.
26006         (get_pubkeyblock): Ditto.
26007         (get_seckey): Ditto.
26008         (key_byname): Ditto.
26009         (get_pubkey_byfprint): Ditto.
26010         (get_pubkey_byfprint_fast): Ditto.
26011         (parse_def_secret_key): Ditto.
26012         (have_secret_key_with_kid): Ditto.
26013         * g10/import.c (import_one): Ditto.
26014         (import_revoke_cert): Ditto.
26015         * g10/keyedit.c (keyedit_quick_adduid): Ditto.
26016         * g10/keygen.c (quick_generate_keypair): Ditto.
26017         (do_generate_keypair): Ditto.
26018         * g10/trustdb.c (validate_keys): Ditto.
26019         * g10/keyserver.c (keyidlist): Ditto.
26020         * g10/revoke.c (gen_desig_revoke): Ditto.
26021         (gen_revoke): Ditto.
26022         * g10/gpg.c (check_user_ids): Ditto.
26023         (main): Do not print an error message for keydb_new error.
26024         * g10/keylist.c (list_all): Use actual error code returned by
26025         keydb_new.
26026
26027         * g10/t-keydb-get-keyblock.c (do_test): Abort on keydb_new error.
26028         * g10/t-keydb.c (do_test): Ditto.
26029
26030         * g10/keyring.c (keyring_new): Actually return an error so that the
26031         existing keydb_new error checking makes sense for a keyring resource.
26032         (keyring_rebuild_cache): Take care of keyring_new returning an error.
26033
26034         gpg: Change some error messages.
26035         + commit 9fcc047d921bde95b6807325b7fd2b697e89907f
26036         * g10/getkey.c (parse_def_secret_key): Change error message.  Replace
26037         log_debug by log_info.
26038         * g10/gpg.c (check_user_ids): Make function static.  Change error
26039         messages.
26040         (main): Change error messages.
26041         * g10/revoke.c (gen_revoke): Ditto.
26042
26043 2015-12-03  NIIBE Yutaka  <gniibe@fsij.org>
26044
26045         scd: Fix "Conflicting usage" bug.
26046         + commit f42c50dbf00c2e6298ca6830cbe6d36805fa54a3
26047         * scd/apdu.c (apdu_close_reader): Call CLOSE_READER method even if we
26048           got an error from apdu_disconnect.
26049         * scd/app-common.h (no_reuse): Remove.
26050         * scd/app.c (application_notify_card_reset): Deallocate APP here.
26051         (select_application, release_application): Don't use NO_REUSE.
26052
26053         scd: Fix for Curve25519 prefix handling.
26054         + commit 11b2691eddc42e91651e4f95dd2731255a3e9211
26055         * scd/app-openpgp.c (do_decipher): More condition for AES decipher.
26056           Handle the prefix in cipher text.  Always add the prefix in result.
26057
26058 2015-12-03  Neal H. Walfield  <neal@g10code.com>
26059
26060         gpg: Use the matching key if the search description is exact.
26061         + commit cedbd4709eed6fead9d1b271f96860c00547c77c
26062         * g10/gpg.c (check_user_ids): If the search description is for an
26063         exact match (a keyid or fingerprint that ends in '!'), then use the
26064         matching key, not the primary key.
26065         * tests/openpgp/Makefile.am (TESTS): Add use-exact-key.test.
26066         (priv_keys): Add privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc,
26067         privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc,
26068         privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc,
26069         privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc and
26070         privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc.
26071         (sample_keys): Add
26072         samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc.
26073         * tests/openpgp/privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc:
26074         New file.
26075         * tests/openpgp/privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc:
26076         New file.
26077         * tests/openpgp/privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc:
26078         New file.
26079         * tests/openpgp/privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc:
26080         New file.
26081         * tests/openpgp/privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc:
26082         New file.
26083         * tests/openpgp/samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc:
26084         New file.
26085         * tests/openpgp/use-exact-key.test: New file.
26086         * tests/openpgp/version.test: Install the new private keys.
26087
26088 2015-12-02  Werner Koch  <wk@gnupg.org>
26089
26090         build: Require at least Libassuan 2.4.1.
26091         + commit 69db3285e4612ad24462149a4d64cc32c090a491
26092         * configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.4.1.
26093         * agent/gpg-agent.c (create_server_socket): Remove check for
26094         libassuan >= 2.3.0 and >= 2.1.4.
26095         (main): Remove check for libassuan >= 2.1.4.
26096         * scd/scdaemon.c (create_server_socket): Remove check for
26097         libassuan >= 2.1.4.
26098         * dirmngr/dirmngr.c (set_tor_mode): Remove check for
26099         libassuan >= 2.3.0.
26100         * dirmngr/http.c (http_raw_connect, send_request): Remove checks for
26101         libassuan >= 2.3.0.
26102
26103 2015-12-02  Neal H. Walfield  <neal@g10code.com>
26104
26105         gpg: Improve documentation.
26106         + commit 28195f8d27aa0fc9daf5b74fb24de87c36e04739
26107         * g10/tofu.c (initdb): Improve documentation.
26108
26109         gpg: Fix type mismatch resulting in a buffer overflow.
26110         + commit c73d75103cbd34975e2bd28e9924caee05eaf829
26111         * g10/tofu.c (record_binding): Change policy_old's type from an enum
26112         tofu_policy to a long: this variable is passed by reference and a long
26113         is expected.
26114
26115 2015-12-02  Werner Koch  <wk@gnupg.org>
26116
26117         dirmngr: Switch to an onion address if Tor is running.
26118         + commit 28e2513721ff0cec920564d4087f3600cce8672e
26119         * dirmngr/dirmngr.h (opt): Turn field 'keyserver' into an strlist.
26120         * dirmngr/dirmngr.c (parse_rereadable_options): Allow multiple
26121         --keyserver options.
26122         * dirmngr/server.c (server_local_s): Add field 'tor_state'.
26123         (release_uri_item_list): New.
26124         (release_ctrl_keyservers): Use it.
26125         (start_command_handler): Release list of keyservers.
26126         (is_tor_running): New.
26127         (cmd_getinfo): Re-implement "tor" subcommand using new fucntion.
26128         (ensure_keyserver): Rewrite.
26129         * g10/dirmngr-conf.skel: Add two keyserver options.
26130
26131         http: Enhance parser to detect .onion addresses.
26132         + commit 17ac843871d5f350f26edff0187f94ced923f534
26133         * dirmngr/http.h (parsed_uri_s): Add flag 'onion'.
26134         * dirmngr/http.c (do_parse_uri): Set that flag.
26135         * dirmngr/t-http.c (main): Print flags.
26136
26137 2015-12-02  Neal H. Walfield  <neal@g10code.com>
26138
26139         common,gpg: Fix processing of search descriptions ending in '!'.
26140         + commit 10cca02c4c70eee993d4df0a1d20ae841992efe9
26141         * g10/gpg.c (check_user_ids): If the search description describes a
26142         keyid or fingerprint and ends in a '!', include the '!' in the
26143         rewritten description.
26144         * common/userids.c (classify_user_id): Accept keyids and fingerprints
26145         ending in '!'.
26146
26147 2015-12-01  Justus Winter  <justus@g10code.com>
26148
26149         dirmngr: Improve error handling.
26150         + commit 9c34711539fc2c34aea8da0fd49ae6aa28991518
26151         * dirmngr/dns-stuff.c (getsrv): Avoid looking at 'header' before
26152         checking for errors, but silently ignore errors when looking up SRV
26153         records.
26154
26155 2015-12-01  Werner Koch  <wk@gnupg.org>
26156
26157         build: Let configure show the the status of Tor support.
26158         + commit 3be12d1e1b8334fb2bba307ec9efbc004f1dbf8d
26159         * configure.ac (show_tor_support): New
26160
26161 2015-11-30  Werner Koch  <wk@gnupg.org>
26162
26163         doc: Make make distcheck work again.
26164         + commit 4ecb5db804003c10c57bdc0dc7f1d9649c5ba6f8
26165         * doc/Makefile.am (DISTCLEANFILES): Add gpgkey2ssh.1
26166
26167         yat2m: Add keyword @url.
26168         + commit b4756a54a55fcd51717c149e19191a2eeaa6a919
26169         * doc/yat2m.c (proc_texi_cmd): Add keyword @url.
26170
26171         doc: Build man pages with the same date as the info files.
26172         + commit 081c902f16a2f251df4593f090b3978dfa473a26
26173         * doc/Makefile.am (yat2m-stamp): Use option --date.
26174
26175         yat2m: New option --date.
26176         + commit 75eb071354d1f862bac09c56c8ab81dae8883270
26177         * doc/yat2m.c (opt_date): new.
26178         (isodatestring): Use it if set.
26179         (main): New option --date.
26180
26181 2015-11-27  Werner Koch  <wk@gnupg.org>
26182
26183         gpg: Avoid extra translation strings.
26184         + commit 686f31c3d5aee0d2825265869ae92ca95cdcabae
26185         * g10/keyedit.c (menu_expire): Use only one prompt.
26186
26187         kbx: Include gpg-error prior to mischelp.h.
26188         + commit 436a154ea85e4dffbde7c3b316fbfca1b066aa2a
26189         * kbx/keybox-init.c: Change order of includes.
26190
26191         gpg,w32: Fix a format string error.
26192         + commit 7c856f99144b84ac30e0c9a192f09dc36d93190a
26193         * g10/keyring.c (keyring_search): Fix format string for off_t.
26194
26195         Silence compiler warnings related to not using assuan_fd_t.
26196         + commit 501436ab0f9d8e7d56b2f5e344006be5f5a3c653
26197         * common/call-gpg.c (start_gpg): Use assuan_fd_t.  Note that the
26198         declaration was already fixed by a previous change.
26199         * dirmngr/server.c (cmd_getinfo): Use assuan_fd_t.
26200
26201         Avoid incompatible pointer assignment warnings on Windows.
26202         + commit 64e87083394d38998feab359caac917bcc6139d3
26203         * common/logging.c (fun_writer): Use gpgrt_ssize_t instead of ssize_t.
26204         * dirmngr/server.c (data_line_cookie_write): Ditto.
26205         * sm/certdump.c (format_name_writer): Ditto.
26206         * sm/server.c (data_line_cookie_write): Ditto.
26207         * dirmngr/http.c (cookie_read, cookie_write): Ditto.
26208
26209         dirmngr: Avoid a declarations after statements.
26210         + commit 100f34e869df899a695f5e5ef1b8e092baf91751
26211         * tools/gpgtar.c (parse_arguments): Use a block for a local varibale
26212         definition.
26213
26214         dirmngr: Avoid casting away a const from an char**.
26215         + commit 6501741d2c1beb8060198a39a1aa950cb11b386f
26216         * dirmngr/ldap.c (start_cert_fetch_ldap): Do not use pointers from
26217         global variables.
26218
26219         dirmngr: Allow testing for a running Tor via "getinfo tor".
26220         + commit da5a232199ef93be219e933a7eaf4ccfc6d24d61
26221         * dirmngr/server.c (cmd_getinfo): Print an S line if Tor is not
26222         running.
26223
26224 2015-11-26  Werner Koch  <wk@gnupg.org>
26225
26226         g13: Fix commit 1a045b13.
26227         + commit 82f6abb4807c89388052ab442368d9e09fb84aea
26228         * g13/g13.c (main): Use existsing function.
26229
26230         common: Fix off-by-one access in the new format_text.
26231         + commit 61941a984964308b09c7fc1b3438fb99d0b3c917
26232         * common/stringhelp.c (format_text): Use existsing fucntion to trim
26233         trailing spaces.  Fix off-by-one access.
26234
26235         dirmngr: Improve output of "getinfo tor".
26236         + commit d226e67856e7197c581dcd2cef0f1e687bee0ac9
26237         * dirmngr/server.c (cmd_getinfo): Print a message along with OK.
26238
26239         dirmngr: Let Libassuan employ nPth wrappers for connect.
26240         + commit f95cff1cc9e7a4d9f6b7c45188ec47e70f9874dc
26241         * dirmngr/http.c (my_unprotect, my_protect): Remove.
26242         (connect_server): Do not use these wrappers.
26243
26244 2015-11-26  Justus Winter  <justus@g10code.com>
26245
26246         tools/gpgtar: Add '--dry-run'.
26247         + commit 676b2d7081291f7e47a66755ab07af259fea130b
26248         * tools/gpgtar-extract.c (extract_{regular,directory}): Honor
26249         '--dry-run'.
26250         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
26251         (opts): Add '--dry-run'.
26252         (parse_arguments): Handle '--dry-run'.
26253         * tools/gpgtar.h (opt): Add field 'dry_run'.
26254
26255         tools/gpgtar: Handle '--gpg-args'.
26256         + commit 69a8440f44fa025e33a4cc32d17695c9ac385043
26257         * tools/gpgtar-create.c (gpgtar_create): Use given arguments.
26258         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
26259         * tools/gpgtar-list.c (gpgtar_list): Likewise.
26260         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
26261         (opts): Add 'gpg-args'.
26262         (parse_arguments): Handle arguments.
26263         * tools/gpgtar.h (opt): Add field 'gpg_arguments'.
26264         * tests/openpgp/gpgtar.test: Simplify accordingly.
26265
26266         common: Make the GPG arguments configurable in call-gpg.
26267         + commit 1a045b1324efabe7423a8d00245f01718ed72556
26268         * common/call-gpg.c (start_gpg): Add parameter 'gpg_arguments'.
26269         (_gpg_encrypt, gpg_encrypt_blob, gpg_encrypt_stream): Likewise.
26270         (_gpg_decrypt, gpg_decrypt_blob, gpg_decrypt_stream): Likewise.
26271         * common/call-gpg.h: Adapt prototypes.
26272         * g13/create.c (encrypt_keyblob): Adapt callsite.
26273         * g13/g13-common.h (opt): Add field 'gpg_arguments'.
26274         * g13/g13.c (main): Construct default arguments.
26275         * g13/mount.c (decrypt_keyblob): Adapt callsite.
26276         * tools/gpgtar-create.c (gpgtar_create): Likewise.
26277         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
26278         * tools/gpgtar-list.c (gpgtar_list): Likewise.
26279
26280         tools/gpgtar: Handle '--tar-args' for compatibility with gpg-zip.
26281         + commit 2eb3248058330dd5c37560d9887db5b5266c54fe
26282         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
26283         (opts): Add new group for tar options, rearrange a little, add
26284         '--tar-args'.
26285         (tar_opts): New variable.
26286         (shell_parse_stringlist): New function.
26287         (shell_parse_argv): Likewise.
26288         (parse_arguments): Add option argument, handle '--tar-args'.
26289         (main): Fix invokation of 'parse_arguments'.
26290         * tests/openpgp/gpgtar.test: Simplify decryption.
26291
26292         tools/gpgtar: Rework argument parsing.
26293         + commit 35c0c8b211bc891335e822379b33ea34fbc1f84f
26294         * tools/gpgtar.c (main): Move argument parsing into its own function.
26295
26296 2015-11-25  Justus Winter  <justus@g10code.com>
26297
26298         tests: Add tests for gpgtar and gpg-zip.
26299         + commit 556e8c44267fe3b829ca06286e9b5637ca1a6a73
26300         * tests/openpgp/Makefile.am (TESTS): Add new file.
26301         * tests/openpgp/gpgtar.test: New file.
26302
26303         tools/gpgtar: Handle '--directory' argument.
26304         + commit 127aba9a4d6c1aabb4a18a74b16d3bddc6eb5c54
26305         * tools/gpgtar-extract.c (gpgtar_extract): Only generate a directory
26306         name if none is given via arguments.
26307         * tools/gpgtar.c (enum cmd_and_opt_values): New constant.
26308         (opts): Add argument.
26309         (main): Parse argument.
26310         * tools/gpgtar.h (opt): New field 'directory'.
26311
26312         tools/gpgtar: Handle '--gpg' argument.
26313         + commit 89e104eb38c3a6896892ff09db11cb1bae2bb0d3
26314         * tools/gpgtar-create.c (gpgtar_create): Use given gpg program.
26315         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
26316         * tools/gpgtar-list.c (gpgtar_list): Likewise.
26317         * tools/gpgtar.c (enum cmd_and_opt_values): New constant.
26318         (opts): Add argument.
26319         (main): Handle argument.
26320         * tools/gpgtar.h (opt): Add field 'gpg_program'.
26321
26322         tools/gpgtar: Improve error handling.
26323         + commit f76fb047c15914ba44dc9423d235484758bcd721
26324         * tools/gpgtar-create.c (gpgtar_create): Return an error code, fix
26325         error handling.
26326         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
26327         * tools/gpgtar-list.c (read_header): Return an error code.
26328         (gpgtar_list): Return an error code, fix error handling.
26329         (gpgtar_read_header): Return an error code.
26330         * tools/gpgtar.c: Add missing include.
26331         (main): Print an generic error message if a command failed and no
26332         error has been printed yet.
26333         * tools/gpgtar.h (gpgtar_{create,extract,list,read_header}): Fix the
26334         prototypes accordingly.
26335
26336         tools: Add encryption and decryption support to gpgtar.
26337         + commit 40dbee86f3043aff8a8c2055521e270318e33068
26338         * tools/Makefile.am: Amend CFLAGS and LDADD.
26339         * tools/gpgtar-create.c (gpgtar_create): Add encrypt flag and encrypt
26340         stream if requested.
26341         * tools/gpgtar-extract.c (gpgtar_extract): Likewise for decryption.
26342         * tools/gpgtar-list.c (gpgtar_list): Likewise.
26343         * tools/gpgtar.c (main): Initialize npth and assuan.  Parse recipient
26344         and local user, and note which flags are currently ignored.  Adapt
26345         calls to gpgtar_list and friends.
26346         (tar_and_encrypt): Drop stub function and prototype.
26347         (decrypt_and_untar): Likewise.
26348         (decrypt_and_list): Likewise.
26349         * tools/gpgtar.h (gpgtar_{create,extract,list}): Add encryption or
26350         decryption argument.
26351
26352         common: Add stream interface to call-pgp.
26353         + commit 03bf88f32c8d203d5b3bfbbc48cc45e6c08cc187
26354         * common/call-gpg.c (struct writer_thread_parms): Add field 'stream'.
26355         (writer_thread_main): Support reading from a stream.
26356         (start_writer): Add stream argument.
26357         (struct reader_thread_parms): Add field 'stream'.
26358         (reader_thread_main): Support writing to a stream.
26359         (start_reader): Add stream argument.
26360         (_gpg_encrypt): Add stream api.
26361         (gpg_encrypt_blob): Adapt accordingly.
26362         (gpg_encrypt_stream): New function.
26363         (_gpg_decrypt): Add stream api.
26364         (gpg_decrypt_blob): Adapt accordingly.
26365         (gpg_decrypt_stream): New function.
26366         * common/call-gpg.h (gpg_encrypt_stream): New prototype.
26367         (gpg_decrypt_stream): Likewise.
26368
26369         common: Refactor the call-gpg code.
26370         + commit cb18d802308bde4e28219417bb4d107a4c0001b4
26371         * common/call-gpg.c (gpg_{en,de}crypt_blob): Move most of the code
26372         into two new functions, _gpg_encrypt and _gpg_decrypt.
26373
26374         g13: Move 'call-gpg.c' to common.
26375         + commit ba1a5cc17d43d9cba32447876f06a8ab8f97e5ae
26376         * common/Makefile.am (common_sources): Add files.
26377         * g13/call-gpg.c: Move to 'common' and adapt slightly.  Add a
26378         parameter to let callees override the gpg program to execute.
26379         * g13/call-gpg.h: Likewise.
26380         * g13/Makefile.am (g13_SOURCES): Drop files.
26381         * g13/create.c (encrypt_keyblob): Hand in the gpg program to execute.
26382         * g13/mount.c (decrypt_keyblob): Likewise.
26383
26384 2015-11-24  Neal H. Walfield  <neal@g10code.com>
26385
26386         gpg: When comparing keyids, use the keyid, not the fingerprint's suffix.
26387         + commit e9c16fee2576c772de9d4fb5d53fee28e4b84202
26388         * g10/keyedit.c (menu_select_key): Use spacep and hexdigitp instead of
26389         inline tests.  Don't compare P to the suffix of the fingerprint.  If P
26390         appears to be a keyid, do an exact compare against the keyid.  If it
26391         appears to be a fingerprint, do an exact compare against the
26392         fingerprint.
26393
26394 2015-11-23  Neal H. Walfield  <neal@g10code.com>
26395
26396         gpg: Reflow long texts.
26397         + commit 19362a8dd7ee986c082a5afc5a446f939991ec0f
26398         * common/stringhelp.c (format_text): New function.
26399         * common/t-stringhelp.c (stresc): New function.
26400         (test_format_text): New function.  Test format_text.
26401         * g10/tofu.c (get_trust): Use format_text to reflow long texts.
26402         (show_statistics): Likewise.
26403
26404         common: Extend utf8_charcount to include the string's length.
26405         + commit 5b84b0d660c8329e184d98682665aaea7e1703d2
26406         * common/stringhelp.c (utf8_charcount): Take additional parameter,
26407         len.  Process at most LEN bytes.
26408
26409 2015-11-23  Justus Winter  <justus@g10code.com>
26410
26411         dirmngr: Fix http lookups when libadns is used.
26412         + commit b75e1b3d8b1643640d046f7f8e89adf5b1caa7a3
26413         * dirmngr/dns-stuff.c (resolve_name_adns): Fill in the port.
26414
26415         dirmngr: Fix SRV record lookups when using the system resolver.
26416         + commit 946faaff04f3340ed6db9e89c5036dc5f9beca6a
26417         * dirmngr/dns-stuff.c (getsrv): Fix error handling.
26418
26419         dirmngr: Honor ports specified in SRV records.
26420         + commit 73c1a86ad937d7be027eece991c69aaeb6a1f092
26421         * dirmngr/ks-engine-hkp.c (struct hostinfo_s): New field 'port'.
26422         (create_new_hostinfo): Initialize 'port'.
26423         (add_host): Add host parameter and update the hosttable entry.
26424         (map_host): Return port if known, adjust calls to 'add_host'.
26425         (make_host_part): Let 'map_host' specify the port if known.
26426
26427         dirmngr: Support hkp server pools using SRV records.
26428         + commit c9f5aa15793b3c05c1b92af401b23ab34d3e6196
26429         * dirmngr/ks-engine-hkp.c (map_host): Handle SRV records.
26430
26431         dirmngr: Refactor 'map_host'.
26432         + commit 3f52f6bcacfe3877d30a21464e93e9240bc75085
26433         * dirmngr/ks-engine-hkp.c (add_host): New function.
26434         (map_host): Use the new function.
26435
26436         dirmngr: Fix pool detection.
26437         + commit 23ea641ba2a063cc99c82869061703d48bc674b2
26438         * dirmngr/ks-engine-hkp (arecords_is_pool): Fix counting IP addresses.
26439
26440         dirmngr: Refactor 'map_host'.
26441         + commit 2b43a0515868b8720009e48d7a1f32d571767f14
26442         * dirmngr/ks-engine-hkp.c (arecords_is_pool): New function.
26443         (map_host): Use the new function.
26444
26445         dirmngr: Start dirmngr on demand.
26446         + commit a9e0b1dd6c106e243e3fbbaa1838b56a1f1c8584
26447         * common/asshelp.h: Include 'util.h'.
26448         * dirmngr/dirmngr-client.c (main): Use 'start_new_dirmngr' to connect
26449         to the dirmngr.
26450         (start_dirmngr): Drop now unused declaration and function.
26451
26452 2015-11-23  Neal H. Walfield  <neal@g10code.com>
26453
26454         gpg: If sqlite is not available, don't build things depending on it.
26455         + commit 770c06ed4e6c1097d6e305a0a9427c3c783b787c
26456         * configure.ac: Define the automake conditional SQLITE3.
26457         * tests/openpgp/Makefile.am (TESTS): Move the sqlite3 dependent tests
26458         to...
26459         (sqlite3_dependent_tests): ... this new variable.  If SQLITE3 is not
26460         defined, then clear this variable.
26461
26462         gpg: Allow updating the expiration time of multiple subkeys at once.
26463         + commit b64b33bb80a8cf5dcc1fdbc62023d019fe2c8cb1
26464         * g10/keyedit.c (menu_expire): Allow updating the expiration time of
26465         multiple subkeys at once.
26466
26467         gpg: Don't crash if key is not passed an argument.
26468         + commit 19f099463c82c119288a05eaefc42bf09d617377
26469         * g10/keyedit.c (menu_select_key): Don't crash if P is NULL.
26470
26471 2015-11-20  Neal H. Walfield  <neal@g10code.com>
26472
26473         gpg: Fail if the search description passed to --gen-revoke is ambiguous.
26474         + commit 178af9c3f56d385fe28a9e5e8bde0ab34c0b260e
26475         * g10/revoke.c (gen_revoke): Error out if the search description is
26476         ambiguous.
26477
26478         gpg: Refactor print_seckey_info.
26479         + commit f8a65ac96b27a0963892892ce6e93b37b8df1ad7
26480         * g10/keylist.c (print_seckey_info): Break formatting functionality
26481         into...
26482         (format_seckey_info): ... this new function.
26483
26484         gpg: Improve an error message.
26485         + commit 46e128d44a0456dc603bc9e25a4c5d8da903b078
26486         * g10/revoke.c (gen_revoke): Provide a more descriptive error message
26487         if searching for a key fails.
26488
26489 2015-11-19  Justus Winter  <justus@g10code.com>
26490
26491         dirmngr: Improve error handling.
26492         + commit 6b14df5525777ee0330a34a7b335359f562616a4
26493         * dirmngr/crlcache.c (crl_cache_cert_isvalid): Add missing break.
26494
26495         dirmngr: Fix memory leak.
26496         + commit b223cde311e4e02f7983e33fe3d7214287dfb678
26497         * dirmngr/ldap.c (start_cert_fetch_ldap): Avoid leaking all malloc'ed
26498         arguments.
26499
26500         agent: Improve error handling.
26501         + commit a1650b1edf80c2526c0576547b3a574e8d30f1fa
26502         * agent/trustlist.c (istrusted_internal): Initialize 'err'.
26503
26504         common: Avoid undefined behavior.
26505         + commit eb957ffc4797fb019c505510295af244baf5be38
26506         * common/iobuf.c (iobuf_esopen): Initialize 'len' as 'file_es_filter'
26507         will make use of it.
26508
26509         g10: Avoid undefined behavior.
26510         + commit 52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb
26511         * g10/trust.c (clean_one_uid): Avoid a computation involving an
26512         uninitialized value.
26513
26514         scd: Improve error handling.
26515         + commit 6a37b45a7f13cf5d2ae7d6c9cd796a4bd197b80d
26516         * scd/app-openpgp.c (get_public_key): Improve error handling.
26517
26518 2015-11-18  Justus Winter  <justus@g10code.com>
26519
26520         dirmngr: Gracefully handle premature termination of TLS streams.
26521         + commit eb54fca4bf3ef8e0cd50b01df5b40e0d6d318d7e
26522         * dirmngr/http.c (close_tls_session): New function.
26523         (session_unref): Use the new function to close the TLS stream.
26524         (cookie_read): If the stream terminated prematurely, close it and
26525         return a short read.
26526
26527 2015-11-17  Neal H. Walfield  <neal@g10code.com>
26528             Michael Mönch  <michael.moench@marktjagd.de>
26529
26530         tools: Fix option parsing for gpg-zip.
26531         + commit 84ebf15b06e435453b2f58775f97a3a1c61a7e55
26532         * tools/gpg-zip.in: Correctly set GPG when --gpg is specified.
26533         Correctly set TAR when --tar is specified.  Pass TAR_ARGS to tar.
26534
26535 2015-11-17  Neal H. Walfield  <neal@g10code.com>
26536
26537         gpg: Allow selecting subkeys using a keyid.
26538         + commit 0b86c7463c8c057496b38e06c00f0ae4288dad49
26539         * g10/keyedit.c (menu_select_key): Take an additional argument, p.
26540         Update callers.  If P is a hex string, then assume that P is a key id
26541         or fingerprint and select subkeys with matching key ids or
26542         fingerprints.
26543         * doc/gpg.texi: Update documentation for the key subcommand.
26544
26545 2015-11-17  Justus Winter  <justus@g10code.com>
26546
26547         dirmngr: Fix specifying keyservers by IP address.
26548         + commit 1e3dbb15affd6d75a477aa17715d8e5470988c08
26549         * dirmngr/ks-engine-hkp.c (map_host): Update the original 'hosttable'
26550         entry instead of creating another one.
26551
26552 2015-11-17  Neal H. Walfield  <neal@g10code.com>
26553
26554         gpg: Change keydb_search to not return legacy keys.
26555         + commit 58e4a492e2c8e908d16135486ed601f602f1e38d
26556         * g10/keyring.c (keyring_search): Take new argument, ignore_legacy.
26557         If set, skip any legacy keys.  Update callers.
26558         * g10/keydb.c (keydb_search): Skip any legacy keys.
26559         (keydb_search_first): Don't skip legacy keys.  Treat them
26560         as an error.
26561         (keydb_search_next): Likewise.
26562         (keydb_search_fpr): Likewise.
26563         * g10/export.c (do_export_stream): Likewise.
26564         * g10/getkey.c (lookup): Likewise.
26565         (have_secret_key_with_kid): Likewise.
26566         * g10/keylist.c (list_all): Likewise.
26567         (keyring_rebuild_cache): Likewise.
26568         * g10/keyserver.c (keyidlist): Likewise.
26569         * g10/trustdb.c (validate_key_list): Likewise.
26570
26571         gpg: Correctly handle an error.
26572         + commit 848726f5c02faddb0b0fd24ce1a66893f5325675
26573         * g10/keyring.c (keyring_search): If a compare function returns an
26574         error, treat it as an error.
26575
26576         gpg: Correctly handle keyblocks followed by legacy keys.
26577         + commit ad9befab12376b3a49cde410996ac9f0013d0871
26578         * g10/keyring.c (keyring_get_keyblock): If we encounter a legacy
26579         packet after already having some non-legacy packets, then treat the
26580         legacy packet as a keyblock boundary, not as part of the keyblock.
26581         * g10/t-keydb-get-keyblock.c: New file.
26582         * g10/t-keydb-get-keyblock.gpg: New file.
26583         * g10/Makefile.am (EXTRA_DIST): Add t-keydb-get-keyblock.gpg.
26584         (module_tests): Add t-keydb-get-keyblock.
26585         (t_keydb_get_keyblock_SOURCES): New variable.
26586         (t_keydb_get_keyblock_LDADD): Likewise.
26587
26588         gpg: Make debugging search descriptors easier.
26589         + commit 11ec4785df1646643966d872b1b53ef675092c98
26590         * g10/keydb.c (dump_search_desc): Rename from this...
26591         (keydb_search_desc_dump): ... to this.  Only process a single search
26592         descriptor.  Improve output.  Don't mark as static.  Update callers.
26593
26594         gpg: Add function format_keyid.
26595         + commit a052c30d31c0f6b532fea081f4a9bee083f5440f
26596         * g10/options.h (opt.keyid_format): Add new value KF_DEFAULT.
26597         * g10/keyid.c (format_keyid): New function.
26598         (keystr): Use it.
26599
26600         gpg: Use a more appropriate error code.
26601         + commit eae982ed6d69644258afe9c4ad1be553853d8403
26602         * g10/gpg.c (check_user_ids): Return a more appropriate error code if
26603         a user id is ambiguous.
26604
26605 2015-11-17  Justus Winter  <justus@g10code.com>
26606
26607         Fix typos found using codespell.
26608         + commit a9e0905342e847e8961ec4fe9b3aaedf05e33423
26609         * agent/cache.c: Fix typos.
26610         * agent/call-pinentry.c: Likewise.
26611         * agent/call-scd.c: Likewise.
26612         * agent/command-ssh.c: Likewise.
26613         * agent/command.c: Likewise.
26614         * agent/divert-scd.c: Likewise.
26615         * agent/findkey.c: Likewise.
26616         * agent/gpg-agent.c: Likewise.
26617         * agent/w32main.c: Likewise.
26618         * common/argparse.c: Likewise.
26619         * common/audit.c: Likewise.
26620         * common/audit.h: Likewise.
26621         * common/convert.c: Likewise.
26622         * common/dotlock.c: Likewise.
26623         * common/exechelp-posix.c: Likewise.
26624         * common/exechelp-w32.c: Likewise.
26625         * common/exechelp-w32ce.c: Likewise.
26626         * common/exechelp.h: Likewise.
26627         * common/helpfile.c: Likewise.
26628         * common/i18n.h: Likewise.
26629         * common/iobuf.c: Likewise.
26630         * common/iobuf.h: Likewise.
26631         * common/localename.c: Likewise.
26632         * common/logging.c: Likewise.
26633         * common/openpgp-oid.c: Likewise.
26634         * common/session-env.c: Likewise.
26635         * common/sexputil.c: Likewise.
26636         * common/sysutils.c: Likewise.
26637         * common/t-sexputil.c: Likewise.
26638         * common/ttyio.c: Likewise.
26639         * common/util.h: Likewise.
26640         * dirmngr/cdblib.c: Likewise.
26641         * dirmngr/certcache.c: Likewise.
26642         * dirmngr/crlcache.c: Likewise.
26643         * dirmngr/dirmngr-client.c: Likewise.
26644         * dirmngr/dirmngr.c: Likewise.
26645         * dirmngr/dirmngr_ldap.c: Likewise.
26646         * dirmngr/dns-stuff.c: Likewise.
26647         * dirmngr/http.c: Likewise.
26648         * dirmngr/ks-engine-hkp.c: Likewise.
26649         * dirmngr/ks-engine-ldap.c: Likewise.
26650         * dirmngr/ldap-wrapper.c: Likewise.
26651         * dirmngr/ldap.c: Likewise.
26652         * dirmngr/misc.c: Likewise.
26653         * dirmngr/ocsp.c: Likewise.
26654         * dirmngr/validate.c: Likewise.
26655         * g10/encrypt.c: Likewise.
26656         * g10/getkey.c: Likewise.
26657         * g10/gpg.c: Likewise.
26658         * g10/gpgv.c: Likewise.
26659         * g10/import.c: Likewise.
26660         * g10/keydb.c: Likewise.
26661         * g10/keydb.h: Likewise.
26662         * g10/keygen.c: Likewise.
26663         * g10/keyid.c: Likewise.
26664         * g10/keylist.c: Likewise.
26665         * g10/keyring.c: Likewise.
26666         * g10/mainproc.c: Likewise.
26667         * g10/misc.c: Likewise.
26668         * g10/options.h: Likewise.
26669         * g10/packet.h: Likewise.
26670         * g10/parse-packet.c: Likewise.
26671         * g10/pkclist.c: Likewise.
26672         * g10/pkglue.c: Likewise.
26673         * g10/plaintext.c: Likewise.
26674         * g10/server.c: Likewise.
26675         * g10/sig-check.c: Likewise.
26676         * g10/sqlite.c: Likewise.
26677         * g10/tdbio.c: Likewise.
26678         * g10/test-stubs.c: Likewise.
26679         * g10/tofu.c: Likewise.
26680         * g10/trust.c: Likewise.
26681         * g10/trustdb.c: Likewise.
26682         * g13/create.c: Likewise.
26683         * g13/mountinfo.c: Likewise.
26684         * kbx/keybox-blob.c: Likewise.
26685         * kbx/keybox-file.c: Likewise.
26686         * kbx/keybox-init.c: Likewise.
26687         * kbx/keybox-search-desc.h: Likewise.
26688         * kbx/keybox-search.c: Likewise.
26689         * kbx/keybox-update.c: Likewise.
26690         * scd/apdu.c: Likewise.
26691         * scd/app-openpgp.c: Likewise.
26692         * scd/app-p15.c: Likewise.
26693         * scd/app.c: Likewise.
26694         * scd/ccid-driver.c: Likewise.
26695         * scd/command.c: Likewise.
26696         * scd/iso7816.c: Likewise.
26697         * sm/base64.c: Likewise.
26698         * sm/call-agent.c: Likewise.
26699         * sm/call-dirmngr.c: Likewise.
26700         * sm/certchain.c: Likewise.
26701         * sm/gpgsm.c: Likewise.
26702         * sm/import.c: Likewise.
26703         * sm/keydb.c: Likewise.
26704         * sm/minip12.c: Likewise.
26705         * sm/qualified.c: Likewise.
26706         * sm/server.c: Likewise.
26707         * tools/gpg-check-pattern.c: Likewise.
26708         * tools/gpgconf-comp.c: Likewise.
26709         * tools/gpgkey2ssh.c: Likewise.
26710         * tools/gpgparsemail.c: Likewise.
26711         * tools/gpgtar.c: Likewise.
26712         * tools/rfc822parse.c: Likewise.
26713         * tools/symcryptrun.c: Likewise.
26714
26715 2015-11-16  Neal H. Walfield  <neal@g10code.com>
26716
26717         gpg: Fix error checking and improve error reporting.
26718         + commit 8e2bea22b0927f4f95a248cc7517f407a705d8a8
26719         * g10/gpg.c (check_user_ids): Differentiate between a second result
26720         and an error.  If the key specification is ambiguous or an error
26721         occurs, set RC appropriately.
26722
26723 2015-11-14  Werner Koch  <wk@gnupg.org>
26724
26725         gpg: Use only one fingerprint formatting function.
26726         + commit 3689c2105aab6a4304e9464c5b20207d69b9a133
26727         * g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): New.
26728         * g10/keyid.c (hexfingerprint): Add optional args BUFFER and BUFLEN.
26729         Change all callers.
26730         (format_hexfingerprint): New.
26731         * g10/keylist.c (print_fingerprint): Change to use hexfingerprint.
26732         * g10/tofu.c (fingerprint_format): Remove.  Replace calls by
26733         format_hexfingerprint.
26734
26735 2015-11-13  Werner Koch  <wk@gnupg.org>
26736
26737         gpg: Simplify the tofu interface by using the public key packet.
26738         + commit e7d7160ab7cd4e6b460bfe36fd3a7275adadb4e2
26739         * g10/tofu.c (fingerprint_str): Remove.
26740         (tofu_register): Take a public key instead of a fingerprint as arg.
26741         Use hexfingerprint() to get a fpr from the PK.
26742         (tofu_get_validity): Ditto.
26743         (tofu_set_policy, tofu_get_policy): Simplify by using hexfingerprint.
26744         * g10/trustdb.c (tdb_get_validity_core): Pass the primary key PK to
26745         instead of the fingerprint to the tofu functions.
26746
26747         gpg: Make trusted-key override for Tofu robust against swapped tofu.db.
26748         + commit 7de8376430625c1f6f3a58ae16276deca8ff6a82
26749         * g10/tofu.c (get_trust): For the UTK check lookup the key by
26750         fingerprint.
26751
26752         gpg: Fix regression in --locate-keys (in 2.1.9).
26753         + commit 7e59fb21f728b5f54468cd35b1415a2f86003d4f
26754         * g10/getkey.c (getkey_ctx_s): Add field "extra_list".
26755         (get_pubkey_byname): Store strings in the context.
26756         (getkey_end): Free EXTRA_LIST.
26757
26758 2015-11-12  Werner Koch  <wk@gnupg.org>
26759
26760         gpg: Print a new EXPORTED status line.
26761         + commit 2038adf16d0e7eeb614043aae17b16a867de6b70
26762         * common/status.h (STATUS_EXPORTED): New.
26763         * g10/export.c (print_status_exported): New.
26764         (do_export_stream): Call that function.
26765
26766         gpg: Print export statistics to the status-fd.
26767         + commit e3c48335f9c5081c6080bceafa7a04140403427a
26768         * common/status.h (STATUS_EXPORT_RES): New.
26769         * g10/main.h (export_stats_t): New.
26770         * g10/export.c (export_stats_s): New.
26771         (export_new_stats, export_release_stats): New.
26772         (export_print_stats): New.
26773         (export_pubkeys, export_seckeys, export_secsubkeys)
26774         (export_pubkey_buffer, do_export): Add arg "stats".
26775         (do_export_stream): Add arg stats and update it.
26776         * g10/gpg.c (main) <aExport, aExportSecret, aExportSecretSub>: Create,
26777         pass, and print a stats object to the export function calls.
26778
26779         * g10/export.c (export_pubkeys_stream): Remove unused function.
26780
26781         dirmngr: Do not block during ADNS calls.
26782         + commit a3b26d6c0839ec18d1dc226bb537d5067c86d574
26783         * dirmngr/dns-stuff.c: Include npth.h
26784         (my_unprotect, my_protect): New wrapper.
26785         (resolve_name_adns): Put unprotect/protect around adns calls.
26786         (get_dns_cert): Ditto.
26787         (getsrv): Ditto.
26788         (get_dns_cname): Ditto.
26789
26790         dirmngr: New option --nameserver.
26791         + commit a2cc1d57552ccac7b2f9a0c6423b171b2a168b2a
26792         * dirmngr/dirmngr.c (oNameServer): New.
26793         (opts): Add --nameserver.
26794         (parse_rereadable_options): Act upon oNameServer.
26795         * dirmngr/dns-stuff.c (DEFAULT_NAMESERVER): New.
26796         (tor_nameserver): New.
26797         (set_dns_nameserver): New.
26798         (my_adns_init): Make name server configurable.
26799
26800 2015-11-11  Neal H. Walfield  <neal@g10code.com>
26801
26802         gpg: Fix cache consistency problem.
26803         + commit 7546e818791988c00b8635dab5b899265d8d9f42
26804         g10/keyring.c (keyring_search): Only mark the cache as completely
26805         filled if we start the scan from the beginning of the keyring.
26806
26807 2015-11-10  Neal H. Walfield  <neal@g10code.com>
26808
26809         gpg: Default to the the PGP trust model.
26810         + commit 67c701d1e53f56305e3b8771c683c45bb9672305
26811         * g10/trustdb.c (init_trustdb): If we can't read the trust model from
26812         the trust DB, default to TM_PGP, not TM_TOFU_PGP.
26813
26814         gpg: Default to the flat TOFU DB format.
26815         + commit 951f277b6bf8178560105538d38e2a07a96865bd
26816         * g10/tofu.c (opendbs): If the TOFU DB format is set to auto and there
26817         is no TOFU DB, default to the flat format.
26818
26819 2015-11-09  Werner Koch  <wk@gnupg.org>
26820
26821         dirmngr: Change to new ADNS Tor mode init scheme.
26822         + commit 288c9919dc45496b2380eeac487a8539692d6842
26823         * dirmngr/dns-stuff.c (tor_credentials): New.
26824         (enable_dns_tormode): Add arg new_circuit and update tor_credentials.
26825         (my_adns_init): Rework to set Tor mode using a config file options and
26826         always use credentials.
26827         * dirmngr/server.c (cmd_dns_cert): Improve error message.
26828         * dirmngr/t-dns-stuff.c (main): Add option --new-circuit.
26829
26830         dirmngr: Improve detection of ADNS.
26831         + commit f92e95175e90120362a7d6376fb32307e11267b5
26832         * configure.ac (HAVE_ADNS_FREE): New ac_define.
26833
26834 2015-11-09  NIIBE Yutaka  <gniibe@fsij.org>
26835
26836         scd: Add reder information to --card-status.
26837         + commit bce0e3f71df0709a7d323a688ddf2690c1727a6c
26838         * g10/call-agent.h, g10/call-agent.c (agent_release_card_info)
26839         g10/card-util.c (card_status): Add READER.
26840         * scd/apdu.c (close_ccid_reader, open_ccid_reader): Handle RDRNAME.
26841         (apdu_get_reader_name): New.
26842         * scd/ccid-driver.c (ccid_open_reader): Add argument to RDRNAME_P.
26843         * scd/command.c (cmd_learn): Return READER information.
26844
26845 2015-11-06  Werner Koch  <wk@gnupg.org>
26846
26847         gpg: Avoid new strings.
26848         + commit 2242658efe0c975a46c3316bc9171ddbce085e2c
26849         * g10/decrypt-data.c (decrypt_data): Use already translated strings.
26850
26851         common: Fix commit f99830b.
26852         + commit 20125333e7b822e8c70ac8cef986649f0654eb56
26853         * common/userids.c (classify_user_id): Avoid underflow.  Use spacep to
26854         also trim tabs.
26855
26856 2015-11-06  Neal H. Walfield  <neal@g10code.com>
26857
26858         gpg: Fix formatting string.
26859         + commit 28e198201e580b39bceb9c151df07fc0e936a91d
26860         * g10/decrypt-data.c (decrypt_data): Fix formatting string.
26861
26862         gpg: Add new option --only-sign-text-ids.
26863         + commit a74aeb5dae1f673fcd98b39a6a0496f3c622709a
26864         * g10/options.h (opt): Add field only_sign_text_ids.
26865         * g10/gpg.c (enum cmd_and_opt_values): Add value oOnlySignTextIDs.
26866         (opts): Handle oOnlySignTextIDs.
26867         (main): Likewise.
26868         * g10/keyedit.c (sign_uids): If OPT.ONLY_SIGN_TEXT_IDS is set, don't
26869         select non-text based IDs automatically.
26870         (keyedit_menu): Adapt the prompt asking to sign all user ids according
26871         to OPT.ONLY_SIGN_TEXT_IDS.
26872         * doc/gpg.texi: Document the new option --only-sign-text-ids.
26873
26874         common: When classifying keyids and fingerprints, reject trailing junk.
26875         + commit f99830b72812395da5451152bdd2f2d90a7cb7fb
26876         * common/userids.c (classify_user_id): Trim any trailing whitespace.
26877         Before assuming that a hexstring corresponds to a key id or
26878         fingerprint, make sure that it is NUL terminated.
26879
26880         gpg: Check for ambiguous or non-matching key specs.
26881         + commit e8c53fca954d33366e3494a6d4eecc3868282bcc
26882         * g10/gpg.c (check_user_ids): New function.
26883         (main): Check that any user id specifications passed to --local-user
26884         and --remote-user correspond to exactly 1 user.  Check that any user
26885         id specifications passed to --default-key correspond to at most 1
26886         user.  Warn if any user id specifications passed to --local-user or
26887         --default-user are possible ambiguous (are not specified by long keyid
26888         or fingerprint).
26889         * g10/getkey.c (parse_def_secret_key): Don't warn about possible
26890         ambiguous key descriptions here.
26891
26892         common: Add new function strlist_rev.
26893         + commit f38bac8883ea2e9ed8e2836f97a953efb85e774c
26894         * common/strlist.c (strlist_rev): New function.
26895         * common/t-strlist.c: New file.
26896         * common/Makefile.am (common_sources): Add strlist.c and strlist.h.
26897         (module_tests): Add t-strlist.
26898         (t_strlist_LDADD): New variable.
26899
26900         common: Include required, but not included headers in t-support.h.
26901         + commit 23e163473f050d1f2c08f589beb9dab283b7d624
26902         * common/t-support.h: Include <stdlib.h> and <stdio.h>.
26903
26904 2015-11-05  Neal H. Walfield  <neal@g10code.com>
26905
26906         gpg: Indicate which characters are invalid.
26907         + commit a958ffd148a46f3757d1c309bb13555638044640
26908         * g10/keygen.c (ask_user_id): Indicate which characters are invalid.
26909
26910         gpg: Add support for unwrapping the outer level of encryption.
26911         + commit ec409e62aea6cc829299be794f9d035d033cb51b
26912         * g10/decrypt-data.c (decrypt_data): If OPT.UNWRAP_ENCRYPTION is set,
26913         copy the data to the output file instead of continuing to process it.
26914         * g10/gpg.c (enum cmd_and_opt_values): Add new value oUnwrap.
26915         (opts): Handle oUnwrap.
26916         (main): Likewise.
26917         * g10/options.h (opt): Add field unwrap_encryption.
26918         * g10/plaintext.c (handle_plaintext): Break the output file selection
26919         functionality into ...
26920         (get_output_file): ... this new function.
26921
26922         common: Add a function for copying data from one iobuf to another.
26923         + commit fd4b9e232805b2e30b29903568c95cc0aad8bbec
26924         * common/iobuf.c (iobuf_copy): New function.
26925
26926         doc: Note that gpgkey2ssh is deprecated.
26927         + commit 2b0e0a53b4db8c44e299f57a9f4f9fc1b825e707
26928         * doc/tools.texi (gpgkey2ssh): Note that gpgkey2ssh is deprecated.
26929
26930         tools: Fix gpgkey2ssh's most gratuitous errors.  Use gpg2, not gpg.
26931         + commit cd2d685230ecafb7df504ef2b16cf1ec9a014300
26932         * tools/gpgkey2ssh.c (main): Add support for --help.  Replace the most
26933         gratuitous asserts with error messages.  Invoke gpg2, not gpg.
26934
26935 2015-11-05  Neal H. Walfield  <neal@g10code.com>
26936             Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
26937
26938         doc: Add documentation for gpgkey2ssh.
26939         + commit 2b27acc3435e73fad7460b551a36b4064cdd58be
26940         * doc/tools.texi: Add documentation for gpgkey2ssh.
26941
26942 2015-11-04  Neal H. Walfield  <neal@g10code.com>
26943
26944         gpg: Print a better error message for --multifile --sign --encrypt.
26945         + commit 6897bbf1aa9bf0a61b186ea1a9bcb463fb1fd10e
26946         * g10/gpg.c (main): Print a better error message for --multifile
26947         --sign --encrypt.
26948
26949         gpg: Add --encrypt-to-default-key.
26950         + commit de9b2340153d70b083494d1a277a384dcf43bff0
26951         * g10/getkey.c (parse_def_secret_key): Drop the static qualifier and
26952         export the function.
26953         * g10/gpg.c (enum cmd_and_opt_values): Add value oEncryptToDefaultKey.
26954         (opts): Handle oEncryptToDefaultKey.
26955         (main): Likewise.
26956         * g10/options.h (opt): Add field encrypt_to_default_key.
26957
26958         gpg: Allow multiple --default-key options.  Take the last available key.
26959         + commit e16d7168c54e5f7bc2f0037806ee4f730930eaf0
26960         * g10/getkey.c (parse_def_secret_key): New function.
26961         (get_seckey_default): Add parameter ctrl.  Update callers.  Use
26962         parse_def_secret_key to get the default secret key, if any.
26963         (getkey_byname): Likewise.
26964         (enum_secret_keys): Likewise.
26965         * g10/options.h (opt): Change def_secret_key's type from a char * to a
26966         strlist_t.
26967         * g10/gpg.c (main): When processing --default-key, add the key to
26968         OPT.DEF_SECRET_KEY.
26969         * g10/gpgv.c (get_session_key): Add parameter ctrl.  Update callers.
26970         * g10/mainproc.c (proc_pubkey_enc): Likewise.
26971         (do_proc_packets): Likewise.
26972         * g10/pkclist.c (default_recipient): Likewise.
26973         * g10/pubkey-enc.c (get_session_key): Likewise.
26974         * g10/sign.c (clearsign_file): Likewise.
26975         (sign_symencrypt_file): Likewise.
26976         * g10/skclist.c (build_sk_list): Likewise.
26977         * g10/test-stubs.c (get_session_key): Likewise.
26978
26979 2015-11-04  NIIBE Yutaka  <gniibe@fsij.org>
26980
26981         scd: Fix error handling with libusb-compat library.
26982         + commit 1e94a672efb8bf66f416bc63bf6670e509a21fe5
26983         * scd/ccid-driver.c (bulk_out): Use LIBUSB_ERRNO_NO_SUCH_DEVICE.
26984
26985         scd: fix change_keyattr.
26986         + commit c5a9fedba66361ddd9f596528882750068543298
26987         * scd/app-openpgp.c (change_keyattr_from_string): Fix parsing.
26988
26989 2015-11-03  Werner Koch  <wk@gnupg.org>
26990
26991         gpg: Change out of core error message.
26992         + commit 44ad9f29d43f40bbc1840454880f4af3df1c5295
26993         * g10/tofu.c (fingerprint_str): Die with the error code returned by
26994         the failed function.
26995         (time_ago_str): Ditto.  Do not make a comma translatable.
26996         (fingerprint_format): Use "%zu" for a size_t.
26997
26998         gpg: Make translation easier.
26999         + commit 62b8cd5495dcac9a0f8a3d88c7bd4cd80997fd3f
27000         * g10/import.c (import_secret_one): Split info string for easier
27001         translation.
27002
27003 2015-11-03  Neal H. Walfield  <neal@g10code.com>
27004
27005         gpg: Also show when the most recently signed message was observed.
27006         + commit 621afac37e5555fd68054531e611ead444b62928
27007         * g10/tofu.c (show_statistics): Also show when the most recently
27008         signed message was observed.
27009
27010         gpg: Split a utility function out of a large function.
27011         + commit 36326112290b6eef47c9dada30dddbdf408680e4
27012         * g10/tofu.c (show_statistics): Break the time delta to string code
27013         into...
27014         (time_ago_str): ... this new function.
27015
27016         gpg: Fix message formatting.
27017         + commit c8ef9f9a64d13ea8b9b4ade62525243abe2976ba
27018         * g10/tofu.c (get_trust): Fix message formatting.
27019
27020         gpg: Don't store formatting fingerprints in the TOFU DB.
27021         + commit 8ae3946d28c43e30ef692ba6cf1a7fa4ed65ecc5
27022         * g10/tofu.c (fingerprint_pp): Split this function into...
27023         (fingerprint_str): ... this function...
27024         (fingerprint_format): ... and this function.
27025         (record_binding): Store the unformatted fingerprint in the DB.  Only
27026         use the formatting fingerprint when displaying a message to the user.
27027         (get_trust): Likewise.
27028         (show_statistics): Likewise.
27029         (tofu_register): Likewise.
27030         (tofu_get_validity): Likewise.
27031         (tofu_set_policy): Likewise.
27032         (tofu_get_policy): Likewise.
27033
27034 2015-11-02  NIIBE Yutaka  <gniibe@fsij.org>
27035
27036         g10: notify a user when importing stub is skipped.
27037         + commit 06f3eadb22986d9ebde9efff2794eb1d45d6c6d4
27038         * g10/import.c (transfer_secret_keys): Return GPG_ERR_NOT_PROCESSED
27039         when stub_key_skipped.
27040         (import_secret_one): Notify a user, suggesting --card-status.
27041
27042 2015-10-31  Neal H. Walfield  <neal@g10code.com>
27043
27044         gpg: Consider newlines to be whitespace in an SQL statement.
27045         + commit 18cd09246f5dcddcafb8662afd84fa046e36de3f
27046         * g10/sqlite.c (sqlite3_stepx): When making sure that there is no
27047         second SQL statement, ignore newlines.
27048
27049 2015-10-30  Werner Koch  <wk@gnupg.org>
27050
27051         common: Improve t-zb32 to be used for manual encoding.
27052         + commit d89a9fca46d9bba497dde0793b57217c800b0e8d
27053         * common/t-support.h (no_exit_on_fail, errcount): New.
27054         (fail): Bump errcount.
27055         * common/t-zb32.c (main): Add options to allow manual use.
27056
27057         common: Add separate header for zb32.c.
27058         + commit 5aadb4b62d26e1bfb40a1ce444a81c2a5a56159c
27059         * common/util.h (zb32_encode): Move prototype to ...
27060         * common/zb32.h: new.  Include this for all callers of zb32_encode.
27061
27062 2015-10-29  Neal H. Walfield  <neal@g10code.com>
27063
27064         gpg: Display the correct error message.
27065         + commit 641df615da4937b0073c420a0503c5810c237972
27066         * g10/trustdb.c (validate_keys): If tdbio_update_version_record fails,
27067         RC does not contain the error code.  Save the error code in rc2 and
27068         use that.
27069
27070         gpg: Eliminate a memory leak.
27071         + commit d68bdc553a206e54234d5d53ad35c4ba34133118
27072         * g10/trustdb.c (validate_key_list): Don't leak the keyblocks on
27073         failure.
27074
27075         gpg: Remove unused prototype.
27076         + commit ef052591ba51ee16bafc3c5b79d837ed8f01b520
27077         g10/keyring.h (keyring_locate_writable): Remove unused prototype.
27078
27079         gpg: Eliminate a memory leak.
27080         + commit 89eee5f6b7ca3da7ebdcc3e5d069701d0834b39e
27081         * g10/gpg.c (main): Don't leak OPT.DEF_RECIPIENT.
27082
27083         gpg: Fix keyring support.
27084         + commit 99c84b49b787dab8da26cf61eed24dd4a2b77fd9
27085         * g10/keydb.c (keydb_rebuild_caches): Only mark the cached as prepared
27086         if it is actually prepared, which it only is if the resource is a
27087         keybox.
27088
27089         gpg: Change sqlite3_stepx to pass the sqlite3_stmt * to the callback.
27090         + commit 421827424fe87855307fe3e803b42ffa02738600
27091         * g10/sqlite.h (enum sqlite_arg_type): Add SQLITE_ARG_BLOB.
27092         (sqlite3_stepx_callback): New declaration.
27093         (sqlite3_stepx): Change the callback's type to sqlite3_stepx_callback,
27094         which passes an additional parameter, the sqlite3_stmt *.  Update
27095         users.
27096
27097         gpg: Move sqlite helper functions into their own file.
27098         + commit 351f4213e192aa11500c0c590d11183edbe326c5
27099         * g10/tofu.c (sqlite3_exec_printf): Move from here...
27100         * g10/sqlite.c (sqlite3_exec_printf): ... to this new file.  Don't
27101         mark as static.
27102         * g10/tofu.c (sqlite3_stepx): Move from here...
27103         * g10/sqlite.c (sqlite3_stepx): ... to this new file.  Don't
27104         mark as static.
27105         * g10/tofu.c (enum sqlite_arg_type): Move from here...
27106         * g10/sqlite.h (enum sqlite_arg_type): ... to this new file.
27107
27108 2015-10-29  NIIBE Yutaka  <gniibe@fsij.org>
27109
27110         doc: Don't install gpg-zip.1.
27111         + commit d25e29ad9374da1c11ccfc38f392dbab2d707042
27112         * doc/Makefile.am (myman_pages): Remove gpg-zip.1.
27113         (DISTCLEANFILES): Add gpg-zip.1.
27114
27115 2015-10-28  Werner Koch  <wk@gnupg.org>
27116
27117         sm: Allow combination of usage flags --gen-key.
27118         + commit 8b6c83dcb086ef09b2676e4d5b0111c88b7b8bf8
27119         * sm/certreqgen.c (create_request): Re-implement building of the
27120         key-usage extension.
27121
27122 2015-10-28  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
27123
27124         doc: Document some changed default options.
27125         + commit e095a3fcf2ccc6cc4e258111dc395558069a1164
27126         * doc/gpg.texi: Update the description of some options which are
27127           now enabled by default.
27128
27129 2015-10-28  Werner Koch  <wk@gnupg.org>
27130
27131         dirmngr: Fix NULL-deref while loading a CRL.
27132         + commit fa15a71daff8414bf4112bc2826dc495ff2fb01f
27133         * dirmngr/crlcache.c (crl_parse_insert): Set error before leaping to
27134         failure.
27135
27136         dirmngr: Minor cleanup of the SRV RR code.
27137         + commit 949a5cfdabcafab93c1ac092c0459b59318805b9
27138         * dirmngr/dns-stuff.c: Include unistd.h.
27139         (getsrv): Run srand only once.
27140         * dirmngr/t-dns-stuff.c (main): Allow passing another name for --srv
27141         and change output format.
27142
27143         dirmngr: Add a getaddrinfo wrapper backend using ADNS.
27144         + commit e026efb4363bc6e3c41ed533daf06f103ebd2e32
27145         * dirmngr/dns-stuff.c: Replace all use of default_errsource.
27146         (my_adns_init): Move to top.
27147         (resolve_name_adns): New.
27148         (resolve_dns_name) [USE_ADNS]: Divert to new func.
27149
27150 2015-10-26  Werner Koch  <wk@gnupg.org>
27151
27152         gpg: Do not call an extra get_validity if no-show-uid-validity is used.
27153         + commit a6c2c098435a703ca02abf651ff4fa45e5a4db9a
27154         * g10/mainproc.c (check_sig_and_print): Do not call the informational
27155         get_validity if we are not going to use it.
27156
27157 2015-10-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
27158
27159         gpg: Ensure all weak digest rejection notices are shown.
27160         + commit 91015d021b3dcbe21ad0e580a4f34c523abf9e72
27161         * g10/main.h: Add rejection_shown flag to each weakhash struct
27162         * g10/misc.c (print_digest_algo_note, additional_weak_digest): Do not
27163         treat MD5 separately; (print_digest_rejected_note): Use
27164         weakhash.rejection_shown instead of static shown.
27165         * g10/options.h (opt): Change from additional_weak_digests to
27166         weak_digests.
27167         * g10/sig-check.c: Do not treat MD5 separately.
27168         * g10/gpg.c (main): Explicitly set MD5 as weak.
27169         * g10/gpgv.c (main): Explicitly set MD5 as weak.
27170
27171 2015-10-26  Werner Koch  <wk@gnupg.org>
27172
27173         w32: Make it build again if Tofu support is not available.
27174         + commit 0d37a40fc34519e93af3ceffff2cd726d29576d3
27175         * g10/keylist.c (public_key_list) [!USE_TOFU]: Do not call tofu
27176         functions.
27177
27178         dirmngr: Support Tor hidden services.
27179         + commit 4524a2a3714f263d56bb7db349c169b456994fd9
27180         * dirmngr/dns-stuff.c (is_onion_address): New.
27181         * dirmngr/ks-engine-hkp.c (hostinfo_s): Add field "onion".
27182         (map_host): Special case onion addresses.
27183         (ks_hkp_print_hosttable): Print an 'O' for an onion address.
27184         * dirmngr/http.c (connect_server): Special case onion addresses.
27185
27186         dirmngr,w32: Remove gethostbyname hack and make it build again.
27187         + commit 7735bbe539af35ce16e270946d5ae798c5989d6e
27188         * dirmngr/http.c (connect_server) [W32]: Remove gethostbyname hack;
27189         we require getaddrinfo anyway.
27190         * dirmngr/dns-stuff.c (AI_ADDRCONFIG): Add replacement if not defined.
27191         (map_eai_to_gpg_error) [W32]: Take care of unsupported codes.
27192
27193 2015-10-26  Neal H. Walfield  <neal@g10code.com>
27194
27195         gpg: Make sure we only have a single SQL statement.
27196         + commit c18fb0d99b633bb267dead6e7c46229f4b780bc3
27197         * g10/tofu.c (sqlite3_stepx): Make sure SQL only contains a single SQL
27198         statement.
27199
27200         gpg: When the TOFU DB is in batch mode, periodically drop the locks.
27201         + commit 5b0ed7674dc718ee98e0c80aa93ce014f2b51411
27202         * g10/tofu.c: Include <sched.h>.
27203         (batch_update_started): New variable.
27204         (begin_transaction): If we've been in batch mode for a while, then
27205         commit any extant batch transactions.
27206         (tofu_begin_batch_update): If we are not in batch mode, initialize
27207         batch_update_started.
27208
27209 2015-10-25  Werner Koch  <wk@gnupg.org>
27210
27211         dirmngr: Add workaround for broken getaddrinfo.
27212         + commit 5e7ac031f513ad3b60e4f092fa72b3bec0676515
27213         * dirmngr/dns-stuff.c (resolve_name_standard): On failure retry by
27214         first resolving the CNAME.
27215         (get_dns_cname): New.
27216
27217         * dirmngr/t-dns-stuff.c (main): Add option --cname.
27218
27219         dirmngr: Better handle systems without IPv6 or IPv4.
27220         + commit 0e3c9f184a5fb3e41277700d690febc2eee9600a
27221         * dirmngr/dns-stuff.c (resolve_name_standard): Use AI_ADDRCONFIG.
27222
27223         dirmngr: Replace use of getnameinfo by resolve_dns_addr.
27224         + commit 927f34603d942868af6a7bd0f347681bbad76a94
27225         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Remove.
27226         (map_host): Use resolve_dns_addr.
27227
27228         dirmngr: Implement a getnameinfo wrapper.
27229         + commit 816505958ac4308ee0dfe787d1b706982428b6cc
27230         * dirmngr/dns-stuff.h (DNS_NUMERICHOST): New.
27231         (DNS_WITHBRACKET): New.
27232         * dirmngr/dns-stuff.c (resolve_name_standard): Factor code out to...
27233         (map_eai_to_gpg_error): new.
27234         (resolve_addr_standard): New.
27235         (resolve_dns_addr): New.
27236
27237         * dirmngr/ks-engine-hkp.c (is_ip_address): Move to ...
27238         * dirmngr/dns-stuff.c (is_ip_address): here.  Add support for non
27239         bracketed v6 addresses.
27240
27241         * dirmngr/t-dns-stuff.c: Remove header netdb.h.
27242         (main): Add option --bracket.  Use resolve_dns_name instead of
27243         getnameinfo.
27244
27245 2015-10-23  Neal H. Walfield  <neal@g10code.com>
27246
27247         gpg: Provide an interface to patch TOFU updates.
27248         + commit 7f65e84ac035e8f7a25639a6b09eb6000115e337
27249         * g10/tofu.c (struct db): Rename begin_transaction to savepoint_batch.
27250         Rename end_transaction to savepoint_batch_commit.  Update users.
27251         Remove field rollback.  Add fields savepoint_inner and
27252         savepoint_inner_commit.  Add field batch_update.
27253         (dump_cache): New function.
27254         (batch_update): New variable.
27255         (begin_transaction). New function.
27256         (end_transaction): New function.
27257         (rollback_transaction): New function.
27258         (tofu_begin_batch_update): New function.
27259         (tofu_end_batch_update): New function.
27260         (closedb): End any pending batch transaction.
27261         (closedbs): Assert that none of the DBs have a started batch
27262         transaction if we not in batch mode.
27263         (record_binding): Use the begin_transaction, end_transaction and
27264         rollback_transaction functions instead of including the SQL inline.
27265         Also start a batch mode transaction if we are using the flat format.
27266         (tofu_register): Use the begin_transaction, end_transaction and
27267         rollback_transaction functions instead of including the SQL inline.
27268         * g10/gpgv.c (tofu_begin_batch_update): New function.
27269         (tofu_end_batch_update): New function.
27270         * g10/test-stubs.c (tofu_begin_batch_update): New function.
27271         (tofu_end_batch_update): New function.
27272
27273         gpg: Cache prepared SQL queries and open DB connections.
27274         + commit 297cf8660ce346638e42934d84d746768f8bb10a
27275         * g10/tofu.c: Include <stdarg.h>.
27276         (prepares_saved) [DEBUG_TOFU_CACHE]: New variable.
27277         (queries) [DEBUG_TOFU_CACHE]: New variable.
27278         (struct db): Add fields prevp, begin_transaction, end_transaction,
27279         rollback, record_binding_get_old_policy, record_binding_update,
27280         record_binding_update2, get_policy_select_policy_and_conflict,
27281         get_trust_bindings_with_this_email, get_trust_gather_other_user_ids,
27282         get_trust_gather_other_keys, register_already_seen, and
27283         register_insert.
27284         [DEBUG_TOFU_CACHE]: Add field hits.
27285         (STRINGIFY): New macro.
27286         (STRINGIFY2): New macro.
27287         (enum sqlite_arg_type): New enum.
27288         (sqlite3_stepx): New function.
27289         (combined_db): Remove variable.
27290         (opendb): Don't cache the combined db.
27291         (struct dbs): New struct.  Update users to use this as the head of the
27292         local DB list rather than overloading struct db.
27293         (unlink_db): New function.
27294         (link_db): New function.
27295         (db_cache): New variable.
27296         (db_cache_count): New variable.
27297         (DB_CACHE_ENTRIES): Define.
27298         (getdb): If the dbs specific cache doesn't include the DB, look at
27299         DB_CACHE.  Only if that also doesn't include the DB open the
27300         corresponding DB.
27301         (closedb): New function.
27302         (opendbs): Don't open the combined DB.  Just return an initialized
27303         struct dbs.
27304         (closedbs): Don't close the dbs specific dbs.  Attach them to the
27305         front of DB_CACHE.  If DB_CACHE contains more than DB_CACHE_ENTRIES,
27306         close enough dbs from the end of the DB_CACHE list such that DB_CACHE
27307         only contains DB_CACHE_ENTRIES.  Don't directly close the dbs, instead
27308         use the new closedb function.
27309         [DEBUG_TOFU_CACHE]: Print out some statistics.
27310         (record_binding): Use sqlite3_stepx instead of sqlite3_exec or
27311         sqlite3_exec_printf.
27312         (get_policy): Likewise.
27313         (get_trust): Likewise.
27314         (tofu_register): Likewise.
27315
27316         gpg: Return the DBs meta-handle rather than the sqlite3 handle.
27317         + commit cd879d4bd69a578be5a1ff96497f8c1181885563
27318         * g10/tofu.c (getdb): Return a struct db * instead of an sqlite *.
27319         Update users.
27320
27321         gpg: Use the proper type.
27322         + commit 3c4c89cc35280164b509977c5288b0a06d6f530e
27323         * g10/options.h: Include "tofu.h".
27324         (opt.tofu_default_policy): Change type to enum tofu_policy.
27325         * g10/gpgv.c (enum tofu_policy): Don't redeclare.
27326         * g10/test-stubs.c (enum tofu_policy): Likewise.
27327
27328 2015-10-22  Werner Koch  <wk@gnupg.org>
27329
27330         dirmngr: Implement Tor mode for SRV RRs.
27331         + commit 8b06d7f41aec6cb993445935dba7c60e033d026a
27332         * dirmngr/dns-stuff.c (get_dns_cert): Factor adns init out to...
27333         (my_adns_init): new.
27334         (getsrv)[USE_ADNS]: Use my_adns_init.
27335         (getsrv)[!USE_ADNS]: Return an error if Tor mode is active.
27336
27337         * dirmngr/t-dns-stuff.c: Add option --use-tor.
27338
27339         dirmngr: Do not use MAXDNAME.
27340         + commit e03a4a94bb67d4a6c958b37671f83456e203f325
27341         * dirmngr/dns-stuff.c (getsrv): Replace MAXDNAME.
27342         * dirmngr/dns-stuff.h (MAXDNAME): Remove.
27343         (struct srventry): Use a fixed value instead of MAXDNAME.
27344         * dirmngr/http.c (connect_server): Use DIMof instead of MAXDNAME.
27345         Malloc a helper array.
27346
27347         Move SRV RR code from common/ to dirmngr/.
27348         + commit 41bb01ae792af78edd28bf1b735cacc0b3ac428a
27349         * common/srv.c: Merge into dirmngr/dns-stuff.c.  Delete file.
27350         * common/srv.h: Merge into dirmngr/dns-stuff.h.  Delete file.
27351         * common/Makefile.am (common_sources): Remove srv.c and srv.h.
27352         * g10/keyserver.c: Do not include srv.h.  The code using it is anyway
27353         disabled.
27354         * dirmngr/http.c: Remove header srv.h and stubs.
27355         * dirmngr/t-dns-stuff.c: Add option --srv.
27356
27357 2015-10-21  Werner Koch  <wk@gnupg.org>
27358
27359         dirmngr: Use the new DNS wrapper for the HTTP module.
27360         + commit 1e34007c972c1d7730cfcacd88f6bbebba7dec1d
27361         * dirmngr/t-http.c (main): Init assuan sockets.
27362         * dirmngr/http.c: Include dns-stuff.h.
27363         (connect_server)[!HAVE_GETADDRINFO]: Remove all code.
27364         (connect_server): Change to use resolve_dns_name.
27365
27366         dirmngr: Allow use of http.c if USE_NPTH is not defined.
27367         + commit b6af3377e14fad35b9c6041b11888cabce6e8a56
27368         * dirmngr/http.c (send_request): Always set the gnutls pull/push
27369         functions.
27370         (my_npth_read): Rename to ...
27371         (my_gnutls_read) .. this.  Use system read if !USE_NPTH.
27372         (my_npth_write): Rename to ...
27373         (my_gnutls_write) .. this.  Use system write if !USE_NPTH.
27374
27375         dirmngr: Check that getaddrinfo is available.
27376         + commit 6fafda979df8e7e117f8e6929bcce89513a6e746
27377         * dirmngr/Makefile.am (t_http_SOURCES): Add dns-stuff.c.
27378         (t_ldap_parse_uri_SOURCES): Ditto.
27379         * dirmngr/dns-stuff.c: Bail out if neither ADNS nor getaddrinfo is
27380         available.
27381
27382         dirmngr: Use the new DNS wrapper for the HKP engine.
27383         + commit afbe87fa2d259b665b2d67a038a8535cfcfee094
27384         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Change arg type to
27385         dns_addrinfo_t.
27386         (map_host): Replace getaddrinfo by resolve_dns_name.
27387
27388         dirmngr: Implement a getaddrinfo wrapper.
27389         + commit 8bccbf477878fd99baa96e11db9db99aaf1e8d91
27390         * dirmngr/dns-stuff.h: Include some header files.
27391         (dns_addinfo_t, dns_addrinfo_s): New.
27392         * dirmngr/dns-stuff.c: Always include DNS related headers.
27393         (free_dns_addrinfo): New.
27394         (resolve_name_standard): New.
27395         (resolve_dns_name): New.
27396
27397         * dirmngr/t-dns-stuff.c: Include netdb.h.
27398         (main): Keep old default mode with no args but else print outout of
27399         resolve_dns_name.  Revamp option parser.
27400
27401         common: Add more replacement error codes.
27402         + commit ffe60eb3d2b8f7d6c506804ce4645d695c91f237
27403         * common/util.h (GPG_ERR_SERVER_FAILED): New.
27404         (GPG_ERR_NO_KEY): New.
27405         (GPG_ERR_NO_NAME): New.
27406
27407 2015-10-21  Neal H. Walfield  <neal@g10code.com>
27408
27409         gpg: If the saved trust model is unknown, default to tofu+pgp.
27410         + commit 9afeb4cca10c3632495fe71b23df99a4878bd3a5
27411         * g10/trustdb.c (init_trustdb): If the saved trust model is unknown,
27412         default to tofu+pgp instead of pgp.
27413
27414         gpg: Don't accidentally free UTK_LIST.
27415         + commit 8c3b7915d675ca5346c17244654d5c6ab583ac44
27416         * g10/trustdb.c (validate_keys): Don't free UTK_LIST.
27417
27418         gpg: When evaluating trust reg exps, treat tofu+pgp like pgp.
27419         + commit cbaca254ac818c49c18d4480d3c7bd246cc57ae8
27420         * g10/trustdb.c (validate_one_keyblock): When checking trust regular
27421         expressions, treat the tofu+pgp trust model the same as the pgp trust
27422         model.
27423
27424         gpg: If a key is ultimate trusted, return that in the tofu model.
27425         + commit df57390d68482c5b3fa5ff3a42a29ae1b6cbb23c
27426         * g10/tofu.c (get_trust): If the policy is auto or none, check if the
27427         key is ultimately trusted.  If so, return that.
27428         (tofu_register): If the key is ultimately trusted, don't show any
27429         statistics.
27430         (tofu_get_validity): Likewise.
27431
27432         gpg: Keep the trust DB up to date for the tofu and tofu+pgp models.
27433         + commit d05ff81732e20e6f9d6d7a6281a96a312b001abb
27434         * g10/trustdb.c (init_trustdb): Recognize tofu and tofu+pgp as
27435         possibly saved trust models.  Also register the ultimately trusted
27436         keys if the trust model is tofu or tofu+pgp.
27437         (check_trustdb): Don't skip if the trust model is tofu or tofu+pgp.
27438         (update_trustdb): Likewise.
27439         (tdb_check_trustdb_stale): Likewise.
27440         (validate_keys): If the trust model is TOFU, just write out the
27441         ultimately trusted keys.
27442
27443         gpg: Factor out code into a standalone function.
27444         + commit 243f90afba87e99ca42e2451ac5cc59d00a044ac
27445         * g10/trustdb.c (tdb_keyid_is_utk): New function.
27446         (add_utk): Use it.
27447
27448         dirmngr: Allow building with libassuan < 2.3.
27449         + commit a79045e38d239a7f6e787cf7c1132772c737cc0e
27450         * dirmngr/http.c (send_request): Use newer assuan function only if
27451         available.
27452
27453 2015-10-21  Neal H. Walfield  <neal@g10code.com>
27454             Andre Heinecke  <aheinecke@intevation.de>
27455
27456         gpg: Make the tofu DB check and initialization atomic.
27457         + commit 85bd7d9491f8cc13c2b03f19b4f70ea13b45c704
27458         * g10/tofu.c (initdb): Make the version check and the database
27459         initialization atomic.
27460
27461 2015-10-21  Werner Koch  <wk@gnupg.org>
27462
27463         build: Make --disable-g13 the default.
27464         + commit 485e0a221deb5c68f29b6a7a110b349dbe41c027
27465         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --enable-g13.  Remove
27466         --enable-gpgtar because that is enabled anyway.
27467         * configure.ac: Do not build g13 by default.
27468
27469         dirmngr: Rename file dns-cert.c.
27470         + commit 5055b617a94587580bc16a56bb82333077b05693
27471         * dirmngr/dns-cert.c: Rename to dirmngr/dns-stuff.c.
27472         * dirmngr/dns-cert.h: Rename to dirmngr/dns-stuff.h and change
27473         includers.
27474         * dirmngr/t-dns-cert.c: Rename to dirmngr/t-dns-stuff.c.
27475         * dirmngr/Makefile.am: Adjust.
27476
27477         common: Add status code for use by g13.
27478         + commit 42571a38344e39f747315f754700a8181b8744fe
27479         * common/status.h (STATUS_PLAINTEXT_FOLLOWS): New.
27480
27481 2015-10-20  Werner Koch  <wk@gnupg.org>
27482
27483         dirmngr: Prefer ADNS over system resolver.
27484         + commit 58ebe50bdf4837e9ab2d3f8c6e5fcf28c66f26e9
27485         * configure.ac (HAVE_ADNS_IF_TORMODE): New ac_define.
27486         (USE_DNS_CERT): Prefer ADNS over the system resolver.
27487         * dirmngr/dns-cert.c (tor_mode): New global var.
27488         (enable_dns_tormode): New func.
27489         (get_dns_cert): Use DNS resolver at 8.8.8.8 in tor-mode.
27490         * dirmngr/server.c (cmd_dns_cert): If supported allow DNS requests.
27491
27492         w32: Allow building again.
27493         + commit c83b627174f46e841f1ccc018322fe499969c267
27494         * dirmngr/http.c (connect_server): Fix called function name.
27495
27496         build: Allow building without SQLlite support.
27497         + commit 734c61dc9d4915605816803182c9adcc1594e008
27498         * configure.ac: Add option --dsiable-tofu and --disable-sqlite.
27499         (NEED_SQLITE_VERSION): New var.
27500         (USE_TOFU): New ac_define and am_conditional.
27501         * autogen.sh (build-w32): Add PKG_CONFIG_LIBDIR to configure so that
27502         pkg-config find the correct .pc file.
27503
27504         * g10/Makefile.am (tofu_source): New.  Build only if enabled.
27505         * g10/gpg.c (parse_trust_model)[!USE_TOFU]: Disable tofu models.
27506         (parse_tofu_policy)[!USE_TOFU]: Disable all.
27507         (parse_tofu_db_format)[!USE_TOFU]: Disable all.
27508         (main) <aTOFUPolicy>[!USE_TOFU]: Skip.
27509         * g10/keyedit.c (show_key_with_all_names_colon)[!USE_TOFU]: Do not
27510         call tofu functions.
27511         * g10/keylist.c (list_keyblock_colon)[!USE_TOFU]: Ditto.
27512         * g10/trustdb.c (tdb_get_validity_core)[!USE_TOFU]: Skip tofu
27513         processing.
27514
27515 2015-10-20  Neal H. Walfield  <neal@g10code.com>
27516
27517         gpg: Don't die immediately if the TOFU DB is locked.
27518         + commit 26d457c218c2e93b2e2cf316f0c1074c70894d0f
27519         * g10/tofu.c (opendb): Don't die immediately if the DB is locked.
27520
27521         gpg: Improve output.
27522         + commit bc9ff6c85e2d89be4ee873b8a72a214759a66157
27523         * g10/tofu.c (get_trust): Also show the binding when indicating a
27524         conflict occurred.
27525
27526         gpg: Synchronize translation template.
27527         + commit 251c070f91e2c65baa3f1195f14a176440a8aafa
27528         * g10/tofu.c (show_statistics): Synchronize translation template.
27529
27530         gpg: When showing conflicts, also show bindings with no recorded sigs.
27531         + commit d3eca517745a862432fcfeaa729e5333b15ffa6a
27532         * g10/tofu.c (signature_stats_collect_cb): If the time_ago column is
27533         NULL, then both time_ago and count should be 0.
27534         (get_trust): Reverse the direction of the join so that we also get
27535         statistics about bindings without any signatures.
27536
27537         gpg: Improve text.
27538         + commit 445f94bc81b20959a667a4ad80ea6c73059540bf
27539         * g10/tofu.c (show_statistics): Improve text.
27540
27541         gpg: Use the right variable to display the information.
27542         + commit 4957e3236796979b58f35628351505ea5f4e936a
27543         * g10/tofu.c (get_trust): Use the right variable to display the
27544         conflicting key.
27545
27546         gpg: Make failing to create a directory a soft error.
27547         + commit eb8a0b051faa03584b3820200e10301936e82f51
27548         * g10/tofu.c (getdb): Don't exit if we can't create the directory.
27549         Just return an error.
27550
27551         common: Make sure tilde expansion works for the mkdir functions.
27552         + commit c3bb9fccb7963a0918b9ec6a4f10d568fac7c125
27553         * common/mkdir_p.c (gnupg_amkdir_p): Use make_filename_try on the
27554         first directory component as well.
27555
27556         gpg: Remove unused prototype digest_algo_from_sig.
27557         + commit d1a0b520b15bb941cdbf66c2e832c617af778ac8
27558         * g10/packet.h (digest_algo_from_sig): Remove prototype without a
27559         corresponding implementation.
27560
27561 2015-10-19  Werner Koch  <wk@gnupg.org>
27562
27563         dirmngr: Allow building with libassuan < 2.3.
27564         + commit 4e42ad300b3de9fab25095a9e82431b1ea2740e7
27565         * dirmngr/dirmngr.c (set_tor_mode): Use newer assuan function only if
27566         available.
27567         * dirmngr/http.c (http_raw_connect): Ditto.
27568
27569 2015-10-19  Neal H. Walfield  <neal@g10code.com>
27570
27571         gpg: Fix --desig-revoke.
27572         + commit c37621166e9cc2a818de73bc99287a393dbb5744
27573         * g10/revoke.c (gen_desig_revoke): Add additional parameter ctrl.
27574         Check that the secret key is available.  If not, display an error
27575         message.
27576
27577         gpg: Improve function documentation and some comments.
27578         + commit a608ee750dd83bf77a5fb4f0ab5bcf812436ba4d
27579         * g10/main.h: Improve function documentation.
27580         * g10/packet.h.h: Improve function documentation.
27581         * g10/sig-check.c: Improve function documentation and some comments.
27582
27583         gpg: Improve and regularize naming of signature checking functions.
27584         + commit 0433e667029508d6933e8798d3d95bcdde70a7aa
27585         * g10/packet.h (signature_check): Rename from this...
27586         (check_signature): ... to this.  Update users.
27587         (signature_check2): Rename from this...
27588         (check_signature2): ... to this.  Update users.
27589         * g10/sig-check.c (do_check): Rename from this...
27590         (check_signature_end): ... to this.  Update users.
27591         (do_check_messages): Rename from this...
27592         (check_signature_metadata_validity): ... to this.  Update users.
27593
27594         gpg: Mark local function as static.
27595         + commit 547a1b3fb881bb8581d03dbf4eacf49163eaa4b5
27596         * g10/tdbio.c (put_record_into_cache): Mark as static.
27597
27598 2015-10-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
27599
27600         gpg: Print warning when rejecting weak digests.
27601         + commit b98939812abf6c643c752ce7c325f98039a1a9e2
27602         * g10/misc.c (print_md5_rejected_note): Rename to ..
27603         (print_digest_rejected_note): this.  Parameterize function to take an
27604         enum gcry_md_algos.
27605         * g10/sig-check.c: Use print_digest_rejected_note() when rejecting
27606         signatures.
27607
27608         gpg: Add option --weak-digest to gpg and gpgv.
27609         + commit 76afaed65e3b0ddfa4923cb577ada43217dd4b18
27610         * g10/options.h: Add additional_weak_digests linked list to opts.
27611         * g10/main.h: Declare weakhash linked list struct and
27612         additional_weak_digest() function to insert newly-declared weak
27613         digests into opts.
27614         * g10/misc.c: (additional_weak_digest): New function.
27615         (print_digest_algo_note): Check for deprecated digests; use proper
27616         gcry_md_algos type.
27617         * g10/sig-check.c: (do_check): Reject weak digests in addition to MD5.
27618         * g10/gpg.c: Add --weak-digest option to gpg.
27619         * doc/gpg.texi: Document gpg --weak-digest option.
27620         * g10/gpgv.c: Add --weak-digest option to gpgv.
27621         * doc/gpgv.texi: Document gpgv --weak-digest option.
27622
27623 2015-10-19  Werner Koch  <wk@gnupg.org>
27624
27625         dirmngr: Make --use-tor work - still leaks DNS.
27626         + commit 6983fd131f648ba4acd57b266de9868911874d14
27627         * dirmngr/dirmngr.c (set_tor_mode): New.
27628         (main, reread_configuration): Call it.
27629         * dirmngr/http.c (http_raw_connect, send_request): Check whether TOR
27630         mode is enabled if the FORCE_TOR flag is given.
27631
27632         dirmngr: Use Assuan socket wrappers for http.c.
27633         + commit 8c609eaf35b547f02979ef0b206520dd0853b294
27634         * dirmngr/http.c: Include assuan.h.  Changed all code taking a socket
27635         descriptor from int to assuan_fd_t.
27636         (my_unprotect, my_protect): New.
27637         (my_connect): Remove.
27638         (_my_socket_new, _my_socket_unref): use assuan_sock_close.
27639         (connect_server): Use assuan_sock_connect, assuan_sock_new, and
27640         assuan_sock_close.
27641         * dirmngr/Makefile.am (t_common_ldadd): Add LIBASSUAN_LIBS.
27642
27643 2015-10-19  Neal H. Walfield  <neal@g10code.com>
27644
27645         gpg: Fix formatting.
27646         + commit 253afa244487dd8129816615ac2865c9fe812aaf
27647         * g10/tofu.c (get_trust): Fix formatting.
27648
27649         gpg: Don't forget to free some memory.
27650         + commit e56a116f9a1171ccf8b3293887a217953a46fc20
27651         * g10/tofu.c (tofu_register): Free SIG_DIGEST before returning.
27652
27653         gpg: If a conflict occurs in batch mode, record that.
27654         + commit 55d88454652543c98d74376977d855e394df6c92
27655         * g10/tofu.c (get_trust): If a conflict occurs when MAY_ASK is false,
27656         set conflict to the key.  When prompting the user, don't show the
27657         conflicting key if the conflicting key is the current key.
27658
27659 2015-10-18  Werner Koch  <wk@gnupg.org>
27660
27661         gpg: Silence two more warnings.
27662         + commit c2c400714854d5a127a6966200d345d0d6cfc7d4
27663         * g10/trustdb.c (tdb_get_validity_core): Silence a warning.
27664         * g10/tofu.c (tofu_register): Move SIG_DIGEST computation to the top
27665         so that it is not uninitialized in case of an early error.
27666
27667         gpg: Fix harmless compiler warnings.
27668         + commit 558bcd43ae0a841cf1e58e06f5d72a19d5bc70cd
27669         * g10/tofu.h (_tofu_GET_POLICY_ERROR): New.  This avoids warnings
27670         about undefined enum values in a switch.
27671         * g10/trustdb.h (_tofu_GET_TRUST_ERROR): New.
27672         * g10/tofu.c (TIME_AGO_FUTURE_IGNORE): Move to the top.
27673         (opendbs): Avoid compiler warning (use braces).
27674         (GET_POLICY_ERROR): Replace define by enum _tofu_GET_POLICY_ERROR.
27675         (get_policy): Remove assert.
27676         (GET_TRUST_ERROR): Replace by _tofu_GET_TRUST_ERROR macro.
27677         (show_statistics): Undef MIN_SECS et al. after use.
27678
27679         common: Avoid warning about const char ** assignment.
27680         + commit e64c805b0c270d859ddf2c35d573110cf25e8d48
27681         * common/mkdir_p.c (gnupg_amkdir_p): Also strdup first item.  Return
27682         an error on malloc failure.
27683         (gnupg_mkdir_p): Fix type of dirs and tmp_dirs.
27684
27685         Move http module from common/ to dirmngr/.
27686         + commit 5aa1b392b1bf6fcf4cd380862c5affac39a4f34d
27687         * common/http.c: Move to ../dirmngr/.
27688         * common/http.h: Move to ../dirmngr/.
27689         * common/t-http.c: Move to ../dirmngr/.
27690         * common/tls-ca.pem: Move to ../dirmngr/.
27691         * common/Makefile.am: Do not build libcommontls.a libcommontlsnpth.a.
27692         Remove http.c related stuff.
27693         * po/POTFILES.in: Move http.c to dirmngr/.
27694         * dirmngr/Makefile.am (EXTRA_DIST): Add tls-ca.pem.
27695         (module_maint_tests): New.
27696         (noinst_PROGRAMS): Add module_maint_tests.
27697         (dirmngr_SOURCES): Add http.c and http.h.
27698         (dirmngr_LDADD): Remove libcommontlsnpth.
27699         (t_common_ldadd): Ditto.
27700         (t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
27701         (t_ldap_parse_uri_SOURCES): Add http.c.
27702         (t_ldap_parse_uri_CFLAGS): Build without npth.
27703         ($(PROGRAMS)): Do not require libcommontls.a libcommontlsnpth.a.
27704         * dirmngr/dirmngr.h, dirmngr/ks-engine.h: Fix include of http.h.
27705
27706 2015-10-18  Neal H. Walfield  <neal@g10code.com>
27707
27708         g10: Fix assert.
27709         + commit 128a456e775edf393d47e40bb9ae8b62434e2978
27710         * g10/tofu.c (get_trust): Fix assert.
27711
27712         g10: Add TOFU support.
27713         + commit f77913e0ff7be4cd9c6337a70ac715e6f4a43572
27714         * configure.ac: Check for sqlite3.
27715         (SQLITE3_CFLAGS): AC_SUBST it.
27716         (SQLITE3_LIBS): Likewise.
27717         * g10/Makefile.am (AM_CFLAGS): Add $(SQLITE3_CFLAGS).
27718         (gpg2_SOURCES): Add tofu.h and tofu.c.
27719         (gpg2_LDADD): Add $(SQLITE3_LIBS).
27720         * g10/tofu.c: New file.
27721         * g10/tofu.h: New file.
27722         * g10/options.h (trust_model): Define TM_TOFU and TM_TOFU_PGP.
27723         (tofu_db_format): Define.
27724         * g10/packet.h (PKT_signature): Add fields digest and digest_len.
27725         * g10/gpg.c: Include "tofu.h".
27726         (cmd_and_opt_values): Declare aTOFUPolicy, oTOFUDefaultPolicy,
27727         oTOFUDBFormat.
27728         (opts): Add them.
27729         (parse_trust_model): Recognize the tofu and tofu+pgp trust models.
27730         (parse_tofu_policy): New function.
27731         (parse_tofu_db_format): New function.
27732         (main): Initialize opt.tofu_default_policy and opt.tofu_db_format.
27733         Handle aTOFUPolicy, oTOFUDefaultPolicy and oTOFUDBFormat.
27734         * g10/mainproc.c (do_check_sig): If the signature is good, copy the
27735         hash to SIG->DIGEST and set SIG->DIGEST_LEN appropriately.
27736         * g10/trustdb.h (get_validity): Add arguments sig and may_ask.  Update
27737         callers.
27738         (tdb_get_validity_core): Add arguments sig and may_ask.  Update
27739         callers.
27740         * g10/trust.c (get_validity) Add arguments sig and may_ask.  Pass them
27741         to tdb_get_validity_core.
27742         * g10/trustdb.c: Include "tofu.h".
27743         (trust_model_string): Handle TM_TOFU and TM_TOFU_PGP.
27744         (tdb_get_validity_core): Add arguments sig and may_ask.  If
27745         OPT.TRUST_MODEL is TM_TOFU or TM_TOFU_PGP, compute the TOFU trust
27746         level.  Combine it with the computed PGP trust level, if appropriate.
27747         * g10/keyedit.c: Include "tofu.h".
27748         (show_key_with_all_names_colon): If the trust mode is tofu or
27749         tofu+pgp, then show the trust policy.
27750         * g10/keylist.c: Include "tofu.h".
27751         (public_key_list): Also show the PGP stats if the trust model is
27752         TM_TOFU_PGP.
27753         (list_keyblock_colon): If the trust mode is tofu or
27754         tofu+pgp, then show the trust policy.
27755         * g10/pkclist.c: Include "tofu.h".
27756         * g10/gpgv.c (get_validity): Add arguments sig and may_ask.
27757         (enum tofu_policy): Define.
27758         (tofu_get_policy): New stub.
27759         (tofu_policy_str): Likewise.
27760         * g10/test-stubs.c (get_validity): Add arguments sig and may_ask.
27761         (enum tofu_policy): Define.
27762         (tofu_get_policy): New stub.
27763         (tofu_policy_str): Likewise.
27764         * doc/DETAILS: Describe the TOFU Policy field.
27765         * doc/gpg.texi: Document --tofu-set-policy, --trust-model=tofu,
27766         --trust-model=tofu+pgp, --tofu-default-policy and --tofu-db-format.
27767         * tests/openpgp/Makefile.am (TESTS): Add tofu.test.
27768         (TEST_FILES): Add tofu-keys.asc, tofu-keys-secret.asc,
27769         tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and tofu-EE37CF96-1.txt.
27770         (CLEANFILES): Add tofu.db.
27771         (clean-local): Add tofu.d.
27772         * tests/openpgp/tofu.test: New file.
27773         * tests/openpgp/tofu-2183839A-1.txt: New file.
27774         * tests/openpgp/tofu-BC15C85A-1.txt: New file.
27775         * tests/openpgp/tofu-EE37CF96-1.txt: New file.
27776         * tests/openpgp/tofu-keys.asc: New file.
27777         * tests/openpgp/tofu-keys-secret.asc: New file.
27778
27779 2015-10-16  Neal H. Walfield  <neal@g10code.com>
27780
27781         common: Prefix the mkdir functions with gnupg_.  Make args const.
27782         + commit 93e855553eba03f5c31682e0aaf39f18f29860b7
27783         * common/mkdir_p.h (mkdir_p): Rename from this...
27784         (gnupg_mkdir_p): ... to this.  Change directory_component's type from
27785         char * to const char *.
27786         (amkdir_p): Rename from this...
27787         (gnupg_amkdir_p): ... to this.  Change directory_component's type from
27788         char * to const char *.
27789         * common/mkdir_p.c (mkdir_p): Rename from this...
27790         (gnupg_mkdir_p): ... to this.  Change directory_component's type from
27791         char * to const char *.
27792         (amkdir_p): Rename from this...
27793         (gnupg_amkdir_p): ... to this.  Change directory_component's type from
27794         char * to const char *.
27795
27796 2015-10-14  NIIBE Yutaka  <gniibe@fsij.org>
27797
27798         cleanup: Fix confusion between gpg_error_t and gpg_err_code_t.
27799         + commit 3de5ef759895837fe499cff7fb1fa7798e6d5754
27800         * dirmngr/crlcache.c (hash_dbfile): Use gpg_error_t for ERR.
27801         * kbx/keybox-update.c (keybox_set_flags): Call
27802         gpg_err_code_from_syserror.
27803
27804 2015-10-13  NIIBE Yutaka  <gniibe@fsij.org>
27805
27806         po: Update Japanese translation.
27807         + commit 0b4ebc398cc8aad3f25f84034cd6b129e55f1368
27808
27809
27810 2015-10-12  Werner Koch  <wk@gnupg.org>
27811
27812         gpg: Try hard to use MDC also for sign+symenc.
27813         + commit 4584125802be11833a5b289e864b45eedc2b45fd
27814         * g10/encrypt.c (use_mdc): Make it a global func.
27815         * g10/sign.c (sign_symencrypt_file): Use that function to decide
27816         whether to use an MDC.
27817         * tests/openpgp/conventional-mdc.test: Add a simple test case.
27818
27819 2015-10-09  Werner Koch  <wk@gnupg.org>
27820
27821         Release 2.1.9.
27822         + commit 086b8738f71ba26d36287db81f6d78116053ba66
27823
27824
27825 2015-10-09  NIIBE Yutaka  <gniibe@fsij.org>
27826
27827         agent: simplify agent_get_passphrase.
27828         + commit 5a12c45666cd16bc750d7f0e63620c295feb77ea
27829         * agent/call-pinentry.c (agent_get_passphrase): Simplify.
27830
27831         agent: fix agent_askpin.
27832         + commit 818fa4f71e1056831b35d0f8aff715c0e1d537e6
27833         * agent/call-pinentry.c (agent_askpin): Fix off-by-one error.
27834
27835         agent: Fix function return type for check_cb and agent_askpin.
27836         + commit f70f6695368444d8058305ab696e5e5a1bace18c
27837         * agent/call-pinentry.c (unlock_pinentry): Return gpg_error_t.
27838         (start_pinentry, setup_qualitybar): Likewise.
27839         (agent_askpin): Fix return value check of check_cb.
27840         * agent/command-ssh.c (reenter_compare_cb): Return gpg_error_t.
27841         (ssh_identity_register): Fix return value check of agent_askpin.
27842         * agent/cvt-openpgp.c (try_do_unprotect_cb): Return gpg_error_t.
27843         * agent/findkey.c (try_unprotect_cb): Likewise.
27844         * agent/genkey.c (reenter_compare_cb): Return gpg_error_t.
27845         (agent_ask_new_passphrase): Fix return value check of agent_askpin.
27846
27847 2015-10-08  Andre Heinecke  <aheinecke@intevation.de>
27848
27849         dirmngr: Default to http protocol for http-proxy.
27850         + commit ea079d283de6bf4ac70d7530fac70938e7c5e8f5
27851         * common/http.c (send_request): Fix handling for hostname:port string.
27852
27853 2015-10-08  Werner Koch  <wk@gnupg.org>
27854
27855         common: Allow building of mkdir_p.c for Windows.
27856         + commit 4c298525903f844eee95ecbcdc45f5ac034fa148
27857         * common/mkdir_p.c: Change license and comment debug statements.
27858         (amkdir_p, mkdir_p): Fail on malloc error and use default_errsource to
27859         build an error code.  Change return value to gpg_error_t.
27860         (amkdir_p): Use gnupg_mkdir.
27861
27862         * common/membuf.c: Include util.h first to avoid redefined macro
27863         warnings.
27864
27865         gpg: Add option --print-dane-records.
27866         + commit d7b8e76f9930750d669405dee3108c9bc8e87b91
27867         * g10/options.h (opt): Add field "print_dane_records".
27868         * g10/gpg.c (oPrintDANERecords): new.
27869         (opts): Add --print-dane-records.
27870         (main): Set that option.
27871         * g10/export.c (do_export): Remove EXPORT_DANE_FORMAT handling.
27872         (do_export_stream): Add EXPORT_DANE_FORMAT handling.
27873         * g10/keylist.c (list_keyblock_pka): Implement DANE record printing.
27874
27875         * g10/gpgv.c (export_pubkey_buffer): New stub.
27876         * g10/test-stubs.c (export_pubkey_buffer): New stub.
27877
27878         gpg: Pass CTRL parameter to all key listing functions.
27879         + commit b6d621583fc9cbda6f9376a24f2f4cf11499a4fd
27880         * g10/keylist.c (public_key_list): Add arg CTRL.
27881         (secret_key_list): Ditto.
27882         (list_all, list_one): Ditto.
27883         (locate_one): Ditto.
27884         (list_keyblock_pka): Ditto.
27885         (list_keyblock): Ditto.
27886         (list_keyblock_direct): Ditto.
27887         * g10/keygen.c (proc_parameter_file): Add arg CTRL.
27888         (read_parameter_file): Ditto.
27889         (quick_generate_keypair): Ditto.
27890         (do_generate_keypair): Ditto.
27891         (generate_keypair): Pass arg CTRL.
27892         * g10/gpg.c (main): Pass arg CTRL to quick_generate_keypair.
27893
27894 2015-10-07  Werner Koch  <wk@gnupg.org>
27895
27896         gpg: Remove unfinished experimental code to export as S-expressions.
27897         + commit a400958323d93036dca9c63135b167012ea64f8b
27898         * g10/options.h (EXPORT_SEXP_FORMAT): Remove.
27899         (EXPORT_DANE_FORMAT): New.
27900         * g10/export.c (parse_export_options): Remove "export-sexp-format".
27901         (export_seckeys): Adjust for removed option.
27902         (export_secsubkeys): Ditto.
27903         (do_export): Prepare for DANE format.
27904         (build_sexp, build_sexp_seckey): Remove.
27905         (do_export_stream): Remove use of removed functions.
27906
27907 2015-10-06  Werner Koch  <wk@gnupg.org>
27908
27909         gpg: Add new --auto-key-locate mechanism "dane".
27910         + commit 9ac31f91b10059474da1c9580fb99e94278d4c11
27911         * g10/call-dirmngr.c (gpg_dirmngr_dns_cert): Allow fetching via DANE.
27912         * g10/keyserver.c (keyserver_import_cert): Add arg "dane_mode".
27913         * g10/options.h (AKL_DANE): New.
27914         * g10/getkey.c (get_pubkey_byname): Implement AKL_DANE.
27915         (parse_auto_key_locate): Ditto.
27916
27917         dirmngr: Addlow fetching keys using OpenPGP DANE.
27918         + commit 264a81d82737369ee8beef771cf2bd2cd874320a
27919         * dirmngr/server.c (cmd_dns_cert): Add option --dane.
27920
27921         dirmngr: Improve DNS code to retrieve arbitrary records.
27922         + commit 211b8084ee4391baec35e8c5bd75a9ecbcb889a7
27923         * dirmngr/dns-cert.c (get_dns_cert): Add hack to retrieve arbitrary
27924         resource records.
27925         * dirmngr/dns-cert.h (DNS_CERTTYPE_RRBASE): New.
27926         (DNS_CERTTYPE_RR61): New.
27927
27928         dirmngr: Change DNS code to make additions easier.
27929         + commit 6cf80dc77ec5df3722924301ff4be2475966937b
27930         * dirmngr/dns-cert.c (get_dns_cert) [!USE_ADNS]: Change loop to allow
27931         adding more resource types.
27932
27933         dirmngr: Make commands RELOADDIRMNGR and KILLDIRMNGR work properly.
27934         + commit 7faf45effcd47d2d04d35090a1e01a1dbb99ec70
27935         * dirmngr/server.c (cmd_killdirmngr): Set assuan close flag.
27936         (cmd_reloaddirmngr): Use check_owner_permission.
27937
27938         dirmngr: Do tilde expansion for --hkp-cacert.
27939         + commit 9db6547a00cded92c00c8f8382b1b605be1027d2
27940         * dirmngr/dirmngr.c (parse_rereadable_options): Do tilde expansion and
27941         check for cert file existance in option --hkp-cacert.
27942
27943         gpg: Fail decryption for AES etc message w/o MDC.
27944         + commit 625e292108cc0fd9077769587a8c22abe7805e33
27945         * g10/mainproc.c (proc_encrypted): Fail for modern messages w/o MDC.
27946
27947 2015-10-06  NIIBE Yutaka  <gniibe@fsij.org>
27948
27949         agent: Fix verification of signature for smartcard.
27950         + commit 4a5bd1720f5a3dbb26f5daeb03725cae29be7e24
27951         * agent/pksign.c (agent_pksign_do): Use public key smartcard.
27952
27953         agent: Fix non-allocation for pinentry_loopback.
27954         + commit ce2a84b58833fd308d5fe11756721f39c953280a
27955         * agent/call-pinentry.c (agent_get_passphrase): Don't allocate, it will
27956         be allocated by pinentry_loopback.
27957
27958 2015-10-05  Werner Koch  <wk@gnupg.org>
27959
27960         gpg: Install a dirmngr.conf file.
27961         + commit f3959f14b6c496c726bbca5230becb7b6844a234
27962         * g10/dirmngr-conf.skel: New.
27963         * g10/Makefile.am (EXTRA_DIST): Add file.
27964         (install-data-local, uninstall-local): Install that file.
27965         * g10/openfile.c (copy_options_file): Add arg "name", return a value,
27966         simplify with xstrconcat, and factor warning message out to:
27967         (try_make_homedir): here.  Also install dirmngr.conf.
27968         * g10/options.skel: Remove --keyserver entry.
27969
27970         gpg: Deprecate the --keyserver option.
27971         + commit ae471fa978589fb61ecb0f89bbfe4d43cf2d5eac
27972         * g10/keyserver.c (keyserver_refresh): Change return type to
27973         gpg_error_t.  Use gpg_dirmngr_ks_list to print the name of the
27974         keyserver to use.
27975         (keyserver_search): Do not print the "no keyserver" error
27976         message.  The same error is anyway returned from dirmngr.
27977         * g10/call-dirmngr.c (ks_status_parm_s): Add field "keyword".
27978         (ks_status_cb): Handle other status keywords.
27979         (gpg_dirmngr_ks_list): New.
27980         * tools/gpgconf-comp.c (gc_options_gpg): Deprecate "keyserver".
27981         (gc_options_dirmngr): Add "Keyserver" group and "keyserver".
27982
27983         dirmngr: Add option --keyserver.
27984         + commit a48e6de603c3a312f02b1b5fdb813032eeae9074
27985         * dirmngr/dirmngr.c (oKeyServer): New.
27986         (opts): Add "keyserver".
27987         (parse_rereadable_options): Parse that options
27988         (main): Add option to the gpgconf list.
27989         * dirmngr/dirmngr.h (opt): Add field "keyserver".
27990         * dirmngr/server.c (ensure_keyserver): New.
27991         (make_keyserver_item): New.  Factored out from
27992         (cmd_keyserver): here.  Call ensure_keyserver.
27993         (cmd_ks_search): Call ensure_keyserver.
27994         (cmd_ks_get): Ditto.
27995         (cmd_ks_fetch): Ditto.
27996         (cmd_ks_put): Ditto.
27997
27998         dirmngr: Make clear that --use-tor is not yet ready for use.
27999         + commit 438730323a5d9bbf8dd5cd60d479b6c03f8721d0
28000         * dirmngr/dirmngr.c (main): Print a warning if --use-tor has been
28001         given.
28002         * tools/gpgconf-comp.c (gc_options_dirmngr): Make --use-tor invisible.
28003
28004         gpgconf: Change displayed name of Dirmngr to "Key Acquirer".
28005         + commit c6400c1aa82239f1c154ca27596600cae964515d
28006         * tools/gpgconf-comp.c (gc_component): Change printed name.
28007
28008 2015-10-02  Werner Koch  <wk@gnupg.org>
28009
28010         dirmngr: Fix use-after-free due to a realloc shrinking.
28011         + commit 75c64c2b6d77856b90903cc3b7c6a2f62ff8eb7b
28012         * dirmngr/ks-engine-hkp.c (map_host): Do not use original pointer
28013         after realloc.
28014
28015         agent: Fix alignment problem with the second passphrase struct.
28016         + commit ddf9dd135acd2b3635bb986f6dfc0e4e446d5fad
28017         * agent/genkey.c (agent_ask_new_passphrase): Use a separate malloc for
28018         PI2.  Check return value of the malloc function.
28019         * agent/command-ssh.c (ssh_identity_register): Use a separate malloc
28020         for PI2.  Wipe PI2.
28021
28022 2015-10-01  Werner Koch  <wk@gnupg.org>
28023
28024         gpg: Fix a practical hang after use of --faked-system-time.
28025         + commit 2acceba5cc299796c7b5b1851a9baeb75d9f32a1
28026         * g10/sign.c (update_keysig_packet): Bail out if we would need to long
28027         for a new timestamp.
28028
28029         gpg: Print more info with "check selfsig".
28030         + commit 2c60663a72f090573c4869e305b098b4b1fb23bd
28031         * g10/keyedit.c (print_and_check_one_sig): Print more Some sigsub
28032         packets.
28033
28034         gpg: Add debug helper to --edit-keys's check sub-command.
28035         + commit 13a3f65968f4a8205ca664cc46b1a53de4dc489b
28036         * g10/keyedit.c (print_and_check_one_sig): Add arg "extended" and
28037         print an asterisk for the chosen selfsig.
28038         (check_all_keysigs): Add arg "only_selfsig"
28039         (keyedit_menu) <cmdCHECK>: Add optional arg "selfsig".
28040
28041 2015-10-01  NIIBE Yutaka  <gniibe@fsij.org>
28042
28043         common: Fix strsplit.
28044         + commit a9895a5a72a851c5fcc70f16d5f8f588cc885751
28045         * common/stringhelp.c (strsplit): Fix arguments order.
28046
28047 2015-09-30  Neal H. Walfield  <neal@g10code.com>
28048
28049         common: Add mkdir_p.
28050         + commit c8584a1e559bc720412e1a2fc546a54ff4517205
28051         * common/mkdir_p.c: New file.
28052         * common/mkdir_p.h: New file.
28053         * common/Makefile.am (common_sources): Add mkdir_p.c and mkdir_p.h.
28054
28055         common: Remove unused files.
28056         + commit 5576146ede40b42bc632fd9697dd429a4d1409cf
28057         * common/xmalloc.c: Remove file.
28058         * common/xmalloc.h: Remove file.
28059
28060         common: Include <gpg-error.h>.
28061         + commit 270d3f55f9193ebda5e1b642d58daf905019914d
28062         * common/logging.h: Include <gpg-error.h>.
28063
28064 2015-09-29  Neal H. Walfield  <neal@g10code.com>
28065
28066         g10: Remove unused struct cmp_help_context_s.
28067         + commit 8ab63e4b5018044ecfb0b9910412487066886826
28068         * g10/sig-check.c (struct cmp_help_context_s) Remove unused struct.
28069
28070         g10: Avoid an unnecessary copy.
28071         + commit 12443eafa6e19b94a8b554126423e2a5ccc2dd7e
28072         * g10/sig-check.c (signature_check2): Avoid copying PK to RET_PK.
28073         Instead, directly use the provided storage.  If none is provided
28074         allocate some.
28075
28076 2015-09-29  NIIBE Yutaka  <gniibe@fsij.org>
28077
28078         ssh: Fix fingerprint computation for EdDSA key.
28079         + commit 5c067d54d349fdfb3243634789c8841515d2c28f
28080         * common/ssh-utils.c (get_fingerprint): Handle the prefix of 0x40.
28081         * common/t-ssh-utils.c (sample_keys): Add a new key.
28082
28083         agent: RSA signature verification by gpg-agent.
28084         + commit cfbe6ba9cf1414e9aa4977e2bbaecaa43154b2ae
28085         * g10/sign.c (do_sign): Let verify signature by gpg-agent.
28086         * agent/pksign.c (agent_pksign_do): Call gcry_pk_verify for RSA.
28087
28088 2015-09-28  Werner Koch  <wk@gnupg.org>
28089
28090         common: Provide two new error code replacements.
28091         + commit f1effdc5ecd0cc52a28db7ae28a5c28f33486542
28092         * common/util.h (GPG_ERR_FALSE, GPG_ERR_TRUE): Rew replcements.
28093
28094         common: Change calling convention for gnupg_spawn_process.
28095         + commit 83811e3f1f0c615b2b63bafdb49a35a0fc198088
28096         * common/exechelp.h (GNUPG_SPAWN_NONBLOCK): New.
28097         (GNUPG_SPAWN_RUN_ASFW, GNUPG_SPAWN_DETACHED): Macro to replace the
28098         numbers.
28099         * common/exechelp.h (gnupg_spawn_process): Change function to not take
28100         an optional stream for stdin but to return one.
28101         * common/exechelp-posix.c (gnupg_spawn_process): Implement change.
28102         (create_pipe_and_estream): Add args outbound and nonblock.
28103         * common/exechelp-w32.c (gnupg_spawn_process): Implement change.
28104
28105 2015-09-28  NIIBE Yutaka  <gniibe@fsij.org>
28106
28107         scd: Handle error correctly.
28108         + commit 6bb7206e357acfd7276a8f1334c0f0c9cc6ed100
28109         * scd/apdu.c (apdu_connect): Initialize variables and check an error
28110         of apdu_get_status_internal.
28111
28112 2015-09-22  Werner Koch  <wk@gnupg.org>
28113
28114         ssh: Add 256, 384 and 521 bit test keys for the fingerprint.
28115         + commit 12ff806d1b63d08cb43d131065d51353495d9346
28116         * common/t-ssh-utils.c (sample_keys): Add 3 new keys.
28117
28118         ssh: Fix fingerprint computation for 384 bit ECDSA keys.
28119         + commit 2167951b275bae51cf669c02547e2e7ea8fbe2ee
28120         * common/ssh-utils.c (get_fingerprint): Fix hashed string.
28121
28122 2015-09-19  NIIBE Yutaka  <gniibe@fsij.org>
28123
28124         agent: Fix importing ECC key.
28125         + commit 1542dc604b9c3e6a6a99750c48f7800e72584a89
28126         * agent/cvt-openpgp.c (convert_from_openpgp_main): Only encrypted
28127         parameters are stored as opaque.
28128         (apply_protection): ARRAY members are all normal, non-opaque MPI.
28129         (extract_private_key): Get public key as normal, non-opaque MPI.
28130         Remove support of ECC key with '(flags param)'.
28131         Remove support of "ecdsa" and "ecdh" keys of our experiment.
28132
28133         scd: Fix KEYTOCARD handling for ECC key.
28134         + commit 708b7eccdef8d274bd5578b9a5fd908e9685c795
28135         * scd/app-openpgp.c (ecc_writekey): Only public key can be native
28136         format.
28137
28138 2015-09-19  Neal H. Walfield  <neal@g10code.com>
28139
28140         common: Add new function strlist_length.
28141         + commit 8499c4f84a664bedbdf5a5689cb02420909f1968
28142         * common/strlist.c (strlist_length): New function.
28143
28144 2015-09-18  Werner Koch  <wk@gnupg.org>
28145
28146         gpgconf: Change displayed name of Dirmngr to "Network Manager".
28147         + commit 819bba75aaed11ecef2e274add173718358212b9
28148         * tools/gpgconf-comp.c (gc_component): Change printed name.
28149
28150         dirmngr: Add option --use-tor as a stub.
28151         + commit c091816b4a90d7eea6f8601ec1522a0a006794e8
28152         * dirmngr/dirmngr.h (opt): Add field "use_tor".
28153         * dirmngr/dirmngr.c (oUseTor): New.
28154         (opts): Add --use-tor.
28155         (parse_rereadable_options): Set option.
28156         (main): Tell gpgconf about that option.
28157
28158         * dirmngr/crlfetch.c (crl_fetch): Pass TOR flag to the http module and
28159         return an error if LDAP is used in TOR mode.
28160         (ca_cert_fetch): Return an error in TOR mode.
28161         (start_cert_fetch): Ditto.
28162         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass TOR flag to the
28163         http module.
28164         * dirmngr/ks-engine-hkp.c (send_request): Ditto.
28165         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
28166         * dirmngr/ks-engine-ldap.c (ks_ldap_get): Return an error in TOR mode.
28167         (ks_ldap_search): Ditto.
28168         (ks_ldap_put): Ditto.
28169         * dirmngr/ocsp.c (do_ocsp_request): Ditto.  Also pass TOR flag to the
28170         http module.
28171
28172         * dirmngr/server.c (option_handler): Add "honor-keyserver-url-used".
28173         (cmd_dns_cert): Return an error in TOR mode.
28174         (cmd_getinfo): Add subcommand "tor"
28175         * tools/gpgconf-comp.c (gc_options_dirmngr): Add TOR group.
28176
28177         gpg: Report a conflict between honor-keyserver-url and TOR.
28178         + commit d5a3142b8f2e5603357182f34f0b081b47eda23c
28179         * g10/call-dirmngr.c (create_context): Send option and print a verbose
28180         error.
28181
28182         http: Add flag to force use of TOR (part 1)
28183         + commit b4bc1c8b10c7a794fa108678b80f76366a65c47d
28184         * common/http.h (HTTP_FLAG_FORCE_TOR): New.
28185         * common/http.c (http_raw_connect, send_request): Detect flag and
28186         return an error for now.
28187
28188 2015-09-17  NIIBE Yutaka  <gniibe@fsij.org>
28189
28190         po: Update Japanese translation.
28191         + commit f986b23e13eaa2d7705733b4bf6b5210311f181a
28192
28193
28194         scd: Fix ccid-driver timeout for OpenPGPcard v2.1.
28195         + commit 6510df3a7cd2b5bf44fac1e4d50ee54b8c897daa
28196         * scd/ccid-driver.c (CCID_CMD_TIMEOUT): New.
28197         (ccid_transceive_apdu_level, ccid_transceive): Use.
28198
28199 2015-09-16  Werner Koch  <wk@gnupg.org>
28200
28201         agent: New option --pinentry-invisible-char.
28202         + commit 93d257c81952cbb08a744a9cea6749639aa32cd7
28203         * agent/gpg-agent.c (oPinentryInvisibleChar): New.
28204         (opts): Add option.
28205         (parse_rereadable_options): Set option.
28206         * agent/agent.h (opt): Add field pinentry_invisible_char.
28207         * agent/call-pinentry.c (start_pinentry): Pass option to pinentry.
28208
28209         g13: Move some code to a separate module.
28210         + commit 9e65bbd255c43f0e59f35b0003052234d69042be
28211         * g13/g13-common.c, g13/g13-common.h: New.
28212         * g13/Makefile.am (g13_SOURCES): Add new files.
28213         * g13/g13.c (g13_errors_seen): Move to g13-common.c.
28214         (cmdline_conttype): New.
28215         (main): Use g13_init_signals and g13_install_emergency_cleanup.
28216         (emergency_cleanup, g13_exit): Move to g13-common.c.
28217         * g13/g13.h: Move OPT and some other code to g13-common.h.
28218
28219         gpg: Fix skip function dummy parameter.
28220         + commit 8eb3a1797a1e7cb59a8342a8aa917756fe67949f
28221         * g10/trustdb.c (search_skipfnc): Fix dummy argument
28222
28223         gpg: Change last commit to avoid extra translations.
28224         + commit f71ed902def81f9408d9094289d8a97abaa0f609
28225         * g10/keyedit.c (keyedit_menu): Do not print usage hints in expert
28226         mode.
28227
28228 2015-09-16  Neal H. Walfield  <neal@g10code.com>
28229
28230         g10: Improve error message.
28231         + commit 172af881a1cfe82dfec1c43102d6c464e67ef230
28232         * g10/keyedit.c (keyedit_menu): When complaining that a user ID or key
28233         must be selected, indicate what command to use to do this.
28234
28235         g10: Be more careful when merging self-signed data.
28236         + commit 6845737736d3264d7ee8b7364d908951010084c9
28237         * g10/getkey.c (merge_selfsigs_main): Stop looking for self-signed
28238         data belonging to the public key when we encounter an attribute packet
28239         or a subkey packet, not just a user id packet.  When looking for
28240         self-signed data belonging to a user id packet, stop when we see a
28241         user attribute packet.
28242
28243         g10: Simplify some complicated boolean expressions.
28244         + commit c31e089129c0102c1710522d71fbe1880e84d68e
28245         * g10/getkey.c (finish_lookup): Simplify logic.
28246
28247         g10: Also mark revoked and expired keys as unusable.
28248         + commit 77c2ad4a817c129b899708399ed2078a52b452b8
28249         * g10/getkey.c (skip_unusable): Also mark the key as unusable if it
28250         has been revoked or has expired.
28251
28252         g10: Release resources when returning an error in get_seckey.
28253         + commit 1b601de06a57c78537a336093d2531d8c58bc0d2
28254         * g10/getkey.c (get_seckey): If the key doesn't have a secret key,
28255         release *PK.
28256
28257         g10: Improve documentation and comments for getkey.c.
28258         + commit cab581c486e1987445092b1afdf2cba1f62d017d
28259         * g10/getkey.c: Improve documentation and comments for most
28260         functions.  Move documentation for public functions from here...
28261         * g10/keydb.h: ... to here.
28262
28263         g10: Remove unused function have_any_secret_key.
28264         + commit 7333e704efde6923d4b914b37e9a92c4a5bab156
28265         * g10/getkey.c (have_any_secret_key): Remove function.
28266
28267         g10: Bring cache semantics closer to non-cache semantics.
28268         + commit 5e233e12f55be00f5659c63bc32fbdca2ec93136
28269         * g10/getkey.c (get_pubkey_fast): When reading from the cache, only
28270         consider primary keys.
28271
28272         g10: Break out of the loop earlier.
28273         + commit 3940f10af7915b080bf4ed25ceb7e20b52e3cd3e
28274         * g10/getkey.c (have_secret_key_with_kid): Once we find the relevent
28275         key or subkey, stop searching.
28276
28277         g10: Don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXT
28278         + commit 50affffe93a07643f2610c7a5f3d6f61988855e8
28279         * g10/getkey.c (lookup): Also don't skip legacy keys if the search
28280         mode is KEYDB_SEARCH_MODE_NEXT.
28281
28282         g10: Remove unused function get_seckeyblock_byfprint.
28283         + commit efbaa8f891812e13ae9e689299aa2cd51781ccb3
28284         * g10/keydb.h (get_seckeyblock_byfprint): Remove prototype.
28285         * g10/getkey.c (get_seckeyblock_byfprint): Remove function.
28286
28287         g10: Remove unused function get_seckey_byfprint.
28288         + commit e2b300801ed7143fa924df5442ec2b61079c0bbb
28289         * g10/keydb.h (get_seckey_byfprint): Remove prototype.
28290         * g10/getkey.c (get_seckey_byfprint): Remove function.
28291
28292         g10: Simplify get_seckey_byname: it was never called with NAME not NULL.
28293         + commit 80dbf8006ffe52e77930b0a6dca9d8caba8c3fd5
28294         * g10/keydb.h (get_seckey_byname): Rename from this...
28295         (get_seckey_default): ... to this.  Drop the parameter name.  Update
28296         users.
28297         * g10/getkey.c (get_seckey_byname): Rename from this...
28298         (get_seckey_default): ... to this.  Drop the parameter name.  Drop the
28299         code which assumed that NAME is not NULL.
28300
28301         g10: Eliminate the redundant function get_keyblock_byfprint.
28302         + commit dc69804ab0576fbc87297215d63b37a680d74d4d
28303         * g10/keydb.h (get_keyblock_byfprint): Remove prototype.  Replace use
28304         of this function with get_pubkey_byfprint.
28305         * g10/getkey.c (get_pubkey_byname): Remove function.
28306
28307         g10: Simplify semantics of get_pubkey_byname.
28308         + commit 911fcca36d61afd061e9e6dc0584bb069353db89
28309         * g10/getkey.c (get_pubkey_byname): If R_KEYBLOCK is not NULL, return
28310         the keyblock in R_KEYBLOCK independent of whether PK is set or not.
28311
28312         g10: Eliminate the redundant function get_pubkey_byname.
28313         + commit b4672e4d48fb1e1e4d17551c4c828763d1dfbb57
28314         * g10/getkey.c (get_pubkey_byname): Remove function.
28315         (lookup): Replace use of get_pubkey_byname by get_pubkey_byfprint.
28316
28317         g10: Eliminate the redundant function get_pubkey_end.
28318         + commit 65e58ae6748c280c8633d2ca5f227ebe1220805d
28319         * g10/keydb.h (get_pubkey_end): Remove declaration.  Replace use of
28320         function with getkey_end.
28321         * g10/getkey.c (get_pubkey_byname): Remove function.
28322
28323         g10: Eliminate the redundant function get_pubkey_next.
28324         + commit be6743b2e19241f66148bf89c3442d8e2ebcd63e
28325         * g10/keydb.h (get_pubkey_next): Remove prototype.
28326         * g10/getkey.c (get_pubkey_next): Remove function.
28327         * g10/keylist.c (locate_one): Use getkey_next instead of
28328         get_pubkey_next.
28329
28330         kbx: Change skipfnc's prototype so that we can provide all information.
28331         + commit 9acbeac23668a1d0dabca27d7825430d76e095c2
28332         * kbx/keybox-search-desc.h (struct keydb_search_desc.skipfnc): Change
28333         third parameter to be the index of the user id packet in the keyblock
28334         rather than the packet itself.  Update users.
28335
28336         g10: Remove unused prototype (get_pubkey_byfpr).
28337         + commit 83e17ab1b4cf4420f2abaf9e1f4017a9473fb281
28338         * g10/keydb.h (get_pubkey_byfpr): Remove unused prototype.
28339
28340         g10: Remove unused function (get_pubkey_bynames).
28341         + commit b06f96ba4f57f55194efcd37a0e3a2aa5450b974
28342         * g10/keydb.h (get_pubkey_bynames): Remove prototype.
28343         * g10/getkey.c (get_pubkey_bynames): Remove function.
28344
28345         g10: Simplify code.  Turn struct getkey_ctx_s.found_key into an argument
28346         + commit d47e84946ee010917cfc3501062721b74afbb771
28347         * g10/getkey.c (struct getkey_ctx_s): Remove field found_key.
28348         (lookup): Add argument ret_found_key.  If not NULL, set it to the
28349         found key.  Update callers.
28350         (pk_from_block): Add argument found_key.  Use it instead of
28351         CTX->FOUND_KEY.  Update callers.
28352         (finish_lookup): Return a KBNODE (the found key) instead of an int.
28353         Don't set CTX->FOUND_KEY.  Return the found key instead.
28354
28355         g10: Remove unused field struct getkey_ctx_s.kbpos.
28356         + commit c110e186e07fb1035dc757d322274f939df1c86d
28357         * g10/getkey.c (struct getkey_ctx_s): Remove field kbpos.
28358         (getkey_end): Don't clear CTX->KBPOS.
28359
28360         g10: Simplify code: remove field struct getkey_ctx_s.keyblock.
28361         + commit 3798f73c07f33576bd02ba4a3256c626bd80752f
28362         * g10/getkey.c (struct getkey_ctx_s): Remove field keyblock.
28363         (finish_lookup): Add parameter keyblock.  Update caller to pass this.
28364         (lookup): Add new local variable keyblock.  Use this instead of
28365         ctx->keyblock for referencing the keyblock.
28366
28367 2015-09-16  NIIBE Yutaka  <gniibe@fsij.org>
28368
28369         agent: Fix registering SSH Key of Ed25519.
28370         + commit 7d5999f0964c9412c0e18eb1adefdb729be68cd4
28371         * agent/command-ssh.c (stream_read_string): Add the prefix of 0x40.
28372
28373 2015-09-15  NIIBE Yutaka  <gniibe@fsij.org>
28374
28375         po: Update Japanese translation.
28376         + commit faee25e670cfeb0d0166d7c59cc6a0b3842ee34d
28377
28378
28379 2015-09-10  Werner Koch  <wk@gnupg.org>
28380
28381         Release 2.1.8.
28382         + commit 311816f6cf9d411dba060603e3c5d01c72824645
28383
28384
28385         tests: Silence the 5gb-packet test.
28386         + commit 7a0c3cc760367024305d23e2124ea4cbc7e802df
28387         * tests/openpgp/4gb-packet.test: Send output to /dev/null.
28388
28389         g10: Fix make distcheck problem.
28390         + commit e92a8ab021672b19e5cd397fa555fcc8a3401e8b
28391         * g10/test.c: Include string.h.
28392         (prepend_srcdir): New.  Taken from Libgcrypt.
28393         (test_free): New.
28394         * g10/t-keydb.c (do_test): Malloc the filename.
28395         * g10/Makefile.am (AM_CPPFLAGS): Remove -DSOURCE_DIR
28396         (EXTRA_DIST): Add t-keydb-keyring.kbx.
28397
28398         g10: Improve portability of the new test driver.
28399         + commit fbf24cd09abcdc3dec21db4114ab2db99ce21e4c
28400         * g10/test.c: Include stdio.h and stdlib.h.
28401         (verbose): New.
28402         (print_results): Rename to exit_tests.
28403         (main): Remove atexit and call exit_tests.  Set verbose.
28404         (ASSERT, ABORT): Call exit_tests instead of exit.
28405
28406 2015-09-09  Werner Koch  <wk@gnupg.org>
28407
28408         dirmngr: Allow sending much larger keyblocks.
28409         + commit 19545e3a2d2990cba6d62f98cdb1f665b38ba4f1
28410         * dirmngr/server.c (MAX_CERT_LENGTH): Increase to 16k.
28411         (MAX_KEYBLOCK_LENGTH): Increase to 20M.
28412
28413 2015-09-07  NIIBE Yutaka  <gniibe@fsij.org>
28414
28415         scd: Force key attribute change for writekey.
28416         + commit f10b427d0e2be333776fee2df8150145da36e587
28417         * scd/app-openpgp.c (change_rsa_keyattr): New.
28418         (change_keyattr_from_string): Use change_rsa_keyattr.
28419         (rsa_writekey): Call change_rsa_keyattr when different size.
28420         (ecc_writekey): Try to change key attribute.
28421
28422         scd: KEYNO cleanup.
28423         + commit fd689e85423d0d80d725f0315c52d94f0e9766f8
28424         * scd/app-openpgp.c (get_public_key, send_keypair_info, do_readkey)
28425         (change_keyattr, change_keyattr_from_string, ecc_writekey, do_genkey)
28426         (compare_fingerprint, check_against_given_fingerprint): KEYNO starts
28427         from 0.
28428
28429 2015-09-02  Neal H. Walfield  <neal@g10code.com>
28430
28431         g10: Remove unused field req_algo.
28432         + commit bd0c902f1de46eda03a065da41487e7e01ab4c50
28433         * g10/packet.h (PKT_public_key): Remove unused field req_algo.  Remove
28434         users.
28435         * g10/getkey.c (struct getkey_ctx_s): Remove unused field req_algo.
28436         Remove users.
28437
28438         g10: Use a symbolic constant instead of a literal.
28439         + commit 1f03d4cd940fed26fc3ffa1742728d68c55ee5d1
28440         * g10/trustdb.c (KEY_HASH_TABLE_SIZE): Define.
28441         (new_key_hash_table): Use KEY_HASH_TABLE_SIZE instead of a literal.
28442         (release_key_hash_table): Likewise.
28443         (test_key_hash_table): Likewise.
28444         (add_key_hash_table): Likewise.
28445
28446         g10: Add test for keydb as well as new testing infrastructure.
28447         + commit ee7ec1256b24dc340656c331ef92fc59cad817b6
28448         * g10/Makefile.am (EXTRA_DIST): Add test.c.
28449         (AM_CPPFLAGS): Add -DSOURCE_DIR="\"$(srcdir)\"".
28450         (module_tests): Add t-keydb.
28451         (t_keydb_SOURCES): New variable.
28452         (t_keydb_LDADD): Likewise.
28453         * g10/t-keydb.c: New file.
28454         * g10/t-keydb-keyring.kbx: New file.
28455         * g10/test-stubs.c: New file.
28456         * g10/test.c: New file.
28457
28458         g10: Make the keyblock cache per-handle rather than global.
28459         + commit 60bc518645d3acfd4dcb79e61a2be6ce001e93aa
28460         * g10/keydb.c (keyblock_cache): Don't declare this variable.  Instead...
28461         (struct keyblock_cache): ... turn its type into this first class
28462         object...
28463         (struct keydb_handle): ... and instantiate it once per database
28464         handle.  Update all users.
28465         (keydb_rebuild_caches): Don't invalidate the keyblock cache.
28466
28467         g10: If iobuf_seek fails when reading from the cache, do a hard read.
28468         + commit f076fa190e09eab5c586650d81e241e0bb85ce25
28469         * g10/keydb.c (keydb_get_keyblock): If the iobuf_seek fails when
28470         reading from the cache, then simply clear the cache and try reading
28471         from the database.
28472
28473         iobuf: Reduce verbosity of test.
28474         + commit 219de84df9a8408fffedbb2600f5eb4c441950b6
28475         * common/t-iobuf.c (main): Reduce verbosity.
28476
28477         iobuf: Add the IOBUF_INPUT_TEMP type to improve input temp handling.
28478         + commit f2d75ac7dc58f5ea59b231be6b83fea939b43ab8
28479         * common/iobuf.h (enum iobuf_use): Add new member, IOBUF_INPUT_TEMP.
28480         * common/iobuf.c (iobuf_temp_with_content): Create the iobuf as an
28481         IOBUF_INPUT_TEMP, not an IOBUF_INPUT buffer.  Assert that LENGTH ==
28482         A->D.SIZE.
28483         (iobuf_push_filter2): If A is an IOBUF_INPUT_TEMP, then make the new
28484         filter an IOBUF_INPUT filter and set its buffer size to
28485         IOBUF_BUFFER_SIZE.
28486         (underflow): If A is an IOBUF_INPUT_TEMP, then just return EOF; don't
28487         remove already read data.
28488         (iobuf_seek): If A is an IOBUF_INPUT_TEMP, don't discard the buffered
28489         data.
28490         (iobuf_alloc): Allow USE == IOBUF_INPUT_TEMP.
28491         (pop_filter): Allow USE == IOBUF_INPUT_TEMP.
28492         (iobuf_peek): Allow USE == IOBUF_INPUT_TEMP.
28493         (iobuf_writebyte): Fail if USE == IOBUF_INPUT_TEMP.
28494         (iobuf_write): Fail if USE == IOBUF_INPUT_TEMP.
28495         (iobuf_writestr): Fail if USE == IOBUF_INPUT_TEMP.
28496         (iobuf_flush_temp): Fail if USE == IOBUF_INPUT_TEMP.
28497
28498         iobuf: Rename IOBUF_TEMP to IOBUF_OUTPUT_TEMP.
28499         + commit 5ff5e72b9c275fbd978136b1028bbf251af26e57
28500         * common/iobuf.h (enum iobuf_use): Rename IOBUF_TEMP to
28501         IOBUF_OUTPUT_TEMP.  Update users.
28502
28503         iobuf: Use a first-class enum.
28504         + commit 24259d856b6cbdd679035512a8fb7c042de8f02e
28505         * common/iobuf.h (enum iobuf_use): Name the IOBUF_OUTPUT, etc. enum.
28506         (struct iobuf_struct): Change the field use's type to it.
28507
28508         iobuf: Fix test.
28509         + commit 8522cdc2264804d0677b7c0a447a0b45cf4195e3
28510         * common/t-iobuf.c (content_filter): If there is nothing to read,
28511         don't forget to set *LEN to 0.
28512         (main): Fix checks.
28513
28514 2015-09-01  Werner Koch  <wk@gnupg.org>
28515
28516         agent: Protect commit 135b1e3 against misbehaving Libgcrypt.
28517         + commit 9ba4ccdaf5e128fbea51ff142c63d4b359c7264d
28518         * agent/command-ssh.c (ssh_key_to_blob): Check DATALEN.
28519
28520         gpg: Remove option --no-sig-create-check.
28521         + commit f9c83d84e7d33df76898975f5ac852efa9c4882a
28522         * g10/gpg.c (opts): Remove --no-sig-create-check.
28523         * g10/options.h (struct opt): Remove field no_sig_create_check.
28524         * g10/sign.c (do_sign): Always check unless it is RSA and we are using
28525         Libgcrypt 1.7.
28526
28527         common: Assume an utf-8 locale on iconv errors.
28528         + commit 99c9bf7defd6c1ac9cc49c84e6c78eeb886a6952
28529         * common/utf8conv.c (handle_iconv_error): Use utf-8 as fallback.
28530
28531         common: Fix regression in building argpase.c standalone.
28532         + commit bc23e69b70191f887dcb937007833d0187af181f
28533         * common/argparse.c (is_native_utf8) [GNUPG_MAJOR_VERSION]: New.
28534
28535 2015-08-31  Neal H. Walfield  <neal@g10code.com>
28536
28537         g10: Don't leak memory if we fail to initialize a new database handle.
28538         + commit 04a6b903d0354be2c69c7f2c98987de17d68416e
28539         * g10/keydb.c (keydb_new): If we fail to open a keyring or keybox
28540         correctly release all resources.
28541
28542         g10: Improve interface documentation of the keydb API.
28543         + commit 360b699e9b4b8f99bd790b3cd158cd6f0fd7c131
28544         * g10/keydb.c: Improve code comments and documentation of internal
28545         interfaces.  Improve documentation of public APIs and move that to...
28546         * g10/keydb.h: ... this file.
28547
28548         g10: Don't cache search results if the search didn't scan the whole DB.
28549         + commit efd1ead9e779eb3bd37384258e08ad921a934612
28550         * g10/keydb.c (struct keydb_handle): Add new field is_reset.
28551         (keydb_new): Initialize hd->is_reset to 1.
28552         (keydb_locate_writable): Set hd->is_reset to 1.
28553         (keydb_search): Set hd->is_reset to 0.  Don't cache a key not found if
28554         the search started from the beginning of the database.
28555
28556         g10: Have keydb_search_first call keydb_search_reset before searching.
28557         + commit 11d8ffc939a4d20cfb0082b2d966b1e1a7d61f8d
28558         * g10/keydb.c (keydb_search_first): Reset the handle before starting
28559         the search.
28560
28561         g10: Remove unused parameter.
28562         + commit 0377db4b3581561b1ffc5bb7c3b4d698e8993b3a
28563         * g10/keydb.h (keydb_locate_writable): Remove unused parameter
28564         reserved.  Update users.
28565
28566 2015-08-31  NIIBE Yutaka  <gniibe@fsij.org>
28567
28568         agent: Fix SSH public key for EdDSA.
28569         + commit 135b1e32f01beaceba8a4ecc774e23b56aca1d24
28570         * agent/command-ssh.c (ssh_key_to_blob): Remove the prefix 0x40.
28571
28572 2015-08-26  Neal H. Walfield  <neal@g10code.com>
28573
28574         g10: Simplify cache.  Only include data that is actually used.
28575         + commit fad91071cadff43d77ce2e524dfb03999ba6678e
28576         * g10/keydb.c (struct kid_list_s): Rename from this...
28577         (struct kid_not_found_cache_bucket): ... to this.  Update users.
28578         Remove field state.
28579         (kid_list_t): Remove type.
28580         (KID_NOT_FOUND_CACHE_BUCKETS): Define.  Use this instead of a literal.
28581         (kid_found_table): Rename from this...
28582         (kid_not_found_cache_bucket): ... to this.  Update users.
28583         (kid_found_table_count): Rename from this...
28584         (kid_not_found_cache_count): ... to this.  Update users.
28585         (kid_not_found_p): Only return whether a key with the specified key id
28586         is definitely not in the database.
28587         (kid_not_found_insert): Remove parameter found.  Update callers.
28588         (keydb_search): Only insert a key id in the not found cache if it is
28589         not found.  Rename local variable once_found to already_in_cache.
28590
28591 2015-08-25  Werner Koch  <wk@gnupg.org>
28592
28593         Add configure option --enable-build-timestamp.
28594         + commit 9d07f6930aaa40dce92104e8c99241713d92eed2
28595         * configure.ac (BUILD_TIMESTAMP): Set to "<none>" by default.
28596
28597         gpg: Emit ERROR status for key signing failures.
28598         + commit 51b9b8fba4ee326013c2cc911c70cde4c5f81fc7
28599         * g10/keyedit.c (sign_uids): Write an ERROR status for a signing
28600         failure.
28601         (menu_adduid, menu_addrevoker, menu_revsig): Ditto.
28602         (menu_revuid, menu_revkey, menu_revsubkey): Ditto.
28603
28604         gpg: Print a new FAILURE status after most commands.
28605         + commit 9cdff09743c473a12359bfdb914578ede0e4e3e2
28606         * common/status.h (STATUS_FAILURE): New.
28607         * g10/cpr.c (write_status_failure): New.
28608         * g10/gpg.c (main): Call write_status_failure for all commands which
28609         print an error message here.
28610         * g10/call-agent.c (start_agent): Print an STATUS_ERROR if we can't
28611         set the pinentry mode.
28612
28613 2015-08-24  Neal H. Walfield  <neal@g10code.com>
28614
28615         agent: Raise the maximum password length.  Don't hard code it.
28616         + commit 348a6ebb63523305ce9f47d0f3e8a9086c338fed
28617         * agent/agent.h (MAX_PASSPHRASE_LEN): Define.
28618         * agent/command-ssh.c (ssh_identity_register): Use it instead of a
28619         hard-coded literal.
28620         * agent/cvt-openpgp.c (convert_from_openpgp_main): Likewise.
28621         * agent/findkey.c (unprotect): Likewise.
28622         * agent/genkey.c (agent_ask_new_passphrase): Likewise.
28623
28624 2015-08-24  Werner Koch  <wk@gnupg.org>
28625
28626         sm: Support secret key export via the Assuan interface.
28627         + commit 3cf02192a890d04f8f558cb72d46f9bd7a378322
28628         * sm/server.c (cmd_export): Add options --secret, --raw, and --pkcs12.
28629
28630 2015-08-23  Werner Koch  <wk@gnupg.org>
28631
28632         dirmngr: Allow sending of Zack's key.
28633         + commit 84f4c8811fc5bdd78693c4dc289389a8337cc257
28634         * dirmngr/server.c (MAX_KEYBLOCK_LENGTH): Increase to 1 MiB.
28635
28636         gpg: Fix regression in packet parser from Aug 19.
28637         + commit 88317ae8c829bfeb1689415efbd32b7a232d7bd0
28638         * g10/parse-packet.c (parse): Use an int to compare to -1.  Use
28639         buf32_to_ulong.
28640
28641         gpg: Show not found keys with --locate-key --verbose.
28642         + commit 00def10d365a88ce2d034ea9a5d6be4b03285fa4
28643         * g10/keylist.c (locate_one): Print a diagnostic for a not-found key.
28644
28645 2015-08-21  Neal H. Walfield  <neal@g10code.com>
28646
28647         common: Don't incorrectly reject 4 GB - 1 sized packets.
28648         + commit 09f2a7bca624d0492e1d7ab29ce19542249c13ff
28649         * g10/parse-packet.c (parse): Don't reject 4 GB - 1 sized packets.
28650         Add the constraint that the type must be 63.
28651         * kbx/keybox-openpgp.c (next_packet): Likewise.
28652         * tests/openpgp/4gb-packet.asc: New file.
28653         * tests/openpgp/4gb-packet.test: New file.
28654         * tests/openpgp/Makefile.am (TESTS): Add 4gb-packet.test.
28655         (TEST_FILES): Add 4gb-packet.asc.
28656
28657         common: Don't assume on-disk layout matches in-memory layout.
28658         + commit 4f37820334fadd8c5036ea6c42f3dc242665c4a9
28659         * g10/packet.h (PKT_signature): Change revkey's type from a struct
28660         revocation_key ** to a struct revocation_key *.  Update users.
28661
28662         common: Don't incorrectly copy packets with partial lengths.
28663         + commit b3226cadf9bbef4a367072396e5b0abf37afff2d
28664         * g10/parse-packet.c (parse): We don't handle copying packets with a
28665         partial body length to an output stream.  If this occurs, log an error
28666         and abort.
28667
28668         common: Check parameters more rigorously.
28669         + commit 0143d5c1ca4d12ac252c14f01931f48131591065
28670         * g10/parse-packet.c (dbg_copy_all_packets): Check that OUT is not
28671         NULL.
28672         (copy_all_packets): Likewise.
28673
28674         common: Don't continuing processing on error.
28675         + commit 48e792cc951a9d00fad0691ef7411c9e22cf675a
28676         * g10/parse-packet.c (dbg_parse_packet): Also return if parse returns
28677         an error.
28678         (parse_packet): Likewise.
28679         (dbg_search_packet): Likewise.
28680         (search_packet): Likewise.
28681
28682         common: Better respect the packet's length when reading it.
28683         + commit 73af66a0aada8f30d8f400fdc4f69e233fb53089
28684         * g10/parse-packet.c (parse_signature): Make sure PKTLEN doesn't
28685         underflow.  Be more careful that a read doesn't read more data than
28686         PKTLEN says is available.
28687
28688 2015-08-20  Werner Koch  <wk@gnupg.org>
28689
28690         po: Add lost translation of validity strings.
28691         + commit 0d5a4138f27187e7828ef8216758edc9b48b2c64
28692         * po/POTFILES.in (trust.c): Add missing file.
28693         * po/de.po: Changed German validity strings.
28694         * doc/help.de.txt: Ditto.
28695
28696 2015-08-20  Neal H. Walfield  <neal@g10code.com>
28697
28698         g10/parse-packet.c:parse: Try harder to not ignore an EOF.
28699         + commit 0add91ae1ca3718e8140af09294c595f47c958d3
28700         * g10/parse-packet.c (parse): Be more robust: make sure to process any
28701         EOF.
28702
28703         g10/parse-packet.c: Replace literal with symbolic expression.
28704         + commit 24a72dffa75a04611c98343140c4eb0fbfe2a59f
28705         * g10/parse-packet.c (dump_hex_line): Use sizeof rather than the
28706         buffer's size.
28707
28708         Add documentation for g10/parse-packet.c.
28709         + commit 026feff4a8e3090fb152af72c73aaa80c78e4551
28710         * g10/packet.h: Add documentation for functions defined in
28711         parse-packet.c.
28712         * g10/parse-packet.c: Improve comments for many functions.
28713
28714         g10/packet.h: Remove unused argument from enum_sig_subpkt.
28715         + commit c46e8bfe9a1ae3f1e5327d0451cffd6e4567b449
28716         * g10/packet.h (enum_sig_subpkt): Remove argument RET_N.  Update
28717         callers.
28718         * g10/parse-packet.c (enum_sig_subpkt): Remove argument RET_N.
28719
28720         g10/parse-packet.c:mpi_read: Detect EOF and correct boundary conditions.
28721         + commit c271feb53664dbf2b4ccbae90a31b8e726481e2d
28722         * g10/parse-packet.c (mpi_read): Improve documentation.  Correctly
28723         handle an EOF.  On overflow, correctly return the number of bytes read
28724         from the pipeline.
28725
28726         common/iobuf.c: Make control flow more obvious.
28727         + commit 49f922286fa8adb2d2ca730eb7bbe67e684b20de
28728         * common/iobuf.c (iobuf_read): Make control flow more obvious.
28729         (iobuf_get_filelength): Likewise.
28730         (iobuf_get_fd): Likewise.
28731         (iobuf_seek): Likewise.
28732
28733         common/iobuf.c: Add some sanity checks to catch programmer bugs.
28734         + commit c5da750cf3d53277fe6d86776bfe0d2304b05151
28735         * common/iobuf.c (iobuf_alloc): Check that BUFSIZE is not 0.
28736         (iobuf_readbyte): Check that A is an input filter.  Check that the
28737         amount of read data is at most the amount of buffered data.
28738         (iobuf_read): Check that A is an input filter.
28739         (iobuf_writebyte): Check that A is not an input filter.
28740         (iobuf_writestr): Check that A is not an input filter.
28741         (iobuf_flush_temp): Check that A is not an input filter.
28742
28743         common/iobuf.c:iobuf_write_temp: Elide redundant code.
28744         + commit e291b631c3b1aedf529078190cd51e2acfcd1d92
28745         * common/iobuf.c (iobuf_write_temp): Don't repeat iobuf_flush_temp.
28746         Use it directly.
28747
28748         common/iobuf.c: Have iobuf_writestr use iobuf_write, not iobuf_writebyte
28749         + commit a6d4bca3b576c3c5dba1aa6e8c1039089e14147b
28750         * common/iobuf.c (iobuf_write): Don't write a byte at a time.  Use
28751         iobuf_write.
28752
28753         common/iobuf: Improve documentation and code comments.
28754         + commit 1bfd1e43246c16e20f819bf5381ca21abde54458
28755         common/iobuf.h: Improve documentation and code comments.
28756         common/iobuf.c: Likewise.
28757
28758         common/iobuf.c: Adjust buffer size of filters in front of temp filters.
28759         + commit 0d40c4e83f6fbfea2f494f1f88412d3132ff98bd
28760         * common/iobuf.c (iobuf_push_filter2): If the head filter is a temp
28761         filter, use IOBUF_BUFFER_SIZE for the new filter.
28762
28763         common/iobuf.c: Buffered data should not be processed by new filters.
28764         + commit 827cc922d84d8113d4f13ebbed1314e03da5f7d2
28765         * common/iobuf.c (iobuf_push_filter2): If the pipeline is an output or
28766         temp pipeline, the new filter shouldn't assume ownership of the old
28767         head's internal buffer: the data was written before the filter was
28768         added.
28769         * common/t-iobuf.c (double_filter): New function.
28770         (main): Add test cases for the above bug.
28771
28772         common/iobuf.c: Flush the pipeline in iobuf_temp_to_buffer.
28773         + commit 616181f3c757160af8539869a6d929faca4962c4
28774         * common/iobuf.c (iobuf_temp_to_buffer): Flush each filter in the
28775         pipeline and copy the data from the last (not the first) filter's
28776         internal buffer.
28777
28778         common/iobuf.c: Combine iobuf_open, iobuf_create and iobuf_openrw.
28779         + commit 15ae99f887f4694de8468625d455d487d283f719
28780         * common/iobuf.c (do_open): New function, which is a generalization of
28781         iobuf_open, iobuf_Create, iobuf_openrw.
28782         (iobuf_open): Call do_open.
28783         (iobuf_create): Likewise.
28784         (iobuf_openrw): Likewise.
28785
28786         common/iobuf.h: Remove iobuf_open_fd_or_name.
28787         + commit 8402815d8e0e04a44362968f88b3d484d2395402
28788         * common/iobuf.h (iobuf_open_fd_or_name): Remove prototype.  Replace
28789         use with either iobuf_open or iobuf_fdopen_nc, as appropriate.
28790         * common/iobuf.c (iobuf_open): Remove function.
28791
28792         common/iobuf.c: Rename iobuf_flush and make it a static function.
28793         + commit 6d49a2b6691f2dd0d8ac34a15f18cc2a0c3ba5d3
28794         * common/iobuf.h (iobuf_flush): Remove prototype.
28795         * common/iobuf.c (filter_flush): New static prototype.
28796         (iobuf_flush): Rename...
28797         (filter_flush): ... to this.  Make static.  Simplify code.  Update
28798         callers.
28799
28800         common/iobuf.c: Don't abort freeing a pipeline if freeing a filter fails
28801         + commit 1f94646a86348128f585301fcd605e5e703fd77d
28802         * common/iobuf.c (iobuf_cancel): Don't abort freeing a pipeline if
28803         freeing a filter fails.  This needs to a memory leak.  Instead, keep
28804         freeing and return the error code of the first filter that fails.
28805
28806         common/iobuf.c: Improve iobuf_peek.
28807         + commit a250f73783c06d7789ac65a395d9247f4ab44c26
28808         * common/iobuf.c (underflow): Take additional parameter
28809         clear_pending_eof.  If not set, don't clear a pending eof when
28810         returning EOF.  Update callers.
28811         (iobuf_peek): Fill the internal buffer, if needed, to be able to
28812         better satisfy any request.
28813
28814         common/iobuf.c: When requested, fill the buffer even if it is not empty.
28815         + commit c7ad36eb0d7f872fc15e793aa1d0b6b89bc471d6
28816         * common/iobuf.c (underflow): Don't require that the buffer be empty.
28817         When called, fill any available space.
28818
28819         common/t-iobuf.c: Add a test case for multiple EOFs.
28820         + commit e76c75d8726558dc9084710253f0f6780e06fad3
28821         common/t-iobuf.c (main): Add a test case for multiple EOFs in an INPUT
28822         pipeline.
28823
28824         common/iobuf.c: Better respect boundary conditions in iobuf_read_line.
28825         + commit 4e32c602f5c40cca5f8f40e642ccb10d3f8c5614
28826         * common/iobuf.c (iobuf_read_line): Be more careful with boundary
28827         conditions.
28828         * common/iobuf.h: Include <gpg-error.h>.
28829         * common/t-iobuf.c: New file.
28830         * common/Makefile.am (module_tests): Add t-iobuf.
28831         (t_mbox_util_LDADD): New variable.
28832
28833         common/iobuf.c: Fix filter type for iobuf_temp_with_content.
28834         + commit fa9fda23c2c8cf6982b7263f6882ed8687d98c16
28835         * common/iobuf.c (iobuf_temp_with_content): Set the filter type to
28836         IOBUF_INPUT, not IOBUF_TEMP, which is only for output filters that
28837         write into a dynamic buffer.
28838
28839         common/iobuf.h: Remove unimplemented prototypes.
28840         + commit 75fd86bbd175e085a93c1ad62f50ae936494b307
28841         * common/iobuf.h (iobuf_unread): Remove unimplemented prototype.
28842         (iobuf_clear_eof): Likewise.
28843         (iobuf_append): Likewise.
28844
28845         common/iobuf.c: Refactor code to not need the desc field.
28846         + commit 679acc671e621847f50d6b4dca10a22c62500b9a
28847         * common/iobuf.h (struct iobuf_struct): Remove field desc.
28848         * common/iobuf.c (iobuf_desc): New function.  When a filter's
28849         description is needed, use this instead of the filter's desc field.
28850
28851         common/iobuf.h: Clarify semantics of nofast.  Simplify implementation.
28852         + commit 12fc56bcb51d984a6e86fc1eb7952f9976c67043
28853         * common/iobuf.h (struct iobuf_struct): Clarify semantics of nofast.
28854         Simplify use of nofast to implement just these semantics.
28855
28856         common/iobuf.c: Remove dead code (directfp).
28857         + commit e8c0b6abf88309c23a70df0abbd38d42fa22a786
28858         * common/iobuf.h (struct iobuf_struct): Remove field directfp.  Remove
28859         all uses of it.
28860
28861         common/iobuf.c: Remove dead code (opaque).
28862         + commit f05d60b3813a97e316a067680d7598b74621a522
28863         * common/iobuf.h (struct iobuf_struct): Remove field opaque.  Remove
28864         all uses of it.
28865
28866         common/iobuf.h: Replace further use of literals with symbolic constants.
28867         + commit c06eabac8e85f7f79414363836f093415e8da62e
28868         * common/iobuf.c: Move BLOCK_FILTER_INPUT,
28869         BLOCK_FILTER_OUTPUT_BLOCK_FILTER_TEMP from here...
28870         * common/iobuf.h: ... to here and rename to IOBUF_INPUT, IOBUF_OUTPUT
28871         and IOBUF_TEMP, respectively.  Where appropriate, use these macros
28872         instead of a literal.
28873
28874 2015-08-17  Werner Koch  <wk@gnupg.org>
28875
28876         gpg: Avoid linking to Libksba.
28877         + commit 91357b7722f2bf0d3765ec72855bdc96732df9d6
28878         * kbx/keybox.h (KEYBOX_WITH_X509): Do not define.
28879         * sm/Makefile.am (AM_CPPFLAGS): Define it here.
28880         (common_libs): Change to libkeybox509.a
28881         * g10/Makefile.am (AM_CFLAGS): remove KSBA_CFLAGS.
28882         (gpg2_LDADD, gpgv2_LDADD): Remove KSBA_LIBS
28883         * kbx/Makefile.am (noinst_LIBRARIES): Add libkeybox509.a.
28884         (libkeybox509_a_SOURCES): New.
28885         (libkeybox_a_CFLAGS): New.
28886         (libkeybox509_a_CFLAGS): New.
28887         (kbxutil_CFLAGS): New.
28888         * kbx/keybox-search.c (has_keygrip) [!KEYBOX_WITH_X509]: Declare args
28889         as unused.
28890
28891 2015-08-16  Ben Kibbey  <bjk@luxsci.net>
28892
28893         Fix pinentry loopback and passphrase contraints.
28894         + commit bba74cdd95ea98b5a7c3a12823b229341e91504e
28895         * agent/command.c (cmd_get_passphrase): Don't repeat passphrase for
28896         pinentry loopback mode.
28897         * agent/genkey.c (check_passphrase_constraints): Immediately return when
28898         pinentry mode is loopback.
28899
28900         Fix sending INQUIRE_MAXLEN for symmetric data.
28901         + commit 93f5295df512269dd8fecbd649b11cbacf78e864
28902         * g10/passphrase.c (passphrase_to_dek_ext): Write the status message.
28903
28904 2015-08-15  Ben Kibbey  <bjk@luxsci.net>
28905
28906         Inform a user about inquire length limit.
28907         + commit f126ca61565922b3b938c3486614b9bd7e6e454c
28908         * common/status.h (INQUIRE_MAXLEN): New.
28909         * g10/call-agent.c (default_inquire_cb): Send STATUS_INQUIRE_MAXLEN.
28910         client when inquiring a passphrase over pinentry-loopback.
28911
28912         Allow --gen-key to inquire a passphrase.
28913         + commit 233b5fedabd80a34452e748132e65b5944310428
28914         * g10/gpg.c (main): test for --command-fd during --gen-key parse.
28915
28916         When --command-fd is set then imply --batch to let gpg inquire a
28917         passphrase rather than requiring a pinentry.
28918
28919 2015-08-11  Werner Koch  <wk@gnupg.org>
28920
28921         Release 2.1.7.
28922         + commit b5e081973b56b21214fc0c65ba9015dd026328b4
28923
28924
28925 2015-08-10  NIIBE Yutaka  <gniibe@fsij.org>
28926
28927         agent: fix ECC key handling.
28928         + commit 8704c70108218a60f8fb2ee0e558ca8ed125600d
28929         * agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
28930         (convert_transfer_key): CURVE is the name of curve.
28931
28932 2015-08-08  Neal H. Walfield  <neal@g10code.com>
28933
28934         common/iobuf.c: Replace use of literals with symbolic constants.
28935         + commit c80643c5ecbee89f343ef087313870cee1334fe4
28936         * common/iobuf.c (BLOCK_FILTER_INPUT): Define.  Where appropriate, use
28937         this instead of a literal.
28938         (BLOCK_FILTER_OUTPUT): Likewise.
28939         (BLOCK_FILTER_TEMP): Likewise.
28940
28941 2015-08-07  Werner Koch  <wk@gnupg.org>
28942
28943         gpg: Allow gpgv to work with a trustedkeys.kbx file.
28944         + commit 5b7a80b1ab91d2f199065e5dd14e85f42918975d
28945         * g10/keydb.h (KEYDB_RESOURCE_FLAG_GPGVDEF): New.
28946         * g10/keydb.c (keydb_add_resource): Take care of new flag.
28947         * g10/gpgv.c (main): Use new flag.
28948
28949         agent: Add option --force to the DELETE_KEY command.
28950         + commit a68c5c5c7fe4ec8665e252e5062292f6c7b94fdd
28951         * agent/findkey.c (agent_delete_key): Add arg "force".
28952         * agent/command.c (cmd_delete_key): Add option --force.
28953
28954         common: Change alias for Curve25519 to "cv25519".
28955         + commit 9f31ab3d216ed74d6f392a62e3f95e0591174119
28956         * common/openpgp-oid.c (oidtable): Change alias.
28957
28958 2015-08-06  Werner Koch  <wk@gnupg.org>
28959
28960         gpg: Remove duplicated printing of the curve name in "sub" lines.
28961         + commit fb754dc6170d12edf3d35c48340b8d7b1ded20f7
28962         * g10/keylist.c (list_keyblock_print): Do not print extra curve name.
28963
28964         gpg: Add commands "fpr *" and "grip" to --edit-key.
28965         + commit fbb6c25ab5dbb5f2b1f1eb342ca7caa3f955d8c9
28966         * g10/keyedit.c (cmdGRIP): New.
28967         (cmds): Add command "grip".
28968         (keyedit_menu) <cmdFPR>: Print subkeys with argument "*".
28969         (keyedit_menu) <cmdGRIP>: Print keygrip.
28970         (show_key_and_fingerprint): Add arg "with_subkeys".
28971         (show_key_and_grip): New.
28972         * g10/keylist.c (print_fingerprint): Add mode 4.
28973
28974         gpg: Adjust UID line indentation for common key algos.
28975         + commit 969542c8c2f48a60c1d68b7bf70b0c00374bacba
28976         * g10/keylist.c (list_keyblock_print): Change UID line indentation
28977         * g10/mainproc.c (list_node): Ditto.
28978
28979 2015-08-06  NIIBE Yutaka  <gniibe@fsij.org>
28980
28981         Curve25519 support.
28982         + commit e5891a82c39997b65ce9ff90eb6120db7bedd399
28983         * agent/cvt-openpgp.c (get_keygrip): Handle Curve25519.
28984         (convert_secret_key, convert_transfer_key): Ditto.
28985         * common/openpgp-oid.c (oidtable): Add Curve25519.
28986         (oid_crv25519, openpgp_oid_is_crv25519): New.
28987         * common/util.h (openpgp_oid_is_crv25519): New.
28988         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Handle the case
28989         with Montgomery curve which uses x-only coordinate.
28990         * g10/keygen.c (gen_ecc): Handle Curve25519.
28991         (ask_curve): Change the API and second arg is to return subkey algo.
28992         (generate_keypair, generate_subkeypair): Follow chage of ask_curve.
28993         * g10/keyid.c (keygrip_from_pk): Handle Curve25519.
28994         * g10/pkglue.c (pk_encrypt): Handle Curve25519.
28995         * g10/pubkey-enc.c (get_it): Handle the case with Montgomery curve.
28996         * scd/app-openpgp.c (ECC_FLAG_DJB_TWEAK): New.
28997         (send_key_attr): Work with general ECC, Ed25519, and Curve25519.
28998         (get_public_key): Likewise.
28999         (ecc_writekey): Handle flag_djb_tweak.
29000
29001         common: extend API of openpgp_oid_to_curve for canonical name.
29002         + commit a6e40530898622fbc5d76557a7da5e69368ecaa4
29003         * common/openpgp-oid.c (openpgp_oid_to_curve): Add CANON argument.
29004         * common/util.h: Update.
29005         * g10/import.c (transfer_secret_keys): Follow the change.
29006         * g10/keyid.c (pubkey_string): Likewise.
29007         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Likewise.
29008         * parse-packet.c (parse_key): Likewise.
29009         * scd/app-openpgp.c (send_key_attr, get_public_key): Likewise.
29010
29011 2015-08-05  NIIBE Yutaka  <gniibe@fsij.org>
29012
29013         scd: Fix ecc_oid.
29014         + commit d088d2c81690a89051349ddc8a82fe222625f4e0
29015         * scd/app-openpgp.c (ecc_oid): Call with OIDBUF.
29016
29017         scd: Fix ECC support.
29018         + commit 0751571cac0f5aef2862c34a184f7f09ad9cb203
29019         * scd/app-openpgp.c (send_key_attr): Send KEYNO.
29020         (get_public_key): Fix SEXP composing.
29021         (ecc_writekey): Fix OID length calculation.
29022         (ecc_oid): Prepend the length before query.
29023         (parse_algorithm_attribute): Handle the case the curve is not available.
29024
29025 2015-08-04  Werner Koch  <wk@gnupg.org>
29026
29027         gpg: Fix duplicate key import due to legacy key in keyring.
29028         + commit 4a326d7c9a3b09efcccf4de00d6c003829ad89e8
29029         * g10/keydb.c (keydb_search_fpr): Skip legacy keys.
29030
29031         gpg: Properly handle legacy keys while looking for a secret key.
29032         + commit f05a63b10428df2878b1bb6fde57a2fc2aa99105
29033         * g10/getkey.c (have_secret_key_with_kid): Skip legacy keys.
29034
29035 2015-07-31  Werner Koch  <wk@gnupg.org>
29036
29037         gpg: Fix endless loop for expired keys given by fpr.
29038         + commit 328a6b6459a5ce4a70b374262f221ada20c40878
29039         * g10/getkey.c (lookup): Disable keydb caching when continuing a
29040         search.
29041
29042 2015-07-29  Werner Koch  <wk@gnupg.org>
29043
29044         gpg: Do not return "Legacy Key" from lookup if a key is expired.
29045         + commit 23d8609f4b5ec3432323a676fd7ef225c0ef71a1
29046         * g10/getkey.c (lookup): Map GPG_ERR_LEGACY_KEY.
29047
29048         gpg: Indicate secret keys and cards in a key-edit listing.
29049         + commit 8b2b988309cbc5af339beb0a55ff71d7464eb646
29050         * g10/keyedit.c (sign_uids): Add arg "ctrl".
29051         (show_key_with_all_names_colon): Ditto.
29052         (show_key_with_all_names): Ditto.
29053
29054         * g10/keyedit.c (show_key_with_all_names): Print key record
29055         indicators by checking with gpg-agent.
29056         (show_key_with_all_names): Ditto.  May now also print sec/sbb.
29057
29058 2015-07-28  Werner Koch  <wk@gnupg.org>
29059
29060         gpg: Remove the edit-key toggle command.
29061         + commit 7ef09afd1a6a37c7f22e7c3d898f0c917b08f940
29062         * g10/keyedit.c (cmds): Remove helptext from "toggle".
29063         (keyedit_menu): Remove "toggle" var and remove the sub/pub check
29064         against toggle.
29065
29066         common,w32: Avoid unused var warning about msgcache.
29067         + commit 4bc75337f31374b7424d7bdebf839dd91ec80c0a
29068         * common/i18n.c (USE_MSGCACHE): New.
29069         (msgcache) [!USE_MSGCACHE]: Do not define.
29070         (i18n_localegettext): Repalce #if conditions by USE_MSGCACHE.
29071
29072         w32: Try more places to find an installed Pinentry.
29073         + commit 18f1e627c697d75175b79fe095305fa775f20841
29074         * common/homedir.c (get_default_pinentry_name): Re-implement to
29075         support several choices for Windows.
29076
29077 2015-07-26  Werner Koch  <wk@gnupg.org>
29078
29079         scd: Fix size_t/unsigned int mismatch.
29080         + commit 55e64f47a52d76e097a01eb4044a88a4e10d6a87
29081         * scd/app-openpgp.c (ecc_writekey): Use extra var n.
29082
29083         Replace GNUPG_GCC_A_ macros by GPGRT_ATTR_ macros.
29084         + commit d382242fb6789973ce8d246ec154a4a1468c24c0
29085         * common/util.h: Provide replacement for GPGRT_ATTR_ macros when using
29086         libgpg-error < 1.20.
29087         * common/mischelp.h: Ditto.
29088         * common/types.h: Ditto.
29089
29090 2015-07-25  NIIBE Yutaka  <gniibe@fsij.org>
29091
29092         scd: support any curves defined by libgcrypt.
29093         + commit ef080d5c7fb7f3b75c3c57c011f78a312b8e13a9
29094         * g10/call-agent.h (struct agent_card_info_s): Add curve field.
29095         * g10/call-agent.c (learn_status_cb): Use curve name.
29096         * g10/card-util.c (card_status): Show pubkey name.
29097         * scd/app-openpgp.c (struct app_local_s): Record OID and flags.
29098         (store_fpr): Use ALGO instead of key type.
29099         (send_key_attr): Use curve name instead of OID.
29100         (get_public_key): Clean up by OID to curve name.
29101         (ecc_writekey): Support any curves in libgcrypt.
29102         (do_genkey, do_auth, ): Follow the change.
29103         (ecc_oid): New.
29104         (parse_algorithm_attribute): Show OID here.
29105
29106 2015-07-23  Peter Wu  <peter@lekensteyn.nl>
29107
29108         build: ignore scissor line for the commit-msg hook.
29109         + commit d24165bce2823c2f5dcb39b7b84c9aa00802a8ee
29110         * build-aux/git-hooks/commit-msg: Stop processing more lines when the
29111           scissor line is encountered.
29112
29113 2015-07-23  NIIBE Yutaka  <gniibe@fsij.org>
29114
29115         scd: Format change to specify "rsa2048" for KEY-ATTR.
29116         + commit dbf4534f49a1fe3823bd6d6d7bb4d9df863b4789
29117         * g10/card-util.c (do_change_keysize): Put "rsa".
29118         * scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
29119         Change the command format.
29120         (rsa_writekey): Check key type.
29121         (do_writekey): Remove "ecdh" and "ecdsa" support which was available
29122         in experimental libgcrypt before 1.6.0.
29123
29124 2015-07-22  Werner Koch  <wk@gnupg.org>
29125
29126         Avoid a leading double slash in make_filename.
29127         + commit 69d2c9b09bd9d0b86b9f2feb585037a2c11795b0
29128         * common/stringhelp.c (do_make_filename): Special case leading '/'.
29129
29130 2015-07-21  NIIBE Yutaka  <gniibe@fsij.org>
29131
29132         scd: change_keyattr_from_string for ECC.
29133         + commit 9901be395684dd1b35d83685a719291347684ab1
29134         * scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
29135         Support ECC.
29136         (rsa_writekey): Don't change key attribute.
29137
29138 2015-07-17  NIIBE Yutaka  <gniibe@fsij.org>
29139
29140         scd: Use openpgpdefs.h for constants.
29141         + commit f5d356fb5bbbd0e05a753612455253e4bc335266
29142         * scd/app-openpgp.c: Include openpgpdefs.h.
29143
29144 2015-07-16  Neal H. Walfield  <neal@g10code.com>
29145
29146         Don't segfault if the first 'auto-key-locate' option is 'clear'.
29147         + commit f2ee673c99825d5189631031ddec2dbf54dbd482
29148         * g10/getkey.c (free_akl): If AKL is NULL, just return.
29149
29150 2015-07-10  NIIBE Yutaka  <gniibe@fsij.org>
29151
29152         agent: Support non-NLS build.
29153         + commit b3286af36d452fc801be573a057b0838d53a2edd
29154         * agent/agent.h: Use ENABLE_NLS and define L_() macro.
29155
29156 2015-07-09  NIIBE Yutaka  <gniibe@fsij.org>
29157
29158         scd: Remove unused files.
29159         + commit 67b2dc7636e47baefd5aafe0eb45b4730f974481
29160         * scd/Makefile.am (sc_copykeys_*): Remove.
29161         * scd/sc-copykeys.c: Remove.
29162         * scd/pcsc-wrapper.c: Remove.
29163         * scd/{card-common.h,card-dinsig.c,card-p15.c,card.c}: Remove.
29164
29165 2015-07-08  NIIBE Yutaka  <gniibe@fsij.org>
29166
29167         g10: Use canonical name for curve.
29168         + commit 5b46726931049e060d8fbfa879db7907078a9aed
29169         * g10/import.c (transfer_secret_keys): Use canonical name.
29170         * common/openpgp-oid.c (openpgp_curve_to_oid): Return NULL on error.
29171         * g10/keyid.c (pubkey_string): Follow change of openpgp_curve_to_oid.
29172         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
29173         * g10/parse-packet.c (parse_key): Ditto.
29174
29175 2015-07-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
29176
29177         drop long-deprecated gpgsm-gencert.sh.
29178         + commit 1be2cebf7ff5837c8b548b4f4afbf1b8b28211bc
29179          * tools/gpgsm-gencert.sh: remove deprecated script entirely.  It is
29180            fully replaced by gpgsm --gen-key
29181          * doc/tools.texi: remove gpgsm-gencert.sh documentation
29182          * .gitignore: no longer ignore gpgsm-gencert.sh manpage
29183          * doc/Makefile.am: quit making the manpage
29184          * tools/Makefile.am: quit distributing the script
29185          * doc/howto-create-a-server-cert.texi: overhaul documentation to use
29186            gpgsm --gen-key and tweak explanations
29187
29188 2015-07-02  NIIBE Yutaka  <gniibe@fsij.org>
29189
29190         po: Update Japanese translation.
29191         + commit 3502b3cc0f5ff92ab89a0da8b1e344a8ad615737
29192
29193
29194         scd: Support AES decryption for OpenPGPcard v3.0.
29195         + commit 45c49a0030c7a01ec011ce810ddb3aaef734e9bf
29196         * scd/app-openpgp.c (do_decipher): Support AES decryption.
29197
29198 2015-07-01  Werner Koch  <wk@gnupg.org>
29199
29200         Release 2.1.6.
29201         + commit a499eeb6a6545d87ac9f1b64e32017bfdb4f67e6
29202
29203
29204 2015-07-01  Daiki Ueno  <ueno@gnu.org>
29205
29206         agent: Unset INSIDE_EMACS on gpg-agent startup.
29207         + commit f1490a3a0ecf4a5a03373c9563f7709630232ee3
29208         * agent/gpg-agent.c (main): Unset INSIDE_EMACS envvar.
29209
29210 2015-07-01  Werner Koch  <wk@gnupg.org>
29211
29212         common: Implement i18n_localegettext.
29213         + commit a65447f0d64d0c53ddbdcfc988f26ecc9a8a6f08
29214         * common/i18n.c (msg_cache_s, msg_cache_head_s): New.
29215         (msgcache): New.
29216         (i18n_localegettext): Implement locale dependent lookup.
29217
29218 2015-06-30  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
29219
29220         Pass DBUS_SESSION_BUS_ADDRESS for gnome3.
29221         + commit 816824953c91959c23a57c047bdba6a902ffdde6
29222         * common/session-env.c (stdenvnames): Add DBUS_SESSION_BUS_ADDRESS.
29223
29224 2015-06-30  Werner Koch  <wk@gnupg.org>
29225
29226         Flag the L_() function with attribute format_arg.
29227         + commit 232af382e563fcbe15589a3ccae7d6908a17c44d
29228         * agent/agent.h (LunderscorePROTO): New.
29229         * common/util.h (GNUPG_GCC_ATTR_FORMAT_ARG): New.
29230         * common/i18n.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. Use for
29231         i18n_localegettext.  Expand LunderscorePROTO.
29232         * agent/genkey.c (check_passphrase_constraints): Use xtryasprintf
29233         again to keep the old translations.
29234
29235         agent: Use different translation func for Pinentry strings.
29236         + commit e76d4c05b24211f3981ab69cddb3fccc17d21e0e
29237         * po/Makevars (XGETTEXT_OPTIONS): Add keyword "L_".
29238         * common/i18n.c (i18n_localegettext): New stub.
29239         * common/i18n.h: Expand the LunderscoreIMPL macro.
29240         * agent/agent.h (L_): New.
29241         (LunderscoreIMPL): New.
29242         * agent/call-pinentry.c (setup_qualitybar): Add arg ctrl anc change
29243         caller.
29244         * agent/findkey.c (try_unprotect_cb): Add local var ctrl.
29245         * agent/genkey.c (check_passphrase_constraints): Replace xtryasprintf
29246         by xtrystrdup to avoid gcc warning.  Unfortinately this changes the
29247         string.
29248         (agent_ask_new_passphrase): Cleanup the use of initial_errtext.
29249
29250         gpg: Make show-sig-subpackets work again.
29251         + commit 010e4281c3e15e2f86589dd1da419531ead519ef
29252         * g10/gpg.c (parse_list_options): Fix offset for subpackets.
29253
29254 2015-06-29  Werner Koch  <wk@gnupg.org>
29255
29256         agent: Prepare for Libassuan with Cygwin support.
29257         + commit b6076579311029aa76c00377d9a804b1578bf58f
29258         * agent/gpg-agent.c (create_server_socket): Add arg "cygwin".  Call
29259         assuan_sock_set_flag if Assuan version is recent enough.
29260         (main): Create ssh server socket with Cygwin flag set.
29261
29262 2015-06-29  Neal H. Walfield  <neal@gnu.org>
29263
29264         Show passphrase constraints errors as password prompt errors.
29265         + commit 2778c6f8f40d73272075ce04c07097f65c94054e
29266         * agent/agent.h (check_passphrase_constraints): Add parameter
29267         failed_constraint and remove parameter silent.  Update callers.
29268         * agent/genkey.c (check_passphrase_constraints): Add parameter
29269         failed_constraint and remove parameter silent.  If FAILED_CONSTRAINT
29270         is not NULL and OPT.ENFORCE_PASSPHRASE_CONSTRAINTS is FALSE, save the
29271         error text in *FAILED_CONSTRAINT and don't call take_this_one_anyway
29272         or take_this_one_anyway2.  If FAILED_CONSTRAINT is NULL, act as if
29273         SILENT was set.
29274         (agent_ask_new_passphrase): Change initial_errtext's type from a const
29275         char * to a char *.  Pass it to check_passphrase_constraints.  If it
29276         contains malloc's memory, free it.
29277
29278 2015-06-29  Neal H. Walfield  <neal@g10code.com>
29279
29280         Improve documentation for default-cache-ttl and default-cache-ttl-ssh.
29281         + commit 0416aed4abf6cea94458d2e38eb4a5e6bfea2d8b
29282         * doc/gpg-agent.texi (Agent Options): Improve documentation for
29283         default-cache-ttl and default-cache-ttl-ssh.
29284
29285         Don't raise max-cache-ttl to default-cache-ttl.
29286         + commit 60cf69ff9d61a2cd37fc4468f232fd41aa70a651
29287         * agent/gpg-agent.c (finalize_rereadable_options): Don't raise
29288         max-cache-ttl to default-cache-ttl.  Likewise for max-cache-ttl-ssh
29289         and default-cache-ttl-ssh.
29290
29291         Improve the description of old packets with an indeterminate length.
29292         + commit 68c217f457a772984d0afbdd341f18de7c867505
29293         * g10/parse-packet.c (parse): Make the description more accurate when
29294         listing packets: old format packets don't support partial lengths,
29295         only indeterminate lengths (RFC 4880, Section 4.2).
29296
29297 2015-06-29  Werner Koch  <wk@gnupg.org>
29298
29299         agent: Add --verify to the PASSWD command.
29300         + commit 9bca96dbc5c32bdd00196462fde8c9ab94aeb28d
29301         * agent/command.c (cmd_passwd): Add option --verify.
29302
29303         agent,w32: Do not create a useless socket with --enable-putty-support.
29304         + commit 7a387331645736eaeaaef57770beef5fa741bc22
29305         * agent/agent.h (opt): Remove field ssh_support.
29306         * agent/gpg-agent.c (ssh_support): New.  Replace all opt.ssh_support
29307         by this.
29308         (main): Do not set ssh_support along with setting putty_support.
29309
29310         gpgsm: Add command option "offline".
29311         + commit 2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073
29312         * sm/server.c (option_handler): Add "offline".
29313         (cmd_getinfo): Ditto.
29314         * sm/certchain.c (is_cert_still_valid):
29315         (do_validate_chain):
29316         * sm/gpgsm.c (gpgsm_init_default_ctrl): Default "offline" to the value
29317         of --disable-dirmngr.
29318         * sm/call-dirmngr.c (start_dirmngr_ext): Better also check for
29319         ctrl->offline.
29320
29321 2015-06-26  NIIBE Yutaka  <gniibe@fsij.org>
29322
29323         scd: Support button flag and AES key data for OpenPGPcard v3.0.
29324         + commit d2fdf2e1b6cd447bb1c36df0ac7d8e669802fa22
29325         * scd/app-openpgp.c (do_getattr, show_caps, app_select_openpgp):
29326         Support button and symmetric decryption.
29327         (do_setattr): Support setting AESKEY.
29328
29329 2015-06-25  Andre Heinecke  <aheinecke@intevation.de>
29330
29331         sm: Fix cert storage for ephemeral certs.
29332         + commit 5e1a844ae9b6730b4b8a2c9178ea9bc121560c28
29333         * sm/keydb.c (keydb_store_cert): Clear ephemeral flag for
29334         existing certs if store should not be ephemeral.
29335
29336 2015-06-23  Werner Koch  <wk@gnupg.org>
29337
29338         Allow use of debug flag names for all tools.
29339         + commit 54a0ed3d9b10a3c6dfb3d6a4d20b693a3183f8f6
29340         * g13/g13.c: Make use of debug_parse_flag.
29341         * scd/scdaemon.c: Ditto.
29342         * sm/gpgsm.c: Ditto
29343         * agent/gpg-agent.c: Ditto.  But do not terminate on "help"
29344         * dirmngr/dirmngr.c: Ditto.
29345
29346         common: Improve fucntion parse_debug_flag.
29347         + commit 8195e55d0c134a45f7c9bd95c8b5741781841c18
29348         * common/miscellaneous.c (parse_debug_flag): Add hack not to call
29349         exit.  Add "none" and "all" flags.
29350
29351 2015-06-23  NIIBE Yutaka  <gniibe@fsij.org>
29352
29353         scd: pinpad workaround for PC/SC implementations.
29354         + commit 5e1d2fe6555d06f9dcd2daac713b2edfbc0428a5
29355         * scd/adpu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Bigger buffer
29356         for TPDU card reader.
29357
29358 2015-06-22  Werner Koch  <wk@gnupg.org>
29359
29360         gpg: Allow debug flag names for --debug.
29361         + commit 4698e5b203bd983503b5fd784fcd09dd3bc3a15e
29362         * g10/gpg.c (opts): Change arg for oDebug to a string.
29363         (debug_flags): New; factored out from set_debug.
29364         (set_debug): Remove "--debug-level help".  Use parse_debug_flag to
29365         print the used flags.
29366         (main): Use parse_debug_flag for oDebug.
29367
29368         common: Add function parse_debug_flag.
29369         + commit 22147952b744958ec46d356e942540356ff7d93e
29370         * common/miscellaneous.c (parse_debug_flag): New.
29371         * common/util.h (struct debug_flags_s): New.
29372
29373         common: Add function strtokenize.
29374         + commit d37f47081d41584efc0c397432811f9cfa5d5867
29375         * common/stringhelp.c: Include assert.h.
29376         (strtokenize): New.
29377         * common/t-stringhelp.c (test_strtokenize): New.
29378
29379         gpg: Fix regression due to recent commit 6500f33.
29380         + commit e0873a3372800d51c90ca656450f937dbae9c169
29381         * g10/keydb.c (kid_list_s): Keep a state in the table.
29382         (kid_not_found_table): Rename to kid_found_table.
29383         (n_kid_not_found_table): Rename to kid_found_table_count.
29384         (kid_not_found_p): Return found state.
29385         (kid_not_found_insert): Add arg found.
29386         (keydb_search): Store found state in the table.
29387
29388 2015-06-22  NIIBE Yutaka  <gniibe@fsij.org>
29389
29390         scd: Fix Cherry ST-2000 support for pinpad input.
29391         + commit 444e9232aa9e00aacd939cbf7bdb881b550dfebe
29392         * scd/apdu.c (pcsc_vendor_specific_init): Set pinmax to 15.
29393         * scd/ccid-driver.c (ccid_transceive_secure): Add zero for the
29394         template of APDU.
29395
29396 2015-06-20  Werner Koch  <wk@gnupg.org>
29397
29398         gpg: Print number of good signatures with --check-sigs.
29399         + commit 0948c4f217308ffa0ec61ce189d387fd61b02bbd
29400         * g10/keylist.c (keylist_context): Add field good_sigs.
29401         (list_keyblock_print): Updated good_sigs.
29402         (print_signature_stats): Print number of good signatures and use
29403         log_info instead of tty_printf.
29404
29405         gpg: Improve speed of --check-sigs and --lish-sigs.
29406         + commit 6500f338a35f4148606480c79f3a0c1b0d15f13a
29407         * g10/keydb.c (kid_list_t): New.
29408         (kid_not_found_table, n_kid_not_found_table): New.
29409         (kid_not_found_p, kid_not_found_insert, kid_not_found_flush): New.
29410         (keydb_insert_keyblock): Flush the new cache.
29411         (keydb_delete_keyblock): Ditto.
29412         (keydb_update_keyblock): Ditto.
29413         (keydb_search): Use the new cache.
29414         (keydb_dump_stats): New.
29415         * g10/gpg.c (g10_exit): Dump keydb stats.
29416
29417 2015-06-19  Werner Koch  <wk@gnupg.org>
29418
29419         gpg: Add more log_clock calls to keydb.c.
29420         + commit 53e9b86085ac70ede8a0b1de9018ccbfe55b0932
29421         * g10/keydb.c (keydb_get_keyblock): Add log_clock calls.
29422
29423         gpg: Print available debug flags using "--debug-level help".
29424         + commit 663a31f1ea2fc5a43c822e916cf20fece5243851
29425         * g10/gpg.c (set_debug): Add "help" option and use a table for the
29426         flags.
29427
29428         gpg: Fix export problem in case an old keyring has PGP-2 keys.
29429         + commit c5604eeee4b64a44a1ca1d517ace14fc1cbda298
29430         * g10/export.c (do_export_stream): Skip legacy keys.
29431
29432 2015-06-18  Werner Koch  <wk@gnupg.org>
29433
29434         dirmngr: Fix the cleanup zombies fix (685b782).
29435         + commit c97198371b7307e64afdd323231977b2247f64ec
29436         * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Do not close the
29437         stdout reader after EOF from read_log_data.
29438         * dirmngr/crlcache.c (crl_cache_reload_crl): Close the reader before
29439         the next iteration.
29440
29441 2015-06-17  Werner Koch  <wk@gnupg.org>
29442
29443         agent: Print a warning for obsolete options.
29444         + commit 010d26a85bfe15c4aa12eefeab851dbde0609c26
29445         * g10/misc.c (obsolete_scdaemon_option): Move to
29446         * common/miscellaneous.c (obsolete_option): ... here.
29447         * agent/gpg-agent.c (main): Use obsolete_option for the 3 obsolete
29448         options.
29449
29450 2015-06-16  Werner Koch  <wk@gnupg.org>
29451
29452         dirmngr: Cleanup zombies and fix hang on shutdown.
29453         + commit 685b782a18adb90bbf78956682e4e7f89fed678c
29454         * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Move nfds computation
29455         into the loop.  Check the queue also on timeout.  Close log_fd and
29456         reader context on EOF or error.
29457
29458         dirmngr: Avoid accessing uninitialized memory in log callback.
29459         + commit 82c72e2db7bc5b633768d59822f2e2a353fa6e32
29460         * dirmngr/dirmngr.c (pid_suffix_callback): Clear int_and_ptr_u before
29461         use.
29462         (start_connection_thread): Ditto.
29463         (handle_connections): Ditto.
29464
29465 2015-06-16  Neal H. Walfield  <neal@g10code.com>
29466
29467         Don't prompt for the password multiple times in pinentry loopback mode.
29468         + commit eac081ba1278855fa223b031b527498fec558bc7
29469         * g10/gpg.c (main): If OPT.PINENTRY_MODE is PINENTRY_MODE_LOOPBACK,
29470         clear OPT.PASSPHRASE_REPEAT.
29471
29472 2015-06-16  NIIBE Yutaka  <gniibe@fsij.org>
29473
29474         po: Update Japanese Translation.
29475         + commit 15540f6233bd041b06708862a6d9535cbcabe330
29476
29477
29478 2015-06-15  Werner Koch  <wk@gnupg.org>
29479
29480         doc: Add defs.inc to BUILT_SOURCES.
29481         + commit ef273a9afc7840b75cfb9b8af78d117b7d672c6a
29482
29483
29484 2015-06-11  Werner Koch  <wk@gnupg.org>
29485
29486         Release 2.1.5.
29487         + commit 9b7bdfae82f74a147a5dbf0fac0f78cde77a207b
29488
29489
29490         agent: Fix --extra-socket on Windows.
29491         + commit 985918aab025cf0ac9db411b88a47c4b985e5e95
29492         * agent/gpg-agent.c (start_connection_thread): Rename to ...
29493         (do_start_connection_thread): this.  Factor nonce checking out to ...
29494         (start_connection_thread_std): this,
29495         (start_connection_thread_extra): this,
29496         (start_connection_thread_browser): and this.
29497
29498         agent: Add experimental option --browser-socket.
29499         + commit 008435b95cbca19adc217178dc9d793eca584345
29500         * agent/agent.h (opt): Add field "browser_socket".
29501         * agent/command.c (cmd_setkeydesc): Use a different message for
29502         restricted==2.
29503         * agent/gpg-agent.c (oBrowserSocket): New.
29504         (opts): Add --browser-socket.
29505         (socket_name_browser, redir_socket_name_browser): New.
29506         (socket_nonce_browser): New.
29507         (cleanup): Cleanup browser socket.
29508         (main): Implement option.
29509         (start_connection_thread_browser): New.
29510         (handle_connections): Add arg listen_fd_browser and use it.
29511
29512 2015-06-10  Daiki Ueno  <ueno@gnu.org>
29513
29514         agent: Add option --allow-emacs-pinentry.
29515         + commit 691dae270b3b741178912599724d69adabdb48b9
29516         * agent/agent.h (opt): Add field allow_emacs_pinentry.
29517         * agent/call-pinentry.c (start_pinentry): Act upon new var.
29518         * agent/gpg-agent.c (oAllowEmacsPinentry): New.
29519         (opts): Add option --allow-emacs-pinentry.
29520         (parse_rereadable_options): Set this option.
29521         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add new option.
29522
29523 2015-06-09  Werner Koch  <wk@gnupg.org>
29524
29525         doc: Do not used fixed file names in the manuals.
29526         + commit 25331bba5554a39d226d32433add7784b2e170b8
29527         * doc/mkdefsinc.c: New.
29528         * doc/Makefile.am: Include cmacros.am.
29529         (EXTRA_DIST): Add mkdefsinc.c defsincdate.
29530         (BUILT_SOURCES): Add defsincdate
29531         (CLEANFILES): Add mkdefsinc and defs.inc.
29532         (mkdefsinc): New rule.
29533         (yat2m-stamp): Depend on defs.inc.
29534         ($(myman_pages) gnupg.7): Ditto.
29535         (gnupg.texi): Remove rule to touch itself.
29536         (dist-hook): New.
29537         (defsincdate): New.
29538         (defs.inc): New.
29539         * doc/gnupg.texi: Remove inclusion of version.texi.  Include defs.inc.
29540         Also include defs.inc in all files used to build man files.  Change
29541         fixed directory names to those from defs.inc.
29542
29543         dirmngr: Avoid crash due to an empty crls.d/DIR.txt.
29544         + commit 255dadd76d5a2101d2c5450741326b67253fa9ea
29545         * dirmngr/crlcache.c (check_dir_version): Avoid segv.
29546
29547 2015-06-08  Werner Koch  <wk@gnupg.org>
29548
29549         doc: Change the manual source to be only for GnuPG 2.1.
29550         + commit abbefdd04d7ee30218506caeae1fd858569c9f0a
29551
29552
29553         Convey envvar INSIDE_EMACS to the pinentry.
29554         + commit c672572bd50966187cc823585efed673b66ff942
29555         * common/session-env.c (stdenvnames): Add it.
29556
29557         agent: Add command "getinfo std_env_names".
29558         + commit 8425db6a26bf66dad16dfbc26be9af7d272f31d3
29559         * agent/command.c (cmd_getinfo): Add new sub-command.
29560
29561 2015-06-05  NIIBE Yutaka  <gniibe@fsij.org>
29562
29563         scd: do_decipher change for OpenPGPcard v3.0.
29564         + commit cf508a1f7f4c8926dc554be68a2d46f5ce272ac0
29565         * scd/app-openpgp.c (do_decipher): Add a header for ECDH.
29566
29567 2015-06-04  Werner Koch  <wk@gnupg.org>
29568
29569         gpg: Replace -1 by GPG_ERR_NOT_FOUND in tdbio.c.
29570         + commit a4a15195c2a3729025a3ba3439ac8860083fceeb
29571         * g10/tdbio.c (lookup_hashtable): Return GPG_ERR_NOT_FOUND.
29572         * g10/tdbdump.c (import_ownertrust): Test for GPG_ERR_NOT_FOUND.
29573         * g10/trustdb.c (read_trust_record): Ditto.
29574         (tdb_get_ownertrust, tdb_get_min_ownertrust): Ditto.
29575         (tdb_update_ownertrust, update_min_ownertrust): Ditto.
29576         (tdb_clear_ownertrusts, update_validity): Ditto.
29577         (tdb_cache_disabled_value): Ditto.
29578
29579         gpg: Cleanup error code path in case of a bad trustdb.
29580         + commit f170240ef735edc481f60e51527cbb5ee1acfd55
29581         * g10/tdbio.c (tdbio_read_record): Fix returning of the error.
29582
29583         gpg: Fix output in case of a corrupted trustdb.
29584         + commit bf06d04f53296f4b4b73b9360cf1571559bb2295
29585         * g10/tdbdump.c (list_trustdb): Add arg FP and change callers to pass
29586         es_stdout.
29587         * g10/tdbio.c (upd_hashtable): On a corrupted trustdb call
29588         list_trustdb only in verbose > 1 mode and let it dump to stderr.
29589
29590 2015-05-29  NIIBE Yutaka  <gniibe@fsij.org>
29591
29592         scd: Fix key template of ECC.
29593         + commit e5c69e87beebe99d362ac721ce4ea6b057a30a99
29594         * scd/app-openpgp.c (build_ecc_privkey_template): Use correct value.
29595
29596 2015-05-28  NIIBE Yutaka  <gniibe@fsij.org>
29597
29598         g10: Fix a race condition initially creating trustdb.
29599         + commit fe5c6edaed78839303d67e01e141cfc6b5de9aec
29600         * g10/tdbio.c (take_write_lock, release_write_lock): New.
29601         (put_record_into_cache, tdbio_sync, tdbio_end_transaction): Use
29602         new lock functions.
29603         (tdbio_set_dbname): Fix the race.
29604         (open_db): Don't call dotlock_create.
29605
29606 2015-05-27  NIIBE Yutaka  <gniibe@fsij.org>
29607
29608         g10: Remove g10/signal.c.
29609         + commit 6cb18a8f975b7ff7ca79c1fb0cddcd4b66be90fb
29610         * g10/signal.c: Remove.
29611         * g10/main.h: Remove old function API.
29612         * g10/tdbio.c: Use new API, even in the dead code.
29613
29614 2015-05-20  Werner Koch  <wk@gnupg.org>
29615
29616         agent: Cleanup caching code for command GET_PASSPHRASE.
29617         + commit 23d2ef83cda644c6a83499f9327350d3371e8a17
29618         * agent/command.c (cmd_get_passphrase): Read from the user cache.
29619
29620 2015-05-19  Neal H. Walfield  <neal@g10code.com>
29621
29622         agent: When the password cache is cleared, also clear the ext. cache.
29623         + commit 3a9305439b75ccd4446378d4fd87da087fd9c892
29624         * agent/agent.h (agent_clear_passphrase): New declaration.
29625         * agent/call-pinentry.c (agent_clear_passphrase): New function.
29626         * agent/command.c (cmd_clear_passphrase): Call agent_clear_passphrase.
29627
29628         agent: Modify agent_clear_passphrase to support an ext. password cache.
29629         + commit e201c20f25e7bed29088186c5f717d43047a0f4b
29630         * agent/agent.h (agent_get_passphrase): Add arguments keyinfo and
29631         cache_mode.  Update callers.
29632         * agent/call-pinentry.c (agent_get_passphrase): Add arguments keyinfo
29633         and cache_mode.  If KEYINFO and CACHE_MODE describe a cachable key,
29634         then send SETKEYINFO to the pinentry.
29635
29636 2015-05-19  NIIBE Yutaka  <gniibe@fsij.org>
29637
29638         g10: detects public key encryption packet error properly.
29639         + commit c771963140cad7c1c25349bcde27e427effc0058
29640         g10/mainproc.c (proc_pubkey_enc): Only allow relevant algorithms for
29641         encryption.
29642
29643 2015-05-15  Werner Koch  <wk@gnupg.org>
29644
29645         build: Make --disable-gpgsm work.
29646         + commit 43ea8f5d884dd108bb27d8e1610fa28802295a06
29647         * Makefile.am: Always build kbx/
29648         * g10/Makefile.am (AM_CFLAGS): Include KSBA_CFLAGS.
29649
29650 2015-05-12  Werner Koch  <wk@gnupg.org>
29651
29652         Release 2.1.4.
29653         + commit a67ead6525d7597a9e0b152c5971f6290f7912f3
29654
29655
29656         speedo: Add make option SELFCHECK=0 to build a new release.
29657         + commit 21b0701e2e044894c53ff59d22c5c6a172780c25
29658         * build-aux/getswdb.sh: Add option --skip-selfcheck.
29659         * build-aux/speedo.mk: Add option SELFCHECK.
29660
29661 2015-05-11  Werner Koch  <wk@gnupg.org>
29662
29663         common: Cope with AIX problem on number of open files.
29664         + commit 987532b038a2d9b9e76c0de425ee036ca2bffa1b
29665         * common/exechelp-posix.c: Limit returned value for too hight values.
29666
29667         gpg-connect-agent: Fix quoting of internal percent+ function.
29668         + commit 26e2eb98d3d8405b335b43c8e86deacf622cd957
29669         * tools/gpg-connect-agent.c (get_var_ext) <percent, percent+): Also
29670         escape '+'.
29671
29672         agent: Add option --no-allow-external-cache.
29673         + commit d7293cb317acc40cc9e5189cef33fe9d8b47e62a
29674         * agent/agent.h (opt): Add field allow_external_cache.
29675         * agent/call-pinentry.c (start_pinentry): Act upon new var.
29676         * agent/gpg-agent.c (oNoAllowExternalCache): New.
29677         (opts): Add option --no-allow-external-cache.
29678         (parse_rereadable_options): Set this option.
29679
29680         agent: Add strings for use by future Pinentry versions.
29681         + commit 02d5e1205489aa5027a87a64552eaf15984dc22d
29682         * agent/call-pinentry.c (start_pinentry): Add more strings.
29683
29684         agent: Add option --debug-pinentry.
29685         + commit 14232c3870c5ef5d2fa15e8ed3f302b1ba29d25c
29686         * agent/gpg-agent.c (oDebugPinentry): New.
29687         (opts): Add --debug-pinentry.
29688         (parse_rereadable_options): Set that option.
29689         * agent/call-pinentry.c (start_pinentry): Pass option to
29690         assuan_set_flag.
29691
29692 2015-05-08  Werner Koch  <wk@gnupg.org>
29693
29694         gpg: Avoid cluttering stdout with trustdb info in verbose mode.
29695         + commit b03a2647299a6c8764a2574590cbaccdff9e497d
29696         * g10/trustdb.c (validate_keys): Call dump_key_array only in debug
29697         mode.
29698
29699         gpg: Fix wrong output in list mode.
29700         + commit 7039f87375b3c89d6e63837b811ed2be71c8d9db
29701         * g10/parse-packet.c (parse_gpg_control): Replace puts by es_fputs to
29702         LISTFP.
29703
29704         gpg: New command --quick-adduid.
29705         + commit 64e809b791645f343feb69112baba8e2700e454b
29706         * g10/keygen.c (ask_user_id): Factor some code out to ...
29707         (uid_already_in_keyblock): new.
29708         (generate_user_id): Add arg UIDSTR.  Fix leaked P.
29709         * g10/keyedit.c (menu_adduid): Add new arg uidstring.  Adjust caller.
29710         (keyedit_quick_adduid): New.
29711         * g10/gpg.c (aQuickAddUid): New.
29712         (opts):  Add command --quick-adduid.
29713         (main): Implement that.
29714
29715         gpg: Add push/pop found state feature to keydb.
29716         + commit 3c439c0447f8a7468a61bbdc4c9a101ef2451dcb
29717         * g10/keydb.c (keydb_handle): Add field saved_found.
29718         (keydb_new): Init new field.
29719         (keydb_push_found_state, keydb_pop_found_state): New.
29720         * g10/keyring.c (kyring_handle): Add field saved_found.
29721         (keyring_push_found_state, keyring_pop_found_state): New.
29722
29723         gpg: Minor code merging in keyedit.
29724         + commit b772e459fa91cdc7facd95227ebc0faba20a7003
29725         * g10/keyedit.c (fix_keyblock): Rename to fix_key_signature_order.
29726         (fix_keyblock): New.  Call fix_key_signature_order and other fix
29727         functions.
29728         (keyedit_menu): Factor code out to new fix_keyblock.
29729         (keyedit_quick_sign): Ditto.  Check for primary fpr before calling
29730         fix_keyblock.
29731
29732 2015-05-07  Werner Koch  <wk@gnupg.org>
29733
29734         agent: Minor change for 56b5c9f.
29735         + commit 436f2060721e997479a9dd5be8dfc73627dd49c9
29736         * agent/call-pinentry.c (agent_askpin): Move option setting to ...
29737         (start_pinentry): here.  Fix error code check.
29738
29739 2015-05-07  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
29740
29741         dirmngr: Fix segfault in ldap engine.
29742         + commit d0d4984cfec54dee727b9e9d33d09e33c6f2e182
29743         (ks-engine-ldap.c) Fix segfault caused by missing check whether uri is
29744         initialized
29745
29746 2015-05-07  Neal H. Walfield  <neal@g10code.com>
29747
29748         agent: Improve support for externally cached passwords.
29749         + commit 56b5c9f94f2e55d096be585ed061ccf1c9ec0de6
29750         * agent/call-pinentry.c (PINENTRY_STATUS_PASSWORD_FROM_CACHE): New
29751         constant.
29752         (pinentry_status_cb): Add it to *FLAGS if PASSWORD_FROM_CACHE was
29753         provided.
29754         (agent_askpin): Pass "OPTION allow-external-password-cache" to the
29755         pinentry.  Always pass SETKEYINFO to the pinentry.  If there is no
29756         stable identifier, then use "--clear".  If the password is incorrect
29757         and PINENTRY_STATUS_PASSWORD_FROM_CACHE is set in *PINENTRY_STATUS,
29758         then decrement PININFO->FAILED_TRIES.
29759
29760         agent: Or in the value; don't overwrite the variable.
29761         + commit 74944330ba7229ed0cbe23cc0f573962a444bd07
29762         * agent/call-pinentry.c (pinentry_status_cb): Or in
29763         PINENTRY_STATUS_CLOSE_BUTTON; don't overwrite *FLAG.
29764
29765         agent: Avoid magic numbers.  Use more accurate names.
29766         + commit d3b5cad2346bd5747789dc62d7804fa5c15f4f3b
29767         * agent/call-pinentry.c (PINENTRY_STATUS_CLOSE_BUTTON): New constant.
29768         (PINENTRY_STATUS_PIN_REPEATED): Likewise.
29769         (close_button_status_cb): Rename from this...
29770         (pinentry_status_cb): ... to this.  Use the constants.
29771         (agent_askpin): Rename local variable from close_button to
29772         pinentry_status.  Use symbolic constants rather than magic numbers.
29773
29774 2015-05-07  Werner Koch  <wk@gnupg.org>
29775
29776         gpg: Improve 'General key info' line of --card-status.
29777         + commit 874ef16e70ab750db7b153f17a7e859a0db6a2f1
29778         * g10/keylist.c (print_pubkey_info): Print either "pub" or "sub".
29779
29780         * g10/getkey.c (get_pubkey_byfprint): Add optional arg R_KEYBLOCK.
29781         * g10/keyid.c (keyid_from_fingerprint): Adjust for change.
29782         * g10/revoke.c (gen_desig_revoke): Adjust for change.
29783         * g10/card-util.c (card_status): Simplify by using new arg.  Align
29784         card-no string.
29785
29786         * g10/card-util.c (card_status): Remove not used GnuPG-1 code.
29787
29788         gpg: Fix regression not displaying the card serial number.
29789         + commit 173b26c8f83a3c623165a96c315bf9ed4b90edcc
29790         * g10/call-agent.c (keyinfo_status_cb): Detect KEYINFO.
29791
29792 2015-05-06  Werner Koch  <wk@gnupg.org>
29793
29794         speedo,w32: Install a native pinentry.
29795         + commit 154abaf3c97dae43ba972e4482680a287f3e5c39
29796         * build-aux/speedo.mk: Always build pinentry for w32.
29797         (speedo_pkg_pinentry_configure): Adjust to modern pinentry.
29798         * build-aux/speedo/w32/inst.nsi: Install native pinentry under the
29799         name pinentry-basic.exe.
29800
29801 2015-05-01  NIIBE Yutaka  <gniibe@fsij.org>
29802
29803         g10: fix cmp_public_key.
29804         + commit f77fd572db658959fa40aa8c181be919e688b707
29805         * g10/free-packet.c (cmp_public_keys): Compare opaque
29806         data at the first entry of the array when it's unknown algo.
29807
29808 2015-04-30  NIIBE Yutaka  <gniibe@fsij.org>
29809
29810         scd: PC/SC reader selection by partial string match.
29811         + commit 01a2a61bc4b34817c4216888265f65d59a33dad3
29812         * scd/apdu.c (open_pcsc_reader_direct): Partial string match.
29813
29814 2015-04-24  Werner Koch  <wk@gnupg.org>
29815
29816         common: Remove JNLIB from boiler plate (jnlib merge).
29817         + commit 172b6193488f433a206fd88f85d8c4a5d1eb7fdf
29818         * common/README.jnlib: Remove.
29819
29820         common: Rename log and gcc attribute macros (jnlib merge).
29821         + commit 26d7e0d7accf269c15fb4bc23e5e80580bfb7fe3
29822         * common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*.
29823         * common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*.
29824
29825         common: Remove two JNLIB_ macros (jnlib merge).
29826         + commit 575230d91bba95697518da418ea0e8712f889a0f
29827         * configure.ac: Merge seperate jnlib checks.
29828         (HAVE_JNLIB_LOGGING): Remove.
29829         * common/logging.c, common/simple-pwquery.c (JNLIB_NEED_AFLOCAL):
29830         Rename to GNUPG_COMMON_NEED_AFLOCAL.  Change all tests.
29831
29832         common: Remove libjnlib-config.h (jnlib merge).
29833         + commit 17bcd087082d01c48c60ff20d7f9a40f34c6969f
29834         * common/libjnlib-config.h: Remove.
29835         * common/common-defs.h (getenv) [HAVE_GETENV]: New.  From removed
29836         header.
29837         (getpid) [HAVE_W32CE_SYSTEM]: New.  From removed header.
29838         * common/argparse.c: Include util.h and common-defs.h.  Replace
29839         jnlib_ macro names for non-GNUPG builds by x* names.
29840         * common/dotlock.c: Ditto.
29841         * common/logging.c: Include util.h and common-defs.h.  Replace jnlib_
29842         symbol names by x* names.
29843         * common/strlist.c: Ditto.
29844         * common/utf8conv.c: Ditto.
29845         * common/w32-reg.c: Ditto.
29846         * common/mischelp.c: Ditto.  Also remove _jnlib_free.
29847         * common/stringhelp.c: Ditto.
29848         (JNLIB_LOG_WITH_PREFIX): Do not depend on this macro.
29849         * common/logging.h (JNLIB_LOG_WITH_PREFIX): Do not depend on this
29850         macro.
29851
29852 2015-04-23  Werner Koch  <wk@gnupg.org>
29853
29854         gpg: Move all DNS access to Dirmngr.
29855         + commit 154f3ed2bf64de801ae0f9796338a2767ec6357b
29856         * common/dns-cert.h: Move to ../dirmngr/.
29857         * common/dns-cert.c: Move to ../dirmngr/.  Change args to return the
29858         key as a buffer.
29859         * common/t-dns-cert.c: Move to ../dirmngr/.
29860         * common/pka.c, common/pka.h, common/t-pka.c: Remove.
29861
29862         * dirmngr/server.c (data_line_cookie_write): Factor code out to
29863         data_line_write and make it a wrapper for that.
29864         (data_line_write): New.
29865         (cmd_dns_cert): New.
29866         (register_commands): Register new command.
29867
29868         * g10/Makefile.am (LDADD): Remove DNSLIBS.
29869         * g10/call-dirmngr.c (dns_cert_parm_s): New.
29870         (dns_cert_data_cb, dns_cert_status_cb): New.
29871         (gpg_dirmngr_dns_cert): New.
29872         (gpg_dirmngr_get_pka): New.
29873         * g10/gpgv.c (gpg_dirmngr_get_pka): New dummy function.
29874         * g10/keyserver.c (keyserver_import_cert): Replace get_dns_cert by
29875         gpg_dirmngr_dns_cert.
29876         (keyserver_import_pka): Replace get_pka_info by gpg_dirmngr_get_pka.
29877         * g10/mainproc.c: Include call-dirmngr.h.
29878         (pka_uri_from_sig): Add CTX arg. Replace get_pka_info by
29879         gpg_dirmngr_get_pka.
29880
29881         common: Minor change of hex2str to allow for embedded nul.
29882         + commit ce11cc39ea7e011040debc9339a2310a714efe7e
29883         * common/convert.c (hex2str): Set ERRNO.  Return adjusted COUNT.
29884
29885 2015-04-23  NIIBE Yutaka  <gniibe@fsij.org>
29886
29887         common: removal of t-support.c from t_jnlib_src.
29888         + commit a7264e3a6a83189a9e43edf5e99f5ac7ee42a2ab
29889         * common/Makefile.am (t_jnlib_src): Remove t-support.c.
29890
29891 2015-04-21  Werner Koch  <wk@gnupg.org>
29892
29893         gpg: Make keyserver-option http_proxy work.
29894         + commit c4d98734c5df39f57a71f0ec1c0c80e82ff08508
29895         * g10/options.h (opt): Add field keyserver_options.http_proxy.
29896         * g10/keyserver.c (warn_kshelper_option): Add arg noisy.
29897         (parse_keyserver_options): Parse into new http_proxy field.
29898         * g10/call-dirmngr.c (create_context): Send the http-proxy option.
29899
29900         common: Make proper use of http proxy parameter.
29901         + commit 54e55149f2af96eff08bfd6f70ef13d007fb58c7
29902         * common/http.c (is_hostname_port): New.
29903         (send_request): Fix proxy name parsing.
29904
29905         dirmngr: Add http proxy support for keyservers.
29906         + commit a0dead5edce07838cf5ff3ec7205a3bff2a6ef70
29907         * dirmngr/dirmngr.h (server_control_s): Add field http_proxy.
29908         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Copy http_proxy value
29909         from OPT.
29910         (dirmngr_deinit_default_ctrl): New.
29911         (main): Call dirmngr_deinit_default_ctrl.
29912         * dirmngr/server.c (start_command_handler): Ditto.
29913         (option_handler): Add option "http-proxy".
29914         * dirmngr/crlfetch.c (crl_fetch): Take http_proxy from CTRL.
29915         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
29916         * dirmngr/ks-engine-hkp.c (send_request): Add proxy support.
29917         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
29918
29919         gpg: Do not use honor-keyserver-url sub-option by default.
29920         + commit 727fe4f8d7d5fc3eac0b0aa6fafa4a314686d7dc
29921
29922
29923         gpg: Make preferred keyservers work.
29924         + commit ae0d65f86413a82a40cf68e08aaeca405eee8c78
29925         * g10/call-dirmngr.c (dirmngr_local_s): Add field set_keyservers_done.
29926         (create_context): Move keyserver setting to ...
29927         (open_context): here.
29928         (clear_context_flags): New.
29929         (gpg_dirmngr_ks_get): Add arg override_keyserver.
29930         * g10/keyserver.c (keyserver_refresh): Improve diagnostics.
29931         (keyserver_get_chunk): Ditto.  Pass OVERRIDE_KEYSERVER to ks_get.
29932
29933         gpg: Update sub-options of --keyserver-options.
29934         + commit da1990bac71f6447d8ebd169c3b3b186e9f287d9
29935         * g10/options.h (KEYSERVER_HTTP_PROXY): New.
29936         (KEYSERVER_USE_TEMP_FILES, KEYSERVER_KEEP_TEMP_FILES): Remove.
29937         (KEYSERVER_TIMEOUT): New.
29938         * common/keyserver.h (KEYSERVER_TIMEOUT): Remove.
29939         * g10/keyserver.c (keyserver_opts): Remove obsolete "use-temp-files"
29940         and "keep-temp-files". Add "http-proxy" and "timeout".
29941         (parse_keyserver_options): Remove 1.2 compatibility option
29942         "honor-http_proxy".  Remove "use-temp-files" and "keep-temp-files"
29943         code.
29944
29945 2015-04-14  Werner Koch  <wk@gnupg.org>
29946
29947         agent: Send the new SETKEYINFO command to the Pinentry.
29948         + commit 2180845959839705200e3172dbafc94b70b9007f
29949         * agent/call-pinentry.c (agent_askpin): Add args keyinfo and
29950         cache_mode.  Change all callers to pass (NULL,0) for them.  Send
29951         SETKEYINFO command.
29952         * agent/findkey.c (unprotect): Pass the keygrip and the cache_mode for
29953         the new args.
29954
29955 2015-04-14  NIIBE Yutaka  <gniibe@fsij.org>
29956
29957         scd: better handling of extended APDU.
29958         + commit 971d558e862db878a7310e06ed7116dbe36886ab
29959         * scd/apdu.c (send_le): Bug fix for not append Z when lc<0&&le<0.
29960         * scd/app-common.h (struct app_ctx_s): Use bit fields for flags.
29961         * scd/ccid-driver.c (CCID_MAX_BUF): New.  Only for OpenPGPcard.
29962         (struct ccid_driver_s): New field of max_ccid_msglen.
29963          Remove ifsd field.
29964         (parse_ccid_descriptor): Initialize max_ccid_msglen.
29965         (ccid_transceive_apdu_level): Implement sending extended APDU in
29966         chain of CCID message.
29967
29968 2015-04-13  Werner Koch  <wk@gnupg.org>
29969
29970         gpg: Fix NULL-segv due to invalid imported data.
29971         + commit 25fce93ba19d997e234a674d5cc98df82c5b5496
29972         * g10/free-packet.c (my_mpi_copy): New.
29973         (copy_public_key, copy_signature): Use instead of mpi_copy.
29974
29975 2015-04-13  Neal H. Walfield  <neal@g10code.com>
29976
29977         dirmngr: If LDAP is not enable, don't build the LDAP bits.
29978         + commit 5cde5bf37339cdeb0bd0a33d39477382eafebede
29979         * dirmngr/Makefile.am (dirmngr_SOURCES): Only include
29980         ks-engine-ldap.c, ldap-parse-uri.c and ldap-parse-uri.h if USE_LDAP
29981         is TRUE.
29982         (module_tests): Only add t-ldap-parse-uri if USE_LDAP is TRUE.
29983         * dirmngr/ks-action.c: Only include "ldap-parse-uri.h" if USE_LDAP is
29984         TRUE.
29985         (ks_action_help): Don't invoke LDAP functionality if USE_LDAP is not
29986         TRUE.
29987         (ks_action_search): Likewise.
29988         (ks_action_get): Likewise.
29989         (ks_action_put): Likewise.
29990         * dirmngr/server.c: Only include "ldap-parse-uri.h" if USE_LDAP is
29991         TRUE.
29992         (cmd_keyserver): Don't invoke LDAP functionality if USE_LDAP is not
29993         TRUE.
29994
29995 2015-04-13  Werner Koch  <wk@gnupg.org>
29996
29997         common: Do without nested fucntions to support non-gcc.
29998         + commit 454f60399c7318fffd3de2afadd58c7a490178bd
29999         * common/t-stringhelp.c (test_strsplit): Remove nested function.
30000
30001 2015-04-11  Werner Koch  <wk@gnupg.org>
30002
30003         Release 2.1.3.
30004         + commit b1e1959d59a12b53c016ca9c95aee3a62c0bfc00
30005
30006
30007 2015-04-11  Yuri Chornoivan  <yurchor@ukr.net>
30008
30009         po: Update Ukrainian translation.
30010         + commit 896f438967b66b4836419aa737c706ced6b6454a
30011
30012
30013 2015-04-11  Ineiev  <ineiev@gnu.org>
30014
30015         po: Update and review Russian translation.
30016         + commit b69d7064f30c38ffe18e71de6a0fc14b5da0452f
30017
30018
30019 2015-04-10  Werner Koch  <wk@gnupg.org>
30020
30021         dirmngr,w32: Make it build for Windows.
30022         + commit c8bb5000d4c86a055348dc08352f573c599743a7
30023         * dirmngr/Makefile.am (t_common_ldadd): Add missing libs.
30024
30025         Remove obsolete directories from AM_CPPFLAGS.
30026         + commit 67158ff155ef52fd54a6bbe680551c0e12b31e69
30027
30028
30029         dirmngr,w32: Replace functions not available under Windows.
30030         + commit 0fb224c2c5e0c6770d4a6044d62d84f6bbc1b26b
30031         * dirmngr/ks-engine-ldap.c (extract_attributes): Replace isoptime and
30032         gmtime_r.
30033
30034         common: Add new function gnupg_gmtime.
30035         + commit 5d60c7f7e05a06e46e23bafe61cef09ad32aa998
30036         * common/gettime.c (gnupg_gmtime): New.
30037         (gnupg_get_isotime): Use it.  Also take care of an gmtime_t returning
30038         an error.
30039
30040         common: Add new function isodate_human_to_tm.
30041         + commit f6670100b7a15b2071c2e4062f5c5a678f2a30f6
30042         * common/gettime.c (isotime_human_p): Add arg date_only.
30043         (isodate_human_to_tm): New.
30044         * common/t-gettime.c (test_isodate_human_to_tm): New.
30045         (main): Call new test.
30046
30047         dirmngr,w32: Avoid name clash with existing function.
30048         + commit 6ad95fe6f1f130c8f6d139a9bd57fc4a0d38292b
30049         * dirmngr/ks-engine-ldap.c (ldap_connect): Rename to my_ldap_connect.
30050
30051         gpgparsemail: Fix last commit (3f2bdac)
30052         + commit 9433661419043431a6cfc7d84c8450e0b2f6c353
30053         * tools/rfc822parse.c (parse_field): Replace break by goto.
30054
30055 2015-04-09  Werner Koch  <wk@gnupg.org>
30056
30057         gpgparsemail: Fix case of zero length continuation lines.
30058         + commit 3fbeba64a8bfb2b673230c124a3d616b6568fd2f
30059         * tools/rfc822parse.c (parse_field): Loop after continuation line.
30060
30061 2015-04-08  Werner Koch  <wk@gnupg.org>
30062
30063         sm: Fix certificate lookup in dirmngr cache.
30064         + commit 6619ead2cfd2abcb95b66dc70622fdeef624fb8a
30065         * sm/call-dirmngr.c (get_cached_cert): Fix typo in LOOKUP command.
30066
30067 2015-04-06  Werner Koch  <wk@gnupg.org>
30068
30069         gpg: Print the user id in --fast-list-mode.
30070         + commit c2383407bba5eefea486464a31e02846124c9da5
30071         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Change.
30072
30073         gpg: Prepare to pass additional context to the list functions.
30074         + commit 67a58118ab6171c0cf28b65a39973062690d1313
30075         * g10/keylist.c (struct sig_stats): Rename to keylist_context and add
30076         field check_sigs.
30077         (keylist_context_release): New.
30078         (list_all): Set listctx.check_sigs and call release func.
30079         (list_one): Ditto.
30080         (locate_one): Ditto.
30081         (list_keyblock_print): Use .check_sigs field.  Repalce arg opaque by
30082         listctx.
30083         (list_keyblock): Ditto.  Make static.
30084         (list_keyblock_direct): New.
30085         * g10/keygen.c (do_generate_keypair): Replace list_keyblock by
30086         list_keyblock_direct.
30087
30088         gpg: Merge duplicated code for get_user_id et al.
30089         + commit f577d5c1a747d673fa1d5c012ce3e3b78b699c6a
30090         * g10/getkey.c (get_user_id_string): Add args mode and r_LEN.
30091         (get_user_id_string_native): Add new args.
30092         (get_long_user_id_string, get_user_id): Rewrite using
30093         get_user_id_string.
30094
30095         gpg: Add new option --debug-iolbf.
30096         + commit c581ed717ad2cc4be90c46253baa44a0d3ba5b80
30097         * g10/gpg.c (oDebugIOLBF): new.
30098         (opts): Add --debug-iolbf.
30099         (main): Set option.
30100
30101         Rename DBG_ASSUAN to DBG_IPC and add separate DBG_EXTPROG.
30102         + commit 24a75201da6be72edf85b96dbc0c01c747d02c6a
30103         * g10/options.h (DBG_EXTPROG_VALUE): Separate from DBG_IPC_VALUE.
30104
30105         Fix use of DBG_CACHE and DBG_LOOKUP.
30106         + commit 2f099eb62ac6491675bbcccaca4e076b2d8e7ea0
30107         * dirmngr/dirmngr.h (DBG_LOOKUP_VALUE): Change to 8192.
30108         * g10/options.h (DBG_LOOKUP_VALUE, DBG_LOOKUP): New.
30109         * g10/getkey.c: Use DBG_LOOKUP instead of DBG_CACHE at most places.
30110
30111         gpg: Rename a debug macro.
30112         + commit 4de8a58e44262a25564e2acef8c8865d1755982e
30113         * g10/options.h (DBG_CIPHER_VALUE): Rename to DBG_CRYPTO_VALUE.
30114         (DBG_CIPHER): Rename to DBG_CRYPTO.
30115
30116 2015-04-05  Werner Koch  <wk@gnupg.org>
30117
30118         gpg: Fix DoS while parsing mangled secret key packets.
30119         + commit d901efcebaefaf6eae4a9b9aa8f0c2c055d3518a
30120         * g10/parse-packet.c (parse_key): Check PKTLEN before calling mpi_read
30121         et al.
30122
30123 2015-04-03  NIIBE Yutaka  <gniibe@fsij.org>
30124
30125         g10: Fix keytocard.
30126         + commit f82c4a6d0d76e716b6a7b22ca964fa2da1f962a0
30127         g10/call-agent.h (agent_scd_learn): Add FORCE option.
30128         g10/call-agent.c (agent_scd_learn): Implement FORCE option.
30129         g10/keygen.c (gen_card_key): Follow the change of option.
30130         g10/card-util.c (change_pin, card_status, factory_reset): Likewise.
30131         g10/keyedit.c (keyedit_menu): Update private key storage by
30132         agent_scd_learn.
30133
30134         agent: Add --force option for LEARN.
30135         + commit 4ffadb74b3ada8a5d69ef8d87f4326df9bd97e97
30136         * agent/command.c (cmd_learn): Handle --force option.
30137         (cmd_keytocard): Don't update key storage file.
30138         * agent/agent.h (agent_handle_learn): Add FORCE.
30139         * agent/learncard.c (agent_handle_learn): Implement FORCE to update
30140         key stroage file.
30141
30142 2015-03-31  Neal H. Walfield  <neal@g10code.com>
30143
30144         dirmngr: Don't use alloca.
30145         + commit d0ff2ee04187fbedacbe4d3884ee75d957a0b8c6
30146         * dirmngr/ks-engine-ldap.c (ks_ldap_put): Replace use of alloca with
30147         xmalloc and xfree.
30148
30149         dirmngr: Simplify truncation of long strings in debug code.
30150         + commit 802eec0ca49b92104c92f18c9a6a04c34de74168
30151         * dirmngr/ks-engine-ldap.c (modlist_dump): Simplify truncation of long
30152         strings.
30153
30154         dirmngr: Use a better error code.
30155         + commit 7f6d7948c1e56e09c1bdaa5143e1b5558c4376dd
30156         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): On error, return
30157         GPG_ERR_GENERAL, not GPG_ERR_ASS_GENERAL.
30158
30159         dirmngr: Better encapsulate the keyservers variable.
30160         + commit 348c520040a31f5c322183c0654a34978e2baf6f
30161         * dirmngr/dirmngr.h (struct server_control_s): Move field keyservers
30162         from here...
30163         * dirmngr/server.c (struct server_local_s): ... to here.  Update
30164         users.
30165         * dirmngr/ks-action.h (ks_action_resolve): Add argument keyservers.
30166         (ks_action_search): Likewise.
30167         (ks_action_get): Likewise.
30168         (ks_action_put): Likewise.
30169         * dirmngr/ks-action.c (ks_action_resolve): Add argument keyservers.
30170         Use it instead of ctrl->keyservers.
30171         (ks_action_search): Likewise.
30172         (ks_action_get): Likewise.
30173         (ks_action_put): Likewise.
30174
30175 2015-03-28  Neal H. Walfield  <neal@g10code.de>
30176
30177         gpg: Only use the last specified keyserver.
30178         + commit f26ba14028d34845ae10aae552b90681907e377d
30179         * g10/gpg.c (main): Only use the last specified keyserver.
30180
30181 2015-03-25  Werner Koch  <wk@gnupg.org>
30182
30183         dirmngr: Fix resource leaks and check rare errors.
30184         + commit bec10ae4b5a870303c800cdf3cd906044613fc2d
30185         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Fix resource
30186         leak.
30187         (ks_ldap_search): Check error from es_fopenmem.  Use LDAP_ERR where
30188         required.
30189         (modlist_dump): Check error from es_fopenmem.
30190         (uncescape): s/int/size_t/.  Use existing macros.
30191         (extract_attributes): Use existing trim function.
30192         (ks_ldap_put): Do not segv on error from modlist_dump.
30193
30194         dirmngr: Minor cleanups.
30195         + commit 6c701af121782c2feb4ee51e559a7420df00471f
30196         * dirmngr/ks-engine-ldap.c [__riscos__]: Remove doubled util.h.
30197         (ldap_to_gpg_err): s/GPG_ERR_GENERAL/GPG_ERR_INTERNAL/.
30198         (tm2ldaptime): Use snprintf.
30199         (ldap_connect): Get error code prior to log_error and and use modern
30200         function.   Use xfree, xtrustrdup etc.
30201         (modlist_lookup): Use GNUPG_GCC_A_USED.
30202         (modlist_free): Use xfree.
30203
30204         common: Add macro GNUPG_GCC_A_USED.
30205         + commit 99ef9cd7f589b51921bfbe8d52735c104ef260e3
30206         * common/util.h (GNUPG_GCC_A_USED): New.
30207
30208         sm: Change default algos to SHA256 (CSR) and AES128 (bulk encryption).
30209         + commit 1e4d8ddbe3ad7ee8f1c1d1798694d91f792776c0
30210         * sm/certreqgen.c (create_request): Change default hash algo.
30211         * sm/gpgsm.c (DEFAULT_CIPHER_ALGO): Change default bulk cipher algo.
30212
30213 2015-03-24  Werner Koch  <wk@gnupg.org>
30214
30215         gpg,w32: Handle forward slash in --keyring option.
30216         + commit bdd22e3a0846d38a0b6cdb822476ad2f15d03455
30217         * g10/keydb.c (keydb_add_resource): Allow forward slash under Windows.
30218
30219 2015-03-23  Neal H. Walfield  <neal@g10code.de>
30220
30221         Improve documentation for ks_hkp_get.
30222         + commit 7a56b6b3aa8b7a07bd80a3fcd5114bd1af359fa3
30223         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Improvement documentation.
30224
30225         Improve documenation of http_parse_uri.
30226         + commit 00a16cf49336ee0b4ce21eb05a79db955af053e0
30227         * common/http.c (http_parse_uri): Improve documentation.
30228
30229         Add support to talking to LDAP key servers.
30230         + commit 51341badb623927f2a358588c725a356fc77dbe7
30231         * g10/call-dirmngr.c (record_output): New function.
30232         (ks_put_inq_cb): Use it here to generate a --with-colons like output
30233         instead of a custom format.
30234         * dirmngr/ks-action.c: Include "ldap-parse-uri.h".
30235         (ks_action_help): If the provided URI is an LDAP URI, then use
30236         ldap_parse_uri to parse.  Call ks_ldap_help.
30237         (ks_action_search): If passed an LDAP URI, then call ks_ldap_search.
30238         (ks_action_get): Likewise.
30239         (ks_action_put): Likewise.  Also, change data from a 'const void *' to
30240         a 'void *' and add info and infolen parameters.  Add note that
30241         function may modify DATA.
30242         * dirmngr/ks-action.h (ks_action_put): Update declaration accordingly.
30243         * dirmngr/server.c: Include "ldap-parse-uri.h".
30244         (cmd_keyserver): If ITEM->URI is an LDAP URI, parse it using
30245         ldap_parse_uri.
30246         (hlp_ks_put): Improve documentation.
30247         (cmd_ks_put): Also pass info and infolen to ks_action_put.  Improve
30248         documentation.
30249         * dirmngr/ks-engine.h (ks_ldap_help): New declaration.
30250         (ks_ldap_search): Likewise.
30251         (ks_ldap_get): Likewise.
30252         (ks_ldap_put): Likewise.
30253         * dirmngr/ks-engine-ldap.c: New file.
30254         * dirmngr/Makefile.am (dirmngr_SOURCES): Add ks-engine-ldap.c,
30255         ldap-parse-uri.c and ldap-parse-uri.h.
30256         (dirmngr_LDADD) [USE_LDAP]: Add $(ldaplibs).
30257
30258         Import _gpgme_parse_timestamp from gpgme as parse_timestamp.
30259         + commit 81e83060856f02f6cfc7b48f8032e0cf14fc6c68
30260         * common/gettime.h (parse_timestamp): New declaration.
30261         * common/gettime.c (_win32_timegm): New function imported from
30262         gpgme/src/conversion.c:_gpgme_timegm.
30263         (parse_timestamp): New function imported from
30264         gpgme/src/conversion.c:_gpgme_parse_timestamp.
30265
30266         Move copy_stream function to misc.c.
30267         + commit 9e79a15f74c428624b0049a3f6a077c1bc7c731d
30268         * dirmngr/ks-action.c (copy_stream): Move function from here...
30269         * dirmngr/misc.c (copy_stream): ... to here and drop the static
30270         qualifier.
30271         * dirmngr/misc.h (copy_stream): Add declaration.
30272
30273         Move armor_data to misc.c.
30274         + commit 63552852bf191985b4b55aa524bc397c5b1d1515
30275         * dirmngr/ks-engine-hkp.c (armor_data): Move function from here...
30276         * dirmngr/misc.c (armor_data): ... to here and drop static qualifier.
30277         * dirmngr/misc.h: New declaration.
30278
30279         Add new LDAP utility functions.
30280         + commit 1a75b7c39f0a84f518711438565645a34fb2673f
30281         * dirmngr/Makefile.am (module_tests): New variable.
30282         (noinst_PROGRAMS): New primary.  Set it to $(module_tests).
30283         (TESTS): New variable.  Set it to $(module_tests).
30284         (t_common_src): New variable.
30285         (t_common_ldadd): Likewise.
30286         (t_ldap_parse_uri_SOURCES): New primary.
30287         (t_ldap_parse_uri_LDADD): Likewise.
30288         * dirmngr/ldap-parse-uri.c: New file.
30289         * dirmngr/ldap-parse-uri.h: Likewise.
30290         * dirmngr/t-ldap-parse-uri.c: Likewise.
30291         * dirmngr/t-support.h: Likewise.
30292
30293         Add new function uri_query_lookup.
30294         + commit e23b3ba5ffd3134a72da176a039e4d6c4f3ff595
30295         * common/http.h (uri_query_lookup): New declaration.
30296         * common/http.c (uri_query_lookup): The corresponding implementation.
30297
30298         Add new function strlist_find.
30299         + commit 79907ad256f5b84f36cbebdc92e5a05d9e266557
30300         * common/strlist.h (strlist_find): New declaration.
30301         * common/strlist.c (strlist_find): New function.
30302
30303         common: Add new helper function, strsplit.
30304         + commit b18ffcb81a3839dbf09603d70ebb8b80f65892d3
30305         * common/stringhelp.h (strsplit): New declaration.
30306         * common/stringhelp.c (strsplit): New function.
30307         * common/t-stringhelp.c (test_strsplit): New function.
30308         (main): Call it here.
30309
30310 2015-03-20  Werner Koch  <wk@gnupg.org>
30311
30312         gpg: Consider a mailbox only userid in mail search mode.
30313         + commit bebab54027d8c63574a2680c60481cfe9b88c240
30314         * kbx/keybox-search.c: Include mbox-util.h.
30315         (blob_cmp_mail): Improve OpenPGP uid parsing.
30316
30317         common: Add function is_valid_mailbox_mem.
30318         + commit a0eb2e4e8cef9ca6a5dfbae6440fa6cd583d0805
30319         * common/mbox-util.c (mem_count_chr): New.
30320         (my_memstr): New.
30321         (has_invalid_email_chars): Change args to work on a buffer.
30322         (is_valid_mailbox_mem): New.
30323         (is_valid_mailbox): Rewrite to use is_valid_mailbox_mem.
30324
30325         gpg: Find keys using mail addresses with garbage after the '>'
30326         + commit 783a4a98378fa1aa222d5cb7427dd37151feb08b
30327         * kbx/keybox-search.c (blob_cmp_mail): Stop comparing at the '>'.
30328
30329         common: Fix syntax error when building with gnutls.
30330         + commit 5136e39c6466de90697153ea253c4b540c1f7d1a
30331         * common/http.c (send_request): Add missing comma.
30332
30333 2015-03-19  Werner Koch  <wk@gnupg.org>
30334
30335         gpg: Emit status line NEWSIG before signature verification starts.
30336         + commit e7ddaad0fd2c8774a1d3367adfaa68014eaf65de
30337         * g10/mainproc.c (check_sig_and_print): Emit STATUS_NEWSIG.
30338
30339         agent: Compute correct MPI length header for protected ECC keys.
30340         + commit cf83ff01fce3ddcbde6d97dffa0db6f277588e25
30341         * agent/cvt-openpgp.c (apply_protection): Strip leading zeroes from
30342         opaque MPIs to comply with the OpenPGP spec.
30343
30344         hkps: Fix host name verification when using pools.
30345         + commit dc10d466bff53821f23d2cb4814c259d40c5d9c5
30346         * common/http.c (send_request): Set the requested for SNI.
30347         * dirmngr/ks-engine-hkp.c (map_host): Return the poolname and not
30348         the selecting a host.
30349
30350         Define replacement error codes from libgpg-error 1.19.
30351         + commit 28bb3ab686c1c994f67a92b6846b3726c58a0bc3
30352         * common/util.h: Add GPG_ERR_LDAP codes for libgpg-error < 1.19.
30353
30354 2015-03-17  Andre Heinecke  <aheinecke@intevation.de>
30355
30356         gpgtar: Fix extracting files with !(size % 512)
30357         + commit 6cbbb0bec98e1acefc4c7163cc41a507469db920
30358         * tools/gpgtar-extract.c (extract_regular): Handle size multiples
30359           of RECORDSIZE.
30360
30361 2015-03-17  Werner Koch  <wk@gnupg.org>
30362
30363         common: Add feature to ease using argparse's usage().
30364         + commit 9078b75a73600fc6b7b5502ceee8de032bb9c446
30365         * common/argparse.c (show_help): Take care of flag value
30366         (usage): Ditto.
30367
30368         common: Allow standalone build of argparse.c.
30369         + commit eb5f2c0af6691229300ac120ee44815cb27ed38e
30370         * common/argparse.h: Remove types.h - not required.
30371         * common/argparse.c: Change to allow standalone use.
30372
30373 2015-03-16  Werner Koch  <wk@gnupg.org>
30374
30375         gpg: Create all MPIs with RFC-4880 correct length headers.
30376         + commit ab17f7b6c392782718f57eaea94fc18a0ff49389
30377         * g10/build-packet.c (gpg_mpi_write): Strip leading zeroes.
30378
30379         gpg: Allow printing of MPI values in --list-mode.
30380         + commit bcc8250bc5b9a357c6d1444f03e334edec573ede
30381         * g10/parse-packet.c (set_packet_list_mode): Set mpi_print_mode.
30382         * g10/misc.c (mpi_print): Do not print an extra leading zero.
30383
30384         gpg: Fix broken write of opaque MPI length header.
30385         + commit 8bc1debfefb7cd4b0be724317793d59dea37d677
30386         * g10/build-packet.c (gpg_mpi_write): Use a char array for the length.
30387
30388 2015-03-15  Werner Koch  <wk@gnupg.org>
30389
30390         gpg: Fix possible dead code elimination.
30391         + commit 1a9f13bc663daa75c5009f6a0bf7d7483f12cce0
30392         * g10/encrypt.c: Change condition for detecting a real file.
30393
30394         g13: Fix pointer wrap check.
30395         + commit 4bc3a2e954afc2ba7dbe79ba5f740184b7d4cd73
30396         * g13/utils.c (find_tuple, next_tuple): Cast pointer to size_t before
30397         doing an overflow check.
30398
30399         agent: Remove useless conditions in command.c.
30400         + commit 3a35c9740ab792068ec4b3732ecfaa17bf4fc7f0
30401         * agent/command.c (cmd_setkeydesc): Remove NULL check.
30402         (cmd_get_passphrase): Ditto.
30403         (cmd_clear_passphrase): Ditto.
30404         (cmd_get_confirmation): Ditto.
30405         (cmd_getval): Ditto.
30406         (cmd_putval): Ditto.
30407
30408         agent: Fix length test in sshcontrol parser.
30409         + commit 3529dd8bb5bafc4e02915648d5f409bd27a9cc37
30410         * agent/command-ssh.c (ssh_search_control_file): Check S before
30411         upcasing it.
30412
30413         agent: Remove useless conditions.
30414         + commit 95415bdec77a608e6052ba3e2a5d857a8e8f7689
30415         * agent/genkey.c (agent_ask_new_passphrase): Remove useless condition.
30416         * agent/command-ssh.c (ssh_identity_register): Ditto.
30417
30418         gpg: Remove useless condition.
30419         + commit c59b410cf1d5676de7061e5a183c01227aa8e760
30420         * g10/keylist.c (list_keyblock_colon): Remove useless condition (PK).
30421         (list_keyblock_print):  Likewise.
30422
30423         scd: Fix possible NULL deref in apdu.c.
30424         + commit ef0a3abf7305133d071bf1a94a7f461082f9a9aa
30425         * scd/apdu.c (control_pcsc_direct): Take care of BUFLEN being NULL.
30426         (control_pcsc_wrapped): Ditto.
30427
30428         common: Make openpgp_oid_to_str more robust.
30429         + commit 35db798c2df7f31b52a9dd9d55ea60ae1f325be9
30430         * common/openpgp-oid.c (openpgp_oid_to_str): Take care of
30431         gcry_mpi_get_opaque returning NULL.  Remove useless condition !BUF.
30432
30433 2015-03-11  Werner Koch  <wk@gnupg.org>
30434
30435         agent: Improve error reporting from Pinentry.
30436         + commit efde50f92af241d8357db83e280a6ece62f6397f
30437         * agent/call-pinentry.c (unlock_pinentry): Add error logging.  Map
30438         error source of uncommon errors to Pinentry.
30439
30440 2015-03-10  Werner Koch  <wk@gnupg.org>
30441
30442         gpg: Change --print-pka-records into an option.
30443         + commit 7b5b52f3268b093eebbac3f199fb69bf246d9cd1
30444         * g10/gpg.c (aPrintPKARecords): Rename to oPrintPKARecords and do not
30445         use it as a command.
30446         * g10/keylist.c (list_keyblock): List PKA rceords also for secret
30447         keys.
30448
30449         gpg: Add --list-gcrypt-config and "curve" item for --list-config.
30450         + commit 14af2be022ccaf826db048fc16959d0222ff1134
30451         * common/openpgp-oid.c (curve_supported_p): New.
30452         (openpgp_enum_curves): New.
30453         * common/t-openpgp-oid.c (test_openpgp_enum_curves): New.
30454         (main): Add option --verbose.
30455         * g10/gpg.c (opts): Add --list-gcrypt-config.
30456         (list_config): Add items "curve" and "curveoid".  Remove unused code.
30457
30458 2015-03-09  NIIBE Yutaka  <gniibe@fsij.org>
30459
30460         scd: fix for 64-bit arch.
30461         + commit bb5a1b7c738d74d5b46340ec7b50000a2d343ca9
30462         * agent/pksign.c (agent_pksign_do): Use int.
30463         * scd/app-openpgp.c (get_public_key): Likewise.
30464
30465 2015-03-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
30466
30467         gpg: avoid chatter about trustdb when --quiet.
30468         + commit 82146af85b65498a69b28913593dc1ffeb6b6fed
30469         * g10/trustdb.c (tdb_check_trustdb_stale): avoid log_info() when
30470           opt.quiet
30471
30472 2015-02-26  Werner Koch  <wk@gnupg.org>
30473
30474         gpg: Lowercase mailbox for PKA lookups.
30475         + commit c071be698efadef1ad01fd3d329d1b486a372927
30476         * common/stringhelp.c (ascii_strlwr): New.
30477         * common/mbox-util.c (mailbox_from_userid): Downcase result.
30478
30479         gpg: Fix memory leak due to PKA lookup.
30480         + commit 91baea2dcde6c1e5ca9e8fa7020d9ab4551d1bca
30481         * g10/keyserver.c (keyserver_import_pka): Move the xfree.
30482
30483 2015-02-25  Werner Koch  <wk@gnupg.org>
30484
30485         gpg: Switch to a hash and CERT record based PKA system.
30486         + commit 2fc27c8696f5cf2ddf3212397ea49bff115d617b
30487         * common/dns-cert.c (get_dns_cert): Make r_key optional.
30488         * common/pka.c: Rewrite for the new hash based lookup.
30489         * common/t-pka.c: New.
30490         * configure.ac: Remove option --disable-dns-pka.
30491         (USE_DNS_PKA): Remove ac_define.
30492         * g10/getkey.c (parse_auto_key_locate): Always include PKA.
30493
30494         common: Allow requesting a specific certtype with get_dns_cert()
30495         + commit af60152a4632ef26ca950a424429b15b6c69038d
30496         * common/dns-cert.c (get_dns_cert): Add arg want_certtype.  Change all
30497         callers.
30498         (CERTTYPE_): Move constants to ...
30499         * common/dns-cert.h: here as DNS_CERTTYPE_.
30500
30501         Move new mailbox.c source file to common/.
30502         + commit 9913253610bac69e9503800e85696491e018e327
30503         * g10/mailbox.c: Move to ...
30504         * common/mbox-util.c: new file.
30505         * common/mbox-util.h: New. Include where needed.
30506         * g10/t-mailbox.c: Move to ...
30507         * common/t-mbox-util.c: new file.
30508
30509 2015-02-24  Werner Koch  <wk@gnupg.org>
30510
30511         gpg: Add command --print-pka-records.
30512         + commit e2d93402801a2cb822c723e891fd98233fdb3fd5
30513         * g10/gpg.c (main): Add command --print-pka-records.
30514         * g10/options.h (struct opt): Add field "print_pka_records".
30515         * g10/keylist.c (list_keyblock_pka): New.
30516         (list_keyblock): Call it if new option is set.
30517         (print_fingerprint): Add mode 10.
30518
30519         gpg: Add function to extract the mailbox.
30520         + commit 93fa3d5c1760f3fee5412fb29d58fbd60db16ea9
30521         * g10/misc.c (has_invalid_email_chars, is_valid_mailbox)
30522         (is_valid_user_id): Move to ...
30523         * g10/mailbox.c: new file.
30524         (string_has_ctrl_or_space, has_dotdot_after_at): New.
30525         (has_invalid_email_chars): New.
30526
30527         * g10/t-mailbox.c: New.
30528         * g10/Makefile.am (module_tests): Add t-mailbox.
30529         (t_mailbox_SOURCES, t_mailbox_LDADD): New.
30530
30531 2015-02-23  Werner Koch  <wk@gnupg.org>
30532
30533         gpg: Add option to print fingerprints in ICAO spelling.
30534         + commit ae09515b9d3aae653b62a32ea5b4a9b9e557fc52
30535         * g10/gpg.c: Add option --with-icao-spelling.
30536         * g10/options.h (struct opt): Add with_icao_spelling.
30537         * g10/keylist.c (print_icao_hexdigit): New.
30538         (print_fingerprint): Print ICAO spelling.
30539
30540         gpg: Skip legacy keys while searching keyrings.
30541         + commit a8116aacd91b7e775762a62c268fab6cc3c77438
30542         * g10/getkey.c (search_modes_are_fingerprint): New.
30543         (lookup): Skip over legacy keys.
30544
30545         common: Fix regression due to commit 2183683b.
30546         + commit d9f6eea6115df7959564123eb99d633ce5bba42e
30547         * common/dns-cert.c (get_dns_cert): Remove cruft.
30548
30549 2015-02-19  Werner Koch  <wk@gnupg.org>
30550
30551         gpg: Replace remaining uses of stdio by estream.
30552         + commit d2a70fd8348d6c11d1960caf2afe0701833dad6a
30553         * g10/sign.c (sign_file):  Use log_printf instead of stderr.
30554         * g10/tdbdump.c (export_ownertrust): Use estream fucntions.
30555         (import_ownertrust): Ditto.
30556         * g10/tdbio.c (tdbio_dump_record): Ditto.  Change arg to estream_t.
30557
30558         gpg: Fix segv due to NULL value stored as opaque MPI.
30559         + commit 76c8122adfed0f0f443cce7bda702ba2b39661b3
30560         * g10/build-packet.c (gpg_mpi_write): Check for NULL return from
30561         gcry_mpi_get_opaque.
30562         (gpg_mpi_write_nohdr, do_key): Ditto.
30563         * g10/keyid.c (hash_public_key): Ditto.
30564
30565 2015-02-12  Werner Koch  <wk@gnupg.org>
30566
30567         scd: Fix regression in 2.1.2 (due to commit 2183683)
30568         + commit 07a71da479daaac43b8c5b1034a1e66f96bdbc48
30569         * scd/apdu.c (pcsc_vendor_specific_init): Replace use of
30570         bufNN_to_uint by direct code.
30571
30572 2015-02-12  Andre Heinecke  <aheinecke@intevation.de>
30573
30574         dirmngr: Initialize cache from sysconfig dir.
30575         + commit 070d7bf940efa60db2b0734273b9b3736d18338a
30576         * dirmngr/certcache.c (cert_cache_init): Load certificates
30577         from sysconfig dir instead of the homeidr.
30578         * dirmngr/dirmngr.c (main): Removed parsing of obsolete
30579         homedir_data option.
30580         * dirmngr/dirmngr.h (opt): Removed homedir_data.
30581         * doc/dirmngr.texi: Update and clarify certs directory doc.
30582
30583 2015-02-11  Werner Koch  <wk@gnupg.org>
30584
30585         Release 2.1.2.
30586         + commit fc17562cc4f8d531ae7f0887cf2a96dcc224b021
30587
30588
30589         dirmngr: Avoid warning about unused function.
30590         + commit 8219c87c301ec669f07528e8d8108655f7b705be
30591         * dirmngr/dirmngr.c (my_gnutls_log): Build only if gnutls is used.
30592
30593         build: Update standard build-aux files.
30594         + commit 81e93e251e52e427a29556de75640c7933bb5aad
30595
30596
30597         Use inline functions to convert buffer data to scalars.
30598         + commit 2183683bd633818dd031b090b5530951de76f392
30599         * common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
30600         (buf16_to_ushort, buf16_to_u16): New.
30601         (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
30602
30603 2015-02-09  Werner Koch  <wk@gnupg.org>
30604
30605         gpg: Prevent an invalid memory read using a garbled keyring.
30606         + commit f0f71a721ccd7ab9e40b8b6b028b59632c0cc648
30607         * g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
30608         types.
30609         * g10/keydb.c (parse_keyblock_image): Ditto.
30610
30611         gpg: Fix a NULL-deref in export due to invalid packet lengths.
30612         + commit 0835d2f44ef62eab51fce6a927908f544e01cf8f
30613         * g10/build-packet.c (write_fake_data): Take care of a NULL stored as
30614         opaque MPI.
30615
30616         gpg: Fix a NULL-deref due to empty ring trust packets.
30617         + commit 39978487863066e59bb657f5fe4e8baab510da7e
30618         * g10/parse-packet.c (parse_trust): Always allocate a packet.
30619
30620 2015-02-04  Werner Koch  <wk@gnupg.org>
30621
30622         gpg-agent: Use "pinentry-basic" as fallback.
30623         + commit 0de5c6a9a783ed9dc69cecbf34eadcaace4be243
30624         * common/homedir.c (get_default_pinentry_name): New.
30625         (gnupg_module_name): Use that for the default pinentry.
30626         (gnupg_module_name_flush_some): New.
30627         * agent/gpg-agent.c (agent_sighup_action): Flush some module names.
30628         * agent/call-pinentry.c (start_pinentry): Do not modify
30629         opt.pinentry_program.
30630
30631         w32: Add manifest to gpg.
30632         + commit 05428d12561bc7eb872a81444918dfe706477a41
30633         * g10/gpg.w32-manifest.in: New.
30634         * g10/gpg-w32info.rc: Add manifest.
30635         * g10/Makefile.am (EXTRA_DIST): Add manifest.
30636         (gpg-w32info.o): Depend on manifest.
30637         * configure.ac (BUILD_VERSION): New.
30638         (AC_CONFIG_FILES): Add manifest.
30639
30640 2015-02-03  Werner Koch  <wk@gnupg.org>
30641
30642         Update copyright years.
30643         + commit 3f67426a89bf4b37e1d2662fddc3eb4fa474c4ad
30644         * common/w32info-rc.h.in (W32INFO_COMPANYNAME): Change to "The GnuPG
30645         Project".
30646
30647 2015-02-02  Werner Koch  <wk@gnupg.org>
30648
30649         w32: Change default Windows install dir and add bin to PATH.
30650         + commit 8872657b2a52dd9698224b80e5672e23c5405eda
30651         * build-aux/speedo.mk (WITH_GUI): New macro.  The Windows installer is
30652         now build by default without any GUI stuff.
30653         * build-aux/speedo/w32/inst.nsi: Change standard installation
30654         directory.
30655         (AddToPath, un.RemoveFromPath): New.
30656         (gnupginst): Add bin directory to the PATH.
30657
30658 2015-02-01  Werner Koch  <wk@gnupg.org>
30659
30660         w32: Allow for Unicocde installation directory.
30661         + commit 616633b7713081ecc39419494879947cc7f163d0
30662         * common/homedir.c (w32_rootdir): Use Unicode fucntion not only for
30663         WinCE.
30664
30665 2015-01-30  Joshua Rogers  <git@internot.info>
30666
30667         kbx: Fix resource leak.
30668         + commit 7db6c82cec49b7c56c403a8ea98364086baf75f3
30669         * kbx/keybox-update.c (blob_filecopy): Fix resource leak.  On error
30670         return, 'fp' and 'newfp' was never closed.
30671
30672 2015-01-29  Werner Koch  <wk@gnupg.org>
30673
30674         agent: Fix use of imported but unprotected openpgp keys.
30675         + commit 6ab0fac575a8b04152a199cb300a08436b096753
30676         * agent/agent.h (PRIVATE_KEY_OPENPGP_NONE): New.
30677         * agent/command.c (do_one_keyinfo): Implement it.
30678         * agent/findkey.c (agent_key_from_file): Ditto.
30679         (agent_key_info_from_file): Ditto.
30680         (agent_delete_key): Ditto.
30681         * agent/protect.c (agent_private_key_type): Add detection for openpgp
30682         "none" method.
30683
30684 2015-01-29  NIIBE Yutaka  <gniibe@fsij.org>
30685
30686         po: Update Japanese Translation.
30687         + commit 6c368533f5211bed62e8638f522cef65c7ba4b87
30688
30689
30690 2015-01-28  Werner Koch  <wk@gnupg.org>
30691
30692         gpg: Limit the size of key packets to a sensible value.
30693         + commit 382ba4b137b42d5f25a7e256bb7c053ee5ac7b64
30694         * g10/parse-packet.c (MAX_KEY_PACKET_LENGTH): New.
30695         (MAX_UID_PACKET_LENGTH): New.
30696         (MAX_COMMENT_PACKET_LENGTH): New.
30697         (MAX_ATTR_PACKET_LENGTH): New.
30698         (parse_key): Limit the size of a key packet to 256k.
30699         (parse_user_id): Use macro for the packet size limit.
30700         (parse_attribute): Ditto.
30701         (parse_comment): Ditto.
30702
30703         gpg: Fix buffering problem in --list-config.
30704         + commit d8eea25b8b7becbfa3f059be6f5966a2f1aa7112
30705         * g10/gpg.c (list_config): Replace print_sanitized_string2 by
30706         es_write_sanitized.
30707
30708         * common/stringhelp.c (print_sanitized_buffer2): Remove.
30709         (print_sanitized_buffer, print_sanitized_utf8_buffer): Remove.
30710         (print_sanitized_utf8_buffer, print_sanitized_utf8_string): Remove.
30711         (print_sanitized_string): Remove.
30712
30713         * sm/certdump.c (print_dn_part, print_dn_parts): Remove arg FP.
30714         (pretty_print_sexp, gpgsm_print_name2, gpgsm_print_name): Remove.
30715
30716         Add a hook to be called right after main.
30717         + commit 0c2bfd9d5a49a6134188f8f7820f6ccdebd9f181
30718         * common/init.c (early_system_init): New stub function.
30719
30720         gpg: Allow predefined names as answer to the keygen.algo prompt.
30721         + commit b1d5ed6ac842469afcb84868d0f6641dc286a6c7
30722         * g10/keygen.c (ask_algo): Add list of strings.
30723
30724         agent: Add some extra robustness to extract_private_key.
30725         + commit 795965437732e50f6216d7f5db0e6174e90548a9
30726         * agent/cvt-openpgp.c (extract_private_key): Add arg "arraysize".
30727         Make sure that R_FLAGS and R_CURVE are set to NULL.
30728
30729 2015-01-28  NIIBE Yutaka  <gniibe@fsij.org>
30730
30731         scd: Fix varargs call for 64-bit arch on ECC keys.
30732         + commit f6d3c6e5263d84b94ebe13df9ff39b02109a2acb
30733         * scd/app-openpgp.c (store_fpr): Remove CARD_VERSION from the
30734         arguments.
30735         (rsa_writekey): Follow the change.
30736         (do_genkey): Likewise.
30737         (ecc_writekey): Likewise.  Cast to size_t.
30738
30739 2015-01-27  Werner Koch  <wk@gnupg.org>
30740
30741         gpg: Fix segv introduced to commit 4d7c9b0.
30742         + commit 6eebc56687935f3e993eac374b9f4cc5ad3bcf2b
30743         * g10/keygen.c (get_parameter_passphrase): Take care of R == NULL.
30744
30745 2015-01-27  NIIBE Yutaka  <gniibe@fsij.org>
30746
30747         agent: Fix agent_public_key_from_file for ECC.
30748         + commit 9453d645d4a489f038829c80343c124fff62d635
30749         * agent/cvt-openpgp.c (extract_private_key): New.
30750         (convert_to_openpgp): Use extract_private_key.
30751         * agent/findkey.c (agent_public_key_from_file): Use
30752         extract_private_key.
30753
30754 2015-01-26  Werner Koch  <wk@gnupg.org>
30755
30756         sm: Simplify fix ed8383c6.
30757         + commit 6c87d1ce66d8e93e6c0f16c06116e9179f6158ba
30758         * sm/minip12.c (p12_build): Release PWBUF only at the end.
30759
30760 2015-01-25  Joshua Rogers  <git@internot.info>
30761
30762         ccid: Remove incorrect expression leading to errors.
30763         + commit 274d7b17a90908a90ba6ad295c08a79b287fc231
30764         * scd/ccid-driver.c (send_escape_cmd): Fix setting of 'rc'.
30765
30766 2015-01-23  Werner Koch  <wk@gnupg.org>
30767
30768         gpgconf: Fix validity check for UINT32 values.
30769         + commit 3f6abb57a7b5e54b593c5775c8f7a07d61119705
30770         * tools/gpgconf-comp.c (option_check_validity): Enable check for
30771         UINT32.
30772
30773 2015-01-22  Werner Koch  <wk@gnupg.org>
30774
30775         gpg: Improve skipping of PGP-2 keys.
30776         + commit 09e8f35d3808d6e49f891360c341aae3869e8650
30777         * g10/keydb.c (keydb_search_first, keydb_search_next): Skip legacy
30778         keys.
30779         * g10/keyring.c (keyring_get_keyblock): Handle GPG_ERR_LEGACY_KEY.
30780         (prepare_search): Ditto.
30781         (keyring_rebuild_cache): Skip legacy keys.
30782         * g10/keyserver.c (keyidlist): Ditto.
30783         * g10/trustdb.c (validate_key_list): Ditto.
30784
30785         gpg: Add dedicated error code for PGP-2 keys.
30786         + commit 6f3d11d8837b00e3a1c4fa881066855c0321d6b2
30787         * g10/parse-packet.c (parse_key): Return GPG_ERR_LEGACY_KEY for PGP2
30788         keys.
30789         * g10/import.c (read_block): Simplify by checking GPG_ERR_LEGACY_KEY.
30790         * g10/getkey.c (lookup): Silence error message for PGP-2 keys.
30791
30792         * common/util.h (GPG_ERR_LEGACY_KEY): Add replacement for older
30793         libgpg-error.
30794
30795         gpg: Replace remaining old error code macros by GPG_ERR_.
30796         + commit 11142e0ad7bc9a9e3c3dccf958d8dbd3312cb993
30797         * g10/gpg.h (g10_errstr): Remove macro and change all occurrences by
30798         gpg_strerror.
30799         (G10ERR_): Remove all macros and change all occurrences by their
30800         GPG_ERR_ counterparts.
30801
30802         gpg: Remove an unused variable.
30803         + commit a23c30fb59c0a216763a7972028995d3be42a844
30804         * g10/getkey.c (getkey_ctx_s): Remove last_rc.
30805
30806 2015-01-21  Werner Koch  <wk@gnupg.org>
30807
30808         dirmngr: Fix TLS build problems.
30809         + commit 091c35ec726a4fa4691c2665b13adee6a34b5b66
30810         * dirmngr/Makefile.am (AM_CFLAGS): Add flags for TLS libs.
30811
30812         gpg: Support --passphrase with --quick-gen-key.
30813         + commit 4d7c9b0e9aceedd924d600978bc1b6cae7d5c456
30814         * g10/keygen.c: Include shareddefs.h.
30815         (quick_generate_keypair): Support static passphrase.
30816         (get_parameter_passphrase): New.
30817         (do_generate_keypair): Use it.
30818
30819         gpg: Re-enable the "Passphrase" parameter for batch key generation.
30820         + commit aa99ebde778b7b563f35025f1b48954757f840be
30821         * agent/command.c (cmd_genkey): Add option --inq-passwd.
30822         * agent/genkey.c (agent_genkey): Add new arg override_passphrase.
30823         * g10/call-agent.c (inq_genkey_parms): Handle NEWPASSWD keyword.
30824         (agent_genkey): Add arg optional arg "passphrase".
30825         * g10/keygen.c (common_gen, gen_elg, gen_dsa, gen_ecc)
30826         (gen_rsa, do_create): Add arg "passphrase" and pass it through.
30827         (do_generate_keypair): Make use of pPASSPHRASE.
30828         (release_parameter_list): Wipe out a passphrase parameter.
30829
30830 2015-01-19  Werner Koch  <wk@gnupg.org>
30831
30832         kbx: Minor cleanup for the previous fix.
30833         + commit 7be1b7d8017cb7ebf1a3855edec0ef5e342cc9c5
30834         * kbx/keybox-search.c (blob_get_keyid): Rename to
30835         blob_get_first_keyid. Check number of keys and remove blob type check.
30836
30837 2015-01-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
30838
30839         kbx: Call skipfnc callback to filter out keys.
30840         + commit c5956592c171e6fe988e74161aa99636b7f12e4b
30841         * kbx/keybox-search.c (blob_get_keyid): New.
30842         (keybox-search): Call skipfnc callback function.
30843
30844 2015-01-13  Andreas Schwier  <andreas.schwier@cardcontact.de>
30845
30846         scd: Allow for certificates > 1024 with PC/SC.
30847         + commit 16a1330fa16f6b23e2661c0175c431ab40da45ff
30848         * scd/pcsc-wrapper.c (handle_transmit): Enlarge buffer to 4096 too
30849         allow for larger certificates.
30850
30851 2015-01-08  NIIBE Yutaka  <gniibe@fsij.org>
30852
30853         dirmngr: Fix error code path of map_host.
30854         + commit 657a26f3af1b3f817d6cde2d091273d332571247
30855         * dirmngr/ks-engine-hkp.c (map_host): Fix error return.
30856
30857 2015-01-08  Joshua Rogers  <git@internot.info>
30858
30859         scd: fix get_public_key for OpenPGPcard v1.0.
30860         + commit 100b322f5da3066bab5a2b0eb234c631c581c0e4
30861         * scd/app-openpgp.c (get_public_key): correctly close 'fp' upon use.
30862
30863 2015-01-07  NIIBE Yutaka  <gniibe@fsij.org>
30864
30865         dirmngr: fix LDAP query PATTERNS limit check.
30866         + commit 22b15fccffe613f455f9748c048c8e451724a842
30867         * dirmngr/ldap.c (start_cert_fetch_ldap): fix ARGC limitation.
30868
30869         scd: fix merge failure.
30870         + commit 602f17b5a775f02e0e33a54d3155929dc00e4f53
30871         * scd/apdu.c (pcsc_pinpad_verify): Remove wrong lines inserted by
30872         merge.
30873
30874 2015-01-05  Werner Koch  <wk@gnupg.org>
30875
30876         sm,g13: Init local vars to avoid compiler warnings.
30877         + commit 9bf40849a9f86204e113712c4cc285f1ac16127a
30878         * sm/misc.c (transform_sigval): Init RSA_S_LEN.
30879         * g13/mount.c (read_keyblob): Init HEADERLEN.
30880
30881         gpg: Remove unused args from a function.
30882         + commit 616e511f278bf9af04dc66bbb8b05b37bf541f37
30883         * g10/keyserver.c (parse_keyserver_uri): Remove args configname and
30884         configlineno.  Change all callers.
30885
30886         gpg: Clear a possible rest of the KDF secret buffer.
30887         + commit 56e688823345bbcfef220b13eb418854f8798b16
30888         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Fix order of args.
30889
30890         build: Require automake 1.14.
30891         + commit 445bb17d5fe6b53db078082fb033dbc67eea8307
30892         * configure.ac (AM_INIT_AUTOMAKE): Add serial-tests.
30893
30894 2015-01-04  Werner Koch  <wk@gnupg.org>
30895
30896         agent: Make --allow-loopback-pinentry gpgconf changeable.
30897         + commit ac2cb47fc5c0be539aaa07fd141acdbc0934800f
30898
30899
30900 2014-12-22  Joshua Rogers  <git@internot.info>
30901
30902         tools: Free variable before return.
30903         + commit cf88337f8a4f8c98aca4b1da5921d18567b4f474
30904         * tools/gpgconf-comp.c: Free 'dest_filename' before it is returned
30905         upon error.
30906
30907 2014-12-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
30908
30909         sm: Avoid double-free on iconv failure.
30910         + commit ed8383c618e124cfa708c9ee87563fcdf2f4649c
30911         * sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid
30912         double-free of pwbuf.
30913
30914         scd: Avoid double-free on error condition in scd.
30915         + commit b0b3803e8c2959dd67ca96debc54b5c6464f0d41
30916         * scd/command.c (cmd_readkey): avoid double-free of cert
30917
30918         avoid future chance of using uninitialized memory.
30919         + commit 367b073ab5f439ccf0750461d10c69f36998bd62
30920         * common/iobuf.c: (iobuf_open): initialize len
30921
30922         avoid double-close in unusual dotlock situations.
30923         + commit 628b111fa679612e23c0d46505b1ecbbf091897d
30924         * common/dotlock.c: (dotlock_create_unix) avoid double-close()
30925          in unusual situations.
30926
30927         gpgkey2ssh: clean up varargs.
30928         + commit 351bca9047d748c3c4f7e9a3cdc476af127b1da3
30929         * tools/gpgkey2ssh.c (key_to_blob) : ensure that va_end is called.
30930
30931 2014-12-22  Werner Koch  <wk@gnupg.org>
30932
30933         doc: Fix memory leak in yat2m.
30934         + commit 6056d2467310260ddc0db2fe65b737ace6febcaa
30935         * doc/yat2m.c (write_th): Free NAME.
30936
30937         dirmngr: Fix memory leak.
30938         + commit 5a556e4e88bcbc926c0922070acaf5f7b25d18fb
30939         * dirmngr/server.c (cmd_ks_search, cmd_ks_get): Fix memory leak.
30940
30941         * dirmngr/ks-engine-hkp.c (ks_hkp_mark_host): Remove double check.
30942
30943         dirmngr: Remove un-needed check.
30944         + commit 0d5cb55402c44fb5f731ecf85705f845f3091aa7
30945         * dirmngr/crlfetch.c (crl_fetch): Check that URL is not NULL.
30946
30947         dirmngr,gpgsm: Return NULL on fail.
30948         + commit abd5f6752d693b7f313c19604f0723ecec4d39a6
30949         * dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL.
30950         * sm/gpgsm.c (parse_keyserver_line): Ditto.
30951
30952 2014-12-22  NIIBE Yutaka  <gniibe@fsij.org>
30953
30954         scd: ECDH Support.
30955         + commit bdc8efbdd124d836c36cf482216e375421f72891
30956         * agent/divert-scd.c (divert_pkdecrypt): Support ECDH.
30957         * scd/app-openpgp.c (get_algo_byte, store_fpr): Support ECDH.
30958         (send_key_attr): Support ECDH.  Fix EdDSA algorithm value.
30959         (retrieve_key_material): Initialize fields.
30960         (get_public_key, ecc_writekey, do_writekey): Support ECDH.
30961         (ecdh_writekey): Remove.
30962         (do_decipher): Support ECDH.
30963         (parse_algorithm_attribute): Support ECDH.  Fix EdDSA.
30964
30965 2014-12-19  Werner Koch  <wk@gnupg.org>
30966
30967         agent: Make sure --max-cache-ttl is >= --default-cache-ttl.
30968         + commit 76140141699b545f7a988bf5fc101063917e8ce3
30969         * agent/gpg-agent.c (finalize_rereadable_options): New.
30970         (main, reread_configuration): Call it.
30971
30972         agent: Keep the session environment for restricted connections.
30973         + commit 14601eacb51f6c8a60d3d57aee1be11debd94c68
30974         * agent/command-ssh.c (setup_ssh_env): Move code to ...
30975         * agent/gpg-agent.c (agent_copy_startup_env): .. new function.  Change
30976         calllers.
30977         * agent/command.c (start_command_handler): Call that fucntion for
30978         restricted connections.
30979
30980         agent: Fix string prepended to remotely initiated prompts.
30981         + commit aad8963f7b9d13b319abd413db8f42ec467db913
30982         * agent/command.c (cmd_setkeydesc): Use %0A and not \n. Make
30983         translatable.
30984
30985 2014-12-18  Werner Koch  <wk@gnupg.org>
30986
30987         build: Remove option to build without agent.
30988         + commit abec64f3cb04e49ca48cc476a5830a920e2ebf8f
30989         * configure.ac (build-agent): Set to yes.
30990
30991 2014-12-17  Werner Koch  <wk@gnupg.org>
30992
30993         gpgconf: Exit with failure if --launch fails.
30994         + commit 5cb6df8996623c00eaa2a39e3037101585442f7e
30995         * tools/gpgconf-comp.c (gc_component_launch): Return an error code.
30996         * tools/gpgconf.c (main): Exit if launch failed.
30997
30998 2014-12-16  Werner Koch  <wk@gnupg.org>
30999
31000         Release 2.1.1.
31001         + commit 08c00cd4fe432d6852ad1d5c34a234c56aa3617c
31002
31003
31004         po: Update the German translation.
31005         + commit 4ba740bd4734c43e7876f6f6380cc5963789d510
31006
31007
31008 2014-12-16  Petr Pisar  <petr.pisar@atlas.cz>
31009
31010         po: Update Czech translation.
31011         + commit 30560491fe42562f4bbdb17d3213f7210f549a0f
31012
31013
31014 2014-12-16  Werner Koch  <wk@gnupg.org>
31015
31016         gpg: Show private DO information in the card status.
31017         + commit ce9212924039fba4e479760bba86c61b0d91c469
31018         * g10/call-agent.c (agent_release_card_info): Free private_do.
31019         (learn_status_cb): Parse PRIVATE-DO-n stati.
31020
31021 2014-12-16  Ineiev  <ineiev@gnu.org>
31022
31023         po: Update Russian translation.
31024         + commit 5ab5b3fa6921f08dd0a498fe0381735e803d01e3
31025
31026
31027 2014-12-16  Jedi  <jedi@jedi.org>
31028
31029         po: Update zh_TW translation.
31030         + commit 668dc6b32cb97608ef65b85d917c86f5aec896ce
31031
31032
31033 2014-12-15  Werner Koch  <wk@gnupg.org>
31034
31035         gpg: Add sub-command "factory-reset" to --card-edit.
31036         + commit dd65e21cb4934b40e6f2f7a8095f39fd6d9971bc
31037         * common/util.h (GPG_ERR_OBJ_TERM_STATE): New.
31038         * scd/iso7816.c (map_sw): Add this error code.
31039         * scd/app-openpgp.c (do_getattr): Return the life cycle indicator.
31040         * scd/app.c (select_application): Allow a return value of
31041         GPG_ERR_OBJ_TERM_STATE.
31042         * scd/scdaemon.c (set_debug): Print the DBG_READER value.
31043         * g10/call-agent.c (start_agent): Print a status line for the
31044         termination state.
31045         (agent_scd_learn): Make arg "info" optional.
31046         (agent_scd_apdu): New.
31047         * g10/card-util.c (send_apdu): New.
31048         (factory_reset): New.
31049         (card_edit): Add command factory-reset.
31050
31051         gpg: Fix regression in notation data regression.
31052         + commit fc9a35d2dec2f838abac831fd88dca494773e082
31053         * g10/misc.c (pct_expando): Reorder conditions for clarity.
31054         * g10/sign.c (write_signature_packets): Fix notation data creation.
31055
31056         gpg: Avoid extra LF in notaion data listing.
31057         + commit b4e402cb5c6d7fc507e8d5131969145b49640e50
31058         * g10/keylist.c (show_notation): Use log_printf.
31059
31060 2014-12-12  Werner Koch  <wk@gnupg.org>
31061
31062         scd: Fix possibly inhibited checkpin of the admin pin.
31063         + commit 68b4e7c9e4de0dc3580ca5af3cfd0f20a2691b5e
31064         * scd/app-openpgp.c (do_check_pin): Do not check a byte of a released
31065         buffer.
31066
31067         gpg: Let --card--status create a shadow key (card key stub).
31068         + commit f3f9f9b2844c35f7942ee904d5222523615cdad4
31069         * agent/command.c (cmd_learn): Add option --sendinfo.
31070         * agent/learncard.c (agent_handle_learn): Add arg "send" andsend
31071         certifciate only if that is set.
31072         * g10/call-agent.c (agent_scd_learn): Use --sendinfo.  Make INFO
31073         optional.
31074         (agent_learn): Remove.
31075         * g10/keygen.c (gen_card_key): Replace agent_learn by agent_scd_learn.
31076
31077         gpg: Fix possible read of unallocated memory.
31078         + commit 193815030d20716d9a97850013ac3cc8749022c9
31079         * g10/parse-packet.c (can_handle_critical): Check content length
31080         before calling can_handle_critical_notation.
31081
31082 2014-12-11  Werner Koch  <wk@gnupg.org>
31083
31084         build: Replace deprecated autconf macro.
31085         + commit 1d8ebe4d54eef37da65e7bd5d7386bc04f344447
31086         * m4/intl.m4: s/AM_PROG_MKDIR_P/AC_PROG_MKDIR_P/
31087         * m4/po.m4: Ditto.
31088
31089 2014-12-08  Werner Koch  <wk@gnupg.org>
31090
31091         dirmngr: Improve dead host detection.
31092         + commit e8c0ed779579293b3f4592d9337bc15ee0fc3fdd
31093         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Mark host dead
31094         also for 2 other error messages.
31095
31096         http: Improve diagnostic messages.
31097         + commit 6d5f12834124ba5ee0e54261531abf95c36c116c
31098         * common/http.c (send_request): Print TLS alert info
31099         (connect_server): Detect bogus DNS entry.
31100
31101         gpg: Obsolete some keyserver helper options.
31102         + commit 5bf93f4ea7a11381dd256b5fd4e5913366828265
31103         * g10/options.h (opt): Remove keyserver_options.other.
31104         * g10/gpg.c (main): Obsolete option --honor-http-proxt.
31105         * g10/keyserver.c (add_canonical_option): Replace by ...
31106         (warn_kshelper_option): New.
31107         (parse_keyserver_uri): Obsolete "x-broken-http".
31108
31109         dirmngr: Return a proper error for all dead hosts.
31110         + commit b72ece6d74d3e385e818ead748eba0cb111b95b3
31111         * dirmngr/ks-engine-hkp.c (map_host): Change to return an gpg_error_t.
31112         Return an error code for all dead hosts.
31113         (make_host_part): Change to return an gpg_error_t.  Change all
31114         callers.
31115
31116         gpg: Write a status line for a failed --send-keys.
31117         + commit 66ab8f807c96b778f2a2c82b58d3e15ac295e1b2
31118         * g10/keyserver.c (keyserver_put): Write an status error.
31119
31120 2014-12-08  NIIBE Yutaka  <gniibe@fsij.org>
31121
31122         scd: Fix for EdDSA.
31123         + commit c50c11d5751f46ddb38244a5a07d8274e1e10922
31124         * scd/app-openpgp.c (get_algo_byte): It catches 22.
31125         (store_fpr): It's MPI usually, but it's opaque bytes for EdDSA.
31126
31127 2014-12-05  Andre Heinecke  <aheinecke@intevation.de>
31128
31129         Document no-allow-mark-trusted option.
31130         + commit f4ed04fca8885301b567ec004ffff0d6e24f4611
31131             doc: Document no-allow-mark-trusted for gpg-agent
31132
31133             * doc/gpg-agent.texi: Change allow-mark-trusted doc to
31134             no-allow-mark-trusted.
31135
31136             --
31137             Since rev. 78a56b14 allow-mark-trusted is the default option
31138             and was replaced by no-allow-mark-trusted to disable the
31139             interactive prompt.
31140
31141 2014-12-05  NIIBE Yutaka  <gniibe@fsij.org>
31142
31143         scd: Fix for NIST P-256.
31144         + commit 8720125f5a283ede34e52c2493b8a9b0226ae62c
31145         * g10/card-util.c (card_store_subkey): Error check.
31146         * scd/app-opengpg.c (ecc_writekey): Support NIST P-256.
31147         (do_writekey): Error check.
31148
31149 2014-12-04  Werner Koch  <wk@gnupg.org>
31150
31151         gpg: Allow import of large keys.
31152         + commit 63e7891f0f9f0228d93c6cd979fbf2797da2b67d
31153         * g10/import.c (import): Skip too large keys.
31154         * kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 2MB to 5MB.
31155
31156 2014-12-03  Werner Koch  <wk@gnupg.org>
31157
31158         gpg: Remove option aliases --[no-]throw-keyid and --notation-data.
31159         + commit 17b4662984b4669d8dcbbd6705ccfbe6c263319c
31160         * g10/gpg.c (opts): Remove them.
31161         * g10/options.h (opt): s/throw_keyid/throw_keyids/ and change users.
31162
31163 2014-12-02  Werner Koch  <wk@gnupg.org>
31164
31165         agent: Replace some sprintf.
31166         + commit fabcf1440a6900b9471f11e4f2a015e9f2d1a74c
31167         * agent/call-scd.c (agent_card_pksign): Replace sprintf by bin2hex.
31168         * agent/command-ssh.c (ssh_identity_register): Ditto.
31169         * agent/pkdecrypt.c (agent_pkdecrypt): Replace sprintf by
31170         put_membuf_printf.
31171
31172 2014-12-01  Werner Koch  <wk@gnupg.org>
31173
31174         tools: Improve watchgnupg portability.
31175         + commit 0367a4b8cfbf1f197e093ca2b83b27e0a409c3c7
31176         * configure.ac (AC_CHECK_HEADERS): Check for sys.select.h
31177         * tools/watchgnupg.c: Include it.
31178
31179         gpg: Fix export bug using exact search with only one key in the keybox.
31180         + commit f1c3eb4b16ca43b5d3712a3b54c22d17ce85af47
31181         * g10/export.c (do_export_stream): Disable caching.
31182         * g10/keyserver.c (keyidlist): Ditto.
31183
31184         scd: Implement socket redirection.
31185         + commit 2f90b7c21b2f84ca2bf5f4555da9233e84606b4e
31186         * scd/scdaemon.c (ENAMETOOLONG): New.
31187         (redir_socket_name): New.
31188         (cleanup): Take care of a redirected socket.
31189         (main): Pass redir_socket_name to create_server_socket.
31190         (create_socket_name): Remove superfluous length check.
31191         (create_server_socket): Add arg r_redir_name and implement
31192         redirection.  Replace assert for older Assuan by an error message.
31193
31194         dirmngr: Implement socket redirection.
31195         + commit eede0e59bf6281777da7391752ae4191f3e51204
31196         * dirmngr/dirmngr.c (ENAMETOOLONG): new.
31197         (redir_socket_name): New.
31198         (main): Add Assuan socket redirection.
31199         (cleanup): Adjust cleanup for redirection.
31200
31201 2014-11-28  Werner Koch  <wk@gnupg.org>
31202
31203         agent: Implement socket redirection.
31204         + commit e1f515b19c7f63b6d0b0253319b9fc41dabed657
31205         * agent/gpg-agent.c (ENAMETOOLONG): New.
31206         (redir_socket_name, redir_socket_name_extra)
31207         (redir_socket_name_ssh): New.
31208         (remove_socket): Take care of the redir names.
31209         (main): Pass the redir names to create_server_socket.
31210         (create_socket_name): Remove length check - that is anyway done later.
31211         (create_server_socket): Add arg r_redir_name and implement redirection
31212         if Libassuan is at least 2.14.
31213
31214         gpg: Change another BUG() call to a regular error message.
31215         + commit e59b1cc7471dd161a627b290c645ef7bd0d9d42c
31216         * g10/mainproc.c (proc_tree): Replace BUG by a proper error messages.
31217
31218         Add option --no-autostart.
31219         + commit 7aee3579be6e24a1aa280e75615fc3a11ceef960
31220         * g10/gpg.c: Add option --no-autostart.
31221         * sm/gpgsm.c: Ditto.
31222         * g10/options.h (opt): Add field autostart.
31223         * sm/gpgsm.h (opt): Ditto.
31224         * g10/call-agent.c (start_agent): Print note if agent was not
31225         autostarted.
31226         * sm/call-agent.c (start_agent): Ditto.
31227         * g10/call-dirmngr.c (create_context): Likewise.
31228         * sm/call-dirmngr.c (start_dirmngr_ext): Ditto.
31229
31230 2014-11-27  Мирослав Николић  <wk@gnupg.org>
31231
31232         gpg-agent: Add restricted connection feature.
31233         + commit f173cdcdfbfd083b035516a406c2c754f38a0ace
31234         * agent/agent.h (opt): Add field extra_socket.
31235         (server_control_s): Add field restricted.
31236         * agent/command.c: Check restricted flag on many commands.
31237         * agent/gpg-agent.c (oExtraSocket): New.
31238         (opts): Add option --extra-socket.
31239         (socket_name_extra): New.
31240         (cleanup): Cleanup that socket name.
31241         (main): Implement oExtraSocket.
31242         (create_socket_name): Add arg homedir and change all callers.
31243         (create_server_socket): Rename arg is_ssh to primary and change
31244         callers.
31245         (start_connection_thread): Take ctrl as arg.
31246         (start_connection_thread_std): New.
31247         (start_connection_thread_extra): New.
31248         (handle_connections): Add arg listen_fd_extra and replace the
31249         connection starting code by parameterized loop.
31250         * common/asshelp.c (start_new_gpg_agent): Detect the use of the
31251         restricted mode and don't fail on sending the pinentry environment.
31252
31253         * common/util.h (GPG_ERR_FORBIDDEN): New.
31254
31255         agent: Make auditing of the option list easier.
31256         + commit ccee34736b57a42ec4bdcb0d3181bdc6a08b0fff
31257         * agent/gpg-agent.c (opts): Use ARGPARSE_ macros.
31258
31259 2014-11-26  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
31260
31261         dirmngr: Only report hkps scheme when available.
31262         + commit 68a7ccc0c870cce6ab9fefb1aa6fd100e1de129b
31263         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Make use of TLS macros.
31264
31265 2014-11-26  Werner Koch  <wk@gnupg.org>
31266
31267         gpg: Change a bug() call to a regular error message.
31268         + commit 1c2140346d6ef9c35e303099d2d15be57869b4d5
31269         * g10/decrypt-data.c (decrypt_data): Return an error code instead of
31270         calling BUG().
31271
31272 2014-11-25  Werner Koch  <wk@gnupg.org>
31273
31274         Fix buffer overflow in openpgp_oid_to_str.
31275         + commit 8445ef24fc31e1fe0291e17f90f9f06b536e34da
31276         * common/openpgp-oid.c (openpgp_oid_to_str): Fix unsigned underflow.
31277
31278         * common/t-openpgp-oid.c (BADOID): New.
31279         (test_openpgp_oid_to_str): Add test cases.
31280
31281 2014-11-24  Werner Koch  <wk@gnupg.org>
31282
31283         gpg: Fix use of uninit.value in listing sig subpkts.
31284         + commit 596ae9f5433ca3b0e01f7acbe06fd2e424c42ae8
31285         * g10/parse-packet.c (dump_sig_subpkt): Print regex subpacket
31286         sanitized.
31287
31288         gpg: Fix off-by-one read in the attribute subpacket parser.
31289         + commit 0988764397f99db4efef1eabcdb8072d6159af76
31290         * g10/parse-packet.c (parse_attribute_subpkts): Check that the
31291         attribute packet is large enough for the subpacket type.
31292
31293         gpg: Fix batch generation of ECC keys.
31294         + commit b716e6a69919b89c7887d6c7c9b97e58d18fdf95
31295         * g10/keygen.c (get_parameter_algo): Map ECC algorithm strings
31296         directly.
31297
31298 2014-11-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
31299
31300         Distinguish between ARGPARSE_AMBIGUOUS_{OPTION,COMMAND}
31301         + commit eed16ccebf8fd1fdf9709affbd5c831f6957b8ae
31302         * common/argparse.c (initialize): Use correct value.
31303
31304         gpg: Refer to --throw-keyids instead of --throw-keyid.
31305         + commit a3cf781e3bc144aff60e007b9ba59bff7b1b2c9e
31306         * g10/encrypt.c: adjust error message
31307
31308 2014-11-21  Werner Koch  <wk@gnupg.org>
31309
31310         gpg: Track number of skipped v3 keys on import.
31311         + commit 44c9cc18968b3e1d7568ec41ebf28a07285c61bb
31312         * g10/import.c (stats_s): Add field v3keys.
31313         (import): Update this field.
31314         (import_print_stats): Print v3 key count.
31315         (read_block): Skip v3 keys and return a count for them.
31316
31317         gpg: Fix regression in parse_key.
31318         + commit 94a54425144e412bc83e44b7c6323282f49f650f
31319         * g10/parse-packet.c (parse): Better return just the gpg_err_code.
31320         (parse_key): Return the error code.
31321
31322         speedo: Add simple logos to the installer.
31323         + commit 9a85b91e925ac0798d56820353bf5858b212277f
31324         * build-aux/speedo/w32/README.txt: Include GnuPG Readme.
31325         * build-aux/speedo/w32/gnupg-logo-150x57.bmp: New.
31326         * build-aux/speedo/w32/gnupg-logo-164x314.bmp: New.
31327         * build-aux/speedo/w32/inst.nsi: Add logos.
31328         * build-aux/speedo.mk ($(bdir)/NEWS.tmp): Extract news items.
31329
31330 2014-11-20  Werner Koch  <wk@gnupg.org>
31331
31332         gpg: Fix hash detection for ECDSA.
31333         + commit f80c2dd78d522f12b2c7afbd5c0763a97d87d2bd
31334         * g10/sign.c (sign_file): Use DSA or ECDSA and not DSA|EdDSA.
31335
31336         Fix linker problem on OS X.
31337         + commit cd2c6f36fe5d1d1d45546f5168aead5cbe6487e0
31338         * common/init.c (default_errsource): Move to the .data segmemt.
31339
31340 2014-11-19  Werner Koch  <wk@gnupg.org>
31341
31342         gpg-connect-agent: Add convenience option --uiserver.
31343         + commit 164a6a9dd4af26668dd0d01061688bf1ceff44bf
31344
31345
31346         Add "gpgconf --kill dirmngr" and avoid useless launch before a kill.
31347         + commit 0e7dd40342bd56810c27db1c38c1928f56f43bfd
31348         * common/asshelp.c (start_new_gpg_agent): Add arg autostart.  Change
31349         all callers to use 1 for it.
31350         (start_new_dirmngr): Ditto.
31351         * tools/gpg-connect-agent.c: Add option --no-autostart.
31352         (main): Default autostart to 1.
31353         (start_agent): Implement no-autostart.
31354         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Use --no-autostart.
31355         (scdaemon_runtime_change): Ditto.
31356         (dirmngr_runtime_change): New.
31357
31358         po: Copied missing translations from the 2.0 branch.
31359         + commit 329ece46bf83871f01eb833d5ebec6da36bfcce0
31360         * po/LINGUAS: Add new translations.
31361
31362 2014-11-17  Werner Koch  <wk@gnupg.org>
31363
31364         gpg: Fix a NULL-deref for invalid input data.
31365         + commit 32e85668b82f6fbcb824eea9548970804fb41d9e
31366         * g10/mainproc.c (proc_encrypted): Take care of canceled passpharse
31367         entry.
31368
31369 2014-11-13  Werner Koch  <wk@gnupg.org>
31370
31371         gpg: Make the use of "--verify FILE" for detached sigs harder.
31372         + commit 69384568f66a48eff3968bb1714aa13925580e9f
31373         * g10/openfile.c (open_sigfile): Factor some code out to ...
31374         (get_matching_datafile): new function.
31375         * g10/plaintext.c (hash_datafiles): Do not try to find matching file
31376         in batch mode.
31377         * g10/mainproc.c (check_sig_and_print): Print a warning if a possibly
31378         matching data file is not used by a standard signatures.
31379
31380         gpg: Fix a missing LF in debug output.
31381         + commit 22748338da9a78d20aefe3656ba40b0f9d34a681
31382         * g10/kbnode.c (dump_kbnode): Print a LF.
31383
31384         gpg: Remove PGP-2 related cruft.
31385         + commit e30cb8f61792e3808f7c8f343fc8545e6c81fe74
31386         * g10/armor.c (parse_hash_header,carmor_filter): Ignore MD5 in hash
31387         header.
31388         (fake_packet): Remove pgp-2 workaround for white space stripping.
31389         * g10/filter.h (armor_filter_context_t): Remove field pgp2mode.
31390         * g10/options.h (opt): Remove field pgp2_workarounds.
31391         * g10/gpg.c (main): Do not set this field.
31392         * g10/gpgv.c (main): Ditto.
31393         * g10/mainproc.c (proc_encrypted): Use SHA-1 as fallback s2k hash
31394           algo.  Using MD5 here is useless.
31395         (proc_plaintext): Remove PGP-2 related woraround
31396         (proc_tree): Remove another workaround but keep the one for PGP-5.
31397
31398 2014-11-12  Werner Koch  <wk@gnupg.org>
31399
31400         gpg: Improve perceived speed of secret key listings.
31401         + commit 81e177be10273885573f5d1fd88a1ee23479f4ab
31402         * g10/keylist.c (list_keyblock): Flush stdout for secret keys.
31403
31404         gpg: Fix regression in --refresh-keys.
31405         + commit eecbed004ca1e9ca23c3892c3a5e6dd174ddf93b
31406         * g10/keyserver.c (keyserver_get): Factor all code out to ...
31407         (keyserver_get_chunk): new.  Extimate line length.
31408         (keyserver_get): Split up requests into chunks.
31409
31410         gpg: Add import options "keep-ownertrust".
31411         + commit ffc2307843ce6c4ac3c8d99ba8c70ffa1ae28e39
31412         * g10/options.h (IMPORT_KEEP_OWNERTTRUST): New.
31413         * g10/import.c (parse_import_options): Add "keep-ownertrust".
31414         (import_one): Act upon new option.
31415
31416 2014-11-11  Werner Koch  <wk@gnupg.org>
31417
31418         Remove use of gnulib (part 2)
31419         + commit b8cdfac353ad96d4ef025c066c16dbde34805661
31420         * configure.ac (strpbrk): Add to AC_CHECK_FUNCS.
31421         (gl_EARLY): Remove.
31422         * common/stringhelp.c (strpbrk) [!HAVE_STRPBRK]: New.
31423         * common/sysutils.c (gnupg_mkdtemp): New.  Based on code from
31424         glibc-2.6.
31425         (gnupg_setenv): Rewrite.
31426         (gnupg_unsetenv): Rewrite.
31427         * g10/exec.c: Include sysutils.h and replace mkdtemp by gnupg_mkdtemp.
31428         * g13/be-encfs.c: Ditto.
31429         * g13/mount.c: Ditto.
31430         * tools/symcryptrun.c (confucius_mktmpdir): Ditto.
31431
31432         Remove use of gnulib (part 1)
31433         + commit 1adf719b2d8e2d5b912bf6655731e7e586402654
31434         * gl/: Remove entire tree.
31435         * configure.ac: Remove gnulib tests and the gl/ Makefile.
31436         (setenv): Add to AC_CHECK_FUNCS.
31437         * autogen.rc (extra_aclocal_flags): Set to empty.
31438         * Makefile.am (ACLOCAL_AMFLAGS): Remove -I gl/m4
31439         (SUBDIRS): Remove gl/.
31440         * agent/Makefile.am (common_libs): Remove ../gl/gnulib.a
31441         * common/Makefile.am (t_common_ldadd): Ditto.
31442         * dirmngr/Makefile.am (dirmngr_LDADD): Ditto.
31443         (dirmngr_ldap_LDADD, dirmngr_client_LDADD): Ditto.
31444         * g10/Makefile.am (needed_libs): Ditto.
31445         * g13/Makefile.am (g13_LDADD): Ditto.
31446         * kbx/Makefile.am (kbxutil_LDADD): Ditto.
31447         ($(PROGRAMS)): Ditto.
31448         * scd/Makefile.am (scdaemon_LDADD): Ditto.
31449         * sm/Makefile.am (common_libs): Ditto.
31450         * tools/Makefile.am (common_libs, commonpth_libs): Ditto.
31451
31452         * agent/gpg-agent.c: Remove "mkdtemp.h"
31453         * g10/exec.c: Ditto.
31454         * scd/scdaemon.c: Ditto.
31455         * tools/symcryptrun.c: Ditto.
31456         * common/sysutils.c: Remove "setenv.h"
31457
31458         * common/t-timestuff.c: Use putenv if setenv is not available.
31459
31460 2014-11-07  Werner Koch  <wk@gnupg.org>
31461
31462         gpg: Remove warning message for non-implemented search modes.
31463         + commit 7362c8c6e60939588e817384ae2e29195cb3f518
31464         * kbx/keybox-search.c (keybox_search): Silently ignore.
31465         * doc/specify-user-id.texi: Docuement '@", '+', and '.' search
31466         prefixes.
31467
31468         w32: Fix http access module.
31469         + commit f0f5cb6b3e525f696b8820c517190e1d84f3b885
31470         * common/http.c (write_server) [W32]: Rework to use send() instead of
31471         write even when build with npth.
31472         (cookie_read) [W32]: Rework to use recv() instead of read even when
31473         build with npth.
31474
31475         build: Add method to use a custom swdb.lst and use adns with Windows.
31476         + commit c7c79e31937e2d2fdb4042641786c229e31fbfae
31477         * build-aux/getswdb.sh: Add option --skip-verify.
31478         * build-aux/speedo.mk: Add config var CUSTOM_SWDB.  Tage adns version
31479         from swdb and build for Windows with adns.
31480
31481         build: Improve test for ADNS.
31482         + commit f7e1be24c8fcf588d4e48aa53a85b22bd035e3b0
31483         * configure.ac <adns>: Use adns_free as probe function for libadns.
31484         (HAVE_ADNS_FREE): Remove bogus tests to set this and remove the macro.
31485         (ADNSLIBS): Do not ac_subst - it is only used within configure.
31486
31487 2014-11-05  Werner Koch  <wk@gnupg.org>
31488
31489         speedo: Append the date to the Windows installer.
31490         + commit 8ec0b384a86bd7f67a60ab43ff1540e80c3f729d
31491         * build-aux/speedo.mk (BUILD_DATESTR): New.
31492         (dist-source, installer): Use it.
31493
31494         Release 2.1.0.
31495         + commit e22b459b910762f77245283746de34c67ebc72da
31496
31497
31498         Avoid sign extension when shifting the MSB.
31499         + commit 91b826a38880fd8a989318585eb502582636ddd8
31500         * sm/fingerprint.c (gpgsm_get_short_fingerprint): Cast MSB before
31501         shifting.
31502         * g10/build-packet.c (delete_sig_subpkt): Ditto.
31503
31504 2014-11-04  Werner Koch  <wk@gnupg.org>
31505
31506         Remove all expired common CA certificates.
31507         + commit 46fa1e0fe9f7407f12aa854e5cdb54624af3e89b
31508         * doc/com-certs.pem: Remove certifciates.
31509
31510 2014-11-02  Werner Koch  <wk@gnupg.org>
31511
31512         gpg: Avoid extra pinentries for each subkey in --export-secret-keys.
31513         + commit f8c993fbe28bf02f1d7aadec823a9dfc935398fa
31514         * agent/command.c (cmd_export_key): Actually implement the cache_nonce
31515         feature.
31516         * g10/export.c (do_export_stream): Make use of a cache_nonce.
31517
31518         gpg: Fix endless loop in keylisting with fingerprint.
31519         + commit d95f05c314adfecbe0af9073f964030010442f9b
31520         * g10/getkey.c (getkey_next): Disable cache.
31521
31522         gpg: Minor cleanup for key listing related code.
31523         + commit 440e8f517008107a9fe1b72cb659b97b7d840de6
31524         * g10/getkey.c (get_pubkey_next): Divert to getkey_next.
31525         (get_pubkey_end): Move code to getkey_end.
31526         * g10/keydb.c (keydb_search_reset): Add a debug statement.
31527         (dump_search_desc): Add arg HD and print the handle.
31528
31529         gpg: Do not show an useless passphrase prompt in batch mode.
31530         + commit a929f36693567e57eca89fb48f23cada8ce7291a
31531         * g10/keygen.c: Remove unused PASSPHRASE related code.
31532         (proc_parameter_file): Remove useless asking for a passphrase in batch
31533         mode.
31534
31535 2014-10-31  Werner Koch  <wk@gnupg.org>
31536
31537         gpg: Remove superfluous check for Libgcrypt >= 1.4.0.
31538         + commit f4df71aa2d544ec46a2ded3055ffb21b9842129e
31539         * g10/gpg.c (main): Remove check.
31540
31541         kbx: Let keydb_search skip unwanted blobs.
31542         + commit 935edf88ab29b2f63afc2a0e3af1b33c92033ab7
31543         * kbx/keybox.h (keybox_blobtype_t): New.
31544         * kbx/keybox-defs.h (BLOBTYPE_*): Replace by KEYBOX_BLOBTYPE_*.
31545         * kbx/keybox-search.c (keybox_search): Add arg want_blobtype and skip
31546         non-matching blobs.
31547         * sm/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_X509 to keybox_search.
31548         * g10/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_PGP to keybox_search.
31549
31550         gpg: Fix --rebuild-keydb-caches.
31551         + commit 28ae8ad70b3b802e67344468a4765eee6e291c68
31552         * g10/parse-packet.c (parse_key): Store even unsupported packet
31553         versions.
31554         * g10/keyring.c (keyring_rebuild_cache): Do not copy keys with
31555         versions less than 4.
31556
31557         gpg: Fix testing for secret key availability.
31558         + commit 433208a5536608c2b40525eebadbbdeb7780d7f2
31559         * g10/getkey.c (have_secret_key_with_kid): Do not change the search
31560         mode.
31561
31562         build: Avoid distributing backup files etc.
31563         + commit b47fe2b14e2a610706bdeff9dbd9a5f7bd6f6b3a
31564         * Makefile.am (EXTRA_DIST): Do not include directories.
31565
31566 2014-10-30  Werner Koch  <wk@gnupg.org>
31567
31568         tests: Speed up the genkey1024.test by using not so strong random.
31569         + commit 9546aa3cc87fc83a40768a12fbbceb19496ce129
31570         * agent/gpg-agent.c (oDebugQuickRandom): New.
31571         (opts): New option --debug-quick-random.
31572         (main): Use new option.
31573         * common/asshelp.c (start_new_gpg_agent): Add hack to pass an
31574         additional argument for the agent name.
31575         * tests/openpgp/defs.inc: Pass --debug-quick-random to the gpg-agent
31576         starting parameters.
31577         * tests/openpgp/version.test: Ditto.
31578
31579 2014-10-29  Werner Koch  <wk@gnupg.org>
31580
31581         common: Check option arguments for a valid range.
31582         + commit 0d73a242cb53522669cf712b5ece7d1ed05d003a
31583         * common/argparse.h (ARGPARSE_INVALID_ARG): New.
31584         * common/argparse.c: Include limits h and errno.h.
31585         (initialize): Add error strings for new error constant.
31586         (set_opt_arg): Add range checking.
31587
31588         Fix stdint.h problem for Apple.
31589         + commit f5592fcff308007322a201c970a6d5e8763c9fe3
31590         * gl/stdint_.h [__APPLE__]: Include hack.
31591
31592 2014-10-27  Werner Koch  <wk@gnupg.org>
31593
31594         speedo: Fixes for native build.
31595         + commit 158fe900183daf745821dea7a70cf1c673cd8de0
31596         * build-aux/speedo.mk (TARGETOS): Init with empty string.
31597         (speedo_pkg_gnupg_configure): Use --enable-gpg2-is-gpg only for w32.
31598         (INST_VERSION, INST_PROD_VERSION): Create only for w32.
31599
31600 2014-10-24  Werner Koch  <wk@gnupg.org>
31601
31602         agent: Support pinentries with integrated repeat passphrase feature.
31603         + commit c9aadcb3a248632c07391ff3d829bece9320a901
31604         * agent/agent.h (struct pin_entry_info_s): Add fields repeat_okay and
31605         with_repeat.
31606         * agent/call-pinentry.c (close_button_status_cb): Rewrite and check
31607         for PIN_REPEAT.  Change users to check only the relevant bit.
31608         (agent_askpin): Support repeat logic of new Pinentries.
31609
31610         * agent/command-ssh.c (ssh_identity_register): Use the new repeat
31611         feature.
31612         * agent/genkey.c (agent_ask_new_passphrase): Ditto.
31613
31614 2014-10-19  Werner Koch  <wk@gnupg.org>
31615
31616         gpg: Silence "packet with obsolete versoin" warnings.
31617         + commit 472a4a0d82add2d17154fa38e0074eaea56c28c1
31618         * g10/parse-packet.c (parse_key): Print warning only in very verbose
31619         mode.
31620
31621         gpg: Make card key generation work again.
31622         + commit 1b8decc4767f0c55867327bdf3113204efcd19a7
31623         * g10/call-agent.c (agent_scd_learn): Rename from agent_learn.
31624         (agent_learn): New.
31625         * g10/keygen.c (gen_card_key): Call new agent-learn.
31626
31627 2014-10-17  Werner Koch  <wk@gnupg.org>
31628
31629         dirmngr: Allow building without LDAP support.
31630         + commit 6d9491842d5da597980eaa59e1e3e2137965fe09
31631         * configure.ac: Add option --disable-ldap.
31632         (USE_LDAP): New ac_define and am_conditional.
31633         * dirmngr/Makefile.am: Take care of USE_LDAP.
31634         * dirmngr/dirmngr.c (!USE_LDAP): Make all ldap options dummy options
31635         and do not call any ldap function.
31636         * dirmngr/server.c (!USE_LDAP): Do not call any ldap function.
31637         * dirmngr/crlfetch.c (!USE_LDAP): Ditto.
31638
31639         w32: Set SYSROOT to help finding config scripts.
31640         + commit a13705f4c18db56765f4af31376e81241dbabebe
31641         * autogen.sh <build-w32>: Set SYSROOT.
31642
31643         gpg: Remove all support for v3 keys and always create v4-signatures.
31644         + commit 8fd150b05b744fe9465057c12529d5e6b6b02785
31645         * g10/build-packet.c (do_key): Remove support for building v3 keys.
31646         * g10/parse-packet.c (read_protected_v3_mpi): Remove.
31647         (parse_key): Remove support for v3-keys.  Add dedicated warnings for
31648         v3-key packets.
31649         * g10/keyid.c (hash_public_key): Remove v3-key support.
31650         (keyid_from_pk): Ditto.
31651         (fingerprint_from_pk): Ditto.
31652
31653         * g10/options.h (opt): Remove fields force_v3_sigs and force_v4_certs.
31654         * g10/gpg.c (cmd_and_opt_values): Remove oForceV3Sigs, oNoForceV3Sigs,
31655         oForceV4Certs, oNoForceV4Certs.
31656         (opts): Turn --force-v3-sigs, --no-force-v3-sigs, --force-v4-certs,
31657         --no-force-v4-certs int dummy options.
31658         (main): Remove setting of the force_v3_sigs force_v4_certs flags.
31659         * g10/revoke.c (gen_revoke, create_revocation): Always create v4 certs.
31660         * g10/sign.c (hash_uid): Remove support for v3-signatures
31661         (hash_sigversion_to_magic): Ditto.
31662         (only_old_style): Remove this v3-key function.
31663         (write_signature_packets): Remove support for creating v3-signatures.
31664         (sign_file): Ditto.
31665         (sign_symencrypt_file): Ditto.
31666         (clearsign_file): Ditto.  Remove code to emit no Hash armor line if
31667         only v3-keys are used.
31668         (make_keysig_packet): Remove arg SIGVERSION and force using
31669         v4-signatures.  Change all callers to not pass a value for this arg.
31670         Remove all v3-key related code.
31671         (update_keysig_packet): Remove v3-signature support.
31672         * g10/keyedit.c (sign_uids): Always create v4-signatures.
31673
31674         * g10/textfilter.c (copy_clearsig_text): Remove arg pgp2mode and
31675         change caller.
31676
31677 2014-10-13  Werner Koch  <wk@gnupg.org>
31678
31679         gpg: Remove extra RSA import status line.
31680         + commit fab89f159bcb36ea7285af661d5756eefa981822
31681         * g10/import.c (stats_s): Remove field "imported_rsa".
31682         (import_print_stats): Do not print separate value for RSA.
31683         (import_one): Remove the RSA counter.
31684
31685         gpg: Fix informative printing of user ids.
31686         + commit 21c0ea6bafafbcc4a2e07f0ac76275cc0229e9a0
31687         * g10/getkey.c (keyid_list): Add field "fpr".
31688         (cache_user_id): Store fpr and check for dups only by fpr.
31689         (get_pubkey_byfpr): New.
31690         (get_user_id_string): Make static and use xasprintf.
31691         (get_long_user_id_string): Use xasprintf.
31692         (get_user_id_byfpr): New.
31693         (get_user_id_byfpr_native): New.
31694         * g10/keyid.c (fingerprint_from_pk): Make arg RET_LEN optional.
31695         * g10/import.c (import_one): Use get_user_id_byfpr_native.
31696
31697         gpg: Allow importing keys with duplicated long key ids.
31698         + commit c60814a5ce13932d933b363abc0c60c12783ae2f
31699         * g10/keydb.c (keydb_handle): Add field no_caching.
31700         (keyblock_cache): Repalce field kid by fpr.
31701         (keydb_disable_caching): New.
31702         (keydb_search): Use the fingerprint as cache index.
31703
31704         * g10/import.c (import_one): Use the fingerprint and not the kid to
31705         lookup the key.  Call keydb_disable_caching beofre re-searching for
31706         update.
31707
31708         * tests/openpgp/import.test: Add a test case.
31709
31710         tests: Speed up conventional encryption tests for gpg.
31711         + commit 2543f0ab9c7b4247347688863f898667bae31984
31712         * tests/openpgp/conventional-mdc.test: Add an s2k-count option.
31713         * tests/openpgp/conventional.test: Ditto.
31714
31715 2014-10-12  Werner Koch  <wk@gnupg.org>
31716
31717         gpg: Minor change for better readability.
31718         + commit 2d68dc437e7de92619abe3a019b0a7606487b6bf
31719         * g10/build-packet.c (write_version): Remove.
31720         (do_pubkey_enc, do_onepass_sig): Write version directly.
31721
31722 2014-10-10  Werner Koch  <wk@gnupg.org>
31723
31724         doc: Fix a man page rendering problem.
31725         + commit 5b5e5a6027ae1743719e112aa4e9055f1b8133a7
31726         * doc/gpg-agent.texi (Agent Configuration): Fix rendering of the
31727         sshcontrol example.
31728
31729 2014-10-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
31730
31731         gpg: Add build and runtime support for larger RSA keys.
31732         + commit 6cabb7a2a18f871b8c3d5de58bcdc5aaa5b201af
31733         * configure.ac: Added --enable-large-secmem option.
31734         * g10/options.h: Add opt.flags.large_rsa.
31735         * g10/gpg.c: Contingent on configure option: adjust secmem size,
31736         add gpg --enable-large-rsa, bound to opt.flags.large_rsa.
31737         * g10/keygen.c: Adjust max RSA size based on opt.flags.large_rsa
31738         * doc/gpg.texi: Document --enable-large-rsa.
31739
31740 2014-10-09  Werner Koch  <wk@gnupg.org>
31741
31742         gpg: Skip overlong keys and a print a warning.
31743         + commit 2ca90f78cee91c43b8d538d1cb92728f8e1452d5
31744         * kbx/keybox-search.c (keybox_search): Add arg r_skipped and skip too
31745         long blobs.
31746         * sm/keydb.c (keydb_search): Call keybox_search with a dummy param.
31747         * g10/keydb.c (struct keydb_handle): Add field skipped_long_blobs.
31748         (keydb_search_reset): Reset that field.
31749         (keydb_search): Update that field.
31750         (keydb_get_skipped_counter): New.
31751         * g10/keylist.c (list_all): Print count of skipped keys.
31752
31753         gpg: Sync keylist output and warning messages.
31754         + commit 60e21d8b85888b8c9ea15c70268f98d780fdf5fb
31755         * g10/keylist.c (list_all): Flush stdout before logging.
31756         * g10/misc.c (print_pubkey_algo_note): Ditto.
31757         (print_cipher_algo_note): Ditto.
31758         (print_digest_algo_note): Ditto.
31759         (print_md5_rejected_note): Ditto.
31760
31761         kbx: Fix handling of overlong keys.
31762         + commit b6507bb80e4e4aa5c85a918fdcf5c28cccb75081
31763         * kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 10^6 to 2MiB.
31764         (_keybox_read_blob2): Skip too long record records.
31765         (_keybox_write_blob): Do not accept too long record.
31766         * kbx/keybox-dump.c (file_stats_s): Add field skipped_long_blobs.
31767         (_keybox_dump_file): Print new counter.
31768         (_keybox_dump_file): Skip too long records.
31769         ----
31770
31771         To test this feature you may set the limit back to 1MiB and use key
31772         F7F0E70F307D56ED which is in my local copy close to 2MiB.  Without
31773         this patch it was possible to import the key but access to that key
31774         and all keys stored after it was not possible.
31775
31776         gpg: Take care to use pubring.kbx if it has ever been used.
31777         + commit ec332d58efc50f6508b87fc9f51db68c39cee044
31778         * kbx/keybox-defs.h (struct keybox_handle): Add field for_openpgp.
31779         * kbx/keybox-file.c (_keybox_write_header_blob): Set openpgp header
31780         flag.
31781         * kbx/keybox-blob.c (_keybox_update_header_blob): Add arg for_openpgp
31782         and set header flag.
31783         * kbx/keybox-init.c (keybox_new): Rename to do_keybox_new, make static
31784         and add arg for_openpgp.
31785         (keybox_new_openpgp, keybox_new_x509): New.  Use them instead of the
31786         former keybox_new.
31787         * kbx/keybox-update.c (blob_filecopy): Add arg for_openpgp and set the
31788         openpgp header flags.
31789
31790         * g10/keydb.c (rt_from_file): New.  Factored out and extended from
31791         keydb_add_resource.
31792         (keydb_add_resource): Switch to the kbx file if it has the openpgp
31793         flag set.
31794
31795         * kbx/keybox-dump.c (dump_header_blob): Print header flags.
31796
31797 2014-10-09  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
31798
31799         Avoid unnecessary library linkage.
31800         + commit 27fe067efea883629354450a042ad09e47d90ff8
31801         * dirmngr/Makefile.am: Avoid $(DNSLIBS) for dirmngr_ldap
31802         * g10/Makefile.am: $(LIBREADLINE) is only for gpg2; gpgv2 does not
31803         need $(LIBASSUAN_LIBS)
31804         * sm/Makefile.am: gpgsm does not need $(ZLIBS)
31805         * tools/Makefile.am: gpgconf does not need $(NPTH_LIBS)
31806
31807 2014-10-08  Werner Koch  <wk@gnupg.org>
31808
31809         gpg: Avoid error exit if keygrip computations fails in a key listing.
31810         + commit 3ae6afc1336d42bd95fa0b7f5f83bd299ae26b97
31811         * g10/keyid.c (keygrip_from_pk): Use log_info and clear array on error.
31812
31813 2014-10-03  Werner Koch  <wk@gnupg.org>
31814
31815         Release 2.1.0-beta864.
31816         + commit 0943c7cc23371943e9670a2f35c318d847cbac6a
31817
31818
31819         gpg: Allow creating a cert-only primary key.
31820         + commit bc8583f247898a1fa45f6de834d34b335ab1952c
31821         * g10/keygen.c (ask_key_flags): Allow a 'c' in direct entry.
31822
31823         build: Add configure options --disable-{ntb,gnu}tls.
31824         + commit 6522a68d8d11e15ee77102e6830f251c2d9f440d
31825         * configure.ac: Add --disable-ntbtls and --disable-gnutls.
31826
31827 2014-10-03  Andre Heinecke  <aheinecke@intevation.de>
31828
31829         gpg: Check gpg-agent version before 2.1 migration.
31830         + commit a6fcdbc9e0fc0e45a3badc23813e689e83059b61
31831         * g10/call-agent.c, g10/call-agent.h (agent_get_version): New.
31832         * g10/migrate.c (migrate_secring): Abort migration if
31833         agent_get_version returns not at least 2.1.0
31834
31835 2014-10-03  Werner Koch  <wk@gnupg.org>
31836
31837         po: Update German translation.
31838         + commit b15d5d42adf31c0797797ebe19c471ab6f52c668
31839
31840
31841         Remove support for the GPG_AGENT_INFO envvar.
31842         + commit 9c380384dafb213334f8834178c5ceb0bf33db6e
31843         * agent/agent.h (opt): Remove field use_standard_socket.
31844         * agent/command.c (cmd_killagent): Always allow killing.
31845         * agent/gpg-agent.c (main): Turn --{no,}use-standard-socket and
31846         --write-env-file into dummy options.  Always return true for
31847         --use-standard-socket-p. Do not print the GPG_AGENT_INFO envvar
31848         setting or set that envvar.
31849         (create_socket_name): Simplify by removing non standard socket
31850         support.
31851         (check_for_running_agent): Ditto.
31852         * common/asshelp.c (start_new_gpg_agent): Remove GPG_AGENT_INFO use.
31853         * common/simple-pwquery.c (agent_open): Ditto.
31854         * configure.ac (GPG_AGENT_INFO_NAME): Remove.
31855         * g10/server.c (gpg_server): Do not print the AgentInfo comment.
31856         * g13/server.c (g13_server): Ditto.
31857         * sm/server.c (gpgsm_server): Ditto.
31858         * tools/gpgconf.c (main): Simplify by removing non standard socket
31859         support.
31860
31861 2014-10-02  Werner Koch  <wk@gnupg.org>
31862
31863         gpg: Fix regression removing SHA256.
31864         + commit 688a903b4b3ad348c0d09e9d3fab8a12f4f94311
31865         * g10/misc.c (map_md_openpgp_to_gcry): Always use SHA256.
31866
31867         First changes for future use of NTBTLS.
31868         + commit f2361e6d582d4343d71d294ed1da654afe7750ee
31869         * configure.ac (NEED_NTBTLS_ABI, NEED_NTBTLS_VERSION): New.
31870         (HTTP_USE_NTBTLS): New.  Prefer over GNUTLS.
31871         * m4/ntbtls.m4: New.
31872         * m4/Makefile.am (EXTRA_DIST): Add new file.
31873         * common/http.c: Add conditionals to eventually use NTBTLS.
31874
31875         build: Update m4 scripts.
31876         + commit 6bc0cd6202033be113999dbf27be4014bdf2c784
31877         * m4/gpg-error.m4: Update from Libgpg-error git master.
31878         * m4/libgcrypt.m4: Update from Libgcrypt git master.
31879         * configure.ac: Declare SYSROOT a precious variable.  Add extra error
31880         message for library configuration mismatches.
31881
31882 2014-09-29  Werner Koch  <wk@gnupg.org>
31883
31884         doc: Remove GnuPG-1 related parts from gpg.texi.
31885         + commit edd191e5b006dc6ace1d41672e7201cbe58c41c9
31886         * doc/Makefile.am (YAT2M_OPTIONS): Add 2.1 to the source info.
31887         * doc/gpg.texi: Remove gpg1 related texts.
31888
31889 2014-09-27  Werner Koch  <wk@gnupg.org>
31890
31891         gpg: Default to SHA-256 for all signature types on RSA keys.
31892         + commit d33246700578cddd1cb8ed8164cfbba50aba4ef3
31893         * g10/main.h (DEFAULT_DIGEST_ALGO): Use SHA256 in --gnupg and SHA1 in
31894         strict RFC or PGP modes.
31895         * g10/sign.c (make_keysig_packet): Use DEFAULT_DIGEST_ALGO also for
31896         RSA key signatures.
31897         * configure.ac: Do not allow to disable sha256.
31898
31899         gpg: Simplify command --gen-key and add --full-gen-key.
31900         + commit f3625bb018fa8d5bc754f982996f8788386f0a9d
31901         * g10/gpg.c (aFullKeygen): New.
31902         (opts): Add command --full-key-gen.
31903         (main): Implement it.
31904         * g10/keygen.c (DEFAULT_STD_ALGO): Replace wrong GCRY_PK_RSA although
31905         the value is identical.
31906         (DEFAULT_STD_CURVE): New.
31907         (DEFAULT_STD_SUBALGO): New.
31908         (DEFAULT_STD_SUBKEYSIZE): New.
31909         (DEFAULT_STD_SUBCURVE): New.
31910         (quick_generate_keypair): Use new macros here.
31911         (generate_keypair): Add arg "full" and fix call callers. Do not ask
31912         for keysize in non-full node.
31913         (ask_user_id): Add arg "full" and simplify for non-full mode.
31914
31915 2014-09-26  Werner Koch  <wk@gnupg.org>
31916
31917         gpg: Add shortcut for setting key capabilities.
31918         + commit 7ff4ea2160e87a16bf701552d3b9c7ab1c42f9ec
31919         * g10/keygen.c (ask_key_flags): Add shortcut '='.
31920         * doc/help.txt (gpg.keygen.flags): New.
31921
31922 2014-09-25  Werner Koch  <wk@gnupg.org>
31923
31924         gpg: Do not always print dashes in obsolete_option.
31925         + commit 20c6da50d4f6264d26d113d7de606971f719a0ca
31926         * g10/gpg.c (main): Pass option names to obsolete_option without
31927         double dash.
31928         * g10/misc.c (obsolete_option, obsolete_scdaemon_option): Print double
31929         dash only for command line options.
31930
31931 2014-09-25  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
31932
31933         gpg: Warn about (but don't fail) on scdaemon options in gpg.conf.
31934         + commit 371c2b14b0347209efd23b4e54e1981a12d7aeab
31935         * g10/gpg.c: Add config options that should belong in scdaemon.conf
31936         * g10/main.h, g10/misc.c (obsolete_scdaemon_option): New.
31937
31938 2014-09-22  Werner Koch  <wk@gnupg.org>
31939
31940         speedo: Check that wget and gpgv are installed.
31941         + commit 59b6f6f16e095162358ac2001aeb2c058de2fd1e
31942         * build-aux/getswdb.sh: Check for required tools.
31943
31944         speedo: Autodetect sha1sum tools.
31945         + commit 2427bc5bc76b00cfe790e1f370113f5b4199e8fa
31946         * build-aux/getswdb.sh: Add option --find-sha1sum.
31947         * build-aux/speedo.mk (check-tools): New phony target.  Not yet used.
31948         (SHA1SUM): New var.  Use it instead of sha1sum.
31949
31950         gpg: Create default keyring with .kbx suffix.
31951         + commit bc2f5c1d1afbe8ba413e594639fd05f19df32f75
31952         * g10/keydb.c (maybe_create_keyring_or_box): Rename arg for clarity.
31953         (keydb_add_resource): Fix order of args to maybe_create_keyring_or_box
31954         and check and create .kbx.
31955
31956 2014-09-20  Werner Koch  <wk@gnupg.org>
31957
31958         gpg: --delete-secret-key - check that a secret key exists.
31959         + commit 1d33d03f0bb576601f5eef1a548cbc519f251b17
31960         * g10/delkey.c (do_delete_key): Check availibility of a secret key.
31961
31962         gpg: Make algorithm selection prompt for ECC more clear.
31963         + commit cf648fc5c8cb20bfea4fd303631ba311bbaf3659
31964         * g10/keygen.c (ask_algo): Change 9 to "ECC and ECC".
31965
31966 2014-09-18  Werner Koch  <wk@gnupg.org>
31967
31968         Release 2.1.0-beta834.
31969         + commit 93f158df381af86036332c4314c2d4a64eab3e62
31970
31971
31972         speedo: Distribute needed files.
31973         + commit 72a16d80d4505aa0ff509aae41f848bbe42ed129
31974         * Makefile.am (EXTRA_DIST): Add speedo stuff.
31975
31976         build: Enable gpgtar by default.
31977         + commit 345a8374f31e637a99e6438e527670cf6845ca05
31978
31979
31980         common: Do not build maintainer modules in non-maintainer mode.
31981         + commit 927db789c19cbe5656ff980841ee37dd3a8989e7
31982         * common/Makefile.am (module_maint_tests): Use only in maintainer
31983         mode.
31984         (t_common_cflags): New.
31985
31986         common: Remove superfluous statements.
31987         + commit cad181b5ece3ab6910575c82c731ce2b47271a09
31988         * common/exechelp-posix.c: Remove weak pragmas.
31989         * common/sexputil.c (make_canon_sexp_from_rsa_pk): Remove double
31990         const.
31991
31992         g13: Avoid segv after pipe creation failure.
31993         + commit 6e7bcabd781a3ca9ad7dd90d962fb2a239feab4a
31994         * g13/call-gpg.c (gpg_encrypt_blob): Init some vars in case of an
31995         early error.
31996         (gpg_decrypt_blob): Ditto.
31997
31998         scd: Fix int/short mismatch in format string of app-p15.c.
31999         + commit b17e8bbf20239e840763f98d3e62f16efdc82ba3
32000         * scd/app-p15.c (parse_certid): Use snprintf and cast value.
32001         (send_certinfo): Ditto.
32002         (send_keypairinfo): Ditto.
32003         (do_getattr): Ditto.
32004
32005         agent: Init a local variable in the error case.
32006         + commit f82a6e0f08725008c5bbf702a5f4c175ea09f01c
32007         * agent/pksign.c (do_encode_md): Init HASH on error.
32008
32009         agent: Remove left over debug output.
32010         + commit 4f35ef499ac913036b7b69296a62afe8159b90b8
32011         * agent/command-ssh.c (ssh_signature_encoder_eddsa): Remove debug
32012         output.
32013
32014         agent: Silence compiler warning for a debug message.
32015         + commit ba6f8b3d9ec83b35c4f3839853567491fee2f99c
32016         * agent/call-pinentry.c (agent_query_dump_state): Use %p for
32017         POPUP_TID.
32018
32019         sm: Silence compiler warnings.
32020         + commit 34b2e8c7dcb0edb28f99edbd788d73491334e3c0
32021         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Remove unused var I.
32022         * sm/certreqgen.c (proc_parameters): Init PUBLIC to avoid compiler
32023         warning.
32024
32025         gpg: Silence a compiler warning.
32026         + commit 6a0c3fa19cfcdd590b96691e8a8ffb48fb5e0ec4
32027         * g10/parse-packet.c (enum_sig_subpkt): Replace hack.
32028
32029         gpg: Replace a hash algo test function.
32030         + commit 327134934d79d141d92170ad3b4a6ef3cb718ee0
32031         * g10/gpg.c (print_mds): Replace openpgp_md_test_algo.
32032
32033         speedo: Various fixes.
32034         + commit 2f065d7ab6c514013eb8504281f50284764c26ec
32035         * build-aux/speedo.mk: Take zlib and bzip2 from ftp.gnupg.org.  Minor
32036         other fixes.
32037
32038 2014-09-17  Werner Koch  <wk@gnupg.org>
32039
32040         gpg: Print a warning if the subkey expiration may not be what you want.
32041         + commit ae3d1bbb65b65cf3c57bb14886be120f5e31635d
32042         * g10/keyedit.c (subkey_expire_warning): New.
32043         (keyedit_menu): Call it when needed.
32044
32045         gpg: Improve passphrase caching.
32046         + commit 457bce5cd39146df047e4740162125c32c738789
32047         * agent/cache.c (last_stored_cache_key): New.
32048         (agent_get_cache): Allow NULL for KEY.
32049         (agent_store_cache_hit): New.
32050         * agent/findkey.c (unprotect): Call new function and try to use the
32051         last stored key.
32052
32053         * g10/revoke.c (create_revocation): Add arg CACHE_NONCE and pass to
32054         make_keysig_packet.
32055         (gen_standard_revoke): Add arg CACHE_NONCE and pass to
32056         create_revocation.
32057         * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke with
32058         cache nonce.
32059
32060 2014-09-12  Werner Koch  <wk@gnupg.org>
32061
32062         gpg: Use algorithm id 22 for EdDSA.
32063         + commit 83c2d2396cc9fa6bdd887a560830fc0f48b01b08
32064         * common/openpgpdefs.h (PUBKEY_ALGO_EDDSA): Change to 22.
32065         * g10/keygen.c (ask_curve): Reword the Curve25519 warning note.
32066
32067 2014-09-11  Werner Koch  <wk@gnupg.org>
32068
32069         gpg: Stop early on bogus old style comment packets.
32070         + commit 3d250d21d36e8a0935b645f1ed5134ef9083530e
32071         * g10/parse-packet.c (parse_key): Take care of too short packets for
32072         old style commet packets.
32073
32074 2014-09-10  Werner Koch  <wk@gnupg.org>
32075
32076         dirmngr: Support https for KS_FETCH.
32077         + commit 84419f42da0fd436a9e0e669730157e74ce38b77
32078         * dirmngr/ks-engine-hkp.c (cert_log_cb): Move to ...
32079         * dirmngr/misc.c (cert_log_cb): here.
32080         * dirmngr/ks-engine-http.c (ks_http_fetch): Support 307-redirection
32081         and https.
32082
32083         dirmngr: Fix the ks_fetch command for the http scheme.
32084         + commit 3b20cc21de86ac8a475bdefd3aebb02a12fb8d0b
32085         * common/http.c (http_session_ref): Allow for NULL arg.
32086
32087 2014-09-08  Werner Koch  <wk@gnupg.org>
32088
32089         gpg: Fix memory leak in ECC encryption.
32090         + commit 98f65291d7abecc1e4d618125f33b6ce759e0892
32091         * g10/pkglue.c (pk_encrypt): Fix memory leak and streamline error
32092         handling.
32093
32094 2014-09-02  Werner Koch  <wk@gnupg.org>
32095
32096         gpg: Fix export of NIST ECC keys.
32097         + commit bf2fc12b83b45953f7afa403b8d91c36d0b50ec9
32098         * common/openpgp-oid.c (struct oidtable): New.
32099         (openpgp_curve_to_oid): Rewrite and allow OID as input.
32100         (openpgp_oid_to_curve): Make use of the new table.
32101
32102         agent: Fix import of OpenPGP EdDSA keys.
32103         + commit afe85582ddc2ebc285728bf6417f8929fd0b3281
32104         * agent/cvt-openpgp.c (get_keygrip): Special case EdDSA.
32105         (convert_secret_key): Ditto.
32106         (convert_transfer_key): Ditto.
32107         (apply_protection): Handle opaque MPIs.
32108
32109         (do_unprotect): Check FLAG_OPAQUE instead of FLAG_USER1 before
32110         unpacking an opaque mpi.
32111
32112 2014-09-01  Kyle Butt  <kylebutt@gmail.com>
32113
32114         gpg: Fix export of ecc secret keys by adjusting check ordering.
32115         + commit 4054d86abcb7ad953ed9e988b1765cb9266faefd
32116         * g10/export.c (transfer_format_to_openpgp): Move the check against
32117         PUBKEY_MAX_NSKEY to after the ECC code adjusts the number of
32118         parameters.
32119
32120 2014-09-01  Werner Koch  <wk@gnupg.org>
32121
32122         agent: Allow key unprotection using AES-256.
32123         + commit c913e09ebdbb1a1e9838a0a5897448841f5e9bc3
32124         * agent/protect.c (PROT_CIPHER): Rename to GCRY_CIPHER_AES128 for
32125         clarity.
32126         (do_decryption): Add args prot_cipher and prot_cipher_keylen.  USe
32127         them instead of the hardwired values.
32128         (agent_unprotect): Change to use a table of protection algorithms.
32129         Add AES-256 variant.
32130
32131 2014-08-28  Werner Koch  <wk@gnupg.org>
32132
32133         gpg: Do not show "MD5" and triplicated "RSA" in --version.
32134         + commit be98b5960ebd48929c399b0b91c95bfc0cb9749b
32135         * g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
32136         (build_list_md_test_algo): Ignore MD5.
32137
32138         gpg: Do not show "MD5" and triplicated "RSA" in --version.
32139         + commit 40ad42dbe3c67d8103aedb6b584f4bedc5f93307
32140         * g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
32141         (build_list_md_test_algo): Ignore MD5.
32142
32143 2014-08-26  Werner Koch  <wk@gnupg.org>
32144
32145         gpg: Remove CAST5 from the default prefs and order SHA-1 last.
32146         + commit 15cfd9a3bcdd561091a28c8f989c616b87348463
32147         * g10/keygen.c (keygen_set_std_prefs): Update prefs.
32148
32149         Switch to the libgpg-error provided estream.
32150         + commit 519305feb888b529c005b40445d041a088a2f8fc
32151         * configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14.
32152         (GPGRT_ENABLE_ES_MACROS): Define.
32153         (estream_INIT): Remove.
32154         * m4/estream.m4: Remove.
32155         * common/estream-printf.c, common/estream-printf.h: Remove.
32156         * common/estream.c, common/estream.h: Remove.
32157         * common/init.c (_init_common_subsystems): Call gpgrt initialization.
32158
32159         gpg: Allow for positional parameters in the passphrase prompt.
32160         + commit a731c22952278c12c601b73d7581fda3a15a4b5b
32161         * g10/passphrase.c (passphrase_get): Replace sprintf by xasprintf.
32162
32163 2014-08-20  Werner Koch  <wk@gnupg.org>
32164
32165         gpg: Fix "can't handle public key algorithm" warning.
32166         + commit cb680c5ea540738692a5c74951802b0fdc658e85
32167         * g10/parse-packet.c (unknown_pubkey_warning): Check for encr/sign
32168         capabilities.
32169
32170 2014-08-19  Werner Koch  <wk@gnupg.org>
32171
32172         speedo: Get version numbers from online database.
32173         + commit 31649e72fd106a990614ce3cf720640a841ba722
32174         * build-aux/getswdb.sh: New.
32175         * build-aux/speedo.mk: Get release version numbers from swdb.lst.
32176
32177         build: Create VERSION file via autoconf.
32178         + commit 4fc1c712e986f280057b1bce7ca4696ba6d95dfc
32179         * Makefile.am (dist-hook): Remove creation of VERSION.
32180         (EXTRA_DIST): Add VERSION.
32181         * configure.ac: Let autoconf create VERSION.
32182
32183 2014-08-18  Werner Koch  <wk@gnupg.org>
32184
32185         gpg: Install the current release signing pubkey.
32186         + commit e5da80bc1888bf8801e69c9ff99f7f47550f7a09
32187         * g10/distsigkey.gpg: New.
32188
32189         agent: Return NO_SECKEY instead of ENONET for PKSIGN and others.
32190         + commit 3981ff15f3c0829ba22cd37794353502d996683c
32191         * agent/pksign.c (agent_pksign_do): Replace ENONET by NO_SECKEY.
32192         * agent/findkey.c (agent_key_from_file): No diagnostic for NO_SECKEY.
32193         * agent/pkdecrypt.c (agent_pkdecrypt): Replace checking for ENOENT.
32194
32195         kbx: Make user id and signature data optional for OpenPGP.
32196         + commit e4aa006e4807285ffdd881e4e05af3bc47c5c964
32197         * kbx/keybox-blob.c (_keybox_create_openpgp_blob): Remove restriction.
32198
32199         gpg: Change default cipher for --symmetric from CAST5 to AES-128.
32200         + commit 57df1121c18b004dd763b35eabf7b51fc9e8ec38
32201         * g10/main.h (DEFAULT_CIPHER_ALGO): Chhange to AES or CAST5 or 3DES
32202         depending on configure option.
32203         * g10/gpg.c (main): Set opt.s2k_cipher_algo to DEFAULT_CIPHER_ALGO.
32204
32205         yat2m: Support @set and @value.
32206         + commit 425d0750168f6b66a5d78a857cf21375a8f129eb
32207         * doc/yat2m.c (variablelist): New.
32208         (set_variable): New.
32209         (macro_set_p): Also check the variables.
32210         (proc_texi_cmd): Support the @value command.
32211         (parse_file): Support the @set command.
32212         (top_parse_file): Release variablelist.
32213
32214         yat2m: Support the $* command for man page rendering.
32215         + commit 7e51ef0f77962f5fb215da53817caf28899ca190
32216
32217
32218 2014-08-17  Werner Koch  <wk@gnupg.org>
32219
32220         estream: Change license from GPL to LPGL.
32221         + commit af1196512f505e8a3a338f9b72394fa3585a5234
32222         * common/estream-printf.c, common/estream-printf.h: Change license.
32223         * common/estream.c, common/estream.h: Ditto.
32224
32225 2014-08-14  Werner Koch  <wk@gnupg.org>
32226
32227         Release 2.1.0-beta783.
32228         + commit a13198d9bcee368a8de7a401feb017efc83ff795
32229
32230
32231         po: Update the German (de) translation.
32232         + commit fe9ff33b9dc8793957998341cf4bcf5e50827b41
32233
32234
32235         sm: Create homedir and lock empty keybox creation.
32236         + commit c4b60cdae8dbf68206fd105fd09adeb61a9dafe4
32237         * sm/gpgsm.h (opt): Add field "no_homedir_creation".
32238         * sm/gpgsm.c (main): Set it if --no-options is used.
32239         * sm/keydb.c (try_make_homedir): New.  Similar to the one from
32240         g10/openfile.c.
32241         (maybe_create_keybox): New.  Similar to the one from g10/keydb.c.
32242         (keydb_add_resource): Replace some code by maybe_create_keybox.
32243
32244         gpg: Screen keyserver responses.
32245         + commit c23c18c1543d1ff58f0f78baaa6a8e319c659ecb
32246         * g10/main.h (import_screener_t): New.
32247         * g10/import.c (import): Add screener callbacks to param list.
32248         (import_one): Ditto.
32249         (import_secret_one): Ditto.
32250         (import_keys_internal): Ditto.
32251         (import_keys_stream): Ditto.
32252         * g10/keyserver.c (struct ks_retrieval_screener_arg_s): New.
32253         (keyserver_retrieval_screener): New.
32254         (keyserver_get): Pass screener to import_keys_es_stream().
32255
32256         scd: Minor changes to app-sc-hsm.
32257         + commit a61b28df1f29b1e306115282ec1ce580fa54945a
32258         * scd/app-sc-hsm.c: Re-indendet some parts and set some vars to NULL
32259         after xfree for improbed robustness.
32260         (read_ef_prkd): Replace serial operator by blocks for better
32261         readability.
32262         (apply_PKCS_padding): Rewrite for easier auditing.
32263         (strip_PKCS15_padding): Ditto.  Add stricter check on SRCLEN.
32264
32265         gpg: Disable an MD5 workaround for pgp2 by default.
32266         + commit ae29b52119aa419989b773b2d6abb6e287dfc81b
32267         * g10/sig-check.c (do_check): Move some code to ...
32268         * g10/misc.c (print_md5_rejected_note): new function.
32269         * g10/mainproc.c (proc_tree, proc_plaintext): Enable MD5 workaround
32270         only if option --allow-weak-digest-algos is used.
32271
32272         gpg: Remove options --pgp2 and --rfc1991.
32273         + commit 2b8d8369d59249b89526c18c5ac276e6445dc35e
32274         * g10/gpg.c (oRFC1991, oPGP2): Remove
32275         (opts): Remove --pgp2 and --rfc1991.
32276         * g10/options.h (CO_PGP2, CO_RFC1991): Remove.  Remove all users.
32277         (RFC2440, PGP2): Remove.  Remove all code only enabled by these
32278         conditions.
32279         * tests/openpgp/clearsig.test: Remove --rfc1991 test.
32280
32281         build: Fix autogen.sh base version hack.
32282         + commit 49c9a958e0b786850309bca555d4465c97d337e1
32283         * autogen.sh <find-version>: Fix.
32284
32285         gpg: Remove --compress-keys and --compress-sigs feature.
32286         + commit 71b55e91f02cdb65a8884892f71c4c7bf8a75247
32287         * g10/gpg.c (oCompressKeys, oCompressSigs): Remove.
32288         (opts): Turn --compress-keys and --compress-signs in NOPs.
32289         * g10/options.h (opt): Remove fields compress_keys and compress_sigs.
32290         * g10/export.c (do_export): Remove compress_keys feature.
32291         * g10/sign.c (sign_file): Remove compress_sigs feature.
32292
32293 2014-08-13  Werner Koch  <wk@gnupg.org>
32294
32295         gpg: Add list-option "show-usage".
32296         + commit 7d0492075ea638607309b3ea6a792b0e95ea7d98
32297         * g10/gpg.c (parse_list_options): Add "show-usage".
32298         * g10/options.h (LIST_SHOW_USAGE): New.
32299         * g10/keyid.c (usagestr_from_pk): Add arg FILL.  Change caller.
32300         * g10/keylist.c (list_keyblock_print): Print usage info.
32301
32302 2014-08-12  Werner Koch  <wk@gnupg.org>
32303
32304         gpg: Make --with-colons work again for --search-keys.
32305         + commit a57c33c855c6757c8770529ee71f0f90744cd7a6
32306         * g10/keyserver.c (search_line_handler): Replace log_debug by
32307         es_printf.
32308
32309 2014-08-08  NIIBE Yutaka  <gniibe@fsij.org>
32310
32311         po: Update Japanese translation.
32312         + commit 2d9f76e07082fc231303ac2c6ae1aea3c98fa2e4
32313
32314
32315 2014-07-25  Werner Koch  <wk@gnupg.org>
32316
32317         scd: Minor and editorial changes to app-sc-hsm.c.
32318         + commit 2e936915cf2f830e60d974d607b08822645f5753
32319         * scd/app-sc-hsm.c (select_and_read_binary): Use SW_ macro.
32320         (parse_certid): Remove useless test.
32321         (send_certinfo, send_keypairinfo): Shrink malloc to the needed size.
32322         (do_getattr): Ditto.
32323         (verify_pin): Use SW_ macro.
32324         (do_decipher): Replace OFS variable and extend comment.
32325
32326         scd: Add a new status word code.
32327         + commit e49c851ff54d5ecf856411bf6cdee721695ea172
32328         * scd/apdu.h (SW_REF_DATA_INV): New.
32329         * scd/apdu.c (apdu_strerror): Add string.
32330
32331 2014-07-25  Andreas Schwier  <andreas.schwier@cardcontact.de>
32332
32333         scd: Support for SmartCard-HSM.
32334         + commit 8eb9224f32ddf1c9e1490c4d9688a177f8b6ae64
32335         * scd/app-sc-hsm.c: New.
32336         * scd/app.c (select_application, get_supported_applications): Register
32337         new app.
32338
32339 2014-07-25  Werner Koch  <wk@gnupg.org>
32340
32341         gpg: Switch to an EdDSA format with prefix byte.
32342         + commit 557cc11a605dd280d03c52d8b546deed8c4c714d
32343         * g10/keygen.c (gen_ecc): USe "comp" for EdDSA.
32344
32345 2014-07-23  Werner Koch  <wk@gnupg.org>
32346
32347         agent: Show just one warning with all failed passphrase constraints.
32348         + commit b3378b3a56fc90ba8ae38e6298b23a378305af32
32349         * agent/genkey.c (check_passphrase_constraints): Build a final warning
32350         after all checks.
32351
32352         agent: Only one confirmation prompt for an empty passphrase.
32353         + commit a24510d53bb23e3a680ed2c306e576268c07060d
32354         * agent/genkey.c (check_passphrase_constraints): Moev empty passphrase
32355         check to the front.
32356
32357         gpg: Add command --quick-gen-key.
32358         + commit ea186540db5b418bc6f6e5ca90337672c9981c88
32359         * g10/gpg.c (aQuickKeygen): New.
32360         * g10/misc.c (is_valid_user_id): New stub.
32361         * g10/keygen.c (quickgen_set_para): New.
32362         (quick_generate_keypair): New.
32363
32364         common: Add cpr_get_answer_is_yes_def()
32365         + commit 75127bc4561787aa9bc1cf976658e20192446d7f
32366         * g10/cpr.c (cpr_get_answer_is_yes): Factor code out to ....
32367         (cpr_get_answer_is_yes_def): ...new.
32368
32369         gpg: Make --quick-sign-key promote local key signatures.
32370         + commit 17404b2fccbc74c4f0b2364cc08e9dcc64175cf8
32371         * g10/keyedit.c (sign_uids): Promote local sigs in quick mode.
32372
32373 2014-07-22  Werner Koch  <wk@gnupg.org>
32374
32375         scd: Do not use the pcsc-wrapper.
32376         + commit bc6b452129178658da7241903ca2174c79281752
32377         * scd/apdu.c (NEED_PCSC_WRAPPER): Do not define.
32378         * scd/Makefile.am (libexec_PROGRAMS): Remove gnupg-pcsc-wrapper
32379         (gnupg_pcsc_wrapper_SOURCES): Remove.
32380         (gnupg_pcsc_wrapper_LDADD): Remove.
32381         (gnupg_pcsc_wrapper_CFLAGS): Remove.
32382
32383 2014-07-21  Werner Koch  <wk@gnupg.org>
32384
32385         gpg: Improve --list-packets output for faulty packets.
32386         + commit 5b34e347b612765f31061d077b7c343e08662ba9
32387         * g10/parse-packet.c: Add list_mode output for certain failures.
32388
32389         gpg: Cap size of attribute packets at 16MB.
32390         + commit bab9cdd971f35ff47e153c00034c95e7ffeaa09a
32391         * g10/parse-packet.c (parse_attribute): Avoid xmalloc failure and cap
32392         size of packet.
32393
32394 2014-07-03  Werner Koch  <wk@gnupg.org>
32395
32396         Release 2.1.0-beta751.
32397         + commit 5ae34f574baca2b98a09fd982c941855558408e1
32398
32399
32400         gpg: Make show-uid-validity the default.
32401         + commit 5214d8f02bf65fb0a4af15ff80cf1369ccd4c167
32402
32403
32404         tests: Fix end-of-all-ticks test for Western locales.
32405         + commit 3533860ee316918dd47501c53e910bfd0032b39d
32406         * common/t-timestuff.c (test_timegm): Use timegm if available.
32407         (main): Set TX to UTC if timegm is not available.
32408
32409 2014-07-03  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
32410
32411         gpg: Spelling error.
32412         + commit b51af333bdf77c042c9fe748616e80d1f5e4d3f9
32413
32414
32415 2014-06-30  Werner Koch  <wk@gnupg.org>
32416
32417         gpg: Auto-create revocation certificates.
32418         + commit 03018ef9eec75e4d91ea53c95547a77dedef8f80
32419         * configure.ac (GNUPG_OPENPGP_REVOC_DIR): New config define.
32420         * g10/revoke.c (create_revocation): Add arg "leadin".
32421         (gen_standard_revoke): New.
32422         * g10/openfile.c (get_openpgp_revocdir): New.
32423         (open_outfile): Add MODE value 3.
32424         * g10/keyid.c (hexfingerprint): New.
32425         * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke.
32426
32427         estream: Fix minor glitch in "%.*s" format.
32428         + commit aa5b4392aac99382d96be94782ae745e0a42484a
32429         * common/estream-printf.c (pr_string): Take care of non-nul terminated
32430         strings.
32431
32432         gpg: Rearrange code in gen_revoke.
32433         + commit 3a01b220715b3d1a90d94353e4980ab5a1ea8f26
32434         * g10/revoke.c (gen_revoke): Factor some code out to ...
32435         (create_revocation): new.
32436
32437         gpg: Create exported secret files and revocs with mode 700.
32438         + commit c434de4d83ccfaca8bde51de5c2ac8d9656e4e18
32439         * common/iobuf.c (direct_open): Add arg MODE700.
32440         (iobuf_create): Ditto.
32441         * g10/openfile.c (open_outfile): Add arg RESTRICTEDPERM.  Change call
32442         callers to pass 0 for it.
32443         * g10/revoke.c (gen_desig_revoke, gen_revoke): Here pass true for new
32444         arg.
32445         * g10/export.c (do_export): Pass true for new arg if SECRET is true.
32446
32447         common: Minor code cleanup for a legacy OS.
32448         + commit 35fdfaa0b94342c53eb82eea155a37ad4009fa9f
32449         * common/iobuf.c (direct_open) [__riscos__]: Simply cpp conditionals.
32450
32451 2014-06-27  Werner Koch  <wk@gnupg.org>
32452
32453         speedo: Fix the w32 installer name.
32454         + commit adad1872b448593275d8cae06dffe376bee067b5
32455
32456
32457         po: Update some strings of the French (fr) translation.
32458         + commit 1ef7870fc96f6dd8137e9bfabf9b06787f75dffd
32459
32460
32461         po: Update the German (de) translation.
32462         + commit c2e3eb98884785e6794dc79c1a53d75945f4c1ab
32463
32464
32465         agent: Adjust for changed npth_eselect under W32.
32466         + commit a1dff86da8ebaab6e154360f538ca9d43a6c4934
32467         * agent/gpg-agent.c (handle_connections) [W32]: Make events_set an
32468         unsigned int to match the changed prototype.
32469
32470         dirmngr: Use the homedir based socket also under W32.
32471         + commit 5e1f9b5e1427688ac340f0829e02bece7f0caf9c
32472         * common/homedir.c (dirmngr_user_socket_name): Use same code for all
32473         platforms.
32474
32475 2014-06-27  Yuri Chornoivan  <yurchor@ukr.net>
32476
32477         po: Update and enable Ukrainian (uk) translation.
32478         + commit 2c4025576105a9deb78e1cfb22c11af4af09c4fa
32479
32480
32481         Fix typos in messages.
32482         + commit e56a2d6a56d95c0f169506a8dc74a845c22b699d
32483
32484
32485 2014-06-27  Werner Koch  <wk@gnupg.org>
32486
32487         build: Remove unused options.
32488         + commit 2540a4b674a17b45ec33f43f26e830e74ff0afed
32489         * configure.ac: Remove option --build-agent-only.
32490         (FAKE_CURL, GPGKEYS_CURL): Remove check for cURL
32491         (GPGKEYS_MAILTO): Remove ac_subst but keep the currently unused
32492         SENDMAIL check.
32493         (GPGKEYS_KDNS): Remove ac_subst.
32494         * autogen.rc (final_info): Remove suggestion to use the removed option
32495         --enable-mailto.
32496
32497 2014-06-27  NIIBE Yutaka  <gniibe@fsij.org>
32498
32499         scd: Add pinpad support for REINER SCT cyberJack go.
32500         + commit 73ba75ad8b933beddd2c3f4b66937b56faa0a2d8
32501         * scd/ccid-driver.h (VENDOR_REINER, CYBERJACK_GO): New.
32502         * scd/ccid-driver.c (ccid_transceive_secure): Handle the case for
32503         VENDOR_REINER. Original work was by Alina Friedrichsen (tiny change).
32504
32505 2014-06-27  Werner Koch  <wk@gnupg.org>
32506
32507         scd: Support reader Gemalto IDBridge CT30.
32508         + commit 24be0f24d3a9325a04de10ae0e5e277bf28a74fe
32509         * scd/ccid-driver.h (GEMPC_CT30): New product id.
32510         * scd/ccid-driver.c (parse_ccid_descriptor): Add quirk for that
32511         reader.
32512
32513 2014-06-26  Werner Koch  <wk@gnupg.org>
32514
32515         gpg: Limit keysize for unattended key generation to useful values.
32516         + commit 03f0b51fe454f8dbe77c302897f7a5899c4c5380
32517         * g10/keygen.c (gen_elg): Enforce keysize 1024 to 4096.
32518         (gen_rsa): Enforce keysize 1024 to 4096.
32519         (gen_dsa): Enforce keysize 768 to 3072.
32520
32521         Enable DNS SRV records again.
32522         + commit c0d1e7fca95629e1cddd7d129fa51b9a6556cb70
32523         * configure.ac (GPGKEYS_HKP, GPGKEYS_FINGER): Remove ac_subst.
32524         (use_dns_srv): Make test work.
32525
32526         agent: Fix export of RSA keys to OpenPGP.
32527         + commit 9a034acf8ab6f85c65ccc75a4fd7b8dd47b73e3a
32528         * agent/cvt-openpgp.c (convert_transfer_key): Fix sexp build format
32529         string.
32530
32531         gpg,gpgsm: Simplify wrong_args function.
32532         + commit 572502bd2c0637429bca547ba882629640477495
32533
32534
32535         speedo: "make clean-gnupg" may not remove the source.
32536         + commit c029a184d6a1a96c6de234835fff97d4e946b19c
32537         * build-aux/speedo.mk (clean-$(1)): Take care of gnupg.
32538
32539         gpgsm: Fix default config name.
32540         + commit 2480b0253166712a2f20b92f34c8e4c2db0fc26f
32541
32542
32543 2014-06-25  Werner Koch  <wk@gnupg.org>
32544
32545         doc: Improve the rendering of the manual.
32546         + commit b5f95c1b566f9530127f3f34e10d120a951cf428
32547
32548
32549         doc: Update for modern makeinfo.
32550         + commit f149e05427a370f5985bc3fb142370b043f19924
32551         * doc/texi.css: Remove.
32552         * doc/Makefile.am (AM_MAKEINFOFLAGS): Use --css-ref.
32553
32554         gpg: Allow key-to-card upload for cert-only keys.
32555         + commit f171fd226e84311f92545ca0494771db07ba777d
32556         * g10/card-util.c (card_store_subkey): Allo CERT usage for key 0.
32557
32558 2014-06-24  Werner Koch  <wk@gnupg.org>
32559
32560         doc: Add conditionals for GnuPG-1.
32561         + commit 2c8e00137a340d04f0836f75e138dd85f8c9eff7
32562
32563
32564 2014-06-20  Werner Koch  <wk@gnupg.org>
32565
32566         gpg: Make export of ECC keys work again.
32567         + commit f4fcaa29367daacfe0ca209fa83dfa8640ace276
32568         * agent/cvt-openpgp.c (convert_to_openpgp): Use the curve name instead
32569         of the curve parameters.
32570         * g10/export.c (canon_pubkey_algo): Rename to ...
32571         (canon_pk_algo): this.  Support ECC.
32572         (transfer_format_to_openpgp): Expect curve name.
32573
32574         gpg: Avoid infinite loop in uncompressing garbled packets.
32575         + commit d6ca407a27877174c10adfae9dc601bea996cf27
32576         * g10/compress.c (do_uncompress): Limit the number of extra FF bytes.
32577
32578 2014-06-17  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
32579
32580         gpg: Fix a couple of spelling errors.
32581         + commit 3f17b74aa57ac1ea2f3aa93dec4889778a21afeb
32582
32583
32584 2014-06-17  Werner Koch  <wk@gnupg.org>
32585
32586         speedo: Support building from dist-source generated tarball.
32587         + commit 47e63dc00169030b6ff01ab67e73e52aec1395db
32588
32589
32590 2014-06-13  Werner Koch  <wk@gnupg.org>
32591
32592         http: Print human readable GNUTLS status.
32593         + commit 5bf04522e353675e4c3eda118fee2580756704a2
32594         * common/http.c (send_gnutls_bye): Take care of EAGAIN et al.
32595         (http_verify_server_credentials): Print a human readable status.
32596
32597 2014-06-12  Werner Koch  <wk@gnupg.org>
32598
32599         gpg: Improve the output of --list-packets.
32600         + commit d8314e31c58ea0827d0e2361dabcdf869ab08fce
32601         * g10/parse-packet.c (parse): Print packet meta info in list mode.
32602
32603 2014-06-11  Werner Koch  <wk@gnupg.org>
32604
32605         speedo: Improve building of the w32 installer.
32606         + commit 6eeb31abee82cb2016bf054cd302af64f6dfdc2e
32607         * build-aux/speedo.mk: Change name of build directory to PLAY.
32608         Improve the dist-source target.
32609         * build-aux/speedo/w32/gdk-pixbuf-loaders.cache: Add a blank
32610         line (plus comment).
32611         * build-aux/speedo/w32/inst.nsi: Change name of file to gnupg-w32-*.
32612         Install more tools.
32613
32614 2014-06-10  Werner Koch  <wk@gnupg.org>
32615
32616         speedo: Revamped speedo and include a w32 installer.
32617         + commit e06d5d1a3b4a5c446a27d64cd2da0e48ccec5601
32618         * build-aux/speedo/: New.
32619         * build-aux/speedo/w32/: New.
32620
32621         build: Add more options to autogen.sh.
32622         + commit 0399d87f7aaf2f2126a63899004c5c7bffd4346b
32623         * autogen.sh: Add options --print-host and --print-build.
32624
32625         w32: Fix build problem with dirmngr.
32626         + commit 141d69cb2a94a752244e89f49611923a2f184dfd
32627         * dirmngr/ks-engine-hkp.c (EAI_SYSTEM) [W32]: Add replacement
32628         constant.
32629
32630         gpg: Use more specific reason codes for INV_RECP.
32631         + commit 45ed901c466bd72118c2844069f566e190d847d6
32632         * g10/pkclist.c (find_and_check_key, build_pk_list): Use more specific
32633         reasons codes for INV_RECP.
32634
32635 2014-06-06  Werner Koch  <wk@gnupg.org>
32636
32637         Improve the beta number generation.
32638         + commit b67e4e523e6d19d384e23c5bb03010caebd150e7
32639         * autogen.sh: Add option --find-version
32640         * configure.ac: Rework the setting of the mym4_ variables.
32641
32642 2014-06-05  Werner Koch  <wk@gnupg.org>
32643
32644         Remove keyserver helper code.
32645         + commit 23712e69d3f97df9d789325f1a2f2f61e7d5bbb4
32646         * configure.ac: Remove keyserver helper related stuff.
32647         * Makefile.am (SUBDIRS): Remove keyserver.
32648         * keyserver/Makefile.am: Remove.
32649
32650         gpg: Require confirmation for --gen-key with experimental curves.
32651         + commit 9c9e26d41e7d65711da8dbf1afa452254749621c
32652         * g10/keygen.c (ask_curve): Add arg both.  Require confirmation for
32653         Curve25519.
32654
32655         gpg: Auto-migrate existing secring.gpg.
32656         + commit 4f0625889b768eabdec52696bf15059a9e8d9c02
32657         * g10/migrate.c: New.
32658         * g10/import.c (import_old_secring): New.
32659         (import_one): Add arg silent.
32660         (transfer_secret_keys): Add arg batch.
32661         (import_secret_one): Add args batch and for_migration.
32662         * g10/gpg.c (main): Call migration function.
32663
32664 2014-06-04  Werner Koch  <wk@gnupg.org>
32665
32666         gpgsm: Fix commit be07ed65.
32667         + commit 09a2d4ec74d352dcb4f006aab60b07bc4f5f1a37
32668         * sm/server.c (option_handler): Use "with-secret".
32669
32670 2014-06-03  Werner Koch  <wk@gnupg.org>
32671
32672         Add new option --with-secret.
32673         + commit be07ed65e169a7ec3fbecdb1abf988fc0245d9ff
32674         * g10/gpg.c: Add option --with-secret.
32675         * g10/options.h (struct opt): Add field with_secret.
32676         * g10/keylist.c (public_key_list): Pass opt.with_secret to list_all
32677         and list_one.
32678         (list_all, list_one): Add arg mark_secret.
32679         (list_keyblock_colon): Add arg has_secret.
32680         * sm/gpgsm.c: Add option --with-secret.
32681         * sm/server.c (option_handler): Add option "with-secret".
32682         * sm/gpgsm.h (server_control_s): Add field with_secret.
32683         * sm/keylist.c (list_cert_colon): Take care of with_secret.  Also move
32684         the token string from the wrong field 14 to 15.
32685
32686         gpgsm: New commands --export-secret-key-{p8,raw}
32687         + commit 0beec2f0f255a71f9d5a4a0729d0259f673e8838
32688         * sm/gpgsm.c: Add new commands.
32689         * sm/minip12.c (build_key_sequence): Add arg mode.
32690         (p12_raw_build): New.
32691         * sm/export.c (export_p12): Add arg rawmode.  Call p12_raw_build.
32692         (gpgsm_p12_export): Ditto.
32693         (print_short_info): Print the keygrip.
32694
32695 2014-06-02  Werner Koch  <wk@gnupg.org>
32696
32697         gpg: Avoid NULL-deref in default key listing.
32698         + commit 958e5f292fa3f8e127f54bc088c56780c564dcae
32699         * g10/keyid.c (hash_public_key): Take care of NULL keys.
32700         * g10/misc.c (pubkey_nbits): Ditto.
32701
32702         gpg: Simplify default key listing.
32703         + commit f3249b1c4d0f2e9e0e8956042677e47fc9c6f6c0
32704         * g10/mainproc.c (list_node): Rework.
32705
32706         gpg: Graceful skip reading of corrupt MPIs.
32707         + commit d9cde7ba7d4556b216f062d0cf92d60cbb204b00
32708         * g10/parse-packet.c (mpi_read): Change error message on overflow.
32709
32710         gpgsm: Handle re-issued CA certificates in a better way.
32711         + commit 715285bcbc12c024dbd9b633805189c09173e317
32712         * sm/certchain.c (find_up_search_by_keyid): Consider all matching
32713         certificates.
32714         (find_up): Add some debug messages.
32715
32716         gpgsm: Add a way to save a found state.
32717         + commit 42c043a8ad542c131917879c9b458f234b4bb645
32718         * kbx/keybox-defs.h (keybox_found_s): New.
32719         (keybox_handle): Factor FOUND out to above.  Add saved_found.
32720         * kbx/keybox-init.c (keybox_release): Release saved_found.
32721         (keybox_push_found_state, keybox_pop_found_state): New.
32722
32723         * sm/keydb.c (keydb_handle): Add field saved_found.
32724         (keydb_new): Init it.
32725         (keydb_push_found_state, keydb_pop_found_state): New.
32726
32727         gpg: Fix bug parsing a zero length user id.
32728         + commit 99972bd6e9abea71f270284f49997de5f00208af
32729         * g10/getkey.c (get_user_id): Do not call xmalloc with 0.
32730
32731         * common/xmalloc.c (xmalloc, xcalloc): Take extra precaution not to
32732         pass 0 to the arguments.
32733
32734 2014-05-19  Werner Koch  <wk@gnupg.org>
32735
32736         dirmngr: Print certificates on failed TLS verification.
32737         + commit 9e1c99f8009f056c39a7465b91912c136b248e8f
32738         * dirmngr/ks-engine-hkp.c (cert_log_cb): New.
32739         (send_request): Set callback.
32740
32741         http: Add callback to help logging of server certificates.
32742         + commit 45f15b2d767d4068f79fd5b123e9eeae08a0616d
32743         * common/http.c (http_session_s): Add field cert_log_cb.
32744         (http_session_set_log_cb): New.
32745         (http_verify_server_credentials): Call callback.
32746
32747 2014-05-16  Werner Koch  <wk@gnupg.org>
32748
32749         keyserver: Improve support for hkps pools.
32750         + commit d2d9d4fb60e3f2160af6252335364d3aac4b7d17
32751         * dirmngr/ks-engine-hkp.c (hostinfo_s): Add fields cname, v4addr, and
32752         v6addr.
32753         (create_new_hostinfo): Clear them.
32754         (my_getnameinfo): Add args numeric and r_isnumeric.
32755         (is_ip_address): New.
32756         (map_host): Add arg r_host.  Rewrite the code to handle pools in a
32757         special way.
32758         (ks_hkp_print_hosttable): Change format of help info output.
32759         (make_host_part): Add arg optional r_httphost.
32760         (send_request): Add arg httphost.
32761         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Get httphost and pass it to
32762         send_request.
32763
32764         http: Allow overriding of the Host header.
32765         + commit 8b90d79818355b81ce223e1cb96cd0c939096fe2
32766         * common/http.c (http_open): Add arg httphost.
32767         (http_open_document): Pass NULL for httphost.
32768         (send_request): Add arg httphost.  If given, use HTTPHOST instead of
32769         SERVER.  Use https with a proxy if requested.
32770         (http_verify_server_credentials): Do not stop at the first error
32771         message.
32772         * dirmngr/ocsp.c (do_ocsp_request): Adjust call to http_open.
32773         * keyserver/curl-shim.c (curl_easy_perform): Ditto.
32774         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
32775         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Ditto.
32776
32777 2014-05-14  Werner Koch  <wk@gnupg.org>
32778
32779         gpg: Fix uninitialized access to search descindex with gpg keyboxes.
32780         + commit 25036ec6abbc0c9d0003dcfe227724038c35a304
32781         * kbx/keybox-search.c (keybox_search): Add arg  R_DESCINDEX.  Chnage
32782         both callers.
32783         * g10/keydb.c (keydb_search): Always set DESCINDEX.
32784
32785         w32: Make make_absfilename work with drive letters.
32786         + commit 71fa6a35107d4d4547eb9155d7c2612b6a6a16fb
32787         * common/stringhelp.c (do_make_filename) [HAVE_DRIVE_LETTERS]: Fix.
32788
32789         gpg: Remove useless diagnostic in MDC verification.
32790         + commit 455a4a2212302c05095e736b127f647e95714fe7
32791         * g10/decrypt-data.c (decrypt_data): Do not distinguish between a bad
32792         MDC packer header and a bad MDC.
32793
32794         gpg: Fix glitch entering a full expiration time.
32795         + commit b2945c451d3d3f25ba11a9fe88c6cbf3f88c2fb5
32796         * g10/keygen.c (ask_expire_interval): Get the current time after the
32797         prompt.
32798
32799 2014-05-08  Werner Koch  <wk@gnupg.org>
32800
32801         agent: Fix import of non-protected gpg keys.
32802         + commit 4aeb02562c9db4b96366220b781e2b4fa2d6fd3b
32803         * agent/cvt-openpgp.c (do_unprotect): Return an s-exp also for
32804         non-protected keys.
32805         (convert_from_openpgp_main): Do not call agent_askpin for a
32806         non-protected key.
32807
32808         Make more use of *_NAME macros.
32809         + commit cb2aeb4e1157fc0d7dc25d94115973422dc1a800
32810         * configure.ac (GPG_DISP_NAME, GPGSM_DISP_NAME): New.
32811         (GPG_AGENT_DISP_NAME, SCDAEMON_DISP_NAME): New.
32812         (DIRMNGR_DISP_NAME, G13_DISP_NAME): New.
32813         (GPGCONF_DISP_NAME): New.
32814         (SCDAEMON_SOCK_NAME): New.
32815         * common/argparse.c (show_help): Map description string.
32816
32817 2014-05-08  NIIBE Yutaka  <gniibe@fsij.org>
32818
32819         agent: Fix auth key comment handling.
32820         + commit fb24808db9af9dfe36f9f6d7fc24e0b903ecc12c
32821         * agent/command-ssh.c (ssh_send_key_public): Handle the case with no
32822         comment.
32823
32824 2014-05-07  Werner Koch  <wk@gnupg.org>
32825
32826         Make -jN work again.
32827         + commit 57011da53e43f9c8a6c7e7314166c3e17ff8627a
32828         * common/Makefile.am ($(PROGRAMS)): New rule
32829         (t_http_LDADD): Use libcommontls.a without directory prefix.
32830         * dirmngr/Makefile.am ($(PROGRAMS)): New rule.
32831
32832         gpg: Print the key algorithm/curve with signature info.
32833         + commit 359c643d747c890f73f68b42e0aeb896016f05fd
32834         * g10/mainproc.c (check_sig_and_print): Print the name and curve.
32835
32836         gpg: Fix memleak in signature verification of bogus keys.
32837         + commit e73edfb1759d05121ea66f67c775e763bf47d737
32838         * g10/mainproc.c (check_sig_and_print): Factor common code out to ...
32839         (print_good_bad_signature): here.
32840
32841         gpg: Mark experimental algorithms in the key listing.
32842         + commit 09055aa0f7993aaf4dcffdd80d8192945ae6080a
32843         * g10/keylist.c (list_keyblock_print): Remove duplicate curve name.
32844         Print a note for experimental algorithms.
32845         * g10/misc.c (print_pubkey_algo_note): Fix warning message.
32846
32847         gpg: Finish experimental support for Ed25519.
32848         + commit 8fee6c1ce6d116fe7909dbe1184d95bc91305484
32849         * agent/cvt-openpgp.c (try_do_unprotect_arg_s): Add field "curve".
32850         (get_keygrip): Add and use arg CURVE.
32851         (convert_secret_key): Ditto.
32852         (convert_transfer_key): Ditto.
32853         (get_npkey_nskey): New.
32854         (prepare_unprotect): Replace gcrypt functions by
32855         get_npkey_nskey.  Allow opaque MPIs.
32856         (do_unprotect): Use CURVE instead of parameters.
32857         (convert_from_openpgp_main): Ditto.
32858         (convert_to_openpgp):  Simplify.
32859         * g10/import.c (one_mpi_from_pkey): Remove.
32860         (transfer_secret_keys): Rewrite to use the curve instead of the
32861         parameters.
32862         * g10/parse-packet.c (parse_key): Mark protected MPIs with USER1 flag.
32863
32864         * common/openpgp-oid.c (openpgp_curve_to_oid): Allow the use of
32865          "NIST P-256" et al.
32866         * g10/keygen.c (ask_curve): Add arg ALGO.
32867         (generate_keypair): Rewrite the ECC key logic.
32868
32869         * tests/openpgp/ecc.test: Provide the "ecc" passphrase.
32870
32871         kbx: Add experimental support for EDDSA.
32872         + commit bdb9c2b314400da9155b8a924e22e486793dda89
32873         * kbx/keybox-openpgp.c (parse_key): Use algo constants and add
32874         experimental support for EdDSA.
32875
32876         agent: Remove greeting message.
32877         + commit a63ed9875830e5b3b4d48b7d97d24c18de36b326
32878         * agent/gpg-agent.c (main): Remove greeting.  Make --no-greeting a
32879         dummy.
32880
32881 2014-05-06  Werner Koch  <wk@gnupg.org>
32882
32883         Use "samethread" mode keyword for some es_fopenmem.
32884         + commit 6477e51919ef97f0f9cc05d10cdc7aa2b89faafe
32885         * dirmngr/ks-engine-hkp.c (armor_data): Add mode keyword.
32886         * g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
32887         * scd/atr.c (atr_dump): Ditto.
32888
32889 2014-05-05  Werner Koch  <wk@gnupg.org>
32890
32891         dirmngr: Add support for hkps keyservers.
32892         + commit 60e2fc7d38d8b37d1de944cf230e410c2ce37d5e
32893         * dirmngr/dirmngr.c: Include gnutls.h.
32894         (opts): Add --gnutls-debug and --hkp-cacert.
32895         (opt_gnutls_debug, my_gnutls_log): New.
32896         (set_debug): Set gnutls log level.
32897         (parse_rereadable_options): Register a CA file.
32898         (main): Init GNUTLS.
32899         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Support hkps.
32900         (send_request): Ditto.
32901
32902         http: Add reference counting to the session object.
32903         + commit ea0f5481f01eacedff264bf08144164aa989ec4d
32904         * common/http.c (http_session_t): Add field "refcount".
32905         (_my_socket_new, _my_socket_ref, _my_socket_unref): Add debug code.
32906         (send_request, my_npth_read, my_npth_write): Use SOCK object for the
32907         transport ptr.
32908         (http_session_release): Factor all code out to ...
32909         (session_unref): here.  Deref SOCK.
32910         (http_session_new): Init refcount and transport ptr.
32911         (http_session_ref): New.  Ref and unref all assignments.
32912
32913 2014-05-02  Werner Koch  <wk@gnupg.org>
32914
32915         http: Add HTTP_FLAG_FORCE_TLS and http_get_tls_info.
32916         + commit 0e59195642eb26263b8e0b9200290538631d35cd
32917         * common/http.c (http_parse_uri): Factor code out to ...
32918         (parse_uri): here.  Add arg FORCE_TLS.
32919         (do_parse_uri): Ditto.  Implement flag.
32920         (http_get_tls_info): New.
32921         (http_register_tls_ca): Allow clearing of the list.
32922         (send_request): Use a default verification function.
32923         * common/http.h (HTTP_FLAG_FORCE_TLS): New.
32924         * common/t-http.c (main): Add several command line options.
32925
32926         common: Fix test for openpgp_oid_is_ed25519.
32927         + commit 2def230231abd34f6012df284ab468321ffedc10
32928         * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): Add correct
32929         value.
32930
32931         http: Revamp TLS API.
32932         + commit 8412a5825c225c8ff14de3ffaad2e55e040b2eca
32933         * configure.ac (NEED_GNUTLS_VERSION): New.
32934         (HTTP_USE_GNUTLS, LIBGNUTLS_CFLAGS, LIBGNUTLS_LIBS): New ac_subst.
32935
32936         * common/http.h (http_session_t): New.
32937         * common/http.c: Remove compatibility for gnutls < 3.0.
32938         (http_session_s): New.
32939         (cookie_s): Replace gnutls_session_t by http_session_t.
32940         (tls_callback, tls_ca_certlist): New variables.
32941         (my_socket_unref): Add preclose args.
32942         (my_npth_read, my_npth_write): New.
32943         (make_header_line): Fix bug using int* instead of char*.
32944         (http_register_tls_callback): New.
32945         (http_register_tls_ca): New.
32946         (http_session_new): New.
32947         (http_session_release): New.
32948         (http_get_header_names): New.
32949         (escape_data): Add hack to escape in forms mode.
32950         (send_request) [HTTP_USE_GNUTLS]: Support SNI.
32951         (send_request) [HTTP_USE_GNUTLS]: Fix use of make_header_line.
32952         (send_gnutls_bye): New.
32953         (cookie_close): Make use of preclose feature.
32954         (http_verify_server_credentials): New.
32955         (main) [TEST]: Remove test code.
32956         * common/t-http.c: New.
32957         * common/tls-ca.pem: New.
32958         * common/Makefile.am (tls_sources): New. Move http code to here.
32959         (libcommontls_a_SOURCES): New.
32960         (libcommontlsnpth_a_SOURCES): New.
32961         (EXTRA_DIST): Add tls-ca.pem
32962         (module_maint_tests): Add t-http.
32963         (t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
32964
32965         * dirmngr/Makefile.am (dirmngr_LDADD): Add libcommontlsnpth.
32966
32967         common: Cleanup the use of USE_NPTH and HAVE_NPTH macros.
32968         + commit 84289e85c72ae58c321dfdb96816700a6b7f7122
32969         * configure.ac (HAVE_NPTH): New ac_define.
32970         * common/estream.c: Use USE_NPTH instead of HAVE_NPTH.
32971         * common/http.c: Ditto.  Replace remaining calls to pth by npth calls.
32972         (connect_server): Remove useless _().
32973         * common/exechelp-posix.c, common/exechelp-w32.c
32974         * common/exechelp-w32ce.c: Use HAVE_PTH to include npth.h.
32975         * common/init.c (_init_common_subsystems): Remove call to pth_init.
32976         * common/sysutils.c (gnupg_sleep): Use npth_sleep.
32977         * scd/ccid-driver.c (my_sleep): Ditto.
32978
32979 2014-04-30  Werner Koch  <wk@gnupg.org>
32980
32981         estream: Implement "samethread" mode keyword.
32982         + commit 8416c875a729426eae05ed1ca9f1ebcb933c246a
32983         * src/estream.c (estream_internal): Add field SAMETHREAD.
32984         (init_stream_lock, lock_stream, trylock_stream, unlock_stream): Use it.
32985         (parse_mode): Add arg SAMETHREAD and parse that keyword.
32986         (es_initialize): Rename to ...
32987         (init_stream_obj): this.  Add arg SAMETHREAD.
32988         (es_create): Add arg SAMETHREAD.  Call init_stream_lock after
32989         init_stream_obj.
32990         (doreadline): Call es_create with samethread flag.
32991         (es_fopen, es_mopen, es_fopenmem, es_fopencookie, do_fdopen)
32992         (do_fpopen, do_w32open): Implement "samethread" keyword.
32993         (es_freopen): Take samthread flag from old stream.
32994         (es_tmpfile): Call es)_create w/o samethread.
32995
32996         estream: Fix deadlock in es_fileno.
32997         + commit ecea94461ed40f3f6ef662c2501e1d56ec284022
32998         * src/estream.c (es_fileno_unlocked): Call the unlocked functions.
32999
33000         estream: Add debug code to the lock functions.
33001         + commit aeb81727c77dfea3bf5d2d689ffbdc897f2938a7
33002         * common/estream.c (dbg_lock_0, dbg_lock_1, dbg_lock_1): New.
33003
33004         estream: Replace locking macros by functions.
33005         + commit 39e91a5f0a666aad2fef7a840b2cd03949bb1be4
33006         * common/estream.c: Replace most macros.
33007
33008 2014-04-28  NIIBE Yutaka  <gniibe@fsij.org>
33009
33010         ECC Fixes.
33011         + commit 21dab64030c95a909767bf6d8f99e8476f9df8a2
33012         * agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
33013         (convert_transfer_key): Follow newer (>= 1.6) libgcrypt API, which
33014         does not distinguish the detail.
33015         (do_unprotect, convert_from_openpgp_main): Don't call
33016         map_pk_openpgp_to_gcry, as it's the value of libgcrypt API already and
33017         not the value defined by OpenPGP.
33018         (convert_to_openpgp): It's "ecc".
33019         * agent/gpg-agent.c (map_pk_openpgp_to_gcry): Remove.
33020         * g10/call-agent.c (agent_pkdecrypt): Fix off-by-one error.
33021         * g10/pubkey-enc.c (get_it): Fix swapping the fields error.
33022
33023 2014-04-22  Werner Koch  <wk@gnupg.org>
33024
33025         gpg: Pass --homedir to gpg-agent.
33026         + commit fdd938a5bbecb5b70f564ae3afb4e17905404bb2
33027         * agent/gpg-agent.c (main): Make sure homedir is absolute.
33028         * common/asshelp.c (lock_spawning): Create lock file with an absolute
33029         name.
33030         (start_new_gpg_agent): Use an absolute name for the socket and pass
33031         option --homedir to the agent.
33032         (start_new_dirmngr): Use an absolute name for the --homedir.
33033
33034         common: Add functions make_absfilename and make_absfilename_try.
33035         + commit 71a54313adf7b57b7b27bb9ad07b142a34306260
33036         * common/stringhelp.c (do_make_filename): Add modes 2 and 3.
33037         (make_absfilename): New.
33038         (make_absfilename_try): New.
33039
33040         common: Add function gnupg_getcwd.
33041         + commit 1a87edab6657a257876ab2f8790f2937feba7066
33042         * tools/gpg-connect-agent.c (gnu_getcwd): Move to ...
33043         * common/sysutils.c (gnupg_getcwd): .. here.
33044         * tools/gpg-connect-agent.c (get_var_ext): Use gnupg_getcwd.
33045
33046         gpg: Print a warning if GKR has hijacked gpg-agent.
33047         + commit ffa39be5ebfc1059a737905ee317c9b6f3d2a77e
33048         * g10/call-agent.c (check_hijacking): New.
33049         (start_agent): Call it.
33050         (membuf_data_cb, default_inq_cb): Move more to the top.
33051
33052 2014-04-17  Werner Koch  <wk@gnupg.org>
33053
33054         gpg: New %U expando for the photo viewer.
33055         + commit e184a11f94e2d41cd9266484542631bec23628b5
33056         * g10/photoid.c (show_photos): Set namehash.
33057         * g10/misc.c (pct_expando): Add "%U" expando.
33058
33059         common: Add z-base-32 encoder.
33060         + commit b8a91ebf46a927801866e99bb5a66ab00651424e
33061         * common/zb32.c: New.
33062         * common/t-zb32.c: New.
33063         * common/Makefile.am (common_sources): Add zb82.c
33064         (module_tests): Add t-zb32.
33065
33066 2014-04-16  Werner Koch  <wk@gnupg.org>
33067
33068         Two minor code cleanups and one NULL deref on error fix.
33069         + commit a34afa8f2053d75f276d6d28dbf1a43db0fd9768
33070         * common/estream.c (es_freopen): Remove useless check for STREAM.
33071         * kbx/keybox-blob.c (_keybox_create_x509_blob): Remove useless check
33072         for BLOB.
33073         * tools/sockprox.c (run_proxy): Do not fclose(NULL).
33074
33075 2014-04-15  Werner Koch  <wk@gnupg.org>
33076
33077         gpg: Re-enable secret key deletion.
33078         + commit db3b528239c9d56bc71fd2283e07a3f1d91e4fd0
33079         * g10/call-agent.c (agent_delete_key): New.
33080         * g10/keydb.h (FORMAT_KEYDESC_DELKEY): New.
33081         * g10/passphrase.c (gpg_format_keydesc): Support new format.
33082         * g10/delkey.c (do_delete_key): Add secret key deletion.
33083
33084         gpg: Re-indent a file.
33085         + commit d25d00b89efed461d344028d0e2e2be38cc77628
33086         * g10/delkey.c: Re-indent.
33087         (do_delete_key, delete_keys): Change return type top gpg_error_t.
33088
33089         gpg: Fix regression in secret key export.
33090         + commit c4d983239a3f0a18c77f0a5aeba520a81a1b86e8
33091         * agent/cvt-openpgp.c (convert_to_openpgp): Fix use
33092         gcry_sexp_extract_param.
33093         * g10/export.c (do_export_stream): Provide a proper prompt to the
33094         agent.
33095
33096         gpg: Change pinentry prompt to talk about "secret key".
33097         + commit e549799db66be30cdd68a3e6cdca9c6a050466d1
33098         * g10/passphrase.c (gpg_format_keydesc): Add mode 2.  Change strings.
33099         * g10/keydb.h (FORMAT_KEYDESC_NORMAL, FORMAT_KEYDESC_IMPORT)
33100         (FORMAT_KEYDESC_EXPORT): New.  Use them for clarity.
33101
33102         agent: Add command DELETE_KEY.
33103         + commit e3a4ff89a0b106e678bf9d0a4d47917123071140
33104         * agent/command.c (cmd_delete_key): New.
33105         * agent/findkey.c (modify_description): Add '%C' feature.
33106         (remove_key_file): New.
33107         (agent_delete_key): New.
33108         * agent/command-ssh.c (search_control_file): Make arg R_DISABLE
33109         optional.
33110
33111         * configure.ac: Require libgpg-error 1.13.
33112
33113 2014-04-09  NIIBE Yutaka  <gniibe@fsij.org>
33114
33115         scd: EdDSA support.
33116         + commit 3132bd90dc8db9c7fd19ba201918e95891306dc5
33117         * scd/app-openpgp.c (KEY_TYPE_EDDSA, CURVE_ED25519): New.
33118         (struct app_local_s): Add eddsa.
33119         (get_algo_byte, store_fpr): Support KEY_TYPE_EDDSA.
33120         (get_ecc_key_parameters, get_curve_name): Support CURVE_ED25519.
33121         (send_key_attr, get_public_key): Support KEY_TYPE_EDDSA.
33122         (build_ecc_privkey_template): Rename as it supports both of
33123         ECDSA and EdDSA.
33124         (ecc_writekey): Rename.  Support CURVE_ED25519, too.
33125         (do_writekey): Follow the change of ecc_writekey.
33126         (do_auth): Support KEY_TYPE_EDDSA.
33127         (parse_ecc_curve): Support CURVE_ED25519.  Bug fix for other curves.
33128         (parse_algorithm_attribute): Bug fix for ECDH.  Support EdDSA.
33129
33130 2014-04-08  Werner Koch  <wk@gnupg.org>
33131
33132         dirmngr: Fix compiler warning.
33133         + commit db85feceaf43ebd6d44421bb14fcb60495804ae0
33134         * common/mischelp.h (JNLIB_GCC_HAVE_PUSH_PRAGMA): New.
33135         * dirmngr/dirmngr.c (handle_tick): Factor time check out to ...
33136         (time_for_housekeeping_p): new.
33137
33138         gpgconf: Add command --launch.
33139         + commit b4cf4686f7349be9558217f20e51157398cd88a0
33140         * tools/gpgconf.c: Add command --launch.
33141         * tools/gpgconf-comp.c (gc_component_launch): New.
33142
33143         scd: Silent compiler warnings about unused variables.
33144         + commit 36dfc37e438660632d3a2bf5d5526be9005fa8c5
33145         * scd/app-openpgp.c (build_ecdsa_privkey_template): Mark unused arg.
33146         (ecdh_writekey): Mark unused args.
33147
33148 2014-04-08  NIIBE Yutaka  <gniibe@fsij.org>
33149
33150         agent: Support EdDSA.
33151         + commit 5ff6d0c25e6d0f422b17809b954e9e87cb137347
33152         * agent/pksign.c (agent_pksign_do): Handle EdDSA signature.
33153
33154         g10: EdDSA support.
33155         + commit 40c3b0741e593d0658dda0c707c4f32e80648dd1
33156         * g10/keyid.c (keygrip_from_pk): Compute keygrip of EdDSA key.
33157         * g10/keygen.c (generate_subkeypair): Ed25519 is for EdDSA.
33158         * common/openpgp-oid.c (oid_ed25519): Update.
33159
33160 2014-04-04  NIIBE Yutaka  <gniibe@fsij.org>
33161
33162         agent: EdDSA support for SSH.
33163         + commit 513c67b7461a2451247ef2b2fc64e0470a16edf1
33164         * agent/command-ssh.c (ssh_signature_encoder_eddsa): Signature is
33165         two 32-byte opaque data which should not be interpreted as number.
33166
33167 2014-03-27  Werner Koch  <wk@gnupg.org>
33168
33169         gpg: Add commands --quick-sign-key and --quick-lsign-key.
33170         + commit b6786cc3ec0bb582323adf94c2ee624bcfbeb466
33171         * g10/gpg.c (main): Add commands --quick-sign-key and
33172         --quick-lsign-key.
33173         * g10/keyedit.c (sign_uids): Add args FP and QUICK.
33174         (keyedit_quick_sign): New.
33175         (show_key_with_all_names): Add arg NOWARN.
33176
33177         Change some keyedit functions to allow printing to arbitrary streams.
33178         + commit 4f50ec98ddd57253cae66e2321f0cc98ee189a09
33179         * common/ttyio.c (tty_print_string): Add optional arg FP. Change all
33180         callers.
33181         (tty_print_utf8_string2): Ditto.
33182         * g10/keyedit.c (show_prefs):  Ditto.
33183         (show_key_with_all_names_colon): Ditto.
33184         (show_names): Ditto.
33185         * g10/keylist.c (print_revokers): Ditto.
33186         (print_fingerprint): Ditto.
33187
33188 2014-03-23  Werner Koch  <wk@gnupg.org>
33189
33190         agent: Replace es_mopen by es_fopenmem for ssh.
33191         + commit 5c2a50cdc90e85b1fc380851ccfbe9186969b658
33192         * agent/command-ssh.c (ssh_read_key_public_from_blob): Use
33193         es_fopenmem.
33194         (ssh_handler_request_identities): Ditto.
33195         (ssh_request_process): Ditto.
33196
33197 2014-03-22  Werner Koch  <wk@gnupg.org>
33198
33199         agent: Put ssh key type as comment into sshcontrol.
33200         + commit fc3e70c11342267c1062e4244955d19ecd72e0f6
33201         * agent/command-ssh.c (ssh_key_type_spec): Add field name.
33202         (ssh_key_types): Add human readable names.
33203         (add_control_entry): Add arg SPEC and print key type as comment.
33204         (ssh_identity_register): Add arg SPEC.
33205         (ssh_handler_add_identity): Add var SPEC and pass ssh_receive_key.
33206
33207         agent: Support the Ed25519 signature algorithm for ssh.
33208         + commit 072432883ededa15bf35f80102e0572746ba4af1
33209         * agent/command-ssh.c (SPEC_FLAG_IS_EdDSA): New.
33210         (ssh_key_types): Add entry for ssh-ed25519.
33211         (ssh_identifier_from_curve_name): Move to the top.
33212         (stream_read_skip): New.
33213         (stream_read_blob): New.
33214         (ssh_signature_encoder_rsa): Replace MPIS array by an s-exp and move
33215         the s-exp parsing to here.
33216         (ssh_signature_encoder_dsa): Ditto.
33217         (ssh_signature_encoder_ecdsa): Ditto.
33218         (ssh_signature_encoder_eddsa): New.
33219         (sexp_key_construct): Rewrite.
33220         (ssh_key_extract): Rename to ...
33221         (ssh_key_to_blob): .. this and rewrite most of it.
33222         (ssh_receive_key): Add case for EdDSA.
33223         (ssh_convert_key_to_blob, key_secret_to_public): Remove.
33224         (ssh_send_key_public): Rewrite.
33225         (ssh_handler_request_identities): Simplify.
33226         (data_sign): Add rename args.  Add new args HASH and HASHLEN.  Make
33227         use of es_fopenmen and es_fclose_snatch.  Remove parsing into MPIs
33228         which is now doe in the sgnature encoder functions.
33229         (ssh_handler_sign_request): Take care of Ed25519.
33230         (ssh_key_extract_comment): Rewrite using gcry_sexp_nth_string.
33231
33232         agent: Cleanups to prepare implementation of Ed25519.
33233         + commit a77ed0f266d03e234027dda4de5a7f3dd6787b1e
33234         * agent/cvt-openpgp.c: Remove.
33235         (convert_to_openpgp): Use gcry_sexp_extract_param.
33236         * agent/findkey.c (is_eddsa): New.
33237         (agent_is_dsa_key, agent_is_eddsa_key): Check whether ecc means EdDSA.
33238         * agent/pksign.c (agent_pksign_do): Add args OVERRIDEDATA and
33239         OVERRIDEDATALEN.
33240
33241         * common/ssh-utils.c (is_eddsa): New.
33242         (get_fingerprint): Take care or EdDSA.
33243
33244 2014-03-18  Werner Koch  <wk@gnupg.org>
33245
33246         tools: Fix NULL deref in gpg-connect-agent.
33247         + commit 6376227a31b3076321ce16ad626b333057bda53d
33248         * tools/gpg-connect-agent.c (handle_inquire): Do not pass NULL to
33249         strlen.
33250
33251         dirmngr: Resurrect hosts in the HKP hosttable.
33252         + commit 6c058fac65c7e9d1ffb72686f0f02644f172da22
33253         * dirmngr/dirmngr.c (HOUSEKEEPING_INTERVAL): New.
33254         (housekeeping_thread): New.
33255         (handle_tick): Call new function.
33256         * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): New.
33257         (struct hostinfo_s): Add field died_at and set it along with the dead
33258         flag.
33259         (ks_hkp_print_hosttable): Print that info.
33260         (ks_hkp_housekeeping): New.
33261
33262         common: New function elapsed_time_string.
33263         + commit 04e304278c9302831bc81e7fe9049c588ead029a
33264         * common/gettime.c (elapsed_time_string): New.
33265
33266 2014-03-17  Werner Koch  <wk@gnupg.org>
33267
33268         gpg: Reject signatures made with MD5.
33269         + commit f90cfe6b66269de0154d810c5cee1fe9a5af475c
33270         * g10/gpg.c: Add option --allow-weak-digest-algos.
33271         (main): Set option also in PGP2 mode.
33272         * g10/options.h (struct opt): Add flags.allow_weak_digest_algos.
33273         * g10/sig-check.c (do_check): Reject MD5 signatures.
33274         * tests/openpgp/defs.inc: Add allow_weak_digest_algos to gpg.conf.
33275
33276         gpg: Make --auto-key-locate work again with keyservers.
33277         + commit 1e2e39c5758ffaf62f8bb85b4a86dc49c41f3a68
33278         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Allow exact search mode.
33279         * g10/keyserver.c (keyserver_import_name): Implement.
33280         (keyserver_get): Use exact mode for name based import.
33281         (keyserver_get): Add args R_FPR and R_FPRLEN.  Change all callers.
33282
33283         gpg: New mechanism "clear" for --auto-key-locate.
33284         + commit 1d642d3ca890daa65ee5dd949a00747da6b49015
33285         * g10/getkey.c (parse_auto_key_locate): Implement "clear".
33286
33287 2014-03-14  Werner Koch  <wk@gnupg.org>
33288
33289         gpg-connect-agent: Make it easier to connect to the dirmngr.
33290         + commit 2223eaefaf53aa7217ac593b83e4294148a4db5d
33291         * tools/gpg-connect-agent.c: Add options --dirmngr and
33292         --dirmngr-program.
33293
33294         dirmngr: Make use of IPv4 and IPV6 more explicit.
33295         + commit 59b4fb5f4927908af06bb80ecd86adbf6e54ba14
33296         * common/http.c (connect_server): Handle the new flags.
33297         * common/http.h (HTTP_FLAG_IGNORE_IPv4, HTTP_FLAG_IGNORE_IPv4): New.
33298         * dirmngr/ks-engine-hkp.c (map_host): Add arg r_httpflags.
33299         (make_host_part): Ditto.
33300         (send_request): Add arg httpflags.
33301         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Handle httpflags.
33302
33303         dirmngr: Do not use brackets around legacy IP addresses.
33304         + commit d7fbefeb82833db9eea8b15dc7889ecf0b7ffab4
33305         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Change args to take a
33306         complete addrinfo.  Bracket only v6 addresses.  Change caller.
33307
33308         gpg: Print the actual used keyserver address.
33309         + commit a401f768ca8e218eef7a5c87a8f99cb1d6b4aaeb
33310         * dirmngr/ks-engine-hkp.c (ks_hkp_search, ks_hkp_get): Print SOURCE
33311         status lines.
33312         * g10/call-dirmngr.c (ks_status_parm_s): New.
33313         (ks_search_parm_s): Add field stparm.
33314         (ks_status_cb): New.
33315         (ks_search_data_cb): Send source to the data callback.
33316         (gpg_dirmngr_ks_search): Change callback prototope to include the
33317         SPECIAL arg.  Adjust all users.  Use ks_status_cb.
33318         (gpg_dirmngr_ks_get): Add arg r_source and use ks_status_cb.
33319         * g10/keyserver.c (search_line_handler): Adjust callback and print
33320         "data source" disgnostic.
33321         (keyserver_get): Print data source diagnostic.
33322
33323         dirmngr: Default to a user socket name and enable autostart.
33324         + commit 5d321eb00be0774418de1a05678ac0ec44d7193b
33325         * common/homedir.c (dirmngr_socket_name): Rename to
33326         dirmngr_sys_socket_name.
33327         (dirmngr_user_socket_name): New.
33328         * common/asshelp.c (start_new_dirmngr): Handle sys and user dirmngr
33329         socket.
33330         * dirmngr/dirmngr.c (main): Ditto.
33331         * dirmngr/server.c (cmd_getinfo): Ditto.
33332         * sm/server.c (gpgsm_server): Ditto.
33333         * dirmngr/dirmngr-client.c (start_dirmngr): Likewise.
33334         * tools/gpgconf.c (main): Print "dirmngr-sys-socket" with --list-dirs.
33335
33336         * configure.ac (USE_DIRMNGR_AUTO_START): Set by default.
33337
33338 2014-03-12  Werner Koch  <wk@gnupg.org>
33339
33340         gpg: Add option --dirmngr-program.
33341         + commit 6dd5d99a61f24aff862ccba9f7410d7f1af87c05
33342         * g10/gpg.c: Add option --dirmngr-program.
33343         * g10/options.h (struct opt): Add field dirmngr_program.
33344         * g10/call-dirmngr.c (create_context): Use new var.
33345
33346         * dirmngr/dirmngr.c: Include gc-opt-flags.h.
33347         (main): Remove GC_OPT_FLAG_*.
33348         * tools/gpgconf-comp.c (GC_OPT_FLAG_NO_CHANGE): Move macro to ...
33349         * common/gc-opt-flags.h: here.
33350
33351         dirmngr: Detect dead keyservers and try another one.
33352         + commit fb56a273b1f2b3a99dc1d1a0850378ab7625e6b9
33353         * dirmngr/ks-action.c (ks_action_resolve): Rename var for clarity.
33354         (ks_action_search, ks_action_put): Ditto.
33355         (ks_action_get): Consult only the first server which retruned some
33356         data.
33357
33358         * dirmngr/ks-engine-hkp.c (SEND_REQUEST_RETRIES): New.
33359         (map_host): Add arg CTRL and call dirmngr_tick.
33360         (make_host_part): Add arg CTRL.
33361         (mark_host_dead): Allow the use of an URL.
33362         (handle_send_request_error): New.
33363         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Mark host dead and retry on
33364         error.
33365
33366         http: Add a flag to the URL parser indicating a literal v6 address.
33367         + commit 3d9e0eb02ce2b2e153e25deb0fc4b27b45f5026a
33368         * common/http.h (struct parsed_uri_t): Add field v6lit.
33369         * common/http.c (do_parse_uri): Set v6lit.
33370
33371 2014-03-12  NIIBE Yutaka  <gniibe@fsij.org>
33372
33373         scd: writekey support of ECC.
33374         + commit 781b94174310dceffa075719420b74b29fe41764
33375         * scd/app-openpgp.c (CURVE_SEC_P256K1, get_algo_byte): New.
33376         (store_fpr): Support ECC keys with varargs.
33377         (get_ecc_key_parameters, get_curve_name): Support secp256k1.
33378         (parse_ecc_curve): Likewise.
33379         (build_ecdsa_privkey_template, rsa_writekey, ecdsa_writekey): New.
33380         (ecdh_writekey): New.  Not implemented yet.
33381         (do_writekey): Call rsa_writekey, ecdsa_writekey, or ecdh_writekey.
33382         (do_genkey): Follow the change of store_fpr.
33383
33384 2014-03-11  Werner Koch  <wk@gnupg.org>
33385
33386         dirmngr: Put brackets around IP addresses in the hosttable.
33387         + commit 0b2cca807d5a4a3664145032271141da853e7bac
33388         * dirmngr/ks-engine-hkp.c (EAI_OVERFLOW): Provide a substitute.
33389         (my_getnameinfo): New.
33390         (map_host): Use it.
33391
33392         dirmngr: Add command option to mark hosts as dead or alive.
33393         + commit a3dee2889106fcab112c1c96b32e04d8154875e7
33394         * dirmngr/server.c (cmd_killdirmngr): Factor some code out to ...
33395         (check_owner_permission): here.
33396         (cmd_keyserver): Add options --dead and --alive.
33397         * dirmngr/ks-engine-hkp.c (host_in_pool_p): New.
33398         (ks_hkp_mark_host): New.
33399
33400         dirmngr: Make Assuan output of keyblocks easier readable.
33401         + commit 71b55c945542e695161ddbd783f87c5f534012a5
33402         * dirmngr/server.c (data_line_cookie_write): Print shorter data lines
33403         in verbose mode.
33404
33405         dirmngr: Fix HKP host selection code.
33406         + commit 3c35b46a32ac7584f3807b611cde78b199c527d6
33407         * dirmngr/server.c (cmd_keyserver): Add option --resolve and change
33408         --print-hosttable to --hosttable.
33409         * dirmngr/ks-action.c (ks_printf_help): New.
33410         (ks_action_resolve): New.
33411         * dirmngr/ks-engine-hkp.c (select_random_host): Fix selection.
33412         (ks_hkp_print_hosttable): Print to assuan stream.
33413         (map_host): Remove debug code.  Add arg FORCE_SELECT.  Return numeric
33414         IP addr if it can't be resolved.
33415         (make_host_part): Add arg FORCE_SELECT; change callers to pass false.
33416         (ks_hkp_resolve): New.
33417
33418         List readline support in configure summary.
33419         + commit f30d8b018871495327cbf711b73b04278a34f3e1
33420         * m4/readline.m4: Set gnupg_cv_have_readline.
33421         * configure.ac: Add readline support to summary output.
33422
33423 2014-03-11  NIIBE Yutaka  <gniibe@fsij.org>
33424
33425         agent: API change of agent_key_from_file.
33426         + commit ac5a1a3ccb7c3e6393bc83d73b545dec9b70e7d1
33427         * agent/findkey.c (agent_key_from_file): Always return S-expression.
33428         * agent/command.c (cmd_passwd): Distinguish by SHADOW_INFO.
33429         (cmd_export_key): Likewise.  Free SHADOW_INFO.
33430         (cmd_keytocard): Likewise.  Release S_SKEY.
33431         * agent/pkdecrypt.c (agent_pkdecrypt): Likewise.
33432         * agent/pksign.c (agent_pksign_do): Likewise.  Use the S-expression to
33433         know the key type.
33434
33435 2014-03-10  Werner Koch  <wk@gnupg.org>
33436
33437         Backport useful code from fixes for bug 1447.
33438         + commit 57d26f39afb3c75e24a8d240d7af32b9d2b9775a
33439         * configure.ac: Cehck for inet_ntop.
33440         * m4/libcurl.m4: Provide a #define for the version of the curl
33441         library.
33442
33443         scd: acquire lock in new_reader_slot.
33444         + commit 9ab9f414fb919f0bc87c301c3e36180715d0aa4e
33445         * scd/apdu.c (new_reader_slot): Acquire lock.
33446         (open_ct_reader, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
33447         (open_ccid_reader, open_rapdu_reader): Release lock.
33448         (lock_slot, trylock_slot, unlock_slot): Move more to the top.
33449
33450         Do not require libiconv for Android.
33451         + commit b278043a8f38e2706ccf617d2ac5661b33791d6b
33452         * configure.ac (require_iconv): New.  Set to false for android.
33453         (AM_ICONV): Run only if required.
33454
33455 2014-03-07  Werner Koch  <wk@gnupg.org>
33456
33457         dirmmgr: Use a portability wrapper for struct timeval.
33458         + commit feda379595e06583bc5b3610dec74890de29cb8e
33459         * dirmngr/dirmngr_ldap.c [W32]: Include winber.h.
33460         (my_ldap_timeval_t): New.
33461
33462         Silence more warnings about unused vars and args.
33463         + commit 4387ecb11cdb2addf738eb922c1b9f14c6c76efc
33464         * dirmngr/cdblib.c (cdb_init) [W32]: Remove unused var.
33465         * dirmngr/dirmngr-client.c (start_dirmngr): s/int/assuan_fd_t/.
33466         * dirmngr/dirmngr.c (w32_service_control): Mark unused args.
33467         (call_real_main): New.
33468         (main) [W32]: Use new function to match prototype.
33469         (real_main) [W32]: Mark unused vars.
33470         (handle_signal) [W32]: Do not build the function at all.
33471         (handle_connections) [W32]: Do not define signo.
33472         * dirmngr/ldap-wrapper-ce.c (outstream_reader_cb): Remove used vars.
33473         * g10/tdbio.c (ftruncate) [DOSISH]: Define only if not yet defined.
33474
33475         dirmngr: Simplify strtok macro.
33476         + commit 35266076e3452590931e58f188815859dff6de3c
33477         * dirmngr/ldap-url.c (ldap_utf8_strtok): Remove unused r3d arg.
33478         (ldap_str2charray): Remove lasts.
33479
33480         Use attribute __gnu_printf__ also in estream header files.
33481         + commit 72133b54de89e593d8193b106e9369cf90d2e1c0
33482         * common/estream-printf.h: Use attribute gnu_printf.
33483         * common/estream.h: Ditto.
33484
33485         Use attribute __gnu_printf__ with our estream-printf functions.
33486         + commit 36372dcb2f75a659b7ace0e9c46f07bb431d009c
33487         * common/mischelp.h (JNLIB_GCC_A_PRINTF): Use __gnu_printf__
33488         (JNLIB_GCC_A_NR_PRINTF): Ditto.
33489
33490         w32: Silence warnings about unused vars.
33491         + commit 094aa2589e3920d400be93ae2823a6c4b23db623
33492         * agent/gpg-agent.c (main) [W32]: Mark unused vars.
33493         * sm/gpgsm.c (run_protect_tool) [W32]: Ditto.
33494         * g10/trustdb.c (check_regexp) [DISABLE_REGEX]: Ditto.
33495         * scd/scdaemon.c (main) [W32]: Ditto.
33496         (handle_connections) [W32]: Ditto.
33497         (handle_signal) [W32]: Do not build the function at all.
33498         * scd/apdu.c (pcsc_send_apdu_direct): Ditto.
33499         (connect_pcsc_card): s/long/pcsc_dword_t/.
33500         (open_pcsc_reader_direct): Remove var listlen.
33501
33502         w32: Fix a potential problem in gpgconf's gettext.
33503         + commit a0fc42598f51ef4a958fc3c2fed7f4b8df2da3fd
33504         * tools/gpgconf-comp.c (my_dgettext) [USE_SIMPLE_GETTEXT]: Make sure
33505         to return something even DOMAIN is not given.
33506
33507         Silence several warnings when building under Windows.
33508         + commit 3032fc3ad78ac9ed857570844547afed520d635a
33509         * agent/call-scd.c (start_scd): Replace int by assuan_fd_t.
33510         (start_pinentry): Ditto.
33511         * common/asshelp.c (start_new_gpg_agent): Replace int by assuan_fd_t.
33512         * common/dotlock.c (GNUPG_MAJOR_VERSION): Include stringhelp.h for
33513         prototypes on Windows and some other platforms.
33514         * common/logging.c (fun_writer): Declare addrbuf only if needed.
33515         * g10/decrypt.c (decrypt_message_fd) [W32]: Return not_implemented.
33516         * g10/encrypt.c (encrypt_crypt) [W32]: Return error if used in server
33517         mode.
33518         * g10/dearmor.c (dearmor_file, enarmor_file): Replace GNUPG_INVALID_FD
33519         by -1 as temporary hack for Windows.
33520         * g10/export.c (do_export): Ditto.
33521         * g10/revoke.c (gen_desig_revoke, gen_revoke): Ditto.
33522         * g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Ditto.
33523         * g10/server.c (cmd_verify, gpg_server) [W32]: Return an error.
33524
33525         w32: Include winsock2.h to silence warnings.
33526         + commit cb0dcc340836a64e2d33b27f1be7bc888c084f12
33527
33528
33529         gl: Avoid warning about shadowing an arg.
33530         + commit 84fd36f8baa2b800ea47ff74935f5aaf0e55c299
33531         * gl/setenv.c (KNOWN_VALUE): s/value/_v/.
33532
33533         common: Fix build problem with Sun Studio compiler.
33534         + commit 0fc71f7277c6f833f838bbd384f1a22d0c333e8e
33535         * common/estream.c (ESTREAM_MUTEX_UNLOCK): Use int dummy dummy
33536         functions.
33537         (ESTREAM_MUTEX_INITIALIZE): Ditto.
33538
33539         gpg: Do not require a trustdb with --always-trust.
33540         + commit d8f0b83e4f04641e5e9adbdd8abada15380f981c
33541         * g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE.
33542         * g10/trustdb.c (trustdb_args): Add field no_trustdb.
33543         (init_trustdb): Set that field.
33544         (revalidation_mark):  Take care of a nonexistent trustdb file.
33545         (read_trust_options): Ditto.
33546         (tdb_get_ownertrust): Ditto.
33547         (tdb_get_min_ownertrust): Ditto.
33548         (tdb_update_ownertrust): Ditto.
33549         (update_min_ownertrust): Ditto.
33550         (tdb_clear_ownertrusts): Ditto.
33551         (tdb_cache_disabled_value): Ditto.
33552         (tdb_check_trustdb_stale): Ditto.
33553         (tdb_get_validity_core): Ditto.
33554         * g10/gpg.c (main): Do not create a trustdb with most commands for
33555         trust-model always.
33556
33557         gpg: Print a "not found" message for an unknown key in --key-edit.
33558         + commit dfb25d47a9fcfd7c7c084ea58744724cd5315086
33559         * g10/keyedit.c (keyedit_menu): Print message.
33560
33561         gpg: Protect against rogue keyservers sending secret keys.
33562         + commit db1f74ba5338f624f146a3cb41a346e46b15c8f9
33563         * g10/options.h (IMPORT_NO_SECKEY): New.
33564         * g10/keyserver.c (keyserver_spawn, keyserver_import_cert): Set new
33565         flag.
33566         * g10/import.c (import_secret_one): Deny import if flag is set.
33567
33568         agent: Fix UPDATESTARTUPTTY for ssh.
33569         + commit 90688b29f3701f4d3e2a5a49c5544fe8d2a84b2d
33570         * agent/command-ssh.c (setup_ssh_env): Fix env setting.
33571
33572         gpgv: Init Libgcrypt to avoid syslog warning.
33573         + commit 7c4bfa599fa69c3a942c8deea83737a4c5a0806e
33574         * g10/gpgv.c (main): Check libgcrypt version and disable secure
33575         memory.
33576
33577         Improve libcurl detection.
33578         + commit 5ca482d5f949444ffd453de158ee186ab07fc9b6
33579         * m4/libcurl.m4: Do not use AC_PATH_PROG if --with-libcurl as been
33580         given.  Suggested by John Marshall.
33581
33582         gpg: Remove legacy keyserver examples from the template conf file.
33583         + commit 0ab752cc2d46bbd0077bed889676169b7aeb1eb6
33584         * g10/options.skel: Update.
33585
33586         (cherry picked from commit f3c5cc8bcd37e38b5d65db6a50466e22d03d1f0c)
33587
33588         w32: Define WINVER only if needed.
33589         + commit 76b1940ad6f5f058c4a6bec35902da9f6d4e27b0
33590         * common/sysutils.c (WINVER): Define only if less that 5.0.
33591
33592         w32: Remove unused code.
33593         + commit 63b7658a29809249d7aeb0423bf8c5a693eee0c7
33594         * jnlib/w32-reg.c (write_w32_registry_string): Remove.
33595
33596         agent: Make --allow-mark-trusted the default.
33597         + commit 9942a149ff2ab919c1b2916c7bc347e578a56b14
33598         * agent/gpg-agent.c (opts, main): Add option --no-allow-mark-trusted.
33599         Put this option into the gpgconf-list.
33600         (main): Enable opt.allow_mark_trusted by default.
33601         * tools/gpgconf-comp.c (gc_options_gpg_agent): Replace
33602         allow-mark-trusted by no-allow-mark-trusted.
33603
33604         * agent/trustlist.c (agent_marktrusted): Always set the "relax" flag.
33605
33606         ssh: Add support for Putty.
33607         + commit 5105c8d2d344fd7301d456d8c13c7e90a54f7e98
33608         * agent/gpg-agent.c [W32]: Include Several Windows header.
33609         (opts): Change help text for enable-ssh-support.
33610         (opts, main): Add option --enable-putty-support
33611         (putty_support, PUTTY_IPC_MAGIC, PUTTY_IPC_MAXLEN): New for W32.
33612         (agent_init_default_ctrl): Add and asssert call.
33613         (putty_message_proc, putty_message_thread): New.
33614         (handle_connections) [W32]: Start putty message thread.
33615         * common/sysutils.c (w32_get_user_sid): New for W32 only
33616         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add
33617         --enable-ssh-support and --enable-putty-support.  Make the
33618         configuration group visible at basic level.
33619         * agent/command-ssh.c (serve_mmapped_ssh_request): New for W32 only.
33620
33621         agent: Fix binary vs. text mode problem in ssh.
33622         + commit 179012ddd48e63ca83e8f5c24537a2db45c3e122
33623         * agent/command-ssh.c (file_to_buffer)
33624         (ssh_handler_request_identities): Open streams in binary mode.
33625         (start_command_handler_ssh): Factor some code out to ..
33626         (setup_ssh_env): new function.
33627
33628         Fix syntax error for building on APPLE.
33629         + commit 4ad123d6fe341da7768e43360375e17fa89e8e0d
33630         * scd/pcsc-wrapper.c [__APPLE__]: Fix syntax error.
33631
33632         Ignore obsolete option --disable-keypad.
33633         + commit d2a6be24af0bf220bb448fdd50c0196faddee0f4
33634         * scd/scdaemon.c (opts): Ignore --disable-keypad.
33635
33636         Allow marking options as ignored.
33637         + commit 8fc9de8d6bf663f7c8419b42dab01f590a694d59
33638         * jnlib/argparse.h (ARGPARSE_OPT_IGNORE): New.
33639         (ARGPARSE_TYPE_MASK): New, for internal use.
33640         (ARGPARSE_ignore): New.
33641         * jnlib/argparse.c (optfile_parse, arg_parse): Replace remaining
33642         constants by macros.
33643         (optfile_parse): Implement ARGPARSE_OPT_IGNORE.
33644         (arg_parse): Exclide ignore options from --dump-options.
33645
33646 2014-03-06  Werner Koch  <wk@gnupg.org>
33647
33648         common: Fix recent commit 55656208.
33649         + commit 191e32026f02054b1edb4f02536875462fd0b6b3
33650         * common/membuf.c (get_membuf_shrink): Fix use of LEN.
33651
33652 2014-03-06  NIIBE Yutaka  <gniibe@fsij.org>
33653
33654         Fix g10/trust.c.
33655         + commit 5ed8e9335fb886d7ddc86728d8481e5e47485531
33656         * g10/trust.c (register_trusted_keyid, register_trusted_key)
33657         (update_ownertrust): Call functions with tdb_.
33658
33659 2014-02-26  Werner Koch  <wk@gnupg.org>
33660
33661         common: Replace all macros in strusage() returned strings.
33662         + commit 0f38c87f427a155ab5684e18e3b73956f81edfab
33663         * common/argparse.c (writechar): Remove.
33664         (writestrings): Simplify.
33665         (strusage): Use map_static_macro_string.
33666
33667         common: New function map_static_macro_string.
33668         + commit c72762f9acf3eef5c466ba76e895d7654df12ff7
33669         * common/mapstrings.c: New.
33670         * common/t-mapstrings.c: New.
33671         * common/t-support.h (DIM, DIMof): Define if not defined.
33672         * common/Makefile.am: Add new files.
33673
33674         common: New function get_membuf_shrink.
33675         + commit 556562086acd2bc2f8e3aa3126ebf155715e042b
33676         * common/membuf.c (get_membuf_shrink): New.
33677
33678         agent: Fixed unresolved symbol under Windows.
33679         + commit 55c3e5f448c26360eda31e05b1f62249119f73d9
33680         * agent/gpg-agent.c (main): s/ttyname/gnupg_ttyname/.
33681
33682         common: Require an installed libiconv.
33683         + commit 380a2aa18e0c048cfefa1cb4102dfbf902a1962b
33684         * common/utf8conv.c: Remove dynload.h.
33685         (load_libiconv): Remove.  Remove all calls to it.
33686
33687 2014-02-10  Werner Koch  <wk@gnupg.org>
33688
33689         gpg: Silent more compiler warnings due to some configure options.
33690         + commit 47e6b6bad1dff493f4102a5549a7bb54466684c2
33691         * g10/keygen.c (generate_keypair, gen_card_key)
33692         (gen_card_key_with_backup) [!ENABLE_CARD_SUPPORT]: Mark unused args.
33693
33694         tests: Avoid segv if dns cert lookup is not configured.
33695         + commit 672f4aeba8bf55839911e1fe805af6b2873853f7
33696         * common/dns-cert.c (get_dns_cert) [!USE_DNS_CERT]: Reset return args.
33697
33698         gpg: Cleanup compiler warnings due to some configure options.
33699         + commit 7901c5c2a3b7b24e9a4eaab590b0a54e9695c3e4
33700         * g10/photoid.c (show_photos) [DISABLE_PHOTO_VIEWER]: Mark args as
33701         unused.
33702         * tools/gpgconf-comp.c (my_dgettext): Mark DOMAIN as unused if NLS is
33703         not configured.
33704
33705         gpg: Allow building without any trust model support.
33706         + commit 62fb86c6589f7f74dad4741db31b3aefa0848420
33707         * configure.ac: Add option --disable-trust-models
33708         (NO_TRUST_MODELS): New ac_define and am_conditional.
33709         * g10/Makefile.am (trust_source): New.
33710         (gpg2_SOURCES): Factor some files out to above.  Add trust.c.
33711         * g10/gpg.c [NO_TRUST_MODELS]: Disable options --export-ownertrust,
33712         --import-ownertrust, --update-trustdb, --check-trustdb, --fix-trustdb,
33713         --list-trustdb, --trustdb-name, --auto-check-trustdb,
33714         --no-auto-check-trustdb, and --force-ownertrust.
33715         (parse_trust_model) [NO_TRUST_MODELS]: Do not build.
33716         (main) [NO_TRUST_MODELS]: Set trust_model to always and exclude all
33717         trustdb related option code.
33718         * g10/keyedit.c (cmds) [NO_TRUST_MODELS]: Remove menu items "trust",
33719         "enable", and "disable".
33720         * g10/keylist.c (public_key_list) [NO_TRUST_MODELS]: Do not print
33721         "tru" record.
33722
33723         * g10/trust.c: New.
33724         * g10/trustdb.c (struct key_item): Move to trustdb.h.
33725         (register_trusted_keyid): Rename to tdb_register_trusted_keyid.
33726         (register_trusted_key): Rename to tdb_register_trusted_key.
33727         (trust_letter, uid_trust_string_fixed, trust_value_to_string)
33728         (string_to_trust_value, get_ownertrust_with_min, get_ownertrust_info)
33729         (get_ownertrust_string, get_validity_info, get_validity_string)
33730         (clean_sigs_from_uid, clean_uid_from_key, clean_key): Move to trust.c.
33731         (mark_usable_uid_certs): Move to trust.c and make global.
33732         (is_in_klist): Move as inline to trustdb.h.
33733         (trustdb_check_or_update): Rename to tdb_check_or_update
33734         (revalidation_mark): Rename to tdb_revalidation_mark.
33735         (get_ownertrust): Rename to tdb_get_ownertrust.
33736         (get_min_ownertrust): Rename to tdb_get_min_ownertrust.
33737         (update_ownertrust): Rename to tdb_update_ownertrust.
33738         (clear_ownertrusts): Rename to tdb_clear_ownertrusts.
33739         (cache_disabled_value): Rename to tdb_cache_disabled_value.
33740         (check_trustdb_stale): Rename to tdb_check_trustdb_stale.
33741         (get_validity): Rename to tdb_get_validity_core, add arg MAIN_PK and
33742         factor some code out to ...
33743         * trust.c (get_validity): ...new.
33744         (check_or_update_trustdb): New wrapper.
33745         (revalidation_mark): New wrapper.
33746         (get_ownertrust): New wrapper.
33747         (get_ownertrust_with_min): New wrapper.
33748         (update_ownertrust): New wrapper.
33749         (clear_ownertrusts): New wrapper.
33750         (cache_disabled_value): New wrapper.
33751         (check_trustdb_stale): New wrapper.
33752
33753         * tests/openpgp/defs.inc (opt_always): New.  Use in all tests instead
33754         of --always-trust.
33755
33756         tests: Handle disabled algorithms.
33757         + commit ea7f895319e89150e5613b6d20f21410f99d6f22
33758         * tests/openpgp/mds.test: Skip disabled algorithms.
33759         * tests/openpgp/signencrypt-dsa.test: Ditto.
33760         * tests/openpgp/sigs-dsa.test: Ditto.
33761
33762 2014-02-07  Werner Koch  <wk@gnupg.org>
33763
33764         Silence annoying ABI change warning.
33765         + commit 111f082487dc7a2a50375e24203de31b000e0dea
33766         * configure.ac [GCC]: Pass -Wno-psabi for gcc >= 4.6.  Avoid some gcc
33767         option tests for gcc >= 4.6
33768
33769         Allow disabling of card support.
33770         + commit 8e0ba4ecd3897c748ac2f06028406604ae7baced
33771         * configure.ac: Add option --disable-card-support.  Also add
33772         am_conditional and do not build scd if card support is enabled.
33773
33774         gpg: List only available algos in --gen-key.
33775         + commit 357b142e7225e5c7f1e0f9768f48e833d5804b6a
33776         * g10/keygen.c (ask_algo, ask_curve): Take care of GPG_USE_<algo>.
33777
33778         gpg: Change --print-mds to output enabled OpenPGP algos.
33779         + commit 54a11729fb71ba06e318fe229d0a230686ed4dc8
33780         * g10/gpg.c (print_mds): Use opengpg_md_test_algo.  Test also for MD5
33781         availibility.
33782
33783         gpg: Avoid compiler warnings for disabled algos.
33784         + commit aa76a1660613ece3fc0d774856abcbe0bb158300
33785         * g10/misc.c (map_cipher_openpgp_to_gcry): Add case for disabled algo.
33786         (openpgp_pk_test_algo2): Ditto.
33787         (map_md_openpgp_to_gcry): Ditto.
33788
33789 2014-02-05  Werner Koch  <wk@gnupg.org>
33790
33791         gpg: Change format for the key size in --list-key and --edit-key.
33792         + commit 2c814806d759e5cf611200e8210137cf8502a672
33793         * g10/gpg.c (oLegacyListMode, opts, main): Add --legacy-list-mode.
33794         * g10/options.h (struct opt): Add field legacy_list_mode.
33795         * g10/keydb.h (PUBKEY_STRING_SIZE): New.
33796         * g10/keyid.c (pubkey_string): New.
33797         * g10/import.c (import_one, import_secret_one): Use pubkey_string.
33798         * g10/keylist.c (print_seckey_info): Ditto.
33799         (print_pubkey_info, print_card_key_info): Ditto.
33800         (list_keyblock_print): Ditto.
33801         * g10/mainproc.c (list_node): Ditto.
33802         * g10/pkclist.c (do_edit_ownertrust, build_pk_list): Ditto.
33803         * g10/keyedit.c (show_key_with_all_names): Ditto.  Also change the
33804         format.
33805         (show_basic_key_info): Ditto.
33806         * common/openpgp-oid.c (openpgp_curve_to_oid): Also allow "ed25519".
33807         (openpgp_oid_to_curve): Downcase "ed25519"
33808
33809 2014-01-31  Werner Koch  <wk@gnupg.org>
33810
33811         gpg: Add configure options to disable algorithms.
33812         + commit 2ba818de1aa311ba8eb27012d69e93dd16e7d4ed
33813         * acinclude.m4 (GNUPG_GPG_DISABLE_ALGO): New.
33814         * configure.ac: Add --enable-gpg-* options to disable non MUS
33815         algorithms.
33816         * g10/misc.c (map_cipher_openpgp_to_gcry): Implement these options.
33817         (openpgp_pk_test_algo2): Ditto.
33818         (map_md_openpgp_to_gcry): Ditto.
33819         (openpgp_cipher_test_algo, openpgp_md_test_algo): Simplify.
33820
33821         gpg: Improve --version algo info output.
33822         + commit 71540d40414dc8b304b45dc476e5e5650a2db20a
33823         * g10/misc.c (openpgp_pk_algo_name): Return a different string for
33824         each ECC algorithm.
33825         * g10/gpg.c (build_list_pk_test_algo): New wrapper to cope with the
33826         different algo type enums.
33827         (build_list_pk_algo_name): Ditto.
33828         (build_list_cipher_test_algo): Ditto.
33829         (build_list_cipher_algo_name): Ditto.
33830         (build_list_md_test_algo): Ditto.
33831         (build_list_md_algo_name): Ditto.
33832         (my_strusage): Use them.
33833         (list_config): Ditto. Add "pubkeyname".
33834         (build_list): Add letter==1 hack.
33835
33836         gpg: Start using OpenPGP digest algo ids.
33837         + commit bf50604a0d50b974c1d4b8ccf5d774489f996cae
33838         * g10/misc.c (print_pubkey_algo_note): Use enum typedef for the arg.
33839         (print_cipher_algo_note): Ditto.
33840         (print_digest_algo_note): Ditto.
33841         (map_md_openpgp_to_gcry): New.
33842         (openpgp_md_test_algo): Rewrite.
33843         (openpgp_md_algo_name): Rewrite to do without Libgcrypt.
33844         * g10/cpr.c (write_status_begin_signing): Remove hardwired list of
33845         algo ranges.
33846
33847         gpg: Use only OpenPGP cipher algo ids.
33848         + commit 16a6311adefff0139056714521214f845315b7f8
33849         * g10/misc.c (map_cipher_openpgp_to_gcry): Use explicit mapping and
33850         use enums for the arg and return value.
33851         (map_cipher_gcry_to_openpgp): Ditto.
33852         (openpgp_cipher_blocklen): Use constant macros.
33853         (openpgp_cipher_test_algo): Use mapping function and prepare to
33854         disable algorithms.
33855         (openpgp_cipher_algo_name): Do not use Libgcrypt.
33856
33857         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Replace
33858         CGRY_CIPHER_* by CIPHER_ALGO_*.
33859
33860         * common/openpgpdefs.h (cipher_algo_t): Remove unused
33861         CIPHER_ALGO_DUMMY.
33862
33863 2014-01-30  Werner Koch  <wk@gnupg.org>
33864
33865         gpg: Use only OpenPGP public key algo ids and add the EdDSA algo id.
33866         + commit b7f8dec6325f1c80640f878ed3080bbc194fbc78
33867         * common/sexputil.c (get_pk_algo_from_canon_sexp): Change to return a
33868         string.
33869         * g10/keygen.c (check_keygrip): Adjust for change.
33870         * sm/certreqgen-ui.c (check_keygrip): Likewise.
33871
33872         * agent/pksign.c (do_encode_dsa): Remove bogus map_pk_openpgp_to_gcry.
33873
33874         * g10/misc.c (map_pk_openpgp_to_gcry): Remove.
33875         (openpgp_pk_test_algo): Change to a wrapper for openpgp_pk_test_algo2.
33876         (openpgp_pk_test_algo2): Rewrite.
33877         (openpgp_pk_algo_usage, pubkey_nbits): Add support for EdDSA.
33878         (openpgp_pk_algo_name): Rewrite to remove need for gcry calls.
33879         (pubkey_get_npkey, pubkey_get_nskey): Ditto.
33880         (pubkey_get_nsig, pubkey_get_nenc): Ditto.
33881         * g10/keygen.c(do_create_from_keygrip):  Support EdDSA.
33882         (common_gen, gen_ecc, ask_keysize, generate_keypair): Ditto.
33883         * g10/build-packet.c (do_key): Ditto.
33884         * g10/export.c (transfer_format_to_openpgp): Ditto.
33885         * g10/getkey.c (cache_public_key): Ditto.
33886         * g10/import.c (transfer_secret_keys): Ditto.
33887         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
33888         * g10/mainproc.c (proc_pubkey_enc): Ditto.
33889         * g10/parse-packet.c (parse_key): Ditto,
33890         * g10/sign.c (hash_for, sign_file, make_keysig_packet): Ditto.
33891         * g10/keyserver.c (print_keyrec): Use openpgp_pk_algo_name.
33892         * g10/pkglue.c (pk_verify, pk_encrypt, pk_check_secret_key): Use only
33893         OpenPGP algo ids and support EdDSA.
33894         * g10/pubkey-enc.c (get_it): Use only OpenPGP algo ids.
33895         * g10/seskey.c (encode_md_value): Ditto.
33896
33897 2014-01-29  Werner Koch  <wk@gnupg.org>
33898
33899         gpg: Remove cipher.h and put algo ids into a common file.
33900         + commit ea8a1685f75d27f5277d42ea7390ad5aeaf51b1f
33901         * common/openpgpdefs.h (cipher_algo_t, pubkey_algo_t, digest_algo_t)
33902         (compress_algo_t): New.
33903         * agent/gpg-agent.c: Remove ../g10/cipher.h. Add openpgpdefs.h.
33904         * g10/cipher.h (DEK): Move to ...
33905         * g10/dek.h: new file.
33906         * g10/cipher.h (is_RSA, is_ELGAMAL, is_DSA)
33907         (PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY, PUBKEY_MAX_NSIG, PUBKEY_MAX_NENC)
33908         (PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC, PUBKEY_USAGE_CERT)
33909         (PUBKEY_USAGE_AUTH, PUBKEY_USAGE_NONE): Move to
33910         * g10/packet.h: here.
33911         * g10/cipher.h: Remove.  Remove from all files.
33912         * g10/filter.h, g10/packet.h:  Include dek.h.
33913         * g10/Makefile.am (common_source): Remove cipher.h.  Add dek.h.
33914
33915         include: Remove this directory.
33916         + commit 25b4c2acbd01f9b4c2c364f44c53b73498ed8469
33917         * include/cipher.h: Move to ...
33918         * g10/cipher.h: here.
33919         * agent/gpg-agent.c: Adjust header file name.
33920
33921         * include/host2net.h: Move to ...
33922         * common/host2net.h: here.  Change license to LGPLv3/GPLv2.  Adjust
33923         notices to reflect that only me worked on that file.
33924
33925         * include/types.h: Remove.
33926         * common/types.h: Include inttypes.h.  Add byte typedef and comments
33927         for __riscos__.
33928         * common/iobuf.h: Adjust header file name.
33929
33930         * include/_regex.h: Remove this unused file.
33931
33932         * include/Makefile.am: Remove.
33933         * Makefile.am (SUBDIRS): Remove "include".
33934         * configure.ac (AC_CONFIG_FILES): Remove include/Makefile.
33935         * include/ChangeLog-2011: Move to ...
33936         * common/ChangeLog-2011.include: here.
33937         * common/Makefile.am (EXTRA_DIST): Add file.
33938
33939         * include/zlib-riscos.h: Move this repo only file to ...
33940         * g10/zlib-riscos.h: here.
33941
33942         * include/: Remove.
33943
33944 2014-01-17  Werner Koch  <wk@gnupg.org>
33945
33946         Remove unused u64 type definitions.
33947         + commit 362a30d8c2f529cd44687066f9c33cab7b43bedc
33948         * configure.ac: Remove check for uint64 and UINT64_C.
33949         * include/types.h: Remove u64 stuff.
33950         * common/types.h: Ditto.
33951
33952 2014-01-16  NIIBE Yutaka  <gniibe@fsij.org>
33953
33954         agent: Not remove SSH socket when already running.
33955         + commit 0ee66a6f66d7389e381fffa5f9eedbc8de9add10
33956         * agent/gpg-agent.c (main): Defer setting of socket_name_ssh to avoid
33957         removal of the socket when it will die in create_server_socket for
33958         socket_name.
33959
33960         agent: Fix agent_is_eddsa_key.
33961         + commit 9c731bbedfd8bded5efd886304c5ca6655768c45
33962         * agent/findkey.c (agent_is_eddsa_key): Implemented.
33963
33964 2014-01-15  NIIBE Yutaka  <gniibe@fsij.org>
33965
33966         Add secp256k1.
33967         + commit c5e41f539b9a21cbad10c7dae95572a4445d31c3
33968         * common/openpgp-oid.c (openpgp_curve_to_oid): Add secp256k1.
33969         (openpgp_oid_to_curve): Likewise.
33970
33971         * g10/keygen.c (ask_curve): Add secp256k1.
33972
33973 2014-01-10  Werner Koch  <wk@gnupg.org>
33974
33975         autogen.sh: Add rule for 64 bit windows.
33976         + commit aedfa95bcc49156f2bc6ae5d0f385705d4fbdd32
33977
33978
33979         Turn autogen.sh into a generic script.
33980         + commit e7973d36d88178b4b0a977e3fcc0d62600777618
33981         * autogen.sh: Revamp.
33982         * autogen.rc: New.
33983         * Makefile.am (EXTRA_DIST): Add autogen.rc.
33984
33985         Rename scripts/ to build-aux/
33986         + commit 99a48b2fcdf7c33fe553511c12f2ebb8eea5c634
33987         * scripts/: Rename to build-aux/
33988         * Makefile.am: Adjust accordingly.
33989         * configure.ac (AC_CONFIG_AUX_DIR): Change to build-aux.
33990
33991 2014-01-09  Werner Koch  <wk@gnupg.org>
33992
33993         Improve the speedo make script.
33994         + commit a55ffb9da9a844bd2bd73a4a2ea65bf18b21c57f
33995         * scripts/gpg-w32-dev/README: Remove
33996         * scripts/gpg-w32-dev/GNUmakefile, scripts/gpg-w32-dev/speedo.mk:
33997         Merge into ..
33998         * scripts/speedo.mk: this.
33999
34000         gpgsplit: Allow building without zlib support.
34001         + commit 00d5d2204cefb0f4b953e0c00448f16aab2d39c7
34002         * tools/gpgsplit.c [!HAVE_ZLIB]: Do not include zlib.h.
34003         (handle_zlib): Build only if HAVE_ZLIB is defined.
34004         (write_part): Support zlib and zip only if HAVE_ZLIB is defined.
34005
34006         w32: Fix backslash quoting in registry name.
34007         + commit fa318406c9bdb60aee1e1b410e4c9e0b3eb1392e
34008         * configure.ac (GNUPG_REGISTRY_DIR): Double backslashes.
34009
34010         Fix test for zlib.
34011         + commit 477aabaf753f987987f7a2e1f999a499ea3bd103
34012         * configure.ac (HAVE_ZLIB): Define only if found.
34013
34014         Add --enable-silent-rules stuff.
34015         + commit aba53e9f96d0c9b270edef0806976a56326249c4
34016         * configure.ac: Add AM_SILENT_RULES.
34017
34018 2014-01-08  Werner Koch  <wk@gnupg.org>
34019
34020         w32: Add macro for the registry key.
34021         + commit 75ba215ebd8be7e14b26bb53ef3c7d41e4ce1e02
34022         * configure.ac (GNUPG_REGISTRY_DIR) [W32]: New ac-define.
34023         * common/homedir.c (default_homedir): Use it.
34024         * common/logging.c (do_logv): Use it.
34025
34026 2013-12-11  Werner Koch  <wk@gnupg.org>
34027
34028         gpg: Change --show-session-key to print the session key earlier.
34029         + commit 101a54add351ff62793cbfbf3877787c4791f833
34030         * g10/cpr.c (write_status_strings): New.
34031         (write_status_text): Replace code by a call to write_status_strings.
34032         * g10/mainproc.c (proc_encrypted): Remove show_session_key code.
34033         * g10/decrypt-data.c (decrypt_data): Add new show_session_key code.
34034
34035 2013-12-05  Werner Koch  <wk@gnupg.org>
34036
34037         gpg: Change OID of Ed25519 and add Brainpool oids.
34038         + commit 59207a86e5f40c77fed296b642bf76692e8eef65
34039         * common/openpgp-oid.c (openpgp_curve_to_oid): Change OID for
34040         Ed25519.  Add brainpool OIDs.
34041         (openpgp_oid_to_curve): Ditto.
34042
34043 2013-11-29  Werner Koch  <wk@gnupg.org>
34044
34045         common: Add put_membuf_printf.
34046         + commit 159d42ee6ab21d97f40ee129445f37209b875739
34047         * common/membuf.c (put_membuf_printf): New.
34048
34049 2013-11-27  Werner Koch  <wk@gnupg.org>
34050
34051         gpg: Change armor Version header to emit only the major version.
34052         + commit e951782e937ce290be0d89d83e84b3daea997587
34053         * g10/options.h (opt): Rename field no_version to emit_version.
34054         * g10/gpg.c (main): Init opt.emit_vesion to 1.  Change --emit-version
34055         to bump up opt.emit_version.
34056         * g10/armor.c (armor_filter): Implement different --emit-version
34057         values.
34058
34059 2013-11-18  Werner Koch  <wk@gnupg.org>
34060
34061         Make use of the *_NAME etc macros.
34062         + commit cc9a0b69b698ba436eaf777e5020532845b56236
34063         Replace hardwired strings at many places with new macros from config.h
34064         and use the new strusage macro replacement feature.
34065
34066         * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
34067         sentinels.
34068         * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
34069
34070         Add strusage macro replacement feature.
34071         + commit 798daaa1ddf73f64cf840fbdc1f4c5b9c4b4ec13
34072         * common/argparse.c (writechar): New.
34073         (writestrings): Add macro replacement feature.
34074         (show_help): Remove specialized @EMAIL@ replacement.
34075         * configure.ac (GNUPG_NAME, GPG_NAME, GPGSM_NAME): Define.
34076         (GPG_AGENT_NAME, DIRMNGR_NAME, G13_NAME, GPGCONF_NAME): Define.
34077         (GPGTAR_NAME, GPG_AGENT_INFO_NAME, GPG_AGENT_SOCK_NAME): Define.
34078         (GPG_AGENT_SSH_SOCK_NAME, DIRMNGR_INFO_NAME): Define.
34079         (DIRMNGR_SOCK_NAME): Define.
34080
34081 2013-11-15  Werner Koch  <wk@gnupg.org>
34082
34083         kbx: Implement update operation for OpenPGP keyblocks.
34084         + commit 5499942571a88a1223a7318992605c6d29858866
34085         * kbx/keybox-update.c (keybox_update_keyblock): Implement.
34086         * kbx/keybox-search.c (get_blob_flags): Move to ...
34087         * kbx/keybox-defs.h (blob_get_type): here.
34088         * kbx/keybox-file.c (_keybox_read_blob2): Fix calling without R_BLOB.
34089         * g10/keydb.c (build_keyblock_image): Allow calling without
34090         R_SIGSTATUS.
34091         (keydb_update_keyblock): Implement for keybox.
34092
34093         * kbx/keybox-dump.c (_keybox_dump_blob): Fix printing of the unhashed
34094         size.  Print "does not expire" also on 64 bit platforms.
34095
34096         gpg: Rework ECC support and add experimental support for Ed25519.
34097         + commit 402aa0f94854bb00475c934be5ca6043a4632126
34098         * agent/findkey.c (key_parms_from_sexp): Add algo name "ecc".
34099         (agent_is_dsa_key): Ditto.
34100         (agent_is_eddsa_key): New.  Not finished, though.
34101         * agent/pksign.c (do_encode_eddsa): New.
34102         (agent_pksign_do): Use gcry_log_debug functions.
34103         * agent/protect.c (agent_protect): Parse a flags parameter.
34104         * g10/keygen.c (gpg_curve_to_oid): Move to ...
34105         * common/openpgp-oid.c (openpgp_curve_to_oid): here and rename.
34106         (oid_ed25519): New.
34107         (openpgp_oid_is_ed25519): New.
34108         (openpgp_oid_to_curve): New.
34109         * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): New.
34110         * g10/build-packet.c (gpg_mpi_write): Write the length header also for
34111         opaque MPIs.
34112         (gpg_mpi_write_nohdr): New.
34113         (do_key): Use gpg_mpi_write_nohdr depending on algorithm.
34114         (do_pubkey_enc): Ditto.
34115         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Use
34116         gpg_mpi_write_nohdr.
34117         * g10/export.c (transfer_format_to_openpgp):
34118         * g10/keygen.c (ecckey_from_sexp): Return the error.
34119         (gen_ecc): Repalce arg NBITS by CURVE.
34120         (read_parameter_file): Add keywords "Key-Curve" and "Subkey-Curve".
34121         (ask_curve): New.
34122         (generate_keypair, generate_subkeypair): Use ask_curve.
34123         (do_generate_keypair): Also pass curve name.
34124         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Print
34125         curve name.
34126         * g10/parse-packet.c (mpi_read): Remove workaround for
34127         Libcgrypt < 1.5.
34128         (parse_key): Fix ECC case.  Print the curve name.
34129         * g10/pkglue.c (mpi_from_sexp): Rename to get_mpi_from_sexp.
34130         (pk_verify, pk_check_secret_key): Add special case for Ed25519.
34131         * g10/seskey.c (encode_md_value): Ditto.
34132         * g10/sign.c (do_sign, hash_for, sign_file): Ditto.
34133
34134         kbx: Fix possible segv in kbxdump.
34135         + commit 9ae48b173c93f4747a9826beb1fbd023c4362c22
34136         * kbx/keybox-dump.c (_keybox_dump_blob): Check length before get32.
34137
34138         Require Libgcrypt 1.6.
34139         + commit b27161cd0c76ae6e2381f60c3a502cde3a2aaa21
34140         * agent/pksign.c (do_encode_dsa): Remove Libgcrypt version check
34141
34142 2013-11-13  NIIBE Yutaka  <gniibe@fsij.org>
34143
34144         scd: more pinpad input fix for PC/SC.
34145         + commit abd922e79b2ff63a5a763a30d4a06a91f93d0b12
34146         * scd/apdu.c (check_pcsc_pinpad): Set default values here.
34147         (pcsc_pinpad_verify, pcsc_pinpad_modify): Remove setting default
34148         values, as it's too late.
34149
34150 2013-11-11  NIIBE Yutaka  <gniibe@fsij.org>
34151
34152         scd: more pinpad fix.
34153         + commit 037dea9dd5eac7a74df0e12cb437e71fb0732afa
34154         * scd/apdu.c (check_pcsc_pinpad): Set ->minlen and ->maxlen only when
34155         those are specified.
34156         (pcsc_pinpad_modify): Remove old check code.
34157
34158 2013-10-29  NIIBE Yutaka  <gniibe@fsij.org>
34159
34160         scd: pinpad fix for PC/SC on Windows.
34161         + commit 32989ad2b152d18198d718bc2c7232ce3e79c72f
34162         * scd/apdu.c (SCARD_CTL_CODE): Fix for Windows.
34163
34164 2013-10-28  Werner Koch  <wk@gnupg.org>
34165
34166         doc: Change yat2m to allow arbitrary condition names.
34167         + commit a15c35f37ed2b58805adc213029998aa3e52f038
34168         * doc/yat2m.c (MAX_CONDITION_NESTING): New.
34169         (gpgone_defined): Remove.
34170         (condition_s, condition_stack, condition_stack_idx): New.
34171         (cond_is_active, cond_in_verbatim): New.
34172         (add_predefined_macro, set_macro, macro_set_p): New.
34173         (evaluate_conditions, push_condition, pop_condition): New.
34174         (parse_file): Rewrite to use the condition stack.
34175         (top_parse_file): Set prefined macros.
34176         (main): Change -D to define arbitrary macros.
34177
34178 2013-10-25  NIIBE Yutaka  <gniibe@fsij.org>
34179
34180         scd: fix pinpad input on Windows.
34181         + commit de7e15c6b80164a351586e9087aad86420c8b89e
34182         * scd/apdu.c (open_pcsc_reader_direct): Don't call
34183         pcsc_vendor_specific_init here, but...
34184         (connect_pcsc_card): Call it here.
34185
34186 2013-10-23  NIIBE Yutaka  <gniibe@fsij.org>
34187
34188         po: Update Japanese translation.
34189         + commit b66158cac7347e4c56c79ab7b5416ae5b3f4a0a2
34190
34191
34192 2013-10-16  NIIBE Yutaka  <gniibe@fsij.org>
34193
34194         scd: add pinpad readers information for PC/SC service.
34195         + commit 5efcc2b8fee8de31d255d09037f0a1e6209eab32
34196         * scd/apdu.c (pcsc_vendor_specific_init): Add information for Cherry
34197         ST-2xxx, Reiner cyberJack, Vasco DIGIPASS, FSIJ Gnuk Token, and KAAN
34198         Advance.
34199
34200 2013-10-15  NIIBE Yutaka  <gniibe@fsij.org>
34201
34202         scd: remove pin length check.
34203         + commit e0ab665a792ada6470cb8885b8427acc3c960998
34204         * scd/apdu.c (pcsc_pinpad_verify): Remove old check code for pin
34205         length.
34206
34207 2013-10-04  Werner Koch  <wk@gnupg.org>
34208
34209         gpg: Limit the nesting level of I/O filters.
34210         + commit e6175055fbca958b7fa43aaf84359574ca7f3ebb
34211         * common/iobuf.c (MAX_NESTING_FILTER): New.
34212         (iobuf_push_filter2): Limit the nesting level.
34213
34214         * g10/mainproc.c (mainproc_context): New field ANY.  Change HAVE_DATA
34215         and ANY_SIG_SIGN to bit fields of ANY.  Add bit field
34216         UNCOMPRESS_FAILED.
34217         (proc_compressed): Avoid printing multiple Bad Data messages.
34218         (check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA.
34219
34220 2013-10-02  Werner Koch  <wk@gnupg.org>
34221
34222         gpg: Fix bug with deeply nested compressed packets.
34223         + commit 0899f6d4be0406c9efbf9c3f342825804f359b5a
34224         * g10/mainproc.c (MAX_NESTING_DEPTH): New.
34225         (proc_compressed): Return an error code.
34226         (check_nesting): New.
34227         (do_proc_packets): Check packet nesting depth.  Handle errors from
34228         check_compressed.
34229
34230 2013-09-08  Werner Koch  <wk@gnupg.org>
34231
34232         Switch to deterministic DSA.
34233         + commit 6466db10fb22a4f24df4edad9c5cb33ec67321bd
34234         * agent/pksign.c (rfc6979_hash_algo_string): New.
34235         (do_encode_dsa) [Libgcrypt >= 1.6]: Make use of RFC-6979.
34236
34237 2013-08-30  Werner Koch  <wk@gnupg.org>
34238
34239         scd: Suppress gcc warning about possible uninitialized use.
34240         + commit 244587ea41d4c75cb5570356f09a6705864a7e8d
34241         * scd/app-nks.c (parse_pwidstr): Always init r_pwid.
34242
34243         gpg: Use 2048 as the default keysize in batch mode.
34244         + commit 4c3b35b067a4e7002bb6473b879b551014bb7857
34245         * g10/keygen.c (gen_elg, gen_dsa, gen_rsa): Set default keysize to
34246         2048.
34247
34248         gpgtar: Fix building for systems with a separate libintl.
34249         + commit 12990efb45ee7c425167aad19fe759d5609c5182
34250         * tools/Makefile.am (gpgtar_LDADD): Add LIBINTL and LIBICONV.
34251
34252         scd: Use vendor and product id macros also in apdu.c.
34253         + commit fc31d730d8506b069de1d3529ed26660856bf07f
34254         * scd/ccid-driver.c: Move vendor and product ids to ...
34255         * scd/ccid-driver.h: here.
34256         * scd/apdu.c (CCID_DRIVER_INCLUDE_USB_IDS): Define to include ids.
34257         (pcsc_vendor_specific_init): Use vendor and product id macros.
34258
34259 2013-08-30  NIIBE Yutaka  <gniibe@fsij.org>
34260
34261         scd: PC/SC pinpad input improvement.
34262         + commit 95a3bffeaf07e8bf9487d4b165c336d166236fc1
34263         * scd/apdu.c (struct reader_table_s): Add members: PINMIN, PINMAX, and
34264         PINPAD_VERLEN_SUPPORTED.
34265         (CM_IOCTL_VENDOR_IFD_EXCHANGE, FEATURE_GET_TLV_PROPERTIES,
34266         PCSCv2_PART10_PROPERTY_*): New.
34267         (new_reader_slot): Initialize pinpad_varlen_supported, pinmin, pinmax.
34268         (pcsc_vendor_specific_init): New.
34269         (open_pcsc_reader_direct, open_pcsc_reader_wrapped): Call
34270         pcsc_vendor_specific_init.
34271         (check_pcsc_pinpad): Not detect here but use the result of
34272         pcsc_vendor_specific_init.
34273         (pcsc_pinpad_verify, pcsc_pinpad_modify): Specify bNumberMessage.
34274
34275 2013-08-29  Jonas Borgström  <jonas@borgstrom.se>
34276
34277         scd: add support for RSA_CRT and RSA_CRT_N key import.
34278         + commit cc67918c088e90c1d9a507af5f6288e8faa93d87
34279         * scd/app-openpgp.c (do_writekey): Added RSA_CRT and RSA_CRT_N support.
34280
34281 2013-08-29  Werner Koch  <wk@gnupg.org>
34282
34283         kbx: Add a few macros for easier readability.
34284         + commit 3adfaa9beee4502479b5673c7dfd386680a920c5
34285         * kbx/keybox-update.c (FILECOPY_INSERT)
34286         (FILECOPY_DELETE, FILECOPY_UPDATE): New macros.  Replace numbers by
34287         them.
34288
34289 2013-08-28  Werner Koch  <wk@gnupg.org>
34290
34291         Fix commit 04e2c83f.
34292         + commit fdbf76eee6a4e81b040d423926b71af7b491fb4a
34293         * agent/command-ssh.c (stream_read_string): Do not assign to a NULL
34294         ptr.
34295
34296         gpg: Make decryption with the OpenPGP card work.
34297         + commit 780ba3233618393835970bac4cf8aab713f4d7fa
34298         * scd/app-common.h (APP_DECIPHER_INFO_NOPAD): New.
34299         * scd/app-openpgp.c (do_decipher): Add arg R_INFO.
34300         * scd/app-nks.c (do_decipher): Add arg R_INFO as a dummy.
34301         * scd/app.c (app_decipher): Add arg R_INFO.
34302         * scd/command.c (cmd_pkdecrypt): Print status line "PADDING".
34303         * agent/call-scd.c (padding_info_cb): New.
34304         (agent_card_pkdecrypt): Add arg R_PADDING.
34305         * agent/divert-scd.c (divert_pkdecrypt): Ditto.
34306         * agent/pkdecrypt.c (agent_pkdecrypt): Ditto.
34307         * agent/command.c (cmd_pkdecrypt):  Print status line "PADDING".
34308         * g10/call-agent.c (padding_info_cb): New.
34309         (agent_pkdecrypt): Add arg R_PADDING.
34310         * g10/pubkey-enc.c (get_it): Use padding info.
34311
34312         agent: Fix two compiler warnings.
34313         + commit 04e2c83f189cc56342e1be784bdc63761ccdb5bb
34314         * agent/command.c (cmd_preset_passphrase, pinentry_loopback): Use %zu
34315         in format string.
34316         * scd/ccid-driver.c (ccid_get_atr): Ditto.
34317         * agent/command-ssh.c (stream_read_string): Init arg STRING_SIZE to
34318         avoid maybe_unitialized warning.
34319
34320 2013-08-27  NIIBE Yutaka  <gniibe@fsij.org>
34321
34322         scd: fix parsing login-data DO.
34323         + commit b6d54f1196d5f110fd94dfd661e74dbc60ca9811
34324         * scd/app-openpgp.c (parse_login_data): Release RELPTR.  Fix parsing.
34325
34326         scd: fix Vega for Alpha reader.
34327         + commit 54cbab29c700db2df74e808f16db49170e6c42f1
34328         * scd/ccid-driver.c (ccid_vendor_specific_init): Fix error handling
34329         and size of command.
34330
34331 2013-08-21  Werner Koch  <wk@gnupg.org>
34332
34333         scd: Make SPRx32 pinpad work with PC/SC on Windows.
34334         + commit 5c5e52df4b92e23045ac87abac09357de58920d4
34335         * scd/apdu.c (CM_IOCTL_GET_FEATURE_REQUEST): Use SCARD_CTL_CODE.
34336         (SCARD_CTL_CODE): Define if not defined.
34337         (reader_table_s): Add is_spr532.
34338         (new_reader_slot): Clear it.
34339         (check_pcsc_pinpad): Set it.
34340         (pcsc_pinpad_verify, pcsc_pinpad_modify): Add fix for SPR532.
34341
34342         scd: Improve --enable-pinpad-varlen.
34343         + commit 7bde2bf3b0ddb5d3515a44879e1a7ddb581a5c0b
34344         * tools/gpgconf-comp.c (gc_options_scdaemon): Add
34345         enable-pinpad-varlen.
34346         * scd/apdu.c (check_pcsc_pinpad): Detect SPRx32 reader.
34347
34348 2013-08-08  Werner Koch  <wk@gnupg.org>
34349
34350         agent: Extend cmd KEYINFO to return data from sshcontrol.
34351         + commit 50c98c7ed6b542857ee2f902eca36cda37407737
34352         * agent/command-ssh.c (struct control_file_s): Rename to
34353         ssh_control_file_s.
34354         (ssh_open_control_file, ssh_close_control_file)
34355         (ssh_read_control_file, ssh_search_control_file): New.
34356         (control_file_t):  Rename and move to ...
34357         * agent/agent.h (ssh_control_file_t): here.
34358         * agent/command.c (do_one_keyinfo): Add args is_ssh, ttl, disabled,
34359         and confirm. Rename unknown keytype indicator from '-' to 'X'.  Extend
34360         output.
34361         (cmd_keyinfo): Add options --ssh-list and --with-ssh.
34362
34363 2013-08-02  Werner Koch  <wk@gnupg.org>
34364
34365         gpg: No need to create a trustdb when encrypting with --always-trust.
34366         + commit 498b9a95dc65c43240835d64cc92d8fb43014d53
34367         * g10/gpg.c (main): Special case setup_trustdb for --encrypt.
34368
34369 2013-08-01  Werner Koch  <wk@gnupg.org>
34370
34371         w32: Fix recent patch 9ff72e4.
34372         + commit ca6fe88c0068f8d45ef39df0fc7b161998a91fe9
34373         * common/homedir.c (check_portable_app): Fix the name of the control
34374         file.
34375
34376         agent: Include missing prototype.
34377         + commit ef6a6d973c2bcc54006c04dc41f978ff01005c97
34378         * agent/protect.c: Include cvt-openpgp.h.
34379
34380         w32: Add code to support a portable use of GnuPG.
34381         + commit 9ff72e4e7e4f56c241a525479a94ed4c95efc23f
34382         * common/homedir.c (w32_bin_is_bin, w32_portable_app) [W32]: New.
34383         (check_portable_app) [W32]: New.
34384         (standard_homedir, default_homedir) [W32]: Support the portable flag.
34385         (w32_rootdir, w32_commondir) [W32]: Ditto.
34386         (gnupg_bindir, gnupg_cachedir, dirmngr_socket_name) [W32]: Ditto.
34387         * common/logging.h (JNLIB_LOG_NO_REGISTRY): New.
34388         * common/logging.c (no_registry): New variable.
34389         (log_set_prefix, log_get_prefix): Set/get that variable.
34390         (do_logv): Do not check the registry if that variable is set.
34391
34392         Silence compiler warning about deprecated Libgcrypt symbols.
34393         + commit db4651734fe91935b17876dc9194329b00066eff
34394         * configure.ac (AH_BOTTOM): Define GCRYPT_NO_DEPRECATED.
34395
34396         dirmngr: Define missing LDAP constant.
34397         + commit ef2e2e54020c3475bf2129c3ec8360c7bad3a6c9
34398         * dirmngr/ldap-url.c (LDAP_SCOPE_DEFAULT): Define if missing.
34399
34400         scd: Fix a syntax error for Apple and Windows.
34401         + commit 25b0357bf0a4861a751cfbc3e0335ae05c8b2b1b
34402         * scd/apdu.c (pcsc_dword_t) [W32]: Fix syntax error.
34403
34404         common: Fix a build error when using adns.
34405         + commit ffa7472db551f12f66b9789c31fabb5fc80cc13a
34406         * common/dns-cert.c (get_dns_cert) [USE_ADNS]: Fix synatx error.
34407
34408 2013-07-31  Werner Koch  <wk@gnupg.org>
34409
34410         common: Comment out unused code.
34411         + commit f101f34fffee4a02e7a5f62b59667e45e50e8325
34412         * common/w32-reg.c (write_w32_registry_string): Comment out.
34413
34414         dirmngr: Remove unused file.
34415         + commit 2830fcb83c99289a49da0e111766daf2d9a1fa3b
34416         * dirmngr/get-path.c: Remove.
34417
34418 2013-06-27  Werner Koch  <wk@gnupg.org>
34419
34420         sm: Remove cruft from source files.
34421         + commit f254497e09fa4e0e24e63d14f7316fc31c938844
34422         * sm/keydb.c, sm/keydb.h: Remove disabled code parts.
34423
34424         Prepare for newer automake versions.
34425         + commit 043e2728c813299fafcf62cd125ecf872b26179e
34426         * configure.ac (AM_INIT_AUTOMAKE): Replace 2 argument form by the
34427         option form.  Add options from the top Makefile.
34428         (AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADER.
34429         * Makefile.am (AUTOMAKE_OPTIONS): Remove.
34430
34431         * kbx/Makefile.am: Remove INCLUDES.  Include cmacros.am.  FActor some
34432         AM_CPPFLAGS options to  AM_CFLAGS.
34433
34434 2013-06-26  Werner Koch  <wk@gnupg.org>
34435
34436         Fix Makefile regression.
34437         + commit 136f190a2f20c6ec4d5c3ca3ac7f0440c14e4dc2
34438         * agent/Makefile.am (gpg_agent_DEPENDENCIES): Remove cruft from wrong
34439         resolve conflict 2013-04-25.
34440         (gpg_agent_DEPENDENCIES): Remove obsolete gpg_agent_res_deps
34441         (gpg_agent_LDFLAGS): Remove obsolete gpg_agent_res_ldflags.
34442
34443 2013-05-22  Werner Koch  <wk@gnupg.org>
34444
34445         Implement unattended OpenPGP secret key import.
34446         + commit 7777e68d0482c942f527e91c04adbcfb40bc8bef
34447         * agent/command.c (cmd_import_key): Add option --unattended.
34448         * agent/cvt-openpgp.c (convert_transfer_key): New.
34449         (do_unprotect): Factor some code out to ...
34450         (prepare_unprotect): new function.
34451         (convert_from_openpgp): Factor all code out to ...
34452         (convert_from_openpgp_main): this.  Add arg 'passphrase'.  Implement
34453         openpgp-native protection modes.
34454         (convert_from_openpgp_native): New.
34455         * agent/t-protect.c (convert_from_openpgp_native): New dummy fucntion
34456         * agent/protect-tool.c (convert_from_openpgp_native): Ditto.
34457         * agent/protect.c (agent_unprotect): Add arg CTRL.  Adjust all
34458         callers.  Support openpgp-native protection.
34459         * g10/call-agent.c (agent_import_key): Add arg 'unattended'.
34460         * g10/import.c (transfer_secret_keys): Use unattended in batch mode.
34461
34462         New debug functions log_printcanon and log_printsexp.
34463         + commit cb6a64bb78296c8e9f72df0c482ff847e89a1541
34464         * common/sexputil.c (sexp_to_string, canon_sexp_to_string): New.
34465         (log_printcanon, log_printsexp): New.
34466
34467         agent: Fix length detection of canonical formatted openpgp keys.
34468         + commit 0f0e0559f9b160824f10dc17b389268cdb53aea4
34469         * agent/command.c (cmd_import_key): Pass 0 instead of KEYLEN to
34470         gcry_sexp_canon_len.
34471
34472         agent: New option --disable-check-own-socket.
34473         + commit f2d8a14e1b12534eba69d595a62c78f92331e11b
34474         * agent/gpg-agent.c (oDisableCheckOwnSocket): New.
34475         (disable_check_own_socket): New.
34476         (parse_rereadable_options): Set new option.
34477         (check_own_socket): Implement new option.
34478
34479 2013-05-07  Werner Koch  <wk@gnupg.org>
34480
34481         w32: Add icons and version information.
34482         + commit 88e24341e57c96e31a25e92e09d67989e64cc1c1
34483         * common/gnupg.ico: New.  Take from artwork/gnupg-favicon-1.ico.
34484         * agent/gpg-agent-w32info.rc: New.
34485         * g10/gpg-w32info.rc: New.
34486         * scd/scdaemon-w32info.rc: New.
34487         * sm/gpgsm-w32info.rc: New.
34488         * tools/gpg-connect-agent-w32info.rc: New.
34489         * common/w32info-rc.h.in: New.
34490         * configure.ac (BUILD_REVISION, BUILD_FILEVERSION, BUILD_TIMESTAMP)
34491         (BUILD_HOSTNAME): New.
34492         (AC_CONFIG_FILES): Add w32info-rc.h.
34493         * am/cmacros.am (.rc.o): New rule.
34494         * agent/Makefile.am, common/Makefile.am, g10/Makefile.am
34495         * scd/Makefile.am, sm/Makefile.am, tools/Makefile.am: Add stuff to
34496         build resource files.
34497
34498 2013-05-07  Ian Abbott  <abbotti@mev.co.uk>
34499
34500         doc: fix some Texinfo warnings.
34501         + commit 2c3fc4719b92d9e3ac32efd134a930e1cc126032
34502         * doc/gpg.texi: Fix syntax and add missing menu entries.
34503         * doc/gpgsm.texi: Fix subsectioning.
34504
34505 2013-04-22  Werner Koch  <wk@gnupg.org>
34506
34507         Fix potential heap corruption in "gpg -v --version".
34508         + commit 151b78cc26d728e9eb42620e0caf8c6f4bd7f839
34509         * g10/gpg.c (build_list): Rewrite to cope with buffer overflow in
34510         certain locales.
34511
34512 2013-04-19  Werner Koch  <wk@gnupg.org>
34513
34514         gpgsm: Remove non-implemented commands from --help.
34515         + commit d6798d261cbe6519ef5b3ebb474e2ad348442c0c
34516         * sm/gpgsm.c (opts): Removed commands --clearsign, --symmetric,
34517         --send-keys, and --recv-keys.
34518
34519 2013-04-19  Daiki Ueno  <ueno@gnu.org>
34520
34521         Make sure to call fflush if estream_t is backed with stdio.
34522         + commit e498180d5647d3427a7d7e6c82a9f09cf1ba439d
34523         * common/estream.c (es_func_fp_write): Call fflush after fwrite.
34524
34525 2013-04-19  Werner Koch  <wk@gnupg.org>
34526
34527         doc: Formatting fixes.
34528         + commit ff6115227a1ced14e2fb3d160a12181b9dfbc502
34529         * doc/Makefile.am (.fig.jpg): Correct to use -L jpeg.
34530         * doc/gpg.texi: Fix cross reference for --options.
34531         * doc/gpgsm.texi: Likewise.
34532         * doc/gpl.texi: Fix enumerate and re-indent examples.
34533
34534 2013-04-01  NIIBE Yutaka  <gniibe@fsij.org>
34535
34536         scd: move SCDaemon to libexecdir.
34537         + commit 021767d8aa11aac8ac87dc3a31969ee6cfa65966
34538         * common/homedir.c (gnupg_module_name): It's now libexecdir.
34539         * scd/Makefile.am (libexec_PROGRAMS): Add scdaemon
34540         (bin_PROGRAMS): Remove scdaemon.
34541
34542 2013-03-29  Werner Koch  <wk@gnupg.org>
34543
34544         copyright assignments are not anymore required.
34545         + commit 07227279c44e3af0939f90025a0d22b782d0f185
34546
34547
34548 2013-03-26  NIIBE Yutaka  <gniibe@fsij.org>
34549
34550         scd: PC/SC status fix.
34551         + commit 64b1a2cf6f18348544a2d2cd4d49fd27bf01c150
34552         * scd/apdu.c (pcsc_get_status_direct): Check PCSC_STATE_MUTE only when
34553         PCSC_STATE_PRESENT.
34554
34555         * scd/pcsc-wrapper.c (handle_status): Ditto.
34556
34557         scd: PC/SC cleanup (more).
34558         + commit b9aceaa442914beb4f5359283053b43ba5a46b4c
34559         * scd/apdu.c (control_pcsc_direct, control_pcsc_wrapped, control_pcsc)
34560         (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify): Use
34561         pcsc_dword_t.
34562
34563         scd: call update_card_removed only when detecting removal.
34564         + commit 1062893832bb15eaac853f52e1cb673e5e03790a
34565         * scd/command.c (update_reader_status_file): Add condition
34566         vr->status == 0.
34567
34568 2013-03-22  NIIBE Yutaka  <gniibe@fsij.org>
34569
34570         scd: PC/SC cleanup.
34571         + commit ee95c23fcdc6673db0fc7287ab2197915d9b55b3
34572         * scd/apdu.c (pcsc_dword_t): New.  It was named as DWORD (double-word)
34573         when a word was 16-bit.
34574         (struct reader_table_s): Fixes for types.
34575         (struct pcsc_readerstate_s) [__APPLE__]: Enable #pragma pack(1).
34576         Throughout: Fixes for types.
34577
34578         * scd/pcsc-wrapper.c: Likewise.
34579
34580 2013-03-21  NIIBE Yutaka  <gniibe@fsij.org>
34581
34582         po: Enable ja.po.
34583         + commit a75a08d6e30e93e1793aa78a15d473a3ea7623cb
34584         * po/LINGUAS: Enable ja.po.
34585
34586         scd: change default value of pinpad maxlen.
34587         + commit ca66f5c779af74d0eb7221afd7a9707201931e50
34588         * scd/apdu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Default value
34589         of maxlen for pinpad input is now 15 (was: 25).
34590
34591         * scd/ccid-driver.c (ccid_transceive_secure): Likewise.
34592
34593 2013-03-20  Werner Koch  <wk@gnupg.org>
34594
34595         Add code to allow for late memory cleanup.
34596         + commit 2739834206f23833161898a73427b8a9c6d5d26d
34597         * common/init.c (mem_cleanup_item_t): New.
34598         (run_mem_cleanup): New.
34599         (_init_common_subsystems): Add an atexit for it.
34600         (register_mem_cleanup_func): New.
34601
34602         * g10/kbnode.c (cleanup_registered): New.
34603         (release_unused_nodes): New.
34604         (alloc_node): Call register_mem_cleanup_func.
34605
34606         kbx: Remove unused macro.
34607         + commit 44159b681f8f09000fabfc3ee294d5821578d3a6
34608         * kbx/keybox.h (KEYBOX_WITH_OPENPGP): Remove unused macro.
34609
34610 2013-03-19  Werner Koch  <wk@gnupg.org>
34611
34612         gpg: Print indicator for unknown key capability.
34613         + commit c4dbd1b2de8ae3847a040444e86500848868bcf4
34614         * g10/keylist.c (print_capabilities): Print '?' for unknown usage.
34615
34616 2013-03-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
34617
34618         gpg: Allow setting of all zero key flags.
34619         + commit b693ec02c467696bf9d7324dd081e279f9965151
34620         * g10/keygen.c (do_add_key_flags): Do not check for empty key flags.
34621
34622 2013-03-19  Werner Koch  <wk@gnupg.org>
34623
34624         gpg: Distinguish between missing and cleared key flags.
34625         + commit 4bde12206c5bf199dc6e12a74af8da4558ba41bf
34626         * include/cipher.h (PUBKEY_USAGE_NONE): New.
34627         * g10/getkey.c (parse_key_usage): Set new flag.
34628
34629 2013-03-15  NIIBE Yutaka  <gniibe@fsij.org>
34630
34631         scd: ccid-driver supporting larger APDU.
34632         + commit 76dc5c08dc2686eef32e1bd221c60fe91201246f
34633         * scd/ccid-driver.c (ccid_transceive_apdu_level): Support larger
34634         APDU.
34635
34636         scd: fix missing close paren.
34637         + commit 006782068e4d2a9413770400494421a2e9726ee7
34638         * scd/app-openpgp.c (du_auth): Fix.
34639
34640 2013-03-09  NIIBE Yutaka  <gniibe@fsij.org>
34641
34642         scd: support ECDSA signing.
34643         + commit 73ad742deacfe2bf7d6efc7cc30f9ced2d83521a
34644         * scd/app-openpgp.c (do_sign): Only prepend message digest block
34645         for RSA or do_auth.
34646         (do_auth): Remove message digest block for ECDSA.
34647
34648 2013-03-08  NIIBE Yutaka  <gniibe@fsij.org>
34649
34650         scd: support ECDSA public key.
34651         + commit 010bc7f4f06d8affb98950e1adc76c68bfcc9abb
34652         * scd/app-openpgp.c (key_type_t): New.
34653         (CURVE_NIST_P256, CURVE_NIST_P384, CURVE_NIST_P521): New.
34654         (struct app_local_s): Change keyattr to have key_type and union.
34655         (get_ecc_key_parameters, get_curve_name): New.
34656         (send_key_attr, get_public_key): Support ECDSA.
34657         (build_privkey_template, do_writekey, do_genkey): Follow the change
34658         of the member KEY_ATTR.
34659         (parse_historical): New.
34660         (parse_algorithm_attribute): Support ECDSA.
34661
34662 2013-03-05  Werner Koch  <wk@gnupg.org>
34663
34664         Require libgpg-error 1.11.
34665         + commit 5bac5040dc93343e1e89916b263390b0e52040bf
34666         * configure.ac: Require libgpg-error 1.11.
34667         * common/util.h (GPG_ERR_NO_KEYSERVER, GPG_ERR_INV_CURVE)
34668         (GPG_ERR_UNKNOWN_CURVE): Remove fallback definitions.
34669
34670 2013-02-28  NIIBE Yutaka  <gniibe@fsij.org>
34671
34672         agent: pksign result conversion to sexp to upper layer.
34673         + commit ef1983d58b913306e9bf02a7189e530123839c59
34674         * agent/agent.h (divert_pksign): Add R_SIGLEN argument.
34675         * agent/divert-scd.c (divert_pksign): Return length at R_SIGLEN.
34676         * agent/call-scd.c (agent_card_pksign): Move composition of
34677         S-expression to...
34678         * agent/pksign.c (agent_pksign_do): ... here.
34679
34680 2013-02-22  Werner Koch  <wk@gnupg.org>
34681
34682         Use has_leading_keyword in the assuan callbacks.
34683         + commit 585d5c62eece23911a768d97d11f159be138b13d
34684         * agent/call-pinentry.c (inq_quality): Use has_leading_keyword.
34685         * agent/call-scd.c (inq_needpin, inq_writekey_parms): Ditto.
34686         * g10/call-agent.c (inq_writecert_parms, keyinfo_status_cb): Ditto.
34687         (inq_genkey_parms, inq_ciphertext_cb, inq_import_key_parms): Ditto.
34688         * g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
34689         * sm/call-agent.c (default_inq_cb, inq_ciphertext_cb): Ditto.
34690         (inq_genkey_parms, istrusted_status_cb, learn_status_cb): Ditto.
34691         (keyinfo_status_cb, inq_import_key_parms): Ditto.
34692         * sm/call-dirmngr.c (inq_certificate, isvalid_status_cb): Ditto.
34693         (lookup_status_cb, run_command_inq_cb, run_command_status_cb): Ditto.
34694
34695         Remove some unused variables.
34696         + commit c6b8f05517228c6aeab28d2bf5da7724c059bb1a
34697         * tools/gpgconf-comp.c (gc_process_gpgconf_conf): Remove unused
34698         used_components.
34699         * agent/command-ssh.c (ssh_signature_encoder_ecdsa): Mark unused arg.
34700         * g13/g13.c (main): Comment variable of yet unimplemented options.
34701
34702         gpg: Fix a memory leak in batch key generation.
34703         + commit 161674118d568025896026ede5e03d26bdfdfa68
34704         * g10/keygen.c (append_to_parameter): New.
34705         (proc_parameter_file): Use new func to extend the parameter list.
34706
34707         * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
34708         gcry_kdf_derive failed.
34709         * g10/keygen.c (proc_parameter_file): Print a diagnostic if
34710         passphrase_to_dek failed.
34711
34712         gpg: Handle the agent's NEW_PASSPHRASE inquiry.
34713         + commit baee681d2406530c45fd6d4bde77193ba23ac263
34714         * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
34715
34716         common: Add func has_leading_keyword.
34717         + commit 2838385e76c8c7108bc949d5a1d1c947051bd5be
34718         * common/stringhelp.c (has_leading_keyword): New.
34719
34720         Remove build hacks for FreeBSD.
34721         + commit 21f5a9ec27c0794141a835a5bb3c69495ee554a6
34722         * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
34723         LDFLAGS.
34724
34725 2013-02-22  NIIBE Yutaka  <gniibe@fsij.org>
34726
34727         agent: fix two bugs.
34728         + commit 3c3648e720b8014828573bd708c88ba4775014e3
34729         * agent/command.c (cmd_keytocard): Decrement KEYDATALEN.
34730         * agent/findkey.c (agent_public_key_from_file): Increment for ELEMS.
34731
34732         gpg: fix keytocard and support ECC card for key attribute.
34733         + commit 7d376ffa321d4af6e62a2bc64ef2b8574b122b1a
34734         * g10/call-agent.c (agent_keytocard): Supply PARM arg.
34735         * g10/card-util.c (card_status): Support ECC.
34736         (card_store_subkey): Don't assume RSA.
34737
34738 2013-02-21  Werner Koch  <wk@gnupg.org>
34739
34740         gpg: Fix a memory leak in batch key generation.
34741         + commit 273bb38cd7b517460cb3de67662e96e910104675
34742         * g10/keygen.c (append_to_parameter): New.
34743         (proc_parameter_file): Use new func to extend the parameter list.
34744
34745         * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
34746         gcry_kdf_derive failed.
34747         * g10/keygen.c (proc_parameter_file): Print a diagnostic if
34748         passphrase_to_dek failed.
34749
34750         gpg: Handle the agent's NEW_PASSPHRASE inquiry.
34751         + commit 18a261b65fd77a9e434b13483ceaaaf2176f1197
34752         * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
34753
34754         common: Add func has_leading_keyword.
34755         + commit 4af0c62b15c51056dc293c8e3b907e7c41fbf08c
34756         * common/stringhelp.c (has_leading_keyword): New.
34757
34758 2013-02-20  Werner Koch  <wk@gnupg.org>
34759
34760         Remove build hacks for FreeBSD.
34761         + commit 8e5766c38f3ac376fb8e7c7f2b0f65de23d84cbe
34762         * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
34763         LDFLAGS.
34764
34765 2013-02-12  NIIBE Yutaka  <gniibe@fsij.org>
34766
34767         gpg: Implement card_store_subkey again.
34768         + commit b90506ea220860c89128f002bd593d0462a08d73
34769         * g10/call-agent.h (agent_keytocard): New.
34770         * g10/call-agent.c (agent_keytocard): New.
34771         * g10/card-util.c (replace_existing_key_p): Returns 1 when replace.
34772         (card_generate_subkey): Check return value of replace_existing_key_p.
34773         (card_store_subkey): Implement again using agent_keytocard.
34774
34775         agent: Add KEYTOCARD command.
34776         + commit 30f8a3c8736451d8c06ef72521a8da5eabf23016
34777         * agent/agent.h (divert_writekey, agent_card_writekey): New.
34778         * agent/call-scd.c (inq_writekey_parms, agent_card_writekey): New.
34779         * agent/command.c (cmd_keytocard, hlp_keytocard): New.
34780         (register_commands): Add cmd_keytocard.
34781         * agent/divert-scd.c (divert_writekey): New.
34782
34783         Japanese: update po and doc.
34784         + commit 595ab0da666c43a1315a72a1346ee149998d8771
34785         * doc/help.ja.txt, po/ja.po: Updated.
34786
34787 2013-02-08  NIIBE Yutaka  <gniibe@fsij.org>
34788
34789         scd: Rename 'keypad' to 'pinpad'.
34790         + commit 7253093addfd82a8dd25cd80e3ba820a85e3c9a7
34791         * NEWS: Mention scd changes.
34792
34793         * agent/divert-scd.c (getpin_cb): Change message.
34794
34795         * agent/call-scd.c (inq_needpin): Change the protocol to
34796         POPUPPINPADPROMPT and DISMISSPINPADPROMPT.
34797         * scd/command.c (pin_cb): Likewise.
34798
34799         * scd/apdu.c (struct reader_table_s): Rename member functions.
34800         (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify,
34801         check_ccid_pinpad, ccid_pinpad_operation, apdu_check_pinpad
34802         apdu_pinpad_verify, apdu_pinpad_modify): Rename.
34803
34804         * scd/apdu.h (SW_HOST_NO_PINPAD, apdu_check_pinpad)
34805         (apdu_pinpad_verify, apdu_pinpad_modify): Rename.
34806
34807         * scd/iso7816.h (iso7816_check_pinpad): Rename.
34808
34809         * scd/iso7816.c (map_sw): Use SW_HOST_NO_PINPAD.
34810         (iso7816_check_pinpad): Rename.
34811         (iso7816_verify_kp, iso7816_change_reference_data_kp): Follow
34812         the change.
34813
34814         * scd/ccid-driver.h (CCID_DRIVER_ERR_NO_PINPAD): Rename.
34815         * scd/ccid-driver.c (ccid_transceive_secure): Use it.
34816
34817         * scd/app-dinsig.c (verify_pin): Follow the change.
34818         * scd/app-nks.c (verify_pin): Follow the change.
34819
34820         * scd/app-openpgp.c (check_pinpad_request): Rename.
34821         (parse_login_data, verify_a_chv, verify_chv3, do_change_pin): Follow
34822         the change.
34823
34824         * scd/scdaemon.c (oDisablePinpad, oEnablePinpadVarlen): Rename.
34825
34826         * scd/scdaemon.h (opt): Rename to disable_pinpad,
34827         enable_pinpad_varlen.
34828
34829         * tools/gpgconf-comp.c (gc_options_scdaemon): Rename to
34830         disable-pinpad.
34831
34832 2013-02-07  Werner Koch  <wk@gnupg.org>
34833
34834         gpg: Add pinentry-mode feature.
34835         + commit 21feecd48f990b2569cb4b385dea3e57b9501525
34836         * g10/gpg.c: Include shareddefs.h.
34837         (main): Add option --pinentry-mode.
34838         * g10/options.h (struct opt): Add field pinentry_mode.
34839         * g10/passphrase.c: Include shareddefs.h.
34840         (have_static_passphrase): Take care of loopback pinentry_mode.
34841         (read_passphrase_from_fd): Ditto.
34842         (get_static_passphrase): New.
34843         (passphrase_to_dek_ext): Factor some code out to ...
34844         (emit_status_need_passphrase): new.
34845         * g10/call-agent.c (start_agent): Send the pinentry mode.
34846         (default_inq_cb): Take care of the PASSPHRASE inquiry.  Return a
34847         proper error code.
34848         (agent_pksign): Add args keyid, mainkeyid and pubkey_algo.
34849         (agent_pkdecrypt): Ditto.
34850         * g10/pubkey-enc.c (get_it): Pass new args.
34851         * g10/sign.c (do_sign): Pass new args.
34852
34853         * g10/call-agent.c (struct default_inq_parm_s): New.  Change all
34854         similar structs to reference this one.  Change all users and inquire
34855         callback to use this struct, instead of NULL or some undefined but not
34856         used structs.  This change will help to eventually get rid of global
34857         variables.
34858
34859 2013-02-06  Werner Koch  <wk@gnupg.org>
34860
34861         agent: Move a typedef to common and provide parse_pinentry_mode.
34862         + commit 8b2b8dfe5c4cd346bbea2c228e75737bbeeca4c4
34863         * common/agent-opt.c: New.
34864         * common/shareddefs.h: New.
34865         * common/Makefile.am: Add new files.
34866         * agent/agent.h: Include shareddefs.h.
34867         (pinentry_mode_t): Factor out to shareddefs.h.
34868         * agent/command.c (option_handler): Use parse_pinentry_mode.
34869
34870         agent: Return a better error code if no passphrase was given.
34871         + commit 4483a4f0ea030046137ba04905eb5220c14a2161
34872         * agent/protect.c (hash_passphrase): Handle an empty passphrase.
34873
34874 2013-02-05  NIIBE Yutaka  <gniibe@fsij.org>
34875
34876         scd: Fix check_keypad_request.
34877         + commit c27315fc6466cceb862c9e67755a8e044e9b7688
34878         * scd/app-openpgp.c (check_keypad_request): 0 means not to use pinpad.
34879
34880         SCD: Add vendor specific initalization.
34881         + commit e791ac6683bfb90d5e40c0103324784bd58535c9
34882         * scd/ccid-driver.c (ccid_vendor_specific_init): New.
34883         (ccid_open_reader): Call ccid_vendor_specific_init.
34884
34885         SCD: Support P=N format for login data.
34886         + commit 0407e642f796fb2780a77b7a1a86731d0de27e5d
34887         * scd/app-openpgp.c (parse_login_data): Support P=N format.
34888
34889         SCD: Better interoperability.
34890         + commit bd5eded73a1268afdf81482f8408e5f640abf9c4
34891         * scd/apdu.c: Fill bTeoPrologue[2] field.
34892
34893         SCD: Defaults to use pinpad if the reader has the capability.
34894         + commit a9ff97a10f7ae5a703ed1bccba294473ecc88d5d
34895         * scd/app-openpgp.c (struct app_local_s): Remove VARLEN.
34896         (parse_login_data): "P=0" means to disable pinpad.
34897         (check_keypad_request): Default is to use pinpad if available.
34898
34899         SCD: handle keypad request on the card.
34900         + commit 334ba6efa5a05d8849fae213128a0505e7615e13
34901         * scd/app-openpgp.c: Add 2013.
34902         (struct app_local_s): Add keypad structure.
34903         (parse_login_data): Add parsing keypad request on the card.
34904         (check_keypad_request): New.
34905         (verify_a_chv, verify_chv3, do_change_pin): Call check_keypad_request
34906         to determine use of keypad.
34907
34908         SCD: Minor fix of ccid-driver.
34909         + commit d5bf83a24cf3871b7d8cfe61049f70e1e206d09a
34910         * scd/ccid-driver.c (VENDOR_VEGA): Fix typo.
34911
34912         SCD: Add support of Covadis VEGA_ALPHA reader.
34913         + commit 82e1e837c29225cd55642b193cc04ce6191d19bb
34914         * scd/ccid-driver.c: Add 2013.
34915         (VENDER_VEGA, VEGA_ALPHA):New.
34916         (ccid_transceive_secure): VEGA_ALPHA is same firmware as GEMPC_PINPAD.
34917         Change bNumberMessage to 0x01, as it works better (was: 0xff).
34918
34919         SCD: Support fixed length PIN input for keypad (PC/SC).
34920         + commit 3aae780f9debaeb3560ff866b7e09d0923481c57
34921         * scd/apdu.c (pcsc_keypad_verify): SUpport fixed length PIN input for
34922         keypad.
34923         (pcsc_keypad_modify): Likewise.
34924         * scd/ccid-driver.c (ccid_transceive_secure): Clean up.
34925
34926         SCD: Support fixed length PIN input for keypad.
34927         + commit 40a914a2e3052847b49c4b5e8ac8538e97efd18a
34928         * scd/iso7816.h (struct pininfo_s): Remove MODE and add FIXEDLEN.
34929         * scd/app-dinsig.c (verify_pin): Initialize FIXEDLEN to unknown.
34930         * scd/app-nks.c (verify_pin): Likewise.
34931         * scd/app-openpgp.c (verify_a_chv, verify_chv3, do_change_pin):
34932         Likewise.
34933         * scd/apdu.c (check_pcsc_keypad): Add comment.
34934         (pcsc_keypad_verify, pcsc_keypad_modify): PC/SC driver only support
34935         readers with the feature of variable length input (yet).
34936         (apdu_check_keypad): Set FIXEDLEN.
34937         * scd/ccid-driver.c (ccid_transceive_secure): Add GEMPC_PINPAD
34938         specific settings.
34939         Support fixed length PIN input for keypad.
34940
34941         SCD: API cleanup for keypad handling.
34942         + commit b526f6e223604b7c1852ef2aab9fc1ea691b1181
34943         * scd/iso7816.h (struct pininfo_s): Rename from iso7816_pininfo_s.
34944         Change meaning of MODE.
34945         (pininfo_t): Rename from iso7816_pininfo_t.
34946         * scd/sc-copykeys.c: Include "iso7816.h".
34947         * scd/scdaemon.c, scd/command.c: Likewise.
34948         * scd/ccid-driver.c: Include "scdaemon.h" and "iso7816.h".
34949         (ccid_transceive_secure): Follow the change of PININFO_T.
34950         * scd/app.c: Include "apdu.h" after "iso7816.h".
34951         * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
34952         (iso7816_change_reference_data_kp): Follow the change of API.
34953         * scd/apdu.c (struct reader_table_s): Change API of CHECK_KEYPAD,
34954         KEYPAD_VERIFY, KEYPAD_MODIFY to have arg of PININFO_T.
34955         (check_pcsc_keypad, check_ccid_keypad): Likewise.
34956         (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise.
34957         (pcsc_keypad_verify, pcsc_keypad_modify, ct_send_apdu)
34958         (pcsc_send_apdu_direct,  pcsc_send_apdu_wrapped, pcsc_send_apdu)
34959         (send_apdu_ccid, ccid_keypad_operation, my_rapdu_send_apdu, send_apdu)
34960         (send_le): Follow the change of API.
34961         * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
34962         (apdu_keypad_modify): Change the API.
34963         * scd/app-dinsig.c, scd/app-nks.c, scd/app-openpgp.c: Follow the
34964         change.
34965
34966         SCD: Clean up.  Remove PADLEN for keypad input.
34967         + commit ca89277cb4cb9558da97a71a4cb070cb77c9b536
34968         * scd/apdu.c (struct pininfo_s): Use iso7816_pininfo_s.
34969         (struct reader_table_s): Remove last arg from check_keypad method.
34970         (check_pcsc_keypad, check_pcsc_keypad): Remove PIN_PADLEN.
34971         (pcsc_keypad_verify, pcsc_keypad_modify): Don't check PIN_PADLEN.
34972         (send_apdu_ccid, ccid_keypad_operation): Remove PIN_PADLEN.
34973         (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify):
34974         Likewise.
34975
34976         * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
34977         (apdu_keypad_modify): Remove PIN_PADLEN.
34978
34979         * scd/ccid-driver.c (ccid_transceive_secure): Remove PIN_PADLEN.
34980
34981         * scd/ccid-driver.h (ccid_transceive_secure): Remove PIN_PADLEN.
34982
34983         * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
34984         (iso7816_change_reference_data_kp): Remove PADLEN.
34985
34986         * scd/iso7816.h (struct iso7816_pininfo_s): Remove PADLEN, PADCHAR.
34987
34988         SCD: Add option enable-keypad-varlen and support for GEMPC_PINPAD.
34989         + commit d9f6cc7502793ed41928042cc2f968c8c7effc22
34990         * scd/scdaemon.h (opt): Add enable_keypad_varlen.
34991         * scd/scdaemon.c (cmd_and_opt_values): Add oEnableKeypadVarlen.
34992         (opts, main): Add oEnableKeypadVarlen.
34993         * scd/ccid-driver.c (GEMPC_PINPAD): New.
34994         (ccid_transceive_secure): Add enable_varlen handling.
34995         Enable GEMPC_PINPAD.
34996
34997 2013-01-30  Werner Koch  <wk@gnupg.org>
34998
34999         Remove unused status codes.
35000         + commit 50a7badbdacac8ba472b35090c1aab4568434d04
35001         * common/status.h (STATUS_BEGIN_STREAM, STATUS_END_STREAM)
35002         (STATUS_SIEXPIRED): Remove unused codes.
35003
35004         gpg: Add status line PINENTRY_LAUNCHED.
35005         + commit 1cd6445eec4c3642ad92afb02f3563a01cc10c10
35006         * common/status.h (STATUS_PINENTRY_LAUNCHED): New.
35007         * g10/server.c (server_local_s): Add field allow_pinentry_notify.
35008         (option_handler): Add option "allow-pinentry-notify".
35009         (gpg_proxy_pinentry_notify): New.
35010         * g10/call-agent.c (default_inq_cb): Factor code out to the new
35011         function.
35012
35013 2013-01-25  NIIBE Yutaka  <gniibe@fsij.org>
35014
35015         agent: Fix a bug of handling return code from npth_join.
35016         + commit 19994466449a93704d38d429ca1ea36f63da0bf0
35017         * agent/call-pinentry.c (agent_popup_message_stop): Fix npth_join
35018         return code.
35019
35020 2013-01-11  Christian Aistleitner  <christian@quelltextlich.at>
35021
35022         gpg: Fix honoring --cert-digest-algo when recreating a cert.
35023         + commit 60c58766aeb847b769372fa981f79abac6014500
35024         * g10/sign.c (update_keysig_packet): Override original signature's
35025         digest algo in hashed data and for hash computation.
35026
35027 2013-01-11  Werner Koch  <wk@gnupg.org>
35028
35029         Fix spurious cruft from configure summary output.
35030         + commit 7a638c094fa1aa7ed1d9caf085af9980a2664d64
35031         * configure.ac (build_scdaemon_extra): Remove $tmp cruft.
35032
35033 2013-01-11  NIIBE Yutaka  <gniibe@fsij.org>
35034
35035         SCD: Hold lock for pinpad input.
35036         + commit 4dddf32c83f52483d95d7770232e9e808558e702
35037         * scd/apdu.c (apdu_check_keypad, apdu_keypad_verify)
35038         (apdu_keypad_modify): Hold lock to serialize communication.
35039
35040 2013-01-08  Werner Koch  <wk@gnupg.org>
35041
35042         kbx: Switch from MD5 to SHA-1 for the checksum.
35043         + commit b11f84b858bad867f1062977a7aba30299157e90
35044         * kbx/keybox-blob.c (put_membuf): Use a NULL buf to store zero bytes.
35045         (create_blob_finish): Write just the needed space.
35046         (create_blob_finish): Switch to SHA-1.
35047         * kbx/keybox-dump.c (print_checksum): New.
35048         (_keybox_dump_blob): Print the checksum and the verification status.
35049
35050         gpg: Cache keybox searches.
35051         + commit 492792378dc7a79316ef742b2ffaa46c6cda282a
35052         * common/iobuf.c (iobuf_seek): Fix for temp streams.
35053         * g10/pubkey-enc.c (get_session_key, get_it): Add some log_clock calls.
35054         * g10/keydb.c (dump_search_desc): New.
35055         (enum_keyblock_states, struct keyblock_cache): New.
35056         (keyblock_cache_clear): New.
35057         (keydb_get_keyblock, keydb_search): Implement a keyblock cache.
35058         (keydb_update_keyblock, keydb_insert_keyblock, keydb_delete_keyblock)
35059         (keydb_rebuild_caches, keydb_search_reset): Clear the cache.
35060
35061         Make log_clock easier to read.
35062         + commit 5c565512b8af73bee2a176530663154b9277ef1c
35063         * common/logging.c (log_clock): Print in microseconds.
35064
35065         gpg: Remove a function wrapper.
35066         + commit f3f5721e6843a08d1011875400f385b8cd5fe226
35067         * g10/keydb.h (keydb_search): Remove macro.
35068         * g10/keydb.c (keydb_search2): Rename to keydb_search.  Change all
35069         callers.
35070
35071 2013-01-08  NIIBE Yutaka  <gniibe@fsij.org>
35072
35073         SCD: Support not-so-smart card readers.
35074         + commit a776f660363d20b6cc023609c4547e0aa8825d97
35075         * scd/ccid-driver.c (struct ccid_driver_s): Add auto_voltage,
35076         auto_param, and auto_pps.
35077         (parse_ccid_descriptor): Set auto_voltage, auto_param, and auto_pps.
35078         Support non-autoconf readers.
35079         (update_param_by_atr): New.
35080         (ccid_get_atr): Use 5V for PowerOn when auto_voltage is not supported.
35081         Use 0x10 when nonnull_nad for SetParameters.
35082         Call update_param_by_atr for parsing ATR, and use param for
35083         SetParameters.
35084         Send PPS if reader requires it and card is negotiable.
35085         When bNadValue in the return values of SetParameters == 0,
35086         clear handle->nonnull_nad flag.
35087
35088 2013-01-07  Werner Koch  <wk@gnupg.org>
35089
35090         gpg: Set the node flags while retrieving a keyblock.
35091         + commit f6d7b3f1ee5eed32bc3257c99cb878091d26c482
35092         * g10/keydb.c (parse_keyblock_image): Add args PK_NO and UID_NO and
35093         set the note flags accordingly.
35094         (keydb_get_keyblock): Transfer PK_NO and UID_NO to parse_keyblock_image.
35095         * kbx/keybox-search.c (blob_cmp_fpr, blob_cmp_fpr_part)
35096         (blob_cmp_name, blob_cmp_mail): Return the key/user number.
35097         (keybox_search): Set the key and user number into the found struct.
35098         (keybox_get_keyblock): Add args R_PK_NO and R_UID_NO and set them from
35099         the found struct.
35100
35101         New function log_clock.
35102         + commit 0baedfd25a4bdc6c8e7aefbd67006b063e2dc33f
35103         * common/logging.c (log_clock): New.
35104         * g10/gpg.c (set_debug): Print clock debug flag.
35105         * g10/options.h (DBG_CLOCK_VALUE, DBG_CLOCK): New.
35106
35107         gpg: Allow searching for user ids in a keybox.
35108         + commit fb31462e7e92d4b19256e6fd40b1b6ffcef2676c
35109         * kbx/keybox-search.c (blob_cmp_name): Add arg X509 and adjust for PGP
35110         use.  Change callers.
35111         (blob_cmp_mail): Add arg X509 and find the mailbox offset for PGP.
35112         Chnage callers.
35113         (has_subject_or_alt): Rename to has_username.
35114         (has_username): Allow blobtype PGP.
35115         (has_mail): Ditto.
35116
35117         gpg: Allow generation of more than 4096 keys in one run.
35118         + commit 7d00e52bd58d9e40c18dcc0122b2c236ef3318f5
35119         * g10/getkey.c (cache_public_key): Make room in the cache if needed.
35120
35121 2013-01-07  NIIBE Yutaka  <gniibe@fsij.org>
35122
35123         Update Japanese Translation.
35124         + commit bb51edc31e6595e38fcbd91d470de57d3a1a7150
35125         * po/ja.po: Fix wrong translations for designated revocation.
35126         Reported by Hideki Saito.
35127
35128         Conflicts:
35129                 po/ja.po
35130
35131 2013-01-05  NIIBE Yutaka  <gniibe@fsij.org>
35132
35133         Update Japanese Translation.
35134         + commit 05a4458e5721a0afd600f0ec908e739fa83d58f2
35135         * po/ja.po: Fix fuzzy translations.
35136
35137 2013-01-03  NIIBE Yutaka  <gniibe@fsij.org>
35138
35139         Update Japanese Translation.
35140         + commit 709a8f8125b9ba5e1ad1e6268cca5ac96d478f63
35141         * po/ja.po: Update with POT.
35142
35143         Update Japanese Translation.
35144         + commit 0fae789c4125dd8492ed25bd6728b5ac98f19729
35145         * po/ja.po: Start from the new one of 2.0.
35146
35147 2012-12-28  Werner Koch  <wk@gnupg.org>
35148
35149         gpg: Add signature cache support to the keybox.
35150         + commit 79f08fb0699f4a065e3a29bc7676a90534d7ba60
35151         * g10/keydb.c (parse_keyblock_image): Add arg SIGSTATUS.
35152         (keydb_get_keyblock): Handle it.
35153         (build_keyblock_image): Add arg SIGSTATUS.
35154         (keydb_insert_keyblock): Handle it.
35155         * kbx/keybox-blob.c (pgp_create_sig_part): Add arg SIGSTATUS.
35156         (_keybox_create_openpgp_blob): Ditto.
35157         * kbx/kbxutil.c (import_openpgp): Adjust for above change.
35158         * kbx/keybox.h (KEYBOX_FLAG_SIG_INFO): New.
35159         * kbx/keybox-search.c (_keybox_get_flag_location): Handle new flag.
35160         (keybox_get_keyblock): Add arg R_SIGSTATUS.
35161         * kbx/keybox-update.c (keybox_insert_keyblock): Add arg SIGSTATUS.
35162
35163         kbxutil: Improve format of the Sig-Expire lines.
35164         + commit 564d10ea5cd29685a00a4096d69ae2476b60506f
35165         * kbx/keybox-dump.c (_keybox_dump_blob): Print the expirate timestamp.
35166
35167         gpg: First working support for keyboxes.
35168         + commit a9863834244fc2a58d8950977243702d12e420a1
35169         * g10/getkey.c (get_pubkey_fast): Improve the assertion.
35170         * kbx/keybox.h: Include iobuf.h.
35171         * kbx/keybox-blob.c (keyboxblob_uid): Add field OFF.
35172         (KEYBOX_WITH_OPENPGP): Remove use of this macro.
35173         (pgp_create_key_part_single): New.
35174         (pgp_temp_store_kid): Change to use the keybox-openpgp parser.
35175         (pgp_create_key_part): Ditto.
35176         (pgp_create_uid_part): Ditto.
35177         (pgp_create_sig_part): Ditto.
35178         (pgp_create_blob_keyblock): Ditto.
35179         (_keybox_create_openpgp_blob): Ditto.
35180         * kbx/keybox-search.c (keybox_get_keyblock): New.
35181         * kbx/keybox-update.c (keybox_insert_keyblock): New.
35182         * g10/keydb.c (parse_keyblock_image):
35183         (keydb_get_keyblock): Support keybox.
35184         (build_keyblock_image): New.
35185         (keydb_insert_keyblock): Support keybox.
35186
35187         * kbx/kbxutil.c (import_openpgp, main): Add option --dry-run and print
35188         a kbx file to stdout.
35189
35190         * kbx/keybox-file.c (_keybox_read_blob2): Allow keyblocks up to 10^6
35191         bytes.
35192
35193         kbxutil: Print algo number and fold similar lines.
35194         + commit f7495f1004071a0ceac394007bb37f88d7a3467f
35195         * kbx/keybox-defs.h (_keybox_openpgp_key_info): Add field ALGO.
35196         * kbx/keybox-openpgp.c (parse_key): Store algo.
35197         * kbx/kbxutil.c (dump_openpgp_key): Print algo number.
35198         * kbx/keybox-dump.c (_keybox_dump_blob): Print identical Sig-Expire
35199         value lines with a range of indices.
35200
35201 2012-12-27  Werner Koch  <wk@gnupg.org>
35202
35203         gpg: First patches to support a keybox storage backend.
35204         + commit 91e61d52539b1808e209c43e51465c76cebb06f9
35205         * kbx/keybox-defs.h (_keybox_write_header_blob): Move prototype to ..
35206         * kbx/keybox.h: here.
35207         * kbx/keybox-init.c (keybox_lock): Add dummy function
35208         * g10/keydb.c: Include keybox.h.
35209         (KeydbResourceType): Add KEYDB_RESOURCE_TYPE_KEYBOX.
35210         (struct resource_item): Add field kb.
35211         (maybe_create_keyring_or_box): Add error descriptions to diagnostics.
35212         Add arg IS_BOX.  Write a header for a new keybox file.
35213         (keydb_add_resource): No more need for the force flag.  Rename the
35214         local variable "force" to "create".  Add URL scheme "gnupg-kbx".  Add
35215         magic test to detect a keybox file.  Add basic support for keybox.
35216         (keydb_new, keydb_get_resource_name, keydb_delete_keyblock)
35217         (keydb_locate_writable, keydb_search_reset, keydb_search2): Add
35218         support for keybox.
35219         (lock_all, unlock_all): Ditto.
35220         * g10/Makefile.am (needed_libs): Add libkeybox.a.
35221         (gpg2_LDADD, gpgv2_LDADD): Add KSBA_LIBS as a workaround.
35222
35223         * g10/keydb.h (KEYDB_RESOURCE_FLAG_PRIMARY)
35224         KEYDB_RESOURCE_FLAG_DEFAULT, KEYDB_RESOURCE_FLAG_READONLY): New.
35225         * g10/gpg.c, g10/gpgv.c (main): Use new constants.
35226
35227 2012-12-20  Werner Koch  <wk@gnupg.org>
35228
35229         gpg: Import only packets which are allowed in a keyblock.
35230         + commit f0b33b6fb8e0586e9584a7a409dcc31263776a67
35231         * g10/import.c (valid_keyblock_packet): New.
35232         (read_block): Store only valid packets.
35233
35234 2012-12-19  Werner Koch  <wk@gnupg.org>
35235
35236         gpg: Make commit 2b3cb2ee actually work.
35237         + commit d61f7402f2b0f6dd288e403ed9408fd65e617f85
35238         * g10/sign.c (update_keysig_packet): Use digest_algo.
35239
35240         (cherry-picked from commit d23ec86095714d388acac14b515445fe69f019e9)
35241
35242         gpg: Suppress "public key already present" in quiet mode.
35243         + commit 8325d616593187ff227853de0295e3269b96edcb
35244         * g10/pkclist.c (find_and_check_key, build_pk_list): Print a
35245         diagnostic only in non-quiet mode.
35246
35247 2012-12-18  Werner Koch  <wk@gnupg.org>
35248
35249         common: Add meta option ignore-invalid-option.
35250         + commit 41d564333d35c923f473aa90625d91f8fe18cd0b
35251         * common/argparse.c (iio_item_def_s, IIO_ITEM_DEF): New.
35252         (initialize): Init field IIO_LIST.
35253         (ignore_invalid_option_p): New.
35254         (ignore_invalid_option_add): New.
35255         (ignore_invalid_option_clear): New.
35256         (optfile_parse): Implement meta option.
35257
35258 2012-12-13  Werner Koch  <wk@gnupg.org>
35259             Hans of Guardian  <hans@guardianproject.info>
35260
35261         utf8conv.c: Add hacks for Android.
35262         + commit 6177fb3c87f485fb654bbba492d04508755718b3
35263         * common/utf8conv.c [HAVE_ANDROID_SYSTEM]: Do not include iconv.h.
35264         (iconv_open, iconv_close, load_libiconv) [HAVE_ANDROID_SYSTEM]: New
35265         dummy functions.
35266         (set_native_charset) [HAVE_ANDROID_SYSTEM]: Force use of "utf-8".
35267         (jnlib_iconv_open) [HAVE_ANDROID_SYSTEM]: Act the same as under W32.
35268         (jnlib_iconv) [HAVE_ANDROID_SYSTEM]: Ditto.
35269         (jnlib_iconv_close) [HAVE_ANDROID_SYSTEM]: Ditto.
35270
35271 2012-12-13  NIIBE Yutaka  <gniibe@fsij.org>
35272
35273         SCD: Fix the process of writing key or generating key.
35274         + commit e7dca3e83ebd6df0a7ea55e97c3cd6e91be90af5
35275         * scd/app-openpgp.c (store_fpr): Flush KEY-FPR and KEY-TIME.
35276
35277 2012-12-12  Werner Koch  <wk@gnupg.org>
35278
35279         ssh: Support ECDSA keys.
35280         + commit 649b31c663b8674bc874b4ef283d714a13dc8cfe
35281         * agent/command-ssh.c (SPEC_FLAG_IS_ECDSA): New.
35282         (struct ssh_key_type_spec): Add fields CURVE_NAME and HASH_ALGO.
35283         (ssh_key_types): Add types ecdsa-sha2-nistp{256,384,521}.
35284         (ssh_signature_encoder_t): Add arg spec and adjust all callers.
35285         (ssh_signature_encoder_ecdsa): New.
35286         (sexp_key_construct, sexp_key_extract, ssh_receive_key)
35287         (ssh_convert_key_to_blob): Support ecdsa.
35288         (ssh_identifier_from_curve_name): New.
35289         (ssh_send_key_public): Retrieve and pass the curve_name.
35290         (key_secret_to_public): Ditto.
35291         (data_sign): Add arg SPEC and change callers to pass it.
35292         (ssh_handler_sign_request): Get the hash algo from SPEC.
35293         * common/ssh-utils.c (get_fingerprint): Support ecdsa.
35294
35295         * agent/protect.c (protect_info): Add flag ECC_HACK.
35296         (agent_protect): Allow the use of the "curve" parameter.
35297         * agent/t-protect.c (test_agent_protect): Add a test case for ecdsa.
35298
35299         * agent/command-ssh.c (ssh_key_grip): Print a better error code.
35300
35301 2012-12-11  Werner Koch  <wk@gnupg.org>
35302
35303         ssh: Rewrite a function for better maintainability.
35304         + commit f76a0312c3794afd81fe1e172df15eb0612deae0
35305         * agent/command-ssh.c (ssh_signature_encoder_dsa): Rewrite.
35306
35307 2012-12-10  Werner Koch  <wk@gnupg.org>
35308
35309         ssh: Improve key lookup for many keys.
35310         + commit d2777f84be0ded5906a9bec3bc23cfed0a9be02f
35311         * agent/command-ssh.c: Remove dirent.h.
35312         (control_file_s): Add struct item.
35313         (rewind_control_file): New.
35314         (search_control_file): Factor code out to ...
35315         (read_control_file_item): New.
35316         (ssh_handler_request_identities): Change to iterate over entries in
35317         sshcontrol.
35318
35319         ssh: Cleanup sshcontrol file access code.
35320         + commit 25fb53ab4ae7e1c098500229c776d29b82713a20
35321         * agent/command-ssh.c (SSH_CONTROL_FILE_NAME): New macro to replace
35322         the direct use of the string.
35323         (struct control_file_s, control_file_t): New.
35324         (open_control_file, close_control_file): New.  Use them instead of
35325         using fopen/fclose directly.
35326
35327         agent: Add envvar "gnupg_SSH_AUTH_SOCK_by"
35328         + commit 36ba7845995dd3caf8faeec3e09b3ffb879fc29b
35329         * agent/gpg-agent.c (main): Pass new envar gnupg_SSH_AUTH_SOCK_by to
35330         an invoked process.
35331
35332         config: Update npth.m4.
35333         + commit ceab60b59d907354d323ace09d7b3f2d36d330fb
35334         * m4/npth.m4: Take from current npth master.
35335
35336 2012-12-04  NIIBE Yutaka  <gniibe@fsij.org>
35337
35338         Revert SCD changes of 2010-05-03.
35339         + commit 1e1326aeb8923782138e133f091afec41d969c40
35340         * scd/apdu.c (pcsc_no_service): Remove.
35341         (open_pcsc_reader_direct, open_pcsc_reader_wrapped): Remove
35342         pcsc_no_service support.
35343         (apdu_open_reader): Remove R_NO_SERVICE.
35344         * scd/apdu.h (apdu_open_reader): Remove R_NO_SERVICE.
35345         * scd/command.c (reader_disabled): Remove.
35346         (get_current_reader): Follow the change of R_NO_SERVICE.
35347         (open_card, cmd_serialno, scd_command_handler): Remove reader_disabled
35348         support.
35349         * scd/sc-copykeys.c (main): Follow the change of R_NO_SERVICE.
35350
35351         Don't keep opening unavailable card reader.
35352         + commit baf7b09e124f9eb4ca4b8ee02474ee7710a95a40
35353         * scd/command.c (update_reader_status_file): Don't call
35354         get_current_reader.
35355
35356 2012-11-30  David Shaw  <dshaw@jabberwocky.com>
35357
35358         Refresh sample keys.
35359         + commit b8eb2ab56971a309353ae2682bc6ef1357e9ac53
35360
35361
35362         Adjust awk to not add trailing whitespace.
35363         + commit 3f8ad564674431b4c0c6cff259f02248c80a6ef9
35364         * mksamplekeys: Tweak awk script to not add trailing whitespace to
35365           blank lines (makes git pre-commit hook unhappy)
35366
35367 2012-11-29  David Shaw  <dshaw@jabberwocky.com>
35368
35369         The keyserver search menu should honor --keyid-format.
35370         + commit 7602d9e3edda99b0b65ba928eef435dab04ecd09
35371         * keyserver.c (print_keyrec): Honor --keyid-format when getting back
35372           full fingerprints from the keyserver (the comment in the code was
35373           correct, the code was not).
35374
35375 2012-11-27  Werner Koch  <wk@gnupg.org>
35376
35377         Fix printing of ECC algo names in hkp keyserver listings.
35378         + commit 3d2da6c82163ffbc2e827abc4144dc3197ed53db
35379         * g10/keyserver.c (print_keyrec): Map OpenPGP algorithm ids.
35380
35381 2012-11-26  Ben Kibbey  <bjk@luxsci.net>
35382
35383         Check for inet_addr() in -lnsl.
35384         + commit 66331e138ec17e176cc3f45bb095820866d5358c
35385         * configure.ac: Check for inet_addr() in libnsl.
35386
35387 2012-11-20  Werner Koch  <wk@gnupg.org>
35388
35389         Do not use a broken ttyname.
35390         + commit 835698b72bc509565aad52b0753f1c56c1a8f062
35391         * configure.ac (HAVE_BROKEN_TTYNAME): New ac_define set for Android
35392         systems.
35393         * common/util.h (gnupg_ttyname): New macro.  Change all callers of
35394         ttyname to use this macro instead.
35395         (ttyname) [W32]: Rename to _gnupg_ttyname and use also if
35396         HAVE_BROKEN_TTYNAME is defined.
35397         * common/simple-pwquery.c (agent_send_all_options): Keep on using
35398         ttyname unless HAVE_BROKEN_TTYNAME is set.  This is because this file
35399         may be used standalone.
35400
35401 2012-11-16  Werner Koch  <wk@gnupg.org>
35402
35403         Fix non-portable use of chmod in autogen.sh.
35404         + commit e7bc5012c568da9ceb0a80a8f3fe3edf3dac9564
35405         * autogen.sh: Remove option -c from chmod.
35406
35407         Improve parsing of the GIT revision number.
35408         + commit 011faa0c68cf0c628ef581193166e9ac9bf22b71
35409         * configure.ac (mmm4_revision): Use git rev-parse.
35410
35411         Add an OpenPGP card vendor.
35412         + commit ac775780fef3ef63f896e822add9ff6ea7e5119c
35413         * g10/card-util.c (get_manufacturer): Add Yubico.
35414
35415 2012-11-06  Werner Koch  <wk@gnupg.org>
35416
35417         agent: Use wipememory instead of memset in one place.
35418         + commit 9f0e9ea80ca30269770eb955e33b54401bff917f
35419         * agent/command.c (clear_outbuf): Use wipememory.  Suggested by Ben
35420         Kibbey.
35421
35422         Allow decryption with card keys > 3072 bits.
35423         + commit 905b6a36d3ca21b2f619721e1de892398e5eb759
35424         * scd/command.c (MAXLEN_SETDATA): New.
35425         (cmd_setdata): Add option --append.
35426         * agent/call-scd.c (agent_card_pkdecrypt): Use new option for long
35427         data.
35428
35429         * scd/app-openpgp.c (struct app_local_s): Add field manufacturer.
35430         (app_select_openpgp): Store manufacturer.
35431         (do_decipher): Print a note for broken cards.
35432
35433 2012-11-02  NIIBE Yutaka  <gniibe@fsij.org>
35434
35435         agent: Fix wrong use of gcry_sexp_build_array.
35436         + commit 8f8c29d24ca13f987e6c118702b428a2051b7072
35437         * findkey.c (agent_public_key_from_file): Fix use of
35438         gcry_sexp_build_array.
35439
35440 2012-10-31  NIIBE Yutaka  <gniibe@fsij.org>
35441
35442         SCD: Upon error, open_pcsc_reader_wrapped does same as _direct.
35443         + commit 8df89f3e9cf0255f11011c2f1df0d419a5c23a8c
35444         * scd/apdu.c (PCSC_E_NO_SERVICE): New.
35445         (open_pcsc_reader_direct): Use PCSC_E_NO_SERVICE.
35446         (open_pcsc_reader_wrapped): Set pcsc_no_service.
35447
35448 2012-08-24  Werner Koch  <wk@gnupg.org>
35449
35450         Update and enable French translation.
35451         + commit 76055d49d1c8b8e4f6245e6729cae81b1eaecbf6
35452         * po/fr.po: Update.
35453         * po/LINGUAS: Enable fr.
35454
35455 2012-08-24  David Prévot  <taffit@debian.org>
35456
35457         Fix typos spotted during translations.
35458         + commit ba591e2f14c0d85ba15346ffd04b9e7d72ec89dc
35459         * agent/genkey.c: s/to to/to/
35460         * sm/*.c: s/failed to allocated/failed to allocate/
35461         * sm/certlist.c, ./dirmngr/validate.c: s/should have not/should not have/
35462         * g10/seskey.c: missing closing parenthesis
35463         * dirmngr/crlcache.c: s/may has/may have/
35464
35465         Consistency fix:
35466
35467         * g10/gpg.c, kbx/kbxutil.c, sm/gpgsm.c: uppercase after Syntax
35468         * dirmngr/dirmngr_ldap: no period in Syntax
35469         * dirmngr/dirmngr-client.c: infinitive for option description:
35470                 s/certificates are expected/expect certificates/
35471
35472         Keep previous msgids of translated messages.
35473         + commit bf95408fc33709d154cd41566d33af3ec3c48886
35474         * po/Makefile.in.in: Use --previous with msgmerge.
35475
35476 2012-08-24  Hans-Christoph Steiner  <hans@eds.org>
35477
35478         Fix build system for Android by disabling tests since its x-compiled.
35479         + commit 1da04bfb3f5714a0fa6d0b779d0d2ae4e9544b8f
35480         * configure.ac (HAVE_ANDROID_SYSTEM, RUN_TESTS): New.
35481         (AH_BOTTOM) [__ANDROID__]: Do not re-define ttyname.
35482         * Makefile.am: Depend tests on new RUN_TESTS conditional.
35483
35484 2012-08-24  Werner Koch  <wk@gnupg.org>
35485
35486         Fix left over use of jnlib on some platforms.
35487         + commit 8156a38674421deef6c2eb3e91e0186fe7fe4b26
35488         * tools/watchgnupg.c: Take mischelp.h from common/ and not jnlib/.
35489
35490 2012-06-25  NIIBE Yutaka  <gniibe@fsij.org>
35491
35492         scd: handle reader/token removal.
35493         + commit ca8eec8e28abb8473d02dbaf8d61cfb1094c5c50
35494         * scd/apdu.c (pcsc_error_to_sw): PCSC_E_UNKNOWN_READER means
35495         SW_HOST_NO_READER.
35496
35497 2012-06-05  Werner Koch  <wk@gnupg.org>
35498
35499         Change all quotes in strings and comments to the new GNU standard.
35500         + commit 096e7457ec636bcfcf128678660eb2f2e19f113a
35501         The asymmetric quotes used by GNU in the past (`...') don't render
35502         nicely on modern systems.  We now use two \x27 characters ('...').
35503
35504         The proper solution would be to use the correct Unicode symmetric
35505         quotes here.  However this has the disadvantage that the system
35506         requires Unicode support.  We don't want that today.  If Unicode is
35507         available a generated po file can be used to output proper quotes.  A
35508         simple sed script like the one used for en@quote is sufficient to
35509         change them.
35510
35511         The changes have been done by applying
35512
35513           sed -i "s/\`\([^'\`]*\)'/'\1'/g"
35514
35515         to most files and fixing obvious problems by hand.  The msgid strings in
35516         the po files were fixed with a similar command.
35517
35518 2012-05-24  Werner Koch  <wk@gnupg.org>
35519
35520         Print the hash algorithm in colon mode key listing.
35521         + commit fc00d3fcb201476b3495f47138fa35b71c52f403
35522         * g10/keylist.c (list_keyblock_colon): Print digest_algo.
35523
35524         Fix type conflict warning.
35525         + commit f8a8c71c41bc1893df8af6ce522876ccbf6240a9
35526         * g10/keylist.c: Change min_cert_level to a byte.
35527
35528 2012-05-11  Werner Koch  <wk@gnupg.org>
35529
35530         Switch to the new automagic beta numbering scheme.
35531         + commit 68777b40dcf215305a325185f6bd9cfd6dcc0542
35532         * configure.ac: Add all the require m4 magic.
35533
35534 2012-05-08  Werner Koch  <wk@gnupg.org>
35535
35536         Add tweaks for the not anymore patented IDEA algorithm.
35537         + commit b4d9f8dbc8e074cd91bbd3e2e54e2b77c9268d1a
35538         * g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2
35539         compatibility mode.
35540         * g10/misc.c (idea_cipher_warn): Remove.  Also remove all callers.
35541         * common/status.h (STATUS_RSA_OR_IDEA): Remove.  Do not emit this
35542         status anymore.
35543
35544         po: Update de.po.
35545         + commit 59b77f9ea7dfa4d5c74573d2186c9a3e129ab3bf
35546         * po/de.po: Update.
35547
35548         common: Remove generated files only during maintainer-clean.
35549         + commit d800fa5ce6102e069305f8e1a5d55d18ac3a1993
35550         * common/Makefile.am (CLEANFILES): Rename to MAINTAINERCLEANFILES.
35551
35552 2012-04-30  Werner Koch  <wk@gnupg.org>
35553
35554         agent: Fix deadlock in trustlist due to the switch to npth.
35555         + commit 0f02fba19df16c82ca1ad44a8cb09f952d755598
35556         * agent/trustlist.c (clear_trusttable): New.
35557         (agent_reload_trustlist): Use new function.
35558         (read_trustfiles): Require to be called with lock held.
35559         (agent_istrusted): Factor all code out to ...
35560         (istrusted_internal): new.  Add ALREADY_LOCKED arg.  Make sure the
35561         table islocked.  Do not print TRUSTLISTFLAG stati if called internally.
35562         (agent_marktrusted): Replace calls to agent_reload_trustlist by
35563         explicit code.
35564
35565 2012-04-26  NIIBE Yutaka  <gniibe@fsij.org>
35566
35567         make DNS and URI fields work in gpgsm --gen-key.
35568         + commit 8d7522837c6dba3065d24594bcdbe7b99a702cde
35569         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Actually set mb_uri and
35570         mb_dns.avoid buffer strncpy-induced buffer overrun
35571
35572 2012-04-26  Jim Meyering  <jim@meyering.net>
35573
35574         avoid buffer strncpy-induced buffer overrun.
35575         + commit 20c9ac4df34e25f7085bb4e4ab5ea7223932f5c4
35576         * dirmngr/crlcache.c (open_dir): Ensure that both this_update
35577         and next_update member strings are NUL-terminated.
35578
35579         remove doubled words in a comment.
35580         + commit 6e3882785a629b361c57c8b9d5cad51fb234ac23
35581
35582
35583 2012-04-20  Werner Koch  <wk@gnupg.org>
35584
35585         Change license for some files in common to LGPLv3+/GPLv2+.
35586         + commit 37df3d5f593f76ddbf1b9dc6de0173b7bb85c0ad
35587         Having the LGPL on the common GnuPG code helps to share code
35588         between GnuPG and related projects (like GPGME and Libassuan).  This
35589         is good for interoperability and to reduces bugs.
35590
35591         * common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c
35592         * common/b64enc.c, common/convert.c, common/dns-cert.c
35593         * common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c
35594         * common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c
35595         * common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c
35596         * common/helpfile.c, common/homedir.c, common/http.c, common/http.h
35597         * common/i18n.c, common/init.c, common/init.h, common/iobuf.c
35598         * common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h
35599         * common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h
35600         * common/percent.c, common/pka.c, common/pka.h, common/session-env.c
35601         * common/session-env.h, common/sexp-parse.h, common/sexputil.c
35602         * common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c
35603         * common/ssh-utils.h, common/sysutils.c, common/sysutils.h
35604         * common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h
35605         * common/userids.c, common/userids.h, common/xasprintf.c: Change
35606         license to LGPLv3+/GPLv2+/
35607
35608 2012-04-10  Ben Kibbey  <bjk@luxsci.net>
35609
35610         Fix killing PID -1.
35611         + commit bee0ac28c9c8027540ae56900b9f85e0bd555f1d
35612         When the KILLSCD command had been sent a race condition would occur
35613         causing PID -1 getting killed, which on Linux seems to terminate all
35614         applications for the current user.
35615
35616 2012-04-05  Werner Koch  <wk@gnupg.org>
35617
35618         Do not mix test result with progress lines.
35619         + commit f1e1387bee286c7434f0462185048872bcdb4484
35620         This makes parsing of the results easier.  Fixes bug#1400.
35621
35622         * tests/openpgp/defs.inc (progress_cancel, progress_end)
35623         (progress_new): New.
35624         * tests/openpgp/conventional-mdc.test: Use progress functions
35625         * tests/openpgp/conventional.test: Ditto.
35626         * tests/openpgp/encrypt-dsa.test: Ditto.
35627         * tests/openpgp/encrypt.test: Ditto.
35628         * tests/openpgp/sigs.test: Ditto.
35629
35630 2012-04-04  Ben Kibbey  <bjk@luxsci.net>
35631
35632         Mention status messages in the documentation.
35633         + commit 99fc61f1cf09c7f72a9037d91d3cf0cd2e035ae6
35634         Note INQUIRE_MAXLEN.
35635
35636         Document PASSWD --preset.
35637         + commit a577f06c4aecc0af5b492e15812e9150c747cbe4
35638
35639
35640         Document GENKEY options.
35641         + commit 108e8f622ef9cfa256707debec1d379ce3cf21ca
35642
35643
35644         Document PRESET_PASSPHRASE.
35645         + commit 96e107fc29db625b247022ae1bf2cbe90b939c5d
35646
35647
35648         Document CLEAR_PASSPHRASE.
35649         + commit 26b59d78c43d72fa28609fb2c0d80fb377393127
35650         And describe the --mode=normal option.
35651
35652 2012-03-27  Werner Koch  <wk@gnupg.org>
35653
35654         Fix timegm regression test.
35655         + commit 17499e761e8cd0fe867b5b5f3e42a71b6d45f954
35656         * common/t-timestuff.c (test_timegm): Change test to use January and
35657         not February or December+1.  Bug spotted by Daniel Kahn Gillmor.
35658
35659         Print warning for arguments not considered an option.
35660         + commit de01c51ecb3918f427aa76281351749c8ad07ed6
35661         GnuPG requires that options are given before other arguments.  This
35662         can sometimes be confusing.  We now print a warning if we found an
35663         argument looking alike a long option without being preceded by the
35664         stop option.  This is bug#1343.
35665
35666         * common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New.
35667         * common/argparse.c (arg_parse): Set new flag.
35668         * g10/gpg.c (main): Print the warning.
35669         * agent/gpg-agent.c (main): Ditto.
35670         * dirmngr/dirmngr.c (main): Ditto.
35671         * g13/g13.c (main): Ditto.
35672         * scd/scdaemon.c (main): Ditto.
35673         * sm/gpgsm.c (main): Ditto.
35674         * tools/gpg-connect-agent.c (main): Ditto.
35675         * tools/gpgconf.c (main): Ditto.
35676
35677 2012-03-26  Werner Koch  <wk@gnupg.org>
35678
35679         Allow compress algorithm 0.
35680         + commit 7ddbcb6b6ab8b26c8e609fcd95c2c8a89bc20a7d
35681         * g10/mainproc.c (proc_compressed): Remove superfluous check for
35682         compress algorithm 0.  Reported by pfandrade.  This is bug#1326.
35683
35684         Add mksamplekeys script.
35685         + commit 7441e622ffb3296686bd0d7f04b4051466aaad38
35686         * doc/mksamplekeys: New.
35687
35688 2012-02-28  Marcus Brinkmann  <mb@g10code.com>
35689
35690         Replace npth_yield in busy wait by npth_usleep.
35691         + commit 8f8c6594147608b1021c16fc3561feb96da5d55a
35692         * dirmngr/ldap-wrapper.c (ldap_wrapper_wait_connections): Call
35693         npth_usleep instead of npth_yield.
35694
35695 2012-02-16  Marcus Brinkmann  <mb@g10code.com>
35696
35697         Check for lber and link dirmngr_ldap to it.
35698         + commit 76ff42ef8d1232dd36bf48c1020b0b9b2afb1c7d
35699         * configure.ac (LBER_LIBS, HAVE_LBER): New variables, check for lber.
35700         * dirmngr/Makefile.am (dirmngr_lda_LDADD): Add $(LBER_LIBS).
35701
35702 2012-02-07  Werner Koch  <wk@gnupg.org>
35703
35704         agent: Add pin length field to the shadowed private key format.
35705         + commit b817ae7df947093384a25797999a9aa187e20f9c
35706         This is not yet fully implemented.  It will eventually allow to
35707         support pinpad equipped readers which do not support variable length
35708         pin lengths.
35709         * agent/protect.c (parse_shadow_info): Add optional arg R_PINLEN and
35710         parse pinlen info.  Change all callers to pass NULL for it.
35711
35712         Use new status printing functions.
35713         + commit 12ea5c904c0008a2adec2e8bbe45dac629548e7d
35714         * agent/command.c (cmd_geteventcounter): Get rid of static buffers.
35715         * scd/command.c (cmd_serialno, cmd_learn): Simplify by using
35716         print_assuan_status.
35717
35718         agent: New function agent_print_status.
35719         + commit e78585cd0f553d92f332e33810ab636758bc88a2
35720         * common/asshelp2.c (vprint_assuan_status): New.
35721         (print_assuan_status): Re-implement using above func.
35722         * agent/command.c (agent_print_status): New.
35723
35724         po: Add Ukrainian translation.
35725         + commit 8d8d740bfd73d8764a03220c0b0c949e03fea351
35726         * po/uk.po: New.
35727
35728         common: Replace macro based function calls by using DEFAULT_ERRSOURCE.
35729         + commit 13ec74481ce0137f7a60b3256cc4840073c77efa
35730         * common/dns-cert.h (get_dns_cert): Remove macro.
35731         * common/dns-cert.c (_get_dns_cert): Rename to get_dns_cert.  Replace
35732         arg ERRSOURCE by global DEFAULT_ERRSOURCE.
35733         * common/http.h (http_parse_uri, http_raw_connect, http_open)
35734         (http_open_document, http_wait_response): Remove macros.
35735         * common/http.c (_http_parse_uri, _http_raw_connect, _http_open)
35736         (_http_open_document, _http_wait_response): Remove underscore from
35737         symbols.  Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
35738         * common/ssh-utils.h (ssh_get_fingerprint)
35739         (ssh_get_fingerprint_string): Remove macros.
35740         * common/ssh-utils.h (_ssh_get_fingerprint)
35741         (_ssh_get_fingerprint_string): Remove underscore from symbols.
35742         Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
35743         * common/tlv.h (parse_ber_header, parse_sexp): Remove macros.
35744         * common/tlv.c: Include util.h.
35745         (_parse_ber_header, _parse_sexp): Remove underscore from symbols.
35746         Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
35747
35748 2012-02-06  Werner Koch  <wk@gnupg.org>
35749
35750         Add replacement hack for Android's broken ttyname.
35751         + commit 115a6ed55d1f6be33f66de6734359fa590ca3749
35752         * configure.ac (HAVE_TTYNAME) [__ANDROID__]: Add hack.
35753
35754         agent: Simplify printing of INQUIRE_MAXLEN.
35755         + commit 7981cdd1345d51fd917b2375691ead60c24db2cd
35756         * agent/command.c: Include asshelp.h.
35757         (cmd_pkdecrypt, cmd_genkey, cmd_preset_passphrase)
35758         (pinentry_loopback): Use print_assuan_status for INQUIRE_MAXLEN.
35759
35760         common: Add function print_assuan_status.
35761         + commit 1a0df8506050448f16c63666850e3ae6d94a971b
35762         * common/asshelp2.c: New.
35763         (print_assuan_status): New function.
35764         * common/Makefile.am (common_sources): Add asshelp2.c.
35765
35766         common: Add a global variable to for the default error source.
35767         + commit eb0faef81dae2cba1f62056fdc4dc2a7d58ac86a
35768         For the shared code parts it is cumbersome to pass an error sourse
35769         variable to each function.  Its value is always a constant for a given
35770         binary and thus a global variable makes things a lot easier than the
35771         former macro stuff.
35772         * common/init.c (default_errsource): New global var.
35773         (init_common_subsystems): Rename to _init_common_subsystems.  Set
35774         DEFAULT_ERRSOURCE.
35775         * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT.
35776         (init_common_subsystems): New macro.
35777         * common/util.h (default_errsource): Add declaration.
35778         * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
35779
35780 2012-02-03  Ben Kibbey  <bjk@luxsci.net>
35781
35782         Also let GENKEY and PKDECRYPT send the INQUIRE_MAXLEN status message.
35783         + commit ecda65498ac60dfde50fbbc71cd0cc321d7175a9
35784         * agent/command.c (cmd_pkdecrypt): Send the INQUIRE_MAXLEN status
35785         message before doing the inquire.
35786         (cmd_genkey): Ditto.
35787
35788 2012-02-02  Ben Kibbey  <bjk@luxsci.net>
35789
35790         Inform the client of the preset passphrase length.
35791         + commit 3f7788f2e035eb939abb27b3a53854ec0fc6178c
35792         * agent/command.c (cmd_preset_passphrase): Send the INQUIRE_MAXLEN
35793         status message before inquiring the passphrase.
35794
35795 2012-02-01  David Shaw  <dshaw@jabberwocky.com>
35796
35797         Honor --cert-digest-algo when recreating a cert.
35798         + commit 2b3cb2ee94625498e7a7f939216c9bcddef6ec20
35799         * g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when
35800           recreating a cert.
35801
35802         This is used by various things in --edit-key like setpref, primary,
35803         etc.  Suggested by Christian Aistleitner.
35804
35805 2012-01-27  Werner Koch  <wk@gnupg.org>
35806
35807         gl: Add support for Android to stdint.h replacement.
35808         + commit bdde44ae8d4709e33c09781c3d37a5da2c7a5e0d
35809         * gl/stdint_.h: When included from Bionic <sys/types.h>, just include
35810         the system's <stdint.h>.
35811
35812         gpg-connect-tool: Take the string "true" as a true condition.
35813         + commit 2871422d9a889cb632f59efda4d9cd170fc9fca7
35814         * tools/gpg-connect-agent.c (main): Handle strings "true" and "yes" in
35815         conditions as expected.
35816
35817 2012-01-26  Ben Kibbey  <bjk@luxsci.net>
35818
35819         Return GPG_ERR_CARD_NOT_PRESENT when pinentry-mode=loopback.
35820         + commit cf748e8736b984194345bfd74887b35d3d23fa37
35821         Since there isn't a way to prompt the user to insert the smartcard when
35822         pinentry-mode=loopback, return GPG_ERR_CARD_NOT_PRESENT instead of
35823         GPG_ERR_NO_PIN_ENTRY.
35824
35825         * agent/divert-scd.c (ask_for_card): Return GPG_ERR_CARD_NOT_PRESENT
35826         when pinentry-mode=loopback.
35827
35828         Also check for GPG_ERR_ASS_CANCELED during an inquire.
35829         + commit 3da10eefcb09a520f11e4fae7f59a33f80ffba69
35830         Fix pinentry-mode=loopback when cancelling an inquire from scdaemon.
35831         This is similar to commit 4f21f8d but for both protocol command
35832         cancellation and pinentry cancellation.
35833
35834         * agent/call-scd.c (agent_card_pkdecrypt): Check for
35835         GPG_ERR_ASS_CANCELED.
35836         (agent_card_pksign): Ditto.
35837
35838 2012-01-25  Werner Koch  <wk@gnupg.org>
35839
35840         nPth is now a hard requirement for GnuPG.
35841         + commit 001352077cdc7e402421c77328bea1a052005673
35842         * configure.ac: Remove cruft to allow building without npth.
35843
35844         Require libassuan 2.1.0.
35845         + commit c254d0f0d13a54777a62dad8f78a8f287d6ae565
35846         * configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.1.0.  This is due to
35847         the npth changes.
35848
35849         Fix strerror vs. gpg_strerror usage.
35850         + commit 2be7818c6d916a69ffdf88cce32960949a56e893
35851         This bug was introduced by the migration to npth.
35852         * agent/gpg-agent.c (handle_connections): Use strerror.
35853
35854         Add missing variable.
35855         + commit a55d2e16f1090264338dc3ad0b2afca28db27c09
35856         * agent/gpg-agent.c (handle_connections) [!W32]: Add missing variable.
35857
35858 2012-01-25  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
35859
35860         Port LDAP wrapper to NPTH.
35861         + commit 4074f966276be10a794fd63a7f443b9d974d3982
35862         * agent/gpg-agent.c (handle_connections): Handle error.
35863         * dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c: Port to NPTH.
35864
35865         Port Windows code to NPTH.
35866         + commit ccbb4c3652ee72386b8889358b829e256e1ebcda
35867         * agent/gpg-agent.c (get_agent_ssh_socket_name): Use
35868         INVALID_HANDLE_VALUE instead of 0.
35869         (handle_signal) [!HAVE_W32_SYSTEM]: Don't define.
35870         (handle_connections): Port Windows code to NPTH.
35871         * dirmngr/dirmngr.c (handle_connections): Port Windows code to NPTH.
35872         * g13/g13.c (handle_connections): Port Windows code to NPTH.
35873         * scd/scdaemon.c (handle_connections): Port Windows code to NPTH.
35874
35875         Port to npth.
35876         + commit 7a7a59782766a8bde0c3e7156d14bb2b0e4a3951
35877         * configure.ac: Don't check for PTH but for NPTH.
35878         (AH_BOTTOM): Remove PTH_SYSCALL_SOFT.
35879         (have_pth): Rename to ...
35880         (have_npth): ... this.
35881         (USE_GNU_NPTH): Rename to ...
35882         (USE_GNU_PTH): ... this.
35883         * m4/npth.m4: New file.
35884         * agent/Makefile.am, agent/cache.c, agent/call-pinentry.c,
35885         agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c,
35886         agent/trustlist.c, common/Makefile.am, common/estream.c,
35887         common/exechelp-posix.c, common/exechelp-w32.c,
35888         common/exechelp-w32ce.c, common/http.c, common/init.c,
35889         common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c,
35890         dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c,
35891         dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am,
35892         g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am,
35893         scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c,
35894         scd/scdaemon.c, tools/Makefile.am: Port to npth.
35895
35896 2012-01-25  Werner Koch  <wk@gnupg.org>
35897
35898         Require gitlog-to-changelog to be installed.
35899         + commit 495dc68586356891b82a2d2b6367c4131fd17f08
35900         * Makefile.am (GITLOG_TO_CHANGELOG): New.
35901         (gen-ChangeLog): Use installed version of gitlog-to-changelog.
35902
35903 2012-01-20  David Shaw  <dshaw@jabberwocky.com>
35904
35905         Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)
35906         + commit deee8147aab086161c91e6aa6fb41d7148a630f6
35907         * g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level
35908
35909         * g10/trustdb.c (check_trustdb_stale): Request a rebuild if
35910           pending_check_trustdb is true (set when we detect a trustdb
35911           parameter has changed).
35912
35913         * g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons
35914           listing for min_cert_level not matching.
35915
35916         * g10/tdbio.c (tdbio_update_version_record, create_version_record,
35917           tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record,
35918           tdbio_write_record): Add a byte for min_cert_level in the tdbio
35919           version record.
35920
35921 2012-01-20  Werner Koch  <wk@gnupg.org>
35922
35923         estream: Fix unclean usage of realloc.
35924         + commit e97e2ced6cf3ee295a3cc9f8968969a1910380ea
35925         * common/estream-printf.c (_ESTREAM_PRINTF_MALLOC): Remove.
35926         (_ESTREAM_PRINTF_FREE): Remove.
35927         (_ESTREAM_PRINTF_REALLOC): New.
35928         (fixed_realloc) [!_ESTREAM_PRINTF_REALLOC]): New.
35929         (estream_vasprintf): Use my_printf_realloc instead of my_printf_malloc
35930         and my_printf_free.
35931         (dynamic_buffer_out): Use my_printf_realloc instead of realloc.
35932
35933         Do not copy default merge commit log entries into the ChangeLog.
35934         + commit 7589e43b21c8d80c5a57ecb6eb78dfcd0b5dac46
35935         * scripts/gitlog-to-changelog: Skip merge commits.
35936
35937 2012-01-18  Ben Kibbey  <bjk@luxsci.net>
35938
35939         Add the INQUIRE_MAXLEN status message.
35940         + commit ae981dd8f454e2a8bbc6429bed5abc5e87cc83d5
35941         This status message is used to inform the client of the maximum length
35942         of an inquired passphrase and is used in pinentry-mode=loopback.
35943
35944         * agent/command.c (pinentry_loopback): Send the INQUIRE_MAXLEN status
35945         message before doing the inquire.
35946
35947 2012-01-16  Jim Meyering  <meyering@redhat.com>
35948
35949         yat2m: don't dereference pointer to freed memory.
35950         + commit 4402dc3f0a5c5d0f26ed2ae97f9cda9cf4e695fa
35951         * doc/yat2m.c (top_parse_file): Correct macrolist-freeing loop.
35952
35953         gpg-agent: fix lc-messages handling not to change Xauthority setting.
35954         + commit 37801918cb916ae8c641e003f204dcc70cccb29c
35955         * agent/gpg-agent.c (main): Supply omitted "break" statement for
35956         lc-messages option.  Otherwise, control would fall through to the
35957         following oXauthority case and use the same value there.
35958
35959 2012-01-15  Werner Koch  <wk@gnupg.org>
35960
35961         Fix indentation.
35962         + commit 75a402fc25e4ec9659723dd58306aff3415736f4
35963
35964
35965 2012-01-14  Ben Kibbey  <bjk@luxsci.net>
35966
35967         Fix scdaemon pinentry inquire cancelation.
35968         + commit 4f21f8d6e109eae111d2da91f4c946afda4174e4
35969         Similar to commit 29af488 but also fixes PKDECRYPT and PKSIGN.
35970
35971         * agent/call-scd.c (agent_card_pkdecrypt): Check for GPG_ERR_CANCELED
35972         when returning from the PKDECRYPT operation of scdaemon and cancel the
35973         inquire.
35974         (agent_card_pksign): Ditto.
35975         (cancel_inquire): New.
35976
35977 2012-01-11  Werner Koch  <wk@gnupg.org>
35978
35979         gpg: Fix segv with RSA_S keys.
35980         + commit 30ec869b8c63f1edcc58110ed20b83b0e77248f8
35981         * g10/misc.c (pubkey_get_npkey, pubkey_get_nskey)
35982         (pubkey_get_nsig, pubkey_get_nenc): Map all RSA algo ids to
35983         GCRY_PK_RSA.
35984
35985         estream: Avoid printing leading zeroes by %p on 32 bit systems.
35986         + commit b42bc48dfb4b6d4f745eb02d8de4f4dcffdacf48
35987         * common/estream-printf.c (pr_pointer): Synchronize definition of
35988         AULONG with its use.
35989
35990 2012-01-11  David Shaw  <dshaw@jabberwocky.com>
35991
35992         Refresh sample keys.
35993         + commit 860861279bc17dd80eecc9631c4ae5d161a335fd
35994
35995
35996 2012-01-10  David Shaw  <dshaw@jabberwocky.com>
35997
35998         Adapt HKP fix for fingerprint/long keyid retrievals for dirmngr.
35999         + commit 3f59561cee635c6801e0a59d3abff1c064fcbdbe
36000         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Use the longest valid keyid form
36001
36002 2012-01-06  Werner Koch  <wk@gnupg.org>
36003
36004         gpg: Make the double space in the middle of a fingerprint optional.
36005         + commit 957fe728466893bc63f5ccad197d3e245dca4bf3
36006         This change might help to c+p a fingerprint from an HTML page without
36007         being enclosed in a "pre" tag.
36008         * common/userids.c (classify_user_id): Skip a second blank in the
36009         middle of a fingerprint.
36010
36011         gpg: Allow use of a standard space separated fingerprint.
36012         + commit 372fb4fc0661014ccd9275c89e6da2208f87155f
36013         * common/userids.c (classify_user_id): Check for space separated GPG
36014         fingerprint.
36015
36016 2012-01-06  NIIBE Yutaka  <gniibe@fsij.org>
36017
36018         Merge ccid_driver_improvement branch.
36019         + commit 5988c8bfb7eafaca53c8abeb793f189acd3177c6
36020         * scd/apdu.c (ccid_keypad_operation): Rename from ccid_keypad_verify.
36021         (open_ccid_reader): Use ccid_keypad_operation for verify and modify.
36022
36023         * scd/ccid-driver.c (VENDOR_VASCO, VASCO_920): New.
36024         (ccid_transceive_apdu_level): Permit sending packet where
36025         apdulen <= 289.  Support receiving packets in a chain.
36026         (ccid_transceive_secure): Maximum is 15 for VASCO DIGIPASS 920.
36027         Support keypad_modify method such as CHANGE_REFERENCE_DATA: 0x24.
36028
36029 2012-01-03  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
36030
36031         Silence gcc warning.
36032         + commit ed432f030e604f7b2fd4a79c2110d92b9cde7501
36033         * sm/call-dirmngr.c (get_cached_cert): Make sure buflen is initialized.
36034
36035         Revert last change, add comment about link() return values.
36036         + commit ff2095ad7b4be7eaf9468b6ef39fd979527ecc4f
36037         * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check
36038         return value of link().
36039
36040         Fix compiler warnings.
36041         + commit 0dce26778ef8abd4fc40de689d7ec9b720d26430
36042         * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Check return
36043         value of link().
36044         * g13/g13.c: Make sure err is initialized.
36045         * scd/scdaemon.c (main) [!USE_GCRY_THREAD_CBS]: Do not define ERR.
36046
36047         Fix last change: Only set gcrypt thread callback for older versions.
36048         + commit 61ccd8d92d9d3b8ba0eca3c2969d7f6f37e16405
36049         * dirmngr/dirmngr.c, g13/g13.c: Rename FIX_GCRY_PTH_INIT to
36050         USE_GCRY_THREAD_CBS.
36051
36052 2012-01-03  Werner Koch  <wk@gnupg.org>
36053
36054         Terminate csh commands with a semicolon also for dirmngr.
36055         + commit 682df45d15661ed3544e2ed34bcb636200cc40f9
36056         * dirmngr/dirmngr.c (main): Terminate csh style output with a semicolon.
36057
36058         Terminate csh commands with a semicolon.
36059         + commit d01d9ff11f46cbd61b7b8c0e04431e4f0c4a8580
36060         Fixes bug#1386.
36061
36062         * agent/gpg-agent.c (main): Terminate csh style output with a semicolon.
36063         * scd/scdaemon.c: Ditto.
36064
36065 2012-01-02  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
36066
36067         Only set gcrypt thread callback for older version of gcrypt.
36068         + commit a2d9e48fcca6cfc2dfadef6dbd3579a30314676b
36069         * agent/gpg-agent.c, dirmngr/dirmngr.c, g13/g13.c, scd/scdaemon.c
36070         (USE_GCRY_THREAD_CBS): New macro, defined if
36071         GCRY_THREAD_OPTION_VERSION is 0.
36072         (fixed_gcry_pth_init) [!USE_GCRY_THREAD_CBS]: Don't define.
36073         (main) [!USE_GCRY_THREAD_CBS]: Do not install thread callbacks.
36074
36075 2011-12-28  David Shaw  <dshaw@jabberwocky.com>
36076
36077         Use the longest key ID available when talking to a HKP server.
36078         + commit c6aaf024651c7d55ac9fb77a53c084efb3adc1a9
36079         This is issue 1340.  Now that PKSD is dead, and SKS supports long key
36080         IDs, this is safe to do.  Patch from Daniel Kahn Gillmor
36081         <dkg@fifthhorseman.net>.
36082
36083 2011-12-20  Werner Koch  <wk@gnupg.org>
36084
36085         Post-release version number update.
36086         + commit 97d1c884e62bba94e42bb5b2bb13cd3880334c31
36087
36088
36089         Release 2.1.0beta3.
36090         + commit 604c130a85d4203b9d84137a42673aeaff1c0bd1
36091
36092
36093         Prepare for the beta3 release.
36094         + commit 8e47f1e576f70d4dbe966523057fe3078006ae8b
36095
36096
36097         po: Update the German translation.
36098         + commit 6f02c143440865781b4e3c1753e24e55a0de40e4
36099
36100
36101         Add the STEED Self-Signing Nonthority certificate.
36102         + commit fe2f1826991e8130f727ee15df1a4651f679752f
36103         * doc/com-certs.pem: Install it when creating a keybox.
36104
36105         faq: Add section on US export restrictions.
36106         + commit 779611494dbd187d09b05d2eb10faabd31a70156
36107
36108
36109         Require Libassuan 2.0.3.
36110         + commit 366512abe44d9e71bb2c699c29477afa6ac71cdd
36111         * configure.ac: Require Libassuan 2.0.3.
36112         * agent/call-scd.c (ASSUAN_CONVEY_COMMENTS): Remove macro replacement.
36113         * agent/command.c (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Remove
36114         dependency.
36115         (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Ditto.
36116         * scd/command.c (cmd_killscd) [ASSUAN_FORCE_CLOSE]: Ditto.
36117
36118 2011-12-20  NIIBE Yutaka  <gniibe@fsij.org>
36119
36120         Add error log and debug log for pcsc_keypad_verify and pcsc_keypad_modify.
36121         + commit 07f20f313a0b13e5c93168a8a62ff1cbb94a4514
36122         * scd/apdu.c (pcsc_keypad_verify): Add debug log and error log.
36123         (pcsc_keypad_modify): Likewise.
36124
36125 2011-12-19  Werner Koch  <wk@gnupg.org>
36126             Ben Kibbey  <bjk@luxsci.net>
36127
36128         scd: Fix for card change returning GPG_ERR_CARD_RESET.
36129         + commit f4b7f7146349c388a2f3ce224ff2006606c66232
36130         * scd/apdu.c (apdu_connect): Do not test for zero atrlen.
36131
36132 2011-12-16  NIIBE Yutaka  <gniibe@fsij.org>
36133
36134         Don't kill pinentry by SIGKILL but let it quit by SIGINT.
36135         + commit f6251c0d0af92331388f5e9bcd1750cbadcaca8f
36136         * agent/call-pinentry.c (agent_popup_message_stop): To pinentry, send
36137         SIGINT (was: SIGKILL).
36138
36139 2011-12-15  David Shaw  <dshaw@jabberwocky.com>
36140
36141         Merge fix for issue 1331 from 1.4.
36142         + commit a98260c39f1c0ccdad004784cbc9440376766082
36143         * photoid.c (generate_photo_id): Check for the JPEG magic numbers
36144         instead of JFIF since some programs generate an EXIF header first.
36145
36146 2011-12-15  Werner Koch  <wk@gnupg.org>
36147
36148         scd: Prefer application Geldkarte over DINSIG.
36149         + commit 27089564b6453deaf7b4ffe7cc5f5f290b6d892b
36150         * scd/app.c (select_application): Reorder application tests.
36151
36152         scd: Add option --dump-atr to command APDU.
36153         + commit b22d62bd1481dfe13d60a6d16b09b9297944f063
36154         * scd/atr.c: Rewrite.
36155         * scd/Makefile.am (scdaemon_SOURCES): Add atr.c and atr.h.
36156         * scd/command.c (cmd_apdu): Add option --dump-atr.
36157
36158         estream: New function es_fclose_snatch.
36159         + commit 7737a2c269657189a583cde7f214f20871d264f8
36160         * common/estream.c (cookie_ioctl_function_t): New type.
36161         (es_fclose_snatch): New function.
36162         (COOKIE_IOCTL_SNATCH_BUFFER): New constant.
36163         (struct estream_internal): Add field FUNC_IOCTL.
36164         (es_initialize): Clear FUNC_IOCTL.
36165         (es_func_mem_ioctl): New function.
36166         (es_fopenmem, es_fopenmem_init): Init FUNC_IOCTL.
36167
36168 2011-12-14  Werner Koch  <wk@gnupg.org>
36169
36170         scd: Skip S/N reading for the "undefined" application.
36171         + commit 792e137ec7997a0ff5c54ff970611238d28d4ba8
36172         * scd/app.c (select_application): Skip serial number reading.
36173
36174         scd: Add more status word values for documentation.
36175         + commit 0bac31ee9f74a25d76b08c3e0355a338908f083a
36176
36177
36178         scd: Add the "undefined" stub application.
36179         + commit dcd64131c60efd0189aa05d5dbce6b93547b04e3
36180         * scd/app.c (select_application): Implement the "undefined"
36181         application.
36182
36183         agent: Pass comment lines from scd verbatim thru gpg-agent.
36184         + commit 45cf9de341405a228e331bd3893cbcd6b72306be
36185         * agent/call-scd.c (pass_status_thru): Pass comment lines verbatim.
36186         * tools/gpg-connect-agent.c (help_cmd_p): New.
36187         (main): Treat an "SCD HELP" the same as "HELP".
36188
36189         scd: Fix resetting and closing of the reader.
36190         + commit 2d91febbd8d30beb7eb33f7aa80ffd5691d1d3cc
36191         * scd/command.c (update_card_removed): Do no act on an invalid VRDR.
36192         (do_reset): Ignore apdu_reset error codes for no and inactive card.
36193         Close the reader before setting the slot to -1.
36194         (update_reader_status_file): Notify the application before closing the
36195         reader.
36196
36197         scd: Add debug option for reader function calls.
36198         + commit 07ea8c56b507b06d4bd70e94fa51914659afac4b
36199         * scd/scdaemon.h (DBG_READER_VALUE, DBG_READER): New.
36200         * scd/apdu.c (apdu_open_reader, apdu_close_reader)
36201         (apdu_shutdown_reader, apdu_connect, apdu_disconnect)
36202         (apdu_reset, apdu_get_atr, apdu_get_status): Add debug code.
36203         (apdu_activate): Remove this unused function.
36204
36205 2011-12-13  Werner Koch  <wk@gnupg.org>
36206
36207         scd: New option --debug-assuan-log-cats.
36208         + commit 00c760f628f4cf0fc11e79d305c172f98123f815
36209         * scd/scdaemon.c (oDebugAssuanLogCats): New.
36210         (opts): Add option --debug-assuan-log-cats.
36211         (main): Implement option.
36212         * common/asshelp.c (set_libassuan_log_cats): New.
36213
36214         scd: Introduce a virtual reader table.
36215         + commit 24e121ef261731069868ca403b818f1168237f53
36216         The vreader table makes the code more clear by explicitly talking
36217         about APDU slots and reader indices.  It also accommodates for future
36218         extensions.
36219
36220         * scd/scdaemon.h (server_control_s): Remove READER_SLOT.
36221         * scd/scdaemon.c (scd_init_default_ctrl): Do not init READER_SLOT.
36222         * scd/app.c (check_application_conflict): Add arg SLOT.
36223         * scd/command.c (slot_status_s): Rename to vreader_s.
36224         (server_local_s): Add field VREADER_IDX as replacement for
36225         the READER_SLOT in server_control_s.  Change all users.
36226         (slot_table): Rename to vreader_table.  Change all users.
36227         (vreader_slot): New.
36228         (do_reset, cmd_apdu): Map vreader to apdu slot.
36229         (get_reader_slot): Rename to get_current_reader.  Return -1 on error.
36230         (open_card): Map vreader toapdu slot.  Pass slot to
36231         check_application_conflict.
36232         (scd_command_handler): Init VREADER_IDX.
36233         (update_reader_status_file): Reset SLOT field on error.
36234
36235 2011-12-12  Werner Koch  <wk@gnupg.org>
36236
36237         scd: Retry command SERIALNO for an inactive card.
36238         + commit 11164662788036c4b15d30555ea33ec0b6f5a670
36239         * scd/command.c (cmd_serialno): Retry once for an inactive card.
36240
36241         Fix detection of card removal and insertion.
36242         + commit cd29dc0f1cf7f3bd7938ffa65bf13f9a75d8c156
36243         * scd/apdu.c (apdu_connect): Return status codes for no card available
36244         and inactive card.
36245         * scd/command.c (TEST_CARD_REMOVAL): Also test for GPG_ERR_CARD_RESET.
36246         (open_card): Map apdu_connect status to GPG_ERR_CARD_RESET.
36247
36248         gitlog-to-changelog: New option --tear-off.
36249         + commit ea0a21410b8fa460882c0f8de90b9291345fd4fc
36250         * scripts/gitlog-to-changelog: Add option --tear-off.
36251         * Makefile.am (gen-ChangeLog): Use that option.
36252
36253 2011-12-07  Werner Koch  <wk@gnupg.org>
36254
36255         gpgsm: Add new validation model "steed".
36256         + commit 8a12a2000d82acfa881e8c18d028290100bf5e43
36257         * sm/gpgsm.h (VALIDATE_FLAG_STEED): New.
36258         * sm/gpgsm.c (gpgsm_parse_validation_model): Add model "steed".
36259         * sm/server.c (option_handler): Allow validation model "steed".
36260         * sm/certlist.c (gpgsm_cert_has_well_known_private_key): New.
36261         * sm/certchain.c (do_validate_chain): Handle the
36262         well-known-private-key attribute.  Support the "steed" model.
36263         (gpgsm_validate_chain): Ditto.
36264         * sm/verify.c (gpgsm_verify): Return "steed" in the trust status line.
36265         * sm/keylist.c (list_cert_colon): Print the new 'w' flag.
36266
36267         Correct punctuation in the ChangeLog summary line.
36268         + commit 14e4fdc9f97d6f12bf563adfff1e3157305d7795
36269         * Makefile.am (gen-ChangeLog): Supply --append-dot.
36270
36271         Allow comments which will not show up in the ChangeLog.
36272         + commit cd3732841de32ce5c7841e6e158df3a5f1102f86
36273         * scripts/gitlog-to-changelog: Ignore lines after a "--" line.
36274
36275 2011-12-06  Werner Koch  <wk@gnupg.org>
36276
36277         gpgsm: Allow specification of an AuthorityKeyIdentifier.
36278         + commit 596b84a4de58def2155d3fe56462f6607f135b69
36279         * sm/certreqgen.c (pAUTHKEYID): New.
36280         (read_parameters): Add keyword Authority-Key-Id.
36281         (proc_parameters): Check its value.
36282         (create_request): Insert an Authority-Key-Id.
36283
36284         gpgsm: Allow arbitrary extensions for cert creation.
36285         + commit 5cdad8ff000152b4bd01953646bb87fe8703c70d
36286         * sm/certreqgen.c (pSUBJKEYID, pEXTENSION): New.
36287         (read_parameters): Add new keywords.
36288         (proc_parameters): Check values of new keywords.
36289         (create_request): Add SubjectKeyId and extensions.
36290         (parse_parameter_usage): Support "cert" and the encrypt alias "encr".
36291
36292         gpgsm: Fix storing of the serial number.
36293         + commit 3f284e40502d8181b0b3ea66c77cd7c1252ea781
36294         * sm/certreqgen.c (create_request): Fix hex-bin conversion.
36295
36296 2011-12-05  Werner Koch  <wk@gnupg.org>
36297
36298         Fix last change.
36299         + commit 9274d4d18281b3364fa8abaa821dddf124b105d7
36300         * agent/command.c (start_command_handler): Remove use of removed var.
36301
36302         Amend the agent code with more comments.
36303         + commit 477360e8cdc458b0a36e9c7fb52a35f27766255d
36304         * agent/command.c (server_local_s): Remove unused field MESSAGE_FD.
36305
36306 2011-12-02  Werner Koch  <wk@gnupg.org>
36307
36308         Support the Cherry ST-2000 card reader.
36309         + commit 239659d3a0b8c0c378734ca3d1e9210a02e24da7
36310         * scd/ccid-driver.c (SCM_SCR331, SCM_SCR331DI, SCM_SCR335)
36311         (SCM_SCR3320, SCM_SPR532, CHERRY_ST2000): New constants.
36312         (parse_ccid_descriptor): Use them.
36313         (scan_or_find_usb_device, ccid_transceive_secure): Handle Cherry
36314         ST-2000.  Suggested by Matthias-Christian Ott.
36315
36316         Avoid possible double free in export.c.
36317         + commit 96dc146fa17a7853277dbf3dc771c585a815c247
36318         * g10/export.c (transfer_format_to_openpgp): Avoid possible double
36319           free of LIST.  Reported by NIIBE Yutaka.
36320
36321 2011-12-02  NIIBE Yutaka  <gniibe@fsij.org>
36322
36323         Fix pinpad input support for passphrase modification.
36324         + commit bf37c32367ba149559385ee90b6435cef8bd6412
36325         * apdu.c (pcsc_keypad_verify): Have dummy Lc field with value 0.
36326         (pcsc_keypad_modify): Likewise.
36327         (pcsc_keypad_modify): It's only for ISO7816_CHANGE_REFERENCE_DATA.
36328         bConfirmPIN value is determined by the parameter p0.
36329
36330         * app-openpgp.c (do_change_pin): The flag use_keypad should be 0 when
36331         reset_mode is on, or resetcode is on.  use_keypad only makes sense for
36332         iso7816_change_reference_data_kp.
36333
36334         * iso7816.h (iso7816_put_data_kp): Remove.
36335         (iso7816_reset_retry_counter_kp): Remove.
36336         (iso7816_reset_retry_counter_with_rc_kp): Remove.
36337         (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.
36338
36339         * iso7816.c (iso7816_put_data_kp): Remove.
36340         (iso7816_reset_retry_counter_kp): Remove.
36341         (iso7816_reset_retry_counter_with_rc_kp): Remove.
36342         (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.
36343
36344 2011-12-01  Werner Koch  <wk@gnupg.org>
36345
36346         Add hook to check the commit log syntax.
36347         + commit 29e96e6b9a8e68e6554dd48bc2ce68ae9525d29f
36348         * autogen.sh: Install commit-msg hook for git.
36349
36350         Generate the ChangeLog from commit logs.
36351         + commit 2336b09779d313c1594acf6df3bd8a8486e90458
36352         * scripts/gitlog-to-changelog: New script.  Taken from gnulib.
36353         * scripts/git-log-fix: New file.
36354         * scripts/git-log-footer: New file.
36355         * doc/HACKING: Describe the ChangeLog policy
36356         * ChangeLog: New file.
36357         * Makefile.am (EXTRA_DIST): Add new files.
36358         (gen-ChangeLog): New.
36359         (dist-hook): Run gen-ChangeLog.
36360
36361         Rename all ChangeLog files to ChangeLog-2011.
36362
36363 2011-12-01  Werner Koch  <wk@gnupg.org>
36364
36365         NB: Changes done before December 1st, 2011 are described in
36366         per directory files named ChangeLog-2011.  See doc/HACKING for
36367         details.
36368
36369         -----
36370         Copyright (C) 2011 Free Software Foundation, Inc.
36371
36372         Copying and distribution of this file and/or the original GIT
36373         commit log messages, with or without modification, are
36374         permitted provided the copyright notice and this notice are
36375         preserved.