Imported Upstream version 2.2.39
[platform/upstream/gpg2.git] / ChangeLog
1 2022-09-02  Werner Koch  <wk@gnupg.org>
2
3         Release 2.2.39.
4         + commit 7c2078a680dde2eaef30a8a6dc49de4540498736
5
6
7 2022-09-01  Werner Koch  <wk@gnupg.org>
8
9         common: Make nvc_lookup more robust.
10         + commit 8c22b00268bf5b2374cf7af69465a902b91946aa
11         * common/name-value.c (nvc_first): Allow for NULL arg.
12         (nvc_lookup): Allow for PK being NULL.
13
14         Release 2.2.38.
15         + commit 0b786fde775588413e5c9842bca3a3d8ea06fad5
16
17
18 2022-08-31  Werner Koch  <wk@gnupg.org>
19
20         dirmngr: New option --debug-cache-expired-certs.
21         + commit ea34325c54a2746bdc2d667a1c98ab07b051cf75
22         * dirmngr/dirmngr.h (opt): Add debug_cache_expired_certs:
23         * dirmngr/dirmngr.c (oDebugCacheExpiredCerts): New.
24         (opts): Add option.
25         (parse_rereadable_options): Set option.
26         * dirmngr/certcache.c (put_cert): Handle the option.
27
28         common,w32: Fix an encoding problem of the printed timezone.
29         + commit 0b91fa0f13fd3644d0be137ed02e006aa05b9501
30         * common/gettime.c (w32_strftime) [W32]: New function.
31         (strftime) [W32]: New refinition macro.
32
33         gpg: Emit STATUS_FAILURE for --require-compliance errors.
34         + commit e05fb5ca3711f02eb562868dc38d30e3cccda270
35         * g10/misc.c (compliance_failure): Do not fallback to CO_GNUPG.  Print
36         compliance failure error and status for CO_DE_VS.
37         * g10/mainproc.c (proc_encrypted): Call compliance_failure in the
38         require-compliance error case.
39         * g10/encrypt.c (check_encryption_compliance): Ditto.
40
41 2022-08-31  NIIBE Yutaka  <gniibe@fsij.org>
42
43         scd: Add npth_unprotect/npth_protect for blocking operations.
44         + commit e1169e8f8ac75ad32fccb7743ffd06803bd50f93
45         * scd/ccid-driver.c (ccid_open_usb_reader): Name the thread.
46         (ccid_vendor_specific_setup, ccid_open_usb_reader): Wrap
47         blocking operations by npth_unprotect/npth_protect.
48
49         dirmngr: Reject certificate which is not valid into cache.
50         + commit 14ccabe7f82f64bbf84b8a880cd8b4a34cea9061
51         * dirmngr/certcache.c (put_cert): When PERMANENT, reject the
52         certificate which is obviously invalid.
53
54 2022-08-31  Werner Koch  <wk@gnupg.org>
55
56         gpg: Fix assertion failure due to errors in encrypt_filter.
57         + commit aa0c942521d89f4f0aac90bacaf8a7a7cefc88d8
58         * common/iobuf.c (iobuf_copy): Use log_assert.  Explicitly cast error
59         return value.
60         * g10/build-packet.c (do_plaintext): Check for iobuf_copy error.
61
62         * g10/encrypt.c (encrypt_filter): Immediately set header_okay.
63
64 2022-08-30  Werner Koch  <wk@gnupg.org>
65
66         gpg: Make --require-compliance work for -se.
67         + commit f88cb12f8e3c1234a094d09e2505d3a3eec4cbfe
68         * g10/encrypt.c (encrypt_crypt, encrypt_filter): Factor common code
69         out to ...
70         (create_dek_with_warnings): new
71         (check_encryption_compliance): and new.
72
73         * g10/encrypt.c (encrypt_filter): Add the compliance check.
74
75 2022-08-29  Werner Koch  <wk@gnupg.org>
76
77         gpg: Rename a function.
78         + commit 15cf36f6a84deb739bef9944819c5f79f8de3334
79         * g10/cipher.c (cipher_filter): Rename to cipher_file_cfb.
80
81         gpg: Very minor cleanup in decrypt_data.
82         + commit 5b24c41ba72c2d06f6acc7c2ad51cf6f384d41d8
83         * g10/decrypt-data.c (decrypt_data): Show also the aead algo with
84         --show-session-key.  Remove meanwhile superfluous NULL-ptr test.
85
86 2022-08-29  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
87
88         g10/decrypt-data: disable output estream buffering to reduce overhead.
89         + commit e92812a4752e56977286f96f7b5064db1e22936d
90         * g10/decrypt-data.c (decrypt_data): Disable estream buffering for
91         output file.
92
93 2022-08-24  Werner Koch  <wk@gnupg.org>
94
95         Release 2.2.37.
96         + commit 8e60f885713b833dfd8cef7f5b0272df0e48d62f
97
98
99 2022-08-19  Werner Koch  <wk@gnupg.org>
100
101         gpgsm: New option --compatibility-flags.
102         + commit 77b6896f7a85a4b1c9cdd731e1d68d59a0e09950
103         * sm/gpgsm.c (oCompatibilityFlags): New option.
104         (compatibility_flags): new.
105         (main): Parse and print them in verbose mode.
106         * sm/gpgsm.h (opt): Add field compat_glags.:
107         (COMPAT_ALLOW_KA_TO_ENCR): New.
108         * sm/keylist.c (print_capabilities): Take care of the new flag.
109         * sm/certlist.c (cert_usage_p): Ditto.
110
111         * common/miscellaneous.c (parse_compatibility_flags): New.
112         * common/util.h (struct compatibility_flags_s): New.
113
114 2022-08-17  Werner Koch  <wk@gnupg.org>
115
116         gpgconf: Make --auto-key-import and --include-key-block visible again.
117         + commit b356eddf3d7a1ed0fae808b9277134d50f4974af
118         * tools/gpgconf-comp.c: Add options.
119
120 2022-08-16  Werner Koch  <wk@gnupg.org>
121
122         agent: Fix bug introduced earlier today.
123         + commit 3591112fdb013dee1a1a668c9f777d0890520311
124         * agent/findkey.c (agent_write_private_key): Fix condition.
125
126         gpg: Fix "generate" command in --card-edit.
127         + commit 914ee7247562dc8f1e4b8503b3b574a5d2749bde
128         * g10/card-util.c (get_info_for_key_operation): Get the APPTYPE before
129         testing for it.
130
131         * g10/card-util.c (current_card_status): Always try to update the
132         shadow keys.
133         * g10/call-agent.c (agent_scd_getattr): Handle $AUTHKEYID.
134
135         gpg: Update shadow-keys with --card-status also for non-openpgp cards.
136         + commit 2d23a72690b44528783264a93e170585a99cc774
137         * agent/command.c (cmd_readkey): Also allow for $AUTHKEYID in card
138         mode.
139         * g10/call-agent.c (agent_update_shadow_keys): new.
140         * g10/card-util.c (current_card_status): Call it.
141
142         agent: Let READKEY update the display-s/n of the Token entry.
143         + commit 755920d4335730fbf25e24342dc9c8a8a772dac3
144         * agent/findkey.c (agent_write_private_key): Factor file name
145         generation out to ...
146         (fname_from_keygrip): new.
147         (write_extended_private_key): Add and implement new arg MAYBE_UPDATE.
148         (agent_write_shadow_key): Ditto.
149
150         * agent/command.c (cmd_readkey): Update the shadow-key in card mode.
151
152         gpg: Fix --card-status to handle lowercase APPTYPEs.
153         + commit 8e393e2592646f7d2a11ec32232b8f29eacdce13
154         * g10/card-util.c (current_card_status): Use ascii_strcasecmp.
155
156 2022-08-16  NIIBE Yutaka  <gniibe@fsij.org>
157
158         gpg: Fix detecting OpenPGP card by serialno.
159         + commit 27ae89db6e6901a8fd6f1dce50a25c1a4b845086
160         * g10/card-util.c (get_info_for_key_operation): Use ->apptype to
161         determine card's APP.
162         (current_card_status): Even if its SERIALNO is not like OpenPGP card,
163         it's OpenPGP card when app says so.
164
165 2022-08-16  Werner Koch  <wk@gnupg.org>
166
167         common: In private key mode write "Key:" always last in name-value.
168         + commit 12ad9529782df1eecf628281b8db62cafd775c4f
169         * common/name-value.c (nvc_write): Take care of Key. Factor some code
170         out to ...
171         (write_one_entry): new.
172
173 2022-08-15  Werner Koch  <wk@gnupg.org>
174
175         agent: Create and use Token entries to track the display s/n.
176         + commit dc9b2426288e4eb6ab42aa7f731a35bc8d383b46
177         * agent/divert-scd.c (linefeed_to_percent0A): New.
178         (ask_for_card): Add arg grip.  Read Token and Label items and use
179         them.
180         (divert_pksign, divert_pkdecrypt): Pass down grip.
181         * agent/findkey.c (write_extended_private_key): Add args serialno,
182         keyref, and dispserialno.  Writen Token item.
183         (agent_write_private_key): Add args serialno, keyref, and
184         dispserialno.
185         (read_key_file): Add arg r_keymeta.
186         (agent_keymeta_from_file): New.
187         (agent_write_shadow_key): Remove leading spaces from serialno and keyid.
188         * agent/protect-tool.c (agent_write_private_key): Ditto.
189         * agent/learncard.c (agent_handle_learn): Get DISPSERIALNO and pass to
190         agent_write_shadow_key.
191         * agent/command-ssh.c (card_key_available): Ditto.
192
193         common: New function nve_set.
194         + commit 706adf669173ec604158e4a2f4337e3da6cb1e45
195         * common/name-value.c (nve_set): New.
196         (nvc_set): Use nve_set.
197         (nvc_delete_named): New.
198         (nvc_get_string): New.
199         (nvc_get_boolean): New.
200
201 2022-08-04  Werner Koch  <wk@gnupg.org>
202
203         gpg: Fix wrong error message for keytocard.
204         + commit f2a81e3745017072585c9999a129ee5dd0bdc6e6
205         * g10/call-agent.c (agent_keytocard): Emit SC_OP_FAILURE.
206
207 2022-08-03  Werner Koch  <wk@gnupg.org>
208
209         common: Silence warnings from AllowSetForegroundWindow.
210         + commit 6583abedf3f0ffe5cc8283fe683144fc1d5add40
211         * common/sysutils.c (gnupg_allow_set_foregound_window): Print warning
212         only with debug flag set.
213
214         dirmngr: Fix failed malloc error message.
215         + commit 94908857e1f54a3550a3704a5de6bd10b7902169
216         * dirmngr/ocsp.c (check_signature): Fix error printing of xtrymalloc.
217
218         gpgconf: Add config file for Windows Registry dumps.
219         + commit ebb736b2c310c8736d1165be9c8e2de413dd0ac6
220         * tools/gpgconf.c (show_registry_entries_from_file): New.
221         (show_configs): Call it.
222         * doc/examples/gpgconf.rnames: New.
223         * doc/Makefile.am (examples): Add it.
224
225 2022-08-02  Werner Koch  <wk@gnupg.org>
226
227         gpg: Make symmetric + pubkey encryption de-vs compliant.
228         + commit e8011a7ceca7d5d9fd703f227e56931a7ea151d6
229         * g10/mainproc.c (proc_encrypted): Make symmetric + pubkey encryption
230         de-vs compliant.
231
232         * g10/mainproc.c (struct symlist_item): New.
233         (struct mainproc_context): Add field symenc_list.
234         (release_list): Free that list.
235         (proc_symkey_enc): Record infos from symmetric session packet.
236         (proc_encrypted): Check symkey packet algos
237
238         gpgconf: Improve registry dumping.
239         + commit 6bc959231802d60694b7677d3537261d9cda1e1d
240         * common/w32-reg.c (read_w32_registry_string): Map REG_DWORD to a
241         string.
242         (read_w32_reg_string): Add arg r_hklm_fallback and change all callers.
243         (show_configs): Indicate whether the HKLM fallback was used.
244         * tools/gpgconf.c (show_other_registry_entries): Fix the Outlook Addin
245         Registry key.  Indicate whether the HKLM fallback was used.
246
247 2022-07-28  Werner Koch  <wk@gnupg.org>
248
249         gpg: For de-vs use SHA-256 instead of SHA-1 as implicit preference.
250         + commit 890e616593af5d1e0f2eb932768205ef90928e5e
251         * g10/pkclist.c (select_algo_from_prefs): Change implicit hash
252         algorithm.
253
254 2022-07-27  Werner Koch  <wk@gnupg.org>
255
256         agent: New option --no-user-trustlist and --sys-trustlist-name.
257         + commit d0bd91ba73a7e333e9b5007875c9bd475fb9581e
258         * agent/gpg-agent.c (oNoUserTrustlist,oSysTrustlistName): New.
259         (opts): Add new option names.
260         (parse_rereadable_options): Parse options.
261         (finalize_rereadable_options): Reset allow-mark-trusted for the new
262         option.
263         * agent/agent.h (opt): Add fields no_user_trustlist and
264         sys_trustlist_name.
265         * agent/trustlist.c (make_sys_trustlist_name): New.
266         (read_one_trustfile): Use here.
267         (read_trustfiles): Use here.  Implement --no-user-trustlist.  Also
268         repalce "allow_include" by "systrust" and adjust callers.
269
270 2022-07-27  Ingo Klöcker  <dev@ingo-kloecker.de>
271
272         gpg: Look up user ID to revoke by UID hash.
273         + commit abe69b2094dd749fc2f285b672d30a4f1e3f12a7
274         * g10/keyedit.c (find_userid_by_namehash, find_userid): New.
275         (keyedit_quick_revuid): Use find_userid() instead of iterating over the
276         nodes of the keyblock.
277         * tests/openpgp/quick-key-manipulation.scm: Add test for revoking a
278         user ID specified by its hash.
279
280 2022-07-27  Werner Koch  <wk@gnupg.org>
281
282         wkd: Bind the address to the nonce.
283         + commit 73a98c13969169fee6bf5eaa71507a409eb17caf
284         * tools/gpg-wks-server.c (make_pending_fname): New.
285         (store_key_as_pending, check_and_publish): Use here.
286         (process_new_key): Pass addrspec to store_key_as_pending.
287         (expire_one_domain): Expire also the new files.
288
289 2022-07-26  Ingo Klöcker  <dev@ingo-kloecker.de>
290
291         dirmngr: Ask keyservers to provide the key fingerprints.
292         + commit 22e8dc792702cd485408b5a8212d34a3917851ca
293         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Add "fingerprint=on" to
294         request URL.
295
296 2022-07-25  Ingo Klöcker  <dev@ingo-kloecker.de>
297
298         gpg: Request keygrip of key to add via command interface.
299         + commit ee8f1c10a7a54714fb2a9ca141d38e666b9a424d
300         * g10/keygen.c (ask_algo): Request keygrip via cpr_get.
301         * doc/help.txt (gpg.keygen.keygrip): New help text.
302
303 2022-07-25  Werner Koch  <wk@gnupg.org>
304
305         wkd: Fix path traversal attack on gpg-wks-server.
306         + commit c1489ca0e101a81df6f8b1ba8d8a9afd9ebc6412
307         * tools/gpg-wks-server.c (check_and_publish): Check for invalid
308         characters in sender controlled data.
309         * tools/wks-util.c (wks_fname_from_userid): Ditto.
310         (wks_compute_hu_fname): Ditto.
311         (ensure_policy_file): Ditto.
312
313 2022-07-13  NIIBE Yutaka  <gniibe@fsij.org>
314
315         scd:openpgp: Fix workaround for Yubikey heuristics.
316         + commit 8c9f879d4aa01ad96320869fb3da83a843292504
317         * scd/app-openpgp.c (parse_algorithm_attribute): Handle the case
318         of firmware 5.4, too.
319
320         scd: Fail when no good algorithm attribute.
321         + commit 225c66f13b8700d9d283367705b31070a3d38d93
322         * scd/app-openpgp.c (parse_algorithm_attribute): Return the error.
323         (change_keyattr): Follow the change.
324         (app_select_openpgp): Handle the error of parse_algorithm_attribute.
325
326 2022-07-12  NIIBE Yutaka  <gniibe@fsij.org>
327
328         scd: Don't inhibit SSH authentication for larger data if it can.
329         + commit 07e43eda8dc69cecc385a6b3723e155afbc59257
330         * scd/app-openpgp.c (do_auth): Use command chaining if available.
331
332 2022-07-06  Werner Koch  <wk@gnupg.org>
333
334         Release 2.3.36.
335         + commit 491645b50ec97db12520483d347291d660db209c
336
337
338 2022-06-29  Werner Koch  <wk@gnupg.org>
339
340         gpgconf: New short options -V and -X.
341         + commit f357a5f239919de976b86a666410f504682973e4
342         * tools/gpgconf.c: Assign short options -X and -V
343         (show_version_gnupg): Print the vsd version if available.
344
345 2022-06-24  NIIBE Yutaka  <gniibe@fsij.org>
346
347         agent: Flush before calling ftruncate.
348         + commit 9e2307ddf0c2608e9cfb435f870b75cbb35791d7
349         * agent/findkey.c (write_extended_private_key): Make sure
350         it is flushed out.
351
352 2022-06-21  Werner Koch  <wk@gnupg.org>
353
354         sm: Update pkcs#12 module from master.
355         + commit 4c14bbf56fb544541bd65f9d6e6e0b81779dcab6
356         * sm/minip12.c: Update from master.
357         * sm/import.c (parse_p12): Pass NULL for curve.
358
359 2022-06-20  Werner Koch  <wk@gnupg.org>
360
361         common: Add an easy to use DER builder.
362         + commit d21ced1e3596dc9e4fa53995286b4cbbd6e94195
363         * common/tlv-builder.c: New.
364         * common/tlv.c: Remove stuff only used by GnuPG 1.
365         (put_tlv_to_membuf, get_tlv_length): Move to ...
366         * common/tlv-builder.c: here.
367         * common/tlv.h (tlv_builder_t): New.
368
369 2022-06-14  Werner Koch  <wk@gnupg.org>
370
371         g10: Fix garbled status messages in NOTATION_DATA.
372         + commit 7b1db7192e6e4d0cfc439b23b13831837c85bc21
373         * g10/cpr.c (write_status_text_and_buffer): Fix off-by-one
374
375 2022-06-09  NIIBE Yutaka  <gniibe@fsij.org>
376
377         agent,scd: Make sure to set CONFIDENTIAL flag in Assuan.
378         + commit aeee62593ae9147a38fd79f0782f3fa0e4ac5c4a
379         * agent/call-scd.c (inq_needpin): Call assuan_begin_confidential
380         and assuan_end_confidential, and wipe the memory after use.
381         * agent/command.c (cmd_preset_passphrase): Likewise.
382         * scd/command.c (pin_cb): Likewise.
383
384 2022-06-03  Werner Koch  <wk@gnupg.org>
385
386         w32: Avoid warning about not including winsock2.h after windows.h.
387         + commit dfc01118ce0707c2d920fb31f7731f3a383df761
388         * common/dynload.h: Include winsock2.h first.
389
390         w32: Allow Unicode filenames for iobuf_cancel.
391         + commit 10db566489880acd510f8e07dc52a38dd82feafe
392         * common/iobuf.c (iobuf_cancel): Use gnupg_remove
393         * common/mischelp.c (same_file_p): Allow for Unicode names.
394
395 2022-06-01  Werner Koch  <wk@gnupg.org>
396
397         scd:p15: Fix accidental commit of debug code.
398         + commit e3db6c74a6305e86eaefb0ca8d49d4d9754104ff
399         * scd/app-p15.c (do_sign): Revert MSE setting.
400
401         scd: Shorten cardio debug output for all zeroes.
402         + commit 62becf599eb861936faf88b6ec5e0f7b1658b54e
403         * scd/apdu.c (all_zero_p): New.
404         (send_le): Use it.
405
406         (cherry picked from commit 9b6f574928546e6905a92c3e74d72478f1585c66)
407
408 2022-05-17  NIIBE Yutaka  <gniibe@fsij.org>
409
410         scd: Fix use of SCardListReaders for PC/SC.
411         + commit 7bc794c3113400af082b26610d9d1305826be54e
412         * scd/apdu.c (open_pcsc_reader): Initialize NREADER.
413
414 2022-05-10  NIIBE Yutaka  <gniibe@fsij.org>
415
416         scd: Add workaround for ECC attribute on Yubikey.
417         + commit a5217c90003c2e1b9bfb06b58ffc2d0d9164f22a
418         * scd/app-openpgp.c (parse_algorithm_attribute): Skip possibly bogus
419         octet in a key attribute.
420
421 2022-05-06  Werner Koch  <wk@gnupg.org>
422
423         scd:p15: Improve the displayed S/N for Technology Nexus cards.
424         + commit 91acbdc93c8a6ae06b483a27c8bb7c33a978108d
425         * scd/app-p15.c (any_control_or_space_mem): New.
426         (get_dispserialno): Add new code.
427
428         scd:p15: Fix the the sanity check of the displayed S/N.
429         + commit 8efe738c4a090f523461fa3055da668467715105
430         * scd/app-p15.c (any_control_or_space): Fix loop.
431
432 2022-05-05  Werner Koch  <wk@gnupg.org>
433
434         scd:p15: Fix reading certificates without length info.
435         + commit 7f029eef6ce15be4167f56e7fc07755d189e5e27
436         * scd/app-p15.c (readcert_by_cdf): Do not use extended mode if the CDF
437         object has no length info.  Add debug output when reading a cert.
438         (read_p15_info): No more need to disable extended mode for GeNUA cards.
439
440         scd: New debug flags "card".
441         + commit d60f930d9b000e802dc61c8e8d494a3091dc0437
442         * scd/scdaemon.c (debug_flags): Add "card".
443         * scd/scdaemon.h (DBG_CARD_VALUE, DBG_CARD): New.
444
445         gpg: Minor robustness fix.
446         + commit 36a5509e11c81305c4ded93982fa594bd52555a6
447         * g10/parse-packet.c (mpi_read_detect_0_removal): Protect agains
448         failed gcry_mpi_scan.
449
450 2022-05-02  NIIBE Yutaka  <gniibe@fsij.org>
451
452         tests: Add a test for Ed25519 keys for non-protected secret.
453         + commit 06e82e997a56406e04113a7f6c1d083e0cc04172
454         * tests/openpgp/issue5120.scm: New.
455
456 2022-04-28  NIIBE Yutaka  <gniibe@fsij.org>
457
458         gpg: Handle leading-zeros private key for Ed25519.
459         + commit 3fcef7371480cce392d690897d42955f1b19c12a
460         * g10/parse-packet.c (mpi_read_detect_0_removal): New.
461         (parse_key): Use mpi_read_detect_0_removal for PUBKEY_ALGO_EDDSA
462         to tweak the checksum.
463
464         Revert "gpg: Accept Ed25519 private key in SOS which reserves leading zeros."
465         + commit 3192939a10df17cb9666773ed8888627f6d16b8d
466         This reverts commit 14de7b1e5904e78fcbe413a82d0f19b750bd8830.
467
468 2022-04-25  Werner Koch  <wk@gnupg.org>
469
470         Release 2.2.35.
471         + commit f7bc6f50496bffc3c377cb4e3e844242a590b5e1
472
473
474         gpg: Avoid NULL ptr access due to corrupted packets.
475         + commit 86d84464ae11666b1556e876a41a65cec8daaf18
476         * g10/parse-packet.c (parse_signature): Do not create an opaque MPI
477         with NULL and length > 0
478         (parse_key): Ditto.
479
480 2022-04-25  NIIBE Yutaka  <gniibe@fsij.org>
481
482         agent: Not writing password into file.
483         + commit 9c0a24b4a55edff3d54cc5e98ba8112714f583e3
484         * agent/genkey.c (do_check_passphrase_pattern): Use stream to invoke
485         pattern check program.
486
487 2022-04-25  Werner Koch  <wk@gnupg.org>
488
489         gpg: Emit an ERROR status as hint for a bad passphrase.
490         + commit f021ecd57624f09430731f5deee2c4d0712150c8
491         * g10/mainproc.c (proc_symkey_enc): Issue new error code.
492         (proc_encrypted): Ditto.
493
494 2022-04-20  Werner Koch  <wk@gnupg.org>
495
496         w32: Do no use Registry item DefaultLogFile for the main tools.
497         + commit a5faaf8bee43e1e8d99cf3c08fad8ccce047fc28
498         * g10/gpg.c (main): Set LOG_NO_REGISTRY.
499         * sm/gpgsm.c (main): Ditto.
500         * tools/gpg-connect-agent.c (main): Ditto.
501         * tools/gpgconf.c (main): Ditto.
502         (show_other_registry_entries): Print "DefaultLogFile".
503
504 2022-04-14  Werner Koch  <wk@gnupg.org>
505
506         gpg: Replace an assert by a log_fatal.
507         + commit c8c71fc7161bf6b553bc5b45b2f7a06f8a1a4639
508         * g10/build-packet.c (do_signature): Use log_fatal.
509
510         scd: Minor code reorganization.
511         + commit 58532fe56c334d0edc589311e6601fb9da70d9a1
512         * scd/ccid-driver.c: Move struct defines to the top.
513         (MAX_DEVICE): Rename to CCID_MAX_DEVICE.
514
515         scd: Fix memory leak in ccid-driver.
516         + commit c4b14be48fe9b0f52bca9840375eb0eac3cc2432
517         * scd/ccid-driver.c (ccid_dev_scan): Use loop var and not the count.
518
519 2022-04-13  Werner Koch  <wk@gnupg.org>
520
521         scd:p15: Improve the PIN prompt for Genua cards.
522         + commit e99670f944bc613d258d0810c5831a2099718d4e
523         * scd/app-p15.c (CARD_PRODUCT_GENUA): New.
524         (cardproduct2str): Add it.
525         (read_p15_info): Detect and set GENUA
526         (make_pin_prompt): Take holder string from the AODF.
527
528         scd:p15: Support for GeNUA cards.
529         + commit 44ec383cdec06ee4ac8dbe7b913990bbeeb3d3a3
530         * scd/app-p15.c (read_p15_info): Disable extended mode for Genua
531         cards.
532
533         scd:p15: Prepare AODF parsing for other authentication types.
534         + commit 29fd80581867beeec068b49e8587762394e7d4d1
535         * scd/app-p15.c (auth_type_t): New.
536         (struct aodf_object_s): Add field auth_type.
537         (read_ef_aodf): Distinguish between pin and authkey types.  Include
538         the authtype in the verbose mode diags.
539
540         scd:p15: Add basic support for AET JCOP cards.
541         + commit 80cf64c65155f718ed7dcee0e6a2aedbd9a2a5b0
542         * scd/app-p15.c (CARD_TYPE_AET): New.
543         (cardtype2str): Add string.
544         (card_atr_list): Add corresponding ATR.
545         (app_local_s): New flag no_extended_mode.  Turn two other flags into
546         bit flags.
547         (select_ef_by_path): Hack to handle the 3FFF thing.
548         (readcert_by_cdf): Do not use extended mode for AET.
549         (app_select_p15): Set no_extended_mode.
550         ---
551         (cherry picked from commit 544ec7872aed24c296ea34fac777eca287f7bb47)
552
553 2022-03-29  NIIBE Yutaka  <gniibe@fsij.org>
554
555         common,unix: Backport dotlock changes from GnuPG 2.3.
556         + commit d9a8d3353afd669252e25b56ed92f9fb7c0dcc3d
557         * common/dotlock.c (read_lockfile): Return FD in R_FD.
558         (dotlock_take_unix): Fix a race condition by new read_lockfile and
559         checking with fstat.  Describe one race condition in comment.
560         (dotlock_release_unix): Follow the change of read_lockfile.
561
562 2022-03-28  Werner Koch  <wk@gnupg.org>
563
564         dirmngr: Escape more characters in WKD requests.
565         + commit 3b251c8366cf7ddf5b82fc2331a8009fa1f2de23
566         * dirmngr/server.c (proc_wkd_get): Also escape '#' and '+'
567
568 2022-03-22  Werner Koch  <wk@gnupg.org>
569
570         gpgtar: New option --with-log.
571         + commit ce69d55f70a18cfe5cf91353efc00ab43ba8fd8b
572         * tools/gpgtar.c: New option --with-log.
573         * tools/gpgtar.h (opt): Add field with_log.
574         * tools/gpgtar-extract.c (gpgtar_extract): Move directory string
575         building up.  Add option --log-file if needed.
576         * tools/gpgtar-create.c (gpgtar_create): Make tmpbuf static becuase it
577         is used outside of its scope.
578         * tools/gpgtar-list.c (gpgtar_list): Ditto.
579
580 2022-03-21  Werner Koch  <wk@gnupg.org>
581
582         dirmngr: Make WKD_GET work even for servers not handling SRV RRs.
583         + commit 6d30fb6940d57237392f9196a4de5c7246ffefdf
584         * dirmngr/server.c (proc_wkd_get): Take care of DNS server failures
585
586         gpgtar: Finally use a pipe for decryption.
587         + commit d431feb3077f763e37f824026988a10d87c8a5aa
588         * tools/gpgtar.h (opt): Add new flags.
589         * tools/gpgtar.c: new options --batch, --yes, --no, --status-fd, and
590         --require-compliance.
591         (main): Init signals.
592         * tools/gpgtar-create.c: Add new header files.
593         (gpgtar_create): Rework to use a pipe for encryption and signing.
594         * tools/gpgtar-list.c: Add new header files.
595         (gpgtar_list): Rework to use a pipe for decryption.
596         * tools/gpgtar-extract.c: Add new header files.
597         (gpgtar_extract): Rework to use a pipe for decryption.
598
599 2022-03-18  Werner Koch  <wk@gnupg.org>
600
601         gpg: Print info about the used AEAD algorithm.
602         + commit 15eda7ce783a81d2f5911028a4c8c3ce5649edca
603         * g10/misc.c (openpgp_cipher_algo_mode_name): New.
604         * g10/decrypt-data.c (decrypt_data): Use function here.
605
606         common: New function map_static_strings.
607         + commit c1453665491fb6a16883ee5e1828cfb0c28b466a
608         * common/mapstrings.c (struct intmapping_s): New.
609         (map_static_strings): New.
610         * common/stringhelp.c (do_strconcat): Rename to ...
611         (vstrconcat): this and make global.
612
613         * common/t-mapstrings.c (test_map_static_strings): New test.
614
615         gpg: Allow decryption of symencr even for non-compliant cipher.
616         + commit e081a601f7b31fa278e46de7c6834a756b63cec2
617         * g10/decrypt-data.c (decrypt_data): Add arg compliance_error.  Adjust
618         all callers.  Fail on compliance error only in --require-compliance
619         mode.  Make sure to return an error if the buffer is missing; actually
620         that should be an assert.
621         * g10/mainproc.c (proc_encrypted): Delay printing of the compliance
622         mode status.  Consult the compliance error now returned by
623         decrypt_data.
624
625 2022-03-15  Werner Koch  <wk@gnupg.org>
626
627         common: New flags for gnupg_spawn_process.
628         + commit 7ba44d15ca2f800c402a56eb71bb524f91ea2ffa
629         * common/exechelp.h (GNUPG_SPAWN_KEEP_STDIN): New.
630         (GNUPG_SPAWN_KEEP_STDOUT): New.
631         (GNUPG_SPAWN_KEEP_STDERR): New.
632         * common/exechelp-posix.c (do_exec): Add arg flags and implement new
633         flags.
634         * common/exechelp-w32.c (gnupg_spawn_process): Implement new flags.
635
636 2022-03-09  Werner Koch  <wk@gnupg.org>
637
638         gpgconf: Silence warnings from parsing the options files.
639         + commit e8b1ab1d2d22f938b3e5991343b7e089d96606a0
640         * tools/gpgconf-comp.c (retrieve_options_from_program): Set verbose
641         flag for the arg parser only in --verbose mode.
642
643 2022-03-09  NIIBE Yutaka  <gniibe@fsij.org>
644
645         sm: Fix parsing encrypted data.
646         + commit 0c7dffe99d3fded41df87512063515b5ca2da820
647         * sm/minip12.c (cram_octet_string): Finish when N==0.
648         (parse_bag_encrypted_data): Support constructed data with multiple
649         octet strings.
650
651 2022-03-08  Werner Koch  <wk@gnupg.org>
652
653         gpgsm: New option --require-compliance.
654         + commit 847d618454e6f8418b169132dbdd0307d9b4d7e0
655         * sm/gpgsm.c (oRequireCompliance): New.
656         (opts): Add --require-compliance.
657         (main): Set option.
658         * sm/gpgsm.h (opt): Add field require_compliance.
659         (gpgsm_errors_seen): Declare.
660         * sm/verify.c (gpgsm_verify): Emit error if non de-vs compliant.
661         * sm/encrypt.c (gpgsm_encrypt): Ditto.
662         * sm/decrypt.c (gpgsm_decrypt): Ditto.
663
664         gpg: New option --require-compliance.
665         + commit 17890d43187384d049d80af28a5baea8613ff6ea
666         * g10/options.h (opt): Add field flags.require_compliance.
667         * g10/gpg.c (oRequireCompliance): New.
668         (opts): Add --require-compliance.
669         (main): Set option.
670         * g10/mainproc.c (proc_encrypted): Emit error if non de-vs compliant.
671         (check_sig_and_print): Ditto.
672         * g10/encrypt.c (encrypt_crypt): Ditto.
673
674         gpg: Give Libgcrypt CFLAGS a higher priority than SQlite.
675         + commit c11292fe736db6e61fad17d74f65b0b5ad9c2808
676         * g10/Makefile.am (AM_CFLAGS): Reorder.
677
678 2022-03-04  Werner Koch  <wk@gnupg.org>
679
680         gpgtar,w32: Support file names longer than MAX_PATH.
681         + commit 5492079defab85b1ba2c583e32a8feb752314b2e
682         * tools/gpgtar.c: Replace assert by log_assert.
683         * tools/gpgtar-extract.c: Ditto.
684         (extract_regular): Create files with sysopen flag.
685         * tools/gpgtar-create.c (scan_directory): Use gpgrt_fname_to_wchar.
686
687         common,w32: Support file names longer than MAX_PATH in iobuf.
688         + commit 4122896a39b7ac5dc071bf4d2e9be0ac8a3e21d7
689         * common/iobuf.c (direct_open): Use gpgrt_fname_to_wchar.
690         (any8bitchar): Remove.
691
692 2022-02-24  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
693
694         g10: Avoid extra hash contexts when decrypting MDC input.
695         + commit 9116fd1e9a2da9c83f94acfe41fb6e5c6f03e8d1
696         * g10/mainproc.c (mainproc_context): New member
697         'seen_pkt_encrypted_mdc'.
698         (release_list): Clear 'seen_pkt_encrypted_mdc'.
699         (proc_encrypted): Set 'seen_pkt_encrypted_mdc'.
700         (have_seen_pkt_encrypted_aead): Rename to...
701         (have_seen_pkt_encrypted_aead_or_mdc): ...this and add check for
702         'seen_pkt_encrypted_mdc'.
703         (proc_plaintext): Do not enable extra hash contexts when decrypting
704         MDC input.
705
706 2022-02-21  Werner Koch  <wk@gnupg.org>
707
708         scd:p15: Used extended mode already for RSA 2048.
709         + commit a2db490de5473af42d7b5a99398c48befe294394
710         * scd/app-p15.c (do_sign, do_decipher): Replace GT by GE.
711
712 2022-02-17  NIIBE Yutaka  <gniibe@fsij.org>
713
714         tests: Remove a test case with "quiet" option with gpgconf.
715         + commit f064d972e38863358a2dd53de43acd66572830c2
716         * tests/openpgp/gpgconf.scm: Remove "quiet" test.
717
718         scd: Use lock_slot for apdu_send_direct.
719         + commit 3c3765405de02b9a57fdc9a3cf901f6e3aca8586
720         * scd/apdu.c (apdu_send_direct): Use lock_slot.
721
722 2022-02-09  Werner Koch  <wk@gnupg.org>
723
724         gpgconf: Do not show "quiet" as option.
725         + commit 2f2130ff24faf4507fa5949e834c155b4a8e1525
726         * tools/gpgconf-comp.c: Remove "quiet" and two unsupported options
727
728 2022-02-07  Werner Koch  <wk@gnupg.org>
729
730         Release 2.2.34.
731         + commit 04d40a680baa43f9803d0981b1da49144021d723
732
733
734         dirmngr: Changes to the linking order.
735         + commit 3c79ff34c417bfc392008eca1970b86bec54d6c3
736         * dirmngr/Makefile.am: Tweak library order.
737
738         gpgconf: Make gpgconf --launch dirmngr work again.
739         + commit 5a7ed6dd8f1b4e3c2e8f6e82700a86bd886c5f50
740         * tools/gpgconf.h (gc_component_id_t): Fix the order.
741
742         gpgconf: Print the used code pages on Windows with --show-configs.
743         + commit 32b364b99b492c580330591640cdaa7407016733
744         * tools/gpgconf.c (show_configs): Add some code
745
746         common: Fix creation of Windows socket directories.
747         + commit 7d1215cb9cba258102b91c92e6973783e8d53b07
748         * common/homedir.c (w32_try_mkdir): Remove.
749         (standard_homedir): Use gnupg_mkdir instead of w32_try_mkdir.
750         (_gnupg_socketdir_internal): Ditto.
751
752 2022-02-04  Werner Koch  <wk@gnupg.org>
753
754         m4: Update our library m4 files from master.
755         + commit c8cd66ae7e609f221c7dad905e88a206a285ab1c
756         * m4/gpg-error.m4: Updated
757         * m4/ksba.m4: Updated
758         * m4/libassuan.m4: Updated
759         * m4/libgcrypt.m4: Updated
760         * m4/npth.m4: Updated
761         * m4/ntbtls.m4: Updated
762
763 2022-02-03  Werner Koch  <wk@gnupg.org>
764
765         dirmngr: Allow building with non-standard ntbtls location.
766         + commit 137590fd8614a69cc60da3226cefc4495502ec26
767         * dirmngr/Makefile.am: Add missing -L and -I
768
769         dirmngr: Simplify --gpgconf-list output.
770         + commit 0b76ef48e1df4c210d57f3bf4bc1fe1fa3762408
771         * dirmngr/dirmngr.c (main): Keep only values with the default flag.
772
773         sm: New option --ignore-cert-with-oid.
774         + commit bcf446b70ca58ac1497269f047fba9ddb3d62e96
775         * sm/gpgsm.c (oIgnoreCertWithOID): New.
776         (opts): Add option.
777         (main): Store its value.
778         * sm/call-agent.c (learn_cb): Test against that list.
779
780 2022-02-02  Werner Koch  <wk@gnupg.org>
781
782         gpgconf: Return the compliance_de_vs item.
783         + commit e058d15d2d56dfed2723e1a55c75e52db87b2dc2
784         * tools/gpgconf-comp.c (known_options_gpg): Add missing pseudo option.
785
786 2022-02-01  Werner Koch  <wk@gnupg.org>
787
788         dirmngr: Avoid initial delay on the first keyserver access.
789         + commit dde88897e2c5851aab32370ee6c8ace150debb77
790         * dirmngr/dirmngr.c (dirmngr_never_use_tor_p): New.
791         * dirmngr/server.c (ensure_keyserver): Don't even test for the Tor
792         proxy in never-use-tor Mode.
793
794         * tools/gpgtar-create.c: Include unistd.h to avoid a warning on
795         Windows.
796
797         gpg: Set --verbose and clear --quiet in debug mode.
798         + commit d426ed66ac043e442649a8a2bc7eac6753a5bf58
799         * g10/gpg.c (set_debug): Tweak options.
800
801 2022-01-28  Werner Koch  <wk@gnupg.org>
802
803         ssh: Fix adding an ed25519 key with a zero length comment.
804         + commit 2331900d1cc022c04177272a51c00690229bb989
805         * agent/command-ssh.c (sexp_key_construct): Do not put an empty string
806         into an S-expression.
807         (stream_read_string): Do not not try to a read a zero length block.
808
809 2022-01-27  Werner Koch  <wk@gnupg.org>
810
811         gpgconf: Tweak the use of ldapserver.
812         + commit e1fc053dc1ad260922428cf864071e829e6c30f2
813         * tools/gpgconf-comp.c (known_options_gpgsm): Make "keyserver"
814         invisible.
815         (known_options_dirmngr): Add "ldapserver".
816         * sm/gpgsm.c (oKeyServer_deprecated): New.
817         (opts): Assign "ldapserver" to the new option and makr it as obsolete.
818
819 2022-01-26  Werner Koch  <wk@gnupg.org>
820
821         gpgconf: Some more fixes for the backported stuff.
822         + commit eefa2d19ee3f359435f0e5324cb5f10f2d8940a5
823         * agent/gpg-agent.c (main) <gpgconf_list>: Keep only those option which
824         have a default.  Remove runtime flag.
825         * common/gc-opt-flags.h (GC_OPT_FLAG_RUNTIME): Move to ...
826         * tools/gpgconf-comp.c: here because it is now inetrnal to gpgconf.
827         (known_options_gpg_agent): Add a few missing runtime flags.  Remove
828         "options".  Add "check-sym-passphrase-pattern".
829         (known_options_scdaemon, known_options_gpgsm): Remove "options".
830         (dirmngr): Ditto.
831
832         * tools/gpgconf-comp.c (is_known_option): Return only options having a
833         value for name.  Thus we list list options from the known_options
834         tables.
835
836         gpgconf: Fix --list-options for forced options.
837         + commit 85300587cc8a115c96e812850762090f937ade9b
838         * tools/gpgconf-comp.c: Remove assert.h and replace all assert calls
839         by log_assert.
840         (known_options_gpg): Add "keyserver" as invisible.  Remove "options".
841         (known_pseudo_options_gpg, known_pseudo_options_gpgsm): New.
842         (gc_component): Add field known_pseudo_options.
843         (struct read_line_wrapper_parm_s): New.
844         (read_line_wrapper): New.
845         (retrieve_options_from_program): Use read_line_wrapper to handle
846         pseudo options.
847         (retrieve_options_from_program): Ignore to be ignored options.  Add
848         failsafe code to avoid calling percent_escape with NULL.
849
850 2022-01-25  Werner Koch  <wk@gnupg.org>
851
852         common: Fix returning of option attributes for options with args.
853         + commit d8e6d1e9ed7d181f546426269ab7b04e184bb9a1
854         * common/argparse.c (gnupg_argparse): Set attribute flags
855
856         scd: Also prefer Yubikeys if no reader port is given.
857         + commit 38c666ec3fdb0e3a8762889ae99faca4adb68b68
858         * scd/apdu.c (select_a_reader): Extend the white list.
859
860 2022-01-17  NIIBE Yutaka  <gniibe@fsij.org>
861
862         gpg: Fix adding the list of ultimate trusted keys.
863         + commit 4cc724639c012215f59648cbb4b7631b9d352e36
864         * g10/keygen.c (do_generate_keypair): Remove call to
865         register_trusted_keyid for updating user_utk_list.
866         * g10/trust.c (register_trusted_keyid): Remove.
867         (update_ownertrust): Add call to tdb_update_utk.
868         * g10/trustdb.c (tdb_register_trusted_keyid): Make it internal
869         function by adding "static" qualifier.
870         Replace calls of register_trusted_keyid to tdb_register_trusted_keyid.
871         (tdb_update_utk): New.
872         * g10/trustdb.h (tdb_update_utk): New.
873
874 2022-01-12  Werner Koch  <wk@gnupg.org>
875
876         gpgconf: Add command aliases -L -K -R.
877         + commit f16c535eee912224a44b5999df7915c69f2d41bc
878         * tools/gpgconf.c (enum cmd_and_opt_values): Assign shortcuts.
879
880         common,w32: Improve HKCU->HKLM fallback.
881         + commit 96db487a4da5903b71c64edf7a0ee9c2e01a8762
882         * common/w32-reg.c (read_w32_registry_string): Add another fallback.
883
884 2022-01-10  Werner Koch  <wk@gnupg.org>
885
886         gpgtar: List and extract using extended headers.
887         + commit bf4cf04a54bb2aa34afdf1d3c814ca4e185bacc8
888         * tools/gpgtar.h (TF_EXTHDR, TF_GEXTHDR): New.
889         * tools/gpgtar-list.c (parse_header): Set the new type flags.
890         (parse_extended_header): New.
891         (read_header): Add arg r_extheader and parse extended header.
892         (print_header): Consult the extended header.
893         (gpgtar_list): Pass an extended header object.
894         (gpgtar_read_header): Ditto.
895         (gpgtar_print_header): Ditto.
896         * tools/gpgtar-extract.c (extract): New arg exthdr and factor name
897         checking out to ...
898         (check_suspicious_name): new.
899         (extract_regular): Add arg exthdr and consult it.
900         (extract_directory): Likewise.
901         (gpgtar_extract): Provide extheader object.
902
903         gpgtar: Create extended header for long file names.
904         + commit ec69ceab2615758e88c52a1d30c4731b3e71b105
905         * tools/gpgtar-create.c (global_header_count): new.
906         (myreadlink): New.
907         (build_header): New arg r_exthdr.  Detect and store long file and link
908         names.  Factor checkum computation out to ...
909         (compute_checksum): new.
910         (add_extended_header_record): New.
911         (write_extended_header): New.
912         (write_file): Write extended header.
913
914 2021-12-30  Werner Koch  <wk@gnupg.org>
915
916         build: Fixes recent commits to still build with gpgrt 1.27.
917         + commit c4153f7021afafe9ce4459aa08857136b394cce7
918         * agent/gpg-agent.c (main): Use gnupg_argparse.
919         * tools/gpgconf-comp.c: Use gnupg_opt_t.
920         * tools/gpgconf.c (show_version_gnupg): Use strusage.
921
922         gpgconf: Do not list ignored options and mark forced options as r/o.
923         + commit c69c51bce0f07bf1becdb944a422bdc563705dae
924         * tools/gpgconf-comp.c (list_one_option): Skip ignored options and set
925         the no_change flag for forced options.
926         (retrieve_options_from_program): Put the attributes into the option
927         table.
928
929 2021-12-29  Werner Koch  <wk@gnupg.org>
930
931         gpg: Re-group the options in the --help output.
932         + commit f7bde071ccc8583b58ddaafa42e997e9202b041f
933         * g10/gpg.c (opts): Change oLoadExtensions, oStrict, and oNoStrict to
934         use ARGPARSE_ignore and remove the code in the option switch.
935
936         agent: Re-group the options in the --help output.
937         + commit 7e535503a9c637007a933a77e4bc674c8fb6dfea
938         * agent/gpg-agent.c (oGreeting): Remove non existant dummy option.
939
940         gpgconf: Take care of --homedir when reading/updating options.
941         + commit 5934027115239cb7b39659f14f7a1dfecada6b76
942         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Remove unused var.
943         (scdaemon_runtime_change): Ditto.
944         (dirmngr_runtime_change): Ditto.
945         (gc_component_check_options): Pass --homedir if needed.
946         (retrieve_options_from_program): Take care of --homedir.
947
948         gpgconf: Rewrite the gpgconf-comp module.
949         + commit 7a3a1ef3707194e1086c452d005319c519905d3e
950         * tools/gpgconf.h (gc_component_t): Change type to ...
951         (gc_component_id_t): this.
952         (GC_COMPONENT_ANY): New, so that we can use that in gpgconf-comp.c
953         directly.
954         * tools/gpgconf-comp.c: Major rework.
955
956         gpgconf: Support reading global options (part 2).
957         + commit 5f890f417f135e237074c8a454e6a73e66d7b78d
958         * tools/gpgconf-comp.c: Remove all regular option descriptions.  They
959         are now read in from the component.  Also remove a few meanwhile
960         obsolete options.
961         * agent/gpg-agent.c: Add option description which were only set in
962         gpgconf-comp.c.
963         * dirmngr/dirmngr.c: Ditto.
964         * scd/scdaemon.c: Ditto.
965         * sm/gpgsm.c: Ditto.
966         * g10/gpg.c: Ditto.
967
968         gpgconf: Support reading global options (part 1).
969         + commit 7397872445d6d2b8c9ef25e0108e603baa5478de
970         * tools/gpgconf.c (main): Set the config directories.
971         * tools/gpgconf-comp.c (gc_backend): Change the name of the config
972         files.
973         (struct gc_option): Add new field 'attr'.
974         (retrieve_options_from_program): Rewrite to use gpgrt_argparser.
975
976         common: New function xreallocarray.
977         + commit f0d034ebf4fc299c2a6097248f51c329e65d2976
978         * common/miscellaneous.c (gnupg_reallocarray): New.
979         (xreallocarray): New.
980
981 2021-12-13  Werner Koch  <wk@gnupg.org>
982
983         common,w32: Sync read_w32_registry_string with the gpgrt version.
984         + commit 1af559a9a24fd930094ab7b466ed051cdbc66f99
985         * common/w32-reg.c (get_root_key): Add short version of the root
986         classes.
987
988 2021-12-07  NIIBE Yutaka  <gniibe@fsij.org>
989
990         gpg: Accept Ed25519 private key in SOS which reserves leading zeros.
991         + commit 14de7b1e5904e78fcbe413a82d0f19b750bd8830
992         * g10/parse-packet.c (sos_read): Backport from 2.3.
993         (parse_key): Use sos_read for Ed25519 private key.
994
995 2021-11-23  Werner Koch  <wk@gnupg.org>
996
997         Release 2.2.33.
998         + commit 457f6ac1ef6d61ffcc336683a85ffeed3114ae63
999
1000
1001 2021-11-23  Ineiev  <ineiev@gnu.org>
1002
1003         po: Update Russian translation.
1004         + commit 007fea8ce9af97f36b48253c6be764dcd35fdd9e
1005
1006
1007 2021-11-22  Werner Koch  <wk@gnupg.org>
1008
1009         gpg: New option --forbid-gen-key.
1010         + commit 985fb25c46eafc811e7a07597591ede0cf89a921
1011         * g10/gpg.c (oForbidGenKey, opts): New option.
1012         (mopt): New local struct
1013         (gen_key_forbidden): New.
1014         (main): Set and handle the option.
1015
1016 2021-11-19  Werner Koch  <wk@gnupg.org>
1017
1018         gpgconf: Include output of --list-dirs in --show-configs.
1019         + commit 40d2c931652777509aba35d48b5d193a7e208780
1020         * tools/gpgconf.c (list_dirs): Add arg special.
1021         (show_other_registry_entries): Print the Homedir.
1022         (show_configs): List directories.
1023
1024 2021-11-18  Werner Koch  <wk@gnupg.org>
1025
1026         gpgconf: --show-configs now prints a bunch of Registry entries.
1027         + commit 7f31891ab1e51c00dd42232d3c286df519c2cdb8
1028         * tools/gpgconf.c (show_other_registry_entries): New.
1029         (show_configs): Call it.  Minor reformatting.
1030
1031         gpgconf: Extend --show-config to show envvars.
1032         + commit 58652f4c0b3a5e9fb6de54d802173bc52c798134
1033         * tools/gpgconf.c (my_copy_file): Add arg LISTP and record certain
1034         things.
1035         (show_configs_one_file): New arg LISTP to be passed thru.
1036         (show_configs): Show envars and regisiry values.
1037
1038         common,w32: New function read_w32_reg_string.
1039         + commit 6c6c404883e52545ed38293384c95fdacb7227c4
1040         * common/w32-reg.c (read_w32_reg_string): New.
1041
1042         * common/t-w32-reg.c (test_read_registry): Add another test.
1043
1044         gpg,gpgsm: Add option --min-rsa-length.
1045         + commit 6ee01c1d26cae0415a3eec7f067cff7c324cb9c1
1046         * common/compliance.c (min_compliant_rsa_length): New.
1047         (gnupg_pk_is_compliant): Take in account.
1048         (gnupg_pk_is_allowed): Ditto.
1049         (gnupg_set_compliance_extra_info): New.
1050         * g10/gpg.c (oMinRSALength): New.
1051         (opts): Add --min-rsa-length.
1052         (main): Set value.
1053         * g10/options.h (opt): Add field min_rsa_length.
1054         * sm/gpgsm.c (oMinRSALength): New.
1055         (opts): Add --min-rsa-length.
1056         (main): Set value.
1057         * sm/gpgsm.h (opt): Add field min_rsa_length.
1058
1059 2021-11-15  Werner Koch  <wk@gnupg.org>
1060
1061         sm: Detect circular chains in --list-chain.
1062         + commit c9343bec83e2c2a14b564b8a13998806eab1ae9f
1063         * sm/keylist.c (list_cert_chain): Break loop for a too long chain.
1064
1065 2021-11-15  NIIBE Yutaka  <gniibe@fsij.org>
1066             Klas Lindfors
1067
1068         scd:openpgp: Support longer data for INTERNAL_AUTHENTICATE.
1069         + commit b6b735edab036e4992872ef3d44b357fb9281ca8
1070         * scd/app-openpgp.c (do_auth): Use extended Lc, when supported.
1071
1072 2021-11-14  Ingo Klöcker  <dev@ingo-kloecker.de>
1073
1074         build: Fix several "include file not found" problems.
1075         + commit 027e34235bc576e1523566bf98b2b795d3dc7967
1076         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add KSBA_CFLAGS.
1077         * kbx/Makefile.am (libkeybox_a_CFLAGS, libkeybox509_a_CFLAGS): Add
1078         NPTH_CFLAGS.
1079         * tools/Makefile.am (gpgtar_CFLAGS, gpg_wks_server_CFLAGS,
1080         gpg_wks_client_CFLAGS, gpg_pair_tool_CFLAGS): Add LIBGCRYPT_CFLAGS.
1081
1082 2021-11-14  Werner Koch  <wk@gnupg.org>
1083
1084         agent: Print the non-option warning earlier.
1085         + commit a43efc9294d158c62a3a04396fa3fe6c77090ba8
1086         * agent/gpg-agent.c (main): Move detection up.
1087
1088 2021-11-13  Werner Koch  <wk@gnupg.org>
1089
1090         gpg: Remove stale ultimately trusted keys from the trustdb.
1091         + commit bc6d56282ec998e4b2d13c522316348b5058fc3f
1092         * g10/tdbdump.c (export_ownertrust): Skip records marked with the
1093         option --trusted-key.
1094         (import_ownertrust): Clear the trusted-key flag.
1095         * g10/tdbio.h (struct trust_record): Add field flags.
1096         * g10/tdbio.c (tdbio_dump_record): Improve output.
1097         (tdbio_read_record, tdbio_write_record): Handle flags.
1098         * g10/trustdb.c (verify_own_keys): Clear stale trusted-keys and set
1099         the flag for new --trusted-keys.
1100         (tdb_update_ownertrust): Add arg as_trusted_key.  Update callers.
1101
1102         gpgconf: New command --show-configs.
1103         + commit 8fe3f57643479b8cb2e9e10fa2069c415c47d0af
1104         * tools/gpgconf.c (aShowConfigs): New.
1105         (opts): Add --show-configs.
1106         (CUTLINE_FMT): New.
1107         (show_version_gnupg): Add arg "prefix" and adjust caller.
1108         (my_copy_file): New.
1109         (show_configs_one_file): New.New.
1110         (show_configs): New.
1111         (main): Call show_configs.
1112
1113         agent,dirmngr: New option --steal-socket.
1114         + commit 6507c6ab101e61fc5a3472497d258a0109257a47
1115         * agent/gpg-agent.c (oStealSocket): New.
1116         (opts): Add option.
1117         (steal_socket): New file global var.
1118         (main): Set option.
1119         (create_server_socket): Implement option.
1120
1121         * dirmngr/dirmngr.c (oStealSocket): New.
1122         (opts): Add option.
1123         (steal_socket): New file global var.
1124         (main): Set option.  Add comment to eventually implement it.
1125
1126 2021-11-10  NIIBE Yutaka  <gniibe@fsij.org>
1127
1128         scd: More conservative selection of a card reader.
1129         + commit 0982c6cb19da689ae84ad25b6db12bf30ac75030
1130         * scd/apdu.c (select_a_reader): Only SPRx32 is in the white list.
1131
1132 2021-11-09  Bernhard M. Wiedemann  <bwiedemann@suse.de>
1133
1134         wks: Do not mark key files as executable.
1135         + commit 46ada6a9bd83daa9e5f064adfea1bb6ccdba5dcb
1136
1137
1138         wks: Allow access to newly created dirs.
1139         + commit f54feb44700062fd3f4ca2d5e6d4e203e74d94ea
1140
1141
1142 2021-11-02  Werner Koch  <wk@gnupg.org>
1143
1144         common: Support MYPROC_SELF_EXE for Solaris.
1145         + commit 006131f6289cd0e03a470c77795ad50a4bf9e269
1146         * common/homedir.c (MYPROC_SELF_EXE): Add case for SunOS.
1147
1148         common: Silence warning from unix_rootdir on systems w/o /proc.
1149         + commit bcd8f0239dfc36f99fbbb8ee309828ccee8974c0
1150         * common/homedir.c (unix_rootdir): Silence diagnostic in the common
1151         case.
1152         (MYPROC_SELF_EXE): Support NetBSD.
1153
1154 2021-11-02  Ingo Klöcker  <dev@ingo-kloecker.de>
1155
1156         common: Respect gpgconf.ctl when looking up translations.
1157         + commit 947fedf0e7d95571abd039e827c401ebc64a8abb
1158         * common/i18n.c (i18n_init): Use gnupg_localedir() instead of LOCALEDIR.
1159         (i18n_localegettext): Ditto.
1160         * tools/gpgconf-comp.c (my_dgettext): Ditto.
1161
1162 2021-11-02  Werner Koch  <wk@gnupg.org>
1163
1164         common: Support gpgconf.ctl also for BSDs.
1165         + commit 49d589c409cc1813a48fecaf3fb5772e6febe281
1166         * common/homedir.c (MYPROC_SELF_EXE): New.
1167         (unix_rootdir): Use it here.  Also support GNUPG_BUILD_ROOT as
1168         fallback.
1169
1170         common: Add keyword sysconfdir to the optional gpgconf.ctl file.
1171         + commit 3828dd7a4067db2911caebde324053b4e354a486
1172         * common/homedir.c (unix_rootdir): Add arg want_sysconfdir.
1173         (gnupg_sysconfdir): Return it.
1174
1175         common: Support a gpgconf.ctl file under Unix.
1176         + commit 82328165cf4be4771674b703c1e15178f87530e2
1177         * common/homedir.c (unix_rootdir): New.
1178         (gnupg_bindir): Use it.
1179         (gnupg_libexecdir): Use it.
1180         (gnupg_libdir): Use it.
1181         (gnupg_datadir): Use it.
1182         (gnupg_localedir): Use it.
1183
1184         common: New function substitute_envvars.
1185         + commit f0162afb6b6f8ac1a993452643d8cb64fb3f2953
1186         * common/stringhelp.c (substitute_envvars): New.  Based on code in
1187         gpg-connect-agent.
1188         * common/t-stringhelp.c: Include sysutils.h.
1189         (test_substitute_envvars): New.
1190
1191         common,w32: Do not always print "Garbled console data" warning.
1192         + commit a756a61f19ce44958f93757894f65b09cebd484a
1193         * common/init.c (_init_common_subsystems): Silence message.
1194
1195 2021-11-02  NIIBE Yutaka  <gniibe@fsij.org>
1196
1197         dns: Make reading resolv.conf more robust.
1198         + commit 152f0281552f6a8e4bc082f3aaeec17c84001cfe
1199         * dirmngr/dns.c (dns_resconf_loadfile): Skip "search" which
1200         begins with '.'.
1201
1202 2021-10-22  Werner Koch  <wk@gnupg.org>
1203
1204         gpg: Fix printing of binary notations.
1205         + commit 918e9218002b2b0d455a8df86a63c9187cf6fdf4
1206         * g10/keylist.c (show_notation): Print binary notation from BDAT.
1207
1208         gpgconf: create local option file even if a global file exists.
1209         + commit 5e3eea4b738cc3e8e257635b7cb53dcf43c07f79
1210         * tools/gpgconf-comp.c (munge_config_filename): New.
1211         (change_options_program): Call it.
1212
1213 2021-10-22  NIIBE Yutaka  <gniibe@fsij.org>
1214
1215         scd: Select a reader for PC/SC.
1216         + commit 752422a792cecf459b37f517d634bcf272292b14
1217         * scd/apdu.c (select_a_reader): New.
1218         (open_pcsc_reader): Use select_a_reader.
1219
1220 2021-10-13  Werner Koch  <wk@gnupg.org>
1221
1222         gpg: New option --override-compliance-check.
1223         + commit 773b8fbbe915449c723302f5268d7906b40d84d3
1224         * g10/gpg.c (oOverrideComplianceCheck): New.
1225         (opts): Add new option.
1226         (main): Set option and add check for batch mode.
1227         * g10/options.h (opt): Add flags.override_compliance_check.
1228
1229         * g10/sig-check.c (check_signature2): Factor complaince checking out
1230         to ...
1231         (check_key_verify_compliance): new.  Turn error into a warning in
1232         override mode.
1233
1234 2021-10-06  Werner Koch  <wk@gnupg.org>
1235
1236         Release 2.2.32.
1237         + commit 476096099db9ea3f66581fa3ca8724291e3a5c80
1238
1239
1240 2021-10-06  NIIBE Yutaka  <gniibe@fsij.org>
1241
1242         gpg: Skip the packet when not used for AEAD.
1243         + commit a17f1b607473f5aae081ffe22381dda2b54a7a6a
1244         * g10/free-packet.c (free_packet): Add the case for case
1245         PKT_ENCRYPTED_AEAD.
1246
1247 2021-10-06  Werner Koch  <wk@gnupg.org>
1248
1249         dirmngr: New option --ignore-cert.
1250         + commit 323a20399d905e8ae1cc0d71846c298116460464
1251         * dirmngr/dirmngr.h (struct fingerprint_list_s): Add field binlen.
1252         (opt): Add field ignored_certs.
1253         * dirmngr/dirmngr.c: Add option --ignore-cert
1254         (parse_rereadable_options): Handle that option.
1255         (parse_ocsp_signer): Rename to ...
1256         (parse_fingerprint_item): this and add two args.
1257         * dirmngr/certcache.c (put_cert): Ignore all to be igored certs.
1258         Change callers to handle the new error return.
1259
1260         dirmngr: Fix Let's Encrypt certificate chain validation.
1261         + commit 341ab0123a8fa386565ecf13f6462a73a137e6a4
1262         * dirmngr/certcache.c (find_cert_bysubject): Return the first trusted
1263         certififcate if any.
1264
1265 2021-09-15  Werner Koch  <wk@gnupg.org>
1266
1267         Release 2.2.31.
1268         + commit ecf4c2f611238799a3af6369a64e418a77ab9dd6
1269
1270
1271 2021-09-14  Werner Koch  <wk@gnupg.org>
1272
1273         scd: Remove context reference counting from pc/sc.
1274         + commit 67e1834ad402e86906429ba0e2bf7ebd72de2450
1275         * scd/apdu.c (pcsc): Add flag context_valid, remove count.
1276         (close_pcsc_reader): Use new flag instead of looking at magic context
1277         value.
1278         (pcsc_init): Set new flag.
1279         (open_pcsc_reader): Use new flag.
1280         (apdu_init): Clear new flag.
1281
1282         * scd/apdu.c: Remove assert.h.  Replace all assert by log_assert.
1283
1284 2021-09-13  Werner Koch  <wk@gnupg.org>
1285
1286         common: New envvar GNUPG_EXEC_DEBUG_FLAGS.
1287         + commit 117afec018911a3b0187f15c8559f811a72ddb79
1288         * common/exechelp-w32.c (gnupg_spawn_process_detached): Silence
1289         breakaway messages and turn them again into debug messages.
1290
1291 2021-09-08  Werner Koch  <wk@gnupg.org>
1292
1293         scd: Support PC/SC for "getinfo reader_list".
1294         + commit f32994b0bf07d62bf596cc8bb6ec3c3a5f133ac4
1295         * scd/apdu.c: Include membuf.h.
1296         (pcsc): Add reader_list field.
1297         (open_pcsc_reader): Fill that field.
1298         (apdu_get_reader_list): New.
1299         * scd/command.c: Remove header ccid-driver.h.
1300         (pretty_assuan_send_data): New.
1301         (cmd_getinfo): Print all reader names.
1302
1303 2021-09-07  Werner Koch  <wk@gnupg.org>
1304
1305         scd: Fix possible assertion in close_pcsc_reader.
1306         + commit 192113552faa98f40cc91fe014ec55861474626c
1307         * scd/apdu.c (close_pcsc_reader): Don't ref-count if the context is
1308         invalid.
1309         (open_pcsc_reader): Compare the context against -1 which is our
1310         indicator for an invalid context.
1311
1312         agent: Fix segv in GET_PASSPHRASE (regression)
1313         + commit 4b2cfec2dc2fd524a4fed6c17bb11e6a7baf15f2
1314         * agent/command.c (cmd_get_passphrase): Do not deref PI.  PI is always
1315         NULL.
1316
1317 2021-08-27  NIIBE Yutaka  <gniibe@fsij.org>
1318
1319         common: Fix put_membuf.
1320         + commit 7e431e009e479e63f0996a612e12fb9d8b209ab9
1321         * common/membuf.c (put_membuf): Allow NULL for the second arg.
1322
1323         build: Fix removal of AC_TYPE_SIGNAL.
1324         + commit 0ca84cbdf0a5a956f4de80f874f8a3b495cfab20
1325         * configure.ac: AC_TYPE_SIGNAL is still needed.
1326
1327         common: Fix get_signal_name for GNU/Linux.
1328         + commit d5f9481186eaf2ff28d7ab04fd36f0bbd1c9714d
1329         * common/signal.c (get_signal_name): Use sigdescr_np if available.
1330         * configure.ac: Check the function.
1331
1332 2021-08-26  Werner Koch  <wk@gnupg.org>
1333
1334         Release 2.2.30.
1335         + commit d583e750a668f82bdaa1d0f7c4ffc68c35ed4ca6
1336
1337
1338 2021-08-20  Werner Koch  <wk@gnupg.org>
1339
1340         wkd: Properly unescape the user-id from a key listing.
1341         + commit 2b65f4e953806977490b11cb4739c22ab94e0030
1342         * tools/wks-util.c (append_to_uidinfo_list): Unescape UID.
1343
1344         common: New function decode_c_string.
1345         + commit 17e2ec488f662059df0fd2d3b777aa51eab5c0cc
1346         * common/miscellaneous.c (decode_c_string): New.
1347
1348         agent: Use the sysconfdir for a pattern file.
1349         + commit 5ed8e598faaffa9aec43fc70199ed7f57560c2ba
1350         * agent/genkey.c (do_check_passphrase_pattern): Use make_filename.
1351
1352         agent: Ignore passphrase constraints for a generated passphrase.
1353         + commit db5dc7a91af3774cfbce0bc533e0f0b5498402fe
1354         * agent/agent.h (PINENTRY_STATUS_PASSWORD_GENERATED): New.
1355         (MAX_GENPIN_TRIES): Remove.
1356         * agent/call-pinentry.c (struct entry_parm_s):
1357         (struct inq_cb_parm_s): Add genpinhash and genpinhas_valid.
1358         (is_generated_pin): New.
1359         (inq_cb): Suppress constraints checking for a generated passphrase.
1360         No more need for several tries to generate the passphrase.
1361         (do_getpin): Store a generated passphrase/pin in the status field.
1362         (agent_askpin): Suppress constraints checking for a generated
1363         passphrase.
1364         (agent_get_passphrase): Ditto.
1365         * agent/command.c (cmd_get_passphrase): Ditto.
1366
1367         wkd: Fix client issue with leading or trailing spaces in user-ids.
1368         + commit 576e429d41a144ff4f0c00e8722da2f92ae17d9a
1369         * common/recsel.c (recsel_parse_expr): Add flag -t.
1370         * common/stringhelp.c (strtokenize): Factor code out to
1371         do_strtokenize.
1372         (strtokenize_nt): New.
1373         (do_strtokenize): Add arg trim to support the strtokenize_nt.
1374         * common/t-stringhelp.c (test_strtokenize_nt): New test cases.
1375
1376         * tools/wks-util.c (wks_list_key): Use strtokenize_nt and the recsel
1377         flag -t.
1378
1379         gpg: Return SUCCESS/FAILURE status also for --card-edit/name.
1380         + commit 6685696adafba104072303507dedbbd45731d326
1381         * g10/card-util.c (change_name): Call write_sc_op_status.
1382
1383 2021-08-18  Werner Koch  <wk@gnupg.org>
1384
1385         agent: Improve the GENPIN callback.
1386         + commit 2e69ce878f893de0830317f94c51fdce70e1e540
1387         * agent/call-pinentry.c (DEFAULT_GENPIN_BYTES): Replace by  ...
1388         (DEFAULT_GENPIN_BITS): this and increase to 150.
1389         (generate_pin): Make sure that we use at least 128 bits.
1390
1391         agent: Fix for zero length help string in pinentry hints.
1392         + commit 4855888c0a56a50be6085476f5767d0c62722f2d
1393         * agent/call-pinentry.c: Remove unused assert.h.
1394         (inq_cb): Fix use use of assuan_end_confidential in case of nested
1395         use.
1396         (do_getpin): Ditto.
1397         (setup_formatted_passphrase): Escape the help string.
1398         (setup_enforced_constraints): Ignore empty help strings.
1399
1400         common,w32: Replace log_debug by log_info for InProcessJobs.
1401         + commit ec2f1b38980a1b60624a35707ccebb05c5524d2f
1402         * common/exechelp-w32.c (gnupg_spawn_process_detached): Use log_info.
1403
1404 2021-08-17  Werner Koch  <wk@gnupg.org>
1405
1406         w32: Move socketdir to LOCAL_APPDATA.
1407         + commit 4dfa951a0a631d5e0e44ff5fb8fb74adb651190c
1408         * common/homedir.c (is_gnupg_default_homedir): Use standard_homedir
1409         instead of the constant which makes a difference on Windows.
1410         (_gnupg_socketdir_internal) [W32]: Move the directory to LOCAL_APPDATA.
1411         (gnupg_cachedir): Remove unsued function.
1412
1413         * common/sysutils.c (gnupg_rmdir): New.
1414         * tools/gpgconf.c (main): s/rmdir/gnupg_rmdir/.
1415
1416         gpgconf,w32: Print more registry diagnostics with --list-dirs.
1417         + commit 013f2e4672b1565002700e307d3bb95d9352c4d5
1418         * tools/gpgconf.c (list_dirs): Figure out classes with the key.
1419
1420         agent: Make QT_QPA_PLATFORMTHEME=qt5ct work for the pient.
1421         + commit 455ba49071dea7588c9de11785b3092e45e4560b
1422         * agent/call-pinentry.c (atfork_core): Pass DISPLAY.
1423
1424         agent: New option --check-sym-passphrase-pattern.
1425         + commit c6a4a660fdb977713a1e6c0dd4dae97ddffbe376
1426         * agent/gpg-agent.c (oCheckSymPassphrasePattern): New.
1427         (opts): Add --check-sym-passphrase-pattern.
1428         (parse_rereadable_options): Set option.
1429         (main): Return option info.
1430         * tools/gpgconf-comp.c: Add new option.
1431         * agent/agent.h (opt): Add var check_sym_passphrase_pattern.
1432         (struct pin_entry_info_s): Add var constraints_flags.
1433         (CHECK_CONSTRAINTS_NOT_EMPTY): New to replace a hardwired 1.
1434         (CHECK_CONSTRAINTS_NEW_SYMKEY): New.
1435         * agent/genkey.c (check_passphrase_pattern): Rename to ...
1436         (do_check_passphrase_pattern): this to make code reading
1437         easier. Handle the --check-sym-passphrase-pattern option.
1438         (check_passphrase_constraints): Replace arg no_empty by a generic
1439         flags arg.  Also handle --check-sym-passphrase-pattern here.
1440         * agent/command.c (cmd_get_passphrase): In --newsymkey mode pass
1441         CHECK_CONSTRAINTS_NEW_SYMKEY flag.
1442         * agent/call-pinentry.c (struct entry_parm_s): Add constraints_flags.
1443         (struct inq_cb_parm_s): New.
1444         (inq_cb): Use new struct for parameter passing.  Pass flags to teh
1445         constraints checking.
1446         (do_getpin): Pass constraints flag down.
1447         (agent_askpin): Take constraints flag from the supplied pinentry
1448         struct.
1449
1450 2021-08-17  Ingo Klöcker  <dev@ingo-kloecker.de>
1451
1452         agent: Add checkpin inquiry for pinentry.
1453         + commit 9832566e4512ab7cb90aa0b7f769792f5c123ed4
1454         * agent/call-pinentry.c: Include zb32.
1455         (MAX_GENPIN_TRIES): New.
1456         (DEFAULT_GENPIN_BYTES): New.
1457         (generate_pin): New.
1458         (setup_genpin): New.
1459         (inq_quality): Rename to ...
1460         (inq_cb): this.  Handle checkpin inquiry.
1461         (setup_enforced_constraints): New.
1462         (agent_get_passphrase): Call sertup_genpin.  Call
1463         setup_enforced_constraints if new passphrase is requested.
1464
1465 2021-08-16  Ingo Klöcker  <dev@ingo-kloecker.de>
1466
1467         agent: New option --pinentry-formatted-passphrase.
1468         + commit 32fbdddf8b4729d9a54a7751c0b5e406a470657f
1469         * agent/agent.h (opt): Add field pinentry_formatted_passphrase.
1470         * agent/call-pinentry.c (setup_formatted_passphrase): New.
1471         (agent_get_passphrase): Pass option to pinentry.
1472         * agent/gpg-agent.c (oPinentryFormattedPassphrase): New.
1473         (opts): Add option.
1474         (parse_rereadable_options): Set option.
1475
1476         common: Pass XDG_SESSION_TYPE and QT_QPA_PLATFORM envvars to pinentry.
1477         + commit 8fff61de9433e9293712a1dd21dfbe12f951eff9
1478         * common/session-env.c (stdenvnames): Add XDG_SESSION_TYPE and
1479         QT_QPA_PLATFORM.
1480
1481 2021-08-16  Werner Koch  <wk@gnupg.org>
1482
1483         tools: Extend gpg-check-pattern.
1484         + commit 5ca15e58b241901cc46fd9fad4db3bbb9e321988
1485         * tools/gpg-check-pattern.c: Major rewrite.
1486
1487 2021-07-04  Werner Koch  <wk@gnupg.org>
1488
1489         Release 2.2.29.
1490         + commit 695a879af81e895741109874b9ac0712e1afc994
1491
1492
1493 2021-06-25  Werner Koch  <wk@gnupg.org>
1494
1495         dirmngr: Change the default keyserver.
1496         + commit 47c4e3e00a7ef55f954c14b3c237496e54a853c1
1497         * configure.ac (DIRMNGR_DEFAULT_KEYSERVER): Change to
1498         keyserver.ubuntu.com.
1499
1500         * dirmngr/certcache.c (cert_cache_init): Disable default pool cert.
1501         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
1502         * dirmngr/http.c (http_session_new): Ditto.
1503
1504         * dirmngr/server.c (make_keyserver_item): Use a different mapping for
1505         the gnupg.net names.
1506
1507         gpg: Let --fetch-key return an exit code on failure.
1508         + commit 5fe4b978875271fb55f1f674ab545bed2b97a7a8
1509         * g10/keyserver.c (keyserver_fetch): Return an error code.
1510         * g10/gpg.c (main) <aFetchKeys>: Return 1 in case of no data.
1511
1512 2021-06-23  NIIBE Yutaka  <gniibe@fsij.org>
1513
1514         scd:ccid: Handle LIBUSB_TRANSFER_OVERFLOW interrupt transfer.
1515         + commit b90c55fa66db254da98958de10e1287c39a4322a
1516         * scd/ccid-driver.c (intr_cb): Ignore LIBUSB_TRANSFER_OVERFLOW.
1517
1518         scd:ccid:spr532: Extend abort_cmd for initialization time.
1519         + commit 8e941e19b08785e5e709943765548d4f9f9f57a3
1520         * scd/ccid-driver.c (abort_cmd): Add INIT argument to support
1521         synchronize until success, even ignoring timeout.
1522         (bulk_in): Normal use case of abort_cmd.
1523         (ccid_vendor_specific_init): Initial use case of abort_cmd.
1524
1525 2021-06-22  Werner Koch  <wk@gnupg.org>
1526
1527         tests: Cope with broken Libgcrypt versions.
1528         + commit af2fd9f0af25e1f95d9484f7d2125cd9888aa308
1529         * common/t-sexputil.c (test_ecc_uncompress): Ignore unknwon curve
1530         errors.
1531
1532         w32: Add fallback in case the Windows console can't cope with Unicode.
1533         + commit e94dfa21d2c17b590122d55468f68e8ab72e4193
1534         * common/ttyio.c (w32_write_console): Fallback to WriteConsoleA on
1535         error.
1536
1537 2021-06-21  Werner Koch  <wk@gnupg.org>
1538
1539         dirmngr: Fix regression in KS_GET for mail address pattern.
1540         + commit adf7bfba5ddce9faadff959369ba2271cdd36825
1541         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Munge mail address pattern.
1542         (ks_hkp_get): Allow for mail addresses.
1543         -
1544
1545         Before the keyserver changes in 2.2.28 gpg passed dirmngr a pail
1546         address as an exact pattern (e.g. "=foo@example.org").  Since 2.2.28
1547         the mail address is detected gpg gpg and we see for example
1548         "<foo@example.org>".  This patch fixes this to turn a mail address
1549         into an exact match again.
1550
1551 2021-06-14  NIIBE Yutaka  <gniibe@fsij.org>
1552
1553         scd: Error code map fix for older Yubikey.
1554         + commit 01a413d5235f1bbd00f83fb86d0e183d8f0b1a57
1555         * scd/iso7816.c (map_sw): Recognize 6A86.
1556
1557 2021-06-11  NIIBE Yutaka  <gniibe@fsij.org>
1558
1559         dirmngir: Fix build with --disable-ldap.
1560         + commit c8b2162c0e7eb42b74811b7ed225fa0f56be4083
1561         * dirmngr/dirmngr.c (parse_rereadable_options) [USE_LDAP]:
1562         Conditionalize.
1563
1564         dirmngr: Remove use of USE_LDAPWRAPPER.
1565         + commit 8ee4c8d1e0d7677d4f8b9538c12b32bb6393c2c5
1566         * configure.ac (USE_LDAPWRAPPER): Remove.
1567         * dirmngr/Makefile.am: Use USE_LDAP instead of USE_LDAPWRAPPER.
1568         * dirmngr/ldap-wrapper-ce.c: Remove.
1569         * dirmngr/ldap-wrapper.h, dirmngr/ldap-wrapper.c: Remove
1570         USE_LDAPWRAPPER things.
1571
1572 2021-06-10  Werner Koch  <wk@gnupg.org>
1573
1574         Release 2.2.28.
1575         + commit 9f6076868ecd313e832c112ea79cfcffed3dc342
1576
1577
1578         gpg: Partial fix for Unicode problem in output files.
1579         + commit 845711d1420cc01289c15ba49deb03200a5cd102
1580         * g10/openfile.c (overwrite_filep): Use gnupg_access.
1581
1582         scd: Fix serial number detection for Yubikey 5.
1583         + commit c2f02797cdefdce5afd8b29bb8e51d4515a70a96
1584         * scd/app.c (app_new_register): Handle serial number correctly.
1585
1586 2021-06-09  Werner Koch  <wk@gnupg.org>
1587
1588         gpgtar,w32: Fix file size computation.
1589         + commit 198b240b195596974e8b61e2b79fb6e8dc78f89a
1590         * tools/gpgtar-create.c (fillup_entry_w32): Move parentheses.
1591
1592         sm: New option --ldapserver as an alias for --keyserver.
1593         + commit d6df1bf84969bf5f5781e33bc1c2f6cb2aee0093
1594         * sm/gpgsm.c (opts): Add option --ldapserver and make --keyserver an
1595         alias.
1596
1597         dirmngr: Allow to pass no filter args to dirmngr_ldap.
1598         + commit f6e45671aa26f3e7abb968a876de7bbdb4fca3f1
1599         * dirmngr/dirmngr_ldap.c (main): Handle no args case.
1600
1601 2021-06-08  Werner Koch  <wk@gnupg.org>
1602
1603         w32: Change spawn functions to use Unicode version of CreateProcess.
1604         + commit 7a98e45e74ec2883c24689964d6119796da0969f
1605         * common/exechelp-w32.c (gnupg_spawn_process): Change to use
1606         CreateProcessW.
1607         (gnupg_spawn_process_fd): Ditto.
1608         (gnupg_spawn_process_detached): Ditto.
1609         * g10/exec.c (w32_system): Ditto.
1610
1611 2021-06-08  Andre Heinecke  <aheinecke@gnupg.org>
1612
1613         common,w32: Breakaway detached childs when in job.
1614         + commit f20e9a464487443552b6cbdf918c6448d3cb643f
1615         * common/exechelp-w32.c (gnupg_spawn_process_detached): Add
1616         CREATE_BREAKAWAY_FROM_JOB creation flag if required.
1617
1618 2021-06-08  Werner Koch  <wk@gnupg.org>
1619
1620         w32: Always use Unicode for console input and output.
1621         + commit b912f07cdf00043b97fca54e4113fab277726e03
1622         * common/init.c (_init_common_subsystems) [W32]: Set the codepage to
1623         UTF-8 for input and putput.  Switch gettext to UTF-8.
1624         * g10/gpg.c (utf8_strings) [W32]: Make sure this is always set.
1625
1626         w32: Free memory allocated by new function w32_write_console.
1627         + commit ebdb62a98a6e917bafb795b5f50483a95790e739
1628         * common/ttyio.c (w32_write_console): Free buffer.
1629
1630         common,w32: Allow Unicode input and output with the console.
1631         + commit 90aadf69f730ff1bd053abcd6cc8bc67518ecf4b
1632         * common/ttyio.c (do_get) [W32]: Use ReadConsoleW.
1633         (w32_write_console): New.
1634         (tty_printf, tty_fprintf) [W32]: Use new function.
1635
1636         common: Re-indent ttyio.c and remove EMX, RISCOS, and CE support.
1637         + commit 521e176a605e6b6229825761906005b05608daf5
1638         * common/ttyio.c: Remove cruft like EMX and RISCOS support.  Translate
1639         a few strings.  Re-indent.
1640
1641         common: Rename w32-misc.c to w32-cmdline.c.
1642         + commit d7d9a5ba3cbf9cf7e22a8871474032b525825eed
1643         * common/w32-misc.c: Rename to ....
1644         * common/w32-cmdline.c: this.
1645         * common/Makefile.am: Adjust.
1646
1647         common,w32: Implement globing of command line args.
1648         + commit 09f49b4c9aae46c40a189b1270e215bc978dbc3c
1649         * common/w32-misc.c [W32]: Include windows.h
1650         (struct add_arg_s): New.
1651         (add_arg): New.
1652         (glob_arg): New.
1653         (parse_cmdstring): Add arg argvflags and set it.
1654         (w32_parse_commandline): Add arg r_itemsalloced.  Add globing.
1655
1656         * common/init.c (prepare_w32_commandline): Mark glob created items as
1657         leaked.
1658
1659         * common/t-w32-cmdline.c : Include windows.h
1660         (test_all): Add simple glob test for Unix.
1661         (main): Add manual test mode for Windows.
1662
1663         * common/xasprintf.c (xtryreallocarray): New.
1664
1665         common,w32: Refine the command line parsing for \ in quotes.
1666         + commit 4d6807b215e7541fd52caf7e4adc40d77670f99f
1667         * common/t-w32-cmdline.c (test_all): Add new test cases.
1668         * common/w32-misc.c (strip_one_arg): Add arg endquote.
1669         (parse_cmdstring): Take care of backslashes in quotes.
1670
1671         common: First take on handling Unicode command line args.
1672         + commit 90ddd1cf13cd6bb88d5bb8c1846d7297ca8ac81c
1673         * common/w32-misc.c: New.
1674         * common/t-w32-cmdline.c: New.
1675         * common/init.c: Include w32help.h.
1676         (prepare_w32_commandline): New.
1677         (_init_common_subsystems) [W32]: Call prepare_w32_commandline.
1678
1679         * common/Makefile.am (common_sources) [W32]: Add w32-misc.c
1680         (module_tests): Add t-w32-cmdline
1681         (t_w32_cmdline_LDADD): New.
1682
1683         gpg: Prepare for globing with UTF-8.
1684         + commit 1f59c4c8e2cfa2b111f0798212546864668383f9
1685         * g10/gpg.c (_dowildcard): Remove.
1686         (my_strusage): Enable wildcards using our new system.
1687
1688         dirmngr: Rewrite the LDAP wrapper tool.
1689         + commit 39815c023f0371dea01f7c51469b19c06ad18718
1690         * dirmngr/ldap-misc.c: New.
1691         * dirmngr/ldap-misc.h: New.
1692         * dirmngr/ks-engine-ldap.c: Include ldap-misc.h.
1693         (ldap_err_to_gpg_err, ldap_to_gpg_err): Move to ldap-misc.c.
1694         * dirmngr/ldap-wrapper.c (ldap_wrapper): Print list of args in debug
1695         mode.
1696         * dirmngr/server.c (lookup_cert_by_pattern): Handle GPG_ERR_NOT_FOUND
1697         the saqme as GPG_ERR_NO_DATA.
1698         * dirmngr/ldap.c (run_ldap_wrapper): Add args tls_mode and ntds.
1699         Remove arg url.  Adjust for changes in dirmngr_ldap.
1700         (url_fetch_ldap): Remove args host and port.  Parse the URL and use
1701         these values to call run_ldap_wrapper.
1702         (attr_fetch_ldap): Pass tls flags to run_ldap_wrapper.
1703         (rfc2254_need_escape, rfc2254_escape): New.
1704         (extfilt_need_escape, extfilt_escape): New.
1705         (parse_one_pattern): Rename to ...
1706         (make_one_filter): this.  Change for new dirmngr_ldap calling
1707         convention.  Make issuer DN searching partly work.
1708         (escape4url, make_url): Remove.
1709         (start_cert_fetch_ldap): Change for new dirmngr_ldap calling
1710         convention.
1711         * dirmngr/dirmngr_ldap.c: Major rewrite.
1712
1713         * dirmngr/t-ldap-misc.c: New.
1714         * dirmngr/t-support.h (DIM, DIMof): New.
1715         * dirmngr/Makefile.am (dirmngr_ldap_SOURCES): Add ldap-misc.c
1716         (module_tests) [USE_LDAP]: Add t-ldap-misc.
1717         (t_ldap_parse_uri_SOURCES): Ditto.
1718         (t_ldap_misc_SOURCES): New.
1719
1720 2021-06-08  NIIBE Yutaka  <gniibe@fsij.org>
1721
1722         agent: Appropriate error code for importing key with no passwd.
1723         + commit 2f98d8a0f92dc991bff406e159690a111202fcb4
1724         * agent/cvt-openpgp.c (convert_from_openpgp_main): Return
1725         GPG_ERR_BAD_SECKEY.
1726
1727 2021-06-04  Werner Koch  <wk@gnupg.org>
1728
1729         dirmngr: Remove useless code.
1730         + commit 8bd5172539e1399b407aa2a9d56fa51b8e040ae3
1731         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Remove the
1732         password_param thing because we set the password directly without an
1733         intermediate var.
1734
1735 2021-06-02  Werner Koch  <wk@gnupg.org>
1736
1737         sm: Support AES-GCM decryption.
1738         + commit b722fd755c77cbba12478f6de8913c73213d78ee
1739         * sm/gpgsm.c (main): Use gpgrt_fcancel on decryption error if gpgrt
1740         supports this.
1741         * sm/decrypt.c (decrypt_gcm_filter): New.
1742         (gpgsm_decrypt): Use this filter if requested.  Check authtag.
1743         * common/compliance.c (gnupg_cipher_is_allowed): Allow GCM for gpgsm
1744         in consumer (decrypt) de-vs mode.
1745
1746 2021-05-28  Werner Koch  <wk@gnupg.org>
1747
1748         gpgconf: Make runtime changes with different homedir work.
1749         + commit c8f0b02936c73b6ef3c99a1bea9ae63f74da0768
1750         * tools/gpgconf-comp.c (dirmngr_runtime_change): Pass --homedir
1751         first.  Remove unused variable.
1752
1753         dirmngr: Fix default port for our redefinition of ldaps.
1754         + commit 8de9d54ac83fa20cb52b847b643311841be4d6dc
1755         * dirmngr/server.c (make_keyserver_item): Fix default port for ldaps.
1756         Move a tmpstr out of the blocks.
1757         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Improve diagnostics.
1758
1759 2021-05-27  NIIBE Yutaka  <gniibe@fsij.org>
1760
1761         build: _DARWIN_C_SOURCE should be 1.
1762         + commit 40b2890b4349781ddb0330193aed0286b1d23dad
1763         * configure.ac (*-apple-darwin*): Set _DARWIN_C_SOURCE 1.
1764
1765 2021-05-26  Werner Koch  <wk@gnupg.org>
1766
1767         dirmngr: Use --ldaptimeout for OpenPGP LDAP keyservers.
1768         + commit 317d5947b84ae2707e46b89fb0d8318c07174e13
1769         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Use LDAP_OPT_TIMEOUT.
1770
1771         * dirmngr/dirmngr.c (main): Move --ldaptimeout setting to ...
1772         (parse_rereadable_options): here.
1773
1774         dirmngr: New option --ldapserver.
1775         + commit ff17aee5d10c8c5ab902253fb4332001c3fc3701
1776         * dirmngr/dirmngr.c (opts): Add option --ldapserver.
1777         (ldapserver_list_needs_reset): New var.
1778         (parse_rereadable_options): Implement option.
1779         (main): Ignore dirmngr_ldapservers.conf if no --ldapserver is used.
1780
1781         * dirmngr/server.c (cmd_ldapserver): Add option --clear and list
1782         configured servers if none are given.
1783
1784         dirmngr: Allow for non-URL specified ldap keyservers.
1785         + commit 2b4cddf9086faaf5b35f64a7db97a5ce8804c05b
1786         * dirmngr/server.c (cmd_ldapserver): Strip an optional prefix.
1787         (make_keyserver_item): Handle non-URL ldap specs.
1788         * dirmngr/dirmngr.h (struct ldap_server_s): Add fields starttls,
1789         ldap_over_tls, and ntds.
1790
1791         * dirmngr/ldapserver.c (ldapserver_parse_one): Add for an empty host
1792         string.  Improve error messages for the non-file case.  Support flags.
1793         * dirmngr/ks-action.c (ks_action_help): Handle non-URL ldap specs.
1794         (ks_action_search, ks_action_get, ks_action_put): Ditto.
1795         * dirmngr/ks-engine-ldap.c: Include ldapserver.h.
1796         (ks_ldap_help): Handle non-URL ldap specs.
1797         (my_ldap_connect): Add args r_host and r_use_tls.  Rewrite to support
1798         URLs and non-URL specified keyservers.
1799         (ks_ldap_get): Adjust for changes in my_ldap_connect.
1800         (ks_ldap_search): Ditto.
1801         (ks_ldap_put): Ditto.
1802
1803         gpg,sm: Simplify keyserver spec parsing.
1804         + commit 9f586700ec4ceac97fd47cd799878a8847342ffa
1805         * common/keyserver.h: Remove.
1806         * sm/gpgsm.h (struct keyserver_spec): Remove.
1807         (opt): Change keyserver to a strlist_t.
1808         * sm/gpgsm.c (keyserver_list_free): Remove.
1809         (parse_keyserver_line): Remove.
1810         (main): Store keyserver in an strlist.
1811         * sm/call-dirmngr.c (prepare_dirmngr): Adjust for the strlist.  Avoid
1812         an ambiguity in dirmngr by adding a prefix if needed.
1813
1814         * g10/options.h (struct keyserver_spec): Move definition from
1815         keyserver.h to here.  Remove most fields.
1816         * g10/keyserver.c (free_keyserver_spec): Adjust.
1817         (cmp_keyserver_spec): Adjust.
1818         (parse_keyserver_uri): Simplify.
1819         (keyidlist): Remove fakev3 arg which does not make any sense because
1820         we don't even support v3 keys.
1821
1822         dirmngr: Support pseudo URI scheme "opaque".
1823         + commit 72124fadafde153f8ac89a70202006d831829d06
1824         * dirmngr/http.h (HTTP_PARSE_NO_SCHEME_CHECK): New.
1825         * dirmngr/http.c (http_parse_uri): Use this flag.  Change all callers
1826         to use the new macro for better readability.
1827         (do_parse_uri): Add pseudo scheme "opaque".
1828         (uri_query_value): New.
1829
1830 2021-05-21  NIIBE Yutaka  <gniibe@fsij.org>
1831
1832         scd: Release memory for RDRNAME.
1833         + commit 5be0d075b1ad03a46a6169bf16cd3ee6102e1358
1834         * scd/apdu.c (apdu_close_reader): Free RDRNAME field.
1835
1836 2021-05-20  Jakub Jelen  <jjelen@redhat.com>
1837
1838         scd: avoid memory leaks.
1839         + commit 678e1b20d3531e642fa8871ea56c6c7d5c208fbe
1840         * scd/app-p15.c (send_certinfo): free labelbuf
1841           (do_sign): goto leave instead of return
1842         * scd/command.c (cmd_genkey): goto leave instead of return
1843
1844         common: Avoid double-free.
1845         + commit 4dc4b025d6dd194a96b11ccfd64d763d2c902a91
1846         * common/name-value.c (do_nvc_parse): reset to null after ownership
1847         change
1848
1849 2021-05-19  Ineiev  <ineiev@gnu.org>
1850
1851         po: Update Russian translation.
1852         + commit 17b7048732e265450323cc3e01a48c9d492edf0c
1853
1854
1855 2021-05-19  Werner Koch  <wk@gnupg.org>
1856
1857         dirmngr: For KS_SEARCH return the fingerprint also with LDAP.
1858         + commit f0e538619d5079fcd87c31e853e6deb28564a321
1859         * dirmngr/ks-engine-ldap.c (extract_keys): Return the fingerprint if
1860         available.
1861         (ks_ldap_search): Ditto.
1862         (extract_keys): Make sure to free the ldap values also in corner
1863         cases.
1864         (my_ldap_value_free): New.
1865         (ks_ldap_get): Ditto.
1866         (ks_ldap_search): Ditto.
1867         (my_ldap_connect): Ditto.
1868
1869 2021-05-18  Werner Koch  <wk@gnupg.org>
1870
1871         gpg: Fix sending an OpenPGP key with umlaut to an LDAP keyserver.
1872         + commit 7bf8530e75d05a712d00a333d59b0a8cf663b9cb
1873         * g10/call-dirmngr.c (record_output): Rewrite.
1874
1875 2021-05-18  Ingo Klöcker  <dev@ingo-kloecker.de>
1876
1877         scd:p15: Fix logic for appending product name to MANUFACTURER.
1878         + commit aa6288140481bccc366e87fcdc6781dc82d0af31
1879         * scd/app-p15.c (do_getattr): Append product name to MANUFACTURER if
1880         manufacturer_id does not already contain a bracket and if we have a
1881         product name.
1882
1883 2021-05-17  Werner Koch  <wk@gnupg.org>
1884
1885         gpg: Use a more descriptive prompt for symmetric decryption.
1886         + commit 03f83bcda5d1f8d8246bcc1afc603b7f74d0626b
1887         * g10/keydb.h (GETPASSWORD_FLAG_SYMDECRYPT): New.
1888         (passphrase_to_dek_ext): Remove this obsolete prototype.
1889         * g10/passphrase.c (passphrase_get): Add arg flags.  Use new flag
1890         value.
1891         (passphrase_to_dek): Add arg flags and pass it on.
1892         * g10/mainproc.c (proc_symkey_enc): Use new flag.
1893
1894         sm: Ask for the password for password based decryption (pwri)
1895         + commit 50ea1b67e8260aaebbeba0c4cd73e21443a74636
1896         * sm/decrypt.c (pwri_decrypt): Add arg ctrl.  Ask for passphrase.
1897
1898         * sm/export.c (export_p12): Mark string as translatable.
1899         * sm/import.c (parse_p12): Ditto.
1900
1901         sm: Support decryption of password based encryption (pwri)
1902         + commit 6f31acac767f2ec67729c0491f29061b26fe14b9
1903         * sm/decrypt.c (string_from_gcry_buffer): New.
1904         (pwri_parse_pbkdf2): New.
1905         (pwri_decrypt): New.
1906         (prepare_decryption): Support pwri.
1907         (gpgsm_decrypt): Test for PWRI.  Move IS_DE_VS flag to DFPARM.
1908
1909         * common/sexputil.c (cipher_mode_to_string): New.
1910
1911         dirmngr: LDAP search by a mailbox now ignores revoked keys.
1912         + commit b6f8cd7eef4b00a2c6ccaac743382f1dd83bde6a
1913         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Ignore revoked
1914         and disable keys in mail mode.
1915
1916 2021-05-07  NIIBE Yutaka  <gniibe@fsij.org>
1917
1918         scd,pcsc: Use a single context.
1919         + commit 987b8168602286d06debbbc8d4deebd35f454e29
1920         * scd/apdu.c (pcsc): New variable.
1921         (struct reader_table_s): Remove pcsc.context from member.
1922         (pcsc_get_status, connect_pcsc_card): Use pcsc.context.
1923         (close_pcsc_reader): Release pcsc.context here with reference count.
1924         (apdu_open_one_reader): Move API loading to ...
1925         (pcsc_init): new.
1926         (apdu_open_one_reader): Remove.
1927         (apdu_open_reader): Call open_pcsc_reader instead of
1928         apdu_open_one_reader.
1929         (open_pcsc_reader): Call pcsc_init if needed.  Call close_pcsc_reader
1930         instead of pcsc_release_context.  Make reader parsing more robust.
1931         (apdu_init): Initialize pcsc.count and pcsc.context.
1932
1933 2021-05-04  Werner Koch  <wk@gnupg.org>
1934
1935         gpg: Allow ECDH with a smartcard returning just the x-coordinate.
1936         + commit b203325ce112c223a5164081cecd14744a01ff69
1937         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Factor extraction
1938         part out to  ...
1939         (extract_secret_x): new.  Allow for x-only coordinate.
1940         (pk_ecdh_encrypt_with_shared_point): Change arg shared_mpi
1941         to (shared,nshared).  Move param check to the top.  Add extra safety
1942         check.
1943         (pk_ecdh_decrypt): Adjust for change.
1944         * g10/pkglue.c (get_data_from_sexp): New.
1945         (pk_encrypt): Use it for "s" and adjusted for changed
1946         pk_ecdh_encrypt_with_shared_point.
1947         * g10/pubkey-enc.c (get_it): Remove conversion to an MPI and call
1948         pk_ecdh_decrypt with the frame buffer.
1949
1950         scd: Fix possible PC/SC removed card problem.
1951         + commit 9d83bfb639680d3bc756fcfe2b7f83b18bed8dff
1952         * scd/apdu.c (pcsc_cancel): New.
1953         (pcsc_init): Load new function.
1954         (connect_pcsc_card): Use it after a removed card error.
1955
1956         scd: Add string for another PC/SC error code.
1957         + commit a475bb725be7e275a06e0625b0088f607f36634c
1958         * scd/apdu.c (PCSC_E_NO_READERS_AVAILABLE): New.
1959         (pcsc_error_string): Add a description for this.
1960         * scd/scdaemon.c (scd_kick_the_loop): Fix diagnostic.
1961
1962 2021-05-04  Kirill Elagin  <kirelagin@gmail.com>
1963
1964         scd: Fix unblock PIN by a Reset Code with KDF.
1965         + commit 6c4216094ef4771d1d5011b7aee35f241e3bcc4d
1966         * scd/app-openpgp.c (do_change_pin): Use correct CHVNO=1 for
1967         pin2hash_if_kdf, for user's PIN.
1968
1969 2021-05-04  Werner Koch  <wk@gnupg.org>
1970
1971         gpg: Fix mailbox based search via AKL keyserver method.
1972         + commit 22fe23f46d3179cb0a68f58bf6f722b89c0c4d9c
1973         * g10/keyserver.c (keyserver_import_name): Rename to ...
1974         (keyserver_import_mbox): this.  And use mail search mode.
1975         * g10/getkey.c (get_pubkey_byname): Change the two callers.
1976
1977         gpg: Auto import keys specified with --trusted-keys.
1978         + commit e7251be84c797ddbc3f0a5212886761666e3aa33
1979         * g10/getkey.c (get_pubkey_with_ldap_fallback): New.
1980         * g10/trustdb.c (verify_own_keys): Use it.
1981
1982         (cherry picked from commit 100037ac0f558e8959fc065d4703c85c2962489e)
1983
1984         gpg: Allow decryption w/o public key but with correct card inserted.
1985         + commit e53f6037283e1a4f18b1c5d66d2678888c701cea
1986         * agent/command.c (cmd_readkey): Add option --no-data and special
1987         handling for $SIGNKEYID and $AUTHKEYID.
1988         * g10/call-agent.c (agent_scd_getattr): Create shadow keys for KEY-FPR
1989         output.
1990         * g10/skclist.c (enum_secret_keys): Automagically get a missing public
1991         key for the current card.
1992
1993         agent: Silence error messages for READKEY --card.
1994         + commit aa612d752ebb1851f23184df084aed5314b72e3a
1995         * agent/command.c (cmd_readkey): Test for shadow key before creating
1996         it.
1997
1998         (cherry picked from commit 8f2c9cb73538baab7da8107f2cceb2f6fc49642a)
1999
2000 2021-05-03  Werner Koch  <wk@gnupg.org>
2001
2002         gpg: Allow fingerprint based lookup with --locate-external-key.
2003         + commit 2af217ecd7e4242be2b35bc0085eccaf13cc2027
2004         * g10/keyserver.c (keyserver_import_fprint_ntds): New.
2005         * g10/getkey.c (get_pubkey_byname): Detect an attempt to search by
2006         fingerprint in no_local mode.
2007
2008         gpg: Lookup a missing public key of the current card via LDAP.
2009         + commit b59af0e2a05a3714b0bcbe7e775c6ffacfbc7119
2010         * g10/getkey.c (get_seckey_default_or_card): Lookup a missing public
2011         key from the current card via LDAP.
2012         * g10/call-dirmngr.c: Include keyserver-intetnal.h.
2013         (gpg_dirmngr_ks_get): Rename arg quick into flags.  Take care of the
2014         new LDAP flag.
2015         * g10/keyserver-internal.h (KEYSERVER_IMPORT_FLAG_QUICK): New.
2016         Replace the use of the value 1 for the former quick arg.
2017         (KEYSERVER_IMPORT_FLAG_LDAP): New.
2018         * g10/keyserver.c (keyserver_get_chunk): Increase the reserved line
2019         length.
2020         * dirmngr/ks-action.c (ks_action_get): Add arg ldap_only.
2021         * dirmngr/server.c (cmd_ks_get): Add option --ldap.
2022
2023         scd: Add option --info to emit KEYPAIRINFO by readkey command.
2024         + commit b8df8321e1ef38147f42af1166d2c60805f88b9c
2025         * scd/command.c (do_readkey): Implement this.
2026         * scd/app-help.c (app_help_get_keygrip_string_pk): Make HEXKEYGRIP
2027         parm optional.  Add arg R_ALGOSTR.
2028
2029 2021-05-03  NIIBE Yutaka  <gniibe@fsij.org>
2030
2031         common: Fix gnupg_wait_processes, by skipping invalid PID.
2032         + commit c2ba6bea4ce81a066765c285c4b7c1dc6d39f144
2033         * common/exechelp-posix.c (gnupg_wait_processes): Skip invalid PID.
2034
2035 2021-05-03  Werner Koch  <wk@gnupg.org>
2036
2037         agent: Skip unknown unknown ssh curves seen on cards.
2038         + commit bbf4bd3bfcb51e9d91e08ceefba3ff016bae50ff
2039         * agent/command-ssh.c (ssh_handler_request_identities): Skip unknown
2040         curves.
2041
2042 2021-04-29  Werner Koch  <wk@gnupg.org>
2043
2044         gpgconf: Do not i18n an empty string to the PO files meta data.
2045         + commit a456303ae306fbfda0cf89ff41678d50c24bf6fc
2046         * tools/gpgconf-comp.c (my_dgettext): Ignore empty strings.
2047
2048         scd: New option --pcsc-shared.
2049         + commit 5eec40f3d82777b4fb807a9bf1b71422a8caa2f9
2050         * scd/scdaemon.h (opt): Add field opcsc_shared.
2051         * scd/scdaemon.c (opcscShared): New.
2052         (opts): Add "--pcsc-shared".
2053         (main): Set flag.
2054         * scd/apdu.c (connect_pcsc_card): Use it.
2055         (pcsc_get_status): Take flag in account.
2056         * scd/app-openpgp.c (verify_chv2): Do not auto verify chv1 in shared
2057         mode.
2058
2059         scd: Rewrite READKEY to allow for compressed points.
2060         + commit 96577e2e46e4c5b66a2685cb605e07be0a6a09a5
2061         * scd/app-help.c (app_help_pubkey_from_cert): New.  Taken from 2.3.
2062         * scd/command.c (cmd_readkey): Rewrite using new helper.
2063
2064         common: Extend the openpgp_curve_to_oid function.
2065         + commit 5b8593135fa6e88ecc459444ec19b9a824f12a15
2066         * common/openpgp-oid.c (openpgp_curve_to_oid): Add optional arg R_NBITS.
2067         Change all callers.
2068
2069         common: New module to compute openpgp fingerprints.
2070         + commit f3c98b8cb5adcac17043fa6066b73bd08c8ef41a
2071         * common/openpgp-fpr.c: New.
2072         * common/Makefile.am (common_sources): Add it.
2073
2074         common: New function to uncompress an ECC public key.
2075         + commit c825117c5fa562fced0d3cafc22fd878cf615b42
2076         * common/sexputil.c (ec2os): New.
2077         (uncompress_ecc_q_in_canon_sexp): New.
2078
2079         * common/t-sexputil.c (fail2): new.
2080         (test_ecc_uncompress): New.
2081         (main): Run new test.
2082
2083         common: New function cmp_canon_sexp.
2084         + commit 473e649ea1a69e82b7f99a17fbff4d641936c61c
2085         * common/sexputil.c (cmp_canon_sexp): New.
2086         (cmp_canon_sexp_def_tcmp): New.
2087         * common/t-sexputil.c (test_cmp_canon_sexp): Add a simple test.
2088
2089         scd: New function send_keyinfo to assist in backporting.
2090         + commit 0eed0ced9bcd3c14621076d26cf4d9f809e1873c
2091         * scd/command.c (send_keyinfo): New.
2092
2093         scd: Minor changes to assist in backporting from 2.3.
2094         + commit 3db99b8861a7544efee13be45d14bbac63c0c868
2095         * scd/command.c (send_status_direct): Return an error code.
2096         * scd/app-common.h (APP_LEARN_FLAG_REREAD): New.
2097
2098         scd: Extend an internal function to also return the algo.
2099         + commit 72a7d45a230bf28e2ba7e8a57b702c98998ea0a3
2100         * scd/app-help.c (app_help_get_keygrip_string_pk): Add optional arg
2101         r_algo.  Change all callers.
2102         (app_help_get_keygrip_string): Ditto.
2103
2104         scd: New function for iso7816 PSO_CSV.
2105         + commit 91dd74f3d7e3630bb7f298fe4d392f8a6cef9acb
2106         * scd/iso7816.c (iso7816_pso_csv): New.
2107
2108         scd: Extend iso7816_select_path.
2109         + commit 855d14d390e8dd8464f2f38187dbccb19a13e815
2110         * scd/iso7816.c (iso7816_select_path): Add arg top_fd.
2111         * scd/app-nks.c (do_readkey): Adjust for this change
2112         (select_ef_by_path: Ditto.
2113
2114         * common/tlv.h: Include membuf.h.
2115
2116         scd: Add new status codes.
2117         + commit 3ce69d8387925d444d529ce0bb5beed9e880aad7
2118         * scd/apdu.h (SW_SM_NOT_SUP, SW_CC_NOT_SUP, SW_FILE_STRUCT)
2119         (SW_NO_CURRENT_EF): New.
2120         * scd/apdu.c (apdu_strerror): Map them to strings.
2121         * scd/iso7816.c (map_sw): ... and to gpg-error.
2122
2123         scd: Extend ISO binary and record reading functions.
2124         + commit ec9e8e0d6a1fe47dbf42652c4246e1c34fdf0288
2125         * scd/iso7816.c (iso7816_read_binary_ext): Add optional arg r_sw and
2126         change callers.
2127         (iso7816_read_record): Factor all code out to ...
2128         (iso7816_read_record_ext): New.
2129
2130 2021-04-13  Werner Koch  <wk@gnupg.org>
2131
2132         gpg: Do not use self-sigs-only for LDAP keyserver imports.
2133         + commit 1303b0ed84da57b48d88343ab43f83546e508aba
2134         * dirmngr/ks-engine-ldap.c (ks_ldap_get): Print a SOURCE status.
2135         * g10/options.h (opts): New field expl_import_self_sigs_only.
2136         * g10/import.c (parse_import_options): Set it.
2137         * g10/keyserver.c (keyserver_get_chunk): Add special options for LDAP.
2138
2139 2021-04-08  NIIBE Yutaka  <gniibe@fsij.org>
2140
2141         scd: Fix CCID driver for SCM SPR332/SPR532.
2142         + commit f8ae51977ce4079d638d1ae2f3dd1da41c02a6d7
2143         * scd/ccid-driver.c (ccid_vendor_specific_pinpad_setup): New.
2144         (ccid_vendor_specific_setup): Only send CLEAR_HALT.
2145         (ccid_transceive_secure): Each time, use send_escape_cmd.
2146
2147 2021-04-06  Werner Koch  <wk@gnupg.org>
2148
2149         gpg: Fix new pseudo option compliance_de_vs.
2150         + commit 18551c6dc2c33f856d05053b27a1210c4c607cef
2151         * g10/gpg.c (gpgconf_list): Take opt.compliance also in account.
2152
2153 2021-04-01  Werner Koch  <wk@gnupg.org>
2154
2155         common: Make the compliance check more robust.
2156         + commit 8ef0f53cb0014026d0d58b8de2133310d96bc1e3
2157         * common/compliance.c (get_compliance_cache): New.
2158         (gnupg_rng_is_compliant): Use per mode cache.
2159         (gnupg_gcrypt_is_compliant): Ditto.
2160
2161         gpgconf: Return a new pseudo option compliance_de_vs.
2162         + commit 9feffc03f36499162342609897484b4b32fd53a7
2163         * tools/gpgconf-comp.c (gc_options_gpg): Add "compliance_de_vs".
2164         * g10/gpg.c (gpgconf_list): Return that pseudo option.
2165
2166 2021-03-26  Werner Koch  <wk@gnupg.org>
2167             cbiedl@gnupg.com
2168
2169         gpgconf: Fix argv overflow if --homedir is used.
2170         + commit a50093893cd100c74a32cbacc749aab582154625
2171         * tools/gpgconf-comp.c (gc_component_launch): Fix crash due to too
2172         small array.
2173
2174 2021-03-11  Werner Koch  <wk@gnupg.org>
2175
2176         gpg: New option --force-sign-key.
2177         + commit 87d7b7e07565bdba9e9e8b8698f7094046d4f762
2178         * g10/gpg.c (oForceSignKey,opts): New option "--force-sign-key".
2179         (main): Set it.
2180         * g10/options.h (opt): New flag flags.force_sign_key.
2181         * g10/keyedit.c (sign_uids): Use new flag.
2182
2183 2021-03-02  Werner Koch  <wk@gnupg.org>
2184
2185         sm: Do away with the locked flag in keydb.c.
2186         + commit f3e68e39da7609f594572833528a0f2b9c20bf2d
2187         * sm/keydb.c (struct keydb_handle): Remove field locked.
2188         (keydb_lock): Remove use of locked flag.
2189         (lock_all): Ditto.
2190         (unlock_all): Ditto.
2191         (keydb_set_flags): Use dotlock_is_locked instead of the locked flag.
2192         (keydb_insert_cert): Ditto.
2193         (keydb_delete): Ditto.
2194         (keydb_search): s/keydb_lock/lock_all/.
2195         (keydb_set_cert_flags): Ditto.
2196         (keydb_clear_some_cert_flags): Ditto.
2197
2198         * sm/keydb.c (maybe_create_keybox): s/access/gnupg_access/.
2199
2200         common: New function dotlock_is_locked.
2201         + commit 67b82a9c607e1488972a85a30015f48c68245af0
2202         * common/dotlock.c (dotlock_is_locked): New.
2203         (dotlock_take): Set locked flag also in disabled mode.  No more
2204         warning if the lock has already been taken.
2205         (dotlock_release): Clear locked flag also in disabled mode.  No more
2206         warning if the lock has not been taken.
2207
2208         sm: Lock kbx files also before a search.
2209         + commit 677245ba0e7d6c0bc85ac998f47e3f220b736840
2210         * sm/keydb.c (keydb_search): Lock files.
2211
2212         sm: On Windows close the kbx files at several places.
2213         + commit 2b9ae79ad81a0d3eff011fabe6629e371cd7c5b4
2214         * kbx/keybox-search.c (keybox_search_reset) [W32]: Always close.
2215
2216         * kbx/keybox-init.c (keybox_close_all_files): New.
2217         * sm/keydb.c (keydb_close_all_files): New.
2218         * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Call new function.
2219         (gpgsm_dirmngr_lookup): Ditto.
2220         (gpgsm_dirmngr_run_command): Ditto.
2221
2222         sm: Remove unused function.
2223         + commit c99f3599d80d351dda1400314b43ea8ccdcc7b7d
2224         * sm/keydb.c (keydb_insert_cert): Remove.
2225         * kbx/keybox-update.c (keybox_update_cert): Remove stub.
2226
2227 2021-03-01  Nicolas Fella via Gnupg-devel  <gnupg-devel@gnupg.org>
2228
2229         gpg: Keep temp files when opening images via xdg-open.
2230         + commit 0441ed6e1c1d7eac81bfbec6ce51f319d9d20eb7
2231         * g10/photoid.c (get_default_photo_command): Change parameter for
2232         xdg-open.
2233
2234 2021-03-01  Werner Koch  <wk@gnupg.org>
2235
2236         sm: Silence some other pkcs#12 import prattle.
2237         + commit e5af401fc4c3294de9a4f10630b200185329230b
2238         * sm/minip12.c (parse_bag_data): Print a regular log_info only in
2239         verbose mode.
2240
2241 2021-02-24  Werner Koch  <wk@gnupg.org>
2242
2243         sm: Silence some output on --quiet.
2244         + commit bcdbf0fcf3c1c210504cbed53f524704747deaaa
2245         * sm/encrypt.c (gpgsm_encrypt): Take care of --quiet.
2246         * sm/gpgsm.c: Include minip12.h.
2247         (set_debug): Call p12_set_verbosity.
2248         * sm/import.c (parse_p12): Dump keygrip only in debug mode.
2249         * sm/minip12.c (opt_verbose, p12_set_verbosity): New.
2250         (parse_bag_encrypted_data): Print info messages only in verbose mode.
2251
2252 2021-02-19  Werner Koch  <wk@gnupg.org>
2253
2254         scd: Change parameters of readkey fucntion pointer.
2255         + commit 41979ed7308ef3ab1c877d3f110ce9b61eb17bec
2256         * scd/app-common.h (APP_READKEY_FLAG_ADVANCED): New.
2257         (struct app_ctx_s): Replace param advanced by flags in readkey.
2258         Change all users.
2259
2260         scd: Pass ctrl parameter to more app functions.
2261         + commit 669786cf646d8636de85a3cb8b3aa83ba709d207
2262         * scd/app-common.h (struct app_ctx_s): Add parameter ctrl to function
2263         pointers for readkey, setattr, sign, auth, decipher, and check_pin.
2264
2265         scd: Detect Yubikey and provide nicer display-s/n.
2266         + commit f8588369bcb0e66118725793b53e871ce2acb10d
2267         * scd/app-common.h (struct app_ctx_s): Rename unused field
2268         card_version to cardversion.
2269         * scd/app.c (app_new_register): Add code rom 2.3 to detect the Yubikey
2270         and set cardversion.
2271         (app_get_dispserialno): New.
2272         * scd/app-openpgp.c (do_getattr): Use app_get_dispserialno.
2273
2274         scd: Change the apptype from a string to an enum.
2275         + commit 43b3ec5aee40172890c077485e438d2d4994d81d
2276         * scd/app-common.h (cardtype_t): New.
2277         (apptype_t): New.
2278         (struct app_ctx_s): Change type of field apptype.  Add fields
2279         appversion and cardtype.  Adjust all app-*.c for the new type.
2280         * scd/app.c (supported_app_list): New.
2281         (strapptype): New.
2282         (apptype_from_name): New.
2283         (app_dump_state): Use strapptype.
2284         (app_write_learn_status): Ditto.
2285         (app_getattr): Ditto.
2286         (check_conflict): Use apptype_from_name and integer comparison.
2287         * scd/app-openpgp.c: Replace app->card_version by app->appversion.
2288
2289         scd: Add some compatibility code for easier backporting.
2290         + commit 6380126b31aacb2e8ad3aae4866d4d384186bf97
2291         * scd/app-common.h (APP_WRITEKEY_FLAG_FORCE): New.
2292         (APP_READKEY_FLAG_INFO): New.
2293         (APP_LEARN_FLAG_KEYPAIRINFO): New.
2294         (APP_LEARN_FLAG_MULTI): New.
2295         (struct app_ctx_s): New forward declaration.
2296         (struct app_ctx_s): Add members prep_reselect, reselect, and
2297         with_keygrip.
2298         (KEYGRIP_ACTION_SEND_DATA): New.
2299         (KEYGRIP_ACTION_WRITE_STATUS): New.
2300         (KEYGRIP_ACTION_LOOKUP): New.
2301         (APP_CARD): New macro.
2302         * scd/scdaemon.h: Include app-common.h and remove from all other
2303         files.
2304         (app_t): Move typedef to ...
2305         * scd/app-common.h: here.
2306
2307 2021-02-17  Werner Koch  <wk@gnupg.org>
2308
2309         dirmngr: Support new gpgNtds parameter in LDAP keyserver URLs.
2310         + commit 55f46b33df08e8e0ea520ade5f73b321bc01d705
2311         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): Support a new gpgNtds
2312         extension.
2313         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Do ldap_init always with
2314         hostname - which is NULL and thus the same if not given.  Fix minor
2315         error in error code handling.
2316
2317         dirmngr: Rewrite a weird function by straighter code.
2318         + commit cdc828f6902667196eb3870f9287045afe7144d5
2319         * dirmngr/ldap-parse-uri.c (ldap_uri_p): Use ascii-memcasecmp.
2320
2321 2021-01-28  Werner Koch  <wk@gnupg.org>
2322
2323         Include the library version in the compliance checks.
2324         + commit 6e258babe7ccc52a7fb621339c2e2fc5f0f23bc9
2325         * common/compliance.c (gnupg_gcrypt_is_compliant): New.
2326         (gnupg_rng_is_compliant): Also check library version.
2327         * g10/mainproc.c (proc_encrypted): Use new function.
2328         (check_sig_and_print): Ditto.
2329         * sm/decrypt.c (gpgsm_decrypt): Ditto.
2330         * sm/encrypt.c (gpgsm_encrypt): Ditto.
2331         * sm/verify.c (gpgsm_verify): Ditto
2332
2333 2021-01-27  Werner Koch  <wk@gnupg.org>
2334
2335         gpg: Fix ugly error message for an unknown symkey algorithm.
2336         + commit 9037be5f40da409a7734a2672e64345472f294fc
2337         * g10/mainproc.c (proc_symkey_enc): Do not continue with an unknown
2338         algorithm.
2339
2340 2021-01-11  Werner Koch  <wk@gnupg.org>
2341
2342         Release 2.2.27.
2343         + commit 0c103cde00098bdf1cec8f27e764300d192210e4
2344
2345
2346         gpg,w32: Fix gnupg_remove.
2347         + commit 3901c1a8c59a436ea4509d5aaebbecc5a0268391
2348         * common/sysutils.c (map_w32_to_errno): New.
2349         (gnupg_w32_set_errno): New.
2350         (gnupg_remove) [w32]: Set ERRNO
2351
2352 2021-01-08  Werner Koch  <wk@gnupg.org>
2353
2354         gpg: Fix --gpgconf-list case with no conf files at all.
2355         + commit 9f37d3e6f307a9460c0a356afa1f8b991c527d6c
2356         * g10/gpg.c (get_default_configname): Remove unused function.
2357         (main): Provide a proper filename to gpgconf_list.
2358
2359 2021-01-07  Werner Koch  <wk@gnupg.org>
2360
2361         gpgconf: Fix description of two new options.
2362         + commit ff30fcd3dc78c00ed87ce6bd3414b828bdf51e84
2363         * tools/gpgconf-comp.c: Fix auto-key-import and include-key-block.
2364
2365 2020-12-30  Werner Koch  <wk@gnupg.org>
2366
2367         wkd: Minor permission fix for created files.
2368         + commit fdc54850263b2b888398f95be7816134b45a60d3
2369         * tools/wks-util.c (wks_cmd_install_key): Don't set u+x on the file.
2370         (ensure_policy_file): No need to make the policy file group writable.
2371
2372 2020-12-23  Werner Koch  <wk@gnupg.org>
2373
2374         gpg: Initialize a variable even in a never used code path.
2375         + commit 83e875a2d1e7560b9626266373c89e6e6eb7cb50
2376         * g10/sign.c (write_signature_packets): Init ERR.
2377
2378 2020-12-21  Werner Koch  <wk@gnupg.org>
2379
2380         Release 2.2.26.
2381         + commit c77bb1a750f0e2d6538d23fdc0af0e3ff3d56781
2382
2383
2384         common: Remove superfluous debug output from dotlock.c.
2385         + commit 323a69ef65e0d48fb9d038ecca01a70688ad3325
2386         * common/dotlock.c (dotlock_create_unix): Remove debug output.
2387
2388         doc: Explain LDAP keyserver parameters.
2389         + commit 261fb98c6f034f3f96abee79ea73febd115420ae
2390
2391
2392         common: Fix the "ignore" meta command in argparse.c.
2393         + commit 09dc59f6d43f5e81781429913b8f377581825be0
2394         * src/argparse.c (gnupg_argparse): Factor some code out to ...
2395         (prepare_arg_return): new.
2396         (gnupg_argparse): No missing arg error in ignore sections.
2397         * common/sysutils.c: Include pwd.h.
2398         (gnupg_getusername): New.
2399
2400 2020-12-18  Werner Koch  <wk@gnupg.org>
2401
2402         gpg: Fix --trusted-key with fingerprint arg.
2403         + commit 8a2e5025eb0f9537a4e776cf2886771a507121f1
2404         * g10/trustdb.c (tdb_register_trusted_key): Take care of that
2405         other constant.
2406
2407         dirmngr: Do not block threads in LDAP keyserver calls.
2408         + commit 15bfd189c07ef0f1bb94db0aee9ad26441ddc494
2409         * dirmngr/ks-engine-ldap.c: Wrap some ldap calls.
2410
2411         dirmngr: Fix backport of the new option parser from 2.3.
2412         + commit 9b886adba4f83ca462f8015060bcea8a7ceb6bb0
2413         * dirmngr/dirmngr.c (main) <aGPGConfList>: Re-introduce
2414         gpgconf-dirmngr.conf.
2415
2416 2020-12-17  Werner Koch  <wk@gnupg.org>
2417
2418         gpg: New AKL method "ntds"
2419         + commit 559efd23e936536435a42646b62fe8c4f8585d38
2420         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Change the new
2421         support for KEYDB_SEARCH_MODE_MAIL.
2422         (ks_ldap_get): Add a debug.
2423         * g10/options.h (AKL_NTDS): New.
2424         * g10/keyserver.c (keyserver_import_ntds): New.
2425         (keyserver_get_chunk): Allow KEYDB_SEARCH_MODE_MAIL.
2426         * g10/getkey.c (parse_auto_key_locate): Support "ntds".
2427         (get_pubkey_byname): Ditto.
2428
2429         dirmngr: Support "ldap:///" for the current AD user.
2430         + commit 776bef74c778c6740a6aac8a05801a958868346d
2431         * dirmngr/http.h (struct parsed_uri_s): Add field ad_current.
2432         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): Set it.
2433         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Take care of ad_current.
2434
2435         dirmngr: Allow LDAP searches via fingerprint.
2436         + commit c75fd75532905a2922288e0e8ac01fcd0226fc52
2437         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Add arg
2438         serverinfo and allow searching by fingerprint.
2439         (ks_ldap_get, ks_ldap_search): First connect then create teh filter.
2440
2441         dirmngr: Store all version 2 schema attributes.
2442         + commit c28cb5282b149f1e34df6f923e88e1998a60cc4a
2443         * g10/call-dirmngr.c (ks_put_inq_cb): Emit "fpr" records.
2444         * dirmngr/ks-engine-ldap.c (extract_attributes): Add args
2445         extract-state and schemav2.  Add data for the new schema version.
2446         remove the legacy code to handle UIDs in the "pub" line.
2447         (ks_ldap_put): Set new attributes for NTDS use the fingerprint as CN.
2448
2449
2450         This is a backport from 2.3
2451
2452         dirmngr: Support the new Active Directory schema.
2453         + commit ac8ece92662d83b79b03a369df07362d320fd118
2454         * dirmngr/ks-engine-ldap.c (SERVERINFO_): New constants.
2455         (my_ldap_connect): Relace args pgpkeyattrp and real_ldapp by a new
2456         serverinfo arg.  Set the new info flags.
2457         (ks_ldap_get): Adjust for change.
2458         (ks_ldap_search): Ditto.
2459         (ks_ldap_put): Ditto.  Replace xmalloc by xtrymalloc.  Change the DN
2460         for use with NTDS (aka Active Directory).
2461
2462         dirmngr: Do not store the useless pgpSignerID in the LDAP.
2463         + commit 0e88c73bc94fbca224f06d95bb024030bb3a73bb
2464         * dirmngr/ks-engine-ldap.c (extract_attributes): Do not store the
2465         pgpSignerID.
2466         * g10/call-dirmngr.c (ks_put_inq_cb): Do not emit sig records.
2467
2468         dirmngr: Fix adding keys to an LDAP server.
2469         + commit e47de853820000ddf383e7b790fbc435e3378d66
2470         * dirmngr/ks-engine-ldap.c (ks_ldap_put): Extract attribites into
2471         addlist.
2472
2473 2020-12-16  NIIBE Yutaka  <gniibe@fsij.org>
2474
2475         scd:ccid: Call libusb_clear_halt in ccid_vendor_specific_setup.
2476         + commit 3c55e15cee4bfed6ef96fbc97a0d2f00afceebe3
2477         * scd/ccid-driver.c (ccid_vendor_specific_setup): Only for SPR532,
2478         call libusb_clear_halt.
2479
2480         scd:ccid: Revert the addition of libusb_clear_halt for EP_INTR.
2481         + commit 585cfca0a60bd910012a8a2218f74889840b2546
2482         * scd/ccid-driver.c (ccid_setup_intr): Don't call libusb_clear_halt.
2483
2484 2020-12-07  NIIBE Yutaka  <gniibe@fsij.org>
2485
2486         scd:openpgp: Fix writing ECC key to card.
2487         + commit 5a03bf61304d0c2c8b4df53a1a7680cd0eb91cb1
2488         * scd/app-openpgp.c (build_privkey_template): Adding another argument
2489         of ecc_d_fixed_len to handle variable-size MPI.
2490
2491 2020-12-04  Werner Koch  <wk@gnupg.org>
2492
2493         Backport of the new option parser from 2.3.
2494         + commit a028f24136a062f55408a5fec84c6d31201b2143
2495         * configure.ac (GPGRT_ENABLE_ARGPARSE_MACROS): Define.
2496         * common/argparse.c, common/argparse.h: Rewrite.
2497         * tests/gpgscm/main.c: Switch to the new option parser.
2498
2499         * g10/gpg.c: Switch to the new option parser and enable a global conf
2500         file.
2501         * g10/gpgv.c: Ditto.
2502         * agent/gpg-agent.c: Ditto.
2503         * agent/preset-passphrase.c: Ditto.
2504         * agent/protect-tool.c: Ditto.
2505         * scd/scdaemon.c: Ditto.
2506         * dirmngr/dirmngr.c: Ditto.
2507         * dirmngr/dirmngr_ldap.c: Ditto
2508         * dirmngr/dirmngr-client.c: Ditto.
2509         * kbx/kbxutil.c: Ditto.
2510         * tools/gpg-card.c: Ditto.
2511         * tools/gpg-check-pattern.c: Ditto.
2512         * tools/gpg-connect-agent.c: Ditto.
2513         * tools/gpg-pair-tool.c: Ditto.
2514         * tools/gpg-wks-client.c: Ditto.
2515         * tools/gpg-wks-server.c: Ditto.
2516         * tools/gpgconf.c: Ditto.
2517         * tools/gpgsplit.c: Ditto.
2518         * tools/gpgtar.c: Ditto.
2519         * g13/g13.c: Ditto.
2520         * g13/g13-syshelp.c: Ditto.  Do not force verbose mode.
2521         * sm/gpgsm.c: Ditto. Add option --no-options.
2522
2523 2020-12-02  Werner Koch  <wk@gnupg.org>
2524
2525         kbx: Better error message in case of a crippled Libgcrypt.
2526         + commit acafa695e1e7998b892a6a621ef06d57bbc82722
2527         * kbx/keybox-openpgp.c (keygrip_from_keyparm): Detect missing curve.
2528
2529 2020-12-01  Jens Meißner  <meissner@b1-systems.de>
2530
2531         doc: Add parameters for batch generation of ECC keys.
2532         + commit a3f95a29b97d603c606936620e4638cc6db10ec9
2533         * doc/gpg.texi: Add parameters for batch generation of ECC keys.
2534
2535 2020-11-27  NIIBE Yutaka  <gniibe@fsij.org>
2536
2537         common: Fix fallback handling to utf-8.
2538         + commit 7d7a50ba7231bd4432b1254c7067a7f287890632
2539         * common/utf8conv.c (handle_iconv_error): Set NO_TRANSLATION.
2540
2541 2020-11-23  Werner Koch  <wk@gnupg.org>
2542
2543         Release 2.2.25.
2544         + commit 40f75823d25548abbc52dd6121963a55d99b1230
2545
2546
2547 2020-11-19  Werner Koch  <wk@gnupg.org>
2548
2549         gpgconf: Also print revision of libksba.
2550         + commit 6594dc31f58916b6f8b31de070e85d56221e3b94
2551         * dirmngr/dirmngr.c (get_revision_from_blurb): Fix detection of empty
2552         string.
2553         (gpgconf_versions): Print ksba revision.
2554
2555 2020-11-19  Jakub Bogusz  <qboosh@pld-linux.org>
2556
2557         po: Update Polish translation.
2558         + commit f7cbf68fdd1e42cdbabec7e06f2149f6b3f1d1dc
2559
2560
2561 2020-11-19  NIIBE Yutaka  <gniibe@fsij.org>
2562
2563         scd:openpgp: Public keys should be available for check_keyidstr.
2564         + commit 84020385be19556800b22cc5b0ce098acd424298
2565         * scd/app-openpgp.c (check_keyidstr): Call get_public_key.
2566
2567 2020-11-17  Werner Koch  <wk@gnupg.org>
2568
2569         Release 2.2.24.
2570         + commit 5751c48035764d938ae0459fcecd37194133bfb7
2571
2572
2573 2020-11-16  Werner Koch  <wk@gnupg.org>
2574             NIIBE Yutaka  <gniibe@fsij.org>
2575
2576         scd:openpgp: Allow keygrip to be used to reference a key.
2577         + commit 1049f06c6d2e1a833af4c73ea67a05417bbd0967
2578         * scd/app-openpgp.c (struct app_local_s): Add keygrip_str.
2579         (store_keygrip): New.
2580         (read_public_key): Store the keygrip.
2581         (get_public_key): Sitto.
2582         (send_keypair_info): USe the stored keygrip.
2583         (check_keyidstr): New.  Factored out from other functions and
2584         extended.
2585         (do_sign): Use check_keyidstr.
2586         (do_auth): Ditto.
2587         (do_decipher): Ditto.
2588         (do_check_pin): Ditto.
2589
2590 2020-11-13  Werner Koch  <wk@gnupg.org>
2591
2592         gpg: Provide better diagnostic for replaced card keys.
2593         + commit 5d98f95aa90c290a88ce97525d9f98f0aaf9e5aa
2594         * agent/divert-scd.c (divert_pksign): Add arg 'grip'.  Replace OPENPGP
2595         key reference to keygrips.
2596         (divert_pkdecrypt): Ditto.
2597         * agent/protect.c (parse_shadow_info): Trim spaces.
2598         * agent/pkdecrypt.c (agent_pkdecrypt): Pass the keygrip.
2599         * agent/pksign.c (agent_pksign_do): Ditto.
2600
2601         * g10/mainproc.c (print_pkenc_list): Print extra info for an invalid
2602         id error.
2603         * g10/sign.c (do_sign): Ditto.
2604
2605         gpg: Fix the encrypt+sign hash algo preference selection for ECDSA.
2606         + commit aeed0b93ff660fe271d8f98f8d5ce60aa5bf3ebe
2607         * g10/keydb.h (pref_hint): Change from union to struct and add field
2608         'exact'.  Adjust callers.
2609         * g10/pkclist.c (algo_available): Take care of the exact hint.
2610         * g10/sign.c (sign_file): Fix indentation.  Rework the hash from
2611         recipient prefs.
2612
2613 2020-11-12  Werner Koch  <wk@gnupg.org>
2614
2615         gpgconf: Yet another fix for --apply-profile.
2616         + commit f400ff4e7dfb424fbfcf7dfc5f80d89757ece5ab
2617         * tools/gpgconf.c (main): Use gnupg_homedir instead of
2618         default_homedir.  Check for existance of the directory.
2619
2620         scd: Skip unknown options in command SERIALNO.
2621         + commit 7076f6cafbac0cfbb3ab11e0f27c5d04ca956e8f
2622         * scd/command.c (cmd_serialno): Skip options.
2623
2624 2020-11-11  Werner Koch  <wk@gnupg.org>
2625
2626         gpg: Support brainpool keygen with "key from card".
2627         + commit 966fe1e9d98a0345da9b506ce9be0ad398f12d43
2628         * g10/keygen.c (ask_algo): Add brainpool hack in the same as for Nist
2629         curves.
2630
2631 2020-11-10  Werner Koch  <wk@gnupg.org>
2632
2633         w32: Support Unicode also for config files etc.
2634         + commit 163e4ff1959788781403ddf85f808054de414fd6
2635         * common/sysutils.c (gnupg_fopen) [W32]: Use _wfopen if needed.   Use
2636         new function in most places where fopen is used.
2637
2638         w32: Support utf8 for getcwd even if build with gpgrt < 1.40.
2639         + commit 9188a3c6b7eb871f711a0979620ca72f99522d53
2640         * common/sysutils.c (gnupg_getcwd) [W32]: Use Unicode version.
2641
2642 2020-11-09  NIIBE Yutaka  <gniibe@fsij.org>
2643
2644         scd: Internal CCID driver: Fix a race condition on close.
2645         + commit 8e206c1721564c91dd05ea46b5262670011155ab
2646         * scd/ccid-driver.c (ccid_require_get_status): For VENDOR_SCM reader,
2647         return 0 only at the initial call.
2648         (bulk_in): Don't detect an error for VENDOR_SCM reader, just kicking
2649         the loop, to invoke scd_update_reader_status_file, which calls
2650         ccid_slot_status again.
2651         (ccid_slot_status): Move the call of ccid_vendor_specific_setup to...
2652         (ccid_get_atr): ... here.
2653
2654 2020-11-09  Werner Koch  <wk@gnupg.org>
2655
2656         card: Run factory-reset in locked stated.
2657         + commit 7f765a98fd662f345baf30d93392103e5f85ace1
2658         * scd/command.c (reset_notify): Add option --keep-lock.
2659         (do_reset): Add arg keep_lock.
2660         (cmd_lock): Send progress status.
2661         * g10/call-agent.c (agent_scd_apdu): Add more pseudo APDUs.
2662         * g10/card-util.c (send_apdu): Ditto.
2663         (factory_reset): Use lock commands.
2664
2665         gpg: Fix recent commit for weak digest algos and smartcards.
2666         + commit 21d5323f5d029758fd55eae1dfdfb88b718ceada
2667         * g10/sign.c (sign_file): Fix condition.
2668
2669         Require libksba 1.3.5.
2670         + commit 549dc8cfe9a44fe7eb8a6a90662d4cbb1958a556
2671         * configure.ac (NEED_KSBA_VERSION): Set to 1.3.5.
2672
2673         Require Libgpg-error 1.27.
2674         + commit fc01ae50718b4030fbfdf3ca65ddb3e3107eacda
2675         * configure.ac (NEED_GPG_ERROR_VERSION): Require 1.27
2676         * common/util.h: Remove compatibility macros.
2677
2678         Require Libgcrypt 1.8.
2679         + commit 99ab3aed15c8a84347e39fbe49bd5748aeefe31a
2680         * configure.ac (NEED_LIBGCRYPT_VERSION): Require 1.8.
2681         * tools/gpgconf.c (show_version_libgcrypt): Remove conditional case
2682         for Libgcrypt < 1.8.
2683         * common/compliance.c (gnupg_rng_is_compliant): Ditto.
2684         * agent/pksign.c: Ditto.
2685         * agent/gpg-agent.c (thread_init_once): Ditto.
2686         (agent_libgcrypt_progress_cb): Ditto.
2687         * agent/command.c (cmd_getinfo): Ditto.
2688
2689 2020-11-09  Ben Kibbey  <bjk@luxsci.net>
2690
2691         gpg: Add canceled status message.
2692         + commit f05d1772c47b71cf77f79519b8edbc682002d303
2693         * common/status.h (STATUS_CANCELED_BY_USER): New.
2694         * g10/passphrase.c (passphrase_to_dek): Send STATUS_CANCELED_BY_USER
2695         instead of STATUS_MISSING_PASSPHRASE when canceled is set.
2696
2697 2020-11-09  Werner Koch  <wk@gnupg.org>
2698
2699         gpg: Do not print rejected digest algo notes with --quiet.
2700         + commit c373735e79a1b6240e9eca972c2bbb0c9f3247c4
2701         * g10/misc.c (print_digest_rejected_note): Do not print in quiet mode.
2702         (print_sha1_keysig_rejected_note): Ditto.
2703
2704 2020-11-04  Werner Koch  <wk@gnupg.org>
2705
2706         speedo,w32: Install gpg-check-pattern and example profiles.
2707         + commit a4fa4b5d4ba38e51436914505af1a8f3483ed945
2708         * doc/examples/vsnfd.prf: Rename to VS-NfD.prf.
2709         * doc/examples/Automatic.prf: New.
2710         * doc/Makefile.am (examples): Adjust.
2711         * build-aux/speedo/w32/inst.nsi: Install gpg-check-pattern.exe and 3
2712         example files.
2713         * build-aux/speedo/w32/wixlib.wxs: Add new files.
2714
2715         g13: Include a now missing header file.
2716         + commit d4089b04a5f15c1cc1a4809cb8f0d59fc1cdf564
2717         * g13/create.c: Include sysutuls.h
2718         * g13/sh-dmcrypt.c: Ditto.
2719
2720         gpgconf: Make sure the homedir exists for --apply-profile.
2721         + commit 1fbf085bc8b4a92772d1da8bfea507f4f97434b1
2722         * tools/gpgconf.c (main) <aApplyDefaults, aApplyProfile>: Create the
2723         standard home directory.
2724
2725         common: Fix duplicate implementation of try_make_homedir.
2726         + commit 6fe5c8c06e8cd162913ee5b0eb741eb4beebf44a
2727         * g10/openfile.c (try_make_homedir): Move core of the code to ...
2728         * common/homedir.c (gnupg_maybe_make_homedir): new.
2729         * sm/keydb.c (try_make_homedir): Implement using new function.
2730
2731         * common/homedir.c: Include i18n.h.
2732         * po/POTFILES.in: Add common/homedir.c.
2733
2734 2020-11-04  Andre Heinecke  <aheinecke@gnupg.org>
2735
2736         w32: Add another pinentry search path.
2737         + commit b4cb91d5fbe2b8917d76d12eb72aaac0d97ed596
2738         * common/homedir.c (get_default_pinentry_name): Try ../bin/pinentry.exe
2739
2740         w32: Add windows subsystem variant of gpgconf.
2741         + commit c366e04958481382c3f7b50f169120053186069b
2742         * tools/Makefile.am (gpgconf-w32): New target. Builds gpgconf with
2743         subsystem windows.
2744         * build-aux/speedo/w32/wixlib.wxs: Package it.
2745
2746 2020-11-03  Werner Koch  <wk@gnupg.org>
2747
2748         w32: Fix strftime problem on Windows.
2749         + commit d633e92233f4a4afc82d3d9282220f303974525b
2750         * common/gettime.c: Include locale.h.
2751         (asctimestamp): Increase buffer.  On Windows use setlocale.
2752
2753         gpg: Switch to AES256 for symmetric encryption in de-vs mode.
2754         + commit 166e779634ea5fe2a7beeb186807e3a81128c717
2755         * g10/gpg.c (set_compliance_option): For AES256 and SHA256 in de-vs
2756         mode.
2757         * g10/encrypt.c (setup_symkey): Add extra compliance check.
2758         (encrypt_simple): Avoid printing a second error oncplinace failure.
2759
2760 2020-11-03  Andre Heinecke  <aheinecke@gnupg.org>
2761
2762         po: Major update of italian translation.
2763         + commit ccecdc1f34a973dcd8d00b6ee9c830e0ddc8d08b
2764         * po/it.po: Update to a recent 2.2 version.
2765
2766 2020-11-02  Werner Koch  <wk@gnupg.org>
2767
2768         gpg: Allow setting notations with the empty string as value.
2769         + commit f007d79533e638e395e1a3cf99233fd900cc805c
2770         * g10/misc.c (pct_expando): Catch special case of the empty string.
2771         Also map a NULL to the empty string.
2772         * g10/photoid.c (show_photos): Make an empty string used as command
2773         fail.
2774
2775         gpg: Do not use weak digest algos if selected by recipient prefs.
2776         + commit 4c181d51a6f1fd05b7f190a18769ba5e9f892f6a
2777         * g10/misc.c (is_weak_digest): New.
2778         (print_digest_algo_note): Use it here.
2779         * g10/sig-check.c (check_signature_end_simple): Use it.
2780         * g10/sign.c (hash_for): Do not use recipient_digest_algo if it is in
2781         the least of weak digest algorithm.
2782
2783 2020-10-30  Ingo Klöcker  <dev@ingo-kloecker.de>
2784
2785         gpg: Fix iteration over signatures.
2786         + commit 8a941428086bc173a65d4e8687308ca923394738
2787         * g10/keyedit.c (keyedit_quick_revsig): Take signature of correct node
2788
2789 2020-10-30  NIIBE Yutaka  <gniibe@fsij.org>
2790
2791         agent: Fix secret key import for Ed25519.
2792         + commit ba321b60bc3bfc29dfc6fa325dcabad4fac29f9c
2793         * agent/cvt-openpgp.c (convert_secret_key): Avoid adding 0x00 at the
2794         beginning of MPI.
2795
2796 2020-10-28  Werner Koch  <wk@gnupg.org>
2797
2798         gpg: New command --quick-revoke-sig.
2799         + commit 7ec56b033647a1b14d56f771d51c563dbd25f1b7
2800         * g10/gpg.c (enum cmd_and_opt_values): Add aQuickRevSig.
2801         (opts): Add --quick-revoke-sig.
2802         (main): Implement.
2803         * g10/keyedit.c (quick_find_keyblock): Add arg 'want_secret' and
2804         adjust all callers.
2805         (keyedit_quick_revsig): new.
2806         * g10/revoke.c (get_default_sig_revocation_reason): New.
2807         * g10/keylist.c (cmp_signodes): New.
2808
2809 2020-10-26  NIIBE Yutaka  <gniibe@fsij.org>
2810
2811         scd: Internal CCID driver thing only for SPR532.
2812         + commit 38040ffee81e3c7a6972c9eae42af44eaaeb6ce6
2813         * scd/ccid-driver.c (ccid_vendor_specific_setup): New.  Limit
2814         only for SPR532, excluding other readers by SCM.
2815         (ccid_slot_status): Use ccid_vendor_specific_setup.
2816
2817         scd: Internal CCID driver limiting only for SPR532.
2818         + commit d1c9cc3ca03d2134a0feecab6db3c4af308c7fa7
2819         * scd/ccid-driver.c (ccid_vendor_specific_init): Only do that for
2820         SPR532.
2821
2822 2020-10-23  Werner Koch  <wk@gnupg.org>
2823
2824         common: New functions gnupg_opendir et al.
2825         + commit 5f8123df7856b724a062177026fe669ae49be263
2826         * common/sysutils.h (struct gnupg_dirent_s): New.
2827         * common/sysutils.c: Include dirent.h.
2828         (struct gnupg_dir_s): New.
2829         (gnupg_opendir, gnupg_readdir, gnupg_closedir): New.  Change all
2830         callers of opendir, readdir, and closedir to use these functions.
2831
2832         w32: Make gnupg_remove and gnupg_rename_file Unicode aware.
2833         + commit 4252cd7b18b41a0d91076e46df9ba857e743406b
2834         * common/sysutils.c (w32_rename): New.
2835         (gnupg_rename_file) [W32]: Support Unicode.
2836         (gnupg_remove) [W32]: Support Unicode.  Drop Windows-CE support.
2837
2838         Replace all calls to stat by gnupg_stat.
2839         + commit 157030271f2d88d0756788a60c43e455870ec124
2840         * common/sysutils.c (gnupg_stat): New.
2841         * common/sysutils.h: Include sys/stat.h.
2842
2843         Replace most calls to open by a new wrapper.
2844         + commit 86e52e3c33843f67a7972181ccbf33b48a40e557
2845         * common/sysutils.c (any8bitchar) [W32]: New.
2846         (gnupg_open): New.  Replace most calls to open by this.
2847         * common/iobuf.c (any8bitchar) [W32]: New.
2848         (direct_open) [W32]: Use CreateFileW if needed.
2849
2850 2020-10-21  Werner Koch  <wk@gnupg.org>
2851
2852         w32: Allow Unicode filenames for dotlock.
2853         + commit d65ea29683eeecfcf12e74744a490e8acfc1a5cf
2854         * common/dotlock.c (any8bitchar) [W32]: New.
2855         (dotlock_create_w32): Use strconcat and CreateFileW.
2856
2857         * common/t-dotlock.c: Source include dotlock.c and modify to allow
2858         manual testing on Windows.
2859
2860         Replace all calls to access by gnupg_access.
2861         + commit dd5fd4a760b8cf6ae05ff878bcf36cf2465e744c
2862         * common/sysutils.c (gnupg_access): New.  Replace all calls to access
2863         by this wrapper.
2864         * common/homedir.c (w32_shgetfolderpath): Change to return UTF-8
2865         directory name.
2866         (standard_homedir): Adjust for change.
2867         (w32_commondir, gnupg_cachedir): Ditto.
2868
2869 2020-10-06  NIIBE Yutaka  <gniibe@fsij.org>
2870
2871         scd: Add a workaround for Yubikey.
2872         + commit 25bec16d0bdcb9829a7b35c403cbb778b3b0c097
2873         * scd/app-openpgp.c (get_public_key): Handle wrong code for Yubikey.
2874
2875         scd: Silence compiler warning.
2876         + commit 0f4c956a76614bebf0f86bef79eba0e850e23df4
2877         * scd/app-openpgp.c (build_ecc_privkey_template): Fix allocation size.
2878
2879         scd: Report any error for LEARN command.
2880         + commit 7c8823bf82daade7417aeaebc34fefe3aa7c1856
2881         * scd/app-openpgp.c (do_learn_status): Report any error.
2882
2883         scd: Internal CCID driver: More fix for SPR532.
2884         + commit 1f1b68eef72bed9bb7ac1eb8102f6f51d587dbc0
2885         * scd/ccid-driver.c (bulk_in): Handle the case of missing intr_cb.
2886
2887         scd: Internal CCID driver fix.
2888         + commit 33a2d4bd7ffc6ad10d7ddb0f29fe4e21609806f7
2889         * scd/ccid-driver.c (intr_cb): More useful debug output.
2890         (ccid_slot_status): Remove redundant condition.
2891
2892         scd: Internal CCID driver: Call libusb_clear_halt at ccid_setup_intr.
2893         + commit 48565e7a08d64e3628da8baa80541841af0a6166
2894         * scd/ccid-driver.c (ccid_setup_intr): Reset the endpoint.
2895         (ccid_vendor_specific_init): Don't call libusb_clear_halt.
2896
2897         scd: Internal CCID driver: Fix a failure path.
2898         + commit 30693dfb6fe970dba195bf00a77d854e6fbc1ed0
2899         * scd/ccid-driver.c (ccid_open_usb_reader): On error, call
2900         libusb_release_interface.
2901
2902         scd: Internal CCID: Handle LIBUSB_ERROR_TIMEOUT at ccid_get_atr.
2903         + commit 498cd38019b8122824d69fd194675ab532501423
2904         * scd/ccid-driver.c (ccid_slot_status): Handle LIBUSB_ERROR_TIMEOUT.
2905
2906         scd: Change handling of SPR532 card reader.
2907         + commit 7db836c0e9223a4d5f30636e35e18156a97e6b91
2908         * scd/ccid-driver.c (ccid_vendor_specific_init): Put some workaround
2909         for SPR532 initialization.
2910         (ccid_slot_status): Send ESCape command after GetSlotStatus.
2911
2912         scd: For SPR532, submit the ESCape command at initialization.
2913         + commit 11d8d1e0505645f7d14bcc1c01d17a566e033705
2914         * scd/ccid-driver.c (ccid_vendor_specific_init): Submit the ESC
2915         command for VENDOR_SCM.
2916         (ccid_transceive_secure): Don't submit the ESC command every time.
2917
2918         scd: Fix CCID internal driver for interrupt transfer.
2919         + commit dd7cc24d5f9274579f0966de3be7ae8b0c19bacd
2920         * scd/ccid-driver.c (intr_cb): Handle the case of multiple messages.
2921
2922         scd: Better handling of timeout and time extension.
2923         + commit 186d11896ca2751eac8a7f54845ec71cc7f6fcc3
2924         * scd/ccid-driver.c (CCID_CMD_TIMEOUT_LONGER): Remove.
2925         (ccid_transceive): Don't use x4 blindly for bBWI, but use dynamically
2926         determined value.  Use value from variable wait_more for bulk_in.
2927         Set wait_more by the value of time extension request.
2928
2929         scd: Fix internal CCID driver, so that -DTEST works.
2930         + commit 60af035c22b9fbdc10c8c0a69399c46908801c66
2931         * scd/ccid-driver.c: Support a test program by ccid-driver.
2932
2933         scd: ccid-driver: Initial getting ATR more robustly.
2934         + commit 165312dca90a198ebc0be4ed6b0791297c90b085
2935         * scd/ccid-driver.c (send_power_off): New.
2936         (do_close_reader): Use send_power_off.
2937         (ccid_get_atr): Add error recovery.
2938
2939         scd: Clean up the structure for future fix of PC/SC.
2940         + commit 1efc01ff987dde4adf6777d4df44b5a00f6f0d8d
2941         * scd/apdu.c (struct dev_list): Rename from ccid_table, with void*.
2942         (open_ccid_reader): Follow the change.
2943         (apdu_dev_list_start, apdu_dev_list_finish): Likewise.
2944         (apdu_open_reader): Likewise.
2945         * scd/ccid-driver.c (ccid_dev_scan): Use void *.
2946         (ccid_dev_scan_finish, ccid_get_BAI, ccid_open_usb_reader): Likewise.
2947         * scd/ccid-driver.h: Change the APIs.
2948
2949 2020-10-06  Werner Koch  <wk@gnupg.org>
2950
2951         scd: Map some error codes from libusb to ccid-driver error codes.
2952         + commit 5b985b026418213a4c75291cb041ca8aa798cec3
2953         * scd/ccid-driver.h (CCID_DRIVER_ERR_USB_*): New error codes.
2954         * scd/apdu.h: New SW_HOST error codes.
2955         * scd/apdu.c (host_sw_string): Print them
2956         * scd/ccid-driver.c (map_libusb_error): New.
2957         (ccid_open_usb_reader, bulk_in, abort_cmd): Map libusb error codes.
2958         * scd/iso7816.c (map_sw): Map new codes to gpg-error.
2959
2960 2020-10-06  NIIBE Yutaka  <gniibe@fsij.org>
2961
2962         scd: internal driver: Submit SET_INTERFACE control transfer.
2963         + commit cccdca61a841228475da573aab8b57c659a9631a
2964         * scd/ccid-driver.c (ccid_open_usb_reader): Alway submit SET_INTERFACE
2965         control transfer.
2966
2967         scd: Internal CCID driver: Clean up backport from master.
2968         + commit 7b531fe5801b0ad47414c4a6ed961665ba5a2541
2969             * scd/ccid-driver.c (print_error) [TEST]: Add missing break.  Note
2970             that this is anyway an impossible case.
2971
2972 2020-10-05  Werner Koch  <wk@gnupg.org>
2973
2974         dirmngr: Minor cleanup for better readability.
2975         + commit ffbef54d36d4c2c150b63a57c79872d2e1f2a68e
2976         * dirmngr/ldap.c (start_default_fetch_ldap): Rename to
2977         start_cacert_fetch_ldap and remove arg attr.  Instead use
2978         "cACertificate" directly.
2979         * dirmngr/crlfetch.c (ca_cert_fetch): Change the only caller.
2980         (start_cert_fetch_ldap): Rename arg for clarity.
2981
2982 2020-10-04  Werner Koch  <wk@gnupg.org>
2983
2984         build: Fix SENDMAIL define for a PATH with spaces.
2985         + commit 77e416741abb0a871733bd46cbc81329859de96e
2986         * configure.ac: Fix use of $PATH
2987
2988 2020-10-02  Werner Koch  <wk@gnupg.org>
2989
2990         gpgconf,w32: Add manifest so we get the correct windows version.
2991         + commit 239e60a37f63d3880d1107b6981a964f437761ae
2992         * common/w32info-rc.h.in: Update copyright info.
2993         * tools/gpg-connect-agent-w32info.rc: Tweak file info.
2994         * tools/gpgconf-w32info.rc: New.
2995         * tools/gpgconf.w32-manifest.in: New.
2996         * configure.ac: Add new .in file.
2997         * tools/Makefile.am (EXTRA_DIST): Add them.
2998         (gpg_connect_agent_robjs, gpgconf_robjs): New.
2999         (gpgconf_LDADD): Add resource file.
3000         (gpg_connect_agent_LDADD): Change name of resource macro.
3001
3002         gpgconf: New option --show-versions.
3003         + commit a298ba02ee76a9291ef5cec1a3564d8e254b9ca7
3004         * tools/gpgconf.c: Include exechelp.h.  New option --show-versions.
3005         (get_revision_from_blurb): New.
3006         (show_version_gnupg): New.
3007         (show_version_libgcrypt): New.
3008         (show_version_gpgrt): New.
3009         (show_versions_via_dirmngr): New.
3010         (show_versions): New.
3011         * dirmngr/dirmngr.c (main): New internal option --gpgconf-versions.
3012         (get_revision_from_blurb): New.
3013         (gpgconf_versions): New.
3014
3015 2020-10-01  Andre Heinecke  <aheinecke@gnupg.org>
3016
3017         doc: Remove enable-extended-key-format in vsnfd.
3018         + commit d833030f8cf646b5de83d01fc3e412ad77ec4b1c
3019         * doc/examples/vsnfd.prf: Remove enable-extended-key-format
3020
3021 2020-09-22  Werner Koch  <wk@gnupg.org>
3022
3023         kbx: Add bounds check to detect corrupt keyboxes.
3024         + commit be8b30f8ebf637a7e476ff8902349a56924bf20f
3025         * kbx/keybox-dump.c (_keybox_dump_blob): Fix the fixmes.  Add support
3026         for 32 byte fingerprints.
3027
3028 2020-09-16  NIIBE Yutaka  <gniibe@fsij.org>
3029
3030         scd: Fix the use case of verify_chv2 by CHECKPIN.
3031         + commit 61aea64b3c1717a7e304c82cda92e08ce5a6c533
3032         * scd/app-openpgp.c (verify_chv2): Call verify_a_chv with chvno=1
3033         when needed.
3034
3035 2020-09-10  Werner Koch  <wk@gnupg.org>
3036
3037         gpg-connect-agent: Catch signals so that SIGPIPE is ignored.
3038         + commit a084924d07be16dbbbf4b34d463c67c8d4c117be
3039         * dirmngr/server.c (cmd_killdirmngr): Return 0.
3040         * tools/gpg-connect-agent.c (main): Catch signals.
3041
3042         dirmngr: Fix the pool keyserver case for a single host in the pool.
3043         + commit 72e04b03b1a7aee5521156c6d549ca10a81ac529
3044         * dirmngr/ks-engine-hkp.c (map_host): Set R_HOSTNAME also for
3045         localhost and if there is no pool.
3046
3047         dirmngr: Align the gnutls use of CAs with the ntbtls code.
3048         + commit e4f3b74c91063d83395ba0bc37f67cb22d47ca8f
3049         * dirmngr/http.c (http_session_new) <gnutls>: Use only the special
3050         pool certificate for the default keyserver.
3051
3052         agent: Keep some permissions of private-keys-v1.d.
3053         + commit 7de9ed521e516879a72ec6ff6400aed4bdce5920
3054         * common/sysutils.c (modestr_to_mode): Re-implement.
3055         (gnupg_chmod): Support keeping of permissions.
3056
3057 2020-09-04  Werner Koch  <wk@gnupg.org>
3058
3059         gpg: Initialize a parameter to silence valgrind.
3060         + commit 6ce8fdc4b2a05bb2c1cf2aa9faa76f1c7a4fdb28
3061         * g10/keygen.c (read_parameter_file): Initialize nline.
3062         * g10/textfilter.c (copy_clearsig_text): Initialize bufsize.
3063
3064 2020-09-03  Werner Koch  <wk@gnupg.org>
3065
3066         Release 2.2.23.
3067         + commit e234d04c3c91cd4e84cb5790a131bf6a8b6733c4
3068
3069
3070         gpg: Fix AEAD preference list overflow.
3071         + commit aeb8272ca8aad403a4baac33b8d5673719cfd8f0
3072         * g10/getkey.c (fixup_uidnode): Increase size of prefs array.
3073
3074 2020-09-02  Werner Koch  <wk@gnupg.org>
3075
3076         gpg: Fix segv importing certain keys.
3077         + commit 896c528ba0555443cca81b3f091f761e70c698cd
3078         * g10/key-check.c (key_check_all_keysigs): Initialize issuer.
3079
3080 2020-09-01  NIIBE Yutaka  <gniibe@fsij.org>
3081
3082         scd: Fix a regression for OpenPGP card.
3083         + commit 0a9665187a7cbf68933b7162fb5f974177684a50
3084         * scd/app-openpgp.c (verify_chv2): Make sure loading keys.
3085
3086 2020-08-28  Werner Koch  <wk@gnupg.org>
3087
3088         sm: Fix a bug in the rfc2253 parser.
3089         + commit d2fe2ffd753706d07b26fbe22b17a561a2e535fc
3090         * sm/certdump.c (parse_dn_part): Fix parser flaw.
3091
3092 2020-08-27  Werner Koch  <wk@gnupg.org>
3093
3094         Release 2.2.22.
3095         + commit f9c120a29986e82d1179b38167ef2696dd0cc10a
3096
3097
3098         dirmngr: Print the last alert message returned by NTBTLS.
3099         + commit 45499b2ca3e8f3466e725dbc381757c89a7c39bf
3100         * dirmngr/http.c (send_request): Print the last TLS alert.
3101
3102 2020-08-27  NIIBE Yutaka  <gniibe@fsij.org>
3103
3104         scd: Add condition for VERIFY with 0x82.
3105         + commit d2f1a0a791db3eb03c003365cbcd010bd8066edb
3106         * scd/app-openpgp.c (verify_chv2): Check availability of keys in
3107         question.
3108
3109 2020-08-26  Werner Koch  <wk@gnupg.org>
3110
3111         build: Silence gcc warning -Wformat-zero-length.
3112         + commit 0be5decc097286e3502b6a12e019d40b8caf27b4
3113         * configure.ac: Avoid useless gcc warning.  We use an empty string
3114         quite often, for example in log_printhex.
3115
3116 2020-08-26  NIIBE Yutaka  <gniibe@fsij.org>
3117
3118         agent: Allow TERM="".
3119         + commit 4c8d5eb0bdd380c412c5f5fbc2b92fe6bcea825d
3120         * agent/call-pinentry.c (start_pinentry): When TERM is none,
3121         don't send OPTION ttytype to pinentry.
3122
3123 2020-08-25  Ineiev  <ineiev@gnu.org>
3124
3125         po: Update Russian translation.
3126         + commit 00ac538e928076e1879366cdce0e57be41f6c8fb
3127
3128
3129 2020-08-25  Werner Koch  <wk@gnupg.org>
3130
3131         gpg: Set default keysize to rsa3072.
3132         + commit 60f08969e13b2bb7f194eff80c3a275d444dc6b7
3133         * g10/keygen.c (DEFAULT_STD_KEY_PARAM): Change.
3134         (gen_rsa): Set fallback to 3072.
3135         (get_keysize_range): Set default to 3072.
3136         * doc/examples/vsnfd.prf: No more need for default-new-key-algo.
3137
3138         sm: Do not require a default keyring for --gpgconf-list.
3139         + commit 0847133e4cafa214c8129c245194d97c1e192cd5
3140         * sm/gpgsm.c (main): No default keyring for gpgconf mode.
3141
3142         agent: Allow using --gogconf-list even if HOME does not exist.
3143         + commit adea5ba7e75261705ba6e9c2456207e9455677f3
3144         * agent/gpg-agent.c (main): Do not create directories in gpgconf mode.
3145
3146 2020-08-23  Werner Koch  <wk@gnupg.org>
3147
3148         gpg,gpgsm: Record the creation time of a private key.
3149         + commit 5ac0cf1b8198dcaac7e7abaf05c28dd413f38cad
3150         * sm/call-agent.c (gpgsm_agent_genkey): Pass --timestamp option.
3151         (gpgsm_agent_import_key): Ditto.
3152         * g10/call-agent.c (agent_genkey): Add arg timestamp and pass it on.
3153         (agent_import_key): Ditto.
3154         * g10/import.c (transfer_secret_keys): Pass the creation date to the
3155         agent.
3156         * g10/keygen.c (common_gen): Ditto.
3157
3158         agent: Allow to pass a timestamp to genkey and import.
3159         + commit 051830d7b4862b6eca6c18c9fd53b51fa1158c34
3160         * agent/command.c (cmd_genkey): Add option --timestamp.
3161         (cmd_import_key): Ditto.
3162         * agent/genkey.c (store_key): Add arg timestamp and change callers.
3163         (agent_genkey): Ditto.
3164         * agent/findkey.c (write_extended_private_key): Add args timestamp and
3165         newkey to write a Created line.
3166         (agent_write_private_key): Add arg timestamp.
3167         (agent_write_shadow_key): Ditto.
3168         * agent/protect-tool.c (agent_write_private_key): Ditto as dummy arg.
3169
3170 2020-08-22  Werner Koch  <wk@gnupg.org>
3171
3172         agent: Default to extended key format.
3173         + commit 5b927b7b27bddc8ee70176414690d8ca8d879b54
3174         * agent/gpg-agent.c (oDisableExtendedKeyFormat, oNoop): New.
3175         (opts): Make --enable-extended-key-format a dummy option.  Add
3176         disable-extended-key-format.
3177         (parse_rereadable_options): Implement oDisableExtendedKeyFormat.
3178         * agent/protect.c (agent_protect): Be safe and set use_ocb either to
3179         to 1 or 0.
3180
3181         gpgtar,w32: Handle Unicode file names.
3182         + commit 843890663b6c68b4361ccfbeb11a50b02d5cc13f
3183         * tools/gpgtar.c (oUtf8Strings): New.
3184         (opts): Add option --utf8-strings.
3185         (parse_arguments): Set option.
3186         * tools/gpgtar.h (opt): Add field utf8strings.
3187         * tools/gpgtar-create.c (name_to_utf8): New.
3188         (fillup_entry_w32): Use that.
3189         (scan_directory): Ditto.
3190         (scan_directory) [W32]: Convert file name to utf8.
3191         (gpgtar_create): Convert pattern.
3192
3193         common: Use gpgrt functions for mkdir and chdir if available.
3194         + commit 364cef997c0ac5632152acfb7ab2330c4f289a9a
3195         * common/sysutils.c (gnupg_mkdir): Divert to gpgrt_mkdir.
3196         (gnupg_chdir): Divert to gpgrt_chdir
3197
3198         common,w32: Do not assume the ANSI codepage during string conversion.
3199         + commit bef68efd8da92115142005d22e9336ff798dcf4b
3200         * common/utf8conv.c (get_w32_codepage): New.
3201         (wchar_to_native): Use instead oc CP_ACP.
3202         (native_to_wchar): Ditto.
3203
3204         common: Strip trailing CR,LF from w32_strerror.
3205         + commit 73b0fdabdb108880034b7730d04614d8a7cf943a
3206         * common/stringhelp.c (w32_strerror): Strip trailing CR,LF.
3207         * common/iobuf.c (iobuf_get_filelength): Use -1 and not 0 for the
3208         arg to w32_strerror.
3209
3210 2020-08-20  Werner Koch  <wk@gnupg.org>
3211
3212         gpgtar: Make --files-from and --null work as described.
3213         + commit 1efe99f3d9e3c6d5733cf512b7e494284a445bfa
3214         * tools/gpgtar-create.c (gpgtar_create): Add args files_from and
3215         null_names.  Improve reading from a file.
3216         * tools/gpgtar.c: Make global vars static.
3217         (main): Remove tests for --files-from and --null option combinations.
3218         Pass option variables to gpgtar_create.
3219
3220         build: New configure option --disable-tests.
3221         + commit 829bc3bc60da134841705f7d701b0870e1629b38
3222         * configure.ac: Add option --disable-tests.  Print warnings in the
3223         summary.
3224         (DISABLE_TESTS): New am_conditional.
3225
3226         gpg: Fix regression for non-default --passphrase-repeat option.
3227         + commit a4d73b1c8e2a312e78831843aa04364d7d3c8e6f
3228         * agent/command.c (cmd_get_passphrase): Take care of --repeat with
3229         --newsymkey.
3230
3231 2020-08-13  Werner Koch  <wk@gnupg.org>
3232
3233         gpg: Ignore personal_digest_prefs for ECDSA keys.
3234         + commit f0f8b124f0d2332e1c0b496df5e5f9c4b3db6bc3
3235         * g10/sign.c (hash_for): Simplify hash algo selection for ECDSA.
3236
3237 2020-08-12  Werner Koch  <wk@gnupg.org>
3238
3239         common: Pass the WAYLAND_DISPLAY envvar along.
3240         + commit 3cf920a1e353ceec7a3d854d5b509be417e4c801
3241         * common/session-env.c (stdenvnames): Add WAYLAND_DISPLAY.
3242
3243 2020-08-04  Werner Koch  <wk@gnupg.org>
3244
3245         sm: Also show the SHA-256 fingerprint.
3246         + commit 9c57de75cf36cfcf408eda1b59a0362a061517ce
3247         * sm/keylist.c (list_cert_colon): Emit a new "fp2" record.
3248         (list_cert_raw): Print the SHA2 fingerprint.
3249         (list_cert_std): Ditto.
3250
3251 2020-07-30  NIIBE Yutaka  <gniibe@fsij.org>
3252
3253         w32: More adding NETLIBS.
3254         + commit 8d9ce32c30db2bba5736fff5f56b7c145aaec42c
3255         * common/Makefile.am (t_common_ldadd): Add $(NETLIBS).
3256
3257         w32: Add link to $(NETLIB) for -lws2_32.
3258         + commit f95d923090e119a7a05eef13bbbc108ed98e513a
3259         * dirmngr/Makefile.am (dirmngr_LDADD): Add $(NETLIBS).
3260         * sm/Makefile.am (gpgsm_LDADD): Ditto.
3261         * tools/Makefile.am (gpg_wks_client_LDADD): Ditto.
3262
3263 2020-07-16  Werner Koch  <wk@gnupg.org>
3264
3265         gpg: Do not close stdout after --export-ssh-key.
3266         + commit 970e43130506186c82d528d0a4fe34725e3c8e6b
3267         * g10/export.c (export_ssh_key): Do not close stdout.
3268
3269 2020-07-15  NIIBE Yutaka  <gniibe@fsij.org>
3270
3271         tools: Use internal regexp routines.
3272         + commit b4cbb5f58a00fa5ac9f1282664c0adb7ecfa9e57
3273         * tools/gpg-check-pattern.c: Use jimregexp.h.
3274
3275         regexp: Import change from JimTcl.
3276         + commit 1d1f2aa94370dcb715f6ae02ea5e14eb7ec5fa98
3277         * regexp/jimregexp.h, regexp/jimregexp.c: Fix from JimTcl.
3278
3279         regexp: Fix generation of _unicode_mapping.c.
3280         + commit 8904b18822fc2203ed667844cc3885dc459dbfef
3281         * configure.ac (AWK_HEX_NUMBER_OPTION): Detect GNU Awk.
3282         * regexp/Makefile.am: Use AWK_HEX_NUMBER_OPTION.
3283         * regexp/parse-unidata.awk: Don't use strtonum.
3284
3285         gpg: Add regular expression support.
3286         + commit 199309190a0b9966445bc386747c433949d3b81e
3287         * AUTHORS, COPYING.other: Update.
3288         * Makefile.am (SUBDIRS): Add regexp sub directory.
3289         * configure.ac (DISABLE_REGEX): Remove.
3290         * g10/Makefile.am (needed_libs): Add libregexp.a.
3291         * g10/trustdb.c: Remove DISABLE_REGEX support.
3292         * regexp/LICENSE, regexp/jimregexp.c, regexp/jimregexp.h,
3293           regexp/utf8.c, regexp/utf8.h: New from Jim Tcl.
3294         * regexp/UnicodeData.txt: New from Unicode.
3295         * regexp/Makefile.am, regexp/parse-unidata.awk: New.
3296         * tests/openpgp/Makefile.am: Remove DISABLE_REGEX support.
3297         * tools/Makefile.am: Remove DISABLE_REGEX support.
3298
3299 2020-07-13  Werner Koch  <wk@gnupg.org>
3300
3301         agent: Fix regression with --newsymkey in loopback mode.
3302         + commit d9ea47f702840c87431df984b9b3f7e60c9ea815
3303         * agent/command.c (cmd_get_passphrase): Never repeat in loopback mode;
3304         same as with !OPT_NEWSYMKEY.
3305
3306 2020-07-13  NIIBE Yutaka  <gniibe@fsij.org>
3307
3308         dirmngr: Handle EAFNOSUPPORT at connect_server.
3309         + commit ce793fc2f838a97cb1e92b3060337b8052f3dc3a
3310         * dirmngr/http.c (connect_server): Skip server with EAFNOSUPPORT.
3311
3312 2020-07-09  Werner Koch  <wk@gnupg.org>
3313
3314         Release 2.2.21.
3315         + commit be6fc39ed9b4ffd56d960e20499599c851c17b44
3316
3317
3318 2020-07-08  Werner Koch  <wk@gnupg.org>
3319
3320         Do not use the pinentry's qualitybar.
3321         + commit b451c4f5ea672c9915e28d8dde30abc675060f06
3322         * agent/genkey.c (agent_ask_new_passphrase): No qualitybar.
3323         * g10/call-agent.c (agent_get_passphrase): Ditto.
3324         * sm/call-agent.c (gpgsm_agent_ask_passphrase): Ditto.
3325
3326         gpg: Use integrated passphrase repeat entry also for -c.
3327         + commit ae8b88c635424ef36f024d0016949d11187dc21e
3328         * g10/call-agent.c (agent_get_passphrase): Add arg newsymkey.
3329         * g10/passphrase.c (passphrase_get): Add arg newsymkey.
3330         (passphrase_to_dek): Pass it on.
3331
3332         agent: New option --newsymkey for GET_PASSPHRASE.
3333         + commit d9e2dfa4c585de7c261fde13c18bd0f82415d6c3
3334         * agent/call-pinentry.c (do_getpin): New.
3335         (agent_askpin): Use do_getpin.
3336         (agent_get_passphrase): Add arg pininfo.  Use do_getpin.
3337         * agent/genkey.c (check_passphrase_constraints): New arg no_empty.
3338         * agent/command.c (reenter_passphrase_cmp_cb): New.
3339         (cmd_get_passphrase): Add option --newsymkey.
3340
3341 2020-07-07  Werner Koch  <wk@gnupg.org>
3342
3343         gpg: Fix flaw in symmetric algorithm selection in mixed mode.
3344         + commit 7b6071a45fbf14219b6aca4fff8fa0eaf6c6dd8e
3345         * g10/encrypt.c (setup_symkey): Use default_cipher_algo function
3346         instead of the fallback s2k_cipher_algo.  Fix error code.
3347         (encrypt_simple): Use setup_symkey.
3348
3349 2020-07-03  Werner Koch  <wk@gnupg.org>
3350
3351         sm: Exclude rsaPSS from de-vs compliance mode.
3352         + commit 4a36adaa64311a42eb78d9e52390df489454cafb
3353         * common/compliance.h (PK_ALGO_FLAG_RSAPSS): New.
3354         * common/compliance.c (gnupg_pk_is_compliant): Add arg alog_flags and
3355         test rsaPSS.  Adjust all callers.
3356         * common/util.c (pubkey_algo_to_string): New.
3357         (gnupg_pk_is_allowed): Ditto.
3358         * sm/misc.c (gpgsm_ksba_cms_get_sig_val): New wrapper function.
3359         (gpgsm_get_hash_algo_from_sigval): New.
3360         * sm/certcheck.c (gpgsm_check_cms_signature): Change type of sigval
3361         arg.  Add arg pkalgoflags.  Use the PK_ALGO_FLAG_RSAPSS.
3362         * sm/verify.c (gpgsm_verify): Use the new wrapper and new fucntion to
3363         also get the algo flags.  Pass algo flags along.  Change some of the
3364         info output to be more like current master.
3365
3366 2020-07-02  Werner Koch  <wk@gnupg.org>
3367
3368         dirmngr: Silence annoying warning for missing default ldap server file.
3369         + commit daca1a011b0e4ae888fd6b11253993cb3537990f
3370         * dirmngr/dirmngr.c (parse_ldapserver_file): Add arg ignore_enoent.
3371         (main): Use that arg for the default file.
3372
3373         dirmngr: Fix case handling of "ldapi" scheme.
3374         + commit 0795ab1c8f95831c15d4ae36d197805a26f8c899
3375         * dirmngr/ldap-parse-uri.c (ldap_uri_p): s/'i'/'I'.
3376
3377 2020-06-26  Werner Koch  <wk@gnupg.org>
3378
3379         sm: Print the serial number of a cert also in decimal.
3380         + commit ad6bf5d67f58dcdd76b621e77b81efa7b41ca885
3381         * sm/certdump.c: Include membuf.h.
3382         (gpgsm_print_serial_decimal): New.
3383         * sm/keylist.c (list_cert_raw): Print s/n also in decimal
3384         (list_cert_std): Ditto.
3385
3386 2020-06-03  Werner Koch  <wk@gnupg.org>
3387
3388         doc: Minor enhancement for reproducibility.
3389         + commit 5ade2b68db231c78d8ecca0eb21db2153da958d2
3390         * doc/Makefile.am (defsincdate): In no repo mode and with
3391         SOURCE_DATE_EPOCH set, use that instead of blanking the date.
3392
3393         common: Add missing error code GPG_ERR_WRONG_NAME.
3394         + commit 381c54179c2adefd558035f573a2029de2e1a2f7
3395         * configure.ac: Require libgpg-error 1.25.
3396         * common/util.h: Define some extra error codes.
3397
3398 2020-05-29  NIIBE Yutaka  <gniibe@fsij.org>
3399
3400         scd: Fix condition for C5 data object for newer Yubikey.
3401         + commit e285b1197b93e5114679b2ece9f10743abc715ef
3402         * scd/app-openpgp.c (compare_fingerprint): Relax the condition.
3403
3404 2020-05-21  NIIBE Yutaka  <gniibe@fsij.org>
3405
3406         dirmngr: dns: Fix allocation of string buffer in stack.
3407         + commit ab724d3206c8d3500ab2d982c98bad93ee550e42
3408         * dirmngr/dns.h (dns_strsection, dns_strclass)
3409         (dns_strtype): Change APIs.
3410         * dirmngr/dns.c (dns_p_lines): Use __dst for dns_strsection.
3411         (dns_rr_print): Use __dst for dns_strclass and dns_strtype.
3412         (dns_trace_dump): Likewise.
3413         (dns_ai_print): Use __dst for dns_strtype.
3414         (dns_strsection): Add an argument __dst for storage.
3415         (dns_strclass, dns_strtype): Likewise.
3416         (parse_packet): Use __dst for dns_strsection.
3417         (send_query): Use __dst for dns_strtype.
3418         (isection): Use __dst for dns_strsection.
3419         (iclass): Use __dst for dns_strclass.
3420         (itype): Use __dst for dns_strtype.
3421
3422 2020-05-12  Werner Koch  <wk@gnupg.org>
3423
3424         common: Change argument order of log_printhex.
3425         + commit c6324ee07a9ff2a626d6dfcc094a67b62628d42e
3426         * common/logging.c (log_printhex): Chnage order of args.  Make it
3427         printf alike.  Change all callers.
3428         * configure.ac: Add -Wno-format-zero-length
3429
3430 2020-04-16  Werner Koch  <wk@gnupg.org>
3431
3432         sm: Always allow authorityInfoAccess lookup if CRLs are also enabled.
3433         + commit aec7d136e4bdfd53709dc04e3e92f4c50135d368
3434         * sm/certchain.c (find_up): Disable external lookups in offline mode.
3435         Always allow AKI lookup if CRLs are also enabled.
3436
3437         sm: Lookup missing issuers first using authorityInfoAccess.
3438         + commit d57209553da7da85a369cd362aabeaef07e0bc26
3439         * sm/call-dirmngr.c (gpgsm_dirmngr_lookup): Add optional arg URL and
3440         adjust all callers.
3441         * sm/certchain.c (oidstr_caIssuers): New.
3442         (struct find_up_store_certs_s): Add additional fields.
3443         (find_up_store_certs_cb): Store the fingerprint.
3444         (find_up_via_auth_info_access): New.
3445         (find_up): Try the AIA URI first.
3446
3447         dirmngr: Allow http URLs with "LOOKUP --url"
3448         + commit 3b27c26241ee25cf75555e11d9bb463faac8237d
3449         * dirmngr/crlfetch.c (read_cert_via_http): New.
3450         (fetch_cert_by_url): Implement http scheme.
3451
3452         gpg: Add missing options --no-include-key-block.
3453         + commit 7dbfd92b3e231cfe111c8832ff1048305c8d2d92
3454         * g10/gpg.c (opts): Add it.
3455
3456         gpg: Make AEAD modes subject to compliance checks.
3457         + commit 37b116db20080f6e1c6ca1dec79014fecf2c3248
3458         * g10/decrypt-data.c (decrypt_data): Move aead algo detection up.
3459
3460         gpg: Show AEAD preferences.
3461         + commit ab7a0b07024c432233e691b5e4be7e32baf8d80f
3462         * g10/packet.h (preftype_t): Add PREFTYPE_AEAD.
3463         * g10/keyedit.c (show_prefs): Print AEAD preferences.
3464         * g10/getkey.c (fixup_uidnode): Set AEAD flags.
3465         (merge_selfsigs): Ditto.
3466
3467         gpg: Support decryption of the new AEAD packet.
3468         + commit 1dfe71c62b184c84723c5f926f2596f46ee967cf
3469         * common/openpgpdefs.h (aead_algo_t): New.
3470         (pkttype_t): Add PKT_ENCRYPTED_AEAD.
3471         * g10/decrypt-data.c (struct decode_filter_context_s): Add fields for
3472         AEAD.
3473         (aead_set_nonce_and_ad): New.
3474         (aead_checktag): New.
3475         (decrypt_data): Support AEAD.
3476         (aead_underflow): New.
3477         (aead_decode_filter): New.
3478         * g10/dek.h (DEK): Add field use_aead.  Turn use_mdc,
3479         algo_info_printed, and symmetric into bit flags.
3480         * g10/mainproc.c (struct mainproc_context): Add field
3481         seen_pkt_encrypted_aead.
3482         (release_list): Clear it.
3483         (have_seen_pkt_encrypted_aead): New.
3484         (symkey_decrypt_seskey): Support AEAD.
3485         (proc_symkey_enc): Ditto.
3486         (proc_encrypted): Ditto.
3487         (proc_plaintext): Ditto.
3488         * g10/misc.c (MY_GCRY_CIPHER_MODE_EAX): New.
3489         (openpgp_aead_test_algo): New.
3490         (openpgp_aead_algo_name): New.
3491         (openpgp_aead_algo_info): New.
3492         * g10/packet.h (PKT_symkey_enc): Add field use_aead.
3493         (PKT_user_id): Add field flags.aead
3494         (PKT_public_key): Ditto.
3495         (PKT_encrypted): Add fields for AEAD.
3496         * g10/parse-packet.c (parse): Handle PKT_ENCRYPTED_AEAD.
3497         (parse_symkeyenc): Support AEAD.
3498         (parse_encrypted): Ditto.
3499         (dump_sig_subpkt): Dump AEAD preference packet.
3500         (parse_encrypted_aead): New.
3501
3502 2020-04-15  Werner Koch  <wk@gnupg.org>
3503
3504         gpg: Improve symmetric decryption speed by about 25%
3505         + commit 144b95cc9d0f03a2fe5d91120f6b4b30f4bb8f71
3506         * g10/decrypt-data.c (mdc_decode_filter, decode_filter): Fatcor buffer
3507         filling code out to ...
3508         (fill_buffer): new.
3509
3510         gpg: Reformat parts of decrypt-data.c.
3511         + commit 2f39e00b6b7d2aa57cd268c579127947042a0fcf
3512         * g10/decrypt-data.c (struct decode_filter_context_s): Rename 'defer'
3513         to 'holdback' and 'defer_filled' to 'holdbacklen'.  Increase size of
3514         holdback to allow for future AEAD decryption.  Turn 'partial' and
3515         'eof_seen' into bit fields.
3516         (decrypt_data): Replace write_status_text by write_Status_printf.
3517         Indent parts of the code.
3518
3519         sm,dirmngr: Restrict allowed parameters used with rsaPSS.
3520         + commit ddc74f50d42370421b4802dc13df88f0ca2fcee5
3521         * sm/certcheck.c (extract_pss_params): Check the used PSS params.
3522         * dirmngr/crlcache.c (finish_sig_check): Ditto.
3523         * dirmngr/validate.c (check_cert_sig): Ditto.
3524
3525         sm: Support rsaPSS verification also for CMS signatures.
3526         + commit 24d563749f50f51841b3fd00eb615a871e45bb28
3527         * sm/certcheck.c (gpgsm_check_cert_sig): Factor PSS parsing out to ...
3528         (extract_pss_params): new.
3529         (gpgsm_check_cms_signature): Implement PSS.
3530
3531         dirmngr: Support rsaPSS also in the general validate module.
3532         + commit 8bf17eb94d0d85f34477ec0c2c0514000b6aa045
3533         * dirmngr/validate.c (hash_algo_from_buffer): New.
3534         (uint_from_buffer): New.
3535         (check_cert_sig): Support rsaPSS.
3536         * sm/certcheck.c (gpgsm_check_cert_sig): Fix small memory leak on
3537         error.
3538
3539         sm,dirmngr: Support rsaPSS signature verification.
3540         + commit 0626cc8fed340deb36f0c10e7a68afc287d0f626
3541         * sm/certcheck.c (hash_algo_from_buffer): New.
3542         (uint_from_buffer): New.
3543         (gpgsm_check_cert_sig): Handle PSS.
3544         * dirmngr/crlcache.c (hash_algo_from_buffer): New.
3545         (uint_from_buffer): New.
3546         (start_sig_check): Detect PSS and extract hash algo.  New arg to
3547         return a PSS flag.
3548         (finish_sig_check): New arg use_pss.  Extract PSS args and use them.
3549         (crl_parse_insert): Pass use_pss flag along.
3550
3551         common: New function to map hash algo names.
3552         + commit 4d37cc72b83f601118c2c6c79d9d96c85e250f7e
3553         * common/sexputil.c (hash_algo_to_string): New.
3554
3555         scd:p15: Return a display S/N via Assuan.
3556         + commit 39e2260d7e05ef2fd6ff94a1bc538cf0d640193c
3557         * scd/app-p15.c (make_pin_prompt): Factor some code out to ...
3558         (get_dispserialno): this.
3559         (do_getattr): Use new fucntion for a $DISPSERIALNO.
3560
3561         scd:p15: Show a pretty PIN prompt.
3562         + commit beaa2cbb7f039c6ebfcfff483cfe6002a858993d
3563         * scd/app-p15.c (struct prkdf_object_s): New fields common_name and
3564         serial_number.
3565         (release_prkdflist): Free them.
3566         (keygrip_from_prkdf): Parse cert and set them.
3567         (any_control_or_space): New.
3568         (make_pin_prompt): New.
3569         (verify_pin): Construct a pretty PIN prompt.
3570         (do_sign): Remove debug output.
3571
3572         scd: Return GPG_ERR_BAD_PIN on 0x63Cn status word.
3573         + commit 9e6a3290dad1b19144a2b413902e9918094a2cea
3574         * scd/iso7816.c (map_sw): Detect 0x63Cn status code.
3575
3576         scd: Factor common PIN status check out.
3577         + commit 9497d25c567d4fb8b6be603b102a149060e7aa56
3578         * scd/iso7816.h (ISO7816_VERIFY_ERROR): New.
3579         (ISO7816_VERIFY_NO_PIN): New.
3580         (ISO7816_VERIFY_BLOCKED): New.
3581         (ISO7816_VERIFY_NULLPIN): New.
3582         (ISO7816_VERIFY_NOT_NEEDED): New.
3583         * scd/iso7816.c (iso7816_verify_status): New.
3584         * scd/app-nks.c (get_chv_status): Use new function.
3585
3586         scd:p15: Fix decrypt followed by sign problem for D-Trust cards.
3587         + commit 471b06e91b6ae47e1f71cd7a698763cd9d32ff12
3588         * scd/iso7816.c (iso7816_select_mf): New.
3589         * scd/app-p15.c (card_product_t): New.
3590         (struct app_local_s): Add field 'card_product'.
3591         (read_ef_tokeninfo): Detect D-Trust card.
3592         (prepare_verify_pin): Switch to D-Trust AID.
3593         (do_decipher): Restore a SE for D-TRust cards.  Change the padding
3594         indicator to 0x81.
3595
3596         * common/percent.c (percent_data_escape): new.  Taken from master.
3597
3598         scd:p15: Emit MANUFACTURER, $ENCRKEYID, $SIGNKEYID.
3599         + commit 4148976841d154c94e6d1d4dcc1720908582086b
3600         * scd/app-p15.c (read_ef_tokeninfo): Store manufacturer_id.
3601         (do_getattr): Implement MANUFACTURER, $ENCRKEYID and $SIGNKEYID.
3602         (send_keypairinfo): Also print usage flags.
3603
3604         gpg: Use the new MANUFACTURER attribute.
3605         + commit 88b456bdf4e4763e8f1b718f5597d4d075d989cd
3606         * g10/call-agent.h (struct agent_card_info_s): Add manufacturer fields.
3607         * g10/call-agent.c (agent_release_card_info): Release them.
3608         (learn_status_cb): Parse MANUFACTURER attribute.
3609         * g10/card-util.c (get_manufacturer): Remove.
3610         (current_card_status): Use new attribute.
3611
3612         scd:openpgp: New attribute "MANUFACTURER".
3613         + commit 431b3e68e071d2bdc22b2c845ca929182830ddbd
3614         * scd/app-openpgp.c (get_manufacturer): New..
3615         (do_getattr): Add new attribute "MANUFACTURER".
3616         (do_learn_status): Always print it.
3617
3618         scd:p15: Rename some variables and functions for clarity.
3619         + commit b0cb2c2ab8c71738167785564698c43b50c15fee
3620         * scd/app-p15.c: Rename keyinfo to prkdf.
3621
3622
3623         Backported from master.  Removed the do_with_keygrip related parts
3624         because that function is not available.
3625
3626         scd:p15: Cache the PIN.
3627         + commit 133b6ff8cd0c938abbf55ba6dc50299240d247f6
3628         * scd/app-p15.c (struct prkdf_object_s): Add flag pin_verified.
3629         (verify_pin): Make use of it.
3630
3631 2020-04-08  NIIBE Yutaka  <gniibe@fsij.org>
3632
3633         gpg: ECDH: Accept longer padding.
3634         + commit 2f08a4f25df7d1cbf037bdf0d7f5c1ef5859fa1e
3635         * g10/pubkey-enc.c (get_it): Remove check which mandates shorter
3636         padding.
3637
3638 2020-04-01  Werner Koch  <wk@gnupg.org>
3639
3640         scd:p15: Add missing keygrip retrieval for decryption.
3641         + commit b95a0bfbba75025761aa163eca74c7653d76981a
3642         * scd/app-p15.c (do_decipher): Get the keygrip.
3643
3644         scd:p15: Support decryption with CardOS 5 cards.
3645         + commit 4af38ea5e450b3eb79af98b9876b2b968110a459
3646         * scd/app-p15.c (do_decipher): New.
3647
3648         scd:p15: Factor PIN verification out to a new function.
3649         + commit ce9406ca370b482c05c859d963949ae75c99cb6f
3650         * scd/app-p15.c (do_sign): Factor code out to ...
3651         (prepare_verify_pin, verify_pin): new functions.
3652
3653         scd:p15: Support signing with CardOS 5 cards.
3654         + commit e730444e7b7502b935bbe343935f68f764b95b96
3655         * scd/app-help.c (app_help_get_keygrip_string_pk): Add optional arg
3656         r_pkey and change all callers.
3657         (app_help_get_keygrip_string): Ditto.
3658         * scd/app-p15.c (struct cdf_object_s): Use bit flags
3659         (struct aodf_object_s): Ditto.  Add field 'fid'.
3660         (struct prkdf_object_s): Ditto.  Add fields keygrip, keyalgo, and
3661         keynbits.
3662         (parse_certid): Allow a keygrip instead of a certid aka keyref.
3663         (read_ef_aodf): Store the FID.
3664         (keygripstr_from_prkdf): Rename to ...
3665         (keygrip_from_prkdf): this.  Remove arg r_gripstr and implement cache.
3666         Change callers to directly use the values from the object.  Also store
3667         the algo and length of the key ion the object.
3668         (keyref_from_keyinfo): New. Factored out code.
3669         (do_sign): Support SHA-256 and >2048 bit RSA keys.
3670         common/scd:p15: Support signing with CardOS 5 cards.
3671         * common/util.h (KEYGRIP_LEN): New.
3672
3673         scd:p15: Read certificates in extended mode.
3674         + commit 368f006a2840cd6b37caf7b4b98a16b818ac2289
3675         * scd/app-p15.c (readcert_by_cdf): Allow reading in extended mode.
3676         * scd/app-common.h (app_get_slot): New.
3677
3678         scd: Add function for binary read in extended mode.
3679         + commit 64142caafe5c89ad4db36b47c2dc917a9ac66a8e
3680         * scd/iso7816.c (iso7816_read_binary): Factor code out to ...
3681         (iso7816_read_binary_ext): new function.  Add arg extended_mode.
3682
3683         scd:p15: Detect CardOS 5 cards and print some basic infos.
3684         + commit 60b0aa7e57e787cbeca22adf77b330f753553d87
3685         * scd/app-p15.c (read_ef_odf): Detect the home_DF on the fly.  Silence
3686         the garbage warning for null bytes.
3687         (print_tokeninfo_tokenflags): New.
3688         (read_ef_tokeninfo): Print manufacturer, label, and flags.
3689         (app_select_p15): No need to use the app_get_slot macro.
3690         (CARD_TYPE_CARDOS_50): New const.
3691         (card_atr_list): Detect CardOS 5.0
3692
3693 2020-03-30  Werner Koch  <wk@gnupg.org>
3694
3695         wks: Take name of sendmail from configure.
3696         + commit 76d2a02dfe8f923c0d4d8ef86ca71a9ac47c243d
3697         * configure.ac (NAME_OF_SENDMAIL): New ac_define.
3698         * tools/send-mail.c (run_sendmail): Use it.
3699
3700         agent: Print an error if gpg-protect reads the extended key format.
3701         + commit 011a2f5fb77c7963f25550e423160507818f7a91
3702         * agent/protect-tool.c (read_key): Detect simple extended key format.
3703
3704         sm: Fix possible NULL deref in error messages of --gen-key.
3705         + commit 2b4b0b1223aab955aafa2a150fe2dbc04c210bcd
3706         * sm/certreqgen.c: Protect printing the line numbers in case of !R.
3707
3708 2020-03-27  Werner Koch  <wk@gnupg.org>
3709
3710         sm: Consider certificates w/o CRL DP as valid.
3711         + commit 1424c12e4c7164990797a0a1daa3db6f3329aed4
3712         * sm/certchain.c (is_cert_still_valid): Shortcut if tehre is no DP.
3713         * common/audit.c (proc_type_verify): Print "n/a" if a cert has no
3714         distribution point.
3715         * sm/gpgsm.h (opt): Add field enable_issuer_based_crl_check.
3716         * sm/gpgsm.c (oEnableIssuerBasedCRLCheck): New.
3717         (opts): Add option --enable-issuer-based-crl-check.
3718         (main): Set option.
3719
3720 2020-03-20  Werner Koch  <wk@gnupg.org>
3721
3722         Release 2.2.20.
3723         + commit 5094bb08edd48087a5aa89494fc361f0ce4f34aa
3724         * build-aux/speedo.mk (sign-installer): Fix syntax error.
3725
3726 2020-03-19  Werner Koch  <wk@gnupg.org>
3727
3728         gpgconf: Take care of --homedir when reading/updating options.
3729         + commit b92860a8b9d253661de0060623e920b3f58e4443
3730         * tools/gpgconf-comp.c (gc_component_check_options): Take care of
3731         --homedir.
3732         (retrieve_options_from_program): Ditto.
3733
3734 2020-03-18  NIIBE Yutaka  <gniibe@fsij.org>
3735
3736         scd: Fix pinpad handling when KDF enabled.
3737         + commit 133248b297a1d72897f280d8bd21081cd6ebd66c
3738         * scd/app-openpgp.c (do_getattr): Send the KDF DO information.
3739
3740         scd: Disable pinpad if it's impossible by KDF DO.
3741         + commit b27e20a95cb7af59dcaa6e59aacf52ed766be1f3
3742         * scd/app-openpgp.c (struct app_local_s): Add pinpad.disabled field.
3743         (do_getattr): Set pinpad.disabled field.
3744         (check_pinpad_request): Use the pinpad.disabled field.
3745         (do_setattr): Update pinpad.disabled field.
3746
3747 2020-03-18  Werner Koch  <wk@gnupg.org>
3748
3749         gpg: Print a hint for --batch mode and --delete-secret-key.
3750         + commit fbe318475236166b54e19d228bf9b24e442e0fa5
3751         * g10/delkey.c: Include shareddefs.h.
3752         (delete_keys): Print a hint.
3753
3754         dirmngr: Improve finding OCSP cert.
3755         + commit 25dc0e5b1eb02f79946a86c799c7720001a296bc
3756         * dirmngr/certcache.c (find_cert_bysubject): Add better debug output
3757         and try to locate by keyid.
3758
3759 2020-03-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
3760
3761         gpg: Update --trusted-key to accept fingerprint as well as long key id.
3762         + commit b6d89d1944c55f302fb797cce0e007f59aabaf54
3763         * g10/trustdb.c (tdb_register_trusted_key): accept fingerprint as well
3764         as long key ID.
3765         * doc/gpg.texi: document that --trusted-key can accept a fingerprint.
3766
3767 2020-03-18  Werner Koch  <wk@gnupg.org>
3768             gniibe@fsij.org
3769
3770         gpg: Fix key expiration and usage for keys created at the Epoch.
3771         + commit e77f332b01f13af606ae0158dabcd644c274e456
3772         * g10/getkey.c (merge_selfsigs_main): Take a zero key creation time in
3773         account.
3774
3775 2020-03-14  Werner Koch  <wk@gnupg.org>
3776
3777         gpg: New option --auto-key-import.
3778         + commit 95b42278cafe7520d87168fb993ba715699e6bb6
3779         * g10/gpg.c (opts): New options --auto-key-import,
3780         --no-auto-key-import, and --no-include-key-block.
3781         (gpgconf_list): Add them.
3782         * g10/options.h (opt): Add field flags.auto_key_import.
3783         * g10/mainproc.c (check_sig_and_print): Use flag to enable that
3784         feature.
3785         * tools/gpgconf-comp.c: Give the new options a Basic config level.
3786
3787         gpg: Make use of the included key block in a signature.
3788         + commit b42d9f540c7484e45cfc997f77e360d0f0ec4bb9
3789         * g10/import.c (read_key_from_file): Rename to ...
3790         (read_key_from_file_or_buffer): this and add new parameters.  Adjust
3791         callers.
3792         (import_included_key_block): New.
3793         * g10/packet.h (PKT_signature): Add field flags.key_block.
3794         * g10/parse-packet.c (parse_signature): Set that flags.
3795         * g10/sig-check.c (check_signature2): Add parm forced_pk and change
3796         all callers.
3797         * g10/mainproc.c (do_check_sig): Ditto.
3798         (check_sig_and_print): Try the included key block if no key is
3799         available.
3800
3801         gpg: New option --include-key-block.
3802         + commit d79ebee64ea582da3c3be69cc23e146e2db3738b
3803         * common/openpgpdefs.h (SIGSUBPKT_KEY_BLOCK): New.
3804         * g10/gpg.c (oIncludeKeyBlock): New.
3805         (opts): New option --include-key-block.
3806         (main): Implement.
3807         * g10/options.h (opt): New flag include_key_block.
3808         * g10/parse-packet.c (dump_sig_subpkt): Support SIGSUBPKT_KEY_BLOCK.
3809         (parse_one_sig_subpkt): Ditto.
3810         (can_handle_critical): Ditto.
3811         * g10/sign.c (mk_sig_subpkt_key_block): New.
3812         (write_signature_packets): Call it for data signatures.
3813
3814         gpg: Add property "fpr" for use by --export-filter.
3815         + commit 2baa00ea186359f758fea5cb61aff99b09fec821
3816         * g10/export.c (push_export_filters): New.
3817         (pop_export_filters): New.
3818         (export_pubkey_buffer): Add args prefix and prefixlen.  Adjust
3819         callers.
3820         * g10/import.c (impex_filter_getval): Add property "fpr".
3821         * g10/main.h (struct impex_filter_parm_s): Add field hexfpr.
3822
3823 2020-02-19  NIIBE Yutaka  <gniibe@fsij.org>
3824
3825         gpg: Fix default-key selection when card is available.
3826         + commit 1cdd9e57f701f0d99d118d32adffe5216a94b0b2
3827         * g10/getkey.c (get_seckey_default_or_card): Handle the case
3828         when card key is not suitable for requested usage.
3829
3830 2020-02-19  Nick Piper  <nick.piper@cgi.com>
3831
3832         doc: Correction of typo in documentation of KEY_CONSIDERED.
3833         + commit 60dbe082949b13635f3f31aa03d12aa9f671c941
3834         (cherry picked from commit 0e1cbabc0ad4fe2ca9644fffb5cf27b1a8a1509f)
3835
3836 2020-02-15  Werner Koch  <wk@gnupg.org>
3837
3838         gpgsm: Fix import of some CR,LF ternminated certificates.
3839         + commit 38f819bd6d77d068d8626bf7f5b968ff03c263af
3840         * common/ksba-io-support.c (base64_reader_cb): Detect the END tag and
3841         don't just rely on the padding chars.  This could happen only with
3842         CR+LF termnmated PEM files.  Also move the detection into the invalid
3843         character detection branch for a minor parser speedup.
3844
3845 2020-02-10  Werner Koch  <wk@gnupg.org>
3846
3847         doc: Improve the warning section of the gpg man page.
3848         + commit 146dacd3b13bf5d917978313092c022641305a27
3849         * doc/gpg.texi: Update return value and warning sections.
3850
3851         (cherry picked from commit 113a8288b85725f7726bb2952431deea745997d8)
3852
3853 2020-02-10  Werner Koch  <wk@gnupg.org>
3854             Tomáš Mráz
3855
3856         build: Always use EXTERN_UNLESS_MAIN_MODULE pattern.
3857         + commit 21d9bd8b87a9f793a106095e3838eb71825189d7
3858         * common/util.h (EXTERN_UNLESS_MAIN_MODULE): Add the definion only
3859         here but now without the Norcroft-C.  Change all other places where it
3860         gets defined.
3861         * common/iobuf.h (iobuf_debug_mode): Declare unconditionally as
3862         extern.
3863         * common/iobuf.c (iobuf_debug_mode): Define it here.
3864         * agent/gpg-agent.c (INCLUDED_BY_MAIN_MODULE): Define here and also in
3865         all main modules of all other programs.
3866
3867         * g10/main.h: Put util.h before the local header files.
3868
3869 2020-02-10  Werner Koch  <wk@gnupg.org>
3870
3871         gpg: Make really sure that --verify-files always returns an error.
3872         + commit 49151255f3b1decf2e394a58bc0ac412bda2b214
3873         * g10/verify.c (verify_files): Track the first error code.
3874
3875         common: Also protect log_inc_errorcount against counter overflow.
3876         + commit 47f514fde6e29137d660c19e6eea0b842d2b03f5
3877         * common/logging.c (log_inc_errorcount): Also protect against
3878         overflow.
3879         (log_error): Call log_inc_errorcount instead of directly bumping the
3880         counter.
3881
3882 2020-01-17  Werner Koch  <wk@gnupg.org>
3883
3884         gpgconf,w32: Print a warning for a suspicious homedir.
3885         + commit a265d3997a9120cb607c2d9b843bf9ee9e944378
3886         * tools/gpgconf.c (list_dirs): Check whether the homedir has been
3887         taken from the registry.
3888
3889 2020-01-16  NIIBE Yutaka  <gniibe@fsij.org>
3890
3891         gpg: default-key: Simply don't limit by capability.
3892         + commit a7840777e4277039482ce3ea3e6fc919526be2f1
3893         * g10/getkey.c (parse_def_secret_key): Remove the check.
3894
3895 2019-12-23  Werner Koch  <wk@gnupg.org>
3896
3897         gpg: Fix output of --with-secret if a pattern is given.
3898         + commit def1ceccf05baf187b9313e6e37171709ab44225
3899         * g10/keylist.c (list_one): Probe for a secret key in --with-secret
3900         mode.
3901
3902 2019-12-19  Andre Heinecke  <aheinecke@gnupg.org>
3903
3904         speedo: Make signing optional for w32-release.
3905         + commit a56c591f9063d895544d681e25bda2ffb22f7ca0
3906         * build-aux/speedo.mk (AUTHENTICODE_sign): Check if
3907         certificates are available.
3908
3909         speedo: Use multithreaded xz for w32 source.
3910         + commit 28403cb5fe4eea2ac1ad514fdfcfa282e795c69f
3911         * build-aux/speedo.mk (dist-source): Add -T0 parameter to xz.
3912
3913         speedo: Improve and document wixlib build.
3914         + commit 4d9b262584fb15e7965d579fad9a149e26849c18
3915         * Makefile.am (sign-release): Add handling for wixlib.
3916         * build-aux/speedo.mk: Add help-wixlib and improve handling.
3917
3918 2019-12-17  Andre Heinecke  <aheinecke@intevation.de>
3919
3920         speedo, w32: Add w32-wixlib target for MSI package.
3921         + commit c461de93f44efaa6a1d9669eb9d4033943368431
3922         * Makefile.am (EXTRA_DIST): Add wixlib.wxs
3923         * build-aux/speedo.mk (w32-wixlib): New target.
3924         (w32-release): Build wixlib if WIXPREFIX is set.
3925         (help): Add documentation.
3926         * build-aux/speedo/w32/wixlib.wxs
3927
3928 2019-12-07  Werner Koch  <wk@gnupg.org>
3929
3930         Release 2.2.19.
3931         + commit 1c841c8389fb9640762822395b988e0d1584c9ae
3932
3933
3934         po: Make g10/call-dirmngr.c translatable.
3935         + commit 03983711b3376a5dff518a99adf5fb3a5bd8be4a
3936         * po/POTFILES.in: Add g10/call-dirmngr.c
3937         * g10/call-dirmngr.c (create_context): Change an i18n sting for easier
3938         reuse.
3939
3940         dirmngr: Tell gpg about WKD lookups resulting from a cache.
3941         + commit 438a1ec2978c64ecfe6b5ddaa61f214c2dcae88f
3942         * dirmngr/server.c (proc_wkd_get): Print new NOTE status
3943         "wkd_cached_result".
3944         * g10/call-dirmngr.c (ks_status_cb): Detect this and print a not ein
3945         verbose mode.
3946
3947 2019-12-06  Werner Koch  <wk@gnupg.org>
3948
3949         sm: Add special case for expired intermediate certificates.
3950         + commit 8c167febc0abc00be281a9dc8c2544b8d048a002
3951         * sm/gpgsm.h (struct server_control_s): Add field 'current_time'.
3952         * sm/certchain.c (find_up_search_by_keyid): Detect a corner case.
3953         Also simplify by using ref-ed cert objects in place of an anyfound
3954         var.
3955
3956 2019-12-04  Werner Koch  <wk@gnupg.org>
3957
3958         gpg: Use AKL for angle bracketed mail address with -r.
3959         + commit 78bb81e9deeca264f6a516630496470341e78fa9
3960         * g10/getkey.c (get_pubkey_byname): Extend is_mbox checking.
3961         (get_best_pubkey_byname): Ditto.
3962
3963 2019-11-29  Werner Koch  <wk@gnupg.org>
3964
3965         gpg: Fix double free with anonymous recipients.
3966         + commit 9ac182f376abf910a7b737b0e1ebd447eaa582f1
3967         * g10/pubkey-enc.c (get_session_key): Do not release SK.
3968
3969 2019-11-25  Werner Koch  <wk@gnupg.org>
3970
3971         Release 2.2.18.
3972         + commit 82b9e1bdbdd756290b8873b3e244dcc8d1f840fb
3973
3974
3975         tests: Adjust for now invalid SHA-1 key signatures.
3976         + commit 8e49fc7f43ecfe44dac57d97c555e2cbc7eb8e9a
3977         * tests/openpgp/defs.scm (create-gpghome): Add
3978         allow-weak-key-signatures.
3979
3980         agent: Improve --debug-pinentry diagnostics.
3981         + commit 96c4943a5bd070772d8be7bb7db8548840af5f8f
3982         * agent/call-pinentry.c (atfork_cb): Factor code out to ...
3983         (atfork_core): new.
3984
3985 2019-11-23  Werner Koch  <wk@gnupg.org>
3986
3987         wkd: Let --install-key write a template policy file.
3988         + commit 6e893061b54ddd38e83531f5513e3168d0002e41
3989         * tools/wks-util.c (ensure_policy_file): New.
3990         (wks_cmd_install_key): Call it.
3991
3992 2019-11-18  Werner Koch  <wk@gnupg.org>
3993
3994         dirmngr,gpg: Better diagnostic in case of bad TLS certificates.
3995         + commit 3efc94f1eb17eb5c5950c2fab9f701518352ae19
3996         * doc/DETAILS: Specify new status code "NOTE".
3997         * dirmngr/ks-engine-http.c (ks_http_fetch): Print a NOTE status for a
3998         bad TLS certificate.
3999         * g10/call-dirmngr.c (ks_status_cb): Detect this status.
4000
4001         dirmngr: Forward http redirect warnings to gpg.
4002         + commit 4dd50991252409eb2023ab8ad11f36a050f421af
4003         * dirmngr/http.c: Include dirmngr-status.h
4004         (http_prepare_redirect): Emit WARNING status lines for redirection
4005         problems.
4006         * dirmngr/http.h: Include fwddecl.h.
4007         (struct http_redir_info_s): Add field ctrl.
4008         * dirmngr/ks-engine-hkp.c (send_request): Set it.
4009         * dirmngr/ks-engine-http.c (ks_http_fetch): Set it.
4010         * g10/call-dirmngr.c (ks_status_cb): Detect the two new warnings.
4011
4012         dirmngr: Factor some prototypes out to dirmngr-status.h.
4013         + commit 466bdf7c07f4ebfc69d503f85b9423f2f6440682
4014         * dirmngr/dirmngr-status.h: New.
4015         * dirmngr/dirmngr.h: Include dirmngr-status.h and move some prototypes
4016         to that file.
4017         * dirmngr/t-support.c: New.
4018         * dirmngr/Makefile.am (t_common_src): Add new file.
4019
4020 2019-11-15  NIIBE Yutaka  <gniibe@fsij.org>
4021
4022         scd,ccid: Add support of GEMPC_EZIO.
4023         + commit 9b41f58c8a549055fa6bf7e21e2931b86f4da776
4024         * scd/ccid-driver.h (GEMPC_EZIO): New.
4025         * scd/ccid-driver.c (ccid_transceive_secure): Support GEMPC_EZIO.
4026
4027 2019-11-12  Werner Koch  <wk@gnupg.org>
4028
4029         dirmngr: Use IPv4 or IPv6 interface only if available.
4030         + commit 392e068e9f143d41f6350345619543cbcd47380f
4031         * dirmngr/dns-stuff.c (cached_inet_support): New variable.
4032         (dns_stuff_housekeeping): New.
4033         (check_inet_support): New.
4034         * dirmngr/http.c (connect_server): Use only detected interfaces.
4035         * dirmngr/dirmngr.c (housekeeping_thread): Flush the new cache.
4036
4037 2019-11-11  Werner Koch  <wk@gnupg.org>
4038
4039         gpg: Forbid the creation of SHA-1 third-party key signatures.
4040         + commit 754a03f5a279964af62025d11d92391e650fddb7
4041         * g10/sign.c (SIGNHINT_KEYSIG, SIGNHINT_SELFSIG): New.
4042         (do_sign): Add arg signhints and inhibit SHA-1 signatures.  Change
4043         callers to pass 0.
4044         (complete_sig): Add arg signhints and pass on.
4045         (make_keysig_packet, update_keysig_packet): Set signhints.
4046
4047         gpg: Add option --allow-weak-key-signatures.
4048         + commit 3b1fcf65239d9c73cc54760ea52a5749e024fa76
4049         * g10/gpg.c (oAllowWeakKeySignatures): New.
4050         (opts): Add --allow-weak-key-signatures.
4051         (main): Set it.
4052         * g10/options.h (struct opt): Add flags.allow_weak_key_signatures.
4053         * g10/misc.c (print_sha1_keysig_rejected_note): New.
4054         * g10/sig-check.c (check_signature_over_key_or_uid): Print note and
4055         act on new option.
4056
4057 2019-11-07  Werner Koch  <wk@gnupg.org>
4058
4059         gpg: Fix a potential loss of key sigs during import with self-sigs-only.
4060         + commit 2975868ede40ce8b8a0d20e7f0e4cd687772f9d0
4061         * g10/import.c (import_one_real): Don't do the final clean in the
4062         merge case.
4063
4064 2019-10-15  Werner Koch  <wk@gnupg.org>
4065
4066         gpg: Also delete key-binding signature when deleting a subkey.
4067         + commit d8052db74a0d2e6a55cf104e0ecb1868936bd09c
4068         * g10/delkey.c (do_delete_key): Simplify and correct subkey deletion.
4069
4070 2019-10-15  NIIBE Yutaka  <gniibe@fsij.org>
4071
4072         Revert "gpg: The first key should be in candidates."
4073         + commit 2906636b929f08fdf342560834d920e8e8153458
4074         This reverts commit 66eb953f43800a91c4280ae8fd49f6dc8cf74578.
4075
4076 2019-10-15  Werner Koch  <wk@gnupg.org>
4077
4078         gpg: Extend --quick-gen-key for creating keys from a card.
4079         + commit 652ca4b2bf985546baa70754f66eab3840cf2820
4080         * g10/keygen.c (parse_key_parameter_part): Add arg R_KEYGRIP and
4081         support the special algo "card".
4082         (parse_key_parameter_string): Add args R_KEYGRIP and R_SUBKEYGRIP.
4083         Handle the "card" algo.  Adjust callers.
4084         (parse_algo_usage_expire): Add arg R_KEYGRIP.
4085         (quickgen_set_para): Add arg KEYGRIP and put it into the parameter
4086         list.
4087         (quick_generate_keypair): Handle algo "card".
4088         (generate_keypair): Also handle the keygrips as returned by
4089         parse_key_parameter_string.
4090         (ask_algo): Support ed25519 from a card.
4091
4092 2019-10-15  NIIBE Yutaka  <gniibe@fsij.org>
4093
4094         po: Update Japanese translation.
4095         + commit fe02709ffd3c41fe84b90cda96edd12e6b836741
4096
4097
4098         gpg: The first key should be in candidates.
4099         + commit 66eb953f43800a91c4280ae8fd49f6dc8cf74578
4100         * g10/getkey.c (get_best_pubkey_byname): Handle the first key
4101         as the initial candidate for the selection.
4102
4103         gpg: Fix a memory leak in get_best_pubkey_byname.
4104         + commit 2924ac374eb8cbf87ed6c9fbbb72c0b8d1d37fa3
4105         * g10/getkey.c (get_best_pubkey_byname): Free the public key parts.
4106
4107 2019-10-03  Werner Koch  <wk@gnupg.org>
4108
4109         gpg: Be prepared for chosen-prefix SHA-1 collisions in key signatures.
4110         + commit edc36f59fcfcb4b896a53530345d586f7e5df560
4111         * g10/sig-check.c (check_signature_over_key_or_uid): Reject cewrtain
4112         SHA-1 based signatures.
4113
4114 2019-09-06  Werner Koch  <wk@gnupg.org>
4115
4116         gpg: Make --quiet work on --send-keys.
4117         + commit de57b5bf91d64f8843a68d1950bd12aecc82f8c1
4118         * g10/keyserver.c (keyserver_put): Act upon --quiet.
4119
4120 2019-08-23  Werner Koch  <wk@gnupg.org>
4121
4122         gpg: Implement keybox compression run.
4123         + commit b5f7ac6c368a07b3d35191bf56fdf58145c4e44b
4124         * kbx/keybox-init.c (keybox_lock): Add arg TIMEOUT and change all
4125         callers to pass -1.
4126         * g10/keydb.c (keydb_add_resource): Call keybox_compress.
4127
4128         kbx: Include deleted records into the --stats output.
4129         + commit 34f55c5e348d4bf9894c24988e6856b411ba05de
4130         * kbx/keybox-dump.c (_keybox_dump_file): Take deleted records in
4131         account.
4132
4133         kbx: Allow "gpgsm --faked-system-time" to kick off a compression run.
4134         + commit e854580fa562c423f3d977318b515fb4d186f99a
4135         * kbx/keybox-update.c (keybox_compress): Use make_timestamp.
4136
4137         gpg: Allow --locate-external-key even with --no-auto-key-locate.
4138         + commit df6cff8233aa281d150861a26cd262a8a15c73e7
4139         * g10/getkey.c (akl_empty_or_only_local): New.
4140         * g10/gpg.c (DEFAULT_AKL_LIST): New.
4141         (main): Use it here.
4142         (main) <aLocateExtKeys>: Set default AKL if none is set.
4143
4144         gpg: Silence some warning messages during -Kv.
4145         + commit 589f1187137cb14da1d16be1fdaf8f1ac2c2d436
4146         * g10/options.h (glo_ctrl): Add flag silence_parse_warnings.
4147         * g10/keylist.c (list_all): Set that during secret key listsings.
4148         * g10/parse-packet.c (unknown_pubkey_warning): If new flag is set do
4149          not print info message normally emitted inh verbose mode.
4150         (can_handle_critical_notation, enum_sig_subpkt): Ditto.
4151         (parse_signature, parse_key, parse_attribute_subpkts): Ditto.
4152
4153         gpg: Do not show an informational diagnostics with quiet.
4154         + commit 215858aba342e6f2b9a7c93f579638279af3a561
4155         * g10/trustdb.c (verify_own_keys): Silence informational diagnostic.
4156
4157         gpgconf: Suggest the use of --gpgconf-test on --launch problems.
4158         + commit 7c386c5fb5aebbbb36daf61c25d20e6888123994
4159         * tools/gpgconf-comp.c (gc_component_launch): Change suggestion.
4160
4161 2019-08-21  Werner Koch  <wk@gnupg.org>
4162
4163         scd:nks: Extend keypairinfo with usage flags.
4164         + commit 0a9053eff0406c6799ee201013194200c0ed3487
4165         * scd/app-nks.c (do_learn_status_core): Return usage.
4166
4167         scd:openpgp: Extend keypairinfo with usage flags.
4168         + commit 6f67abcc0339b42a181285b3416959c39a2d7808
4169         * scd/app-openpgp.c (send_keypair_info): Return usage.
4170
4171         sm: Show the usage flags when generating a key from a card.
4172         + commit a8aacaf2042a72760e6eaf35e65bfd6d42e642f0
4173         * g10/call-agent.c (scd_keypairinfo_status_cb): Also store the usage
4174         flags.
4175         * sm/call-agent.c (scd_keypairinfo_status_cb): Ditto.
4176         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Print the usage flags.
4177
4178         (cherry picked from commit 9ed1aa56c4bbf44e00b731d6807ada9e95c91bd7)
4179
4180         gpg: Allow decryption using non-OpenPGP cards.
4181         + commit 9a317557c58d2bdcc504b70c366b77f4cac71df7
4182         * g10/call-agent.c (struct getattr_one_parm_s): New.
4183         (getattr_one_status_cb): New.
4184         (agent_scd_getattr_one): New.
4185         * g10/pubkey-enc.c (get_it): Allow the standard leading zero byte from
4186         pkcs#1.
4187         * g10/getkey.c (enum_secret_keys): Move to...
4188         * g10/skclist.c (enum_secret_keys): here and handle non-OpenPGP cards.
4189
4190         scd: New standard attributes $ENCRKEYID and $SIGNKEYID.
4191         + commit 23784f8bf0ac6d6c52cb2de2f99f46017a92c11a
4192         * g10/call-agent.c (agent_scd_keypairinfo): Use --keypairinfo.
4193         * sm/call-agent.c (gpgsm_agent_scd_keypairinfo): Ditto.
4194         * scd/app-openpgp.c (do_getattr): Add attributes "$ENCRKEYID" and
4195         "$SIGNKEYID".
4196         * scd/app-nks.c (do_getattr): Add attributes too.
4197
4198         gpg: Allow direct key generation from card with --full-gen-key.
4199         + commit fbed618a3699bea131ce36949387af0fa3cf13f9
4200         * g10/call-agent.c (agent_scd_readkey): New.
4201         * g10/keygen.c (ask_key_flags): Factor code out to ..
4202         (ask_key_flags_with_mask): new.
4203         (ask_algo): New mode 14.
4204
4205         common: Extend function pubkey_algo_string.
4206         + commit 0353cb0a5edeef07330da1688b7801c073959185
4207         * common/sexputil.c (pubkey_algo_string): Add arg R_ALGOID.
4208         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Adjust.
4209
4210         (cherry picked from commit f952226043824cbbeb8517126b5266926121c4e8)
4211
4212         Removed the changes in gpg-card which is not part of 2.2
4213
4214         gpg: New option --use-only-openpgp-card.
4215         + commit c185f6dfbd1bfd809369da789239a371e9d1610e
4216         * g10/gpg.c (opts): Add option.
4217         (main): Set flag.
4218         * g10/options.h: Add flags.use_only_openpgp_card.
4219         * g10/call-agent.c (start_agent): Implement option.
4220
4221         gpg: Prepare card code to allow other than OpenPGP cards.
4222         + commit fe5c8de862885c51d27c2dc9ea237846c5e57e8a
4223         * g10/call-agent.c (start_agent): Use card app auto selection.
4224         * g10/card-util.c (current_card_status): Print the Application type.
4225         (card_status): Put empty line between card listings.
4226
4227         (cherry picked from commit e47524c34a2a9f53c2507f67a0b41b460cee78b7)
4228
4229         gpg: New card function agent_scd_keypairinfo.
4230         + commit 768cb6402f2941781262b9cb0a2aeecc89941f0f
4231         * g10/call-agent.c (scd_keypairinfo_status_cb)
4232         (agent_scd_keypairinfo): New.  Taken from gpgsm.
4233
4234         (cherry picked from commit 0fad61de159acf39e38a04f28f162f0beb0e77d6)
4235
4236         gpg: Remove two unused card related functions.
4237         + commit c2f87a936afb7eba288d7e6558c24509cd6ab045
4238         * g10/call-agent.c (inq_writekey_parms): Remove.
4239         (agent_scd_writekey): Remove.
4240         (agent_clear_pin_cache): Remove this stub.
4241
4242         (cherry picked from commit 334b16b868e771b983263ed20c200869e7e51198)
4243
4244         gpg: Repurpose the ISO defined DO "sex" to "salutation".
4245         + commit d410b5f9309607599c9ff45061fd1f02638a9a88
4246         * g10/card-util.c (current_card_status): String changes.
4247         (change_sex): Description change.
4248         (cmds): Add "salutation"; keep "sex" as an alias.
4249
4250         gpg: Remove unused arg in a card related function.
4251         + commit c66a2cc8d306e7d9d0b4450311f230f182762f93
4252         * g10/call-agent.c (agent_scd_setattr): Remove unused arg serialno.
4253
4254         (cherry picked from commit 3a4534d82682f69788da3cf4a445e38fbaf6b98e)
4255
4256 2019-08-12  NIIBE Yutaka  <gniibe@fsij.org>
4257
4258         common: Fix line break handling, finding a space.
4259         + commit 6e6078c8d0d4a2947e2a34f1367e4472f6ae483b
4260         * common/name-value.c (assert_raw_value): Correctly find a space.
4261
4262         sm: Support AES-256 key.
4263         + commit a9816d5fb13edb30c5d12cf85ae3e1a114fcc2c1
4264         * sm/decrypt.c (prepare_decryption): Handle a case for AES-256.
4265
4266         sm: Fix error checking of decryption result.
4267         + commit ccf5cc8b0b6cee562f7d5598149abcde17440ed4
4268         * sm/call-agent.c (gpgsm_agent_pkdecrypt): Fix condition.
4269
4270 2019-08-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4271
4272         gpg,gpgsm: Handle pkdecrypt responses with/without NUL terminators.
4273         + commit 64500e7f6dd63c793734e52e270b1ea23cfd1928
4274         * g10/call-agent.c (agent_pkdecrypt): accept but do not require
4275         NUL-terminated data from the agent.
4276         * sm/call-agent.c (gpgsm_agent_pkdecrypt): accept but do not require
4277         NUL-terminated data from the agent.
4278
4279 2019-08-12  NIIBE Yutaka  <gniibe@fsij.org>
4280
4281         scd: Handle CCID bwi of time extension.
4282         + commit 879660bf4581d902cc1d1244091873c6c0225fa2
4283         * scd/ccid-driver.c (bulk_in): Increase timeout by the multiplier
4284         value as defined section 6.2.6 in CCID specification.
4285
4286         scd: Fix bBWI value.
4287         + commit f8961a576d3b5d69bb0e600a64553659ebef8ee7
4288         * scd/ccid-driver.c (ccid_transceive_apdu_level): Use bBWI=0 for APDU
4289         level transfer.
4290         (ccid_transceive): Use bBWI=0 or the value returend by WTX for TPDU
4291         level transfer.
4292
4293         card: Fix showing KDF object attribute.
4294         + commit 8e01676981206c209c0bfcb92633d9d2f06a2d90
4295         * g10/call-agent.c (learn_status_cb): Parse the KDF DO.
4296         * g10/card-util.c (current_card_status): Show it correctly.
4297
4298 2019-07-22  NIIBE Yutaka  <gniibe@fsij.org>
4299
4300         gpg: The option --passphrase= can be empty.
4301         + commit b21133ba80f21ce93d5a4afe48027172d9fc1999
4302         * g10/gpg.c (opts): Use ARGPARSE_o_s for oPassphrase to allow
4303         empty string.
4304
4305 2019-07-16  NIIBE Yutaka  <gniibe@fsij.org>
4306
4307         dirmngr: Don't add system CAs for SKS HKPS pool.
4308         + commit 58e234fbeb6cc5908b69a73e50428f02e584e504
4309         * dirmngr/http.c [HTTP_USE_GNUTLS] (http_session_new): Clear
4310         add_system_cas.
4311
4312         gpg: Improve import slowness.
4313         + commit eb00a14f6d2de7c53487f39494c5cb9c0598fc96
4314         * g10/import.c (read_block): Avoid O(N^2) append.
4315         (sec_to_pub_keyblock): Likewise.
4316
4317         gpg: Fix keyring retrieval.
4318         + commit b7df72d3074b72cf8b537ac87416b6b719c1b1b7
4319         * g10/keyring.c (keyring_get_keyblock): Avoid O(N^2) append.
4320
4321 2019-07-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4322
4323         doc: fix spelling.
4324         + commit d10bb027e481b518e4bf13ba72d14933d6cbb8cb
4325         * doc/tools.texi: fix a handful of minor spelling errors.
4326
4327 2019-07-09  Werner Koch  <wk@gnupg.org>
4328
4329         Release 2.2.17.
4330         + commit 591523ec94b6279b8b39a01501d78cf980de8722
4331
4332
4333 2019-07-09  Ineiev  <ineiev@gnu.org>
4334
4335         po: Update Russian translation.
4336         + commit ad0c61972a413987d2cc8ac8deb6a646b954ae05
4337
4338
4339 2019-07-09  Werner Koch  <wk@gnupg.org>
4340
4341         gpg: Do not try the import fallback if the options are already used.
4342         + commit 3c2cf5ea952015a441ee5701c41dadc63be60d87
4343         * g10/import.c (import_one): Check options.
4344
4345         gpg: Fix regression in option "self-sigs-only".
4346         + commit b6effaf4669b2c3707932e3c5f2f57df886d759e
4347         * g10/import.c (read_block): Make sure KEYID is availabale also on a
4348         pending packet.
4349
4350 2019-07-05  Werner Koch  <wk@gnupg.org>
4351
4352         gpg: With --auto-key-retrieve prefer WKD over keyservers.
4353         + commit 3242837d203a7b90b92952e63ee160a5a41764c0
4354         * g10/mainproc.c (check_sig_and_print): Print a hint on how to make
4355         use of the preferred keyserver.  Remove keyserver lookup just by the
4356         keyid.  Try a WKD lookup before a keyserver lookup.
4357
4358         wkd: Change client/server limit back to 64 KiB.
4359         + commit 6396f8d115f21ae15571b683e9ac9d1d7e3f44f4
4360         * tools/wks-receive.c (decrypt_data): Change limit.
4361
4362 2019-07-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4363
4364         dirmngr: fix handling of HTTPS redirections during HKP.
4365         + commit efb6e08ea2ca1cf2d39135d94195802cd69b9ea6
4366         * dirmngr/ks-engine-hkp.c (send_request): Reinitialize HTTP session when
4367         following a HTTP redirection.
4368
4369 2019-07-04  Werner Koch  <wk@gnupg.org>
4370
4371         gpg: Add "self-sigs-only" and "import-clean" to the keyserver options.
4372         + commit 2b7151b0a57f5fe7d67fd76dfa1ba7a8731642c6
4373         * g10/gpg.c (main): Change default.
4374
4375         gpg: Avoid printing false AKL error message.
4376         + commit 4cbd058a3da9aae74aadab7f260952b9ebb5becf
4377         * g10/getkey.c (get_pubkey_byname): Add special traeatment for default
4378         and skipped-local.
4379
4380         gpg: New command --locate-external-key.
4381         + commit 46f3283b345e1cabca4b0320cf98274ade8ec162
4382         * g10/gpg.c (aLocateExtKeys): New.
4383         (opts): Add --locate-external-keys.
4384         (main): Implement that.
4385         * g10/getkey.c (get_pubkey_byname): Implement GET_PUBKEY_NO_LOCAL.
4386         (get_best_pubkey_byname): Add arg 'mode' and pass on to
4387         get_pubkey_byname.  Change callers.
4388         * g10/keylist.c (public_key_list): Add arg 'no_local'.
4389         (locate_one): Ditto.  Pass on to get_best_pubkey_byname.
4390
4391         gpg: Make the get_pubkey_byname interface easier to understand.
4392         + commit 11871433436b5b9b9aca46579dd185a9a77674cd
4393         * g10/keydb.h (enum get_pubkey_modes): New.
4394         * g10/getkey.c (get_pubkey_byname): Repalce no_akl by a mode arg and
4395         change all callers.
4396
4397 2019-07-03  Werner Koch  <wk@gnupg.org>
4398
4399         dirmngr: Avoid endless loop in case of HTTP error 503.
4400         + commit d2e8d71251813e61b15a07637497fabe823b822c
4401         * dirmngr/ks-engine-hkp.c (SEND_REQUEST_EXTRA_RETRIES): New.
4402         (handle_send_request_error): Use it for 503 and 504.
4403         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Pass a new var for
4404         extra_tries.
4405
4406         dirmngr: Do not rewrite the redirection for the "openpgpkey" subdomain.
4407         + commit c9b133a54e93b7f2365b5d6b1c39ec2cc6dac8f9
4408         * dirmngr/http.c (same_host_p): Consider certain subdomains to be the
4409         same.
4410
4411 2019-07-03  Peter Lebbing  <peter@digitalbrains.com>
4412
4413         Mention --sender in documentation.
4414         + commit 37b549dfe0acd362399debd7c93794eb75937402
4415
4416
4417 2019-07-03  Werner Koch  <wk@gnupg.org>
4418
4419         dirmngr: Support the new WKD draft with the openpgpkey subdomain.
4420         + commit 458973f502b9a43ecf29e804a2c0c86e78f5927a
4421         * dirmngr/server.c (proc_wkd_get): Implement new openpgpkey subdomain
4422         method.
4423
4424 2019-07-02  Werner Koch  <wk@gnupg.org>
4425
4426         gpg: Fallback to import with self-sigs-only on too large keyblocks.
4427         + commit a1f2f38dfb2ba5ed66d3aef66fc3be9b67f9b800
4428         * g10/import.c (import_one): Rename to ...
4429         (import_one_real): this.  Do not print and update stats on keyring
4430         write errors.
4431         (import_one): New.  Add fallback code.
4432
4433 2019-07-01  Werner Koch  <wk@gnupg.org>
4434
4435         gpg: New import and keyserver option "self-sigs-only"
4436         + commit adb120e663fc5e78f714976c6e42ae233c1990b0
4437         * g10/options.h (IMPORT_SELF_SIGS_ONLY): New.
4438         * g10/import.c (parse_import_options): Add option "self-sigs-only".
4439         (read_block): Handle that option.
4440
4441         gpg: Make read_block in import.c more flexible.
4442         + commit 15a425a1dfe60bd976b17671aa8e3d9aed12e1c0
4443         * g10/import.c: Change arg 'with_meta' to 'options'.  Change callers.
4444
4445 2019-07-01  NIIBE Yutaka  <gniibe@fsij.org>
4446
4447         tools: gpgconf: Killing order is children-first.
4448         + commit 526714806da4e50c8e683b25d76460916d58ff41
4449         * tools/gpgconf-comp.c (gc_component_kill): Reverse the order.
4450
4451 2019-06-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4452
4453         spelling: Fix "synchronize"
4454         + commit 520f5d70e4128b61c30da2a463f6c34ca24b628e
4455
4456
4457 2019-06-03  Werner Koch  <wk@gnupg.org>
4458
4459         Return better error code for some getinfo IPC commands.
4460         + commit f3251023750d6bd9023dbb8373c804d7d4540a56
4461         * agent/command.c (cmd_getinfo): Return GPG_ERR_FALSE as boolean False.
4462         * g13/server.c (cmd_getinfo): Ditto.
4463         * sm/server.c (cmd_getinfo): Ditto.
4464
4465 2019-05-29  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4466
4467         doc/wks.texi: fix typo.
4468         + commit 175d194b5d6063895ecfcfed6ed2154e4a0d1421
4469
4470
4471 2019-05-28  Werner Koch  <wk@gnupg.org>
4472
4473         Release GnuPG 2.2.16.
4474         + commit 3f2b7a53ddc43b3a349451d28691aaaa116786dc
4475
4476
4477         dirmngr: Allow for other hash algorithms than SHA-1 in OCSP.
4478         + commit 5281ecbe3ae8364407d9831243b81d664b040805
4479         * dirmngr/ocsp.c (do_ocsp_request): Remove arg md.  Add args r_sigval,
4480         r_produced_at, and r_md.  Get the hash algo from the signature and
4481         create the context here.
4482         (check_signature): Allow any hash algo.  Print a diagnostic if the
4483         signature does not verify.
4484
4485 2019-05-27  Werner Koch  <wk@gnupg.org>
4486
4487         sm: Avoid confusing diagnostic for the default key.
4488         + commit 32210e855c460ed60505bf9be9adea33d05c40eb
4489         * sm/certlist.c (cert_usage_p): Add arg 'silent' and change all
4490         callers.
4491         (gpgsm_cert_use_sign_p): Add arg 'silent' and pass to cert_usage_p.
4492         Change all callers.
4493         * sm/sign.c (gpgsm_get_default_cert): Set SILENT when calling
4494         gpgsm_cert_use_sign_p
4495
4496         gpg: Fixed i18n markup of some strings.
4497         + commit ab5d7142a79e92819f5551cfc424a8ceaf0885fa
4498         * g10/tofu.c: Removed some translation markups which either make no
4499         sense or are not possble.
4500
4501         gpg: Allow deletion of subkeys with --delete-[secret-]key.
4502         + commit d9b31d3a20b89a5ad7e9a2158b6da63a9a37fa8a
4503         * common/userids.c (classify_user_id): Do not set the EXACT flag in
4504         the default case.
4505         * g10/export.c (exact_subkey_match_p): Make static,
4506         * g10/delkey.c (do_delete_key): Implement subkey only deleting.
4507
4508 2019-05-27  NIIBE Yutaka  <gniibe@fsij.org>
4509
4510         agent: Stop scdaemon after reload when disable_scdaemon.
4511         + commit 9ccdd59e4e1e0b0e3b03b288f52f3c71e86a04dd
4512         * agent/call-scd.c (agent_card_killscd): New.
4513         * agent/gpg-agent.c (agent_sighup_action): Call agent_card_killscd.
4514
4515 2019-05-21  Werner Koch  <wk@gnupg.org>
4516
4517         gpg: Do not bail on an invalid packet in the local keyring.
4518         + commit 30f44957ccd1433846709911798af3da4e437900
4519         * g10/keydb.c (parse_keyblock_image): Treat invalid packet special.
4520
4521         gpg: Do not allow creation of user ids larger than our parser allows.
4522         + commit d32963eeb33fd3053d40a4e7071fb0e8b28a8651
4523         * g10/parse-packet.c: Move max packet lengths constants to ...
4524         * g10/packet.h: ... here.
4525         * g10/build-packet.c (do_user_id): Return an error if too data is too
4526         large.
4527         * g10/keygen.c (write_uid): Return an error for too large data.
4528
4529 2019-05-21  NIIBE Yutaka  <gniibe@fsij.org>
4530
4531         agent: For SSH key, don't put NUL-byte at the end.
4532         + commit 6e39541f4f488fe59eac399bad18c465f373a784
4533         * agent/command-ssh.c (ssh_key_to_protected_buffer): Update
4534         the length by the second call of gcry_sexp_sprint.
4535
4536 2019-05-20  Werner Koch  <wk@gnupg.org>
4537             Matheus Afonso Martins Moreira
4538
4539         gpg: Do not delete any keys if --dry-run is passed.
4540         + commit 5c46c5f74540ad753b925b74593332ca92de47fa
4541         * g10/delkey.c (do_delete_key): Don't delete the keyblock on dry runs.
4542         Do not clear the ownertrust.  Do not let the agent delete the key.
4543
4544 2019-05-17  Werner Koch  <wk@gnupg.org>
4545
4546         gpg: Fix using --decrypt along with --use-embedded-filename.
4547         + commit 1702179d91b7136661af084d7dab2e50a2857491
4548         * g10/options.h (opt): Add flags.dummy_outfile.
4549         * g10/decrypt.c (decrypt_message): Set this global flag instead of the
4550         fucntion local flag.
4551         * g10/plaintext.c (get_output_file): Ignore opt.output if that was
4552         used as a dummy option aslong with --use-embedded-filename.
4553
4554         gpg: Improve the photo image viewer selection.
4555         + commit cd5f040a5389944dd8a05bc9c938f888581dfc8a
4556         * g10/exec.c (w32_system): Add "!ShellExecute" special.
4557         * g10/photoid.c (get_default_photo_command): Use the new ShellExecute
4558         under Windows and fallbac to 'display' and 'xdg-open' in the Unix
4559         case.
4560         (show_photos): Flush stdout so that the output is shown before the
4561         image pops up.
4562
4563 2019-05-16  Werner Koch  <wk@gnupg.org>
4564
4565         kbx: Fix an endless loop under Windows due to an incomplete fix.
4566         + commit 0fff927889b075442ed7130f376118c31fda1f32
4567         * kbx/keybox-search.c (keybox_search):  We need to seek to the last
4568         position in all cases not just when doing a NEXT.
4569
4570         kbx: Fix deadlock in gpgsm on Windows due to a sharing violation.
4571         + commit 6f72aa821407e47ad3963e72e139f2ca2c69d9dd
4572         * kbx/keybox-init.c (keybox_lock) [W32]: Use _keybox_close_file
4573         instead of fclose so that a close is done if the file is opened by
4574         another handle.
4575         * kbx/keybox-search.c (keybox_search): Remember the last offset and
4576         use that in NEXT search mode if we had to re-open the file.
4577
4578         gpgconf: Before --launch check that the config file is fine.
4579         + commit 3a28706cfd960ff84dda9a22aa2f160b4c2efbb5
4580         * tools/gpgconf-comp.c (gc_component_launch): Check the conf file.
4581         * tools/gpgconf.c (gpgconf_failure): Call log_flush.
4582
4583 2019-05-15  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4584
4585         gpg: enable OpenPGP export of cleartext keys with comments.
4586         + commit 9c704d9d46338769a66bfc6c378efeda3c4bd9ec
4587         * g10/export.c (cleartext_secret_key_to_openpgp): ignore trailing
4588         sublists in private-key S-expression.
4589
4590 2019-05-15  Werner Koch  <wk@gnupg.org>
4591
4592         gpgconf: Support --homedir for --launch.
4593         + commit 31e26037bd727a6ee9c96ba168a55c4f9def43b6
4594         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Simplify because
4595         gnupg_homedir already returns abd absolute name.
4596         (scdaemon_runtime_change): Ditto.
4597         (dirmngr_runtime_change): Ditto.
4598         (gc_component_launch): Support --homedir.
4599
4600 2019-05-14  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4601
4602         agent: correct length for uri and comment on 64-bit big-endian platforms
4603         + commit 110932925ba8e0169da18d7774440f8d1fd8a344
4604         * agent/findkey.c (agent_public_key_from_file): pass size_t as int to
4605         gcry_sexp_build_array's %b.
4606
4607 2019-05-14  Werner Koch  <wk@gnupg.org>
4608
4609         gpg: Do not print a hint to use the deprecated --keyserver option.
4610         + commit 8d645f1d1f2b0f4e2d3b72f2a585acac4bdd8846
4611         * g10/keyserver.c (keyserver_search): Remove a specialized error
4612         message.
4613
4614 2019-05-14  NIIBE Yutaka  <gniibe@fsij.org>
4615
4616         g10: Fix possible null dereference.
4617         + commit 5b22d2c400890fc366ccb7ca74ee886d9cef22a3
4618         * g10/armor.c (armor_filter): Access ->d in the internal loop.
4619
4620         build: Update m4/iconv.m4.
4621         + commit cf73c82e95f999bd35636b0cf4e80ed5c33fa7a8
4622         * m4/iconv.m4: Update from gettext 0.20.1.
4623
4624 2019-05-13  Werner Koch  <wk@gnupg.org>
4625
4626         gpg: Change update_keysig_packet to replace SHA-1 by SHA-256.
4627         + commit c1dc7a832921fdf5686d377f33db78707c0345e2
4628         * g10/sign.c (update_keysig_packet): Convert digest algo when needed.
4629
4630 2019-05-12  Werner Koch  <wk@gnupg.org>
4631
4632         sm: Fix a warning in an es_fopencooie function.
4633         + commit 8d0d61aca3d2713df8a33444af3658b859d72be8
4634         * sm/certdump.c (format_name_writer): Take care of a flush request.
4635
4636 2019-05-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4637
4638         doc: correct documentation for gpgconf --kill.
4639         + commit be116f871dbf14dd44d3a7909c2a052f8979c480
4640         * doc/tools.texi(gpgconf): Correct documentation for gpgconf --kill.
4641
4642         (cherry picked from commit 9662538be6afc8beee0f2654f9a8f234c5dac016)
4643
4644 2019-05-09  Werner Koch  <wk@gnupg.org>
4645
4646         build: Sign all Windows binaries.
4647         + commit e6901c2bc802996c24335bcb35012ccb74b4ced0
4648         * build-aux/speedo.mk (AUTHENTICODE_SIGNHOST): New.
4649         (AUTHENTICODE_TOOL): New.
4650         (AUTHENTICODE_FILES): New.
4651         (installer): Sign listed files.
4652         (AUTHENTICODE_SIGNHOST): New macro.
4653         (sign-installer): Use that macro instead of direct use of osslsigncode.
4654
4655 2019-05-03  Werner Koch  <wk@gnupg.org>
4656
4657         gpg: Use just the addrspec from the Signer's UID.
4658         + commit 05204b72497db093f5d2da4a2446c0264a946296
4659         * g10/parse-packet.c (parse_signature): Take only the addrspec from a
4660         Signer's UID subpacket.
4661
4662 2019-04-23  NIIBE Yutaka  <gniibe@fsij.org>
4663
4664         po: Update Japanese Translation.
4665         + commit caa61fb7da6b858f038dde948d36fce5c0a85ee5
4666
4667
4668 2019-04-18  Andre Heinecke  <aheinecke@intevation.de>
4669
4670         g10: Fix double free when locating by mbox.
4671         + commit 35899dc2903b118620e6f9f0fa6b21c8568abbf1
4672         * g10/getkey.c (get_best_pubkey_byname): Set new.uid always
4673         to NULL after use.
4674
4675 2019-04-16  NIIBE Yutaka  <gniibe@fsij.org>
4676
4677         common: Fix AWK portability.
4678         + commit ee766b2b5d646643d66d23eae478f71c0a01a343
4679         * common/Makefile.am: Use pkg_namespace.
4680         * common/mkstrtable.awk: Use pkg_namespace.  Regexp fix.
4681
4682 2019-04-11  Werner Koch  <wk@gnupg.org>
4683
4684         gpg: Accept also armored data from the WKD.
4685         + commit dc4c7f65e32a0cddc075d06fa0132e099bcb6455
4686         * g10/keyserver.c (keyserver_import_wkd): Clear NO_ARMOR.
4687
4688         gpg: Set a limit of 5 to the number of keys imported from the WKD.
4689         + commit e9fcb0361ab4ef1f6fb0ea235f1b15667932aba2
4690         * g10/import.c (import): Limit the number of considered keys to 5.
4691         (import_one): Return the first fingerprint in case of WKD.
4692
4693 2019-04-02  Werner Koch  <wk@gnupg.org>
4694
4695         scd: Add dummy option --application-priority.
4696         + commit cb2065967465939f82cc585254cae0244ed94eac
4697
4698
4699         dirmngr: Improve domaininfo cache update algorithm.
4700         + commit 48e7977709b6a56e8fd8e9f5abb9dba5ea617c33
4701         * dirmngr/domaininfo.c (struct domaininfo_s): Add field keepmark.
4702         (insert_or_update): Implement new update algorithm.
4703
4704         dirmngr: Better error code for http status 413.
4705         + commit 0a30ce036a615bc95382e0640d185b031f8c6a63
4706         * dirmngr/ks-engine-hkp.c (send_request): New case for 413.
4707         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
4708         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
4709
4710 2019-04-01  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4711
4712         NEWS: correct typo in header.
4713         + commit 5b1b5be65f343d252c865d705d23b55982718f2d
4714
4715
4716 2019-03-27  NIIBE Yutaka  <gniibe@fsij.org>
4717
4718         g10: Fix symmetric cipher algo constant for ECDH.
4719         + commit 38c2a9a644e0bc1e2594ea437a5930982f7b8c4e
4720         * g10/ecdh.c (kek_params_table): Use CIPHER_ALGO_AES192 for
4721         ECC strength 384, according to RFC-6637.
4722
4723 2019-03-27  Trevor Bentley  <trevor@yubico.com>
4724
4725         gpg: Don't use EdDSA algo ID for ECDSA curves.
4726         + commit 2f455d18ab99a1d94029d3f607ae918bd5c9fecf
4727         * g10/keygen.c (ask_curve): Change algo ID to ECDSA if it changed from
4728         an EdDSA curve.
4729
4730 2019-03-26  Werner Koch  <wk@gnupg.org>
4731
4732         Release 2.2.15.
4733         + commit dc93e57226db32d5b90884dcf768d271baa6628a
4734
4735
4736         sm: Allow decryption even if expired other keys are configured.
4737         + commit 30972d21824264aef2088d30b4f2e5ce3aca889e
4738         * sm/gpgsm.c (main): Add special handling for bad keys in decrypt
4739         mode.
4740
4741         agent: Allow other ssh fingerprint algos in KEYINFO.
4742         + commit 1c2fa8b6d747aa171bfef35a50754893aa80a562
4743         * agent/command.c (cmd_keyinfo): Allow for --ssh-fpr=ALGO.  Default to
4744         the standard algo.
4745
4746 2019-03-25  Werner Koch  <wk@gnupg.org>
4747
4748         wkd: New command --print-wkd-url for gpg-wks-client.
4749         + commit 2f3eebf1865a85f8c09a1c052513260ed55acec6
4750         * tools/gpg-wks-client.c (aPrintWKDURL): New.
4751         (opts): Add option.
4752         (main): Implement.
4753         * tools/wks-util.c (wks_cmd_print_wkd_url): New.
4754
4755 2019-03-25  NIIBE Yutaka  <gniibe@fsij.org>
4756
4757         libdns: Don't use _[A-Z] which are reserved names.
4758         + commit a975fd127a5d58bbbb3c585e610a54daeb423af6
4759         * dirmngr/dns.c: Use the identifiers of "*_instance" instead of
4760         reserved "_[A-Z]".
4761
4762 2019-03-25  Werner Koch  <wk@gnupg.org>
4763
4764         wkd: New command --print-wkd-hash for gpg-wks-client.
4765         + commit 64621f1f40c31c7f453da98efb860ff8cf11edbc
4766         * tools/gpg-wks-client.c (aPrintWKDHash): New.
4767         (opts) : Add "--print-wkd-hash".
4768         (main): Implement that command.
4769         (proc_userid_from_stdin): New.
4770         * tools/wks-util.c (wks_fname_from_userid): Add option HASH_ONLY.
4771         (wks_cmd_print_wkd_hash): New.
4772
4773 2019-03-25  Andre Heinecke  <aheinecke@gnupg.org>
4774
4775         sm, w32: Translate logger and status fd to handles.
4776         + commit b9d2759da19cb70c1f6243498480bea1d7ecaa46
4777         * sm/gpgsm.c (main): Call translate_sys2libc_fd_int to
4778         convert the FDs.
4779
4780 2019-03-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4781
4782         doc: fix formatting error.
4783         + commit 93782de23fe45e7f7f86140fda6de39395c3a9d8
4784
4785
4786 2019-03-19  Werner Koch  <wk@gnupg.org>
4787
4788         Release 2.2.14.
4789         + commit 813de13e73b01409fabff9859f24c4f23b808796
4790
4791
4792 2019-03-18  Ineiev  <ineiev@gnu.org>
4793
4794         po: Update Russian translation.
4795         + commit dc00947b21dcd4417a35da711c884cef5cc9fc7d
4796
4797
4798 2019-03-18  Werner Koch  <wk@gnupg.org>
4799
4800         gpg: Do not bail out on v5 keys in the local keyring.
4801         + commit de70a2f377c1647417fb8a2b6476c3744a901296
4802         * g10/parse-packet.c (parse_key): Return GPG_ERR_UNKNOWN_VERSION
4803         instead of invalid packet.
4804         * g10/keydb.c (parse_keyblock_image): Do not map the unknown version
4805         error to invalid keyring.
4806         (keydb_search): Skip unknown version errors simlar to legacy keys.
4807         * g10/keyring.c (keyring_rebuild_cache): Skip keys with unknown
4808         versions.
4809         * g10/import.c (read_block): Handle unknown version.
4810
4811         gpg: Allow import of PGP desktop exported secret keys.
4812         + commit 0e73214dd208fca4df26ac796416c6f25b3ae50d
4813         * g10/import.c (NODE_TRANSFER_SECKEY): New.
4814         (import): Add attic kludge.
4815         (transfer_secret_keys): Add arg only_marked.
4816         (resync_sec_with_pub_keyblock): Return removed seckeys via new arg
4817         r_removedsecs.
4818         (import_secret_one): New arg r_secattic.  Change to take ownership of
4819         arg keyblock.  Implement extra secret key import logic.  Factor some
4820         code out to ...
4821         (do_transfer): New.
4822         (import_matching_seckeys): New.
4823
4824         gpg: Avoid importing secret keys if the keyblock is not valid.
4825         + commit 43b23aa82be7e02414398af506986b812e2b9349
4826         * g10/keydb.h (struct kbnode_struct): Replace unused field RECNO by
4827         new field TAG.
4828         * g10/kbnode.c (alloc_node): Change accordingly.
4829         * g10/import.c (import_one): Add arg r_valid.
4830         (sec_to_pub_keyblock): Set tags.
4831         (resync_sec_with_pub_keyblock): New.
4832         (import_secret_one): Change return code to gpg_error_t.   Return an
4833         error code if sec_to_pub_keyblock failed.  Resync secret keyblock.
4834
4835         gpg: During secret key import print "sec" instead of "pub".
4836         + commit db2d75f1ffede2ea77163b487a15e60249daffa0
4837         * g10/keyedit.c (show_basic_key_info): New arg 'print_sec'.  Remove
4838         useless code for "sub" and "ssb".
4839         * g10/import.c (import_one): Pass FROM_SK to show_basic_key_info.  Do
4840         not print the first  keyinfo in FROM_SK mode.
4841         printing.
4842
4843         gpg: Simplify an interactive import status line.
4844         + commit 184fbf014ae537554d6939a47f07977ef0b0fe9f
4845         * g10/cpr.c (write_status_printf): Escape CR and LF.
4846         * g10/import.c (print_import_check): Simplify by using
4847         write_status_printf and hexfingerprint.
4848
4849
4850         Fixed one conlict in a comment.
4851
4852 2019-03-07  NIIBE Yutaka  <gniibe@fsij.org>
4853
4854         libdns: Avoid using compound literals (8).
4855         + commit ee08a15e31284d32fb59774fc15e39107a727072
4856         * dirmngr/dns.h (dns_quietinit): Remove.
4857         (dns_hints_i_new): Remove.
4858
4859         libdns: Avoid using compound literals (7).
4860         + commit 4ab0fef5dc856d1f2747efab584182aa880f631c
4861         * dirmngr/dns.h (DNS_OPTS_INIT, dns_opts): Remove.
4862         * dirmngr/dns-stuff.c (libdns_res_open): Use zero-ed, and initialized
4863         automatic variable for opts.
4864         * dirmngr/dns.c (send_query, resolve_query, resolve_addrinfo):
4865         Likewise.
4866
4867         libdns: Avoid using compound literals (6).
4868         + commit f3af1707690b070b4cbf6d761a9e5dbddbf681e9
4869         * dirmngr/dns.h (dns_rr_i_new): Remove.
4870         (dns_rr_i_init): Remove unused second argument.
4871         * dirmngr/dns.c (dns_p_dump, dns_hints_query, print_packet)
4872         (parse_packet): Use automatic variable for struct dns_rr_i.
4873         (dns_d_cname): No need to call dns_rr_i_init after memset 0.
4874         (dns_rr_i_init): Remove unused second argument.  Return nothing.
4875         * dirmngr/dns-stuff.c (resolve_addr_libdns, get_dns_cert_libdns)
4876         (getsrv_libdns): Follow the change of dns_rr_i_init.
4877
4878         (cherry picked from commit 6501e59d3685bb58753c9caea729a4b0eca3942a)
4879
4880         libdns: Avoid using compound literals (5).
4881         + commit 500151e6daf5fc4d6ea382b83aab3cca72b27881
4882         * dirmngr/dns.h (dns_rr_foreach): Don't use dns_rr_i_new.
4883         Call dns_rr_grep with NULL.
4884         * dirmngr/dns.c (dns_rr_grep): Support NULL for error_.
4885
4886         libdns: Avoid using compound literals (4).
4887         + commit 229302aecf8deea0349e79ca0cc05f32665391b7
4888         * dirmngr/dns.h (dns_d_new*): Remove.
4889         * dirmngr/dns.c (parse_packet): Use dns_d_init with automatic
4890         variable.
4891         (parse_domain): Likewise.
4892
4893         (cherry picked from commit 7313a112f9c7ada61d24285313d2e2d069a672e8)
4894
4895         libdns: Avoid using compound literals (3).
4896         + commit f0de4fc990767ae5d120a523be51616b0f35f4f6
4897         * dirmngr/dns.h (dns_p_new): Remove.
4898         * dirmngr/dns.c (dns_hosts_query): Use dns_p_init with automatic
4899         variable.
4900         (dns_hints_query, dns_res_glue, parse_packet, query_hosts)
4901         (send_query, show_hints, echo_port): Likewise.
4902
4903         libdns: Avoid using compound literals (2).
4904         + commit ff7d01fc6d396fc3b8d37baa9bd4cdebc8853648
4905         * dirmngr/dns.h (dns_strsection1, dns_strsection3): Remove.
4906         (dns_strclass1, dns_strclass3): Remove.
4907         (dns_strtype1, dns_strtype3): Remove.
4908         (dns_strsection, dns_strclass, dns_strtype): Directly use the
4909         function.
4910         * dirmngr/dns.c (dns_strsection): Use automatic variable.
4911         (dns_strclass, dns_strtype): Likewise.
4912
4913         (cherry picked from commit 455ef62d29a112de05897139716265d07e4c6ae3)
4914
4915         libdns: Avoid using compound literals.
4916         + commit 1318d1e2d50989c66f496ede906a846859f0cf9f
4917         * dirmngr/dns.c (dns_inet_pton, dns_so_tcp_keep): Use automatic
4918         variables.
4919         (dns_poll, dns_send_nopipe): Likewise, adding const qualifier.
4920
4921 2019-03-07  Werner Koch  <wk@gnupg.org>
4922
4923         dirmngr: Add CSRF protection exception for protonmail.
4924         + commit 557c721e787e7e6d311ccb48d8aa677123061cf5
4925         * dirmngr/http.c (same_host_p): Add exception table.
4926
4927         gpgtar: Make option -C work for archive creation.
4928         + commit 5d73c231e4f2d5994eb3be48b36517e39d66be96
4929         * tools/gpgtar-create.c (gpgtar_create): Switch to the -C directory.
4930
4931         gpgtar: Improve error messages.
4932         + commit 2e4151a3412c3fc553fbb7ad070dfffc68a04b35
4933         * tools/gpgtar.h (struct tarinfo_s): New.
4934         * tools/gpgtar.c (cmd, skip_crypto, files_from, null_names): Move
4935         global vars more to the top.
4936         (set_cmd): Rename 'cmd' to 'c'.
4937         * tools/gpgtar-list.c (parse_header): Add arg 'info' and improve error
4938         messages.
4939         (read_header): Add arg 'info' and update counter.
4940         (skip_data): Ditto.
4941         (gpgtar_list): Pass info object to read functions.
4942         (gpgtar_read_header): Add arg 'info'.
4943         * tools/gpgtar-extract.c (gpgtar_extract): add arg 'info' and pass on.
4944         (extract_regular): Add arg 'info' and update counter.
4945
4946         gpg: Make invalid primary key algos obvious in key listings.
4947         + commit d2a7f9078a4673ec53733e4f69fd17a8f1ac962d
4948         * g10/keylist.c (print_key_line): Print a warning for invalid algos.
4949
4950         sm: Print Yubikey attestation extensions with --dump-cert.
4951         + commit b3c8ce9e4343f1b68b9ba94bdd71b7d8e13b139a
4952         * sm/keylist.c (oidtranstbl): Add Yubikey OIDs.
4953         (OID_FLAG_HEX): New.
4954         (print_hex_extn): New.
4955         (list_cert_raw): Make use of that flag.
4956
4957         (cherry picked from commit 86c241a8c9a952ea8007066b70b04f435e2e483e)
4958
4959 2019-03-07  NIIBE Yutaka  <gniibe@fsij.org>
4960
4961         tests: Add "disable-scdaemon" in gpg-agent.conf.
4962         + commit 150d5452318eafa6aa800ff3b87f8f8eb35ed203
4963         * tests/openpgp/defs.scm: Add "disable-scdaemon".  Remove
4964           "scdaemon-program".
4965         * tests/gpgme/gpgme-defs.scm, tests/gpgsm/gpgsm-defs.scm: Likewise.
4966         * tests/inittests, tests/pkits/inittests: Add "disable-scdaemon"
4967
4968 2019-03-07  Werner Koch  <wk@gnupg.org>
4969
4970         scd: Fix flushing of CA-FPR data objects.
4971         + commit e7eafe10197557ce874db2f049d683f90f26e0bc
4972         * scd/app-openpgp.c (do_setattr): Add new table item to flush a
4973         different tag.
4974
4975 2019-03-07  NIIBE Yutaka  <gniibe@fsij.org>
4976
4977         agent: Support --mode=ssh option for CLEAR_PASSPHRASE.
4978         + commit 77a285a0a94994ee9b42289897f9bf3075c7192d
4979         * agent/command.c (cmd_clear_passphrase): Add support for SSH.
4980
4981 2019-03-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4982
4983         gpgv: Improve documentation for keyring choices.
4984         + commit a7b2a87f940dba078867c44f1f50d46211d51719
4985         * doc/gpgv.texi: Improve documentation for keyring choices
4986
4987 2019-02-28  Werner Koch  <wk@gnupg.org>
4988
4989         sm: Don't mark a cert as de-vs compliant if it leads to SHA-1 sigs.
4990         + commit be69bf0cbd11cb8c0d452e07066669aacc6caafa
4991         * sm/keylist.c (print_compliance_flags): Also check the digest_algo.
4992         Add new arg 'cert'.
4993
4994 2019-02-28  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
4995
4996         gpgsm: default to 3072-bit keys.
4997         + commit 121286d9d1506dbaad9ba33bae2e459814fe5849
4998         * doc/gpgsm.texi, doc/howto-create-a-server-cert.texi: : update
4999         default to 3072 bits.
5000         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): update default to
5001         3072 bits.
5002         * sm/certreqgen.c (proc_parameters): update default to 3072 bits.
5003         * sm/gpgsm.c (main): print correct default_pubkey_algo.
5004
5005 2019-02-26  Werner Koch  <wk@gnupg.org>
5006
5007         conf: New option --show-socket.
5008         + commit 92e26ade5c0d52f2e50eaf338a0bb8006e75711c
5009         * tools/gpgconf-comp.c (gc_component_t): Move this enum to ...
5010         * tools/gpgconf.h: here.
5011         * tools/gpgconf.c (oShowSocket): New.
5012         (opts): Add new option.
5013         (main): Implement new option.
5014
5015 2019-02-25  Werner Koch  <wk@gnupg.org>
5016
5017         scd: Don't let the "undefined" app cause a conflict error.
5018         + commit 0eb8095626be71160dfa66284a7b0a6a57cb03e3
5019         * scd/app.c (check_conflict): Ignore "undefined".
5020
5021         (cherry picked from commit 5ecc7a02609dde65096ddb12e0ff8f6bce3b774a)
5022
5023         sm: Fix certificate creation with key on card.
5024         + commit 54c56230e305a38d6fd0c3bf1262172fd5fbcb87
5025         * sm/certreqgen.c (create_request): Fix for certmode.
5026
5027         agent: Fix for suggested Libgcrypt use.
5028         + commit 0a95b153811f36739d1b20f23920bad0bb07c68b
5029         * agent/divert-scd.c (divert_pkdecrypt): Skip a flags parameter.
5030
5031 2019-02-25  NIIBE Yutaka  <gniibe@fsij.org>
5032
5033         gpgscm: Build well even if NDEBUG defined.
5034         + commit 8161afb9dddaba839be92fbe9d85c05235eda825
5035         * gpgscm/scheme.c (gc_reservation_failure): Fix adding ";".
5036         [!NDEBUG] (scheme_init_custom_alloc): Don't init seserved_lineno.
5037
5038 2019-02-19  Neal H. Walfield  <neal@g10code.com>
5039
5040         gpg: Fix comparison.
5041         + commit 14e5435afb50dc9a9243ff3e0aed5030beba2914
5042         * g10/gpgcompose.c (literal_name): Complain if passed zero arguments,
5043         not one or fewer.
5044
5045 2019-02-19  NIIBE Yutaka  <gniibe@fsij.org>
5046
5047         agent: Fix cancellation handling for scdaemon.
5048         + commit 005e951714ff62087b8c8802e05d14b7998826f3
5049         * agent/call-scd.c (cancel_inquire): Remove.
5050         (agent_card_pksign, agent_card_pkdecrypt, agent_card_writekey)
5051         (agent_card_scd): Don't call cancel_inquire.
5052
5053         scd: Distinguish cancel by user and protocol error.
5054         + commit 90e5f49b6a2e002d3c67a041a076f07aeb7a7f54
5055         * scd/apdu.h (SW_HOST_CANCELLED): New.
5056         * scd/apdu.c (host_sw_string): Support SW_HOST_CANCELLED.
5057         (pcsc_error_to_sw): Return SW_HOST_CANCELLED for PCSC_E_CANCELLED.
5058         * scd/iso7816.c (map_sw): Return GPG_ERR_INV_RESPONSE for
5059         SW_HOST_ABORTED and GPG_ERR_CANCELED for SW_HOST_CANCELLED.
5060
5061         common: Fix gnupg_wait_processes.
5062         + commit 6e422b5135c71f8fa859a3f4de51bf89e3ff5ac6
5063         * common/exechelp-posix.c (gnupg_wait_processes): Loop for r_exitcodes
5064         even if we already see an error.
5065
5066 2019-02-14  Ingvar Hagelund  <ingvar@redpill-linpro.com>
5067
5068         po: Correct a simple typo in the Norwegian translation.
5069         + commit a09bba976d2f5694011a9291189a70a0f3c4caae
5070
5071
5072 2019-02-12  Werner Koch  <wk@gnupg.org>
5073
5074         Release 2.2.13.
5075         + commit 7922e2dd1c7eee48a8a2cf4799827942489ddd0f
5076
5077
5078 2019-02-11  Werner Koch  <wk@gnupg.org>
5079
5080         sm: In --gen-key with "key from card" show also the algorithm.
5081         + commit d1bee9d1efa28fa9d35b7eed1e616c6362fd044e
5082         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Get and show algo.
5083
5084         common: Provide function to get public key algo names in our format.
5085         + commit d29d73264f607642281fb701a17015306c8fc4d7
5086         * common/sexputil.c (pubkey_algo_string): New.
5087
5088         common: New functions get_option_value and ascii_strupr.
5089         + commit ee8d1a9e6c09b3ecc4b46f47b79358f78d458916
5090         * common/server-help.c (get_option_value): New.
5091         * common/stringhelp.c (ascii_strupr): New.
5092
5093         scd: Make app_genkey and supporting ISO function more flexible.
5094         + commit 14816c798099925e47908e7ce415412d72fbe28e
5095         * scd/app.c (app_genkey): Add arg keytype.
5096         * scd/app-common.h (struct app_ctx_s): Fitto for the genkey member.
5097         * scd/command.c (cmd_genkey): Adjust for change.
5098         * scd/iso7816.c (do_generate_keypair): Replace arg read_only by new
5099         args p1 and p2.
5100         (iso7816_read_public_key): Adjust for this.
5101         (iso7816_generate_keypair): Add new args p1 and p2.
5102         * scd/app-openpgp.c (do_genkey): Adjust for changes.
5103
5104         scd: Fix parameter name of app_change_key.
5105         + commit c075274aac0ffd388df638548b75a7d90e7e929d
5106         * scd/app-common.h (APP_GENKEY_FLAG_FORCE): New.
5107         * scd/app.c (app_change_pin): Rename arg reset_mode to flags and
5108         change from int to unsigned int.
5109
5110         scd: Allow standard keyref scheme for app-openpgp.
5111         + commit 6651a0640d0f1b4dd161210dc55974d9b93b7253
5112         * scd/app-openpgp.c (do_change_pin): Allow prefixing the CHVNO with
5113         "OPENPGP."
5114
5115         gpg: Emit an ERROR status if no key was found with --list-keys.
5116         + commit 14ea581a1c040b53b0ad4c51136a7948363b1e4b
5117         * g10/keylist.c (list_one): Emit status line.
5118
5119 2019-02-06  NIIBE Yutaka  <gniibe@fsij.org>
5120
5121         po: Update Japanese translation.
5122         + commit c16685b2f5021105ef0560cb3db68ef43bcdb9c1
5123
5124
5125         agent: Clear bogus pinentry cache, when it causes an error.
5126         + commit 9109bb9919f84d5472b7e62e84b961414a79d3c2
5127         * agent/agent.h (PINENTRY_STATUS_*): Expose to public.
5128         (struct pin_entry_info_s): Add status.
5129         * agent/call-pinentry.c (agent_askpin): Clearing the ->status
5130         before the loop, let the assuan_transact set ->status.  When
5131         failure with PINENTRY_STATUS_PASSWORD_FROM_CACHE, it returns
5132         soon.
5133         * agent/findkey.c (unprotect): Clear the pinentry cache,
5134         when it causes an error.
5135
5136         dirmngr: Fix initialization of assuan's nPth hook.
5137         + commit 7f4c3eb0a039621c564b6095ab5f810524843157
5138         * dirmngr/dirmngr.c (main): Move assuan_set_system_hooks to...
5139         (thread_init): ... here.
5140
5141 2019-01-30  Werner Koch  <wk@gnupg.org>
5142
5143         gpg: Allow generating Ed25519 key from an existing key.
5144         + commit 31d2a1eecaee766919b18bc42b918d9168f601f8
5145         * g10/misc.c (map_pk_gcry_to_openpgp): Add EdDSA mapping.
5146
5147 2019-01-29  Werner Koch  <wk@gnupg.org>
5148
5149         gpg: Implement searching keys via keygrip.
5150         + commit 5e5f3ca0c2e08185a236b4d04b318f81004e3223
5151         * kbx/keybox-defs.h (struct _keybox_openpgp_key_info): Add field grip.
5152         * kbx/keybox-openpgp.c (struct keyparm_s): New.
5153         (keygrip_from_keyparm): New.
5154         (parse_key): Compute keygrip.
5155         * kbx/keybox-search.c (blob_openpgp_has_grip): New.
5156         (has_keygrip): Call it.
5157
5158         common: Provide some convenient OpenPGP related constants.
5159         + commit b78f293cf06f447d1d0a5c416ac129a4e1cf9f8c
5160         * common/openpgpdefs.h (OPENPGP_MAX_NPKEY): New.
5161         (OPENPGP_MAX_NSKEY): New.
5162         (OPENPGP_MAX_NSIG): New.
5163         (OPENPGP_MAX_NENC): New.
5164         * g10/packet.h: Define PUBKEY_MAX using the new consts.
5165
5166         (cherry picked from commit f382984966a31a4cbe572bce5370590c5490ed1e)
5167
5168         common: New helper functions for OpenPGP curve OIDs.
5169         + commit dddbb26155f292fde2909ecc84b62b693b6dea49
5170         * common/openpgp-oid.c (openpgp_oidbuf_to_str): Factor most code out
5171         to ...
5172         (openpgp_oidbuf_to_str): new.
5173         (openpgp_oidbuf_is_ed25519): New.
5174         (openpgp_oidbuf_is_cv25519): New.
5175
5176 2019-01-22  Werner Koch  <wk@gnupg.org>
5177
5178         scd: Add option --clear to PASSWD.
5179         + commit d4082ff430afe670510d2c1c7ea66ee9ddcbe505
5180         * scd/command.c (cmd_passwd): Add option --clear.
5181         (send_status_printf): New.
5182         * scd/app-common.h (APP_CHANGE_FLAG_CLEAR): New.
5183         * scd/app-nks.c (do_change_pin): Return an error if that option is
5184         used.
5185         * scd/app-openpgp.c (do_change_pin): Ditto.
5186
5187         scd: One new and one improved 7816 function.
5188         + commit 9309175de8c76de44021c25c7885355ff1a9b67b
5189         * scd/apdu.c (apdu_send_direct): New arg R_SW.
5190         * scd/command.c (cmd_apdu): Ditto.
5191         * scd/iso7816.c (iso7816_apdu_direct): New arg R_SW.
5192         (iso7816_general_authenticate): New.
5193         * scd/app-nks.c (get_chv_status, get_nks_version): Pass NULL for new
5194         arg.
5195
5196         ssh: Simplify the curve name lookup.
5197         + commit 11a65159f997ccd69ecb9d867c1f3d0c4d8837d6
5198         * agent/command-ssh.c (struct ssh_key_type_spec): Add field
5199         alt_curve_name.
5200         (ssh_key_types): Add some alternate curve names.
5201         (ssh_identifier_from_curve_name): Lookup also bey alternative names
5202         and return the canonical name.
5203         (ssh_key_to_blob): Simplify the ECDSA case by using gcry_pk_get_curve
5204         instead of the explicit mapping.
5205         (ssh_receive_key): Likewise.  Use ssh_identifier_from_curve_name to
5206         validate the curve name.  Remove the reverse mapping because since
5207         GnuPG-2.2 Libgcrypt 1.7 is required.
5208         (ssh_handler_request_identities): Log an error message.
5209
5210         gpg: Stop early when trying to create a primary Elgamal key.
5211         + commit f5d3b982e44c5cfc60e9936020102a598b635187
5212         * g10/misc.c (openpgp_pk_test_algo2): Add extra check.
5213
5214 2019-01-17  NIIBE Yutaka  <gniibe@fsij.org>
5215
5216         scd: Fix for USB INTERRUPT transfer.
5217         + commit 9dc76d599cd4c86d3c187d078daad1144a92564c
5218         * scd/ccid-driver.c (intr_cb): When LIBUSB_TRANSFER_NO_DEVICE,
5219         just handle this event as failure.
5220
5221 2018-12-19  NIIBE Yutaka  <gniibe@fsij.org>
5222
5223         agent: Fix message for ACK button.
5224         + commit 80a08b655f8f5e7a7d78b766f1770fd474081a48
5225         * agent/divert-scd.c (getpin_cb): Display correct message.
5226
5227 2018-12-18  Werner Koch  <wk@gnupg.org>
5228
5229         Silence compiler warnings new with gcc 8.
5230         + commit 21fc089148678f59edb02e0e16bed65b709fb972
5231         * dirmngr/dns.c: Include gpgrt.h.  Silence -Warray-bounds also gcc.
5232         * tests/gpgscm/scheme.c: Include gpgrt.h.
5233         (Eval_Cycle): Ignore -Wimplicit-fallthrough.
5234
5235         wks: Do not use compression for the encrypted data.
5236         + commit 16424d8a34c7f6af1071fd19dfc180cb7d17c052
5237         * tools/gpg-wks-client.c (encrypt_response): Add arg -z0.
5238         * tools/gpg-wks-server.c (encrypt_stream): Ditto.
5239
5240 2018-12-18  NIIBE Yutaka  <gniibe@fsij.org>
5241
5242         po: Update Japanese translation.
5243         + commit ae9159e0685098ee97d6f526666524423f4a0fff
5244
5245
5246         scd: Support "acknowledge button" feature.
5247         + commit ffe31f405f9b5e4929e95c3d66c613052cb7727e
5248         * scd/apdu.c (set_prompt_cb): New member function.
5249         (set_prompt_cb_ccid_reader): New function.
5250         (open_ccid_reader): Initialize with set_prompt_cb_ccid_reader.
5251         (apdu_set_prompt_cb): New.
5252         * scd/app.c (lock_app, unlock_app): Add call to apdu_set_prompt_cb.
5253         * ccid-driver.c (ccid_set_prompt_cb): New.
5254         (bulk_in): Call ->prompt_cb when timer extension.
5255         * scd/command.c (popup_prompt): New.
5256
5257         agent: Support --ack option for POPUPPINPADPROMPT.
5258         + commit e6be36ee8854dc343a5e0f914991da3da360b513
5259         * agent/divert-scd.c (getpin_cb): Support --ack option.
5260
5261 2018-12-14  Werner Koch  <wk@gnupg.org>
5262
5263         Release 2.2.12.
5264         + commit 7d8f4ee7cf56eda988acdc909160cbac71bff18a
5265
5266
5267 2018-12-11  Werner Koch  <wk@gnupg.org>
5268
5269         agent: Make the S2K calibration time runtime configurable.
5270         + commit de29a50e7c8a779ac0832a149bcf3eb2c4191dc9
5271         * agent/protect.c (s2k_calibration_time): New file global var.
5272         (calibrate_s2k_count): Use it here.
5273         (get_calibrated_s2k_count): Replace function static var by ...
5274         (s2k_calibrated_count): new file global var.
5275         (set_s2k_calibration_time): New function.
5276         * agent/gpg-agent.c (oS2KCalibration): New const.
5277         (opts): New option --s2k-calibration.
5278         (parse_rereadable_options): Parse that option.
5279
5280 2018-12-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
5281
5282         agent: compile-time configuration of s2k calibration.
5283         + commit 0cf0f3aaf835d29848f1485df357606254ba6fad
5284         * configure.ac: add --with-agent-s2k-calibration=MSEC, introduces
5285         AGENT_S2K_CALIBRATION (measured in milliseconds)
5286         * agent/protect.c (calibrate_s2k_count): Calibrate based on
5287         AGENT_S2K_CALIBRATION.
5288
5289         (cherry picked from commit 926d07c5fa05de05caef3a72b6fe156606ac0549)
5290
5291 2018-12-11  Werner Koch  <wk@gnupg.org>
5292
5293         dirmngr: Retry another server from the pool on 502, 503, 504.
5294         + commit e5abdb6da7fa7cd4d146c7285b160277511bc230
5295         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Add arg
5296         http_status and handle it.
5297         (ks_hkp_search): Get http_status froms end_request and pass on to
5298         handle_send_request_error.
5299         (ks_hkp_get): Ditto.
5300         (ks_hkp_put): Ditto.
5301
5302         dirmngr: New function http_status2string.
5303         + commit b9d71ea64a694582739c18cfef9621b36d5371e9
5304         * dirmngr/http.c (http_status2string): New.
5305
5306         gpg: In search-keys return "Not found" instead of "No Data".
5307         + commit f7ff25edadd474f83fccba6fd3c410eb8358bb22
5308         * g10/keyserver.c (keyserver_search): Check for NO_DATA.
5309
5310 2018-12-11  Tomi Leppänen  <tomi.leppanen@jolla.com>
5311
5312         tools: Use POSIX compatible arguments for find.
5313         + commit dfcc5e6d3ec91f547feb78e442946e729b49878c
5314         * tools/addgnupghome (filelist): Remove bashism.
5315
5316 2018-12-06  NIIBE Yutaka  <gniibe@fsij.org>
5317
5318         scd: Make "learn" report about KDF data object.
5319         + commit d4bc8051525a33b28b1e33daf35d79c1d6cd9c41
5320         * scd/app-openpgp.c (do_learn_status): Report KDF attr.
5321         * g10/card-util.c (current_card_status): Output KDF for with_colons.
5322
5323         card: Display if KDF is enabled or not.
5324         + commit 751ff784e5316470f266750d299ae857ad7840d8
5325         * g10/call-agent.h (kdf_do_enabled): New field.
5326         * g10/call-agent.c (learn_status_cb): Set kdf_do_enabled if available.
5327         * g10/card-util.c (current_card_status): Inform the availability.
5328
5329         g10: Fix memory leak for --card-status.
5330         + commit 293001e2c6f0e228ff7f1b6a3e2606ae1370a5d5
5331         * g10/card-util.c (card_status): Release memory of serial number.
5332
5333 2018-12-05  NIIBE Yutaka  <gniibe@fsij.org>
5334
5335         g10: Fix print_pubkey_info new line output.
5336         + commit c5aba093b86e7d69b34ddcf55130f8f21e889b5c
5337         * g10/keylist.c (print_pubkey_info): Reverse the condition.
5338
5339 2018-12-05  Werner Koch  <wk@gnupg.org>
5340
5341         gpg: New list-option "show-only-fpr-mbox".
5342         + commit 9b538451682c704b4036c0ecdb7e6b0ef8570016
5343         * g10/gpg.c (parse_list_options): Add option "show-only-fpr-mbox".
5344         * g10/options.h (LIST_SHOW_ONLY_FPR_MBOX): New.
5345         * g10/keylist.c (list_keyblock_simple): New.
5346         (list_keyblock): Call it.
5347         (list_all): Do not print the keyring name in LIST_SHOW_ONLY_FPR_MBOX
5348         mode.
5349
5350         wks: Fix filter expression syntax flaw.
5351         + commit 80bf1f8901dcbbb2cb6cacc11cca98705ce8f59d
5352         * tools/wks-util.c (wks_get_key, wks_filter_uid): The filter
5353         expression needs a space before the value.
5354         (install_key_from_spec_file): Replace es_getline by es_read_line and
5355         remove debug output.
5356
5357         wks: Allow reading of --install-key arguments from stdin.
5358         + commit b6fd60dfa1709f162c25eb72cf8c45d0ab9bf34f
5359         * tools/wks-util.c (install_key_from_spec_file): New.
5360         (wks_cmd_install_key): Call it.
5361         * tools/gpg-wks-client.c (main): Allow --install-key w/o arguments.
5362         * tools/gpg-wks-server.c (main): Ditto.
5363
5364         (cherry picked from commit ba46a359b9d6549b74ec8401ea39bad434d87564)
5365
5366         wks: Create sub-directories.
5367         + commit bf29d7c822264a40f1469c7b5024d93b955a3a1e
5368         * tools/wks-util.c (wks_compute_hu_fname): Stat and create directory
5369         if needed.
5370
5371         (cherry picked from commit 73e5b0ec9b9ba5e04e55f8c42d81e23df7c3afe0)
5372
5373         wks: Add new commands --install-key and --remove-key to the client.
5374         + commit 5b4aa8c6d4abfa3135ec3ab23decf9bdd624df3e
5375         * tools/gpg-wks-client.c (aInstallKey, aRemoveKey, oDirectory): New.
5376         (opts): Add "--install-key", "--remove-key" and "-C".
5377         (parse_arguments): Parse them.
5378         (main): Check that the given directory exists.  Implement the new
5379         commands.
5380
5381         wks: Move a few server functions to wks-util.
5382         + commit 51b722c6f57b80a3b9caa417b7a74e7fab80043f
5383         * tools/gpg-wks-server.c (write_to_file): Move to ...
5384         * tools/wks-util.c: here.
5385         * tools/gpg-wks-server.c (compute_hu_fname): Move to ...
5386         * tools/wks-util.c (wks_compute_hu_fname): here.
5387         * tools/gpg-wks-server.c (fname_from_userid): Move to ...
5388         * tools/wks-util.c (wks_fname_from_userid): here.
5389         * tools/gpg-wks-server.c (command_install_key): Move to ...
5390         * tools/wks-util.c (wks_cmd_install_key): here and change caller.
5391         * tools/gpg-wks-server.c (command_remove_key): Move to ...
5392         * tools/wks-util.c (wks_cmd_remove_key): here and change callers.
5393
5394         (cherry picked from commit 99094c992c20dd22971beb3527cfda109cd1df89)
5395
5396 2018-12-05  Jussi Kivilinna  <jussi.kivilinna@iki.fi>
5397
5398         g10/mainproc: disable hash contexts when --skip-verify is used.
5399         + commit 6008410e512cb74a4a2ad3f6e3fce4669e4f7e2c
5400         * g10/mainproc.c (proc_plaintext): Do not enable hash contexts when
5401         opt.skip_verify is set.
5402
5403         common/iobuf: fix memory wiping in iobuf_copy.
5404         + commit ebd434a45eefd34bd9d9f875f22a74a47b88dd5f
5405         * common/iobuf.c (iobuf_copy): Wipe used area of buffer instead of
5406         first sizeof(char*) bytes.
5407
5408         common: Use platform memory zeroing function for wipememory.
5409         + commit 21fdef6963539680a16b68b7536378bdaa8dea85
5410         * common/mischelp.h (wipememory): Replace macro with function
5411         prototype.
5412         (wipememory2): Remove.
5413         * common/mischelp.c (wipememory): New.
5414         * configure.ac (AC_CHECK_FUNCS): Check for 'explicit_bzero' and
5415         remove duplicated checks.
5416
5417 2018-12-05  Werner Koch  <wk@gnupg.org>
5418
5419         gpg: Improve error message about failed keygrip computation.
5420         + commit edeebe0a6b9a49d2291d6351d52c5bc688d24cff
5421         * g10/keyid.c (keygrip_from_pk): Print the fingerprint on failure.
5422
5423         (cherry picked from commit cd64af003d4b6b46b69dbd575f73d53359ae0bcc)
5424
5425 2018-11-23  Werner Koch  <wk@gnupg.org>
5426
5427         dirmngr: Avoid possible CSRF attacks via http redirects.
5428         + commit 4a4bb874f63741026bd26264c43bb32b1099f060
5429         * dirmngr/http.h (parsed_uri_s): Add fields off_host and off_path.
5430         (http_redir_info_t): New.
5431         * dirmngr/http.c (do_parse_uri): Set new fields.
5432         (same_host_p): New.
5433         (http_prepare_redirect): New.
5434         * dirmngr/t-http-basic.c: New test.
5435         * dirmngr/ks-engine-hkp.c (send_request): Use http_prepare_redirect
5436         instead of the open code.
5437         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
5438
5439 2018-11-12  Andre Heinecke  <aheinecke@intevation.de>
5440
5441         dirmngr: Add FLUSHCRLs command.
5442         + commit 00321a025f90990a71b60b4689ede1f38fbde347
5443         Summary:
5444         * dirmngr/crlcache.c (crl_cache_flush): Also deinit the cache.
5445         * dirmngr/server.c (hlp_flushcrls, cmd_flushcrls): New.
5446         (register_commands): Add FLUSHCRLS.
5447
5448 2018-11-06  Werner Koch  <wk@gnupg.org>
5449
5450         Release 2.1.11.
5451         + commit cb46b787571ef149856be03b8c3481bb79871698
5452
5453
5454 2018-11-06  NIIBE Yutaka  <gniibe@fsij.org>
5455
5456         g10: Fix print_keygrip for smartcard.
5457         + commit 627839ea88da11a9e8d033e3c91bdf5a048b15c3
5458         * g10/card-util.c (print_keygrip): Use tty_fprintf.
5459
5460 2018-11-05  Werner Koch  <wk@gnupg.org>
5461
5462         wks: New option --with-colons for gpg-wks-client.
5463         + commit 66e0bd37ee3dd5ab534b2664493576ef6ad15a08
5464         * tools/gpg-wks.h (opt): Add field with_colons.
5465         * tools/gpg-wks-client.c (oWithColons): New const.
5466         (opts, parse_arguments): Add option --with-colons.
5467         (main): Change aSupported to take several domains in --with-colons
5468         mode.
5469         (command_send): Factor policy getting code out to ...
5470         (get_policy_and_sa): New function.
5471         (command_supported): Make use of new function.
5472
5473         speedo: Remove obsolete configure option of gpgme.
5474         + commit 593895a5e495c4647efa7db164356f3cae3d5759
5475         * build-aux/speedo.mk (speedo_pkg_gpgme_configure): Remove
5476         --disable-w32-qt option.
5477
5478         dirmngr: In verbose mode print the OCSP responder id.
5479         + commit 50756927ce6247abc2fadefbc76c58b75c8a7586
5480         * dirmngr/ocsp.c (ocsp_isvalid): Print the responder id.
5481
5482         (cherry picked from commit 0a7f446c189201ca6e527af08b44da756b343209)
5483
5484         tools: Replace duplicated code in mime-maker.
5485         + commit d5f540e7a9b3a723ba787e3a587fcd1b0948f105
5486         * tools/rfc822parse.c (HEADER_NAME_CHARS): New.  Taken from
5487         mime-maker.c.
5488         (rfc822_valid_header_name_p): New.  Based on code from mime-maker.c.
5489         (rfc822_capitalize_header_name): New.  Copied from mime-maker.c.
5490         (capitalize_header_name): Remove.  Replace calls by new func.
5491         (my_toupper, my_strcasecmp): New.
5492         * tools/mime-maker.c: Include rfc822parse.h.
5493         (HEADER_NAME_CHARS, capitalize_header_name): Remove.
5494         (add_header): Replace check and capitalization by new functions.
5495
5496         gpg: Don't take the a TOFU trust model from the trustdb,
5497         + commit 82cd7556fdce989aaacf91e0d369a62e4652f224
5498         * g10/tdbio.c (tdbio_update_version_record): Never store a TOFU model.
5499         (create_version_record): Don't init as TOFU.
5500         (tdbio_db_matches_options): Don't indicate a change in case TOFU is
5501         stored in an old trustdb file.
5502
5503         dirmngr: Emit SOURCE status also on NO_DATA.
5504         + commit ab7a907a184f37ddafaa0dc7200c76b735ba4853
5505         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Send SOURCE status also on
5506         NO DATA error.
5507         (ks_hkp_get): Ditto.
5508         * g10/call-dirmngr.c (gpg_dirmngr_ks_search): Print "data source" info
5509         also on error.
5510         (gpg_dirmngr_ks_get): Ditto.
5511
5512         dirmngr: Fix LDAP port parsing.
5513         + commit 5ab58d3001b0342aecaf691b1af70b1f76426f55
5514         * dirmngr/misc.c (host_and_port_from_url): Fix bad port parsing and a
5515         segv for a missing slash after the host name.
5516
5517 2018-10-26  Werner Koch  <wk@gnupg.org>
5518
5519         build: By default build wks-tools on all Unix platforms.
5520         + commit 8a33d5c9c699d2145d39b362d580df67571c5f36
5521         (cherry picked from commit b83fed64f8051279a8f36e024c1f12f7f13c4716)
5522
5523         wkd: Add option --directory to the server.
5524         + commit 839426104a0c829f0182b22048fdc51cf295beb7
5525         * tools/gpg-wks-server.c (opts): Add '--directory',
5526         (main): Explain how to set correct permissions.
5527         (command_list_domains): Create an empty policy file and remove the
5528         warning for an empty policy file.
5529
5530 2018-10-25  Werner Koch  <wk@gnupg.org>
5531
5532         dirmngr: Fix out of scope use of a var in the keyserver LDAP code.
5533         + commit 26ebb15bec897a105b248680c1ddf1806592b1eb
5534         * dirmngr/ks-engine-ldap.c (extract_attributes): Don't use a variabale
5535         out of scope and cleanup the entire pgpKeySize block.
5536
5537 2018-10-24  Werner Koch  <wk@gnupg.org>
5538
5539         agent: Fix possible uninitalized use of CTX in simple_pwquery.
5540         + commit e53253485cd7ceb7012505a629d2cd997167ccab
5541         * common/simple-pwquery.c (agent_open): Clear CTX even on early error.
5542
5543         agent: Fix possible release of unitialize var in a genkey error case.
5544         + commit 62c75271173f83c5770576aae7b84f55a9ccbc16
5545         * agent/command.c (cmd_genkey): Initialize 'value'.
5546
5547         ssh: Fix possible infinite loop in case of an read error.
5548         + commit 147e59b7815daafb32b570a96f1d1925d0f37008
5549         * agent/command-ssh.c (ssh_handler_add_identity): Handle other errors
5550         than EOF.
5551
5552         tools: Fix FILE memory leak in gpg-connect-agent.
5553         + commit f1561e5196e54f11b18050eeaeda50e786d188c2
5554         * tools/gpg-connect-agent.c (do_open): dup the fileno and close the
5555         stream.
5556
5557         (cherry picked from commit 378719f25fe00d46393541f4a4f79e04484c3000)
5558
5559         sm: Use the correct string in an error message.
5560         + commit 1b9b0fc54b9bcd5eb1e63816bd3222d7ac7572a7
5561         * sm/gpgsm.c (main): Fix error message.
5562
5563 2018-10-24  Andre Heinecke  <aheinecke@intevation.de>
5564
5565         dirmngr: Only print info for no ldapserver file.
5566         + commit 01baee2b0ef4f81ac6ffa55480e91168dd27b430
5567         * dirmngr/dirmngr.c (parse_ldapserver_file): Only print info
5568         for ENOENT.
5569
5570 2018-10-23  Andre Heinecke  <aheinecke@intevation.de>
5571
5572         sm: Fix dirmngr loadcrl for intermediate certs.
5573         + commit 6b36c16f77722d17f4f317c788701cbc1e9552b2
5574         * sm/call-dirmngr.c (run_command_inq_cb): Support ISTRUSTED.
5575         (inq_certificate): Distinguish unsupported inquiry error.
5576
5577 2018-10-22  Werner Koch  <wk@gnupg.org>
5578
5579         dirmngr: Prepare for updated WKD specs with ?l= param.
5580         + commit a2bd4a64e5b057f291a60a9499f881dd47745e2f
5581         * dirmngr/server.c (proc_wkd_get): Tack the raw local address to the
5582         request.
5583
5584         gpg: Fix extra check for sign usage of a data signature.
5585         + commit b0d6e26bf3c8decaa568c9e4a5b2451d9af0b25b
5586         * g10/sig-check.c (check_signature_end_simple):
5587
5588 2018-10-15  NIIBE Yutaka  <gniibe@fsij.org>
5589
5590         scd: Fix signing authentication status.
5591         + commit 7e2b0488d13561be2b754e28801de654747a8dcc
5592         * scd/app-openpgp.c (do_sign): Clear DID_CHV1 after signing.
5593
5594 2018-10-02  NIIBE Yutaka  <gniibe@fsij.org>
5595
5596         common: Fix gnupg_reopen_std.
5597         + commit 8f844ae1cd16e27ad07d45784b1f0ff2917da2b8
5598         * common/sysutils.c (gnupg_reopen_std): Use fcntl instead of fstat.
5599
5600 2018-09-10  NIIBE Yutaka  <gniibe@fsij.org>
5601
5602         common: Use iobuf_get_noeof to avoid undefined behaviors.
5603         + commit 0383e7fed7b2a45c7f0ae4c11415c6a9a3a3ddb7
5604         * common/iobuf.c (block_filter): Use iobuf_get_noeof.
5605
5606         agent: Fix error code check from npth_mutex_init.
5607         + commit 213379debe5591dad6339aa95aa7282e0de620f9
5608         * agent/call-pinentry.c (initialize_module_call_pinentry): It's an
5609         error when npth_mutex_init returns non-zero.
5610
5611 2018-09-07  NIIBE Yutaka  <gniibe@fsij.org>
5612
5613         g10: Fix memory leak.
5614         + commit 91f8a9b33a1282cbf00cb4b71b177088f0d923d7
5615         * g10/import.c (read_block): Call free_packet to skip the packet.
5616
5617 2018-09-06  NIIBE Yutaka  <gniibe@fsij.org>
5618
5619         Fix use of strncpy, which is actually good to use memcpy.
5620         + commit f0fdee2e24a25f57a84e1684984ce3921d923e0a
5621         * common/ssh-utils.c (get_fingerprint): Use memcpy.
5622         * g10/build-packet.c (string_to_notation): Use memcpy.
5623
5624 2018-08-30  Werner Koch  <wk@gnupg.org>
5625
5626         Release 2.2.10.
5627         + commit 24697074f44c18eeeedbc1e09d35f56504c57a1f
5628
5629
5630 2018-08-30  Ineiev  <ineiev@gnu.org>
5631
5632         po: Update Russian translation.
5633         + commit 2f5ba3a6c19b7a514488be01b7683287d74545d3
5634
5635
5636 2018-08-29  Werner Koch  <wk@gnupg.org>
5637
5638         gpg: Explain error message in key generation with --batch.
5639         + commit a9931b3c052ee9025705a8ef1f0cdd5f20aeda70
5640         * g10/keygen.c (generate_keypair): Show more info.
5641
5642         gpg: Remove unused function get_pubkeys.
5643         + commit 719fc941b6eceb75c2326335d9d73011823ff3f9
5644         * g10/getkey.c (get_pubkeys): Remove.
5645         (pubkey_free): Remove and use code directly ...
5646         (pubkeys_free): ... here.
5647
5648         (cherry picked from commit ed8fe21e6612401846fc4af8631f0136dc633c67)
5649
5650         gpg: New option --known-notation.
5651         + commit a59a9962f48f828ea7d22362dfa6d82841551110
5652         * g10/gpg.c (oKnownNotation): New const.
5653         (opts): Add option --known-notation.
5654         (main): Set option.
5655         * g10/parse-packet.c (known_notations_list): New local var.
5656         (register_known_notation): New.
5657         (can_handle_critical_notation): Rewrite to handle the new feature.
5658         Also print the name of unknown notations in verbose mode.
5659
5660 2018-08-28  Ineiev  <ineiev@gnu.org>
5661
5662         po: Update Russian translation.
5663         + commit b02ad56a9041273df58ded4cc70cf5ffa9e58c16
5664
5665
5666 2018-08-28  Werner Koch  <wk@gnupg.org>
5667
5668         assuan: Fix exponential decay for first second.
5669         + commit 38eb7c360bc4867cbaf37e3c2c0865bc6452ba4a
5670         * common/asshelp.c (wait_for_sock): Round SECSLEFT.
5671         * dirmngr/dirmngr.c (main): Take care of --debug-wait also in dameon
5672         mode.
5673         * common/sysutils.c (gnupg_usleep) [HAVE_NANOSLEEP]: Fix nanosleep use.
5674
5675 2018-08-28  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
5676
5677         assuan: Use exponential decay for first 1s of spinlock.
5678         + commit 1189df2cd7d4b6896ba22aa204c159ff2a425ead
5679         * common/asshelp.c (wait_for_sock): instead of checking the socket
5680         every second, we check 10 times in the first second (with exponential
5681         decay).
5682
5683         assuan: Reorganize waiting for socket.
5684         + commit a22a55b994e06dd06157fbdabf5a402d8daf69c2
5685         * common/asshelp.c (wait_for_sock): New function, collecting
5686         codepaths from...
5687         (start_new_gpg_agent) here and...
5688         (start_new_dirmngr) here.
5689
5690 2018-08-28  Werner Koch  <wk@gnupg.org>
5691
5692         gpg: Refresh expired keys originating from the WKD.
5693         + commit 0709f358cd13abc82e0f97f055fcaa712f0fd44f
5694         * g10/getkey.c (getkey_ctx_s): New field found_via_akl.
5695         (get_pubkey_byname): Set it.
5696         (only_expired_enc_subkeys): New.
5697         (get_best_pubkey_byname): Add support to refresh expired keys from the
5698         WKD.
5699
5700         gpg: Remove unused arg from a function.
5701         + commit 11a9fe1c5820b97d7e0f4b3e91f016df9dc466a9
5702         * g10/getkey.c (get_best_pubkey_byname): Remove unused arg 'no_akl'.
5703         Change both callers.
5704
5705         (cherry picked from commit db67ccb759426c1173761574b14bdfe6a76394c2)
5706
5707 2018-08-10  NIIBE Yutaka  <gniibe@fsij.org>
5708
5709         g10: Fix undefined behavior when EOF in parsing packet for S2K.
5710         + commit 822c633845066756b6442ca67b93b4b5c4316ca0
5711         * g10/parse-packet.c (parse_symkeyenc): Use iobuf_get_noeof.
5712         (parse_key): Likewise.
5713
5714 2018-07-29  Werner Koch  <wk@gnupg.org>
5715
5716         gpg: Set a limit for a WKD import of 256 KiB.
5717         + commit f1c0d9bb6506eee6a3ad93ef432fe6aa5b72aabd
5718         * g10/call-dirmngr.c (MAX_WKD_RESULT_LENGTH): New.
5719         (gpg_dirmngr_wkd_get): Use it.
5720
5721         dirmngr: Validate SRV records in WKD queries.
5722         + commit 8a98aa25bb4bdbfe53afd4534f6624454ca01ab0
5723         * dirmngr/server.c (proc_wkd_get): Check the returned SRV record names
5724         to mitigate rogue DNS servers.
5725
5726         common: New function to validate domain names.
5727         + commit 4f59187a17f16d559e37a375501a0add1ca7eee8
5728         * common/mbox-util.c (is_valid_domain_name): New.
5729         * common/t-mbox-util.c (run_dns_test): New test.
5730
5731         (cherry picked from commit ddee9f9409fb5a089883eab0fadef7b9b7e61e72)
5732
5733 2018-07-29  Jiří Keresteš  <jiri.kerestes@trustica.cz>
5734
5735         scd: Add support for Trustica Cryptoucan.
5736         + commit d43248af9242d30e95f58285e4f2a2e927aae937
5737         (cherry picked from commit 967d3649d24aba623133808e8d01675dff389fbb)
5738
5739 2018-07-12  Werner Koch  <wk@gnupg.org>
5740
5741         Release 2.2.9.
5742         + commit 2b82db61ccfe57d077dff43e0d732b51c73e1a45
5743
5744
5745 2018-07-09  Werner Koch  <wk@gnupg.org>
5746
5747         gpg: Remove multiple subkey bindings during export-clean.
5748         + commit 61562fe00027a4263f53661ad279072bd0b0133e
5749         * g10/key-clean.c (clean_one_subkey_dupsigs): New.
5750         (clean_all_subkeys): Call it.
5751
5752         gpg: Let export-clean remove expired subkeys.
5753         + commit 8055f186a32e628028de897b7ee4705cd8e999b7
5754         * g10/key-clean.h (KEY_CLEAN_NONE, KEY_CLEAN_INVALID)
5755         (KEY_CLEAN_ENCR, KEY_CLEAN_AUTHENCR, KEY_CLEAN_ALL): New.
5756         * g10/key-clean.c (clean_one_subkey): New.
5757         (clean_all_subkeys): Add arg CLEAN_LEVEL.
5758         * g10/import.c (import_one): Call clean_all_subkeys with
5759         KEY_CLEAN_NONE.
5760         * g10/export.c (do_export_stream): Call clean_all_subkeys depedning on
5761         the export clean options.
5762
5763         gpg: Split key cleaning function for clarity.
5764         + commit 046276db3a04f1907ddcf77c3771832613918226
5765         * g10/key-clean.c (clean_key): Rename to clean_all_uids and split
5766         subkey cleaning into ...
5767         (clean_all_subkeys): new.  Call that always after the former clean_key
5768         invocations.
5769
5770         gpg: Move key cleaning functions to a separate file.
5771         + commit 40bf383f72b5629de739e30c9c35bbcb628273e8
5772         * g10/trust.c (mark_usable_uid_certs, clean_sigs_from_uid)
5773         (clean_uid_from_key, clean_one_uid, clean_key): Move to ...
5774         * g10/key-clean.c: new file.
5775         * g10/key-clean.h: New.
5776         * g10/Makefile.am (gpg_sources): Add new files.
5777         * g10/export.c, g10/import.c, g10/keyedit.c, g10/trustdb.c: Include
5778         new header.
5779         * g10/trustdb.h (struct key_item, is_in_klist): Move to ...
5780         * g10/keydb.h: here.
5781
5782 2018-07-06  Werner Koch  <wk@gnupg.org>
5783
5784         gpg: Allow decryption using several passphrases in may cases.
5785         + commit b4599a0449ead7dc5c0d922aa78b6168e625e15e
5786         * g10/mainproc.c (symkey_decrypt_seskey): Check for a valid algorithm.
5787         (proc_symkey_enc): Clear passpharse on error from above function.
5788
5789 2018-07-05  Werner Koch  <wk@gnupg.org>
5790
5791         po: Add flag options for xgettext.
5792         + commit 833738a316977ee774399bd658d535216dff22e9
5793         * po/Makevars (XGETTEXT_OPTIONS): Add --flag options.
5794
5795         gpg: Prepare for signatures with ISSUER_FPR but without ISSUER.
5796         + commit 221af19351addcdc28a1cd533c8628cfa3841671
5797         * g10/getkey.c (get_pubkey_for_sig): New.
5798         (get_pubkeyblock_for_sig): New.
5799         * g10/mainproc.c (issuer_fpr_raw): Give global scope.
5800         (check_sig_and_print): Use get_pubkeyblock_for_sig.
5801         * g10/pkclist.c (check_signatures_trust): Use get_pubkey_for_sig.
5802         * g10/sig-check.c (check_signature2): Ditto.
5803         (check_signature_over_key_or_uid): Ditto.
5804
5805 2018-07-04  Andre Heinecke  <aheinecke@intevation.de>
5806
5807         po: Fix bug in german translation.
5808         + commit 063cf45c142f33815bc0f31d0fb3e1b25ca57b8c
5809         * po/de.po (decryption forced to fail!): Fix translation.
5810
5811 2018-07-04  Werner Koch  <wk@gnupg.org>
5812
5813         gpg: Ignore too large user ids during import.
5814         + commit cb6b925f94b42c91fe8a7ed8bb22d98984538efc
5815         * g10/import.c (read_block): Add special treatment for bad user ids
5816         and comment packets.
5817
5818         gpg: Extra check for sign usage when verifying a data signature.
5819         + commit ef50fdf82a459894ed3da7b9be83f89658f1eaba
5820         * g10/sig-check.c (check_signature_end_simple): Check sign usage.
5821
5822 2018-07-03  Werner Koch  <wk@gnupg.org>
5823
5824         gpg: Print revocation reason for "rev" records.
5825         + commit 04fb76684d8b2c9cda2e5c35bad6edec521cffa5
5826         * g10/main.h: Add prototype.
5827         * g10/keylist.c (list_keyblock_print): Print revocation info.
5828         (list_keyblock_colon): Ditto.
5829
5830         * g10/test-stubs.c (get_revocation_reason): New stub.
5831         * g10/gpgv.c (get_revocation_reason): New stub.
5832
5833         gpg: Print revocation reason for "rvs" records.
5834         + commit a8e24addcc4e0fdff7d07acdd7e13bf6febf97d2
5835         * g10/import.c (get_revocation_reason): New.
5836         (list_standalone_revocation): Extend function.
5837
5838         gpg: Let --show-keys print revocation certificates.
5839         + commit 5c67ee160d4969b1ef94642ac602e1aed4d9a6d7
5840         * g10/import.c (list_standalone_revocation): New.
5841         (import_revoke_cert): Call new function.
5842
5843 2018-07-03  NIIBE Yutaka  <gniibe@fsij.org>
5844
5845         g10: Fix memory leak for PKT_signature.
5846         + commit 2809be1f97a447171a9e8b40079851740b15341a
5847         * g10/getkey.c (buf_to_sig): Free by free_seckey_enc.
5848         * g10/gpgcompose.c (signature): Likewise.
5849         * g10/sign.c (write_signature_packets): Likewise.
5850
5851 2018-07-02  NIIBE Yutaka  <gniibe@fsij.org>
5852
5853         libdns: For SOCKS connection, just fails.
5854         + commit cca92ca5348999a3564dd54d7b0a103cc9e7640c
5855         * dirmngr/dns.c (dns_res_exec): If it's DNS_SO_SOCKS_CONN, don't
5856         iterate to other server, but return the error immediately.
5857
5858 2018-06-20  NIIBE Yutaka  <gniibe@fsij.org>
5859
5860         libdns: Let kernel to decide the local port.
5861         + commit 72a35ffee022f1bf180d02250c5be6a4edb599e7
5862         * dirmngr/dns.c (LEAVE_SELECTION_OF_PORT_TO_KERNEL): New.
5863         (dns_socket): Don't select ephemeral port in user space.
5864
5865 2018-06-18  NIIBE Yutaka  <gniibe@fsij.org>
5866
5867         libdns: Fix for non-FQDN hostname.
5868         + commit 87d0ecf8a1b80139a6cab2a79f1ca6e287207999
5869         * dirmngr/dns.c (dns_resconf_open): Clear search[0] for non-FQDN
5870         hostname.
5871
5872         libdns: Fix connect and try next nameserver when ECONNREFUSED.
5873         + commit 699fe4b36f62b0f4d4e21a85ee7c9ae13377d6cb
5874         * dirmngr/dns.c (dns_so_check): When EINVAL, release the association
5875         by connect with AF_UNSPEC and try again.  Also try again for
5876         ECONNREFUSED.
5877         (dns_res_exec): Try next nameserver when ECONNREFUSED.
5878
5879         libdns: Clear struct sockaddr_storage by zero.
5880         + commit 0c05b08e8b5c1f120fe5f3ed5c061f034f7496a0
5881         * dirmngr/dns.c (dns_resconf_pton): Clear SS.
5882         (dns_resconf_setiface): Clear ->IFACE.
5883         (dns_hints_root, send_query): Clear SS.
5884
5885         libdns: Sync to upstream.
5886         + commit 20c289606f89803929948ddd18910acff2acc9eb
5887         * dirmngr/dns.c (dns_nssconf_loadfile): Handle exclamation mark.
5888
5889         dirmngr: Fix recursive resolver mode.
5890         + commit 13320db678675246f4bb5a3fb6ece143f37c34a4
5891         * dirmngr/dns-stuff.c (libdns_init): Initialize options.recurse.
5892
5893 2018-06-12  Werner Koch  <wk@gnupg.org>
5894
5895         gpg: Do not import revocations with --show-keys.
5896         + commit e8f439e0547463c24f3c10008fee73e6c4259f52
5897         * g10/import.c (import_revoke_cert): Add arg 'options'.  Take care of
5898         IMPORT_DRY_RUN.
5899
5900 2018-06-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
5901
5902         gpg: Add new usage option for drop-subkey filters.
5903         + commit 86b64876bef0d8c4be8e309fcf3e2ce21e65a947
5904         * g10/import.c (impex_filter_getval): Add new "usage" property for
5905         drop-subkey filter.
5906
5907 2018-06-11  Werner Koch  <wk@gnupg.org>
5908
5909         gpg: Set some list options with --show-keys.
5910         + commit cbb84b3361263504dcb958208bc20177cb97cebd
5911         * g10/gpg.c (main): Set some list options.
5912
5913 2018-06-08  Werner Koch  <wk@gnupg.org>
5914
5915         gpg: Allow building with older libgpg-error.
5916         + commit 18274db32b5dea7fe8db67043a787578c975de4d
5917         * g10/mainproc.c (proc_encrypted): Use constant from logging.h
5918
5919         Release 2.2.8.
5920         + commit cd9aaa7862955846f8adf819cd89d0db33e9c08c
5921
5922
5923 2018-06-08  Ineiev  <ineiev@gnu.org>
5924
5925         po: Update Russian translation.
5926         + commit 77ab99f80a5b0fbc60e05230185a54cd200d5e65
5927
5928
5929 2018-06-08  Werner Koch  <wk@gnupg.org>
5930
5931         gpg: Sanitize diagnostic with the original file name.
5932         + commit 210e402acd3e284b32db1901e43bf1470e659e49
5933         * g10/mainproc.c (proc_plaintext): Sanitize verbose output.
5934
5935 2018-06-07  Werner Koch  <wk@gnupg.org>
5936
5937         gpg: Improve import's repair-key duplicate signature detection.
5938         + commit 6a87a0bd2501d82f4a6263608e4856e841305caf
5939         * g10/key-check.c (key_check_all_keysigs): Factor some code out to ...
5940         (remove_duplicate_sigs): new.
5941         (key_check_all_keysigs): Call remove_duplicate_sigs again after
5942         reordering.
5943
5944         gpg: Fix import's repair-key duplicate signature detection.
5945         + commit cedd754fcb03f6dad6e462efc3d347bcef4ec83a
5946         * g10/packet.h (PKG_siganture): Add field 'help_counter'.
5947         * g10/key-check.c (sig_comparison): Take care of HELP_COUNTER.
5948         (key_check_all_keysigs): De-duplicate on a per-block base.
5949
5950         gpg: Improve verbose output during import.
5951         + commit 36cc730fa516b3a197f3bb1eb6f3881dd128fbb7
5952         * g10/import.c (chk_self_sigs): Print the subkeyid in addition to the
5953         keyid.
5954         (delete_inv_parts): Ditto.
5955
5956         (cherry picked from commit 1bc6b5174248ba4d83d648ef6d6f4550540d1f20)
5957
5958 2018-06-06  Werner Koch  <wk@gnupg.org>
5959
5960         agent: Add DBUS_SESSION_BUS_ADDRESS et al. to the startup list.
5961         + commit c5c8fb1ec7c8690495de6189ec2c3a322db4e881
5962         * agent/gpg-agent.c (agent_copy_startup_env): Replace explicit list
5963         with the standard list.
5964
5965         gpg: Also detect a plaintext packet before an encrypted packet.
5966         + commit 054a187f24b19313cec59414fa924640e1b8c79c
5967         * g10/mainproc.c (proc_encrypted): Print warning and later force an
5968         error.
5969
5970         gpg: New command --show-keys.
5971         + commit dc87a3341f28ddac1113e90a3861d062be2610e2
5972         * g10/gpg.c (aShowKeys): New const.
5973         (opts): New command --show-keys.
5974         (main): Implement command.
5975         * g10/import.c (import_keys_internal): Don't print stats in show-only
5976         mode.
5977         (import_one): Be silent in show-only mode.
5978
5979 2018-05-31  Werner Koch  <wk@gnupg.org>
5980
5981         gpg: Print a hint on how to decrypt a non-mdc message anyway.
5982         + commit 825909e9cd5f344ece6c0b0ea3a9475df1d643de
5983         * g10/mainproc.c (proc_encrypted): Print a hint for legacy ciphers w/o
5984         MDC.  Also print a dedicated status error code
5985
5986         (cherry picked from commit 874e391665405fc413a69f2ffacdb94bb08da7ff)
5987
5988         gpg: Detect multiple literal plaintext packets more reliable.
5989         + commit 2f2b1d1da949e8fce28d3c4a934b4097d6f24295
5990         * g10/mainproc.c (proc_encrypted): Bump LITERALS_SEEN.
5991
5992         gpg: Remove MDC options.
5993         + commit 866667765f38bf65b612191209d0f0a87fb16393
5994         * g10/gpg.c: Turn options --force-mdc, --no-force-mdc, --disable-mdc
5995         and --no-disable-mdc into NOPs.
5996         * g10/encrypt.c (use_mdc): Simplify.  MDC is now almost always used.
5997         * g10/cipher.c (write_header): Include extra hint and make
5998         translatable.
5999         * g10/options.h (struct opt): Remove fields force_mdc and disable_mdc.
6000
6001         gpg: Hard fail on a missing MDC even for legacy algorithms.
6002         + commit 3db1b48a2da42942cb5a57281441167901bdcdc8
6003         * g10/mainproc.c (proc_encrypted): Require an MDC or AEAD
6004         * tests/openpgp/defs.scm (create-gpghome): Use --ignore-mdc-error to
6005         allow testing with the current files.
6006
6007         gpg: Turn --no-mdc-warn into a NOP.
6008         + commit 26c0d3a3fc903c1a0de644ebcc99d3e665a80941
6009         * g10/gpg.c (oNoMDCWarn): Remove.
6010         (opts): Make --no-mdc-warn a NOP.
6011         (main): Don't set var.
6012         * g10/options.h (struct opt): Remove 'no_mdc_var'.
6013         * g10/cipher-cfb.c (write_header): Assume opt.no_mdc_warn is false.
6014         * g10/mainproc.c (proc_encrypted): Ditto.
6015
6016 2018-05-07  Ineiev  <ineiev@gnu.org>
6017
6018         doc: Update description of displayed trust values.
6019         + commit ed12a1dabaf928e8620fc26ca426c935e1a8a880
6020         * doc/trust-values.texi: New file.
6021         * doc/Makefile.am (EXTRA_DIST): Add trust-values.texi.
6022         * doc/gnupg.texi (Trust Values): New chapter.
6023         * doc/gpg.texi (OpenPGP Key Management): Update the description
6024         of how trust values are displayed, replace table with a reference
6025         to Trust Values.
6026         * doc/gpg.texi (GPG Examples): Add @mansect trust values.
6027
6028 2018-05-02  Werner Koch  <wk@gnupg.org>
6029
6030         Release 2.2.7.
6031         + commit d31d149196832ed6b8849017d8bcd0852c6ca96c
6032
6033
6034         gpg: Fix minor memory leak in the compress filter.
6035         + commit d26363e4f1933781c86cbe87077fbf1b9a2b64d8
6036         * g10/compress.c (push_compress_filter2): Return an error if no filter
6037         was pushed.
6038         (push_compress_filter): Ditto.
6039         (handle_compressed): Free CFX if no filter was pushed.
6040         * g10/import.c (read_block): Ditto.
6041
6042         gpg: Fix "Too many open files" when using --multifile.
6043         + commit f7f3043653abe699602f910ddd09c1405675c7f6
6044         * common/miscellaneous.c (is_file_compressed): Don't cache the file.
6045
6046         dirmngr: Implement timeout for dirmngr_ldap under Windows.
6047         + commit 007dde93cc3971cb51d08e8c082e172506ae7f80
6048         * dirmngr/dirmngr_ldap.c (alarm_thread) [W32]: New.
6049         (set_timeout): Implement for W32.
6050
6051         build: New configure option to help with nPth debugging.
6052         + commit ddfd39e91a532fd31cd0c20c5d4cf9643acc58bd
6053         * configure.ac: Add option --enable-npth-debug
6054
6055 2018-05-02  Andre Heinecke  <aheinecke@intevation.de>
6056
6057         common,w32: Hide spawned processes by default.
6058         + commit 3bd793256e2e4be52075d50ccf2df70c4a2e1a0f
6059         * common/exechelp-w32.c (gnupg_spawn_process): Use SW_HIDE
6060         instead of SW_MINIMIZE.
6061
6062 2018-04-30  Werner Koch  <wk@gnupg.org>
6063
6064         dirmngr: Sleep in the ldap wrapper thread.
6065         + commit a598bbeeafa30f7854230eed212b76d5c5c77f86
6066         * dirmngr/ldap-wrapper.c (wrapper_list): Rename to reaper_list.
6067         (ldap_reaper_thread): Protect all list modification with a mutex.  Use
6068         a condition var to wake up the reaper thread.
6069
6070 2018-04-27  Werner Koch  <wk@gnupg.org>
6071
6072         dirmngr: Use the LDAP wrapper process also for Windows.
6073         + commit f9fbfc64e402bd41815a68426f55565fa6d5c726
6074         * dirmngr/ldap-wrapper.c: Revamp module to make use of es_poll for
6075         portability.
6076         * configure.ac: Always use the ldap wrapper.
6077
6078         dirmngr: Silence log output from dirmngr_ldap.
6079         + commit d22506a343cec61b7d1a48c970b63a8458b267ab
6080         * dirmngr/dirmngr_ldap.c: Remove assert.h.
6081         (main): Replace assert by log_assert.
6082         * dirmngr/ldap.c (run_ldap_wrapper): Use debug options to pass
6083         verbose options to dirmngr_ldap.
6084         (start_cert_fetch_ldap): Ditto.
6085
6086 2018-04-26  Werner Koch  <wk@gnupg.org>
6087
6088         dirmngr: Lower the dead host resurrection time to 1.5h.
6089         + commit 5789afc840cf79ba2a8cebd9d772ef9c3868c5e9
6090         * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): Decrease.
6091         (INITIAL_HOSTTABLE_SIZE): Increase because the old values was likely
6092         for development.
6093
6094         dirmngr: Fix handling of CNAMEed keyserver pools.
6095         + commit cc66108253c58583d6bad3d1e2da2b004701d0f0
6096         * dirmngr/ks-engine-hkp.c (map_host): Don't use the cname for HTTPHOST.
6097         * dirmngr/server.c (make_keyserver_item): Map keys.gnupg.net.
6098
6099 2018-04-25  Werner Koch  <wk@gnupg.org>
6100
6101         dirmngr: Add the used TLS library to the debug output.
6102         + commit bb8894760fe87cf46a42599f11eab7e7c7a8eb71
6103         * dirmngr/http.c (send_request): Print the used TLS library in debug
6104         mode.
6105
6106         dirmngr: Allow redirection from https to http for CRLs.
6107         + commit 1de4462974113ac18cf98f903e97cd1127fa842f
6108         * dirmngr/ks-engine.h (KS_HTTP_FETCH_NOCACHE): New flag.
6109         (KS_HTTP_FETCH_TRUST_CFG): Ditto.
6110         (KS_HTTP_FETCH_NO_CRL): Ditto.
6111         (KS_HTTP_FETCH_ALLOW_DOWNGRADE): Ditto.
6112         * dirmngr/ks-engine-http.c (ks_http_fetch): Replace args send_no_cache
6113         and extra_http_trust_flags by a new flags arg.  Allow redirectiong
6114         from https to http it KS_HTTP_FETCH_ALLOW_DOWNGRADE is set.
6115         * dirmngr/loadswdb.c (fetch_file): Call with KS_HTTP_FETCH_NOCACHE.
6116         * dirmngr/ks-action.c (ks_action_get): Ditto.
6117         (ks_action_fetch): Ditto.
6118         * dirmngr/crlfetch.c (crl_fetch): Call with the appropriate flags.
6119
6120         dirmngr: Implement CRL fetching via https.
6121         + commit 705d8e9cf0d109005b3441766270c0e584f7847d
6122         * dirmngr/http.h (HTTP_FLAG_TRUST_CFG): New flag.
6123         * dirmngr/http.c (http_register_cfg_ca): New.
6124         (http_session_new) [HTTP_USE_GNUTLS]: Implement new trust flag.
6125         * dirmngr/certcache.c (load_certs_from_dir): Call new function.
6126         (cert_cache_deinit): Ditto.
6127         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
6128         * dirmngr/ks-engine-http.c (ks_http_fetch): Add new args
6129         'send_no_cache' and 'extra_http_trust_flags'.  Change all callers to
6130         provide the default value.
6131         * dirmngr/crlfetch.c (crl_fetch): Rewrite to make use of
6132         ks_http_fetch.
6133
6134 2018-04-25  NIIBE Yutaka  <gniibe@fsij.org>
6135
6136         g10: Fix printing the keygrip with --card-status.
6137         + commit 71903eee89496e3f1d0a24536bced6ff16df6783
6138         * g10/card-util.c (current_card_status): Keygrip for Auth is 3.
6139
6140 2018-04-24  Werner Koch  <wk@gnupg.org>
6141
6142         dirmngr: Fallback to CRL if no default OCSP responder is configured.
6143         + commit 460e3812be711bd18195053d74aa736215f21eee
6144         * dirmngr/server.c (cmd_isvalid): Use option second arg to trigger
6145         OCSP checkibng.  Fallback to CRL if no default OCSP responder has been
6146         configured.
6147         * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Adjust accordingly.
6148
6149 2018-04-20  Andre Heinecke  <aheinecke@intevation.de>
6150
6151         dirmngr: More binary I/O on Windows for CRLs.
6152         + commit 64c1fddb253061a9773c6c4ed2a9c5a54702d21b
6153         * dirmngr/crlcache.c (lock_db_file, crl_cache_insert): Open cache
6154         file in binary mode.
6155
6156         doc: Remove unneccesary empty flags in vsndf.prf.
6157         + commit a44ed3d9a1ad5bd96694f10ea5523c517982017e
6158         * doc/examples/vsnfd.prf (max-cache-ttl): Remove empty flags.
6159
6160 2018-04-16  emma peel  <emma.peel@aktivix.org>
6161
6162         po: more updates to Spanish translation.
6163         + commit acd6d5ff7436bb7fba171ced3294046a14fb777d
6164
6165
6166         po: correct attribution for Spanish translation.
6167         + commit 21b2e88a7e6c3d7313773c9ffb3e0d1fb2af45df
6168
6169
6170         po: correct label tags in Polish translation.
6171         + commit a5290dace7f85d66272af3e14f9f2bc43d2a4af8
6172
6173
6174         po: correct label tags in Finnish translation.
6175         + commit e12475429578add12a53fb2232cb45dc9e2aae1b
6176
6177
6178 2018-04-15  Werner Koch  <wk@gnupg.org>
6179
6180         build: New target "release" to automate the release process.
6181         + commit 3b1ee413a65bf566aa8e5f29a5a2cd5a94e66faa
6182         * Makefile.am (RELEASE_ARCHIVE_DIR): New.
6183         (RELEASE_SIGNING_KEY): New.
6184         (AM_DISTCHECK_CONFIGURE_FLAGS): Remove removed --enable-gpg2-is-gpg,
6185         (RELEASE_NAME, RELEASE_W32_STEM_NAME): New.
6186         (release, sign-release): New.
6187
6188 2018-04-13  NIIBE Yutaka  <gniibe@fsij.org>
6189
6190         g10: Fix memory leak in check_sig_and_print.
6191         + commit f747b8f0734338baa1e608b193b213aca2c577e8
6192         * g10/mainproc.c (check_sig_and_print): Free the public key.
6193
6194         g10: Push compress filter only if compressed.
6195         + commit c31abf84659dbda5503dd9f3aa3449520bcd1b84
6196         * g10/compress.c (handle_compressed): Fix memory leak.
6197
6198 2018-04-12  Werner Koch  <wk@gnupg.org>
6199
6200         gpg: Extend the "sig" record in --list-mode.
6201         + commit 69c3e7acb744e1e5606a4d946e3b948704cfbbae
6202         * g10/getkey.c (get_user_id_string): Add arg R_NOUID.  Change call
6203         callers.
6204         (get_user_id): Add arg R_NOUID.  Change call callers.
6205         * g10/mainproc.c (issuer_fpr_string): Make global.
6206         * g10/keylist.c (list_keyblock_colon): Print a '?' for a missing key
6207         also in --list-mode.  Print the "issuer fpr" field also if there is an
6208         issuer fingerprint subpacket.
6209
6210         gpg: Extend the ERRSIG status line with a fingerprint.
6211         + commit 23a714598c247d78cfda46a6dc338b17e17cc194
6212         * g10/mainproc.c (issuer_fpr_raw): New.
6213         (issuer_fpr_string): Re-implement using issuer_fpr_rtaw.
6214         (check_sig_and_print): Don't free ISSUER_FPR.  Use ISSUER_FPR_RAW.
6215         Use write_status_printf.  Extend ERRSIG status.
6216
6217         gpg: Relax printing of STATUS_FAILURE.
6218         + commit e2bd152a928d79ddfb95fd2f7911c80a1a8d5a21
6219         * g10/gpg.c (g10_exit): Print STATUS_FAILURE only based on passed
6220         return code and not on the presence of any call to log_error.
6221
6222         agent,dirmngr: Add "getenv" to the getinfo command.
6223         + commit bbb5bfacc0d1f179cfec94fd32fee01a09df0f1d
6224         * agent/command.c (cmd_getinfo): Add sub-command getenv.
6225         * dirmngr/server.c (cmd_getinfo): Ditto.
6226
6227 2018-04-12  Andre Heinecke  <aheinecke@intevation.de>
6228
6229         build: Update getswdb version check to 2.2.
6230         + commit 327fece0aed2c9974659c72304f9fd1f461d460c
6231         * build-aux/getswdb.sh: Check for gnupg22_ver gnupg21_ver no
6232         longer exists.
6233
6234 2018-04-11  Werner Koch  <wk@gnupg.org>
6235
6236         gpg: New option --no-symkey-cache.
6237         + commit 789d240cb40ab36406a7c57ad49897e0bafbb41e
6238         * g10/gpg.c (oNoSymkeyCache): New.
6239         (opts): Add that option.
6240         (main): Set var.
6241         * g10/options.h (struct opt): New field no_symkey_cache.
6242         * g10/passphrase.c (passphrase_to_dek): Implement that feature.
6243
6244 2018-04-10  Werner Koch  <wk@gnupg.org>
6245
6246         agent: Improve the unknown ssh flag detection.
6247         + commit 9f69dbeb902ac447adbc92937cd451c4e909f234
6248         * agent/command-ssh.c (ssh_handler_sign_request): Simplify detection
6249         of flags.
6250
6251 2018-04-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6252
6253         agent: unknown flags on ssh signing requests cause an error.
6254         + commit 381c46818ffa4605d0ca39818fe317de445eb6de
6255         * agent/command-ssh.c (ssh_handler_sign_request): if a flag is passed
6256         during an signature request that we do not know how to apply, return
6257         GPG_ERR_UNKNOWN_OPTION.
6258
6259         agent: change documentation reference for ssh-agent protocol.
6260         + commit 55435cdd4fe4fbfbcba1098bb715ecd6171ba2d8
6261         * agent/command-ssh.c: repoint documentation reference.
6262
6263 2018-04-09  Werner Koch  <wk@gnupg.org>
6264
6265         Release 2.2.6.
6266         + commit 6fbe2ddbaf5123ae444c95fdf8da67840f794c76
6267
6268
6269         gpg,w32: Fix empty homedir when only a drive letter is used.
6270         + commit 6da7aa1e7c80d214bd9dccb21744919ae191f2c8
6271         * common/homedir.c (copy_dir_with_fixup): New.
6272         (default_homedir): Use here.
6273         (gnupg_set_homedir): And here .
6274
6275         doc: Document --key-edit:change-usage.
6276         + commit a4e26f2ee852003707857ab0635b783acb89a2f8
6277         * g10/keyedit.c (menu_changeusage): Make strings translatable.
6278
6279 2018-04-06  Werner Koch  <wk@gnupg.org>
6280
6281         gpg: Check that a key may do certifications.
6282         + commit 1a5d95e7319e7e6f0dd11064a26cbbc371b05214
6283         * g10/sig-check.c (check_signature_end_simple): Check key usage for
6284         certifications.
6285         (check_signature_over_key_or_uid): Request usage certification.
6286
6287         gpg: Emit FAILURE stati now in almost all cases.
6288         + commit 0336e5d1a7b9d46e06c838e6a98aecfcc9542882
6289         * g10/cpr.c (write_status_failure): Make it print only once.
6290         * g10/gpg.c (wrong_args): Bump error counter.
6291         (g10_exit): Print a FAILURE status if we ever did a log_error etc.
6292         (main): Use log_error instead of log_fatal at one place.  Print a
6293         FAILURE status for a bad option.  Ditto for certain exit points so
6294         that we can see different error locations.
6295
6296         gpg: Re-indent sig-check.c and use signature class macros.
6297         + commit 5ba74a134db431530884f03eea5410a68dbfe0f5
6298         * g10/keydb.h (IS_BACK_SIG): New.
6299         * g10/sig-check.c: Re-indent and use macros.
6300
6301 2018-04-06  NIIBE Yutaka  <gniibe@fsij.org>
6302
6303         agent: Support SSH signature flags.
6304         + commit 80b775bdbb852aa4a80292c9357e5b1876110c00
6305         * agent/command-ssh.c (SSH_AGENT_RSA_SHA2_256): New.
6306         (SSH_AGENT_RSA_SHA2_512): New.
6307         (ssh_handler_sign_request): Override SPEC when FLAGS
6308         is specified.
6309
6310 2018-04-05  NIIBE Yutaka  <gniibe@fsij.org>
6311
6312         g10: Let card-edit/key-attr show message when change.
6313         + commit 870527df0dd704c994928348c8c2910030776680
6314         * g10/card-util.c (ask_card_rsa_keysize): Don't show message here.
6315         (ask_card_keyattr): Show message when change, also for ECC.
6316
6317 2018-04-04  NIIBE Yutaka  <gniibe@fsij.org>
6318
6319         tests: Fix no gpg-agent upon removal of GNUPGHOME.
6320         + commit 83529e1bd14a6d39f2a8ecab9fb6aa4c1f344c73
6321         * tests/gpgscm/gnupg.scm (with-ephemeral-home-directory): Add
6322         teadown-fn.
6323         * tests/gpgsm/export.scm: Use -no-atexit version and stop-agent.
6324         * tests/openpgp/decrypt-session-key.scm: Likewise.
6325         * tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
6326         * tests/openpgp/defs.scm (have-opt-always-trust): Likewise.
6327         (setup-environment-no-atexit): New.
6328         (start-agent): Support no use of atexit.
6329         * tests/gpgsm/gpgsm-defs.scm (setup-gpgsm-environment-no-atexit): New.
6330         * tests/migrations/common.scm (untar-armored): Follow the change
6331         of with-ephemeral-home-directory.
6332
6333 2018-04-03  NIIBE Yutaka  <gniibe@fsij.org>
6334
6335         scd: Writing KDF resets auth state.
6336         + commit cb1731c23cddfa524d3f51cfd82029bff853a073
6337         * scd/app-openpgp.c (do_setattr): Clear auth state.
6338
6339 2018-04-02  NIIBE Yutaka  <gniibe@fsij.org>
6340
6341         g10: Fix filtering by PK->REQ_USAGE.
6342         + commit a17d2d1f690ebe5d005b4589a5fe378b6487c657
6343         * g10/getkey.c (get_pubkey_byfprint): Filter by PK->REQ_USAGE.
6344
6345 2018-03-30  NIIBE Yutaka  <gniibe@fsij.org>
6346
6347         g10: Fix card-edit/kdf-setup for single salt.
6348         + commit 130ad98240c066383fa0a99bcf5e0ec72bc0dff9
6349         * g10/card-util.c (gen_kdf_data): Use SALT_USER.
6350
6351         g10,scd: Support single salt for KDF data object.
6352         + commit 0c097575a9cd923f648fb5bb695893d46400c3ad
6353         * g10/card-util.c (gen_kdf_data): Support single salt.
6354         (kdf_setup): Can have argument for single salt.
6355         * scd/app-openpgp.c (pin2hash_if_kdf): Support single salt.
6356
6357         g10: Add "key-attr" command for --card-edit.
6358         + commit 820380335a20391e0998fb1ba32ebfb9accedc5b
6359         * g10/card-util.c (key_attr): New explicit command.
6360         (generate_card_keys, card_generate_subkey): Don't ask key attr change.
6361         (card_edit): Add for cmdKEYATTR.
6362
6363         scd: Support changing key attribute back to RSA.
6364         + commit 29692718768c28c524be6306081ab1852e75fe07
6365         * scd/app-openpgp.c (change_rsa_keyattr): Try usual RSA.
6366
6367 2018-03-29  NIIBE Yutaka  <gniibe@fsij.org>
6368
6369         g10: Support key attribute change at --card-edit/generate.
6370         + commit a1515b3bbc10a210040dda3b482bcdb933fa8d7c
6371         * g10/card-util.c (ask_card_rsa_keysize): Drop support for magic
6372         number 25519 for ed25519/cv25519.  Rename from ask_card_keyattr.
6373         (ask_card_keyattr): Support ECC, as well as RSA.
6374         (do_change_keyattr): Support ECC dropping magical number 25519.
6375         * g10/keygen.c (ask_curve): Allow call from outside, adding last arg
6376         of CURRENT.
6377         (generate_keypair): Follow the change of ask_curve.
6378         (generate_subkeypair): Likewise.
6379
6380         g10: check_pin_for_key_operation should be just before genkey.
6381         + commit 02d7bb819ff44cc90212568dd6ce24ae1dc5d17f
6382         * g10/card-util.c (generate_card_keys): Check PIN later.
6383         (card_generate_subkey): Likewise.
6384
6385 2018-03-28  NIIBE Yutaka  <gniibe@fsij.org>
6386
6387         g10: Change ask_curve so that it can be used outside.
6388         + commit e610d51f0de11154050915b951bcc5c53c940f5e
6389         * g10/call-agent.h (struct key_attr): New.
6390         * g10/keygen.c (ask_curve): Return const char *.  No allocation.
6391         (quick_generate_keypair): Follow the change.
6392         (generate_keypair, generate_subkeypair): Likewise.
6393         (parse_algo_usage_expire): Return const char *.
6394
6395 2018-03-27  NIIBE Yutaka  <gniibe@fsij.org>
6396
6397         agent,scd: Use pointer to represent HANDLE.
6398         + commit 96918346beeca7a46de9f03f19502373994c21bc
6399         * agent/call-scd.c [HAVE_W32_SYSTEM] (start_scd): Format with %p.
6400         * scd/command.c [HAVE_W32_SYSTEM] (option_handler): Use void *.
6401
6402 2018-03-27  Werner Koch  <wk@gnupg.org>
6403
6404         agent: Make the request origin a part of the cache items.
6405         + commit 02dce8c0cc57deb2095a9b06aeb8f4dea34eef7e
6406         * agent/cache.c (agent_put_cache): Add arg 'ctrl' and change all
6407         callers to pass it.
6408         (agent_get_cache): Ditto.
6409
6410         * agent/cache.c (struct cache_items_s): Add field 'restricted'.
6411         (housekeeping): Adjust debug output.
6412         (agent_flush_cache): Ditto.
6413         (agent_put_cache): Ditto.  Take RESTRICTED into account.
6414         (agent_get_cache): Ditto.
6415
6416 2018-03-26  Werner Koch  <wk@gnupg.org>
6417
6418         gpg: Auto-fix a broken trustdb with just the version record.
6419         + commit eb68c2d3d1b03a18cd24406fa46d4c30cb13d9f7
6420         * g10/tdbio.c (get_trusthashrec): Create hashtable on error.
6421
6422         gpg: Pass CTRL arg to get_trusthashrec.
6423         + commit a750ebebf35a392f1c72d6aee5618df0d9f25ff7
6424         * g10/tdbio.c (get_trusthashrec): Add arg CTRL.
6425         (tdbio_search_trust_byfpr): Ditto.
6426         (tdbio_search_trust_bypk): Ditto.
6427
6428         gpg: Return better error codes in case of a too short trustdb.
6429         + commit 403aa70c52e56614d65490dea9344113f9cf3d29
6430         * g10/tdbio.c (tdbio_read_record): Return GPG_ERR_EOF.
6431         (tdbio_new_recnum): Never return on error.
6432         (lookup_hashtable): Print a more descriptive error in case of !TABLE.
6433
6434         gpg: Fix trustdb updates without lock held.
6435         + commit 456a3a8e93ea14f821e0e98fb515f284ece98685
6436         * g10/tdbio.c (is_locked): Turn into a counter.
6437         (take_write_lock, release_write_lock): Implement recursive locks.
6438
6439         gpg: Disable unused code parts in tdbio.c.
6440         + commit 5f00531463ebc0e606c502696962426007545bb7
6441         * g10/tdbio.c (in_transaction): Comment this var.
6442         (put_record_into_cache): Comment the transaction code.
6443         (tdbio_sync): Ditto
6444
6445 2018-03-23  Werner Koch  <wk@gnupg.org>
6446
6447         sm: Add OPTION request-origin.
6448         + commit 137644c9cb58deaaba6850f2763d9c5f9241cb0b
6449         * sm/server.c: Include shareddefs.h.
6450         (option_handler): Add option.
6451
6452         gpg,sm: New option --request-origin.
6453         + commit 2cd35df5db3c4dfe37616dcfb1fcc644959449ef
6454         * g10/gpg.c (oRequestOrigin): New const.
6455         (opts): New option --request-origin.
6456         (main): Parse that option.
6457         * g10/options.h (struct opt): Add field request_origin.
6458         * g10/call-agent.c (start_agent): Send option to the agent.
6459         * sm/gpgsm.c (oRequestOrigin): New const.
6460         (opts): New option --request-origin.
6461         (main): Parse that option.
6462         * sm/gpgsm.h (struct opt): Add field request_origin.
6463         * sm/call-agent.c (start_agent): Send option to the agent.
6464
6465         agent: New OPTION pretend-request-origin.
6466         + commit 05c55ee260edc07cd19da56dfd00347bfe3f529c
6467         * common/shareddefs.h (request_origin_t): New.
6468         * common/agent-opt.c (parse_request_origin): New.
6469         (str_request_origin): New.
6470         * agent/command.c (option_handler): Implement new option.
6471
6472 2018-03-23  NIIBE Yutaka  <gniibe@fsij.org>
6473
6474         build: Fix the manual source field.
6475         + commit 5400a5bb77bddcb14c94d9405312d6181322b090
6476
6477
6478 2018-03-22  Werner Koch  <wk@gnupg.org>
6479
6480         gpg: Implement --dry-run for --passwd.
6481         + commit 165bc38cefbc03515403b60b704cabf4dc0b71f4
6482         * g10/keyedit.c (change_passphrase): Take care of --dry-run.
6483
6484 2018-03-22  NIIBE Yutaka  <gniibe@fsij.org>
6485
6486         scd: Support KDF DO setup.
6487         + commit 0152ba7c987443d641ce1091c79f90ef2cc46498
6488         * g10/call-agent.c (learn_status_cb): Parse the capability for KDF.
6489         * g10/card-util.c (gen_kdf_data, kdf_setup): New.
6490         (card_edit): New admin command cmdKDFSETUP to call kdf_setup.
6491         * scd/app-openpgp.c (do_getattr): Emit KDF capability.
6492
6493 2018-03-21  Werner Koch  <wk@gnupg.org>
6494
6495         gpg: Fix out-of-bound read in subpacket enumeration.
6496         + commit 983f7b2acbd1e7580652bbeb0c3d64f9dd19d9e4
6497         * g10/parse-packet.c (enum_sig_subpkt): Check buflen before reading
6498         the type octet.  Print diagnostic.
6499
6500 2018-03-19  NIIBE Yutaka  <gniibe@fsij.org>
6501
6502         scd: signal mask should be set just after npth_init.
6503         + commit 11bbd99477ef5ba5b7db0c17607b10af03c68afb
6504         * scd/scdaemon.c (setup_signal_mask): New.
6505         (main): Call setup_signal_mask.
6506         (handle_connections): Remove signal mask setup.
6507
6508 2018-03-16  NIIBE Yutaka  <gniibe@fsij.org>
6509
6510         scd: Better user interaction for factory-reset.
6511         + commit 2c85e202bc30231b9555100dec0c490c60d7b88c
6512         * g10/card-util.c (factory_reset): Dummy PIN size is now 32-byte.
6513         Connect the card again at the last step.
6514
6515 2018-03-15  NIIBE Yutaka  <gniibe@fsij.org>
6516
6517         scd: Fix suspend/resume handling for CCID driver.
6518         + commit fd23a0524d8060ed12d87c679b7823686614aaee
6519         * scd/ccid-driver.c (intr_cb): Try submitting INTERRUPT urb
6520         to see if it's suspend/resume.
6521
6522 2018-03-13  NIIBE Yutaka  <gniibe@fsij.org>
6523
6524         scd: After fatal error, shutdown a reader.
6525         + commit c84bae69e9e02923f7180e09d161cb0b13257436
6526         * scd/apdu.c (pcsc_send_apdu): Notify main loop after
6527         fatal errors.
6528
6529         scd: Fix for GNU/Linux suspend/resume.
6530         + commit 71e5282c25ba812c7091e587edd721839bc4c2ac
6531         * configure.ac (require_pipe_to_unblock_pselect): Default is "yes".
6532         * scd/scdaemon.c (scd_kick_the_loop): Minor clean up.
6533
6534 2018-03-12  NIIBE Yutaka  <gniibe@fsij.org>
6535
6536         scd: Fix typo in previous commit.
6537         + commit 655f0b9ad0138e6f960bf4befaf0eea569256614
6538
6539
6540 2018-03-09  NIIBE Yutaka  <gniibe@fsij.org>
6541
6542         scd: More fix with PC/SC for Windows.
6543         + commit 1e27c0e04cd3280d498dc8b72d2e410f6287f656
6544         * scd/apdu.c (pcsc_get_status): Return status based on CURRENT_STATUS.
6545         Add debug log.
6546
6547 2018-03-08  NIIBE Yutaka  <gniibe@fsij.org>
6548
6549         scd: Fix status check when using PC/SC.
6550         + commit f8b8b6aac2ca1cb34d7a346aee1d874e7650557b
6551         * scd/apdu.c (struct reader_table_s): Add field of current_state.
6552         (new_reader_slot): Initialize current_state.
6553         (pcsc_get_status): Keep the status in READER_TABLE array.
6554         Return SW_HOST_NO_READER when PCSC_STATE_CHANGED.
6555         * scd/scdaemon.c (handle_connections): Silence a warning.
6556
6557 2018-03-06  Werner Koch  <wk@gnupg.org>
6558
6559         agent: Also evict cached items via a timer.
6560         + commit f060cb5c63923d6caec784f65f3bb0aadf52f795
6561         * agent/cache.c (agent_cache_housekeeping): New func.
6562         * agent/gpg-agent.c (handle_tick): Call it.
6563
6564 2018-03-01  Werner Koch  <wk@gnupg.org>
6565
6566         gpg: Print the keygrip with --card-status.
6567         + commit fd595c9d3642dba437fbe0f6e25d7aaaae095f94
6568         * g10/call-agent.h (agent_card_info_s): Add fields grp1, grp2 and
6569         grp3.
6570         * g10/call-agent.c (unhexify_fpr): Allow for space as delimiter.
6571         (learn_status_cb): Parse KEYPARIINFO int the grpX fields.
6572         * g10/card-util.c (print_keygrip): New.
6573         (current_card_status): Print "grp:" records or with --with-keygrip a
6574         human readable keygrip.
6575
6576 2018-02-28  Andre Heinecke  <aheinecke@intevation.de>
6577
6578         gpgconf, w32: Allow UNC paths.
6579         + commit e43844c3b0b9ec93b7f2a88752bcd6b6244aacfb
6580         * tools/gpgconf-comp.c (get_config_filename): Allow UNC paths.
6581
6582 2018-02-22  Michał Górny  <mgorny@gentoo.org>
6583
6584         dirmngr: Handle failures related to missing IPv6 gracefully.
6585         + commit ecfc4db3a2f8bc2652ba4ac4de5ca1cd13bfcbec
6586         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Handle two more
6587         error codes.
6588
6589 2018-02-22  Werner Koch  <wk@gnupg.org>
6590
6591         Release 2.2.5.
6592         + commit 9581a65ccc10daededc05c55391a04022f794a4a
6593
6594
6595         gpg: Don't let gpg return failure on an invalid packet in a keyblock.
6596         + commit b375d50ee4ce52c9b0f0855ec155be027642fb05
6597         * g10/keydb.c (parse_keyblock_image): Use log_info instead of
6598         log_error for skipped packets.
6599         * g10/keyring.c (keyring_get_keyblock): Ditto.
6600
6601 2018-02-22  NIIBE Yutaka  <gniibe@fsij.org>
6602
6603         g10: Select a secret key by checking availability under gpg-agent.
6604         + commit 88e766d3915c2919e9968148ebb30463d4a673e4
6605         * g10/getkey.c (finish_lookup): Add WANT_SECRET argument to confirm
6606         by agent_probe_secret_key.
6607         (get_pubkey_fromfile, lookup): Supply WANT_SECRET argument.
6608
6609 2018-02-20  Werner Koch  <wk@gnupg.org>
6610
6611         wks: Add special mode to --install-key.
6612         + commit 685a5e1558b2252ac895637fb857f6f7bb85ea7b
6613         * tools/gpg-wks-client.c (get_key_status_parm_s)
6614         (get_key_status_cb, get_key): Move to ...
6615         * tools/wks-util.c: ...here.
6616         (get_key): Rename to wks_get_key.
6617         * tools/gpg-wks-server.c: Include userids.h.
6618         (command_install_key): Allow use of a fingerprint.
6619
6620         wks: Implement server command --install-key.
6621         + commit ee474856ec16ff11d922d8503fb3ede77129c4aa
6622         * tools/wks-util.c (wks_filter_uid): Add arg 'binary'.
6623         * tools/gpg-wks-server.c (main): Expect 2 args for --install-key.
6624         (write_to_file): New.
6625         (check_and_publish): Factor some code out to ...
6626         (compute_hu_fname): ... new.
6627         (command_install_key): Implement.
6628
6629         wks: Support alternative submission address.
6630         + commit 1877603761911ea5b1c15f4aef11a2cf86a8682c
6631         * tools/gpg-wks.h (policy_flags_s): Add field 'submission_address'.
6632         * tools/wks-util.c (wks_parse_policy): Parse that field.
6633         (wks_free_policy): New.
6634         * tools/gpg-wks-client.c (command_send): Also try to take the
6635         submission-address from the policy file.  Free POLICY.
6636         * tools/gpg-wks-server.c (process_new_key): Free POLICYBUF.
6637         (command_list_domains): Free POLICY.
6638
6639 2018-02-15  Werner Koch  <wk@gnupg.org>
6640
6641         kbx: Fix detection of corrupted keyblocks on 32 bit systems.
6642         + commit 5e3679ae395e7a7e44f218f07bbe487429f1b279
6643         * kbx/keybox-search.c (blob_cmp_fpr): Avoid overflow in OFF+LEN
6644         checking.
6645         (blob_cmp_fpr_part): Ditto.
6646         (blob_cmp_name): Ditto.
6647         (blob_cmp_mail): Ditto.
6648         (blob_x509_has_grip): Ditto.
6649         (keybox_get_keyblock): Check OFF and LEN using a 64 bit var.
6650         (keybox_get_cert): Ditto.
6651
6652 2018-02-15  NIIBE Yutaka  <gniibe@fsij.org>
6653
6654         gpg: Fix reversed messages for --only-sign-text-ids.
6655         + commit ca138d5bf36accde2fd755249b470a8dc8743c95
6656         * g10/keyedit.c (keyedit_menu): Fix messages.
6657
6658 2018-02-14  Katsuhiro Ueno  <uenobk@gmail.com>
6659
6660         agent: Avoid appending a '\0' byte to the response of READKEY.
6661         + commit df97fe24807826ddc2af0e45e416fb81c5666f88
6662         * agent/command.c (cmd_readkey): Set pkbuflen to the length of the output
6663         without an extra '\0' byte.
6664
6665 2018-02-14  Werner Koch  <wk@gnupg.org>
6666
6667         sm: Fix minor memory leak in --export-p12.
6668         + commit 80719612b7e92aff5887f2a68d550a24f350722c
6669         * sm/export.c (gpgsm_p12_export): Free KEYGRIP.
6670
6671 2018-02-14  Katsuhiro Ueno  <uenobk@gmail.com>
6672
6673         sm: Fix a wrong key parameter in an exported private key file.
6674         + commit 29aac7798085ee38da5107698618890ae7593c96
6675         * sm/export.c (sexp_to_kparms): Fix the computation of array[6],
6676         which must be 'd mod (q-1)' but was 'p mod (q-1)'.
6677
6678 2018-02-14  Werner Koch  <wk@gnupg.org>
6679
6680         common: Use new function to print status strings.
6681         + commit f19ff78f0fbfc2793d8a9ab0173486bf712871ac
6682         * common/asshelp2.c (vprint_assuan_status_strings): New.
6683         (print_assuan_status_strings): New.
6684         * agent/command.c (agent_write_status): Replace by call to new
6685         function.
6686         * dirmngr/server.c (dirmngr_status): Ditto.
6687         * g13/server.c (g13_status): Ditto.
6688         * g13/sh-cmd.c (g13_status): Ditto.
6689         * sm/server.c (gpgsm_status2): Ditto.
6690         * scd/command.c (send_status_info): Bump up N.
6691
6692 2018-02-13  Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
6693
6694         scd: Improve KDF-DO support.
6695         + commit 25f3b69129015c54392636818c8846e236f5cb2c
6696         * scd/app-openpgp.c (pin2hash_if_kdf): Check the content of KDF DO.
6697
6698 2018-02-12  NIIBE Yutaka  <gniibe@fsij.org>
6699
6700         scd: Fix handling for Data Object with no data.
6701         + commit 0a3bec2c2525935362f87dce93d7df2c8d498498
6702         * scd/app-openpgp.c (get_cached_data): Return NULL for Data Object
6703         with no data.
6704
6705 2018-02-09  Andre Heinecke  <aheinecke@intevation.de>
6706
6707         doc: Add compliance de-vs to gpgsm in vsnfd.prf.
6708         + commit e0658b19d93b38ed9ebd07734c4678acdde1607d
6709         * doc/examples/vsnfd.prf: Set complaince mode for gpgsm.
6710
6711 2018-02-07  NIIBE Yutaka  <gniibe@fsij.org>
6712
6713         scd: Use pipe to kick the loop on NetBSD.
6714         + commit 015fe1c47b91da340e9df6bed908e0747ae8c60b
6715         * configure.ac (HAVE_PSELECT_NO_EINTR): New.
6716         * scd/scdaemon.c (scd_kick_the_loop): Write to pipe.
6717         (handle_connections): Use pipe.
6718
6719 2018-01-29  NIIBE Yutaka  <gniibe@fsij.org>
6720
6721         tests: Fix for NetBSD with __func__.
6722         + commit 64aa98c8a05513d9c00f53a2b880d80f9035333e
6723         * tests/asschk.c: Don't define __func__ if available.
6724
6725 2018-01-27  Werner Koch  <wk@gnupg.org>
6726
6727         dirmngr: Improve assuan error comment for cmd keyserver.
6728         + commit f8e868d9dfb6fc1390e421e7993a1d076309ed83
6729         * dirmngr/server.c: Add error comment in case --resolve fails in
6730         ensure_keyserver.
6731
6732 2018-01-26  NIIBE Yutaka  <gniibe@fsij.org>
6733
6734         agent: Fix last commit.
6735         + commit d7207b39b71d1b07c4cddac602f29ec583f6d1ad
6736         * configure.ac: Check ucred.h as well as sys/ucred.h.
6737         * agent/command-ssh.c: Add inclusion of ucred.h.
6738
6739         agent: More fix for get_client_pid for portability.
6740         + commit 08e686a6a6d5bcb5410228b388745d09686b260c
6741             * configure.ac: Check sys/ucred.h instead of ucred.h.
6742             * agent/command-ssh.c: Include sys/ucred.h.
6743
6744 2018-01-22  NIIBE Yutaka  <gniibe@fsij.org>
6745
6746         scd: Support KDF Data Object of OpenPGPcard V3.3.
6747         + commit 91303b7df9c3e810cfcd4920f78bac6f8b7df2b2
6748         * scd/app-openpgp.c (do_getattr, do_setattr): Add KDF support.
6749         (pin2hash_if_kdf): New.
6750         (verify_a_chv): Add PINLEN arg.  Use pin2hash_if_kdf.
6751         (verify_chv2, do_sign): Follow the change of verify_a_chv.
6752         (verify_chv3, do_change_pin): Use pin2hash_if_kdf.
6753
6754 2018-01-18  Werner Koch  <wk@gnupg.org>
6755
6756         gpg: Fix the use of future-default with --quick-add-key.
6757         + commit e1e35db510c9222e7a7dc208c2e49df556954170
6758         * g10/keygen.c (parse_key_parameter_part): Add arg clear_cert.
6759         (parse_key_parameter_string): Add arg suggested_use and implement
6760         fallback.  Change callers to pass 0 for new arg.
6761         (parse_algo_usage_expire): Pass the parsed USAGESTR to
6762         parse_key_parameter_string so that it can use it in case a subkey is
6763         to be created.
6764
6765 2018-01-09  Andre Heinecke  <aheinecke@intevation.de>
6766
6767         doc: Note pinentry-mode for passphrase opts.
6768         + commit 6fb5713f4a6976900cc70c140e61043b6ef688d1
6769         * doc/gpg.texi (--passphrase, --passphrase-file, --passphrase-fd):
6770         Note that pinentry-mode needs to be loopback.
6771
6772 2018-01-08  Werner Koch  <wk@gnupg.org>
6773
6774         gpg: Print all keys with --decrypt --list-only.
6775         + commit 339b3301ee8410fe3bbdebb66a6e83801d79d40d
6776         * g10/mainproc.c (proc_pubkey_enc): Use dedicated error code for
6777         list-only and put the key into PKENC_LIST.
6778         (print_pkenc_list): Take care of the new error code.
6779
6780 2018-01-01  Werner Koch  <wk@gnupg.org>
6781
6782         gpg: Allow "futuredefault" as alias for "future-default".
6783         + commit 4d3c500f4793eb263940ff5ef87ec4ead63c9b4b
6784         * g10/keygen.c (parse_key_parameter_string): Allow "futuredefault" and
6785         use case-insensitive matching
6786         (quick_generate_keypair): Ditto.
6787         (parse_algo_usage_expire): Ditto.
6788
6789 2017-12-29  Werner Koch  <wk@gnupg.org>
6790
6791         gpg: Allow the use of "cv25519" and "ed25519" in the keygen parms.
6792         + commit 412bb7a801f242d47a82712080cce6ddbb843166
6793         * g10/keygen.c (gen_ecc): Map curve names.
6794
6795 2017-12-27  NIIBE Yutaka  <gniibe@fsij.org>
6796
6797         scd: Fix for inactive card at start by internal CCID driver.
6798         + commit 4f88b0f56134af2ce56d434b7acd47fcf9b6f7cf
6799         * scd/ccid-driver.c (do_close_reader): Set NULL on close.
6800         (bulk_in): Move DEBUGOUT and check by EP_INTR.
6801         (ccid_get_atr): Clear powered_off flag after initial status check.
6802
6803 2017-12-22  Werner Koch  <wk@gnupg.org>
6804
6805         kbx: Simplify by removing custom memory functions.
6806         + commit f3ba66781a07af2e32f5887e6e15acdd4822a431
6807         * kbx/keybox-util.c (keybox_set_malloc_hooks): Remove.
6808         (_keybox_malloc, _keybox_calloc, keybox_realloc)
6809         (_keybox_free): Remove.
6810         (keybox_file_rename): Remove.  Was not used.
6811         * sm/gpgsm.c (main): Remove call to keybox_set_malloc_hooks.
6812         * kbx/kbxutil.c (main): Ditto.
6813         * kbx/keybox-defs.h: Remove all separate includes.  Include util.h.
6814         remove convenience macros.
6815         * common/logging.h (return_if_fail): New.  Originally from
6816         keybox-defs.h but now using log_debug.
6817         (return_null_if_fail): Ditto.
6818         (return_val_if_fail): Ditto.
6819         (never_reached): Ditto.
6820
6821 2017-12-20  Werner Koch  <wk@gnupg.org>
6822
6823         common: Use larger buffer for homedir in case of 64 bit UIDs.
6824         + commit 290348e349e8d56a856f187a08e913f2ed525b3c
6825         * common/homedir.c (_gnupg_socketdir_internal): Enlarge PREFIX by 6
6826         bytes for "/gnupg".
6827
6828         Release 2.2.4.
6829         + commit 558b17593ae97b8a07d06bf0d6af1a626b304501
6830
6831
6832 2017-12-19  Petr Pisar  <petr.pisar@atlas.cz>
6833
6834         po: Update Czech translation.
6835         + commit 43aaf60449036e870cc25b77fbb7312cf3fb534c
6836
6837
6838 2017-12-19  Ineiev  <ineiev@gnu.org>
6839
6840         po: Update Russian translation.
6841         + commit c7b8ec6c8e57797f0b77dbf7fca85fb600323328
6842
6843
6844 2017-12-19  Werner Koch  <wk@gnupg.org>
6845
6846         wks: New server options --check, --with-dir, with-file.
6847         + commit 7449063b1af2eef73d621a69cdb2fb713ab1ae6c
6848         * tools/gpg-wks-server.c (aCheck, oWithDir, oWithFile): New const.
6849         (opts): New options --check, --with-dir, and --with-file.
6850         (main): Call command_check_key.
6851         (command_list_domains): Implement option --with-dir.
6852         (fname_from_userid): New.
6853         (command_check_key): New.
6854         (command_remove_key): Implement existsing command.
6855         (command_revoke_key): Call command_remove_key as a simple
6856         implementation.
6857
6858 2017-12-18  Werner Koch  <wk@gnupg.org>
6859
6860         conf: New option --status-fd.
6861         + commit 482e000b8a7e336f342a7fac3b7379257e944b6e
6862         * tools/gpgconf.c (oStatusFD): New const.
6863         (opts): New option --status-fd.
6864         (statusfp): New var.
6865         (set_status_fd): New.
6866         (gpgconf_write_status): New.
6867         (gpgconf_failure): New.
6868         (main): Set status fd and replace exit by gpgconf_failure.
6869         * tools/gpgconf-comp.c: Repalce exit by gpgconf_failure.
6870         (gc_process_gpgconf_conf): Print a few warning status messages.
6871
6872         gpgconf: Show --compliance in expert mode.
6873         + commit d74c40cef0a97cd98aa05f13b1541a94eda502a6
6874         * tools/gpgconf-comp.c (gc_options_gpg): Set compliance to expert.
6875         (gc_options_gpgsm): Ditto.
6876
6877         sm: Allow explicit setting of the default --compliance=gnupg.
6878         + commit 8c878ae4c9dfa9fe26aa15f4f9db3e86833575e9
6879         * sm/gpgsm.c (main): Allow setting of the default compliance.
6880         * tools/gpgconf-comp.c (gc_options_gpgsm): Add "compliance".
6881
6882 2017-12-18  NIIBE Yutaka  <gniibe@fsij.org>
6883
6884         po: Update Japanese translation.
6885         + commit e3ddeff66e8c08a37ddf8b6510d69579c245e192
6886         * po/ja.po: Fix message with no "%s".
6887
6888 2017-12-13  Werner Koch  <wk@gnupg.org>
6889
6890         gpg: Print a warning for too much data encrypted with 3DES et al.
6891         + commit 416cf9e9be5d2daf0ef629208031989699b3653f
6892         * g10/filter.h (cipher_filter_context_t): Remove unused filed
6893         'create_mdc'.  Turn field 'header' into a bit field.  Add new fields
6894         'short_blklen_warn' and 'short_blklen_count'.
6895         * g10/cipher.c (write_header): Print a warning if MDC is not used.
6896         (cipher_filter): Print a warning for long messages encrypted with a
6897         short block length algorithm.
6898
6899         gpg: Simplify cipher:write_header.
6900         + commit b5333e13cbc9db354ed90762190bf70605a02d1f
6901         * g10/cipher.c (write_header): Use write_status_printf.
6902
6903         gpg: Simplify default_recipient().
6904         + commit 9f641430dcdecbd7ee205d407cb19bb4262aa95d
6905         * g10/pkclist.c (default_recipient): Use hexfingerprint.
6906
6907         gpg: Return an error from hexfingerprint on malloc error.
6908         + commit cd26c5482b10bee7658959ae913f2ddb83190587
6909         * g10/keyid.c (hexfingerprint): Return NULL on malloc failure.  Chnage
6910         all callers.
6911
6912         gpg: Remove some xmallocs.
6913         + commit 29119a6492eda5dd7920e45e7f2faa043d436591
6914         * g10/getkey.c (get_pubkeys): Do not use xmalloc.
6915
6916 2017-12-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
6917
6918         gpg: default-preference-list: prefer SHA512.
6919         + commit 8ede3ae29a39641a2f98ad9a4cf61ea99085a892
6920         * g10/keygen.c (keygen_set_std_prefs): when producing default internal
6921         personal-digest-preferences, keep the same order.  When publishing
6922         external preferences, state preference for SHA512 first.
6923
6924 2017-12-12  Werner Koch  <wk@gnupg.org>
6925
6926         Change backlog from 5 to 64 and provide option --listen-backlog.
6927         + commit c81a447190d2763ac4c64b2e74e22e824da8aba3
6928         * agent/gpg-agent.c (oListenBacklog): New const.
6929         (opts): New option --listen-backlog.
6930         (listen_backlog): New var.
6931         (main): Parse new options.
6932         (create_server_socket): Use var instead of 5.
6933         * dirmngr/dirmngr.c: Likewise.
6934         * scd/scdaemon.c: Likewise.
6935
6936         build: New configure option --enable-run-gnupg-user-socket.
6937         + commit 17efcd2a2acdc3b7f00711272aa51e5be2476921
6938         * configure.ac: (USE_RUN_GNUPG_USER_SOCKET): New ac_define.
6939         * common/homedir.c (_gnupg_socketdir_internal): Add extra directories.
6940
6941 2017-12-11  Werner Koch  <wk@gnupg.org>
6942
6943         dirmngr: Check for WKD support at session end.
6944         + commit 20b52be9ca29b0bc843fc68a279cb72728ede72f
6945         * dirmngr/domaininfo.c (insert_or_update): Copy the name.
6946         * dirmngr/misc.c (copy_stream): Allow arg OUT to be NULL.
6947         * dirmngr/server.c (set_error): Protect CTX.
6948         (dirmngr_status): Protect against missing ASSUAN_CTX.
6949         (dirmngr_status_help): Ditto.
6950         (dirmngr_status_printf): Ditto.
6951         (cmd_wkd_get): Factor code out to ...
6952         (proc_wkd_get): new func.  Support silent operation with no CTX.
6953         (task_check_wkd_support): New.
6954
6955         dirmngr: Add a background task framework.
6956         + commit f2997adee0455c8c0fa391a853ec1b0c9fc43342
6957         * dirmngr/workqueue.c: New.
6958         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new file.
6959         * dirmngr/server.c (server_local_s): New field session_id.
6960         (cmd_wkd_get): Add a task.
6961         (task_check_wkd_support): New stub function.
6962         (cmd_getinfo): New sub-commands "session_id" and "workqueue".
6963         (start_command_handler): Add arg session_id and store it in
6964         SERVER_LOCAL.
6965         (dirmngr_status_helpf): New.
6966         * dirmngr/dirmngr.h (wqtask_t): New type.
6967         * dirmngr/dirmngr.c (main): Pass 0 as session_id to
6968         start_command_handler.
6969         (start_connection_thread): Introduce a session_id and pass it to
6970         start_command_handler.  Run post session tasks.
6971         (housekeeping_thread): Run global workqueue tasks.
6972
6973         dirmngr: Limit the number of cached domains for WKD.
6974         + commit 7a663c296e687f12ccd9a21d414de780feb4dfcf
6975         * dirmngr/domaininfo.c (MAX_DOMAINBUCKET_LEN): New.
6976         (insert_or_update): Limit the length of a bucket chain.
6977         (domaininfo_print_stats): Print just one summary line.
6978
6979         (cherry picked from commit 26f08343fbccdbaa177c3507a3c5e24a5cf94a2d)
6980
6981         dirmngr: Keep track of domains used for WKD queries.
6982         + commit 6c1dcd79cf0977844179d9a7b189c10af5e42a7e
6983         * dirmngr/domaininfo.c: New file.
6984         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
6985         * dirmngr/server.c (cmd_wkd_get): Check whether the domain is already
6986         known and tell domaininfo about the results.
6987
6988 2017-12-08  NIIBE Yutaka  <gniibe@fsij.org>
6989
6990         agent: Fix description of shadow format.
6991         + commit 5c121d44443b0a96ec6ea82b90717e3dbafd2cc5
6992         * agent/keyformat.txt, agent/protect.c, agent/t-protect.c: Fix.
6993
6994 2017-12-07  Werner Koch  <wk@gnupg.org>
6995
6996         build: Do not define logging.h constants for libgpg-error dev versions.
6997         + commit 2fedf8583bcc493f587c90bc9632d25dfd10bd10
6998         * common/logging.h [GPGRT_LOG_WITH_PREFIX]: Do not define the log
6999         constants.
7000
7001 2017-12-07  NIIBE Yutaka  <gniibe@fsij.org>
7002
7003         agent: Change intialization of assuan socket system hooks.
7004         + commit b9677ba16f6b386896781a751e4b2fc839e3ec81
7005         * agent/gpg-agent.c (initialize_modules): Add hook again.
7006         (main): Remove setting of the system houk but add scoket system hook
7007         setting after assuan initialization.
7008
7009 2017-12-06  NIIBE Yutaka  <gniibe@fsij.org>
7010
7011         agent: Set assuan system hooks before call of assuan_sock_init.
7012         + commit 1524ba9656f0205d8c6ef504f773b832a7a12ab9
7013         * agent/gpg-agent.c (initialize_modules): Move assuan_set_system_hooks.
7014         (main): ... here, just before assuan_sock_init.
7015
7016 2017-12-04  NIIBE Yutaka  <gniibe@fsij.org>
7017             Damien Goutte-Gattat  <dgouttegattat@incenp.org>
7018
7019         g10: Fix regexp sanitization.
7020         + commit 0d0b9eb0d4f99e8d293a4ce4b90921a879905115
7021         * g10/trustdb.c (sanitize_regexp): Only escape operators.
7022
7023 2017-11-26  Werner Koch  <wk@gnupg.org>
7024
7025         gpg: Do not read from uninitialized memory with --list-packets.
7026         + commit 4cf3cc6e3d48c8400466ca29c3f1c22ed2da6c2c
7027         * g10/parse-packet.c (parse_plaintext): Fill up the allocated NAME.
7028
7029 2017-11-24  Werner Koch  <wk@gnupg.org>
7030
7031         agent: New option --auto-expand-secmem.
7032         + commit 18af15249de5f826c3fa8d1d40e876734adcd0cf
7033         * agent/gpg-agent.c (oAutoExpandSecmem): New enum value.
7034         (opts): New option --auto-expand-secmem.
7035         (main): Implement that option.
7036
7037 2017-11-22  Werner Koch  <wk@gnupg.org>
7038
7039         gpg: Fix memory leaking for long inputs via --command-fd.
7040         + commit ea28ea18f3ee6c9f5e69986f39848398b58e242e
7041         * g10/cpr.c (do_get_from_fd): Free the old buffer.
7042
7043 2017-11-21  NIIBE Yutaka  <gniibe@fsij.org>
7044
7045         scd: Enable card removal check after select_application.
7046         + commit 0bb7fd0cab2d53cd0d44b21301b23edfe817e66b
7047         * scd/apdu.c (open_ccid_reader): Fix error handling of ccid_get_atr.
7048         * scd/app.c (select_application): Always kick the loop if new APP.
7049         * scd/ccid-driver.c (ccid_open_usb_reader): Don't setup at open.
7050         (ccid_slot_status): Setup interrupt transfer when !ON_WIRE.
7051
7052 2017-11-20  Werner Koch  <wk@gnupg.org>
7053
7054         Release 2.2.3.
7055         + commit 97f4feaaca8da4dcf1ca09a2016693155016f06b
7056
7057
7058         build: Use -Werror only for the check.
7059         + commit 04d9833e71cc9d0c087faec091c29b0b6cf69488
7060         * configure.ac: Do not add -Werror to mycflags.
7061
7062         gpg-agent: Avoid getting stuck in shutdown pending state.
7063         + commit 7ffedfab8909a45a4b0347a5f7b52222e8439f1d
7064         * agent/gpg-agent.c (handle_connections): Always check inotify fds.
7065
7066 2017-11-20  NIIBE Yutaka  <gniibe@fsij.org>
7067
7068         agent: Use clock or clock_gettime for calibration.
7069         + commit 760aa8aadafb747f33a1461ab0c2570b5ae43716
7070         * agent/protect.c (calibrate_get_time): Use clock or clock_gettime.
7071
7072         build: Check -Wlogical-op flag availability with -Werror.
7073         + commit 3ecd1a41be7c880976987d13e88342c98f37e064
7074         * configure.ac: Use -Werror.
7075
7076         build: BSD make support for yat2m.
7077         + commit e1984969cac06a88c7e6f5e49e5c3104d10a847d
7078         * configure.ac (YAT2M): Only define when found.
7079         * doc/Makefile.am: Portability fix.
7080
7081 2017-11-17  Werner Koch  <wk@gnupg.org>
7082
7083         dirmngr: Fix double free of a hash context in the error case.
7084         + commit 2aa106d6a4e2b09c257e8d769895d93ebb7f7edf
7085         * dirmngr/crlcache.c: Clearly document that this fucntions takes
7086         ownership of MD.
7087         (abort_sig_check): Allow NULL for MD.
7088         (crl_parse_insert): Immediately set MD to NULL.  Remove check for md
7089         before a calling abort_sig_check.
7090
7091 2017-11-15  Andre Heinecke  <aheinecke@intevation.de>
7092
7093         w32: Fix default registry path.
7094         + commit 4f5afaf1fdb5cb13859aca390ccb5a1ba1dba00c
7095         * configure.ac (GNUPG_REGISTRY_DIR): Remove leading backslash.
7096
7097         gpgtar: Prefer --set-filename over implicit name.
7098         + commit 878b8bfdcc3a8becfc46b9287a2d14cd3c875f28
7099         * tools/gpgtar-extract.c: Prefer opt.filename over filename
7100         for the directory prefix.
7101
7102 2017-11-15  Werner Koch  <wk@gnupg.org>
7103
7104         gpg: Print AKL info only in verbose mode.
7105         + commit b062ea5bc25157c942047b3fe7f5182a06106340
7106         * g10/getkey.c (get_pubkey_byname): Print info only in verbose mode.
7107
7108 2017-11-14  Andre Heinecke  <aheinecke@intevation.de>
7109
7110         sm, w32: Fix initial keybox creation.
7111         + commit 5ecef193bc2144e6d51a6bd5727bfd08a0d28b66
7112         * sm/keydb.c (maybe_create_keybox): Open new keybox in bin mode.
7113
7114 2017-11-07  Werner Koch  <wk@gnupg.org>
7115
7116         Release 2.2.2.
7117         + commit 5bd515005032f9340bd73e4346bbd0aef8518074
7118
7119
7120         dirmngr: Reduce default LDAP timeout to 15 seconds.
7121         + commit 30f21f8b0fa6844a9bba3f24dc41b3ac32170109
7122         * dirmngr/dirmngr.c (DEFAULT_LDAP_TIMEOUT): Change to 15.
7123         * dirmngr/dirmngr_ldap.c (DEFAULT_LDAP_TIMEOUT): Ditto.
7124
7125         (cherry picked from commit ab7ac827041b5cd97bbca7a75b0930072dd6611f)
7126
7127         speedo: Include software versions in the W32 README.
7128         + commit 23bfac6d1a8bd2d0af5a6fac3ba3a6e986d6c9e8
7129         (cherry picked from commit f9f72ffbfa9fd7d1a7a1823697d116d76155b407)
7130
7131 2017-11-07  Ineiev  <ineiev@gnu.org>
7132
7133         po: Update Russian translation.
7134         + commit 1941287c9d2c9e666bad1bd330db169f0e3d6b6c
7135
7136
7137 2017-11-07  NIIBE Yutaka  <gniibe@fsij.org>
7138
7139         po: Update Japanese translation.
7140         + commit 96d441b315ec5c9f329596cfda28ac13a8bfa21a
7141
7142
7143 2017-11-06  Werner Koch  <wk@gnupg.org>
7144
7145         agent: New GETINFO sub-commands "s2k_count_cal" and "s2k_time".
7146         + commit 3607ab2cf382296cb398a92d5ec792239960bf7b
7147         * agent/command.c (cmd_getinfo): New sub-commands.
7148         * agent/protect.c (get_standard_s2k_count): Factor some code out to ...
7149         (get_calibrated_s2k_count): new.
7150         (get_standard_s2k_time): New.
7151
7152         (cherry picked from commit 52d41c8b0f4af6278d18d8935399ddad16a26856)
7153
7154         agent: New option --s2k-count.
7155         + commit 78a6d0ce88ae14d8324fbab3aee3286b17e49259
7156         * agent/agent.h (opt): New field 's2k_count'.
7157         * agent/gpg-agent.c (oS2KCount): New enum value.
7158         (opts): New option --s2k-count.
7159         (parse_rereadable_options): Set opt.s2k_count.
7160
7161 2017-11-06  NIIBE Yutaka  <gniibe@fsij.org>
7162
7163         g10: Unattended key generation "Key-Grip" and "Subkey-Grip".
7164         + commit 680161647ad56d1ca92988f80bcc4d6fcb20b1eb
7165         * g10/keygen.c (pSUBKEYGRIP): New.
7166         (read_parameter_file): Add "Key-Grip" and "Subkey-Grip".
7167         (do_generate_keypair): Support pSUBKEYGRIP.
7168
7169         g10: Simplify "factory-reset" procedure.
7170         + commit f183b9768b42a6792c55a6129488bd8fbf5e8e6d
7171         * g10/card-util.c (factory_reset): Simplify.
7172
7173 2017-11-02  Ineiev  <ineiev@gnu.org>
7174
7175         po: Update Russian translation.
7176         + commit 6070f5a61d4d17ff437c69e1b708d49d107c22dc
7177
7178
7179 2017-11-02  Werner Koch  <wk@gnupg.org>
7180
7181         gpg: Introduce magic value 25519 to switch a card to ECC.
7182         + commit acb300543422c660c87ac2f0211a42f792a65cc4
7183         * g10/card-util.c (ask_card_keyattr): Handle special value 25519.
7184         (do_change_keyattr): Allow changing to cv25519/ed25519.
7185         (generate_card_keys): Ditto.
7186         (card_generate_subkey): Ditto.
7187
7188         gpg: Rename two card related functions in card-util.
7189         + commit de3a740c2e1156e58d2f94faa85c051740c8988e
7190         * g10/card-util.c (ask_card_rsa_keysize): Rename to ask_card_keyattr.
7191         (do_change_rsa_keysize): Rename to do_change_keyattr.
7192
7193 2017-11-02  NIIBE Yutaka  <gniibe@fsij.org>
7194
7195         agent: Fix returning GPG_ERR_NOT_FOUND wrongly.
7196         + commit 3da47d19df89d302c0ea25921f4bd8ce55705afe
7197         * agent/learncard.c (agent_handle_learn): Find SERIALNO.
7198
7199 2017-11-01  NIIBE Yutaka  <gniibe@fsij.org>
7200
7201         common: Accept the Z-suffix for yymmddThhmmssZ format.
7202         + commit 0e5bd473a07f188615c4fce26b73bb452d689d68
7203         * common/gettime.c (isotime_p): Accept the Z suffix.
7204
7205 2017-10-27  NIIBE Yutaka  <gniibe@fsij.org>
7206
7207         agent: Clean up pinentry access locking.
7208         + commit 3924e1442c6625a2b57573a1a634a5ec56b09a29
7209         * agent/agent.h (struct server_control_s): Rename PINENTRY_ACTIVE.
7210         * agent/call-pinentry.c (entry_owner): Remove.
7211         (agent_reset_query): Use thread private object of PINENTRY_ACTIVE.
7212         (unlock_pinentry): Add CTRL to arguments to access thread private.
7213         Check and decrement PINENTRY_ACTIVE for recursive use.
7214         (start_pinentry): Check and increment PINENTRY_ACTIVE for recursion.
7215         (agent_askpin): Follow the change of unlock_pinentry API.
7216         (agent_get_passphrase, agent_get_confirmation): Likewise.
7217         (agent_show_message, agent_popup_message_start): Likewise.
7218         (agent_popup_message_stop, agent_clear_passphrase): Likewise.
7219
7220         agent: Allow recursive use of pinentry.
7221         + commit 4738256f2e0d22302377c9ec7b2ae3999338e6c6
7222         * agent/agent.h (struct server_control_s): Add pinentry_level.
7223         * agent/call-pinentry.c (agent_popup_message_stop): Not clear
7224         ENTRY_CTX here.
7225         (unlock_pinentry): Handle recursion.  Clear ENTRY_CTX here.
7226         (start_pinentry): Allow recursive use.
7227
7228 2017-10-26  NIIBE Yutaka  <gniibe@fsij.org>
7229
7230         agent, tests: Support --disable-scdaemon build case.
7231         + commit 05cb87276c21c3a47226c75026fa46a955553dd9
7232         * agent/command.c (cmd_scd): Support !BUILD_WITH_SCDAEMON.
7233         * tests/openpgp/defs.scm (create-gpghome): Likewise.
7234         * tests/gpgsm/gpgsm-defs.scm (create-gpgsmhome): Likewise.
7235
7236         Fix comment of configure.
7237         + commit b13972dfbf7224478652038725ab0d2cb41b7303
7238         * configure.ac (BUILD_WITH_DIRMNGR): Comment fix.
7239
7240 2017-10-24  Werner Koch  <wk@gnupg.org>
7241
7242         gpg: Avoid superfluous sig check info during import.
7243         + commit 84af859e391a757877c9a1d78e35face983e6d23
7244         * g10/key-check.c (print_info): New.
7245         (key_check_all_keysigs): Print sig checking results only in debug
7246         mode.  Prettify the stats info and suppress them in quiet mode.
7247
7248         build: New configure option --enable-werror.
7249         + commit 812fe29bff42cf7dbd07e0becc55b2ada340dd97
7250         * configure.ac: Implement that option.
7251
7252         build: Do not mess with CFLAGS in configure.
7253         + commit e417aaf69817fcb4a73c38077853dc940a2deabc
7254         * configure.ac: Do not mess with the user provided CFLAGS.
7255
7256 2017-10-24  Rainer Perske  <rainer.perske@uni-muenster.de>
7257
7258         sm: Do not expect X.509 keyids to be unique.
7259         + commit 1067403c8a7fb51decf30059e46901b5ee9f5b37
7260         * sm/certlist.c (gpgsm_find_cert): Add arg allow_ambiguous and use it.
7261         * sm/call-dirmngr.c (inq_certificate): Pass true to ALLOW_AMBIGUOUS
7262         (run_command_inq_cb): Ditto.
7263         * sm/gpgsm.c (main): Pass false.
7264         * sm/server.c (cmd_passwd): Pass false.
7265
7266 2017-10-24  Werner Koch  <wk@gnupg.org>
7267
7268         gpgconf: Ignore non-installed components with --apply-profile.
7269         + commit 6e808ae4700dc5e95bf4cc2d5c063df582c234d0
7270         * tools/gpgconf-comp.c (retrieve_options_from_program): Add arg
7271         only_installed.
7272         (gc_component_retrieve_options): Use this if we want to process all
7273         components.
7274
7275         gpg: Improve the "secret key available" notice in keyedit.c.
7276         + commit 560d85ecff4246133d185dc29395f07c918b5556
7277         * g10/keyedit.c (KEYEDIT_NEED_SUBSK): New.
7278         (cmds): Add this flag to keytocard, bkuptocard, expire, and passwd.
7279         (keyedit_menu): Check whether only subkeys are available and take care
7280         of that in the command check and in the HELP listing.  Also print a
7281         different notice if only subkeys are available.
7282
7283         gpg: Remove unused flags from keyedit.c.
7284         + commit 016538d82867c40a21bc7cbf44ec386f4699077f
7285         * g10/keyedit.c (KEYEDIT_NOT_SK, KEYEDIT_ONLY_SK): Remove.
7286         (cmds): Remove them.
7287
7288 2017-10-19  Werner Koch  <wk@gnupg.org>
7289
7290         gpg: Fix creating on-disk subkey with on-card primary key.
7291         + commit 44fb3fbc85b32552c91f32f099b6b246c12ce0cc
7292         * g10/keygen.c (generate_subkeypair): Ignore error code issued for
7293         trying to verify a card based key.
7294
7295         gpg: Print sec/sbb with --import-option import-show or show-only.
7296         + commit 2c7dccca9b617780a3ea760adf460bb3b77f90f3
7297         * g10/import.c (import_one): Pass FROM_SK to list_keyblock_direct.
7298
7299         gpg: Make --dry-run and show-only work for secret keys.
7300         + commit 68c8619114fd5f24cb6bfb9e0f25c428a8805323
7301         * g10/import.c (import_secret_one): Check for dry-run before
7302         transferring keys.
7303
7304 2017-10-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
7305
7306         dirmngr: Do not follow https-to-http redirects.
7307         + commit 1ba308aa0356a57c21c4c8c2dac75b4d62b8aac3
7308         * dirmngr/ks-engine-http.c (ks_http_fetch): Forbid redirects from
7309         a https URI to a http URI.
7310
7311 2017-10-19  NIIBE Yutaka  <gniibe@fsij.org>
7312
7313         g10: Fix find_and_check_key for multiple keyrings.
7314         + commit d07de3862710d88bc80d6f6c5ca8da5cf38ff0eb
7315         * g10/pkclist.c (find_and_check_key): Call get_validity on a specific
7316         keyblock.
7317
7318 2017-10-19  Werner Koch  <wk@gnupg.org>
7319
7320         gpg: Keep a lock during the read-update/insert cycle in import.
7321         + commit 7c73db3d31c6457dfbdc82a8dc89951c023f0603
7322         * g10/keydb.c (keydb_handle): New field 'keep_lock'.
7323         (keydb_release): Clear that flag.
7324         (keydb_lock): New function.
7325         (unlock_all): Skip if KEEP_LOCK is set.
7326         * g10/getkey.c (get_keyblock_byfprint_fast): Call keep_lock if
7327         requested.
7328
7329         gpg: Improve keydb handling in the main import function.
7330         + commit 8448347b5bdee56e6f9938a93ea92fe4d3c8800c
7331         * g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ...
7332         (get_keyblock_byfprint_fast): .. new function.
7333         * g10/import.c (revocation_present): s/int rc/gpg_error_t err/.
7334         (import_one): Use get_keyblock_byfprint_fast to get the keyblock and a
7335         handle.  Remove the now surplus keyblock fetch in the merge branch.
7336
7337         gpg: Simplify keydb handling of the main import function.
7338         + commit 752cae6dd2ee8982a34c796a3f168ae538f7938c
7339         * g10/import.c (import_keys_internal): Return gpg_error_t instead of
7340         int.  Change var names.
7341         (import_keys_es_stream): Ditto.
7342         (import_one): Ditto.  Use a single keydb_new and simplify the use of
7343         of keydb_release.
7344
7345         sm: Fix colon listing of fields > 12 in crt records.
7346         + commit 1bf5cbd3ef01b7f5fdcfa30c882047b924dcf3f0
7347         * sm/keylist.c (print_capabilities): Move colon printing ...
7348         (list_cert_colon): to here.
7349
7350 2017-09-28  Werner Koch  <wk@gnupg.org>
7351
7352         gpg: Workaround for junk after --trusted-key.
7353         + commit b509d81cab030cca6abf0d878e1fc884eda344e6
7354         * g10/trust.c (register_trusted_key): Cut off everthing starting as a
7355         hash sign.
7356
7357 2017-09-19  Werner Koch  <wk@gnupg.org>
7358
7359         Release 2.2.1.
7360         + commit 355ca9e9498740fb6294eec451507b4891ae01ec
7361
7362
7363 2017-09-18  Werner Koch  <wk@gnupg.org>
7364
7365         dirmngr: Use system certs if --hkp-cacert is not used.
7366         + commit df692a6167be5486f9a29da003a00292fd895176
7367         * dirmngr/certcache.c (any_cert_of_class): New var.
7368         (put_cert): Set it.
7369         (cert_cache_deinit): Clear it.
7370         (cert_cache_any_in_class): New func.
7371         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Add hack to
7372         override empty list of HKP certs.
7373
7374         wks: Create a new user id if provider wants mailbox-only.
7375         + commit 50c8b6c88f5d9f4b6c4e9c03aee31fe29afa94b8
7376         * tools/gpg-wks-client.c (get_key): Add arg 'exact'.
7377         (add_user_id): New.
7378         (command_send): Create new user id.
7379
7380         wks: Send only the newest UID to the server.
7381         + commit 7f7f5d06fa5aa3a3c5ab8d2e59ee76207bfdeaa0
7382         * tools/wks-util.c (list_key_status_cb): Rename to key_status_cb.
7383         (wks_filter_uid): New.
7384         (wks_list_key): Allow FPR to be NULL.  Return an error if no
7385         fingerprint was found.
7386         * tools/gpg-wks-server.c (process_new_key)
7387         (check_and_publish): Remove now useless extra check for FPR.
7388         * tools/gpg-wks-client.c (command_check): Ditto.
7389         (command_send): Filter out the newest uid.
7390
7391         wks: Print the UID creation time with gpg-wks-client --check.
7392         + commit a0035986a8615df056182bb9af775b8b7b22003d
7393         * tools/gpg-wks.h (uidinfo_list_s): Add field 'created'.
7394         * tools/wks-util.c (append_to_uidinfo_list): Add arf 'created'.
7395         (wks_list_key): Pass timestamp to append_to_uidinfo_list.
7396         * tools/gpg-wks-client.c (command_check): Print UID creation time.
7397
7398         wks: Use dedicated type to convey user ids.
7399         + commit 4e0696de897cac6a34d55a69d8889faf26f1a923
7400         * tools/gpg-wks.h (uidinfo_list_s, uidinfo_list_t): New.
7401         * tools/wks-util.c (append_to_uidinfo_list): New.
7402         (free_uidinfo_list): New.
7403         (wks_list_key): Change arg r_mboxes to uidinfo_list_t.  Use
7404         append_to_uidinfo_list.
7405         * tools/gpg-wks-server.c (sserver_ctx_s): Replace strlist_t by
7406         uidinfo_list_t.
7407         (process_new_key): Ditto.
7408         (check_and_publish): Ditto.
7409         (command_receive_cb): Replace free_strlist by free_uidinfo_list.
7410         * tools/gpg-wks-client.c (command_check): Replace strlist_t by
7411         uidinfo_list_t.  Also print user id in verbose mode.
7412
7413 2017-09-13  Werner Koch  <wk@gnupg.org>
7414
7415         gpgv: Initialize compliance checker.
7416         + commit 006ca124ed95845d43af8c14d7ab2bc085b47b4c
7417         * g10/gpgv.c (main): Call gnupg_initialize_compliance.
7418
7419 2017-09-12  Werner Koch  <wk@gnupg.org>
7420
7421         wks: Add hack for the broken posteo system.
7422         + commit a821b4f5567d02c3329c2b94a73dcbe12e6699a2
7423         * tools/gpg-wks-client.c (command_send): Additional hack for posteo.
7424         Check the protocol-version flag.
7425
7426         wks: Add new policy flag protocol-version.
7427         + commit 332c9eaa2a3c7cae90b389cdaa2c149c5595fb4d
7428         * tools/gpg-wks.h (policy_flags_s): Add field protocol_version.
7429         * tools/wks-util.c (wks_parse_policy): Add new policy flag.
7430
7431         gpg: Fix "Fix key generation with only an email part".
7432         + commit 8b5a2474f21dd4f1aa2a283e2f57d75e42742af5
7433         * g10/keygen.c (proc_parameter_file): Don't check the result of
7434         stpcpy.
7435
7436         wks: Use unencrypted draft-1 mode for posteo.de.
7437         + commit c65a7bba7331975d20910f90cf648b6ecc5410f0
7438         * tools/gpg-wks-client.c (command_send): Allow sending in draft-1
7439         mode.
7440
7441         tools: New function mime_maker_add_body_data.
7442         + commit 7d15ee88980f88ca62fc7de9492dd08e54d0f0f1
7443         * tools/mime-maker.c (mime_maker_add_body_data): New.
7444
7445 2017-09-11  NIIBE Yutaka  <gniibe@fsij.org>
7446
7447         tests: Fix a test which specifies expiration date.
7448         + commit a172759b5088ae086c0caa2e7d4d0ea346b28a90
7449         * tests/openpgp/quick-key-manipulation.scm: Fix expiration time
7450         comparison.
7451
7452         scd: Fix for large ECC keys.
7453         + commit 827abe01a72a50eab1cdcde78985b42a4a8480fb
7454         * scd/app-openpgp.c (do_decipher): Support larger length.
7455
7456 2017-09-11  Werner Koch  <wk@gnupg.org>
7457
7458         gpg: Fix key generation with only an email part.
7459         + commit 7089dcc54099a4909ce7d386c07ab87e1398e2eb
7460         * g10/keygen.c (proc_parameter_file): Special case the email only
7461         case.
7462
7463 2017-08-28  Werner Koch  <wk@gnupg.org>
7464
7465         Release 2.2.0.
7466         + commit 9d80fb8e000189e61c173c39f1e1ca417566a7fc
7467
7468
7469 2017-08-27  Werner Koch  <wk@gnupg.org>
7470             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
7471
7472         scd: Convey the correct length for Le.
7473         + commit 45d5f5800afe6613f338a26f361cb5e03e861129
7474         * scd/app-openpgp.c (determine_rsa_response): Round bits up.
7475
7476 2017-08-24  Werner Koch  <wk@gnupg.org>
7477
7478         gpg: Fix memory leak while running --check-trustdb.
7479         + commit 13821e15fb9bdddfce79d88731c0f151724b2371
7480         * g10/trustdb.c (update_min_ownertrust): Free PK.
7481
7482         gpg: Fix memory leak in sig-check.
7483         + commit b065a696344eac3007dbd5642143ecaaeebab43a
7484         * g10/sig-check.c (check_signature_over_key_or_uid): Remove useless
7485         condition.  Actually free when SIGNER was allocated by us.
7486
7487         build: Remove obsolete option from autogen.rc.
7488         + commit 02a5df614a369519ad7781f95dc977e24a0d4277
7489         * autogen.rc: Remove --enable-gpg2-is-gpg.
7490
7491 2017-08-23  Werner Koch  <wk@gnupg.org>
7492
7493         gpgconf: Swap "auto-key-retrieve" and "no-auto-key-retrieve".
7494         + commit 565e486b8028f9e3cc51ebc5202666b598042175
7495         * g10/gpg.c (gpgconf_list): Announce "auto-key-retrieve".
7496         (main): Simplify setting of KEYSERVER_AUTO_KEY_RETRIEVE.
7497         * tools/gpgconf-comp.c: Make "no-auto-key-retrieve" invisible.  Make
7498         "auto-key-retrieve" an expert option.
7499
7500         tests: Do not run trust-pgp-4.scm.
7501         + commit b917cb66b79597520788cd9264889942247a3377
7502         * tests/openpgp/Makefile.am (XTESTS): Remove test.
7503         (EXTRA_DIST): Add test file.
7504
7505         build: Change SWDB tag "gnupg21" to "gnupg22".
7506         + commit 008ae0bd868cb49ad4d67fc8c71707cd2a162137
7507         * configure.ac (GNUPG_SWDB_TAG): New ac_define.  Set it to "gnupg22".
7508         * tools/gpgconf.c (query_swdb): Use it.
7509         * build-aux/speedo.mk: Change tag "gnupg21" to "gnupg22".
7510         * Makefile.am (distcheck-hook): Ditto.
7511
7512 2017-08-23  Åka Sikrom  <a4@hush.com>
7513
7514         po: Update Norwegian translation.
7515         + commit fd0e5b60bed1cfc2aed7b2e13cc449f355eac051
7516
7517
7518 2017-08-23  Andre Heinecke  <aheinecke@intevation.de>
7519
7520         agent: Fix string translation for Windows.
7521         + commit 6158811304937b592601ef30c29c5a5cdbaa88ea
7522         * agent/agent.h (L_): Define agent_Lunderscore when simple
7523         gettext is used.
7524
7525 2017-08-22  NIIBE Yutaka  <gniibe@fsij.org>
7526
7527         po: Update Japanese translation.
7528         + commit e6fa6b0ce823effd721c807b2b292287af91c642
7529
7530
7531 2017-08-21  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
7532
7533         tests: Add tests for the PGP trust model.
7534         + commit c23a69970ba38edae9d3b2603825d18fbb732423
7535         * tests/openpgp/trust-pgp-1.scm: New file.
7536         * tests/openpgp/trust-pgp-2.scm: New file.
7537         * tests/openpgp/trust-pgp-3.scm: New file.
7538         * tests/openpgp/trust-pgp-4.scm: New file.
7539         * tests/openpgp/trust-pgp/common.scm: New file.
7540         * tests/openpgp/trust-pgp/scenario1.asc: New file.
7541         * tests/openpgp/trust-pgp/scenario2.asc: New file.
7542         * tests/openpgp/trust-pgp/scenario3.asc: New file.
7543         * tests/openpgp/trust-pgp/scenario4.asc: New file.
7544         * tests/openpgp/trust-pgp/alice.sec.asc: New file.
7545         * tests/openpgp/trust-pgp/bobby.sec.asc: New file.
7546         * tests/openpgp/trust-pgp/carol.sec.asc: New file.
7547         * tests/openpgp/trust-pgp/david.sec.asc: New file.
7548         * tests/openpgp/trust-pgp/frank.sec.asc: New file.
7549         * tests/openpgp/trust-pgp/grace.sec.asc: New file.
7550         * tests/openpgp/trust-pgp/heidi.sec.asc: New file.
7551         * tests/openpgp/Makefile.am (XTESTS): Add new tests.
7552         (TEST_FILES): Add new files.
7553         (EXTRA_DIST): Add new common file.
7554
7555         tests: Move some functions into a common module.
7556         + commit cbe54b28bf3610204e12c50c0606df37337a1156
7557         * tests/openpgp/tofu.scm (gettrust): Moved to the common defs.scm
7558         module.
7559         (checktrust): Likewise.
7560         * tests/openpgp/defs.scm (gettrust): New function.
7561         (checktrust): Likewise.
7562
7563         gpgconf: Make WoT settings configurable by gpgconf.
7564         + commit 0161225457e0609509d0d5f4b80a60a1071b4b48
7565         * tools/gpgconf-comp.c (gc_options_gpg): Add max-cert-depth,
7566         completes-needed, and marginals-needed options.
7567         * g10/gpg.c (gpgconf_list): Likewise.
7568
7569 2017-08-21  Justus Winter  <justus@g10code.com>
7570
7571         gpgscm: Fix -Wimplicit-fallthrough warnings.
7572         + commit 6e596b2a745ae7a75a69038cf00ab4bbae1cebaa
7573         * tests/gpgscm/scheme.c (CASE): Rearrange so that the case statement
7574         is at the front.
7575         (Eval_Cycle): Improve fallthrough annotations.
7576
7577 2017-08-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7578
7579         gpg: default to --no-auto-key-retrieve.
7580         + commit e6f84116abca2ed49bf14b2e28c3c811a3717227
7581         * g10/gpg.c (main): remove KEYSERVER_AUTO_KEY_RETRIEVE from the
7582         default keyserver options.
7583         * doc/gpg.texi: document this change.
7584
7585 2017-08-10  Justus Winter  <justus@g10code.com>
7586
7587         tests: Improve documentation.
7588         + commit 23107ba20f8b4eb5482b480ad6a8af6b39d2bfeb
7589         * tests/openpgp/README: Add quickstart instructions, how to use
7590         shell.scm, remove no longer used MKDATA.
7591
7592 2017-08-09  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
7593
7594         g10: Write status error on error of --quick-revoke-uid.
7595         + commit 977fc5f0eb9fdee19e66bea8cd2eb5414789b485
7596         * g10/keyedit.c (keyedit_quick_revuid): Write status error on error.
7597
7598 2017-08-09  Werner Koch  <wk@gnupg.org>
7599
7600         Release 2.1.23.
7601         + commit e8ffa9a6ca5d76660b67207cd1157068e48483de
7602
7603
7604         po: Update German translation.
7605         + commit 2059dbf201963c6f229698ae80c6c774b1f686c8
7606
7607
7608 2017-08-08  Werner Koch  <wk@gnupg.org>
7609
7610         build: New configure option --enable-all-tests.
7611         + commit fb21aa8b50367e2afa13bad73fc21d6f01a97e18
7612         * configure.ac: New option --enable-all-tests.
7613         * tests/gpgscm/ffi.c (ffi_init): New gloabl var *run-all-tests*.
7614         * tests/openpgp/all-tests.scm (all-tests): Use that var instead
7615         of *maintainer-mode*.
7616         * Makefile.am (AM_DISTCHECK_CONFIGURE_FLAGS): Add --enable-all-tests.
7617
7618         gpgscm: Make the test summary stand out.
7619         + commit 0bd19dae1161a71053d794e4f75e66f70445f9f0
7620         * tests/gpgscm/tests.scm (test-pool): Add delimiter lines.
7621
7622         sm: Always print the keygrip in colon mode.
7623         + commit 0a8e20c4c639f0c491e2af5ac5fb97005196422b
7624         * sm/keylist.c (list_cert_colon): Always print the keygrip as
7625         described in the manual.
7626
7627 2017-08-08  Justus Winter  <justus@g10code.com>
7628
7629         gpg: Add option '--disable-dirmngr'.
7630         + commit c4506f624ed6854aa0ba1629aa2d1d43eb26900d
7631         * doc/gpg.texi: Document new option.
7632         * g10/call-dirmngr.c (create_context): Fail if option is given.
7633         * g10/gpg.c (cmd_and_opt_values): New value.
7634         (opts): New option.
7635         (gpgconf_list): Add new option.
7636         (main): Handle new option.
7637         * g10/options.h (struct opt): New field 'disable_dirmngr'.
7638         * tools/gpgconf-comp.c (gc_options_gpg): New option.
7639
7640 2017-08-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7641
7642         systemd-user: Drop redundant After=*.socket.
7643         + commit 81074c3b0211854a2dc94600dc892224201536f5
7644         * doc/examples/systemd-user/*.service: Drop redundant After=*.socket
7645         directive.
7646
7647         systemd-user: Drop RefuseManualStart=true.
7648         + commit 407da18254dfebcacfaee16952ef0b617b1626ea
7649         * doc/examples/systemd-user/*.service: drop RefuseManualStart=true
7650
7651 2017-08-07  Justus Winter  <justus@g10code.com>
7652
7653         tests: Do not run all tests unless in maintainer mode.
7654         + commit b0112dbca91e720a4ff622ad0e88d99eba56203a
7655         * configure.ac: Leak the maintainer mode flag into 'config.h'.
7656         * tests/gpgscm/ffi.c: Pass it into the scheme environment.
7657         * tests/openpgp/all-tests.scm: Only run tests against non-default
7658         configurations (keyring, extended-key-format) in maintainer mode.
7659
7660 2017-08-07  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
7661
7662         Fix spelling.
7663         + commit a611cba142470c52f3303c512f77ae7d195cc41f
7664         * doc/gpg.texi: s/occured/occurred/
7665
7666         Simple typo fix.
7667         + commit f011d8763a009612c858a287cf7cc6a1f1a6d32a
7668         * agent/gpg-agent.c: Correct spelling in comment.
7669
7670 2017-08-05  Werner Koch  <wk@gnupg.org>
7671
7672         gpg: Install gpg by default under the name gpg.
7673         + commit a69464b0b6dac88b360a13d3faf19dd7f2a0e02b
7674         * configure.ac: Remove option --enable-gpg2-is-gpg.  Add option
7675         --enable-gpg-is-gpg2.
7676         * build-aux/speedo.mk (speedo_pkg_gnupg_configure): Remove
7677         --enable-gpg2-is-gpg.
7678
7679         gpg: gpgconf needs to support the now default --auto-key-retrieve.
7680         + commit 69e97d909d586160cc0631c9a6f4d3f24bb0c682
7681         * tools/gpgconf-comp.c (gc_options_gpg): Re-add "auto-key_retrieve".
7682
7683 2017-08-04  Werner Koch  <wk@gnupg.org>
7684
7685         gpg: Fix memory leak in parse_auto_key_locate.
7686         + commit b70e86fd1050fc6da07a177ed142ae9882b4dd0d
7687         * g10/getkey.c (parse_auto_key_locate): Fix freeing of OPTIONS.
7688
7689         tests: Adjust tests for changed --auto-key-locate default.
7690         + commit 0767eada1479c0fa9d4b75781a8c2afb67bdbf90
7691         * tests/openpgp/defs.scm (create-gpghome): Disable new defaults.
7692
7693         gpg: Make --no-auto-key-retrieve gpgconf-igurable.
7694         + commit 9bb13a0e819334681caca38c9074bd7bfc04e45e
7695         * g10/gpg.c (gpgconf_list): Print no-auto-key-retrieve instead of
7696         auto-key-retrieve.
7697         * tools/gpgconf-comp.c (gc_options_gpg): Replace auto-key-retrieve by
7698         no-auto-key-retrieve and chnage level from invisible to advanced.
7699
7700         gpg: Default to --auto-key-locate "local,wkd" and --auto-key-retrieve.
7701         + commit 7e1fe791d188b078398bf83c9af992cb1bd2a4b3
7702         * g10/gpg.c (main): Add KEYSERVER_AUTO_KEY_RETRIEVE to the default
7703         keyserver options.  Set the default for --auto-key-locate to
7704         "local,wkd".  Reset that default iff --auto-key-locate has been given
7705         in the option file or in the commandline.
7706         * g10/getkey.c (parse_auto_key_locate): Work on a copy of the arg.
7707
7708         agent: Make --no-grab the default.
7709         + commit 3d78ae4d3de08398fabae5821045a3a1da6dadbe
7710         * agent/gpg-agent.c (oGrab): New const.
7711         (opts): New option --grab.  Remove description for --no-grab.
7712         (parse_rereadable_options): Make --no-grab the default.
7713         (finalize_rereadable_options): Allow --grab to override --no-grab.
7714         (main) <gpgconflist>: Add "grab".
7715         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add "grab".
7716
7717         gpg: Avoid double fingerprint printing with import-show.
7718         + commit b54d75fb1dcfa2cebb3a2497b81ffb49acac2056
7719         * g10/import.c (import_one) <IMPORT_SHOW>: Take care of fingerprint
7720         options.
7721
7722         gpg: New import option show-only.
7723         + commit d9fabcc1989d7235ea0294874803295a30f8711b
7724         * g10/options.h (IMPORT_DRY_RUN): New.
7725         * g10/import.c (parse_import_options): Add "show-only".
7726         (import_one): use that as alternative to opt.dry_run.
7727
7728 2017-08-03  Werner Koch  <wk@gnupg.org>
7729
7730         wks: Allow gpg-wks-client --supported with just the domain name.
7731         + commit 6cba56d436b56ea5e60042144a8a75a2e80007c8
7732         * tools/gpg-wks-client.c (command_supported): Hack for missing local
7733         part.
7734
7735 2017-08-02  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
7736
7737         g10: Always save standard revocation certificate in file.
7738         + commit dcfb01959802b27869528dda1d9a4f5e79574bb5
7739         * g10/revoke.c (gen_standard_revocation): Set opt.outfile to NULL
7740         temporarily to create certificate in right place.
7741
7742 2017-08-01  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
7743
7744         Revert "g10: Always save standard revocation certificate in file."
7745         + commit 624cd2d0bf6cc6dd1b79654295dc76f5b2d6d70b
7746         This reverts commit ebc65ff459e6c228fb7406e375819a9fe5637abe.
7747
7748         g10: Always save standard revocation certificate in file.
7749         + commit ebc65ff459e6c228fb7406e375819a9fe5637abe
7750         * g10/main.h (open_outfile): New parameter NO_OUTFILE.
7751         * g10/openfile.c (open_outfile): New parameter NO_OUTFILE.  If given,
7752         never use opt.outfile.
7753         * g10/revoke.c (create_revocation): If FILENAME is true, also set
7754         NO_OUTFILE to true (for standard revocation certificates).
7755         * g10/dearmor.c, g10/encrypt.c, g10/export.c, g10/revoke.c,
7756         g10/sign.c: Adjust all other callers.
7757
7758         artwork: Add icons.
7759         + commit a8d0b8d2333ddab703d1e346e06c106eeeedfd53
7760         * artwork/icons/index.css: New file.
7761         * artwork/icons/index.html: New file.
7762         * artwork/icons/lock-12.png: New file.
7763         * artwork/icons/lock-128.png: New file.
7764         * artwork/icons/lock-16.png: New file.
7765         * artwork/icons/lock-24.png: New file.
7766         * artwork/icons/lock-256.png: New file.
7767         * artwork/icons/lock-32.png: New file.
7768         * artwork/icons/lock-48.png: New file.
7769         * artwork/icons/lock-64.png: New file.
7770         * artwork/icons/lock-wing-12.png: New file.
7771         * artwork/icons/lock-wing-128.png: New file.
7772         * artwork/icons/lock-wing-16.png: New file.
7773         * artwork/icons/lock-wing-24.png: New file.
7774         * artwork/icons/lock-wing-256.png: New file.
7775         * artwork/icons/lock-wing-32.png: New file.
7776         * artwork/icons/lock-wing-48.png: New file.
7777         * artwork/icons/lock-wing-64.png: New file.
7778         * artwork/icons/lock-wing.svg: New file.
7779         * artwork/icons/lock.svg: New file.
7780         * artwork/icons/wing-12.png: New file.
7781         * artwork/icons/wing-128.png: New file.
7782         * artwork/icons/wing-16.png: New file.
7783         * artwork/icons/wing-24.png: New file.
7784         * artwork/icons/wing-256.png: New file.
7785         * artwork/icons/wing-32.png: New file.
7786         * artwork/icons/wing-48.png: New file.
7787         * artwork/icons/wing-64.png: New file.
7788         * artwork/icons/wing.svg: New file.
7789
7790 2017-08-01  Werner Koch  <wk@gnupg.org>
7791
7792         gpg,sm: Error out on compliance mismatch while decrypting.
7793         + commit 4e117f206beb38287ddcd3251fb7baabadfbddbb
7794         * g10/pubkey-enc.c (get_session_key): Bail out if the algo is not
7795         allowed in the current compliance mode.
7796         * sm/decrypt.c (gpgsm_decrypt): Ditto.
7797
7798 2017-08-01  NIIBE Yutaka  <gniibe@fsij.org>
7799
7800         Simple typo fix.
7801         + commit fde9a8cc6c849fb21f3e6782dbd5c6bc863357eb
7802         * tools/rfc822parse.c: Fix.
7803
7804         po: Update Japanese translation.
7805         + commit 02b571947b9442604faa7509478cd8577c2c0b9c
7806
7807
7808 2017-07-31  Werner Koch  <wk@gnupg.org>
7809
7810         dirmngr,w32: Fix http connection timeout problem.
7811         + commit 482fd5758c1b7e1b33c4cb50656e586a3ae16815
7812         * dirmngr/http.c (connect_with_timeout) [W32]: Take care of EAGAIN.
7813
7814         Explain the "server is older than xxx warning".
7815         + commit 4ad5bc1b6d72483123963c894ee1412b2ceb99b4
7816         * g10/call-agent.c (warn_version_mismatch): Print a note on how to
7817         restart the servers.
7818         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
7819         * sm/call-agent.c (warn_version_mismatch): Ditto.
7820         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
7821
7822 2017-07-28  Werner Koch  <wk@gnupg.org>
7823
7824         Release 2.1.22.
7825         + commit 7d335ff496b129ee6f33c4ca25bd7a6631a4b590
7826
7827
7828         po: Update German translation.
7829         + commit 339f672dad94b4e0000fd2d3a1f272a4861c91c3
7830
7831
7832         agent: Make --ssh-fingerprint-digest re-readable.
7833         + commit 6c9899bede6ecb2ccf7336d12724090f36a6aa3d
7834         * agent/gpg-agent.c (main): Move oSSHFingerprintDigest to ...
7835         (parse_rereadable_options): here.
7836         (opts): Change its description.
7837         (main) <aGPGConfList>: Include this option.
7838         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add option at expert
7839         level.
7840
7841         gpg,sm: String changes for compliance diagnostics.
7842         + commit efe187e8a2b583defdcd9d4b96e3dc83f95bef0d
7843
7844
7845         agent: For OCB key files return Bad Passprase instead of Checksum Error.
7846         + commit 5cf95157c5db88dd599ac4d48f619782179b1438
7847         * agent/protect.c (do_decryption): Map error checksum to bad
7848         passpharse protection
7849
7850         * agent/call-pinentry.c (unlock_pinentry): Don't munge the error
7851         source for corrupted protection.
7852
7853         gpg: Minor rework for better readibility of get_best_pubkey_byname.
7854         + commit 1c35e29af95c46475f297d2bd70a5f3bd49d45b1
7855         * g10/getkey.c (get_best_pubkey_byname): Change return type to
7856         gpg_error_t.  Use var name err instead of rc.  Move a
7857         gpg_error_from_syserror closer to the call.
7858
7859         gpg: Fix segv in get_best_pubkey_byname.
7860         + commit 6496dc1f9d2aef3bf8cf950da2434c96f7a0145c
7861         * g10/getkey.c (get_best_pubkey_byname): Init NEW.
7862
7863         agent: Minor cleanup (mostly for documentation).
7864         + commit 5516ef47a22dfdf9cdf56107f34d2bda9e46deec
7865         * agent/command.c (cmd_pksign): Change var name 'rc' to 'err'.
7866         * agent/findkey.c (read_key_file): Ditto.  Change return type to
7867         gpg_error_t.  On es_fessk failure return a correct error code.
7868         (agent_key_from_file): Change var name 'rc' to 'err'.
7869         * agent/pksign.c (agent_pksign_do): Ditto.  Change return type to
7870         gpg_error_t.  Return a valid erro code on malloc failure.
7871         (agent_pksign): Ditto.  Change return type to gpg_error_t.  replace
7872         xmalloc by xtrymalloc.
7873         * agent/protect.c (calculate_mic): Change return type to gpg_error_t.
7874         (do_decryption): Ditto.  Do not init RC.
7875         (merge_lists): Change return type to gpg_error_t.
7876         (agent_unprotect): Ditto.
7877         (agent_get_shadow_info): Ditto.
7878
7879 2017-07-27  Werner Koch  <wk@gnupg.org>
7880
7881         gpg: Tweak compliance checking for verification.
7882         + commit 6502bb0d2af5784918ebb74242fff6f0a72844bf
7883         * common/compliance.c (gnupg_pk_is_allowed): Rework to always allow
7884         verification.
7885         * g10/mainproc.c (check_sig_and_print): Print a con-compliant warning.
7886         * g10/sig-check.c (check_signature2): Use log_error instead of
7887         log_info.
7888
7889         gpg,sm: Allow encryption (with warning) to any key in de-vs mode.
7890         + commit 1bd22a85b4f06324037b3500d2fa8af62733c926
7891         * g10/encrypt.c (encrypt_crypt): Do not abort for a non-compliant key.
7892         * sm/encrypt.c (gpgsm_encrypt): Ditto.
7893
7894         gpg,sm: Fix compliance checking for decryption.
7895         + commit a0d0cbee7654ad7582400efaa92d493cd8e669e9
7896         * common/compliance.c (gnupg_pk_is_compliant): Remove the Elgamal
7897         signing check.  We don't support Elgamal signing at all.
7898         (gnupg_pk_is_allowed) <de-vs>: Revert encryption/decryption for RSA.
7899         Check the curvenames for ECDH.
7900         * g10/pubkey-enc.c (get_session_key): Print only a warning if the key
7901         is not compliant.
7902         * sm/decrypt.c (gpgsm_decrypt): Ditto.  Use the same string as in gpg
7903         so that we have only one translation.
7904
7905         gpg: Avoid output to the tty during import.
7906         + commit fcb62fe20f45290bf95703ec3bf4d0b361fa4339
7907         * g10/key-check.c (key_check_all_keysigs): Add arg mode and change all
7908         output calls to use it.
7909         * g10/keyedit.c (keyedit_print_one_sig): Add arg fp and chnage all
7910         output calls to use it.
7911         (keyedit_menu): Adjust for changes.
7912         * g10/gpgcompose.c (keyedit_print_one_sig): Add dummy arg fp.
7913         * g10/import.c (import_one): Call key_check_all_keysigs with output to
7914         the log stream.
7915
7916 2017-07-26  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
7917
7918         g10: Make sure exactly one fingerprint is output with --quick-gen-key.
7919         + commit 94eea0ed2c8b47cb0fe02b22cbe668705a5fe0d0
7920         * g10/keygen.c (do_generate_keypair): Only set fpr in
7921         list_keyblock_direct invocation if neither --fingerprint nor
7922         --with-fingerprints are given.
7923
7924 2017-07-26  Werner Koch  <wk@gnupg.org>
7925
7926         doc: Add man pages form gpg-wks-server and gpg-wks-client.
7927         + commit be636c3cfca178927b09ef4154c3e555d6f5b1c4
7928         * doc/wks.texi: New.
7929         * doc/gnupg.texi: Include wks.texi.
7930         * doc/Makefile.am (gnupg_TEXINFOS): Add wks.texi.
7931         (myman_pages): Add new man pages.
7932
7933         wks: Fix program names in the usage diagnostics.
7934         + commit c76398da5b15df2086f68bc26b7fde75219976c7
7935         * tools/gpg-wks-client.c (my_strusage): Add case 12.
7936         * tools/gpg-wks-server.c (my_strusage): Add case 12:
7937
7938 2017-07-26  Andre Heinecke  <aheinecke@intevation.de>
7939
7940         doc: Update vsnfd profile example.
7941         + commit 4f569c69075fddbaea588544a6625c28cb4cb8f4
7942         * doc/examples/vsnfd.prf: Use rsa3072
7943
7944 2017-07-26  Werner Koch  <wk@gnupg.org>
7945
7946         dirmngr: Do not use a blocking connect in Tor mode.
7947         + commit c5e5748480952e5bcedb16f6ce6ef7e435acb3c7
7948         * dirmngr/http.c (http_raw_connect): Disable the timeout in Tor mode.
7949         (send_request): Ditto.
7950
7951         dirmngr: Auto-enable Tor on startup or reload.
7952         + commit fd68bdb61ec4f8441da6d3023a8da4315df54cec
7953         * dirmngr/dirmngr.c (dirmngr_use_tor): Test for Tor availibility.
7954
7955         agent,dirmngr: Check for homedir removal also using stat(2).
7956         + commit d50c2eff8d6931586c527edb3dea98dbc6facdec
7957         * agent/gpg-agent.c (have_homedir_inotify): New var.
7958         (reliable_homedir_inotify): New var.
7959         (main):  Set reliable_homedir_inotify.
7960         (handle_tick): Call stat on the homedir.
7961         (handle_connections): Mark availibility of the inotify watch.
7962         * dirmngr/dirmngr.c (handle_tick): Call stat on the homedir.
7963         (TIMERTICK_INTERVAL_SHUTDOWN): New.
7964         (handle_connections): Depend tick interval on the shutdown state.
7965
7966         agent: Lengthen timertick interval on Unix to 4 seconds.
7967         + commit f4ec7697a9c2d7587794d3bd75efbb0b51d6562f
7968         * agent/gpg-agent.c (TIMERTICK_INTERVAL): Same value for Windows and
7969         Unix.
7970
7971 2017-07-25  Werner Koch  <wk@gnupg.org>
7972
7973         common: Strip trailing slashes from the homedir.
7974         + commit 24c7aa0d58e3768690dd8ebef0e8e01af7e80f83
7975         * common/homedir.c (default_homedir): Strip trailing slashes.
7976         (gnupg_set_homedir): Ditto.
7977
7978         w32: Also change the directory on daemon startup.
7979         + commit 0ef50340ef68b2541d9a1aafa71f5400aef4dc7e
7980         * agent/gpg-agent.c (main): Always to the chdir.
7981         * dirmngr/dirmngr.c (main): Ditto.
7982         * scd/scdaemon.c (main): Ditto.
7983
7984         common: New functions gnupg_daemon_rootdir and gnupg_chdir.
7985         + commit 226f143ca01cf335c7c4e3e94c96fb9d271eccc9
7986         * common/sysutils.c (gnupg_chdir): New.
7987         * common/homedir.c (gnupg_daemon_rootdir): New.
7988         * agent/gpg-agent.c (main): Use these functions instead chdir("/").
7989         * dirmngr/dirmngr.c (main): Ditto.
7990         * scd/scdaemon.c (main): Ditto.
7991
7992         gpg: Update key origin info during import merge.
7993         + commit 166d0d7a2439f30c0a250faadc16ce3453447d71
7994         * g10/import.c (update_key_origin): New.
7995         (merge_blocks): Add arg curtime.
7996         (import_one): Pass curtime to merge_blocks.  Call update_key_origin.
7997
7998         gpg: Store key origin for new userids during import merge.
7999         + commit 84c993d9325fc000acac7950b2dfeefa5976df3b
8000         * g10/import.c (apply_meta_data): Rename to ...
8001         (insert_key_origin): this.  Factor code out to ...
8002         (insert_key_origin_pk, insert_key_origin_uid): new funcs.
8003         (import_one): Move insert_key_origin behind clean_key.
8004         (merge_blocks): Add args options, origin, and url.
8005         (append_uid): Rename to ...
8006         (append_new_uid): this.  Add args options, curtime, origin, and url.
8007         Call insert_key_origin_uid for new UIDs.
8008
8009 2017-07-25  NIIBE Yutaka  <gniibe@fsij.org>
8010
8011         dirmngr: Add annotation for fallthrough.
8012         + commit d40b4a41a8d60292fd4b5b951a19883e31090179
8013         * dirmngr/dns.c: Add /* FALL THROUGH */ to clarify.
8014
8015 2017-07-24  Werner Koch  <wk@gnupg.org>
8016
8017         gpg: Extend --key-origin to take an optional URL arg.
8018         + commit 87b5421ca84bbea68217c9ed771ee8c0a98a4d0c
8019         * g10/getkey.c (parse_key_origin): Parse appended URL.
8020         * g10/options.h (struct opt): Add field 'key_origin_url'.
8021         * g10/gpg.c (main) <aImport>: Pass that option to import_keys.
8022         * g10/import.c (apply_meta_data): Extend for file and url.
8023         * g10/keyserver.c (keyserver_fetch): Pass the url to
8024         import_keys_es_stream.
8025
8026         gpg: Store key origin info for new keys from a keyserver.
8027         + commit 2ca0381d077d766593db26f4215b8eddee8d7963
8028         * g10/keyserver.c (keyserver_get_chunk): Use KEYORG_KS if request was
8029         done by fingerprint.
8030         * g10/import.c (apply_meta_data): Implement that.
8031
8032         gpg: Store key origin info for new DANE and WKD retrieved keys.
8033         + commit e7068bf92ec5ca5d440346d43a382c1f625b924d
8034         * g10/import.c (apply_meta_data): Remove arg 'merge'.  Add arg 'url'.
8035         Implement WKD and DANE key origin.
8036         (import_keys_internal): Add arg 'url' and change all callers.
8037         (import_keys_es_stream): Ditto.
8038         (import): Ditto.
8039         (import_one): Ditto.
8040         * g10/keylist.c (list_keyblock_print): Fix update URL printing.
8041         * g10/call-dirmngr.c (gpg_dirmngr_wkd_get): Add arg 'r_url' to return
8042         the SOURCE.  Pass ks_status_cb to assuan_transact.
8043         * g10/keyserver.c (keyserver_import_wkd): Get that URL and pass it to
8044         the import function.
8045
8046         gpg: Filter keys received via DANE.
8047         + commit f6f0dd4d5ea85e0b16e96d7678b1d508182049a8
8048         * g10/keyserver.c (keyserver_import_cert): Use an import filter in
8049         DANE mode.
8050
8051         dirmngr: Print a SOURCE status for WKD requests.
8052         + commit e97548223948222a5c22acdf3775c7f93c1e17a9
8053         * dirmngr/server.c (cmd_wkd_get): Print a SOURCE status.
8054
8055         dirmngr: New function dirmngr_status_printf.
8056         + commit 9b88cfa0962f28894658cff8777fe7a217c6f700
8057         * dirmngr/server.c (dirmngr_status_printf): New.
8058
8059 2017-07-24  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8060
8061         g10: Make sure to emit NEED_PASSPHRASE on --import of secret key.
8062         + commit 872137b5921dd297e7d2c1def6e3868b7595feb5
8063         * call-agent.h (agent_import_key): Add keyid parameters.
8064         * call-agent.c (agent_import_key): Set keyid parameters.
8065         * import.c (transfer_secret_keys): Pass keyid parameters.
8066
8067         w32: Change directory on daemon startup.
8068         + commit 78ebc62604d77600b9865950610717d28c6027a2
8069         * agent/gpg-agent.c [HAVE_W32_SYSTEM]: Include <direct.h>.
8070         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
8071         * dirmngr/dirmngr.c [HAVE_W32_SYSTEM]: Include <direct.h>.
8072         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
8073         * scd/scdaemon.c [HAVE_W32_SYSTEM]: Include <direct.h>.
8074         (main) [HAVE_W32_SYSTEM]: Change working directory to \.
8075
8076         g10: Make sure to emit NEED_PASSPHRASE on --export-secret-key.
8077         + commit d8e46f10698da0bee4cd58d95f1f9832bdda0c5f
8078         * call-agent.h (agent_export_key): Add keyid parameters.
8079         * call-agent.c (agent_export_key): Set keyid parameters.
8080         * export.c (receive_seckey_from_agent): Pass keyid parameters.
8081
8082 2017-07-24  NIIBE Yutaka  <gniibe@fsij.org>
8083
8084         scd: Use unsigned int for fields.
8085         + commit 45e40487fb7bb51228c96c8966e38c643a9b9ba5
8086         * scd/app-openpgp.c (data_objects): Use unsigned ints.
8087
8088         dirmngr: More minor fix.
8089         + commit ade4b2744c848e07b87afa4f186256c2a2ef1d13
8090         * dirmngr/http.c (send_request): Care the case of !USE_TLS.
8091
8092         dirmngr: More minor fixes.
8093         + commit 789401e9557db13422f47a8c09e693f3cee0132b
8094         * dirmngr/http.c (http_verify_server_credentials): Duplicated const.
8095         * dirmngr/ldap.c (parse_one_pattern): Add comment.
8096
8097         dirmngr: Minor fix for Windows.
8098         + commit 274602820cfbb15c7cdb4525acd9793bdb472e78
8099         * dirmngr/http.c (connect_with_timeout): Use FD2INT.
8100
8101         agent: Minor fix for Windows.
8102         + commit 328fca187253c069e3630bd387a71f6d16e9820a
8103         * agent/command-ssh.c (serve_mmapped_ssh_request): Add const
8104         qualifier.
8105
8106 2017-07-21  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8107
8108         g10: Avoid caching passphrase for failed symmetric encryption.
8109         + commit e4c720fa3b31ebd3e9d764c6eab02729cf06124c
8110         * g10/mainproc.c (proc_encrypted): If error code is GPG_ERR_CIPHER_ALGO,
8111         assume the symmetric passphrase was wrong and invalidate the cache.
8112
8113 2017-07-21  Werner Koch  <wk@gnupg.org>
8114
8115         gpg: Extend --quick-set-expire to allow subkey expiration setting.
8116         + commit b55b72bb815ad5870456b89c3a011fa00991b4a8
8117         * g10/keyedit.c (keyedit_quick_set_expire): Add new arg subkeyfprs.
8118         (menu_expire): Rename arg force_mainkey to unattended and allow
8119         unattended changing of subkey expiration.
8120         * g10/gpg.c (main): Extend --quick-set-expire.
8121
8122         gpg: Fix possible double free of the card serialno.
8123         + commit e888f7af6571ecd3994fd55cc18c9e2df7fd0c60
8124         * g10/free-packet.c (copy_public_key): Copy fields serialno and
8125         updateurl.
8126
8127         gpg: Use macros to check the signature class.
8128         + commit 5818ff0ae314af08548fcc23df2b807736144a00
8129         * g10/import.c: Use the extistin macros for better readability.
8130
8131 2017-07-21  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8132
8133         g10: Clean keyblock on initial commit.
8134         + commit 609bbdf3614fbadeba7a6cbdfdf5004b23516a64
8135         * g10/import.c (import_one): If option import-clean is set,
8136         also clean on initial import, not only for merge.
8137
8138 2017-07-21  NIIBE Yutaka  <gniibe@fsij.org>
8139
8140         scd: Fix SEGV in CCID driver.
8141         + commit d8a55da715ce8447b0686f321fa43d00be34a467
8142         * scd/ccid-driver.c (intr_cb): Only kick the loop for removal.
8143         (bulk_in): Don't set POWERED_OFF when interrupt transfer is enabled.
8144
8145         g10: Don't limit at the frontend side for card capability.
8146         + commit a76b6cf9709c0a2a89fa2887075491b80f3d9608
8147         * g10/card-util.c (MAX_GET_DATA_FROM_FILE): New.
8148         (get_data_from_file): Use MAX_GET_DATA_FROM_FILE.
8149         (change_url, change_login, change_private_do): Don't limit.
8150
8151         scd: Add debug message for v3 card.
8152         + commit 892e86b0dc69193ddff018bf9b3938509dd72cb3
8153         * scd/app-openpgp.c (show_caps): Output more messages.
8154
8155 2017-07-20  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8156
8157         doc: Clarify wording of export-attributes.
8158         + commit cea4313644b531ef87b8c8e4bfddde4388cbbe0d
8159         * doc/gpg.texi: Clarify wording of export-attributes.
8160
8161 2017-07-20  Werner Koch  <wk@gnupg.org>
8162
8163         gpg: New option --with-key-origin.
8164         + commit 165cdd8121bbf80bfe2da071539d3578630f198f
8165         * g10/getkey.c (parse_key_origin): Factor list out as ...
8166         (key_origin_list): new struct.
8167         (key_origin_string): New.
8168         * g10/gpg.c (oWithKeyOrigin): New const.
8169         (opts): New option --with-key-origin.
8170         (main): Implement option.
8171         * g10/options.h (struct opt): New flag with_key_origin.
8172         * g10/keylist.c (list_keyblock_print): Print key origin info.
8173         (list_keyblock_colon): Ditto.
8174
8175         common: New function print_utf9_string.
8176         + commit bddc2e04f1ddc18be20efc0f0508be401b345f42
8177         * common/miscellaneous.c (print_utf8_string): New.
8178
8179         gpg: Make function mk_datestr public.
8180         + commit 3ee314dde16d1d69ddf840cdb8b5aa186c592262
8181         * g10/keydb.h (MK_DATESTR_SIZE): New.
8182         * g10/keyid.c (mk_datestr): Make public.  Add arg bufsize and use
8183         snprintf.  Change arg atime to u32.
8184         (datestr_from_pk): Simplify.
8185         (datestr_from_sig): Ditto.
8186         (expirestr_from_pk): Ditto.
8187         (expirestr_from_sig): Ditto.
8188         (revokestr_from_pk): Ditto.
8189
8190 2017-07-20  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8191
8192         g10: Return proper error when gpg-agent fails to start during probe.
8193         + commit 9998b162b47931fb8a8ed961d53418d505358888
8194         * g10/getkey.c (lookup): Return immediately on any other error than
8195         GPG_ERR_NO_SECKEY from agent_probe_any_secret_key.
8196
8197 2017-07-20  NIIBE Yutaka  <gniibe@fsij.org>
8198
8199         scd: Support longer data length for special DOs for v3 card.
8200         + commit 69614d55018ddb8678d8904a52e648931f480d72
8201         * scd/app-openpgp.c (data_objects): Special DOs like "Login Data",
8202         "URL", "Private DO N" can be longer size >= 256.
8203         (struct app_local_s): Define bits for v3 card.
8204         (get_cached_data): Use extcap.max_special_do for special DOs.
8205         (app_select_openpgp): Detect if extcap_v3, kdf_do, and other bits.
8206
8207         common: logstream fix.
8208         + commit 84146b3ec44943f06c66a603de19094b930ad446
8209         * common/logging.c (set_file_fd): Don't close es_stderr.
8210
8211         dnsmngr: Fix use of CPP.
8212         + commit cc12cf386b620e658fa93a0bd40477bc16d85d98
8213         * dirmngr/dns.c (HAVE_STATIC_ASSERT, HAVE___ATOMIC_FETCH_ADD)
8214         (DNS_HAVE_SOCKADDR_UN, HAVE_SOCK_NONBLOCK): Don't use defined
8215         to be expanded for expression evaluation.
8216
8217 2017-07-19  Justus Winter  <justus@g10code.com>
8218
8219         dirmngr: Forbid redirects from .onion to clearnet URIs.
8220         + commit e7fc6e3bf0eb6ffe53e1f099d28ce45cef4a8a87
8221         * dirmngr/ks-engine-hkp.c (send_request): Forbid redirects from .onion
8222         to clearnet URIs.
8223         * dirmngr/ks-engine-http.c (ks_http_fetch): Likewise.
8224
8225 2017-07-19  Werner Koch  <wk@gnupg.org>
8226
8227         gpg: Avoid asking by fpr and then by keyid during auto-key-retrieve.
8228         + commit 2e5459457473eb4b3e7b2b14815cb94faa66e8bb
8229         * g10/mainproc.c (check_sig_and_print): Track key server request via
8230         fingerprint.
8231
8232 2017-07-19  Justus Winter  <justus@g10code.com>
8233
8234         dirmngr: Implement TLS over http proxies.
8235         + commit da91d2106a17c796ddb066a34db92d33b21c81f7
8236         * dirmngr/http.c (send_request): If a http proxy is to be used, and we
8237         want to use TLS, try to use the CONNECT method to get a connection to
8238         the target server.
8239
8240         dirmngr: Log http response in debug mode.
8241         + commit e7eabe66b6409c1f5225b751ea5c2d456a3856e6
8242         * dirmngr/http.c (parse_response): Log http response in debug mode.
8243
8244         dirmngr: Amend TLS handling.
8245         + commit 1ba220e68149fdb197accf4a15b0a11126c8b431
8246         * dirmngr/http.c (http_wait_response): Get the 'use_tls' flag from the
8247         write cookie, not from the URI.
8248
8249         dirmngr: Fix connecting to http proxies.
8250         + commit 46a4a0c0e77e19f9589088bb87357c33142c3f04
8251         * dirmngr/http.c (send_request): Do not use the 'srvtag' intended for
8252         the target host to connect to the http proxy.
8253
8254         dirmngr: Fix handling of proxy URIs.
8255         + commit 73d4781e4595634548269bafe46aeb7674c5b219
8256         * dirmngr/http.c (send_request): We do not support socks4.
8257
8258 2017-07-19  NIIBE Yutaka  <gniibe@fsij.org>
8259
8260         gpgconf: Make vars read-only explicitly.
8261         + commit 99791184ac4c7486ccdefc150b9921cd923428b9
8262         * tools/gpgconf-comp.c (gc_backend, gc_arg_type, gc_level, gc_flag)
8263         (gc_component): Add const qualifier.
8264
8265         Fix usage of ARGPARSE_OPTS.
8266         + commit fa63db89f9581186ed758c502d4e69914b774157
8267         * agent/gpg-agent.c, agent/preset-passphrase.c,
8268         dirmngr/dirmngr-client.c, dirmngr/dirmngr_ldap.c, kbx/kbxutil.c,
8269         tools/gpg-check-pattern.c, tools/gpgconf.c, tools/gpgsplit.c,
8270         tools/symcryptrun.c: Use ARGPARSE_end.
8271
8272 2017-07-18  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8273
8274         common: Allow abbreviations of standard options.
8275         + commit f17862d47d184d7f6ef883778cf63801365599a0
8276         * argparse.h (ARGPARSE_SHORTOPT_HELP, ARGPARSE_SHORTOPT_VERSION,
8277         ARGPARSE_SHORTOPT_WARRANTY, ARGPARSE_SHORTOPT_DUMP_OPTIONS): New
8278         macros.
8279         (ARGPARSE_end): Add some placeholders for standard options.
8280         * argparse.c (arg_parse): Fill in missing standard options so
8281         default machinery works.  Check for standard options in new way.
8282         Do not write out standard options for --dump-options.
8283
8284 2017-07-18  Justus Winter  <justus@g10code.com>
8285
8286         gpgscm,w32: Fix testing for absolute paths.
8287         + commit 2e1342b78b020f5b28359b08a4f63cf11479602f
8288         * tests/gpgscm/main.c (path_absolute_p): New function.
8289         (load): Use new function.
8290
8291         dirmngr: Honor http keyserver URLs.
8292         + commit b231959728a0056094134e0fca8cc916c24ef37e
8293         * dirmngr/http.c (parse_uri): Keep an unmodified copy of the URI.
8294         * dirmngr/http.h (struct parsed_uri_s): New field 'original'.
8295         * dirmngr/ks-action.c (ks_action_get): Properly handle http and https
8296         URLs.
8297
8298         dirmngr: Fix memory leak.
8299         + commit ebb35ed7110d1a29061dfb4ccb9038645b20d7f4
8300         * dirmngr/http.c (parse_uri): Properly free partial results.
8301
8302         dirmngr: Fix memory leak.
8303         + commit 3d670fa973a03ea88b5f9459b3222a951136dd7a
8304         * dirmngr/http.c (http_release_parsed_uri): Free 'params'.
8305
8306 2017-07-17  Werner Koch  <wk@gnupg.org>
8307
8308         gpg,sm: Check compliance of the RNG.
8309         + commit a149afe338d61d86985c533cde5e7dbcd31e8698
8310         * common/compliance.c (gnupg_rng_is_compliant): New.
8311         * g10/call-agent.c (start_agent) [W32]: Check rng compliance.
8312         * sm/call-agent.c (start_agent) [W32]: Ditto.
8313         * g10/encrypt.c (encrypt_simple, encrypt_crypt): Check that the RNG is
8314         compliant.
8315         * sm/encrypt.c (gpgsm_encrypt): Ditto.
8316         * g10/sign.c (do_sign): Ditto.
8317         * sm/sign.c (gpgsm_sign): Ditto.
8318
8319         agent: New GETINFO sub-command jent_active.
8320         + commit bbbd0db34b4e387f8dc089fb7d69fdcf2ed91a01
8321         * agent/command.c (cmd_getinfo): Implement it for gcrypt >= 1.8.
8322
8323         common: New function split_fields_colon.
8324         + commit 849467870ee1c10e0a7b1e89cfc9e8214e4963fe
8325         * common/stringhelp.c (split_fields_colon): New.
8326         * common/t-stringhelp.c (test_split_fields_colon): New test.
8327         (main): Call that test.
8328
8329 2017-07-14  Justus Winter  <justus@g10code.com>
8330
8331         tests: Improve 'shell.scm' script.
8332         + commit 58eafd11ed5501c0b72fcb553eb3e097ad29b3c6
8333         * tests/openpgp/defs.scm (create-file): Unlink file first.
8334         * tests/openpgp/shell.scm: Ask whether to import legacy test keys or
8335         not, and whether to drop 'batch' from the configuration.  Add paths to
8336         all the programs to 'PATH'.
8337
8338         gpgscm: Library improvements.
8339         + commit b4d25082fd4502ec01d511c22fecd60d513b81f4
8340         * tests/gpgscm/repl.scm (prompt-yes-no?): New function.
8341         * tests/gpgscm/tests.scm (pathsep-split): Likewise.
8342         (pathsep-join): Likewise.
8343         (with-path): Use the new function.
8344
8345         gpgscm: Fail early if the test setup fails.
8346         + commit 7a6e6ad2880bbff54a75ff608d0ec97d6c405733
8347         * tests/gpgscm/tests.scm (make-environment-cache): Check status code
8348         of setup script.
8349
8350         gpg: Fix importing keys.
8351         + commit 956da89193370d5aa970cff5b77f605534481a02
8352         * g10/import.c (import_one): Fix error handling.
8353
8354 2017-07-13  Werner Koch  <wk@gnupg.org>
8355
8356         gpg: Pass key origin values to import functions.
8357         + commit 330212efb927c119bb5135856f8582c0e4e2e6b7
8358         * g10/import.c (import_keys_stream): Remove this unused function.
8359         (import_keys_internal): Add arg origin.
8360         (import_keys): Ditto.
8361         (import_keys_es_stream): Ditto.
8362         (import): Ditto.
8363         (import_one): Ditto.
8364         (apply_meta_data): New stub.
8365         (import_secret_one): Pass 0 for ORIGIN.
8366         * g10/keyserver.c (keyserver_get_chunk): For now pass 0 for ORIGIN.
8367         (keyserver_fetch): Add arg origin.
8368         (keyserver_import_cert): Pass KEYORG_DANE for ORIGIN.
8369         (keyserver_import_wkd): Pass KEYORG_WKD for ORIGIN.
8370         * g10/gpg.c (main): Pass OPT.KEY_ORIGIN to import_keys and
8371         keyserver_fetch.
8372         * g10/card-util.c (fetch_url): Pass KEYORG_URL for ORIGIN.
8373
8374         gpg: New option --key-origin.
8375         + commit fa1155e89ebb4b16ee95549b8ab72672df3a0c54
8376         * g10/keydb.h (KEYORG_): Rename to KEYORG_.
8377         * g10/packet.h (PKT_user_id): Rename field keysrc to keyorg.  Adjust
8378         users.
8379         (PKT_public_key): Ditto.
8380         (PKT_ring_trust): Ditto.
8381         * g10/options.h (struct opt): Add field key_origin.
8382         * g10/getkey.c (parse_key_origin): New.
8383         * g10/gpg.c (oKeyOrigin): New.
8384         (opts): Add "keys-origin".
8385         (main): Set option.
8386
8387 2017-07-13  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8388
8389         doc: Document gnupg version requirement for gpg-preset-passphrase.
8390         + commit 877a321d011deb3e8501aa9cc5e9f9cd0b19dddf
8391
8392
8393 2017-07-13  Justus Winter  <justus@g10code.com>
8394
8395         gpgscm: Make loading of modules less verbose.
8396         + commit f78fe1a4ec9d343199e1f424dd09e2937c913412
8397         * tests/gpgscm/main.c (load): Increase logging threshold.
8398
8399         gpgscm: Make it impossible to catch '*interpreter-exit*'.
8400         + commit bce02a8b0f0e51775a4ee5536ccf35efc1f15ca6
8401         * tests/gpgscm/init.scm (throw'): Make it impossible to catch
8402         '*interpreter-exit*'.  This fixes 'exit' (and with it 'fail') inside
8403         'catch' statements.
8404
8405 2017-07-10  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8406
8407         tofu: Compare squares instead of square roots.
8408         + commit d24594976686983c7186cbe4e78153888a13b6e4
8409         * g10/Makefile.am (tofu_source) [USE_TOFU]: Remove sqrtu32.h and
8410         sqrtu32.c.
8411         * g10/sqrtu32.h, g10/sqrtu32.c: Removed files.
8412         * g10/tofu.c: Compare squares instead of square roots.
8413
8414         speedo: Provide a vagrantfile to test speedo in an isolated VM.
8415         + commit 1455b406e63dd262938e49da5f83c05c17c60a8d
8416         * build-aux/Vagrantfile: New file.
8417
8418 2017-07-06  Neal H. Walfield  <neal@g10code.com>
8419
8420         doc: Improve TOFU documentation.
8421         + commit 243b2a570c30586e19b8c88e43b282d62d8eb77c
8422         * doc/gpg.texi: Improve TOFU documentation.
8423
8424 2017-07-05  Werner Koch  <wk@gnupg.org>
8425
8426         agent: Use MAX_PASSPHRASE_LEN (255) also for the loopback.
8427         + commit 3681ee7dc1e9d8c94fdb046d7be0bbcfeba1cfe9
8428         * agent/call-pinentry.c (agent_get_passphrase): Reduce maximum
8429         passphrase length as conveyed to the loopback to MAX_PASSPHRASE_LEN.
8430         * agent/genkey.c (agent_ask_new_passphrase): Extend the maximum
8431         passphrase as conveyed to the loopback to MAX_PASSPHRASE_LEN.
8432
8433         doc: Update yat2m to take care of SOURCE_DATE_EPOCH.
8434         + commit 139de02b93773615bdd95e04a7f0c1ad73b4f6fb
8435         * doc/yat2m.c (main): Set a default for OPT_DATE.
8436
8437         doc: Prefer an installed version of yat2m.
8438         + commit f6faa058749846de18cb34f1cc79867bb0029922
8439         * configure.ac (YAT2M): Check for tool.
8440         * doc/Makefile.am (yat2m-stamp): Use installed tool if possible.
8441
8442 2017-07-01  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
8443
8444         doc: Document obsolete option in gpgsm.  Closes T2231.
8445         + commit 7fb724c61655c6f75c61572d65a46e21ae112574
8446         * doc/gpgsm.texi: Mark --prefer-system-dirmngr as obsolete.
8447
8448 2017-06-28  Werner Koch  <wk@gnupg.org>
8449
8450         agent: Fix option --debug-wait.
8451         + commit ecd6c0160f49ae83001dfd150df6b1238fc479d5
8452         * agent/gpg-agent.c (opts): Typo fix.
8453
8454 2017-06-26  Justus Winter  <justus@g10code.com>
8455
8456         agent: Support unprotected ssh keys.
8457         + commit 273964798592cd479c111f47e8ce46d5b1999d6a
8458         * agent/command-ssh.c (ssh_key_to_protected_buffer): If the empty
8459         passphrase is supplied, do not protect the key.
8460
8461         tests: Improve test.
8462         + commit b49b1a87ac2695e3892fb001878da59fbc92fa37
8463         * tests/openpgp/ssh-export.scm: Split output at any whitespace.
8464
8465 2017-06-23  Werner Koch  <wk@gnupg.org>
8466
8467         agent: Shutdown on removal of the home directory.
8468         + commit 1ead1ca818bddabc3bca22c195be667993eb3e2e
8469         * common/sysutils.c (gnupg_inotify_watch_delete_self): New.
8470         * agent/gpg-agent.c (handle_connections): Rename my_inotify_fd to
8471         sock_inotify_fd.
8472         (handle_connections): Add home_inotify_fd to watch the home directory.
8473
8474         build: Add missing LIBASSUAN_CFLAGS to dirmngr/.
8475         + commit 815ecdf08a4285c75892cf9ab72feb13f3bcf590
8476         * dirmngr/Makefile.am (t_http_CFLAGS): Add LIBASSUAN_CFLAGS.
8477         (t_ldap_parse_uri_CFLAGS): Ditto.
8478         (t_dns_stuff_CFLAGS): Ditto.
8479
8480         gpg,gpgsm: Emit status code ENCRYPTION_COMPLIANCE_MODE.
8481         + commit f31dc2540acf7cd7f09fd94658e815822222bfcb
8482         * common/status.h (STATUS_ENCRYPTION_COMPLIANCE_MODE): New.
8483         * g10/encrypt.c (encrypt_crypt): Emit new status code.
8484         * sm/encrypt.c (gpgsm_encrypt): Ditto.
8485
8486 2017-06-21  Justus Winter  <justus@g10code.com>
8487
8488         gpg: Close cached keydb handle in gpgv.
8489         + commit a68a98233ab83f0c7b90e6e588b882085fe59d91
8490         * g10/gpgv.c (main): Close cached handle.
8491
8492         tests: Add test for gpgv.
8493         + commit 62274d3c309d8948405c2f966bef507638b4d5c6
8494         * tests/openpgp/Makefile.am (XTESTS): Add the new test.
8495         * tests/openpgp/gpgv.scm: New file.
8496         * tests/openpgp/signed-messages.scm: Likewise.
8497         * tests/openpgp/verify.scm: Move the signed messages to the new file
8498         and load it.
8499
8500         gpg: Fix printing keyserver URLs and notation data.
8501         + commit 890a3a70f2e1340d90c7f499358467979b182719
8502         * g10/keylist.c (show_keyserver_url): Print to 'fp', not to 'stdout'.
8503         (show_notation): Likewise.
8504
8505 2017-06-20  Justus Winter  <justus@g10code.com>
8506
8507         dirmngr: Properly handle SRV records.
8508         + commit 48aae8167dcae80d43b08167a88d9eb170781a04
8509         * dirmngr/ks-engine-hkp.c (enum ks_protocol): New type.
8510         (struct hostinfo_s): New flags indicating whether we already did a
8511         A lookup, or a SRV lookup per protocol.  Turn 'port' into an array.
8512         (create_new_hostinfo): Initialize new fields.
8513         (add_host): Update the port for the given protocol.
8514         (map_host): Simplify hosttable lookup misses.  Check the SRV records
8515         for both protocols on demand, do the A lookup just once.  Return the
8516         correct port.
8517
8518         dirmngr: Refactor variable-sized array code.
8519         + commit fc4834d213af031b456c49c1ba5b5ef8873d1f18
8520         * dirmngr/ks-engine-hkp.c (struct hostinfo_s): Add explicit length and
8521         size fields.
8522         (MAX_POOL_SIZE): New macro.
8523         (create_new_hostinfo): Initialize new fields.
8524         (host_in_pool_p): Adapt.
8525         (select_random_host): Likewise.
8526         (add_host): Likewise.  Move the resizing logic here.
8527         (hostinfo_sort_pool): New function.
8528         (map_host): Simplify.  Move the resizing logic away from here.
8529         (ks_hkp_mark_host): Adapt.
8530         (ks_hkp_print_hosttable): Likewise.
8531
8532         gpg: Fix error handling.
8533         + commit badc1cdae52bd434e5fac2e4275575afeccc2837
8534         * g10/keygen.c (generate_subkeypair): Handle errors from pinentry.
8535
8536 2017-06-19  Werner Koch  <wk@gnupg.org>
8537
8538         gpg,gpgsm: Fix compliance check for DSA and avoid an assert.
8539         + commit 3621dbe52584bc8b417f61b5370ebaa5598db956
8540         * common/compliance.c (gnupg_pk_is_compliant): Swap P and Q for DSA
8541         check.  Explicitly check for allowed ECC algos.
8542         (gnupg_pk_is_allowed): Swap P and Q for DSA check.
8543         * g10/mainproc.c (proc_encrypted): Simplify SYMKEYS check.  Replace
8544         assert by debug message.
8545
8546 2017-06-19  Justus Winter  <justus@g10code.com>
8547
8548         gpgscm: Limit the number of parallel jobs.
8549         + commit 61ef43546ba9f0209692a1569d2f033436566a02
8550         * ffi.c (do_wait_processes): Suppress the timeout error.
8551         * tests.scm (semaphore): New definition.
8552         (test-pool): Only run a bounded number of tests in parallel.
8553         (test::started?): New function.
8554         (run-tests-parallel): Do not report results, do not start the tests.
8555         (run-tests-sequential): Adapt.
8556         (run-tests): Parse the number of parallel jobs.
8557
8558         gpgscm: Improve option parsing.
8559         + commit e555e7ed7de20fbbb1e3b005c32e292f29cc4a58
8560         * tests/gpgscm/tests.scm (flag): Accept arguments of the form
8561         '--foo=bar'.
8562
8563         gpgscm: Improve error handling of foreign functions.
8564         + commit 6639aedaee051e8104d7f63b9a5812abf79440ed
8565         * tests/gpgscm/ffi.scm (ffi-fail): Do not needlessly join the error
8566         message.
8567
8568         gpgscm: Improve error reporting.
8569         + commit 4c8be58fd46bb16332e84ab8ce978087dc5c68a3
8570         * tests/gpgscm/init.scm (throw'): Guard against 'args' being atomic.
8571         * tests/gpgscm/scheme.c (Eval_Cycle): Remove any superfluous colons in
8572         error messages.
8573
8574         tests: Run the OpenPGP tests using the new extended key format.
8575         + commit b766d3d1034e6068a91755ada68f7f7dbe2943b6
8576         * tests/openpgp/all-tests.scm: Generalize a bit, and also add a
8577         variant that uses the new extended key format.
8578         * tests/openpgp/defs.scm (create-gpghome): Conditionally enable the
8579         new extended key format.
8580
8581 2017-06-19  Werner Koch  <wk@gnupg.org>
8582
8583         Change license of some files to LGPLv2.1.
8584         + commit 3419a339d9c4e800bf30e9021e05982d8c1021c1
8585         * COPYING.LIB: Rename to COPYING.LGPL3.
8586         * COPYING.LGPL21: New.
8587         * COPYING.GPL2: New.
8588         * Makefile.am: Distribute them.
8589         * AUTHORS: Update license pointers.  Add BSI as copyright holder.
8590         * common/compliance.c, common/compliance.h: Add BSI copyright notice.
8591         Break overlong lines.
8592         * dirmngr/loadswdb.c: Add BSI copyright notices.
8593         * dirmngr/server.c: Ditto.
8594         * tools/call-dirmngr.c: Change license to LGPLv2.1.  Add BSI
8595         copyright notice.
8596         * tools/call-dirmngr.h: Ditto.
8597         * tools/gpg-wks-client.c: Ditto.
8598         * tools/gpg-wks-server.c: Ditto.
8599         * tools/gpg-wks.h: Ditto.
8600         * tools/mime-maker.c: Ditto.
8601         * tools/mime-maker.h: Ditto.
8602         * tools/mime-parser.c: Ditto.
8603         * tools/mime-parser.h: Ditto.
8604         * tools/send-mail.c: Ditto.
8605         * tools/send-mail.h: Ditto.
8606         * tools/wks-receive.c: Ditto.
8607         * tools/wks-util.c: Ditto.
8608         * tools/rfc822parse.c, tools/rfc822parse.h: Change license to LGPLv2.1.
8609
8610 2017-06-19  Justus Winter  <justus@g10code.com>
8611
8612         gpg: Disable compliance module for other GnuPG components.
8613         + commit 6e23416fe61d4130918f2d1bf6e1f98d102c4610
8614         * common/compliance.c (gnupg_{pk,cipher,digest}_is_compliant): Return
8615         false if the module is not initialized.
8616         (gnupg_{pk,cipher,digest}_is_allowed): Return true if the module is
8617         not initialized.
8618         (gnupg_status_compliance_flag): Do not assert that the module is
8619         initialized.
8620         (gnupg_parse_compliance_option): Likewise.
8621         (gnupg_compliance_option_string): Likewise.
8622
8623 2017-06-14  Justus Winter  <justus@g10code.com>
8624
8625         gpg: Check and fix keys on import.
8626         + commit 9b12b45aa5e67d4d422bf75a3879df1d52dbe67f
8627         * doc/gpg.texi: Document the new import option.
8628         * g10/gpg.c (main): Make the new option default to yes.
8629         * g10/import.c (parse_import_options): Parse the new option.
8630         (import_one): Act on the new option.
8631         * g10/options.h (IMPORT_REPAIR_KEYS): New macro.
8632
8633         gpg: Refactor key checking and fixing.
8634         + commit 404fa8211b6188a0abe83ef43a4b44d528c0b035
8635         * g10/Makefile.am (gpg_sources): Add new files.
8636         * g10/gpgcompose.c (keyedit_print_one_sig): New stub.
8637         * g10/keyedit.c (sig_comparison): Move to new module.
8638         (check_all_keysigs): Likewise.
8639         (fix_keyblock): Adapt callsite.
8640         (keyedit_menu): Likewise.
8641         * g10/key-check.c: New file.
8642         * g10/key-check.h: Likewise.
8643
8644 2017-06-13  Justus Winter  <justus@g10code.com>
8645
8646         gpg: Refactor keyedit module.
8647         + commit 8095d16b3ef6b5f01ec351824855708149f1c1c3
8648         * g10/Makefile.am (gpg_SOURCES): Add new file.
8649         * g10/keyedit.c (NODFLG_*): Move flags to the new header file.
8650         (print_one_sig): Export symbol and rename accordingly.
8651         (print_and_check_one_sig): Adapt accordingly.
8652         (check_all_keysigs): Likewise.
8653         * g10/keyedit.h: New file.
8654         * g10/main.h: Drop declarations, include new header.
8655
8656         dirmngr: Implement querying nameservers over IPv6.
8657         + commit 15d2a009931f44a60b9df6325f837add208459d6
8658         * dirmngr/dns.c (dns_so_check): Reinitialize sockets on address family
8659         mismatch.
8660         (enum dns_res_state): New states for querying over IPv6.
8661         (dns_res_exec): Implement the new states by copying and modifying the
8662         IPv4 variants.  Branch to their respective counterparts if the current
8663         list of resolvers using the current address family is exhausted.
8664
8665 2017-06-13  Werner Koch  <wk@gnupg.org>
8666
8667         gpg: Disable keydb handle caching only for W32.
8668         + commit e80925171ddb20c7e76c1db88c15ce2d9b09db86
8669         * g10/getkey.c (getkey_end) [!W32]: Re-enable caching.
8670
8671         common: Fix -Wswitch warning.
8672         + commit 7c91b48f0e80266cf7491c2bb7d8aabc12362643
8673         * common/compliance.c (gnupg_digest_is_allowed): Don't include
8674         GCRY_MD_WHIRLPOOL because it is not a digest_algo_t.
8675
8676 2017-06-11  Neal H. Walfield  <neal@g10code.com>
8677
8678         gpg: Send gpgcompose --help output to stdout, not stderr.
8679         + commit 7aeac20f12ed257d3d159b304afeeac7f406c9d2
8680         * g10/gpgcompose.c (show_help): Send gpgcompose --help output to
8681         stdout, not stderr.
8682
8683         gpg: Improve some output of gpgcompose.
8684         + commit cb0484e0762a1ce05d00d949f4b70162e2f7b82c
8685
8686
8687         gpg: Support 'gpgcompose --encrypted-pop --help'
8688         + commit 4ddf4e114c8df06d89144e857b7601de0b7e5a7c
8689         * g10/gpgcompose.c (encrypted_pop_options): New variable.
8690         (encrypted_pop): Support the --help option.
8691
8692         gpg: Remove dead code.
8693         + commit 8a9066865688cf17594b2bdde4b260b0ef36d68e
8694         * g10/gpgcompose.c (filter_pop): F->PKTTYPE will never be
8695         PKT_ENCRYPTED_MDC.
8696         (encrypted_pop): Likewise and there is no option --encrypted-mdc-pop.
8697
8698 2017-06-08  Marcus Brinkmann  <mb@g10code.com>
8699
8700         artwork: Add new banner.
8701         + commit bc5503b2bf273b51d5dc59617e596f1cfb742fbc
8702         * artwork/banner/banner-full.png: New file.
8703         * artwork/banner/banner-rectangle.png: New file.
8704         * artwork/banner/banner.svg: New file.
8705         * artwork/banner/Bungee-Regular.ttf: New file.
8706         * artwork/banner/Raleway-license.txt: New file.
8707         * artwork/banner/banner-half.png: New file.
8708         * artwork/banner/banner-skyscraper.png: New file.
8709         * artwork/banner/Bungee-license.txt: New file.
8710         * artwork/banner/Raleway-ExtraBold.ttf: New file.
8711         * artwork/banner/Raleway-SemiBold.ttf: New file.
8712
8713 2017-06-08  Justus Winter  <justus@g10code.com>
8714
8715         common,gpg,sm: Restrict the use of algorithms according to CO_DE_VS.
8716         + commit a64a55e10420cf11e00062b590dffe5d0c3e8192
8717         * common/compliance.c (gnupg_pk_is_allowed): New function.
8718         (gnupg_cipher_is_allowed): Likewise.
8719         (gnupg_digest_is_allowed): Likewise.
8720         * common/compliance.h (enum pk_use_case): New definition.
8721         (gnupg_pk_is_allowed): New prototype.
8722         (gnupg_cipher_is_allowed): Likewise.
8723         (gnupg_digest_is_allowed): Likewise.
8724         * g10/decrypt-data.c (decrypt_data): Restrict use of algorithms using
8725         the new predicates.
8726         * g10/encrypt.c (encrypt_crypt): Likewise.
8727         * g10/gpg.c (main): Likewise.
8728         * g10/pubkey-enc.c (get_session_key): Likewise.
8729         * g10/sig-check.c (check_signature2): Likewise.
8730         * g10/sign.c (do_sign): Likewise.
8731         * sm/decrypt.c (gpgsm_decrypt): Likewise.
8732         * sm/encrypt.c (gpgsm_encrypt): Likewise.
8733         * sm/gpgsm.c (main): Likewise.
8734         * sm/sign.c (gpgsm_sign): Likewise.
8735         * sm/verify.c (gpgsm_verify): Likewise.
8736
8737         gpg: Fix computation of compliance with CO_DE_VS.
8738         + commit b03fab09e188f7bb10237d4f20455e4026737e4e
8739         * g10/mainproc.c (proc_encrypted): Symmetric encryption is also in
8740         compliance with CO_DE_VS.
8741
8742 2017-06-08  Werner Koch  <wk@gnupg.org>
8743
8744         dirmngr: Implement HTTP connect timeouts of 15 or 2 seconds.
8745         + commit 9b43220b8ad1a5c1cd51de3bbfff7ccbcc3fa877
8746         * dirmngr/dirmngr.c (oConnectTimeout, oConnectQuickTimeout): New
8747         enums.
8748         (opts): New options --connect-timeout and --connect-quick-timeout.
8749         (DEFAULT_CONNECT_TIMEOUT): New.
8750         (DEFAULT_CONNECT_QUICK_TIMEOUT): New.
8751         (parse_rereadable_options): Handle new options.
8752         (post_option_parsing): New.  Use instead of direct calls to
8753         set_debug() and set_tor_mode ().
8754         (main): Setup default timeouts.
8755         (dirmngr_init_default_ctrl): Set standard connect timeout.
8756         * dirmngr/dirmngr.h (opt): New fields connect_timeout and
8757         connect_quick_timeout.
8758         (server_control_s): New field timeout.
8759         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass timeout to
8760         http_raw_connect.
8761         * dirmngr/ks-engine-hkp.c (send_request): Call
8762         http_session_set_timeout.
8763         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
8764         * dirmngr/server.c (cmd_wkd_get, cmd_ks_search, cmd_ks_get)
8765         (cmd_ks_fetch): Implement --quick option.
8766
8767         dirmngr: Allow a timeout for HTTP and other TCP connects.
8768         + commit 5b9025cfa1f9b1c67ddf2f6bf87d863e780cf157
8769         * dirmngr/http.c: Include fcntl.h.
8770         (http_session_s): Add field 'connect_timeout'.
8771         (http_session_new): Clear that.
8772         (http_session_set_timeout): New function.
8773         (my_wsagetlasterror) [W32]: New.
8774         (connect_with_timeout): New function.
8775         (connect_server): Add arg 'timeout' and call connect_with_timeout.
8776         (send_request): Add arg 'timeout' and pass it to connect_server.
8777         (http_raw_connect): Add arg 'timeout'.
8778         (http_open): Pass TIMEOUT from the session to connect_server.
8779
8780         gpg: Avoid failure exit when scdaemon is disabled but not needed.
8781         + commit 17e5afd80f247c356f03c71e8b61da424ffedabb
8782         * g10/call-agent.c (warn_version_mismatch): Use log_info if error is
8783         "not supported".
8784
8785 2017-06-07  Justus Winter  <justus@g10code.com>
8786
8787         common: Add cipher mode to compliance predicate.
8788         + commit e051e396156211449568afa0ca7505dc13eaa3b4
8789         * common/compliance.c (gnupg_cipher_is_compliant): Add mode parameter.
8790         * common/compliance.h (gnupg_cipher_is_compliant): Likewise.
8791         * g10/mainproc.c (proc_encrypted): Adapt callsite.
8792         * sm/decrypt.c (gpgsm_decrypt): Likewise.
8793
8794         common,gpg,sm: Initialize compliance module.
8795         + commit 21fc2508c979a8202dd8ca7fa7b801e0d62a5ceb
8796         * common/compliance.c (gnupg_initialize_compliance): New function.
8797         * common/compliance.h (gnupg_initialize_compliance): New prototype.
8798         * g10/gpg.c (main): Use the new function.
8799         * sm/gpgsm.c (main): Likewise.
8800
8801         common,gpg: Move the compliance option printer.
8802         + commit f440cf73eab0b0e75e3cb2e8c9e70a77f20ef1dc
8803         * common/compliance.c (gnupg_compliance_option_string): New function.
8804         * common/compliance.h (gnupg_compliance_option_string): New prototype.
8805         * g10/encrypt.c (write_pubkey_enc_from_list): Update callsite.
8806         * g10/gpg.c (main): Likewise.
8807         * g10/keyedit.c (keyedit_menu): Likewise.
8808         * g10/pkclist.c (build_pk_list): Likewise.
8809         * g10/main.h (compliance_option_string): Remove prototype.
8810         * g10/misc.c (compliance_option_string): Remove function.
8811
8812         common,gpg,sm: Move the compliance option parser.
8813         + commit 842d233d408457cfa9a8473a6748472956f44e84
8814         * common/compliance.c (gnupg_parse_compliance_option): New function.
8815         * common/compliance.h (struct gnupg_compliance_option): New type.
8816         (gnupg_parse_compliance_option): New prototype.
8817         * g10/gpg.c (parse_compliance_option): Remove function.
8818         (compliance_options): New variable.
8819         (main): Adapt callsite.
8820         * sm/gpgsm.c (main): Use the new common function.
8821         * sm/gpgsm.h (opt): New field 'compliance'.
8822
8823         gpg: Improve compliance with CO_DE_VS.
8824         + commit 027ce4ba37be1d052bca2f6109fe810ef57f4038
8825         * g10/gpg.c (set_compliance_option): The specification, section 4.1.1,
8826         forbids the use of encryption without integrity protection.
8827
8828 2017-06-07  Andre Heinecke  <aheinecke@intevation.de>
8829
8830         speedo: Fix a minor memleak in the installer.
8831         + commit 13dc75a4e7cc2959003c08940fc53c6ece7b77e4
8832         * build-aux/speedo/w32/g4wihelp.c (path_remove): Free path_new on
8833         early return.
8834
8835 2017-06-06  Andre Heinecke  <aheinecke@intevation.de>
8836
8837         speedo: Fix source tar call ambiguity.
8838         + commit 96acbdd7265f504d06783adfd6322a6675c41c0a
8839         * build-aux/speedo.mk (dist-source): Expand exclude-vc to
8840         exclude-vcs.
8841
8842 2017-06-01  Justus Winter  <justus@g10code.com>
8843
8844         gpg: Report compliance with CO_DE_VS.
8845         + commit be8ca8852629786266db4d3d69b2c2fb03bd6365
8846         * common/compliance.c (gnupg_pk_is_compliant): Add DSA with certain
8847         parameters.
8848         (gnupg_cipher_is_compliant): New function.
8849         (gnupg_digest_is_compliant): Likewise.
8850         * common/compliance.h (gnupg_cipher_is_compliant): New prototype.
8851         (gnupg_digest_is_compliant): Likewise.
8852         * common/status.h (STATUS_DECRYPTION_COMPLIANCE_MODE): New status.
8853         (STATUS_VERIFICATION_COMPLIANCE_MODE): Likewise.
8854         * doc/DETAILS: Document the new status lines.
8855         * g10/mainproc.c (proc_encrypted): Compute compliance with CO_DE_VS
8856         and report that using the new status line.
8857         (check_sig_and_print): Likewise.
8858         * sm/decrypt.c (gpgsm_decrypt): Likewise.
8859         * sm/verify.c (gpgsm_verify): Likewise.
8860
8861         common: Improve checking for compliance with CO_DE_VS.
8862         + commit 3b70f62423041e614332b90d782576ee6868a030
8863         * common/compliance.c (gnupg_pk_is_compliant): Only certain RSA key
8864         sizes are compliant.
8865
8866         gpg,common: Move the compliance framework.
8867         + commit 8a012280e0f0a462c094d106355aa436fceb1b76
8868         * common/Makefile.am (common_sources): Add new files.
8869         * common/compliance.c: New file.  Move 'gnupg_pk_is_compliant' here,
8870         and tweak it to not rely on types private to gpg.
8871         * common/compliance.h: New file.  Move the compliance enum here.
8872         * g10/keylist.c (print_compliance_flags): Adapt callsite.
8873         * g10/main.h (gnupg_pk_is_compliant): Remove prototype.
8874         * g10/misc.c (gnupg_pk_is_compliant): Remove function.
8875         * g10/options.h (opt): Use the new compliance enum.
8876         * sm/keylist.c (print_compliance_flags): Use the common functions.
8877
8878 2017-05-31  Justus Winter  <justus@g10code.com>
8879
8880         gpg: Fix compliance computation.
8881         + commit 02af509dfc2b893720aa0c7b380fd7736b2bafd0
8882         * g10/misc.c (gnupg_pk_is_compliant): Compare against CO_RFC2440, not
8883         RFC2440 which is actually a predicate.
8884
8885         sm: Simplify code.
8886         + commit f9cb15b385f64f7c9403670f03632f81a874f213
8887         * sm/verify.c (gpgsm_verify): Simplify by using a newer gcrypt
8888         interface.
8889
8890         doc: Improve documentation.
8891         + commit 485b5a6e6dfe7aa545afa926e060d516ae911e42
8892         * doc/gpgsm.texi: Mention that '--with-key-data' implies
8893         '--with-colons'.
8894
8895 2017-05-31  NIIBE Yutaka  <gniibe@fsij.org>
8896
8897         agent: Fix error from do_encryption.
8898         + commit c03e0eb01dc4632432d0472a6f8051142082bea4
8899         * agent/protect.c (do_encryption): Don't mask failure of OUTBUF
8900         allocation.
8901
8902         scd: Fix error code on failure at usb_init.
8903         + commit 8defb21d34410d000c8b776e0e3a1edd04762638
8904         * scd/ccid-driver.c (ccid_dev_scan): Return GPG_ERR_ENODEV.
8905
8906         scd: Handle a failure of libusb_init.
8907         + commit 5c33649782bf255af5a55f16eac5e85f059b00bf
8908         * scd/ccid-driver.c (ccid_get_reader_list, ccid_dev_scan): Handle
8909         failure.
8910
8911 2017-05-30  Andre Heinecke  <aheinecke@intevation.de>
8912
8913         gpg: Disable keydb handle caching.
8914         + commit d3d640b9cc98dd0d06b49a2e4d46eb67af96fe29
8915         * g10/getkey.c (getkey_end): Disable caching of the open keydb
8916         handle.
8917
8918 2017-05-30  NIIBE Yutaka  <gniibe@fsij.org>
8919
8920         agent: Fix memory leaks.
8921         + commit 996544626ea416c173a940db47f47f9e5cbd844c
8922         * agent/divert-scd.c (ask_for_card): Free WANT_KID and WANT_SN_DISP.
8923         * agent/gpg-agent.c (create_server_socket): Free UNADDR.
8924
8925 2017-05-25  Werner Koch  <wk@gnupg.org>
8926
8927         dirmngr: This towel should better detect a changed resolv.conf.
8928         + commit de3a0988ef9addccd6b5c7950fb8797afbc3978d
8929         * dirmngr/dns-stuff.c (resolv_conf_changed_p): Fix initialization time
8930         issue.
8931
8932         dirmngr: Re-init libdns resolver on towel change of resolv.conf.
8933         + commit b5f356e9fba2d99909f8f54d7b7e6836bed87b68
8934         * dirmngr/dns-stuff.c: Include sys/stat.h.
8935         (RESOLV_CONF_NAME): New macro to replace a string.
8936         (resolv_conf_changed_p): New.
8937         (libdns_init): Call new function
8938         (libdns_res_open): Ditto.
8939
8940 2017-05-24  Justus Winter  <justus@g10code.com>
8941
8942         agent: Make digest algorithms for ssh fingerprints configurable.
8943         + commit 525f2c482abb6bc2002eb878b03558fb43e6b004
8944         * agent/agent.h (opt): New field 'ssh_fingerprint_digest'.
8945         * agent/command-ssh.c (data_sign, ssh_identity_register): Honor the
8946         option for strings used to communicate with the user.
8947         * agent/findkey.c (agent_modify_description): Likewise.
8948         * agent/gpg-agent.c (cmd_and_opt_values): New value.
8949         (opts): New option '--ssh-fingerprint-digest'.
8950         (parse_rereadable_options): Set the default to MD5 for now.
8951         (main): Handle the new option.
8952         * doc/gpg-agent.texi: Document the new option.
8953
8954         agent: Write both ssh fingerprints to 'sshcontrol' file.
8955         + commit a5f046d99a084b6a95268f03c1b588e8b78083cb
8956         * agent/command-ssh.c (add_control_entry): Hand in the key, write both
8957         the MD5- and the SHA256-based fingerprint to the 'sshcontrol' file
8958         when adding ssh keys.
8959         (ssh_identity_register): Adapt callsite.
8960
8961         common: Correctly render SHA256-based ssh fingerprints.
8962         + commit 3a07a69dfc87b4fff610740d3dde8e23f0d2f8bc
8963         * common/ssh-utils.c (dummy_realloc): New function.
8964         (dummy_free): Likewise.
8965         (get_fingerprint): Prepend the fingerprint with the name of the digest
8966         algorithm.  Correctly render SHA256-based ssh fingerprints.
8967         * common/t-ssh-utils.c (sample_keys): Add SHA256 hashes for the keys.
8968         (main): Add an option to dump the keys to gather fingerprints, also
8969         print the SHA256 fingerprint for keys given as arguments, and check
8970         the SHA256 fingerprints of the test keys.
8971
8972         common: Support different digest algorithms for ssh fingerprints.
8973         + commit 3ac1a9d3a018816233a855faff059b4e0657a0f1
8974         * common/ssh-utils.c (get_fingerprint): Add and honor 'algo' parameter.
8975         (ssh_get_fingerprint{,_string}): Likewise.
8976         * common/ssh-utils.h (ssh_get_fingerprint{,_string}): Update prototypes.
8977         * common/t-ssh-utils.c (main): Adapt accordingly.
8978         * agent/command-ssh.c (agent_raw_key_from_file): Likewise.
8979         (ssh_identity_register): Likewise.
8980         * agent/command.c (do_one_keyinfo): Likewise.
8981         * agent/findkey.c (modify_description): Likewise.
8982
8983 2017-05-22  NIIBE Yutaka  <gniibe@fsij.org>
8984
8985         agent: Add const qualifier for read-only table.
8986         + commit 509e4a4d7491daf496b21e5892f4f63ab90e8e21
8987         * agent/call-pinentry.c (start_pinentry): Add const to tbl.
8988         * agent/command-ssh.c (request_specs): Add const.
8989         (ssh_key_types): Likewise.
8990         (request_spec_lookup): Add const to the return value and SPEC.
8991         (ssh_request_process): Likewise.
8992         * agent/protect.c (protect_info): Add const.
8993         (agent_unprotect): Add const to algotable.
8994
8995         g10: Fix default-key selection for signing, possibly by card.
8996         + commit fbb2259d22e6c6eadc2af722bdc52922da348677
8997         * g10/call-agent.c (warn_version_mismatch): Revert.
8998         (start_agent): Suppress version mismatch if relevant.
8999         * g10/getkey.c (get_seckey_default_or_card): New.
9000         * g10/skclist.c (build_sk_list): Use get_seckey_default_or_card.
9001
9002 2017-05-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
9003
9004         doc: Fix spellings.
9005         + commit 3713f67026467f63f80649c92ac4cc7973589855
9006
9007
9008         docs: Point to https://dev.gnupg.org/ .
9009         + commit 705da1eb23aef92c42d6d657b20a0984b104f72f
9010         Replace mentions of bugs.gnupg.org with https://dev.gnupg.org/.  Since
9011         the project has transitioned to a better workflow for supporting
9012         contributions, we should ensure that our documentation points to the
9013         right place.
9014
9015 2017-05-17  Justus Winter  <justus@g10code.com>
9016
9017         gpgscm: Fix checking for opcode arguments.
9018         + commit aae50e0b6a61549e226e0c7785260ad517f0ffff
9019         * tests/gpgscm/scheme.c (Eval_Cycle): Update 'pcd' after dispatching
9020         an instruction.
9021
9022         tests: Fix agent teardown in release builds.
9023         + commit 0e1729bb993648deca84a2664ae78edc848d7003
9024         * tests/openpgp/defs.scm (start-agent,stop-agent): Use gpg-conf which
9025         will properly use the '--build-prefix' argument to make gpgconf use
9026         tools from the build directory.
9027
9028 2017-05-17  NIIBE Yutaka  <gniibe@fsij.org>
9029
9030         g10: Fix gpgcompose.c.
9031         + commit ae95a7f5335e605fcd71fbe4a18ed384c88d590a
9032         * g10/gpgcompose.c (show_help): Check return value.
9033
9034         g10: Suppress error for card availability check.
9035         + commit a8dd96826f8484c0ae93c954035b95c2a75c80f2
9036         * g10/call-agent.c (start_agent): Add semantics for card; Suppress
9037         error for card check.
9038         (warn_version_mismatch): Ignore an error for scdaemon.
9039         (agent_scd_serialno): Call start_agent with
9040         FLAG_FOR_CARD_SUPPRESS_ERRORS.
9041
9042 2017-05-16  Justus Winter  <justus@g10code.com>
9043
9044         tests: Configure the environments to use scdaemon from build tree.
9045         + commit 386a7bbb245dd3ab7c4156a554adbe75d82bdf49
9046         * tests/gpgme/gpgme-defs.scm: Use the scdaemon from the build tree
9047         when writing a 'gpg-agent.conf'.
9048         * tests/gpgsm/gpgsm-defs.scm: Likewise.
9049         * tests/openpgp/defs.scm: Likewise.
9050
9051 2017-05-15  Werner Koch  <wk@gnupg.org>
9052
9053         Release 2.1.21.
9054         + commit 9574820329128f0ea8a98f9bfc0e77c73c3e0ec0
9055
9056
9057         po: Update German translation.
9058         + commit 4bd079dbdb44067688377156413dd32a82a89d22
9059
9060
9061         gpg: Do not mark ", " translatable.
9062         + commit 2d381b0f0ba97657e9fb2971eca6648bb77dd2cc
9063         * g10/tofu.c (ask_about_binding): Remove useless translation markers.
9064
9065 2017-05-15  Andre Heinecke  <aheinecke@intevation.de>
9066
9067         dirmngr,w32: Fix ldap crl read on windows.
9068         + commit abe3a9043f86b48b92ddcec47197e032e35a6f4f
9069         Summary:
9070         * dirmngr/ldap-wrapper-ce.c (outstream_cookie_s): Add buffer_read_pos.
9071         (buffer_get_data): Use seperate read pos.
9072
9073 2017-05-15  Werner Koch  <wk@gnupg.org>
9074
9075         common: Let format_text return an error.
9076         + commit 00b7767bc6fe309aa20375c859ebf708cfc7b9ea
9077         * common/stringhelp.c (format_text): Return NULL on error.
9078         * common/t-stringhelp.c (test_format_text): Adjust for change.
9079         * g10/gpgcompose.c (show_help): Abort on out of core.
9080         * g10/tofu.c (ask_about_binding): Abort on format_text error.
9081         (show_statistics): Ditto.
9082         (show_warning): Ditto.
9083
9084 2017-05-11  Justus Winter  <justus@g10code.com>
9085
9086         tests: Also run all OpenPGP tests using keyrings.
9087         + commit bc01d62dc5d520e138499df5d80fb50f9e87e3e8
9088         * tests/openpgp/all-tests.scm: Run each test twice, once with public
9089         keys stored in a keybox, once with a keyring.
9090         * tests/openpgp/defs.scm (create-gpghome): Create a public keyring to
9091         make GnuPG use that instead of creating a keybox if '--use-keyring' is
9092         given.
9093         * tests/openpgp/setup.scm: Fix flag handling and usage.
9094
9095         tests: Make it possible to run all tests using our infrastructure.
9096         + commit f4365790daa1d1400c7f0fe73ac9a6d25f0c6d0a
9097         * Makefile.am (TESTS_ENVIRONMENT): New variable.
9098         (check-all): New phony target to run all tests.
9099         * tests/gpgme/gpgme-defs.scm (have-gpgme?): New function that tests
9100         whether the GPGME test suite is available instead of exiting the
9101         process.
9102         * tests/gpgscm/init.scm (export): New macro.
9103         * tests/gpgscm/tests.scm (run-tests): New function.
9104         (load-tests): Likewise.
9105         * tests/gpgme/run-tests.scm: Simplify and move the parsing of the list
9106         of tests to 'all-tests.scm'.
9107         * tests/gpgsm/run-tests.scm: Likewise.
9108         * tests/migrations/run-tests.scm: Likewise.
9109         * tests/openpgp/run-tests.scm: Likewise.
9110         * tests/gpgme/Makefile.am: To select the tests to run, use the
9111         variable 'TESTS'.  This harmonizes the interface with the automake
9112         test suite.
9113         * tests/gpgsm/Makefile.am: Likewise.
9114         * tests/migrations/Makefile.am: Likewise.
9115         * tests/openpgp/Makefile.am: Likewise.
9116         * tests/openpgp/README: Likewise.
9117         * agent/all-tests.scm: New file.
9118         * common/all-tests.scm: Likewise.
9119         * g10/all-tests.scm: Likewise.
9120         * g13/all-tests.scm: Likewise.
9121         * tests/gpgme/all-tests.scm: Likewise.
9122         * tests/gpgsm/all-tests.scm: Likewise.
9123         * tests/migrations/all-tests.scm: Likewise.
9124         * tests/openpgp/all-tests.scm: Likewise.
9125         * tests/run-tests.scm: Likewise.
9126
9127         tests: Move the makefile parser.
9128         + commit 78d6a25a2db22ad2ae30d57ca980c0400cfef726
9129         * tests/gpgme/gpgme-defs.scm (parse-makefile, parse-makefile-expand):
9130         Move...
9131         * tests/gpgscm/makefile.scm: ... here.
9132         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
9133
9134         gpgscm: Make it possible to set the logfile name.
9135         + commit 29ef34cc4cb23e7b743dbf4cc8e5761f06076b9a
9136         * tests/gpgscm/tests.scm (test): Only set the default log filename
9137         when it has not been set before.
9138
9139 2017-05-10  NIIBE Yutaka  <gniibe@fsij.org>
9140
9141         g10, sm, dirmngr, common: Add comment for fall through.
9142         + commit 0ce94a9698104d9bfc73d5a37478189564c96eb4
9143         * common/b64dec.c (b64dec_proc): Comment to clarify.
9144         * dirmngr/cdblib.c (cdb_make_put): Use same pattern to clarify.
9145         * dirmngr/dirmngr-client.c (read_pem_certificate): Likewise.
9146         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Likewise.
9147         * g10/armor.c (unarmor_pump): Likewise.
9148         * g10/gpg.c (main): Likewise.
9149         * g10/import.c (read_block): Likewise.
9150         * g10/keygen.c (make_backsig): Likewise.
9151         * g10/pkclist.c (check_signatures_trust):  Likewise.
9152         * sm/gpgsm.c (main): Likewise.
9153
9154         g10: Stop compiler warning for t-stutter.
9155         + commit 98b759119c81c5b39f34f8a9a7b6a57e91ad6470
9156         * g10/t-stutter.c (do_test): Refer current_test_group_failed.
9157
9158 2017-05-08  Justus Winter  <justus@g10code.com>
9159
9160         gpg: Properly account for ring trust packets.
9161         + commit 22739433e98be80e46fe7d01d52a9627c1aebaae
9162         * g10/keyring.c (keyring_get_keyblock): Use the parser's packet count
9163         instead of counting ourself.
9164         * g10/packet.h (struct parse_packet_ctx_s): New field
9165         'n_parsed_packets'.
9166         (init_parse_packet): Initialize new field.
9167         * g10/parse-packet.c (parse): Count packets.
9168
9169 2017-05-04  Justus Winter  <justus@g10code.com>
9170
9171         tests: Support tests that are expected to fail.
9172         + commit d6b46462f8c5c705ffb7cf8af03465a926aa11d3
9173         * tests/gpgscm/tests.scm (test-pool): Rework reporting.  Filter using
9174         the computed test status instead of the return value.  Also print the
9175         new categories 'failed expectedly' and 'passed unexpectedly'.
9176         (test): If a test ends with a bang (!), it is expected to fail.  Adapt
9177         status, status-string, and xml accordingly.
9178
9179         tests: Add function to dump packets.
9180         + commit eab0138e3179f247180a639a91570e5ee2c6ad0e
9181         * tests/openpgp/defs.scm (gpg-dump-packets): New function.
9182
9183 2017-05-03  Andre Heinecke  <aheinecke@intevation.de>
9184
9185         speedo,w32: Fix silent user mode installation.
9186         + commit d378cc34a8d3d5053cf0c5ac7aa731c1bcefee22
9187         * build-aux/speedo/w32/inst.nsi (AddToPath): Move account
9188         check here.
9189         (PrintNonAdminWarning): Remove is_user_install variable.
9190
9191 2017-05-03  Justus Winter  <justus@g10code.com>
9192
9193         gpgscm: Create and re-use frame objects.
9194         + commit 8a168a6d4052ec31fed77c79bb96ffdd32bf9646
9195         * tests/gpgscm/scheme-private.h (struct scheme): New field
9196         'frame_freelist'.
9197         * tests/gpgscm/scheme.c (enum scheme_types): New type 'T_FRAME'.
9198         (type_to_string): Handle new type.
9199         (settype): New macro.
9200         (gc_disable): Make sure there is at least one frame in the free list.
9201         (mark): Handle frame objects.
9202         (finalize_cell): Likewise.
9203         (dump_stack_initialize): Initialize free list.
9204         (dump_stack_free): Simplify.
9205         (frame_length): New variable.
9206         (dump_stack_make_frame): New function.
9207         (frame_slots): Likewise.
9208         (frame_payload): New macro.
9209         (dump_stack_allocate_frame): New function.
9210         (dump_stack_deallocate_frame): Likewise.
9211         (dump_stack_preallocate_frame): Likewise.
9212         (_s_return): Unpack frame object and deallocate it.
9213         (s_save): Wrap state in an frame object.
9214         (dump_stack_mark): Mark the free list.
9215
9216         gpgscm: Merge opexe_0.
9217         + commit 9c6407d17e0cb9f4a370b1b83e7816577ec7d29d
9218         * tests/gpgscm/scheme-private.h (struct scheme): Remove field 'op'.
9219         * tests/gpgscm/scheme.c (opexe_0): Inline into 'Eval_Cycle'.
9220         (_Error_1): Return the opcode to evaluate next.
9221         (Error_1): Do not return, but set the opcode and goto dispatch.
9222         (Error_0): Likewise.
9223         (s_goto): Likewise.
9224         (s_return): Likewise.
9225         (s_return_enable_gc): Likewise.
9226         (s_thread_to): Remove superfluous cast.
9227         (_s_return): Return the opcode to evaluate next.
9228         (scheme_init_custom_alloc): Adapt to removal of field 'op'.
9229
9230 2017-05-03  Andre Heinecke  <aheinecke@intevation.de>
9231
9232         speedo,w32: Allow installation as normal user.
9233         + commit cacfd4bce94704b531f68ee76fb40789e44fde67
9234         * build-aux/speedo/w32/g4wihelp.c (ENV_HK_USER, ENV_REG_USER):
9235         New defines.
9236         (path_add): Handle is_user_install variable. Don't abort
9237         if Path reg key does not exist. Fix crash if Path reg key
9238         does not contain a semicolon.
9239         (path_remove): Handle is_user_install variable. Fix crash
9240         if Path reg key does not exist.
9241         * build-aux/speedo/w32/inst.nsi: Remove obsolete HAVE_STARTMENU
9242         this was double guarded with WITH_GUI. Add Multiuser plugin and
9243         defines for this. Use SHCTX instead of HKLM / HKCU.
9244         (PrintNonAdminWarning): Only Warn and don't abort.
9245
9246 2017-05-02  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
9247
9248         g10: Remove skeleton options files.
9249         + commit 201f86803017c1db373023f7b506d4a0dc644bbc
9250         * build-aux/speed/w32/inst.nsi: stop installing skeleton files.
9251         * doc/gpg.texi: stop documenting skeleton files.
9252         * g10/Makefile.am: stop installing skeleton files.
9253         * g10/openfile.c (copy_options_file): Remove.
9254         (try_make_homedir): do not call copy_options_file.
9255
9256 2017-04-27  NIIBE Yutaka  <gniibe@fsij.org>
9257
9258         g10: For signing, prefer available card key when no -u option.
9259         + commit 97a2394ecafaa6f58e4a1f70ecfd04408dc15606
9260         * g10/skclist.c (build_sk_list): Ask gpg-agent if card is available.
9261         Then, use the card key if any.
9262
9263 2017-04-26  NIIBE Yutaka  <gniibe@fsij.org>
9264
9265         g10: Minor clean up.
9266         + commit 2262a80c5f44433a08bc0e21b77d9efe51596f21
9267         * g10/main.h (complete_sig): Remove declaration.
9268         * g10/sign.c (complete_sig): Make it static.
9269
9270 2017-04-25  NIIBE Yutaka  <gniibe@fsij.org>
9271             Tomas Mraz
9272
9273         dirmngr: Fix aliasing problem in dns.c.
9274         + commit 247932f367f856e7ce91528e14f0aaf838150857
9275         * dirmngr/dns.c (dns_ai_setent): Care about aliasing.
9276
9277 2017-04-25  NIIBE Yutaka  <gniibe@fsij.org>
9278
9279         tests: Remove *.conf.tmpl from Makefile.
9280         + commit 7851d73fd7f424f9a649690e1cb3055feb792c51
9281         * tests/openpgp/Makefile.am (TEST_FILES): Remove gpg.conf.tmpl
9282         and gpg-agent.conf.tmpl.
9283
9284         g10: invalidate the fd cache for keyring.
9285         + commit 116cfd60779fbb3540da629db54dc2e148f4a3a2
9286         * g10/keyring.c (keyring_search_reset): Don't keep the FD cache.
9287
9288 2017-04-24  Andre Heinecke  <aheinecke@intevation.de>
9289
9290         w32: Enable wildcard expansion with mingw-w64.
9291         + commit 2e71bf30f038ca0e142acbb6f650ce029105f8a2
9292         * g10/gpg.c: Define _dowildcard = -1;
9293
9294 2017-04-24  Justus Winter  <justus@g10code.com>
9295
9296         tests: Fix Python detection.
9297         + commit ef1922b3b19df0aa7f8c15d503c603f76fc13f82
9298         * tests/gpgme/gpgme-defs.scm (python): Fix Python detection.
9299
9300         gpgscm: Refactor cell finalization.
9301         + commit d2f6798621d751cd6ae6f091c4a2af4569c5b8aa
9302         * tests/gpgscm/scheme.c (finalize_cell): Use switch, return whether
9303         the cell may be freed.
9304         (gc): Update callsite.
9305
9306         gpgscm: Tweak error message display.
9307         + commit 78547bfe8a885579438a17abadca02b62cce2844
9308         * tests/gpgscm/init.scm (throw'): If the first argument to the error
9309         is a string, display it as such.
9310
9311         tests: Deduplicate and simplify code.
9312         + commit 06a177ceea529269a7404740c60416bd6a4567b1
9313         * tests/gpgme/gpgme-defs.scm (create-file): Move...
9314         * tests/gpgsm/gpgsm-defs.scm (create-file): ... likewise...
9315         * tests/openpgp/defs.scm (create-file): Here.
9316         (create-gpghome): Use 'create-file'.
9317         * tests/openpgp/gpg-agent.conf.tmpl: Delete file.
9318         * tests/openpgp/gpg.conf.tmpl: Likewise.
9319
9320         gpgscm: Fix test.
9321         + commit 9ae63b9caefdf3e925c5928667fcd9227132d27f
9322         * tests/gpgscm/t-child.scm: Use 'string-length' on the string.
9323
9324         gpgscm: Improve syntax checking.
9325         + commit 4aab0e6ac7f2887a6f38f0cb95365dd7c30b4b18
9326         * tests/gpgscm/scheme.c (opexe_0): Make sure closure arguments are
9327         symbols.
9328
9329         gpgscm: Emit JUnit-style XML reports.
9330         + commit ee715201ae784e840b6136393289e6dbd6f4c540
9331         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add new file.
9332         * tests/gpgscm/lib.scm (string-translate): New function.
9333         * tests/gpgscm/main.c (main): Load new file.
9334         * tests/gpgscm/tests.scm (dirname): New function.
9335         (test-pool): Record execution times, emit XML report.
9336         (test): Record execution times, record log file name, emit XML report.
9337         (run-tests-parallel): Write XML report.
9338         (run-tests-sequential): Likewise.
9339         * tests/gpgscm/xml.scm: New file.
9340         * tests/gpgme/Makefile.am (CLEANFILES): Add 'report.xml'.
9341         * tests/gpgsm/Makefile.am: Likewise.
9342         * tests/migrations/Makefile.am: Likewise.
9343         * tests/openpgp/Makefile.am: Likewise.
9344
9345         gpgscm: Make logging less verbose and more useful.
9346         + commit 679920781a25ae5c0e49d4bd78e6926fd661778f
9347         * tests/gpgscm/tests.scm (call-with-io): When being verbose, include
9348         the pid in the output, and avoid duplicating the command arguments.
9349
9350         gpgscm: Make test framework less functional.
9351         + commit a71f4142e13e2cc26ef0cd62f56a1ccb7ce678ee
9352         * tests/gpgscm/tests.scm (test-pool, tests): Previously, these methods
9353         updated objects by creating new updated copies of the object being
9354         manipulated.  This made the code awkward without any benefit,
9355         therefore I change it to just update the object.
9356
9357         gpgscm: Move 'trace' and 'stringify'.
9358         + commit f03d6897be904da58cad76b4bd07729922b47616
9359         * tests/gpgscm/tests.scm (trace, stringify): Move...
9360         * tests/gpgscm/lib.scm: ... here.
9361
9362         gpgscm: Avoid fruitless garbage collection cycles.
9363         + commit 245860ecaf8b9e82ca577385abd453ac92ffcd26
9364         * tests/gpgscm/scheme-private.h (CELL_MINRECOVER): New macro.
9365         * tests/gpgscm/scheme.c (_get_cell): Move the heuristic to get more
9366         cells...
9367         (gc): ... here where every caller benefits from the optimization.
9368
9369 2017-04-20  NIIBE Yutaka  <gniibe@fsij.org>
9370
9371         g13: Fix for Solaris.
9372         + commit 10519270d36586c536bfb6c4cda8ac17c01f4976
9373         * configure.ac: Check sys/mkdev.h.
9374         * g13/sh-dmcrypt.c: Include sys/mkdev.h.
9375
9376 2017-04-18  NIIBE Yutaka  <gniibe@fsij.org>
9377
9378         dirmngr: Fix final close of LISTEN_FD.
9379         + commit 4b2581dc0ea1d03e70023bb0748aa0c21c0a2173
9380         * dirmngr/dirmngr.c (handle_connections): Close LISTEN_FD.
9381
9382         dirmngr: Fix API difference for Windows.
9383         + commit 0d0a7efa8fa0accc1da851917376e2328ef33c96
9384         * dirmngr/http.c (read_server, write_server): Use assuan_fd_t.
9385         (http_wait_response): Use FD2INT to get unsigned integer fd.
9386         (read_server, write_server): Likewise.
9387         (simple_cookie_read, simple_cookie_write): Use assuan_fd_t.
9388
9389 2017-04-17  NIIBE Yutaka  <gniibe@fsij.org>
9390
9391         agent: More minor change.
9392         + commit 9296aed4bd2ad09d23339e658264e557c5312585
9393         * agent/command.c (cmd_pksign): Remove redundant assignment.
9394
9395         agent: Minor cleanup.
9396         + commit 45c52cca1401b930878a8f901b63cfbb22e9e327
9397         * agent/command-ssh.c (ssh_key_to_protected_buffer): Not touch ERR.
9398         * agent/command.c (cmd_genkey, cmd_import_key): Clean up.
9399
9400         tests: Minor memory fix.
9401         + commit b9440aa3693a4bb91e1ba8ff09e2d93ff22dd70a
9402         * tests/openpgp/fake-pinentry.c (get_passphrase): Free the memory.
9403
9404         g10: Fix parse_ring_trust.
9405         + commit 256e861bce3dc9aba8fab4df47a40cae3bede175
9406         * g10/parse-packet.c (parse_ring_trust): Fix condition.
9407
9408         g10: Minor fixes.
9409         + commit 0dec0cc281dfa26db89f8cc5ee002dea5c2b2e81
9410         * g10/export.c (cleartext_secret_key_to_openpgp): No initialization.
9411         (do_export_one_keyblock): Initialize with GPG_ERR_NOT_FOUND.
9412         * g10/getkey.c (get_best_pubkey_byname): Add non-null check.
9413         * g10/tofu.c (tofu_set_policy): ERR initialize to 0.
9414
9415         g10: Fix import/export filter property match.
9416         + commit af5f8ecf51f5e1f33e832d4946d02313b78a0536
9417         * g10/import.c (impex_filter_getval): Fix to "else if".
9418
9419 2017-04-14  NIIBE Yutaka  <gniibe@fsij.org>
9420
9421         agent: Clean up error initialize/return.
9422         + commit 36c4e540f1a4992675ee6e0acca1231325457079
9423         * agent/call-pinentry.c (start_pinentry): Return RC.
9424         * agent/command-ssh.c (ssh_handler_request_identities): Don't set ERR.
9425         * agent/findkey.c (try_unprotect_cb): Return ERR.
9426         (unprotect): Don't set RC.
9427         * agent/gpg-agent.c (handle_connections): Don't set fd.
9428
9429         dirmngr: More fix for test program.
9430         + commit adb77d095b3958482863a17c83746f33945638dc
9431         * dirmngr/t-http.c (main): Care about no TLS.
9432
9433         dirmngr: More fix for Windows.
9434         + commit 4771bad610eb59e701fe8e53468e2af22d45eeb0
9435         * dirmngr/http.c (simple_cookie_read, simple_cookie_write): Only
9436         valid with HTTP_USE_NTBTLS.
9437         (_my_socket_new): Simply cast to int since it's for debug.
9438         (_my_socket_ref, _my_socket_unref): Likewise.
9439
9440 2017-04-13  NIIBE Yutaka  <gniibe@fsij.org>
9441
9442         dirmngr: Fix http.c for sockaddr_storage.
9443         + commit 86dcb03134fd4957d51ebaa06b7991239f9ee56a
9444         dirmngr/http.c (use_socks): Use sockaddr_storage.
9445         (my_sock_new_for_addr, connect_server): Likewise.
9446
9447         dirmngr: Fix alignment of ADDR.
9448         + commit 892b33bb2c57785927ea6652091191da2deed464
9449         * dirmngr/dns-stuff.h (dns_addrinfo_s): Use struct sockaddr_storage
9450         for size and alignment.
9451         * dirmngr/dns-stuff.c (resolve_name_libdns): Follow the change.
9452         (resolve_dns_name): Use struct sockaddr_storage.
9453         (resolve_addr_standard, resolve_dns_addr): Likewise.
9454         (resolve_dns_addr): Likewise.
9455
9456         dirmngr: Fix thread key type.
9457         + commit 37018adce6ea4920b34d59afcfe4f55f716b3086
9458         * dirmngr/dirmngr.c (my_tlskey_current_fd): Use npth_key_t.
9459
9460         common, g10: Fix enumeration types.
9461         + commit 74258278efacd7069e8c1df8ff6fc3f4675d713e
9462         * common/openpgpdefs.h (CIPHER_ALGO_PRIVATE10, PUBKEY_ALGO_PRIVATE10)
9463         (DIGEST_ALGO_PRIVATE10, COMPRESS_ALGO_PRIVATE10): New.
9464         * g10/misc.c (map_pk_gcry_to_openpgp): Add type conversion.
9465         (map_cipher_openpgp_to_gcry, openpgp_cipher_algo_name)
9466         (openpgp_pk_test_algo2, map_md_openpgp_to_gcry)
9467         (pubkey_get_npkey): Add default handling.
9468
9469         dirmngr: More fix for Windows.
9470         + commit 5af104b541ed430a54eb0163a1d29e1d043f9377
9471         * dirmngr/dns.c (socket_fd_t, STDCALL): New.
9472         (dns_te_initname): Use.
9473
9474 2017-04-12  NIIBE Yutaka  <gniibe@fsij.org>
9475
9476         dirmngr: Fix type of sock.
9477         + commit 6755b3b505f79a5a233b18e85f57a0d3a455e664
9478         * dirmngr/http.c (send_request): Use assuan_fd_t for SOCK.
9479
9480         tools: Fix condition for gpg-connect-agent.
9481         + commit f52f6af834cc488d11612e349e4af023d69a45f4
9482         * tools/gpg-connect-agent.c (start_agent): Add paren.
9483
9484         dirmngr: Fix possible null reference.
9485         + commit 7ae1857c90ab43ad9e31f0fb6dbd37f25cc37278
9486         * dirmngr/dns.c (dns_error_t dns_trace_fput): Check NULL.
9487
9488         common: Simplify format_text.
9489         + commit 7b4edf14bb16fbe786e55b829a208960396ce8df
9490         * common/stringhelp.c (format_text): Don't allow IN_PLACE formatting.
9491         * common/stringhelp.h: Change the API with no IN_PLACE.
9492         * common/t-stringhelp.c (test_format_text): Follow the change.
9493         * g10/gpgcompose.c (show_help): Likewise.
9494         * g10/tofu.c (format_conflict_msg_part1, ask_about_binding)
9495         (show_statistics, show_warning): Likewise.
9496
9497         gpgscm: Fix test program.
9498         + commit 7f9032d4a8ce53ce1a972bd3c1f8d20b3776756b
9499         * tests/gpgscm/t-child.c (main): Fix for setmode.
9500
9501         dirmngr: Fix plus1_ns.
9502         + commit 60d9a9e6b4ae3af029596d14732c02f49203326d
9503         * dirmngr/dns.c (plus1_ns): Fix the initial implementation.
9504
9505         scd: Handle unexpected suspend/resume by CCID driver.
9506         + commit f053f99ed0b0c6de7b7c4a07cbd7f7d213ddf0db
9507         * scd/ccid-driver.c (bulk_in): Handle unexpected failure.
9508
9509         dirmngr: Fix dns-stuff.c in another way.
9510         + commit bd0c94939faf8ccfc117fb595e9bc0105edcafa4
9511         * dirmngr/dns-stuff.c (T_CERT): Define our own.
9512
9513         Revert "dirmngr: Fix dns-stuff.c."
9514         + commit 0b904ddea8bddaa2fd7893a9dce1df1cb5e36b00
9515         This reverts commit 1538523156be568046f632d1775eae30ea8bd556.
9516
9517         dirmngr: Fix dns-stuff.c.
9518         + commit 1538523156be568046f632d1775eae30ea8bd556
9519         * dirmngr/dns-stuff.c: Don't include arpa/nameser.h.
9520
9521         agent: Simplify stream_read_cstring.
9522         + commit c64763c3a74ecc61c2f6c5edb679a2a3879d79e7
9523         * agent/command-ssh.c (stream_read_cstring): Just call
9524         stream_read_string.
9525
9526         dirmngr: Use a function to increment network short.
9527         + commit 64904ce627b6b0661acf15b5b70103c4842bb0f3
9528         * dirmngr/dns.c (plus1_ns): New.
9529         (dns_p_push): Use it.
9530
9531         g10: Minor clean up for export.c.
9532         + commit 05218829589f6d4b09933fa19f568c2019367d5c
9533         * g10/export.c (export_ssh_key): Check IDENTIFIER for error.
9534         Release base64 thing on error of get_membuf.
9535
9536 2017-04-11  NIIBE Yutaka  <gniibe@fsij.org>
9537
9538         g13: Include sys/sysmacros.h if available.
9539         + commit c3cc9551dcc89cc25c0a0ec16d8eb12c1c221638
9540         * configure.ac: Add test for sys/sysmacros.h.
9541         * g13/sh-dmcrypt.c: Include sys/sysmacros.h.
9542
9543 2017-04-11  Justus Winter  <justus@g10code.com>
9544
9545         tests: Fix distcheck.
9546         + commit 00be2a92625e832e8dd621f2a8f72b124c6d50ca
9547         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'gnupg.scm'.
9548
9549         tests: Avoid relying on implicit gpg commands.
9550         + commit cde626e7f7349a73d58ec3236ab3b43dec852bb5
9551         * tests/openpgp/armdetach.scm: Always use an explicit command instead
9552         of relying on gpg to guess what we want.
9553         * tests/openpgp/armdetachm.scm: Likewise.
9554         * tests/openpgp/armencrypt.scm: Likewise.
9555         * tests/openpgp/armencryptp.scm: Likewise.
9556         * tests/openpgp/armor.scm: Likewise.
9557         * tests/openpgp/armsignencrypt.scm: Likewise.
9558         * tests/openpgp/armsigs.scm: Likewise.
9559         * tests/openpgp/clearsig.scm: Likewise.
9560         * tests/openpgp/compression.scm: Likewise.
9561         * tests/openpgp/conventional-mdc.scm: Likewise.
9562         * tests/openpgp/conventional.scm: Likewise.
9563         * tests/openpgp/decrypt-dsa.scm: Likewise.
9564         * tests/openpgp/decrypt.scm: Likewise.
9565         * tests/openpgp/detach.scm: Likewise.
9566         * tests/openpgp/detachm.scm: Likewise.
9567         * tests/openpgp/ecc.scm: Likewise.
9568         * tests/openpgp/encrypt-dsa.scm: Likewise.
9569         * tests/openpgp/encrypt-multifile.scm: Likewise.
9570         * tests/openpgp/encrypt.scm: Likewise.
9571         * tests/openpgp/encryptp.scm: Likewise.
9572         * tests/openpgp/seat.scm: Likewise.
9573         * tests/openpgp/signencrypt-dsa.scm: Likewise.
9574         * tests/openpgp/signencrypt.scm: Likewise.
9575         * tests/openpgp/sigs-dsa.scm: Likewise.
9576         * tests/openpgp/sigs.scm: Likewise.
9577
9578         tests: Make tests more robust.
9579         + commit 1b28d9dbe0260b2a4645c4b5caae11d9f375c942
9580         * tests/openpgp/defs.scm (have-opt-always-trust): Execute in empty
9581         ephemeral home directory.  This prevents gpg from picking up the
9582         configuration from the current gnupghome (if any).
9583         * tests/migrations/common.scm (untar-armored): Likewise.
9584
9585         tests: Move common functionality.
9586         + commit ccd2187212c12b84c86a10fd4417a16536243179
9587         * tests/openpgp/defs.scm (with-home-directory,
9588         with-ephemeral-home-directory): Move...
9589         * tests/gpgscm/gnupg.scm: ... to this new file.
9590         * tests/gpgscm/main.c (main): Load the new file.
9591
9592 2017-04-11  NIIBE Yutaka  <gniibe@fsij.org>
9593
9594         dirmngr: Fix build for Windows.
9595         + commit 3133402241167ccad70fa888a47ffcbe04e7b4c5
9596         * dirmngr/ldap-wrapper-ce.c (outstream_cookie_writer): Use
9597         gpgrt_ssize_t.
9598
9599         g10,tools: Fix bzlib.h include order.
9600         + commit 03d77b60befa4e2f8437a80ac429cca3e54688f8
9601         * g10/compress-bz2.c: Include bzlib.h after gcrypt.h.
9602         * tools/gpgsplit.c: Likewise.
9603
9604         g10: Minor clean up for TOFU.
9605         + commit f079822b2ce06c18b7ea45efed2d29b54e38f04d
9606         * g10/tofu.c (ask_about_binding): Fix for qualifier.
9607
9608         common: Portability fix for logging.c.
9609         + commit 456c5cdb2d72bba77e2a30c8fdb1c1cebbe9b1d2
9610         * common/logging.c (S_IRGRP, S_IWGRP, S_IROTH, S_IWOTH): Avoid
9611         duplicated definition.
9612
9613         tools: Portability fix for gpgparsemail.
9614         + commit a1446163d584cdc3003c7d5b5fc6d74737c1732d
9615         * tools/rfc822parse.c (my_stpcpy): Rename from stpcpy.
9616
9617 2017-04-10  Justus Winter  <justus@g10code.com>
9618
9619         gpgscm: Fix opcode dispatch.
9620         + commit 1b6adab41d386b587f65e5c6f14a63859ac1226b
9621         * tests/gpgscm/scheme.c (opexe_0): Consider 'op', not 'sc->op'.  The
9622         former is the opcode we are currently executing.
9623
9624         gpgscm: Mmap script files.
9625         + commit c7f0d90592fd0348a3818ac897f91e6859584146
9626         * tests/gpgscm/main.c (load): Try to mmap the script.
9627         * tests/gpgscm/scheme.c (scheme_load_memory): New function, a
9628         generalization of 'scheme_load_string'.
9629         * tests/gpgscm/scheme.h (scheme_load_memory): New prototype.
9630
9631         gpgscm: Refactor checking for opcode arguments.
9632         + commit f3d1f6867792deeb9a2a63744ee9b076c41c58f3
9633         * tests/gpgscm/scheme.c (op_code_info): Fix type, add forward
9634         declaration.
9635         (check_arguments): New function.
9636         (Eval_cycle): Use the new function.
9637
9638         gpgscm: Improve syntax dispatch.
9639         + commit b628e62b5b9f7ed5cbb1bfe34727b5ee8129f7d4
9640         * tests/gpgscm/scheme.c (assign_syntax): Add opcode parameter, store
9641         opcode in the tag.
9642         (syntaxnum): Add sc parameter, retrieve opcode from tag.
9643         (opexe_0): Adapt callsite.
9644         (scheme_init_custom_alloc): Likewise.
9645
9646         gpgscm: Make tags mandatory.
9647         + commit a1ad5d6a30cf72d9b7e7bb449985dc69d5e01c4b
9648         * tests/gpgscm/opdefines.h: Make tags mandatory.
9649         * tests/gpgscm/scheme.c: Likewise.
9650         * tests/gpgscm/scheme.h: Likewise.
9651
9652         gpgscm: Add and use opcode for reversing a list in place.
9653         + commit e1bb9326dc381ae2711a81ab621e21a66388bcbd
9654         * tests/gpgscm/lib.scm (string-split-pln): Use 'reverse!'.
9655         (string-rtrim): Likewise.
9656         * tests/gpgscm/opdefines.h (reverse!): New opcode.
9657         * tests/gpgscm/scheme.c (opexe_0): Handle new opcode.
9658
9659         gpgscm: Deduplicate code.
9660         + commit 3e91019a92b9bb3bb5a8cd62336b4cf65964e45b
9661         * tests/gpgscm/scheme.c (oblist_add_by_name): Deduplicate.
9662         (new_slot_spec_in_env): Likewise.
9663
9664         gpgscm: Move dispatch table into rodata.
9665         + commit 7dff6248bddd5583988ac562318cf0d76a409d0e
9666         * tests/gpgscm/opdefines.h: Use 0 instead of NULL.
9667         * tests/gpgscm/scheme.c (op_code_info): Use char arrays instead of
9668         pointers, make arity parameters smaller.
9669         (INF_ARG): Adapt.
9670         (_OP_DEF): Likewise.
9671         (dispatch_table): Likewise.
9672         (procname): Likewise.
9673         (Eval_cycle): Likewise.
9674         (scheme_init_custom_alloc): Likewise.
9675
9676         gpgscm: Use more threaded code.
9677         + commit 6f217d116d1a12c6093bb253dbfa349bc81bc90b
9678         * tests/gpgscm/scheme.c (opexe_0): Use 's_thread_to' instead of
9679         's_goto' wherever possible.
9680
9681         gpgscm: Remove now obsolete dispatcher function from the opcodes.
9682         + commit e7ed9822e20ee4bbb4cdd9eca8121b4ade87e5ce
9683         * tests/gpgscm/opdefines.h: Remove now obsolete dispatcher function
9684         from the opcodes.
9685         * tests/gpgscm/scheme-private.h (_OP_DEF): Adapt.
9686         * tests/gpgscm/scheme.c (dispatch_func): Remove type declaration.
9687         (op_code_info): Remove 'func'.
9688         (_OP_DEF): Adapt.
9689         (Eval_Cycle): Always call 'opexe_0'.
9690
9691         gpgscm: Merge 'opexe_6'.
9692         + commit ddf444828b9b3f75d964473a2c0e77f75f094cf4
9693         * tests/gpgscm/scheme.c (opexe_6): Merge into 'opexe_0'.
9694         * tests/gpgscm/opdefines.h: Adapt.
9695
9696         gpgscm: Merge 'opexe_5'.
9697         + commit 1379df44537b67b7c2fbc0fb5bc6f7945a5d7ebb
9698         * tests/gpgscm/scheme.c (opexe_5): Merge into 'opexe_0'.
9699         * tests/gpgscm/opdefines.h: Adapt.
9700
9701         gpgscm: Merge 'opexe_4'.
9702         + commit 4f835104b9475e7d585d859b85e7d0d4cfe9aab3
9703         * tests/gpgscm/scheme.c (opexe_4): Merge into 'opexe_0'.
9704         * tests/gpgscm/opdefines.h: Adapt.
9705
9706         gpgscm: Merge 'opexe_3'.
9707         + commit d591ab65d37ee467ca91ad851ab236f2985c1ee2
9708         * tests/gpgscm/scheme.c (opexe_3): Merge into 'opexe_0'.
9709         * tests/gpgscm/opdefines.h: Adapt.
9710
9711         gpgscm: Merge 'opexe_2'.
9712         + commit 6cad38228f6ebfdc8e52960223b492597aff26a0
9713         * tests/gpgscm/scheme.c (opexe_2): Merge into 'opexe_0'.
9714         * tests/gpgscm/opdefines.h: Adapt.
9715
9716         gpgscm: Merge 'opexe_1'.
9717         + commit 154af876f05b773bf3a860fcb4cc41066da27beb
9718         * tests/gpgscm/scheme.c (opexe_1): Merge into 'opexe_0'.
9719         * tests/gpgscm/opdefines.h: Adapt.
9720
9721 2017-04-10  NIIBE Yutaka  <gniibe@fsij.org>
9722
9723         agent: Use "ll" length specifier when time_t is larger.
9724         + commit 170660ed11b56145dea4865e751ae5aff1681fe2
9725         * agent/command.c (cmd_keytocard): Use KEYTOCARD_TIMESTAMP_FORMAT.
9726
9727         scd: Relax a condition for p15 driver.
9728         + commit 7501f2e9c4e6fd94a191b381d52ec2fe1d103e29
9729         * scd/app-p15.c (read_ef_aodf): Fix.
9730
9731         scd: Relax a condition for p15 driver.
9732         + commit 3c1ad96f1ce838daf2d861b33e6611f6d3043d25
9733         * scd/app-p15.c (read_ef_aodf): Remove possibly redundant condition.
9734
9735         scd: Remove "special transport" support.
9736         + commit 34199ef677bb40eadf0da696a111f7036bc3187e
9737         * scd/ccid-driver.c (transports, my_sleep, prepare_special_transport)
9738         (writen): Remove.
9739         (ccid_dev_scan, ccid_dev_scan_finish, ccid_get_BAI): Only for USB.
9740         (ccid_open_reader, do_close_reader, bulk_out, bulk_in, abort_cmd)
9741         (ccid_poll, ccid_transceive): Likewise.
9742
9743 2017-04-07  Justus Winter  <justus@g10code.com>
9744
9745         gpgscm: Allocate small integers in the rodata section.
9746         + commit 8640fa880d7050917f4729f2c0cb506e165ee446
9747         * tests/gpgscm/Makefile.am (gpgscm_SOURCES): Add new file.
9748         * tests/gpgscm/scheme-private.h (struct cell): Move number to the top
9749         of the union so that we can initialize it.
9750         (struct scheme): Remove 'integer_segment'.
9751         * tests/gpgscm/scheme.c (initialize_small_integers): Remove function.
9752         (small_integers): New variable.
9753         (MAX_SMALL_INTEGER): Compute.
9754         (mk_small_integer): Adapt.
9755         (mark): Avoid marking objects already marked.  This allows us to run
9756         the algorithm over objects in the rodata section if they are already
9757         marked.
9758         (scheme_init_custom_alloc): Remove initialization.
9759         (scheme_deinit): Remove deallocation.
9760         * tests/gpgscm/small-integers.h: New file.
9761
9762         gpgscm: Make global data constant when possible.
9763         + commit c9c3fe883271868d3b2dd287d295cf6a8f8ffc05
9764         * tests/gpgscm/scheme-private.h (struct scheme): Make 'vptr' const.
9765         * tests/gpgscm/scheme.c (num_zero): Statically initialize and turn
9766         into constant.
9767         (num_one): Likewise.
9768         (charnames): Change type so that it can be stored in rodata.
9769         (is_ascii_name): Adapt slightly.
9770         (assign_proc): Make argument const char *.
9771         (op_code_info): Make some fields const char *.
9772         (tests): Make const.
9773         (dispatch_table): Make const.  At least it can be made read-only after
9774         relocation.
9775         (Eval_Cycle): Adapt slightly.
9776         (vtbl): Make const.
9777
9778         gpgscm: Remove arbitrary limit on number of cell segments.
9779         + commit 56638c28adc1bbe9fc052b92549a50935c0fe99c
9780         * tests/gpgscm/scheme-private.h (struct scheme): Remove fixed-size
9781         arrays for cell segments, replace them with a pointer to the new
9782         'struct cell_segment' instead.
9783         * tests/gpgscm/scheme.c (struct cell_segment): New definition.
9784         (_alloc_cellseg): Allocate the header within the segment, return a
9785         pointer to the header.
9786         (_dealloc_cellseg): New function.
9787         (alloc_cellseg): Insert the segments into a list.
9788         (_get_cell): Allocate a new segment if less than a quarter of
9789         CELL_SIGSIZE is recovered during garbage collection.
9790         (initialize_small_integers): Adapt callsite.
9791         (gc): Walk the list of segments.
9792         (scheme_init_custom_alloc): Remove initialization of removed field.
9793         (scheme_deinit): Adapt deallocation.
9794
9795         gpgscm: Fix compact vector encoding.
9796         + commit bf8b5e9042b3d86d419b2ac1987a9298c9d21500
9797         * tests/gpgscm/scheme-private.h (struct cell): Use uintptr_t for
9798         '_flags'.  This way, '_flags' has the size of a machine word.
9799
9800 2017-04-07  Werner Koch  <wk@gnupg.org>
9801
9802         gpg: Fix printing of offline taken subkey.
9803         + commit 547bc01d57528ecc27b3b5e16797967a7f88fecf
9804         * g10/keylist.c (list_keyblock_print): Set SECRET to 2 and not 0x32.
9805
9806 2017-04-07  NIIBE Yutaka  <gniibe@fsij.org>
9807
9808         scd: Internal CCID reader cleanup.
9809         + commit cc420d34880e2a050b39f969873974cfc35fa5c3
9810         * scd/ccid-reader.c (scan_usb_device): Only for scan mode, so, rename
9811         from scan_or_find_usb_device.
9812         (scan_devices): Likewise.  Remove support of special transport types.
9813         (ccid_get_reader_list): Simplify.
9814         (abort_cmd): Fix error return.
9815         (send_escape_cmd): Fix for RESULTLEN == NULL.
9816         (ccid_transceive_secure): Remove unnecessary var updates.
9817
9818         scd: Don't keep CCID reader open when card is not available.
9819         + commit 3c93595d701c59cbc9b67a7fd0bcde7ee0fada1a
9820         * scd/apdu.c (open_ccid_reader): Fail if no ATR.
9821
9822         agent: Serialize access to passphrase cache.
9823         + commit ebe12be034f052cdec871f0d8ad1bfab85d7b943
9824         * agent/cache.c (encryption_lock): Remove.
9825         (cache_lock): New.  Now, we have coarse grain lock to serialize
9826         entire cache access.
9827         (initialize_module_cache): Use CACHE_LOCK.
9828         (init_encryption, new_data): Remove ENCRYPTION_LOCK.
9829         (agent_flush_cache, agent_put_cache, agent_get_cache): Lock the cache.
9830
9831 2017-04-06  Justus Winter  <justus@g10code.com>
9832
9833         gpgscm: Avoid mutating integer.
9834         + commit f1dc34f502a68673e7a29f3fcf57b8dc6a4fac89
9835         * tests/gpgscm/scheme.c (opexe_5): Do not modify the integer in-place
9836         while printing an vector.  Integer objects may be shared, so they must
9837         not be mutated.
9838
9839         gpgscm: Initialize unused slots in vectors.
9840         + commit b83903f59ec5d49ac579f263da70ebc8dc3645b5
9841         * tests/gpgscm/scheme.c (get_vector_object): Initialize unused slots
9842         at the end of vectors.
9843
9844         tests: Fix distcheck.
9845         + commit 23f00f109ddba595db4f73a6182750177c7dd75d
9846         * tests/Makefile.am (SUBDIRS): Add 'pkits' again.  Simply dropping it
9847         makes 'make distcheck' unhappy.
9848         * tests/pkits/Makefile.am (TESTS): Remove all tests.
9849
9850         tests: Disable 'pkits' test suite.
9851         + commit af1c1a57e46a00a32d83c1a58c5f3ef6f4a1c1d1
9852         * tests/Makefile.am (SUBDIRS): Drop 'pkits'.
9853         * tests/pkits/common.sh: Fix locating 'PKITS_data.tar.bz2'.
9854         * tests/pkits/inittests: Likewise.
9855
9856         tests: Make test more robust.
9857         + commit 94645311f8a3e9ae33643512f87fbef41bf0556f
9858         * tests/openpgp/4gb-packet.scm: Skip if we do not have BZIP2.
9859         * tests/openpgp/defs.scm (have-compression-algo?): New function.
9860
9861 2017-04-05  Justus Winter  <justus@g10code.com>
9862
9863         tests: Fix setup of ephemeral home directories.
9864         + commit 01e84d429aeeb1450012ff0576a6a24de50693c6
9865         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Set
9866         GNUPGHOME and cwd to the ephemeral directory before calling the setup
9867         function.
9868
9869 2017-04-04  Justus Winter  <justus@g10code.com>
9870
9871         tests: Fix setup of ephemeral home directories.
9872         + commit 32b75fb7743f35936d7014fce33c90ba97dfa374
9873         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Create
9874         configuration files when we enter the context.
9875         * tests/openpgp/setup.scm: Do not use an ephemeral home directory.
9876         Tests should always use the cwd.
9877         * tests/gpgsm/setup.scm: Likewise.
9878         * tests/gpgsm/export.scm: Add explicit constructor function.
9879         * tests/openpgp/decrypt-session-key.scm: Likewise.
9880         * tests/openpgp/decrypt-unwrap-verify.scm: Likewise.
9881
9882         gpgscm: Fix copying values.
9883         + commit 6261611d3786f19fd84ccc79f45a89cadac518e8
9884         * tests/gpgscm/scheme.c (copy_value): New function.
9885         (mk_tagged_value): Use new function.
9886         (opexe_4): Likewise for OP_SAVE_FORCED.
9887
9888         gpgscm: Simplify get-output-string operation.
9889         + commit a80d4a9b50ad47eae1f8c740dd73804311e38783
9890         * tests/gpgscm/scheme.c (opexe_4): Simplify 'get-output-string'.
9891
9892         gpgscm: Simplify substring operation.
9893         + commit d858096c99705ccf2e115475f81c4cf88edbeebf
9894         * tests/gpgscm/scheme.c (opexe_2): Simplify 'substring'.
9895
9896 2017-04-04  NIIBE Yutaka  <gniibe@fsij.org>
9897
9898         agent: Minor fix for get_client_pid.
9899         + commit 5744d2038bd17b8b1be4e73d0ad3bc41772efe96
9900         * agent/command-ssh.c (get_client_pid): Use 0 to initialize.
9901
9902 2017-04-03  Werner Koch  <wk@gnupg.org>
9903
9904         Release 2.1.20.
9905         + commit e7eb9b12deaf7ebe26967bfb56e980b7efeebdc3
9906
9907
9908         dirmngr: New option --disable-ipv6.
9909         + commit 3533b854408fa93734742b2ee12b62aa0d55ff28
9910         * dirmngr/dirmngr.h (struct opt): Add field 'disable_ipv6'.
9911         * dirmngr/dirmngr.c (oDisableIPv6): New const.
9912         (opts): New option --disable-ipv6.
9913         (parse_rereadable_options): Set that option.
9914         * dirmngr/dns-stuff.c (opt_disable_ipv6): New var.
9915         (set_dns_disable_ipv6): New.
9916         (resolve_name_standard): Make use of it.
9917         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Take care of
9918         OPT.DISABLE_IPV6.
9919         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
9920         (send_request): Ditto.
9921         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
9922         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
9923
9924         dirmngr,w32: Silence the 'certificate already cached' message.
9925         + commit fce36d7ec87be14b874813db277781c87a64ea87
9926         * dirmngr/certcache.c (load_certs_from_w32_store): Silenece an info
9927         message.
9928
9929         dirmngr: Handle EIO which is sometimes returned by cookie functions.
9930         + commit cc32ddbcba8c53d3e2cad952d72f62dc73911042
9931         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Handle EIO.
9932
9933         dirmngr: Always print a warning for a missing /etc/hosts.
9934         + commit 35c843c815306f36d1efbc52f5e2f6bac3f67aec
9935         * dirmngr/dns-stuff.c (libdns_init): No Windows specific handling of a
9936         missing /etc/hosts.
9937
9938         dirmngr: Do not assume that /etc/hosts exists.
9939         + commit 5d873f288e86edfb684f4dd57ac36466b06494a4
9940         * dirmngr/dns-stuff.c (libdns_init): Do not bail out.
9941
9942         po: Update the German translation.
9943         + commit c7be01dae914c183dd99bd531a388c794d858c61
9944
9945
9946         gpgconf: Add --enable-extended-key-format for the agent.
9947         + commit d23052b04ebb0ac731aa351650c4084f080c640b
9948         * tools/gpgconf-conf.c: Add option.
9949         * agent/gpg-agent.c (main) <aGPGConfList>: Add option.
9950
9951 2017-04-03  Justus Winter  <justus@g10code.com>
9952
9953         gpgscm: Slightly improve the procedure dispatch.
9954         + commit 90932bdad607d06f4f040e3457caddba79ba8b7e
9955         * tests/gpgscm/scheme.c (procnum): Procedures always have an integer
9956         number, so we can safely use the cheaper 'ivalue_unchecked'.
9957
9958 2017-04-03  Werner Koch  <wk@gnupg.org>
9959
9960         gpg: Handle critical marked 'Reason for Revocation'.
9961         + commit 3f6d949011f485613bb4bd3e06a2643be79cce40
9962         * g10/parse-packet.c (can_handle_critical): Add
9963         SIGSUBPKT_REVOC_REASON.
9964
9965 2017-04-02  Werner Koch  <wk@gnupg.org>
9966
9967         agent: Use OCB for key protection with --enable-extended-key-format.
9968         + commit d24375271b97e45deaeb1ef0a8434c64066ba2e8
9969         * agent/protect.c (PROT_DEFAULT_TO_OCB): Remove macro.
9970         (agent_protect): Make the default protection mode depend on the extend
9971         key format option.
9972
9973 2017-04-01  Werner Koch  <wk@gnupg.org>
9974
9975         kbx: Unify blob reading functions.
9976         + commit 0039d7107bcdfce6f3b02b46ff0495cfba07882a
9977         * kbx/keybox-file.c (_keybox_read_blob): Remove.
9978         (_keybox_read_blob2): Rename to ....
9979         (_keybox_read_blob): this.  Make arg options.  Change all callers.
9980         * kbx/keybox-search.c (keybox_search): Factor fopen call out to ...
9981         (open_file): new.
9982         (keybox_seek): Als use open_file.
9983
9984 2017-03-31  Werner Koch  <wk@gnupg.org>
9985
9986         gpg: Avoid multiple open calls to the keybox file.
9987         + commit 5556eca5acd46983bff0b38a1ffbc2f07fbaba9f
9988         * g10/keydb.h (KEYDB_HANDLE): Move typedef to ...
9989         * g10/gpg.h: here.
9990         (struct server_control_s): Add field 'cached_getkey_kdb'.
9991         * g10/gpg.c (gpg_deinit_default_ctrl): Release that keydb handle.
9992         * g10/getkey.c (getkey_end): Cache keydb handle.
9993         (get_pubkey): Use cached keydb handle.
9994         * kbx/keybox-search.c (keybox_search_reset): Use lseek instead of
9995         closing the file.
9996
9997         gpg: Pass CTRL also to getkey_end.
9998         + commit aca5f494a88776d4974bfa9b0b65cb60c1b42040
9999         * g10/getkey.c (getkey_end): Add arg CTRL.  Change all callers.
10000
10001         gpg: Print more stats for the keydb and the signature cache.
10002         + commit 3a10de3bfd785aefb0150e82b6dbbc7cb9f208c8
10003         * g10/sig-check.c (sig_check_dump_stats): New.
10004         (cache_stats): New struct.
10005         (check_key_signature2): Update stats.
10006         * g10/gpg.c (g10_exit): Call new function.
10007         * g10/keydb.c (kid_not_found_cache_count): Replace by ...
10008         (kid_not_found_stats): ... new struct.  Change users.
10009         (keydb_stats): New struct.  Update the counters.
10010         (keydb_dump_stats): Print all stats.
10011
10012         gpg: Assert that an opaque parameter is really what we expect.
10013         + commit 52ba5e67cad4311d0ddbc4f2979e20afd0161d1f
10014         * g10/gpg.h (SERVER_CONTROL_MAGIC): New const.
10015         (server_control_s): Add field 'magic'.
10016         * g10/gpg.c (gpg_init_default_ctrl): Init MAGIC.
10017         * g10/import.c (impex_filter_getval): Assert MAGIC.
10018
10019 2017-03-30  Justus Winter  <justus@g10code.com>
10020
10021         gpg: Consistent use of preprocessor conditionals.
10022         + commit 5e89144cbca36c1e7eb814b3aad4b7c46cd4efbf
10023         * g10/parse-packet.c: Use '#if' instead of '#ifdef' when checking
10024         DEBUG_PARSE_PACKET.  This fixes the build with '#define
10025         DEBUG_PARSE_PACKET 0'.
10026
10027         common: Avoid undefined behavior.
10028         + commit 214fa9012296d796b78f1a3106d656639cf50aef
10029         * common/iobuf.c (iobuf_read_line): Do not consider 'length' if
10030         'buffer' is NULL.
10031
10032 2017-03-30  Werner Koch  <wk@gnupg.org>
10033
10034         gpg: Remove the use of the signature information from a KBX.
10035         + commit a6142dbdbc5783043deb847dc64998c421860941
10036         * g10/keydb.c (keyblock_cache): Remove field SIGSTATUS.
10037         (keyblock_cache_clear): Adjust for that removal.
10038         (parse_keyblock_image): Remove arg SIGSTATUS.  Remove the signature
10039         cache setting; this is now done in the parser.
10040         (keydb_get_keyblock): Do not set SIGSTATUS.
10041         (build_keyblock_image): Remove arg SIGSTATUS and simplify.  Change
10042         caller.
10043         * kbx/keybox-blob.c: Explain that the signature information is not
10044         anymore used.
10045         (_keybox_create_openpgp_blob): Remove arg SIGSTATUS and change
10046         callers.
10047         * kbx/keybox-search.c (keybox_get_keyblock): Remove arg R_SIGSTATUS
10048         and change callers.
10049         * kbx/keybox-update.c (keybox_insert_keyblock): Likewise.
10050
10051         gpg: Fix actual leak and possible leaks in the packet parser.
10052         + commit 7bf24e8146116a30c4c9d7b6dbf8bbb27fc35971
10053         * g10/packet.h (struct parse_packet_ctx_s): Change LAST_PKT deom a
10054         pointer to its struct.
10055         (init_parse_packet): Adjust for LAST_PKT not being a pointer.
10056         * g10/parse-packet.c (parse): Ditto. Free the last packet before
10057         storing a new one in case of a deep link.
10058         (parse_ring_trust): Adjust for LAST_PKT not being a pointer.
10059         * g10/free-packet.c (free_packet): Ditto.
10060         * g10/t-keydb-get-keyblock.c (do_test): Release keyblock.
10061
10062         gpg: Fix export porting of zero length user ID packets.
10063         + commit 64665404e43051fa50ee030766347e24b7d1e4d5
10064         * g10/build-packet.c (do_user_id): Avoid indeterminate length header.
10065
10066         gpg: Revamp reading and writing of ring trust packets.
10067         + commit a8895c99a7d0750132477d80cd66caaf3a709113
10068         * g10/parse-packet.c (parse_trust): Rename to ...
10069         (parse_ring_trust): this.  Change args and implement new ring trust
10070         packet format.
10071         (parse): Add special ring trust packet handling.
10072         * g10/packet.h (PKT_user_id): New fields KEYUPDATE, UPDATEURL, and
10073         KEYSRC.
10074         (PKT_public_key): Ditto.
10075         (RING_TRUST_SIG, RING_TRUST_KEY, RING_TRUST_UID): New consts.
10076         (PKT_ring_trust): New.
10077         (struct packet_struct): Remove member RING_TRUST.
10078         (strcu parse_packet_ctx_s): Add field SKIP_META.
10079         (init_parse_packet): Init SKIPT_META.
10080         * g10/free-packet.c (release_public_key_parts): Free UDPATEURL.
10081         (free_user_id): Ditto.
10082         * g10/mainproc.c (list_node): Remove printing of non-documented "rtv"
10083         lines.
10084         * g10/build-packet.c (build_packet_and_meta): New.
10085         (do_ring_trust): New.
10086         * g10/export.c (write_keyblock_to_output): Use build_packet_and_meta
10087         in backup mode.
10088         (do_export_one_keyblock): Ditto.
10089         * g10/import.c (read_block): Add arg WITH_META.  Skip ring trust
10090         packets if that ism not set.
10091         (import): Call read_block WITH_META in restore mode.
10092         * g10/keydb.h (KEYSRC_UNKNOWN, KEYSRC_FILE, KEYSRC_KS, KEYSRC_PREF_KS)
10093         (KEYSRC_WKD, KEYSRC_WKD_SD, KEYSRC_DANE): New constants.  They are not
10094         yet used, though.
10095         * g10/keydb.c (parse_keyblock_image): Allow ring trust packets.
10096         (build_keyblock_image): Ditto.  Use build_packet_and_meta.
10097         * g10/keyring.c (keyring_get_keyblock): Remove specila treatment of
10098         ring trust packets.
10099         (write_keyblock): Use build_packet_and_meta.  Remove special treatment
10100         of ring trust packets and initialization of the signature caches.
10101
10102 2017-03-29  Werner Koch  <wk@gnupg.org>
10103
10104         gpg: Extend free_packet to handle a packet parser context.
10105         + commit afa86809087909a8ba2f9356588bf90cc923529c
10106         * g10/packet.h (struct parse_packet_ctx_s): Add fields LAST_PKT and
10107         FREE_LAST_PKT.
10108         (init_parse_packet): Clear them.
10109         (deinit_parse_packet): New macro.  Change all users if
10110         init_parse_packet to also call this macro.
10111         * g10/free-packet.c (free_packet): Add arg PARSECTX and handle shallow
10112         packet copies in the context.  Change all callers.
10113         * g10/parse-packet.c (parse): Store certain packets in the parse
10114         context.
10115
10116         gpg: Change parse_packet to take a context.
10117         + commit 0526c99164d3531b5ec763ffc672407eb24b2296
10118         * g10/packet.h (struct parse_packet_ctx_s): New.
10119         (parse_packet_ctx_t): New type.
10120         (init_parse_packet): New macro.
10121         * g10/parse-packet.c (parse_packet, dbg_parse_packet): Change to take
10122         a parse context.  Change all callers to provide a context instead of
10123         directly supplying the input stream.
10124         (search_packet, dbg_search_packet): Ditto.
10125         (copy_all_packets, dbg_copy_all_packets): Init an use a parse context.
10126         (copy_some_packets, dbg_copy_some_packets): Ditto.
10127         (skip_some_packets, dbg_skip_some_packets): Ditto.
10128
10129         gpg: Export ring trust packets in backup mode.
10130         + commit f5b565a5b8de3f2a3d98bc1a655e18333aee223b
10131         * g10/export.c (write_keyblock_to_output): Export ring trust packets.
10132
10133 2017-03-28  Justus Winter  <justus@g10code.com>
10134
10135         tests,w32: Fix importing the extra key for GPGME's keylist test.
10136         + commit b20780658ebb1e1245db18c04db3e815399cf706
10137         * tests/gpgme/wrap.scm: Qualify the tests name with the extension for
10138         executables (if any).
10139
10140 2017-03-28  Werner Koch  <wk@gnupg.org>
10141
10142         gpg: Prepare for listing last_update and key origin data.
10143         + commit 4af389c9721fa534ed06a64b80705b631575c775
10144         * g10/keylist.c (list_keyblock_colon): Add empty fields 19 and 20.
10145
10146 2017-03-28  Justus Winter  <justus@g10code.com>
10147
10148         tests: Fix distcheck.
10149         + commit 5128cd74c029d57491a79ca9e918c81facdf1b76
10150         * tests/openpgp/Makefile.am (sample_msgs): Add all missing sample
10151         messages.
10152
10153         tests: Add test for '--decrypt --unwrap'.
10154         + commit 211d71f19c24da94f4c58014606125c1a29d86a2
10155         * tests/openpgp/Makefile.am (XTESTS): Add new test.
10156         * tests/openpgp/decrypt-unwrap-verify.scm: New file.
10157
10158         g10: Fix memory leak.
10159         + commit 6d3edfd972c1114f43f6b35773dc25e0256f48f4
10160         * g10/decrypt-data.c (decrypt_data): Free 'filename'.
10161
10162 2017-03-27  Justus Winter  <justus@g10code.com>
10163
10164         common: Fix connecting to the agent.
10165         + commit caf00915532e6e8e509738962964edcd14fb0654
10166         * common/homedir.c (_gnupg_socketdir_internal): Fix error handling.
10167
10168 2017-03-27  NIIBE Yutaka  <gniibe@fsij.org>
10169
10170         g10: Support specifying SERIALNO for --card-status.
10171         + commit c1e6302b347caf852a056b9c721469ccb51f44da
10172         * g10/gpg.c (main): Allow an argument for --card-status.
10173         * g10/card-util.c (current_card_status): Rename from card_status.
10174         (card_status): New, which supports multiple cards.
10175         (get_one_name): Use current_card_status.
10176
10177         scd: Change the order of applications when accessed.
10178         + commit d58275703f035e8cfd58cd1c2d0d5ac7dc59e110
10179         * scd/app.c (select_application): Move the app to top.
10180
10181         scd: Fix timeout handling for key generation.
10182         + commit 0848cfcce738150b53bfb65b78efc1e6dc9f3d26
10183         * scd/ccid-driver.c (CCID_CMD_TIMEOUT): Back to original value.
10184         (CCID_CMD_TIMEOUT_LONGER): New.
10185         (ccid_transceive): Add kludge for key generation.
10186
10187 2017-03-24  Werner Koch  <wk@gnupg.org>
10188
10189         gpg: Improve check for already compressed packets.
10190         + commit 0b3770c421a35b64823a805fa8d49ddd5c653d50
10191         * common/miscellaneous.c (is_openpgp_compressed_packet): New.
10192         (is_file_compressed): Rerad 2 more bytes and call new function.
10193
10194         agent: New option --enable-extended-key-format.
10195         + commit 2c237c13628a88ba23742da34ea18d3e205d7c53
10196         * agent/gpg-agent.c (oEnableExtendedKeyFormat): New const.
10197         (opts): New option --enable-extended-key-format.
10198         (parse_rereadable_options): Set option
10199         * agent/findkey.c (write_extended_private_key): Add arg 'update'.
10200         (agent_write_private_key): Implement new option.
10201
10202         agent: New option --stub-only for DELETE_KEY.
10203         + commit 6fab7bba879d7794e32112cf3eddd8d87130a5d7
10204         * agent/findkey.c (agent_delete_key): Add arg 'only_stubs'.
10205         * agent/command.c (cmd_delete_key): Add option --stub-only.
10206
10207 2017-03-23  Werner Koch  <wk@gnupg.org>
10208
10209         common: Implicitly do a gpgconf --create-socketdir.
10210         + commit 26086b362ff47d21b1abefaf674a6464bf0a8921
10211         * common/homedir.c (_gnupg_socketdir_internal): Create the
10212         sub-directory.
10213
10214         tests: Use gpgconf to stop the agent.
10215         + commit 2c9d9ac55ea455a5ec26428989dced0311ed46cc
10216         * tests/openpgp/defs.scm (stop-agent): Swap order of actions.  Kill
10217         all daemons using gpgconf.
10218         * tools/gpgconf.c (main) <aRemoveSocketDir>: Try to remove known
10219         socketfails on rmdir failure.  Do no fail for ENONET.
10220
10221 2017-03-23  Justus Winter  <justus@g10code.com>
10222
10223         gpgscm: Make test cleanup more robust.
10224         + commit 178b6314ab2d2268873067314744c8af74dc331e
10225         * tests/gpgscm/tests.scm (mkdtemp-autoremove): New function that
10226         cleans up at interpreter shutdown.
10227         (run-tests-parallel): Use the new function.
10228         (run-tests-sequential): Likewise.
10229         (make-environment-cache): Execute setup with an temporary working
10230         directory.
10231
10232 2017-03-21  Justus Winter  <justus@g10code.com>
10233
10234         tests: Test '--quick-set-primary-uid'.
10235         + commit fde885bbc47a4bf14a8570ac62e68adc8cf47a6e
10236         * tests/openpgp/quick-key-manipulation.scm: Test
10237         '--quick-set-primary-uid'.
10238
10239         tests,w32: Use GetTempPath to get the path for temporary files.
10240         + commit d17840c3f40111beaf97d96ad3ca52047976e221
10241         * tests/gpgscm/ffi.c (do_get_temp_path): New function.
10242         (ffi_init): Make function available.
10243         * tests/gpgscm/tests.scm (mkdtemp): Use the new function.
10244
10245 2017-03-21  Werner Koch  <wk@gnupg.org>
10246
10247         gpg: New command --quick-set-primary-uid.
10248         + commit 74c1f30ad6616186f0ab9dbaf34db6c17b1e40c4
10249         * g10/gpg.c (aQuickSetPrimaryUid): New const.
10250         (opts): New command --quick-set-primary-uid.
10251         (main): Implement it.
10252         * g10/keyedit.c (keyedit_quick_adduid): Factor some code out to ...
10253         (quick_find_keyblock): new func.
10254         (keyedit_quick_revuid): Use quick_find_keyblock.
10255         (keyedit_quick_set_primary): New.
10256
10257 2017-03-21  Justus Winter  <justus@g10code.com>
10258
10259         dirmngr: Fix error handling.
10260         + commit 483c1288a8f86dc6bf93d0d3f2865ecc246aecba
10261         * dirmngr/dns-stuff.c (libdns_init): Convert error before printing it.
10262
10263         dirmngr: Load the hosts file into libdns.
10264         + commit 88f1505f0613894d5544290a170119eb538921e5
10265         * dirmngr/dns-stuff.c (libdns_init): Actually load the hosts file into
10266         libdns.
10267
10268         tests: Create temporary directories in '/tmp'.
10269         + commit 06f1f163e96f1039304fd3cf565cf9de1ca45849
10270         * tests/gpgscm/tests.scm (mkdtemp): Create temporary directories in
10271         '/tmp' on UNIX, or in '%Temp' on Windows.
10272         * tests/migrations/common.scm (run-test): Turn error into a warning.
10273         * tests/openpgp/defs.scm (start-agent): Likewise.
10274
10275 2017-03-20  Justus Winter  <justus@g10code.com>
10276
10277         tests: Remove debugging remnants.
10278         + commit ceb4b245752bb1fb43fde7e99f8d904ab8a9b5e2
10279         * tests/gpgme/gpgme-defs.scm (run-python-tests?): Remove 'trace's.
10280
10281         tests: Fail if we cannot create the socket directory.
10282         + commit d75d20909d9f60d33ffd210def92278c0f383aad
10283         * tests/migrations/common.scm (run-test): Turn warning into an error.
10284         * tests/openpgp/defs.scm (start-agent): Likewise.
10285
10286 2017-03-20  Werner Koch  <wk@gnupg.org>
10287
10288         gpg: Add new field no 18 to the colon listing.
10289         + commit fe0b37e123ded51cc5f4cb5e3547fdfbce37a43e
10290         * g10/misc.c (gnupg_pk_is_compliant): New.
10291         * g10/keylist.c (print_compliance_flags): New.
10292         (list_keyblock_colon): Call it here.
10293         * sm/keylist.c (print_compliance_flags): New.
10294         (list_cert_colon): Call it here.
10295
10296         gpg: Remove unused stuff.
10297         + commit e2c63a13e2fa4ce39af8471a34c06d73ff3ee6f6
10298         * g10/OPTIONS: Remove.
10299         * g10/options.h (struct opt): Remove 'shm_coprocess'.
10300
10301 2017-03-17  Neal H. Walfield  <neal@g10code.com>
10302
10303         tests: Add test for issue 2959.
10304         + commit fb9d68d636490ca88925051f48b08963c324aed1
10305         * tests/openpgp/tofu.scm: Add test for --tofu-default-policy=ask.
10306
10307         gpg: Make sure the conflict set includes the current key.
10308         + commit b1106b4d640325c60a7212a4a44e4f67c0e3312d
10309         * g10/tofu.c (get_trust): Sanity check CONFLICT_SET after calling
10310         get_policy.  If POLICY is 'auto' and the default policy is 'ask', make
10311         sure CONFLICT_SET includes the current key.
10312
10313 2017-03-17  Werner Koch  <wk@gnupg.org>
10314
10315         dirmngr: Ignore warning alerts in the GNUTLS handshake.
10316         + commit 69c521df422a6c9a6b0a93e45c9373a8b6ceb28e
10317         * dirmngr/http.c (send_request) [GNUTLS]: Don't bail out on warning
10318         alerts.
10319
10320 2017-03-17  Justus Winter  <justus@g10code.com>
10321
10322         gpgscm: Simplify hash tables.
10323         + commit 6a3f857224eab108ae38e6259194b01b0ffdad8b
10324         * tests/gpgscm/scheme.c (oblist_add_by_name): We now always get a
10325         slot.  Simplify accordingly.
10326         (oblist_find_by_name): Always return the slot.
10327         (vector_elem_slot): New function.
10328         (new_slot_spec_in_env): We now always get a slot.  Remove parameter
10329         'env'.  Simplify accordingly.
10330         (find_slot_spec_in_env): Always return a slot.
10331         (new_slot_in_env): Adapt callsite.
10332         (opexe_0): Likewise.
10333         (opexe_1): Likewise.
10334         (scheme_define): Likewise.
10335
10336         gpgscm: Remove framework for immediate values.
10337         + commit 38c955599f7c6c20faeec57d8e1df7d2c0eeba18
10338         * tests/gpgscm/scheme.c (IMMEDIATE_TAG): Remove macro.
10339         (is_immediate): Likewise.
10340         (set_immediate): Likewise.
10341         (clr_immediate): Likewise.
10342         (enum scheme_types): Set the LSB in every value.
10343         (fill_vector): Adapt.
10344         (vector_elem): Likewise.
10345         (set_vector_elem): Likewise.
10346         (mark): Likewise.
10347         (gc): Test for the LSB to tell typeflags apart from pointers stored in
10348         the same memory location.
10349
10350 2017-03-16  NIIBE Yutaka  <gniibe@fsij.org>
10351
10352         agent,g10: Remove redundant SERIALNO request.
10353         + commit 8c8ce8711d9c938fcb982b0341e6b052742cb887
10354         * agent/learncard.c (agent_handle_learn): Don't call
10355         agent_card_serialno.  Get the serialno in status response.
10356         * g10/call-agent.c (agent_scd_learn): Don't request "SCD SERIALNO".
10357         (agent_scd_serialno): New.
10358         (card_cardlist_cb, agent_scd_cardlist): New.
10359
10360 2017-03-15  Justus Winter  <justus@g10code.com>
10361
10362         tests: Fix using tools from the build directory.
10363         + commit a98459d3f4ec3d196fb0adb0e90dadf40abc8c81
10364         * tests/openpgp/defs.scm (gpg-conf'): Explicitly pass the build prefix
10365         to gpgconf here...
10366         (gpg-components): ... instead of only here.
10367
10368         tests: Dump the tools that the tests are going to use.
10369         + commit c7833eca38fdb8d9ba7b59438ea87d651b8bf7ba
10370         * tests/openpgp/setup.scm: Dump the tools that the tests are going to
10371         use.  This will help us diagnose problems with the tests picking the
10372         wrong paths in the future.
10373
10374         build: Remove '--disable-tools' configuration option.
10375         + commit 6993e42088c191f18468317ba2b5b8fbc8c3edff
10376         * Makefile.am (SUBDIRS): Unconditionally include 'tools'.
10377         * configure.ac: Remove '--disable-tools' configuration option.
10378
10379 2017-03-15  NIIBE Yutaka  <gniibe@fsij.org>
10380
10381         g10: Fix check of serialno.
10382         + commit 61785b679c542bbd789395fa632eb8b5133b01ad
10383         * g10/card-util.c (card_status): Fix.
10384
10385         g10: Remove unused function.
10386         + commit ed3248219e921ee24f6f1b2985abb7e0945d70e9
10387         * g10/call-agent.c (select_openpgp): Remove.
10388
10389         tests: Fix running python condition.
10390         + commit a672ddec03f96475866d712b28be18b3fab43aef
10391         * tests/gpgme/gpgme-defs.scm (run-python-tests?): We need Python.
10392
10393 2017-03-14  Justus Winter  <justus@g10code.com>
10394
10395         tests: Skip Python tests if the bindings are not built.
10396         + commit d82abbb1b6e80d5980e6259ddcfc770e65a6b1b3
10397         * tests/gpgme/wrap.scm (python): Move variable...
10398         * tests/gpgme/gpgme-defs.scm (python): ... here.
10399         (run-python-tests?): New function.
10400         * tests/gpgme/run-tests.scm: Only run Python tests if the bindings can
10401         be located in GPGME's build directory.
10402
10403 2017-03-13  Werner Koch  <wk@gnupg.org>
10404
10405         gpg: Flush stdout before printing stats with --check-sigs.
10406         + commit 9a77b3b6e41f97b1209ad61c04b3dd33242ecae8
10407         * g10/keylist.c (print_signature_stats): Flush stdout.
10408         (list_keyblock_colon): Use es_flush instead of fflush.
10409
10410 2017-03-09  Justus Winter  <justus@g10code.com>
10411
10412         tests: Run the tests for the Python bindings of GPGME.
10413         + commit 046a15a88c83b40a753b4ad7ecc1456efa5b527f
10414         * tests/gpgme/gpgme-defs.scm (create-file): Write lines.
10415         (create-gpgmehome): Extend function to create the right environment
10416         for the Python tests.
10417         * tests/gpgme/run-tests.scm: Make an environment cache for the Python
10418         tests and enable them.
10419         * tests/gpgme/wrap.scm: Do not hardcode the path of the Python
10420         interpreter.
10421
10422         tests: Rework environment setup.
10423         + commit cca91a3f8f7e3e36b7149fc93f7b6df11d21eb1d
10424         * tests/gpgscm/tests.scm (test::scm): Add a setup argument.
10425         (test::binary): Likewise.
10426         (run-tests-parallel): Remove setup parameter.
10427         (run-tests-sequential): Likewise.
10428         (make-environment-cache): New function that handles the cache
10429         protocol.
10430         * tests/gpgme/run-tests.scm: Adapt accordingly.
10431         * tests/gpgsm/run-tests.scm: Likewise.
10432         * tests/migrations/run-tests.scm: Likewise.
10433         * tests/openpgp/run-tests.scm: Likewise.
10434
10435 2017-03-08  Werner Koch  <wk@gnupg.org>
10436
10437         wks: Put stdout into binary mode for Windows at another place.
10438         + commit ed5575ec550ff16b0b901a23c6aa3eb3d47b0575
10439         * tools/wks-util.c (wks_send_mime): Set stdout to binary.
10440
10441         wks: Put stdout into binary mode for Windows.
10442         + commit 5c83759364272b19ceafbef46d057f0430a12698
10443         * tools/send-mail.c (send_mail_to_file): Call es_set_binary.
10444
10445 2017-03-08  Justus Winter  <justus@g10code.com>
10446
10447         build: Use macOS' compatibility macros to enable all features.
10448         + commit dd60e868d2bf649a33dc96e207ffd3b8ae4d35af
10449         * configure.ac: On macOS, use the compatibility macros to expose every
10450         feature of the libc.  This is the equivalent of _GNU_SOURCE on GNU
10451         libc.
10452
10453         g10: Move more flags into the flag bitfield.
10454         + commit 2649fdfff5d9e227025956e015b67502fd4962c4
10455         * g10/packet.h (PKT_user_id): Move 'is_primary', 'is_revoked', and
10456         'is_expired' into the flags bitfield, and drop the prefix.
10457         * g10/call-dirmngr.c: Adapt accordingly.
10458         * g10/export.c: Likewise.
10459         * g10/getkey.c: Likewise.
10460         * g10/import.c: Likewise.
10461         * g10/kbnode.c: Likewise.
10462         * g10/keyedit.c: Likewise.
10463         * g10/keylist.c: Likewise.
10464         * g10/keyserver.c: Likewise.
10465         * g10/mainproc.c: Likewise.
10466         * g10/pkclist.c: Likewise.
10467         * g10/pubkey-enc.c: Likewise.
10468         * g10/tofu.c: Likewise.
10469         * g10/trust.c: Likewise.
10470         * g10/trustdb.c: Likewise.
10471
10472 2017-03-08  Werner Koch  <wk@gnupg.org>
10473
10474         dirmngr: Do not put a keyserver into a new dirmngr.conf.
10475         + commit 8f028642239fa992c6c059e3c1b4421a1813c827
10476         * g10/dirmngr-conf.skel: Do not define keyservers.
10477
10478         doc: Add a note to the trust model direct.
10479         + commit f0257b4a86b73f5b956028e68590b6d2a23ea4da
10480         * doc/gpg.texi (GPG Configuration Options): Add note.  Chnage Index
10481         from trust-mode:foo to trust-model:foo.
10482
10483 2017-03-07  Justus Winter  <justus@g10code.com>
10484
10485         Revert "build: Improve CFLAGS handling."
10486         + commit b71384c8054ce2f245ccfae02b8ee81e1adfc512
10487         This reverts commit 4b57359ef3ce0b87e15889e12ef0fcd23f62dcb4.
10488
10489         build: Improve CFLAGS handling.
10490         + commit 4b57359ef3ce0b87e15889e12ef0fcd23f62dcb4
10491         * configure.ac: Strip any flags matching '-Werror' from CFLAGS before
10492         running the tests, and add them back later on.
10493
10494 2017-03-07  Michael Haubenwallner  <michael.haubenwallner@ssi-schaefer.com>
10495
10496         gpgscm: Use system strlwr if available.
10497         + commit c22a2a89d3bd3d08b3abb8e4e33df32b480338ec
10498         * tests/gpgscm/scheme.c: Define local strlwr only when HAVE_STRLWR is
10499         not defined in config.h.
10500         * tests/gpgscm/scheme-config.h: Remove hack.
10501
10502 2017-03-07  Justus Winter  <justus@g10code.com>
10503
10504         gpg: Do not allow the user to revoke the last valid UID.
10505         + commit 591b6a9d879cbcabb089d89a26d3c3e0306054e1
10506         * g10/keyedit.c (keyedit_quick_revuid): Merge self signatures, then
10507         make sure that we do not revoke the last valid UID.
10508         (menu_revuid): Make sure that we do not revoke the last valid UID.
10509         * tests/openpgp/quick-key-manipulation.scm: Demonstrate that
10510         '--quick-revoke-uid' can not be used to revoke the last valid UID.
10511
10512 2017-03-07  NIIBE Yutaka  <gniibe@fsij.org>
10513
10514         tools: Removal of -Icommon.
10515         + commit 80fb1a8a05b2194af16027555b09bbd5d48ec9ac
10516         * tools/gpg-wks-server.c: Follow the change.
10517
10518         More change for common.
10519         + commit d6c7bf1f8ab8899faba2fb81a35b096921c38f3c
10520         * g10, scd, test, tools: Follow the change of removal of -Icommon.
10521
10522         Remove -I option to common.
10523         + commit 70aca95d6816082b289fceca8eabfcf718a6b701
10524         * dirmngr/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common.
10525         * g10/Makefile.am (AM_CPPFLAGS): Ditto.
10526         * g13/Makefile.am (AM_CPPFLAGS): Ditto.
10527         * kbx/Makefile.am (AM_CPPFLAGS): Ditto.
10528         * scd/Makefile.am (AM_CPPFLAGS): Ditto.
10529         * sm/Makefile.am (AM_CPPFLAGS): Ditto.
10530         * tools/Makefile.am (AM_CPPFLAGS): Ditto.
10531         * Throughout: Follow the change.
10532
10533 2017-03-07  Justus Winter  <justus@g10code.com>
10534
10535         tests: Avoid overflowing signed 32 bit time_t.
10536         + commit de3838372ae3cdecbd83eea2c53c8e2656d93052
10537         * tests/openpgp/quick-key-manipulation.scm: Use expiration times in
10538         the year 2038 instead of 2105 to avoid overflowing 32 bit time_t.
10539         time_t is used internally to parse the expiraton time from the iso
10540         timestamp.
10541
10542 2017-03-07  NIIBE Yutaka  <gniibe@fsij.org>
10543
10544         agent: Resolve conflict of util.h.
10545         + commit 176e07ce10d892fa7c7b96725b38b2fec9a1f916
10546         * agent/Makefile.am (AM_CPPFLAGS): Remove -I$(top_srcdir)/common.
10547         * agent/call-pinentry.c, agent/call-scd.c: Follow the change.
10548         * agent/command-ssh.c, agent/command.c, agent/cvt-openpgp.c: Ditto.
10549         * agent/divert-scd.c, agent/findkey.c, agent/genkey.c: Ditto.
10550         * agent/gpg-agent.c, agent/pksign.c, agent/preset-passphrase.c: Ditto.
10551         * agent/protect-tool.c, agent/protect.c, agent/trustlist.c: Ditto.
10552         * agent/w32main.c: Ditto.
10553
10554         agent: Add include files.
10555         + commit bf03925751abb739f2fd9d631694d3dd33decf92
10556         * agent/command-ssh.c: Add sys/socket.h and sys/un.h.
10557
10558         agent: Fix get_client_pid for portability.
10559         + commit f7f806afa5083617f4aba02fc3b285b06a7d73d4
10560         * configure.ac: Simply check getpeerucred and ucred.h, and structure
10561         members.
10562         * agent/command-ssh.c: Include ucred.h.
10563         (get_client_pid) [HAVE_STRUCT_SOCKPEERCRED_PID]: Use sockpeercred
10564         structure for OpenBSD.
10565         [LOCAL_PEERPID]: Use LOCAL_PEERPID for macOS.
10566         [LOCAL_PEEREID]: Use LOCAL_PEEREID for NetBSD.
10567         [HAVE_GETPEERUCRED]: Use getpeerucred for OpenSolaris.
10568
10569         common: Fix warning for portability.
10570         + commit b9ab733fc0dd2ca2a7eaac0bde3a817c07af36c5
10571         * common/localename.c (do_nl_locale_name): We don't use CATEGORY.
10572
10573         tools: More portable for openpty use.
10574         + commit ce37ada87139ef418401f9f35439007a8c04a856
10575         * configure.ac (AC_CHECK_HEADERS): Add util.h libutil.h and termios.h.
10576         * tools/symcryptrun.c: Include those headers.
10577
10578         scd: Close THE_EVENT handle.
10579         + commit cc933a96f8e83bc66fb69ed33d9593acdd60c929
10580         * scd/scdaemon.c (handle_connections): Close the handle.
10581
10582 2017-03-06  Justus Winter  <justus@g10code.com>
10583
10584         tests: Harmonize temporary and socket directory handling.
10585         + commit 7e19786a5ddef637d1d9d21593fecf5a36b6f372
10586         * tests/gpgscm/tests.scm (mkdtemp): Do not magically obey the
10587         environment variable 'TMP', make sure to always return an absolute
10588         path.
10589         * tests/gpgme/Makefile.am (TMP): Drop variable.
10590         (TESTS_ENVIRONMENT): Drop 'TMP'.
10591         * tests/gpgme/gpgme-defs.scm (create-gpgmehome): Start the agent.  Do
10592         not create private key store, the agent does that for us.
10593         * tests/gpgsm/Makefile.am (TMP): Drop variable.
10594         (TESTS_ENVIRONMENT): Drop 'TMP'.
10595         * tests/gpgme/gpgme-defs.scm (create-gpgsmhome): Start the agent.  Do
10596         not create private key store, the agent does that for us.
10597         * tests/migrations/Makefile.am (TMP): Drop variable.
10598         (TESTS_ENVIRONMENT): Drop 'TMP'.
10599         * tests/migrations/common.scm (gpgconf): New variable.
10600         (run-test): Create and remove socket directory.
10601         * tests/migrations/extended-pkf.scm (src-tarball): Remove variable.
10602         (setup): Remove function.
10603         (trigger-migration): Likewise.
10604         Use 'run-test' to execute the test.
10605         * tests/migrations/from-classic.scm (src-tarball): Remove variable.
10606         (setup): Remove function.
10607         Use 'run-test' to execute the tests.
10608         * tests/openpgp/Makefile.am (TMP): Drop variable.
10609         (TESTS_ENVIRONMENT): Drop 'TMP'.
10610         * tests/openpgp/README: Do not mention 'TMP'.
10611         * tests/openpgp/defs.scm (with-home-directory): New macro.
10612         (create-legacy-gpghome): Do not create private key store, the agent
10613         does that for us.
10614         (start-agent): Make sure to terminate the right agent with 'atexit'.
10615
10616         gpgscm: Fix creation of temporary directories.
10617         + commit 171e4314ebd3ff74af3dcdc8bd68e1100e8910ea
10618         * tests/gpgscm/ffi.c (do_mkdtemp): Use a larger buffer for the
10619         template.
10620
10621 2017-03-06  Werner Koch  <wk@gnupg.org>
10622
10623         wks: Set published keys world-readable.
10624         + commit e3589110e01dc6ad04463351ec2ce17201556d09
10625         * tools/gpg-wks-server.c (check_and_publish): Set the permissions.
10626
10627         gpg: Fix attempt to double free an UID structure.
10628         + commit 4a130bbc2c2f4be6e8c6357512a943f435ade28f
10629         * g10/getkey.c (get_best_pubkey_byname): Set released .UID to NULL.
10630
10631 2017-03-06  NIIBE Yutaka  <gniibe@fsij.org>
10632
10633         scd: Fix compiler warnings for app-openpgp.c.
10634         + commit e6ca015ae182a6dbb0466441efc17c99683e9375
10635         * scd/app-openpgp.c (retrieve_key_material): Remove touching I.
10636         (do_change_pin): Make sure going to leave if PINVALUE == 0.
10637         (rsa_writekey): Emit simpler log.
10638
10639         scd: More cleanup of old code.
10640         + commit 9bf39ed75ddbd35908bcd0996f55325ff801619a
10641         * scd/app-dinsig.c (do_sign): Remove assignment to HASHALGO.
10642         * scd/app-p15.c (parse_keyusage_flags): Remove assign to MASK.
10643         (read_ef_aodf): Likewise.
10644         (read_ef_cdf): Change the control to parse_error.
10645         * scd/app-sc-hsm.c (parse_keyusage_flags): Remove assign to MASK.
10646         (read_ef_prkd): Remove assign to S.
10647         (read_ef_prkd): Check if PRKDF is not null.
10648         (read_ef_cd): Likewise for CDF.
10649
10650         scd: Clean up old code.
10651         + commit cb6337329d3c858c695a7e56e2fc31d9d50ca3fe
10652         * scd/apdu.c (CT_init, CT_data, CT_close): Remove.
10653         (ct_error_string, ct_activate_card, close_ct_reader, reset_ct_reader)
10654         (ct_get_status, ct_send_apdu, open_ct_reader): Remove.
10655         (new_reader_slot) [NEED_PCSC_WRAPPER]: Remove fd and pid handling.
10656         (writen, readn): Remove.
10657         (pcsc_get_status, pcsc_send_apdu, control_pcsc, close_pcsc_reader)
10658         (reset_pcsc_reader, open_pcsc_reader): Only DIRECT version.
10659         (apdu_open_one_reader): Remove CT_api handling.
10660         (apdu_get_status_internal, send_le): Fix to stop warnings.
10661
10662         scd: Fix API of select_file/_path.
10663         + commit 0703de01c8fbc417a99ecf8e950fc306b8c8ac9c
10664         * scd/iso7816.c (iso7816_select_file, iso7816_select_path): Remove
10665         unused arguments.
10666         * scd/app-dinsig.c (do_readcert): Follow the change.
10667         * scd/app-help.c (app_help_read_length_of_cert): Likewise.
10668         * scd/app-nks.c (keygripstr_from_pk_file, do_readcert, do_readkey)
10669         (switch_application): Likewise.
10670         * scd/app-p15.c (select_and_read_binary, select_ef_by_path)
10671         (micardo_mse, app_select_p15): Likewise.
10672         * scd/app.c (app_new_register): Likewise.
10673
10674         agent: For SSH, robustly handling scdaemon's errors.
10675         + commit 4ce4f2f683a17be3ddb93729f3f25014a97934ad
10676         * agent/command-ssh.c (card_key_list): Return 0 when
10677         agent_card_serialno returns an error.
10678         (ssh_handler_request_identities): Handle errors for card listing
10679         and proceed to other cases.
10680
10681 2017-03-03  Werner Koch  <wk@gnupg.org>
10682
10683         dirmngr: Fix commit de6d8313.
10684         + commit 67c203b6bf8d6dd489ceef3391f609986e7b7a49
10685         * dirmngr/http-common.c (get_default_keyserver): Fix assert.
10686
10687 2017-03-03  NIIBE Yutaka  <gniibe@fsij.org>
10688
10689         scd: Fix scd_kick_the_loop.
10690         + commit f9acc7d18bb90f47dafe7e32ae92f567756d6b12
10691         * scd/scdaemon.c (notify_fd): Remove.
10692         (the_event) [W32]: New.
10693         (main_thread_pid) [!W32]: New.
10694         (handle_signal): Handle SIGCONT.
10695         (scd_kick_the_loop): Use signal on UNIX and event on Windows.
10696         (handle_connections): Likewise.
10697
10698 2017-03-03  Werner Koch  <wk@gnupg.org>
10699
10700         gpg: Fix possible segv when attribute packets are filtered.
10701         + commit 5f6f3f5cae8a95ed469129f9677782c17951dab3
10702         * g10/import.c (impex_filter_getval): Handle PKT_ATTRIBUTE the same as
10703         PKT_USER_ID
10704         (apply_drop_sig_filter): Ditto.
10705
10706         gpg: Add new variables to the import and export filters.
10707         + commit 1813f3be23bdab5a42070424c47cb8daa9d9e6b7
10708         * g10/import.c (impex_filter_getval): Add new variables "expired",
10709         "revoked", and "disabled".
10710
10711 2017-03-02  Werner Koch  <wk@gnupg.org>
10712
10713         tools: Fix compile error with older gcc versions.
10714         + commit b1f48da02b474e985161aa2778d7b602a13c4292
10715         * tools/mime-parser.h: Include rfc822parse.h.
10716         (struct rfc822parse_context): Remove duplicate definition.
10717
10718         dirmngr: Rearrange files to fix de6d831.
10719         + commit 1890896fe698c55d15160a53aa6c5c22dc424031
10720         * dirmngr/http-common.c: New.
10721         * dirmngr/http-common.h: New.
10722         * dirmngr/Makefile.am (dirmngr_SOURCES): Add them.
10723         (t_http_SOURCES): Add them.
10724         (t_ldap_parse_uri_SOURCES): Add them.
10725         * dirmngr/misc.c (get_default_keyserver): Move to ...
10726         * dirmngr/http-common.c: here.
10727         * dirmngr/http.c: Include http-common.h instead of misc.h.
10728         * dirmngr/http-ntbtls.c: Ditto.
10729
10730         dirmngr: Let --gpgconf-list return the default keyserver.
10731         + commit de6d8313f6df32aaa151bee74e1db269ac1e0fed
10732         * dirmngr/misc.c (get_default_keyserver): New.
10733         * dirmngr/http.c: Include misc.h
10734         (http_session_new): Use get_default_keyserver instead of hardwired
10735         "hkps.pool.sks-keyservers.net".
10736         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Ditto.
10737         * dirmngr/dirmngr.c (main) <aGPGCongList>: Return default keyserver.
10738
10739 2017-03-02  Justus Winter  <justus@g10code.com>
10740
10741         gpg: Always initialize the trust db when generating keys.
10742         + commit 0c4d0620d327e8a2069532a5519afefe867a47d6
10743         * g10/gpg.c (main): Always initialize the trust db when generating
10744         keys.
10745         * g10/keygen.c (do_generate_keypair): We can now assume that there is
10746         a trust db.
10747
10748         gpg: Fix (quick) key generation with --always-trust.
10749         + commit 4735ab96aa5577d40ba7b3f72d863057198cc6a7
10750         * g10/keygen.c (do_generate_keypair): Only update the ownertrust if we
10751         do have a trust database.
10752         * g10/trustdb.c (have_trustdb): New function.
10753         * g10/trustdb.h (have_trustdb): New prototype.
10754         * tests/openpgp/quick-key-manipulation.scm: Remove workaround.
10755
10756 2017-03-02  Werner Koch  <wk@gnupg.org>
10757
10758         agent: Improve error message for the KEYTOCARD command.
10759         + commit d6f0f368763006abf08818bfefcd32ecedb5c20a
10760         * agent/command.c (cmd_keytocard): Always use leave_cmd.  Simplify
10761         timestamp checking and do an early test with an appropriate error
10762         message.
10763
10764 2017-03-02  Justus Winter  <justus@g10code.com>
10765
10766         g10: Signal an error when trying to revoke non-existant UID.
10767         + commit 62d21a4ab4029b32ea129f1cf3a0e1f22e2fb7b0
10768         * g10/keyedit.c (keyedit_quick_revuid): Signal an error when trying to
10769         revoke non-existant UID.
10770         * tests/openpgp/quick-key-manipulation.scm: Test that.
10771
10772         tests: Log information about ssh, add comments to test.
10773         + commit 74cb3b230c1f99afc5fd09bccc24186a63b154b0
10774         * tests/openpgp/ssh-import.scm (ssh-version-string): New variable, and
10775         log the binary and version used in the test.
10776         (ssh-supports?): Document how we test what algorithms are supported by
10777         ssh, and log ssh-keygen's replies.
10778
10779         common,tools: Always escape newlines when escaping data.
10780         + commit e064c75b08a523f738108428fe0c417a46e66238
10781         * common/stringhelp.c (do_percent_escape): Always escape newlines.
10782         * tools/gpgconf-comp.c (gc_percent_escape): Likewise.
10783
10784 2017-03-01  Werner Koch  <wk@gnupg.org>
10785
10786         Release 2.1.19.
10787         + commit 4a28c212b35739ce951bd41cfc6ef1a215846b2e
10788
10789
10790         build: Add kludge for "make distcheck" in a release build.
10791         + commit 246b27921b5dc34f367d879402725784aaee2494
10792         * configure.ac: New option --enable-gnupg-builddir-envvar.
10793         (ENABLE_GNUPG_BUILDDIR_ENVVAR): New ac_define.
10794         * common/homedir.c (gnupg_set_builddir_from_env): Consider
10795         ENABLE_GNUPG_BUILDDIR_ENVVAR.
10796         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Rename to ...
10797         (AM_DISTCHECK_CONFIGURE_FLAGS): this to be future proof.  Add option
10798         --enable-gnupg-builddir-envvar.
10799
10800 2017-03-01  Yuri Chornoivan  <yurchor@ukr.net>
10801
10802         po: Update Ukrainian translation.
10803         + commit c7f2a59833728e99e00449da2ddb10cf66693e7e
10804
10805
10806 2017-03-01  Ineiev  <ineiev@gnu.org>
10807
10808         po: Update Russian translation.
10809         + commit 280c724fe26bfd861ac74abc71e221795d8947f0
10810
10811
10812 2017-03-01  Werner Koch  <wk@gnupg.org>
10813
10814         gpg: Make --export-options work with --export-secret-keys.
10815         + commit 891ab23411b7f20ef37d8bde81d9857b083235df
10816         * g10/export.c (export_seckeys): Add arg OPTIONS and pass it to
10817         do_export.
10818         (export_secsubkeys): Ditto.
10819         * g10/gpg.c (main): Pass opt.export_options to export_seckeys and
10820         export_secsubkeys
10821
10822         gpg: Allow creating keys using an existing ECC key.
10823         + commit 2bbdeb8ee87a6c7ec211be16391a11b7c6030bed
10824         * common/sexputil.c (get_pk_algo_from_canon_sexp): Remove arg R_ALGO.
10825         Change to return the algo id.  Reimplement using get_pk_algo_from_key.
10826         * g10/keygen.c (check_keygrip): Adjust for change.
10827         * sm/certreqgen-ui.c (check_keygrip): Ditto.
10828
10829 2017-02-28  Werner Koch  <wk@gnupg.org>
10830
10831         gpg: Do not require a trustdb for decryption.
10832         + commit e182542e90cbeff4f2ac6c8d71061356d7cdcdea
10833         * g10/trustdb.c (init_trustdb): Add and implement arg NO_CREATE.
10834         Change to return an error code.  Change all callers to to pass False
10835         for NO_CREATE.
10836         (tdb_get_ownertrust): New arg NO_CREATE.  Call init_trustdb to test
10837         for a non-existing trustdb.  Change all callers to to pass False for
10838         NO_CREATE.
10839         (tdb_get_min_ownertrust): Ditto.
10840         * g10/trust.c (get_ownertrust_with_min): Add arg NO_CREATE.  Call
10841         init_trustdb for a quick check.
10842         (get_ownertrust_info): Add arg NO_CREATE.
10843         (get_ownertrust_string): Ditto.
10844         * g10/gpgv.c (get_ownertrust_info): Adjust stub.
10845         * g10/test-stubs.c (get_ownertrust_info): Ditto.
10846         * g10/mainproc.c (list_node): Call get_ownertrust_info with NO_CREATE
10847         set.
10848         * g10/pubkey-enc.c (get_it): Ditto.
10849
10850 2017-02-28  Justus Winter  <justus@g10code.com>
10851
10852         gpgscm: Improve parsing.
10853         + commit e4583ae14e52482ab390c102d071755f91ab211d
10854         * tests/gpgscm/scheme.c (port_increment_current_line): Avoid creating
10855         the same integer if the delta is zero.  This happens a lot during
10856         parsing, and puts pressure on the memory allocator.
10857
10858         gpgscm: Fix calculating the line number.
10859         + commit 058c97f9fc485405246b1adfcc905c1891550652
10860         * tests/gpgscm/scheme.c (opexe_5): Only increment the line number on
10861         newlines.
10862
10863         gpg,tools: Make auto-key-retrieve configurable via gpgconf.
10864         + commit d379a0174cca595204b32da9a66c513a1304e6d0
10865         * g10/gpg.c (gpgconf_list): Add 'auto-key-retrieve'.
10866         * tools/gpgconf-comp.c (gc_options_gpg): Likewise.
10867
10868         tests: Improve support for gpgconf.
10869         + commit 41900175cf046dd9abe3d7a6805f6a403d68df15
10870         * tests/openpgp/defs.scm: Improve high-level inteface to gpgconf.
10871         * tests/openpgp/gpgconf.scm: Adapt.
10872         * tests/openpgp/tofu.scm: Use it to select the trust model.
10873
10874         gpg,tools: Make trust-model configurable via gpgconf.
10875         + commit ebeccd73eb85f9027f0985d77dfe901266c6ddef
10876         * g10/gpg.c (gpgconf_list): Add 'trust-model'.
10877         * tools/gpgconf-comp.c (gc_options_gpg): Likewise.
10878
10879         gpgscm: Track source locations in every kind of ports.
10880         + commit 7cc57e2c63d0fa97569736419db5c76117e7685b
10881         * tests/gpgscm/scheme-private.h (struct port): Move location
10882         information out of the union.
10883         * tests/gpgscm/scheme.c (mark): All ports need marking now.
10884         (gc): Likewise all ports on the load stack.
10885         (port_clear_location): Adapt accordingly.  Also, add an empty function
10886         for !SHOW_ERROR_LINE.
10887         (port_increment_current_line): Likewise.
10888         (port_reset_current_line): Drop function in favor of...
10889         (port_init_location): ... this new function.
10890         (file_push): Simplify.
10891         (file_pop): Likewise.
10892         (port_rep_from_filename): Likewise.
10893         (port_rep_from_file): Likewise.
10894         (port_rep_from_string): Also initialize the location.
10895         (port_rep_from_scratch): Likewise.
10896         (port_close): Simplify and generalize.
10897         (skipspace): Likewise.
10898         (token): Likewise.
10899         (_Error_1): Generalize.
10900         (opexe_5): Likewise.
10901         (scheme_deinit): Simplify and generalize.
10902         (scheme_load_named_file): Likewise.
10903         (scheme_load_string): Also initialize the location.
10904
10905 2017-02-28  Werner Koch  <wk@gnupg.org>
10906
10907         gpgv,w32: Fix --status-fd.
10908         + commit 8a67dc4c4324b617b5a3fea51c59c674488544d6
10909         * g10/gpgv.c (main): Use translate_sys2libc_fd_int for --status-fd.
10910
10911         w32: Make pipes really pollable.
10912         + commit 1192449207f41b26be8950b04df84a52c8a2a886
10913         * common/exectool.c (gnupg_exec_tool_stream) [W32]: Use _get_osfhandle
10914         to print the fd for the command line.
10915         * common/exechelp-w32.c (create_pipe_and_estream): Use es_sysopen so
10916         that the streams are actually pollable.
10917
10918 2017-02-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
10919
10920         dirmngr: Avoid warnings during non-ntbtls build.
10921         + commit f5782e11a560fd590221042391254c810a42e45f
10922         * dirmngr/t-http.c (my_http_tls_verify_cb): Avoid warnings when not
10923         using ntbtls.
10924
10925         trustdb: Respect --quiet during --import-ownertrust.
10926         + commit ddf01a67d6388d988f1db50a06facb21c14d9426
10927         * g10/tdbdump.c (import_ownertrust): If opt.quiet is set, do not send
10928         log_info messages.
10929
10930 2017-02-26  Manish Goregaokar  <manish@mozilla.com>
10931
10932         g10: fix typo.
10933         + commit 64ec21bebd3f136722e608649906b59c6add6947
10934         I already have copyright assignment with the FSF for GDB. I don't
10935         think I'll need to do the DCO thing.
10936
10937 2017-02-24  Werner Koch  <wk@gnupg.org>
10938
10939         gpgv: New options --log-file and --debug.
10940         + commit 7af5d61c6e210210c777be9e6e87720dd4a055d9
10941         * g10/gpgv.c (oLoggerFile, oDebug): New consts.
10942         (opts): Add options --log-file and --debug.
10943         (main): Implement options.
10944
10945 2017-02-24  Andre Heinecke  <aheinecke@intevation.de>
10946
10947         speedo,w32: Fix gpg-wks-client installation.
10948         + commit 49b4a676148523b51beca3ae929e9d78ed7ba110
10949         * build-aux/speedo/w32/inst.nsi: gpg-wks-client is an exe.
10950
10951 2017-02-23  Werner Koch  <wk@gnupg.org>
10952
10953         dirmngr: Add new debug flag "extprog"
10954         + commit 22b69b9edfdf6e6172239cbd1075ffe29077d339
10955         * dirmngr/dirmngr.h (DBG_EXTPROG_VALUE, DBG_EXTPROG): New macros.
10956         * dirmngr/dirmngr.c (debug_flags): Add flag "extprog".
10957         (handle_connections): Use a macro instead of -1 for an invalid socket.
10958         * dirmngr/loadswdb.c (verify_status_cb): Debug the gpgv call.
10959
10960         wks: Make sure that the draft 2 request is correctly detected.
10961         + commit d30e17ac62dea8913b7f353971d546b6b1a09bd5
10962         * tools/gpg-wks.h (WKS_DRAFT_VERSION): New.
10963         * tools/wks-receive.c (new_part): Move test wks draft version to ...
10964         (t2body): new callback.
10965         (wks_receive): Register this callback.
10966         * tools/gpg-wks-server.c (send_confirmation_request): Emit draft
10967         version header.
10968         (send_congratulation_message): Ditto.
10969         * tools/gpg-wks-client.c (decrypt_stream_parm_s): New.
10970         (decrypt_stream_status_cb): Check DECRYTPION_KEY status.
10971         (decrypt_stream): Get infor from new callback.
10972         (process_confirmation_request): New arg 'mainfpr'.  Check that it
10973         matches the decryption key.
10974         (read_confirmation_request): Check that the decryption key has been
10975         generated by us.
10976         (command_send): Use macro from draft version header.
10977         (send_confirmation_response): Emit draft version header.
10978
10979         wks: New callback for the mime parser.
10980         + commit a2090250829fe8989be2afc8cf41ba2a022072fc
10981         * tools/mime-parser.c (mime_parser_context_s): New field 't2body'.
10982         (parse_message_cb): Call that callback.
10983         (mime_parser_set_t2body): New.
10984
10985         gpg: Emit new status DECRYPTION_KEY.
10986         + commit effa80e0b5fd8cf9e31a984afe391c2406edee8b
10987         * common/status.h (STATUS_DECRYPTION_KEY): New.
10988         * g10/pubkey-enc.c (get_it): Emit that status.
10989
10990         dirmngr,w32: Make https with ntbtls work.
10991         + commit a42bf00b4edce789999aa3bdfce235cf726463ae
10992         * dirmngr/http.c (simple_cookie_functions): New.
10993         (send_request) [HTTP_USE_NTBTLS, W32]: Use es_fopencookie.
10994         (cookie_read): Factor some code out to ...
10995         (read_server): new.
10996         (simple_cookie_read, simple_cookie_write) [W32]: New.
10997
10998 2017-02-22  Werner Koch  <wk@gnupg.org>
10999
11000         scd,agent: Improve the OpenPGP PIN prompt texts.
11001         + commit f98c8cb013033c08e98ebedcc0e084fbd2a85b0c
11002         * scd/app-openpgp.c (get_prompt_info): Change texts.
11003         * agent/call-pinentry.c (struct entry_features): New.
11004         (getinfo_features_cb): New.
11005         (start_pinentry): Set new fucntion as status callback.
11006         (build_cmd_setdesc): New.  Replace all snprintf for SETDESC by this
11007         one.
11008
11009 2017-02-22  Andre Heinecke  <aheinecke@intevation.de>
11010
11011         scd: Nitpicks on the improved card prompts.
11012         + commit 143ca039e1e81140ae520cc1025f8e25c01acc80
11013         * src/app-openpgp.c (get_prompt_info): Change wording and order
11014         slightly.
11015
11016 2017-02-22  Werner Koch  <wk@gnupg.org>
11017
11018         scd: Improve the prompts for OpenPGP cards.
11019         + commit e3944f34e3220f96fb1be449eb6f3d7360bc2d0b
11020         * scd/app-openpgp.c (get_disp_name): New.
11021         (get_disp_serialno): New.
11022         (get_prompt_info): New.
11023         (build_enter_admin_pin_prompt): Rework the prompt texts.  Factor some
11024         code out to ...
11025         (get_remaining_tries): New.
11026         (verify_a_chv): Print a remaining counter also for the standard PIN.
11027         Rework the prompt texts.
11028
11029         * agent/divert-scd.c (ask_for_card): Pretty format an OpenPGP serial
11030         no.
11031
11032         agent: Prepend the description to a PIN prompt.
11033         + commit 6488ffb767733a2cf92ca5ba3e61fc0c53e0f673
11034         * agent/divert-scd.c (has_percent0A_suffix): New.
11035         (getpin_cb): Prepend DESC_TEXT to the prompt.
11036         * agent/findkey.c (modify_description): Rename to ...
11037         (agent_modify_description): this.  MAke global.  Add kludge to remove
11038         empty parentheses from the end.
11039         (agent_key_from_file, agent_delete_key): Adjust for above change.
11040         * agent/pksign.c (agent_pksign_do): Modify DESC_TEXT also when
11041         diverting to a card.
11042
11043         agent: Prepare to pass an additional parameter to the getpin callback.
11044         + commit 78d875a0f83bc046279b951aea76cd74f3c44fd8
11045         * agent/call-scd.c (writekey_parm_s, inq_needpin_s): Merge into ...
11046         (inq_needpin_parm_s): new struct.  Add new field 'getpin_cb_desc'.
11047         Change users to set all fields.
11048         (inq_needpin): Pass GETPIN_CB_DESC to the GETPIN_CB.
11049         (agent_card_pksign): Add arg 'desc_text' and change arg 'getpin_cb' to
11050         take an additional arg 'desc_text'.
11051         (agent_card_pkdecrypt): Ditto.
11052         (agent_card_writekey): Change arg 'getpin_cb' to take an additional
11053         arg 'desc_text'.
11054         (agent_card_scd): Ditto.
11055         * agent/divert-scd.c (getpin_cb): Add new arg 'desc_text'.
11056         (divert_pksign): Add new arg 'desc_text' and pass is to
11057         agent_card_pksign.
11058         (divert_pkdecrypt): Add new arg 'desc_text' and pass is to
11059         agent_card_pkdecrypt.
11060         * agent/pkdecrypt.c (agent_pkdecrypt): Pass DESC_TEXT to
11061         divert_pkdecrypt.
11062         * agent/pksign.c (agent_pksign_do):  Pass DESC_TEXT to
11063         divert_pksign.
11064
11065 2017-02-22  NIIBE Yutaka  <gniibe@fsij.org>
11066
11067         tests: No spelling fix for test text.
11068         + commit ef424353f342f80ca6d18ede8b63c1b02215d105
11069         * tests/openpgp/verify.scm (msg_ed25519_rshort): Revert the spelling
11070         fix.
11071
11072 2017-02-21  Werner Koch  <wk@gnupg.org>
11073
11074         dirmngr: Add special treatment for the standard hkps pool to ntbtls.
11075         + commit 831d014550863026dfefa774c961a21bd20c1e48
11076         * dirmngr/validate.h (VALIDATE_FLAG_SYSTRUST): Remove
11077         (VALIDATE_FLAG_EXTRATRUST): Remove
11078         (VALIDATE_FLAG_TRUST_SYSTEM): New.
11079         (VALIDATE_FLAG_TRUST_CONFIG): New.
11080         (VALIDATE_FLAG_TRUST_HKP): New.
11081         (VALIDATE_FLAG_TRUST_HKPSPOOL): New.
11082         (VALIDATE_FLAG_MASK_TRUST): New.
11083         * dirmngr/validate.c (check_header_constants): New.
11084         (validate_cert_chain): Call new function.  Simplify call to
11085         is_trusted_cert.
11086         * dirmngr/crlcache.c (crl_parse_insert): Pass
11087         VALIDATE_FLAG_TRUST_CONFIG to validate_cert_chain
11088         * dirmngr/server.c (cmd_validate): Use VALDIATE_FLAG_TRUST_SYSTEM and
11089         VALIDATE_FLAG_TRUST_CONFIG.
11090         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Check provided TLS
11091         context.  Set trustclass flags using the new VALIDATE_FLAG_TRUST
11092         values.
11093
11094         * dirmngr/certcache.c (cert_cache_init): Load the standard pool
11095         certificate prior to the --hkp-cacerts.
11096
11097         dirmngr: Load --hkp-cacert values into the certificate cache.
11098         + commit d1625a9a82b1e5d96bbbf2132c49c53108565ae1
11099         * dirmngr/dirmngr.c (hkp_cacert_filenames): New var.
11100         (parse_rereadable_options): Store filenames from --hkp-cacert in the
11101         new var.
11102         (main, dirmngr_sighup_action): Pass that var to cert_cache_init.
11103         * dirmngr/certcache.c (cert_cache_init): Add arg 'hkp_cacert' and load
11104         those certs.
11105         (load_certs_from_file): Use autodetect so that PEM and DER encodings
11106         are possible.
11107
11108         dirmngr: Load "sks-keyservers.netCA.pem" into the cache.
11109         + commit 9741aa24d9056b56cd5366ff5379bd8a3e6118df
11110         * dirmngr/certcache.c (load_certs_from_file): Always build this
11111         function.  Add args 'trustclasses' and 'no_error'.  Pass TRUSTCLASSES
11112         to put_cert.
11113         (load_certs_from_system): Pass CERTTRUST_CLASS_SYSTEM to
11114         load_certs_from_file.
11115         (cert_cache_init): Try to load "sks-keyservers.netCA.pem".  Don't make
11116         function fail in an out-of-core condition.
11117
11118         dirmngr: Implement trust classes for the cert cache.
11119         + commit 50b9828eacc39c1ca75cb8313db896e4bdc8b270
11120         * dirmngr/certcache.h (CERTTRUST_CLASS_SYSTEM): New.
11121         (CERTTRUST_CLASS_CONFIG): New.
11122         (CERTTRUST_CLASS_HKP): New.
11123         (CERTTRUST_CLASS_HKPSPOOL): New.
11124         * dirmngr/certcache.c (MAX_EXTRA_CACHED_CERTS): Rename to ...
11125         (MAX_NONPERM_CACHED_CERTS): this.
11126         (total_extra_certificates): Rename to ...
11127         (total_nonperm_certificates): this.
11128         (total_config_certificates): Remove.
11129         (total_trusted_certificates): Remove.
11130         (total_system_trusted_certificates): Remove.
11131         (cert_item_s): Remove field 'flags'.  Add fields 'permanent' and
11132         'trustclasses'.
11133         (clean_cache_slot): Clear new fields.
11134         (put_cert): Change for new cert_item_t structure.
11135         (load_certs_from_dir): Rename arg 'are_trusted' to 'trustclass'
11136         (load_certs_from_file): Use CERTTRUST_CLASS_ value for put_cert.
11137         (load_certs_from_w32_store): Ditto.
11138         (cert_cache_init): Ditto.
11139         (cert_cache_print_stats): Rewrite.
11140         (is_trusted_cert): Replace arg 'with_systrust' by 'trustclasses'.
11141         Chnage the test.
11142         * dirmngr/validate.c (allowed_ca): Pass CERTTRUST_CLASS_CONFIG to
11143         is_trusted_cert.
11144         (validate_cert_chain): Pass CERTTRUST_CLASS_ values to
11145         is_trusted_cert.
11146
11147         dirmngr: New Assuan option "http-crl".
11148         + commit 493c142e582ff5ef1b5fdfcb9653715ef43e83e9
11149         * dirmngr/dirmngr.h (server_control_s): New flag 'http_no_crl'.
11150         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Set this flag.
11151         * dirmngr/server.c (option_handler): New option "http-crl"
11152         * dirmngr/http.h (HTTP_FLAG_NO_CRL): New flag.
11153         * dirmngr/http-ntbtls.c (gnupg_http_tls_verify_cb): Consult this flag.
11154         * dirmngr/ks-engine-hkp.c (send_request): Set flag depending on CTRL.
11155         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
11156
11157         * dirmngr/t-http.c (main): New option --no-crl.
11158
11159         dirmngr: Add a magic field to the http structs.
11160         + commit 39c745038181edd097e188434b3f9c971ed3987f
11161         * dirmngr/http.c (HTTP_SESSION_MAGIC): New.
11162         (http_session_s): New field 'magic'.
11163         (HTTP_CONTEXT_MAGIC): New.
11164         (http_context_s): New field 'magic'.
11165         (my_ntbtls_verify_cb): Assert MAGIC.
11166         (fp_onclose_notification): Ditto.
11167         (session_unref): Ditto.  Reset MAGIC.
11168         (http_session_new): Set MAGIC.
11169         (http_open): Ditto.
11170         (http_raw_connect): Ditto.
11171         (http_close): Assert MAGIC.  Reset MAGIC.
11172
11173         * dirmngr/t-http.c (my_http_tls_verify_cb): MArk HTTP_FLAGS unused.
11174
11175 2017-02-21  NIIBE Yutaka  <gniibe@fsij.org>
11176
11177         g10: Support primary key generation by keygrip.
11178         + commit 3fc69224b7b22ad1df1395ebcb21549384839cd1
11179         * g10/keygen.c (para_name): Add pKEYGRIP.
11180         (generate_keypair): Use pKEYGRIP for key generation.
11181         (do_generate_keypair): Call do_create_from_keygrip with pKEYGRIP.
11182
11183 2017-02-20  Werner Koch  <wk@gnupg.org>
11184
11185         dirmngr: Setup a log handler for ntbtls.
11186         + commit a022baa4a487eec769411255a64088450c4c8a49
11187         * dirmngr/dirmngr.c (my_ntbtls_log_handler) [HTTP_USE_NTBTLS]: New.
11188         (main) [HTTP_USE_NTBTLS]: Register log handler.
11189
11190         common: New function log_logv_with_prefix.
11191         + commit 3e9512e557d95c7dc36835365b127b25f6a5cdd9
11192         * common/logging.c (do_logv): Add arg 'prefmt' and print it.  Chnage
11193         call callers to pass NULL.
11194         (log_logv_with_prefix): New.
11195
11196         dirmngr.c: Make http.c build without any TLS support.
11197         + commit e174893262d8de0f52faa8abe4fc0402719a35d8
11198         * dirmngr/http.c (http_session_new): Remove used of tls_prority.
11199
11200          dirmngr: Make t-http.c work again with gnutls - second try.
11201         + commit 81ea24b8637ac08e44e9e44816689413c2ae7e08
11202         * dirmngr/t-http.c: Always include ksba.h.
11203
11204         dirmngr: Make t-http.c work again with gnutls.
11205         + commit f923873863fd863d71349f20f5568f80aecc020b
11206         * dirmngr/Makefile.am (t_http_CFLAGS, t_http_LDADD): Add KSBA flags
11207         and libs.
11208
11209 2017-02-19  Werner Koch  <wk@gnupg.org>
11210
11211         dirmngr: First take on ntbtls cert verification.
11212         + commit 64fffd0ce2a4fd9cba152cf07497b585410cc652
11213         * dirmngr/http-ntbtls.c: New.
11214         * dirmngr/Makefile.am (dirmngr_SOURCES): Add file.
11215         * dirmngr/dirmngr.h (SERVER_CONTROL_MAGIC): New.
11216         (server_conrol_s): Add field 'magic',
11217         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Set MAGIC.
11218         (dirmngr_deinit_default_ctrl): Set MAGIC to deadbeef.
11219         * dirmngr/http.c (my_ntbtls_verify_cb): New.
11220         (http_session_new) [HTTP_USE_NTBTLS]: Remove all CA setting code.
11221         (send_request) [HTTP_USE_NTBTLS]: Set the verify callback.  Do not call
11222         the verify callback after the handshake.
11223         * dirmngr/ks-engine-hkp.c (send_request): Pass
11224         gnupg_http_tls_verify_cb to http_session_new.
11225         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
11226
11227         * dirmngr/t-http.c (my_http_tls_verify_cb): New.
11228         (main): Rename option --gnutls-debug to --tls-debug.
11229         (main) [HTTP_USE_NTBTLS]: Create a session.
11230
11231 2017-02-18  Werner Koch  <wk@gnupg.org>
11232
11233         dirmngr: Add per-session verify callback to http.c.
11234         + commit a74902cccde539ee2bd216caec0da6eb54b67c1b
11235         * dirmngr/http.h (http_verify_cb_t): New type.
11236         * dirmngr/http.c (http_session_s): Add fields flags, verify_cb, and
11237         verify_cb_value.
11238         (http_session_new): Remove arg tls_priority.  Add args verify_cb and
11239         verify-cb_value.  Store them in the session object.
11240         (send_request): Use per-session verify callback.
11241         (http_verify_server_credentials) [HTTP_USE_NTBTLS]: Return
11242         GPG_ERR_NOT_IMPLEMENTED.
11243         * dirmngr/ks-engine-hkp.c (send_request): Adjust for changed
11244         http_session_new.
11245         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
11246         * dirmngr/t-http.c (main): Ditto.
11247
11248         * dirmngr/server.c (do_get_cert_local): Replace xmalloc by malloc.
11249
11250 2017-02-17  Werner Koch  <wk@gnupg.org>
11251
11252         dirmngr: Strip the default https port from the Host: header.
11253         + commit cd32ebd152a522e362469ab969d91f8d49f28a60
11254         * dirmngr/http.c (send_request): Strip the default https port.
11255
11256         dirmngr: Add option --no-crl to the VALIDATE cmd.
11257         + commit f07811ee2c0a8044551e2ec063eda61cff7f6e39
11258         * dirmngr/validate.h: Remove enums VALIDATE_MODE_*.
11259         (VALIDATE_FLAG_SYSTRUST, VALIDATE_FLAG_EXTRATRUST)
11260         (VALIDATE_FLAG_CRL, VALIDATE_FLAG_RECURSIVE)
11261         (VALIDATE_FLAG_OCSP, VALIDATE_FLAG_TLS)
11262         (VALIDATE_FLAG_NOCRLCHECK): New constants.
11263         * dirmngr/validate.c (validate_cert_chain): Change arg 'mode' to
11264         'flags'.  Change code accordingly.  Remove NO-CRL in TLS mode kludge.
11265         * dirmngr/crlcache.c (crl_parse_insert): Change to use flag values for
11266         the validate_cert_chain call.
11267         * dirmngr/server.c (cmd_validate): Ditto.  Add new option --no-crl.
11268
11269         dirmngr: Add options --tls and --systrust to the VALIDATE cmd.
11270         + commit 070211eb990f5ea41271eba432b6a6b485cef7c7
11271         * dirmngr/certcache.h (certlist_s, certlist_t): New.
11272         * dirmngr/certcache.c (read_certlist_from_stream): New.
11273         (release_certlist): New.
11274         * dirmngr/server.c (MAX_CERTLIST_LENGTH): New.
11275         (cmd_validate): Add options --tls and --systrust.  Implement them
11276         using a kludge for now.
11277         * dirmngr/validate.c (validate_cert_chain): Support systrust
11278         checking.  Add kludge to disable the CRL checking for tls mode.
11279
11280         dirmngr: Remove use of hardcoded numbers in validate.
11281         + commit ed99af030d19305dd7cd41c41ac581306cb91fd5
11282         * dirmngr/validate.c (enum cert_usage_modes): New.
11283         (cert_usage_p): Change type of arg MODE.  Use enums instead of
11284         hardwired values.  Use a switch instead of tricky bit tests.
11285         (cert_use_cert_p, cert_use_ocsp_p, cert_use_crl_p): Adjust.
11286
11287         * dirmngr/validate.c (cert_usage_p): Rename to check_cert_usage.
11288         (cert_use_cert_p): Rename to check_cert_use_cert.
11289         (cert_use_ocsp_p): Rename to check_cert_use_ocsp.
11290         (cert_use_crl_p): Rename to check_cert_use_crl.
11291
11292         * dirmngr/validate.h (VALIDATE_MODE_CERT_SYSTRUST): New.
11293         (VALIDATE_MODE_TLS, VALIDATE_MODE_TLS_SYSTRUST): New.
11294
11295 2017-02-17  NIIBE Yutaka  <gniibe@fsij.org>
11296
11297         agent: No cards is not an error.
11298         + commit dea4b3c742acbd195d6ab12b279b4dda315f2582
11299         * agent/command-ssh.c (card_key_list): Care the case of no cards.
11300
11301         agent: Send back all public keys for available cards.
11302         + commit 3f4f64b6ac0d7160fd9e1301f95820894b219c3f
11303         * agent/call-scd.c (card_cardlist_cb, agent_card_cardlist): New.
11304         * agent/command-ssh.c (card_key_list): New.
11305         (ssh_handler_request_identities): Call card_key_list and loop for the
11306         list to send public keys for all available cards.
11307
11308 2017-02-17  Justus Winter  <justus@g10code.com>
11309
11310         gpgscm: Guard use of tagged expressions.
11311         + commit aab6ba0bb60528b9e816e430be51170cf39611b0
11312         * tests/gpgscm/init.scm (vm-history-print): Check that the tag added
11313         to expressions when parsing source files matches the expected format.
11314         * tests/gpgscm/lib.scm (assert): Likewise.
11315
11316 2017-02-17  NIIBE Yutaka  <gniibe@fsij.org>
11317
11318         scd: Fix RESET command handling (more).
11319         + commit 99d4dfe83661d05ef3a20ed04e6cec5647536738
11320         * scd/app-common.h (struct app_ctx_s): Add reset_requested.
11321         * scd/app.c (app_reset): Locking APP, set reset_requested.
11322         (deallocate_app): Release the lock.
11323         (release_application): Add LOCKED_ALREADY argument.
11324         (scd_update_reader_status_file): Hold the lock when accessing APP.
11325         When reset_requested is set, close the reader and deallocate APP.
11326         * scd/command.c (open_card_with_request, cmd_restart): Follow the
11327         change of release_application.
11328         (send_client_notifications): Here it calls release_application holding
11329         the lock.
11330
11331 2017-02-16  Werner Koch  <wk@gnupg.org>
11332
11333         dirmngr,w32: Load all system provided certificates.
11334         + commit 7006352da773d82c47797bbf11e570ecafac6501
11335         * dirmngr/certcache.c (CERTOPENSYSTEMSTORE) [W32]: New type.
11336         (CERTENUMCERTIFICATESINSTORE) [W32]: New type.
11337         (CERTCLOSESTORE) [W32]: New type.
11338         (load_certs_from_file) [W32]: Do not build.
11339         (load_certs_from_w32_store) [W32]: New.
11340         (load_certs_from_system) [W32]: Call new function.
11341
11342         dirmngr: Load all system provided certificates.
11343         + commit 9a1a5ca0bc2cfb17ccf632de3e134b6d789c6855
11344         * configure.ac: Add option --default-trust-store.
11345         (DEFAULT_TRUST_STORE_FILE): New ac_define.
11346         * dirmngr/certcache.c: Include ksba-io-support.h.
11347         (total_trusted_certificates, total_system_trusted_certificates): New.
11348         (put_cert): Manage the new counters.
11349         (cert_cache_deinit): Reset them.
11350         (cert_cache_print_stats): Print them.
11351         (is_trusted_cert): Add arg WITH_SYSTRUST.  Change all callers to pass
11352         false.
11353         (load_certs_from_file): New.
11354         (load_certs_from_system): New.
11355         (cert_cache_init): Load system certificates.
11356
11357         common: Rename remaining symbols in ksba-io-support.
11358         + commit e1dfd862367cf91b66abe86bd73664409354bb14
11359         * common/ksba-io-support.c (gpgsm_reader_eof_seen): Rename to ...
11360         (gnupg_ksba_reader_eof_seen): this.  Change all callers.
11361         (gpgsm_destroy_reader): Rename to ...
11362         (gnupg_ksba_destroy_reader): this.  Change all callers.
11363         (gpgsm_finish_writer): Rename to ...
11364         (gnupg_ksba_finish_writer): this.  Change all callers.
11365         (gpgsm_destroy_writer): Rename to ...
11366         (gnupg_ksba_destroy_writer): this.  Change all callers.
11367         * common/ksba-io-support.c (struct base64_context_s): Rename to ...
11368         (gnupg_ksba_io_s): this.
11369         * common/ksba-io-support.h (base64_context_s): Ditto.
11370         (Base64Context): Rename this typedef to ...
11371         (gnupg_ksba_io_t): this.  Change all users.
11372
11373         common: Remove gpgsm dependencies from ksba-io-support.
11374         + commit 28c31524be84f20b34573c78bd3a94a81e4b1d61
11375         * common/ksba-io-support.c: Include ksba-io-support.h instead of
11376         ../sm/gpgsm.h.  Include util.h.
11377         (writer_cb_parm_s): Remove const from 'pem_name'.
11378         (gpgsm_destroy_writer): Free 'pem_name'.
11379         (gpgsm_create_reader): Rename to ...
11380         (gnupg_ksba_create_reader): this.  Replace args CTRL and
11381         ALLOW_MULTI_PEM by a new arg FLAGS.  Change the code to evaluate
11382         FLAGS.  Change all callers to pass the FLAGS.
11383         (gpgsm_create_writer): Rename to ...
11384         (gnupg_ksba_create_writer): this.  Replace arg CTRL by new arg FLAGS.
11385         Add arg PEM_NAME.  Evaluate FLAGS.  Store a copy of PEM_NAME.  Change
11386         all callers to pass the FLAGS and PEM_NAME.
11387
11388         common: Change license of ksba-io-support.c.
11389         + commit 919e76b407ac557b0f518ec03f3cc59e9e5740c9
11390         * common/ksba-io-support.c: Change from GPLv3+ to LGPLv3+/GPLv2+.
11391
11392         sm,common: Move ksba reader and writer support to common/.
11393         + commit 04bfa6fe6597b8ffcec61cbcacdc7eb137444e80
11394         * sm/base64.c: Rename to ...
11395         * common/ksba-io-support.c: this.
11396         * common/ksba-io-support.h: New.
11397         * common/Makefile.am (common_sources): Add new files.
11398         * sm/Makefile.am (gpgsm_SOURCES): Remove base64.c
11399
11400         dirmngr: Prepare certcache for forthcoming changes.
11401         + commit 5c4e67afd6385b48065de6a0f2dd0bfd936ab90b
11402         * dirmngr/certcache.c (cert_item_s): Rename 'flags.loaded' to
11403         'flags.config'.  Add 'flags.systrust'.
11404         (total_loaded_certificates): Rename to total_config_certificates.
11405         (put_cert): Rename args for clarity.  Set SYSTRUST flag.
11406         (load_certs_from_dir): Make sure put_cert does not set the SYSTRUST
11407         flag.
11408
11409         dirmngr: Replace stpcpy chains by strconcat.
11410         + commit aef60abe6a1772e18634984a94bd70f57d57ccdd
11411         * dirmngr/certcache.c (find_cert_bysn): Use strconcat.
11412         (find_cert_bysubject): Ditto.
11413         * dirmngr/http.c (store_header): Ditto.
11414         * dirmngr/ldap.c (make_url): Ditto.
11415         * dirmngr/server.c (get_cert_local_ski): Ditto.
11416         (do_get_cert_local): Use xstrconcat.
11417
11418 2017-02-16  NIIBE Yutaka  <gniibe@fsij.org>
11419
11420         scd: Minor fixes to silence compiler warnings.
11421         + commit 7a666ccb44f43c4efbaa51c1ca16fc0b37c3399d
11422         * scd/app.c (app_reset): Initialize ERR.
11423         * scd/scdaemon.c (scd_kick_the_loop, handle_connections): Catch the
11424         return value.
11425
11426 2017-02-15  Werner Koch  <wk@gnupg.org>
11427
11428         libdns: Workaround for bracketed numerical addresses.
11429         + commit a3509e12b6626a585ce7da6ceed8cfddcba2460f
11430         * dirmngr/dns-stuff.c (resolve_name_libdns): Work around an
11431         incompatibility between the glibc resolver and libdns.
11432
11433         dirmngr: Do PTR lookups only for 'keyserver --hosttable'.
11434         + commit a75325faf163275674a91971e75f1018035ca348
11435         * dirmngr/ks-engine-hkp.c (hostinfo_s): Remove fields v4addr and
11436         v5addr and add fields iporname and iporname_valid.
11437         (create_new_hostinfo): Clear them.
11438         (add_host): Remove the code to set the v4addr and v6addr fields.
11439         (ks_hkp_print_hosttable): Remove printing of the fields.  Compute the
11440         iporname field and display it.
11441         (ks_hkp_reload): Force re-computing of the iporname field in
11442         ks_hkp_print_hosttable.
11443
11444         dirmngr: Avoid PTR lookup for hosts in a pool.
11445         + commit da2ba20868093e3054d18adc2b1bc56cb23e4ba7
11446         * dirmngr/ks-engine-hkp.c (add_host): Don't to a PTR lookup for hosts
11447         in a pool.
11448
11449 2017-02-15  Justus Winter  <justus@g10code.com>
11450
11451         tests,build: Fix distcheck.
11452         + commit 2f7b6cb279ea0ee27364fbb2b12df47e76166a39
11453         * tests/gpgscm/Makefile.am (EXTRA_DIST): Add 'time.scm'.
11454
11455         tests: Test and document other ways to create keys.
11456         + commit 90d383f1eb07fc823518dea10eb15ca390f5cf8e
11457         * doc/gpg.texi: Clarify usage and expiration arguments for key
11458         generation.
11459         * tests/openpgp/quick-key-manipulation.scm: Test all variants.
11460
11461         tests: Check expiration times of created keys.
11462         + commit 127e1e532da4083ccd3c307555b6177fab16f408
11463         * tests/gpgscm/ffi.c (do_get_time): New function.
11464         (ffi_init): Expose new function.
11465         * tests/gpgscm/ffi.scm (get-time): Document new function.
11466         * tests/gpgscm/time.scm: New file.
11467         * tests/openpgp/quick-key-manipulation.scm: Use the new facilities to
11468         check the expiration times of created keys.
11469         * tests/openpgp/tofu.scm: Use the new module.
11470
11471 2017-02-15  NIIBE Yutaka  <gniibe@fsij.org>
11472
11473         scd: Fix RESET command handling.
11474         + commit e2792813a55e091c51be7b1b089a71beb6466f1d
11475         * scd/app.c (release_application_internal): Remove.
11476         (release_application): Merge release_application_internal.
11477         (app_reset): Kick the loop and let close the reader.  Sleep is
11478         required here to wait closing.
11479         (scd_update_reader_status_file): When APP is no use, close it.
11480
11481 2017-02-14  Werner Koch  <wk@gnupg.org>
11482
11483         gpg: Make --export-ssh-key work for the primary key.
11484         + commit b456e5be91dc064fc9509ea86edab113721ed299
11485         * g10/export.c (export_ssh_key): Also check the primary key.
11486
11487 2017-02-13  Werner Koch  <wk@gnupg.org>
11488
11489         dirmngr: Do a DNS lookup even if it is missing from nsswitch.conf.
11490         + commit dee026d761ae3d7594c3dbc5b3fa842df53cc189
11491         * dirmngr/dns-stuff.c (libdns_init): Do not print error message for a
11492         missing nsswitch.conf.  Make sure that tehre is a DNS entry.
11493
11494         gpgconf: No ENOENT warning with --change-options et al.
11495         + commit 30dac0486b6357e84fbe79c612eea940b654e4d1
11496         * tools/gpgconf-comp.c (retrieve_options_from_program): Check ERRNO
11497         before printing a warning.
11498
11499         gpg: Print a warning if no command has been given.
11500         + commit 810adfd47801fc01e45fb71af9f05c91f7890cdb
11501         * g10/gpg.c (main): Print in the default case.
11502
11503 2017-02-13  Justus Winter  <justus@g10code.com>
11504
11505         g13: Fix build on macOS.
11506         + commit f8ce31a7bf1ee85e5010b628a66e6f69486e5213
11507         * g13/Makefile.am (t_common_ldadd): Add iconv.
11508
11509 2017-02-13  NIIBE Yutaka  <gniibe@fsij.org>
11510
11511         scd: Fix use case of PC/SC.
11512         + commit da4c132cca2c6df81243c9660b7348268a848f88
11513         * scd/apdu.c (apdu_open_reader): Add an argument APP_EMPTY.
11514         When CCID driver fails to open, try PC/SC if APP is nothing.
11515         * scd/app.c (select_application): Supply arg if APP is nothing.
11516
11517 2017-02-10  Werner Koch  <wk@gnupg.org>
11518
11519         gpg: Fix memory leak in the error case of signature creation.
11520         + commit 5996c7bf99f3a681393fd9589276399ebc956cff
11521         * g10/sign.c (write_signature_packets): Free SIG.  Also replace
11522         xcalloc by xtrycalloc.
11523
11524 2017-02-08  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11525
11526         common: Avoid warning about implicit declaration of gnupg_fd_valid.
11527         + commit 8810314e377a9cb6612150a57cf99260ed0bb9f6
11528         * common/logging.c: Add #include "sysutils.h".
11529
11530 2017-02-08  Justus Winter  <justus@g10code.com>
11531
11532         gpg,common: Make sure that all fd given are valid.
11533         + commit 6823ed46584e753de3aba48a00ab738ab009a860
11534         * common/sysutils.c (gnupg_fd_valid): New function.
11535         * common/sysutils.h (gnupg_fd_valid): New declaration.
11536         * common/logging.c (log_set_file): Use the new function.
11537         * g10/cpr.c (set_status_fd): Likewise.
11538         * g10/gpg.c (main): Likewise.
11539         * g10/keylist.c (read_sessionkey_from_fd): Likewise.
11540         * g10/passphrase.c (set_attrib_fd): Likewise.
11541         * tests/openpgp/Makefile.am (XTESTS): Add the new test.
11542         * tests/openpgp/issue2941.scm: New file.
11543
11544 2017-02-07  Justus Winter  <justus@g10code.com>
11545
11546         tests: Skip key types not supported by OpenSSH.
11547         + commit 56aa85f88f6b35fb03a2dc1a95882d49a74290e3
11548         * tests/openpgp/ssh-import.scm (path): New variable.
11549         (ssh,ssh-keygen,ssh-version,ssh-supports?): Likewise.
11550
11551 2017-02-07  Werner Koch  <wk@gnupg.org>
11552
11553         wks: Add WKS-Phase headers to the server messages.
11554         + commit b30ac663cec82c89ca9a3e87e65b36d2552f1533
11555         * tools/gpg-wks-server.c (send_confirmation_request): Add custom
11556         header.
11557         (send_congratulation_message): Ditto.
11558
11559 2017-02-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11560
11561         po: Manual updates of nl translation.
11562         + commit aa3f08794bfc809821e2fc30a09a5ae23925c645
11563         * po/nl.po: Apply several minor manual cleanups to nl.po that were
11564         previously applied to all the other localizations.
11565
11566         po: Copied missing nl.po translation from the 2.0 branch.
11567         + commit 8a9d4b55b09d04482b46055f0a60f01b86738df3
11568         * po/nl.po: Copy from 2.0 branch.
11569
11570         gpg: Fix aliases --list-key, --list-sig, and --check-sig.
11571         + commit f31120a5aa40b6e4e89d41d1d5d34e0f7da173b4
11572         * g10/gpg.c (opts): Define commands with ARGPARSE_c
11573         instead of ARGPARSE_s_n.
11574
11575 2017-02-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
11576
11577         doc: Clarify abbreviation of --help.
11578         + commit f2b276dffbe2435b17abf2b3c51684d3636f3f11
11579         * doc/gpg.texi: clarify abbreviation of --help.
11580
11581 2017-02-03  Werner Koch  <wk@gnupg.org>
11582
11583         agent: Tell pinentry the hostname the agent is running on.
11584         + commit 042fe711c76f6377cedb8f83a73ba386cee34bb7
11585         * agent/call-pinentry.c [!W32]: Incluse utsname.h
11586         (start_pinentry): Pass nodename to OPTION/owner.
11587
11588         agent: Tell the Pinentry the client's pid.
11589         + commit 309f464a5952c7d7504b875bf4853914b1242346
11590         * configure.ac: Check for SO_PEERCRED et al.
11591         * agent/agent.h (server_control_s): Add field 'client_pid'.
11592         * agent/command.c (start_command_handler): Set CLIENT_PID.
11593         * agent/command-ssh.c (get_client_pid): New.
11594         (start_command_handler_ssh): Set CLIENT_PID.
11595         * agent/call-pinentry.c (start_pinentry): Tell Pinentry the client-pid.
11596
11597         gpg: More diagnostics for a launched pinentry.
11598         + commit 7052a0d77cf8f3a445b252a809d29be445788625
11599         * agent/call-pinentry.c (start_pinentry): Call getinfo/ttyinfo.
11600         * g10/server.c (gpg_proxy_pinentry_notify): Simplify the output so
11601         that we do not change the code when adding new fields to
11602         PINENTRY_LAUNCHED.
11603
11604 2017-02-02  Neal H. Walfield  <neal@g10code.com>
11605
11606         gpg: Don't assume that strtoul interprets "" as 0.
11607         + commit 407f5f9baea5591f148974240a87dfb43e5efef3
11608         * g10/tofu.c (show_statistics): If there are not records, return 0
11609         instead of NULL.
11610
11611         tests: Improve description of test.
11612         + commit 64be8e1e8607944687f3ae45ec64aa30bf4fdf6f
11613         * tests/openpgp/issue2929.scm: Improve description of test.
11614
11615         Revert "Revert "tests: Add test demonstrating issue2929.""
11616         + commit e596b21f4b78dd27489e677699cc4ba648051b3f
11617         This reverts commit 59048b0f1aa77313573a1004cd3a9f02692a7521.
11618
11619         gpg: Ensure TOFU bindings associated with UTKs are registered as usual.
11620         + commit 769272ba87f282a69e8d5f9bb27c86e6bec4496b
11621         * g10/tofu.c (get_trust): Call get_policy before short-circuiting the
11622         policy lookup for ultimately trusted keys to make sure the binding is
11623         added to the bindings table, if necessary.
11624
11625         gpg: If there is a TOFU conflict, elide the too few message warning.
11626         + commit a08c781739e7561093f32b732c4991f2bd817ec2
11627         * g10/tofu.c (tofu_get_validity): If there was a conflict, don't also
11628         print out a warning about too few messages.
11629
11630         gpg: Only print out TOFU statistics for conflicts in interactive mode.
11631         + commit 027b81b35fe36692005b8dba22d9eb2db05e8c80
11632         * g10/tofu.c (get_trust): Add arguments POLICYP and CONFLICT_SETP.  If
11633         they are not NULL, return the policy and conflict set (if there is
11634         one), respectively.  Update callers.  If MAY_ASK is FALSE, don't print
11635         out the statistics.
11636         (tofu_register_encryption): If there is a conflict and we haven't yet
11637         printed the statistics about the conflicting bindings, do so now.
11638         (tofu_get_validity): Likewise.
11639
11640         gpg: Add newline to output.
11641         + commit 74268180e5a3acc827f3a369f1fe5971f3bbe285
11642         * g10/tofu.c (ask_about_binding): Add newline to output.
11643
11644         gpg: Remove period at end of warning.
11645         + commit 6f9d8a956b2ca0f5a0eb7acc656fc17af2f2de47
11646         * g10/tofu.c (tofu_register_encryption): Remove period at end of
11647         warning.
11648
11649 2017-02-01  Werner Koch  <wk@gnupg.org>
11650
11651         dirmngr: New option --no-use-tor and internal changes.
11652         + commit 7440119e729d3fdedda8a9b44b70f8959beea8d7
11653         * dirmngr/dns-stuff.c (disable_dns_tormode): New.
11654         * dirmngr/dirmngr.c (oNoUseTor): New const.
11655         (opts): New option --no-use-tor.
11656         (tor_mode): New var.
11657         (parse_rereadable_options): Change to use TOR_MODE.
11658         (dirmngr_use_tor): New.
11659         (set_tor_mode): Call disable_dns_tormode.  Implement oNoUseTor.
11660         * dirmngr/dirmngr.h (opt): Remove field 'use_tor'.  Replace all
11661         references by a call to dirmngr_use_tor().
11662         * dirmngr/server.c (cmd_getinfo): Distinguish between default and
11663         enforced TOR_MODE.
11664
11665 2017-02-01  NIIBE Yutaka  <gniibe@fsij.org>
11666
11667         scd: Fix regression tracking the connection count.
11668         + commit 8ddc9268f6aedef0e178b174b89245c33d8189dd
11669         * scd/scdaemon.c (get_active_connection_count): New.
11670         (start_connection_thread): Bump ACTIVE_CONNECTIONS up and down.
11671         * scd/command.c (cmd_getinfo): Add subcommand "connections".
11672
11673 2017-01-31  Justus Winter  <justus@g10code.com>
11674
11675         gpgscm: Tune the hash tables.
11676         + commit 2e78aa6ff770849415f8eb71ca70c8886e9564c8
11677         * tests/gpgscm/scheme.c (oblist_initial_value): Increase the size of
11678         the hash table based on the number of symbols used after initializing
11679         the interpreter.
11680         (new_frame_in_env): Increase the size of the hash table based on the
11681         number of variables in the global environement.
11682
11683         gpgscm: Optimize environment lookups and insertions.
11684         + commit b85d509a8f5c2e6200b8051ca1593c019abce90b
11685         * tests/gpgscm/scheme.c (pointercmp): New function.
11686         (new_slot_spec_in_env): Add and use slot for insertions.
11687         (find_slot_spec_in_env): New variant of 'find_slot_in_env' that
11688         returns the slot on failures.
11689         (find_slot_in_env): Express using the new function.
11690         (new_slot_in_env): Update callsite.
11691         (opexe_0): Optimize lookup-or-insert.
11692         (opexe_1): Likewise.
11693         (scheme_define): Likewise.
11694
11695         gpgscm: Fix build with list environments.
11696         + commit 874424ee3cc795eae9972b6259a2cc4dcdbb868e
11697         * tests/gpgscm/scheme.c (new_slot_spec_in_env): Provide preallocation
11698         inforomation if USE_ALIST_ENV.
11699
11700         gpgscm: Optimize symbol lookups and insertions.
11701         + commit cea6d114b60deaecfbc2eb1aedbdfb7e6700922f
11702         * tests/gpgscm/scheme.c (oblist_find_by_name): Keep the list of
11703         symbols sorted, return the slot where a new symbol must be inserted on
11704         lookup failures.
11705         (oblist_add_by_name): Add the new symbol at the given slot.
11706         (mk_symbol): Adjust callsite.
11707         (gensym): Likewise.
11708         (assign_syntax): Likewise.
11709
11710         gpgscm: Fix build with object list.
11711         + commit 8f0ecb16cbb3798ad18be5f05b826db2aa1aaa00
11712         * tests/gpgscm/scheme.c (oblist_add_by_name): Provide preallocation
11713         information if USE_OBJECT_LIST.
11714
11715         gpgscm: Remove unused functions.
11716         + commit 2076cdaf6b93bc73223819895cc7a67323d8cee7
11717         * tests/gpgscm/scheme.c (check_cell_alloced): Remove function.
11718         (check_range_alloced): Likewise.
11719
11720 2017-01-31  Werner Koch  <wk@gnupg.org>
11721
11722         dirmngr: Require --allow-version-check even if --use-tor is used.
11723         + commit b0e8376e19072ec3c590273c69ab3e8e5edfdaca
11724         * dirmngr/dirmngr.c (housekeeping_thread): Load swdb only if the
11725         option is set.
11726
11727 2017-01-31  NIIBE Yutaka  <gniibe@fsij.org>
11728
11729         scd: Remove --debug-disable-ticker option.
11730         + commit e17fa5c75d76af4d4684ee810cb446ecd5110560
11731         * scd/scdaemon.c (ticker_disabled): Remove.
11732         (handle_tick, need_tick): Remove.
11733         (handle_connections): Don't check ticker_disabled.
11734
11735         scd: Fix SERIALNO for multiple devices.
11736         + commit f08d37af049bf1718b301644020658dd2bb07638
11737         * scd/app.c (select_application): Fix the logic if periodical check is
11738         needed.  If it is needed for newly found device(s), kick the loop.
11739         (scd_update_reader_status_file): Return value if select(2) should be
11740         called with timeout.
11741         * scd/ccid-driver.c (ccid_require_get_status): Don't return 0 for
11742         token with no interrupt transfer for now.
11743         * scd/command.c (open_card_with_request): Fix scan by SERIALNO.
11744         * scd/scdaemon.c (update_usb): Remove.
11745         (handle_connections): Evaluate need_tick after handle_tick.
11746
11747 2017-01-30  Justus Winter  <justus@g10code.com>
11748
11749         gpgscm: Use a compact vector representation.
11750         + commit 49e2ae65e892f93be7f87cfaae3392b50a99e4b1
11751         * tests/gpgscm/scheme-private.h (struct cell): Add a compact vector
11752         representation.
11753         * tests/gpgscm/scheme.c (vector_length): Use new representation.
11754         (vector_size): New macro.
11755         (get_vector_object): Use the new representation.
11756         (fill_vector): Likewise.
11757         (vector_elem): Likewise.
11758         (set_vector_elem): Likewise.
11759         (mark): Likewise.
11760         (gc): Likewise.  Be careful not to confuse immediate values for type
11761         flags.
11762         (finalize_cell): Vectors now require finalization.
11763
11764         gpgscm: Provide framework for immediate values.
11765         + commit e343984fc50e87830905614dc87f83f810551ad1
11766         * tests/gpgscm/scheme.c (IMMEDIATE_TAG): New macro.
11767         ({is,set,clr}_immediate): Likewise.
11768         (enum scheme_types): Make type tags disjoint from immediate values.
11769         (TYPE_BITS): We need one more bit now.
11770         (ADJ,T_MASKTYPE): Compute values.
11771
11772         gpgscm: Fix setting the line of the first gc reservation.
11773         + commit d27a4435bd8c0f0971d51ddf454422fc77d48271
11774         * tests/gpgscm/scheme.c (_gc_disable): Negate guard.
11775
11776         gpgscm: Introduce macro for the vector length.
11777         + commit 489edf84c9a9c2122cef1b4e678154521525b54a
11778         * tests/gpgscm/scheme.c (vector_length): New macro.
11779         (get_vector_object): Use the new macro.
11780         (oblist_add_by_name): Likewise.
11781         (oblist_find_by_name): Likewise.
11782         (oblist_all_symbols): Likewise.
11783         (mk_vector): Likewise.
11784         (mark): Likewise.
11785         (new_slot_spec_in_env): Likewise.
11786         (find_slot_spec_in_env): Likewise.
11787         (opexe_2): Likewise.
11788         (opexe_5): Likewise.
11789
11790         Revert "tests: Add test demonstrating issue2929."
11791         + commit 59048b0f1aa77313573a1004cd3a9f02692a7521
11792         This reverts commit 5aafa56dffefe3fac55b9d0555c7c86e8a07f072.
11793
11794 2017-01-30  NIIBE Yutaka  <gniibe@fsij.org>
11795
11796         scd: Fix GetSlotStatus.
11797         + commit 2a025039c1817c7f75c35a898884849a8e5dc926
11798         * scd/apdu.c (get_status_reader): Add ON_WIRE arg, here.
11799         (ct_get_status, pcsc_get_status_direct, pcsc_get_status_wrapped)
11800         (pcsc_get_status, get_status_ccid, my_rapdu_get_status): Likewise.
11801         (reset_pcsc_reader_wrapped, open_pcsc_reader_wrapped): Follow the
11802         change.
11803         (apdu_get_status_internal): It's lower-level driver which judge
11804         it's not needed.  Otherwise, it can't detect the removal.
11805         * scd/ccid-driver.c (ccid_slot_status): After the POWERED_OFF check,
11806         we can skip sending GetSlotStatus packet on wire, when no need.
11807
11808         scd: Don't send GET_STATUS packet if not needed.
11809         + commit 7c8eee4d396a751d41fd1ee1e1b87b851fca172a
11810         * scd/apdu.c (apdu_get_status_internal): Add ON_WIRE arg.
11811         (apdu_connect): Call apdu_get_status_internal with ON_WIRE enabled.
11812         (apdu_get_status): For periodical check, call apdu_get_status_internal
11813         with ON_WIRE disabled.
11814
11815         scd: Fix cancel INTERRUPT transfer.
11816         + commit 216afba0d99582d0fbae1d6e925f4ddb349d9de3
11817         * scd/ccid-driver.c (do_close_reader): Don't lock events, but check the
11818         return value of libusb_cancel_transfer.
11819
11820 2017-01-27  NIIBE Yutaka  <gniibe@fsij.org>
11821
11822         scd: More changes on watching removal of card/reader.
11823         + commit f3d9b2582bcaa1936b4fed5ec42a889b02df2f42
11824         * scd/app-common.h (struct app_ctx_s): Rename field to
11825         periodical_check_needed.
11826         * scd/scdaemon.c (update_usb): Rename from update_fdset_for_usb.
11827         Don't use libusb_get_pollfds any more.
11828         (scd_kick_the_loop): New.
11829         (need_tick): Follow the rename.
11830         (handle_connections): No libusb event handling here.
11831         * scd/app.c (app_new_register): Follow the change of rename.
11832         (select_application, scd_update_reader_status_file): Likewise.
11833         * scd/ccid-driver.c (ccid_usb_thread_is_alive): New.
11834         (intr_cb): Call scd_kick_the_loop.
11835         (ccid_usb_thread): New.  Thread to invoke INTERRUPT callback.
11836         (ccid_open_usb_reader): Add thread invocation.
11837         (ccid_require_get_status): Remove
11838         LIBUSB_WORKS_EXPECTED_FOR_INTERRUPT_ENDP.
11839         (do_close_reader): Carefully handle handle->transfer.
11840         (get_escaped_usb_string): Insert npth_unprotect/npth_protect.
11841         (do_close_reader, bulk_out, bulk_in, abort_cmd, ccid_slot_status)
11842         (ccid_transceive, ccid_transceive_secure): Likewise.
11843
11844         scd: Fix release of transfer object.
11845         + commit f92fe33f11c44f14fd31682259fcd231e8fa9e75
11846         * scd/ccid-driver.c (intr_cb): Handle LIBUSB_TRANSFER_CANCELLED.
11847         (do_close_reader): When callback is active, call
11848         libusb_cancel_transfer and wait callback is fired off.
11849
11850         scd: Improve watching USB device removal.
11851         + commit 25cc8575da9a9b8bf60c64c8059cb5f73cc52e1d
11852         * scd/apdu.c(struct reader_table_s): Add require_get_status.
11853         (apdu_connect): Change return value meaning.  Call apdu_reset here.
11854         * scd/app.c (app_new_register): Add require_get_status.
11855         (select_application): Use the return value of apdu_connect.
11856         (scd_update_reader_status_file): Call update_fdset_for_usb with
11857         checking all_have_intr_endp.
11858         (app_list_start, app_list_finish): Remove.
11859         * scd/ccid-driver.c (struct ccid_driver_s): Add transfer.
11860         (intr_cb): Don't call libusb_transfer in this callback.
11861         (ccid_require_get_status): New.
11862         (do_close_reader): Call libusb_transfer here.
11863         * scd/scdaemon.c (update_fdset_for_usb): Remove the first argument.
11864
11865         scd: Wake up the select when new USB scan.
11866         + commit 031e3fa7b9a6770a4de1a184555250feeba0d26f
11867         * scd/scdaemon.c (update_fdset_for_usb): Wake up the select(2).
11868         (handle_connections): Use a kind of "self-pipe" technique.
11869
11870 2017-01-26  NIIBE Yutaka  <gniibe@fsij.org>
11871
11872         scd: Only submit apdu_get_status when needed.
11873         + commit 881dcdfd84ebad36bff20c895e629025bed9d94e
11874         * scd/apdu.c (apdu_dev_list_finish): Return Boolean value if
11875         all device support INTERRUPT transfer.
11876         * scd/ccid-driver.c (ccid_dev_scan_finish): Likewise.
11877         * scd/app.c (app_new_register): Fix initial value of card_status.
11878         (select_application): Call update_fdset_for_usb.
11879         (scd_update_reader_status_file): Ditto.
11880         * scd/scdaemon.c (update_fdset_for_usb, need_tick): New.
11881         (handle_connections): Call handle_tick when select returns.
11882         Let select watch USB file descriptors, too.
11883         Call libusb_handle_events_timeout_completed for INTERRUPT transfer.
11884
11885         scd: Fix APP reference counting.
11886         + commit 9b06633c811e8815c07d744f20b45405cb082367
11887         * scd/app.c (scd_update_reader_status_file): Don't call another
11888         release_application_internal.
11889         * scd/command.c (open_card_with_request): Don't require APPTYPE !=
11890         NULL.
11891
11892         scd: Add INTERRUPT endp support to CCID driver.
11893         + commit bb5ceb78c333129a44c0144f2cf49b17ede898f1
11894         * scd/app.c (scd_update_reader_status_file): Fix releas of APP.
11895         * scd/ccid-driver.c (struct ccid_driver_s): Add INTR_BUF.
11896         (intr_cb, ccid_setup_intr): New.
11897         (ccid_open_usb_reader): Call ccid_setup_intr.
11898         (ccid_slot_status): Return CCID_DRIVER_ERR_NO_READER when removed.
11899
11900 2017-01-25  Justus Winter  <justus@g10code.com>
11901
11902         gpg: Fix searching for mail addresses in keyrings.
11903         + commit 3f4f20ee6eff052c88647b820d9ecfdbd8df0f40
11904         * g10/keyring.c (compare_name): Fix KEYDB_SEARCH_MODE_MAIL* searches
11905         in keyrings when the UID is a plain addr-spec.
11906
11907         tests,w32: Fix GPGME tests requiring a pinentry.
11908         + commit 02a39f0d1ed717f6fc33392e6ce4ab421c3bcbba
11909         * tests/gpgme/gpgme-defs.scm: Use our fake pinentry, and configure it
11910         to supply the correct passphrase.
11911
11912         tests,w32: Fix gpgsm signature verification test.
11913         + commit 7d5a0ed792133d875fcedb6e23a9a3682f1a23f9
11914         * tests/gpgsm/verify.scm: Use 'call-with-binary-output-file' to avoid
11915         automatic line-ending conversion.
11916
11917         agent: Fix double free.
11918         + commit e175152ef7515921635bf1e00383e812668d13fc
11919         * agent/cache.c (agent_store_cache_hit): Make sure the update is
11920         atomic.
11921
11922         tests: Skip GPGME tests that are not built.
11923         + commit 5f2da5d439debf44615a97de788d8f720b517972
11924         * tests/gpgme/wrap.scm: Skip tests that are not built.
11925
11926         tests,w32: Fix locating GPGME's tests on Windows.
11927         + commit 6ecd8b3e71632bbcca524ad735c83bdc2a4c4a4a
11928         * tests/gpgme/run-tests.scm: Qualify the test with the executable
11929         extension.
11930
11931 2017-01-24  Werner Koch  <wk@gnupg.org>
11932
11933         gpg: Print a warning on Tor problems.
11934         + commit 770b75a746836773909af25ccb9b480e61cea677
11935         * dirmngr/ks-engine-hkp.c (tor_not_running_p): New.
11936         (map_host): Call that to print a warning.
11937         (handle_send_request_error): Ditto and avoid marking the host dead.
11938         Also print a tor_config_problem warning.  Add arg CTRL; adjust callers
11939         to pass that new arg.
11940         * g10/call-dirmngr.c (ks_status_cb): Detect and print the new
11941         warnings.
11942
11943         dirmngr: Simplify error returning inside http.c.
11944         + commit 51e5a5e5a46279809848b4ab4419f35045336010
11945         * dirmngr/http.c (connect_server): Change to return an gpg_error_t
11946         and to store socket at the passed address.
11947         (http_raw_connect, send_request): Adjust accordingly.
11948
11949         dirmngr: New option --disable-ipv4.
11950         + commit 72736af86a501592d974d46ff754a63959e183bd
11951         * dirmngr/dirmngr.c (oDisableIPv4): New const.
11952         (opts): New option --disable-ipv4.
11953         (parse_rereadable_options): Set that option.
11954         * dirmngr/dirmngr.h (opt): New field 'disable_ipv4'.
11955         * dirmngr/dns-stuff.c (opt_disable_ipv4): bew var.
11956         (set_dns_disable_ipv4): New.
11957         (resolve_name_standard): Skip v4 addresses when OPT_DISABLE_IPV4 is
11958         set.
11959         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
11960         (send_request): Pass HTTP_FLAG_IGNORE_IPv4 if opt.disable_v4 is set.
11961         * dirmngr/crlfetch.c (crl_fetch): Ditto.
11962         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Ditto.
11963         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
11964         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
11965
11966 2017-01-24  Justus Winter  <justus@g10code.com>
11967
11968         tools: Use platform abstraction for I/O.
11969         + commit 73d6572bd0f260c5aa1e191a1ba4859ec6fa262c
11970         * tools/gpg-connect-agent.c (main): Use a gpgrt_stream_t for
11971         'script_fp'.  Adapt accordingly.
11972
11973         tools: Use platform abstraction for I/O.
11974         + commit 77b8aff4e1bb641f497e63230a5006ab70e6c3a8
11975         * tools/gpgconf-comp.c (retrieve_options_from_file): Use a
11976         gpgrt_stream_t for 'list_file'.  Adapt accordingly.
11977         (copy_file): Likewise for 'src' and 'dst'.
11978         (change_options_file): Likewise for 'src_file' and 'dest_file'.
11979         (change_options_program): Likewise for 'src_file' and 'dest_file'.
11980         (gc_process_gpgconf_conf): Likewise for 'config'.
11981
11982         tools: Use platform abstraction for renaming files.
11983         + commit bfd75e9492fc4edd86f4049a62304943a7b2a29a
11984         * tools/gpgconf-comp.c (gc_component_change_options): Use
11985         'gnupg_rename_file'.  Also, block signals across all renames in an
11986         attempt to make the whole process atomic.
11987
11988         tools: Add comments explaining the functions parameters.
11989         + commit 82e309ad06884e54693f4856412984331febdda0
11990         * tools/gpgconf-comp.c (change_options_file): Add comments explaining
11991         the functions parameters.
11992         (change_options_program): Likewise.
11993
11994         tools: Improve error handling.
11995         + commit b0348fdb26637b0bcbd68a96c1746a1613b309af
11996         * tools/gpgconf-comp.c (gp_component_change_options): Improve error
11997         handling when reading from stdin.
11998
11999         tools: Fix memory leak.
12000         + commit 5b28f025085b386e0ec49535d4cd3f875a414eb0
12001         * tools/gpgconf-comp.c (change_options_file): Fix leak.
12002
12003         tests: Add test demonstrating issue2929.
12004         + commit 5aafa56dffefe3fac55b9d0555c7c86e8a07f072
12005         * tests/openpgp/Makefile.am (XTESTS): Add new test.
12006         * tests/openpgp/issue2929.scm: New file.
12007
12008         tests: Enable gpgconf test.
12009         + commit 628ff843466b42309f850b8d65b13cf5f586b81f
12010         * tests/openpgp/Makefile.am (XTESTS): Re-add gpgconf.scm.
12011
12012 2017-01-23  Werner Koch  <wk@gnupg.org>
12013
12014         Release 2.1.18.
12015         + commit f8289b1d28f501d2f37bf9ccb5e42f7fb27b4688
12016
12017
12018         build: Change make distcheck configure and temp. remove gpgconf.scm.
12019         + commit 25e029823813e190a18b601af60efcb1fb3b84af
12020         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Also test gpgtar and
12021         wks-tools.  Disable ntbtls.
12022         * tests/openpgp/Makefile.am (XTESTS): Temporary remove gpgconf.scm.
12023
12024         Fix format string errors and some missing error case initialization.
12025         + commit af5979a42b9468ffe0f3ac6de5a77d982c5cf8a0
12026         * common/logging.c (do_logv): Remove extra parentheses in comparison.
12027
12028         * dirmngr/dns-stuff.c (resolve_addr_libdns): Init RES so that
12029         dns_res_close is given a defined value in the error case.
12030
12031         * dirmngr/http.c (cookie_read, cookie_write) [HTTP_USE_NTBTLS]: Fix
12032         format string char.
12033
12034         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Remove duplicate "const".
12035         * dirmngr/ks-engine-http.c (ks_http_help): Ditto.
12036         * dirmngr/ks-engine-kdns.c (ks_kdns_help): Ditto.
12037         * dirmngr/ks-engine-ldap.c (ks_ldap_help): Ditto.
12038
12039         * scd/app-p15.c (send_keypairinfo, do_getattr): Fix format string
12040         char.
12041         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Init PID for the
12042         error case.
12043         (scdaemon_runtime_change): Ditto.
12044         (dirmngr_runtime_change): Ditto.
12045
12046         * tools/gpgconf.c (query_swdb): Init VALUE_SIZE_UL.
12047
12048         dirmngr: On SIGHUP mark all keyservers alive.
12049         + commit 3ca3da8fc4ef802b8cceec5fde398a07b4888848
12050         * dirmngr/ks-engine-hkp.c (ks_hkp_reload): New.
12051         * dirmngr/dirmngr.c (dirmngr_sighup_action): Call it.
12052
12053 2017-01-23  Gaetan Bisson  <bisson@archlinux.org>
12054
12055         libdns: Hack to skip negation term.
12056         + commit d4c0187dd93163f12e9f953366adef81ecf526a6
12057         * dirmngr/dns.c (dns_nssconf_loadfile): Skip negation terms in
12058         nsswitch.conf parser.
12059
12060 2017-01-23  Werner Koch  <wk@gnupg.org>
12061
12062         dirmngr: Print debug message only with --debug.
12063         + commit 9ae0b81e4ff08712da642456d0164f81924a91e4
12064         * dirmngr/dns-stuff.c (libdns_init): Call log_debug only if opt_debug
12065         is set.
12066
12067 2017-01-23  Phil Pennock  <gnupg-devel@spodhuis.org>
12068
12069         dirmngr: Handle missing nsswitch.conf.
12070         + commit 88ade475c56ac3712d6bd6d41ae38e1421dcb320
12071         * dirmngr/dns-stuff.c (libdns_init): Fallback to files,dns.
12072
12073 2017-01-23  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
12074
12075         gpg: Fix misleading log message when checking regexp.
12076         + commit a85731ada2d361eacddc5ae92f80d34792dd4b5e
12077         * src/trustdb.c (check_regexp): Correctly print whether the
12078         regexp matched or not.
12079
12080 2017-01-23  Werner Koch  <wk@gnupg.org>
12081
12082         gpg: New export and import options "backup" and "restore".
12083         + commit 953d4ec6afd1b42feb7465ee57e48d72f033019a
12084         * g10/export.c (parse_export_options): Add "backup" and its alias
12085         "export-backup".
12086         (do_export_one_keyblock): Export ring trust packets in backup mode.
12087         * g10/import.c (parse_import_options): Add "restore" and its alias
12088         "import-restore".
12089         (read_block): Import ring trust packets.
12090
12091 2017-01-23  NIIBE Yutaka  <gniibe@fsij.org>
12092
12093         scd: Fix INTERRUPT transfer.
12094         + commit 21c9ebb908c2ad2e322e7a13e59e5880494c4d67
12095         * scd/ccid-driver.c (find_endpoint): Don't return Bulk endpoint as
12096         Interrupt endpoint.
12097         (ccid_poll): Call libusb_interrupt_transfer.
12098
12099 2017-01-19  Werner Koch  <wk@gnupg.org>
12100
12101         build: Print a commit id in the generated ChangeLog.
12102         + commit e926f30a1cda75f6334b79c303b5134f0441a3dc
12103         * build-aux/gitlog-to-changelog: Print an extra line with the commit
12104         id.
12105
12106         common: Fix buffer copy code again.
12107         + commit e031b3c16cfec583c4322c84d299b355f0849c77
12108         * common/exectool.c (my_error_from_errno): Remove.
12109         (copy_buffer_do_copy): Do without var RC.
12110         (copy_buffer_flush): Ditto.  Use ERRNO instead of es_write return
12111         code.
12112         (gnupg_exec_tool): Correctly return errors from es_read.
12113
12114 2017-01-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
12115
12116         gpg: Allow to freeze faked system time.
12117         + commit 3daeef702b2e6a42f0f396b828f86ffc3f33fc88
12118         * g10/gpg.c (main): If the parameter for --faked-system-time
12119         ends with a '!', freeze time at the specified point.
12120         * common/gettime.c (gnupg_set_time): Allow to freeze the time
12121         at an arbitrary time instead of only the current time.
12122         * doc/gpg.texi: Update documentation for --faked-system-time.
12123
12124 2017-01-19  Werner Koch  <wk@gnupg.org>
12125
12126         common: Clarify use of vars in buffer copy code.
12127         + commit 55c9212a2338bf0b07c8cf3a69bcedaa28d48d43
12128         * common/exectool.c (my_error_from_errno): New.
12129         (copy_buffer_do_copy): Use separate vars for errno values and
12130         gpg-error values for clarity.  s/assert/log_assert/.
12131         (copy_buffer_flush): Ditto.
12132         (gnupg_exec_tool_stream): Use gpg_err_code when testing.
12133
12134 2017-01-19  NIIBE Yutaka  <gniibe@fsij.org>
12135
12136         dirmngr: Add setup of CA for NTBTLS.
12137         + commit 367349b4dcc97718f8ae1163d1389d2a46fc3453
12138         * dirmngr/http.c [HTTP_USE_NTBTLS] (http_session_new): Add CA by
12139         ntbtls_set_ca_chain.
12140
12141 2017-01-18  Justus Winter  <justus@g10code.com>
12142
12143         common: Fix flushing copy buffers.
12144         + commit 34fa2d79a07a079be472c3ff486debfdac8c6070
12145         * common/exectool.c (copy_buffer_flush): Write and flush the data, but
12146         do not hide EAGAIN from the caller.
12147         (gnupg_exec_tool_stream): Retry on EAGAIN.
12148
12149 2017-01-18  Werner Koch  <wk@gnupg.org>
12150
12151         agent: Reduce sleep time in the progress callback.
12152         + commit 3d356d165aed7d76a3ea811b1d24ed0a05ac90d4
12153         * agent/gpg-agent.c (agent_libgcrypt_progress_cb): Reduce sleep time
12154         from 100ms to 1ms or use gpgrt_yield when build against a recent
12155         libgpg-error.
12156
12157         gpgconf: Allow "all" for --launch, --kill, and --reload.
12158         + commit 2312248b2e3adffa52d8a3ac4f24fe2c88f0f569
12159         * tools/gpgconf-comp.c (gc_component_launch): Allow -1 for COMPONENT.
12160         (gc_component_kill): Ditto.
12161         (gc_component_reload): For robustness change the condition to < 0.
12162         * tools/gpgconf.c (main) <aLaunch, aKill, aReload>: Support argument
12163         "all".
12164
12165         gpg: Remove unused definitions.
12166         + commit 701f54eccf3da3319dd6d74f46b852c64d90bc52
12167         * g10/keydb.h (rt_UNKNOWN, rt_RING): Remove constants.
12168         (keyblock_pos_struct, KBPOS): Remove struct and type.
12169
12170 2017-01-18  NIIBE Yutaka  <gniibe@fsij.org>
12171
12172         scd: Cleanup SERIALNO protocol.
12173         + commit 79cea89774e6327b6785e22b7057f9e3e188ac2b
12174         * scd/app.c (app_get_serial_and_stamp): Remove.
12175         (app_get_serialno): New.
12176         (app_write_learn_status): Use send_status_direct.
12177         (app_getattr): Use app_get_serialno for SERIALNO and
12178         send with send_status_direct.
12179         * scd/app-openpgp.c (do_getattr): Likewise.
12180         * scd/command.c (cmd_serialno): Don't send TIMESTAMP of 0.
12181         (cmd_learn): Likewise.  Don't inquire with TIMESTAMP of 0.
12182
12183         scd: Add "card_list" sub command for GETINFO.
12184         + commit 8b1f24a29ebc7651437c01990215a55b1136dae0
12185         * scd/app.c (app_send_card_list): New.
12186         * scd/command.c (cmd_getinfo): Fix "status" sub command.
12187         Add "card_list" sub command.
12188
12189 2017-01-17  Werner Koch  <wk@gnupg.org>
12190
12191         build: Handle packages with dashes in --find-version.
12192         + commit a09f258b1412209763222e2e81bab79663e4d685
12193         * autogen.sh (--find-version): Improve version extraction.
12194         * (--help): Extend.
12195
12196         gpg: Clean bogus subkey binding when cleaning a key.
12197         + commit 356323768a1a29138581d0aceed0336ab8be0d5c
12198         * g10/trust.c (clean_key): Also clean bogus subkey bindings.
12199
12200         gpg: Sync print of additional sig data in --edit-key.
12201         + commit 766c25018b288a7185c6da6adac0dec01a64e94a
12202         * g10/keylist.c (show_policy_url): Implement MODE -1.
12203         (show_keyserver_url): Ditto.
12204         (show_notation): Ditto.
12205         * g10/keyedit.c (print_one_sig): Print policy URL, keyserver URL and
12206         notation data to the tty.
12207
12208         common: Remove unused function tty_print_string.
12209         + commit bae42e543799a428e59bad870aed9719dd6e6e45
12210         * common/ttyio.c (tty_print_string): Rename to ...
12211         (do_print_string): this.  Make local.  Simplify FP case by using
12212         print_utf8_buffer.  Change caller.
12213
12214         gpg: Prepare some key cleaning function for use with secret key packets.
12215         + commit adbfbf608e75cdd72ae7b3a538b91bc0e236a18f
12216         * g10/trust.c (mark_usable_uid_certs): Allow use of secret key packets.
12217         (clean_sigs_from_uid): Ditto.
12218         (clean_uid_from_key): Ditto.
12219         (clean_one_uid): Ditto.
12220         (clean_key): Ditto.
12221
12222 2017-01-16  Werner Koch  <wk@gnupg.org>
12223
12224         dirmngr: Implement hkps lookups using literal addresses.
12225         + commit e6aebfe3d0f16c483296fd125b66a44017fe15f4
12226         * dirmngr/ks-engine-hkp.c (map_host): For literal addresses do a
12227         reverse lookup.
12228
12229         dirmngr: Allow reverse DNS lookups in Tor-mode.
12230         + commit 9850124c7bdf0a0e7c1866abc85f3437257d7095
12231         * dirmngr/dns-stuff.c (resolve_dns_name): Move up in the file.
12232         (resolve_addr_libdns): New.
12233         (resolve_dns_addr): Divert to resolve_dns_addr.
12234
12235         dirmngr: Avoid network queries for literal IP addresses.
12236         + commit daae97bc14742c75408c4eb05808a2102cfe2bcf
12237         * dirmngr/dns-stuff.c (resolve_name_libdns): USe flags AI_NUMERICHOST
12238         for literal IP addresses.
12239         (resolve_name_standard): Ditto.
12240
12241         dirmngr: Fix URL creation for literal IPv6 addresses in HKP.
12242         + commit 82646bbf1a5a7d745da81b239a12667a51703dc1
12243         * dirmngr/dns-stuff.c (is_ip_address): Make the return value depend on
12244         the address family.
12245         * dirmngr/ks-engine-hkp.c (map_host): Rename arg R_POOLNAME to
12246         R_HTTPHOST because that is its purpose.  Note that the former
12247         behaviour of storing a NULL to indicate that it is not a pool has not
12248         been used.
12249         (make_host_part): Ditto.
12250         (make_host_part): Make sure that literal v6 addresses are correclty
12251         marked in the constructed URL.
12252
12253 2017-01-16  Justus Winter  <justus@g10code.com>
12254
12255         tests: Improve GPGHOME handling.
12256         + commit 8b1611a9605b636db3e07a9d81016a11b318724c
12257         * tests/openpgp/defs.scm (GPGHOME): New variable.
12258         * tests/openpgp/ssh-import.scm: Remove redundant code, use 'path-join'.
12259         * tests/openpgp/tofu.scm: Likewise.
12260
12261 2017-01-16  NIIBE Yutaka  <gniibe@fsij.org>
12262
12263         agent: Ask specific SERIALNO for pksign/pkdecrypt.
12264         + commit 0801f49b0dc7102943f0e9fa51061f50f5708ca6
12265         * agent/call-scd.c (agent_card_serialno): Add DEMAND argument.
12266         * agent/command-ssh.c (card_key_available): Follow the change.
12267         * agent/learncard.c (agent_handle_learn): Likewise.
12268         * agent/divert-scd.c (ask_for_card): Use DEMAND argument.
12269
12270         scd: Add --demand option for SERIALNO.
12271         + commit 2e6f1c99d4f66a23a752092397e20a84964edf48
12272         * scd/app.c (select_application): Add SERIALNO_BIN and SERIALNO_BIN_LEN
12273         arguments.  Return matched APP with a serial number when specified.
12274         * scd/command.c (open_card): Modify for the implicit open only.
12275         (open_card_with_request): New for explicit open and support match with a
12276         serial number.
12277         (cmd_serialno): Support --demand option.
12278         (cmd_learn, cmd_readcert, cmd_readkey, cmd_pksign, cmd_pkauth)
12279         (cmd_pkdecrypt, cmd_getattr, cmd_setattr, cmd_writecert, cmd_writekey)
12280         (cmd_genkey, cmd_random, cmd_passwd, cmd_checkpin, cmd_apdu): Follow
12281         the change of open_card.
12282
12283 2017-01-12  Werner Koch  <wk@gnupg.org>
12284
12285         build: Make autogen.sh more POSIX friendly (next try)
12286         + commit 3db76c9277d918dec9721a6439f4db3b3c06aba3
12287         * autogen.sh: Fix dd count to 5.
12288
12289         gpg: Rename a var to avoid a shadowing warning.
12290         + commit c99a09f111c5980ae034faaea61a00d9ad60463c
12291         * g10/keygen.c (keygen_set_std_prefs): Rename variable.
12292
12293         tests: Fix t-gettime for a time_t of 64 and a long of 32 bit.
12294         + commit 5c0777e1ca02ff1767755c417b64d6f78e02f475
12295         * configure.ac (AC_CHECK_HEADERS): Add stdint.h.
12296         * common/t-gettime.c: Include stdint.h.
12297         (UINTMAX_C): Define replacement.
12298         (test_isotime2epoch): Use UINTMAX_C for the >32 bit constants.
12299
12300         build: Make autogen.sh more POSIX friendly.
12301         + commit 3c00b52f7cb0fbd756c0bbe5134b8f2d69c60dd1
12302         * autogen.sh: Replace non POSIX "cp -a" and "head -c".
12303
12304         libdns: Silence -Wstrict-prototypes on some function ptrs.
12305         + commit 97372b39cd9b4c84a083eadbf072fff77799617f
12306         * dirmngr/dns.c (dns_rrtype): Ignore -Wstrict-prototypes warning.
12307
12308         libdns: Provide replacement for EPROTO.
12309         + commit 0fadff9cdde47e42f7e428bc903b3626c67ba9c0
12310         * dirmngr/dns.c (EPROTO) ![EPROTO]: Define to EPROTONOSUPPORT.
12311
12312 2017-01-11  Werner Koch  <wk@gnupg.org>
12313
12314         dirmngr: After a connection failure log a hint if Tor is not running.
12315         + commit 20dfcfe08c618d23134d5d6efef7676b090f30d3
12316         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Check whether
12317         Tor is running.
12318
12319         dirmngr: Mark hosts dead on ENETDOWN.
12320         + commit 76fb2febde10da8237bbe7613830b51af2a45139
12321         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Take care of
12322         ENETDOWN.
12323
12324         dirmngr: Fix Tor access for v6 addresses.
12325         + commit 09aeac41c97bc8ecb44a09886c7fdbd9a6ec5c7f
12326         * dirmngr/http.c (use_socks): New.
12327         (my_sock_new_for_addr): New.
12328         (connect_server): Replace assuan_sock_new by my_sock_new_for_addr.
12329
12330         dirmngr: Remove warnings about unused global variables.
12331         + commit 915864e7f0315b0c96315d0bcd48b1b93592353a
12332         * dirmngr/crlcache.c (oidstr_issuingDistributionPoint): Comment.
12333         * dirmngr/ocsp.c (oidstr_certHash): Comment.
12334
12335         dirmngr: Implement debug option "network" for http.
12336         + commit da894c48ec3393e7c815f575daa5a52ab37cc102
12337         * dirmngr/dirmngr.c (parse_rereadable_options): Set http debugging.
12338
12339         dirmngr: Add debug code to http.c.
12340         + commit 02ab4b0085f8b4cdfe163d25ddd0fc80753d7f4a
12341         * dirmngr/http.c (opt_verbose, opt_debug): New vars.
12342         (http_set_verbose): New function.
12343         (_my_socket_new): Add debug output.
12344         (_my_socket_ref, _my_socket_unref, session_unref): Call log_debug if
12345         OPT_DEBUG has ben set to 2 in a debugger.
12346         (http_session_new, http_session_ref): Ditto.
12347         (send_request, http_start_data): Print debug output for the request.
12348         (parse_response): Change to use log_debug_string for the response.
12349
12350         common: New function log_debug_with_string.
12351         + commit 088d71d3671e74eb088386026f0e439a7e3b5543
12352         * common/logging.c (do_logv): Factor some code out to ...
12353         (print_prefix): new.
12354         (log_logv): Add arg EXTRASTRING and print it.  Change all callers to
12355         pass NULL for it.
12356         (log_debug_with_string): New.  Uses EXTRASTRING.
12357
12358 2017-01-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
12359
12360         common: Avoid unnecessary ambiguity in argparse.
12361         + commit 7249ab0f95d1f6cb8ee61eefedc79801bb56398f
12362         * common/argparse.c (find_long_option): Avoid unnecessary ambiguity.
12363
12364 2017-01-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
12365
12366         systemd-user: Enable "systemctl --user reload {dirmngr,gpg-agent}"
12367         + commit a20a450ac4ef10847fd59a5fd3acbbd2bfcaa6a2
12368         * doc/examples/systemd-user/*.service: Add ExecReload directives to
12369           indicate the canonical way to reload the services.
12370
12371         GnuPG recommends reloading the agent and dirmngr with "gpgconf
12372         --reload".  if anyone is running them as systemd user services, they
12373         might ask them to reload in the systemd way, so teach systemd the
12374         right thing to do.
12375
12376 2017-01-10  Justus Winter  <justus@g10code.com>
12377
12378         tests: Improve gpgconf test.
12379         + commit 88e42ef08d65d4d1bc29c6cea48df19ca0d5e2bd
12380         * tests/openpgp/defs.scm (valgrind): New variable.
12381         (gpg-config): Fix clearing an option.
12382         * tests/openpgp/gpgconf.scm: Also toggle 'quiet'.
12383
12384         tools: Fix memory leaks and improve error handling.
12385         + commit 1f5caf90bfaaaf7b9d8c06c12087aeeae3748032
12386         * tools/gpgconf-comp.c (gc_option_free): New function.
12387         (gc_components_free): Likewise.
12388         (gc_components_init): Likewise.
12389         (retrieve_options_from_program): Use 'xfree', fix memory leak.
12390         (change_options_program): Improve error handling.
12391         (gc_component_change_options): Fix memory leaks.
12392         * tools/gpgconf.c (main): Initialize components.
12393         * tools/gpgconf.h (gc_components_init): New prototype.
12394
12395         tests: Add test for gpgconf.
12396         + commit c8cfc62125aceee0ca48aab5c8a9fea1ec1ef652
12397         * tests/openpgp/Makefile.am (XTESTS): Add new test.
12398         * tests/openpgp/defs.scm (percent-encode): New function.
12399         (gpg-conf): Generalize so that we can feed stdin.
12400         (gpg-config): New function.
12401         * tests/openpgp/gpgconf.scm: New file.
12402
12403         common: Fix fallback code.
12404         + commit bfd6a490129ffc7c7ac8776bf5a5da3b1ddf6d42
12405         * common/logging.c (_log_assert): Fix the variant for compilers that
12406         do not support __FUNCTION__.
12407         * common/logging.h (_log_assert): Likewise.
12408
12409 2017-01-09  Werner Koch  <wk@gnupg.org>
12410
12411         dirmngr: Use "pgpkey-hkps" and "pgpkey-hkp" for SRV record lookups.
12412         + commit 0cc975d8a1cd54115938202432e43263b8893ea4
12413         * dirmngr/ks-engine-hkp.c (map_host): Chnage arg NO_SRV to SRVTAG.
12414         (make_host_part): Rewrite.
12415
12416         dirmngr: Do not use a SRV record for HKP if a port was specified.
12417         + commit c2cbe2f87c480c62239dc4c2cbb352acd98cd267
12418         * dirmngr/http.h (parsed_uri_s): Add field EXPLICIT_PORT.
12419         * dirmngr/http.c (do_parse_uri): That it.
12420         * dirmngr/ks-engine-hkp.c (map_host): Add arg NO_SRV.
12421         (make_host_part): Ditto.
12422         (ks_hkp_resolve): Set NO_SRV from EXPLICIT_PORT.
12423         (ks_hkp_search): Ditto.
12424         (ks_hkp_get): Ditto.
12425         (ks_hkp_put): Ditto.
12426
12427 2017-01-08  Werner Koch  <wk@gnupg.org>
12428
12429         dirmngr: Implement experimental SRV record lookup for WKD.
12430         + commit 88dc3af3d4ae1afe1d5e136bc4c38bc4e7d4cd10
12431         * dirmngr/server.c (cmd_wkd_get): Support SRV records.
12432
12433         dirmngr: Improve debug output for TLS.
12434         + commit 714faea4fa7f30d42e9986358214a99aa8fa57b3
12435         * dirmngr/misc.c (dump_cert): Also print SubjectAltNames.
12436
12437         dirmngr: Change internal SRV lookup API.
12438         + commit 16078f3deea5b82ea26e2f01dbd3ef3a5ce25410
12439         * dirmngr/dns-stuff.c (get_dns_srv): Add args SERVICE and PROTO.
12440         * dirmngr/http.c (connect_server): Simplify SRV lookup.
12441         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
12442         * dirmngr/t-dns-stuff.c (main): Adjust for changed get_dns_srv.
12443
12444         dirmngr: Strip root zone suffix from libdns SRV results.
12445         + commit 9fa94aa10778bbd680315e93b23175423e338c40
12446         * dirmngr/dns-stuff.c (getsrv_libdns): Strip trailing dot from the
12447         target.
12448
12449 2017-01-06  Werner Koch  <wk@gnupg.org>
12450
12451         agent,w32: Fix annoying output to DebugView.
12452         + commit 8d774904c8066d8c0f19cfffe2d568979bb8c470
12453         * agent/gpg-agent.c (startup_fd_list): Do not define for W32.
12454         (main) [W32]: Do not call get_all_open_fds.
12455
12456 2017-01-06  NIIBE Yutaka  <gniibe@fsij.org>
12457
12458         scd: Fix for --disable-ccid for scdaemon.
12459         + commit 858e14cd794e2a6125d51e652a754bbe26def997
12460         * scd/apdu.c (apdu_dev_list_finish): Don't call ccid_dev_scan_finish
12461         with no table.
12462         (apdu_open_reader): Only increment when it's zero.
12463
12464         scd: Fix for --disable-ccid-driver.
12465         + commit 62268a2732dddca7a05ca4cf45d0e4338c7dc3c4
12466         * scd/apdu.c [HAVE_LIBUSB] (apdu_dev_list_start): Conditionalize.
12467         [HAVE_LIBUSB] (apdu_dev_list_finish, apdu_open_reader): Likewise.
12468
12469         scd: Support multiple readers by CCID driver.
12470         + commit 8a41e73c31adb86d4a7dca4da695e5ad1347811f
12471         * scd/apdu.c (new_reader_slot): Lock is now in apdu_dev_list_start.
12472         (close_pcsc_reader_direct, close_ccid_reader): RDRNAME is handled...
12473         (apdu_close_reader): ... by this function now.
12474         (apdu_prepare_exit): Likewise.
12475         (open_ccid_reader): Open with dev_list.
12476         (apdu_dev_list_start, apdu_dev_list_finish): New.
12477         (apdu_open_one_reader): New.
12478         (apdu_open_reader): Support multiple readers.
12479         * scd/app.c (select_application): With SCAN, opening all readers
12480         available, and register as new APP.
12481         (app_write_learn_status): app->ref_count == 0 is valid for APP which is
12482         not yet used.
12483         (app_list_start, app_list_finish): New.
12484         * scd/ccid-driver.c (struct ccid_driver_s): Remove RID and BCD_DEVICE.
12485         Add BAI.
12486         (parse_ccid_descriptor): BCD_DEVICE is now on the arguments.
12487         (ccid_dev_scan, ccid_dev_scan_finish): New.
12488         (ccid_get_BAI, ccid_compare_BAI, ccid_open_usb_reader): New.
12489         (ccid_open_reader): Support multiple readers.
12490         (ccid_set_progress_cb, ccid_close_reader): No RID any more.
12491
12492 2017-01-05  Werner Koch  <wk@gnupg.org>
12493
12494         Silence two -Wlogical-op warnings.
12495         + commit 6170eb809033c9d144abf3b1f31f8b936878cdd4
12496         * common/tlv.c (parse_ber_header): Avoid compiler warning about a
12497         duplicate condition.
12498         * tools/gpgtar-create.c (pattern_valid_p): Likewise.
12499
12500 2017-01-05  Justus Winter  <justus@g10code.com>
12501
12502         tests: New test for --{show,override}-session-key.
12503         + commit 168c8c9d79a817c1f08a9ef976dab377f8c4c69e
12504         * tests/openpgp/Makefile.am (XTESTS): Add new test.
12505         * tests/openpgp/decrypt-session-key.scm: New file.
12506
12507         tests: Fix macro.
12508         + commit 4ded213698123a425393b89a800fda2a4ec5229d
12509         * tests/openpgp/defs.scm (with-ephemeral-home-directory): Make
12510         hygienic, use define-macro, do not change to the ephemeral home
12511         directory.
12512         * tests/gpgsm/setup.scm: Change to the ephemeral home directory.
12513         * tests/openpgp/setup.scm: Likewise.
12514
12515 2017-01-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
12516
12517         g10: avoid warning when --disable-tofu.
12518         + commit 38671cfe5a2a40bb991619f4cb992c42b5f1e8cd
12519         If configured with --disable-tofu, we see compiler warnings about an
12520         unused variable.  This should remove those warnings.
12521
12522 2017-01-04  Justus Winter  <justus@g10code.com>
12523
12524         tests,w32: Fix locating the components.
12525         + commit 28e149609da44fab600f6a11b385d1c8ca8e7eb9
12526         * tests/openpgp/defs.scm (percent-decode): New function.
12527         (bin-prefix): New variable.
12528         (installed?): Likewise.
12529         (tool-hardcoded): Use the new variables.
12530         (gpg-conf): Use the new function to decode the values.
12531         (gpg-components): Do not use '--build-prefix' when 'installed?'.
12532
12533 2017-01-03  Werner Koch  <wk@gnupg.org>
12534
12535         dirmngr: Make sure Tor mode is also set for DNS on SIGHUP.
12536         + commit 969512401603639e4467ede7d892f1b02582c2c9
12537         * dirmngr/dns-stuff.c (enable_dns_tormode): Always succeed.
12538         (reload_dns_stuff): Reset tor port.
12539         * dirmngr/dirmngr.c (set_tor_mode): Also enable Tor mode for DNS.
12540         (main): Remove warning that Tor mode may not fully work.
12541         * dirmngr/server.c (cmd_dns_cert): Remove explicit Tor for DNS
12542         initialization.
12543         * dirmngr/t-dns-stuff.c (main): Remove option --new-circuit and error
12544         checking for enable_dns_tormode.
12545
12546         dirmngr: New debug message on correctly initialized libdns.
12547         + commit 0004d52ba2f1245c84f95a151342ad99fd72ca3d
12548         * dirmngr/dns-stuff.c (libdns_init): Add debug level diagnostic on
12549         success.
12550
12551 2017-01-02  Justus Winter  <justus@g10code.com>
12552
12553         common: Turn assertions into expressions.
12554         + commit a1e0d4a1e75fc6e6c3392a4e1d1d27005b38d6cc
12555         * common/logging.h (log_assert): Turn this into an expression so it
12556         can be used in expressions.
12557
12558         tests: Fix faked time in the TOFU test.
12559         + commit 6d065198337b5242889723481bfa9ce81aa108bb
12560         * tests/openpgp/tofu.scm (GPG): Fix time delta.
12561
12562 2017-01-02  Werner Koch  <wk@gnupg.org>
12563
12564         g13: Improve printing of debug infos.
12565         + commit 5b6ebfb9244602d9de31d61c7eceb0c45ac8aa49
12566         * g13/g13tuple.c (all_printable): Make it work.
12567
12568         Replace use of variable-length-arrays.
12569         + commit 6b84ecbf312d98ac8cce9fe5facdc815bc742fa1
12570         * common/t-iobuf.c (main): Replace variable-length-array.
12571         * g10/gpgcompose.c (mksubpkt_callback): Ditto.
12572         (encrypted): Ditto.
12573         * g10/t-stutter.c (log_hexdump): Ditto.
12574         (oracle_test): Ditto.
12575         * g10/tofu.c (get_policy): Ditto.  Use "%zu" for size_t.
12576         * scd/app-openpgp.c (ecc_writekey): Replace variable-length-array.
12577         Check for zero length OID_LEN.
12578
12579 2017-01-02  Justus Winter  <justus@g10code.com>
12580
12581         gpgscm: Fail if too many arguments are given.
12582         + commit b0e14bd6ff8401b12b2b39f75aef94d3ad28017f
12583         * tests/gpgscm/scheme.c (opexe_0): Enable check.
12584         * tests/gpgscm/tests.scm (test::report): Remove superfluous argument.
12585
12586         gpgscm: Add 'finally', rework all macros.
12587         + commit b79274a3b7e58f88e9a8c1dc1fb24dd3e983543c
12588         * tests/gpgscm/init.scm (finally): New macro.
12589         * tests/gpgscm/tests.scm (letfd): Rewrite.
12590         (with-working-directory): Likewise.
12591         (with-temporary-working-directory): Likewise.
12592         (lettmp): Likewise.
12593
12594         gpgscm: Use boxed values for source locations.
12595         + commit e8b843508dac96e9d0a3140954dd5a3618669cec
12596         * tests/gpgscm/scheme-private.h (struct port): Use boxed values for
12597         filename and current line.  This allows us to use the same Scheme
12598         object for labeling all expressions in a file.
12599         * tests/gpgscm/scheme.c (file_push): Use boxed type for filename.
12600         (mark): Mark location objects of port objects.
12601         (gc): Mark location objects in the load stack.
12602         (port_clear_location): New function.
12603         (port_reset_current_line): Likewise.
12604         (port_increment_current_line): Likewise.
12605         (file_pop): Adapt accordingly.
12606         (port_rep_from_filename): Likewise.
12607         (port_rep_from_file): Likewise.
12608         (port_close): Likewise.
12609         (skipspace): Likewise.
12610         (token): Likewise.
12611         (_Error_1): Likewise.
12612         (opexe_0): Likewise.
12613         (opexe_5): Likewise.
12614         (scheme_deinit): Likewise.
12615         (scheme_load_file): Likewise.
12616         (scheme_load_named_file): Likewise.
12617
12618 2017-01-02  Werner Koch  <wk@gnupg.org>
12619
12620         dirmngr: Strip root zone suffix from libdns cname results.
12621         + commit b200e636ab20d2aa93d9f71f3789db5a04af0a56
12622         * dirmngr/dns-stuff.c (resolve_name_libdns): Strip trailing dot.
12623         (get_dns_cname_libdns): Ditto.
12624
12625 2016-12-30  NIIBE Yutaka  <gniibe@fsij.org>
12626
12627         scd: Fix select_application.
12628         + commit 337690441fcb19343fe56b139f5649bed7d25c83
12629         * scd/app.c (select_application): Fix the condition for open.
12630
12631         scd: Fix card removal monitor.
12632         + commit f300e12a793d59deb1a369713384eaabfa39b3e6
12633         * scd/app.c (app_reset): Call send_client_notification with REMOVAL.
12634         (scd_update_reader_status_file): Likewise.
12635         * scd/command.c (send_client_notifications): Distinguish removal.
12636
12637 2016-12-29  NIIBE Yutaka  <gniibe@fsij.org>
12638
12639         scd: Improve internal CCID driver.
12640         + commit cdc8d0bd933b958db878861587322bc541b580b3
12641         * scd/ccid-driver.c (scan_or_find_usb_device): Don't scan for
12642         configuration but use active configuration.  Support alt_setting.
12643         (scan_or_find_devices): Support alt_setting.
12644         (ccid_open_reader): Support alt_setting.
12645
12646         scd: Fix a race condition for new_reader_slot.
12647         + commit c48cf7e32ffa02ebdf00265543344c611bef0431
12648         * scd/apdu.c (reader_table_lock, apdu_init): New.
12649         (new_reader_slot): Serialize by reader_table_lock.
12650         * scd/app.c (lock_app, unlock_app, app_new_register): Fix error code
12651         usage.
12652         (initialize_module_command): Call apdu_init.
12653         * scd/scdaemon.c (main): Handle error for initialize_module_command.
12654
12655 2016-12-28  NIIBE Yutaka  <gniibe@fsij.org>
12656
12657         scd: APP centric approach for device management.
12658         + commit 4cc9fc5eb9bd91d943c185d59da4a2b4cb885ee6
12659         * scd/app.c (lock_app): Rename from lock_reader and use internal field
12660         of APP.
12661         (unlock_app): Likewise.
12662         (app_dump_state): Use APP.
12663         (application_notify_card_reset): Remove.
12664         (check_conflict): Change API for APP, instead of SLOT.
12665         (check_application_conflict): Likewise.
12666         (release_application_internal): New.
12667         (app_reset): New.
12668         (app_new_register): New.
12669         (select_application): Change API for APP, instead of SLOT.
12670         (deallocate_app, release_application): Modify for manage link.
12671         (report_change): New.
12672         (scd_update_reader_status_file): Moved from command.c and
12673         use APP list, instead of VREADER.
12674         (initialize_module_command): Moved from command.c.
12675
12676         * scd/command.c (TEST_CARD_REMOVAL): Remove.
12677         (IS_LOCKED): Simplify.
12678         (vreader_table): Remove.
12679         (vreader_slot, update_card_removed): Remove.
12680         (do_reset): Call app_reset.
12681         (get_current_reader): Remove.
12682         (open_card): Add SCAN arg.
12683         (cmd_serialno): No retry, since retry is done in lower layer in apdu.c.
12684         No do_reset, since it is done in lower layer.
12685         Add clearing card_removed flag.
12686         (cmd_disconnect): Call apdu_disconnect.
12687         (send_client_notifications): Modify for APP.
12688         (update_reader_status_file): Remove.
12689
12690         scd: Simplify monitoring card removal.
12691         + commit f9882d8336feea96e3b5e250e9093f8cca01e08b
12692         * scd/apdu.c (struct reader_table_s): Remove any_status, last_status,
12693         status, and change_counter field.
12694         (new_reader_slot, dump_reader_status, ct_activate_card, open_ct_reader)
12695         (connect_pcsc_card, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
12696         (open_ccid_reader, apdu_reset): Follow the change.
12697         (ct_dump_reader_status): Remove.
12698         (apdu_get_status_internal, apdu_get_status): Remove CHANGED arg.
12699         (apdu_connect): Follow the change.
12700         * scd/command.c (struct vreader_s): Remove reset_failed, any, and
12701         changed field.
12702         (cmd_getinfo, update_reader_status_file): Follow the change.
12703
12704 2016-12-27  NIIBE Yutaka  <gniibe@fsij.org>
12705
12706         scd: Improve internal CCID driver.
12707         + commit c7ec9c42246033e14ebad679d11f3b1fbeed23b7
12708         * scd/ccid-driver.c (scan_or_find_usb_device): Fix return value.
12709         Support device with multiple CCID interfaces.  Fix the case with
12710         READERNO.  Support partial string match of "reader-port" like PC/SC
12711         driver.
12712
12713 2016-12-23  NIIBE Yutaka  <gniibe@fsij.org>
12714
12715         dirmngr: Fix for --disable-libdns usage.
12716         + commit d26c51825e2255fe58305cbc1cd74fa43f80d93e
12717         * dirmngr/dns-stuff.c (enable_recursive_resolver, set_dns_nameserver)
12718         (reload_dns_stuff): Conditionalize with USE_LIBDNS.
12719         (get_h_errno_as_gpg_error): Map HOST_NOT_FOUND to GPG_ERR_NO_NAME.
12720
12721 2016-12-22  Neal H. Walfield  <neal@g10code.com>
12722
12723         tools: Show a clearer error message if a server doesn't support WKS.
12724         + commit 1909e994cb87d6c6866a465f0c20a456d4df46cc
12725         * tools/gpg-wks-client.c (command_send): If we fail to lookup the
12726         submission address, print a better error message.  If it is because
12727         the corresponding file doesn't exist, provide the hint that the server
12728         probably doesn't support WKS.
12729
12730 2016-12-22  Werner Koch  <wk@gnupg.org>
12731
12732         wks: Let the client ignore missing policy flags.
12733         + commit e917dfcd973a3ebbf5eb584e819ffa89f932bfef
12734         * tools/gpg-wks-client.c (command_send): Ignore missing policy flags.
12735
12736 2016-12-22  NIIBE Yutaka  <gniibe@fsij.org>
12737
12738         scd: Clean up internal API for APP.
12739         + commit 8431f5a7e88e1f42d75c4a4b61f4aa9b35457204
12740         * scd/app-common.h (app_readcert, app_readkey, app_setattr, app_sign,
12741         app_auth, app_decipher, app_get_challenge, app_check_pin): Add CTRL as
12742         the second argument.
12743         * scd/app.c: Supply CTRL to lock_reader calls.
12744         * scd/command.c (cmd_readcert, cmd_readkey, cmd_pksign, cmd_auth,
12745         cmd_pkdecrypt, cmd_setattr, cmd_random, cmd_checkpin): Follow the
12746         change.
12747
12748 2016-12-21  Justus Winter  <justus@g10code.com>
12749
12750         gpgscm: Guard use of union member.
12751         + commit 6e96cdd41a0e55b672309431062f37c4a4a9f485
12752         * tests/gpgscm/scheme.c (opexe_5): Check that we have a file port
12753         before accessing filename.  Fixes a crash on 32-bit architectures.
12754
12755 2016-12-20  Werner Koch  <wk@gnupg.org>
12756
12757         tests: Avoid skipping exectool tests.
12758         + commit 6204f8104fea42d706a68e77e2dc0bca4704bddc
12759         * common/t-exectool.c (test_executing_true): Try also /usr/bin/true.
12760         (test_executing_false): Try also /usr/bin/false.
12761
12762 2016-12-20  Justus Winter  <justus@g10code.com>
12763
12764         tests: Add test suite for gpgsm.
12765         + commit 36c14139285982def6ad942d4b2d8bef7ed4ea76
12766         * configure.ac (AC_CONFIG_FILES): Add new file.
12767         * tests/Makefile.am (SUBDIRS): Add new directory.
12768         * tests/gpgsm/32100C27173EF6E9C4E9A25D3D69F86D37A4F939: New file.
12769         * tests/gpgsm/Makefile.am: Likewise.
12770         * tests/gpgsm/cert_dfn_pca01.der: Likewise.
12771         * tests/gpgsm/cert_dfn_pca15.der: Likewise.
12772         * tests/gpgsm/cert_g10code_test1.der: Likewise.
12773         * tests/gpgsm/decrypt.scm: Likewise.
12774         * tests/gpgsm/encrypt.scm: Likewise.
12775         * tests/gpgsm/export.scm: Likewise.
12776         * tests/gpgsm/gpgsm-defs.scm: Likewise.
12777         * tests/gpgsm/import.scm: Likewise.
12778         * tests/gpgsm/plain-1.cms.asc: Likewise.
12779         * tests/gpgsm/plain-2.cms.asc: Likewise.
12780         * tests/gpgsm/plain-3.cms.asc: Likewise.
12781         * tests/gpgsm/plain-large.cms.asc: Likewise.
12782         * tests/gpgsm/run-tests.scm: Likewise.
12783         * tests/gpgsm/setup.scm: Likewise.
12784         * tests/gpgsm/shell.scm: Likewise.
12785         * tests/gpgsm/sign.scm: Likewise.
12786         * tests/gpgsm/verify.scm: Likewise.
12787
12788         tests: Add macro managing ephemeral home directories.
12789         + commit c067a012c764218b94ce8de2914615a895a75f3e
12790         * tests/openpgp/defs.scm (with-ephemeral-home-directory): New macro.
12791         * tests/openpgp/setup.scm: Use the new macro.
12792
12793         tests: Move argument parser.
12794         + commit a30c0a6972cabde3858108e9020e900696094843
12795         * tests/gpgme/gpgme-defs.scm (flag): Move...
12796         * tests/gpgscm/tests.scm: ... over here.
12797
12798         tests: Add missing encrypted sample, cleanup samples handling.
12799         + commit e2ed3c1597daf3188ddce049cc3c50113d56f1b9
12800         * tests/openpgp/Makefile.am (TEST_FILES): Add new file.
12801         * tests/openpgp/defs.scm (plain-files): Add 'plain-large'.
12802         (all-files): New variable.
12803         (create-sample-files): New function.
12804         (create-legacy-gpghome): Use new function.
12805         * tests/openpgp/plain-large.asc: New file.
12806
12807 2016-12-20  Werner Koch  <wk@gnupg.org>
12808
12809         Release 2.1.17.
12810         + commit ade32464a25fdb35cc0f39e46d303ceba68ea8f6
12811
12812
12813         sm: Remove wrong example from gpgsm --help.
12814         + commit 13465e708bb67e816e4fb3a37c117ad91dc6383f
12815         * sm/gpgsm.c (opts): Remove group 303.
12816
12817         dirmngr: New option --resolver-timeout.
12818         + commit 81c012787fabf734d9c952c6f18ecac21929d4d8
12819         * dirmngr/dns-stuff.c (DEFAULT_TIMEOUT): New.
12820         (opt_timeout): New var.
12821         (set_dns_timeout): New.
12822         (libdns_res_open): Set the default timeout.
12823         (libdns_res_wait): Use configurable timeout.
12824         (resolve_name_libdns): Ditto.
12825
12826         * dirmngr/dirmngr.c (oResolverTimeout): New const.
12827         (opts): New option --resolver-timeout.
12828         (parse_rereadable_options): Set that option.
12829         (main) <aGPGConfList>: Add --nameserver and --resolver-timeout.
12830         * tools/gpgconf-comp.c (gc_options_dirmngr): Add --resolver-timeout
12831         and --nameserver.
12832
12833         * dirmngr/http.c (connect_server): Fix yesterday introduced bug in
12834         error diagnostic.
12835
12836 2016-12-19  Werner Koch  <wk@gnupg.org>
12837
12838         dirmngr: Fix problems with the getsrv function.
12839         + commit af8b68fae39b1378c769e0de6ba6437ea1aac7e3
12840         * dirmngr/dns-stuff.c (opt_debug, opt_verbose): New vars.
12841         (set_dns_verbose): New func.
12842         (libdns_switch_port_p): Add debug output.
12843         (resolve_dns_name): Ditto.
12844         (get_dns_cert): Ditto.
12845         (get_dns_cname): Ditto.
12846         (getsrv_libdns, getsrv_standard): Change SRVCOUNT to an unsigend int.
12847         (getsrv): Rename to ...
12848         ((get_dns_srv): this.  Add arg R_COUNT and return an error.  Add debug
12849         output.
12850         * dirmngr/http.c: Adjust for chnaged getsrv().
12851         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
12852         * dirmngr/t-dns-stuff.c (main): Ditto.  Call set_dns_verbose.
12853         * dirmngr/dirmngr.c (parse_rereadable_options): Call set_dns_verbose.
12854
12855         build: Add target to sign the windows installer.
12856         + commit 284ec54495dddc9eb0232e959cf994234097578a
12857         * build-aux/speedo.mk (w32-sign-installer): New.
12858         (AUTHENTICODE_KEY): New.
12859         (installer-from-source): Use cp instead of mv.  Factor code out to ...
12860         (MKSWDB_commands): new macro.
12861         (sign-installer): New.
12862
12863 2016-12-19  Justus Winter  <justus@g10code.com>
12864
12865         tests: Use the common test framework for the migration tests.
12866         + commit 65a0d6a24e6299682793f213a9d2bae17c5b12d9
12867         * tests/migrations/Makefile.am (reqired_pgms): Add 'gpgscm'.
12868         (TESTS_ENVIRONMENT): Populate.
12869         (TESTS): Rename to 'XTESTS'.
12870         (xcheck): New target.
12871         (EXTRA_DIST): Add new files.
12872         (CLEANFILES): Remove log files.
12873         * tests/migrations/common.scm: Honor 'verbose', fix paths.
12874         * tests/migrations/run-tests.scm: New file.
12875         * tests/migrations/setup.scm: Likewise.
12876
12877         tests: Use sequential test runner if only one test is given.
12878         + commit 0bf16d702665a269ce5ef724c927fbbd8f7f1ce9
12879         * tests/openpgp/run-tests.scm: Use sequential test runner if only one
12880         test is given.
12881
12882 2016-12-19  Werner Koch  <wk@gnupg.org>
12883
12884         dirmngr,w32: Hack around a select problem.
12885         + commit d51499fdc522a696f23c6776c3ab248742f4e06a
12886         * dirmngr/dns.c (FD_SETSIZE): Bump up to 1024.
12887         (dns_poll): Return an error instead of hitting an assertion failure.
12888
12889 2016-12-19  Neal H. Walfield  <neal@g10code.com>
12890
12891         test: Extend TOFU tests to also check the days with signatures.
12892         + commit aec89a7297bae30f79a63fdc830530e82bab6170
12893         * tests/openpgp/tofu.scm (GPGTIME): Define the "standard" base time.
12894         (faketime): New function.
12895         (days->seconds): Likewise.
12896         (GPG): Use faketime.
12897         (check-counts): Also check the number of expected days with signatures
12898         and encryptions.  Update callers.  Extend tests.
12899
12900 2016-12-19  Justus Winter  <justus@g10code.com>
12901
12902         tests: New test for --delete-[secret-]keys.
12903         + commit a1afc450e182af02ad5e6f6ba79e9dc4332ca2bc
12904         * tests/openpgp/Makefile.am (XTESTS): Add new test.
12905         * tests/openpgp/defs.scm (keys): New variable.
12906         (have-public-key?): New function.
12907         (have-secret-key?): Likewise.
12908         (have-secret-key-file?): Likewise.
12909         * tests/openpgp/delete-keys.scm: New file.
12910         * tests/openpgp/quick-key-manipulation.scm: Move the accessors to
12911         'defs.scm'.
12912
12913         gpgscm: Change associativity of ::.
12914         + commit a45dc0849da0d944ec8c759bc8e3e733b1eb0079
12915         * tests/gpgscm/scheme.c (mk_atom): Change associativity of the ::
12916         infix-operator.  This makes it possible to naturally express accessing
12917         nested structures (e.g. a::b::c).
12918
12919         gpgscm: Display location when assertions fail.
12920         + commit 3949cbd1128585c9b810713aeffaa1455fb5aed9
12921         * tests/gpgscm/lib.scm (assert): Use location information if
12922         available.
12923
12924         gpgscm: Make exception handling more robust.
12925         + commit df00745d6eed7034b218a0c482a46d975425798a
12926         * tests/gpgscm/init.scm (throw'): Check that args is a list.
12927
12928 2016-12-19  Andre Heinecke  <aheinecke@intevation.de>
12929
12930         speedo,w32: Use nsExec::ExecToLog to avoid popups.
12931         + commit 026bbf0d5ee4510967e5f1dd3db2dee4687b0612
12932         * build-aux/speedo/w32/inst.nsi: Use ExecToLog instead of
12933         ExecWait.
12934
12935 2016-12-19  Werner Koch  <wk@gnupg.org>
12936
12937         Remove unused debug flags and add "dns" and "network".
12938         + commit e384405b6e251629fb36bcbba4f5f9ac15a39d10
12939         * g10/options.h (DBG_CARD_IO_VALUE, DBG_CARD_IO): Remove.
12940         * g10/gpg.c (debug_flags): Remove "cardio".
12941         * agent/agent.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove.
12942         * agent/gpg-agent.c (debug_flags): Remove "command".
12943         * scd/scdaemon.h (DBG_COMMAND_VALUE, DBG_COMMAND): Remove.
12944         * scd/scdaemon.c (debug_flags): Remove "command".
12945         * dirmngr/dirmngr.h (DBG_DNS_VALUE, DBG_DNS): New.
12946         (DBG_NETWORK_VALUE, DNG_NETWORK): New.
12947         * dirmngr/dirmngr.c (debug_flags): Add "dns" and "network".
12948
12949 2016-12-17  Werner Koch  <wk@gnupg.org>
12950
12951         dirmngr: Fix setup of libdns for W32.
12952         + commit e77b924fec1082faae48cdd2ff8474874a22bdf7
12953         * configure.ac (DNSLIB) {W32]: Add -liphlpapi.
12954         * dirmngr/dns-stuff.c [W32]: Include iphlpapi.h and define
12955         WIN32_LEAN_AND_MEAN.
12956         (libdns_init) [W32]: Use GetNetworkParams to get the nameserver.
12957         * dirmngr/t-dns-stuff.c (init_sockets): New.
12958         (main): Call it.
12959
12960 2016-12-16  Werner Koch  <wk@gnupg.org>
12961
12962         dirmngr: Auto-switch from Tor port to Torbrowser port.
12963         + commit 024dbd7162fc1a7694176ebad3c21ee3ea67c024
12964         * dirmngr/dns-stuff.c (libdns_tor_port): New var.
12965         (set_dns_nameserver): Clear that var.
12966         (libdns_init): Init var to the default port.
12967         (libdns_switch_port_p): New func.
12968         (resolve_dns_name): Use function to switch the port
12969         (get_dns_cert): Ditto.
12970         (getsrv): Ditto.
12971         (get_dns_cname): Ditto.
12972
12973         dirmngr: Use one context for all libdns queries.
12974         + commit c4e8a3194d6b92f596a6483e486c645de7d2ddd1
12975         * dirmngr/dns-stuff.c (libdns_reinit_pending): New var.
12976         (enable_recursive_resolver): Set var.
12977         (set_dns_nameserver): Ditto.
12978         (libdns_init): Avoid double initialization.
12979         (libdns_deinit): New.
12980         (reload_dns_stuff): New.
12981         (libdns_res_open): Act upon LIBDNS_REINIT_PENDING.
12982         * dirmngr/t-dns-stuff.c (main): Call reload_dns_stuff to release
12983         memory.
12984         * dirmngr/dirmngr.c (cleanup): Ditto.
12985         (dirmngr_sighup_action): Call reload_dns_stuff to set
12986         LIBDNS_REINIT_PENDING.
12987
12988         dirmngr: Pass Tor credentials to libdns.
12989         + commit ddb48086833f8b86f0f0d69b21a23f245090ea7a
12990         * dirmngr/dns-stuff.c (tor_credentials): Replace by ...
12991         (tor_socks_user, tor_socks_password): new vars.
12992         (enable_dns_tormode): Set these new vars.
12993         (libdns_res_open): Tell libdns the socks credentials.
12994
12995         dirmngr: Factor common libdns code out.
12996         + commit 59d3c3e4baffff52548fb5d1766ebf02dd8e1bec
12997         * dirmngr/dns-stuff.c (libdns_res_open): New.  Replace all libdns_init
12998         and dns-res_open by a call to this func.
12999         (libdns_res_submit): New wrapper.  Replace all dns_res_sumbit calls.
13000         (libdns_res_wait): New function.
13001         (resolve_name_libdns): Replace loop by libdns_res_wait.
13002         (get_dns_cert_libdns): Ditto.
13003         (getsrv_libdns): Ditto.
13004
13005         gpg,sm: A few more option for --gpgconf-list.
13006         + commit 48671f295ff233765689b6a73021f83ab845a28f
13007         * g10/gpg.c (gpgconf_list): Add --compliance and
13008         --default-new-key-algo.
13009         (parse_compliance_option):
13010         * sm/gpgsm.c (main) <gpgconf-list>: Add --enable-crl-checks.
13011
13012         gpgconf: New command --apply-profile.
13013         + commit 76cd64a5baf6057b199c01f7999b327f1f4a87bc
13014         * tools/gpgconf.c (aApplyProfile): New.
13015         (opts): New command --apply-profile.
13016         (main): Implement that command.
13017         * tools/gpgconf-comp.c (option_check_validity): Add arg VERBATIM.
13018         (change_options_program): Ditto.
13019         (change_one_value): Ditto.
13020         (gc_component_change_options): Ditto.
13021         (gc_apply_profile): New.
13022
13023         gpgconf: Fix --apply-defaults.
13024         + commit 6ca3c28da46873416822bf6ab7893db6c56a49d6
13025         * tools/gpgconf-comp.c: Skip pinentry also in process_all mode.
13026
13027 2016-12-16  Justus Winter  <justus@g10code.com>
13028
13029         doc: Mention extra information in pinentry status lines.
13030         + commit 12a5265afa7f87ad92fb571e0882e57b07a3c267
13031         * doc/DETAILS: Mention that 'PINENTRY_LAUNCHED may carry extra
13032         information.
13033
13034         sm: Fix agent communication.
13035         + commit 3c7d6a1769ed6cc90d86247a814a0dce341512a3
13036         * sm/call-agent.c (gpgsm_agent_pksign): Fix passing the control handle
13037         to the callback.
13038         (gpgsm_scd_pksign): Likewise.
13039         (gpgsm_agent_reaedkey): Likewise.
13040
13041 2016-12-16  Neal H. Walfield  <neal@g10code.com>
13042
13043         doc: Fix manual.
13044         + commit a165fa09be4bfbeb97ebe25d551a9045255e5028
13045         * doc/gpg.texi: Remove comment about options being parsed in-order.
13046         They aren't.
13047
13048         g10: Use total days, not total messages to compute TOFU validity.
13049         + commit 4a2c210b75d4266e289712e73a42c286aabb07f0
13050         * g10/tofu.c (write_stats_status): Use the number of days with
13051         signatures / encryptions to compute the validity, not the total number
13052         of signatures / encryptions.
13053         (BASIC_TRUST_THRESHOLD): Adjust given the new semantics.
13054         (FULL_TRUST_THRESHOLD): Likewise.
13055
13056         g10: Extend TOFU_STATS to emit <sign-days> and <encyrption-days>
13057         + commit 94f6b9010d2e80a75ccbb21426faf0b30195f1ab
13058         * doc/DETAILS: Add SIGN-DAYS and ENCRYPT-DAYS to the TOFU_STATS status
13059         line.
13060         * g10/tofu.c (write_stats_status): Take additional parameters
13061         signature_days and encryption_days.  Update callers.  Include them in
13062         the tfs record and TOFU status lines.
13063         (show_statistics): Compute the number of days on which we saw a
13064         message signed by FINGERPRINT, and the number of days on which we
13065         encrypted a message to it.
13066
13067 2016-12-16  Justus Winter  <justus@g10code.com>
13068
13069         doc: Improve section on unattended key generation.
13070         + commit ca02a8b78fca8815388a859962584d75169ae3ee
13071         * doc/gpg.texi: Improve the subsection on unattended key generation by
13072         suggesting the quick key manipulation interface as an alternative, and
13073         by suggesting alternatives to '%pubring' and '%secring'.  Simplify
13074         examples accordingly.
13075
13076         doc: Add documentation for programmatic use of GnuPG.
13077         + commit 116a78eb869c4c589228bd0d6deff7c7a9f92dfb
13078         * doc/gpg.texi: New subsections on programmatic use of GnuPG,
13079         ephemeral home directories, and the quick key manipulation interface.
13080
13081 2016-12-16  Neal H. Walfield  <neal@g10code.com>
13082
13083         g10: On a TOFU conflict, write the conflicting keys to the status fd.
13084         + commit fea9da4a8afab6f3a49cdbbcc4a7a21f27a6d3e8
13085         * g10/tofu.c (ask_about_binding): Emit all of the conflicting keys and
13086         their statistics on the status fd.
13087         (get_trust): Likewise, if we don't call ask_about_binding.
13088         (show_statistics): Have the caller pass the policy as returned by
13089         get_policy.  Add argument only_status_fd and don't emit any output on
13090         stdout if it is set.  Update callers.
13091
13092         g10: Add missing space.
13093         + commit 6caa2d0ba2bfc0ae93878738b0169483f6b6b462
13094         * g10/tofu.c (tofu_register_encryption): Add missing space.
13095
13096 2016-12-15  Justus Winter  <justus@g10code.com>
13097
13098         g10: Avoid translating simple error messages.
13099         + commit 6b16b02109f4bb5b934e456667ff4c0ba7bc85fd
13100         * g10/gpg.c (main): Avoid translating arguments to 'wrong_args'.
13101
13102         g10: Rework the --quick-* interface.
13103         + commit 41ad04d403de05abe54280d2a84aa51a603194e4
13104         * g10/gpg.c (opts): Rename options.
13105         (main): Update errors.
13106         * doc/gpg.texi: Update accordingly.
13107
13108         g10: Rename 'card-edit' to 'edit-card'.
13109         + commit 6e4396723e9e5865015ebf7033628fa3919cf7d1
13110         * g10/gpg.c (opts): Rename option.
13111         * g10/call-agent.c (agent_scd_learn): Update comment.
13112         * doc/gpg.texi: Update accordingly.
13113
13114         g10: Spell out --desig-revoke.
13115         + commit 3c691097ca144e9a1d4c9185636c59a848bec85c
13116         * g10/gpg.c (opts): Rename option.
13117         * doc/gpg.texi: Update accordingly.
13118
13119         g10: Shorten unreasonably long option.
13120         + commit c252627c6fd93bc305c5a5a2f013c3de2d45c6b0
13121         * g10/gpg.c (opts): Rename 'generate-revocation-certificate' to
13122         'generate-revocation'.
13123         * doc/gpg.texi: Update accordingly.
13124         * po: Update translations.
13125
13126         doc: Add aliases of all changed options.
13127         + commit bc6b76ef26f31c54ae1c29c761b8ecc437fcf565
13128         * doc/gpg.texi: Add the old version of every option that was updated
13129         with the last change set.
13130         * doc/gpgsm.texi: Likewise.
13131
13132 2016-12-15  Werner Koch  <wk@gnupg.org>
13133
13134         dirmngr: First patch to re-enable Tor support.
13135         + commit 2d1760ffe2ff46b77bd0f38db8b781d9564ae999
13136         * dirmngr/dns-stuff.c (SOCKS_PORT, TOR_PORT, TOR_PORT2): New
13137         constants.
13138         (libdns_init): Start adding tor support.
13139         (resolve_name_libdns): Pass socks hosts to dns_res_open.
13140         (get_dns_cert_libdns): Ditto.
13141         (getsrv_libdns): Ditto.
13142         (get_dns_cname_libdns): Ditto.
13143
13144 2016-12-15  Justus Winter  <justus@g10code.com>
13145
13146         build: Fix distcheck.
13147         + commit 0e2055c7d30d987a7a74923a7080b80cce470601
13148         * tests/gpgme/Makefile.am (CLEANFILES): New variable, clean test logs.
13149
13150 2016-12-14  Justus Winter  <justus@g10code.com>
13151
13152         tests: Reuse GPGME's tests.
13153         + commit 948cca9c99e701a1668bb5fd6e25f07e35381b4d
13154         * configure.ac (AC_CONFIG_FILES): Add new Makefile.
13155         * tests/Makefile.am (SUBDIRS): Add new directory.
13156         * tests/gpgme/Makefile.am: New file.
13157         * tests/gpgme/gpgme-defs.scm: Likewise.
13158         * tests/gpgme/run-tests.scm: Likewise.
13159         * tests/gpgme/setup.scm: Likewise.
13160         * tests/gpgme/wrap.scm: Likewise.
13161
13162         common: Support locating components in the build tree.
13163         + commit ca1e9749bfb069d90aa44efbf6f3d611b6104c1b
13164         * common/homedir.c (gnupg_build_directory): New variable.
13165         (gnupg_module_name_called): Likewise.
13166         (gnupg_set_builddir): New function.
13167         (gnupg_set_builddir_from_env): Likewise.
13168         (gnupg_module_name): Support locating components in the build tree.
13169         * common/util.h (gnupg_set_builddir): New prototype.
13170         * tests/openpgp/defs.scm (tools): Drop 'gpg and 'gpg-agent.
13171         (tool): Rename to 'tool-hardcoded.
13172         (gpg-conf): New function, with accessors for the results.
13173         (gpg-components): New variable.
13174         (tool): New function.
13175         * tools/gpgconf.c (enum cmd_and_opt_values): New key.
13176         (opts): New option '--build-prefix'.
13177         (main): Handle new option.
13178
13179         tests: Rework check for trust models.
13180         + commit 55dc81125abc43cd3cc8db951fc3b8a81767942d
13181         * tests/openpgp/defs.scm (gpg-has-option?): New function.
13182         (have-opt-always-trust): Use a simpler test for that option.  This way
13183         that is less distracting when we run the tests with verbose=3.
13184
13185 2016-12-14  Werner Koch  <wk@gnupg.org>
13186
13187         dirmngr: New configure option --disable-libdns.
13188         + commit d34a2bb410c7c770d26430d69ff77bd83fc407f1
13189         * configure.ac: Add option --disable-libdns
13190         (USE_LIBDNS): New ac_subst and am_conditional.
13191         (USE_C99_CFLAGS): Set only if libdns is used.
13192         * dirmngr/Makefile.am (dirmngr_SOURCES): Move dns.c and dns.h to ...
13193         (dirmngr_SOURCES) [USE_LIBDNS0: here.
13194         (t_common_src): Ditto.
13195         * dirmngr/dirmngr.c (oRecursiveResolver): New constant.
13196         (opts): New option "--recursive-resolver".
13197         (parse_rereadable_options): Set option.
13198         * dirmngr/t-dns-stuff.c (main): Add option --recursive-resolver.
13199         * dirmngr/server.c (cmd_getinfo): Depend output of "dnsinfo" on the
13200         new variables.
13201         * dirmngr/dns-stuff.c: Include dns.h only if USE_DNSLIB is defined.
13202         Also build and call dnslib functions only if USE_DNSLIB is defined.
13203         (recursive_resolver): New var.
13204         (enable_recursive_resolver): New func.
13205         (recursive_resolver_p): New func.
13206
13207         dirmngr: Implement CERT record lookup via libdns.
13208         + commit 3c2a7918eac024b5e1258ea9b272b4e8a1f1af43
13209         * dirmngr/dns-stuff.c (get_dns_cert_libdns): New.
13210         (get_dns_cert_standard): Fix URL malloc checking.
13211
13212         dirmngr: Implement CNAME and SRV record lookup via libdns.
13213         + commit 4c13e4e3debe0e55e86ae29c095f2d86eb0a6f11
13214         * dirmngr/dns-stuff.c (dns_free): New macro.
13215         (libdns): Move var to the top.
13216         (libdns_error_to_gpg_error): Map error codes to the new gpg-error
13217         codes.
13218         (resolve_name_libdns): Restructure code.
13219         (getsrv_libdns): New.
13220         (get_dns_cname_libdns): New.
13221
13222         dirmngr: Fix bugs in the standard resolver code.
13223         + commit 4a030f682ef48542ed324b28207f2c2b4847dbef
13224         * dirmngr/dns-stuff.c: Include dirmngr-err.h to set the correct error
13225         source.
13226         (get_h_errno_as_gpg_error): New.
13227         (get_dns_cert_libdns): Fix error code.
13228         (getsrv_libdns): Add arg R_COUNT and return an error code.
13229         (getsrv_standard): Ditto.  Fix handling of res_query errors and
13230         provide the correct size for the return buffer.
13231         (getsrv): Adjust for changed worker functions.
13232         (get_dns_cname_standard): Fix handling of res_query errors and provide
13233         the correct size for the return buffer.
13234
13235         dirmngr: Require a c99 compiler.
13236         + commit 392966aed9b2a5e1456c671e5d13b561a27e4bb2
13237         * configure.ac (USE_C99_CFLAGS): New ac_subst.  Set to -std=gnu99 for
13238         gcc.
13239         * dirmngr/Makefile.am (AM_CFLAGS): Add USE_C99_CFLAGS.
13240         (t_http_CFLAGS): Ditto.
13241         (t_ldap_parse_uri_CFLAGS): Ditto.
13242         (t_dns_stuff_CFLAGS): Ditto.
13243
13244         doc: Add license notes for libdns.
13245         + commit d84f5a88233c073a82fd47728574b001343784ee
13246         * COPYING.other: New.
13247         * Makefile.am (EXTRA_DIST): Add it.
13248         * AUTHORS: Add info on libdns.
13249         * build-aux/speedo/w32/pkg-copyright.txt: Add license terms.
13250
13251         common: Add replacements for error codes from gpg-error 1.26.
13252         + commit aae68a3ccd3d9870162b3ffd49eae08d5bf1b1e1
13253
13254
13255 2016-12-14  Justus Winter  <justus@g10code.com>
13256
13257         dirmngr: New libdns snapshot.
13258         + commit f8ab2c4c70ad15c4b2e45492606fb94ddaccdac7
13259
13260
13261         dirmngr: Add basic libdns support.
13262         + commit f6acd0426453d3a18536ca69d63baa0d971082ef
13263         * dirmngr/dns.c: New file.
13264         * dirmngr/dns.h: New file.
13265         * dirmngr/Makefile.am (dirmngr_SOURCES): Add new files.
13266         * dirmngr/dns-stuff.c: Include dns.h.xxx use libdns
13267         (libdns): New global var for the libdns state.
13268         (libdns_error_to_gpg_error): New.
13269         (libdns_init): New.
13270         (resolve_name_libdns): New.
13271         (get_dns_cert_libdns): New stub.
13272         (getsrv_libdns): New stub.
13273         (get_dns_cname_libdns): New stub.
13274
13275         dirmngr,build: Remove support for ADNS.
13276         + commit 2e734a3ce159de8fb60df2bd5d454f98ca710717
13277         * autogen.rc: Remove '--with-adns' argument.
13278         * configure.ac: Remove check for ADNS.
13279         * dirmngr/dns-stuff.c: Remove all code that uses ADNS.
13280         * dirmngr/server.c (cmd_getinfo): Update status line.
13281         * doc/dirmngr.texi: Do not mention ADNS.
13282
13283 2016-12-14  NIIBE Yutaka  <gniibe@fsij.org>
13284
13285         dirmngr: Improve ntbtls support.
13286         + commit 57aa42ce9b28bc17ac24491d595766fbf80762af
13287         * dirmngr/http.c [HTTP_USE_NTBTLS] (close_tls_session): Release.
13288         (send_request): Call ntbtls_set_transport.
13289         (cookie_read, cookie_write): Implement.
13290         (cookie_close): Add initial implementation for ntbtls.
13291
13292 2016-12-13  Justus Winter  <justus@g10code.com>
13293
13294         g10,sm: Spell out --passwd.
13295         + commit c1c35fb887061de05661f3411eda97546e1a52d7
13296         * g10/gpg.c (opts): Spell out option.
13297         * sm/gpgsm.c (opts): Likewise.
13298         * doc/gpg.texi: Update accordingly.
13299         * doc/gpgsm.texi: Likewise.
13300
13301         g10: Spell out --gen-revoke.
13302         + commit ec1bd3ae685e95563e38077ab3c1655fd55dea07
13303         * g10/gpg.c (opts): Spell out option.
13304         * doc/gpg.texi: Update accordingly.
13305         * po: Update translations.
13306
13307         g10: Spell out --full-gen-key.
13308         + commit 09163a6390bd9713f3a7946de739765b30ef6f64
13309         * g10/gpg.c (opts): Spell out option.
13310         (main): Likewise.
13311         * g10/keygen.c (generate_keypair): Likewise.
13312         * doc/gpg.texi: Update accordingly.
13313
13314         g10,sm: Spell out --gen-key.
13315         + commit 892c827e72b1396e3b58e2f8869cc48328a2b59c
13316         * g10/gpg.c (opts): Spell out option.
13317         * sm/gpgsm.c (opts): Likewise.
13318         * doc/gpg.texi: Update accordingly.
13319
13320         g10,sm: Spell out --check-sigs.
13321         + commit 9147737f1c6894f38b855f3cf38cd33122a1ae2a
13322         * g10/gpg.c (opts): Spell out option.
13323         * sm/gpgsm.c (opts): Likewise.
13324         * doc/gpg.texi: Update accordingly.
13325
13326         g10,sm: Spell out --list-sigs.
13327         + commit a6d6e4afe488bc05ee730e85da6a9505c6cd245a
13328         * g10/gpg.c (opts): Spell out option.
13329         * sm/gpgsm.c (opts): Likewise.
13330         * doc/gpg.texi: Update accordingly.
13331
13332         g10: Hyphenate --clearsign.
13333         + commit 04754ce3a704b1e6d38cb9a28dacf2821dc3f15f
13334         * g10/gpg.c (opts): Hyphenate option.
13335         * doc/gpg.texi: Update accordingly.
13336         * po: Update translations.
13337         * tests/openpgp: Update tests.
13338
13339         g10: Spell out --recv-keys.
13340         + commit ca598152345b40f3a236227dfc63ae04ddf777d7
13341         * g10/gpg.c (opts): Spell out option.
13342         * doc/gpg.texi: Update accordingly.
13343
13344         g10: Create expiring keys in quick key generation mode.
13345         + commit dd3dde07a9a46130ac01d849f8edf0566e44f11f
13346         * doc/gpg.texi: Document that fact.
13347         * g10/keygen.c (quick_generate_keypair): Use a default value.
13348         * tests/openpgp/quick-key-manipulation.scm: Test that fact.
13349
13350         gpgscm: Print failed and skipped tests.
13351         + commit 429891a704057437517cb0b45d11392b40fa1ee8
13352         * tests/gpgscm/tests.scm (test-pool::report): Print failed and skipped
13353         tests at the end.
13354
13355         gpgscm: Generalize the test runner.
13356         + commit d43dabf4607d3bcfc217eb9aea34d093f5aa698f
13357         * tests/gpgscm/tests.scm (test::scm) Add explicit name argument.
13358         (test::binary): Likewise.  Also, add missing unquote.
13359         * tests/openpgp/run-tests.scm: Adapt accordingly.
13360
13361         gpgscm: Move the test runner to the Scheme library.
13362         + commit 1a176b92a8aad42056ed2c4e1f49a5feb40770cf
13363         * tests/openpgp/run-tests.scm: Move most of the code...
13364         * tests/gpgscm/tests.scm: ... here.
13365
13366         tests: Refactor test runner.
13367         + commit fe36e63763c9c595bb057ac50160d2aff7c7a63f
13368         * tests/openpgp/run-tests.scm (locate-test): New function.
13369         (test): Factor-out the code starting the child process.
13370         (test::binary): New function.
13371
13372         gpgscm: Improve library functions.
13373         + commit e3876f16eb237bdeb9f79aca2e7db5e9e2d86686
13374         * tests/gpgscm/tests.scm (absolute-path?): New function.
13375         (canonical-path): Use the new function.
13376         * tests/gpgscm/lib.scm (string-split-pln): New function.
13377         (string-indexp, string-splitp): Likewise.
13378         (string-splitn): Express using the above function.
13379         (string-ltrim, string-rtrim): Fix corner case.
13380         (list->string-reversed): New function.
13381         (read-line): Fix performance.
13382
13383 2016-12-12  Werner Koch  <wk@gnupg.org>
13384
13385         gpg: Fix memory leak in ecc key generation.
13386         + commit 98433c70431dfbde99b0e89416856d1eef9ebc88
13387         * g10/keygen.c (ecckey_from_sexp): Release curve.
13388
13389         gpg: Do not use a fixed string for --gpgconf-list:default_pubkey_algo.
13390         + commit f1304ee9b21e6ceac6c13d04ceddd23fadb5c7f1
13391         * g10/keygen.c (get_default_pubkey_algo): New.
13392         (parse_key_parameter_string): Use it.
13393         * g10/gpg.c (gpgconf_list): Take value from new function.
13394
13395         gpg: Fix algo string parsing of --quick-addkey.
13396         + commit 522e6f798db9f3f3a9e0123fdc389a86ac69dedf
13397         * g10/keygen.c (parse_key_parameter_string): Fix handling of PART==1.
13398         (parse_key_parameter_part): Use default key size if only "rsa", "dsa",
13399         or "elg" is given.
13400
13401 2016-12-09  Justus Winter  <justus@g10code.com>
13402
13403         g10: Create keys that expire in simple key generation mode.
13404         + commit d568a1561642ed9b7b7b6282b86c56786d10a956
13405         * g10/keygen.c (default_expiration_interval): New variable.
13406         (generate_keypair): Use the new default.
13407
13408         tests: Add a test for '--quick-addkey'.
13409         + commit b778d8deedf344c8116362633925b8153c7f1bf1
13410         * tests/openpgp/quick-key-manipulation.scm: Test '--quick-addkey'.
13411
13412         tests: New test using all available compression algorithms.
13413         + commit 59f1562c25119a4fe27411e6350f2149d6147148
13414         * tests/openpgp/Makefile.am (XTESTS): Add new test.
13415         * tests/openpgp/compression.scm: New file.
13416         * tests/openpgp/defs.scm (all-compression-algos): New variable.
13417
13418         g10: List compression algorithms using human-readable names.
13419         + commit c8100fc0faadf8ba35e4df32b4760cc975e3a83d
13420         * g10/gpg.c (list_config): List all enabled compression algorithms
13421         under the key 'compressname'.
13422
13423         g10: Fix memory leak.
13424         + commit 3de9bad359e28ced4a2539e411d222ffd82a4a62
13425         * g10/sign.c (do_sign): Release old signature data.
13426
13427 2016-12-08  Werner Koch  <wk@gnupg.org>
13428
13429         common: Skip the Byte Order Mark in conf files.
13430         + commit 5c7d58222834793629a30248e72b6ea96e832dc4
13431         * common/argparse.c (optfile_parse): Detect and skip the UTF-8 BOM.
13432
13433         Fix 2 compiler warnings.
13434         + commit cb4c7abb774e2d95806d8b0ec6ea5cd130c1b5b8
13435         * dirmngr/loadswdb.c: Set ERR on malloc failure.
13436         * g10/passphrase.c (passphrase_to_dek): Initialize all fields of
13437         HELP_S2K.
13438
13439         wks: New option --status-fd for gpg-wks-client.
13440         + commit 4a04277ad112e0966296133795f93cf6a3daa48e
13441         * tools/wks-util.c: Include status.h.
13442         (statusfp): New global var.
13443         (wks_set_status_fd): New func.
13444         (wks_write_status): New func.
13445         * tools/gpg-wks-client.c: Include status.h.
13446         (oStatusFD): New constant.
13447         (opts): New option --status-fd.
13448         (parse_arguments): Handle that option.
13449         (main): Return STATUS_SUCCESS or STATUS_FAILURE.
13450
13451 2016-12-08  Justus Winter  <justus@g10code.com>
13452
13453         gpgscm: Better error reporting.
13454         + commit e7429b1ced0c69fa7901f888f8dc25f00fc346a4
13455         * tests/gpgscm/ffi.scm: Move the customized exception handling and
13456         atexit logic...
13457         * tests/gpgscm/init.scm: ... here.
13458         (throw): Record the current history.
13459         (throw'): New function that is history-aware.
13460         (rethrow): New function.
13461         (*error-hook*): Use the new throw'.
13462         * tests/gpgscm/main.c (load): Fix error handling.
13463         (main): Save and use the 'sc->retcode' as exit code.
13464         * tests/gpgscm/repl.scm (repl): Print call history.
13465         * tests/gpgscm/scheme.c (_Error_1): Make a snapshot of the history,
13466         use it to provide a accurate location of the expression causing the
13467         error at runtime, and hand the history trace to the '*error-hook*'.
13468         (opexe_5): Tag all lists at parse time with the current location.
13469         * tests/gpgscm/tests.scm: Update calls to 'throw', use 'rethrow'.
13470
13471         gpgscm: Keep a history of calls for error messages.
13472         + commit 404e8a4136bbbab39df7dd5119841e131998cc15
13473         * tests/gpgscm/init.scm (vm-history-print): New function.
13474         * tests/gpgscm/opdefines.h: New opcodes 'CALLSTACK_POP', 'APPLY_CODE',
13475         and 'VM_HISTORY'.
13476         * tests/gpgscm/scheme-private.h (struct history): New definition.
13477         (struct scheme): New field 'history'.
13478         * tests/gpgscm/scheme.c (gc): Mark objects in the history.
13479         (history_free): New function.
13480         (history_init): Likewise.
13481         (history_mark): Likewise.
13482         (add_mod): New macro.
13483         (sub_mod): Likewise.
13484         (tailstack_clear): New function.
13485         (callstack_pop): Likewise.
13486         (callstack_push): Likewise.
13487         (tailstack_push): Likewise.
13488         (tailstack_flatten): Likewise.
13489         (callstack_flatten): Likewise.
13490         (history_flatten): Likewise.
13491         (opexe_0): New variable 'callsite', keep track of the expression if it
13492         is a call, implement the new opcodes, record function applications in
13493         the history.
13494         (opexe_6): Implement new opcode.
13495         (scheme_init_custom_alloc): Initialize history.
13496         (scheme_deinit): Free history.
13497         * tests/gpgscm/scheme.h (USE_HISTORY): New macro.
13498
13499         gpgscm: Add flag TAIL_CONTEXT.
13500         + commit 01256694f006405c54bc2adef63ef0c8f07da9ee
13501         * tests/gpgscm/scheme.c (S_FLAG_TAIL_CONTEXT): New macro.  This flag
13502         indicates that the interpreter is evaluating an expression in a tail
13503         context (see R5RS, section 3.5).
13504         (opexe_0): Clear and set the flag according to the rules layed out in
13505         R5RS, section 3.5.
13506         (opexe_1): Likewise.
13507
13508         gpgscm: Add flags to the interpreter.
13509         + commit a4a69163d9d7e4d9f3339eb5cda0afb947180b26
13510         * tests/gpgscm/scheme-private.h (struct scheme): Add field 'flags'.
13511         * tests/gpgscm/scheme.c (S_OP_MASK): New macro.
13512         (S_FLAG_MASK, s_set_flag, s_clear_flag, s_get_flag): Likewise.
13513         (_s_return): Unpack the encoded opcode and flags.
13514         (s_save): Encode the flags along with the opcode.  Use normal
13515         integers to encode the result.
13516         (scheme_init_custom_alloc): Initialize 'op' and 'flags'.
13517
13518         gpgscm: Implement tags.
13519         + commit fcf5aea44627def43425d03881e20902e7c0331e
13520         * tests/gpgscm/opdefines.h: Add opcodes to create and retrieve tags.
13521         * tests/gpgscm/scheme.c (T_TAGGED): New macro.
13522         (mk_tagged_value): New function.
13523         (has_tag): Likewise.
13524         (get_tag): Likewise.
13525         (mark): Mark tag.
13526         (opexe_4): Implement new opcodes.
13527         * tests/gpgscm/scheme.h (USE_TAGS): New macro.
13528
13529 2016-12-08  Werner Koch  <wk@gnupg.org>
13530
13531         gpg: Fix the fix out-of-bounds access.
13532         + commit a75790b74095828f967c012eff7033f570d93077
13533         * g10/tofu.c (build_conflict_set): Revert to int* and fix calloc.
13534
13535         wks: New option --check for gpg-wks-client.
13536         + commit d8c5e8ccfdb53cc327f7520fc7badc31d0c9c666
13537         * tools/call-dirmngr.c (wkd_get_key): New.
13538         * tools/gpg-wks-client.c (aCheck): New constant.
13539         (opts): New option "--check".
13540         (main): Call command_check.
13541         (command_check): New.
13542
13543         tools: Move a function from gpg-wks-server to wks-util.c.
13544         + commit c3138decd77d788906885b638b344d0d1faf32c0
13545         * tools/gpg-wks-server.c (list_key_status_cb): Remove.
13546         (list_key): Move to ...
13547         * tools/wks-util.c (wks_list_key): here and rename.  Add new args
13548         R_FPR and R_MBOXES and remove the CTX.
13549         (list_key_status_cb): New.
13550         * tools/wks-util.c: Include ccparray.h, exectool.h, and mbox-util.h.
13551         * tools/gpg-wks-server.c (process_new_key): Replace list_key by
13552         wks_list_key.
13553         (check_and_publish): Ditto.
13554
13555 2016-12-08  Justus Winter  <justus@g10code.com>
13556
13557         gpgscm: Generalize 'for-each-p'.
13558         + commit a2bedc8ac6fcdcd1de0a9fa3d540006481387dff
13559         * tests/gpgscm/tests.scm (for-each-p): Generalize to N lists like
13560         for-each.
13561         (for-each-p'): Likewise.
13562
13563         g10: Fix out-of-bounds access.
13564         + commit 3b5b94ceab7c0ed9501c5cf54b4efa17fcd7300a
13565         * g10/tofu.c (build_conflict_set): Use 'char'.
13566
13567 2016-12-08  Werner Koch  <wk@gnupg.org>
13568
13569         tools: Fix use of uninitialized var in mime-maker.
13570         + commit dd03667ab1062bba3b9413c3f8007d63302d1b31
13571         * tools/mime-maker.c (ensure_part): Make sure to set R_PARENT on
13572         error.
13573         (add_missing_headers): Ensure that ERR is set on success.
13574
13575         * tools/wks-util.c (wks_parse_policy): Fix indentation.
13576
13577         tools: Fix memleak in gpgconf.
13578         + commit b265969154741bf9f93167699fe7ddda1d485265
13579         * tools/gpgconf.c (main): Free SOCKETDIR.
13580
13581         gpg: Fix portability problem.
13582         + commit c3008bffac68b6f31e9ae9bad837cdce5de7c0db
13583         * g10/tofu.c (build_conflict_set): Replace variable dynamic array.
13584
13585 2016-12-07  Justus Winter  <justus@g10code.com>
13586
13587         tests: Add test for '--quick-set-expire'.
13588         + commit dec2ae31a46a0f41886c7ad228865cc573f2dea9
13589         * tests/openpgp/quick-key-manipulation.scm: Test '--quick-set-expire'.
13590
13591         tests: Improve quick key manipulation test.
13592         + commit 92df40a3a2ae471fbba00d6d7040230404931fd4
13593         * tests/openpgp/quick-key-manipulation.scm: Do not update the trust
13594         database, rather be more specific when filtering the user ids.
13595
13596 2016-12-06  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
13597
13598         agent: Respect --enable-large-secmem.
13599         + commit 8636ad5023a1bdc527add40a5508f8c5b7c35221
13600         * agent/gpg-agent.c (main): Initialize secmem to the configured buffer
13601         size.
13602
13603 2016-12-06  Justus Winter  <justus@g10code.com>
13604
13605         tests: Add test importing a revocation certificate.
13606         + commit e352ead43fbb0180e1f1c71bf1a000d1954eb777
13607         * tests/openpgp/Makefile.am (XTESTS): Add new test.
13608         * tests/openpgp/import-revocation-certificate.scm: New file.
13609         * tests/openpgp/samplemsgs/revoke-2D727CC768697734.asc: Likewise.
13610
13611         tests: Rename 'error' to 'fail'.
13612         + commit 5b5d881f47c82f320abf440c20b7a1bac078a987
13613         * tests/gpgscm/tests.scm (error): Rename to 'fail'.  'error' is a
13614         primitive function (an opcode) of the TinySCHEME vm, and 'error' is
13615         also defined by R6RS.  Better avoid redefining that.  Fix all call
13616         sites.
13617         * tests/openpgp/4gb-packet.scm: Adapt.
13618         * tests/openpgp/decrypt-multifile.scm: Likewise.
13619         * tests/openpgp/ecc.scm: Likewise.
13620         * tests/openpgp/export.scm: Likewise.
13621         * tests/openpgp/gpgtar.scm: Likewise.
13622         * tests/openpgp/gpgv-forged-keyring.scm: Likewise.
13623         * tests/openpgp/import.scm: Likewise.
13624         * tests/openpgp/issue2015.scm: Likewise.
13625         * tests/openpgp/issue2346.scm: Likewise.
13626         * tests/openpgp/issue2419.scm: Likewise.
13627         * tests/openpgp/key-selection.scm: Likewise.
13628         * tests/openpgp/mds.scm: Likewise.
13629         * tests/openpgp/multisig.scm: Likewise.
13630         * tests/openpgp/setup.scm: Likewise.
13631         * tests/openpgp/signencrypt.scm: Likewise.
13632         * tests/openpgp/ssh-import.scm: Likewise.
13633         * tests/openpgp/tofu.scm: Likewise.
13634         * tests/openpgp/verify.scm: Likewise.
13635
13636         tests: Remove debugging display.
13637         + commit 89ac071eb4c7539e98c7dc17e11f57c620b54e90
13638         * tests/openpgp/tofu.scm: Remove debugging display.
13639
13640 2016-12-06  Neal H. Walfield  <neal@g10code.com>
13641
13642         tests: Update distributed files.
13643         + commit 87972fdef2cd853fb97624d0765686674a19e3c4
13644         * tests/openpgp/Makefile.am (TEST_FILES): Remove tofu-keys.asc,
13645         tofu-keys-secret.asc, tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and
13646         tofu-EE37CF96-1.txt.  Add tofu/conflicting/1C005AF3.gpg,
13647         tofu/conflicting/1C005AF3-secret.gpg, tofu/conflicting/1C005AF3-1.txt,
13648         tofu/conflicting/1C005AF3-2.txt, tofu/conflicting/1C005AF3-3.txt,
13649         tofu/conflicting/1C005AF3-4.txt, tofu/conflicting/1C005AF3-5.txt,
13650         tofu/conflicting/B662E42F.gpg, tofu/conflicting/B662E42F-secret.gpg,
13651         tofu/conflicting/B662E42F-1.txt, tofu/conflicting/B662E42F-2.txt,
13652         tofu/conflicting/B662E42F-3.txt, tofu/conflicting/B662E42F-4.txt,
13653         tofu/conflicting/B662E42F-5.txt, tofu/conflicting/BE04EB2B.gpg,
13654         tofu/conflicting/BE04EB2B-secret.gpg, tofu/conflicting/BE04EB2B-1.txt,
13655         tofu/conflicting/BE04EB2B-2.txt, tofu/conflicting/BE04EB2B-3.txt,
13656         tofu/conflicting/BE04EB2B-4.txt, tofu/conflicting/BE04EB2B-5.txt and
13657         tofu/conflicting/README.
13658
13659         doc: Improve the text in the gpg manual.
13660         + commit 7572d270fcda1614648c6f08d711d5096ffebbe6
13661         * doc/gpg.texi: Improve the text.
13662
13663         g10: Avoid a memory leak.
13664         + commit 6102099985c1b82b6c0bba0464c1f913cc673e96
13665         * g10/gpg.c (main): Free KB when we're done with it.
13666
13667         tests: Change (interactive-shell) to start an interactive shell.
13668         + commit db6d8cfdc118131f497596ef1ffc121949377754
13669         * tests/gpgscm/tests.scm (interactive-shell): Start an interactive
13670         shell.
13671
13672         tests: Check the signature count in the TOFU TFS record.
13673         + commit 17c717d7c92d9a52101fea7e396fc133322a8786
13674         * tests/openpgp/tofu.scm: Check the signature count in the TOFU TFS
13675         record.
13676
13677         tests: Replace data used by the TOFU conflict test.
13678         + commit d5b18d6c55d65e8df2dd112651e3b9b3d9e6e27a
13679         * tests/openpgp/tofu-2183839A-1.txt: Remove file.
13680         * tests/openpgp/tofu-BC15C85A-1.txt: Remove file.
13681         * tests/openpgp/tofu-EE37CF96-1.txt: Remove file.
13682         * tests/openpgp/tofu-keys-secret.asc: Remove file.
13683         * tests/openpgp/tofu-keys.asc: Remove file.
13684         * tests/openpgp/tofu/conflicting/1C005AF3.gpg: New file.
13685         * tests/openpgp/tofu/conflicting/1C005AF3-secret.gpg: New file.
13686         * tests/openpgp/tofu/conflicting/1C005AF3-1.txt: New file.
13687         * tests/openpgp/tofu/conflicting/1C005AF3-2.txt: New file.
13688         * tests/openpgp/tofu/conflicting/1C005AF3-3.txt: New file.
13689         * tests/openpgp/tofu/conflicting/1C005AF3-4.txt: New file.
13690         * tests/openpgp/tofu/conflicting/1C005AF3-5.txt: New file.
13691         * tests/openpgp/tofu/conflicting/B662E42F.gpg: New file.
13692         * tests/openpgp/tofu/conflicting/B662E42F-secret.gpg: New file.
13693         * tests/openpgp/tofu/conflicting/B662E42F-1.txt: New file.
13694         * tests/openpgp/tofu/conflicting/B662E42F-2.txt: New file.
13695         * tests/openpgp/tofu/conflicting/B662E42F-3.txt: New file.
13696         * tests/openpgp/tofu/conflicting/B662E42F-4.txt: New file.
13697         * tests/openpgp/tofu/conflicting/B662E42F-5.txt: New file.
13698         * tests/openpgp/tofu/conflicting/BE04EB2B.gpg: New file.
13699         * tests/openpgp/tofu/conflicting/BE04EB2B-secret.gpg: New file.
13700         * tests/openpgp/tofu/conflicting/BE04EB2B-1.txt: New file.
13701         * tests/openpgp/tofu/conflicting/BE04EB2B-2.txt: New file.
13702         * tests/openpgp/tofu/conflicting/BE04EB2B-3.txt: New file.
13703         * tests/openpgp/tofu/conflicting/BE04EB2B-4.txt: New file.
13704         * tests/openpgp/tofu/conflicting/BE04EB2B-5.txt: New file.
13705         * tests/openpgp/tofu/conflicting/README: New file.
13706         * tests/openpgp/tofu.scm: Update accordingly.
13707
13708         g10: Remove dead code.
13709         + commit bd9ebe1404c1395edd0e029023a9e780c90f6d73
13710         * g10/tofu.c (tofu_set_policy_by_keyid): Remove function.
13711
13712 2016-12-05  Werner Koch  <wk@gnupg.org>
13713
13714         gpg: New option --quick-set-expire.
13715         + commit 41b3d0975de65d1654f5e37c626d7c9b7c9a7a4d
13716         * g10/gpg.c (aQuickSetExpire): New.
13717         (opts): New option --quick-set-expire.
13718         (main): Implement option.
13719         * g10/keyedit.c (menu_expire): Add args FORCE_MAINKEY and
13720         NEWEXPIRATION.  Change semantics of the return value.  Change caller.
13721         (keyedit_quick_set_expire): New.
13722
13723 2016-12-05  Justus Winter  <justus@g10code.com>
13724
13725         tests: New test for '--enarmor' and '--dearmor'.
13726         + commit fae4d06b0ccaa9803e0c0da56c327b0bcfffcac5
13727         * tests/openpgp/Makefile.am (XTESTS): Add new test.
13728         * tests/openpgp/enarmor.scm: New file.
13729
13730 2016-12-03  Werner Koch  <wk@gnupg.org>
13731
13732         gpg: Fix error code arg in ERRSIG status line.
13733         + commit ef10c348bffc7dad19e1832bebc453755d209420
13734         * g10/mainproc.c (check_sig_and_print): Use gpg_err_code to return an
13735         error code in ERRSIG.
13736
13737 2016-12-02  Werner Koch  <wk@gnupg.org>
13738
13739         gpg: New option --default-new-key-algo.
13740         + commit ce29272e24e7b718b8fca9b84bc728e65f3dea24
13741         * common/openpgp-oid.c (openpgp_is_curve_supported): Add optional arg
13742         R_ALGO and change all callers.
13743         * common/util.h (GPG_ERR_UNKNOWN_FLAG): New error code.
13744         * g10/options.h (struct opt): Add field DEF_NEW_KEY_ALGO.
13745         * g10/gpg.c (oDefaultNewKeyAlgo): New enum.
13746         (opts): New option "--default-new-key-algo".
13747         (main): Set the option.
13748         * g10/keygen.c: Remove DEFAULT_STD_ FUTURE_STD_ constants and replace
13749         them by ...
13750         (DEFAULT_STD_KEY_PARAM, FUTURE_STD_KEY_PARAM): new string constants.
13751         (get_keysize_range): Remove arg R_DEF and return that value instead.
13752         Change all callers.
13753         (gen_rsa): Use get_keysize_range instead of the removed
13754         DEFAULT_STD_KEYSIZE.
13755         (parse_key_parameter_part): New function.
13756         (parse_key_parameter_string): New function.
13757         (quick_generate_keypair): Refactor using parse_key_parameter_string.
13758         (generate_keypair): Ditto.
13759         (parse_algo_usage_expire): Ditto.
13760
13761 2016-12-02  Neal H. Walfield  <neal@g10code.com>
13762
13763         g10: Improve debugging output.
13764         + commit cd532bb7b866e104304e2443cc942799c385daa5
13765         * g10/tofu.c (string_to_long): Improve debugging output.
13766         (string_to_ulong): Likewise.
13767
13768 2016-12-01  Neal H. Walfield  <neal@g10code.com>
13769
13770         g10: In the TOFU module, make strings easier to translate.
13771         + commit bd1a1d8582abcfd7f29812942fa70f88d0aec7cf
13772         * g10/tofu.c: Remove dead code.
13773         (time_ago_str): Simplify implementation since we only want the most
13774         significant unit.
13775         (format_conflict_msg_part1): Use ngettext.
13776         (ask_about_binding): Likewise and only emit full sentences.
13777         (show_statistics): Likewise.
13778
13779 2016-12-01  Werner Koch  <wk@gnupg.org>
13780
13781         dirmngr: Add option --standard-resolver.
13782         + commit 304566d3327ef0a85188cce3109d46d5ff47177a
13783         * dirmngr/dirmngr.c (oStandardResolver): New constant.
13784         (opts): New option --standard-resolver.
13785         (parse_rereadable_options): Set option.
13786         * dirmngr/dns-stuff.c: Refactor all code to support the new option.
13787         (standard_resolver): New var.
13788         (enable_standard_resolver, standard_resolver_p): New func.
13789         * dirmngr/http.c (connect_server): Remove USE_DNS_SRV build
13790         conditional.
13791         * dirmngr/ks-engine-hkp.c (map_host): Ditto.
13792         * dirmngr/server.c (cmd_getinfo) <dnsinfo>: Take care of new option
13793         * configure.ac (HAVE_ADNS_IF_TORMODE): Remove var ADNSLIB.  ac_define
13794         USE_ADNS in the adns checking code.  Remove options --disable-dns-srv
13795         and --disable-dns-cert.  Always look for the system resolver.  Print
13796         warning if no system resolver was found.
13797         (USE_DNS_CERT, USE_DNS_SRV): Remove ac_defines.
13798         (HAVE_SYSTEM_RESOLVER): New ac_define.
13799         (USE_DNS_SRV): Remove am_conditional; not used anyway.
13800
13801         gpg: Let only Dirmngr decide whether CERT is supported.
13802         + commit 86efc3ee53abaf1e22b53c1b360c51829e476115
13803         * g10/getkey.c (parse_auto_key_locate): Do not build parts depending
13804         on USE_DNS_CERT.
13805
13806 2016-12-01  Justus Winter  <justus@g10code.com>
13807
13808         tests,build: Fix distcheck.
13809         + commit fbdfe6a514a95fb46f2b811a13709024e2baf252
13810         * tests/openpgp/Makefile.am (sample_msgs): Add messages required for
13811         the new test 'verify-multifile.scm'.
13812
13813         tests: Add test for '--verify --multifile'.
13814         + commit 12af8e84a32df728462da09a00a8bec24a487720
13815         * tests/openpgp/Makefile.am (XTESTS): Add new test.
13816         * tests/openpgp/verify-multifile.scm: New file.
13817
13818 2016-11-30  Justus Winter  <justus@g10code.com>
13819
13820         tests: Add test for '--encrypt --multifile'.
13821         + commit 3c0569e99498c7470ebdb639b4c5ae829af92761
13822         * tests/openpgp/Makefile.am (XTESTS): Add new test.
13823         * tests/openpgp/encrypt-multifile.scm: New file.
13824
13825 2016-11-29  Werner Koch  <wk@gnupg.org>
13826
13827         agent,dirmngr: Tiny restructuring.
13828         + commit aa6ab9e0bc67fe9ce5601047e84ea4a875e8eb64
13829         * agent/gpg-agent.c (handle_connections): Add a comment.
13830         * dirmngr/dirmngr.c (main): Move assuan_sock_close of the listening
13831         socket to ...
13832         (handle_connections): here.  Add a comment why we keep the
13833         listening socket open during a shutdown.
13834
13835         agent,dirmngr: Handle corner case in shutdown mode.
13836         + commit 854adc8ae19749e44cb79dfa0c5401f48012b13a
13837         * agent/gpg-agent.c (handle_connections): Keep on selecting on the
13838         inotify fd even when a shutdown is pending.
13839         * dirmngr/dirmngr.c (handle_connections): Ditto.  Also simplifyy the
13840         use of the HAVE_INOTIFY_INIT cpp conditional.
13841
13842         gpgsm: Allow decryption with a card returning a PKCS#1 stripped key.
13843         + commit 8489b12211098ad58c008cfb74b5cb91849cf68d
13844         * sm/decrypt.c (prepare_decryption): Handle a 16 byte session key.
13845
13846         agent,w32: Initialize nPth in server mode.
13847         + commit 81d6e98cdf4caa3aa92398fc3b8bed397b40f58d
13848         * agent/gpg-agent.c (main) [W32]: Call initialize_modules in server
13849         mode.
13850
13851         gpg: Make --decrypt with output '-&nnnn' work.
13852         + commit a5910e00ace882b8a17169faf4607163ab454af9
13853         * g10/plaintext.c (get_output_file): Check and open special filename
13854         before falling back to stdout.
13855
13856         gpg,sm: Merge the two versions of check_special_filename.
13857         + commit 60b4982836a00ef6b2a97d16f735b3f6b74dce62
13858         * sm/gpgsm.c (check_special_filename): Move to ..
13859         * common/sysutils.c (check_special_filename): here.  Add arg
13860         NOTRANSLATE.
13861         (allow_special_filenames): New local var.
13862         (enable_special_filenames): New public functions.
13863         * sm/gpgsm.c (allow_special_filenames): Remove var.
13864         (main): Call enable_special_filenames instead of setting the var.
13865         (open_read, open_es_fread, open_es_fwrite): Call
13866         check_special_filename with 0 for NOTRANSLATE.
13867         * common/iobuf.c (special_names_enabled): Remove var.
13868         (iobuf_enable_special_filenames): Remove func.
13869         (check_special_filename): Remove func.
13870         (iobuf_is_pipe_filename): Call new version of the function with
13871         NOTRANSLATE set.
13872         (do_open): Ditto.
13873         * g10/gpg.c (main): Call enable_special_filenames instead of
13874         iobuf_enable_special_filenames.
13875         * g10/gpgv.c (main): Ditto.
13876
13877 2016-11-29  Justus Winter  <justus@g10code.com>
13878
13879         g10: Fix memory leak.
13880         + commit 52385a2ba1bf7e53f500ffde5fd34f28e69cf76b
13881         * g10/decrypt.c (decrypt_messages): Properly decrease the reference
13882         count of the armor filters after pushing them.
13883
13884         tools,build: Build WKS tools against libintl.
13885         + commit 9fb5e9c14557f7567cbc7c50b9881b7d7bfa2f12
13886         * tools/Makefile.am (gpg_wks_server_LDADD): Link against libintl.
13887         (gpg_wks_client_LDADD): Likewise.
13888
13889 2016-11-29  Neal H. Walfield  <neal@g10code.com>
13890
13891         Improve some comments.
13892         + commit 522f74f7e377135cf098b6b0b9b35284c1dfc963
13893
13894
13895         g10: Extend TOFU_STATS to always show the validity.
13896         + commit 2f27cb12e30c9f6e780354eecc3ff0039ed52c63
13897         * doc/DETAILS (TOFU_STATS): Rename the VALIDITY field to SUMMARY.  Add
13898         a new field called VALIDITY.
13899         * g10/tofu.c (write_stats_status): Update output accordingly.
13900
13901 2016-11-29  Justus Winter  <justus@g10code.com>
13902
13903         tests: Add test for '--decrypt --multifile'.
13904         + commit bde4fddadc75ad6071e3fc6c0980905de14c03cb
13905         * tests/openpgp/Makefile.am (XTESTS): Add new test.
13906         * tests/openpgp/decrypt-multifile.scm: New file.
13907
13908         gpgscm: Avoid truncating pointers.
13909         + commit e062bc4da8062b822ee85096d9adfcbca8dcb56a
13910         * tests/gpgscm/scheme.c (_alloc_cellseg): Avoid truncating pointers on
13911         systems where sizeof(unsigned long) < sizeof(void *).
13912
13913 2016-11-29  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
13914
13915         dirmngr: Lazily launch ldap reaper thread.
13916         + commit f6728d13e8e544dbd4b9351ed981613e5504293f
13917         * dirmngr/dirmngr.c (main): Avoid calling ldap_wrapper_launch_thread()
13918         Before we need it.
13919         * dirmngr/ldap-wrapper.c (ldap_wrapper): Call
13920         ldap_wrapper_launch_thread() just in time (before any attempt to use
13921         an ldap subprocess).
13922
13923 2016-11-29  Werner Koch  <wk@gnupg.org>
13924
13925         build: Remove more keywords from the generated ChangeLog.
13926         + commit ecc126a7cef371e3b88e65715ba37fb77e92ea0f
13927         * build-aux/gitlog-to-changelog (parse_amend_file): Generalize keyword
13928         removal.
13929
13930 2016-11-28  Justus Winter  <justus@g10code.com>
13931
13932         tests: Add test for the ssh key export.
13933         + commit 47b8b9e2ce5af7fba117ae0b00e10bec414dcfb0
13934         * tests/openpgp/Makefile.am (XTESTS): Add new test.
13935         (sample_keys): Add new files.
13936         * tests/openpgp/samplekeys/authenticate-only.pub.asc: New file.
13937         * tests/openpgp/samplekeys/authenticate-only.sec.asc: Likewise.
13938         * tests/openpgp/ssh-export.scm: Likewise.
13939
13940         g10: Fix iteration over getkey results.
13941         + commit 4db9a425644dccaf81b51ebc97b32a9cc21941a4
13942         * g10/getkey.c (getkey_next): Only ask 'lookup' for the exact match if
13943         our caller requested the key.  Fixes a crash in 'lookup'.
13944
13945         tests: Rename ssh test.
13946         + commit cc1d21342659a7def5d662d0547579f9e0d3b109
13947         * tests/openpgp/ssh.scm: Rename to 'ssh-import.scm'.
13948         * tests/openpgp/Makefile (XTESTS): Likewise.
13949
13950 2016-11-25  NIIBE Yutaka  <gniibe@fsij.org>
13951
13952         scd: Support OpenPGP card V3 for RSA.
13953         + commit b89e63e5c326af71470124b410e6429cbd2b5c43
13954         * scd/app-openpgp.c (struct app_local_s): Remove max_cmd_data and
13955         max_rsp_data fields as Extended Capabilities bits are different.
13956         (get_cached_data) Use extcap.max_certlen_3.
13957         (get_one_do): Don't use exmode=1.
13958         (determine_rsa_response): New.
13959         (get_public_key, do_genkey): Call determine_rsa_response.
13960         (do_sign): Use keyattr[0].rsa.n_bits / 8, instead of max_rsp_data.
13961         (do_auth): Use keyattr[2].rsa.n_bits / 8, instead of max_rsp_data.
13962         (do_decipher): Likewise with Use keyattr[1].rsa.n_bits / 8.
13963         (show_caps): Remove max_cmd_data and max_rsp_data.
13964         (app_select_openpgp): Likewise.
13965
13966 2016-11-23  Justus Winter  <justus@g10code.com>
13967
13968         gpgscm: Make 'reverse' compatible with 'reverse_in_place'.
13969         + commit 005d326d19ba28005182205f25edc4f7499ec0b5
13970         * tests/gpgscm/scheme.c (reverse): Update prototype, add terminator
13971         argument.
13972         (opexe_4): Update callsite.
13973
13974         gpgscm: Clean sweeped cells.
13975         + commit 3fb9954c43425775a517060959dad01fa00238f7
13976         * tests/gpgscm/scheme.c (gc): Zero typeflag and car of free cells.
13977
13978         gpgscm: Fix initialization of 'sink'.
13979         + commit 7856e3efaad7614979bc0b91379a0a4dcbc739d5
13980         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Also initialize
13981         cdr.
13982
13983 2016-11-23  Neal H. Walfield  <neal@g10code.com>
13984
13985         g10: Avoid gratuitously loading a keyblock when it is already available.
13986         + commit 03a65a53231cc3132a50a1871e81a512c44da169
13987         * g10/trust.c (get_validity): Add new, optional parameter KB.  Only
13988         load the keyblock if KB is NULL.  Update callers.
13989         (get_validity): Likewise.
13990         * g10/trustdb.c (tdb_get_validity_core): Likewise.
13991
13992 2016-11-22  Neal H. Walfield  <neal@g10code.com>
13993
13994         g10: Use es_fopen instead of open.
13995         + commit bfeafe2d3f9bbaa7f11f3ad870a446141c038b0d
13996         * g10/tofu.c: Don't include <utime.h>, <fcntl.h> or <unistd.h>.
13997         (busy_handler): Replace use of open with es_fopen.
13998
13999         g10: If the set of UTKs changes, invalidate any changed policies.
14000         + commit 44c17bcb003a3330f595a6ab144e8439b7b630cb
14001         * g10/trustdb.c (tdb_utks): New function.
14002         * g10/tofu.c (check_utks): New function.
14003         (initdb): Call it.
14004         * tests/openpgp/tofu.scm: Modify test to check the effective policy of
14005         keys whose effective policy changes when we change the set of UTKs.
14006
14007 2016-11-22  NIIBE Yutaka  <gniibe@fsij.org>
14008
14009         scd: Fix receive buffer size.
14010         + commit 5c2db9dedfe9dbb14ffec24751ca23a69cead94e
14011         * scd/apdu.c (send_le): Fix the size, adding two for status
14012         bytes to Le.
14013
14014 2016-11-22  Justus Winter  <justus@g10code.com>
14015
14016         gpgscm: Refactor.
14017         + commit a3b258d1d15953816e0567511ecc527a4ccdd626
14018         * tests/gpgscm/scheme.c (opexe_0): Reduce code duplication.
14019
14020         gpgscm: Fix property lists.
14021         + commit d8df80427238cdbb9ae0f6dae8bc7e9c24f6e265
14022         * tests/gpgscm/opdefines.h (put, get): Check arguments.  Also rename
14023         to 'set-symbol-property' and 'symbol-property', the names used by
14024         Guile, because put and get are too unspecific.
14025         * tests/gpgscm/scheme.c (hasprop): Only symbols have property lists.
14026         (get_property): New function.
14027         (set_property): Likewise.
14028         (opexe_4): Use the new functions.
14029
14030         gpgscm: Fix installation of error handler.
14031         + commit 7b4e2ea274ace22245264f1759279390d0300a62
14032         * tests/gpgscm/ffi.scm: Set '*error-hook*' again so that the
14033         interpreter will use our function.
14034
14035         gpgscm: Use a static pool of cells for small integers.
14036         + commit 66834eb838a8892d088f6b7332084a64d9f15008
14037         * tests/gpgscm/scheme-private.h (struct scheme): New fields for the
14038         static integer cells.
14039         * tests/gpgscm/scheme.c (_alloc_cellseg): New function.
14040         (alloc_cellseg): Use the new function.
14041         (MAX_SMALL_INTEGER): New macro.
14042         (initialize_small_integers): New function.
14043         (mk_small_integer): Likewise.
14044         (mk_integer): Return a small integer if possible.
14045         (_s_return): Do not free 'op' if it is a small integer.
14046         (s_save): Use a small integer to box the opcode.
14047         (scheme_init_custom_alloc): Initialize small integers.
14048         (scheme_deinit): Free chunk of small integers.
14049         * tests/gpgscm/scheme.h (USE_SMALL_INTEGERS): New macro.
14050
14051         tests: Delay querying the avaliable algorithms.
14052         + commit 893a3f7fb46021961914a8acdf1292a80e3eba93
14053         * tests/openpgp/defs.scm: Set verbosity earlier, turn 'all-*-algos'
14054         into promises.
14055         * tests/openpgp/conventional-mdc.scm: Force the promises.
14056         * tests/openpgp/conventional.scm: Likewise.
14057         * tests/openpgp/encrypt-dsa.scm: Likewise.
14058         * tests/openpgp/encrypt.scm: Likewise.
14059         * tests/openpgp/gpgtar.scm: Likewise.
14060         * tests/openpgp/sigs.scm: Likewise.
14061
14062         g10: Fix memory leak.
14063         + commit 6ce14a805f1da687dfb8535db57730d5c7403db7
14064         * g10/tofu.c (tofu_notice_key_changed): Remove spurious duplicate call
14065         to 'hexfingerprint'.
14066
14067 2016-11-21  Neal H. Walfield  <neal@g10code.com>
14068
14069         g10: Cache the effective policy.  Recompute it when required.
14070         + commit 037f9de09298a31026ea2ab5fbd4a599b11cc34f
14071         * g10/tofu.c (initdb): Add column effective_policy to the bindings
14072         table.
14073         (record_binding): New parameters effective_policy and set_conflict.
14074         Save the effective policy.  If SET_CONFLICT is set, then set conflict
14075         according to CONFLICT.  Otherwise, preserve the current value of
14076         conflict.  Update callers.
14077         (get_trust): Don't compute the effective policy here...
14078         (get_policy): ... do it here, if it was not cached.  Take new
14079         parameters, PK, the public key, and NOW, the time that the operation
14080         started.  Update callers.
14081         (show_statistics): New parameter PK.  Pass it to get_policy.  Update
14082         callers.
14083         (tofu_notice_key_changed): New function.
14084         * g10/gpgv.c (tofu_notice_key_changed): New stub.
14085         * g10/import.c (import_revoke_cert): Take additional argument CTRL.
14086         Pass it to keydb_update_keyblock.
14087         * g10/keydb.c (keydb_update_keyblock): Take additional argument CTRL.
14088         Update callers.
14089         [USE_TOFU]: Call tofu_notice_key_changed.
14090         * g10/test-stubs.c (tofu_notice_key_changed): New stub.
14091         * tests/openpgp/tofu.scm: Assume that manually setting a binding's
14092         policy to auto does not cause the tofu engine to forget about any
14093         conflict.
14094
14095         g10: Correctly parameterize ngettext.
14096         + commit 182efc5b5d20ac0d43501a22f349a23dc06a27a4
14097         * g10/tofu.c (ask_about_binding): Correctly parameterize ngettext.
14098
14099         g10: Don't use the same variable for multiple SQL compiled statements.
14100         + commit 7142b293c870d73ce0146bfb90e6a556e0079650
14101         * g10/tofu.c (struct tofu_dbs_s): Remove unused field
14102         record_binding_update2.  Replace register_insert with
14103         register_signature and register_encryption.
14104         (tofu_register_signature): Don't use dbs->s.register_insert, but
14105         dbs->s.register_signature.
14106         (tofu_register_encryption): Don't use dbs->s.register_insert, but
14107         dbs->s.register_encryption.
14108
14109         g10: Add a convenience function for checking if a key is a primary key.
14110         + commit 91a0483c5db8ee4510981448a705981ee1cce199
14111         * g10/keydb.h (pk_is_primary): New function.
14112         * g10/tofu.c (get_trust): Use it.
14113         (tofu_register_signature): Likewise.
14114         (tofu_register_encryption): Likewise.
14115         (tofu_set_policy): Likewise.
14116         (tofu_get_policy): Likewise.
14117
14118 2016-11-21  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14119
14120         doc: Ship example gpg-agent-browser.socket in examples/systemd-user/.
14121         + commit 0540cfbee455b197edd89b602a4b47ebf0be8588
14122         * doc/Makefile.am: Ship gpg-agent-browser.socket alongside the other
14123         systemd user service example files.
14124
14125 2016-11-21  NIIBE Yutaka  <gniibe@fsij.org>
14126
14127         agent: Fix npth + daemon mode problem.
14128         + commit 9a707a223a3d45ccf245dee7989ca144e4e6bb49
14129         * agent/gpg-agent.c (main): Remove duplicated initialization in daemon
14130         mode.
14131
14132 2016-11-18  Werner Koch  <wk@gnupg.org>
14133
14134         Release 2.1.16.
14135         + commit 0a641ad25d8c3b91dc32bb9f3f1ae49ae539a4f7
14136
14137
14138 2016-11-18  Ineiev  <ineiev@gnu.org>
14139
14140         po: Update Russian translation.
14141         + commit 11aaa9c6d4ed3e47de45b4aee925ab1065120988
14142
14143
14144 2016-11-18  NIIBE Yutaka  <gniibe@fsij.org>
14145
14146         g10: Fix flags to open for lock of ToFU.
14147         + commit 1c0b140cccfb884c6d07785c3284b9df06dccd3c
14148         * g10/tofu.c (busy_handler): Fix the flags and utime is not needed.
14149
14150 2016-11-18  Werner Koch  <wk@gnupg.org>
14151
14152         dirmngr: Use a longer timer tick interval.
14153         + commit 833eef974ad4721b9b3e247bae9c890476a936ce
14154         * dirmngr/dirmngr.c (TIMERTICK_INTERVAL): Always use 60 seconds like
14155         we did for WindowsCE.
14156
14157 2016-11-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14158
14159         dirmngr: More w32 system daemon cleanup.
14160         + commit b3a917201207898059c048dd101344765201b03c
14161         * dirmngr/dirmngr.c (handle_tick): Remove w32 tests for
14162         shutdown_pending; no longer needed.
14163
14164 2016-11-18  NIIBE Yutaka  <gniibe@fsij.org>
14165
14166         g10: Fix creating a lock for ToFU.
14167         + commit b2e1b17efa952afcf7aeec8b15e9d0088dba587a
14168         * g10/tofu.c (busy_handler): Add third argument which is mandatory for
14169         O_CREATE flag.
14170
14171         scd: Don't limit to ST-2xxx for PC/SC.
14172         + commit b6066ab18a67195817babaf9eccf896c2b3c7b0e
14173         * scd/apdu.c (pcsc_vendor_specific_init): Only check vender ID.
14174
14175 2016-11-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14176
14177         dirmngr: Use a default keyserver if none is explicitly set.
14178         + commit 8fb482252436b3b4b0b33663d95d1d17188ad1d9
14179         * configure.ac: Define DIRMNGR_DEFAULT_KEYSERVER.
14180         * dirmngr/server.c (ensure_keyserver): Use it if no keyservers are set.
14181         * doc/dirmngr.texi: Document this behavior.
14182
14183         dirmngr: Add system CAs if no hkp-cacert is given.
14184         + commit 7c1613d41566f7d8db116790087de323621205fe
14185         * dirmngr/dirmngr.c (http_session_new): If the user isn't talking to
14186         the HKPS pool, and they have not specified any hkp-cacert, then we
14187         should default to the system CAs, rather than nothing.
14188         * doc/dirmngr.texi: Document choice of CAs.
14189
14190         dirmngr: Register hkp-cacert even if the file doesn't exist yet.
14191         + commit c4e02a3b7ad6ee1da6bfc439921378bdbd5c029c
14192         * dirmngr/dirmngr.c (parse_readable_options): If we're unable to turn
14193         an argument for hkp-cacert into an absolute filename, terminate
14194         completely.
14195         * dirmngr/http.c (http_register_tls_ca): Show a warning if file is not
14196         immediately accessible, but register it anyway.
14197
14198 2016-11-17  Justus Winter  <justus@g10code.com>
14199
14200         gpgscm: Re-enable the garbage collector in case of errors.
14201         + commit 4f189325a409bb08f7a8eabfac3f4579288cf5c5
14202         * tests/gpgscm/scheme.c (opexe_0): Enable gc before calling 'Error_1'.
14203
14204         gpgscm: Fix string.
14205         + commit fc53a4d06eaf891143ab4efec9caffe31ebc2bc0
14206         * tests/gpgscm/scheme.c (type_to_string): Fix string.
14207
14208 2016-11-17  Werner Koch  <wk@gnupg.org>
14209
14210         dirmngr: Auto-sownload the swdb.lst.
14211         + commit bd91f92ace09263e3a91177f2a1644379baeb08a
14212         * dirmngr/dirmngr.h (struct opt): Add field allow_version_check.
14213         * dirmngr/dirmngr.c (oAllowVersionCheck): New.
14214         (opts): Add --allow-version-check.
14215         (network_activity_seen): New variable.
14216         (parse_rereadable_options): Set opt.allow_version_check.
14217         (main) <aGPGConfList>: Do not anymore set the no change flag for
14218         Windows.  Add allow-version-check.
14219         (netactivity_action): Set network_activity_seen.
14220         (housekeeping_thread): Call dirmngr_load_swdb.
14221         * tools/gpgconf-comp.c (gc_options_dirmngr): Add allow-version-check.
14222         Make "use-tor" available at Basic level.
14223
14224         dirmngr: Improve downloading of swdb.lst.
14225         + commit c45ca316a54665915ae08399484db271566db7c0
14226         * dirmngr/loadswdb.c (time_of_saved_swdb): Aslo return the "verified"
14227         timestamp.
14228         (dirmngr_load_swdb): Avoid unnecessary disk or network access witout
14229         FORCE.  Do not update swdb.lst if it did not change.
14230
14231         gpgconf: Change the displayed names of the components.
14232         + commit d8da5bc50b856db3445435780311c9f8e52a5144
14233
14234
14235 2016-11-16  Werner Koch  <wk@gnupg.org>
14236
14237         dirmngr: Add command to only load the swdb.
14238         + commit 52c10a280af6ce06eb1732ff35b095f2b8d24b9f
14239         * dirmngr/loadswdb.c: New.
14240         * dirmngr/Makefile.am (dirmngr_SOURCES): Add that file.
14241         * dirmngr/server.c: Remove includes cpparray.h and exectool.h.
14242         (cmd_loadswdb): New.
14243         (parse_version_number,parse_version_string): Remove.
14244         (my_mktmpdir, cmp_version): Remove.
14245         (fetch_into_tmpdir): Remove.
14246         (struct verify_swdb_parm_s): Remove.
14247         (verify_swdb_status_cb): Remove.
14248         (cmd_versioncheck): Remove.
14249         (register_commands): Register LOADSWDB.  Remove VERSIONCHECK.
14250
14251         scd,dirmngr: Keep the standard fds when daemonizing.
14252         + commit 4839e6d002a8ad1f7d3260792c3c9641e258f342
14253         * dirmngr/dirmngr.c (main): Before calling setsid do not close the
14254         standard fds but connect them to /dev/null.
14255         * scd/scdaemon.c (main): Ditto.  Noet that the old test for a log
14256         stream was even reverted.
14257
14258         common: Rename keybox_file_rename to gnupg_rename_file.
14259         + commit c4506a3f15bba5d257cb4c6738800c5e00ecc9a2
14260         * kbx/keybox-util.c (keybox_file_rename): Rename to ...
14261         * common/sysutils.c (gnupg_rename_file): this.  Change all callers.
14262
14263         wks: Always build gpg-wks-client.
14264         + commit c564790df723beef031d83802bd7830737bd330a
14265         * tools/Makefile.am (gpg_wks_client): Remove macro.
14266         (libexec_PROGRAMS): Add gpg-wks-client.
14267
14268         gpg: New option --override-session-key-fd.
14269         + commit 43bfaf2c5417ede621c0a07721952ea549a7a139
14270         * g10/gpg.c (oOverrideSessionKeyFD): New.
14271         (opts): Add option --override-session-key-fd.
14272         (main): Handle that option.
14273         (read_sessionkey_from_fd): New.
14274
14275 2016-11-15  Werner Koch  <wk@gnupg.org>
14276
14277         gpgv: New option --enable-special-filenames.
14278         + commit 500e594c2da530e69a63fc1a40d173458682fa0e
14279         * g10/gpgv.c (oEnableSpecialFilenames): New.
14280         (opts): Add option --enable-special-filenames.
14281         (main): Implement that option.
14282
14283         gpg: Add new compliance mode "de-vs".
14284         + commit b47603a0ac24902c5bb000f8ef27cfb99aceeb81
14285         * g10/options.h (CO_DE_VS): New.
14286         (GNUPG): Also allow CO_DE_VS.
14287         * g10/gpg.c (oDE_VS): New.
14288         (parse_compliance_option): Add "de-vs".
14289         (set_compliance_option): Set "de-vs".
14290         * g10/misc.c (compliance_option_string): Return a description string.
14291         (compliance_failure): Ditto.
14292         * g10/keygen.c (ask_algo): Take care of CO_DE_VS.
14293         (get_keysize_range): Ditto.
14294         (ask_curve): Add new field to CURVES and trun flags into bit flags.
14295         Allow only Brainpool curves in CO_DE_VS mode.
14296
14297         gpg: Use usual free semantics for packet structure free functions.
14298         + commit 8ea3b4c4102dc67ed83d4419b7171e422fc01047
14299         * g10/free-packet.c (free_attributes): Turn function into a nop for a
14300         NULL arg.
14301         (free_user_id): Ditto.
14302         (free_compressed): Ditto.
14303         (free_encrypted): Ditto.
14304         (free_plaintext): Ditto.
14305         (release_public_key_parts): Avoid extra check for NULL.
14306         * g10/getkey.c (get_best_pubkey_byname): Ditto.
14307
14308 2016-11-15  Justus Winter  <justus@g10code.com>
14309
14310         g10: Optimize key iteration.
14311         + commit 12834e84aca9d74800245f0f2f2e6b5123e76173
14312         * g10/getkey.c (get_best_pubkey_byname): Use the node returned by
14313         'getkey_next' instead of doing another lookup.
14314
14315         g10: Fix memory leak.
14316         + commit d20107f6da094edd782947abb357abae5129a12c
14317         * g10/getkey.c (finish_lookup): Clarify that we do not return a
14318         reference.
14319         (lookup): Clarify the relation between RET_KEYBLOCK and RET_FOUND_KEY.
14320         Check arguments.  Actually release the node if it is not returned.
14321
14322         g10: Fix iteration over getkey results.
14323         + commit 1d03cc77e1706f7da653153ad4b58c61e4fd2573
14324         * g10/getkey.c (getkey_next): Fix invocation of 'lookup'.  If we want
14325         to use RET_FOUND_KEY, RET_KEYBLOCK must be valid.
14326
14327         g10: Fix use-after-free.
14328         + commit bd60742925414e0ef2a497df827c1913ea211a44
14329         * g10/getkey.c (pubkey_cmp): Make a copy of the user id.
14330         (get_best_pubkey_byname): Free the user ids.
14331
14332 2016-11-15  Werner Koch  <wk@gnupg.org>
14333
14334         sm: New stub option --compliance.
14335         + commit 26c7c1d72c5f2acb3edb58d610c09a635c87bdbf
14336         * sm/gpgsm.c (oCompliance): New.
14337         (opts): Add "--compliance".
14338         (main): Implement as stub.
14339
14340 2016-11-15  NIIBE Yutaka  <gniibe@fsij.org>
14341
14342         g10: Fix memory leak.
14343         + commit 1f7639ebbe58af1b581b0be7809da9ee55482992
14344         * g10/keyedit.c (menu_adduid): Don't copy 'sig'.
14345
14346 2016-11-15  Werner Koch  <wk@gnupg.org>
14347
14348         gpg: New option --compliance.
14349         + commit f86b1a15ad4bb7bcc1e9f7d209aabcb23641f7df
14350         * g10/gpg.c (oCompliance): New.
14351         (opts): Add "--compliance".
14352         (parse_tofu_policy): Use a generic description string for "help".
14353         (parse_compliance_option): New.
14354         (main): Add option oCompliance.  Factor out code for compliance
14355         setting to ...
14356         (set_compliance_option): new.
14357
14358 2016-11-15  Justus Winter  <justus@g10code.com>
14359
14360         g10: Fix memory leak.
14361         + commit 809d67e74014cb563efd965744fd11f87bbae743
14362         * g10/keyedit.c (menu_adduid): Deallocate 'sig'.
14363
14364         gpgscm: Mark cells requiring finalization.
14365         + commit 64a58e23c38db8658423bbe26fcd650330e24a88
14366         * tests/gpgscm/scheme.c (T_FINALIZE): New macro.
14367         (mk_port): Use the new macro.
14368         (mk_foreign_object): Likewise.
14369         (mk_counted_string): Likewise.
14370         (mk_empty_string): Likewise.
14371         (gc): Only call 'finalize_cell' for cells with the new flag.
14372
14373         gpgscm: Recover more cells.
14374         + commit 93cc322ac06d3045a24aece90091f7f80f3dacb8
14375         * tests/gpgscm/scheme.c (_s_return): Recover the cell holding the
14376         opcode.
14377
14378 2016-11-14  Justus Winter  <justus@g10code.com>
14379
14380         g10: Fix memory leak.
14381         + commit 2cd281c4def1ea881b92b9aba18c1892f89c1870
14382         * g10/mainproc.c (check_sig_and_print): Free 'pk'.
14383
14384         gpgscm: Avoid cell allocation overhead.
14385         + commit 83c184a66b73f312425b01008f0495610e5329a4
14386         * tests/gpgscm/scheme-private.h (struct scheme): New fields
14387         'inhibit_gc', 'reserved_cells', and 'reserved_lineno'.
14388         * tests/gpgscm/scheme.c (GC_ENABLED): New macro.
14389         (USE_GC_LOCKING): Likewise.
14390         (gc_reservations): Likewise.
14391         (gc_reservation_failure): New function.
14392         (_gc_disable): Likewise.
14393         (gc_disable): New macro.
14394         (gc_enable): Likewise.
14395         (gc_enabled): Likewise.
14396         (gc_consume): Likewise.
14397         (get_cell_x): Consume reserved cell if garbage collection is disabled.
14398         (_get_cell): Assert that gc is enabled.
14399         (get_cell): Only record cell in the list of recently allocated cells
14400         if gc is enabled.
14401         (get_vector_object): Likewise.
14402         (gc): Assert that gc is enabled.
14403         (s_return): Add comment, adjust call to '_s_return'.
14404         (s_return_enable_gc): New macro.
14405         (_s_return): Add flag 'enable_gc' and re-enable gc if set.
14406         (oblist_add_by_name): Use the new facilities to protect the
14407         allocations.
14408         (new_frame_in_env): Likewise.
14409         (new_slot_spec_in_env): Likewise.
14410         (s_save): Likewise.
14411         (opexe_0): Likewise.
14412         (opexe_1): Likewise.
14413         (opexe_2): Likewise.
14414         (opexe_5): Likewise.
14415         (opexe_6): Likewise.
14416         (scheme_init_custom_alloc): Initialize the new fields.
14417
14418 2016-11-14  NIIBE Yutaka  <gniibe@fsij.org>
14419
14420         scd: Fix status info encoding.
14421         + commit 4ee4d0b02172cf56d9582bb99e32a65c75315b25
14422         * scd/command.c (send_status_info): Do percent plus encoding correctly.
14423
14424 2016-11-12  Werner Koch  <wk@gnupg.org>
14425
14426         agent: Improve concurrency when Libgcrypt 1.8 is used.
14427         + commit 6bf698197222bf6081c249c815aebb075e8ec820
14428         * agent/gpg-agent.c (thread_init_once): Tell Libgcrypt to reinit the
14429         system call clamp.
14430         (agent_libgcrypt_progress_cb): Do not sleep if Libgcrypt is recent
14431         enough.
14432
14433 2016-11-11  Werner Koch  <wk@gnupg.org>
14434
14435         agent: Kludge to mitigate blocking calls in Libgcrypt.
14436         + commit 4473db1ef24031ff4e26c9a9de95dbe898ed2b97
14437         * agent/gpg-agent.c (agent_libgcrypt_progress_cb): Sleep for 100ms on
14438         "need_entropy".
14439
14440         dirmngr: Prepare to trigger jobs by network activity.
14441         + commit 7b04a43c05834b937b32a596f1941e9728add5fa
14442         * dirmngr/http.c (netactivity_cb): New.
14443         (http_register_netactivity_cb): New.
14444         (notify_netactivity): New.
14445         (connect_server): Call that function.
14446         * dirmngr/dirmngr.c (main): Call http_register_netactivity_cb.
14447         (netactivity_action): New stub handler.
14448
14449 2016-11-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14450
14451         agent: Clean up comments.
14452         + commit e51912f467fda963c7abcfcd4082d6eb084ba5be
14453         * agent/agent.h: Clean up comments.
14454
14455 2016-11-10  Werner Koch  <wk@gnupg.org>
14456
14457         gpg,sm: Add STATUS_ERROR keydb_search and keydb_add-resource.
14458         + commit 5d13581f4737c18430f6572dd4ef486d1ad80dd1
14459         * g10/keydb.c (keydb_add_resource): Make ANY_REGISTERED
14460         file-global.  Write a STATUS_ERROR.
14461         (maybe_create_keyring_or_box): Check for non-accessible but existant
14462         file.
14463         (keydb_search): Write a STATUS_ERROR if no keyring has been registered
14464         but continue to return NOT_FOUND.
14465         * sm/keydb.c (keydb_add_resource): Rename ANY_PUBLIC to ANY_REGISTERED
14466         and make file-global.  Write a STATUS_ERROR.
14467         (keydb_search): Write a STATUS_ERROR if no keyring has been registered
14468         but continue to return NOT_FOUND.  Also add new arg CTRL and change
14469         all callers to pass it down.
14470
14471         sm: Remove unused arg SECRET from keydb functions.
14472         + commit c8044c6e335f044d7386b9e8869bc4a0d3adff70
14473         * sm/keydb.c (struct resource_item): Remove field 'secret'.
14474         (keydb_add_resource): Remove arg 'secret' and change all callers.
14475         (keydb_new): Ditto.
14476
14477 2016-11-10  Justus Winter  <justus@g10code.com>
14478
14479         gpgscm: Recover cells from the list of recently allocated cells.
14480         + commit ee08677d63a900cea85228024861a4f5c5a87c69
14481         * tests/gpgscm/scheme.c (ok_to_freely_gc): Recover cells.
14482
14483         gpgscm: Recover cells used to maintain interpreter state.
14484         + commit e0cbd3389e2dd6ec19ee3a4c7bad81fa0f1907f5
14485         * tests/gpgscm/scheme.c (free_cell): New function.
14486         (free_cons): Likewise.
14487         (_s_return): Use the new function to recover cells used to save the
14488         state of the interpreter in 's_save'.  This reduces the need to do a
14489         garbage collection considerably.
14490
14491         gpgscm: Reduce opcode dispatch overhead.
14492         + commit d3a98ff5bc972a4c9b01b9e5338a4a59b5b4ac48
14493         * tests/gpgscm/scheme.c (s_thread_to): New macro.
14494         (CASE): Likewise.
14495         (opexe_[0-6]): Use 'CASE' instead of 'case' statements, replace
14496         's_goto' with 's_thread_to' where applicable.
14497
14498         gpgscm: Make the compile-hook configurable.
14499         + commit 568cfcde45a0d6c456d8f8be1ea0e408416badad
14500         * tests/gpgscm/scheme-private.h (struct scheme): Make field
14501         'COMPILE_HOOK' optional.
14502         * tests/gpgscm/scheme.c (opexe_0): Fix guard.
14503         (scheme_init_custom_alloc): Conditionally initialize 'COMPILE_HOOK'.
14504         * tests/gpgscm/scheme.h (USE_COMPILE_HOOK): Define to 1 by default.
14505
14506         gpgscm: Drop obsolete commented-out code.
14507         + commit 9ee184bc0afaea06785d836ed175b851b9ae532f
14508         * tests/gpgscm/scheme.c (opexe_5): Drop obsolete code.
14509
14510         gpgscm: Remove dubious stack implementation.
14511         + commit d7c5799c282a03dcce0e3d327075233353cb76cc
14512         * tests/gpgscm/scheme-private.h (struct scheme): Remove related fields.
14513         * tests/gpgscm/scheme.c: Drop all !USE_SCHEME_STACK code.
14514         * tests/gpgscm/scheme.h (USE_SCHEME_STACK): Remove macro.
14515
14516 2016-11-10  Werner Koch  <wk@gnupg.org>
14517
14518         gpg: Improve error message for --quick-gen-key.
14519         + commit 088d955bd8a6ec8bbf76c8a4c01eb08499d1d9fa
14520         * g10/keygen.c (parse_algo_usage_expire): Use a different error
14521         message for an unknown algorithm name.
14522
14523         dirmngr: Improve concurrency in the non-adns case.
14524         + commit c7ea98cd3d44abf00e32c081e5049ad1d0b1f12c
14525         * dirmngr/dns-stuff.c (map_adns_status_to_gpg_error): New.
14526         (resolve_name_adns, get_dns_cert, get_dns_cname): Use that function.
14527         (getsrv) [!USE_ADNS]: Call res_query outside of nPth.
14528
14529 2016-11-08  Justus Winter  <justus@g10code.com>
14530
14531         tests: Fix environment setup.
14532         + commit 1062953d5132af674aacfc6372e3e9f066c5d145
14533         * tests/openpgp/defs.scm (setup-legacy-environment): Do not call
14534         'setup-environment' because that will start the agent, and hence
14535         register the atexit function twice.
14536
14537         Fixes: a55393cb5f4b331cb3a715c7d9a8b91f7606f337
14538
14539         tests: Log and display output from tests when run in parallel.
14540         + commit 2a7615c48ed79e6b28710cc293ce30c812b2e5b0
14541         * tests/openpgp/run-tests.scm (test): Add field 'logfd'.
14542         (test::new, test::set-*): Adapt accordingly.
14543         (test::set-logfd): New function.
14544         (test::open-log-file): Likewise.
14545         (test::run-sync): Use the new function.
14546         (test::run-async): Likewise.
14547         (test::report): Replay the log.
14548         (run-tests-parallel): Reverse the results to restore the original
14549         order.
14550
14551         tests: Simplify test.
14552         + commit 4dd4801bfa4c3f7ba279b3d171a8ed299dbffaaa
14553         * tests/openpgp/issue2417.scm: Simplify.
14554
14555         gpgscm: Expose seek and associated constants.
14556         + commit 591d61d80f4f81176f7e236df794922df9e001a1
14557         * tests/gpgscm/ffi.c (do_seek): New function.
14558         (ffi_init): Expose 'seek' and 'SEEK_{SET,CUR,END}'.
14559         * tests/gpgscm/lib.scm: Document the new function.
14560
14561         gpgscm: Fix error message.
14562         + commit d4454837cd60981c2863955b11c9e1cc8f9e3833
14563         * tests/gpgscm/ffi.c (do_wait_processes): Fix and improve error
14564         messages.
14565
14566         tests,w32: Make cleanup more robust.
14567         + commit dd13b2a561e31045fd3d3576bab99543cd4eb6cc
14568         * tests/openpgp/run-tests.scm (run-tests-parallel): Catch errors when
14569         removing the working directory.  On Windows this can fail if there is
14570         still a process using one of the files there.
14571         (run-tests-sequential): Likewise.
14572
14573         common,w32: Simplify locking.
14574         + commit 7cbb0803847b8db618d39ff50ae6015e409ab1ae
14575         * common/asshelp.c (lock_spawning): Use the same code on Windows that
14576         we use on all other platforms.
14577         (unlock_spawning): Likewise.
14578
14579 2016-11-07  Justus Winter  <justus@g10code.com>
14580
14581         tests: Write a log file for each test.
14582         + commit 26df829fa22f027ca4a5eaf155cdaa2123afbdd5
14583         * tests/openpgp/Makefile.am (CLEANFILES): Delete logs.
14584         * tests/openpgp/run-tests.scm (test::run-sync): Write logs.
14585
14586         gpgscm: Generalize splice to write to multiple sinks.
14587         + commit abe0cc7a21d2b0b5c77cc525b999d1ede2d29185
14588         * tests/gpgscm/ffi.c (ordinal_suffix): New function.
14589         (do_splice): Generalize splice to write to multiple sinks.
14590         * tests/gpgscm/lib.scm (splice): Document this fact.
14591
14592         gpgscm: Drop 'len' argument from splice.
14593         + commit 4d98a72b88cf167295e1ecd6125b9c7a11b6239f
14594         * tests/gpgscm/ffi.c (do_splice): Drop 'len' argument, no-one uses it.
14595         * tests/gpgscm/lib.scm (splice): Document foreign function.
14596
14597         tests: Move environment creation and teardown into each test.
14598         + commit a55393cb5f4b331cb3a715c7d9a8b91f7606f337
14599         * tests/gpgscm/tests.scm (log): New function.
14600         * tests/openpgp/run-tests.scm (run-tests-parallel): Do not run the
14601         startup and teardown scripts.
14602         (run-tests-sequential): Likewise.
14603         * tests/openpgp/setup.scm: Move all functions...
14604         * tests/openpgp/defs.scm: ... here and make them less verbose.
14605         (setup-environment): New function.
14606         (setup-legacy-environment): Likewise.
14607         (start-agent): Make less verbose, run 'stop-agent' at interpreter
14608         exit.
14609         (stop-agent): Make less verbose.
14610         * tests/openpgp/finish.scm: Drop file.
14611         * tests/openpgp/Makefile.am (EXTRA_DIST): Drop removed file.
14612         * tests/openpgp/4gb-packet.scm: Use 'setup-environment' or
14613         'setup-legacy-environment' as appropriate.
14614         * tests/openpgp/armdetach.scm: Likewise.
14615         * tests/openpgp/armdetachm.scm: Likewise.
14616         * tests/openpgp/armencrypt.scm: Likewise.
14617         * tests/openpgp/armencryptp.scm: Likewise.
14618         * tests/openpgp/armor.scm: Likewise.
14619         * tests/openpgp/armsignencrypt.scm: Likewise.
14620         * tests/openpgp/armsigs.scm: Likewise.
14621         * tests/openpgp/clearsig.scm: Likewise.
14622         * tests/openpgp/conventional-mdc.scm: Likewise.
14623         * tests/openpgp/conventional.scm: Likewise.
14624         * tests/openpgp/decrypt-dsa.scm: Likewise.
14625         * tests/openpgp/decrypt.scm: Likewise.
14626         * tests/openpgp/default-key.scm: Likewise.
14627         * tests/openpgp/detach.scm: Likewise.
14628         * tests/openpgp/detachm.scm: Likewise.
14629         * tests/openpgp/ecc.scm: Likewise.
14630         * tests/openpgp/encrypt-dsa.scm: Likewise.
14631         * tests/openpgp/encrypt.scm: Likewise.
14632         * tests/openpgp/encryptp.scm: Likewise.
14633         * tests/openpgp/export.scm: Likewise.
14634         * tests/openpgp/finish.scm: Likewise.
14635         * tests/openpgp/genkey1024.scm: Likewise.
14636         * tests/openpgp/gpgtar.scm: Likewise.
14637         * tests/openpgp/gpgv-forged-keyring.scm: Likewise.
14638         * tests/openpgp/import.scm: Likewise.
14639         * tests/openpgp/issue2015.scm: Likewise.
14640         * tests/openpgp/issue2417.scm: Likewise.
14641         * tests/openpgp/issue2419.scm: Likewise.
14642         * tests/openpgp/key-selection.scm: Likewise.
14643         * tests/openpgp/mds.scm: Likewise.
14644         * tests/openpgp/multisig.scm: Likewise.
14645         * tests/openpgp/quick-key-manipulation.scm: Likewise.
14646         * tests/openpgp/seat.scm: Likewise.
14647         * tests/openpgp/shell.scm: Likewise.
14648         * tests/openpgp/signencrypt-dsa.scm: Likewise.
14649         * tests/openpgp/signencrypt.scm: Likewise.
14650         * tests/openpgp/sigs-dsa.scm: Likewise.
14651         * tests/openpgp/sigs.scm: Likewise.
14652         * tests/openpgp/ssh.scm: Likewise.
14653         * tests/openpgp/tofu.scm: Likewise.
14654         * tests/openpgp/use-exact-key.scm: Likewise.
14655         * tests/openpgp/verify.scm: Likewise.
14656         * tests/openpgp/version.scm: Likewise.
14657         * tests/openpgp/issue2346.scm: Likewise and simplify.
14658
14659         tests: Do not allow tests to be run in a shared environment.
14660         + commit ac078469cbafe85cf771fca84f376740850d10b0
14661         * tests/openpgp/README: Update.
14662         * tests/openpgp/run-tests.scm (run-tests-parallel-shared): Drop
14663         function.
14664         (run-tests-parallel-isolated): Rename to 'run-tests-parallel'.
14665         (run-tests-sequential-shared): Drop function.
14666         (run-tests-sequential-isolated): Rename to 'run-tests-sequential'.
14667
14668         tests: Fix build.
14669         + commit 37751d2b194bc33539f5b9ea0e02e9f209d2bcf6
14670         * tests/openpgp/Makefile.am: Drop dependency on 'mk-tdata'.
14671
14672         Fixes: 70215ff470c82d144e872057dfa5a478cc9195f2
14673
14674 2016-11-07  Werner Koch  <wk@gnupg.org>
14675
14676         wks: Encrypt all client mails also the target key,
14677         + commit 56e1864aa337f36317534db521fd4434d70e0784
14678         * tools/gpg-wks-client.c (encrypt_response): Add arg FINGERPRINT.
14679         (send_confirmation_response): Ditto.
14680         (process_confirmation_request): Parse out fingerprint and pass
14681         send_confirmation_response.
14682
14683 2016-11-07  Justus Winter  <justus@g10code.com>
14684
14685         tests,tools: Reimplement 'mk-tdata' in Scheme.
14686         + commit 70215ff470c82d144e872057dfa5a478cc9195f2
14687         * tests/openpgp/defs.scm (tools): Drop 'mk-tdata'.
14688         * tests/openpgp/setup.scm (make-test-data): New function.
14689         * tests/openpgp/verify.scm: Avoid 'mk-tdata'.
14690         * tools/Makefile.am (noinst_PROGRAMS): Drop 'mk-tdata'.
14691         * tools/mk-tdata.c: Drop file.
14692
14693         gpgscm,w32: Provide schemish file handling for binary files.
14694         + commit 413cc50345557e0a516f33b98e8aab19bbc8b4fe
14695         * tests/gpgscm/lib.scm (call-with-binary-input-file): New function.
14696         (call-with-binary-output-file): Likewise.
14697
14698         gpgscm: Add support for pseudo-random numbers.
14699         + commit 6e677f9b55fdb610e93134042ee41ee5c641cbdf
14700         * tests/gpgscm/ffi.c (do_getpid): New function.
14701         (do_srandom): Likewise.
14702         (random_scaled): Likewise.
14703         (do_random): Likewise.
14704         (do_make_random_string): Likewise.
14705         (ffi_init): Expose the new functions.
14706         * tests/gpgscm/lib.scm: Document the new functions.
14707
14708         g10: Fix crash.
14709         + commit 5840353d8bbcd9e75374f3bdb2547ffa7bbea897
14710         * g10/getkey.c (get_best_pubkey_byname): If 'get_pubkey_byname' does
14711         not return a getkey context, then it can return at most one key,
14712         therefore there is nothing to rank.  Also, always initialize '*retctx'
14713         to be on the safe side.
14714
14715         Fixes: ab89164be02012f1bf159c971853b8610e966301
14716
14717 2016-11-04  Justus Winter  <justus@g10code.com>
14718
14719         gpgscm: Fix printing strings containing zero bytes.
14720         + commit 1f45878a72f23d4bae08d73b614096b485f35274
14721         * tests/gpgscm/scheme.c (atom2str): Fix computing the length of Scheme
14722         strings.  Scheme strings can contain zero bytes.
14723
14724         gpgscm: Implement 'atexit'.
14725         + commit 43f8006f5c75e3d15fe200e2fa41587a73bfb07b
14726         * tests/gpgscm/ffi.scm (throw): Run *run-atexit-handlers* when
14727         terminating the interpreter.
14728         (*atexit-handlers*): New variable.
14729         (*run-atexit-handlers*): New function.
14730         (atexit): Likewise.
14731         * tests/gpgscm/main.c (main): Run *run-atexit-handlers* at normal
14732         interpreter shutdown.
14733
14734 2016-11-04  NIIBE Yutaka  <gniibe@fsij.org>
14735
14736         scd: Fix length error for READKEY.
14737         + commit cd00b07ec26c3408e6aee66957b08c6fd319b700
14738         * scd/app-openpgp.c (do_readkey): Decrement the length.
14739
14740         scd: Add --advanced option for READKEY.
14741         + commit f9da935c3eb302e75a80def51128fb6f669661d7
14742         * scd/command.c (cmd_readkey) : Support ADVANCED arg.
14743         * scd/app.c (app_readcert): Add ADVANCED arg.
14744         * scd/app-openpgp.c (do_readkey): Implement ADVANCED arg.
14745         * scd/app-nks.c (do_readkey): Error return with GPG_ERR_NOT_SUPPORTED.
14746
14747 2016-11-03  Werner Koch  <wk@gnupg.org>
14748
14749         agent: Extend the PINENTRY_LAUNCHED inquiry and status.
14750         + commit c1ea0b577a468030d2b006317ba27fc1746c4b14
14751         * agent/call-pinentry.c (start_pinentry): Get flavor and version and
14752         pass it to agent_inq_pinentry_launched.
14753         * agent/command.c (agent_inq_pinentry_launched): Add arg EXTRA.
14754         * g10/server.c (gpg_proxy_pinentry_notify): Print a new diagnostic.
14755
14756 2016-11-03  Justus Winter  <justus@g10code.com>
14757
14758         g10: Improve and unify key selection for -r and --locate-keys.
14759         + commit ab89164be02012f1bf159c971853b8610e966301
14760         * g10/getkey.c (struct pubkey_cmp_cookie): New type.
14761         (key_is_ok, uid_is_ok, subkey_is_ok): New functions.
14762         (pubkey_cmp): Likewise.
14763         (get_best_pubkey_byname): Likewise.
14764         * g10/keydb.h (get_best_pubkey_byname): New prototype.
14765         * g10/keylist.c (locate_one): Use the new function.
14766         * g10/pkclist.c (find_and_check_key): Likewise.
14767         * tests/openpgp/Makefile.am (XTESTS): Add new test.
14768         (TEST_FILES): Add new files.
14769         * tests/openpgp/key-selection.scm: New file.
14770         * tests/openpgp/key-selection/0.asc: Likewise.
14771         * tests/openpgp/key-selection/1.asc: Likewise.
14772         * tests/openpgp/key-selection/2.asc: Likewise.
14773         * tests/openpgp/key-selection/3.asc: Likewise.
14774         * tests/openpgp/key-selection/4.asc: Likewise.
14775
14776         gpgscm,tests: Add new functions to the test environment.
14777         + commit 1ec07cbc209f247fd85704f5701564e31aa56d0b
14778         * tests/gpgscm/lib.scm (first, last, powerset): New functions.
14779         * tests/gpgscm/tests.scm (interactive-shell): New function.
14780         * tests/openpgp/Makefile.am (EXTRA_DIST): Add new file.
14781         * tests/openpgp/README: Document 'interactive-shell'.
14782         * tests/openpgp/shell.scm: New file.
14783
14784 2016-11-03  Werner Koch  <wk@gnupg.org>
14785
14786         gpgconf: Add a new field to the --query-swdb output.
14787         + commit d10b67b9bc32e8feff1be86e6646fc23e58fe45d
14788         * tools/gpgconf.c (query_swdb): Insert new field with the installed
14789         version.  Check that the supplied version does not contain a colon.
14790
14791 2016-11-02  Werner Koch  <wk@gnupg.org>
14792
14793         gpgconf: Add command --query-swdb.
14794         + commit 0ed6a6df5aa421a9c5cdb1e63867f0deee79af9e
14795         * tools/gpgconf.c (aQuerySWDB): New.
14796         (opts): Add --query-swdb.
14797         (valid_swdb_name_p): New.
14798         (query_swdb): New.
14799         (main): Implement command --query-swdb.
14800
14801         common: Improve compare_string_versions.
14802         + commit 488b183811fc25c1ae49b4730491accf1adf518e
14803         * common/stringhelp.c: Include limits.h.
14804         (compare_version_strings): Change semantics to behave like strcmp.
14805         Include the patch lebel in the comparison.  Allow checking a single
14806         version string.
14807         * common/t-stringhelp.c (test_compare_version_strings): Adjust test
14808         vectors and a few new vectors.
14809         * g10/call-agent.c (warn_version_mismatch): Adjust to new sematics.
14810         * g10/call-dirmngr.c (warn_version_mismatch): Ditto.
14811         * sm/call-agent.c (warn_version_mismatch): Ditto.
14812         * sm/call-dirmngr.c (warn_version_mismatch): Ditto.
14813
14814 2016-11-02  Justus Winter  <justus@g10code.com>
14815
14816         gpgscm: Fix inclusion of readline header.
14817         + commit 60ad1a7f37ffc10e601e69a3e2d2bb14af510257
14818         * tests/gpgscm/ffi.c: Define magic macro to prevent the completion
14819         function from redefined.
14820
14821 2016-11-02  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14822
14823         build: Fix misspelled dirmngr.
14824         + commit 5e693ddfbe44d149ce0d9393d699c613ad5ea706
14825
14826
14827         Spelling: correct spelling of "passphrase".
14828         + commit 68b59bbc42ba9ec69496758743924d54a95742f0
14829         There were several different variant spellings of "passphrase".  This
14830         should fix them all for all English text.
14831
14832         I did notice that po/it.po contains multiple instances of
14833         "passhprase", which also looks suspect to me, but i do not know
14834         Italian, so i did not try to correct it.
14835
14836 2016-11-02  Justus Winter  <justus@g10code.com>
14837
14838         g10,w32: Fix build on Windows.
14839         + commit 5d4f1408d0dd055d412ae44bb4a0f28f74617f05
14840         * g10/tofu.c (begin_transaction): Use the new 'gnupg_usleep'.
14841
14842 2016-10-31  Werner Koch  <wk@gnupg.org>
14843
14844         common: New function gnupg_usleep.
14845         + commit ad491ceec6145b3781a05dc7b4a36052abeeb4b4
14846         * configure.ac (HAVE_NANOSLEEP): Test for nanosleep.
14847         * common/sysutils.c: Always include time.h.
14848         (gnupg_usleep): New.
14849
14850 2016-10-31  Andre Heinecke  <aheinecke@intevation.de>
14851
14852         w32: Fix PKG_CONFIG_LIBDIR in --build-w32.
14853         + commit 3b6b8fe32af7568ff51066d4c2e3679df6dea86f
14854         * autogen.sh: Point pkg-config to the right location.
14855
14856 2016-10-31  Neal H. Walfield  <neal@g10code.com>
14857
14858         g10: Avoid gratuitious SQLite aborts and starving writers.
14859         + commit 7a634e48b13c5d5d295b8fed9b429e1b2109a333
14860         * g10/tofu.c: Include <time.h>, <utime.h>, <fcntl.h> and <unistd.h>.
14861         (tofu_dbs_s): Add fields want_lock_file and want_lock_file_ctime.
14862         (begin_transaction): Only yield if DBS->WANT_LOCK_FILE_CTIME has
14863         changed since we took the lock.  Don't use gpgrt_yield to yield, but
14864         sleep for 100ms.  After taking the batch lock, update
14865         DBS->WANT_LOCK_FILE_CTIME.  Also take the batch lock the first time we
14866         take the real lock.  When taking the real lock, use immediate not
14867         deferred mode to avoid gratuitious aborts.
14868         (end_transaction): When dropping the outermost real lock, drop the
14869         batch lock.
14870         (busy_handler): New function.
14871         (opendbs): Set the busy handler to it when opening the DB.  Initialize
14872         CTRL->TOFU.DBS->WANT_LOCK_FILE.
14873         (tofu_closedbs): Free DBS->WANT_LOCK_FILE.
14874
14875 2016-10-30  Neal H. Walfield  <neal@g10code.com>
14876
14877         g10: Avoid reading in keys when possible.
14878         + commit eec365a02bd35d2d5c9e4d2c8d18bcd9180cf859
14879         * g10/tofu.c (build_conflict_set): If CONFLICT_SET contains a single
14880         element, don't bother to check for cross sigs.  Add parameter PK.
14881         Update callers.
14882
14883         g10: Fix bit setting.
14884         + commit 614ca00676bb8ca12b5107fec0e4ef8818445254
14885         * g10/tofu.c (build_conflict_set): Fix bit setting.
14886
14887 2016-10-28  Werner Koch  <wk@gnupg.org>
14888
14889         gpg: Enable the Issuer Fingerprint from rfc4880bis.
14890         + commit b6f08dbb0b45059cdbbb5d9be9725e437f42a8cc
14891         * g10/build-packet.c (build_sig_subpkt_from_sig): Always write the new
14892         Issuer Fingerprint sub-packet.
14893         * g10/mainproc.c (check_sig_and_print): Always consider that
14894         sub-packet.
14895
14896 2016-10-27  Werner Koch  <wk@gnupg.org>
14897
14898         dirmngr: Fix signature checking.
14899         + commit 5a1f6a0062488aaf345b1c73ba98a540e673d619
14900         * dirmngr/server.c: Include cpparray.h.
14901         (verify_swdb_parm_s): New.
14902         (verify_swdb_status_cb): New.
14903         (cmd_versioncheck): Use gpgv to correclty verify the signature.
14904         Rename some variable to comply with GNU standards.
14905
14906         gpg: Verify multiple detached signatures with different hash algos.
14907         + commit 8fced66be35db5ac2a6bfdb9bccb2c0e582d8256
14908         * g10/mainproc.c (proc_tree): Loose check.  Enable all algos.
14909
14910         common: Add GNUPG_MODULE_NAME_GPGV.
14911         + commit ece9ade4b44fb3d5d120cfd32b23632e5efd2134
14912         * common/util.h (GNUPG_MODULE_NAME_GPGV): New.
14913         * common/homedir.c (gnupg_module_name): Implement.
14914
14915 2016-10-27  Justus Winter  <justus@g10code.com>
14916
14917         g10: Fix iteration over getkey results.
14918         + commit 8ea72a776a88f3c851e812d258355be80caa1bc1
14919         * g10/getkey.c (getkey_next): Return the public key in PK even if
14920         RET_KEYBLOCK is NULL.
14921
14922         g10: Assert preconditions.
14923         + commit 66a0091d74768ab3a4a5342d3645e1834c59045a
14924         * g10/getkey.c (get_pubkey_byname): Assert preconditions.
14925
14926 2016-10-27  Werner Koch  <wk@gnupg.org>
14927
14928         dirmngr: Do not implement --supervised in Windows.
14929         + commit cf20b23c146c9e499263654644035796475de097
14930         * dirmngr/dirmngr.c (opts) [W32]: Remove --supervised.
14931         (main) [W32]: Ditto.
14932
14933         common: Remove debug output from gnupg_get_socket_name.
14934         + commit a9c8b5fbe7ae241bf45bdee15884abc7891aedf9
14935         * common/sysutils.c (gnupg_get_socket_name): Remove debug message and
14936         use my_error_from_syserror.
14937
14938 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
14939
14940         dirmngr: ADNS error handling fix.
14941         + commit 45dfc02b47f798f5a3b9973ca6a9f5a907d7e665
14942         * dirmngr/dns-stuff.c (resolve_name_adns, get_dns_cert, get_dns_cname):
14943         Use gpg_error and gpg_err_code_from_errno to compose the error value.
14944
14945 2016-10-27  Werner Koch  <wk@gnupg.org>
14946
14947         gpg: Convey --quick option to dirmngr for --auto-key-retrieve.
14948         + commit a15ed5a1fd5307b3ec1822daf3b138b187db0b5e
14949         * g10/call-dirmngr.c (gpg_dirmngr_ks_get): Add arg 'quick'.
14950         (gpg_dirmngr_wkd_get): Ditto.
14951         * g10/keyserver.c (keyserver_get): Add arg 'quick'.
14952         (keyserver_get_chunk): Add arg 'quick'.
14953         (keyserver_import_fprint): Ditto.  Change callers to pass 0 for it.
14954         (keyserver_import_keyid): Ditto.
14955         (keyserver_import_wkd): Ditto.
14956         * g10/mainproc.c (check_sig_and_print): Call the 3 fucntions with
14957         QUICK set.
14958
14959 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
14960
14961         common: Fix gnupg_inotify_has_name, differently.
14962         + commit 8b3d0d1a36cab83dafb98ccb7895144edb95e298
14963         * common/sysutils.c (gnupg_inotify_has_name): Use void * to stop the
14964         warning.
14965
14966         dirmngr: More ADNS error fix.
14967         + commit 6f1d8123d61b3efac94b4c61ee75bd947790ba42
14968         * dirmngr/dns-stuff.c (get_dns_cert, getsrv, get_dns_cname): Fix return
14969         value.
14970
14971         dirmngr: Fix error return for ADNS.
14972         + commit 8a9341b42cd1891090d45cc068bff84b2b3edb50
14973         * dirmngr/dns-stuff.c (resolve_name_adns): Use RET for return value.
14974
14975         g10: Fix ECDH, clarifying the format.
14976         + commit ca0ee4e381d0b6a57e4ddc8f4bb2390eb97a2540
14977         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Returns error when
14978         it's short.  Clarify the format.  Handle other prefixes correctly.
14979
14980         scd: Add 0x41 prefix for x-coordinate only result.
14981         + commit 6bbd97d6c771b2e2c7cfcff6d5a823f0fb44d443
14982         * scd/app-openpgp.c (do_decipher): When it's x-coordinate only, add the
14983         prefix 0x41.
14984
14985 2016-10-27  Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
14986
14987         g10: ECDH shared point format.
14988         + commit b648f28f9f8b889f1217a649ded1d45f261bb2bf
14989         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Improve handling of
14990         ECDH shared point format.
14991
14992 2016-10-27  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
14993
14994         dirmngr: Implement --supervised command (for systemd, etc).
14995         + commit 75f8aaf5bc2dc7fcffe2987a572d489155c91eb9
14996         * dirmngr/dirmngr.c (main): Add new --supervised command, which is a
14997         mode designed for running under a process supervision system like
14998         systemd or runit.
14999         * doc/dirmngr.texi: document --supervised option.
15000
15001         agent,common: move get_socket_name() into common.
15002         + commit 6316b28e896957adb76a61a41d2e1c2a08d9f716
15003         * agent/gpg-agent.c (get_socket_name): move to ...
15004         * common/sysutils.c (gnupg_get_socket_name): ... here.
15005
15006         dirmngr: report actual socket name.
15007         + commit 6bb6ac56cca8135666387a0b9d88dd6b50311418
15008         * dirmngr/dirmngr.[ch] (dirmngr_get_current_socket_name): new function
15009         to report known socket name.
15010         * dirmngr/server.c (cmd_getinfo): use dirmngr_get_current_socket_name
15011         to report correct socket name.
15012
15013 2016-10-27  NIIBE Yutaka  <gniibe@fsij.org>
15014
15015         common: Fix gnupg_inotify_has_name.
15016         + commit bc28f320fa6f5b9fcdb73dba5e6c582daf7992c5
15017         * common/sysutils.c (gnupg_inotify_has_name): Take care of the
15018         alignment.
15019
15020         dirmngr: Fix help string and argument.
15021         + commit 96414baf36b8e6385b71847c789d489ebe176a93
15022         * dirmngr/server.c (hlp_versioncheck): Add a newline.
15023         (cmd_versioncheck): Fix argument.
15024
15025 2016-10-26  Werner Koch  <wk@gnupg.org>
15026
15027         dirmngr: Fix hang due to deferred thread initialization.
15028         + commit d1ccab5176d7719328b287544b54b85e0277b146
15029         * dirmngr/dirmngr.c (main): Call ldap_wrapper_launch_thread after
15030         thread_init.
15031
15032         agent: Avoid double error message.
15033         + commit b77f95a4a675fd20f6eeb611f4e7b519eceb4ad3
15034         * agent/gpg-agent.c (map_supervised_sockets): Shorten error message.
15035         Remove unneeded diagnostic.
15036
15037         common: Use GPG_ERR_INV_VALUE instead of GPG_ERR_EINVAL.
15038         + commit ece13f177d948013b6f3df926406c0cd947abc25
15039         * common/sysutils.c (gnupg_inotify_watch_socket): Return
15040         GPG_ERR_INV_VALUE for a missing socket name and set proper error
15041         source.
15042
15043         tests: Improve portability of fake-pinentry.
15044         + commit 21b318452abbfe21c45c2a67dae0e3a81cff1090
15045         * tests/openpgp/fake-pinentry.c: Make all functions static.
15046         (get_passphrase): s/unlink/remove/ because that is standard C.
15047         (spacep): Rename to whitespace and change all callers.
15048         (main): Move macro out of if-then chain.
15049
15050 2016-10-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15051
15052         agent: --supervised mode improvements.
15053         + commit 27f6d5b9f4b6057ddeb9ace87a1e7e61ebac63e6
15054         * agent/gpg-agent.c (map_supervised_socket): if the agent is running
15055           in --supervised mode and is not actually given LISTEN_FDNAMES
15056           directives, require at least fd 3 to be open for listening.
15057
15058         common: avoid segfault.
15059         + commit 3b5f5e0eb02ecbdcf59722755f22a9d2f88de6e6
15060         * common/sysutils.c (gnupg_inotify_watch_socket): return EINVAL if
15061           socket_name is NULL, rather than segfaulting
15062
15063 2016-10-25  Justus Winter  <justus@g10code.com>
15064
15065         agent,tests,w32: Fix relaying pinentry user data, fix fake-pinentry.
15066         + commit 852b8f0b89d447536dfdf6cd4ea91615c75491ce
15067         * agent/call-pinentry.c (start_pinentry): Also send the user data
15068         using an Assuan 'OPTION' command.
15069         * tests/openpgp/fake-pinentry.c (get_passphrase): Fix updating
15070         passphrase file.
15071         (spacep): Include newline characters.
15072         (rstrip): New function.
15073         (main): Handle Windows line endings.  Handle the userdata option, and
15074         restart with the new options.
15075
15076         tests: Do not autostart gpg-agents on teardown.
15077         + commit f88f11a25665dca7490a09088aa24edf396e4c40
15078         * tests/openpgp/defs.c (stop-agent): Use '--no-autostart' when calling
15079         gpg-connect-agent.
15080
15081 2016-10-25  Werner Koch  <wk@gnupg.org>
15082
15083         dirmngr: Allow command VERSIONCHECK to handle 3 part version numbers.
15084         + commit b120f358c25cc846ca9d841d47e71ca1a7fe02e4
15085         * dirmngr/server.c (parse_version_string): Add arg MICRO and set it.
15086         (cmp_version): Extend to handle the MICRO part.
15087         (confucius_mktmpdir): Rename to my_mktmpdir.
15088         (my_mktmpdir): xstrconcat does not fail; use strconcat.
15089         (fetch_into_tmpdir): Improve error checking.
15090
15091         common: Use strconcat in gnupg_setenv.
15092         + commit 7983f8758703071710c11bf2a255efcd71836b65
15093         * common/sysutils.c (gnupg_setenv): Replace malloc+stpcpy by
15094         strconcat.  Indent cpp conditionals.
15095         (gnupg_unsetenv): Indent cpp conditionals.
15096
15097 2016-10-24  Werner Koch  <wk@gnupg.org>
15098
15099         gpg: Replace two sprintf calls.
15100         + commit 9d6146d6f9870fbfcec15cdc4becaf094d5a90e0
15101         * g10/keygen.c (print_status_key_created): Use snprintf for now.
15102         (ask_expire_interval): Replace xmalloc and sprintf by xasprintf.
15103
15104         agent: Minor cleanup for recent change in findkey.c.
15105         + commit 8c40b3b98d3ddeda79fde981e6539c5b3b09d9a2
15106         * agent/findkey.c (agent_write_private_key): Avoid label name error.
15107
15108         agent: Slightly change structure of cmd_readkey.
15109         + commit fdb653a33ea1a24d1159880624dbbcc0867865b5
15110         * agent/command.c (cmd_readkey): Avoid a leave label in the middle of
15111         the code.  Remove the special return.
15112
15113 2016-10-24  Kai Michaelis  <kai@gnupg.org>
15114
15115         dirmngr: Fix segfault in VERSIONCHECK.
15116         + commit 5e7dfd979d2d91800d90c3ce9a66755df3217682
15117         * dirmngr/server.c (cmd_versioncheck): The VERSIONCHECK command crashes
15118         when called without program version.
15119
15120 2016-10-24  NIIBE Yutaka  <gniibe@fsij.org>
15121
15122         scd: Use canonical curve name of libgcrypt.
15123         + commit b1828c17fc475def1ee9e06f083f513f568c241b
15124         * scd/app-openpgp.c (send_key_attr): Use curve instead of OID.
15125         (ecdh_params): New.
15126         (ecc_read_pubkey): Use ecdh_params.  Use curve name.
15127         (ecc_writekey): Likewise.
15128         (ecc_curve): Rename from ecc_oid.
15129         (parse_algorithm_attribute): Use ecc_curve.
15130         * g10/call-agent.c (learn_status_cb): Use openpgp_is_curve_supported to
15131         intern the curve name string.
15132         * g10/card-util.c (card_status): Conver curve name to alias for print.
15133
15134         common: Fix openpgp_is_curve_supported.
15135         + commit 945e7ab0ddedf5f58afd97d81e101939de5b5d89
15136         * common/openpgp-oid.c (openpgp_is_curve_supported): Support both of
15137         canonical name of the curve and alias.
15138
15139         g10: Fix card keygen for decryption.
15140         + commit acef0951646b47c87ccc1c616f0105a068e7ed86
15141         * g10/keygen.c (do_generate_keypair): Fix arguments.
15142
15143 2016-10-22  NIIBE Yutaka  <gniibe@fsij.org>
15144
15145         g10: More card key generation change.
15146         + commit 987bbb2276aeb6bee2793e8406e223717b605009
15147         * g10/keygen.c (gen_card_key): Add back ALGO as the second argument.
15148         Don't get ALGO by KEY-ATTR by this function.  It's caller to provide
15149         ALGO.  Don't do that by both of caller and callee.
15150         (generate_keypair): Only put paramerters needed.  Use parameters
15151         for ALGO to call gen_card_key.
15152         (generate_card_subkeypair): Get ALGO and call gen_card_key with it.
15153
15154 2016-10-21  Andre Heinecke  <aheinecke@intevation.de>
15155
15156         g10: Write first keybox record in binary mode.
15157         + commit f7e50634be71ce3028726f23edf14454109a04a8
15158         * g10/keydb.c (maybe_create_keyring_or_box): Open in binary mode.
15159
15160 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
15161
15162         g10,scd: Fix ECC keygen.
15163         + commit d2653b1a6db90aed073194a51fd61023d69773ec
15164         * g10/keygen.c (generate_keypair): For card key generation, fill
15165         parameters by KEY-ATTR.
15166
15167         * scd/app-openpgp.c (ecc_read_pubkey): OID should be freed at last,
15168         after its reference by OIDBUF is finished.
15169         (ecc_writekey): Likewise.
15170
15171         scd: Fix segfault changing key attr.
15172         + commit 693e657ff04756737dce025203c0deba480ea8de
15173         * asc/app-openpgp.c (change_keyattr_from_string): Release after
15174         allocated.
15175
15176 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
15177             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
15178
15179         g10: Don't ask keysize for for non-RSA card.
15180         + commit dafce6f698bec6e9d4c0125b90754d0687294e86
15181         * g10/card-util.c (card_status): Bug fix for keyno.
15182         (ask_card_rsa_keysize, do_change_rsa_keysize): Rename.
15183         (generate_card_keys): Only ask keysize when RSA.
15184         (card_generate_subkey): Likewise.
15185
15186         g10: Support ECC for gen_card_key.
15187         + commit 161cb22f13bcd8cbdb08558d9926b2168a8297ac
15188         * g10/keygen.c (gen_card_key): Remove the first argument of ALGO.
15189         (do_generate_keypair, generate_card_subkeypair): Follow the change.
15190
15191 2016-10-21  NIIBE Yutaka  <gniibe@fsij.org>
15192
15193         Fix use cases of snprintf.
15194         + commit 6e85ac77af594035137950d801d8a1bacce548a3
15195         * agent/call-pinentry.c, agent/call-scd.c, agent/command.c,
15196         build-aux/speedo/w32/g4wihelp.c, common/get-passphrase.c,
15197         dirmngr/dirmngr.c, g10/call-agent.c, g10/cpr.c, g10/keygen.c,
15198         g10/openfile.c, g10/passphrase.c, scd/app-openpgp.c, scd/scdaemon.c,
15199         sm/call-agent.c, sm/call-dirmngr.c, sm/certreqgen.c: Fix assuming C99.
15200
15201         agent: Fix saving with FORCE=1.
15202         + commit 1ffd475f99eaff4e40950eda88702f8db9288eb5
15203         * agent/findkey.c (agent_write_private_key): Recover from an error of
15204         GPG_ERR_ENOENT when FORCE=1 and it is opened with "rb+".
15205
15206 2016-10-20  Justus Winter  <justus@g10code.com>
15207
15208         tests: Simplify test.
15209         + commit 71158d8d5f823888abc8588caa6497860ce59c06
15210         * tests/openpgp/quick-key-manipulation.scm: Avoid creating a temporary
15211         home directory, just make the uids unique.
15212
15213         tests: Flush stdout in the fake pinentry.
15214         + commit ca9597f080f70a8435daaeb5449bef0462a1402a
15215         * tests/openpgp/fake-pinentry.c (reply): Flush stdout.
15216
15217         common,w32: Fix setting environment variables on Windows.
15218         + commit 8c7c4faf3de28ca70a60e6b15f51c1b206e0ddd9
15219         * common/sysutils.c (gnupg_setenv): Also update the environment block
15220         maintained by the C runtime.
15221         (gnupg_unsetenv): Likewise.
15222         * tests/gpgscm/ffi.c (do_setenv): Fix error handling.
15223
15224         tests,w32: Cope with Windows line endings.
15225         + commit bf37916a23bd0929fc4a5f28c9a41f43c5a473f6
15226         * tests/openpgp/issue2015.scm: Rstrip line before comparison.
15227
15228         tests: Create and remove socket directories.
15229         + commit 2d794779e0fd9d9a1efc98e7bd77a296a25f4293
15230         * tests/openpgp/defs.scm (start-agent): Move function here and create
15231         the socket directory prior to starting the agent.
15232         (stop-agent): Move function here and remove the socket directory.
15233         * tests/openpgp/finish.scm: Adapt.
15234         * tests/openpgp/setup.scm: Likewise.
15235
15236 2016-10-20  NIIBE Yutaka  <gniibe@fsij.org>
15237
15238         agent, g10: Fix keygen.
15239         + commit 9a34e2142b426b98c73fd888102ea1596bbce62a
15240         * agent/command.c (cmd_readkey): Get length after card_readkey.
15241         * g10/keygen.c (gen_card_key): Fix off-by-one error.
15242
15243         scd: GENKEY updates the public key in APP.
15244         + commit b680f79cc112c4831293e259d7db2921bcd783a4
15245         * scd/app-openpgp.c (rsa_read_pubkey, ecc_read_pubkey): New.
15246         (read_public_key): New.
15247         (get_public_key, do_genkey): Use read_public_key.
15248
15249         g10: smartcard keygen change.
15250         + commit 980c037bedb968ddf155dd334c0a70b918a17759
15251         * g10/call-agent.c (scd_genkey_cb_append_savedbytes): Remove.
15252         (scd_genkey_cb): Only handle KEY-CREATED-AT and PROGRESS.
15253         (agent_scd_genkey): Remove INFO argument.  CREATETIME is now in/out
15254         argument.
15255         (agent_readkey): Use READKEY --card instead of SCD READKEY.
15256         * g10/keygen.c (gen_card_key): Use READKEY --card command of the agent
15257         to retrieve public key information from card and let the agent make
15258         a file for private key with shadow info.
15259
15260         agent: Add --card option for READKEY.
15261         + commit 82cbab906a3e72a98fdc16096f2f0451465969a2
15262         * agent/findkey.c (agent_write_shadow_key): New.
15263         * agent/command-ssh.c (card_key_available): Use agent_write_shadow_key.
15264         * agent/learncard.c (agent_handle_learn): Likewise.
15265         * agent/command.c (cmd_readkey): Add --card option.
15266
15267 2016-10-19  Kai Michaelis  <kai@gnupg.org>
15268
15269         dirmngr: improve VERSIONCHECK.
15270         + commit 72a99f582dad4cb4c3b05b97c7ebb8d537f10b79
15271         Replace strtok_r() and code formatting. Use code from libgpg-error for
15272         version comparison.
15273
15274 2016-10-18  Justus Winter  <justus@g10code.com>
15275
15276         common: Fix copying data to estreams.
15277         + commit 8dce5ee55a0268d196023224dcf3020306922490
15278         * common/exectool.c (copy_buffer_do_copy): Correctly account for
15279         partially written data in the event of errors.
15280
15281         common,w32: Communicate with child in non-blocking mode.
15282         + commit 05a1e412332dd980353a4e3e59bc75ba40bae7fc
15283         * common/exechelp-w32.c (gnupg_spawn_process): Open streams in
15284         non-blocking mode if requested.
15285
15286         common,w32: Extend gnupg_create_inbound_pipe et al.
15287         + commit f2d39a6d051413289c717b9cd2dc387a270b8e7c
15288         * common/exechelp-w32.c (do_create_pipe): Rename, add arguments, and
15289         create a stream if reqested.
15290         (gnupg_create_inbound_pipe): Use the extended function to open the
15291         stream if requested.
15292         (gnupg_create_outbound_pipe): Likewise.
15293         (gnupg_create_pipe): Update call site.
15294
15295         common,w32: Make use of default_errsource in exechelp.
15296         + commit 727ca74bb942464217e678012cccbfc347ae08a5
15297         * common/exechelp-posix.c (my_error_from_syserror, my_error): New.
15298         Use them instead of gpg_error and gpg_error_from_syserror.
15299
15300 2016-10-18  NIIBE Yutaka  <gniibe@fsij.org>
15301             Arnaud Fontaine  <arnaud.fontaine@ssi.gouv.fr>
15302
15303         scd: Support ECC key generation.
15304         + commit 34439da2d62b964a914ace66bae7e38f619582a4
15305         * scd/app-openpgp.c (get_public_key): Fix a message.
15306         (change_keyattr_from_string, ecc_writekey): Call mpi_release sooner.
15307         (do_genkey): Add ECC support.
15308
15309 2016-10-18  NIIBE Yutaka  <gniibe@fsij.org>
15310
15311         scd: minor cleanup to merge other works.
15312         + commit f1845f25dbea79c191427710fa56ed01e63a045b
15313         * scd/iso7816.c (do_generate_keypair): Use const char * for DATA.
15314         (iso7816_generate_keypair, iso7816_read_public_key): Likewise.
15315         * scd/app-openpgp.c (get_public_key): Follow the change.
15316         (do_genkey): Ditto.  Use ERR instead of RC.  Use u32 for CREATED_AT.
15317
15318 2016-10-17  Justus Winter  <justus@g10code.com>
15319
15320         gpgscm: Initialize nesting stack.
15321         + commit c2e713d9e25ef8b61e8eeb3c01ee1e31cb70b794
15322         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize nesting
15323         stack.
15324
15325 2016-10-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15326
15327         doc: Document how to manually shut down gpg-agent.
15328         + commit 869c06efa791bbc8330becdb3f13f7cf9506257e
15329         * doc/gpg-agent.texi: document "gpgconf --kill gpg-agent" for manual
15330           agent termination.
15331
15332         This was requested in a side-comment in https://bugs.debian.org/840669
15333
15334         doc: Point gpg-agent(1) at the right gpg manpage in SEE ALSO.
15335         + commit c53ce53ab1fa6a328c368f2a15e3ccd803f03ee2
15336         * doc/gpg-agent.texi (SEE ALSO): refer to @gpgname, instead of
15337           hard-coding "gpg2".
15338
15339 2016-10-17  NIIBE Yutaka  <gniibe@fsij.org>
15340
15341         scd: Fix keytocard for ECC.
15342         + commit 25428be52168fa9c581b7f11c95a5c63b25343b7
15343         * scd/app-openpgp.c (build_ecc_privkey_template): Size can be greater
15344         than 128 when it comes with public key for curve of larger field.
15345
15346         gpgconf: Fix for --homedir.
15347         + commit 70a8584ec4389209762eb65bb77f20f7881577be
15348         * tools/gpgconf-comp.c (gpg_agent_runtime_change,
15349         scdaemon_runtime_change, dirmngr_runtime_change): Provide the homedir
15350         arguments by --homedir when it's not default.
15351
15352 2016-10-16  Werner Koch  <wk@gnupg.org>
15353
15354         agent: Use straightforward names for the default socket names.
15355         + commit 0b0f9a3788cb5d3c26cec16cd24acc973069d280
15356         * configure.ac (GPG_AGENT_SOCK_NAME): Change name to *.extra.
15357         (GPG_AGENT_EXTRA_SOCK_NAME): Change name to *browser.
15358
15359 2016-10-15  Werner Koch  <wk@gnupg.org>
15360
15361         agent: Move inotify code to common and improve it.
15362         + commit 2f7d4c38c9e7bcc14e6e0bf219d688c40a4afecb
15363         * common/sysutils.c: Include sys/inotify.h.
15364         (my_error_from_syserror, my_error): New.
15365         (gnupg_inotify_watch_socket): New.
15366         (gnupg_inotify_has_name): New.
15367         * agent/gpg-agent.c: Do not include sys/inotify.h.
15368         (my_inotify_is_name): Remove.
15369         (handle_connections): Remove HAVE_INOTIFY_INIT protected code and use
15370         the new functions.
15371
15372 2016-10-14  Kai Michaelis  <kai@gnupg.org>
15373
15374         dirmngr: use gnupg_mkdtemp instead of mkstemp.
15375         + commit c318561ef4c97f0c2767aef377531d58174060a1
15376         MinGW on debian does not support mkstemp.
15377
15378         dirmngr: add VERSIONCHECK command.
15379         + commit f99c5fa1c970dc1122ac62371eb8d758f380ed57
15380         Given an application name and version VERSIONCHECK fetches the software
15381         version list from version.gnupg.org, verifies the signature and returns
15382         whenever the given version is older (UPDATE), current (CURRENT) or newer
15383         (ROLLBACK).
15384
15385 2016-10-13  Neal H. Walfield  <neal@g10code.com>
15386
15387         tests: Use shorter filenames.
15388         + commit 0c56ad5a8d89d69a9ed00571720b3b105f955214
15389         * tests/openpgp/tofu/cross-sigs/
15390           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.gpg: Rename from this...
15391         * tests/openpgp/tofu/cross-sigs/EC38277E-1.gpg: .. to this.
15392         * tests/openpgp/tofu/cross-sigs/
15393           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.txt: Rename from this...
15394         * tests/openpgp/tofu/cross-sigs/EC38277E-1.txt: .. to this.
15395         * tests/openpgp/tofu/cross-sigs/
15396           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.gpg: Rename from this...
15397         * tests/openpgp/tofu/cross-sigs/EC38277E-2.gpg: .. to this.
15398         * tests/openpgp/tofu/cross-sigs/
15399           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.txt: Rename from this...
15400         * tests/openpgp/tofu/cross-sigs/EC38277E-2.txt: .. to this.
15401         * tests/openpgp/tofu/cross-sigs/
15402           1938C3A0E4674B6C217AC0B987DB2814EC38277E-3.txt: Rename from this...
15403         * tests/openpgp/tofu/cross-sigs/EC38277E-3.txt: .. to this.
15404         * tests/openpgp/tofu/cross-sigs/
15405           1938C3A0E4674B6C217AC0B987DB2814EC38277E-secret.gpg: Rename from
15406           this...
15407         * tests/openpgp/tofu/cross-sigs/EC38277E-secret.gpg: .. to this.
15408         * tests/openpgp/tofu/cross-sigs/
15409           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.gpg: Rename from this...
15410         * tests/openpgp/tofu/cross-sigs/871C2247-1.gpg: .. to this.
15411         * tests/openpgp/tofu/cross-sigs/
15412           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.txt: Rename from this...
15413         * tests/openpgp/tofu/cross-sigs/871C2247-1.txt: .. to this.
15414         * tests/openpgp/tofu/cross-sigs/
15415           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.gpg: Rename from this...
15416         * tests/openpgp/tofu/cross-sigs/871C2247-2.gpg: .. to this.
15417         * tests/openpgp/tofu/cross-sigs/
15418           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.txt: Rename from this...
15419         * tests/openpgp/tofu/cross-sigs/871C2247-2.txt: .. to this.
15420         * tests/openpgp/tofu/cross-sigs/
15421           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.gpg: Rename from this...
15422         * tests/openpgp/tofu/cross-sigs/871C2247-3.gpg: .. to this.
15423         * tests/openpgp/tofu/cross-sigs/
15424           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.txt: Rename from this...
15425         * tests/openpgp/tofu/cross-sigs/871C2247-3.txt: .. to this.
15426         * tests/openpgp/tofu/cross-sigs/
15427           DC463A16E42F03240D76E8BA8B48C6BD871C2247-4.gpg: Rename from this...
15428         * tests/openpgp/tofu/cross-sigs/871C2247-4.gpg: .. to this.
15429         * tests/openpgp/tofu/cross-sigs/
15430           DC463A16E42F03240D76E8BA8B48C6BD871C2247-secret.gpg: Rename from
15431           this...
15432         * tests/openpgp/tofu/cross-sigs/871C2247-secret.gpg: .. to this.
15433         * tests/openpgp/Makefile.am (TEST_FILES): Update accordingly.
15434
15435         g10: Be more careful when checking if a binding is signed by a UTK.
15436         + commit 95d0f3e5eebd85dcf226dca14891a1215bfe93ae
15437         * g10/tofu.c (signed_by_utk): When checking if a key is signed by an
15438         ultimately trusted key, only consider the signatures on the specified
15439         user id.
15440         * tests/openpgp/tofu.scm: Add test for the above.
15441
15442         tests: Add test data to TEST_FILES.
15443         + commit d2d936fbe86d61b89cead95df633b2b575690e05
15444         * tests/openpgp/Makefile.am (TEST_FILES): Add new test data.
15445
15446         g10: Be more careful when checking cross signatures.
15447         + commit 4c0389f8eb19ae7dfd9c5d784a629b386d93cc5c
15448         * g10/tofu.c (cross_sigs): When checking cross signatures, only
15449         consider the signatures on the specified user id.
15450         * tests/openpgp/tofu.scm: Add test for the above.
15451         * tests/openpgp/tofu/cross-sigs/
15452           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.gpg:
15453           New file.
15454         * tests/openpgp/tofu/cross-sigs/
15455           1938C3A0E4674B6C217AC0B987DB2814EC38277E-1.txt: New file.
15456         * tests/openpgp/tofu/cross-sigs/
15457           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.gpg: New file.
15458         * tests/openpgp/tofu/cross-sigs/
15459           1938C3A0E4674B6C217AC0B987DB2814EC38277E-2.txt: New file.
15460         * tests/openpgp/tofu/cross-sigs/
15461           1938C3A0E4674B6C217AC0B987DB2814EC38277E-3.txt: New file.
15462         * tests/openpgp/tofu/cross-sigs/
15463           1938C3A0E4674B6C217AC0B987DB2814EC38277E-secret.gpg: New file.
15464         * tests/openpgp/tofu/cross-sigs/
15465           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.gpg: New file.
15466         * tests/openpgp/tofu/cross-sigs/
15467           DC463A16E42F03240D76E8BA8B48C6BD871C2247-1.txt: New file.
15468         * tests/openpgp/tofu/cross-sigs/
15469           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.gpg: New file.
15470         * tests/openpgp/tofu/cross-sigs/
15471           DC463A16E42F03240D76E8BA8B48C6BD871C2247-2.txt: New file.
15472         * tests/openpgp/tofu/cross-sigs/
15473           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.gpg: New file.
15474         * tests/openpgp/tofu/cross-sigs/
15475           DC463A16E42F03240D76E8BA8B48C6BD871C2247-3.txt: New file.
15476         * tests/openpgp/tofu/cross-sigs/
15477           DC463A16E42F03240D76E8BA8B48C6BD871C2247-4.gpg: New file.
15478         * tests/openpgp/tofu/cross-sigs/
15479           DC463A16E42F03240D76E8BA8B48C6BD871C2247-secret.gpg: New file.
15480         * tests/openpgp/tofu/cross-sigs/README: New file.
15481
15482         g10: Still check if the key is an UTK or cross signed in batch mode.
15483         + commit e09166c77273f459c8f87cab9224f85808af2cba
15484         * g10/tofu.c (get_trust): If POLICY is ask, but we can't ask, don't
15485         bail immediately.  Instead, check if the key in question is an
15486         ultimately trusted key or cross signed.
15487
15488         g10: If an sqlite operation fails, map the error code to GPG_ERR_GENERAL
15489         + commit 5bf92e51dfdfb4f4746ecd817d8d2240ed27ea74
15490         * g10/tofu.c (get_policy): If an sqlite operation fails, map the error
15491           code to GPG_ERR_GENERAL.
15492         (ask_about_binding): Likewise.
15493         (build_conflict_set): Likewise.
15494         (get_trust): Likewise.
15495         (show_statistics): Likewise.
15496         (tofu_register_signature): Likewise.
15497         (tofu_register_encryption): Likewise.
15498
15499         tests: Remove support for deprecated functionality.
15500         + commit 2282c3b761413dfa894300e70084bbd58908c0b1
15501         * tests/openpgp/tofu.scm: Don't remove tofu.d.  It's deprecated.
15502
15503 2016-10-12  Neal H. Walfield  <neal@g10code.com>
15504
15505         g10: When changing a TOFU binding's policy, update the conflict info.
15506         + commit 3ad17e72fa81d18c95732ddcd4def244f52bb5b1
15507         * g10/tofu.c (record_binding): Take an additional argument, CONFLICT.
15508         Set the binding's conflict accordingly.  Update callers.
15509
15510         g10: Make a singular string singular.
15511         + commit ca84f65c7cf2c6a08a01018519965a82e6c52cac
15512         * g10/tofu.c (ask_about_binding): Make the singular string singular.
15513
15514         g10: Correctly determine whether a binding has a conflict.
15515         + commit 6fdf37f0831949cb279de6dc6b247ab2ed53fe5a
15516         * g10/tofu.c (build_conflict_set): A binding has a conflict is
15517         conflict is *not* NULL, not if it is NULL.
15518
15519         g10: Fix a column's type in TOFU DB.
15520         + commit 78eda335fd1c29038b74b9cc912b6a4515fccd9f
15521         * g10/tofu.c (initdb): Change policy from a boolean to an integer.
15522
15523 2016-10-07  Justus Winter  <justus@g10code.com>
15524
15525         tests: Rework test environment setup.
15526         + commit cbbf0a7a8da1757fea29cff0daaa42a6bbb95b26
15527         * tests/openpgp/setup.scm: Import one keyring at a time.  This works
15528         around a yet to be investigated hang on Windows.  It is also much
15529         prettier.
15530
15531         tests: Improve handling of Windows newlines.
15532         + commit 1f76f8d8bc65fad98927c977baf4d5e36dafe52b
15533         * tests/gpgscm/lib.scm (string-split-newlines): New function.
15534         * tests/openpgp/default-key.scm: Use new function.
15535         * tests/openpgp/defs.scm: Likewise.
15536         * tests/openpgp/export.scm: Likewise.
15537         * tests/openpgp/import.scm: Likewise.
15538
15539         gpgscm: Improve test of low-level functions.
15540         + commit 11eac7eb2fa3392a9aa052f8f5bb9875129ab84b
15541         * tests/gpgscm/t-child.c: Print large amounts of data.
15542         * tests/gpgscm/t-child.scm: Test that this works.
15543
15544         gpgscm: Improve path handling.
15545         + commit dff266059813d22d1e2ba7e77279999cd41ceb75
15546         * tests/gpgscm/ffi.c (ffi_init): New Scheme variable '*win32*'.
15547         * tests/gpgscm/tests.scm (canonical-path): Correctly handle paths with
15548         drive letter on Windows.  Use 'path-join'.
15549         (path-expand): Use 'path-join'.
15550
15551         tools: Fix error handling.
15552         + commit 5afbfdfd59540cb882d891ff1f4afa73fe48f99a
15553         * tools/gpgtar-create.c (gpgtar_create): Do not crash if opening the
15554         tarball failed.
15555
15556 2016-10-07  NIIBE Yutaka  <gniibe@fsij.org>
15557
15558         agent: Fix get_socket_name.
15559         + commit fb3b3e1e7a4219f61a834fd07809898918611c2f
15560         * agent/gpg-agent.c (get_socket_name): Fix the size of copying.
15561
15562 2016-10-07  Werner Koch  <wk@gnupg.org>
15563
15564         gpg: Put extra parens around bit tests.
15565         + commit 5d43d28aa3c44c3a27fde823f467b0c4be1a58c2
15566         * g10/options.h (DBG_MPI): New.
15567         * g10/gpg.c (set_debug): Use macro or extra parens for binary operator.
15568         * g10/parse-packet.c (set_packet_list_mode): Use dbg macro.
15569
15570 2016-10-07  NIIBE Yutaka  <gniibe@fsij.org>
15571
15572         agent, dirmngr, scd: Fix init_common_subsystems.
15573         + commit fc0b392e766af8127094e8b529d25abb84ad1d65
15574         * common/init.c (_init_common_subsystems): Don't call
15575         gpgrt_set_syscall_clamp in this function.
15576         * agent/gpg-agent.c, dirmngr/dirmngr.c, scd/scdaemon.c: Call
15577         gpgrt_set_syscall_clamp after npth_init.
15578
15579 2016-10-06  Justus Winter  <justus@g10code.com>
15580
15581         common: Avoid pointer arithmetic on string literals.
15582         + commit 4aadc751f201f8f97c9c1f454e3a29803cce3edb
15583         * common/gettime.c (rfctimestamp): Use indexing instead.
15584         * common/signal.c (got_fatal_signal): Likewise.
15585
15586         g10: Fix singular term.
15587         + commit b0d2526bc4e5c663eeffe04500420c70cee98712
15588         * g10/tofu.c (ask_about_binding): Fix singular message.
15589
15590         g10: Use appropriate variant of 'abs'.
15591         + commit 73000d1ce0317210f5a9e5262404cc90258041ff
15592         * g10/tofu.c (ask_about_binding): Use 'labs' instead of 'abs'.
15593
15594         sm: Remove statement without effect.
15595         + commit 2d446759bd43ae38fbce9a18c955285ca535bc08
15596         * sm/call-dirmngr.c (gpgsm_dirmngr_isvalid): Remove statement without
15597         effect.
15598
15599         g10: Fix testing for debug flag.
15600         + commit 6b626824c8e30b41c47724b5ccbf761937499512
15601         * g10/parse-packet.c (set_packet_list_mode): Fix testing for debug
15602         flag.
15603
15604         tools: Improve error handling.
15605         + commit 32f81f56a8be6d13dea0a64d24f52343c7e72c84
15606         * tools/gpg-wks-server.c (copy_key_as_binary): Initialize 'argv'.
15607
15608         gpgscm: Update callsite of 'gnupg_spawn_process'.
15609         + commit 07cfb3b27a77491eae818d57f6eb660e75fa013f
15610         * tests/gpgscm/ffi.c (do_spawn_process): Adapt to the changes to
15611         'gnupg_spawn_process'.
15612
15613 2016-10-05  Werner Koch  <wk@gnupg.org>
15614
15615         wks: Send key encrypted as required by draft -02.
15616         + commit 8ce800d21919eaaba7ed4f04f712292be310fd66
15617         * tools/gpg-wks-client.c (get_key): Encrypt.
15618         (encrypt_response): Take care of --fake-submission-addr.
15619
15620         wks: Add option --fake-submission-addr to gpg-wks-client.
15621         + commit e514a5b725f0c997cef4362808b2778a3faa9cf8
15622         * tools/gpg-wks-client.c (oFakeSubmissionAddr): New.
15623         (opts): Add option --fake-submission-addr.
15624         (fake_submission_addr): New variable.
15625         (parse_arguments): Set it.
15626         (command_send): Use --fake-submission-addr.
15627
15628         agent: Another minor fix to map_supervised_sockets.
15629         + commit 1cedc32c95c2e3c3ab98af23ddc2845d51e596c1
15630         * agent/gpg-agent.c (map_supervised_sockets): Remove debug message.
15631         Provide correct fd in the second error case.
15632
15633         agent: Fix npth + supervised mode problem.
15634         + commit f57dc2b1e6f28d164f882373535dbcb0d632ca17
15635         * agent/gpg-agent.c (main): Initialize modules in supervised mode.
15636
15637 2016-10-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15638
15639         agent: Fix error handling in map_supervised_sockets.
15640         + commit a2127c71dbf87c1710b43d91a733dd4c9b2953bc
15641         * agent/gpg-agent.c (map_supervised_sockets): the file descriptor to
15642           close on error is fd, not i.
15643
15644 2016-10-04  Werner Koch  <wk@gnupg.org>
15645
15646         agent: Streamline the supervised mode code.
15647         + commit 1a9c8d78ece2f31fdb1a8e2be049aa71053061fa
15648         * agent/gpg-agent.c (get_socket_path): Rename to ...
15649         (get_socket_name): this.  This is to comply with the GNU coding guide.
15650         Use xtrymalloc instead of malloc.  Do not build for W32.
15651         (map_supervised_sockets): Use strtokenize and set the the socket names
15652         here.
15653         (main): Adjust for above change.  Do not close the socket.
15654
15655         agent: Adjust cleanup for supervised mode.  Fix for W32.
15656         + commit afcfae7959f39e7d85309b9496e1f1cf9acd5cc2
15657         * agent/gpg-agent.c (opts) [W32]: Remove option --supervised.
15658         (is_supervised): Move from main() to global.
15659         (inhibit_socket_removal): New.
15660         (cleanup): Take care of supervise mode and INHIBIT_SOCKET_REMOVAL.
15661         (check_own_socket_thread): Set INHIBIT_SOCKET_REMOVAL instead of
15662         seting the socket names to empty.
15663
15664         agent: Adjust supervised mode for the new default socket names.
15665         + commit dc059af1ff007842e2633e686c87d05daf1d45e3
15666         * agent/gpg-agent.c (main): In supervised mode do not provide default
15667         socket names.  Unset DISPLAY and INSIDE_EMACS.  Use log_error and
15668         agent_exit.
15669
15670 2016-10-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
15671
15672         agent: Implement --supervised command (for systemd, etc).
15673         + commit 9f92b62a51d2d60f038fdbe01602865c5933fa95
15674         * agent/gpg-agent.c (get_socket_path): New function for POSIX systems
15675         to return the path for a provided unix-domain socket.
15676         (map_supervised_sockets): New function to inspect $LISTEN_FDS and
15677         $LISTEN_FDNAMES and map them to the specific functionality offered by
15678         the agent.
15679         (main): Add --supervised command.  When used, listen on already-open
15680         file descriptors instead of opening our own.
15681         * doc/gpg-agent.texi: Document --supervised option.
15682
15683 2016-10-04  Justus Winter  <justus@g10code.com>
15684
15685         build,w32: Unconditionally build tests.
15686         + commit 4a232d23a8f51bebf9ee382e480248b4bde30f28
15687         * configure.ac (run_tests, RUN_TESTS, RUN_GPG_TESTS): Remove
15688         variables.  They are misleadingly named, as they inhibit building the
15689         tests.  There is no reason not to build the tests even when
15690         cross-compiling, as they are only run if one does 'make check'.
15691         * Makefile: Adapt accordingly.
15692         * tests/Makefile.am: Adapt accordingly.  Avoid building 'asschk' on
15693         Windows as it uses non-portable functions.
15694
15695         tests,w32: Do not expose 'glob' to gpgscm.
15696         + commit 41b510f9c510f8fd1b59eb0c5dd2e2b2deaf0a1b
15697         * tests/gpgscm/ffi.c (do_glob): Remove function.
15698         (ffi_init): Likewise.
15699
15700         tests,w32: Avoid using 'glob'.
15701         + commit 949e70115eb2c04bd09da6477f6c433e6fd9a366
15702         * tests/openpgp/setup.scm: Avoid 'glob' which is not available on
15703         mingw.
15704
15705         tools: Ignore existing directories in gpgtar.
15706         + commit fbc83c0cdd390473c044953fb774571ffc636c6d
15707         * tools/gpgtar-extract.c (extract_directory): Ignore existing
15708         directories now that we have '--directory'.
15709
15710 2016-10-04  NIIBE Yutaka  <gniibe@fsij.org>
15711
15712         agent, dirmngr, scd: npth_init must be after fork.
15713         + commit eda17649f8bd3b8ce7bfc00a3c11cbcae63c845d
15714         * agent/gpg-agent.c (thread_init_once, initialize_modules): New.
15715         (main): Make sure no daemonizing-fork call after npth_init, and no npth
15716         calls before npth_init, with care of npth calls by assuan hooks.
15717         * dirmngr/dirmngr.c (thread_init): New.
15718         (main): Make sure npth_init must not be called before daemonizing fork.
15719         * scd/scdaemon.c (main): Likewise.
15720
15721 2016-09-30  Werner Koch  <wk@gnupg.org>
15722
15723         agent: Remove the warning for the GKR hijacking.
15724         + commit a43739a2456a38c01704d8a52dca441055e29bc6
15725         * g10/call-agent.c (check_hijacking): Remove.
15726         (start_agent): Remove call.
15727
15728         agent: Create the extra sockets in the standard socket dir.
15729         + commit 80cc16e0728256f6b07a12980e1f3512cf2324fa
15730         * agent/gpg-agent.c (main): Take the socketdir in account for the
15731         default sockets.
15732         * tools/gpgconf.c (list_dirs): Add "agent-extra-socket" and
15733         "agent-browser-socket".
15734
15735         agent: Kludge to allow disabling of the extra sockets.
15736         + commit 95cf7afff074613825f4442fa131145a2c0d3cf7
15737         * agent/gpg-agent.c (main): Check for special socket names.
15738
15739         wks: Avoid long trustdb checks.
15740         + commit de67055aff916455cec89fab1d95177d3b383008
15741         * tools/wks-receive.c (verify_signature): Use --always-trust.
15742
15743 2016-09-30  Justus Winter  <justus@g10code.com>
15744
15745         build: Fix build against libiconv.
15746         + commit 6054e8aaecbd355bb7559697eecaadf2225189b8
15747         * agent/Makefile.am: Add INCICONV and LIBICONV.
15748         * common/Makefile.am: Likewise.
15749         * tools/Makefile.am: Likewise.
15750
15751         agent: Enable restricted, browser, and ssh socket by default.
15752         + commit e11686f973b35869d7b299ce4726003ac22e2e3a
15753         * agent/gpg-agent.c (main): Provide defaults for 'extra-socket' and
15754         'browser-socket', enable ssh socket by default, but do not emit the
15755         'SSH_AUTH_SOCK' variable unless it has been explicitly requested.
15756         * configure.ac (GPG_AGENT_{EXTRA,BROWSER}_SOCK_NAME): New definitions.
15757         * doc/gpg-agent.texi: Update documentation.
15758
15759         w32: Fix STARTTLS on LDAP connections.
15760         + commit 8d37018050373a47566bf8ea0d894da20ed292c7
15761         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Fix build against
15762         <winldap.h>.
15763
15764 2016-09-29  Werner Koch  <wk@gnupg.org>
15765
15766         wks: Partly implement draft-koch-openpgp-webkey-service-02.
15767         + commit 33800280da55a859e08dfa57f29144c89dd1bead
15768         * tools/gpg-wks.h (WKS_RECEIVE_DRAFT2): New.
15769         * tools/wks-receive.c: Include rfc822parse.h.
15770         (struct receive_ctx_s): Add fields PARSER, DRAFT_VERSION_2, and
15771         MULTIPART_MIXED_SEEN.
15772         (decrypt_data): Add --no-options.
15773         (verify_signature): Ditto.
15774         (new_part): Check for Wks-Draft-Version header.  Take care of text
15775         parts.
15776         (wks_receive): Set Parser and pass a flag value to RESULT_CB.
15777         * tools/gpg-wks-client.c (read_confirmation_request): New.
15778         (main) <aRead>: Call read_confirmation_request instead of
15779         process_confirmation_request.
15780         (command_receive_cb): Ditto.  Add arg FLAGS..
15781         (decrypt_stream_status_cb, decrypt_stream): New.
15782         (command_send): Set header Wks-Draft-Version.
15783         * tools/gpg-wks-server.c (struct server_ctx_s): Add field
15784         DRAFT_VERSION_2.
15785         (sign_stream_status_cb, sign_stream): New.
15786         (command_receive_cb): Set draft flag.
15787         (send_confirmation_request): Rework to implement protocol draft
15788         version 2.
15789
15790         * tools/gpg-wks.h (DBG_MIME_VALUE, DBG_PARSER_VALUE): New.
15791         (DBG_MIME, DBG_PARSER, DBG_CRYPTO): New.  Use instead of a plain
15792         opt.debug where useful.
15793         * tools/gpg-wks-client.c (debug_flags): Add "mime" and "parser".
15794         * tools/gpg-wks-server.c (debug_flags): Ditto.
15795
15796         tools: Convey signeddata also to the part_data callback in mime-parser.
15797         + commit c738f92c195d91662ddc7848cc3c92c7f091f1f8
15798         * tools/mime-parser.c (mime_parser_parse): Factor some code out to ...
15799         (process_part_data): new.
15800         ((mime_parser_parse): Also call process_part_data for signed data.
15801
15802         tools: Allow retrieval of signed data from mime-maker.
15803         + commit f776757ea94542e2f425840dddaf3e65b0ff7757
15804         * tools/mime-maker.c (find_part): New.
15805         (mime_maker_get_part): New.
15806
15807         tools: Change mime-maker to write out CR,LF.
15808         + commit 29db3be6e8dbc9b4dd52cd1781106fa9fa3954a5
15809         * tools/mime-maker.c (struct part_s): Add field PARTID.
15810         (struct mime_maker_context_s): Add field PARTID_COUNTER.
15811         (dump_parts): Print part ids.
15812         (mime_maker_add_header): Assign PARTID.
15813         (mime_maker_add_container): Ditto.
15814         (mime_maker_get_partid): New.
15815         (write_ct_with_boundary): Remove.
15816         (add_header): Strip trailing white spaces.
15817         (write_header): Remove trailing spaces trimming.  Add arg BOUNDARY.
15818         Handle emdedded LFs.
15819         (write_gap, write_boundary, write_body): New.
15820         (write_tree): Use new functions.
15821
15822         tools: Simplify the mime-maker container creation.
15823         + commit 95d60c6ce9e8a7a7741553af957978c1f91547c5
15824         * tools/mime-maker.c (struct part_s): Remove field MEDIATYPE.
15825         (release_parts): Ditto.
15826         (dump_parts): Print a body line only if tehre is a body.
15827         (mime_maker_add_header): Check for body or container.
15828         (mime_maker_add_container): Remove arg MEDIATYPE.  Change all callers.
15829         (mime_maker_end_container): New.
15830
15831         tools: Give mime parser callbacks access to the rfc822 parser.
15832         + commit 4ac138c84d0f344ca9442f90c96f0e1f76062a4a
15833         * tools/mime-parser.c (mime_parser_context_s): Add field MSG.
15834         (parse_message_cb): Set it.
15835         (mime_parser_rfc822parser): New.
15836         * tools/mime-parser.h: Declare rfc822parse_t for the new prototype.
15837
15838 2016-09-29  Justus Winter  <justus@g10code.com>
15839
15840         dirmngr: Fix STARTTLS on LDAP connections.
15841         + commit 9e6f8a55ed04f876635792125858ee76a948802a
15842         * dirmngr/ks-engine-ldap.c (my_ldap_connect): Fix unfortunate typo.
15843
15844 2016-09-28  Werner Koch  <wk@gnupg.org>
15845
15846         gpg: Improve WKD by importing only the requested UID.
15847         + commit cbf2ac66692daa7a324108724698d60d6c7e473f
15848         * g10/keyserver.c: Include mbox-util.h.
15849         (keyserver_import_wkd): Do not use the global import options but
15850         employ an import filter.
15851
15852         gpg: Reject import if an import filter removed all user ids.
15853         + commit 80393661bdfa7ae0288644513575e8a5d708b084
15854         * g10/import.c (any_uid_left): New.
15855         (import_one): Check that a UID is left.
15856
15857         gpg: Make import filter data object more flexible.
15858         + commit c9237bf2ba2c49588576dcece756ebf5fe89aada
15859         * g10/main.h (import_filter_t): New.
15860         * g10/import.c (struct import_filter_s): Declare struct.
15861         (import_keep_uid, import_drop_sig): Replace by ...
15862         (import_filter): new.  Adjust all users.
15863         (cleanup_import_globals): Move code to ...
15864         (release_import_filter): new.
15865         (save_and_clear_import_filter): New.
15866         (restore_import_filter): New.
15867
15868         gpg: Make sure that internal key import is done with a binary stream.
15869         + commit 829949f3823c2306022928ce782f9c9d9c5f1cc8
15870         * g10/import.c (import_keys_internal): Open stream in binary mode.
15871
15872 2016-09-27  Justus Winter  <justus@g10code.com>
15873
15874         build: Do not link gpg-connect-agent against npth.
15875         + commit 20a16833ee2bb05f735377f705899302bcf2b4d3
15876         * tools/Makefile.am: Do not link gpg-connect-agent against npth.
15877
15878         build: Fix check for resolver library on macOS.
15879         + commit 2e64ccb0f96d615b1eb87e37f230a5d761aa9c36
15880         * configure.ac: Check for the mangled name of 'dn_skipname' first.
15881
15882         common: Correctly handle modules relying on npth.
15883         + commit 2b23a321ac0b07beeac1dfa8d71f223e66c49b71
15884         * common/Makefile.am (common_sources): Drop 'call-gpg.{c,h}'.
15885         (with_npth_sources): New variable.
15886         (libcommonpth_a_SOURCES): Use the new variable.
15887
15888 2016-09-27  NIIBE Yutaka  <gniibe@fsij.org>
15889
15890         agent, sm: Set CTX after start_agent.
15891         + commit 4e4843e735f32b5e79a51d8062da55bfaab6ad77
15892         * g10/call-agent.c (agent_keytocard): Assign parm.ctx after start_agent.
15893         * sm/call-agent.c (gpgsm_agent_pksign, gpgsm_scd_pksign)
15894         (gpgsm_agent_readkey, gpgsm_agent_scd_serialno)
15895         (gpgsm_agent_scd_keypairinfo, gpgsm_agent_marktrusted)
15896         (gpgsm_agent_passwd, gpgsm_agent_get_confirmation)
15897         (gpgsm_agent_ask_passphrase, gpgsm_agent_keywrap_key)
15898         (gpgsm_agent_export_key): Likewise.
15899
15900         dirmngr: Removal of no-libgcrypt.o.
15901         + commit 836b72363168cbb0051fc2356f61788468db211c
15902         * dirmngr/Makefile.am (dirmngr_ldap_LDADD): Remove no-libgcrypt.o.
15903
15904         agent: Allow only specific digest size for ECDSA.
15905         + commit 98bc6f480ac973dccce90378dc021a2e24e58704
15906         * agent/pksign.c (do_encode_dsa): Fix validation of digest size.
15907
15908 2016-09-22  Neal H. Walfield  <neal@g10code.com>
15909
15910         g10: When adding a user id, make sure the keyblock has been prepared.
15911         + commit df5353b95eefc13135e7df50a7c197f270d6080d
15912         * g10/keyedit.c (keyedit_quick_adduid): Call merge_keys_and_selfsig on
15913         KEYBLOCK before adding the user id.
15914         * tests/openpgp/quick-key-manipulation.scm: Make sure that the key
15915         capabilities don't change when adding a user id.
15916         (key-data): New function.
15917
15918 2016-09-20  Justus Winter  <justus@g10code.com>
15919
15920         tests: Add documentation, make interactive debugging possible.
15921         + commit 7e0379a75475abfd15e0623913795779ff0f40d7
15922         * tests/openpgp/README: Add documentation about debugging and
15923         interfacing with GnuPG.
15924         * tests/openpgp/run-tests.scm (test::run-sync): Hand stdin to the
15925         child so that we can use a repl in the tests.
15926
15927         tests: Port the quick key manipulation test to Scheme.
15928         + commit 6c4c0e3ac2aeafba7a2b7c2dd92a18be8aec92b1
15929         * tests/openpgp/Makefile.am (XTESTS): Add new test.
15930         * tests/openpgp/quick-key-manipulation.scm: New file.
15931
15932         tests: Remove list of tests from the test runner.
15933         + commit 49fae88fd170f2bdc12a1794a2637260e3c73a73
15934         * tests/openpgp/run-tests.scm: Drop hardcoded list.
15935
15936         tests: Reduce runtime of excessive test.
15937         + commit 988a04b98d42ff9cc9e62007ebcc0e4c03f4047d
15938         * tests/openpgp/conventional-mdc.scm: Use only two plaintexts when
15939         iterating over all cipher algorithms.
15940
15941         dirmngr: Fix type.
15942         + commit 285d193f1e1464495bce57bd0f323468515b4513
15943         * dirmngr/dns-stuff.c (get_dns_cert): Fix type in fallback code.
15944
15945 2016-09-20  Andre Heinecke  <aheinecke@intevation.de>
15946
15947         dirmngr: Open file CRL's in binary mode.
15948         + commit 4644c27514f34f5efc555d43672a25088a611a72
15949         * dirmngr/crlcache.c (crl_cache_load): Open file in binary mode.
15950
15951 2016-09-20  NIIBE Yutaka  <gniibe@fsij.org>
15952
15953         doc: Fix a xref usage.
15954         + commit b9b4ff857034df51e055ceddce567ca97e94e075
15955
15956
15957 2016-09-20  Ineiev  <ineiev@gnu.org>
15958
15959         doc: Do not end section names with "."
15960         + commit 8078d8246fa38c3e478fc9a542117468780ace00
15961
15962
15963 2016-09-20  NIIBE Yutaka  <gniibe@fsij.org>
15964
15965         doc: minor fix for @xref.
15966         + commit 9c1b3bc25a1b38c4eda31bf12ccc10d94bb05212
15967         * doc/yat2m.c (proc_texi_cmd): Captalize "see" for xref.
15968
15969 2016-09-20  Justus Winter  <justus@g10code.com>
15970
15971         doc: Implement simple '@ref'erences.
15972         + commit 91d5e6f805aaf24a3f1f03a95998f757dce04cb2
15973         * doc/yat2m.c (proc_texi_cmd): Handle '@ref'.
15974
15975 2016-09-20  Ineiev  <ineiev@gnu.org>
15976
15977         doc: Fix full stops.
15978         + commit 0eaab1af48f600b636183321e4a4e9c6bc361610
15979         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
15980         doc/instguide.texi, doc/scdaemon.texi, doc/specify-user-id.texi,
15981         doc/tools.texi: Fix.
15982
15983         doc: Fix spacings.
15984         + commit 32bcf8b73ede9c8f1469821a54dedc6be75241d2
15985         * doc/debugging.texi, doc/dirmngr.texi, doc/gpg-agent.texi,
15986         doc/gpg.texi, doc/tools.texi: Fix.
15987
15988         doc: Improve markup.
15989         + commit 377624207e9b2895ce00dfc4d1163d72f349841f
15990         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
15991         doc/howto-create-a-server-cert.texi, doc/scdaemon.texi,
15992         doc/specify-user-id.texi, doc/tools.texi: Fix.
15993
15994         doc: Replace rfc0123 with RFC-0123.
15995         + commit 9d2b7bff12b268638465da222ca7cc9042bba072
15996         * doc/gpg.texi, doc/gpgsm.texi, doc/specify-user-id.texi: Fix.
15997
15998         doc: Add missing description of datafile.
15999         + commit 789916281c25e737d8fb44add5ca61f8fd25de2f
16000         * doc/gpg.texi: Fix.
16001
16002         doc: Replace UTF8 with UTF-8.
16003         + commit 00d6d8bc8772e48b6f200d359e11eb93ab65f51f
16004         * doc/gpg.texi: Fix.
16005
16006         doc: Fix mistakes.
16007         + commit f25e04005af5831053ba194a09e3afa48d1e162b
16008         * doc/dirmngr.texi, doc/gpg.texi, doc/gpgsm.texi,
16009         doc/howto-create-a-server-cert.texi,
16010         doc/scdaemon.texi, doc/tools.texi: Fix.
16011
16012         doc: Eliminate inconsistent UK English.
16013         + commit 825c1dfb3ee4c1704f42eaf064161b9731c20134
16014         * doc/dirmngr.texi, doc/gpg-agent.texi, doc/scdaemon.texi,
16015         doc/tools.texi: Fix.
16016
16017         doc: Use the right reference commands.
16018         + commit f32689f833838a742243e94c900e98f5b59a5811
16019         * doc/debugging.texi, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
16020         doc/tools.texi: Fix.
16021
16022         doc: Fix "Not(e) that you can(not) abbreviate".
16023         + commit 20a27d8a57c4c990fcada4278a1ce2e6fc9043e9
16024         * doc/dirmngr.texi, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
16025         doc/scdaemon.texi, doc/tools.texi: Fix.
16026
16027         doc: Fix typos.
16028         + commit fa346508fe323e61cf157ee30c13301e1d2117c0
16029         * doc/debugging.texi, doc/dirmngr.texi, doc/glossary.texi
16030         * doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi
16031         * doc/instguide.texi, doc/opt-homedir.texi, doc/scdaemon.texi
16032         * doc/specify-user-id.texi, doc/tools.texi: Fix.
16033
16034         doc: Fix Martin Hellman's name.
16035         + commit 858af2b3473e436af53470d53cdac334edce9f09
16036         * doc/contrib.texi: Fix.
16037
16038 2016-09-19  Justus Winter  <justus@g10code.com>
16039
16040         tests: Refine the repl function.
16041         + commit 884e78efe1f3ba50513bf81c8b4804d22b25eac4
16042         * tests/gpgscm/repl.scm (repl): Add an argument 'environment'.
16043         (interactive-repl): Add an optional argument 'environment'.
16044
16045         tests: Implement interpreter shutdown using exceptions.
16046         + commit 9a0659a65c52378de1c4736a0eddf8518eb20948
16047         * tests/gpgscm/ffi.c (ffi_init): Rename 'exit' to '_exit'.
16048         * tests/gpgscm/ffi.scm (*interpreter-exit*): New variable.
16049         (throw): New function.
16050         (exit): New function.
16051
16052         tests: Correctly handle exceptions in resource handling macros.
16053         + commit 58007e52593e6b0f838de2e464ceeacf22757018
16054         * tests/gpgscm/tests.scm (letfd): Correctly release resources when an
16055         exception is thrown.
16056         (with-working-directory): Likewise.
16057         (with-temporary-working-directory): Likewise.
16058         (lettmp): Likewise.
16059
16060         tests: Refine exception handling.
16061         + commit ab483eff9a8254adf127cdee178e14ba74f0a2b3
16062         * tests/gpgscm/init.scm (catch): Bind all arguments to '*error*' in
16063         the error handler, update and fix comment.
16064         (*error-hook*): Revert to original definition.
16065         * tests/gpgscm/tests.scm (tr:do): Adapt accordingly.
16066         * tests/openpgp/issue2419.scm: Likewise.
16067
16068         tests: Use descriptive temporary file names.
16069         + commit 83a406b38a21d0eeb4963db824a27783c212d2fb
16070         * tests/gpgscm/ffi.c (do_get_isotime): New function.
16071         (ffi_init): Add parameter 'scriptname', bind new function and
16072         scriptname.
16073         * tests/gpgscm/ffi.h (ffi_init): Update prototype.
16074         * tests/gpgscm/main.c (main): Hand in the script name.
16075         * tests/gpgscm/tests.scm (mkdtemp): Use current time and script name
16076         for the names of temporary directories.
16077
16078 2016-09-19  Werner Koch  <wk@gnupg.org>
16079
16080         gpg: Fix regression in fingerprint printing.
16081         + commit 998643666c016dbacf10f813c22efc97deadec65
16082         * g10/keylist.c (list_keyblock_print): Do not depend calling
16083         print_fingerprint on opt.keyid_format.
16084
16085         dirmngr: Silence diagnostics about starting housekeeping.
16086         + commit 5bf1facc973eb6e0bfab0f8f17129534dec56e04
16087         * dirmngr/dirmngr.c (housekeeping_thread): Print info only in very
16088         verbose mode.
16089
16090 2016-09-19  Justus Winter  <justus@g10code.com>
16091
16092         g10: Fix memory leak.
16093         + commit 086d219d96caa3501048aff82a282481e07c195b
16094         * g10/tofu.c (build_conflict_set): Free 'kb_all'.
16095
16096 2016-09-19  Werner Koch  <wk@gnupg.org>
16097
16098         doc: Update license information.
16099         + commit 3899041cd2877ce9584c7bd149f232f35a07c399
16100         * tests/fake-pinentries/COPYING: Rename to  ...
16101         * COPYING.CC0: this.  Add a note on the scope of this license.
16102         * COPYING.LIB: Add a note on the scope of this license.
16103         * AUTHORS (License): Mention CC) license.
16104
16105         gpgscm: Fix gcrypt version check.
16106         + commit 47baeac50ccaaf06dc8b0cebece50f47754de6ca
16107         * tests/gpgscm/main.c (main): Check against required and not installed
16108         version.
16109
16110         gpg: Avoid malloc failure due to no key signatures.
16111         + commit 18bbefa27f9e47e1062ee4d7af09487632795ba7
16112         * g10/keyedit.c (check_all_keysigs): Check early for no key
16113         signatures.  Use xtrycalloc.
16114
16115 2016-09-17  NIIBE Yutaka  <gniibe@fsij.org>
16116
16117         Fix comment and format.
16118         + commit 7305d27f36148a7fb8c2f4ef5b94774cbd21b18e
16119         * agent/protect-tool.c (main): Fix comment.
16120         * doc/DETAILS (colon listings): Fix list.
16121         * tests/openpgp/multisig.test: Fix comment.
16122
16123 2016-09-17  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16124
16125         Fix more spelling.
16126         + commit 0d67241e317b172a258a910c02d90639e2b08fce
16127         * NEWS, acinclude.m4, agent/command-ssh.c, agent/command.c,
16128           agent/gpg-agent.c, agent/keyformat.txt, agent/protect-tool.c,
16129           common/asshelp.c, common/b64enc.c, common/recsel.c, doc/DETAILS,
16130           doc/HACKING, doc/Notes, doc/TRANSLATE, doc/dirmngr.texi,
16131           doc/faq.org, doc/gpg-agent.texi, doc/gpg.texi, doc/gpgsm.texi,
16132           doc/instguide.texi, g10/armor.c, g10/gpg.c, g10/keyedit.c,
16133           g10/mainproc.c, g10/pkclist.c, g10/tofu.c, g13/sh-cmd.c,
16134           g13/sh-dmcrypt.c, kbx/keybox-init.c, m4/pkg.m4, sm/call-dirmngr.c,
16135           sm/gpgsm.c, tests/Makefile.am, tests/gpgscm/Manual.txt,
16136           tests/gpgscm/scheme.c, tests/openpgp/gpgv-forged-keyring.scm,
16137           tests/openpgp/multisig.test, tests/openpgp/verify.scm,
16138           tests/pkits/README, tools/applygnupgdefaults,
16139           tools/gpg-connect-agent.c, tools/mime-maker.c, tools/mime-parser.c:
16140           minor spelling cleanup.
16141
16142         move some file encodings to UTF-8.
16143         + commit 215180d1ce6c93e2b4969d746c83ac4c055d25ef
16144         * dirmgnr/cdblib.c: comment used unnecesary hyphenation
16145         * dirmngr/crlcache.h: comment was iso-8859-1
16146         * doc/contrib.text: list contributors using UTF-8 (now we can
16147           acknowledge many more people using their preferred orthography)
16148
16149         At least one other files remains in a non-UTF-8 encoding, which i'm
16150         not sure what to do with:
16151
16152          - build-aux/speedo/w32/inst.nsi is ISO-8859-1, but maybe Windows needs
16153            it that way?
16154
16155 2016-09-16  Neal H. Walfield  <neal@g10code.com>
16156
16157         g10: On failure, propagate the return code.
16158         + commit 6e930f0e4077bc7aa3d28b1ba649a82d62427d87
16159         * g10/tofu.c (tofu_register_encryption): If get_trust fails, set RC.
16160
16161         g10: Don't ignore failure.  On failure, rollback.
16162         + commit 221b0bd0e5946edaea7135bc3b6f3c5c0fc6dbca
16163         * g10/tofu.c (tofu_set_policy): If record_binding fails, fail.  If the
16164         function fails, rollback the transaction.
16165
16166         g10: Load the key block if the supplied user id list is NULL.
16167         + commit c2e563421e4fd4f0910642aa7b171bcf0b374b01
16168         * g10/tofu.c (tofu_register_encryption): Load the key block if
16169         USER_ID_LIST is NULL.
16170
16171         g10: Use the accessor functions for accessing and comparing key ids.
16172         + commit af196342bf44ce6dc42111d37539dec7ee3b3d82
16173         * g10/tofu.c (get_trust): Use the pk_main_keyid accessor function.
16174         (tofu_register_signature): Likewise.
16175         (tofu_register_encryption): Likewise.
16176         (tofu_set_policy): Likewise and also use pk_keyid and keyid_cmp.
16177
16178 2016-09-16  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16179
16180         po: convert localizations to UTF-8.
16181         + commit 4ab8107063b641ed74fc4c9bf98304bcea573178
16182         * po/{it,et,pl,ro,gl,es,el,sk,pt,eo,hu}.po: convert to UTF-8
16183
16184         This was an automated conversion process, using:
16185
16186            for x in po/{it,et,pl,ro,gl,es,el,sk,pt,eo,hu}.po; do
16187                cs=$(grep charset= $x | cut -f2 -d= | cut -f1 -d\\)
16188                iconv -f $cs -t UTF-8 < $x >$x.tmp
16189                sed "s/$cs/UTF-8/" < $x.tmp > $x
16190                rm -f $x.tmp
16191            done
16192
16193 2016-09-16  NIIBE Yutaka  <gniibe@fsij.org>
16194
16195         scd: Add support of ECC pubkey attribute.
16196         + commit dd06d33655bc872a6310edac8e448419479d3312
16197         * scd/app-openpgp.c (ECC_FLAG_PUBKEY): New.
16198         (send_key_attr, get_public_key, ecc_writekey, do_auth, do_decipher)
16199         (parse_algorithm_attribute): Check ECC_FLAG_DJB_TWEAK.
16200         (build_ecc_privkey_template): Add ECC_Q and ECC_Q_LEN.
16201         Support offering public key when ECC_FLAG_PUBKEY sets.
16202         (ecc_writekey): Supply ECC_Q and ECC_Q_LEN.
16203         (parse_algorithm_attribute): Parse pubkey-required byte.
16204
16205 2016-09-15  Justus Winter  <justus@g10code.com>
16206
16207         g10: Add missing header.
16208         + commit c0e620cee86b5dacc941964bd187bba0dfa90eea
16209         * g10/trustdb.c: Include 'mbox-util.h'.
16210
16211 2016-09-15  Neal H. Walfield  <neal@g10code.com>
16212
16213         g10: Only consider bindings matching the signer's user id.
16214         + commit 3f7f7447316f57d002d683af4ad30ac5730b9ebe
16215         * g10/trustdb.c (tdb_get_validity_core): If the signer's user id
16216         subpacket is present, only consider matching user ids.
16217
16218         g10: Don't include the signature when printing a binding's validity.
16219         + commit dcc64663051f8af82abc11e2699649c3b35936db
16220         * g10/mainproc.c (check_sig_and_print): When printing information
16221         about a binding don't include the current signature.
16222
16223 2016-09-15  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16224
16225         tests/fake-pinentries: fake pinentries for downstream developers.
16226         + commit 3248182d1b5a03098ee797c980fa0f0ec06e716f
16227         * tests/fake-pinentries/README.txt and
16228           tests/fake-pinentries/fake-pinentry.{sh,py,pl,php}}: New public
16229           domain (CC0) files to encourage better test suite practices from
16230           downstream developers.
16231         * tests/fake-pinentries/COPYING (new): a copy of
16232           https://creativecommons.org/publicdomain/zero/1.0/legalcode.txt
16233
16234         spelling: conenction should be connection.
16235         + commit 167273ee9d3c04f29835aa2d12fde52eebf61efb
16236         * dirmngr/server.c, sm/server.c: s/conenction/connection/
16237
16238         spelling: correct achived to achieved.
16239         + commit 7fafc3c49901c118b47d4d13a41fb3575c1f9e4b
16240
16241
16242 2016-09-15  NIIBE Yutaka  <gniibe@fsij.org>
16243
16244         tests/gpgscm: Fix use of pointer.
16245         + commit 68eb5fbd37c31ed7c0c916656131eea7bb58d13d
16246         * tests/gpgscm/scheme-private.h (struct scheme): Use (void *) for
16247         alloc_seg.
16248         * tests/gpgscm/scheme.c (alloc_cellseg): Use (void *) for cp.  Use
16249         (void *) for coercion of address calculation.
16250
16251 2016-09-14  Neal H. Walfield  <neal@g10code.com>
16252
16253         g10: Fix whitespace.
16254         + commit 9799b5d18f8fd29872b75c4d70d370af2b4e9a89
16255         * g10/tofu.c (show_statistics): Fix whitespace.
16256
16257         g10: Correctly compute the euclidean distance.
16258         + commit 05b2b13efd8ecea86d31af863cbf82c8b38dc94f
16259         * g10/tofu.c (write_stats_status): Correctly compute the euclidean
16260         distance.
16261         (show_statistics): Likewise.
16262
16263         g10: Change the default TOFU policy for UTKs to good.
16264         + commit ca91caabb5798f67c69ee96657c7cb402e7db0df
16265         * g10/tofu.c (get_trust): Change the default TOFU policy for UTKs to
16266         good.
16267
16268         g10: Add missing static qualifier.
16269         + commit 9d62b79e62ef2690e6522fe1621140fbfc10695c
16270         * g10/tofu.c (cross_sigs): Add missing static qualifier.
16271
16272         g10: Default to the "good" TOFU policy for keys signed by a UTK.
16273         + commit 8df8aa13c795e400324a782fbaea578c8f2a1398
16274         * g10/tofu.c (signed_by_utk): New function.
16275         (get_trust): If a key is signed by an ultimately trusted key, then
16276         set any bindings to good.
16277
16278 2016-09-14  Werner Koch  <wk@gnupg.org>
16279
16280         gpg: Emit a new error status line in --quick-adduid.
16281         + commit f4e11f2e9e8f58fd5f0df3148e6d7ccef0f84232
16282         * g10/keyedit.c (menu_adduid): Emit an ERROR status for an existsing
16283         user id.
16284
16285         gpg: Allow use of "default" algo for--quick-addkey.
16286         + commit 0fd332bc1f6f1f10c96da0cc91203925d3ac81eb
16287         * g10/keygen.c (quick_generate_keypair): Write a status error.
16288         (parse_algo_usage_expire): Set a default curve.
16289
16290 2016-09-13  Werner Koch  <wk@gnupg.org>
16291
16292         gpg: Improve usability of --quick-gen-key.
16293         + commit 30a011cfd6ec172cc460e59f0904a26fe2d68632
16294         * g10/keygen.c (FUTURE_STD_): New constants.
16295         (parse_expire_string): Handle special keywords.
16296         (parse_algo_usage_expire): Allow "future-default".  Simplify call to
16297         parse_expire_string.
16298         (quick_generate_keypair): Always allow an expiration date.  Replace
16299         former "test-default" by "future-default".
16300
16301 2016-09-12  Werner Koch  <wk@gnupg.org>
16302
16303         gpg: Avoid mixing up status and colon line output.
16304         + commit 31fc420727f45dd081f8ad5d056da6675dad29f2
16305         * g10/keylist.c (list_keyblock_colon): Avoid calling functions which
16306         trigger a status line output before having printed a LF.
16307
16308 2016-09-12  Justus Winter  <justus@g10code.com>
16309
16310         tests: Simplify tofu test.
16311         + commit aa81e32df7189c3eb44d4c602fd63f5b3f6a9e49
16312         * tests/openpgp/tofu.scm: Simplify now that we only have one db
16313         format.
16314
16315 2016-09-10  Ben Kibbey  <bjk@luxsci.net>
16316
16317         Portability build fix.
16318         + commit eddcba038025cdbd58aaf67cafd6d83f0ea042d5
16319         * kbx/Makefile.am: Add NETLIBS.
16320         * dirmngr/Makefile.am: Ditto for dirmngr_ldap.
16321
16322         Fix symbol conflict.
16323         + commit 937ec53eff290c3d916faebc23218c9272671c02
16324         * g10/gpgcompose.c: Rename struct siginfo to signinfo.
16325
16326 2016-09-09  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
16327
16328         gpg: print fingerprint regardless of keyid-format.
16329         + commit d757009a24eb856770fc3a3729e2f21f54d2a618
16330         * g10/keylist.c (print_fingerprint): use compact format independent of
16331           keyid-format; (print_key_line): always print the fingerprint
16332
16333 2016-09-08  Werner Koch  <wk@gnupg.org>
16334
16335         gpg: Remove option --yes from gpgv.
16336         + commit 30a9f53a0f2af6b98c26b8ddc0b4b87c38416f2a
16337         * g10/gpgv.c (opts): Remove --yes.
16338         (main): Always set opt.ANSWER_YES.
16339
16340         gpg: Add options --output and --yes to gpgv.
16341         + commit a8363b7d0bcc77b55226d5fe8f972214c968ddc3
16342         * g10/gpgv.c (oOutput, oAnswerYes): New.
16343         (opts): Add --output and --yes.
16344         (main): Implement options.
16345
16346         gpg: Make --output work with --verify.
16347         + commit bbe940c095f2bca7a1ca5f8e68ca1af98350a885
16348         * g10/mainproc.c (proc_plaintext): Handle opt.output.
16349
16350 2016-09-07  Werner Koch  <wk@gnupg.org>
16351
16352         dirmngr: Terminate on deletion of the socket file (Linux only).
16353         + commit 6308c300196ae85fd82ed383217219e0206640a4
16354         * dirmngr/dirmngr.c [HAVE_INOTIFY_INIT]: Include sys/inotify.h.
16355         (oDisableCheckOwnSocket): New.
16356         (opts): Add --disable-check-own-socket.
16357         (disable_check_own_socket): New var.
16358         (parse_rereadable_options): Set that var.
16359         (my_inotify_is_name) [HAVE_INOTIFY_INIT]: New.
16360         (handle_connections) [HAVE_INOTIFY_INIT]: New.
16361
16362 2016-09-07  Neal H. Walfield  <neal@g10code.com>
16363
16364         g10: Use the time a signature was seen, not the embedded time, for stats
16365         + commit bde29a46cedbbd2a5dfe7c91a6277c0a4ff50825
16366         * g10/tofu.c (ask_about_binding): Use the time that a signature was
16367         seen, not allegedly generated, when generating statistics.
16368
16369         tests: Don't use --tofu-db-format.
16370         + commit a937eef2d4e80cd43095802176d3db5e7fd94008
16371         * tests/openpgp/tofu.scm: Remove use of --tofu-db-format, which is
16372         deprecated.
16373
16374         g10: Check for a new binding a bit later.
16375         + commit ee06b3f7889bd99c28ac68f4781bda77d67eed00
16376         * g10/tofu.c (build_conflict_set): Check for the current key after
16377         looking for conflicts and removing any '!'.
16378
16379         g10: Change TOFU code to respect --faked-system-time.
16380         + commit 7b3e8572e3bb8a65d20577a48009251fdc7b1910
16381         * g10/tofu.c (record_binding): New parameter now.  Update callers.
16382         Don't use SQLite's strftime('%s','now') to get the current time, use
16383         NOW.
16384         (ask_about_binding): Likewise.
16385         (get_trust): New parameter now.  Update callers.
16386         (show_statistics): Likewise.
16387         (tofu_register_signature): Don't use SQLite's strftime('%s','now') to
16388         get the current time, use gnupg_get_time().
16389         (tofu_register_encryption): Likewise.
16390
16391         g10: Use the correct conversion function.
16392         + commit 56c18408d4955713d9c4e634367c7912d6564651
16393         * g10/tofu.c (show_statistics): Use string_to_ulong, not
16394         string_to_long.
16395
16396 2016-09-07  Werner Koch  <wk@gnupg.org>
16397
16398         gpg: Fix format string issues in tofu.
16399         + commit 97a67d42dc946b2d6ed81723d86e37002b5931b3
16400         * g10/tofu.c (write_stats_status): Use ulong for MESSSAGES.  Fix
16401         format strings.  Simplify by using the new write_status_printf.
16402
16403 2016-09-06  Neal H. Walfield  <neal@g10code.com>
16404
16405         g10: Make sure some functions are passed a primary key.
16406         + commit 13ddc17ddb266d74033d5739fec932034fa85c72
16407         * g10/tofu.c (get_trust): Make sure the caller provides a primary key.
16408         (tofu_register_signature): Likewise.
16409
16410         g10: Tweak TOFU's verbosity.
16411         + commit ee19eacd1d688d3a98cd66e5ef2f42079eb829f1
16412         * g10/tofu.c (time_ago_str): Only show the most significant unit.
16413         * g10/tofu.c (show_statistics): Tweak the output.
16414
16415         g10: Only show the TOFU warning once per key.
16416         + commit 67cef405cbfad2e53fc388dd6591ee4f7cb0d973
16417         * g10/tofu.c (show_statistics): Return whether to call show_warning.
16418         Move the warning from here...
16419         (show_warning): ... to this new function.
16420         (tofu_get_validity): If show_statistics returns a non-zero value, call
16421         show_warning.
16422
16423         g10: Record and show statistics for encrypted messages when using TOFU.
16424         + commit 875ac9216f1383851a82bd240cadb17c7112f6a8
16425         * g10/tofu.c: Include "sqrtu32.h".
16426         (struct tofu_dbs_s.s): Rename get_trust_gather_other_keys to
16427         get_trust_gather_signature_stats.  Add new field
16428         get_trust_gather_encryption_stats.
16429         (initdb): Create the encryptions table.
16430         (ask_about_binding): Show the encryption statistics too.
16431         (tofu_register): Rename from this...
16432         (tofu_register_signature): ... to this and update callers.
16433         (tofu_register_encryption): New function.
16434         (write_stats_status): Add parameters encryption_count,
16435         encryption_first_done and encryption_most_recent.  Update callers.
16436         Compute the trust using the euclidean distance of the signature and
16437         signature count.  Compare with twice the threshold.  Include
16438         encryption count information in the TFS and TOFU_STATS lines.
16439         (show_statistics): Also get information about the encrypted messages.
16440         * g10/trustdb.c (tdb_get_validity_core): Use it.
16441
16442         g10: Simplify the binding statistics shown for a TOFU conflict.
16443         + commit a9e6db6c7e23d9f4b8de59f5cabbf9eb6a59e626
16444         * g10/tofu.c (ask_about_binding): Simplify binding statistics.
16445
16446 2016-09-06  Justus Winter  <justus@g10code.com>
16447
16448         gpgscm: Fix detection of unbalanced parenthesis.
16449         + commit f2249b737055f84842778285bbeff5e61fa55225
16450         * tests/gpgscm/main.c (load): Print error message.
16451         * tests/gpgscm/scheme.c (opexe_0): Correctly report nesting level when
16452         loading files.
16453
16454         tests: Fix test.
16455         + commit 213b3cf465fb091dc0a205d1a08b88b950ffb85f
16456         * tests/openpgp/multisig.scm: Add missing parenthesis.
16457
16458 2016-09-06  Werner Koch  <wk@gnupg.org>
16459
16460         agent: Terminate on deletion of the socket file (Linux only).
16461         + commit 650356148af43ea619bec12e599a4981b147d5f8
16462         * configure.ac (AC_CHECK_FUNCS): Chec for inotify_init.
16463         * agent/gpg-agent.c [HAVE_INOTIFY_INIT]: Include sys/inotify.h.
16464         (my_inotify_is_name) [HAVE_INOTIFY_INIT]: New.
16465         (handle_connections) [HAVE_INOTIFY_INIT]: New.
16466
16467 2016-09-05  Justus Winter  <justus@g10code.com>
16468
16469         tests: Speed up the test suite.
16470         + commit 46c4333c372f0e1ad2aadc411490c2a330b4c5a6
16471         * tests/openpgp/run-tests.scm (test::run-sync): Pass additional
16472         arguments to the test.
16473         (test::run-sync-quiet): Likewise.
16474         (test::run-async): Likewise.
16475         (run-tests-{parallel,sequential}-isolated): Create a tarball of the
16476         gnupghome, then extract it for each test.
16477         * tests/openpgp/setup.scm: Refactor into functions, add an interface
16478         to tar-up the created environment, and untar it multiple times.
16479
16480         common: Restore a simpler variant of 'gnupg_wait_process'.
16481         + commit c97bde2dfeab23a84b4788d998934ac49ff5b797
16482         * common/exechelp-posix.c (gnupg_wait_process): Use the code prior to
16483         5ba4f604.
16484
16485         common: Fix error handling.
16486         + commit 845e2cc201d6a2cdb151e39e29516d26cb49311c
16487         * common/exechelp-posix.c (store_result): Use xtrymalloc.
16488         (gnupg_wait_processes): Likewise, and check result.
16489
16490 2016-09-05  Neal H. Walfield  <neal@g10code.com>
16491
16492         g10: Don't add user attributes to the TOFU DB.
16493         + commit 9082bde01cc18e32504ce39d55ea6dd3c05dddec
16494         * g10/trustdb.c (tdb_get_validity_core): Skip user attributes.
16495
16496 2016-09-05  Werner Koch  <wk@gnupg.org>
16497
16498         agent: Silence --debug IPC output for connections from self.
16499         + commit 0b99d1fd2a80b8efaacc731027d2b2ecd9eca699
16500         * agent/command.c (server_local_s): Add fields 'greeting_seen' and
16501         'connect_from_self'.
16502         (io_monitor): Do not log connections from self.
16503         (start_command_handler): Set flag 'connect_from_self'.
16504         * agent/gpg-agent.c (check_own_socket_thread): Disable logging.
16505         (do_start_connection_thread): Do not log conection start and
16506         termination if IPC debugging is enabled.
16507
16508         agent: Small improvement of the server's local state.
16509         + commit 2eeb5551c37659fdd59e8537fc77a9e7fb6a9204
16510         * agent/command.c (sserver_local_s): Change flags to use only one bit.
16511         (option_handler): Make an atoi return 1 or 0.
16512
16513 2016-09-05  Neal H. Walfield  <neal@g10code.com>
16514
16515         g10: Refactor cross sig check code.
16516         + commit 1f1f56e606c1cb28eec68c60bd8bcb7ab30805de
16517         * g10/tofu.c (BINDING_NEW): New enum value.
16518         (BINDING_CONFLICT): Likewise.
16519         (BINDING_EXPIRED): Likewise.
16520         (BINDING_REVOKED): Likewise.
16521         (ask_about_binding): Move cross sig check from here...
16522         (get_trust): ... and the conflict set building from here...
16523         (build_conflict_set): ... to this new function.
16524         (format_conflict_msg_part1): Replace parameter conflict with
16525         conflict_set.  Drop parameter fingerprint.  Update callers.
16526         (ask_about_binding): Drop unused parameter conflict and redundant
16527         parameter bindings_with_this_email_count.  Rename parameter
16528         bindings_with_this_email to conflict_set.  Update callers.
16529
16530 2016-09-05  Justus Winter  <justus@g10code.com>
16531
16532         tests: Update README.
16533         + commit 65a7563edbbab8f93fe901f932065687508788de
16534         * tests/openpgp/README: Update.
16535
16536         tests: Pass flags to test driver.
16537         + commit 059c79d8b447a3baa9ad0b4d3367bdb64dd2ef3b
16538         * tests/openpgp/Makefile.am (xcheck): Pass flags to 'run-tests.scm'.
16539
16540         common: Improve waiting for processes on POSIX.
16541         + commit e33111fcdac08ed2ddfbdf59b1f790569b42f695
16542         * common/exechelp-posix.c (struct terminated_child): New definition.
16543         (terminated_children): New variable.
16544         (store_result): New function.
16545         (get_result): Likewise.
16546         (gnupg_wait_process): Store results that were not requested and
16547         consider previously stored results.
16548
16549         waitpid(2) may return information about terminated children that we
16550         did not yet request, and there is no portable way to wait for a
16551         specific set of children.  As a workaround, we store the results of
16552         children for later use.
16553
16554 2016-09-05  Werner Koch  <wk@gnupg.org>
16555
16556         dirmngr: Exclude D lines from the IPC debug output.
16557         + commit de623474db3ba402c9bbd872ab6f932f46cbdde9
16558         * dirmngr/dirmngr.h: Include asshelp.h.
16559         * dirmngr/server.c (server_local_s): Add inhibit_dara_logging fields.
16560         (data_line_write): Implement logging inhibit.
16561         (data_line_cookie_close): Print non-logged D lines.
16562         (cmd_wkd_get, cmd_ks_get, cmd_ks_fetch): Do not log D lines.
16563         (dirmngr_assuan_log_monitor): New.
16564         * dirmngr/dirmngr.c (main): Register monitor function.
16565
16566         common: Add an assuan logging monitor.
16567         + commit 0ac671f8a2b65a4b339f615c6420287a549779fa
16568         * common/asshelp.c (my_log_monitor): New var.
16569         (my_libassuan_log_handler): Run that monitor.
16570         (setup_libassuan_logging): Add arg to set a log monitor and change all
16571         callers.
16572
16573         gpg: New export filter drop-subkey.
16574         + commit 0a4a03e5310946b0866a0f6a34031eda7a240162
16575         * g10/import.c (impex_filter_getval): Add properties for key packets.
16576         * g10/export.c (export_drop_subkey): New var.
16577         (cleanup_export_globals): Release that var.
16578         (parse_and_set_export_filter): Add filter "drop-subkey".
16579         (apply_drop_subkey_filter): New.
16580         (do_export_stream): Run that filter.
16581
16582         common: Add string operator gt,ge,le,lt to recsel.
16583         + commit 959cd8903fd012e63dbb156db56708dd3934b5df
16584         * common/recsel.c (recsel_parse_expr): Add them.
16585         (recsel_dump): Print them.
16586         (recsel_select): Evaluate them.
16587
16588         gpg: Use a common filter_getval for import and export.
16589         + commit c8e0d37f4152d1341ef562a190fce93a0386a759
16590         * g10/import.c (filter_getval): Rename to ...
16591         (impex_filter_getval): this.  Make global.
16592         (apply_keep_uid_filter, apply_drop_sig_filter): Adjust.
16593         * g10/export.c (filter_getval): Remove.
16594         (apply_drop_sig_filter): Use impex_filter_getval.
16595
16596 2016-09-03  NIIBE Yutaka  <gniibe@fsij.org>
16597
16598         scd: Fix an action after card removal.
16599         + commit f9e49c80e706a27d5e30d4b3237ff26367a67130
16600         * scd/command.c (update_card_removed): Call apdu_close_reader here.
16601
16602 2016-09-02  Werner Koch  <wk@gnupg.org>
16603
16604         wks: Add framework for policy flags.
16605         + commit 46362cbc0e2260e989820795a6e4245c72335172
16606         * tools/call-dirmngr.c (wkd_get_policy_flags): New.
16607         * tools/gpg-wks.h (struct policy_flags_s, policy_flags_t): New.
16608         * tools/wks-util.c (wks_parse_policy): New.
16609         * tools/gpg-wks-client.c (command_send): Get the policy flags to show
16610         a new info line.
16611         * tools/gpg-wks-server.c (get_policy_flags): New.
16612         (process_new_key): get policy flag and add a stub for "auth-submit".
16613         (command_list_domains): Check policy flags.
16614
16615         dirmngr: Add --policy-flags option to WKD_GET.
16616         + commit 505ee45106d6aa2902bbdd6326f8eb7527c273c4
16617         * dirmngr/server.c (cmd_wkd_get): Add new option.
16618
16619         common: Check read errors in name-value.c.
16620         + commit fc445b36fafc8a4cc3ce5a675ac42df7a9d9a02a
16621         * common/name-value.c: Check for read errors.
16622
16623 2016-09-02  NIIBE Yutaka  <gniibe@fsij.org>
16624
16625         scd: Release the card reader after card removal.
16626         + commit 8fe81055762d9c9e6f03fb7853a985c94ef73ac3
16627         * scd/command.c (update_reader_status_file): Call apdu_close_reader.
16628
16629         scd: Clean up unused shutdown method.
16630         + commit d1ae7103352fbda2a05f098379cd3043a0ab5566
16631         * scd/apdu.c (shutdown_ccid_reader, apdu_shutdown_reader): Remove.
16632         (reset_ccid_reader): Don't set shutdown_reader.
16633         * scd/ccid-driver.c (ccid_shutdown_reader): Remove.
16634
16635         agent: invoke scdaemon with --homedir.
16636         + commit 8b6c0bae33bdc36892f4595806665ce61f77dfd2
16637         * agent/call-scd.c (start_scd): Supply --homedir option when it's not
16638         default homedir.
16639
16640         po: Update Japanese translation.
16641         + commit afdfc954b35370fbf03aaf8dc0e496410923aa4e
16642
16643
16644 2016-09-01  Neal H. Walfield  <neal@g10code.com>
16645
16646         g10: End transaction earlier.
16647         + commit 85fad6c34c08b2850580e0644faba62d3a501b84
16648         * g10/tofu.c (ask_about_binding): End the transaction earlier.
16649
16650         g10: Don't consider cross-signed keys to be in conflict.
16651         + commit b410a3cb7683fc7c2a253e23130c44df42a6203c
16652         * g10/tofu.c (cross_sigs): New function.
16653         (ask_about_binding): If apparently conflicting keys are cross signed,
16654         then don't mark them as conflicting.
16655
16656 2016-09-01  Werner Koch  <wk@gnupg.org>
16657
16658         gpg: Avoid homedir creation by --list-config.
16659         + commit 38d369de13acb95208a0ed8d1cf82ac19173688f
16660         * g10/gpg.c (main): Do not register a key for the list config
16661         commands.
16662
16663         gpg: Simplify code to print VALIDSIG.
16664         + commit fde9fa81d3d3b25a929b532cc1960d9d9f454a0c
16665         * g10/mainproc.c (check_sig_and_print): Use hexfingerprint and
16666         write_status_printf.
16667
16668         gpg: Add new function write_status_printf.
16669         + commit 6bdadae00512b4907826f6754cdb220d06e1ac6d
16670         * g10/cpr.c (write_status_printf): New.
16671
16672         gpg: Fix printing of pubkey algo in --verbose signature verify.
16673         + commit 37e3c897252babc203447be9d2f286a4507875ad
16674         * g10/sig-check.c (check_signature2): Replace arg PK by R_PK and
16675         change the semantics.  Also clear the other R_ args on function entry,
16676         use gpg_error() and change retturn type to gpg_error_t.
16677         * g10/mainproc.c (do_check_sig): Add arg R_PK.
16678         (list_node): Pass NULL for new arg.
16679         (check_sig_and_print): Rework to make use of the returned PK.
16680
16681 2016-09-01  Neal H. Walfield  <neal@g10code.com>
16682
16683         g10: When asking about a TOFU binding conflict, default to unknown.
16684         + commit 3d44e5e8a8d1d8bf6cf5d387f50d75f84d804412
16685         * g10/tofu.c (ask_about_binding): Default to unknown.
16686
16687         g10: Add support for TRUST_NEVER.
16688         + commit f2e5cb6ffb55e49a05d452cd85e45f6f67c20abb
16689         * g10/pkclist.c (do_we_trust): Handle TRUST_NEVER, which can be
16690         returned by the TOFU trust model.
16691         (do_we_trust_pre): Print a different message if TRUSTLEVEL is
16692         TRUST_NEVER.
16693         (check_signatures_trust): Improve comment.
16694
16695         g10: Improve text.
16696         + commit 0cb0ea1633955fb7acd33fe993a4ae4e96e83ae3
16697         * g10/tofu.c (show_statistics): Improve the text (key and user id, not
16698         just key).
16699
16700         g10: Remove unused parameter.
16701         + commit 00c2850393ecc320f591f511c3534286964780c2
16702         * g10/tofu.c (show_statistics): Remove unused parameter sig_exclude.
16703         Update callers.
16704
16705 2016-09-01  Werner Koch  <wk@gnupg.org>
16706
16707         gpg: Copy the correct digest for use by TOFU.
16708         + commit 3e67b50490aef087b5769bb35145d23f6657780f
16709         * g10/mainproc.c (do_check_sig): Use the current digest algo.
16710
16711 2016-09-01  Neal H. Walfield  <neal@g10code.com>
16712
16713         g10: Be careful to not be in a transaction during long operations.
16714         + commit 4cbd2a690c5e5ed2dff49c1f4fc867b31fca689a
16715         * g10/tofu.c (begin_transaction): New parameter only_batch.  If set,
16716         only start a batch transaction if there is none and one has been
16717         requested.  Update callers.
16718         (tofu_suspend_batch_transaction): New function.
16719         (tofu_resume_batch_transaction): Likewise.
16720         (ask_about_binding): Take a ctrl_t, not a tofu_dbs_t.  Update
16721         callers.  Gather statistics within a transaction.  Suspend any batch
16722         transaction when getting user input.
16723         (get_trust): Take a ctrl_t, not a tofu_dbs_t.  Update callers.
16724         Enclose in a transaction.
16725         (tofu_get_validity): Use a batch transaction, not a normal
16726         transaction.
16727
16728 2016-09-01  Werner Koch  <wk@gnupg.org>
16729
16730         tests: Run test requiring the network only in maintainer-mode.
16731         + commit babeb6f8a9b1f8341652145bad58be6cd49e0712
16732         * dirmngr/Makefile.am (noinst_PROGRAMS, TESTS): Add module_net_tests.
16733         (module_tests): Move t-dns-test to ...
16734         (module_net_tests): here.
16735
16736 2016-08-31  Werner Koch  <wk@gnupg.org>
16737
16738         wks: Send a final message to the user.
16739         + commit 04c042f3f2a631bc6e772c33f8da5e7aa7b1902a
16740         * tools/gpg-wks-server.c (send_congratulation_message): New.
16741         (check_and_publish): Call it.
16742
16743         wks: Relax permission check for the top directory.
16744         + commit e4eac16330449f3893c11820c15e07d58fb807ff
16745         * tools/gpg-wks-server.c: Allow S_IXOTH for the top directory.
16746
16747 2016-08-31  Neal H. Walfield  <neal@g10code.com>
16748
16749         g10: On a TOFU conflict, show whether the uids are expired or revoked.
16750         + commit edfb6934caf16c6afcfd82d684d8ae9c79674d10
16751         * g10/tofu.c (struct signature_stats): Add fields is_expired and
16752         is_revoked.
16753         (signature_stats_prepend): Clear *stats when allocating it.
16754         (ask_about_binding): Also show whether the user ids are expired or
16755         revoked.
16756
16757         doc: Add a help text for tofu.conflict.
16758         + commit b69b2cb082e39a7eb56082fa80219f6f14fbd2b4
16759         * doc/help.txt (.gpg.tofu.conflict): New help text.
16760
16761         g10: Always trust ultimately trusted keys.
16762         + commit 28c235ae757e9036b0b96efc28931fa5cc74f7ee
16763         * g10/tofu.c (get_trust): Always return TRUST_ULTIMATE for ultimately
16764         trusted keys.
16765
16766         g10: Fix error detection.
16767         + commit 5b48960a8a2555db7bf992261de9e922838c9913
16768         * g10/tofu.c: first_seen == 0 is not an error.
16769
16770         g10: Update a key's TOFU policy in a transaction.
16771         + commit e4d5e3cb0d10e8f77c7100d42cfdb32051de1c18
16772         * g10/tofu.c (tofu_set_policy): Do the update in a transaction.
16773         * g10/gpg.c (main): Do a TOFU policy update in a batch transaction.
16774
16775         g10: Fix the show old policy functionality when changing a TOFU policy.
16776         + commit 247eef005cf4c34e9a82227e4ab7823e04911be4
16777         * g10/tofu.c (record_binding): Fix the show old policy functionality.
16778
16779         g10: Drop unused argument.
16780         + commit 70df5a8fd781d8774d835384ca28c4d8518bb9d0
16781         * g10/tofu.c (begin_transaction): Remove unused option only_batch.
16782
16783         gpg: Move state local to tofu.c to a private structure.
16784         + commit 268f6b7a3403d036882b4af384ba7ab2f8c8355f
16785         * g10/gpg.h (struct server_control_s.tofu): Move fields in_transaction
16786         and batch_update_started from here...
16787         * g10/tofu.c (struct tofu_dbs_s): ... to here.
16788
16789         gpg: Avoid name spaces clash with future sqlite versions (2).
16790         + commit b8184d2d74e5ddd5eb68836b53fe5568110e14dd
16791         * g10/gpgsql.h (gpgsql_arg_type): Rename SQLITE_ARG_END to
16792         GPGSQL_ARG_END, SQLITE_ARG_INT to GPGSQL_ARG_INT, SQLITE_ARG_LONG_LONG
16793         to GPGSQL_ARG_LONG_LONG, SQLITE_ARG_STRING to GPGSQL_ARG_STRING, and
16794         SQLITE_ARG_BLOB to GPGSQL_ARG_BLOB.
16795
16796 2016-08-31  Werner Koch  <wk@gnupg.org>
16797
16798         gpg: Fix regression in gpgv's printing of the keyid.
16799         + commit 76304a971fe507ea659b952932ea899463ab7166
16800         * g10/keyid.c (keystr): Take care of KF_NONE != KF_DEFAULT.
16801
16802 2016-08-30  Neal H. Walfield  <neal@g10code.com>
16803
16804         g10: Improve TOFU batch update code.
16805         + commit 371ae66e9d5c7524431773c4a479fcae1ea3b652
16806         * g10/gpg.h (tofu): Rename field batch_update_ref to
16807         batch_updated_wanted.
16808         * g10/tofu.c (struct tofu_dbs_s): Rename field batch_update to
16809         in_batch_transaction.
16810         (begin_transaction): Only end an extant batch transaction if we are
16811         not in a normal transaction.  When ending a batch transaction, really
16812         end it.  Update ctrl->tofu.batch_update_started when starting a batch
16813         transaction.
16814         (end_transaction): Only release a batch transaction if ONLY_BATCH is
16815         true.  When releasing a batch transaction, assert that there is no
16816         open normal transaction.  Only allow DBS to be NULL if ONLY_BATCH is
16817         true.
16818         (tofu_begin_batch_update): Don't update
16819         ctrl->tofu.batch_update_started.
16820         (opendbs): Call end_transaction unconditionally.
16821
16822         g10: If a key has no valid user ids, change TOFU to return TRUST_NEVER.
16823         + commit d0451440c036106895a291f9ca1c53c2d5159f8f
16824         * g10/tofu.c (tofu_get_validity): If a key has no valid (non-expired)
16825         user ids, change TOFU to return TRUST_NEVER.
16826
16827         g10: Change tofu_register & tofu_get_validity to process multiple uids.
16828         + commit 6052c147091935fc0321ba24f4a44146df70ef01
16829         * g10/tofu.c (tofu_register): Take a list of user ids, not a single
16830         user id.  Only register the bindings, don't compute the trust.  Thus,
16831         change return type to an int and remove the may_ask parameter.  Update
16832         callers.
16833         (tofu_get_validity): Take a list of user ids, not a single user id.
16834         Update callers.  Observe signatures made by expired user ids, but
16835         don't include them in the trust calculation.
16836
16837         g10: Support nested transactions on the TOFU DB.
16838         + commit 33e97813d72996d22a295773c64261f5588ce9dd
16839         * g10/gpg.h (struct server_control_s): New field in_transaction.
16840         * g10/tofu.c (struct tofu_dbs_s): Remove fields savepoint_inner and
16841         savepoint_inner_commit.
16842         (begin_transaction): Increment CTRL->TOFU.IN_TRANSACTION.  Name the
16843         savepoint according to the nesting level.
16844         (end_transaction): Name the savepoint according to the nesting level.
16845         Decrement CTRL->TOFU.IN_TRANSACTION.
16846         (rollback_transaction): Likewise.  Only ever rollback a non-batch
16847         transaction.
16848         (opendbs): Assert that there are no outstanding transactions.
16849
16850         g10: Print the info text in more situations.
16851         + commit 4c2abb221b29c9e8e0876fe986472b562ee1c99f
16852         * g10/tofu.c (ask_about_binding): Print the info text when the policy
16853         is ask and there are multiple bindings with the email address.
16854
16855         g10: Print the formatted text.
16856         + commit 0858f141a8b8d0c098a0c6097176b7225c4a9db8
16857         * g10/tofu.c (ask_about_binding): Print the formatted text, not the
16858         unformatted text.
16859
16860         g10: When showing a user id's trust, pass the current signature.
16861         + commit 8dda861ad80228da76cd5c97467008c87b8b6eee
16862         * g10/mainproc.c (check_sig_and_print): Consistently pass SIG to
16863         get_validity.
16864
16865 2016-08-29  Werner Koch  <wk@gnupg.org>
16866
16867         w32: Fix build regression due to 2aa0701.
16868         + commit 8b3e691ffbaaa218d309d5aaf8f37532308558ff
16869         * common/logging.c (fun_writer): Always declare 'name_for_err'.
16870
16871         gpgconf: Print the plain socket directory with --list-dirs.
16872         + commit 8e3fa5a4b205c534de2142e5d071712f957cf06a
16873         * tools/gpgconf.c (list_dirs): Add plain socketdir out.
16874
16875         common: Add a default socket name feature.
16876         + commit 2aa0701013f703ad93e17da3345c493c08aa04ee
16877         * common/logging.c (log_set_socket_dir_cb): New.
16878         (socket_dir_cb): New.
16879         (set_file_fd): Allow "socket://".
16880         (fun_writer): Implement default socket name.
16881         * common/init.c (_init_common_subsystems): Register default socket.
16882
16883         gpg: Make decryption of -R work w/o --try-secret-key or --default-key.
16884         + commit bdbd03608b6f508ac4732f9986a046de8a85a311
16885         * g10/getkey.c (enum_secret_keys): At state 3 enumerate the keys in all
16886         cases not just when --try-all-secrets is used.
16887
16888 2016-08-25  Werner Koch  <wk@gnupg.org>
16889
16890         gpg: Fix false negatives in Ed25519 signature verification.
16891         + commit 0a5a854510fda6e6990938a3fca424df868fe676
16892         * g10/pkglue.c (pk_verify): Fix Ed25519 signatrue values.
16893         * tests/openpgp/verify.scm (msg_ed25519_rshort): New
16894         (msg_ed25519_sshort): New.
16895         ("Checking that a valid Ed25519 signature is verified as such"): New.
16896
16897         common: Rename an odd named function.
16898         + commit 74a082bc10960b2d65d4d1e31152f988a40a2225
16899         * common/openpgp-oid.c (oid_crv25519): Rename to oid_cv25519.
16900         (openpgp_oid_is_crv25519): Rename to openpgp_oid_is_cv25519.  Change
16901         callers.
16902
16903         gpg: New option --with-tofu-info.
16904         + commit 19d12be3cea5b4ee8153287a2f2442913a5e07a1
16905         * g10/gpg.c (oWithTofuInfo): New.
16906         (opts): Add --with-tofu-info.
16907         (main): Set opt.with_tofu_info.
16908         * g10/options.h (struct opt): Add field WITH_TOFU_INFO.
16909         * g10/tofu.c (show_statistics): Add optional arg OUTFP and enter
16910         special mode if not NULL.  Change all callers.
16911         (tofu_write_tfs_record): New.
16912         * g10/keylist.c (list_keyblock_colon): Do not print the tofu policy as
16913         part of the "uid" record.  Print a new "tfs" record if the new option
16914         is set.
16915         * tests/openpgp/tofu.scm (getpolicy): Change from UID to TFS record.
16916
16917 2016-08-24  Werner Koch  <wk@gnupg.org>
16918
16919         gpg: Change TOFU_STATS to return timestamps.
16920         + commit 0f1f02acc1cdcc2cf74a97b05507bb1f062f8af2
16921         * g10/tofu.c (write_stats_status): Add arg FP to print a colon
16922         formated line.  Adjust for changed TOFU_STATS interface.
16923         (show_statistics): Let the query return timestamps and use
16924         gnupg_get-time to compute the "time ago" values.
16925
16926         common: Guarantee that gnupg_get_time does not return an error.
16927         + commit 5eb2682686b32bd82096924eeabd0c5bd347adfd
16928         * common/gettime.c (gnupg_get_time): Abor if time() failed.
16929         (gnupg_get_isotime): Remove now useless check.
16930         (make_timestamp): Remove check becuase we already checked this modulo
16931         the faked time thing.
16932
16933         wks: Add command --supported to gpg-wks-client.
16934         + commit 460568d341851ac79dd100e00e4eafcac1318148
16935         * tools/gpg-wks-client.c (aSupported): New.
16936         (opts): Add --supported.
16937         (parse_arguments): Ditto.
16938         (main): Call command_supported.
16939         (command_supported): New.
16940
16941 2016-08-22  Werner Koch  <wk@gnupg.org>
16942
16943         wks: Install gpg-wks-client under libexec.
16944         + commit c47386a11a32c5ed3b5a31fad5c3e9a9a020ca7b
16945         * tools/Makefile.am (bin_PROGRAMS): Move gpg-wks-client to ...
16946         (libexec_PROGRAMS): ...here.
16947
16948         common: Remove unused vars in simple-pwquery.
16949         + commit 62f3e0027724b23c0de5be6d1e66cfdeef7e7bc9
16950         * common/simple-pwquery.c (agent_send_option): Remove unused vars.
16951         (simple_query): Ditto.
16952         (agent_open): Ditto.  Return RC on error.
16953         (simple_pwquery): Remove unused vars.  Remove shadowing of 'p'.
16954
16955 2016-08-18  Werner Koch  <wk@gnupg.org>
16956
16957         Release 2.1.15.
16958         + commit 6bee88dd067e03e7767ceacf6a849d9ba38cc11d
16959
16960
16961         po: Update German translation.
16962         + commit 0a32153316855224acda268edb60b80d4e64b12f
16963
16964
16965 2016-08-18  Åka Sikrom  <a4@hush.com>
16966
16967         po: Update Norwegian translation.
16968         + commit ec88d7c8a9af864fad8ab5e0b9c4eb90ddcdd630
16969
16970
16971 2016-08-18  Ineiev  <ineiev@gnu.org>
16972
16973         po: Update Russian translation.
16974         + commit 6f6bfbf175653faa5cf560a7174e81a599247e80
16975
16976
16977 2016-08-18  Werner Koch  <wk@gnupg.org>
16978
16979         gpg: Add import filter "drop-sig".
16980         + commit 1b55e864421f88b8c8088639682767076abbeab0
16981         * g10/import.c (import_drop_sig): New variable.
16982         (cleanup_import_globals): Release that.
16983         (parse_and_set_import_filter): Add filter "drop-sig".
16984         (filter_getval): Implement properties for drop-sig.
16985         (apply_drop_sig_filter): New.
16986         (import_one): Apply that filter.
16987
16988         dirmngr: Remove all system daemon features.
16989         + commit d83ba4897bf217d1045c58d1b99e52bd31c58812
16990         * dirmngr/dirmngr.h (opts): Remove fields 'system_service' and
16991         'system_daemon'.
16992         * common/homedir.c (dirmngr_sys_socket_name): Remove.
16993         (dirmngr_user_socket_name): Rename to ...
16994         (dirmngr_socket_name): this.  Change call callers.
16995         * common/asshelp.c (start_new_dirmngr): Remove the system socket
16996         feature.
16997         * tools/gpgconf.c (list_dirs): Do not print "dirmngr-sys-socket".
16998         * sm/server.c (gpgsm_server): Adjust for removed system socket feature.
16999         * dirmngr/server.c (cmd_getinfo): Ditto.
17000         (cmd_killdirmngr): Remove check for system daemon.
17001         (cmd_reloaddirmngr): Ditto.
17002         * dirmngr/dirmngr.c (USE_W32_SERVICE): Remove macro.
17003         (aService): Remove.
17004         (opts): Remove --service.
17005         (w32_service_control): Remove.
17006         (real_main, call_real_main) [W32]: Remove wrapper.
17007         (main): Remove Windows system service feature.  Remove system dameon
17008         feature.  Use only the "~/.gnupg/dirmngr_ldapservers.conf" file.
17009         * dirmngr/certcache.c (load_certs_from_dir): Remove warning in the
17010         system dameon case.
17011         * dirmngr/crlcache.c (DBDIR_D): Always use "~/.gnupg/crls.d".
17012         * dirmngr/ocsp.c (validate_responder_cert): Do not call
17013         validate_cert_chain which was used only in system daemon mode.
17014         * dirmngr/validate.c (validate_cert_chain): Always use the code.
17015
17016         gpg: New option --sender.
17017         + commit de6e3217cde81df370926571e0fd65e468619803
17018         * g10/options.h (struct opt): Add field 'sender_list'.
17019         * g10/gpg.c: Include mbox-util.h.
17020         (oSender): New.
17021         (opts): Add option "--sender".
17022         (main): Parse option.
17023
17024 2016-08-16  Werner Koch  <wk@gnupg.org>
17025
17026         agent: Allow import of overly large keys.
17027         + commit b5d63e81d5c472647decc7687cef91fee0378eb8
17028         * agent/command.c (MAXLEN_KEYDATA): Double the size.
17029
17030 2016-08-14  Werner Koch  <wk@gnupg.org>
17031
17032         g13: Allow the use of a g13tab label for --mount.
17033         + commit f02ceb6c6e94c6fbfaeeafe728397be38107de4d
17034         * g13/mount.c (g13_mount_container): Do not run the first access check
17035         if syshelp is required.
17036
17037         g13: Implement --umount for dm-crypt.
17038         + commit b781113cf1391926dedf8dc943624d3bb9726318
17039         * g13/g13.c (main): Implement command --umount.
17040         * g13/mount.c (g13_umount_container): use the syshelper if needed.
17041         * g13/backend.c (be_umount_container): New.
17042         * g13/be-dmcrypt.c (be_dmcrypt_umount_container): New.
17043         * g13/call-syshelp.c (call_syshelp_run_umount): New.
17044         * g13/sh-cmd.c (cmd_umount): New.
17045         (register_commands): Register UMOUNT.
17046         * g13/sh-dmcrypt.c (sh_dmcrypt_umount_container): New.
17047
17048 2016-08-13  Werner Koch  <wk@gnupg.org>
17049
17050         g13: Fix double free bug.
17051         + commit c9a0bccc77c93c08d6980a1718dfaf238a559eb9
17052         * g13/sh-cmd.c (cmd_mount, cmd_resume): Do not xfree TIUPLES.
17053
17054         g13: Consider g13tab for a mount command.
17055         + commit 700920640211168ae1c97d0adef74ba8615d90bb
17056         * g13/sh-cmd.c (cmd_getkeyblob): New.
17057         (register_commands): Register it.
17058         * g13/call-syshelp.c (getkeyblob_data_cb): New.
17059         (call_syshelp_get_keyblob): New.
17060         * g13/mount.c: Include callsyshelp.h.
17061         (g13_mount_container): Ask syshelp whether the filename is managed by
17062         g13tab.  Call syshelp to get the encrypted keyblob in this case.
17063
17064         g13: Move some function around.
17065         + commit 37e932658cbd873ac96ff7e2067a97dffc2e0507
17066         * g13/keyblob.c (g13_keyblob_decrypt): Move to ...
17067         * g13/server.c: to here.
17068         * g13/suspend.c, g13/mount.c: Include server.h.
17069         * g13/Makefile.am (g13_syshelp_SOURCES): Add keyblob.c
17070
17071         g13: New command --find-device.
17072         + commit b57f55321295846d47144bd6b39fbbcac0127421
17073         * common/status.h (STATUS_BLOCKDEV: New.
17074         * g13/call-syshelp.c: Include "call-syshelp.h".
17075         (finddevice_status_cb, call_syshelp_find_device): New.
17076         * g13/g13.c (aFindDevice): New.
17077         (opts): Add "--find-device".
17078         (main): Implement --find-device.
17079         * g13/sh-cmd.c (cmd_finddevice): New.
17080         (register_commands): Register new command.
17081
17082 2016-08-12  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17083
17084         Avoid leading ": " in the log output when there are no prefixes.
17085         + commit 3a75ff65fba24ea2d024bd8fef633ab7d8f7d520
17086         * common/logging.c (do_logv): When no prefixes have been requested,
17087         omit the ": " separator, since there is nothing on the left-hand
17088         side of it.
17089
17090         Call log_set_prefix() with human-readable labels.
17091         + commit 61c2a1fa6d6cb345f9d81f4bdd3f8f8ddac1ea3e
17092         * agent/preset-passphrase.c, agent/protect-tool.c, dirmngr/dirmngr.c
17093         * dirmngr/t-http.c, g10/gpg.c, g10/gpgv.c, g13/g13-syshelp.c
17094         * g13/g13.c, kbx/kbxutil.c, scd/scdaemon.c, sm/gpgsm.c
17095         * tests/gpgscm/main.c, tools/gpg-check-pattern.c
17096         * tools/gpg-connect-agent.c, tools/gpgconf.c, tools/gpgtar.c
17097         * tools/symcryptrun.c: Invoke log_set_prefix() with
17098         human-readable labels.
17099
17100 2016-08-11  Werner Koch  <wk@gnupg.org>
17101
17102         gpg: New option --input-size-hint.
17103         + commit 70b5d7c43a57a44dad60c2c700a263610748d8f4
17104         * g10/options.h: Include stdint.h.
17105         (struct opt): Add field 'input_size_hint'.
17106         * g10/gpg.c (oInputSizeHint): New.
17107         (opts): Add --input-size-hint.
17108         (main): Set opt.input_size_hint.
17109         * g10/progress.c (write_status_progress): Use the hint.
17110
17111         common: New function string_to_u64.
17112         + commit 0698324cde3e0cef7eeb6cfd1640c5eefdf13698
17113         * common/stringhelp.c (string_to_u64): New.
17114         * dirmngr/http.c (longcounter_t): Remove.
17115         (struct cookie_s): Change content_length to uint64_t.
17116         (parse_response): Use string_to_u64.
17117
17118 2016-08-11  Justus Winter  <justus@g10code.com>
17119
17120         common: Remove compatibility code.
17121         + commit 72fa314b71e4ce8780f59b16d32cabf5d4bd5451
17122         * common/Makefile.am: Drop deleted files.
17123         * common/w32-afunix.c: Delete file.
17124         * common/w32-afunix.h: Likewise.
17125
17126         common: Rework the simple password query module.
17127         + commit 14479e2515439c73e385f37e8c2b3fc517b038b9
17128         * common/simple-pwquery.c (writen, readline): Drop.
17129         (agent_send_option, agent_send_all_options, agent_open): Just use
17130         libassuan.
17131         (simple_pw_set_socket): Simplify.
17132         (default_inq_cb): New function.
17133         (simple_pwquery, simple_query): Just use libassuan.
17134         * agent/Makefile.am (gpg_preset_passphrase_LDADD): Add libassuan.
17135         * tools/Makefile.am (symcryptrun_LDADD): Likewise.
17136
17137         common: Remove simple password query error codes.
17138         + commit 9e6503b7ce019aa417099ded1dda87b68c33f912
17139         * common/simple-pwquery.h: Remove mapping function.  Move all
17140         definitions of status codes...
17141         * common/simple-pwquery.c: ... here, and define them to meaningful gpg
17142         error values.
17143         * agent/preset-passphrase.c (preset_passphrase): Use error code as-is.
17144         (forget_passphrase): Likewise.
17145         * tools/symcryptrun.c (confucius_get_pass): Likewise.
17146
17147 2016-08-10  Werner Koch  <wk@gnupg.org>
17148
17149         gpg: Print the signer's UID during verification.
17150         + commit ed5c1b0b8a4790c4fb36a3129387f7c2ef5db302
17151         * g10/parse-packet.c (parse_signature): Sanitize the value stored in
17152         SIGNERS_UID.
17153         * g10/mainproc.c (issuer_fpr_string): New.
17154         (check_sig_and_print): Print the signers' UID.  Print the issuer
17155         fingerprint in --rfc4880bis mode.
17156
17157         common: New function try_make_printable_string.
17158         + commit f2ea7e539c9a22081e3159dcbca84f57f30724ca
17159         * common/stringhelp.c (sanitize_buffer): Remove.  Move code to ...
17160         * common/miscellaneous.c (try_make_printable_string): new.
17161         (make_printable_string): Call try_make_printable_string.
17162
17163 2016-08-10  Justus Winter  <justus@g10code.com>
17164
17165         tests: Fix distcheck.
17166         + commit a6acf1f6b39c5a607f61f643a5d21309ba58685d
17167         * tests/openpgp/issue2417.scm: Copy configuration.
17168
17169 2016-08-10  Werner Koch  <wk@gnupg.org>
17170
17171         gpg: Remove tofu database format "split".
17172         + commit 5b59999ce0dd1650ebe47a74a30ded6af00eeed3
17173         * g10/options.h (struct opt): Remove field tofu_db_format.
17174         * g10/gpg.h (server_control_s): Add fields tofu.batch_update_ref and
17175         tofu.batch_update_started.
17176         * g10/gpg.c (parse_tofu_db_format): Remove.
17177         (main): Make option --tofu-db-format obsolete.
17178         * g10/tofu.c: Major rework.  Remove the pretty complicated and slower
17179         split format and with that all the caching.  Use the dbs struct
17180         directly.  Move global vars for batch update into CTRL.  Change
17181         calling conventions of some function to take CTRL or DBS pointers
17182         instead of  the former low-level database pointer.
17183
17184 2016-08-10  Justus Winter  <justus@g10code.com>
17185
17186         g10: Fix opening of trust database.
17187         + commit a27410a251cd25ca96cd6743969c4db0a0fd553f
17188         * g10/tdbio.c (tdbio_set_dbname): This function explicitly checks for
17189         the file size, but handled the case of a zero-sized file incorrectly
17190         by returning success.  Fix this by initializing the database in that
17191         case.
17192         * tests/openpgp/Makefile.am (XTESTS): Add new test.
17193         * tests/openpgp/issue2417.scm: New file.
17194
17195         tests: Fix distcheck.
17196         + commit 194b1e979c7c547afd0dfea5b2496bdfa34b20f1
17197         * tests/openpgp/Makefile.am (EXTRA_DIST): Explicitly add setup and
17198         teardown scripts now that they no longer are included in the list of
17199         tests.
17200
17201         tests: Improve temporary directory handling.
17202         + commit d9240a3a4688c263632b4168ae2e04363bc91a3a
17203         * tests/gpgscm/ffi.c (ffi_init): Rename 'mkdtemp'.
17204         * tests/gpgscm/tests.scm (mkdtemp): New function that uses a sensible
17205         location and template if no arguments are given.
17206         (with-temporary-working-directory): Simplify accordingly.
17207         (make-temporary-file): Likewise.
17208         * tests/openpgp/run-tests.scm (run-tests-parallel-isolated): Likewise.
17209         (run-tests-sequential-isolated): Likewise.
17210
17211         gpgscm: Make the name of foreign functions more unique.
17212         + commit efe973dab7f69e2b1309446b2fbcd47ce0305399
17213         * tests/gpgscm/ffi-private.h (ffi_define_function_name): Add another
17214         underscore.
17215
17216         tests: Run each test in a clean environment.
17217         + commit e13f1ea8fff3964dc3008432f5c0f26aaa2eaa35
17218         * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Drop obsolete
17219         variables, add 'srcdir', use absolute paths.
17220         (TESTS): Rename to 'XTESTS' to avoid emitting the automake test
17221         runner.  Drop 'setup.scm' and 'finish.scm'.
17222         (xcheck): New target that runs 'run-tests.scm', our Scheme test suite
17223         runner.  It will run each test in a clean environment, isolated from
17224         the other tests.
17225         (EXTRA_DIST): Adapt accordingly.
17226         * tests/openpgp/README: Likewise.
17227
17228         tests: Make ssh test more robust.
17229         + commit b2b21580b68f3a9069562f99675b389a0d044713
17230         * tests/openpgp/ssh.scm: Drop the 'MD5:' which was not printed by
17231         previous ssh versions.
17232
17233 2016-08-10  NIIBE Yutaka  <gniibe@fsij.org>
17234
17235         agent: SSH support fix.
17236         + commit f14795d57f6c81709e9225dd3c5dfd3495cf1b2b
17237         * agent/command-ssh.c (ssh_handler_request_identities): Keep error
17238         message same.
17239
17240 2016-08-09  Werner Koch  <wk@gnupg.org>
17241
17242         agent: Fix regression in recent ssh changes.
17243         + commit e630f904993725c54ec63be00369589b7b7234d2
17244         * agent/command-ssh.c (sexp_key_construct): Lowercase the algo name.
17245
17246         gpg: Extend the PROGRESS line to give the used unit.
17247         + commit 16feb1e0ea9b5d3966f22f4ae047335b9d1b60e1
17248         * g10/progress.c (write_status_progress): Print the units parameter.
17249
17250 2016-08-09  Ben Kibbey  <bjk@luxsci.net>
17251
17252         Cleanup initialization of libgcrypt.
17253         + commit 49829c29e541546084950b8a153067db371d101a
17254         * common/init.c (init_common_subsystems): Initialize libgcrypt.
17255         * dirmngr/Makefile.am (dirmngr_ldap): Link with libgcrypt.
17256
17257 2016-08-09  NIIBE Yutaka  <gniibe@fsij.org>
17258
17259         agent: SSH support improvement.
17260         + commit ebf24e3b29766595204355d82f435a3e675bfbbc
17261         * agent/command-ssh.c (ssh_handler_request_identities): Skip a key with
17262         error, not giving up to handle the request itself.
17263         * agent/cvt-openpgp.c (extract_private_key): Support "ecdsa" key.
17264
17265 2016-08-08  Werner Koch  <wk@gnupg.org>
17266
17267         gpg: Cleanup of dek_to_passphrase function (part 2).
17268         + commit 491d6fdabb3d95905cd96d905e1f965ce8ff07e1
17269         * g10/passphrase.c (passphrase_get): Remove arg KEYID.  Change arg
17270         MODE to NOCACHE.
17271         (passphrase_to_dek): Remove args KEYID and PUBKEY_ALGO.  Split arg
17272         MODE into CREATE and NOCACHE.  Change all callers and adjust stubs.
17273         (passphrase_clear_cache): Remove args KEYID and ALGO.  They are not
17274         used.  Change caller.
17275
17276         gpg: Cleanup of dek_to_passphrase function (part 1).
17277         + commit 5b614973fe2d4b5ef402a3057c31c3ef3042a483
17278         * g10/passphrase.c (passphrase_to_dek_ext): Remove args CUSTDESC and
17279         CUSTPROMPT.  Merge into the passphrase_to_dek wrapper.
17280         (passphrase_get): Remove args CUSTOM_DESCRIPTION and CUSTOM_PROMPT.
17281
17282 2016-08-08  NIIBE Yutaka  <gniibe@fsij.org>
17283
17284         agent: More clean up of SSH support.
17285         + commit 591a8373a5d9567db9b1a1a48205e8a206c7b669
17286         * common/util.h (get_pk_algo_from_key): New.
17287         * common/sexputil.c (get_pk_algo_from_key): The implementation.
17288         * agent/gpg-agent.c: Remove include of openpgpdefs.h.
17289         * agent/command-ssh.c (struct ssh_key_type_spec): Use integer ALGO.
17290         (ssh_key_types): Update with GCRY_PK_*.
17291         (make_cstring, sexp_extract_identifier): Remove.
17292         (sexp_key_construct): Use gcry_pk_algo_name to get ALGO string.
17293         (ssh_key_to_blob): Use cadr to get value list.
17294         (ssh_key_type_lookup): Lookup with integer ALGO.
17295         (ssh_receive_key): Follow the change of ssh_key_type_lookup.
17296         (ssh_send_key_public): Likewise.  Use get_pk_algo_from_key to get ALGO.
17297
17298         tests: Add openpgp/gpgv-forged-keyring.scm.
17299         + commit 7dcad0d3503ac0d75e09efb16246dd78518986fc
17300         * tests/openpgp/gpgv-forged-keyring.scm: New.
17301         * tests/openpgp/forged-keyring.gpg: New.
17302         * tests/openpgp/Makefile.am (TESTS): Add gpgv-forged-keyring.scm.
17303         * tests/openpgp/defs.scm (tools): Add GPGV.
17304         (GPGV): New.
17305
17306 2016-08-06  Werner Koch  <wk@gnupg.org>
17307
17308         agent: Fix long standing regression tracking the connection count.
17309         + commit 40d16029ed8b334c371fa7f24ac762d47302826e
17310         * agent/gpg-agent.c (get_agent_active_connection_count): New.
17311         (do_start_connection_thread, start_connection_thread_ssh): Bump
17312         ACTIVE_CONNECTIONS up and down.
17313         * agent/command.c (cmd_getinfo): Add subcommand "connections".
17314
17315 2016-08-06  NIIBE Yutaka  <gniibe@fsij.org>
17316
17317         agent: Clean up SSH support.
17318         + commit 894789c3299dc47a8c1ccaaa7070382f0fae0262
17319         * agent/command-ssh.c (file_to_buffer): Remove.
17320         (ssh_handler_request_identities): Use agent_public_key_from_file.
17321
17322 2016-08-05  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17323
17324         gpg: Avoid publishing the GnuPG version by default.
17325         + commit c9387e41db7520d176edd3d6613b85875bdeb32c
17326         * g10/gpg.c (main): initialize opt.emit_version to 0
17327         * doc/gpg.texi: document different default for --emit-version
17328
17329 2016-08-04  Werner Koch  <wk@gnupg.org>
17330
17331         gpg: Make sure that keygrips are printed for each subkey.
17332         + commit c8cc804f56bfefba46641f2c7078fcd67b494bae
17333         * g10/keylist.c (list_keyblock_colon): Print an emprty grip in case of
17334         an error.
17335
17336         gpg: Always print the fingerprint in colons mode.
17337         + commit 54a1ed20e203dcafeacbe21eb147efa08255dbf5
17338         * g10/keylist.c (list_keyblock_colon): Remove arg FPR.  Always print
17339         fingerprint records.  For secret keys always print keygrip records.
17340
17341         tests: Use gpgconf to set the ssh socket envvar.
17342         + commit 0c2a745a2bc21e8f439930f7c0e5d1521c2fd44c
17343         * tests/openpgp/ssh.scm ("SSH_AUTH_SOCK"): Use gpgconf.
17344
17345         gpgconf: Add limited support for -0.
17346         + commit db6f3eb926619dfe6ed2a9be197c51f9a1b6198c
17347         * tools/gpgconf.h (opt): Add field 'null'.
17348         * tools/gpgconf.c: Add option --null/-0.
17349         (list_dirs): Use it here.
17350
17351 2016-08-04  Justus Winter  <justus@g10code.com>
17352
17353         tests: Update list of tests in Scheme test runner.
17354         + commit 05cb30052cdf1d308ff7da901cfa5a809cd49479
17355         * tests/openpgp/run-tests.scm: Add missing tests.
17356
17357         tests: Fix path to fake-pinentry.
17358         + commit 3566544d04a4b81e5dd8a2883304673b2cc2f108
17359         * tests/openpgp/defs.scm: Correctly compute the path to fake-pinentry.
17360
17361 2016-08-04  NIIBE Yutaka  <gniibe@fsij.org>
17362
17363         po: Update Japanese translation.
17364         + commit 89234f7f3643bad2daddc94569f1d651ec5c835e
17365
17366
17367         po: update Japanese translation.
17368         + commit 573e0f36190346e0263bea3ae12a389f4f598d55
17369
17370
17371         g10: Fix checking key for signature validation.
17372         + commit 6f284e6ed63f514b15fe610f490ffcefc87a2164
17373         * g10/sig-check.c (check_signature2): Not only subkey, but also primary
17374         key should have flags.valid=1.
17375
17376 2016-08-03  Justus Winter  <justus@g10code.com>
17377
17378         kbx: Add missing header file.
17379         + commit e3358b246d9380008a4ba7c8f2fe03659901adaf
17380         * kbx/keybox-update.c: Add missing header file.
17381
17382 2016-08-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
17383
17384         More cleanup of "allow to".
17385         + commit dc107b78509807db375d3a382eb3376cd2183357
17386         * README, agent/command.c, agent/keyformat.txt, common/i18n.c,
17387           common/iobuf.c, common/keyserver.h, dirmngr/cdblib.c,
17388           dirmngr/ldap-wrapper.c, doc/DETAILS, doc/TRANSLATE,
17389           doc/announce-2.1.txt, doc/gpg.texi, doc/gpgsm.texi,
17390           doc/scdaemon.texi, doc/tools.texi, doc/whats-new-in-2.1.txt,
17391           g10/export.c, g10/getkey.c, g10/import.c, g10/keyedit.c, m4/ksba.m4,
17392           m4/libgcrypt.m4, m4/ntbtls.m4, po/ca.po, po/cs.po, po/da.po,
17393           po/de.po, po/el.po, po/eo.po, po/es.po, po/et.po, po/fi.po,
17394           po/fr.po, po/gl.po, po/hu.po, po/id.po, po/it.po, po/ja.po,
17395           po/nb.po, po/pl.po, po/pt.po, po/ro.po, po/ru.po, po/sk.po,
17396           po/sv.po, po/tr.po, po/uk.po, po/zh_CN.po, po/zh_TW.po,
17397           scd/app-p15.c, scd/ccid-driver.c, scd/command.c, sm/gpgsm.c,
17398           sm/sign.c, tools/gpgconf-comp.c, tools/gpgtar.h: replace "Allow to"
17399           with clearer text.
17400
17401         In standard English, the normal construction is "${XXX} allows ${YYY}
17402         to" -- that is, the subject (${XXX}) of the sentence is allowing the
17403         object (${YYY}) to do something.  When the object is missing, the
17404         phrasing sounds awkward, even if the object is implied by context.
17405         There's almost always a better construction that isn't as awkward.
17406
17407         These changes should make the language a bit clearer.
17408
17409         dirmngr: Emit correct spelling of "superseded".
17410         + commit 436b28c23194fa77919967338d5a61a82d242153
17411         * dirmngr/crlcache.c (list_one_crl_entry): Spell superseded correctly.
17412         * dirmngr/ocsp.c (ocsp_invalid): Likewise.
17413
17414         This might break some tools which parse the existing output and expect
17415         misspellings, but i'm not sure there are many such tools, and we
17416         should use standardized orthography going forward.
17417
17418         Fix spelling and grammar.
17419         + commit cd45cf782b91ff0f6b023913963e5258ffcbf464
17420         * agent/learncard.c: s/coccured/occurred/
17421         * doc/dirmngr.texi: s/ommitted/omitted/, s/orginally/originally/,
17422           s/reponses/responses/i
17423         * doc/gpg-agent.texi, doc/dirmngr.texi, doc/gpg.texi: Fix "allows
17424           to" to more conventional english usage.
17425         * doc/tools.texi, g10/gpgcommpose.c, tests/openpgp/armor.scm,
17426           tests/openpgp/armor.test: s/occured/occurred/
17427         * tools/gpgsplit.c: s/calcualting/calculating/
17428         * sm/server.c: s/formated/formatted/
17429
17430 2016-08-03  Werner Koch  <wk@gnupg.org>
17431
17432         gpg,gpgsm: Block signals during keyring/keybox update.
17433         + commit 48a2c93a1886589d1a0e2a4a2173e0e81311200b
17434         * kbx/keybox-util.c (keybox_file_rename): Add arg BLOCK_SIGNALS.
17435         * kbx/keybox-update.c (rename_tmp_file): Block all signals when doing
17436         a double rename.
17437         * g10/keyring.c (rename_tmp_file): Block all signals during the double
17438         rename.
17439
17440         common: New file utilproto.c.
17441         + commit 3a2421c94015432caa49e166bc5bf5c4f80ab7c7
17442         * common/util.h: Factor prototypes from signal.c out to ...
17443         * common/utilproto.h: new.
17444         * common/Makefile.am (common_sources): Add new file.
17445
17446 2016-08-01  Justus Winter  <justus@g10code.com>
17447
17448         gpgsm: Fix machine-readable key listing.
17449         + commit 40365b28c3fdf087fd58401f5a6f42f9d7d29d20
17450         * sm/keylist.c (list_cert_colon): Drop superfluous colon.
17451
17452         tests: Distribute standalone test runner.
17453         + commit c971ff0823d9a649b32fd9f169a12abc3095246e
17454         * tests/openpgp/Makefile.am (EXTRA_DIST): Add missing file
17455         'run-tests.scm'.
17456
17457 2016-07-28  Justus Winter  <justus@g10code.com>
17458
17459         tests: Fix distcheck.
17460         + commit 9e799b0e4f131126b80a5d3272c36d52b8ba1720
17461         * tests/openpgp/Makefile.am (sample_msgs): New variable.
17462         (EXTRA_DIST): Also ship the sample msgs.
17463
17464 2016-07-27  Fredrik Fornwall  <fredrik@fornwall.net>
17465
17466         build: Fix check for Android.
17467         + commit 583a464c62ce8f7d70f5fdab2c7ea73ec3348d69
17468         * configure.ac: Match other Android targets as well.
17469
17470 2016-07-26  Justus Winter  <justus@g10code.com>
17471
17472         common: Fix iobuf_peek corner case.
17473         + commit b2572b0c386fd12ac6581fcce72f8d48cbfd27c7
17474         Previously, iobuf_peek on a file smaller than 'buflen' would hang.
17475
17476         * common/iobuf.c (underflow): Generalize by adding a target parameter.
17477         (iobuf_peek): Use this to prevent looping here.
17478         * tests/openpgp/Makefile.am (TESTS): Add new test.
17479         * tests/openpgp/setup.scm (dearmor): Move function...
17480         * tests/openpgp/defs.scm (dearmor): ... here.
17481         * tests/openpgp/issue2419.scm: New file.
17482         * tests/openpgp/samplemsgs/issue2419.asc: Likewise.
17483
17484         gpgscm: Do not shadow common function name in catch macro.
17485         + commit 046338b8494c036a5e717130d3eadce0291126fc
17486         * tests/gpgscm/init.scm (catch): Do not shadow 'exit'.
17487
17488         tests: Fix distcheck.
17489         + commit 66c0dab3c722c2766828515120775b106286334e
17490         * tests/openpgp/Makefile.am (samplekeys): Add missing key.
17491
17492         gpgscm: Make the verbose setting more useful.
17493         + commit f17aecbcd98103fcd2ece537be96930f354de656
17494         * tests/gpgscm/ffi.c (do_get_verbose): New function.
17495         (do_set_verbose): Likewise.
17496         (ffi_init): Turn *verbose* into a function, add *set-verbose!*.
17497         * tests/gpgscm/tests.scm (call): Adapt accordingly.
17498         (call-with-io): Dump output if *verbose* is high.
17499         (pipe-do): Adapt accordingly.
17500         * tests/openpgp/defs.scm: Set verbosity according to environment.
17501         * tests/openpgp/run-tests.scm (test): Adapt accordingly.
17502
17503         common: Avoid excessive stack use.
17504         + commit b3610badf691178bbbf0831af9aa6b6658c1948a
17505         * common/exectool.c (copy_buffer_shred): Make passing NULL a nop.
17506         (gnupg_exec_tool_stream): Allocate copy buffers from the heap.
17507
17508         common: Rework resource cleanup when handling errors.
17509         + commit 35132a8b119dbc3393ceb0d0874917905d1a6354
17510         * common/exectool.c (gnupg_exec_tool_stream): Rework error handling.
17511
17512         common: Add unit test for exectool.
17513         + commit fe40e9c53dc0710ff73e72d05ba8040874465b55
17514         * common/Makefile.am: Build new test.
17515         * common/t-exectool.c: New file.
17516
17517 2016-07-25  Justus Winter  <justus@g10code.com>
17518
17519         g10: Fix key import statistics.
17520         + commit 4ba11251aff578394000bf480f47160f0879c763
17521         'transfer_secret_keys' collects statistics on a subkey-basis, while
17522         the other code does not.  This leads to inflated numbers when
17523         importing secret keys.  E.g. 'count' is incremented by the main
17524         parsing loop in 'import', and again in 'transfer_secret_keys', leading
17525         to a total of 3 if one key with two secret subkeys is imported.
17526
17527         * g10/import.c (import_secret_one): Adjust to the fact that
17528         'transfer_secret_keys' collects subkey statistics.
17529         * tests/openpgp/Makefile.am (TESTS): Add new test.
17530         * tests/openpgp/issue2346.scm: New file.
17531         * tests/openpgp/samplekeys/issue2346.gpg: Likewise.
17532
17533 2016-07-22  Justus Winter  <justus@g10code.com>
17534
17535         gpgscm: Make function more general.
17536         + commit 9ee23a715d5dad6bf568a2deb1c55bf15601cf51
17537         * tests/gpgscm/tests.scm (in-srcdir): Accept more path fragments.
17538
17539         g10: Properly ignore legacy keys in the keyring cache.
17540         + commit d9839c9d303a01dc1032a6de311e034fe14e81da
17541         * g10/keyring.c (keyring_rebuild_cache): Properly ignore legacy keys
17542         in the keyring cache.
17543         * tests/migrations/Makefile.am (TESTS): Add new test.
17544         * tests/migrations/common.scm (GPG-no-batch): New variable.
17545         (run-test): New function.
17546         * tests/migrations/issue2276.scm: New file.
17547         * tests/migrations/issue2276.tar.asc: Likewise.
17548
17549 2016-07-21  Justus Winter  <justus@g10code.com>
17550
17551         g10: Fix error handling.
17552         + commit 45bb9a2a46e11bc13c6b39e7b4748b7de199018e
17553         * g10/tofu.c (show_statistics): Fix error handling, 0 is a valid
17554         duration.
17555
17556         g10: Drop superfluous begin transaction.
17557         + commit 8a6f8e1e397a2d676b211f2dbc6df4a80b67442d
17558         * g10/tofu.c (record_binding): We only need a transaction for the
17559         split format.
17560
17561         gpgscm: Make assert macro more accurate.
17562         + commit 699c6c9f4b44441ab3db7f942df5b81f4cd88b06
17563         * tests/gpgscm/lib.scm (assert): Print the representation of the
17564         failed expression.
17565
17566         gpgscm: Make error message more useful.
17567         + commit 7207b2fe45bcf884e029366a2677a570234bed2e
17568         * tests/gpgscm/scheme.c (opexe_0): Include names of missing function
17569         parameters in the error message.
17570
17571         g10: Fix crash.
17572         + commit 1af2fd44f0a66fd0d94c224319db0b128d42a288
17573         * g10/tofu.c (tofu_closedbs): Fix freeing database handles up to the
17574         cache limit.  Previously, this would crash if db_cache_count == count.
17575
17576 2016-07-20  NIIBE Yutaka  <gniibe@fsij.org>
17577
17578         scd: Fix card removal/reset on multiple contexts.
17579         + commit 1598a4476466822e7e9c757ac471089d3db4b545
17580         * scd/app.c (application_notify_card_reset): Add message for debug.
17581         *scd/command.c (update_card_removed): Call release_application and set
17582         SLOT -1 here.
17583         (struct server_local_s): Remove app_ctx_marked_for_release.
17584         (do_reset): Don't mark release but call release_application here.
17585         (open_card): Remove app_ctx_marked_for_release handling.
17586         (update_reader_status_file): Don't set SLOT here, so that it can be
17587         released the APP by application_notify_card_reset in
17588         update_card_removed.
17589
17590 2016-07-19  Justus Winter  <justus@g10code.com>
17591
17592         agent: Add known keys to sshcontrol.
17593         + commit 270f7f7b8b235cc93516566702e2a1d256605cca
17594         * agent/command-ssh.c (ssh_identity_register): Add a key to sshcontrol
17595         even if it is already in the private key store.
17596         * tests/openpgp/ssh.scm: Test this.
17597
17598         tests: Add test for ssh support.
17599         + commit d7a405de8325aa945ab791dcd3bc48272af33b86
17600         * tests/gpgscm/tests.scm (path-expand): New function.
17601         * tests/openpgp/Makefile.am (TESTS): Add new test.
17602         (sample_keys): Add new keys.
17603         (CLEANFILES): Clean ssh socket and control file.
17604         * tests/openpgp/fake-pinentry.c (main): Add a default passphrase.
17605         * tests/openpgp/gpg-agent.conf.tmpl: Enable ssh support.
17606         * tests/openpgp/samplekeys/ssh-dsa.key: New file.
17607         * tests/openpgp/samplekeys/ssh-ecdsa.key: Likewise.
17608         * tests/openpgp/samplekeys/ssh-ed25519.key: Likewise.
17609         * tests/openpgp/samplekeys/ssh-rsa.key: Likewise.
17610         * tests/openpgp/ssh.scm: Likewise.
17611
17612 2016-07-19  NIIBE Yutaka  <gniibe@fsij.org>
17613
17614         scd: Fix race conditions for release_application.
17615         + commit 0c1fd4e9884ed7c1edd1819762b9e8a77f606ed3
17616         * scd/command.c (do_reset, cmd_restart): Reset app_ctx before calling
17617         release_application.
17618
17619 2016-07-18  Justus Winter  <justus@g10code.com>
17620
17621         agent: Fix passphrase cache lookups.
17622         + commit f474249366e8e143c8e6eb7f7b1a74056e46fa1f
17623         CACHE_MODE_ANY is supposed to match any cache mode except
17624         CACHE_MODE_IGNORE, but the code used '==' to compare cache modes.
17625
17626         * agent/cache.c (cache_mode_equal): New function.
17627         (agent_set_cache): Use the new function to compare cache modes.
17628         (agent_get_cache): Likewise.
17629         * tests/openpgp/Makefile.am (TESTS): Add new test.
17630         * tests/openpgp/issue2015.scm: New file.
17631
17632 2016-07-15  Justus Winter  <justus@g10code.com>
17633
17634         build: Always build gpgtar.
17635         + commit 7f4dd24b880323a5b772719dafae829c288303a8
17636         We use gpgtar to unpack test data, hence we always build it.  If the
17637         user opts out, we simply don't install it.
17638
17639         * configure.ac: Add comment.
17640         * tests/migrations/Makefile.am (required_pgms): Make sure gpgtar is
17641         built.
17642         * tools/Makefile.am: Always build gpgtar, but do not install it if the
17643         user used '--disable-gpgtar'.
17644
17645 2016-07-15  Werner Koch  <wk@gnupg.org>
17646
17647         wks: Publish as binary file.
17648         + commit b7b37716b9d2cd1b71b5f7f0e4fb2c1a43eee90a
17649         * tools/gpg-wks-server.c (copy_key_as_binary): New.
17650         (check_and_publish): Use new function instead of rename.
17651
17652 2016-07-15  Justus Winter  <justus@g10code.com>
17653
17654         gpgscm: Fix linking.
17655         + commit c49c43d7e4229fd9f1bc55e17fa32fdc334dbef6
17656         * tests/gpgscm/Makefile.am: Add -lintl.
17657
17658         g10: Fix building without trust models.
17659         + commit d21efa398874be4a15e8283c5fc382fb90f562fd
17660         * g10/pkclist.c (write_trust_status): Fall back to the previous
17661         behavior.
17662
17663         tests: Check for gpgtar.
17664         + commit 12a887050a560c4cacaf95e4cdb0cc42d8b87aa1
17665         * tests/migrations/extended-pkf.scm: Skip test if gpgtar is not built.
17666         * tests/migrations/from-classic.scm: Likewise.
17667         * tests/openpgp/gpgtar.scm: Fix check for gpgtar.
17668
17669 2016-07-14  Werner Koch  <wk@gnupg.org>
17670
17671         Release 2.1.14.
17672         + commit 09c448202ffb4c26d7ec2028351a78e2d3680396
17673
17674
17675         po: Update the German translation.
17676         + commit 23c2491f94b94fa231bde8187eb958432555eff1
17677
17678
17679 2016-07-14  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
17680
17681         dirmngr: fix handling of HTTP redirections.
17682         + commit 60428c24fb29cb633c9392abb777bc4da88dbfba
17683         * dirmngr/ks-engine-http.c (ks_http_fetch): Reinitialize HTTP session
17684         when following a HTTP redirection.
17685
17686 2016-07-14  Werner Koch  <wk@gnupg.org>
17687
17688         gpg: Remove options --print-dane-records and --print-pka-records.
17689         + commit 1e9bc66a9a60de668890452d504eea3c3c614f7e
17690         * g10/gpg.c (main): Remove options but print a dedicated warning.
17691         * g10/options.h (struct opt): Remove fields 'print_dane_records' and
17692         'print_pka_records'.
17693         * g10/keylist.c (list_keyblock): Do not call list_keyblock_pka.
17694         (list_keyblock_pka): Remove.
17695
17696 2016-07-14  Åka Sikrom  <a4@hush.com>
17697
17698         po: Complete update of the Norwegian translation.
17699         + commit d6d7e4d218a1e2e2a88bc893b00967b032d194f8
17700
17701
17702 2016-07-14  Yuri Chornoivan  <yurchor@ukr.net>
17703
17704         Update Ukrainian translation.
17705         + commit 9427288ebb32141c196996315f93535fd7744901
17706
17707
17708 2016-07-14  Ineiev  <ineiev@gnu.org>
17709
17710         Update Russian translation.
17711         + commit 39c88870359bc75e9f72e08a7466fcff01bdc655
17712
17713
17714 2016-07-14  Werner Koch  <wk@gnupg.org>
17715
17716         gpg: Fix regression since 2.1 in --search-key with a fingerprint.
17717         + commit 0342369ce001b9dba04dc79e7a4eb66fbda278e7
17718         * dirmngr/ks-engine-hkp.c (ks_hkp_search): Prefix fingerprint with 0x.
17719
17720         gpgscm: Use kludge to avoid improper use of ffi_schemify_name.
17721         + commit fb14bf0a95e361b0991067e3aea2902d54be811d
17722         * tests/gpgscm/ffi.c (ffi_schemify_name): Use xstrdup instead of
17723         strdup for now.
17724
17725         build: Require latest released libraries.
17726         + commit c98995efefbdebea8f53d54ba2df4217dfd31ad4
17727         * agent/protect.c (OCB_MODE_SUPPORTED): Remove macro.
17728         (do_encryption): Always support OCB.
17729         (do_decryption): Ditto.
17730         (agent_unprotect): Ditto.
17731         * dirmngr/server.c (is_tor_running): Unconditionally build this.
17732
17733 2016-07-13  Werner Koch  <wk@gnupg.org>
17734
17735         build: Update config.{guess,sub} to {2016-05-15,2016-06-20}.
17736         + commit 66b634f27f10e4c0cb21c3f201998497d0bb24ca
17737         * build-aux/config.guess: Update.
17738         * build-aux/config.sub: Update.
17739
17740         gpg: Fix regression due to the new --mimemode options.
17741         + commit 3b8ed7650d2d63b01ec80ecf9e493b80e3ac7ef8
17742         * g10/gpg.c (opts): Re-add oTextmodeShort.
17743
17744 2016-07-13  Daiki Ueno  <ueno@gnu.org>
17745
17746         gpg: Make --try-all-secrets work for hidden recipients.
17747         + commit 82b90eee100cf1c9680517059b2d35e295dd992a
17748         * g10/getkey.c (enum_secret_keys): Really enumerate all secret
17749         keys if --try-all-secrets is specified.
17750
17751 2016-07-13  Werner Koch  <wk@gnupg.org>
17752
17753         gpg: Do not print a the short keyid if the high word is zero.
17754         + commit 7b96a8d736934e65bb2adbc17059f84dfeaf95fb
17755         * g10/keyid.c (format_keyid): Always returh long keyid ifor KF_LONG.
17756
17757         gpg: New option --mimemode.
17758         + commit e148c3caa90fbadba32bdbfea9513392e3aea598
17759         * g10/gpg.c (oMimemode): New.
17760         (opts): Add --mimemode.
17761         (main): Use --mimemode only in rfc4880bis compliance mode.
17762         * g10/options.h (struct opt): Add field "mimemode".
17763         * g10/build-packet.c (do_plaintext): Allow for mode 'm'.
17764         * g10/encrypt.c (encrypt_simple, encrypt_crypt): Use 'm' if requested.
17765         * g10/plaintext.c (handle_plaintext): Handle 'm' mode.
17766         * g10/sign.c (write_plaintext_packet): Handle 'm' mode.
17767         (sign_file, sign_symencrypt_file): Use 'm' if requested.
17768
17769         wks: Use correct key for the confirmation.
17770         + commit 95810929f75bd718dbdf2cd1c0181137a45e2456
17771         * tools/gpg-wks-client.c (send_confirmation_response): Actually
17772         encrypt to the recipient.
17773
17774         wks: New server command --list-domains.
17775         + commit 44ecc33b4a7147d9c112a72f55a42b65cef4fe67
17776         * tools/gpg-wks-server.c (aListDomains): New.
17777         (opts): Add --list-domains.
17778         (parse_arguments): Implement.
17779         (main): Ditto.  Use only one final diagnostic message.
17780         (command_list_domains): New.
17781         (check_and_publish): Remove directory creation.
17782         (get_domain_list): New.
17783         (expire_pending_confirmations): Rewrite using a list of directories.
17784         (command_cron): Get domain list and pass to
17785         expire_pending_confirmations.
17786
17787 2016-07-13  NIIBE Yutaka  <gniibe@fsij.org>
17788
17789         agent: Fix envvars for UPDATESTARTUPTTY.
17790         + commit 7be218177701af316db75057c99ca674d53cf585
17791         agent/command.c (cmd_updatestartuptty): Use session_env_list_stdenvnames
17792         to get the list.
17793
17794 2016-07-12  Werner Koch  <wk@gnupg.org>
17795
17796         g13: Fix memleak.
17797         + commit acb27915f8646a875b6bb507ff46cd1bc330c02b
17798         * g13/g13tuple.c (create_tupledesc): Init refcount to 1.
17799
17800         wks: Add --cron command to gpg-wks-server.
17801         + commit 38eb5f81d223616e3ee34bdfb41c387ce4e7df22
17802         * tools/gpg-wks-server.c (PENDING_TTL): New.
17803         (expire_one_domain, expire_pending_confirmations): New.
17804         (command_cron): New.
17805         (main): Implement --cron.
17806
17807         wks: Try to send an encrypted confirmation back.
17808         + commit 5de41c4ecef32add89044b8a550a47cce8c6d61e
17809         * tools/gpg-wks-client.c (encrypt_response_status_cb): New.
17810         (encrypt_response): New.
17811         (send_confirmation_response): Encrypt the response.
17812
17813         * tools/gpg-wks-server.c (send_confirmation_request): Use freeing of
17814         BODY and BODYENC.
17815
17816         wks: Also create DANE record.
17817         + commit d3837e0435921bfa5587a50738f5924a5fdf976a
17818         * tools/gpg-wks-server.c (copy_key_as_dane): New.
17819         (check_and_publish): Also publish as DANE record.
17820
17821         gpg: Extend import-option import-export to print PKA or DANE.
17822         + commit 9b075575cdc5851b019aed5ca5d5e18416beec8e
17823         * g10/export.c (do_export_stream): Move PKA and DANE printing helper
17824         code to ...
17825         (print_pka_or_dane_records): this fucntion.
17826         (write_keyblock_to_output): Add arg OPTIOSN and call
17827         print_pka_or_dane_records if requested.
17828
17829         gpg: Move a function from import.c to export.c.
17830         + commit 0f5b105d96780a29cc58893285e6c38482e0cc2d
17831         * g10/import.c (write_keyblock_to_output): Move to ...
17832         * g10/export.c (write_keyblock_to_output): here.  Add arg WITH_ARMOR.
17833         Also make sure never to export ring trust packets.
17834
17835 2016-07-11  Werner Koch  <wk@gnupg.org>
17836
17837         gpgconf: Enhance --list-dirs.
17838         + commit 7732b332886792b2bbf47ecf7430e953f1c55a2c
17839         * tools/gpgconf.c (main) <aListDir>: Factor code out to ...
17840         (list_dirs): new.  Rewrite to use a table.  Allow selection of a
17841         items.  Add "agent-ssh-socket".
17842
17843 2016-07-09  NIIBE Yutaka  <gniibe@fsij.org>
17844
17845         gpgv: Tweak default options for extra security.
17846         + commit e32c575e0f3704e7563048eea6d26844bdfc494b
17847         * g10/gpgv.c (main): Set opt.no_sig _cache, so that it doesn't depend on
17848         cached status.  Similarly, set opt.flags.require_cross_cert for backsig
17849         validation for subkey signature.
17850
17851 2016-07-07  Werner Koch  <wk@gnupg.org>
17852
17853         gpg: Add export options "export-pka" and "export-dane".
17854         + commit cbe467e794f3be81b8da2bcb1732b5514b13b71d
17855         * g10/options.h (EXPORT_PKA_FORMAT): New.
17856         * g10/keylist.c (list_keyblock_pka): Do not use DANE flag.
17857         * g10/export.c: Include zb32.h.
17858         (parse_export_options): Add options "export-pka" and "export-dane".
17859         (do_export): Do not armor if either of these option is set.
17860         (print_pka_or_dane_records): New.
17861         (do_export_stream): Implement new options.
17862
17863         gpg: Split a too large export function.
17864         + commit b05878f32aa507aa9087d7c992b630840b5ad71c
17865         * g10/export.c (do_export_stream): Factor some code out to ...
17866         (do_export_one_keyblock): new.
17867
17868 2016-07-07  Justus Winter  <justus@g10code.com>
17869
17870         gpgscm: Capture output of spawned processes.
17871         + commit 2f61aa0ff11b194d20307751ab686c87cd47dd56
17872         * tests/gpgscm/tests.scm (call-check): Capture stdout and stderr, and
17873         return stdout if the child exited successfully, or include stderr in
17874         the error.
17875         * tests/openpgp/version.scm: Demonstrate this by checking the stdout.
17876
17877 2016-07-06  Werner Koch  <wk@gnupg.org>
17878
17879         doc: Escape file names in generated macros.
17880         + commit 511c2522b95333226a5e45e538fed29dd44c9be3
17881         * doc/mkdefsinc.c (print_filename): New.
17882         (main): Use it here.
17883
17884         wks: Let the server take the encrytion key from the file.
17885         + commit e5896da666551da5322b2ae5458d429b9e60241e
17886         * tools/gpg-wks-server.c (encrypt_stream): Change arg 'fingerprint' to
17887         'keyfile'.
17888         (store_key_as_pending): Add arg 'r_fname' to make of the keyfile.
17889         (send_confirmation_request): Add arg 'keyfile'.
17890         (process_new_key): Pass on the name of the keyfile.
17891
17892         gpg: New options --recipient-file and --hidden-recipient-file.
17893         + commit a479804c86bc24bfab101f39464db3ecfbaedf6d
17894         * g10/gpg.c (oRecipientFile, oHiddenRecipientFile): New.
17895         (opts): Add options --recipient-file and --hidden-recipient-file.
17896         (main): Implement them.  Also remove duplicate code from similar
17897         options.
17898         * g10/keydb.h (PK_LIST_FROM_FILE): New.
17899         (PK_LIST_SHIFT): Bump up.
17900         * g10/pkclist.c (expand_group): Take care of PK_LIST_FROM_FILE.
17901         (find_and_check_key): Add and implement arg FROM_FILE.
17902         (build_pk_list): Pass new value for new arg.
17903         * g10/getkey.c (get_pubkey_fromfile): New.
17904         * g10/gpgv.c (read_key_from_file): New stub.
17905         * g10/test-stubs.c (read_key_from_file): New stub.
17906         * g10/server.c (cmd_recipient): Add flag --file.
17907         * g10/import.c (read_key_from_file): New.
17908
17909         * tests/openpgp/defs.scm (key-file1): New.
17910         (key-file2): New.
17911         * tests/openpgp/setup.scm: Add their private keys and import the
17912         key-file1.
17913         * tests/openpgp/encrypt.scm: Add new test.
17914
17915         gpg: New option --no-keyring.
17916         + commit 073be51a866cb5600479c504a44ae5ac94a449a2
17917         * g10/gpg.c (oNoKeyring): New.
17918         (opts): Add "--no-keyring".
17919         (main): Do not register any keyring if the option is used.
17920
17921         gpg: Document use of node flags in import.c and remove unused args.
17922         + commit fdfde91595109e51a5b8fafd292244ad41dfb83d
17923         * g10/import.c (NODE_GOOD_SELFSIG): New.  Use instead of 1.
17924         (NODE_BAD_SELFSIG): New.  Use instead of 2.
17925         (NODE_DELETION_MARK): New.  Use instead of 4.
17926         (NODE_FLAG_A): New.  Use to mark new nodes in merge_blocks.
17927         (chk_self_sigs): Remove unused args FNAME and PK.
17928         (import_one): Adjust call.  Simplify error return because
17929         chk_self_sigs does not return an error code.
17930         (append_uid, append_key, merge_sigs, merge_keysigs): Remove unsued
17931         args FNAME and KEYID.
17932         (merge_blocks, import_one, import_secret_one)
17933         (import_revoke_cert): Remove unused arg FNAME.
17934
17935         gpg: Get rid of an unused arg in a function in getkey.c.
17936         + commit 7e0c48eb6f18a80142ca2a0f76fe8d270a4e5b33
17937         * g10/getkey.c (pk_from_block): Remove unused arg CTX.  Change all
17938         callers.
17939
17940         gpg: Change calling convention for a function in getkey.c.
17941         + commit 9385dfeb9dd6d83608a10c7896c341f585a25a2b
17942         * g10/getkey.c (merge_selfsigs): Remove arg CTX.  Add args REQ_USAGE
17943         and WANT_EXACT.
17944         (finish_lookup): Adjust caller.  Set LOOKUP_NOT_SELECTED here...
17945         (lookup): and not here.
17946
17947 2016-07-05  Werner Koch  <wk@gnupg.org>
17948
17949         gpg: Fix possible out-of-bounds read in is_armored.
17950         + commit 5d1a9c4dc823b418db6c4686da55ee3abdf023b0
17951         * g10/armor.c (check_input): Call is_armored only if LEN >= 2.
17952         (unarmor_pump): Use a 2 byte buffer for is_armored.
17953
17954 2016-07-05  Justus Winter  <justus@g10code.com>
17955
17956         tests: Honor environment variable 'TMP'.
17957         + commit 8270580a5a70874beeffcdd16221937db4bcdc93
17958         This fixes problems with long socket names, e.g. when doing distcheck.
17959
17960         * tests/gpgscm/tests.scm (path-join): New function.
17961         (with-temporary-working-directory): Honor 'TMP'.
17962         (make-temporary-file): Likewise.
17963         * tests/migrations/Makefile.am (TMP): Default to '/tmp'.
17964         (TESTS_ENVIRONMENT): Set 'TMP'.
17965         * tests/openpgp/Makefile.am (TMP): Default to '/tmp'.
17966         (TESTS_ENVIRONMENT): Set 'TMP'.
17967
17968         gpgscm: Improve robustness and compatibility.
17969         + commit f26fe4f73e8430d93c03d95a8a24fdabd078bb20
17970         * tests/gpgscm/ffi.c (do_getenv): Avoid gccism.
17971         (do_mkdtemp): Handle errors.
17972
17973         tests/migrations: Fix distcheck.
17974         + commit b70d08827ddb56423ad610b4ebaaaf9cc763512f
17975         * tests/migrations/Makefile.am (TESTS): Rename test.
17976         (TEST_FILES): Update list.
17977         (EXTRA_DIST): Add common.scm.
17978         * tests/migrations/common.scm (GPGTAR): New variable.
17979         (dearmor): Rename and untar archive.
17980         * tests/migrations/extended-private-key-format.scm: Rename.
17981         (setup): Update.
17982         * tests/migrations/extended-pkf.tar.asc: New file.
17983         * tests/migrations/extended-private-key-format.gpghome: Delete.
17984         * tests/migrations/from-classic.gpghome: Likewise.
17985         * tests/migrations/from-classic.scm (setup): Update.
17986         * tests/migrations/from-classic.tar.asc: New file.
17987
17988         tools/gpgtar: Provide --create and --extract.
17989         + commit 0b8a3358798b7028be872a923da2e275da67d592
17990         * tools/gpgtar.c (cmd_and_opt_values): New values.
17991         (opts): New actions.
17992         (parse_arguments): Handle new actions.
17993         * tests/openpgp/gpgtar.scm: Test new interface.
17994
17995         g10: Fix out-of-bounds read.
17996         + commit a6b87981f7ddef42b25703723162c647e312b125
17997         * g10/armor.c (use_armor_filter): We need two bytes for 'is_armored'.
17998
17999 2016-07-04  Werner Koch  <wk@gnupg.org>
18000
18001         wks: Add command --read to gpg-wks-client.
18002         + commit 8c8ae043b8d65cb79e0e99c5bdbdcbf34714bd0c
18003         * tools/gpg-wks-client.c (aRead): New.
18004         (opts): Add command "--read".
18005         (main): Implement that.
18006
18007         tests: Add a gettime test for sizeof (time_t) > 4.
18008         + commit 27d158ead4a2b9c52269ef28d050a49c786c7d13
18009         * common/t-gettime.c (test_isotime2epoch): Add 4 more tests.
18010
18011 2016-07-03  Werner Koch  <wk@gnupg.org>
18012
18013         gpg: Avoid spurious failures on keyblocks with no or only deleted nodes.
18014         + commit 9177a897732b3cebf3f15c97c1f613f71b6318fe
18015         * g10/import.c (write_keyblock_to_output): Clear ERR on success.
18016
18017         wks: Let the client only export the requested UID.
18018         + commit 1bfed0bbc5ec9d60d4fb3a0f5c865923ed3563e7
18019         * tools/gpg-wks-client.c (get_key): Export only the requested uid.
18020
18021         tools: Call sendmail directly from the wks tools.
18022         + commit 7705f310f1406fe49b45e16c371b09863313f24f
18023         * tools/send-mail.c, tools/send-mail.h: New.
18024         * tools/wks-util.c: New.
18025         * tools/Makefile.am (gpg_wks_server_SOURCES): Add them.
18026         (gpg_wks_client_SOURCES): Ditto.
18027         * tools/gpg-wks.h (opt): Add fields use_sendmail and output.
18028         * tools/gpg-wks-client.c: Add options --send and --output.  Rename
18029         command --send to --create.
18030         (command_send, send_confirmation_response): Output via wks_send_mime.
18031         * tools/gpg-wks-server.c:  Add options --send and --output.
18032         (send_confirmation_request): Output via wks_send_mime.
18033         (check_and_publish): Add hack for name-value bug.
18034
18035 2016-07-02  Werner Koch  <wk@gnupg.org>
18036
18037         tools: Add options to gpg-wks-server.
18038         + commit c619035d9cd0c9cef62facf5365321289051f9a0
18039         * tools/gpg-wks.h (opt): Add 'default_from' and 'extra_headers'.
18040         * tools/gpg-wks-server.c (oFrom, oHeader): New.
18041         (parse_arguments): Set them and check args.
18042         (get_submission_address): New.
18043         (send_confirmation_request): Set correct From address.  Add extra
18044         headers.
18045         (process_new_key): Return an error code.
18046
18047         tools: Extend mime-maker.c:mime_maker_add_header.
18048         + commit 0e36a1d1fb79c2b75c081616eed00075190b38aa
18049         * tools/mime-maker.c (add_header): Check header name and allow
18050         name-value syntax.
18051         (mime_maker_add_header): Add mode for a syntax check.
18052
18053         doc: Describe filter expressions.
18054         + commit 442efa9b3ff211c692b6967a944b3d9371ad1bb7
18055         * doc/gpg.texi: Remove some superfluous .E.
18056         (FILTER EXPRESSIONS): New.
18057
18058         yat2m: Fix table formatting.
18059         + commit aae3cdb61555db4efb26f522030c8303a731d4a9
18060         * doc/yat2m.c (proc_texi_cmd): Use .TQ for @itemx.  Print a .P at the
18061         end of a level 0 table.
18062
18063 2016-07-01  Werner Koch  <wk@gnupg.org>
18064
18065         gpg: New option --export-filter.
18066         + commit 7bfc86c938d11c14ea78b196c82ceba2a2f5317d
18067         * g10/gpg.c (oExportFilter): New.
18068         (opts): Add --export-filter.
18069         (main): Handle option.
18070         * g10/export.c: Include recsel.h, init.h, and mbox-util.h.
18071         (export_keep_uid): New global var.
18072         (cleanup_export_globals): New.
18073         (parse_and_set_export_filter): New.
18074         (filter_getval): New.
18075         (apply_keep_uid_filter): New.
18076         (do_export_stream): Apply filter if set.
18077
18078         gpg: New option --import-filter.
18079         + commit 5137bf73ccc98a72c2eeac148e4d4b5d58f0a854
18080         * g10/gpg.c (oImportFilter): New.
18081         (opts): Add --import-filter.
18082         (main): Handle option.
18083         * g10/import.c: Include recsel.h, init.h, and mbox-util.h.
18084         (import_keep_uid): New global var.
18085         (cleanup_import_globals): New.
18086         (parse_and_set_import_filter): New.
18087         (filter_getval): New.
18088         (apply_keep_uid_filter): New.
18089         (import_one): Apply filter if set.
18090
18091         gpg: Allow to cache the mbox in a user id struct.
18092         + commit f015552374d69e28292a12f2b91ab34d65c9b457
18093         * g10/packet.h (PKT_user_id): Add field 'mbox'.
18094         * g10/free-packet.c (free_user_id): Free that.
18095
18096         gpg: Make sure a user ID packet has always a terminating Nul in memory.
18097         + commit d8bce478be3ae9e401841a77d189ef3c81ccb757
18098         * g10/keygen.c (write_uid): Avoid overflow.
18099
18100         common: Add function to select records etc.
18101         + commit 681c6ef757a73fc1a63a552186e038db179494aa
18102         * common/recsel.c, common/recsel.h: New.
18103         * common/t-recsel.c: New.
18104
18105         common: Smart up register_mem_cleanup_func.
18106         + commit 6446a6b3dfd3b2e68b4285870f902ed1f86b0866
18107         * common/init.c (register_mem_cleanup_func): Avoid double registration.
18108
18109 2016-07-01  Justus Winter  <justus@g10code.com>
18110
18111         common: Annotate semi-static allocation.
18112         + commit 49fdd0887c84ed7f7b858b9e7ffa146fcb7f1e87
18113         * common/argparse.c (optfile_parse): Allow string arguments to leak.
18114
18115         g10: Fix memory leak.
18116         + commit 78aeb236fe4ff3a6d51b3095148e7086f2a6e9a8
18117         * g10/keyserver.c (parse_keyserver_uri): Free URI.
18118
18119         tools/gpgtar: Annotate semi-static allocation.
18120         + commit cff63da930b6b3f0253668911e0931713b2b584a
18121         * tools/gpgtar.c (shell_parse_argv): Annotate argument vector as
18122         leaked.
18123
18124         g10: Fix memory leak.
18125         + commit c454922ffa71929c810c6ff048d902498575302f
18126         * g10/import.c (transfer_secret_keys): Release curve from the previous
18127         iteration.
18128
18129         g10: Fix build with disabled kbnode cache.
18130         + commit ff77b92aae9c8e20cbc7fa7c294adcc6a8c2f614
18131         * g10/kbnode.c (release_unused_nodes): Fix build with disabled kbnode
18132         cache.
18133
18134         g10: Fix memory leak.
18135         + commit 44d4c695722d96b3bbef16f2843f62413b9670cd
18136         * g10/trustdb.c (tdb_get_validity_core): Fix kbnode leak.
18137
18138         g10: Fix memory leak.
18139         + commit 5fafd18d474da7b763f5b82c73b6ca4288e136d7
18140         * g10/keygen.c (keygen_set_std_prefs): Fix memory leak.
18141
18142         Fix trivial memory leaks in tests.
18143         + commit 6bfbc368f90b274192d3751274816091675f5109
18144         * dirmngr/t-ldap-parse-uri.c (check_ldap_escape_filter): Free result.
18145         * g10/t-stutter.c (main): Free file name.
18146
18147 2016-06-30  Justus Winter  <justus@g10code.com>
18148
18149         tools: Fix trivial memory leak.
18150         + commit 8f39185d7bfa0bc749f9ccf4a041d2da4eba24ff
18151         * tools/gpg-connect-agent.c (main): Fix trivial memory leak.
18152
18153         g10: Fix memory leak.
18154         + commit 401db0eebbcd28dca8f4059706bfbd18d8cc7528
18155         * g10/export.c (do_export_stream): Free secret parameters.
18156
18157         g10: Fix memory leak.
18158         + commit eb4cdbefb05795b77a8a72189eff246b84442caf
18159         * g10/keygen.c (read_parameter_file): Free 'line'.
18160
18161         g10: Fix memory leak.
18162         + commit 1de362af9094e0a1a0be60f77fbea7c5190a4dcc
18163         * g10/sign.c (mk_notation_policy_etc): Free 'mbox'.
18164
18165         common: Fix memory leak.
18166         + commit 6b9a89e4c7d6f19de62e0a908a8d80c98bf99819
18167         * g10/textfilter.c (copy_clearsig_text): Free buffer.
18168
18169         common: Fix memory leak.
18170         + commit d2d19063d3adf29340aeb39f14e1b1e9aacf41e7
18171         * common/iobuf.c (iobuf_set_partial_body_length_mode): Only create
18172         context if necessary.
18173
18174         common: Fix memory leak.
18175         + commit 9037c23979866e6e085b3e32f973bcba590a2635
18176         * common/simple-pwquery.c (agent_open): Free socket path.
18177
18178         g10: Fix keybox-related memory leaks.
18179         + commit 29beea6462cca32d3278b0f7f9364ff4342327b8
18180         * g10/keydb.c (keydb_release): Clear keyblock cache.
18181         (keydb_get_keyblock): Revert previous change.
18182         * kbx/keybox-blob.c (create_blob_finish): Free previous buffer, free
18183         fixups after applying them.
18184         (_keybox_release_blob): Free buffer.  Currently, the buffer has been
18185         extracted before the keybox is released, but this is the right thing
18186         to do here.
18187
18188         g10: Fix memory leak.
18189         + commit 5869f518cbd8b41b4c9880fc593216b9efeea430
18190         * g10/compress.c (release_context): Free buffers.
18191
18192         g10: Fix memory leak.
18193         + commit 84f262102be19334534cccc66ed7eceea2714527
18194         * g10/sign.c (write_plaintext_packet): Free packet.
18195
18196         g10: Fix memory leak.
18197         + commit abae8a9dc8a00cf46291ccb40644b3a7aa477307
18198         * g10/mainproc.c (release_list): Do not exit early if list is NULL,
18199         there are other resources that must be released.
18200
18201         gpgscm: Fix reallocating string ports.
18202         + commit 5003caa8fdc80afd5748835c06621014f83e6ec4
18203         * tests/gpgscm/scheme.c (realloc_port_string): Use memcpy because
18204         Scheme strings may contain 0s.
18205
18206         gpgscm: Free memory backing string ports.
18207         + commit 599ad21104e622acbd1230d90d6a23abf9145499
18208         * tests/gpgscm/scheme.c (finalize_cell): Free memory backing string
18209         ports.
18210
18211         gpgscm: Use the allocator from libgcrypt.
18212         + commit d4ede89981c769b0626ab2b37615da1d12a3b078
18213         * tests/gpgscm/main.c (main): Use the allocator from libgcrypt.
18214
18215         w32: Fix build.
18216         + commit dbcb342eaf1738798a5378d9ecd83c7946140d54
18217         * g10/keyedit.c (keyedit_quick_revuid): Fix call to
18218         'check_trustdb_stale'.
18219
18220 2016-06-30  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18221
18222         g10: Implement gpg --quick-revuid.
18223         + commit 55d112eeb0743e90be46d15dbae67368ee7d4b50
18224         * g10/revoke.c (get_default_uid_revocation_reason): New.
18225         * g10/keyedit.c (menu_revuid): Break out creation of uid revocation
18226         into new function core_revuid.
18227         * g10/keyedit.c (keyedit_quick_revuid): New. Selects key and
18228         uid, invokes core_revuid.
18229         * g10/gpg.c (main): Handle --quick-revuid argument.
18230         * doc/gpg.texi: Document --quick-revuid.
18231
18232 2016-06-29  Werner Koch  <wk@gnupg.org>
18233
18234         tools: Add gpg-wks-client and gpg-wks-server.
18235         + commit 5d6c83deaa11327366b0038928200b9f9f85b426
18236         * configure.ac: Add option --enable-wks-tools
18237         * tools/gpg-wks-client.c: New.
18238         * tools/gpg-wks-server.c: New.
18239         * tools/gpg-wks.h: new.
18240         * tools/wks-receive.c: New.
18241         * tools/call-dirmngr.c, tools/call-dirmngr.h: New.
18242
18243         build: Improve GNUPG_BUILD_PROGRAM macro.
18244         + commit d8ee0d79a702c92a257884bab86183d32d16ff0e
18245         * acinclude.m4 (GNUPG_BUILD_PROGRAM): Allow for dash in options.
18246
18247         tools: Add modules for MIME parsing and creating.
18248         + commit c334fa8df0e3901857e1a277d3277a873ae4af74
18249         * tools/mime-maker.c: New.
18250         * tools/mime-maker.h: New.
18251         * tools/mime-parser.c: New.
18252         * tools/mime-parser.h: New.
18253
18254 2016-06-28  Justus Winter  <justus@g10code.com>
18255
18256         gpgscm: Fix memory leaks.
18257         + commit 9c67958c4737b34c60ef2076f57234eec155eb36
18258         * tests/gpgscm/ffi-private.h (ffi_schemify_name): Fix prototype.
18259         (ffi_define_function_name): Free schemified name.
18260         (ffi_define_function): Likewise.
18261         (ffi_define_constant): Likewise.
18262         (ffi_define_variable_pointer): Likewise.
18263         * tests/gpgscm/ffi.c (do_wait_processes): Free arrays.
18264         (ffi_schemify_name): Fix type.
18265         * tests/gpgscm/main.c (main): Free 'sc'.
18266
18267         gpgscm: Free file names.
18268         + commit 6cb2be91a7cc8a9b8ec42f3956adbb19347318e3
18269         * tests/gpgscm/scheme.c (scheme_load_named_file): Free file name.
18270
18271         gpgscm: Fix buffer overflow.
18272         + commit 56cebdc30c10eaec179a6911e308074264d876ae
18273         * tests/gpgscm/scheme.c (store_string): Avoid writing past allocated
18274         buffer.
18275
18276         g10: Fix memory leaks.
18277         + commit c57501cc5fa84dbaf560c0fc18853c9540e918af
18278         * g10/keydb.c (keydb_get_keyblock): Free 'sigstatus' and 'iobuf'.
18279         * g10/t-keydb-get-keyblock.c: Fix trivial memory leaks.
18280         * g10/t-keydb.c: Likewise.
18281
18282         common: Fix memory leaks.
18283         + commit c14ef10fc347d966a1efcb5c2000cbf3aaafa905
18284         * common/ccparray.c (ccparray_put): Free old array.
18285         * common/stringhelp.c (do_make_filename): Free 'home'.
18286         * common/t-convert.c: Fix trivial memory leaks.
18287         * common/t-iobuf.c: Likewise.
18288         * common/t-mbox-util.c: Likewise.
18289         * common/t-name-value.c: Likewise.
18290         * common/t-stringhelp.c: Likewise.
18291         * common/t-strlist.c: Likewise.
18292
18293 2016-06-28  Werner Koch  <wk@gnupg.org>
18294
18295         dirmngr: add option to retrieve extra WKS info.
18296         + commit b1e8e0d4b945e077966fb98175191aed056bd957
18297         * dirmngr/server.c (cmd_wkd_get): Add option --submission-address.
18298
18299         gpg: Add hack to --quick-gen-key to create Curve25519 keys.
18300         + commit 20ca075d9605e27e25a780bcc465c7371400ca61
18301         * g10/keygen.c (quick_generate_keypair): Add special algo string
18302         "test-default".
18303
18304         common: New function rfctimestamp.
18305         + commit 1ddf5b846fc058171af5f2784dad866b73eb0205
18306         * common/gettime.c (rfctimestamp): New.
18307
18308         common: Add missing header file for clarity.
18309         + commit 781e614e3b4586da27e54caca39b6a7ed42fc7c7
18310         * common/zb32.c: Include zb32.h.
18311
18312 2016-06-28  Justus Winter  <justus@g10code.com>
18313
18314         tools/gpgtar: Fix handling of '-'.
18315         + commit 4819f687c48c7972c39ae29c7af1e891a4d57360
18316         * tools/gpgtar-extract.c (gpgtar_extract): Use stdin if file is '-'.
18317         * tools/gpgtar-list.c (gpgtar_list): Likewise.
18318
18319         common: Close input stream.
18320         + commit d36f664bfdc39c05927cb6e14fe1b3ecb7b64bfa
18321         * common/exechelp-posix.c (gnupg_spawn_process): Also close the input
18322         stream in the child.
18323
18324         common: Fix copying data from the spawned child.
18325         + commit 8f79c31b4d465eeaf81c8046c35bb8c34512dd8d
18326         Fixes intermittent gpgtar failures.
18327
18328         * common/exectool.c (copy_buffer_do_copy): Initialize 'nwritten'.
18329         (gnupg_exec_tool_stream): Loop until all data is copied.
18330
18331 2016-06-28  NIIBE Yutaka  <gniibe@fsij.org>
18332
18333         g10: Fix --list-packets.
18334         + commit 52f65281f9743c42a48bf5a3354c9ab0ecdb681a
18335         * g10/gpg.c (main): Call set_packet_list_mode after assignment of
18336         opt.list_packets.
18337         * g10/mainproc.c (do_proc_packets): Don't stop processing with
18338         --list-packets as the comment says.
18339         * g10/options.h (list_packets): Fix the comment.
18340         * g10/parse-packet.c: Fix the condition for opt.list_packets.
18341
18342 2016-06-25  Werner Koch  <wk@gnupg.org>
18343
18344         build: Add aclocal macro from pkg-config.
18345         + commit b6872353bae778d11730f5d0afd2192750777647
18346         * m4/pkg.m4: New.
18347
18348         yat2m: Silence lint warnings and fix a printf format bug.
18349         + commit 22b9bea1c3d0e944aa539a87d79e47d92ca5309f
18350         * doc/yat2m.c (ATTR_PRINTF, ATTR_NR_PRINTF, ATTR_MALLOC): New.
18351         (die, err, inf, xmalloc, xcalloc): New prototypes with attributes.
18352         (get_section_buffer): Take care of !N_SECTIONS.
18353         (proc_texi_cmd): Cast precision format arg.
18354         (proc_texi_buffer): Do not set IN_CMD when not used afterwards.
18355
18356 2016-06-24  Werner Koch  <wk@gnupg.org>
18357
18358         gpg: New import option "import-export".
18359         + commit 7bca3be65e510eda40572327b87922834ebe07eb
18360         * g10/import.c (parse_import_options): Add option "import-export".
18361         (write_keyblock_to_output): New.
18362         (import_one): Implement option.
18363
18364 2016-06-23  Werner Koch  <wk@gnupg.org>
18365
18366         gpg: New import option "import-show".
18367         + commit 1e5959ec059ba41f4de1e2f953300bc040efc16f
18368         * g10/options.h (IMPORT_SHOW): New.
18369         * g10/import.c (parse_import_options): Add "import-show".
18370         (import_one): Implement that.
18371
18372         gpg: Do not print the validity after key generation.
18373         + commit 09c6f7135150efbbeb459d4ae0189a81e9d180f8
18374         * g10/keylist.c (struct keylist_context): Add field NO_VALIDITY.
18375         (list_keyblock_print): Take care of it.
18376         (list_keyblock_direct): Add arg NO_VALIDITY.
18377         * g10/keygen.c (do_generate_keypair): Merge keyblock and print w/o
18378         validity.
18379
18380         common: Fix possible small memory leak in b64dec.c.
18381         + commit c229ba4d8b9b16052ee0b9573bed7905be602cdf
18382         * common/b64dec.c (b64dec_finish): Always release TITLE.
18383
18384 2016-06-23  Justus Winter  <justus@g10code.com>
18385
18386         tests/openpgp: Fake the system time for the tofu test.
18387         + commit e584d6468a2e72cd01e55f46104f9f96b56c0b66
18388         The keys in the tofu test are set to expire on 2016-09-17.  Fake the
18389         system time for this test.
18390
18391         This commit includes changes to the old test as well, for those who
18392         need to backport it.
18393
18394         * tests/openpgp/gpg-agent.conf.tmpl: Drop trailing newlines.
18395         * tests/openpgp/tofu.scm: Fake system time.
18396         * tests/openpgp/tofu.test: Likewise.
18397
18398         gpgscm: Handle exceptions in the transformation monad.
18399         + commit 145910afc077e7a5df6cc8b10e180dfa6ce38cc3
18400         * tests/gpgscm/tests.scm (pipe:do): Raise errors.
18401         (tr:spawn): Catch and return errors.
18402         (tr:call-with-content): Likewise.
18403         (tr:{open,write-to,pipe-do,assert-identity,assert-weak-identity}):
18404         Adapt.
18405
18406         tests/openpgp: Improve tests.
18407         + commit 1e822654c1dcfc23a9ef689f4e18c0ebba18baca
18408         * tests/openpgp/multisig.scm: Simplify test.
18409         * tests/openpgp/setup.scm (dearmor): Use pipe.
18410
18411         gpgscm: Add types for special objects.
18412         + commit 332fa86982dc811640ac8643332d8375816e5b81
18413         * tests/gpgscm/scheme.c (enum scheme_types): Add types for boolean,
18414         nil, eof, and the sink object.
18415         (type_to_string): Handle new types.
18416         (scheme_init_custom_alloc): Give special objects a type.
18417
18418         gpgscm: Fix Scheme initialization.
18419         + commit e6e56adf208f194ecafda29bb1c1c06655348432
18420         This potentially causes a crash if the garbage collector marks an eof
18421         object.
18422
18423         * tests/gpgscm/scheme.c (scheme_init_custom_alloc): Initialize
18424         'EOF_OBJ'.
18425
18426 2016-06-23  Werner Koch  <wk@gnupg.org>
18427
18428         common: Add dedicated private key functions to name-value.c.
18429         + commit 3ead21da80da4570e77036cc05303914c9b1f364
18430         * common/name-value.c (struct name_value_container): Add field
18431         'private_key_mode'.
18432         (my_error): New.  Use instead of gpg_error.
18433         (nvc_new_private_key): New.
18434         (nve_release): Add arg 'private_key_mode'.
18435         (nvc_release): Call nve_release with private_key_mode flag.
18436         (nvc_delete): Ditto.
18437         (_nvc_add): Do no special case "Key:" in non-private_key_mode.
18438         (nvc_get_private_key): Return error in non-private_key_mode.
18439         (nvc_set_private_key): Ditto.
18440         (nvc_parse):  Factor all code out to ...
18441         (do_nvc_parse): new.  Add arg 'for_private_key'.
18442         (nvc_parse_private_key): New.
18443         * agent/findkey.c (write_extended_private_key): Replace nvc_parse by
18444         nvc_parse_private_key.
18445         (read_key_file): Ditto.
18446
18447         * common/t-name-value.c (private_key_mode): New variable.
18448         (my_nvc_new): New.  Replace all callers.
18449         (test_key_extraction): Take mode in account.
18450         (run_tests): Ditto.
18451         (run_modification_tests): Ditto.
18452         (parse): Ditto.
18453         (main): Add option --parse and rename --parse to --parse-key.
18454
18455         common: Rename external symbols in name-value.c.
18456         + commit d74d23d860c1e5039bd595c31c846782c5cb8025
18457         * common/name-value.c, common/name-value.h: Rename symbol prefixes
18458         from "pkc_" to "nvc_" and from "pke_" to "nve_".  Change all callers.
18459
18460         common: Rename private-keys.c to name-value.c.
18461         + commit b841a883a2a66807aa427e65d49067584bedfbe2
18462         * common/private-keys.c: Rename to name-value.c.
18463         * common/private-keys.h: Rename to name-value.h.  Chage all users.
18464         * common/t-private-keys.c: Rename to t-name-value.c.
18465         * common/Makefile.am: Adjust accordingly.
18466
18467         common: Add PGP armor decoding to b64dec.
18468         + commit 3694579bc4eef27ed53e1845bf03be38c299ce76
18469         * common/b64dec.c (decoder_states): Add new states.
18470         (b64dec_proc): Handle PGP armored format.
18471
18472 2016-06-23  NIIBE Yutaka  <gniibe@fsij.org>
18473
18474         g10: Fix regression of card-edit/fetch.
18475         + commit 6f5ff1cfe449cf1f4cb7287bc57570eb794216b2
18476         * g10/card-util.c (fetch_url): Call keyserver_fetch instead of
18477         keyserver_import_fprint.
18478
18479 2016-06-21  Justus Winter  <justus@g10code.com>
18480
18481         tests/migrations: Convert to Scheme and re-enable.
18482         + commit f548383d9af912bf93217068cc8aa99a9a6eda93
18483         * configure.ac: Re-enable.
18484         * tests/Makefile.am: Likewise.
18485         * tests/migrations/Makefile.am (TESTS): Use Scheme tests.
18486         * tests/migrations/common.scm: New file.
18487         * tests/migrations/extended-private-key-format.scm: Likewise.
18488         * tests/migrations/from-classic.scm: Likewise.
18489         * tests/migrations/extended-private-key-format.test: Drop file.
18490         * tests/migrations/from-classic.test: Drop file.
18491
18492         gpgscm: Add more file handling functions.
18493         + commit c5e0ca5a59ebd91b67944ca125cc8cd73a9d243e
18494         * tests/gpgscm/ffi.c (do_glob): New function.
18495         (ffi_init): Define new function.
18496         * tests/gpgscm/tests.scm (basename-suffix): New function.x
18497
18498         tests/openpgp: Port the remaining tests to Scheme.
18499         + commit 0340fcdac864109e3dd6edee759efc96e4d3f84e
18500         * tests/openpgp/Makefile.am (TESTS): Add new tests.
18501         * tests/openpgp/defs.scm (gpg-with-colons): New function.
18502         (get-config): Use new function.
18503         * tests/openpgp/export.scm: New file.
18504         * tests/openpgp/tofu.scm: Likewise.
18505
18506         gpgscm: Improve test framework.
18507         + commit 65081c31e7536d8fb5effcc2c9aeeffc120c9a69
18508         * tests/gpgscm/lib.scm (echo): Move...
18509         * tests/gpgscm/tests.scm (echo): ... here.
18510         (info, error, skip): And use echo here.
18511         (file-exists?): New function.
18512         (tr:spawn): Check that source exists and if the sink has been created.
18513         (tr:call-with-content): Hand in optional arguments.
18514
18515         gpgscm: Use native string searching functions.
18516         + commit 5fbbc4b334a73150e709a4802cac99abd8ada61d
18517         * tests/gpgscm/ffi-private.h: Handle character arguments.
18518         * tests/gpgscm/ffi.c (do_string_index): New function.
18519         (do_string_rindex): Likewise.
18520         (do_string_contains): Likewise.
18521         (ffi_init): Define new functions.
18522         * tests/gpgscm/ffi.scm (ffi-define): New macro.
18523         * tests/gpgscm/lib.scm (string-index): Use native function,
18524         demonstrate behavior.
18525         (string-rindex): Likewise.
18526         (string-contains?): Likewise.
18527         Demonstrate behavior of various other functions.
18528         (read-all): Rework so that it can handle large files.
18529
18530         gpgscm: Improve error reporting.
18531         + commit d99949fc8cf541018267964629992d55c97ca9ab
18532         * tests/gpgscm/scheme.c (type_to_string): New function.
18533         (Eval_Cycle): Include actual type in error message.
18534
18535         gpgscm: Make memory allocation failures fatal.
18536         + commit 616582071a2c76c4fb529d4da549aa95ee5d78d6
18537         * tests/gpgscm/scheme.c (Eval_Cycle): Exit if we run out of memory.
18538
18539 2016-06-21  Werner Koch  <wk@gnupg.org>
18540
18541         sm: Do not install cacert and other root certificates.
18542         + commit c19b2061274cd50838e62a2acbdc7e7d24888e7e
18543         * doc/Makefile.am (dist_pkgdata_DATA): Move qualified.txt and
18544         com-certs.pem to ...
18545         (EXTRA_DIST): here.
18546
18547 2016-06-20  Werner Koch  <wk@gnupg.org>
18548
18549         gpg: Add experimental support for an issuer fpr.
18550         + commit 955baf04364721457cd99aad21942523cd50498c
18551         * common/openpgpdefs.h (SIGSUBPKT_ISSUER_FPR): New.
18552         * g10/build-packet.c (build_sig_subpkt_from_sig): Add arg PKSK and
18553         insert the issuer fpr if needed.
18554         * g10/sign.c (write_signature_packets): Pass signing key.
18555         (make_keysig_packet): Ditto.
18556         (update_keysig_packet): Ditto.
18557         * g10/parse-packet.c (dump_sig_subpkt): Print issuer fpr.
18558         (parse_one_sig_subpkt): Detect issuer fpr.
18559         (can_handle_critical): Add issuer fpr.
18560         * g10/mainproc.c (check_sig_and_print): Try to get key via fingerprint.
18561         * g10/gpgv.c (keyserver_import_fprint): New stub.
18562         * g10/test-stubs.c (keyserver_import_fprint): New stub.
18563
18564         gpg: New option --rfc4880bis.
18565         + commit ee2d9061d7abc36b857165a8395203a97380baa2
18566         * g10/options.h (struct opt): Add field flags.rfc4880bis.
18567         * g10/gpg.c (oRFC4880bis): new.
18568         (opts): add --rfc4880bis.
18569         (main): Implement that and print a warning.
18570
18571 2016-06-19  Niibe Yutaka  <gniibe@fsij.org>
18572
18573         scd: Reset nonnull_nad to zero for VENDOR_GEMPC.
18574         + commit 971064f8b7ad676326b2a468f688037a303717df
18575         * (parse_ccid_descriptor): nonnull_nad = 0 for all GEMPC device.
18576
18577 2016-06-17  Werner Koch  <wk@gnupg.org>
18578
18579         tests: Make make distcheck work again.
18580         + commit ce1689ea0720552ac900d7b2c4139caf24452018
18581         * Makefile.am (tests): Remove test code which would led to doubling
18582         calls to for e.g. "make distclean".
18583         * tests/Makefile.am: Typo fixes.
18584         * tests/gpgscm/Makefile.am (EXTRA_DIST): Fix name of License file.
18585         Add repl.scm.
18586         (check): Replace by check-local because check is a standard automake
18587         target.
18588         * tests/openpgp/Makefile.am (TESTS_ENVIRONMENT): Replace gmake0sim by
18589         automake generated macro.
18590         (EXTRA_DIST): Add defs.scm
18591
18592         gpgscm: Silence compiler warnings.
18593         + commit dfe5282e5859409849a17d68b2b3a046370f65bd
18594         * tests/gpgscm/scheme.c (mk_integer): Rename arg NUM to N.
18595         (fill_vector): Ditto.
18596         (mark): Rename var NUM to N.
18597         (set_slot_in_env): Mark SC as unused.
18598         (is_any): Mark P as unused.
18599
18600         Add license notices for TinySCHEME.
18601         + commit dc1db12d2c4f9f12bc3f7de37f76293b316c3f35
18602         * tests/gpgscm/COPYING: Rename to ...
18603         * tests/gpgscm/LICENSE.TinySCHEME: this.
18604         * AUTHORS: Add a note about TinySCHEME.
18605         * build-aux/speedo/w32/pkg-copyright.txt: Add TinySCHEME notice.
18606
18607 2016-06-17  Justus Winter  <justus@g10code.com>
18608
18609         tests/openpgp: Reimplement tests in Scheme.
18610         + commit 9609cb20e4caee739b9fc4fd36797029d2970041
18611         * Makefile.am: Build the test infrastructure on Windows.
18612         * tests/openpgp/Makefile.am (required_pgms): Add gpgscm.
18613         (TESTS_ENVIRONMENT): Make sure gpgscm and the libraries are found.
18614         (TESTS): Replace tests with the new Scheme implementations.
18615         * tests/openpgp/4gb-packet.scm: New file.
18616         * tests/openpgp/README: Likewise.
18617         * tests/openpgp/armdetach.scm: Likewise.
18618         * tests/openpgp/armdetachm.scm: Likewise.
18619         * tests/openpgp/armencrypt.scm: Likewise.
18620         * tests/openpgp/armencryptp.scm: Likewise.
18621         * tests/openpgp/armor.scm: Likewise.
18622         * tests/openpgp/armsignencrypt.scm: Likewise.
18623         * tests/openpgp/armsigs.scm: Likewise.
18624         * tests/openpgp/clearsig.scm: Likewise.
18625         * tests/openpgp/conventional-mdc.scm: Likewise.
18626         * tests/openpgp/conventional.scm: Likewise.
18627         * tests/openpgp/decrypt-dsa.scm: Likewise.
18628         * tests/openpgp/decrypt.scm: Likewise.
18629         * tests/openpgp/default-key.scm: Likewise.
18630         * tests/openpgp/defs.scm: Likewise.
18631         * tests/openpgp/detach.scm: Likewise.
18632         * tests/openpgp/detachm.scm: Likewise.
18633         * tests/openpgp/ecc.scm: Likewise.
18634         * tests/openpgp/encrypt-dsa.scm: Likewise.
18635         * tests/openpgp/encrypt.scm: Likewise.
18636         * tests/openpgp/encryptp.scm: Likewise.
18637         * tests/openpgp/finish.scm: Likewise.
18638         * tests/openpgp/genkey1024.scm: Likewise.
18639         * tests/openpgp/gpgtar.scm: Likewise.
18640         * tests/openpgp/import.scm: Likewise.
18641         * tests/openpgp/mds.scm: Likewise.
18642         * tests/openpgp/multisig.scm: Likewise.
18643         * tests/openpgp/run-tests.scm: Likewise.
18644         * tests/openpgp/seat.scm: Likewise.
18645         * tests/openpgp/setup.scm: Likewise.
18646         * tests/openpgp/signencrypt-dsa.scm: Likewise.
18647         * tests/openpgp/signencrypt.scm: Likewise.
18648         * tests/openpgp/sigs-dsa.scm: Likewise.
18649         * tests/openpgp/sigs.scm: Likewise.
18650         * tests/openpgp/use-exact-key.scm: Likewise.
18651         * tests/openpgp/verify.scm: Likewise.
18652         * tests/openpgp/version.scm: Likewise.
18653
18654         tests/gpgscm: Add a TinySCHEME-based test driver.
18655         + commit d2ce3f9eee34e380536049c0c9d26ed66273f094
18656         * configure.ac: Add new component.
18657         * tests/Makefile.am: Likewise.
18658         * tests/gpgscm/Makefile.am: New file.
18659         * tests/gpgscm/ffi-private.h: Likewise.
18660         * tests/gpgscm/ffi.c: Likewise.
18661         * tests/gpgscm/ffi.h: Likewise.
18662         * tests/gpgscm/ffi.scm: Likewise.
18663         * tests/gpgscm/lib.scm: Likewise.
18664         * tests/gpgscm/main.c: Likewise.
18665         * tests/gpgscm/private.h: Likewise.
18666         * tests/gpgscm/repl.scm: Likewise.
18667         * tests/gpgscm/scheme-config.h: Likewise.
18668         * tests/gpgscm/t-child.c: Likewise.
18669         * tests/gpgscm/t-child.scm: Likewise.
18670         * tests/gpgscm/tests.scm: Likewise.
18671
18672         tests/gpgscm: Foreign objects support for TinySCHEME.
18673         + commit 56c36f2932fe2baf8e46efdea4315cf33f3c0338
18674         * tests/gpgscm/scheme-private.h (struct cell): Add 'foreign_object'.
18675         (is_foreign_object): New prototype.
18676         (get_foreign_object_{vtable,data}): Likewise.
18677         * tests/gpgscm/scheme.c (enum scheme_types): New type.
18678         (is_foreign_object): New function.
18679         (get_foreign_object_{vtable,data}): Likewise.
18680         (mk_foreign_object): Likewise.
18681         (finalize_cell): Free foreign objects.
18682         (atom2str): Pretty-print foreign objects.
18683         (vtbl): Add new functions.
18684         * tests/gpgscm/scheme.h (struct foreign_object_vtable): New type.
18685         (mk_foreign_object): New prototype.
18686         (struct scheme_interface): Add new functions.
18687
18688         Patch from Thomas Munro,
18689         https://sourceforge.net/p/tinyscheme/patches/13/
18690
18691         tests/gpgscm: Dynamically allocate string buffer.
18692         + commit 8e5ad9aabdd57457f76078924d33acb94b75a877
18693         * tests/gpgscm/scheme-config.h (strbuff{,_size}): Make buffer dynamic.
18694         * tests/gpgscm/scheme.c (expand_strbuff): New function.
18695         (putcharacter): Adapt length test.
18696         (readstrexp): Expand buffer if necessary.
18697         (scheme_init_custom_alloc): Initialize buffer.
18698         (scheme_deinit): Free buffer.
18699
18700         Patch from Thomas Munro,
18701         https://sourceforge.net/p/tinyscheme/patches/11/
18702
18703         tests/gpgscm: Make exception value available.
18704         + commit 3b100da9ada9171d873a796eaf3351d4fceed394
18705         * tests/gpgscm/init.scm (throw): Hand exception value to the handler.
18706         (catch): And bind it to *error*.
18707
18708         tests/gpgscm: Add package macro.
18709         + commit 2907381f4a7b422823b2304ebe550acbb2f66480
18710         * tests/gpgscm/init.scm: Add package macro from manual.
18711
18712         tests/gpgscm: Expose function to open streams as Scheme ports.
18713         + commit 55275b8e2b43a3420d85a1a931e02febaa1113e7
18714         * tests/gpgscm/scheme.c (vtbl): Add 'port_from_file' to the vtable.
18715         * tests/gpgscm/scheme.h (struct scheme_interface): New field
18716         'mk_port_from_file'.
18717
18718         tests/gpgscm: Nicer error message.
18719         + commit 13bba1357478815a85f5c0db3607ebb6cd574f56
18720         * tests/gpgscm/scheme.c (opexe_0): Include the value that we tried to
18721         evaluate as function-like in the error message.
18722
18723         tests/gpgscm: Fix error hook.
18724         + commit e02c1ccae13e4eb55afef8de4f29022c709404eb
18725         * tests/gpgscm/init.scm (*error-hook*): Fix error hook so that the
18726         whole error message is displayed.
18727
18728         tests/gpgscm: Handle unhandled enumeration values.
18729         + commit 133f25703a47e9bbc28c4532934f405ecdeb2de0
18730         * tests/gpgscm/scheme.c (opexe_{3,4}): Handle unhandled enumeration
18731         values in the opcode dispatching code.
18732
18733         tests/gpgscm: Verbatim import of latest TinySCHEME.
18734         + commit cb989504cdd4f0ff902d31af871dc3ee0d9419ac
18735         Revision 110 from svn://svn.code.sf.net/p/tinyscheme/code/trunk
18736
18737         * tests/gpgscm/COPYING: New file.
18738         * tests/gpgscm/Manual.txt: Likewise.
18739         * tests/gpgscm/init.scm: Likewise.
18740         * tests/gpgscm/opdefines.h: Likewise.
18741         * tests/gpgscm/scheme-private.h: Likewise.
18742         * tests/gpgscm/scheme.c: Likewise.
18743         * tests/gpgscm/scheme.h: Likewise.
18744
18745 2016-06-17  Werner Koch  <wk@gnupg.org>
18746
18747         scd: Make option --homedir work.
18748         + commit 4e41745b3ea3bb8ffc50af6bafeb1de9c928812f
18749         * scd/scdaemon.c (opts): Add --homedir.
18750
18751 2016-06-16  Werner Koch  <wk@gnupg.org>
18752
18753         Release 2.1.13.
18754         + commit b3df4e2ac6aa9b4154e923f71b4221533043e5ac
18755
18756
18757 2016-06-16  Yuri Chornoivan  <yurchor@ukr.net>
18758
18759         po: Update Ukrainian translation.
18760         + commit d4ce1b04431cf02ebc1bdc7150ad587d599f2a95
18761
18762
18763 2016-06-16  Ineiev  <ineiev@gnu.org>
18764
18765         po: Update Russian translation.
18766         + commit 2273e4f999325cdc9d275507cd07c7e95d62a377
18767
18768
18769 2016-06-16  Werner Koch  <wk@gnupg.org>
18770
18771         po: Update German translation.
18772         + commit 69f1b0b041c251abb66f000db173a602693bb18f
18773
18774
18775         Add missing files so that make distcheck works again,
18776         + commit 4d7d292cd5b616b209dfd4302a1deffe11b7be0e
18777         * tests/openpgp/Makefile.am (CLEANFILES): Add created file
18778         "passphrases".
18779         * tools/Makefile.am (EXTRA_DIST): Add no-libgcrypt.c.
18780
18781         tools: Fix typo in function name of symcryptrun.
18782         + commit e44dd878df58dab27c9cd411d80c4c81501e649a
18783         * tools/symcryptrun.c (main): Fix typo.
18784
18785 2016-06-15  Niibe Yutaka  <gniibe@fsij.org>
18786
18787         g10: Fix another race condition for trustdb access.
18788         + commit 35a3ce2acf78a95fecbccfd8db0560cca24232df
18789         * g10/tdbio.c (create_version_record): Call create_hashtable to always
18790         make hashtable, together with the version record.
18791         (get_trusthashrec): Remove call to create_hashtable.
18792
18793 2016-06-14  Werner Koch  <wk@gnupg.org>
18794
18795         gpg: Print the subkey's curve and not the primary key curve.
18796         + commit b56aebe76657ce6efa9c6819d5a8c2a31c2bbbba
18797         * g10/keylist.c (list_keyblock_colon): Use PK2 for the subkey's curve.
18798
18799         ldap: Improve info output for v3 fallback.
18800         + commit b7e3dfcf139284d30921cf44e7bab43d4244cc37
18801         * dirmngr/dirmngr_ldap.c (fetch_ldap): Do not use log_debug in an
18802         unprotected section.  Replace log_debug by log_info in verbose mode.
18803
18804 2016-06-14  Andre Heinecke  <aheinecke@intevation.de>
18805
18806         dirmngr: Try ldap protocol V3 as fallback.
18807         + commit f989b6ee0db96c36f13f093cbbcfd1d5b472d03c
18808         * dirmngr/dirmngr_ldap.c (fetch_ldap): Try V3 Protocol in case
18809         default Protocol gives error.
18810
18811         dirmngr: Print ldap error if bind fails.
18812         + commit 5faddcb2927a997e05fb34eb270982096d1fe3a4
18813         * dirmngr/dirmngr_ldap.c (fetch_ldap): Use ldap_err2string on bind
18814         return.
18815
18816 2016-06-14  Werner Koch  <wk@gnupg.org>
18817
18818         gpgsm: Allow ciphers AES192 and SERPENT256.
18819         + commit 5f9bd7a9e1ed4edcbb6c4e908d4bea5cd7dc9e68
18820         * sm/gpgsm.c (main): Add AES192 cipher.  Allow SERPENT256.
18821
18822         doc: Add files and envvars to a new index.
18823         + commit 2423238ee4c8a8c531dfe9e45c95f2760b638faa
18824         * doc/gnupg.texi: Define new index "ef".
18825         (Environment Index): New.
18826
18827         gpg: Avoid endless loop in a tofu error case.
18828         + commit f980cd2e0e4694a38038f518f290017087d4ce33
18829         * g10/tofu.c (get_trust): Do not jump to out.
18830
18831         gpg: Split tofu's get_trust function into several smaller ones.
18832         + commit 1affdf1efc42ed22dc023c92ca5134d5bcbf2686
18833         * g10/tofu.c (get_trust): Factor code out to ...
18834         (format_conflict_msg_part1): new and to ...
18835         (ask_about_binding): new.
18836
18837 2016-06-13  Werner Koch  <wk@gnupg.org>
18838
18839         gpg: Un-deprecate option --auto-key-retrieve.
18840         + commit 9e126af215143fddbdc3949681abb9ffdb9153bb
18841         * g10/gpg.c (main): Remove deprecation warning.
18842
18843         gpg: New option --disable-signer-uid, create Signer's UID sub-packet.
18844         + commit 61e7fd68c05ed185728e9da45f7a44a2323065ad
18845         * g10/gpg.c (oDisableSignerUID): New.
18846         (opts): New option '--disable-signer-uid'.
18847         (main): Set option.
18848         * g10/options.h (opt): Add field flags.disable_signer_uid.
18849         * g10/sign.c: Include mbox-util.h.
18850         (mk_notation_policy_etc): Embed the signer's uid.
18851         * g10/mainproc.c (check_sig_and_print): Do not use WKD for auto key
18852         retrieval if --disable-signer-uid is used.
18853
18854         gpg: Try Signer's User ID sub-packet with --auto-key-retrieve.
18855         + commit 08c82b1b55d28ffd09b859205b7686bcefae5011
18856         * g10/packet.h (PKT_signature): Add field 'signers_uid'.
18857         * g10/parse-packet.c (parse_signature): Set this field.
18858         * g10/free-packet.c (free_seckey_enc): Free field.
18859         (copy_signature): Copy field.
18860         * g10/mainproc.c (akl_has_wkd_method): New.
18861         (check_sig_and_print): Extend NEWSIG status.  If WKD is enabled try to
18862         locate a missing key via the signature's Signer's User ID sub-packet.
18863         Do this right before trying a keyserver lookup.
18864
18865 2016-06-11  Werner Koch  <wk@gnupg.org>
18866
18867         gpg: Remove C-99ism, re-indent, and simplify one function.
18868         + commit 334e993a71d3abb7d30cb5ee05d578cecf0c3f67
18869         * g10/call-agent.c (struct keyinfo_data): Rename to
18870         keyinfo_data_parm_s.
18871         (agent_get_keyinfo): Replace C-99 style init.
18872         (keyinfo_status_cb): Use new fucntion split_fields.
18873         * g10/export.c (match_curve_skey_pk): Add missings returns error
18874         cases.
18875         (cleartext_secret_key_to_openpgp): Better clear PK->PKEY first.
18876
18877         common: New function split_fields.
18878         + commit 5ba99d9302cd86aee99958b71075d5288bb430aa
18879         * common/stringhelp.c (split_fields): New.
18880         * common/t-stringhelp.c: Include assert.h.
18881         (test_split_fields): New.
18882         (main): Call test.
18883
18884 2016-06-11  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
18885
18886         g10: Export cleartext keys as cleartext.
18887         + commit c41c46fa84cabbed74a13ded51fc3a817a919367
18888         * g10/export.c (do_export_stream): If a key is stored by the agent in
18889         cleartext, then try to export it as cleartext.
18890         * tests/openpgp/export.test: For secret keys that are stored in
18891         cleartext, test should try to export without pinentry interaction.
18892
18893         g10: Allow receiving cleartext secret keys from agent.
18894         + commit a3cb72af79ee645eda212f31ab0b266f2c3d9f29
18895         * g10/export.c (match_curve_skey_pk): New function, testing whether an
18896         OpenPGP public key and an S-expression use the same curve.
18897         * g10/export.c (cleartext_secret_key_to_openpgp): New function,
18898         filling in the secret key parameters of a PKT_public_key object from
18899         a corresponding cleartext S-expression.
18900         * g10/export.c, g10/main.h (receive_seckey_from_agent): Add cleartext
18901         parameter, enabling retrieval of the secret key, unlocked.
18902         * g10/export.c (do_export_stream): Send cleartext as 0, keeping current
18903         behavior.
18904         * g10/keygen.c (card_store_key_with_backup): Use cleartext=0 to ensure
18905         that smartcard backups are all passphrase-locked.
18906
18907         g10: Add openpgp_protected flag to agent secret key export functions.
18908         + commit 7de74320767d15d915942a98ff47c00175a078ed
18909         * g10/call-agent.c, g10/call-agent.h (agent_export_key): Add
18910         openpgp_protected flag.
18911         * g10/export.c (receive_seckey_from_agent): Request openpgp_protected
18912         secret keys from agent.
18913         * agent/command.c (hlp_export_key): EXPORT_KEY help text: add a
18914         brief description of the effect of --openpgp.
18915
18916         g10: report whether key in agent is passphrase-protected or not.
18917         + commit 00f30cc01c79bbdff5cdc3be795f009f15d3845e
18918         * g10/call-agent.c, g10/call-agent.h (agent_get_keyinfo): add
18919           r_cleartext parameter to report whether a key is stored without
18920           passphrase protection.
18921         * g10/gpgv.c, g10/test-stubs.c: augment dummy agent_get_keyinfo to
18922           match new API.
18923         * g10/export.c, g10/keyedit.c, g10/keygen.c, g10/keylist.c,
18924           g10/sign.c: pass NULL to agent_get_keyinfo since we do not yet
18925           need to know whether agent is passphrase-protected.
18926
18927 2016-06-08  Werner Koch  <wk@gnupg.org>
18928
18929         Explicitly restrict socket permissions.
18930         + commit 8127043d549a5843ea1ba2dc6da4906fc2258d53
18931         * agent/gpg-agent.c (create_server_socket): Call chmod before listen.
18932         * scd/scdaemon.c (create_server_socket): Ditto.
18933         * dirmngr/dirmngr.c (main): Ditto.
18934
18935         w32: Fix recent build regression.
18936         + commit 6790115fd9059e066b4e6feb6b1e3876a1c1d522
18937         * common/homedir.c (_gnupg_socketdir_internal) [W32]: Add definition
18938         for NAME.
18939         * g10/gpg.c (main) [W32]:  Fix use og gnupg_homedir.
18940
18941         * agent/gpg-agent.c (remove_socket): Remove unused var P.
18942         * scd/scdaemon.c (cleanup): Ditto.
18943
18944         gpgconf: New commands --create-socketdir and --remove-socketdir.
18945         + commit cf4910419e09daf414f76ca2c8ab685c3d488ec1
18946         * tools/gpgconf.c: Include unistd.h.
18947         (aCreateSocketDir, aRemoveSocketDir): New.
18948         (opts): Add --create-socketdir and --remove-socketdir.
18949         (main): Implement them.
18950
18951         Implement /run/user/UID/gnupg based sockets.
18952         + commit aab8a0b05292b0d06e3001a0b289224cb7156dbd
18953         * common/homedir.c: Include sys/stat.h and zb32.h.
18954         (w32_portable_app, w32_bin_is_bin): Change type from int to byte.
18955         (non_default_homedir): New.
18956         (is_gnupg_default_homedir): New.
18957         (default_homedir): Set non_default_homedir.
18958         (gnupg_set_homedir): Set non_default_homedir and make
18959         the_gnupg_homedir and absolute directory name.
18960         (gnupg_homedir): Return an absolute directory name.
18961         (_gnupg_socketdir_internal): New.
18962         (gnupg_socketdir): Implement /run/user/ based sockets.
18963         * tools/gpg-connect-agent.c (get_var_ext): Replace now obsolete
18964         make_filename by xstrdup.
18965         * tools/gpgconf.c (main): Sue gnupg_homedir for the "homedir:" output.
18966
18967         gpgconf: Add option --homedir.
18968         + commit def512eb67c8a380f3b873cee0f156deef0b6dda
18969         * tools/gpgconf.c (opts): Add --homedir.
18970         (main): Set homedir.
18971
18972         Do not use no-libgcrypt dummy for tools.
18973         + commit 173fa97102fec68670a46ae1b460231e2a183c81
18974         * tools/Makefile.am (gpgconf_SOURCES): Remove no-libgcrypt.c.
18975         (gpgconf_LDADD): Add LIBGCRYPT_LIBS.
18976         (gpg_connect_agent_LDADD): Ditto.
18977         (gpgtar_LDADD): Ditto.
18978         * dirmngr/Makefile.am (dirmngr_client_LDADD): Ditto.
18979         (t_common_ldadd): Ditto.  Remove no-libgcrypt.o.
18980
18981         Do not try to remove the enclosing directory of sockets.
18982         + commit 0faf8951544f43790c412777a926c969540174bd
18983         * agent/gpg-agent.c (remove_socket): Do not remove the enclosing
18984         directory.
18985         * scd/scdaemon.c (cleanup): Ditto.
18986
18987 2016-06-07  Werner Koch  <wk@gnupg.org>
18988
18989         common: New function gnupg_socketdir.
18990         + commit 36550dde998fa1d497098050ca2d4e1a952ed6b6
18991         * common/homedir.c (gnupg_socketdir): New.
18992         * agent/gpg-agent.c (create_socket_name): Use new function instead of
18993         gnupg_homedir.
18994         (check_own_socket): Ditto.
18995         (check_for_running_agent): Ditto.
18996         * agent/preset-passphrase.c (main): Ditto.
18997         * common/asshelp.c (start_new_gpg_agent): Ditto.
18998         * scd/scdaemon.c (create_socket_name): Ditto.
18999         * tools/gpgconf.c (main): Ditto.
19000         * tools/symcryptrun.c (main): Ditto.
19001
19002         common: Remove homedir arg from start_new_{dirmngr,gpg_agent}.
19003         + commit fb88f37c40dc156fa0b5bfba4ac85f1e553fd7e9
19004         * common/asshelp.c (start_new_gpg_agent): Remove arg 'homedir' in
19005         favor of gnupg_homedir ().  Change all callers.
19006         (start_new_dirmngr): Ditto.
19007         * common/get-passphrase.c (gnupg_prepare_get_passphrase): Remove arg
19008         'homedir'.
19009
19010         Replace use of opt.homedir by accessor functions.
19011         + commit 22a7ef01aa2c0eb77bcc40174d09104acc35cab1
19012         * common/homedir.c (the_gnupg_homedir): New var.
19013         (gnupg_set_homedir): New.
19014         (gnupg_homedir): New.
19015         * g10/options.h (struct opt): Remove 'homedir' and replace all users
19016         by the new accessor functions.
19017         * g13/g13-common.h (struct opt): Ditto.
19018         * scd/scdaemon.h (struct opt): Ditto.
19019         * sm/gpgsm.h (struct opt): Ditto.
19020         * dirmngr/dirmngr.h (struct opt): Ditto.
19021         * agent/preset-passphrase.c (opt_homedir): Ditto.
19022         * agent/protect-tool.c (opt_homedir): Ditto.
19023
19024 2016-06-07  NIIBE Yutaka  <gniibe@fsij.org>
19025
19026         po: Update Japanese translation.
19027         + commit 650abbab716750d6087a457a25fa2efaaa3567cd
19028
19029
19030         gpg: Fix command line parsing of --quick-addkey and --quick-gen-key.
19031         + commit abeeb84a94be815a16e678b319cb5c8bffde2811
19032         * g10/gpg.c (main): Compose a block by curly braces.
19033
19034 2016-06-06  Werner Koch  <wk@gnupg.org>
19035
19036         gpg: Use --keyid-format=none by default.
19037         + commit 7257ea2d450238afa4d162fab8001f74782fe43f
19038         * g10/gpg.c (main): Init keyid_format to KF_NONE.
19039         * g10/keyid.c (format_keyid): Ditto.
19040         (keystrlen): Ditto.
19041
19042         gpg: Add option --with-subkey-fingerprint.
19043         + commit 1d1cb86694fb2223de1da0b3bfffb5c62f505847
19044         * g10/gpg.c (oWithSubkeyFingerprint): New.
19045         (opts): Add --with-subkey-fingerprint[s].
19046         (main): Set that option.
19047         * g10/options.h (struct opt): Add 'with_subkey_fingerprint'.
19048         * g10/keylist.c (list_keyblock_print): Print subkey fingerprint.
19049         (print_fingerprint): Tweak printing to use compact format if
19050         desirable.
19051
19052         gpg: Implement --keyid-format=none.
19053         + commit b047388d57443f584f1c1d6333aac5218b685042
19054         * g10/gpg.c (main): Add option "none" to --keyid-format.
19055         * g10/options.h (KF_NONE): New.
19056         * g10/keyid.c (format_keyid): Implement that.
19057         (keystr): Use format "long" is KF_NONE is in use.
19058         (keystr_with_sub): Ditto.
19059         * g10/keylist.c (list_keyblock_print): Adjust indentaion for KF_NONE.
19060         Factor some code out to ...
19061         (print_key_line): new.
19062         (print_fingerprint): Add mode 20.
19063         * g10/mainproc.c (list_node): Use print_key_line.  Replace MAINKEY by
19064         flags.primary in the PK.  Fix putting a " revoked..." string into the
19065         colons format.
19066         * g10/pkclist.c (do_edit_ownertrust): Use print_key_line.  This
19067         slightly changes the putput format.
19068         * g10/revoke.c (gen_standard_revoke): Use print_key_line.  This may
19069         also put "expires: " into the output.
19070
19071 2016-06-04  Werner Koch  <wk@gnupg.org>
19072
19073         w32: Require --enable-build-timestamp for the BUILD_HOSTNAME.
19074         + commit 79b7a8a9e0d41b743ceaee20dc47294359fe0d44
19075         * configure.ac (BUILD_HOSTNAME): Set to "<anon>" bey default.
19076         * build-aux/speedo.mk (speedo_pkg_gnupg_configure): Add
19077           --enable-build-timestamp.
19078
19079 2016-06-02  Werner Koch  <wk@gnupg.org>
19080
19081         gpg: Add the fingerprint to KEY_CREATED for subkeys.
19082         + commit 8d976a6b07c5a356631791b46b590328c1451f31
19083         * g10/keygen.c (print_status_key_created): Make more robust by
19084         allowing a NULL for PK.
19085         (generate_subkeypair): Use print_status_key_created.
19086         (generate_card_subkeypair): Ditto.
19087
19088         gpg: Try to use the passphrase from the primary for --quick-addkey.
19089         + commit 1b460f049e5c1c102d8b55ad28781688252c5a6b
19090         * agent/command.c (cmd_genkey): Add option --passwd-nonce.
19091         (cmd_passwd): Return a PASSWD_NONCE in verify mode.
19092         * g10/call-agent.c (agent_genkey): Add arg 'passwd_nonce_addr' and do
19093         not send a RESET if given.
19094         (agent_passwd): Add arg 'verify'.
19095         * g10/keygen.c (common_gen): Add optional arg 'passwd_nonce_addr'.
19096         (gen_elg, gen_dsa, gen_ecc, gen_rsa, do_create): Ditto.
19097         (generate_subkeypair): Use sepeare hexgrip var for the to be created
19098         for hexgrip feature.  Verify primary key first.  Make use of the
19099         passwd nonce.  Allow for a static passphrase.
19100
19101         gpg: Extend the --quick-gen-key command.
19102         + commit 01285f909e43e8d6a48fbcc77bb5af53d567d8a2
19103         * g10/keygen.c (quickgen_set_para): Add arg 'use'.
19104         (quick_generate_keypair): Add args 'algostr', 'usagestr', and
19105         'expirestr'.  Implement primary only key mode.
19106         (parse_algo_usage_expire): Set NBITS for the default algo.
19107         * g10/gpg.c (main): Extend --quick-gen-key command.
19108
19109         gpg: Improve the new parse_subkey_algostr_usagestr fucntion.
19110         + commit dcc4cd83821667be22e502af86139bb4bd41bdf7
19111         * g10/keygen.c (parse_usagestr): Allow "cert".
19112         (generate_subkeypair): Factor expire parsing out to ...
19113         (parse_subkey_algostr_usagestr): here.  Rename to ...
19114         (parse_algo_usage_expire): this.  Add arg 'for_subkey'.  Set CERT for
19115         primary key and check that it is not set for subkeys.
19116
19117         gpg: New command --quick-addkey.
19118         + commit 8f2a053a0ffa0430d01a53b4d491a3f0fff683eb
19119         * g10/keygen.c (DEFAULT_STD_SUBKEYUSE): New.
19120         (ask_keysize): Factor code out to ...
19121         (get_keysize_range, fixup_keysize): new.
19122         (parse_parameter_usage): Factor parsing out to  ...
19123         (parse_usagestr): new.  Allow use of "encr" as alias for "encrypt".
19124         (parse_subkey_algostr_usagestr): New.
19125         (generate_subkeypair): Add new args.  Implement unattended mode.
19126
19127         * g10/keyedit.c (keyedit_quick_sign): Factor some code out to ...
19128         (find_by_primary_fpr): new.
19129         (keyedit_quick_addkey): New.
19130         * g10/gpg.c (aQuickAddKey): New.
19131         (opts): Add --quick-addkey.
19132         (main): Implement.
19133
19134         gpg: Do not abort on certain invalid packets.
19135         + commit d837f6b0eadb14ea08c1c6030b4d6adaaee8778e
19136         * g10/build-packet.c (write_fake_data): Check for non-opaque data.
19137         * g10/seskey.c (do_encode_md): Return NULL instead of abort.
19138
19139         common: New function openpgp_is_curve_supported.
19140         + commit 072acb69be55e366e2da921e3953404765fa3928
19141         * common/openpgp-oid.c: Include openpgpdefs.h.
19142         (oidtable): Add field pubkey_algo.
19143         (openpgp_is_curve_supported): New.
19144
19145 2016-06-01  NIIBE Yutaka  <gniibe@fsij.org>
19146
19147         g10: Allow User ID length >= 256.
19148         + commit db1ecc8212defdd183abbb6b1407fcc8d2dc9552
19149         * build-packet.c (do_user_id): Call write_header2 with HDRLEN not set.
19150
19151 2016-05-31  Werner Koch  <wk@gnupg.org>
19152
19153         gpg: New status code NOTATION_FLAGS.
19154         + commit 67a4bc8d536f6997f14daff4c039abd48a172100
19155         * common/status.h (STATUS_NOTATION_FLAGS: New.
19156         * g10/packet.h (struct notation): Add flags.human.
19157         (notation_t): New typedef.
19158         * g10/build-packet.c (sig_to_notation): Set flags.human.
19159         * g10/keylist.c (show_notation): Write STATUS_NOTATION_FLAGS.
19160
19161 2016-05-28  Werner Koch  <wk@gnupg.org>
19162
19163         common: Add a status callback to gnupg_exec_tool_stream.
19164         + commit 239a4d53916b47b5b0f0167a9b2c7a8915bb9c52
19165         * common/exectool.h (exec_tool_status_cb_t): New.
19166         * common/exectool.c: Include missing exectool.h.
19167         (read_and_log_buffer_t): Replace array by pointer.
19168         (gnupg_exec_tool_stream): Add args 'status_cb' and 'status_cb_value'.
19169         Change all callers to pass NULL for them.  Malloc buffer for
19170         FDERRSTATE.
19171         (read_and_log_stderr): Implement status_fd feature.
19172
19173 2016-05-27  Werner Koch  <wk@gnupg.org>
19174
19175         common: Allow a second input stream for gnupg_exec_tool_stream.
19176         + commit 44a32455c8e41400ea96db4507c8a42bdb65b3b6
19177         * common/exechelp-posix.c (do_exec): Add arg 'except' and pass to
19178         close_all_fds.
19179         (gnupg_spawn_process): Add arg 'except'.  Change callers to pass NULL
19180         for it.
19181         * common/exechelp-w32.c (gnupg_spawn_process): Add dummy arg 'except'.
19182         * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
19183         * common/exectool.c (copy_buffer_do_copy): Allow NULL for SINK.
19184         (gnupg_exec_tool_stream): Add arg 'inextra'. Change callers to pass
19185         NULL for it.  Allow NULL for OUTPUT.
19186
19187         common: Simplify the fd closing patch 512c56a.
19188         + commit e6d9a2d07ed7aeac3944d8a7d1317c4a117356b4
19189         * common/exechelp-posix.c (get_max_fds): Use /proc/self.
19190
19191         common: Speedup closing fds before an exec.
19192         + commit 512c56af43027149e8beacf259746b8d7bf9b1a2
19193         * common/exechelp-posix.c [__linux__]: Include dirent.h.
19194         (get_max_fds) [__linux__]: Return the actual used highest fd.
19195
19196         tools: Improve debug output of rfc822parse.
19197         + commit ad75ca9c963bebbe02aae8d73e199a705764ae82
19198         * tools/rfc822parse.c (show_event): Add missing events.
19199
19200         build: Remove obsolete tests for funopen and fopencookie.
19201         + commit d755bcb89dbeaf6c7c1eca73ccabdf89b536c535
19202         * configure.ac (AC_CHECK_FUNCS): Remove tests for funopen.
19203
19204         common: Extend gnupg_create_inbound_pipe et al.
19205         + commit 5d991e333a1885adc40abd9d00c01fec4bd5d9d7
19206         * common/exechelp-posix.c (gnupg_create_inbound_pipe): Add args 'r_fp'
19207         and 'nonblock'.
19208         (gnupg_create_outbound_pipe): Ditto.
19209         * common/exechelp-w32.c (gnupg_create_inbound_pipe): Add non yet
19210         functional args 'r_fp' and 'nonblock'.
19211         (gnupg_create_outbound_pipe): Ditto.
19212         * common/exechelp-w32ce.c (gnupg_create_inbound_pipe): Ditto.
19213         (gnupg_create_outbound_pipe): Ditto.
19214
19215         common: Make use of default_errsource in exechelp.
19216         + commit 96c7901ec1c79be732570811223d3ea54875abfe
19217         * common/exechelp-posix.c (my_error_from_syserror, my_error): New.
19218         Use them instead of gpg_error and gpg_error_from_syserror.
19219         (create_pipe_and_estream): Remove arg ERRSOURCE and fix use of
19220         OUTBOUND which has a wrong name.  Adjust callers.
19221         (gnupg_spawn_process): Remove arg ERRSOURCE and replace by use of
19222         DEFAULT_ERRSOURCE.
19223         * common/exechelp-w32.c (gnupg_spawn_process): Ditto.
19224         * common/exechelp-w32ce.c (gnupg_spawn_process): Ditto.
19225         * common/exectool.c (gnupg_exec_tool_stream):  Do not pass
19226         GPG_ERROR_FROM_SYSERROR.
19227         * tools/gpgconf-comp.c (gc_component_check_options): Ditto.
19228         (retrieve_options_from_program): Ditto.
19229
19230         gpg: Keep current and total of PROGESS status lines small enough.
19231         + commit 6c957c3d880c069bb843cc58fdcebb9fc344727e
19232         * g10/progress.c (progress_filter): Factor status wrote out to...
19233         (write_status_progress): New.  Scale values down.
19234
19235 2016-05-27  NIIBE Yutaka  <gniibe@fsij.org>
19236
19237         configure: Detection of libusb on FreeBSD.
19238         + commit b3e043ba905fdf2efcdadbd7022ac53f4408b748
19239         * configure.ac (LIBUSB_LIBS): Use LIBUSB_NAME for AC_CHECK_LIB.
19240
19241 2016-05-25  Werner Koch  <wk@gnupg.org>
19242
19243         build: Switch to new URL for swdb.lst.
19244         + commit 74028096e06d2904f77b74b373750264e5b7b1ea
19245
19246
19247 2016-05-24  Werner Koch  <wk@gnupg.org>
19248
19249         gpgtar: Simplify code by using ccparray.
19250         + commit 91bc7833836f19256d56984c94cacf44853ff5c8
19251         * tools/gpgtar-create.c (gpgtar_create): Use ccparray functions.
19252         * tools/gpgtar-extract.c (gpgtar_extract): Ditto.
19253         * tools/gpgtar-list.c (gpgtar_list): Ditto.
19254
19255         common: Add simple dynamic array function.
19256         + commit 2421f7f7ed74ed20372efd63a2efd58d3b55005c
19257         * common/ccparray.c: New.
19258         * common/ccparray.h: New.
19259         * common/t-ccparray.c: New.
19260         * common/Makefile.am (common_sources): Add files.
19261         (module_tests): Add test file.
19262         (t_ccparray_LDADD): New.
19263
19264 2016-05-23  Justus Winter  <justus@g10code.com>
19265
19266         tests: Test the pinentry interactions when exporting keys.
19267         + commit b9d1e099c3ec3163c86afe627ecbe028db1facf6
19268         * tests/openpgp/export.test: Test pinentry interactions.
19269
19270         tests: Add support for a passphrase queue to fake pinentry.
19271         + commit 4994153924e0948a657edddaef54a39a6001beff
19272         * tests/openpgp/fake-pinentry.c (get_passphrase): New function.
19273         (main): Add option --passphrasefile and read passphrases from it.
19274
19275         tests: Add logging to fake pinentry.
19276         + commit 41b10c66ec1dd33633386f4fc8013ddeab7737ca
19277         * tests/openpgp/fake-pinentry.c (log_stream): New variable.
19278         (reply): New function.
19279         (spacep,skip_options,option_value): Copy from common.
19280         (main): Parse arguments, add --logfile option, write logfile.
19281
19282         tests: Add export test.
19283         + commit a54e89a58576108fcae10ceeb4fc65822aecc170
19284         * tests/openpgp/Makefile.am (TESTS): Add new file.
19285         * tests/openpgp/export.test: New file.
19286
19287 2016-05-21  Werner Koch  <wk@gnupg.org>
19288
19289         gpg: Speed up key listing in Tofu mode.
19290         + commit 78bb08425af5b1edb7f3ef0119013529b3a9e4ba
19291         * g10/tofu.c (get_trust): Add arg PK.  Uses this instead of a an extra
19292         lookup of the public key by fingerrpint.
19293         (tofu_register): Pass PK to get_trust.
19294         (tofu_get_validity): Ditto.
19295
19296         *g10/tofu.c (tofu_register): Remove unused FINGERPRINT_PP.
19297
19298         gpg: Avoid name spaces clash with future sqlite versions.
19299         + commit b1ba460d8f3358342c2ee2927114d36e767a439f
19300         * g10/sqlite.c: Rename to gpgsql.c.  Change function prefixes to
19301         gpgsql_.
19302         * g10/sqlite.h: Rename to gpgsql.h.
19303         * g10/tofu.c: Adjust for changes.
19304
19305         gpg: Explicitly close a combined Tofu DB.
19306         + commit 006a6126131ffd59d9a47889ac031f932ecc5d0b
19307         * g10/tofu.c (tofu_closedbs): Close combined DB.
19308
19309         gpg: Store the Tofu meta handle for databases in CTRL.
19310         + commit 754b1c463034a634a678d8efc76c27fd46aad9b9
19311         * g10/gpg.h (struct tofu_dbs_s, tofu_dbs_t): New declarations.
19312         (struct server_control_s): Add field tofu.dbs.
19313         * g10/tofu.c (struct dbs): Rename to tofu_dbs_s.  Replace all users by
19314         by tofu_dbs_t.
19315         (opendbs):  Add arg CTRL.  Cache the DBS in CTRL.
19316         (closedbs): Rename to tofu_closedbs and make global.  Add arg CTRL.
19317         (tofu_register): Add arg CTRL.  Change all callers.  Do not call
19318         closedbs.
19319         (tofu_get_validity): Ditto.
19320         (tofu_set_policy): Ditto.
19321         (tofu_get_policy): Ditto.
19322         (tofu_set_policy_by_keyid): Add arg CTRL.
19323         * g10/gpg.c (gpg_deinit_default_ctrl): Call tofu_closedbs.
19324
19325         gpg: Pass CTRL object down to the trust functions.
19326         + commit 027c4e55522b8e18711a3331932a9869ab89ca26
19327
19328
19329         gpg: Fix the TOFU_STATS_LONG status.
19330         + commit fd973ee1c18aa8fe764e09ba4dff589309b2d78d
19331         * g10/tofu.c (show_statistics): Print TOFU STATS with formatting
19332         characters.
19333
19334 2016-05-19  Werner Koch  <wk@gnupg.org>
19335
19336         gpg: Print "[  never ]" instead of err for validity.
19337         + commit 437c97ab6a34ff1936001dd05209193b4466a81d
19338         * g10/trust.c (uid_trust_string_fixed): Handle NEVER.
19339
19340 2016-05-18  Werner Koch  <wk@gnupg.org>
19341
19342         dirmngr: Adjust the WKD lookup to specs version -01.
19343         + commit cf97769906337d65289ad58225a5ecc53c715550
19344         * dirmngr/server.c (cmd_wkd_get): Remove second occurrence of the
19345         domain part.
19346
19347 2016-05-17  Werner Koch  <wk@gnupg.org>
19348
19349         gpg: Emit new status line KEY_CONSIDERED.
19350         + commit ff71521d9698c7c5df94831a1398e948213af433
19351         * common/status.h (STATUS_KEY_CONSIDERED): New.
19352         * g10/getkey.c: Include status.h.
19353         (LOOKUP_NOT_SELECTED, LOOKUP_ALL_SUBKEYS_EXPIRED): New.
19354         (finish_lookup): Add arg R_FLAGS.  Count expired and revoked keys and
19355         set flag.  Check a requested usage before checking for expiraion or
19356         revocation.
19357         (print_status_key_considered): New.
19358         (lookup): Print new status.
19359
19360 2016-05-11  NIIBE Yutaka  <gniibe@fsij.org>
19361
19362         g10: Fix signature checking.
19363         + commit 83a90a916e8e2f8e44c3b11d11e1dd75f65a87fb
19364         * g10/sig-check.c (check_signature_over_key_or_uid): Fix call to
19365         walk_kbnode.
19366
19367 2016-05-10  Werner Koch  <wk@gnupg.org>
19368
19369         gpg: Allow unattended deletion of secret keys.
19370         + commit ac9ff644b12c4dfa55d466af8ae6af54d1646893
19371         * agent/command.c (cmd_delete_key): Make the --force option depend on
19372         --disallow-loopback-passphrase.
19373         * g10/call-agent.c (agent_delete_key): Add arg FORCE.
19374         * g10/delkey.c (do_delete_key): Pass opt.answer_yes to
19375         agent_delete_key.
19376
19377 2016-05-09  Werner Koch  <wk@gnupg.org>
19378
19379         gpg: Fix buglet in the check_all_keysigs function.
19380         + commit 693838f0125d5d0c963fa3771b1bd117702af697
19381         * g10/keyedit.c (sig_comparison): Actually compare the pubkey
19382         algorithms.
19383
19384         gpg: Request a "save" after cmd "check" fixed something.
19385         + commit d33b35f7481caa0dcb25f9fa7d6c5bb27895297a
19386         * g10/keyedit.c (keyedit_menu) <cmdCHECK>: Set modified.
19387
19388 2016-05-09  NIIBE Yutaka  <gniibe@fsij.org>
19389
19390         po: Update Japanese translation.
19391         + commit ff870d59f067d3c5415e231c02a50d5dceac7e48
19392
19393
19394 2016-05-04  Werner Koch  <wk@gnupg.org>
19395
19396         Release 2.1.12.
19397         + commit 00df5b1236cac5c7a48638a4613278c5aab486f8
19398
19399
19400         speedo,w32: Remove the installation directory page.
19401         + commit fb1e9df48465c2f77a65dddd257572fdc79d9450
19402         * build-aux/speedo/w32/inst.nsi (MUI_PAGE_DIRECTORY): Remove.
19403
19404         gpg: Fix const char pointer mismatch with gettext.
19405         + commit 920b1421b35d1404b8360bd8feac0be659840543
19406         * g10/tofu.c (get_trust): Use const char *.
19407
19408         speedo: Build sqlite with static-libgcc.
19409         + commit edce430b039b313cc2d79402a7bd21347490c3be
19410         * build-aux/speedo/patches/sqlite.patch: New.
19411         * Makefile.am (EXTRA_DIST): Add file.
19412
19413         speedo: Also try patch files w/o version number.
19414         + commit 9ea258fa5b45bb5454ee3f5906df5d5eebdec0dd
19415         * build-aux/speedo.mk (SPKG_template): Try such a patch file.
19416
19417 2016-05-04  Andre Heinecke  <aheinecke@intevation.de>
19418
19419         speedo,w32: Install sqlite.
19420         + commit 2b78223d7587c68e2e27a3d7b365219228da7947
19421         * build-aux/speedo/w32/inst.nsi (-sqlite, -un.sqlite): New.
19422
19423         speedo,w32: Fix uninstallation.
19424         + commit 5ec76fd0c300b52366cf8d1407fe1c8de3a8a9d4
19425         * build-aux/speedo/w32/inst.nsi (-un.gnupg): Delete distsigkey and
19426         dirmngr-conf.skel
19427
19428         speedo,w32: Install localisation.
19429         + commit 3f58fc64666101e160e9b13fedb6cdaebeb91a7a
19430         * build-aux/speedo/w32/inst.nsi (-libgpg-error, GnuPG): Install l10n.
19431         (-un.libgpg-error, -un.gnupg): Uninstall l10n files.
19432
19433 2016-05-04  Werner Koch  <wk@gnupg.org>
19434
19435         tests: Disable the migrations tests.
19436         + commit d696eb396a9c88319358da4333feb653994d5408
19437         * tests/Makefile.am (SUBDIRS): Remove migrations.
19438         * configure.ac (AC_CONFIG_FILES): Remove migrations Makefile.
19439
19440 2016-05-04  Ineiev  <ineiev@gnu.org>
19441
19442         po: Update Russian translation.
19443         + commit 4fd13ab78dd228d8ff85659cddc2076af8728ebe
19444
19445
19446 2016-05-04  Werner Koch  <wk@gnupg.org>
19447
19448         po: Update German translation.
19449         + commit 75f31cdd42eed3555952ac478055d52af841f702
19450
19451
19452         Some minor string changes and fixed a printf format.
19453         + commit d00625dae60f26617d2e1bd4f22c6b35a4e92c91
19454         * g10/build-packet.c (notation_value_to_human_readable_string): Use
19455         %zu for size_t.
19456
19457         build: Update config.{guess,sub} to 2016-04-02 and 2016-03-30.
19458         + commit 04cc7c3786d91881f83a72799dab058476602a31
19459         * build-aux/config.guess: Update.
19460         * build-aux/config.sub: Update.
19461
19462         agent: Make --allow-loopback-pinentry the default.
19463         + commit 3ef0938cfd8637e9801369f142eb8dd564f2ca61
19464         * agent/gpg-agent.c (oNoAllowLoopbackPinentry): New.
19465         (opts): Add --no-allow-loopback-pinentry.  Hide
19466         description of --allow-loopback-pinentry.
19467         (parse_rereadable_options): Set opt.allow_loopback_pinentry by
19468         default.
19469         (main): Replace allow-loopback-pinentry by no-allow-loopback-pinentry
19470         in the gpgconf list.
19471         * tools/gpgconf-comp.c (gc_options_gpg_agent): Ditto.
19472
19473 2016-05-03  Werner Koch  <wk@gnupg.org>
19474
19475         common: Print https URLs in help messages.
19476         + commit 9e28617e260261de3972c20698b5a01561330e1c
19477         * common/argparse.c (strusage): Print https URLS.
19478
19479         tests: Silence output of some tests.
19480         + commit 33aacc3d4bbd6a82d7e7ceca058970879741b7da
19481         * common/t-exechelp.c (print_open_fds): Silence non-verbose output.
19482         (test_close_all_fds): Ditto.
19483         * common/t-session-env.c (show_stdnames): Indent output.
19484         * g10/test.c (TEST): Silence non-verbose okay output.
19485         (exit_tests): Ditto.
19486         * tools/gpg-zip.in (tar_verbose_opt): Add option --quiet.
19487         * tests/openpgp/gpgtar.test (GPGZIP): Pass option --quiet.
19488         * tests/openpgp/mds.test: Indent MD5 notice.
19489         * tests/openpgp/version.test: Indent --version output.
19490
19491         gpg: Emit status lines TOFU_STATS and TOFU_STATS_LONG.
19492         + commit 83865be35cff5355a5c4575cc3b50609819b0baa
19493         * g10/tofu.c (NO_WARNING_THRESHOLD): Rename to BASIC_TRUST_THRESHOLD.
19494         (FULL_TRUST_THRESHOLD): New.
19495         (write_stats_status): New.
19496         (show_statistics): Call new function.  Print TOFU_STATS_LONG.
19497
19498 2016-05-02  Werner Koch  <wk@gnupg.org>
19499
19500         gpg: Extend TRUST_foo status lines with the trust model.
19501         + commit ae1889320b822d48f7118a29391605e9ac992701
19502         * g10/trustdb.h (TRUST_FLAG_TOFU_BASED): New.
19503         * g10/trustdb.c (trust_model_string): Lowercase the strings.  Add arg
19504         "model" and change callers to call with OPT.TRUST_MODEL.
19505         * g10/tofu.c (tofu_wot_trust_combine): Set TRUST_FLAG_TOFU_BASED.
19506         * g10/pkclist.c (write_trust_status): New.
19507         (check_signatures_trust): Call new function.
19508
19509         gpg: Improve line wrapping for a tofu message.
19510         + commit 5cef6118580fe658a27d32e85696d88775ad417a
19511         * g10/tofu.c (time_ago_str): Mark non-breakable spaces.
19512         (show_statistics): Remove marks.
19513
19514         gpg: Re-format some tofu messages.
19515         + commit d73e83c3b678add11a5754e199e528aeb39ec8ce
19516         * common/status.h (STATUS_TOFU_USER, STATUS_TOFU_STATS)
19517         (STATUS_TOFU_STATS_SHORT, STATUS_TOFU_STATS_LONG): New.
19518         * g10/tofu.c (NO_WARNING_THRESHOLD): New.
19519         (record_binding, tofu_register): Take care of --dry-run.
19520         (show_statistics): Print STATUS_TOFU_USER.  Reformat some messages.
19521         Fix the ngettext/strcmp thing.  Use log_string instead of log_info.
19522         Use NO_WARNING_THRESHOLD constant.
19523         (get_trust): Use format_text and print a compact fingerprint.
19524
19525 2016-05-02  NIIBE Yutaka  <gniibe@fsij.org>
19526
19527         scd: More fix of error return path.
19528         + commit 6677d8b61446eb5760a30a2488c992d6e895a9ed
19529         * scd/command.c (open_card): Return GPG_ERR_ENODEV on the failure of
19530         apdu_connect.
19531
19532 2016-04-29  Werner Koch  <wk@gnupg.org>
19533
19534         common: Extend log_string to indent lines.
19535         + commit 35f4b6aafdf1889ed1ae569af5852f47738fe993
19536         * common/logging.c (do_logv): Add indentation when called via
19537         log_string.
19538
19539         gpg: Factor some code code out of tofu.c.
19540         + commit dcad99c98616a6031ddfde313c920339e4012378
19541         * g10/tofu.c (string_to_long): New.
19542         (string_to_ulong): New.
19543         (get_single_unsigned_long_cb): Replace strtol/strtoul by new function.
19544         (get_single_long_cb): Ditto.
19545         (signature_stats_collect_cb):  Ditto.
19546         (get_policy): Ditto.
19547         (show_statistics): Ditto.  Uese es_free instead of free.
19548
19549         gpg: Remove all assert.h and s/assert/log_assert/.
19550         + commit 64bfeafa52a5ed3fa82bdc0ce7ef0edddeef188c
19551
19552
19553         common: Improve log_assert.
19554         + commit 9740dff9f4d18ba764dc7173d4902e94e3f0c2e8
19555         * common/logging.c (bug_at): Do not i18n the string.
19556         (_log_assert): New.
19557         * common/logging.h (log_assert): Use new function and pass line
19558         information.
19559
19560 2016-04-28  NIIBE Yutaka  <gniibe@fsij.org>
19561
19562         scd: Fix error return path.
19563         + commit cb4fee8bb645745ff199f7428e19226d5bc63dab
19564         * scd/ccid-driver.c (bulk_in): Remove EAGAIN handling.
19565         Handle LIBUSB_ERROR_NO_DEVICE to return CCID_DRIVER_ERR_NO_READER.
19566
19567 2016-04-27  NIIBE Yutaka  <gniibe@fsij.org>
19568
19569         scd: Fix memory leaks.
19570         + commit 508b0deb70d39d388149be9a63fab24cc956a239
19571         * scd/ccid-driver.c (scan_or_find_usb_device): Return on
19572         LIBUSB_ERROR_NO_MEM.  Free CONFIG before return except on error.
19573         (scan_or_find_devices): Free device list.
19574
19575 2016-04-27  Werner Koch  <wk@gnupg.org>
19576
19577         gpg: Add experimental AKL method "wkd" and option --with-wkd-hash.
19578         + commit 87de9e19edf0311ca0342e15ef44ebe40e32861e
19579         * g10/getkey.c (parse_auto_key_locate): Add method "wkd".
19580         (get_pubkey_byname): Implement that method.  Also rename a variable.
19581         * g10/call-dirmngr.c (gpg_dirmngr_wkd_get): New.
19582         * g10/keyserver.c (keyserver_import_wkd): New.
19583         * g10/test-stubs.c (keyserver_import_wkd): Add stub.
19584         * g10/gpgv.c (keyserver_import_wkd): Ditto.
19585         * g10/options.h (opt):  Add field 'with_wkd_hash'.
19586         (AKL_WKD): New.
19587
19588         * g10/gpg.c (oWithWKDHash): New.
19589         (opts): Add option --with-wkd-hash.
19590         (main): Set that option.
19591         * g10/keylist.c (list_keyblock_print): Implement that option.
19592
19593         dirmngr: Add experimental command WKD_GET.
19594         + commit c83c6f212e9bc98a9ea8dd8102bc16edd1a03050
19595         * dirmngr/server.c (cmd_wkd_get): New.
19596         (register_commands): Add command WKD_GET.
19597
19598         dirmngr: Use system provided root CAs with KS_FETCH.
19599         + commit c3aeda82b8d00b87a5af72b4075c487c10dfdf6b
19600         * dirmngr/ks-engine-http.c (ks_http_fetch): Use HTTP_FLAG_TRUST_SYS.
19601
19602 2016-04-26  Werner Koch  <wk@gnupg.org>
19603
19604         http: Allow to request system defined CAs for TLS.
19605         + commit fd765df6a7883c3d841abeb657330a1aab4b7756
19606         * dirmngr/http.h (HTTP_FLAG_TRUST_DEF, HTTP_FLAG_TRUST_SYS): New.
19607         * dirmngr/http.c (http_session_new): Add arg "flags".
19608         * dirmngr/ks-engine-hkp.c (send_request): Use new flag
19609         HTTP_FLAG_TRUST_DEF for the new arg of http_session_new.
19610         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
19611         * dirmngr/t-http.c (main): Ditto.
19612
19613 2016-04-25  Werner Koch  <wk@gnupg.org>
19614
19615         common: Minor fixes for the new private-keys.c.
19616         + commit b7fa4960c292ef1a290d32b7f46bb741bbfc0923
19617         * common/private-keys.c (my_error_from_syserror): New.  Use it in
19618         place of gpg_error_from_syserror.
19619         (_pkc_add, pkc_lookup, pke_next_value): Use ascii_strcasecmp.
19620         (pkc_parse): Use xtrystrdup and append_to_strlist_try as intended.
19621
19622         (_pkc_add): Add braces around if-statement.
19623
19624         common: Use new function to print a failure of xtrymalloc.
19625         + commit 8776abbe02935e720018f3ef6ffd48f21435ff8b
19626         * common/miscellaneous.c (xoutofcore): New.
19627         * common/strlist.c (append_to_strlist): Use instead of abort.
19628         (append_to_strlist_try): Use xtrymalloc instead of xmalloc.
19629
19630 2016-04-21  Justus Winter  <justus@g10code.com>
19631
19632         common: Add support for the new extended private key format.
19633         + commit 12af2630cf4d1a39179179925fac8f2cce7504ff
19634         * agent/findkey.c (write_extended_private_key): New function.
19635         (agent_write_private_key): Detect if an existing file is in extended
19636         format and update the key within if it is.
19637         (read_key_file): Handle the new format.
19638         * agent/keyformat.txt: Document the new format.
19639         * common/Makefile.am: Add the new files.
19640         * common/private-keys.c: New file.
19641         * common/private-keys.h: Likewise.
19642         * common/t-private-keys.c: Likewise.
19643         * common/util.h (alphap, alnump): New macros.
19644         * tests/migrations: Add test demonstrating that we can cope with the
19645         new format.
19646
19647         common: Add 'free_strlist_wipe' which wipes memory.
19648         + commit c6d1f2f08c68efe7e80887219064a8ce6365128f
19649         * common/strlist.c (free_strlist_wipe): New function.
19650         * common/strlist.h (free_strlist_wipe): New prototype.
19651
19652         common: Add 'append_to_strlist_try' which can fail.
19653         + commit 95303ee11df12f284e98d02dba993eda9e425383
19654         * common/strlist.c (append_to_strlist): Use the new function.
19655         (append_to_strlist_try): New function.
19656         * common/strlist.h (append_to_strlist_try): New prototype.
19657
19658         agent: Convert key format document to org.
19659         + commit 342cc488890241b41e49f50886617115342721d6
19660         * agent/keyformat.txt: Convert to org mode.
19661
19662         tests: Make migration test more robust and silent.
19663         + commit 0c35e09278514f1e3377a4b0a9b1f44dd39b1bf4
19664         * tests/migrations/from-classic.test: Fix in-tree build, silence test.
19665
19666 2016-04-21  Werner Koch  <wk@gnupg.org>
19667
19668         w32: Use --enable-gpg2-is-gpg by default.
19669         + commit d81de224ecd542922dda649a492dd9550509d7bc
19670         * autogen.rc: Add option also for plain Windows.
19671
19672         w32: Replace libiconv DLL by iconv feature of libgpg-error.
19673         + commit bd4d65615b3a5360d455b99e77bd113ad90f1539
19674         * configure.ac: Do nor require libiconv for W32.
19675         * common/utf8conv.c [W32]: Do not incluce iconv.h.  Request
19676         libgpg-error iconv macros.
19677         (jnlib_iconv): Use ICONV_CONST macro.
19678         * build-aux/speedo/w32/inst.nsi [!WITH_GUI]: Do not install libiconv.
19679         * build-aux/speedo.mk (speedo_spkgs) [!WITH_GUI]: Likewise.
19680
19681 2016-04-20  Justus Winter  <justus@g10code.com>
19682
19683         agent: Sanitize permissions of the private key directory.
19684         + commit f8adf1a3234655877a4f985d627d98567507002c
19685         * agent/gpg-agent.c (create_private_keys_directory): Set permissions.
19686         * common/sysutils.c (modestr_to_mode): New function.
19687         (gnupg_mkdir): Use new function.
19688         (gnupg_chmod): New function.
19689         * common/sysutils.h (gnupg_chmod): New prototype.
19690         * tests/migrations/from-classic.test: Test migration with existing
19691         directory.
19692
19693         tests: Test the migration from a classic GnuPG home directory.
19694         + commit defbc70b4a16264e067daf76678ecfb9d030dee4
19695         * configure.ac: Add new directory.
19696         * tests/Makefile.am (SUBDIRS): Likewise.
19697         * tests/migrations/Makefile.am: New file.
19698         * tests/migrations/from-classic.gpghome/pubring.gpg.asc: Likewise.
19699         * tests/migrations/from-classic.gpghome/secring.gpg.asc: Likewise.
19700         * tests/migrations/from-classic.gpghome/trustdb.gpg.asc: Likewise.
19701         * tests/migrations/from-classic.test: Likewise.
19702
19703 2016-04-20  Werner Koch  <wk@gnupg.org>
19704
19705         speedo: Use swdb.lst to define the SQLite version.
19706         + commit 2385b9f1ddc4938e45c01a12a804f4b77d253305
19707         * build-aux/speedo.mk: Change sqlite to use our mirror and the
19708         swdb.lst file.
19709         * build-aux/speedo/w32/inst.nsi: gpg is now build and installed as
19710         gpg.
19711
19712 2016-04-19  Werner Koch  <wk@gnupg.org>
19713
19714         gpg: Improve UID selction of --quick-sign-key.
19715         + commit d02de6c0a4a55a2720cfa5caddcbfc4ce988a2ec
19716         * g10/keyedit.c (keyedit_quick_sign): Improve UID selection and print
19717         error for non-found userids.
19718
19719         gpg: Avoid debug like output at start of --edit-key.
19720         + commit 085b19fc9aa7f2f9b82a97824b117e71390964ec
19721         * g10/keyedit.c (check_all_keysigs): Print info only after something
19722         has been modified.
19723
19724 2016-04-15  Andre Heinecke  <aheinecke@intevation.de>
19725
19726         dirmngr: Fix https never reported in general help.
19727         + commit 6272f24312f2efe8707a7712858c85cd5a42e6fa
19728         * dirmngr/ks-engine-http.c (ks_hkp_help): Also print https
19729         when supported and no uri provided.
19730
19731         dirmngr: Fix https incorrectly reported in help.
19732         + commit a0642856b25622c81d3464979c47ff2a30af58fa
19733         * dirmngr/ks-engine-http.c (ks_hkp_help): Only print https if tls
19734         is supported.
19735
19736 2016-04-14  Werner Koch  <wk@gnupg.org>
19737
19738         agent: Fix regression due to recent commit 4159567.
19739         + commit 8c3fb2360f154a971d2a390e4937acb22a44a8c2
19740         * agent/protect.c (do_encryption): Fix CBC hashing.
19741
19742         agent: Allow gpg-protect-tool to handle openpgp-native protection.
19743         + commit 6df75ec70afeb1a5ad9a00557e1245e1514c37b5
19744         * agent/protect-tool.c (read_and_unprotect): Add arg ctrl and pass to
19745         agent_unprotect.
19746         (main): Allocate a simple CTRL object and pass it to
19747         read_and_unprotect.
19748         (convert_from_openpgp_native): Remove stub.
19749         (agent_key_available, agent_get_cache): New stubs.
19750         (agent_askpin): New emulation for the one in call-pinentry.c.
19751         (agent_write_private_key): New to dump key.
19752         * agent/Makefile.am (gpg_protect_tool_SOURCES): Add cvt-openpgp.c
19753
19754         tests: Set fake-pinentry's stdout and stdin to _IOLBF.
19755         + commit 94504b3d5af126abb591dedda1ca0f0970822f55
19756         * tests/openpgp/fake-pinentry.c (main): Call setvbuf.  Show passphrase
19757         at startup.  Increase buffer.
19758
19759 2016-04-12  Werner Koch  <wk@gnupg.org>
19760
19761         agent: Implement new protection mode openpgp-s2k3-ocb-aes.
19762         + commit 4159567f7ed7a1139fdc3a6c92988e1648ad84ab
19763         * agent/protect.c (agent_protect): Add arg use_ocb.  Change all caller
19764         to pass -1 for default.
19765         * agent/protect-tool.c: New option --debug-use-ocb.
19766         (oDebugUseOCB): New.
19767         (opt_debug_use_ocb): New.
19768         (main): Set option.
19769         (read_and_protect): Implement option.
19770
19771         * agent/protect.c (OCB_MODE_SUPPORTED): New macro.
19772         (PROT_DEFAULT_TO_OCB): New macro.
19773         (do_encryption): Add args use_ocb, hashbegin, hashlen, timestamp_exp,
19774         and timestamp_exp_len.  Implement OCB.
19775         (agent_protect): Change to support OCB.
19776         (do_decryption): Add new args is_ocb, aadhole_begin, and aadhole_len.
19777         Implement OCB.
19778         (merge_lists): Allow NULL for sha1hash.
19779         (agent_unprotect): Change to support OCB.
19780         (agent_private_key_type): Remove debug output.
19781
19782         indent: Help Emacs not to get confused by conditional compilation.
19783         + commit 7faf131c8b8710419df3dc13a1228d1977c55f53
19784         * agent/protect.c (calibrate_get_time) [W32]: Use separate function
19785         calls for W32 and W32CE.
19786
19787 2016-04-07  Justus Winter  <justus@g10code.com>
19788
19789         g10: Fix exporting secret keys of certain sizes.
19790         + commit 02cf1357dd5ee34a57371f55b9d312b8b9e3a7e8
19791         * g10/build-packet.c (do_key): Do not use the header length specified
19792         by the public key packet from the keyring, but let 'write_header2'
19793         compute the required length.
19794
19795 2016-04-06  Justus Winter  <justus@g10code.com>
19796
19797         Revert "g10: Support armored keyrings in gpgv."
19798         + commit 76ca869197e304daa5a8dd96ea43113ec7b28354
19799         This reverts commit abb352de51bc964c06007fce43ed6f6caea87c15.
19800
19801 2016-04-05  Justus Winter  <justus@g10code.com>
19802
19803         dirmngr: Autodetect PEM format in dirmngr-client.
19804         + commit 9354293b8c9f234939bc04182f15e2fe512e914e
19805         * dirmngr/dirmngr-client.c (init_asctobin): New function.
19806         (main): Move the initialization code to the new function.
19807         (read_pem_certificate): Initialize base64 table.
19808         (read_certificate): Try to decode certificates given in files as PEM
19809         first.
19810
19811 2016-04-05  Werner Koch  <wk@gnupg.org>
19812
19813         build: Fix for: Build gpgcompose only in maintainer mode.
19814         + commit f45ed07a0fffa3adbc75b9d5726108a066927599
19815         * g10/Makefile.am (noinst_PROGRAMS): Always add module_tests.
19816
19817         doc: Install gpg and gpgv man pages under the correct name.
19818         + commit 4dc4fb1c14b3096bb1cdc5923c0d1eb419036805
19819         * doc/mkdefsinc.c (main): Add double include guard.  Set variable
19820         gpgtwohack. Define macros gpgname and gpgvname.
19821         * doc/gpg.texi: Remove macro definition for gpgname.  Use Texinfo var
19822         gpgtwohack to prepare the man pages.  Use @gpgname everywhere.
19823         * doc/gpgv.texi: Likewise.
19824         * doc/Makefile.am (myman_pages): Remove gpg2.1 and gpgv2.1 but add
19825         them depending on USE_GPG2_HACK.
19826
19827         build: Build gpgcompose only in maintainer mode.
19828         + commit 4b5341dc333983a15f649601fdddc42ba9161433
19829         * g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose only in maintainer
19830         mode.
19831
19832         gpg: Replace use of "gpg2" by GPG_NAME.
19833         + commit 7b58a1118d98543ed6854447d7b403877638ba54
19834
19835
19836 2016-04-04  Werner Koch  <wk@gnupg.org>
19837
19838         Now build "gpg" binary but install as "gpg2"
19839         + commit 96bcd4220f1f1313afe12097d8dc62342ac8de0d
19840         * configure.ac (USE_GPG2_HACK): New ac_define am_conditional.
19841         * common/homedir.c (gnupg_module_name): Replace use of macro
19842         NAME_OF_INSTALLED_GPG.
19843         * g10/keygen.c (generate_keypair): Ditto.
19844         * g10/Makefile.am (bin_PROGRAMS): Remove.
19845         (noinst_PROGRAMS): Add gpg or gpg2 and gpgv or gpg2.
19846         (gpg2_hack_list): New.
19847         (use_gpg2_hack): New.
19848         (gpg2_SOURCES): Rename to gpg_SOURCES.
19849         (gpgv2_SOURCES): Rename to gpgv_SOURCES.
19850         (gpg2_LDADD): Rename to gpg_LDADD.
19851         (gpgv2_LDADD): Rename to gpgv_LDADD.
19852         (gpg2_LDFLAGS): Rename to gpg_LDFLAGS.
19853         (gpgv2_LDFLAGS): Rename to gpgv2_LDFLAGS.
19854         (install-exec-hook): Remove WinCE specific rules and add new rules.
19855         (uninstall-local): Uninstall gpg/gpg2 and gpgv/gpgv2.
19856         * tests/openpgp/Makefile.am (required_pgms): s/gpg2/gpg/.
19857         * tests/openpgp/defs.inc: Ditto.
19858         * tests/openpgp/gpgtar.test: Ditto.
19859         * tests/openpgp/mkdemodirs: Ditto.
19860         * tests/openpgp/signdemokey: Ditto.
19861
19862         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Remove obsolete
19863         --enable-mailto, add --enable-gpg2-is-gpg.
19864
19865         tests: Add missing file.
19866         + commit c6ed863491ec3a1e0fcf9cbe2c93c87468306c29
19867         * tests/openpgp/Makefile.am (TEST_FILES): Add plain-largeo.asc.
19868
19869 2016-04-04  Justus Winter  <justus@g10code.com>
19870
19871         g10: Support armored keyrings in gpgv.
19872         + commit abb352de51bc964c06007fce43ed6f6caea87c15
19873         * doc/gpgv.texi: Document the feature.
19874         * g10/Makefile.am (gpgv2_SOURCES): Add dearmor.c.
19875         * g10/dearmor.c (dearmor_file): Add sink argument.
19876         * g10/gpg.c (main): Adapt accordingly.
19877         * g10/gpgv.c (make_temp_dir): New function.
19878         (main): De-armor keyrings.
19879         * g10/main.h (dearmor_file): Adapt prototype.
19880
19881         tests: Fix default key test.
19882         + commit dd5902cc45bae7582f8a0bc91a0a7f4d8ae45d8c
19883         * tests/openpgp/default-key.test: Avoid using the option
19884         '--trust-model' unconditionally.
19885
19886 2016-04-01  Justus Winter  <justus@g10code.com>
19887
19888         build: Check for conflicting trust model options.
19889         + commit 6060ea898fda499211c9d5030fff41d58f899fb0
19890         * configure.ac: Disable TOFU if configured without trust models, and
19891         check for conflicting options.
19892
19893         g10: Remove option --always-trust if compiled without trust models.
19894         + commit b74185b6eaeaae4754726ff203e11977777f568c
19895         * g10/gpg.c (opts): Remove option --always-trust if compiled without
19896         trust models.
19897
19898 2016-03-31  Justus Winter  <justus@g10code.com>
19899
19900         speedo,w32: Build libsqlite3.
19901         + commit e7171f559590422cc52dbcb8d78d94569b31012f
19902         * build-aux/speedo.mk (speedo_spkgs): Add libsqlite3 on w32.
19903         (libsqlite3_ver): New variable.
19904         (speedo_pkg_libsqlite3_tar): Likewise.
19905
19906         g10: Use gpg-error abstraction of sched_yield.
19907         + commit 8be9dab2dd2f83ca922c01542c63b404e34bdfd9
19908         * g10/tofu.c (begin_transaction): Use 'gpgrt_yield'.
19909
19910 2016-03-29  Werner Koch  <wk@gnupg.org>
19911
19912         gpg: Fix NULL-segv for missing tofu DB.
19913         + commit e2c5781788f765815532410a77077ddbb72513e9
19914         * g10/tofu.c (opendb): Guard call to timeout function.
19915
19916 2016-03-22  Werner Koch  <wk@gnupg.org>
19917
19918         gpg: Improve message when asking for key capabilities.
19919         + commit fc30c079a348436868968850dabf653b91f82419
19920         * g10/keygen.c (ask_key_flags): Improve message.
19921
19922         gpg: Remove the extra prompt for Curve25519.
19923         + commit 7f919063d3e426104fe58ae779a9a066140014c1
19924         * g10/keygen.c (MY_USE_ECDSADH): New macro local to ask_curve.
19925         (ask_curve): Use a fixed table of curve names and reserve a slot for
19926         Curve448.  Simplify CurveNNNN/EdNNNN switching.
19927         (ask_curve): Remove the Curve25519 is non-standard prompt.
19928
19929 2016-03-19  Werner Koch  <wk@gnupg.org>
19930
19931         gpg: Silence trustdb computation with --quiet.
19932         + commit af9a4afbf0b518c8acff98e50135b2beb6c722c3
19933         * g10/trustdb.c (validate_keys): Do not print log_info stuff in quiet
19934         mode.
19935
19936 2016-03-17  Werner Koch  <wk@gnupg.org>
19937
19938         sm: Always create a keybox header when creating a new keybox.
19939         + commit 1aad5c6277ea3852ff57bbf680f61c9136ce4d5c
19940         * sm/keydb.c (maybe_create_keybox): Create the header blob.
19941
19942 2016-03-17  Neal H. Walfield  <neal@g10code.com>
19943
19944         doc: Improve documentation of --enable-large-rsa.
19945         + commit 1dc7f55a4095ee42ce2d8c3eb41b7162edf2ca2e
19946         * doc/gpg.texi (--enable-large-rsa): Improve text.
19947
19948 2016-03-17  NIIBE Yutaka  <gniibe@fsij.org>
19949
19950         agent: allow removal of the shadowed key.
19951         + commit 8588c2dbc4c4d1b53796f3dbe8489b932dca7a60
19952         * agent/findkey.c (agent_delete_key): Remove the key when asked.
19953
19954 2016-03-16  NIIBE Yutaka  <gniibe@fsij.org>
19955
19956         g10: Add const qualifier.
19957         + commit b752d2c93778e6a1c1de3eddf8fc725b0ddd354e
19958         * g10/gpgcompose.c (show_help): Those are strings not to be modified.
19959
19960 2016-03-15  Werner Koch  <wk@gnupg.org>
19961
19962         gpg: Do not rely on a certain evaluation order.
19963         + commit 60b34f96f4f390670462d719c0d797e622cee4d4
19964         * g10/keyedit.c (print_and_check_one_sig): Call check_key_signature
19965         before derefing IS_SELFSIG.
19966
19967 2016-03-14  Werner Koch  <wk@gnupg.org>
19968
19969         scd: Add manufacturer id 0x000a.
19970         + commit 834b84c0ee4990393daa5e44afbab5b0aaed0758
19971         * g10/card-util.c (get_manufacturer): Add it.
19972
19973 2016-03-10  Kevin J. McCarthy  <kevin@8t8.us>
19974
19975         g10: Silence message if --quiet is given.
19976         + commit 4f578cb2fc192f44070bb0d18dffaa3863ed0d92
19977         * g10/getkey.c (parse_def_secret_key): Silence message if --quiet is
19978         given.
19979
19980 2016-03-08  Neal H. Walfield  <neal@g10code.com>
19981
19982         gpg: Add a new test.
19983         + commit b17577eac6b7599a4bab6fd3ecb04715aa01367c
19984         * g10/Makefile.am (EXTRA_DIST): Add t-stutter-data.asc.
19985         (module_tests): Add t-stutter.
19986         (t_stutter_SOURCES): New variable.
19987         (t_stutter_LDADD): New variable.
19988
19989 2016-03-07  Justus Winter  <justus@g10code.com>
19990
19991         sm: Implement pinentry loopback and reading passphrases from fd.
19992         + commit eea139c56ef55081d8cd8df2a35ce507386e0f17
19993         * doc/gpgsm.texi: Document '--pinentry-mode' and '--passphrase-fd'.
19994         * sm/Makefile.am (gpgsm_SOURCES): Add new files
19995         * sm/call-agent.c (struct default_inq_parm_s): New definition.
19996         (start_agent): Pass in the pinentry mode.
19997         (default_inq_cb): Handle 'PASSPHRASE' and 'NEW_PASSPHRASE' inquiries.
19998         Adapt all call sites to the new callback cookie.
19999         * sm/gpgsm.c (cmd_and_opt_values): Add new values.
20000         (opts): Add new options.
20001         (main): Handle new options.
20002         * sm/gpgsm.h (struct opt): Add field 'pinentry_mode'.
20003         * sm/passphrase.c: New file.
20004         * sm/passphrase.h: Likewise.
20005
20006         sm: Remove unused argument '--fixed-passphrase'.
20007         + commit 53ed98eda77ff2dcf390cebd0cec9f2665661863
20008         * doc/gpgsm.texi: Drop description.
20009         * sm/gpgsm.c (cmd_and_opt_values): Drop enum value.
20010         (opts): Drop argument.
20011         (main): Drop argument handling.
20012         * sm/gpgsm.h (struct opt): Drop field 'fixed_passphrase'.
20013
20014         kbx: Avoid undefined behavior.
20015         + commit a68ca5a90457ac97eee4efd7fdea596d27c54697
20016         * kbx/keybox-file.c (_keybox_read_blob2): Cast to unsigned int before
20017         shifting.
20018
20019 2016-03-07  NIIBE Yutaka  <gniibe@fsij.org>
20020
20021         scd: Bug fix for a device with multiple interfaces.
20022         + commit 7a32f87cccddb40521bfdd4eb2d0dc9c88fb3fe5
20023         * scd/ccid-driver.c (scan_or_find_usb_device): Use IFC_NO when
20024         accessing interface information.
20025
20026 2016-03-04  Justus Winter  <justus@g10code.com>
20027
20028         build: Make libusb a hard requirement if the ccid driver is requested.
20029         + commit e997552161b2dd8aabf350adee14e208e1545aef
20030         * configure.ac: Print an error message and die if the internal ccid
20031         driver is requested but no suitable libusb is found.
20032
20033         g10: Drop superfluous declaration.
20034         + commit 1e4b7823008daea1a22a6f0f9b379fdec37a4cd4
20035         * g10/main.h (disable_core_dumps): Drop declaration.
20036
20037         g10: Guard code against errors.
20038         + commit 40f6529ceeea806fc011135a9fa3a3590a9534ac
20039         * g10/keygen.c (do_generate_keypair): Check for errors, in which case
20040         'pri_psk' is NULL.
20041
20042 2016-03-03  Justus Winter  <justus@g10code.com>
20043
20044         dirmngr: Add more missing CFLAGS.
20045         + commit 9f0ba5089e664447c36cee3d9249f95e4ea39957
20046         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
20047         'GCRYPT_CFLAGS'.
20048         (t_dns_stuff_CFLAGS): Likewise.
20049
20050         tests/openpgp: Skip gpgtar test if it has not been built.
20051         + commit a883d4c0f8125e809c144ec69e76c9f522102d8f
20052         * tests/openpgp/gpgtar.test: Check if executable exists.
20053
20054 2016-03-02  Neal H. Walfield  <neal@g10code.com>
20055
20056         gpg: Add new program gpgcompose.
20057         + commit d040628ddf2c09ddc9581ff365680a568ad24278
20058         * g10/packet.h: Include "util.h".
20059         * g10/encrypt.c (encrypt_seskey): Don't mark as static.
20060         * g10/gpgcompose.c: New file.
20061         * g10/Makefile.am (noinst_PROGRAMS): Add gpgcompose.
20062         (gpg2_SOURCES): Split everything but gpg.c into...
20063         (gpg_sources): ... this new variable.
20064         (gpgcompose_SOURCES): New variable.
20065         (gpgcompose_LDADD): Likewise.
20066         (gpgcompose_LDFLAGS): Likewise.
20067
20068         gpg: More robustly detect valid non-armored OpenPGP messages.
20069         + commit 605276ef8cd449bfd574ae6c498fa5d7d265c5c7
20070         * g10/armor.c (is_armored): More robustly detect valid non-armored
20071         OpenPGP messages.
20072
20073         common: Provide a function for mapping packet types to strings.
20074         + commit 24e0f1d56e6f56e7fb52b5c6bdb100131e12dfe3
20075         * common/openpgpdefs.h (pkttype_str): New function.
20076
20077         gpg: Rename pop_filter to iobuf_pop_filter and export it.
20078         + commit 1463f9b9624fae97cc89df3aa4546655ee893f7c
20079         * common/iobuf.c (pop_filter): Rename from this...
20080         (iobuf_pop_filter): ... to this.  Don't mark it as static.
20081
20082         gpg: Split write_pubkey_enc_from_list.
20083         + commit 7eac4942b537c4b3710d34e6adb9c5d36338f38b
20084         * g10/encrypt.c (write_pubkey_enc_from_list): Split the body of this
20085         function out into...
20086         (write_pubkey_enc): ... this new function.
20087
20088         gpg: Allow the caller to write the contents of a plaintext packet.
20089         + commit 2fdb950471bd36f046672254ff26ca94797cc9f1
20090         * g10/build-packet.c (do_plaintext): Change the semantics such that if
20091         PT->BUF is NULL, it is the caller's responsibility to write the
20092         content (and disable partial body length mode, if appropriate).
20093
20094         gpg: Add a new function for creating binary notations.
20095         + commit 1a624586149f9e34206e5d5e1ba0b7d2b7004c80
20096         * g10/build-packet.c (blob_to_notation): New function.
20097
20098         gpg: Refactor the printing of binary notations.
20099         + commit fd2d00ccf558b1ac1184967d8702ef01cd60bf60
20100         * g10/build-packet.c (sig_to_notation): Break printing of binary
20101         notations into...
20102         (notation_value_to_human_readable_string): ... this new function.
20103         Provide a small preview of the binary data substituting non-printable
20104         characters with '?'.
20105
20106 2016-03-02  Uldis Anšmits  <uldis.ansmits@tieto.com>
20107
20108         tests/openpgp: Make tests more portable.
20109         + commit 1cdb744d91ab33563fc0b3156fb05694caa55278
20110         * tests/openpgp/default-key.test: Avoid 'grep -q'.
20111         * tests/openpgp/gpgtar.test: Avoid 'grep -qe' and 'diff -q'.
20112         * tests/openpgp/use-exact-key.test: Avoid 'grep -q'.
20113
20114 2016-03-02  Justus Winter  <justus@g10code.com>
20115
20116         common: Consolidate Assuan server argument handling.
20117         + commit e77c85577d1bdd77ad3b81907145fd68f2653c01
20118         * common/Makefile.am (common_sources): Add new files.
20119         * common/server-help.c: New file.
20120         * common/server-help.h: Likewise.
20121         * agent/command.c: Drop argument handling primitives in favor of using
20122         the consolidated ones.
20123         * dirmngr/server.c: Likewise.
20124         * g10/server.c: Likewise.
20125         * g13/server.c: Likewise.
20126         * scd/command.c: Likewise.
20127         * sm/server.c: Likewise.
20128
20129 2016-03-01  Justus Winter  <justus@g10code.com>
20130
20131         dirmngr: Add missing CFLAGS.
20132         + commit 9a1778abcae0a7afe33be8e02b6d9a909463cd54
20133         * dirmngr/Makefile.am (t_ldap_parse_uri_CFLAGS): Add
20134         'GPG_ERROR_CFLAGS'.
20135         (t_dns_stuff_CFLAGS): Likewise.
20136
20137         tools: Drop superfluous include.
20138         + commit 3a1d142f9b71721a631cf2037665e9def60aa384
20139         * tools/gpgtar.c: Do not include unused 'npth.h'.
20140
20141 2016-02-26  Werner Koch  <wk@gnupg.org>
20142
20143         gpg: Prettify a 2 octet hex output.
20144         + commit 2de0d41219a522e01f050d475b3ddecb9173fc7d
20145         * g10/sig-check.c (check_key_signature2): Wrap line and use %02x.
20146
20147 2016-02-25  Neal H. Walfield  <neal@g10code.com>
20148
20149         gpg: Show debugging info if a sig with an unsupported sig class is used.
20150         + commit 87515e39295e4b7eaec1641c38e1ac32e8d39a91
20151         * g10/sig-check.c (check_key_signature2): If SIG->CLASS is
20152         unsupported, show some debugging information.  Don't use BUG to fail.
20153         Just return GPG_ERR_BAD_SIGNATURE.
20154
20155         gpg: More carefully encode a packet's length.
20156         + commit 960f5e26f2cda3ac6e6b30548fa808a690c39ffc
20157         * g10/build-packet.c (write_header2): Make sure the length bits are
20158         cleared.  Fail if HDRLEN is set and the specified length can't be
20159         encoded in the available space.
20160
20161         gpg: Avoid directly twiddling bits.
20162         + commit 105a5629c7e938ec7b3c9c338ebe7bdfee4cfdad
20163         * g10/build-packet.c (do_plaintext): Use ctb_new_format_p to check the
20164         packet's format.
20165         (write_header2): Likewise.
20166
20167         gpg: Add some asserts.
20168         + commit c9636a1acc952eb8e1355089bc2e229dece98165
20169         * g10/build-packet.c (ctb_new_format_p): New function.
20170         (ctb_pkttype): New function.
20171         (do_user_id): Add some asserts.
20172         (do_key): Likewise.
20173         (do_symkey_enc): Likewise.
20174         (do_pubkey_enc): Likewise.
20175         (do_plaintext): Likewise.
20176         (do_encrypted): Likewise.
20177         (do_encrypted_mdc): Likewise.
20178         (do_compressed): Likewise.
20179         (do_signature): Likewise.
20180         (do_signature): Likewise.
20181         (write_header2): Likewise.
20182
20183         gpg: Avoid an unnecessary copy.
20184         + commit 512bc72e1f8544341529174142273d857f45540c
20185         * g10/build-packet.c (sig_to_notation): Avoid an unnecessary copy of
20186         the data: the size of the packet is fixed.
20187
20188 2016-02-23  Neal H. Walfield  <neal@g10code.com>
20189
20190         common: Reduce buffer size.
20191         + commit 75861b663bbb37214143c2ff7b1b4d1d10ba2657
20192         * common/iobuf.c (iobuf_copy): Change buffer size from 1 MB to 32 KB.
20193
20194         common: Improve a function's documentation and comments.
20195         + commit 14d27b2cadf9b0bb413f2b8bad2d81c1d370c2e7
20196         * common/iobuf.c (iobuf_set_partial_body_length_mode): Fix
20197         documentation and comment.  Add an assert.
20198
20199         common: Add log_assert.
20200         + commit f57a91afb69c58f9d8d9632801650f28c7dc1e0d
20201         * common/logging.h (log_assert): New macro.
20202
20203         gpg: Use higher-level functions.
20204         + commit 33ac735a781325c4d47cdf6216813866ab93562e
20205         * g10/build-packet.c (do_symkey_enc): Use iobuf_write instead of
20206         iobuf_put in a loop.  Use iobuf_copy instead of iobuf_read and
20207         iobuf_write in a loop.  Move the memory wiping from here...
20208         * common/iobuf.c (iobuf_copy): ... to here.
20209
20210         common: Check for an error before reading.
20211         + commit 8066f8a3470f9d2f3682a28641a7b09eca29a105
20212         * common/iobuf.c (iobuf_copy): If DEST has a pending error, don't
20213         start copying.
20214
20215         common: More accurately name function.
20216         + commit 903466e124841cb29f518afa6b7706d490737ac3
20217         * common/iobuf.c (iobuf_set_partial_block_mode): Rename from this...
20218         (iobuf_set_partial_body_length_mode): ... to this.  Update callers.
20219
20220 2016-02-23  Werner Koch  <wk@gnupg.org>
20221
20222         g13: Add commands --suspend and --remove.
20223         + commit f7968db30b0e0ccae038e354568accb0a05d877c
20224         * g13/g13.c (aSuspend, aResume): New.
20225         (opts): Add commands --suspend and --resume.
20226         (main): Implement dummy command aUmount.  Implement commands aResume
20227         and aSuspend.
20228         * g13/sh-cmd.c (cmd_suspend): New.
20229         (cmd_resume): New.
20230         (register_commands): Add commands RESUME and SUSPEND.
20231         * g13/server.c (cmd_suspend): New.
20232         (cmd_resume): New.
20233         (register_commands): Add commands RESUME and SUSPEND.
20234         * g13/be-dmcrypt.c (be_dmcrypt_suspend_container): New.
20235         (be_dmcrypt_resume_container): New.
20236         * g13/backend.c (be_suspend_container): New.
20237         (be_resume_container): New.
20238         * g13/suspend.c, g13/suspend.h: New.
20239         * g13/mount.c (parse_header, read_keyblob_prefix, read_keyblob)
20240         (decrypt_keyblob, g13_is_container): Move to ...
20241         * g13/keyblob.c: new file.
20242         (keyblob_read): Rename to g13_keyblob_read and make global.
20243         (keyblob_decrypt): Rename to g13_keyblob_decrypt and make global.
20244         * g13/sh-dmcrypt.c (check_blockdev): Add arg expect_busy.
20245         (sh_dmcrypt_suspend_container): New.
20246         (sh_dmcrypt_resume_container): New.
20247         * g13/call-syshelp.c (call_syshelp_run_suspend): New.
20248         (call_syshelp_run_resume): New.
20249
20250         g13: Run mount after dmsetup.
20251         + commit f26867928c451443769fecc41c3283e077e8c49f
20252         * g13/g13-syshelp.c (main): Reject userids with a slash.
20253         * g13/sh-dmcrypt.c (sh_dmcrypt_mount_container): Run mount if a
20254         mountpoint is known.
20255
20256 2016-02-23  Justus Winter  <justus@g10code.com>
20257
20258         tests/openpgp: Qualify executables with extension.
20259         + commit ede0061febe5b2edde6a1a79d599e3c7c0faed5a
20260         * tests/openpgp/Makefile.am (required_pgms): Qualify executables with
20261         '$EXEEXT'.
20262
20263         tests/openpgp: Reimplement 'pinentry.sh' in c.
20264         + commit 01dcc2cf2f2f00235ffa7d0718ecb468370980cc
20265         * tests/openpgp/Makefile.am: Build new program.
20266         * tests/openpgp/defs.inc: Use the new program.
20267         * tests/openpgp/fake-pinentry.c: New file.
20268
20269         tests/openpgp: Avoid dependency on source files.
20270         + commit 785a7f463ec4e937304ce1263c5e6a46e8079137
20271         * tests/openpgp/plain-largeo.asc: New file.
20272         * tests/openpgp/version.test: Dearmor the new file instead of relying
20273         on the source being present.
20274
20275         tests/openpgp: Fix file removal.
20276         + commit 629284120ff359b98a178b6cddf0e005e5f4db1a
20277         * tests/openpgp/version.test: Fix file removal.
20278
20279         common/exechelp: Provide a way to wait for multiple processes.
20280         + commit 5ba4f6047b84e4cfdb3e6bc88e574ca7a455da81
20281         * common/exechelp-posix.c (gnupg_wait_process): Generalize to
20282         'gnupg_wait_processes'.
20283         * common/exechelp-w32.c (gnupg_wait_process): Likewise.
20284         * common/exechelp-w32ce.c (gnupg_wait_process): New function stub.
20285         * common/exechelp.h (gnupg_wait_process): New prototype.
20286
20287         common/exechelp: Add general pipe function.
20288         + commit 9f4a8d4ea173b4b4cb4d4f06b4004d43e2f4b97a
20289         * common/exechelp-posix.c (gnupg_create_pipe): New function.
20290         * common/exechelp-w32.c (INHERIT_{READ,WRITE,BOTH}): New macros.
20291         (create_inheritable_pipe): Generalize so that both ends can be
20292         inherited.
20293         (do_create_pipe): Rename argument accordingly.
20294         (gnupg_create_{in,out}bound_pipe): Use new flags.
20295         (gnupg_create_pipe): New function.
20296         (gnupg_spawn_process): Use new flags.
20297         * common/exechelp-w32ce.c (gnupg_create_pipe): New stub.
20298         * common/exechelp.h (gnupg_create_pipe): New prototype.
20299
20300         common/exechelp: Mute the Windows version.
20301         + commit 54acc87c1e0b100accbfd02cfce59a897f2f0ce1
20302         * common/exechelp-w32.c (gnupg_wait_process): Do not print an error if
20303         the exit code can be returned.  This makes the Windows version behave
20304         like the POSIX version.
20305
20306         common/exechelp: Avoid magic numbers.
20307         + commit 709e2a7e9a3197e8ded4be0b05c138e8d5adbca6
20308         * common/exechelp-w32.c (do_create_pipe): Use symbolic names.
20309
20310         common/exechelp: Disable debugging by default.
20311         + commit 5d8f7b16c8490d6951772fa98c1f075a952cc571
20312         * common/exechelp-w32.c (DEBUG_W32_SPAWN): Set to 0.
20313
20314         common/exechelp: Fix handle leak.
20315         + commit dd670366d7aedb07e9420d1f8575197acfae1914
20316         * common/exechelp-w32.c (gnupg_spawn_process_detached): Close process
20317         handle.
20318
20319         common/exechelp: Fix opening the 'nul' device.
20320         + commit 8857590006266da200427f2d4f9e8c27fbc89ed9
20321         * common/exechelp-w32.c (gnupg_spawn_process): Fix opening the 'nul'
20322         device.
20323
20324         common/exechelp: Fix error handling.
20325         + commit f5a4b6a3a39a2b78d33769184d6133d5e256e02c
20326         * common/exechelp-w32.c (gnupg_spawn_process): Close the right handle.
20327
20328         common/exechelp: Fix pipe creation.
20329         + commit b0125ae9850973b89010517b1dbce04125a51d51
20330         * common/exechelp-w32.c (gnupg_spawn_process): Fix the creation of the
20331         input pipe.
20332
20333         tools/mk-tdata: Fix data generation on Windows.
20334         + commit 661ba477e01b796db161fa612b46c353393c6b10
20335         * tools/mk-tdata.c (main): Set stdout to binary mode to avoid newline
20336         conversion.
20337
20338 2016-02-19  Neal H. Walfield  <neal@g10code.com>
20339
20340         gpg: Systematically detect and fix signatures that are out of order.
20341         + commit 2d1d795481bc011447284f8ce0a3ae96a08daf17
20342         * g10/keyedit.c (sig_comparison): New function.
20343         (fix_key_signature_order): Merge functionality into...
20344         (check_all_keysigs): ... this function.  Rewrite to eliminate
20345         duplicates and use a systematic approach to detecting and moving
20346         signatures that are out of order instead of a heuristic.
20347         (fix_keyblock): Don't call fix_key_signature_order.  Call
20348         check_all_keysigs instead after collapsing the uids.
20349
20350         gpg: Split check_key_signature2.
20351         + commit 44cdb9d73f1a0b7d2c8483a119b9c4d6caabc1ec
20352         * g10/sig-check.c (hash_uid_node): Rename from this...
20353         (hash_uid_packet): ... to this.  Take a PKT_user_id instead of a
20354         KBNODE.
20355         (check_key_signature2): Split the basic signature checking
20356         functionality into...
20357         (check_signature_over_key_or_uid): ... this new function.
20358
20359         gpg: Split print_and_check_one_sig.
20360         + commit 5fbd80579aea0f75ca1d2700515c5b8747a75c7d
20361         * g10/keyedit.c (print_and_check_one_sig): Split the print
20362         functionality into...
20363         (print_one_sig): ... this new function.
20364
20365         gpg: Split the function check_signature_end.
20366         + commit ac5aea95455372145f3f06df2b4c1584d759d660
20367         * g10/sig-check.c (check_signature_end): Break the basic signature
20368         check into...
20369         (check_signature_end_simple): ... this new function.
20370
20371         gpg: Use format_keyid rather than manually formatting the keyid.
20372         + commit 10671c3a4c18ea26035a5819a9f2b8fd6c7e41ea
20373         * g10/keyedit.c (menu_addrevoker): Use format_keyid rather than
20374         manually formatting the keyid.
20375         * g10/keygen.c (card_write_key_to_backup_file): Likewise.
20376
20377         gpg: Initialize the primary key when generating a key.
20378         + commit bf9d1248c80205795e26156f67aff0b3f796cfce
20379         * g10/keygen.c (do_generate_keypair): Initialize
20380         pri_psk->flags.primary, pri_psk->keyid and pri_psk->main_keyid.
20381
20382         gpg: Add accessor & utility functions for pk->keyid and pk->main_keyid.
20383         + commit c45633a571bf663bc7f3610fc481acded6acfc19
20384         * g10/keydb.h (keyid_cmp): New function.
20385         * g10/keyid.c (pk_keyid): New function.
20386         (pk_main_keyid): New function.
20387         (keyid_copy): New function.
20388         (pk_keyid_str): New function.
20389         * g10/packet.h (PKT_public_key): Update comments for main_keyid and
20390         keyid.
20391
20392 2016-02-18  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20393
20394         gpgparsemail: Allow weirdly-mixed pkcs7 signatures.
20395         + commit 7e7f35a2d7d40267a4dd30791df77420efeebfa7
20396         * tools/gpgparsemail.c: Add and check info->signing_protocol_2.
20397
20398         gpg: Clean up dangling agent_open and agent_closed declarations.
20399         + commit 813df2fe6656e55bea4d0be07cc964a140218412
20400         * g10/keydb.h: Remove agent_open, agent_close declarations/
20401         * g10/migrate.c: #include <unistd.h> for access()
20402
20403 2016-02-16  Werner Koch  <wk@gnupg.org>
20404
20405         w32: Make scdaemon build again due to libusb problem.
20406         + commit e1ceff16765b0342531709cf97d03ef0158c29d5
20407         * configure.ac: Add hack to disable libusb for Windows.  Also use
20408         $host instead of $target in the switch
20409          --
20410
20411         The new test for libusb does not support cross-compiling.  As a quick
20412         workaround we disable libusb for Windows because we can't use it anyway.
20413
20414         w32: Do not error out if gpgconf is not installed.
20415         + commit 44b02e1beb4f38f26551d932827d5317fddd27c2
20416         * common/homedir.c (check_portable_app): Remove error message.
20417
20418 2016-02-16  Neal H. Walfield  <neal@g10code.com>
20419
20420         gpg: Make ASCII armor decoding more robust to encoding errors.
20421         + commit 2f02ed75a9671a7aae36968d5a1618f71b491325
20422         * g10/armor.c (radix64_read): If the = is followed by the string "3D",
20423         check if the following four characters are valid radix 64 and are
20424         followed by a new line.  If so, warn and ignore the '3D'.
20425
20426 2016-02-16  Werner Koch  <wk@gnupg.org>
20427
20428         doc: Add a gnupg-module-overview picture.
20429         + commit a1c11283af759c1045a8bb75815db325f415ded4
20430         * doc/gnupg-module-overview.svg: New.
20431         * doc/debugging.texi (Component interaction): New.
20432         * doc/Makefile.am (EXTRA_DIST): Add PNG and PDF versions of
20433         gnupg-module-overview.svg.  Remove two eps files.
20434         (BUILT_SOURCES): Add gnupg-module-overview.pdf and .png.  Remove
20435         gnupg-card-architecture.epsl
20436         (gnupg_TEXINFOS): Add gnupg-module-overview.svg
20437         (gnupg.dvi): New.
20438         (DISTCLEANFILES): Remove build eps files.
20439
20440 2016-02-15  NIIBE Yutaka  <gniibe@fsij.org>
20441
20442         common, g10: Fix indentation to silence GCC-6.
20443         + commit ea9cfcfbf76de232221f31787c53d5f46361a9f0
20444         * common/iobuf.c (iobuf_ioctl): Fix.
20445         * g10/encrypt.c (encrypt_filter): Likewise.
20446         * g10/keyring.c (prepare_search): Likewise.
20447
20448         dirmngr: fix for memory alignment.
20449         + commit 6fbe12a51e8fe2649ffe5a8a02aa93026a8f02cd
20450         * dirmngr/dns-stuff.c (get_dns_cert): Cast through void *.
20451         (getsrv, get_dns_cname): Make sure it's aligned for HEADER.
20452
20453 2016-02-14  Werner Koch  <wk@gnupg.org>
20454
20455         gpg: Add hidden key-edit subcommand "change-usage".
20456         + commit 9b28b82e7c40d1eacc446d5932cd613c56378ed8
20457         * g10/keyedit.c (cmdCHANGEUSAGE): New.
20458         (cmds): Add command "change-usage".
20459         (keyedit_menu): Handle that command.
20460         (menu_changeusage): New.
20461         * g10/keygen.c (keygen_add_key_flags): New.
20462         (ask_key_flags): Add optional arg current.
20463
20464 2016-02-14  Neal H. Walfield  <neal@g10code.com>
20465
20466         gpg: Improve API documentation.
20467         + commit 9663b088480cef6734a3c5892d5ddbbd60ecc1a4
20468         * g10/seskey.c (make_session_key): Improve documentation.
20469         (encode_session_key): Improve documentation.
20470         * g10/encrypt.c (encrypt_seskey): Remove gratuitous initialization.
20471         * g10/dek.h (DEK): Improve documenation.
20472
20473         gpg: Fix calc_header_length when LEN is 0 and improve documentation.
20474         + commit 5cdde08ea869ef02111f618ad782d392a296eb7f
20475         * g10/build-packet.c (calc_header_length): Return the correct haeder
20476         size when LEN is 0.  Fix documentation.
20477
20478         gpg: Fix format_keyid when dynamically allocating the buffer.
20479         + commit c0268c449d0f3d23be5ec7b92fe92e7e078166cf
20480         * g10/keyid.c (format_keyid): Return a char *, not a const char *.  If
20481         BUFFER is NULL, then set LEN to the static buffer's size.
20482
20483         common: Fix comment.
20484         + commit ad43dc6cfc2b610a4e34fe55811bd937f9c3238b
20485         * common/iobuf.c (iobuf_flush_temp): Fix comment.
20486
20487 2016-02-13  Werner Koch  <wk@gnupg.org>
20488
20489         g13: Require a confirmation before g13 is used for DM-Crypt.
20490         + commit 86f3bb144ad75461eb9b7ac1e59046ac75efccac
20491         * g13/g13-syshelp.c (g13_syshelp_i_know_what_i_am_doing):
20492         * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Call it.
20493         (sh_dmcrypt_mount_container): Call it.
20494
20495         g13: Second chunk of code to support dm-crypt.
20496         + commit b0e6ab1109d05fc664f46e17d721fe9b01d38115
20497         * g13/be-dmcrypt.c, g13/be-dmcrypt.h: New.
20498         * g13/Makefile.am (g13_SOURCES): Add them.
20499         * g13/backend.c: Include be-dmcrypt.h and call-syshelp.h.
20500         (no_such_backend): Rename to _no_such_backend and provide replacement
20501         macro.
20502         (be_is_supported_conttype): Support DM-Crypt.
20503         (be_take_lock_for_create): Call set_segvice for DM-Crypt.
20504         (be_create_new_keys): Make it a dummy for DM-Crypt.
20505         (be_create_container): Call be_dmcrypt_create_container.
20506         (be_mount_container): call be_dmcrypt_mount_container.
20507         * g13/g13-syshelp.c (main): Enable verbose mode.
20508         * g13/g13tuple.c (get_tupledesc_data): New.
20509         * g13/g13tuple.h (unref_tupledesc): New.
20510         * g13/g13.h (server_control_): Add field "recipients".
20511         * g13/g13.c (main): Fix setting of recipients via cmdline.
20512         (g13_deinit_default_ctrl): Release recipients list.
20513         (g13_request_shutdown): New.  Replace all direct update of
20514         shutdown_pending by calls this function.
20515         * g13/server.c (server_local_s): Remove field recipients which is now
20516         part of CTRL.
20517         (reset_notify, cmd_recipient, cmd_create): Adjust for this change.
20518         * g13/create.c (encrypt_keyblob): Rename to g13_encrypt_keyblob.
20519         (g13_create_container): Support DM-Crypt.
20520         * g13/mount.c (parse_header): Allow for meta data copies.
20521         (g13_mount_container): Support DM-Crypt.
20522         * g13/sh-cmd.c (cmd_create): Make it work.
20523         (cmd_mount): New.
20524         * g13/sh-dmcrypt.c (sh_dmcrypt_create_container): Make it work.
20525         (sh_dmcrypt_mount_container): New.
20526
20527         g13: Improve dump_keyblob.
20528         + commit 13f745b50dc7031755faadb2d3476a6b6aafc739
20529         * g13/g13tuple.c: Include keyblob.h.
20530         (find_tuple_uint): Factor code out to ...
20531         (convert_uint): new.
20532         (all_printable): New.
20533         * g13/mount.c (dump_keyblob: Move and rename to ...
20534         * g13/g13tuple.c (dump_tupledesc): here.  Revamp and pretyy print uint
20535         values.
20536
20537         g13: Define 3 new tags.
20538         + commit 59fc3507d18072833559f227ecab8aa00cad9466
20539         * g13/keyblob.h (KEYBLOB_TAG_CONT_NSEC): New.
20540         (KEYBLOB_TAG_ENC_NSEC): New.
20541         (KEYBLOB_TAG_ENC_OFF): New.
20542
20543         g13: Rename utils.c to g13tuple.c.
20544         + commit 82d12156ef5f948d44934ed44d79d24cc9e94366
20545         * g13/utils.c: Rename to g13tuple.c.
20546         * g13/utils.h: Rename to g13tuple.h.  Change all users.
20547         * g13/Makefile.am: Adjust accordingly
20548
20549         g13: Add functions to handle uint in a keyblob.
20550         + commit 4f152f3276b6d40d2568a27e74903dd18b41d752
20551         * g13/utils.c (append_tuple_uint): New.
20552         (find_tuple_uint): New.
20553         * g13/t-utils.c: New.
20554         * g13/Makefile.am (noinst_PROGRAMS, TESTS): New.
20555         (module_tests, t_common_ldadd): New.
20556         (t_utils_SOURCES, t_utils_LDADD): New.
20557
20558         g13: Re-factor high level create code.
20559         + commit dc1dbc43a6bfb2f3e6a1cc2ca089e0318b3af0ed
20560         * g13/create.c (g13_create_container): Factor some code out to ...
20561         * g13/backend.c (be_take_lock_for_create): new.
20562
20563         g13: Return an error for non-existing device.
20564         + commit 3087197008d2b12bf9f0d7d1f2aca500db816e7c
20565         * g13/sh-cmd.c (cmd_device): Set ERR.
20566
20567         g13: Fix releasing of a syshelp context.
20568         + commit 6390beca54f55e8d36ff767b99ae9ff68b15f10e
20569         * g13/call-syshelp.c (call_syshelp_release): Allow a NULL arg.
20570
20571         g13: Switch over to common/exectool.c.
20572         + commit c5d7045dafcfb569c11c90c04ea7a75328c80084
20573         * g13/sh-exectool.c: Remove.  It has been replaced by common/exectool.c.
20574         * g13/Makefile.am (g13_syshelp_SOURCES): Remove sh-exectool.c
20575         * g13/sh-blockdev.c: Include exectool.h.  Change sh_exec_tool to
20576         gnupg_exec-tool.
20577         * g13/sh-dmcrypt.c: Ditto.
20578
20579         common: Make gnupg_exec_tool conform to spec.
20580         + commit d19d6e1856c9a1acbf48e8b2e39b3d9171aa9f7f
20581         * common/exectool.c (gnupg_exec_tool): Allocate extra byte.  Allow
20582         zero length read.  Append hidden byte.  Release memory on error.
20583
20584         g13: First chunk of code to support dm-crypt.
20585         + commit 81494fd30d3815502247a721f50d9eadf86a73fa
20586         * g13/call-syshelp.c, g13/call-syshelp.h: New.
20587         * g13/g13-syshelp.c, g13/g13-syshelp.h: New.
20588         * g13/sh-cmd.c: New.
20589         * g13/sh-blockdev.c: New.
20590         * g13/sh-exectool.c: New.
20591         * g13/sh-dmcrypt.c: New.
20592         * g13/Makefile.am (sbin_PROGRAMS): Add g13-syshelp.c
20593         (g13_syshelp_SOURCES): New.
20594         (g13_syshelp_LDADD): New.
20595
20596         * g13/g13.c (opts): Add option --type.
20597         (g13_deinit_default_ctrl): New.
20598         (main): Implement that option.  Call g13_deinit_default_ctrl.
20599         * g13/g13.h (struct call_syshelp_s): New declaration.
20600         (server_control_s): Add field syshelp_local.
20601         * g13/keyblob.h (KEYBLOB_TAG_CREATED): New.
20602         (KEYBLOB_TAG_ALGOSTR): New.
20603         (KEYBLOB_TAG_HDRCOPY): New.
20604         * g13/backend.c (be_parse_conttype_name): New.
20605         (be_get_detached_name): Add CONTTYPE_DM_CRYPT.
20606
20607         tests: Remove some harmless warnings in regression tests.
20608         + commit d711f5c7697cd4bc5dc6d9fd01706cabc771dad2
20609         * tests/openpgp/gpg-agent.conf.tmpl: Remove --use-standard-socket.
20610
20611 2016-02-12  Neal H. Walfield  <neal@g10code.com>
20612
20613         common: Change simple_query to ignore status messages.
20614         + commit acac103ba5772ae738ce5409d17feab80596cde6
20615         * common/simple-pwquery.c (simple_query): Ignore status messages.
20616
20617 2016-02-12  NIIBE Yutaka  <gniibe@fsij.org>
20618
20619         g10: Make sure to have the directory for trustdb.
20620         + commit d9f9b3be036747c9f55060aed47896f951bfb853
20621         * g10/tdbio.c (tdbio_set_dbname): Return earlier if !CREATE.  Check
20622         the directory and create it if none before calling take_write_lock.
20623
20624 2016-02-02  Neal H. Walfield  <neal@g10code.com>
20625
20626         doc: Note that rngd can also be used to quickly generate insecure keys.
20627         + commit 75311cfe18071b94c66121a9785b133b6df345a3
20628         * doc/gpg-agent.texi (Agent Options): Add comment to the description
20629         of --debug-quick-random that rngd can also be used to quickly generate
20630         key.
20631
20632 2016-01-27  Werner Koch  <wk@gnupg.org>
20633
20634         scd: Fix size_t/int mismatch in libusb.
20635         + commit 3d952a2fe5da9d84c20d3debdcc1e425b08781c6
20636         * scd/ccid-driver.c (bulk_in, abort_cmd, ccid_poll): Change msglen to
20637         int.
20638
20639         scd: Fix detection of libusb.
20640         + commit 1b90b52a56b4f808ad29a7ef79aeafc03c7424b4
20641         * configure.ac (HAVE_LIBUSB): Clear if no header file was found.
20642         (LIBUSB_LIBS): Ditto.
20643
20644         dirmngr: Build fix for FreeBSD (EAI macros)
20645         + commit 4d67144142f04184b835e50314eb21b882b9e00a
20646         * dirmngr/dns-stuff.c (map_eai_to_gpg_error): Map EAI_NODATA and
20647         EAI_ADDRFAMILY only if defined.
20648
20649 2016-01-27  NIIBE Yutaka  <gniibe@fsij.org>
20650
20651         scd: Migrate to new API of libusb 1.0.
20652         + commit d0d97089706286fafd3c8ff56f3b5bf7ac07c6e0
20653         * configure.ac (LIBUSB_CPPFLAGS): New.
20654         * scd/Makefile.am (AM_CPPFLAGS): Add LIBUSB_CPPFLAGS.
20655         * scd/ccid-driver.c: Use libusb 1.0 API.
20656
20657 2016-01-26  Werner Koch  <wk@gnupg.org>
20658
20659         Release 2.1.11.
20660         + commit e9e5e83ec14459c2fc9060c54fc8e7381b541acd
20661
20662
20663 2016-01-26  Andre Heinecke  <aheinecke@intevation.de>
20664
20665         gpgtar,w32: Fix gpgtar 8 bit encoding handling on W32.
20666         + commit 3e50236d4ecc3601b2641bf4273a0ff64bb5fdc4
20667         * common/utf8conv.c (wchar_to_utf8): Factor code out to ...
20668         (wchar_to_cp): new.
20669         (utf8_to_wchar): Factor code out to ...
20670         (cp_to_wchar): new.
20671         (wchar_to_native): New.
20672         (native_to_wchar): New.
20673         * tools/gpgtar-create.c (fillup_entry_w32): Use native_to_wchar.
20674         (scan_directory): Use wchar_to_native.
20675
20676 2016-01-26  NIIBE Yutaka  <gniibe@fsij.org>
20677
20678         g10: Fix segfault on unsupported curve.
20679         + commit b8bb16c6c08d3c2947f1ff67419b36eb203c5c1a
20680         * g10/call-agent.c (learn_status_cb): Don't use NULL for strcmp.
20681
20682         sm: small fix for GCC 6.
20683         + commit d33a34004bef028068538f099c32a0e292a004c3
20684         * sm/export.c (insert_duptable): Use unsigned 0.
20685
20686 2016-01-25  Werner Koch  <wk@gnupg.org>
20687             Daiki Ueno  <ueno@gnu.org>
20688
20689         gpg: Print PROGRESS status lines during key generation.
20690         + commit fbe1cf67aadc5a33cf815ddbcfc9669e43caa123
20691         * g10/call-agent.c (cache_nonce_status_cb): Rewrite by using
20692         has_leading_keyword.  Handle PROGRESS lines.
20693
20694 2016-01-25  Werner Koch  <wk@gnupg.org>
20695
20696         agent: Send PROGRESS status lines to the client.
20697         + commit ee87c653bf4b495714e8e6b024d0a8ace3a33452
20698         * agent/gpg-agent.c (struct progress_dispatch_s): New.
20699         (progress_dispatch_list): New.
20700         (main): Register libgcrypt pogress handler.
20701         (agent_libgcrypt_progress_cb): New.
20702         (agent_set_progress_cb): New.
20703         (unregister_progress_cb): New.
20704         (agent_deinit_default_ctrl): Call unregister.
20705         * agent/command.c (progress_cb): New.
20706         (start_command_handler): Register progress callback.
20707
20708         speedo: Allow use of SHA-256 checksums.
20709         + commit 039a55716b8abd22ce23a96dce34cf2dc4be1862
20710         * build-aux/getswdb.sh: Add option --find-sha256sum.
20711         * build-aux/speedo.mk (libgpg_error_sha2): New var.  Also for all
20712         other packages.
20713         (SHA2SUM): New.
20714         (SETVARS, SETVARS_W64): Prefer sha256sum over sha1sum.
20715         (installer-from-source): Create swdb fragment.
20716
20717 2016-01-22  Werner Koch  <wk@gnupg.org>
20718
20719         dirmngr: Indicate that serial numbers are hexadecimal.
20720         + commit 12c665b36cdc4b7189549698fc4cc1b3523b18f5
20721         * dirmngr/misc.c (hexify_data): Add arg with_prefix.  Adjust all
20722         callers.
20723         * dirmngr/crlcache.c (cache_isvalid): Print "0x" in front of the S/N.
20724
20725         dirmngr: Provide the keyserver pool name even if there is no CNAME.
20726         + commit 77bceb2902dd489443073d91836ea54376c60bf6
20727         * dirmngr/ks-engine-hkp.c (map_host): Fix setting of r_poolname.
20728
20729 2016-01-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
20730             wk@gnupg.org
20731
20732         dirmngr: Use sks-keyservers CA by default for the hkps pool.
20733         + commit afb8696126ff0babaab23e884ff5da008281e3b7
20734         * dirmngr/Makefile.am (dist_pkgdata_DATA): Add sks-keyservers.netCA.pem.
20735         * dirmngr/http.c (http_session_new): Add optional arg
20736         intended_hostname and set a default cert.
20737         * dirmngr/ks-engine-hkp.c (send_request): Pass httphost to
20738         http_session_new.
20739
20740 2016-01-22  Werner Koch  <wk@gnupg.org>
20741
20742         gpg: Allow new user ids with only the mail address.
20743         + commit fc0c71dfe5ea8f1c683101948c23f5d2064ee4cd
20744         * g10/keygen.c (ask_user_id): Allow empty name.
20745
20746 2016-01-21  Werner Koch  <wk@gnupg.org>
20747
20748         gpg: Improve header text of the auto-created revocations.
20749         + commit bb99b40bd1e624f58ca806ca16dc73d4d594a30a
20750         * g10/revoke.c (gen_standard_revoke): Improve header text for the
20751         file.  Add info output.
20752
20753         gpg: Make --auto-key-retrieve work with dirmngr configured server.
20754         + commit 09117e769a093467cb47154f36d7dda613313e33
20755         * g10/call-dirmngr.c (gpg_dirmngr_ks_list): Make R_KEYSERVER optional.
20756         * g10/keyserver.c (keyserver_any_configured): New.
20757         (keyserver_put): Remove arg keyserver because this will always receive
20758         opt.keyserver which is anyway used when connecting dirmngr.  Do not
20759         check opt.keyserver.
20760         (keyserver_import_cert): Replace opt.keyserver by
20761         keyserver_any_configured.
20762         * g10/mainproc.c (check_sig_and_print): Ditto.
20763         * g10/import.c (revocation_present): Ditto.
20764         * g10/getkey.c (get_pubkey_byname): Ditto.
20765         * g10/gpgv.c (keyserver_any_configured): Add stub.
20766         * g10/test-stubs.c (keyserver_any_configured): Add stub.
20767
20768 2016-01-20  Werner Koch  <wk@gnupg.org>
20769
20770         gpg: Silence message about ignoring revoked user ids.
20771         + commit bdb61351776c038d668310d9b5e5c32588ef6519
20772         * g10/trustdb.c (tdb_get_validity_core): Print message only in debug
20773         mode.
20774
20775         agent: New option --pinentry-timeout.
20776         + commit 499743387f4d07847a2842358bc54f9237e0c2a7
20777         * agent/gpg-agent.c (oPinentryTimeout): New.
20778         (opts): Add new option.
20779         (parse_rereadable_options): PArse that option.
20780         (main): Tell gpgconf about this option.
20781         * agent/call-pinentry.c (start_pinentry): Send option to Pinentry.
20782         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add Option.
20783
20784 2016-01-19  Werner Koch  <wk@gnupg.org>
20785
20786         gpg: Streamline use of error messages in tofu.c.
20787         + commit cfa41890bb5ff306c07dad295136601fe47566a7
20788         * g10/tofu.c: Make use of print_further_info to reduce the number of
20789         different error messages to be translated.  Also streamline some
20790         messages.
20791
20792         common: Add substitute code for libgpg-error < 1.22.
20793         + commit 8b7f64f9dfc80b2a0ad235996b47369c2ba9b48f
20794         * common/util.h (GPG_ERR_DB_CORRUPTED): New.
20795
20796         gpg: Add function print_further_info.
20797         + commit d96e76d15f61812b950b64a60bc47117785a9dac
20798         * g10/misc.c (print_further_info): New.
20799
20800 2016-01-18  Werner Koch  <wk@gnupg.org>
20801
20802         g10: Improve strings printed by tofu.c.
20803         + commit 79778a8dd5f61a6b7abeeb44b75d82932db788b7
20804         * g10/tofu.c: Include ttyio.h.  Change many strings to help
20805         translating.  Make use of ngettext wehere needed.
20806         (CONTROL_L): New.
20807         (TIME_AGO_UNIT_SMALL_NAME): Remove this and all similar *_NAME macros.
20808         (time_ago_unit): Remove.
20809         (get_trust): Use tty_prints and cpr_get only for the actual prompt.
20810         Add Ctrl-L hack.
20811         (show_statistics): Use two English strings for singular and plural.
20812
20813         * po/POTFILES.in: Add tofu.c.
20814
20815         gpg: Use "days" in "...newer than..." diagnostics.
20816         + commit 9309bda9581715d304305c8c5116f2cbb31aec77
20817         * g10/sig-check.c (check_signature_metadata_validity): Use days if
20818         useful.
20819
20820         Use ngettext for some strings.
20821         + commit 437965e5622612941ed0fa55584811c65069242e
20822         * scd/app-openpgp.c (build_enter_admin_pin_prompt): Use ngettext for
20823         some diagnostics.
20824         (do_genkey): Ditto.
20825         * g10/keyedit.c (check_all_keysigs, menu_delsig, menu_clean): Ditto.
20826         * g10/keylist.c (print_signature_stats): Ditto.
20827         * g10/keyserver.c (keyserver_refresh): Ditto.
20828         * g10/sig-check.c (check_signature_metadata_validity): Ditto.
20829         * g10/sign.c (do_sign): Ditto.
20830         * g10/trustdb.c (reset_trust_records): Ditto.
20831         (validate_keys): Use a table like diagnostic output.
20832
20833 2016-01-15  Werner Koch  <wk@gnupg.org>
20834
20835         kbx,w32: Use shorter retry intervals for keybox_file_rename.
20836         + commit 3cccd5a83b96e4558642dcdf5d974f64ebdb9817
20837         * kbx/keybox-util.c (keybox_file_rename): Restart retry intervals
20838         after 800ms.
20839
20840 2016-01-14  Werner Koch  <wk@gnupg.org>
20841
20842         w32: Fix deadlock introduced by keybox_file_rename.
20843         + commit 663c5d129a8f400cc6eb8ab7b91772d6e578152d
20844         * g10/keyring.c (keyring_lock) [W32]: Flush the close cache before
20845         locking.
20846         * kbx/keybox-init.c (keybox_lock) [W32]: Close the file before
20847         locking.
20848
20849         gpg: Detect race between pubring.gpg and pubring.kbx use.
20850         + commit 3b1248e007a6bf830a3230ee2d9cc548205ec31a
20851         * g10/keydb.c (maybe_create_keyring_or_box): Detect race condition.
20852
20853         kbx: New function keybox_file_rename to replace rename.
20854         + commit 8241ed59d05e06252647b26477ed5c2f84895a26
20855         * kbx/keybox-util.c: Include windows.h.
20856         (keybox_file_rename): New.
20857         * kbx/keybox-update.c (rename_tmp_file): Replace remove+rename by
20858         keybox_file_rename.
20859         * g10/keyring.c (rename_tmp_file): Ditto.
20860
20861         kbx: Add function keybox_tmp_names to avoid code duplication.
20862         + commit f5cceef115f0307664956d01c48b1b397fdad4b3
20863         * kbx/keybox-update.c (create_tmp_file): Move some code to...
20864         * kbx/keybox-util.c (keybox_tmp_names): new.
20865         * g10/keyring.c: Include keybox.h.
20866         (create_tmp_file): Replace parts by keybox_tmp_names.
20867
20868         gpg: Make --list-options show-usage the default.
20869         + commit 360534bde770f4845669de223154216d249b954b
20870         * g10/gpg.c (main): Add LIST_SHOW_USAGE.
20871
20872 2016-01-13  Werner Koch  <wk@gnupg.org>
20873
20874         kbx: Change return type of search functions to gpg_error_t.
20875         + commit c7ca0f73dbe7c080b79f93f90f00ba2396fc4bd0
20876         * kbx/keybox-search.c (keybox_search_reset): Change return type to
20877         gpg_error_t.
20878         (keybox_search): Ditto.  Also handle GPG_ERR_EOF.
20879         * sm/keydb.c (keydb_search_reset): Ditto.
20880
20881         gpg: Improve error code from lock_all.
20882         + commit 9b6c91469a804c60289a2ed21334dfd856c294bb
20883         * g10/keydb.c (lock_all): Do not clobber RC during failur cleanup.
20884
20885         kbx: Improve and fix keybox_lock.
20886         + commit 8f1368d5e3f7654ad9cb100053535f728dff2344
20887         * kbx/keybox-init.c (keybox_lock): Make sure ERR is initialized.  Get
20888         error codes from dotlock functions.
20889
20890         common: Make sure dotlock functions set a proper ERRNO.
20891         + commit 4aceebf36f103eb380e21d12a1f08b7d6ea7cc8e
20892         * common/dotlock.c (map_w32_to_errno): New.
20893         (read_lockfile): Return a proper ERRNO.
20894         (dotlock_create_unix): Do not let log functions clobber ERRNO.
20895         (dotlock_take_unix): Ditto.
20896         (dotlock_release_unix): Ditto.
20897         (dotlock_create_w32): Set proper ERRNO.
20898         (dotlock_take_w32): Ditto.
20899         (dotlock_release_w32): Ditto.
20900
20901         kbx: Implement keybox_lock for use by gpg.
20902         + commit 160862978628b07ed5150ec2c8abad6af1656bc3
20903         * kbx/keybox-defs.h: Include dotlock.h and logging.h.
20904         (CONST_KB_NAME): Remove.  Replace usage by KB_NAME.
20905         (struct keybox_name): Add field "lockhd".
20906         * kbx/keybox-init.c (keybox_register_file): Init LOCKHD.
20907         (keybox_lock): Chnage to return gpg_error_t.  Implement locking.
20908
20909         gpg: Make sure to mark a duplicate registered keybox as primary.
20910         + commit 9dc355ad3ae0026ab04c424dc984d748b8fad393
20911         * kbx/keybox-init.c (keybox_register_file): Change interface to return
20912         the token even if the file has already been registered.
20913         * g10/keydb.c (primary_keyring): Rename to primary_keydb.
20914         (maybe_create_keyring_or_box): Change return type to gpg_error_t.
20915         (keydb_add_resource): Ditto. s/rc/err/.
20916         (keydb_add_resource): Mark an already registered as primary.
20917         * sm/keydb.c (maybe_create_keybox): Change return type to gpg_error_t.
20918         (keydb_add_resource): Ditto. s/rc/err/.
20919         (keydb_add_resource): Adjust for changed keybox_register_file.
20920
20921 2016-01-13  NIIBE Yutaka  <gniibe@fsij.org>
20922
20923         Fix to support git worktree.
20924         + commit 96237b9a63a50aed1884cb06f84279b977d6a8fa
20925         * autogen.sh, Makefile.am, doc/Makefile.am: Use -e for testing .git.
20926
20927 2016-01-12  Werner Koch  <wk@gnupg.org>
20928
20929         ssh: Accept OpenSSH *cert-v01 key variants.
20930         + commit e2f984b4afffaa89bdeba2f5d447b5681237177e
20931         * agent/command-ssh.c (SPEC_FLAG_WITH_CERT): New.
20932         (ssh_key_types): Add OpenSSH cert types.
20933         (stream_read_string): Allow a dummy read.
20934         (ssh_receive_mpint_list): Pass SPEC by reference.
20935         (ssh_receive_mpint_list): New arg CERT and use it.
20936         (ssh_receive_key): Read certificate into an estream object and modify
20937         parser to make use of that object.
20938
20939 2016-01-12  NIIBE Yutaka  <gniibe@fsij.org>
20940
20941         common: Fix iobuf API of filter function for alignment.
20942         + commit 4b4639b0b04dc82c550fa711dd7193e13fc4a428
20943         * common/iobuf.h: Fix comment.
20944
20945         common: Fix iobuf API of filter function for alignment.
20946         + commit 3f52c7da3940ec06572270d511000dc7fe9c27d2
20947         * common/iobuf.h (IOBUFCTRL_DESC): Change the call semantics.
20948         * common/iobuf.c (iobuf_desc): Add the second argument DESC.
20949         (print_chain, iobuf_close, do_open, iobuf_sockopen, iobuf_ioctl)
20950         (iobuf_push_filter2, pop_filter, iobuf_write_temp): Change calls
20951         of iobuf_desc.
20952         (file_filter, file_es_filter, sock_filter, block_filter): Fill the
20953         description.
20954         * common/t-iobuf.c (every_other_filter, double_filter): Likewise.
20955         * g10/armor.c, g10/cipher.c, g10/compress-bz2.c, g10/compress.c,
20956         g10/decrypt-data.c, g10/encrypt.c, g10/mdfilter.c, g10/progress.c,
20957         g10/textfilter.c: Likewise.
20958
20959 2016-01-11  Werner Koch  <wk@gnupg.org>
20960
20961         gpg: Fix NULL de-ref for ambiguous key check in --export-ssh-keys.
20962         + commit b280aa6423c9492e8c5a9afa57339d06d957996d
20963         * g10/getkey.c: Allow arg RET_KEYBLOCK to be NULL.
20964
20965 2016-01-09  Werner Koch  <wk@gnupg.org>
20966
20967         tools: Remove gpgkey2ssh.
20968         + commit eb9c021631174fde4c1c444bbc533a7a46d570cd
20969         * tools/gpgkey2ssh.c: Remove.
20970         * tools/Makefile.am (bin_PROGRAMS): Ditto.
20971
20972 2016-01-08  Werner Koch  <wk@gnupg.org>
20973
20974         gpg: Support ECDSA keys with --export-ssh-key.
20975         + commit b2da3951a395366bf1644bc4c4eb42d657effe17
20976         * g10/export.c (key_to_sshblob): Add hack for ECDSA.
20977
20978         gpg: New command --export-ssh-key.
20979         + commit 4970868d8d84d3a64b067e5aafc9f097621758d3
20980         * g10/export.c: Include membuf.h and host2net.h.
20981         (key_to_sshblob): New.
20982         (export_ssh_key): New.
20983         * g10/gpg.c (aExportSshKey): New.
20984         (opts): Add command.
20985         (main): Implement that command.
20986
20987         gpg: Add an exact search flag to the PK struct.
20988         + commit 34bca9cd4b8517795833cb754b0d5b1dd33b08ed
20989         * g10/getkey.c (merge_selfsigs_subkey): Clear exact flag.
20990         (finish_lookup): Set exact flag.
20991         * g10/packet.h (PKT_public_key): Add field flags.exact.
20992
20993         Print warnings if old daemon versions are used.
20994         + commit 2aa42baaf3dd7c3ae613ae0c61760a17c8adfcd0
20995         * common/status.h (STATUS_WARNING): New.
20996         * g10/call-agent.c (warn_version_mismatch): New.
20997         (start_agent): Call warn function.
20998         * g10/call-dirmngr.c: Include status.h.
20999         (warn_version_mismatch): New.
21000         (create_context): Call warn function.
21001         * sm/call-agent.c (warn_version_mismatch): New.
21002         (start_agent): Call warn function.
21003         (gpgsm_agent_learn): Call warn function.
21004         * sm/call-dirmngr.c (warn_version_mismatch): New.
21005         (prepare_dirmngr): Call warn function.
21006
21007         common: New function compare_version_strings.
21008         + commit 4d7ac43ff71fdadfd2e04621f74840a82fbe788a
21009         * common/stringhelp.c (parse_version_number): New.
21010         (parse_version_string): New.
21011         (compare_version_strings): New.
21012         * common/t-stringhelp.c (test_compare_version_strings): New.
21013         (main): Call test.  Return ERRCOUNT instead of 0.
21014
21015         common: New function get_assuan_server_version.
21016         + commit 496643291e1e346434e9c98405c5a370957eb7d3
21017         * common/asshelp.c: Include membuf.h.
21018         (get_assuan_server_version): New.
21019         * g10/call-agent.c (agent_get_version): Use new function.
21020
21021         common: New put_membuf_cb to replace static membuf_data_cb.
21022         + commit 833ba5faa1340aff80a205acbb701d4ae1d594d0
21023         * common/membuf.c (put_membuf_cb): New.
21024         * agent/call-scd.c (membuf_data_cb): Remove.  Change callers to use
21025         put_membuf_cb.
21026         * common/get-passphrase.c (membuf_data_cb): Ditto.
21027         * g10/call-agent.c (membuf_data_cb): Ditto.
21028         * sm/call-agent.c (membuf_data_cb): Ditto.
21029
21030 2016-01-07  Werner Koch  <wk@gnupg.org>
21031
21032         gpg: Return an error code from keygrip_from_pk.
21033         + commit 8fd406c317ad7c2e375ae4f7d20656dadf6d7fcc
21034         * g10/keyid.c (keygrip_from_pk): Return an error code.
21035
21036         gpg: Avoid warnings about possible NULL deref.
21037         + commit 8a56a38387c10c02ba0790c655dd5c1d08e4a724
21038         * g10/getkey.c (cache_public_key): Protect deref of CE which actually
21039         can't happen.
21040         * g10/keygen.c (quickgen_set_para): s/sprintf/snprintf/.
21041         * g10/tofu.c (end_transaction, rollback_transaction): Allow NULL for
21042         DB.
21043         * g10/trustdb.c (update_min_ownertrust): Remove useless clearling of
21044         ERR.
21045
21046         gpg: Fix warnings about useless assignments.
21047         + commit 008aa6e6d4b213c3a0d15509eb46cf168b6f2c94
21048         * g10/armor.c (parse_hash_header): Remove duplicate var assignment.
21049         * g10/getkey.c (cache_user_id): Ditto.
21050         * g10/keygen.c (ask_curve): Ditto.  This also fixes a small memory
21051         leak.
21052
21053         * g10/keygen.c (proc_parameter_file): Remove useless assignment or
21054         pointer increment.
21055         (generate_keypair): Ditto.
21056         * g10/getkey.c (finish_lookup, lookup): Ditto.
21057         * g10/card-util.c (change_pin): Ditto.
21058         * g10/gpg.c (main) <aVerify>: Ditto.
21059         * g10/import.c (import): Ditto.
21060         (print_import_check): Ditto
21061         * g10/keyring.c (do_copy): Ditto.
21062         * g10/tdbio.c (tdbio_read_record): Ditto.
21063         * g10/trustdb.c (tdb_update_ownertrust): Ditto.
21064         (update_validity): Ditto.
21065
21066         * g10/server.c (cmd_passwd): Remove useless call to skip_options.
21067
21068         sm: Avoid warnings about useless assignments.
21069         + commit 126aebbb82667d160c8c4435898efeb3b43c4ec8
21070         * sm/call-dirmngr.c (prepare_dirmngr): Remove setting of ERR.
21071         (unhexify_fpr): Remove useless computation on N.
21072         * sm/certchain.c (do_validate_chain): Remove clearing of RC.  Remove
21073         useless setting of RC.
21074         * sm/fingerprint.c (gpgsm_get_keygrip): Remove setting of RC.
21075         * sm/gpgsm.c (build_list): Replace final stpcpy by strcpy.
21076         * sm/keydb.c (keydb_clear_some_cert_flags): Remove clearing of RC.
21077         * sm/server.c (cmd_getauditlog): Comment unused skip_options.
21078
21079         kbx: Avoid warnings about useless assignments.
21080         + commit 0de7d61437bd0bfbe645d5eed7a62df03129fb32
21081         * kbx/keybox-dump.c (_keybox_dump_blob): Remove setting of IN_RANGE
21082         and the last increment of P.
21083
21084         gpg: Fix DNS cert lookup returning an URL.
21085         + commit a41638acf4808caa619f4f3f4c0dcd12be00d6f8
21086         * g10/call-dirmngr.c (dns_cert_status_cb): Store URL status in the URL
21087         param.  The old code was entirely buggy (c+p error).
21088
21089 2016-01-06  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
21090
21091         Fix keystrlen to work when OPT.KEYID_FORMAT is KF_DEFAULT.
21092         + commit 2c3e67430d9b523c85c81ae562223fd51e3608cc
21093         * g10/keyid.c (keystrlen): If opt.keyid_format is KF_DEFAULT unset,
21094         default to KF_SHORT.
21095         (format_keyid): Default to KF_SHORT, not KF_0xLONG.
21096
21097 2016-01-06  Werner Koch  <wk@gnupg.org>
21098
21099         gpg: Silence some regression tests.
21100         + commit c7389ae90fa4a70766400cc241ff6a45aa750324
21101         * g10/test.c (TEST): Print diagnostics only in verbose mode.
21102
21103         gpg: Avoid using an uninitialized SALT on premature EOF.
21104         + commit 85cc7449fb00ac85b0c2eecd22bd38b23f33edf5
21105         * g10/parse-packet.c (parse_key): Check for premature end of salt.
21106
21107         gpg: Silence warnings found by static analyzer.
21108         + commit 09accc0e3d74e6289bed40b5bfc6479981cabfe4
21109         * g10/keyedit.c (change_passphrase): Remove useless init of ANY.
21110         (keyedit_quick_adduid): Remove useless setting of ERR.
21111         * g10/parse-packet.c (parse_key): Remove PKTLEN from condition because
21112         it has been checked before the loop.
21113         (parse_plaintext): Remove useless init of PKTLEN.
21114
21115         kbx: Avoid faulty fclose in an error case.
21116         + commit db82b6131d437bf6ba34db0e08b7dfa9edb11e45
21117         * kbx/keybox-update.c (blob_filecopy): Do not close an uninitialized
21118         file pointer after a failure to create a temp file.
21119         * kbx/keybox-openpgp.c (next_packet): Remove duplicate assignment of
21120         PKTLEN.
21121
21122         dirmngr: Silence one regression test.
21123         + commit 6deafb92abe100ff67e3a0a230a39e8c0ad41900
21124         * dirmngr/t-dns-stuff.c (main): Do not print info during standard
21125         "make check".
21126
21127         common: Avoid warnings about useless assignments.
21128         + commit e64317c15e9960f3173d374e589f7c3565a4ad08
21129         * common/b64enc.c (b64enc_finish): Remove var assignment which is not
21130         used later.
21131         * common/iobuf.c (file_filter): Ditto.
21132         * common/tlv.c (do_find_tlv): Ditto.
21133         * common/userids.c (classify_user_id): Ditto.
21134
21135         tests: Use info and error instead of a plain echo.
21136         + commit 1fbfa1bf0a6ad0dc7ed67d12252643c2c6c7370a
21137         * tests/openpgp/4gb-packet.test: Use error and info.
21138
21139         common: Do not deref vars in tests after a fail().
21140         + commit 0a00115ee2049ab2357b7a14a51c7da185ffcabd
21141         * common/t-convert.c (test_bin2hex): Turn if conditions into if-else
21142         chains to avoid accessing unchecked data.
21143         (test_bin2hexcolon): Ditto.
21144         * common/t-mapstrings.c (test_map_static_macro_string): Ditto.
21145         * common/t-stringhelp.c (test_percent_escape): Ditto.
21146         (test_make_filename_try): Ditto.
21147         (test_make_absfilename_try): Ditto.
21148         * common/t-timestuff.c (test_timegm): Ditto.
21149
21150 2016-01-05  Werner Koch  <wk@gnupg.org>
21151
21152         gpg: Align notes about minimal keysize with actual checks.
21153         + commit e70f7a54f29d727def2cfe9ea5ab9d461b4ce842
21154         * g10/keygen.c (ask_keysize): Use 768 for the minimal value for DSA in
21155         export mode.  Improve readability.
21156
21157 2016-01-05  NIIBE Yutaka  <gniibe@fsij.org>
21158
21159         agent: Fix RSA verification for card.
21160         + commit ff3b607fc879b70665c187500022cc63e2a0cd86
21161         * agent/pksign.c (agent_pksign_do): Use S-exp of public key, instead
21162         of shadowed key.
21163
21164 2016-01-04  Neal H. Walfield  <neal@g10code.com>
21165
21166         gpg: Fix double free.
21167         + commit 575c15a090913d86cf8d75b2bc4471e371f234b9
21168         * g10/getkey.c (get_pubkeys): Fix double free.
21169
21170 2015-12-24  NIIBE Yutaka  <gniibe@fsij.org>
21171
21172         agent: IMPORT_KEY with --force option fix.
21173         + commit 79b51bb8727bd3485229ac8ff5987558156d5d83
21174         * agent/cvt-openpgp.c (convert_from_openpgp_main): Add an option not
21175         to check existing key.
21176         (convert_from_openpgp): Ditto.
21177         (convert_from_openpgp_native): Call convert_from_openpgp_main with
21178         dontcare_exist=0.
21179         * agent/command.c (cmd_import_key): Call with dontcare_exist=force.
21180
21181         g10: Use --force when importing key for bkuptocard.
21182         + commit 5ca57f1a697e875bae5a5c73f1a580c42ca75343
21183         * g10/call-agent.c (agent_import_key): Add an argument FORCE.
21184         * g10/import.c (transfer_secret_keys): Likewise.
21185         (import_secret_one): Call transfer_secret_keys with FORCE=0.
21186         * g10/keyedit.c (keyedit_menu): Call with FORCE=1.
21187
21188         g10: Remove subcommand checkbkupkey for --key-edit.
21189         + commit 44aee35e69540510617aea4b886ef845590960fe
21190         * g10/keyedit.c (keyedit_menu): Remove cmdCHECKBKUPKEY support.
21191
21192         g10: Allow relative path for specifying the file for bkuptocard.
21193         + commit ee433d2b00c93b5a4e4ed54b9fb5806361df1b71
21194         * g10/keyedit.c (keyedit_menu): Assume the file is under GNUPGHOME.
21195         Also support tilda expansion.
21196
21197         g10: fix regression of bkuptocard subcommand in --edit-key.
21198         + commit 40959add1ba0efc1f4aa87fa075fa42423eff73c
21199         * g10/keyedit.c (keyedit_menu): Call transfer_secret_keys.
21200         * g10/import.c (transfer_secret_keys): Make it global function.
21201         Allow stats==NULL.
21202
21203         agent: Support --force option for IMPORT_KEY.
21204         + commit e684c634df814b12d399dcdc375c35d3e9a137af
21205         * agent/command.c (cmd_keywrap_key): New option --force.
21206
21207 2015-12-23  Werner Koch  <wk@gnupg.org>
21208
21209         gpg: Rename struct pubkey to pukey_s and add pubkey_t.
21210         + commit a9cbdcfd9c364557787f4a173cc59f14c067946e
21211         * g10/keydb.h (struct pubkey): Rename to pubkey_s.
21212         (pubkey_t): New.  Change all struct pubkey_s to use this type.
21213         * g10/getkey.c (get_pubkeys): Rename arg keys to r_keys.
21214
21215         gpg: Simplify status message code from commit b30c15bf.
21216         + commit 363ed2e892adc97fae97111bb56b64f9f809e8d5
21217         * g10/keygen.c (card_write_key_to_backup_file): Simplify by using
21218         hexfingerprint.
21219
21220         gpg: Add standard free() semantic to pubkey_free.
21221         + commit 04c9cddda95f2a8ca5c0cf10bb3dd6accf56cf45
21222         * g10/getkey.c (pubkey_free): Check for NULL arg.
21223
21224         gpg: Fix use of assert from commit dc417bf0.
21225         + commit ef7b7e91600f35b4d682a6267001a8d30f0fa49f
21226         * g10/keydb.c (keydb_update_keyblock): De-ref after the assert.  Use
21227         %zu for size_t.
21228
21229         gpg: Do not translate debug output.
21230         + commit b0c9867fb74d5a00335e6606d5bdcc5342ce26cd
21231         * g10/getkey.c (parse_def_secret_key): Do not make strings passed to
21232         log_debug translatable.
21233
21234 2015-12-23  NIIBE Yutaka  <gniibe@fsij.org>
21235
21236         scd: Fix commit b30c15bf (again).
21237         + commit aecf1a3c57ca8bf8050a3743b62fe142ccf9eb22
21238         * g10/keygen.c (do_generate_keypair): Clear the variable S.
21239
21240 2015-12-22  Neal H. Walfield  <neal@g10code.com>
21241
21242         gpg: Fix type.
21243         + commit 5c759924fb92b6de7ab3baed7871e5114ebd2505
21244         * g10/keygen.c (card_write_key_to_backup_file): Change n to a size_t.
21245
21246         gpg: Fix error message.
21247         + commit 4654384fe7a4dcee113dacf27c398b13dea5d0be
21248         * g10/getkey.c (parse_def_secret_key): Fix error message.
21249
21250         gpg: Don't check for ambiguous keys.
21251         + commit 7195b94345b0bb937477dc47fc5ec27fb108a099
21252         * g10/gpg.c (struct result): Move from here...
21253         * g10/keydb.h (struct pubkey): ... to here.  Update users.
21254         * g10/gpg.c (check_user_ids): Move from here...
21255         * g10/getkey.c (get_pubkeys): ... to here.  Update users.  Use
21256         get_pubkey_byname to look up the keys (this also prunes invalid keys).
21257         (pubkey_free): New function.
21258         (pubkeys_free): New function.
21259         * g10/gpg.c (main): Don't check for ambiguous key specifications.
21260
21261         gpg: Lazily evaluate --default-key.
21262         + commit dc52995d85048ed12ae8b9f330e9ca41a4030aae
21263         * g10/gpg.c (main): If --encrypt-to-default-key is specified, don't
21264         add --default-key's value to REMUSR here...
21265         * g10/pkclist.c (build_pk_list): ... do it here.
21266         * tests/openpgp/Makefile.am (TESTS): Add default-key.test.
21267         * tests/openpgp/default-key.test: New file.
21268
21269         gpg: Remove unused parameter.
21270         + commit ffe0b7a6dd6bfaec62f81f511b3caf08978bb269
21271         * g10/pkclist.c (build_pk_list): Remove parameter use, which is always
21272         called set to PUBKEY_USAGE_ENC.  Update callers.
21273
21274         gpg: Improve check for ambiguous keys.
21275         + commit 4103850c2e51274984f69443dee34295cbb8c282
21276         * g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
21277         encryption-only keys when a signing key is needed and vice-versa.
21278
21279         gpg: Fix TOCTTOU when updating keyblocks.
21280         + commit dc417bf0c555a7416d0aedde6645fd1087660f92
21281         * g10/keydb.c (keydb_update_keyblock): Don't replace the record at the
21282         current offset.  After taking the lock, extract the fingerprint from
21283         the keyblock, find it and then replace it.
21284
21285         Only add the user supplied CFLAGS after running any autoconf tests.
21286         + commit 02eb9fc9d5863abcfed6af704e618f8cac7cc2e8
21287         * configure.ac: Only add the user supplied CFLAGS after running any
21288         autoconf tests.
21289
21290         gpg: Suppress a warning.
21291         + commit 1cceba163b17b5e9fd7c89e5b40e3d7e1cffc885
21292         * dirmngr/dns-stuff.c (enable_dns_tormode): Reference new_circuit to
21293         avoid a warning when ADNS is not available.
21294
21295         gpg: Remove dead code.
21296         + commit 4143cc1c3783c54a6f733f08a4739e4e5fb0c8b3
21297         * kbx/keybox-defs.h (struct keybox_found_s): Remove unused fields
21298         offset and n_packets.
21299
21300         gpg: Display the key that is invalid, not the search description.
21301         + commit 7fe4be0416cdc9269011bc4213b8a22d6ced295c
21302         * g10/getkey.c (parse_def_secret_key): Display the key that is
21303         invalid, not the search description.
21304
21305         gpg: Mark more options as coming from the config file (when this holds)
21306         + commit 478ca6c75bbf529f95974224dfb7d71bd5860a96
21307         * g10/gpg.c (main): When --default-key or --encrypt-to-default-key is
21308         taken from the config file, note this.
21309
21310         gpg: Use enums instead of defines.
21311         + commit ee8a8ec1cf4605e5af427f9c8b01b3609c82cbe7
21312         * g10/keydb.h (PK_LIST_ENCRYPT_TO): Change from a macro to an enum.
21313         (PK_LIST_HIDDEN): Likewise.
21314         (PK_LIST_CONFIG): Likewise.
21315         (PK_LIST_SHIFT): Likewise.n
21316
21317 2015-12-21  NIIBE Yutaka  <gniibe@fsij.org>
21318
21319         po: Update Japanese translation.
21320         + commit d8392299f311f8cfcf8bc02679dd3ae7ef8cc6d7
21321
21322
21323         g10: clean up of headers for card.
21324         + commit ab9a9bce77d014159c68460f5a7c263fb72f3c1c
21325         * g10/main.h (save_unprotected_key_to_card): Remove.
21326         * g10/options.h (ctapi_driver, pcsc_driver, disable_ccid): Remove.
21327
21328 2015-12-21  Werner Koch  <wk@gnupg.org>
21329
21330         common: New file fwddecl.h.
21331         + commit 98f9e14323bf806f674b3cc259e19ef6219b4378
21332         * common/util.h (server_control_s, ctrl_t): Move to ...
21333         * common/fwddecl.h: New file.
21334         * common/call-gpg.h: Replace typedef by fwddecl.h.  Change include
21335         protection macro name.
21336         * common/Makefile.am (common_sources): Add fwddecl.h.
21337
21338 2015-12-18  Werner Koch  <wk@gnupg.org>
21339
21340         build: Add required macro for pkg-config.
21341         + commit af142854a73567836a0ca44ad62900469c23d531
21342         * configure.ac (PKG_PROG_PKG_CONFIG): New.
21343
21344 2015-12-18  NIIBE Yutaka  <gniibe@fsij.org>
21345
21346         g10: Remove deprecated internal functions.
21347         + commit 72eaff1aa610f3c89a755f212760157e1932d847
21348         * g10/keygen.c (do_ask_passphrase, generate_raw_key)
21349         (gen_card_key_with_backup, save_unprotected_key_to_card): Remove.
21350
21351         g10: Fix a regression for generating card key with backup.
21352         + commit b30c15bf7c5336c4abb1f9dcd974cd77ba6c61a7
21353         * g10/main.h (receive_seckey_from_agent): Declare.
21354         * g10/keygen.c (card_write_key_to_backup_file): New.
21355         (card_store_key_with_backup): New.
21356         (do_generate_keypair): Create a key on host for encryption key when
21357         backup is requested.  Then, call card_store_key_with_backup.
21358
21359 2015-12-17  NIIBE Yutaka  <gniibe@fsij.org>
21360
21361         g10: factor out a function for secret key retrieval.
21362         + commit e644aa7f5943174e3f7ba9408af71531fd125a0b
21363         * g10/export.c (receive_seckey_from_agent): New.
21364         (do_export_stream): Use it.
21365
21366 2015-12-16  Neal H. Walfield  <neal@g10code.com>
21367
21368         gpg: When checking for ambiguous keys, ignore invalid keys.
21369         + commit fc010b6c7fe14e609734e448775fa384421bdef1
21370         * g10/gpg.c (check_user_ids): When checking for ambiguous keys, ignore
21371         disabled, revoked and expired keys (if appropriate for the provided
21372         option).
21373
21374 2015-12-15  Werner Koch  <wk@gnupg.org>
21375
21376         common: Use default_errsource for call-gpg and exectool.
21377         + commit 4ffe44c5874ed655d82adfa7a85439fab91cde03
21378         * common/call-gpg.c (my_error_from_syserror, my_error_from_errno): New.
21379         Use these wrappers.
21380         * common/exectool.c (my_error_from_syserror): New.  Use these
21381         wrappers.
21382
21383         gpg: Reduce number of strings to translate.
21384         + commit 345ec7323d643528d2f904765708b5ecfe51f57b
21385         * g10/getkey.c (parse_def_secret_key): Do not make debug messages
21386         translatable.  Make use of print_reported_error.
21387
21388         gpg: New function to printed a detailed error code.
21389         + commit 2ea1aebc924c3f0b2269f83cb1b80c75d9fa069c
21390         * g10/misc.c (print_reported_error): New.
21391
21392 2015-12-15  Neal H. Walfield  <neal@g10code.com>
21393
21394         gpg: Improve the keyblock cache's transparency.
21395         + commit f369efd6712148dc7ed40dba6d1ff5b0e169431a
21396         * kbx/keybox-search.c (keybox_seek): New function.
21397         * g10/keydb.c (keydb_search): When reading from the cache, seek to
21398         just after the cached record.
21399
21400         gpg: Improve the keyblock cache's transparency.
21401         + commit 2e4e10c1dcd8dfeafec51f44ebf26acfeb770c41
21402         * kbx/keybox-search.c (keybox_offset): New function.
21403         * g10/keydb.c (struct keyblock_cache): Add fields resource and offset.
21404         (keyblock_cache_clear): Reset HD->KEYBLOCK_CACHE.RESOURCE and
21405         HD->KEYBLOCK_CACHE.OFFSET.
21406         (keydb_search): Don't use the cached result if it comes before the
21407         current file position.  When caching an entry, also record the
21408         position at which it was found.
21409
21410         gpg: Use more descriptive names.
21411         + commit 0ea186db645da2b51a7e71f46793d447f2de5e3d
21412         * g10/keyring.c (KR_NAME): Rename this...
21413         (KR_RESOURCE): ... to this.  Update users.
21414         (struct keyring_name): Rename this...
21415         (struct keyring_resource): ... to this.  Update users.
21416         (struct off_item): Rename this...
21417         (struct key_present): ... to this.  Update users.
21418         (OffsetHashTable): Rename this...
21419         (key_present_hash_t): ... to this.  Update users.
21420         (kr_offtbl): Rename this...
21421         (key_present_hash): ... to this.  Update users.
21422         (kr_offtbl_ready): Rename this...
21423         (key_present_hash_ready): ... to this.  Update users.
21424         (KEY_PRESENT_HASH_BUCKETS): New define.  Replace use of literals
21425         with this.
21426         (new_offset_item): Rename this...
21427         (key_present_value_new): ... to this.  Update users.
21428         (release_offset_items): Drop dead code.
21429         (new_offset_hash_table): Rename this...
21430         (key_present_hash_new): ... to this.  Update users.
21431         (release_offset_hash_table): Drop dead code.
21432         (lookup_offset_hash_table): Rename this...
21433         (key_present_hash_lookup): ... to this.  Update users.
21434         (update_offset_hash_table): Rename this...
21435         (key_present_hash_update): ... to this.  Drop unused parameter off.
21436         Update users.
21437         (update_offset_hash_table_from_kb): Rename this...
21438         (key_present_hash_update_from_kb): ... to this.  Drop unused parameter
21439         off.  Update users.
21440
21441 2015-12-15  NIIBE Yutaka  <gniibe@fsij.org>
21442
21443         sm: Handle gcry_pk_encrypt return value.
21444         + commit 4ee881bff4c8fdfa4b3b7a4b7afab611471e97f1
21445         * sm/encrypt.c (encrypt_dek): Don't ignore failure of gcry_pk_encrypt.
21446
21447 2015-12-14  Werner Koch  <wk@gnupg.org>
21448
21449         common: Change license of isascii.c to all-premissive,
21450         + commit 7baca033070e7811f75e2021100adf8e6a48907f
21451         * common/isascii.c: Change.
21452
21453         common: Change license of some modules to LGPLv3+/GPLv2+.
21454         + commit 7d129a7391115ff1d6a3541078a37a630ab7819f
21455         * common/status.c: Change from GPLv3 to LGPLv3+/GPLv2+.
21456         * common/status.h: Ditto.
21457         * common/yesno.c: Ditto.
21458         * common/common-defs.h: Ditto.
21459         * common/gettime.h: Ditto.
21460         * common/keyserver.h: Ditto.
21461
21462         common: Change license for exectool to LGPLv3+/GPLv2+.
21463         + commit 467e18b74b4790dcbdf3c816206d2fbaf170a12a
21464         * common/exectool.c, common/exectool.h: Change license.
21465
21466         common: Rename sh-exectool to exectool.
21467         + commit d80e1bc430bf64debdb6b08f0b7e5c42836781fa
21468         * common/sh-exectool.c: Rename to exectool.c.
21469         * common/sh-exectool.h: Rename to exectool.h.
21470         * common/Makefile.am (common_sources): Adjust for rename.
21471         * common/exectool.c (sh_exec_tool_stream): Rename to
21472         gnupg_exec-tool-stream.
21473         (sh_exec_tool): Rename to gnupg_exec_tool.
21474         * tools/gpgtar-create.c (gpgtar_create): Adjust for changes.
21475         * tools/gpgtar-extract.c: Adjust for changes.
21476         * tools/gpgtar-list.c: Adjust for changes.
21477
21478 2015-12-14  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
21479
21480         gpg: Print ownertrust in TOFU+PGP trust model.
21481         + commit f5aa51aaacfe13ab9528aa9b88d8ce8eb61362fc
21482         * g10/keyedit.c: Print ownertrust in TOFU+PGP trust model.
21483
21484 2015-12-14  Neal H. Walfield  <neal@g10code.com>
21485
21486         gpg: Fix --default-key checks.
21487         + commit e573e6188dada4d70f6897aa2fda3c3af8c50441
21488         * g10/getkey.c (parse_def_secret_key): Don't just check if a secret
21489         key is available for the public key, also consider subkeys.  Also
21490         check that the key has the signing capability, is not revoked, is not
21491         expired and is not disabled.  Print a warning if there was a least one
21492         value passed to --default-key and all were ignored.
21493
21494 2015-12-14  NIIBE Yutaka  <gniibe@fsij.org>
21495
21496         scd: Fix regression for generating RSA keys on card.
21497         + commit d40975cbe8ff86fcc4a1b4963fdffc66ddee85ce
21498         * scd/app-openpgp.c (do_genkey): Strip leading zeros for fingerprint
21499         computation.
21500
21501 2015-12-12  Werner Koch  <wk@gnupg.org>
21502
21503         gpg: Use a regular type instead of a void* for import stats.
21504         + commit 4d3395ef1fcde0b8c454c09956863959d590ede6
21505         * g10/import.c (struct stats_s): Rename to import_stats_s.  Change all
21506         users.
21507         * g10/main.h (import_stats_t): New.  Change fucntions to use this
21508         instead of a void pointer.
21509
21510         Remove replacements for libgpg-error < 1.21.
21511         + commit f0ae40b0c901e5f5c04c6ed5b2ab96ab7340b2bd
21512         * common/util.h: Remove replacement macros for libgpg-error<1.21.
21513         * common/types.h: Ditto.
21514         * common/mischelp.h: Ditto.
21515         * common/t-mapstrings.c: Include t-support.h before stringhelp.h
21516         * common/t-stringhelp.c: Ditto.
21517         * common/t-support.h: Always include gpg-error.h.
21518         * kbx/keybox-search.c: Do not include stringhelp.h so that keybox-defs
21519         comes first.
21520
21521 2015-12-11  Neal H. Walfield  <neal@g10code.com>
21522
21523         gpg: Fix buffer overflow.
21524         + commit 1605e34fc365edd473aac15c9b4e5aadc1d95cf5
21525         * g10/keydb.c (keydb_search_desc_dump): Fix buffer overflow.
21526
21527 2015-12-11  Justus Winter  <justus@g10code.com>
21528
21529         agent: Improve error handling.
21530         + commit 25f0f053cd306200a6211b5cf397838a59835ee7
21531         * agent/pksign.c (agent_pksign_do): Improve error handling.
21532
21533         Fix required libgpg-error version.
21534         + commit d6e01493cad6ff32f356185c7a2d2b5c2b86a937
21535         * configure.ac (NEED_GPG_ERROR_VERSION): We need version 1.21 for the
21536         poll interface.
21537
21538 2015-12-11  Neal H. Walfield  <neal@g10code.com>
21539
21540         gpg: Don't error out if a key occurs multiple times in the keyring.
21541         + commit 6dc37c5fb60acbfd5ba2ab979852383eac8944e0
21542         * g10/gpg.c (check_user_ids): Don't error out if a key occurs multiple
21543         times in the keyring.  Instead, print a warning.  When printing out
21544         fingerprint prints, use format_hexfingerprint to format them.
21545
21546 2015-12-10  Daniel Hoffend  <dh@dotlan.net>
21547
21548         scd: Fix removal of unplugged usb readers on Windows.
21549         + commit d1a97585c5e73fbc7d4cf90e38f76ffc5aea305f
21550         * scd/apdu.c (pcsc_error_to_sw): map PCSC_E_NO_SERVICE and
21551         PCSC_E_SERVICE_STOPPED to the internal SW_HOST_NO_READER error code.
21552
21553 2015-12-07  Justus Winter  <justus@g10code.com>
21554
21555         tests: Add some more gpgtar tests.
21556         + commit 1c8eae95a8b3b89bc0f49cb5f4938101634583dc
21557         * tests/openpgp/gpgtar.test: Add more tests.
21558
21559         dirmngr: Initialize http status code.
21560         + commit 71726b627dcff015dc12568021b31d8ccede788a
21561         * dirmngr/ks-action.c (ks_action_search): Initialize 'http_status' as
21562         it is unused if LDAP is used to search for keys.
21563
21564 2015-12-04  Daiki Ueno  <ueno@gnu.org>
21565
21566         gpg: Write ERROR status on delete-key cancellation.
21567         + commit b5cd68852d0e3485c9e13a8ddb70f05f36a65cb9
21568         * g10/delkey.c (do_delete_key): Write ERROR status code with the error
21569         location "delete_key.secret", when the user cancelled the operation on
21570         Pinentry.
21571
21572 2015-12-04  Justus Winter  <justus@g10code.com>
21573
21574         dirmngr: Stricter handling of http error codes.
21575         + commit 6d64ef869dfbcb7aaa802b80ed648393147e40d8
21576         * dirmngr/ks-action.c (ks_action_search): Only retry if the keyserver
21577         responded with a '404 Not Found'.
21578         * dirmngr/ks-engine-hkp.c (send_request): Return http status code.
21579         (ks_hkp_search): Likewise.
21580         (ks_hkp_{get,put}): Adapt call to 'send_request'.
21581         * dirmngr/ks-engine.h (ks_hkp_search): Update prototype.
21582
21583         dirmngr: Really search all keyservers for patterns.
21584         + commit 6ac57a482f7ae02db1bee4e4b861288fc6905adc
21585         * dirmngr/ks-action.c (ks_action_search): Search all configured
21586         keyservers for the given patterns.
21587
21588         dirmngr: Handle http status '501 Not Implemented'.
21589         + commit a8308ba5231682ce7c7d591a17e7e940fbd63189
21590         * dirmngr/ks-engine-hkp.c (send_request): Handle status 501 and return
21591         GPG_ERR_NOT_IMPLEMENTED.
21592
21593         tools/gpgtar: Implement symmetric encryption.
21594         + commit 582e684a48eb4f3716cecf7dc73eb93046efcfad
21595         * tests/openpgp/gpgtar.test: Add test case.
21596         * tools/gpgtar-create.c (gpgtar_create): Pass '--symmetric' flag to
21597         gpg.
21598         * tools/gpgtar.c (parse_arguments): We do handle the argument now.
21599
21600         tools/gpgtar: Implement signing.
21601         + commit 45c814f348c89acd8d21d0607ffcf68e5c5c399e
21602         * tests/openpgp/gpgtar.test: Test signing.
21603         * tools/gpgtar-create.c (gpgtar_create): Add 'sign' option, add the
21604         appropriate gpg arguments to implement signing and selecting the local
21605         user.
21606         * tools/gpgtar.c (parse_options): We do handle '--local-user' now.
21607         (main): Handle signing, encrypting, and doing both when creating an
21608         archive.
21609         * tools/gpgtar.h (gpgtar_create): Update prototype.
21610
21611         tools/gpgtar: Use the new exectool helper.
21612         + commit 0c0dafd8e89bb702e856c661c1561e10cdcaf37f
21613         * tools/Makefile.am: gpgtar now requires neither npth nor libassuan.
21614         * tools/gpgtar-create.c (gpgtar_create): Use the new 'sh-exectool'
21615         helper.
21616         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
21617         * tools/gpgtar-list.c (gpgtar_list): Likewise.
21618         * tools/gpgtar.c (main): Set default gpg program.  Drop the
21619         initialization of npth and libassuan.
21620
21621         common: Add a stream interface to 'sh-exectool'.
21622         + commit a81aca6e1c2a4529d416d1989f15d7338d2ee81e
21623         * common/sh-exectool.c (struct copy_buffer): Add infrastructure for
21624         copying between streams.
21625         (copy_buffer_{init,shred,do_copy,flush}): New functions.
21626         (sh_exec_tool_stream): Rework 'sh_exec_tool' to operate on streams.
21627         (nop_free): New function.
21628         (sh_exec_tool): Express this in terms of 'sh_exec_tool_stream'.
21629         * common/sh-exectool.h (sh_exec_tool_stream): New prototype.
21630
21631         common: Add header file and build the new code.
21632         + commit d955cb5e0700c6d2b6b26cb210b5a176d22d4235
21633         * common/Makefile.am (common_sources): Add new files.
21634         * common/sh-exectool.h: New file.
21635
21636 2015-12-04  Werner Koch  <wk@gnupg.org>
21637
21638         common: Add code to execute a helper.
21639         + commit 2ae07f826aa551db8adf714158fce962790a6b54
21640         * common/sh-exectool.c: New file.
21641
21642         Release 2.1.10.
21643         + commit 9fadfdb3109f7ea42aaaa9d745b64c6c90cb8233
21644
21645
21646 2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>
21647
21648         po: Japanese translation.
21649         + commit 762fcc027b0b4cc88c1f633804de619273d6a8b9
21650
21651
21652 2015-12-04  Werner Koch  <wk@gnupg.org>
21653
21654         speedo,w32: Improve installer.
21655         + commit 0fe3614d9afe42ecf80bbc932366ceeaba0a0ecc
21656         * build-aux/speedo/w32/inst.nsi (SEC_gnupg): Install dirmngr.conf and
21657         distsigkey.gpg.
21658         (un.gnupglast): Stop dirmngr.
21659
21660         gpg: Do not pre-check keys given on the command line.
21661         + commit 28311d1fa56bfbd801103a8475597459132874f4
21662         * g10/keydb.h (PK_LIST_ENCRYPT_TO, PK_LIST_HIDDEN, PK_LIST_CONFIG)
21663         (PK_LIST_SHIFT): New.
21664         * g10/pkclist.c (build_pk_list): Use them here.
21665         * g10/gpg.c (check_user_ids, main): Ditto.
21666
21667         * g10/gpg.c (main): Set PK_LIST_CONFIG for REMUSR and LOCUSR.
21668         (check_user_ids): Skip check for command line specified options.
21669
21670         dirmngr: Add command to print the resolver version.
21671         + commit 4ff2cae7dee36ffee854c5f05c3e8ee9eb0308dd
21672         * dirmngr/server.c (cmd_getinfo): Add sub-command "dnsinfo".
21673
21674         gpg: Allow "help" as value for --tofu-policy.
21675         + commit 59f6192cb766612ad215bc6a3af13d5b137139e4
21676         * g10/gpg.c (parse_tofu_policy): Add keyword "help".
21677         (parse_tofu_db_format): Ditto.
21678
21679         Do not translate messages printed with log_debug.
21680         + commit 218a52787a87be6b7481a39f87d212d6ef594e97
21681         * common/asshelp.c (start_new_gpg_agent): Do not i18n string.
21682         (start_new_dirmngr): Ditto.
21683         * g10/mainproc.c (proc_encrypted): Ditto.  Print only if debug is
21684         enabled.
21685
21686 2015-12-04  NIIBE Yutaka  <gniibe@fsij.org>
21687
21688         scd: Fix for removing the prefix.
21689         + commit f03976f1101f539a2782cd9e87d640fc32a022db
21690         * scd/app-openopg.c (do_decipher): Fix the condition.
21691
21692         scd: Simplify saving application context.
21693         + commit 9639af5f16a7ed908cbce2415330b9fcd88edc90
21694         * scd/app.c (lock_table): Remove LAST_APP field.
21695         (lock_reader, app_dump_state, application_notify_card_reset)
21696         (release_application): Follow the change.
21697         (check_conflict): New.
21698         (check_application_conflict): Lock the slot and call check_conflict.
21699         (select_application): Call check_conflict and not use LAST_APP.
21700
21701         scd: More fix for Curve25519 prefix handling.
21702         + commit f747adfa21551e083bc947540c64c94a96dcc059
21703         * scd/app-openpgp.c (do_decipher): Handle trancated cipher text.
21704         Also fix xfree bug introduced.
21705
21706 2015-12-03  Werner Koch  <wk@gnupg.org>
21707
21708         scd: Another fix for Curve25519 prefix handling.
21709         + commit e28f2e7a2f265af8bbdb4979e9679b4396dccdd5
21710         * scd/app-openpgp.c (do_decipher): Check 0x02 also for 16+1 byte long
21711         INDATA.
21712         (do_decipher): Fix integer arithmetic in void pointer.
21713         (do_decipher): Add missing memcpy.
21714
21715         build: Avoid dependecy problems in "make distcheck".
21716         + commit 0f61599ed0bd1cc6842067d040bb58ec0a451715
21717         * doc/Makefile.am (gnupg.texi): Depend on defs.inc.
21718
21719         build: Change how caller provided CFLAGS are used by configure.
21720         + commit 4e9957250eee3521dc979912a4818e58ffddc5b8
21721         * configure.ac: Append instead of prepend caller provided CFLAGS.
21722
21723         gpg: Add variant of 'key "%s" not found: %s' error message.
21724         + commit 5e2c5e9ec5b75fae886e1294adbdb7ad2ac12827
21725         * g10/gpg.c (check_user_ids): Change error message.
21726         * g10/delkey.c (do_delete_key): Ditto.
21727
21728         gpg: Make keyidlist more robust in case of errors.
21729         + commit 50a568e7380752454c029eac2b57d8803b1cb287
21730         * g10/keyserver.c (keyidlist): Clear *KLIST on error.
21731
21732         gpg: Take care of keydb_new returning NULL.
21733         + commit a28ac99efead8be73ea1704abe1611ccc4811c54
21734         * g10/keydb.c (keydb_new): Print an error message if needed.  Also use
21735         xtrycalloc because we return an error anyway.
21736         * g10/delkey.c (do_delete_key): Handle error retruned by keydb_new.
21737         * g10/export.c (do_export_stream): Ditto.
21738         * g10/getkey.c (get_pubkey): Ditto.
21739         (get_pubkey_fast): Ditto.
21740         (get_pubkeyblock): Ditto.
21741         (get_seckey): Ditto.
21742         (key_byname): Ditto.
21743         (get_pubkey_byfprint): Ditto.
21744         (get_pubkey_byfprint_fast): Ditto.
21745         (parse_def_secret_key): Ditto.
21746         (have_secret_key_with_kid): Ditto.
21747         * g10/import.c (import_one): Ditto.
21748         (import_revoke_cert): Ditto.
21749         * g10/keyedit.c (keyedit_quick_adduid): Ditto.
21750         * g10/keygen.c (quick_generate_keypair): Ditto.
21751         (do_generate_keypair): Ditto.
21752         * g10/trustdb.c (validate_keys): Ditto.
21753         * g10/keyserver.c (keyidlist): Ditto.
21754         * g10/revoke.c (gen_desig_revoke): Ditto.
21755         (gen_revoke): Ditto.
21756         * g10/gpg.c (check_user_ids): Ditto.
21757         (main): Do not print an error message for keydb_new error.
21758         * g10/keylist.c (list_all): Use actual error code returned by
21759         keydb_new.
21760
21761         * g10/t-keydb-get-keyblock.c (do_test): Abort on keydb_new error.
21762         * g10/t-keydb.c (do_test): Ditto.
21763
21764         * g10/keyring.c (keyring_new): Actually return an error so that the
21765         existing keydb_new error checking makes sense for a keyring resource.
21766         (keyring_rebuild_cache): Take care of keyring_new returning an error.
21767
21768         gpg: Change some error messages.
21769         + commit 9fcc047d921bde95b6807325b7fd2b697e89907f
21770         * g10/getkey.c (parse_def_secret_key): Change error message.  Replace
21771         log_debug by log_info.
21772         * g10/gpg.c (check_user_ids): Make function static.  Change error
21773         messages.
21774         (main): Change error messages.
21775         * g10/revoke.c (gen_revoke): Ditto.
21776
21777 2015-12-03  NIIBE Yutaka  <gniibe@fsij.org>
21778
21779         scd: Fix "Conflicting usage" bug.
21780         + commit f42c50dbf00c2e6298ca6830cbe6d36805fa54a3
21781         * scd/apdu.c (apdu_close_reader): Call CLOSE_READER method even if we
21782           got an error from apdu_disconnect.
21783         * scd/app-common.h (no_reuse): Remove.
21784         * scd/app.c (application_notify_card_reset): Deallocate APP here.
21785         (select_application, release_application): Don't use NO_REUSE.
21786
21787         scd: Fix for Curve25519 prefix handling.
21788         + commit 11b2691eddc42e91651e4f95dd2731255a3e9211
21789         * scd/app-openpgp.c (do_decipher): More condition for AES decipher.
21790           Handle the prefix in cipher text.  Always add the prefix in result.
21791
21792 2015-12-03  Neal H. Walfield  <neal@g10code.com>
21793
21794         gpg: Use the matching key if the search description is exact.
21795         + commit cedbd4709eed6fead9d1b271f96860c00547c77c
21796         * g10/gpg.c (check_user_ids): If the search description is for an
21797         exact match (a keyid or fingerprint that ends in '!'), then use the
21798         matching key, not the primary key.
21799         * tests/openpgp/Makefile.am (TESTS): Add use-exact-key.test.
21800         (priv_keys): Add privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc,
21801         privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc,
21802         privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc,
21803         privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc and
21804         privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc.
21805         (sample_keys): Add
21806         samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc.
21807         * tests/openpgp/privkeys/00FE67F28A52A8AA08FFAED20AF832DA916D1985.asc:
21808         New file.
21809         * tests/openpgp/privkeys/1DF48228FEFF3EC2481B106E0ACA8C465C662CC5.asc:
21810         New file.
21811         * tests/openpgp/privkeys/A2832820DC9F40751BDCD375BB0945BA33EC6B4C.asc:
21812         New file.
21813         * tests/openpgp/privkeys/ADE710D74409777B7729A7653373D820F67892E0.asc:
21814         New file.
21815         * tests/openpgp/privkeys/CEFC51AF91F68A2904FBFF62C4F075A4785B803F.asc:
21816         New file.
21817         * tests/openpgp/samplekeys/E657FB607BB4F21C90BB6651BC067AF28BC90111.asc:
21818         New file.
21819         * tests/openpgp/use-exact-key.test: New file.
21820         * tests/openpgp/version.test: Install the new private keys.
21821
21822 2015-12-02  Werner Koch  <wk@gnupg.org>
21823
21824         build: Require at least Libassuan 2.4.1.
21825         + commit 69db3285e4612ad24462149a4d64cc32c090a491
21826         * configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.4.1.
21827         * agent/gpg-agent.c (create_server_socket): Remove check for
21828         libassuan >= 2.3.0 and >= 2.1.4.
21829         (main): Remove check for libassuan >= 2.1.4.
21830         * scd/scdaemon.c (create_server_socket): Remove check for
21831         libassuan >= 2.1.4.
21832         * dirmngr/dirmngr.c (set_tor_mode): Remove check for
21833         libassuan >= 2.3.0.
21834         * dirmngr/http.c (http_raw_connect, send_request): Remove checks for
21835         libassuan >= 2.3.0.
21836
21837 2015-12-02  Neal H. Walfield  <neal@g10code.com>
21838
21839         gpg: Improve documentation.
21840         + commit 28195f8d27aa0fc9daf5b74fb24de87c36e04739
21841         * g10/tofu.c (initdb): Improve documentation.
21842
21843         gpg: Fix type mismatch resulting in a buffer overflow.
21844         + commit c73d75103cbd34975e2bd28e9924caee05eaf829
21845         * g10/tofu.c (record_binding): Change policy_old's type from an enum
21846         tofu_policy to a long: this variable is passed by reference and a long
21847         is expected.
21848
21849 2015-12-02  Werner Koch  <wk@gnupg.org>
21850
21851         dirmngr: Switch to an onion address if Tor is running.
21852         + commit 28e2513721ff0cec920564d4087f3600cce8672e
21853         * dirmngr/dirmngr.h (opt): Turn field 'keyserver' into an strlist.
21854         * dirmngr/dirmngr.c (parse_rereadable_options): Allow multiple
21855         --keyserver options.
21856         * dirmngr/server.c (server_local_s): Add field 'tor_state'.
21857         (release_uri_item_list): New.
21858         (release_ctrl_keyservers): Use it.
21859         (start_command_handler): Release list of keyservers.
21860         (is_tor_running): New.
21861         (cmd_getinfo): Re-implement "tor" subcommand using new fucntion.
21862         (ensure_keyserver): Rewrite.
21863         * g10/dirmngr-conf.skel: Add two keyserver options.
21864
21865         http: Enhance parser to detect .onion addresses.
21866         + commit 17ac843871d5f350f26edff0187f94ced923f534
21867         * dirmngr/http.h (parsed_uri_s): Add flag 'onion'.
21868         * dirmngr/http.c (do_parse_uri): Set that flag.
21869         * dirmngr/t-http.c (main): Print flags.
21870
21871 2015-12-02  Neal H. Walfield  <neal@g10code.com>
21872
21873         common,gpg: Fix processing of search descriptions ending in '!'.
21874         + commit 10cca02c4c70eee993d4df0a1d20ae841992efe9
21875         * g10/gpg.c (check_user_ids): If the search description describes a
21876         keyid or fingerprint and ends in a '!', include the '!' in the
21877         rewritten description.
21878         * common/userids.c (classify_user_id): Accept keyids and fingerprints
21879         ending in '!'.
21880
21881 2015-12-01  Justus Winter  <justus@g10code.com>
21882
21883         dirmngr: Improve error handling.
21884         + commit 9c34711539fc2c34aea8da0fd49ae6aa28991518
21885         * dirmngr/dns-stuff.c (getsrv): Avoid looking at 'header' before
21886         checking for errors, but silently ignore errors when looking up SRV
21887         records.
21888
21889 2015-12-01  Werner Koch  <wk@gnupg.org>
21890
21891         build: Let configure show the the status of Tor support.
21892         + commit 3be12d1e1b8334fb2bba307ec9efbc004f1dbf8d
21893         * configure.ac (show_tor_support): New
21894
21895 2015-11-30  Werner Koch  <wk@gnupg.org>
21896
21897         doc: Make make distcheck work again.
21898         + commit 4ecb5db804003c10c57bdc0dc7f1d9649c5ba6f8
21899         * doc/Makefile.am (DISTCLEANFILES): Add gpgkey2ssh.1
21900
21901         yat2m: Add keyword @url.
21902         + commit b4756a54a55fcd51717c149e19191a2eeaa6a919
21903         * doc/yat2m.c (proc_texi_cmd): Add keyword @url.
21904
21905         doc: Build man pages with the same date as the info files.
21906         + commit 081c902f16a2f251df4593f090b3978dfa473a26
21907         * doc/Makefile.am (yat2m-stamp): Use option --date.
21908
21909         yat2m: New option --date.
21910         + commit 75eb071354d1f862bac09c56c8ab81dae8883270
21911         * doc/yat2m.c (opt_date): new.
21912         (isodatestring): Use it if set.
21913         (main): New option --date.
21914
21915 2015-11-27  Werner Koch  <wk@gnupg.org>
21916
21917         gpg: Avoid extra translation strings.
21918         + commit 686f31c3d5aee0d2825265869ae92ca95cdcabae
21919         * g10/keyedit.c (menu_expire): Use only one prompt.
21920
21921         kbx: Include gpg-error prior to mischelp.h.
21922         + commit 436a154ea85e4dffbde7c3b316fbfca1b066aa2a
21923         * kbx/keybox-init.c: Change order of includes.
21924
21925         gpg,w32: Fix a format string error.
21926         + commit 7c856f99144b84ac30e0c9a192f09dc36d93190a
21927         * g10/keyring.c (keyring_search): Fix format string for off_t.
21928
21929         Silence compiler warnings related to not using assuan_fd_t.
21930         + commit 501436ab0f9d8e7d56b2f5e344006be5f5a3c653
21931         * common/call-gpg.c (start_gpg): Use assuan_fd_t.  Note that the
21932         declaration was already fixed by a previous change.
21933         * dirmngr/server.c (cmd_getinfo): Use assuan_fd_t.
21934
21935         Avoid incompatible pointer assignment warnings on Windows.
21936         + commit 64e87083394d38998feab359caac917bcc6139d3
21937         * common/logging.c (fun_writer): Use gpgrt_ssize_t instead of ssize_t.
21938         * dirmngr/server.c (data_line_cookie_write): Ditto.
21939         * sm/certdump.c (format_name_writer): Ditto.
21940         * sm/server.c (data_line_cookie_write): Ditto.
21941         * dirmngr/http.c (cookie_read, cookie_write): Ditto.
21942
21943         dirmngr: Avoid a declarations after statements.
21944         + commit 100f34e869df899a695f5e5ef1b8e092baf91751
21945         * tools/gpgtar.c (parse_arguments): Use a block for a local varibale
21946         definition.
21947
21948         dirmngr: Avoid casting away a const from an char**.
21949         + commit 6501741d2c1beb8060198a39a1aa950cb11b386f
21950         * dirmngr/ldap.c (start_cert_fetch_ldap): Do not use pointers from
21951         global variables.
21952
21953         dirmngr: Allow testing for a running Tor via "getinfo tor".
21954         + commit da5a232199ef93be219e933a7eaf4ccfc6d24d61
21955         * dirmngr/server.c (cmd_getinfo): Print an S line if Tor is not
21956         running.
21957
21958 2015-11-26  Werner Koch  <wk@gnupg.org>
21959
21960         g13: Fix commit 1a045b13.
21961         + commit 82f6abb4807c89388052ab442368d9e09fb84aea
21962         * g13/g13.c (main): Use existsing function.
21963
21964         common: Fix off-by-one access in the new format_text.
21965         + commit 61941a984964308b09c7fc1b3438fb99d0b3c917
21966         * common/stringhelp.c (format_text): Use existsing fucntion to trim
21967         trailing spaces.  Fix off-by-one access.
21968
21969         dirmngr: Improve output of "getinfo tor".
21970         + commit d226e67856e7197c581dcd2cef0f1e687bee0ac9
21971         * dirmngr/server.c (cmd_getinfo): Print a message along with OK.
21972
21973         dirmngr: Let Libassuan employ nPth wrappers for connect.
21974         + commit f95cff1cc9e7a4d9f6b7c45188ec47e70f9874dc
21975         * dirmngr/http.c (my_unprotect, my_protect): Remove.
21976         (connect_server): Do not use these wrappers.
21977
21978 2015-11-26  Justus Winter  <justus@g10code.com>
21979
21980         tools/gpgtar: Add '--dry-run'.
21981         + commit 676b2d7081291f7e47a66755ab07af259fea130b
21982         * tools/gpgtar-extract.c (extract_{regular,directory}): Honor
21983         '--dry-run'.
21984         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
21985         (opts): Add '--dry-run'.
21986         (parse_arguments): Handle '--dry-run'.
21987         * tools/gpgtar.h (opt): Add field 'dry_run'.
21988
21989         tools/gpgtar: Handle '--gpg-args'.
21990         + commit 69a8440f44fa025e33a4cc32d17695c9ac385043
21991         * tools/gpgtar-create.c (gpgtar_create): Use given arguments.
21992         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
21993         * tools/gpgtar-list.c (gpgtar_list): Likewise.
21994         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
21995         (opts): Add 'gpg-args'.
21996         (parse_arguments): Handle arguments.
21997         * tools/gpgtar.h (opt): Add field 'gpg_arguments'.
21998         * tests/openpgp/gpgtar.test: Simplify accordingly.
21999
22000         common: Make the GPG arguments configurable in call-gpg.
22001         + commit 1a045b1324efabe7423a8d00245f01718ed72556
22002         * common/call-gpg.c (start_gpg): Add parameter 'gpg_arguments'.
22003         (_gpg_encrypt, gpg_encrypt_blob, gpg_encrypt_stream): Likewise.
22004         (_gpg_decrypt, gpg_decrypt_blob, gpg_decrypt_stream): Likewise.
22005         * common/call-gpg.h: Adapt prototypes.
22006         * g13/create.c (encrypt_keyblob): Adapt callsite.
22007         * g13/g13-common.h (opt): Add field 'gpg_arguments'.
22008         * g13/g13.c (main): Construct default arguments.
22009         * g13/mount.c (decrypt_keyblob): Adapt callsite.
22010         * tools/gpgtar-create.c (gpgtar_create): Likewise.
22011         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
22012         * tools/gpgtar-list.c (gpgtar_list): Likewise.
22013
22014         tools/gpgtar: Handle '--tar-args' for compatibility with gpg-zip.
22015         + commit 2eb3248058330dd5c37560d9887db5b5266c54fe
22016         * tools/gpgtar.c (enum cmd_and_opt_values): New value.
22017         (opts): Add new group for tar options, rearrange a little, add
22018         '--tar-args'.
22019         (tar_opts): New variable.
22020         (shell_parse_stringlist): New function.
22021         (shell_parse_argv): Likewise.
22022         (parse_arguments): Add option argument, handle '--tar-args'.
22023         (main): Fix invokation of 'parse_arguments'.
22024         * tests/openpgp/gpgtar.test: Simplify decryption.
22025
22026         tools/gpgtar: Rework argument parsing.
22027         + commit 35c0c8b211bc891335e822379b33ea34fbc1f84f
22028         * tools/gpgtar.c (main): Move argument parsing into its own function.
22029
22030 2015-11-25  Justus Winter  <justus@g10code.com>
22031
22032         tests: Add tests for gpgtar and gpg-zip.
22033         + commit 556e8c44267fe3b829ca06286e9b5637ca1a6a73
22034         * tests/openpgp/Makefile.am (TESTS): Add new file.
22035         * tests/openpgp/gpgtar.test: New file.
22036
22037         tools/gpgtar: Handle '--directory' argument.
22038         + commit 127aba9a4d6c1aabb4a18a74b16d3bddc6eb5c54
22039         * tools/gpgtar-extract.c (gpgtar_extract): Only generate a directory
22040         name if none is given via arguments.
22041         * tools/gpgtar.c (enum cmd_and_opt_values): New constant.
22042         (opts): Add argument.
22043         (main): Parse argument.
22044         * tools/gpgtar.h (opt): New field 'directory'.
22045
22046         tools/gpgtar: Handle '--gpg' argument.
22047         + commit 89e104eb38c3a6896892ff09db11cb1bae2bb0d3
22048         * tools/gpgtar-create.c (gpgtar_create): Use given gpg program.
22049         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
22050         * tools/gpgtar-list.c (gpgtar_list): Likewise.
22051         * tools/gpgtar.c (enum cmd_and_opt_values): New constant.
22052         (opts): Add argument.
22053         (main): Handle argument.
22054         * tools/gpgtar.h (opt): Add field 'gpg_program'.
22055
22056         tools/gpgtar: Improve error handling.
22057         + commit f76fb047c15914ba44dc9423d235484758bcd721
22058         * tools/gpgtar-create.c (gpgtar_create): Return an error code, fix
22059         error handling.
22060         * tools/gpgtar-extract.c (gpgtar_extract): Likewise.
22061         * tools/gpgtar-list.c (read_header): Return an error code.
22062         (gpgtar_list): Return an error code, fix error handling.
22063         (gpgtar_read_header): Return an error code.
22064         * tools/gpgtar.c: Add missing include.
22065         (main): Print an generic error message if a command failed and no
22066         error has been printed yet.
22067         * tools/gpgtar.h (gpgtar_{create,extract,list,read_header}): Fix the
22068         prototypes accordingly.
22069
22070         tools: Add encryption and decryption support to gpgtar.
22071         + commit 40dbee86f3043aff8a8c2055521e270318e33068
22072         * tools/Makefile.am: Amend CFLAGS and LDADD.
22073         * tools/gpgtar-create.c (gpgtar_create): Add encrypt flag and encrypt
22074         stream if requested.
22075         * tools/gpgtar-extract.c (gpgtar_extract): Likewise for decryption.
22076         * tools/gpgtar-list.c (gpgtar_list): Likewise.
22077         * tools/gpgtar.c (main): Initialize npth and assuan.  Parse recipient
22078         and local user, and note which flags are currently ignored.  Adapt
22079         calls to gpgtar_list and friends.
22080         (tar_and_encrypt): Drop stub function and prototype.
22081         (decrypt_and_untar): Likewise.
22082         (decrypt_and_list): Likewise.
22083         * tools/gpgtar.h (gpgtar_{create,extract,list}): Add encryption or
22084         decryption argument.
22085
22086         common: Add stream interface to call-pgp.
22087         + commit 03bf88f32c8d203d5b3bfbbc48cc45e6c08cc187
22088         * common/call-gpg.c (struct writer_thread_parms): Add field 'stream'.
22089         (writer_thread_main): Support reading from a stream.
22090         (start_writer): Add stream argument.
22091         (struct reader_thread_parms): Add field 'stream'.
22092         (reader_thread_main): Support writing to a stream.
22093         (start_reader): Add stream argument.
22094         (_gpg_encrypt): Add stream api.
22095         (gpg_encrypt_blob): Adapt accordingly.
22096         (gpg_encrypt_stream): New function.
22097         (_gpg_decrypt): Add stream api.
22098         (gpg_decrypt_blob): Adapt accordingly.
22099         (gpg_decrypt_stream): New function.
22100         * common/call-gpg.h (gpg_encrypt_stream): New prototype.
22101         (gpg_decrypt_stream): Likewise.
22102
22103         common: Refactor the call-gpg code.
22104         + commit cb18d802308bde4e28219417bb4d107a4c0001b4
22105         * common/call-gpg.c (gpg_{en,de}crypt_blob): Move most of the code
22106         into two new functions, _gpg_encrypt and _gpg_decrypt.
22107
22108         g13: Move 'call-gpg.c' to common.
22109         + commit ba1a5cc17d43d9cba32447876f06a8ab8f97e5ae
22110         * common/Makefile.am (common_sources): Add files.
22111         * g13/call-gpg.c: Move to 'common' and adapt slightly.  Add a
22112         parameter to let callees override the gpg program to execute.
22113         * g13/call-gpg.h: Likewise.
22114         * g13/Makefile.am (g13_SOURCES): Drop files.
22115         * g13/create.c (encrypt_keyblob): Hand in the gpg program to execute.
22116         * g13/mount.c (decrypt_keyblob): Likewise.
22117
22118 2015-11-24  Neal H. Walfield  <neal@g10code.com>
22119
22120         gpg: When comparing keyids, use the keyid, not the fingerprint's suffix.
22121         + commit e9c16fee2576c772de9d4fb5d53fee28e4b84202
22122         * g10/keyedit.c (menu_select_key): Use spacep and hexdigitp instead of
22123         inline tests.  Don't compare P to the suffix of the fingerprint.  If P
22124         appears to be a keyid, do an exact compare against the keyid.  If it
22125         appears to be a fingerprint, do an exact compare against the
22126         fingerprint.
22127
22128 2015-11-23  Neal H. Walfield  <neal@g10code.com>
22129
22130         gpg: Reflow long texts.
22131         + commit 19362a8dd7ee986c082a5afc5a446f939991ec0f
22132         * common/stringhelp.c (format_text): New function.
22133         * common/t-stringhelp.c (stresc): New function.
22134         (test_format_text): New function.  Test format_text.
22135         * g10/tofu.c (get_trust): Use format_text to reflow long texts.
22136         (show_statistics): Likewise.
22137
22138         common: Extend utf8_charcount to include the string's length.
22139         + commit 5b84b0d660c8329e184d98682665aaea7e1703d2
22140         * common/stringhelp.c (utf8_charcount): Take additional parameter,
22141         len.  Process at most LEN bytes.
22142
22143 2015-11-23  Justus Winter  <justus@g10code.com>
22144
22145         dirmngr: Fix http lookups when libadns is used.
22146         + commit b75e1b3d8b1643640d046f7f8e89adf5b1caa7a3
22147         * dirmngr/dns-stuff.c (resolve_name_adns): Fill in the port.
22148
22149         dirmngr: Fix SRV record lookups when using the system resolver.
22150         + commit 946faaff04f3340ed6db9e89c5036dc5f9beca6a
22151         * dirmngr/dns-stuff.c (getsrv): Fix error handling.
22152
22153         dirmngr: Honor ports specified in SRV records.
22154         + commit 73c1a86ad937d7be027eece991c69aaeb6a1f092
22155         * dirmngr/ks-engine-hkp.c (struct hostinfo_s): New field 'port'.
22156         (create_new_hostinfo): Initialize 'port'.
22157         (add_host): Add host parameter and update the hosttable entry.
22158         (map_host): Return port if known, adjust calls to 'add_host'.
22159         (make_host_part): Let 'map_host' specify the port if known.
22160
22161         dirmngr: Support hkp server pools using SRV records.
22162         + commit c9f5aa15793b3c05c1b92af401b23ab34d3e6196
22163         * dirmngr/ks-engine-hkp.c (map_host): Handle SRV records.
22164
22165         dirmngr: Refactor 'map_host'.
22166         + commit 3f52f6bcacfe3877d30a21464e93e9240bc75085
22167         * dirmngr/ks-engine-hkp.c (add_host): New function.
22168         (map_host): Use the new function.
22169
22170         dirmngr: Fix pool detection.
22171         + commit 23ea641ba2a063cc99c82869061703d48bc674b2
22172         * dirmngr/ks-engine-hkp (arecords_is_pool): Fix counting IP addresses.
22173
22174         dirmngr: Refactor 'map_host'.
22175         + commit 2b43a0515868b8720009e48d7a1f32d571767f14
22176         * dirmngr/ks-engine-hkp.c (arecords_is_pool): New function.
22177         (map_host): Use the new function.
22178
22179         dirmngr: Start dirmngr on demand.
22180         + commit a9e0b1dd6c106e243e3fbbaa1838b56a1f1c8584
22181         * common/asshelp.h: Include 'util.h'.
22182         * dirmngr/dirmngr-client.c (main): Use 'start_new_dirmngr' to connect
22183         to the dirmngr.
22184         (start_dirmngr): Drop now unused declaration and function.
22185
22186 2015-11-23  Neal H. Walfield  <neal@g10code.com>
22187
22188         gpg: If sqlite is not available, don't build things depending on it.
22189         + commit 770c06ed4e6c1097d6e305a0a9427c3c783b787c
22190         * configure.ac: Define the automake conditional SQLITE3.
22191         * tests/openpgp/Makefile.am (TESTS): Move the sqlite3 dependent tests
22192         to...
22193         (sqlite3_dependent_tests): ... this new variable.  If SQLITE3 is not
22194         defined, then clear this variable.
22195
22196         gpg: Allow updating the expiration time of multiple subkeys at once.
22197         + commit b64b33bb80a8cf5dcc1fdbc62023d019fe2c8cb1
22198         * g10/keyedit.c (menu_expire): Allow updating the expiration time of
22199         multiple subkeys at once.
22200
22201         gpg: Don't crash if key is not passed an argument.
22202         + commit 19f099463c82c119288a05eaefc42bf09d617377
22203         * g10/keyedit.c (menu_select_key): Don't crash if P is NULL.
22204
22205 2015-11-20  Neal H. Walfield  <neal@g10code.com>
22206
22207         gpg: Fail if the search description passed to --gen-revoke is ambiguous.
22208         + commit 178af9c3f56d385fe28a9e5e8bde0ab34c0b260e
22209         * g10/revoke.c (gen_revoke): Error out if the search description is
22210         ambiguous.
22211
22212         gpg: Refactor print_seckey_info.
22213         + commit f8a65ac96b27a0963892892ce6e93b37b8df1ad7
22214         * g10/keylist.c (print_seckey_info): Break formatting functionality
22215         into...
22216         (format_seckey_info): ... this new function.
22217
22218         gpg: Improve an error message.
22219         + commit 46e128d44a0456dc603bc9e25a4c5d8da903b078
22220         * g10/revoke.c (gen_revoke): Provide a more descriptive error message
22221         if searching for a key fails.
22222
22223 2015-11-19  Justus Winter  <justus@g10code.com>
22224
22225         dirmngr: Improve error handling.
22226         + commit 6b14df5525777ee0330a34a7b335359f562616a4
22227         * dirmngr/crlcache.c (crl_cache_cert_isvalid): Add missing break.
22228
22229         dirmngr: Fix memory leak.
22230         + commit b223cde311e4e02f7983e33fe3d7214287dfb678
22231         * dirmngr/ldap.c (start_cert_fetch_ldap): Avoid leaking all malloc'ed
22232         arguments.
22233
22234         agent: Improve error handling.
22235         + commit a1650b1edf80c2526c0576547b3a574e8d30f1fa
22236         * agent/trustlist.c (istrusted_internal): Initialize 'err'.
22237
22238         common: Avoid undefined behavior.
22239         + commit eb957ffc4797fb019c505510295af244baf5be38
22240         * common/iobuf.c (iobuf_esopen): Initialize 'len' as 'file_es_filter'
22241         will make use of it.
22242
22243         g10: Avoid undefined behavior.
22244         + commit 52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb
22245         * g10/trust.c (clean_one_uid): Avoid a computation involving an
22246         uninitialized value.
22247
22248         scd: Improve error handling.
22249         + commit 6a37b45a7f13cf5d2ae7d6c9cd796a4bd197b80d
22250         * scd/app-openpgp.c (get_public_key): Improve error handling.
22251
22252 2015-11-18  Justus Winter  <justus@g10code.com>
22253
22254         dirmngr: Gracefully handle premature termination of TLS streams.
22255         + commit eb54fca4bf3ef8e0cd50b01df5b40e0d6d318d7e
22256         * dirmngr/http.c (close_tls_session): New function.
22257         (session_unref): Use the new function to close the TLS stream.
22258         (cookie_read): If the stream terminated prematurely, close it and
22259         return a short read.
22260
22261 2015-11-17  Neal H. Walfield  <neal@g10code.com>
22262             Michael Mönch  <michael.moench@marktjagd.de>
22263
22264         tools: Fix option parsing for gpg-zip.
22265         + commit 84ebf15b06e435453b2f58775f97a3a1c61a7e55
22266         * tools/gpg-zip.in: Correctly set GPG when --gpg is specified.
22267         Correctly set TAR when --tar is specified.  Pass TAR_ARGS to tar.
22268
22269 2015-11-17  Neal H. Walfield  <neal@g10code.com>
22270
22271         gpg: Allow selecting subkeys using a keyid.
22272         + commit 0b86c7463c8c057496b38e06c00f0ae4288dad49
22273         * g10/keyedit.c (menu_select_key): Take an additional argument, p.
22274         Update callers.  If P is a hex string, then assume that P is a key id
22275         or fingerprint and select subkeys with matching key ids or
22276         fingerprints.
22277         * doc/gpg.texi: Update documentation for the key subcommand.
22278
22279 2015-11-17  Justus Winter  <justus@g10code.com>
22280
22281         dirmngr: Fix specifying keyservers by IP address.
22282         + commit 1e3dbb15affd6d75a477aa17715d8e5470988c08
22283         * dirmngr/ks-engine-hkp.c (map_host): Update the original 'hosttable'
22284         entry instead of creating another one.
22285
22286 2015-11-17  Neal H. Walfield  <neal@g10code.com>
22287
22288         gpg: Change keydb_search to not return legacy keys.
22289         + commit 58e4a492e2c8e908d16135486ed601f602f1e38d
22290         * g10/keyring.c (keyring_search): Take new argument, ignore_legacy.
22291         If set, skip any legacy keys.  Update callers.
22292         * g10/keydb.c (keydb_search): Skip any legacy keys.
22293         (keydb_search_first): Don't skip legacy keys.  Treat them
22294         as an error.
22295         (keydb_search_next): Likewise.
22296         (keydb_search_fpr): Likewise.
22297         * g10/export.c (do_export_stream): Likewise.
22298         * g10/getkey.c (lookup): Likewise.
22299         (have_secret_key_with_kid): Likewise.
22300         * g10/keylist.c (list_all): Likewise.
22301         (keyring_rebuild_cache): Likewise.
22302         * g10/keyserver.c (keyidlist): Likewise.
22303         * g10/trustdb.c (validate_key_list): Likewise.
22304
22305         gpg: Correctly handle an error.
22306         + commit 848726f5c02faddb0b0fd24ce1a66893f5325675
22307         * g10/keyring.c (keyring_search): If a compare function returns an
22308         error, treat it as an error.
22309
22310         gpg: Correctly handle keyblocks followed by legacy keys.
22311         + commit ad9befab12376b3a49cde410996ac9f0013d0871
22312         * g10/keyring.c (keyring_get_keyblock): If we encounter a legacy
22313         packet after already having some non-legacy packets, then treat the
22314         legacy packet as a keyblock boundary, not as part of the keyblock.
22315         * g10/t-keydb-get-keyblock.c: New file.
22316         * g10/t-keydb-get-keyblock.gpg: New file.
22317         * g10/Makefile.am (EXTRA_DIST): Add t-keydb-get-keyblock.gpg.
22318         (module_tests): Add t-keydb-get-keyblock.
22319         (t_keydb_get_keyblock_SOURCES): New variable.
22320         (t_keydb_get_keyblock_LDADD): Likewise.
22321
22322         gpg: Make debugging search descriptors easier.
22323         + commit 11ec4785df1646643966d872b1b53ef675092c98
22324         * g10/keydb.c (dump_search_desc): Rename from this...
22325         (keydb_search_desc_dump): ... to this.  Only process a single search
22326         descriptor.  Improve output.  Don't mark as static.  Update callers.
22327
22328         gpg: Add function format_keyid.
22329         + commit a052c30d31c0f6b532fea081f4a9bee083f5440f
22330         * g10/options.h (opt.keyid_format): Add new value KF_DEFAULT.
22331         * g10/keyid.c (format_keyid): New function.
22332         (keystr): Use it.
22333
22334         gpg: Use a more appropriate error code.
22335         + commit eae982ed6d69644258afe9c4ad1be553853d8403
22336         * g10/gpg.c (check_user_ids): Return a more appropriate error code if
22337         a user id is ambiguous.
22338
22339 2015-11-17  Justus Winter  <justus@g10code.com>
22340
22341         Fix typos found using codespell.
22342         + commit a9e0905342e847e8961ec4fe9b3aaedf05e33423
22343         * agent/cache.c: Fix typos.
22344         * agent/call-pinentry.c: Likewise.
22345         * agent/call-scd.c: Likewise.
22346         * agent/command-ssh.c: Likewise.
22347         * agent/command.c: Likewise.
22348         * agent/divert-scd.c: Likewise.
22349         * agent/findkey.c: Likewise.
22350         * agent/gpg-agent.c: Likewise.
22351         * agent/w32main.c: Likewise.
22352         * common/argparse.c: Likewise.
22353         * common/audit.c: Likewise.
22354         * common/audit.h: Likewise.
22355         * common/convert.c: Likewise.
22356         * common/dotlock.c: Likewise.
22357         * common/exechelp-posix.c: Likewise.
22358         * common/exechelp-w32.c: Likewise.
22359         * common/exechelp-w32ce.c: Likewise.
22360         * common/exechelp.h: Likewise.
22361         * common/helpfile.c: Likewise.
22362         * common/i18n.h: Likewise.
22363         * common/iobuf.c: Likewise.
22364         * common/iobuf.h: Likewise.
22365         * common/localename.c: Likewise.
22366         * common/logging.c: Likewise.
22367         * common/openpgp-oid.c: Likewise.
22368         * common/session-env.c: Likewise.
22369         * common/sexputil.c: Likewise.
22370         * common/sysutils.c: Likewise.
22371         * common/t-sexputil.c: Likewise.
22372         * common/ttyio.c: Likewise.
22373         * common/util.h: Likewise.
22374         * dirmngr/cdblib.c: Likewise.
22375         * dirmngr/certcache.c: Likewise.
22376         * dirmngr/crlcache.c: Likewise.
22377         * dirmngr/dirmngr-client.c: Likewise.
22378         * dirmngr/dirmngr.c: Likewise.
22379         * dirmngr/dirmngr_ldap.c: Likewise.
22380         * dirmngr/dns-stuff.c: Likewise.
22381         * dirmngr/http.c: Likewise.
22382         * dirmngr/ks-engine-hkp.c: Likewise.
22383         * dirmngr/ks-engine-ldap.c: Likewise.
22384         * dirmngr/ldap-wrapper.c: Likewise.
22385         * dirmngr/ldap.c: Likewise.
22386         * dirmngr/misc.c: Likewise.
22387         * dirmngr/ocsp.c: Likewise.
22388         * dirmngr/validate.c: Likewise.
22389         * g10/encrypt.c: Likewise.
22390         * g10/getkey.c: Likewise.
22391         * g10/gpg.c: Likewise.
22392         * g10/gpgv.c: Likewise.
22393         * g10/import.c: Likewise.
22394         * g10/keydb.c: Likewise.
22395         * g10/keydb.h: Likewise.
22396         * g10/keygen.c: Likewise.
22397         * g10/keyid.c: Likewise.
22398         * g10/keylist.c: Likewise.
22399         * g10/keyring.c: Likewise.
22400         * g10/mainproc.c: Likewise.
22401         * g10/misc.c: Likewise.
22402         * g10/options.h: Likewise.
22403         * g10/packet.h: Likewise.
22404         * g10/parse-packet.c: Likewise.
22405         * g10/pkclist.c: Likewise.
22406         * g10/pkglue.c: Likewise.
22407         * g10/plaintext.c: Likewise.
22408         * g10/server.c: Likewise.
22409         * g10/sig-check.c: Likewise.
22410         * g10/sqlite.c: Likewise.
22411         * g10/tdbio.c: Likewise.
22412         * g10/test-stubs.c: Likewise.
22413         * g10/tofu.c: Likewise.
22414         * g10/trust.c: Likewise.
22415         * g10/trustdb.c: Likewise.
22416         * g13/create.c: Likewise.
22417         * g13/mountinfo.c: Likewise.
22418         * kbx/keybox-blob.c: Likewise.
22419         * kbx/keybox-file.c: Likewise.
22420         * kbx/keybox-init.c: Likewise.
22421         * kbx/keybox-search-desc.h: Likewise.
22422         * kbx/keybox-search.c: Likewise.
22423         * kbx/keybox-update.c: Likewise.
22424         * scd/apdu.c: Likewise.
22425         * scd/app-openpgp.c: Likewise.
22426         * scd/app-p15.c: Likewise.
22427         * scd/app.c: Likewise.
22428         * scd/ccid-driver.c: Likewise.
22429         * scd/command.c: Likewise.
22430         * scd/iso7816.c: Likewise.
22431         * sm/base64.c: Likewise.
22432         * sm/call-agent.c: Likewise.
22433         * sm/call-dirmngr.c: Likewise.
22434         * sm/certchain.c: Likewise.
22435         * sm/gpgsm.c: Likewise.
22436         * sm/import.c: Likewise.
22437         * sm/keydb.c: Likewise.
22438         * sm/minip12.c: Likewise.
22439         * sm/qualified.c: Likewise.
22440         * sm/server.c: Likewise.
22441         * tools/gpg-check-pattern.c: Likewise.
22442         * tools/gpgconf-comp.c: Likewise.
22443         * tools/gpgkey2ssh.c: Likewise.
22444         * tools/gpgparsemail.c: Likewise.
22445         * tools/gpgtar.c: Likewise.
22446         * tools/rfc822parse.c: Likewise.
22447         * tools/symcryptrun.c: Likewise.
22448
22449 2015-11-16  Neal H. Walfield  <neal@g10code.com>
22450
22451         gpg: Fix error checking and improve error reporting.
22452         + commit 8e2bea22b0927f4f95a248cc7517f407a705d8a8
22453         * g10/gpg.c (check_user_ids): Differentiate between a second result
22454         and an error.  If the key specification is ambiguous or an error
22455         occurs, set RC appropriately.
22456
22457 2015-11-14  Werner Koch  <wk@gnupg.org>
22458
22459         gpg: Use only one fingerprint formatting function.
22460         + commit 3689c2105aab6a4304e9464c5b20207d69b9a133
22461         * g10/gpg.h (MAX_FORMATTED_FINGERPRINT_LEN): New.
22462         * g10/keyid.c (hexfingerprint): Add optional args BUFFER and BUFLEN.
22463         Change all callers.
22464         (format_hexfingerprint): New.
22465         * g10/keylist.c (print_fingerprint): Change to use hexfingerprint.
22466         * g10/tofu.c (fingerprint_format): Remove.  Replace calls by
22467         format_hexfingerprint.
22468
22469 2015-11-13  Werner Koch  <wk@gnupg.org>
22470
22471         gpg: Simplify the tofu interface by using the public key packet.
22472         + commit e7d7160ab7cd4e6b460bfe36fd3a7275adadb4e2
22473         * g10/tofu.c (fingerprint_str): Remove.
22474         (tofu_register): Take a public key instead of a fingerprint as arg.
22475         Use hexfingerprint() to get a fpr from the PK.
22476         (tofu_get_validity): Ditto.
22477         (tofu_set_policy, tofu_get_policy): Simplify by using hexfingerprint.
22478         * g10/trustdb.c (tdb_get_validity_core): Pass the primary key PK to
22479         instead of the fingerprint to the tofu functions.
22480
22481         gpg: Make trusted-key override for Tofu robust against swapped tofu.db.
22482         + commit 7de8376430625c1f6f3a58ae16276deca8ff6a82
22483         * g10/tofu.c (get_trust): For the UTK check lookup the key by
22484         fingerprint.
22485
22486         gpg: Fix regression in --locate-keys (in 2.1.9).
22487         + commit 7e59fb21f728b5f54468cd35b1415a2f86003d4f
22488         * g10/getkey.c (getkey_ctx_s): Add field "extra_list".
22489         (get_pubkey_byname): Store strings in the context.
22490         (getkey_end): Free EXTRA_LIST.
22491
22492 2015-11-12  Werner Koch  <wk@gnupg.org>
22493
22494         gpg: Print a new EXPORTED status line.
22495         + commit 2038adf16d0e7eeb614043aae17b16a867de6b70
22496         * common/status.h (STATUS_EXPORTED): New.
22497         * g10/export.c (print_status_exported): New.
22498         (do_export_stream): Call that function.
22499
22500         gpg: Print export statistics to the status-fd.
22501         + commit e3c48335f9c5081c6080bceafa7a04140403427a
22502         * common/status.h (STATUS_EXPORT_RES): New.
22503         * g10/main.h (export_stats_t): New.
22504         * g10/export.c (export_stats_s): New.
22505         (export_new_stats, export_release_stats): New.
22506         (export_print_stats): New.
22507         (export_pubkeys, export_seckeys, export_secsubkeys)
22508         (export_pubkey_buffer, do_export): Add arg "stats".
22509         (do_export_stream): Add arg stats and update it.
22510         * g10/gpg.c (main) <aExport, aExportSecret, aExportSecretSub>: Create,
22511         pass, and print a stats object to the export function calls.
22512
22513         * g10/export.c (export_pubkeys_stream): Remove unused function.
22514
22515         dirmngr: Do not block during ADNS calls.
22516         + commit a3b26d6c0839ec18d1dc226bb537d5067c86d574
22517         * dirmngr/dns-stuff.c: Include npth.h
22518         (my_unprotect, my_protect): New wrapper.
22519         (resolve_name_adns): Put unprotect/protect around adns calls.
22520         (get_dns_cert): Ditto.
22521         (getsrv): Ditto.
22522         (get_dns_cname): Ditto.
22523
22524         dirmngr: New option --nameserver.
22525         + commit a2cc1d57552ccac7b2f9a0c6423b171b2a168b2a
22526         * dirmngr/dirmngr.c (oNameServer): New.
22527         (opts): Add --nameserver.
22528         (parse_rereadable_options): Act upon oNameServer.
22529         * dirmngr/dns-stuff.c (DEFAULT_NAMESERVER): New.
22530         (tor_nameserver): New.
22531         (set_dns_nameserver): New.
22532         (my_adns_init): Make name server configurable.
22533
22534 2015-11-11  Neal H. Walfield  <neal@g10code.com>
22535
22536         gpg: Fix cache consistency problem.
22537         + commit 7546e818791988c00b8635dab5b899265d8d9f42
22538         g10/keyring.c (keyring_search): Only mark the cache as completely
22539         filled if we start the scan from the beginning of the keyring.
22540
22541 2015-11-10  Neal H. Walfield  <neal@g10code.com>
22542
22543         gpg: Default to the the PGP trust model.
22544         + commit 67c701d1e53f56305e3b8771c683c45bb9672305
22545         * g10/trustdb.c (init_trustdb): If we can't read the trust model from
22546         the trust DB, default to TM_PGP, not TM_TOFU_PGP.
22547
22548         gpg: Default to the flat TOFU DB format.
22549         + commit 951f277b6bf8178560105538d38e2a07a96865bd
22550         * g10/tofu.c (opendbs): If the TOFU DB format is set to auto and there
22551         is no TOFU DB, default to the flat format.
22552
22553 2015-11-09  Werner Koch  <wk@gnupg.org>
22554
22555         dirmngr: Change to new ADNS Tor mode init scheme.
22556         + commit 288c9919dc45496b2380eeac487a8539692d6842
22557         * dirmngr/dns-stuff.c (tor_credentials): New.
22558         (enable_dns_tormode): Add arg new_circuit and update tor_credentials.
22559         (my_adns_init): Rework to set Tor mode using a config file options and
22560         always use credentials.
22561         * dirmngr/server.c (cmd_dns_cert): Improve error message.
22562         * dirmngr/t-dns-stuff.c (main): Add option --new-circuit.
22563
22564         dirmngr: Improve detection of ADNS.
22565         + commit f92e95175e90120362a7d6376fb32307e11267b5
22566         * configure.ac (HAVE_ADNS_FREE): New ac_define.
22567
22568 2015-11-09  NIIBE Yutaka  <gniibe@fsij.org>
22569
22570         scd: Add reder information to --card-status.
22571         + commit bce0e3f71df0709a7d323a688ddf2690c1727a6c
22572         * g10/call-agent.h, g10/call-agent.c (agent_release_card_info)
22573         g10/card-util.c (card_status): Add READER.
22574         * scd/apdu.c (close_ccid_reader, open_ccid_reader): Handle RDRNAME.
22575         (apdu_get_reader_name): New.
22576         * scd/ccid-driver.c (ccid_open_reader): Add argument to RDRNAME_P.
22577         * scd/command.c (cmd_learn): Return READER information.
22578
22579 2015-11-06  Werner Koch  <wk@gnupg.org>
22580
22581         gpg: Avoid new strings.
22582         + commit 2242658efe0c975a46c3316bc9171ddbce085e2c
22583         * g10/decrypt-data.c (decrypt_data): Use already translated strings.
22584
22585         common: Fix commit f99830b.
22586         + commit 20125333e7b822e8c70ac8cef986649f0654eb56
22587         * common/userids.c (classify_user_id): Avoid underflow.  Use spacep to
22588         also trim tabs.
22589
22590 2015-11-06  Neal H. Walfield  <neal@g10code.com>
22591
22592         gpg: Fix formatting string.
22593         + commit 28e198201e580b39bceb9c151df07fc0e936a91d
22594         * g10/decrypt-data.c (decrypt_data): Fix formatting string.
22595
22596         gpg: Add new option --only-sign-text-ids.
22597         + commit a74aeb5dae1f673fcd98b39a6a0496f3c622709a
22598         * g10/options.h (opt): Add field only_sign_text_ids.
22599         * g10/gpg.c (enum cmd_and_opt_values): Add value oOnlySignTextIDs.
22600         (opts): Handle oOnlySignTextIDs.
22601         (main): Likewise.
22602         * g10/keyedit.c (sign_uids): If OPT.ONLY_SIGN_TEXT_IDS is set, don't
22603         select non-text based IDs automatically.
22604         (keyedit_menu): Adapt the prompt asking to sign all user ids according
22605         to OPT.ONLY_SIGN_TEXT_IDS.
22606         * doc/gpg.texi: Document the new option --only-sign-text-ids.
22607
22608         common: When classifying keyids and fingerprints, reject trailing junk.
22609         + commit f99830b72812395da5451152bdd2f2d90a7cb7fb
22610         * common/userids.c (classify_user_id): Trim any trailing whitespace.
22611         Before assuming that a hexstring corresponds to a key id or
22612         fingerprint, make sure that it is NUL terminated.
22613
22614         gpg: Check for ambiguous or non-matching key specs.
22615         + commit e8c53fca954d33366e3494a6d4eecc3868282bcc
22616         * g10/gpg.c (check_user_ids): New function.
22617         (main): Check that any user id specifications passed to --local-user
22618         and --remote-user correspond to exactly 1 user.  Check that any user
22619         id specifications passed to --default-key correspond to at most 1
22620         user.  Warn if any user id specifications passed to --local-user or
22621         --default-user are possible ambiguous (are not specified by long keyid
22622         or fingerprint).
22623         * g10/getkey.c (parse_def_secret_key): Don't warn about possible
22624         ambiguous key descriptions here.
22625
22626         common: Add new function strlist_rev.
22627         + commit f38bac8883ea2e9ed8e2836f97a953efb85e774c
22628         * common/strlist.c (strlist_rev): New function.
22629         * common/t-strlist.c: New file.
22630         * common/Makefile.am (common_sources): Add strlist.c and strlist.h.
22631         (module_tests): Add t-strlist.
22632         (t_strlist_LDADD): New variable.
22633
22634         common: Include required, but not included headers in t-support.h.
22635         + commit 23e163473f050d1f2c08f589beb9dab283b7d624
22636         * common/t-support.h: Include <stdlib.h> and <stdio.h>.
22637
22638 2015-11-05  Neal H. Walfield  <neal@g10code.com>
22639
22640         gpg: Indicate which characters are invalid.
22641         + commit a958ffd148a46f3757d1c309bb13555638044640
22642         * g10/keygen.c (ask_user_id): Indicate which characters are invalid.
22643
22644         gpg: Add support for unwrapping the outer level of encryption.
22645         + commit ec409e62aea6cc829299be794f9d035d033cb51b
22646         * g10/decrypt-data.c (decrypt_data): If OPT.UNWRAP_ENCRYPTION is set,
22647         copy the data to the output file instead of continuing to process it.
22648         * g10/gpg.c (enum cmd_and_opt_values): Add new value oUnwrap.
22649         (opts): Handle oUnwrap.
22650         (main): Likewise.
22651         * g10/options.h (opt): Add field unwrap_encryption.
22652         * g10/plaintext.c (handle_plaintext): Break the output file selection
22653         functionality into ...
22654         (get_output_file): ... this new function.
22655
22656         common: Add a function for copying data from one iobuf to another.
22657         + commit fd4b9e232805b2e30b29903568c95cc0aad8bbec
22658         * common/iobuf.c (iobuf_copy): New function.
22659
22660         doc: Note that gpgkey2ssh is deprecated.
22661         + commit 2b0e0a53b4db8c44e299f57a9f4f9fc1b825e707
22662         * doc/tools.texi (gpgkey2ssh): Note that gpgkey2ssh is deprecated.
22663
22664         tools: Fix gpgkey2ssh's most gratuitous errors.  Use gpg2, not gpg.
22665         + commit cd2d685230ecafb7df504ef2b16cf1ec9a014300
22666         * tools/gpgkey2ssh.c (main): Add support for --help.  Replace the most
22667         gratuitous asserts with error messages.  Invoke gpg2, not gpg.
22668
22669 2015-11-05  Neal H. Walfield  <neal@g10code.com>
22670             Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
22671
22672         doc: Add documentation for gpgkey2ssh.
22673         + commit 2b27acc3435e73fad7460b551a36b4064cdd58be
22674         * doc/tools.texi: Add documentation for gpgkey2ssh.
22675
22676 2015-11-04  Neal H. Walfield  <neal@g10code.com>
22677
22678         gpg: Print a better error message for --multifile --sign --encrypt.
22679         + commit 6897bbf1aa9bf0a61b186ea1a9bcb463fb1fd10e
22680         * g10/gpg.c (main): Print a better error message for --multifile
22681         --sign --encrypt.
22682
22683         gpg: Add --encrypt-to-default-key.
22684         + commit de9b2340153d70b083494d1a277a384dcf43bff0
22685         * g10/getkey.c (parse_def_secret_key): Drop the static qualifier and
22686         export the function.
22687         * g10/gpg.c (enum cmd_and_opt_values): Add value oEncryptToDefaultKey.
22688         (opts): Handle oEncryptToDefaultKey.
22689         (main): Likewise.
22690         * g10/options.h (opt): Add field encrypt_to_default_key.
22691
22692         gpg: Allow multiple --default-key options.  Take the last available key.
22693         + commit e16d7168c54e5f7bc2f0037806ee4f730930eaf0
22694         * g10/getkey.c (parse_def_secret_key): New function.
22695         (get_seckey_default): Add parameter ctrl.  Update callers.  Use
22696         parse_def_secret_key to get the default secret key, if any.
22697         (getkey_byname): Likewise.
22698         (enum_secret_keys): Likewise.
22699         * g10/options.h (opt): Change def_secret_key's type from a char * to a
22700         strlist_t.
22701         * g10/gpg.c (main): When processing --default-key, add the key to
22702         OPT.DEF_SECRET_KEY.
22703         * g10/gpgv.c (get_session_key): Add parameter ctrl.  Update callers.
22704         * g10/mainproc.c (proc_pubkey_enc): Likewise.
22705         (do_proc_packets): Likewise.
22706         * g10/pkclist.c (default_recipient): Likewise.
22707         * g10/pubkey-enc.c (get_session_key): Likewise.
22708         * g10/sign.c (clearsign_file): Likewise.
22709         (sign_symencrypt_file): Likewise.
22710         * g10/skclist.c (build_sk_list): Likewise.
22711         * g10/test-stubs.c (get_session_key): Likewise.
22712
22713 2015-11-04  NIIBE Yutaka  <gniibe@fsij.org>
22714
22715         scd: Fix error handling with libusb-compat library.
22716         + commit 1e94a672efb8bf66f416bc63bf6670e509a21fe5
22717         * scd/ccid-driver.c (bulk_out): Use LIBUSB_ERRNO_NO_SUCH_DEVICE.
22718
22719         scd: fix change_keyattr.
22720         + commit c5a9fedba66361ddd9f596528882750068543298
22721         * scd/app-openpgp.c (change_keyattr_from_string): Fix parsing.
22722
22723 2015-11-03  Werner Koch  <wk@gnupg.org>
22724
22725         gpg: Change out of core error message.
22726         + commit 44ad9f29d43f40bbc1840454880f4af3df1c5295
22727         * g10/tofu.c (fingerprint_str): Die with the error code returned by
22728         the failed function.
22729         (time_ago_str): Ditto.  Do not make a comma translatable.
22730         (fingerprint_format): Use "%zu" for a size_t.
22731
22732         gpg: Make translation easier.
22733         + commit 62b8cd5495dcac9a0f8a3d88c7bd4cd80997fd3f
22734         * g10/import.c (import_secret_one): Split info string for easier
22735         translation.
22736
22737 2015-11-03  Neal H. Walfield  <neal@g10code.com>
22738
22739         gpg: Also show when the most recently signed message was observed.
22740         + commit 621afac37e5555fd68054531e611ead444b62928
22741         * g10/tofu.c (show_statistics): Also show when the most recently
22742         signed message was observed.
22743
22744         gpg: Split a utility function out of a large function.
22745         + commit 36326112290b6eef47c9dada30dddbdf408680e4
22746         * g10/tofu.c (show_statistics): Break the time delta to string code
22747         into...
22748         (time_ago_str): ... this new function.
22749
22750         gpg: Fix message formatting.
22751         + commit c8ef9f9a64d13ea8b9b4ade62525243abe2976ba
22752         * g10/tofu.c (get_trust): Fix message formatting.
22753
22754         gpg: Don't store formatting fingerprints in the TOFU DB.
22755         + commit 8ae3946d28c43e30ef692ba6cf1a7fa4ed65ecc5
22756         * g10/tofu.c (fingerprint_pp): Split this function into...
22757         (fingerprint_str): ... this function...
22758         (fingerprint_format): ... and this function.
22759         (record_binding): Store the unformatted fingerprint in the DB.  Only
22760         use the formatting fingerprint when displaying a message to the user.
22761         (get_trust): Likewise.
22762         (show_statistics): Likewise.
22763         (tofu_register): Likewise.
22764         (tofu_get_validity): Likewise.
22765         (tofu_set_policy): Likewise.
22766         (tofu_get_policy): Likewise.
22767
22768 2015-11-02  NIIBE Yutaka  <gniibe@fsij.org>
22769
22770         g10: notify a user when importing stub is skipped.
22771         + commit 06f3eadb22986d9ebde9efff2794eb1d45d6c6d4
22772         * g10/import.c (transfer_secret_keys): Return GPG_ERR_NOT_PROCESSED
22773         when stub_key_skipped.
22774         (import_secret_one): Notify a user, suggesting --card-status.
22775
22776 2015-10-31  Neal H. Walfield  <neal@g10code.com>
22777
22778         gpg: Consider newlines to be whitespace in an SQL statement.
22779         + commit 18cd09246f5dcddcafb8662afd84fa046e36de3f
22780         * g10/sqlite.c (sqlite3_stepx): When making sure that there is no
22781         second SQL statement, ignore newlines.
22782
22783 2015-10-30  Werner Koch  <wk@gnupg.org>
22784
22785         common: Improve t-zb32 to be used for manual encoding.
22786         + commit d89a9fca46d9bba497dde0793b57217c800b0e8d
22787         * common/t-support.h (no_exit_on_fail, errcount): New.
22788         (fail): Bump errcount.
22789         * common/t-zb32.c (main): Add options to allow manual use.
22790
22791         common: Add separate header for zb32.c.
22792         + commit 5aadb4b62d26e1bfb40a1ce444a81c2a5a56159c
22793         * common/util.h (zb32_encode): Move prototype to ...
22794         * common/zb32.h: new.  Include this for all callers of zb32_encode.
22795
22796 2015-10-29  Neal H. Walfield  <neal@g10code.com>
22797
22798         gpg: Display the correct error message.
22799         + commit 641df615da4937b0073c420a0503c5810c237972
22800         * g10/trustdb.c (validate_keys): If tdbio_update_version_record fails,
22801         RC does not contain the error code.  Save the error code in rc2 and
22802         use that.
22803
22804         gpg: Eliminate a memory leak.
22805         + commit d68bdc553a206e54234d5d53ad35c4ba34133118
22806         * g10/trustdb.c (validate_key_list): Don't leak the keyblocks on
22807         failure.
22808
22809         gpg: Remove unused prototype.
22810         + commit ef052591ba51ee16bafc3c5b79d837ed8f01b520
22811         g10/keyring.h (keyring_locate_writable): Remove unused prototype.
22812
22813         gpg: Eliminate a memory leak.
22814         + commit 89eee5f6b7ca3da7ebdcc3e5d069701d0834b39e
22815         * g10/gpg.c (main): Don't leak OPT.DEF_RECIPIENT.
22816
22817         gpg: Fix keyring support.
22818         + commit 99c84b49b787dab8da26cf61eed24dd4a2b77fd9
22819         * g10/keydb.c (keydb_rebuild_caches): Only mark the cached as prepared
22820         if it is actually prepared, which it only is if the resource is a
22821         keybox.
22822
22823         gpg: Change sqlite3_stepx to pass the sqlite3_stmt * to the callback.
22824         + commit 421827424fe87855307fe3e803b42ffa02738600
22825         * g10/sqlite.h (enum sqlite_arg_type): Add SQLITE_ARG_BLOB.
22826         (sqlite3_stepx_callback): New declaration.
22827         (sqlite3_stepx): Change the callback's type to sqlite3_stepx_callback,
22828         which passes an additional parameter, the sqlite3_stmt *.  Update
22829         users.
22830
22831         gpg: Move sqlite helper functions into their own file.
22832         + commit 351f4213e192aa11500c0c590d11183edbe326c5
22833         * g10/tofu.c (sqlite3_exec_printf): Move from here...
22834         * g10/sqlite.c (sqlite3_exec_printf): ... to this new file.  Don't
22835         mark as static.
22836         * g10/tofu.c (sqlite3_stepx): Move from here...
22837         * g10/sqlite.c (sqlite3_stepx): ... to this new file.  Don't
22838         mark as static.
22839         * g10/tofu.c (enum sqlite_arg_type): Move from here...
22840         * g10/sqlite.h (enum sqlite_arg_type): ... to this new file.
22841
22842 2015-10-29  NIIBE Yutaka  <gniibe@fsij.org>
22843
22844         doc: Don't install gpg-zip.1.
22845         + commit d25e29ad9374da1c11ccfc38f392dbab2d707042
22846         * doc/Makefile.am (myman_pages): Remove gpg-zip.1.
22847         (DISTCLEANFILES): Add gpg-zip.1.
22848
22849 2015-10-28  Werner Koch  <wk@gnupg.org>
22850
22851         sm: Allow combination of usage flags --gen-key.
22852         + commit 8b6c83dcb086ef09b2676e4d5b0111c88b7b8bf8
22853         * sm/certreqgen.c (create_request): Re-implement building of the
22854         key-usage extension.
22855
22856 2015-10-28  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
22857
22858         doc: Document some changed default options.
22859         + commit e095a3fcf2ccc6cc4e258111dc395558069a1164
22860         * doc/gpg.texi: Update the description of some options which are
22861           now enabled by default.
22862
22863 2015-10-28  Werner Koch  <wk@gnupg.org>
22864
22865         dirmngr: Fix NULL-deref while loading a CRL.
22866         + commit fa15a71daff8414bf4112bc2826dc495ff2fb01f
22867         * dirmngr/crlcache.c (crl_parse_insert): Set error before leaping to
22868         failure.
22869
22870         dirmngr: Minor cleanup of the SRV RR code.
22871         + commit 949a5cfdabcafab93c1ac092c0459b59318805b9
22872         * dirmngr/dns-stuff.c: Include unistd.h.
22873         (getsrv): Run srand only once.
22874         * dirmngr/t-dns-stuff.c (main): Allow passing another name for --srv
22875         and change output format.
22876
22877         dirmngr: Add a getaddrinfo wrapper backend using ADNS.
22878         + commit e026efb4363bc6e3c41ed533daf06f103ebd2e32
22879         * dirmngr/dns-stuff.c: Replace all use of default_errsource.
22880         (my_adns_init): Move to top.
22881         (resolve_name_adns): New.
22882         (resolve_dns_name) [USE_ADNS]: Divert to new func.
22883
22884 2015-10-26  Werner Koch  <wk@gnupg.org>
22885
22886         gpg: Do not call an extra get_validity if no-show-uid-validity is used.
22887         + commit a6c2c098435a703ca02abf651ff4fa45e5a4db9a
22888         * g10/mainproc.c (check_sig_and_print): Do not call the informational
22889         get_validity if we are not going to use it.
22890
22891 2015-10-26  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
22892
22893         gpg: Ensure all weak digest rejection notices are shown.
22894         + commit 91015d021b3dcbe21ad0e580a4f34c523abf9e72
22895         * g10/main.h: Add rejection_shown flag to each weakhash struct
22896         * g10/misc.c (print_digest_algo_note, additional_weak_digest): Do not
22897         treat MD5 separately; (print_digest_rejected_note): Use
22898         weakhash.rejection_shown instead of static shown.
22899         * g10/options.h (opt): Change from additional_weak_digests to
22900         weak_digests.
22901         * g10/sig-check.c: Do not treat MD5 separately.
22902         * g10/gpg.c (main): Explicitly set MD5 as weak.
22903         * g10/gpgv.c (main): Explicitly set MD5 as weak.
22904
22905 2015-10-26  Werner Koch  <wk@gnupg.org>
22906
22907         w32: Make it build again if Tofu support is not available.
22908         + commit 0d37a40fc34519e93af3ceffff2cd726d29576d3
22909         * g10/keylist.c (public_key_list) [!USE_TOFU]: Do not call tofu
22910         functions.
22911
22912         dirmngr: Support Tor hidden services.
22913         + commit 4524a2a3714f263d56bb7db349c169b456994fd9
22914         * dirmngr/dns-stuff.c (is_onion_address): New.
22915         * dirmngr/ks-engine-hkp.c (hostinfo_s): Add field "onion".
22916         (map_host): Special case onion addresses.
22917         (ks_hkp_print_hosttable): Print an 'O' for an onion address.
22918         * dirmngr/http.c (connect_server): Special case onion addresses.
22919
22920         dirmngr,w32: Remove gethostbyname hack and make it build again.
22921         + commit 7735bbe539af35ce16e270946d5ae798c5989d6e
22922         * dirmngr/http.c (connect_server) [W32]: Remove gethostbyname hack;
22923         we require getaddrinfo anyway.
22924         * dirmngr/dns-stuff.c (AI_ADDRCONFIG): Add replacement if not defined.
22925         (map_eai_to_gpg_error) [W32]: Take care of unsupported codes.
22926
22927 2015-10-26  Neal H. Walfield  <neal@g10code.com>
22928
22929         gpg: Make sure we only have a single SQL statement.
22930         + commit c18fb0d99b633bb267dead6e7c46229f4b780bc3
22931         * g10/tofu.c (sqlite3_stepx): Make sure SQL only contains a single SQL
22932         statement.
22933
22934         gpg: When the TOFU DB is in batch mode, periodically drop the locks.
22935         + commit 5b0ed7674dc718ee98e0c80aa93ce014f2b51411
22936         * g10/tofu.c: Include <sched.h>.
22937         (batch_update_started): New variable.
22938         (begin_transaction): If we've been in batch mode for a while, then
22939         commit any extant batch transactions.
22940         (tofu_begin_batch_update): If we are not in batch mode, initialize
22941         batch_update_started.
22942
22943 2015-10-25  Werner Koch  <wk@gnupg.org>
22944
22945         dirmngr: Add workaround for broken getaddrinfo.
22946         + commit 5e7ac031f513ad3b60e4f092fa72b3bec0676515
22947         * dirmngr/dns-stuff.c (resolve_name_standard): On failure retry by
22948         first resolving the CNAME.
22949         (get_dns_cname): New.
22950
22951         * dirmngr/t-dns-stuff.c (main): Add option --cname.
22952
22953         dirmngr: Better handle systems without IPv6 or IPv4.
22954         + commit 0e3c9f184a5fb3e41277700d690febc2eee9600a
22955         * dirmngr/dns-stuff.c (resolve_name_standard): Use AI_ADDRCONFIG.
22956
22957         dirmngr: Replace use of getnameinfo by resolve_dns_addr.
22958         + commit 927f34603d942868af6a7bd0f347681bbad76a94
22959         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Remove.
22960         (map_host): Use resolve_dns_addr.
22961
22962         dirmngr: Implement a getnameinfo wrapper.
22963         + commit 816505958ac4308ee0dfe787d1b706982428b6cc
22964         * dirmngr/dns-stuff.h (DNS_NUMERICHOST): New.
22965         (DNS_WITHBRACKET): New.
22966         * dirmngr/dns-stuff.c (resolve_name_standard): Factor code out to...
22967         (map_eai_to_gpg_error): new.
22968         (resolve_addr_standard): New.
22969         (resolve_dns_addr): New.
22970
22971         * dirmngr/ks-engine-hkp.c (is_ip_address): Move to ...
22972         * dirmngr/dns-stuff.c (is_ip_address): here.  Add support for non
22973         bracketed v6 addresses.
22974
22975         * dirmngr/t-dns-stuff.c: Remove header netdb.h.
22976         (main): Add option --bracket.  Use resolve_dns_name instead of
22977         getnameinfo.
22978
22979 2015-10-23  Neal H. Walfield  <neal@g10code.com>
22980
22981         gpg: Provide an interface to patch TOFU updates.
22982         + commit 7f65e84ac035e8f7a25639a6b09eb6000115e337
22983         * g10/tofu.c (struct db): Rename begin_transaction to savepoint_batch.
22984         Rename end_transaction to savepoint_batch_commit.  Update users.
22985         Remove field rollback.  Add fields savepoint_inner and
22986         savepoint_inner_commit.  Add field batch_update.
22987         (dump_cache): New function.
22988         (batch_update): New variable.
22989         (begin_transaction). New function.
22990         (end_transaction): New function.
22991         (rollback_transaction): New function.
22992         (tofu_begin_batch_update): New function.
22993         (tofu_end_batch_update): New function.
22994         (closedb): End any pending batch transaction.
22995         (closedbs): Assert that none of the DBs have a started batch
22996         transaction if we not in batch mode.
22997         (record_binding): Use the begin_transaction, end_transaction and
22998         rollback_transaction functions instead of including the SQL inline.
22999         Also start a batch mode transaction if we are using the flat format.
23000         (tofu_register): Use the begin_transaction, end_transaction and
23001         rollback_transaction functions instead of including the SQL inline.
23002         * g10/gpgv.c (tofu_begin_batch_update): New function.
23003         (tofu_end_batch_update): New function.
23004         * g10/test-stubs.c (tofu_begin_batch_update): New function.
23005         (tofu_end_batch_update): New function.
23006
23007         gpg: Cache prepared SQL queries and open DB connections.
23008         + commit 297cf8660ce346638e42934d84d746768f8bb10a
23009         * g10/tofu.c: Include <stdarg.h>.
23010         (prepares_saved) [DEBUG_TOFU_CACHE]: New variable.
23011         (queries) [DEBUG_TOFU_CACHE]: New variable.
23012         (struct db): Add fields prevp, begin_transaction, end_transaction,
23013         rollback, record_binding_get_old_policy, record_binding_update,
23014         record_binding_update2, get_policy_select_policy_and_conflict,
23015         get_trust_bindings_with_this_email, get_trust_gather_other_user_ids,
23016         get_trust_gather_other_keys, register_already_seen, and
23017         register_insert.
23018         [DEBUG_TOFU_CACHE]: Add field hits.
23019         (STRINGIFY): New macro.
23020         (STRINGIFY2): New macro.
23021         (enum sqlite_arg_type): New enum.
23022         (sqlite3_stepx): New function.
23023         (combined_db): Remove variable.
23024         (opendb): Don't cache the combined db.
23025         (struct dbs): New struct.  Update users to use this as the head of the
23026         local DB list rather than overloading struct db.
23027         (unlink_db): New function.
23028         (link_db): New function.
23029         (db_cache): New variable.
23030         (db_cache_count): New variable.
23031         (DB_CACHE_ENTRIES): Define.
23032         (getdb): If the dbs specific cache doesn't include the DB, look at
23033         DB_CACHE.  Only if that also doesn't include the DB open the
23034         corresponding DB.
23035         (closedb): New function.
23036         (opendbs): Don't open the combined DB.  Just return an initialized
23037         struct dbs.
23038         (closedbs): Don't close the dbs specific dbs.  Attach them to the
23039         front of DB_CACHE.  If DB_CACHE contains more than DB_CACHE_ENTRIES,
23040         close enough dbs from the end of the DB_CACHE list such that DB_CACHE
23041         only contains DB_CACHE_ENTRIES.  Don't directly close the dbs, instead
23042         use the new closedb function.
23043         [DEBUG_TOFU_CACHE]: Print out some statistics.
23044         (record_binding): Use sqlite3_stepx instead of sqlite3_exec or
23045         sqlite3_exec_printf.
23046         (get_policy): Likewise.
23047         (get_trust): Likewise.
23048         (tofu_register): Likewise.
23049
23050         gpg: Return the DBs meta-handle rather than the sqlite3 handle.
23051         + commit cd879d4bd69a578be5a1ff96497f8c1181885563
23052         * g10/tofu.c (getdb): Return a struct db * instead of an sqlite *.
23053         Update users.
23054
23055         gpg: Use the proper type.
23056         + commit 3c4c89cc35280164b509977c5288b0a06d6f530e
23057         * g10/options.h: Include "tofu.h".
23058         (opt.tofu_default_policy): Change type to enum tofu_policy.
23059         * g10/gpgv.c (enum tofu_policy): Don't redeclare.
23060         * g10/test-stubs.c (enum tofu_policy): Likewise.
23061
23062 2015-10-22  Werner Koch  <wk@gnupg.org>
23063
23064         dirmngr: Implement Tor mode for SRV RRs.
23065         + commit 8b06d7f41aec6cb993445935dba7c60e033d026a
23066         * dirmngr/dns-stuff.c (get_dns_cert): Factor adns init out to...
23067         (my_adns_init): new.
23068         (getsrv)[USE_ADNS]: Use my_adns_init.
23069         (getsrv)[!USE_ADNS]: Return an error if Tor mode is active.
23070
23071         * dirmngr/t-dns-stuff.c: Add option --use-tor.
23072
23073         dirmngr: Do not use MAXDNAME.
23074         + commit e03a4a94bb67d4a6c958b37671f83456e203f325
23075         * dirmngr/dns-stuff.c (getsrv): Replace MAXDNAME.
23076         * dirmngr/dns-stuff.h (MAXDNAME): Remove.
23077         (struct srventry): Use a fixed value instead of MAXDNAME.
23078         * dirmngr/http.c (connect_server): Use DIMof instead of MAXDNAME.
23079         Malloc a helper array.
23080
23081         Move SRV RR code from common/ to dirmngr/.
23082         + commit 41bb01ae792af78edd28bf1b735cacc0b3ac428a
23083         * common/srv.c: Merge into dirmngr/dns-stuff.c.  Delete file.
23084         * common/srv.h: Merge into dirmngr/dns-stuff.h.  Delete file.
23085         * common/Makefile.am (common_sources): Remove srv.c and srv.h.
23086         * g10/keyserver.c: Do not include srv.h.  The code using it is anyway
23087         disabled.
23088         * dirmngr/http.c: Remove header srv.h and stubs.
23089         * dirmngr/t-dns-stuff.c: Add option --srv.
23090
23091 2015-10-21  Werner Koch  <wk@gnupg.org>
23092
23093         dirmngr: Use the new DNS wrapper for the HTTP module.
23094         + commit 1e34007c972c1d7730cfcacd88f6bbebba7dec1d
23095         * dirmngr/t-http.c (main): Init assuan sockets.
23096         * dirmngr/http.c: Include dns-stuff.h.
23097         (connect_server)[!HAVE_GETADDRINFO]: Remove all code.
23098         (connect_server): Change to use resolve_dns_name.
23099
23100         dirmngr: Allow use of http.c if USE_NPTH is not defined.
23101         + commit b6af3377e14fad35b9c6041b11888cabce6e8a56
23102         * dirmngr/http.c (send_request): Always set the gnutls pull/push
23103         functions.
23104         (my_npth_read): Rename to ...
23105         (my_gnutls_read) .. this.  Use system read if !USE_NPTH.
23106         (my_npth_write): Rename to ...
23107         (my_gnutls_write) .. this.  Use system write if !USE_NPTH.
23108
23109         dirmngr: Check that getaddrinfo is available.
23110         + commit 6fafda979df8e7e117f8e6929bcce89513a6e746
23111         * dirmngr/Makefile.am (t_http_SOURCES): Add dns-stuff.c.
23112         (t_ldap_parse_uri_SOURCES): Ditto.
23113         * dirmngr/dns-stuff.c: Bail out if neither ADNS nor getaddrinfo is
23114         available.
23115
23116         dirmngr: Use the new DNS wrapper for the HKP engine.
23117         + commit afbe87fa2d259b665b2d67a038a8535cfcfee094
23118         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Change arg type to
23119         dns_addrinfo_t.
23120         (map_host): Replace getaddrinfo by resolve_dns_name.
23121
23122         dirmngr: Implement a getaddrinfo wrapper.
23123         + commit 8bccbf477878fd99baa96e11db9db99aaf1e8d91
23124         * dirmngr/dns-stuff.h: Include some header files.
23125         (dns_addinfo_t, dns_addrinfo_s): New.
23126         * dirmngr/dns-stuff.c: Always include DNS related headers.
23127         (free_dns_addrinfo): New.
23128         (resolve_name_standard): New.
23129         (resolve_dns_name): New.
23130
23131         * dirmngr/t-dns-stuff.c: Include netdb.h.
23132         (main): Keep old default mode with no args but else print outout of
23133         resolve_dns_name.  Revamp option parser.
23134
23135         common: Add more replacement error codes.
23136         + commit ffe60eb3d2b8f7d6c506804ce4645d695c91f237
23137         * common/util.h (GPG_ERR_SERVER_FAILED): New.
23138         (GPG_ERR_NO_KEY): New.
23139         (GPG_ERR_NO_NAME): New.
23140
23141 2015-10-21  Neal H. Walfield  <neal@g10code.com>
23142
23143         gpg: If the saved trust model is unknown, default to tofu+pgp.
23144         + commit 9afeb4cca10c3632495fe71b23df99a4878bd3a5
23145         * g10/trustdb.c (init_trustdb): If the saved trust model is unknown,
23146         default to tofu+pgp instead of pgp.
23147
23148         gpg: Don't accidentally free UTK_LIST.
23149         + commit 8c3b7915d675ca5346c17244654d5c6ab583ac44
23150         * g10/trustdb.c (validate_keys): Don't free UTK_LIST.
23151
23152         gpg: When evaluating trust reg exps, treat tofu+pgp like pgp.
23153         + commit cbaca254ac818c49c18d4480d3c7bd246cc57ae8
23154         * g10/trustdb.c (validate_one_keyblock): When checking trust regular
23155         expressions, treat the tofu+pgp trust model the same as the pgp trust
23156         model.
23157
23158         gpg: If a key is ultimate trusted, return that in the tofu model.
23159         + commit df57390d68482c5b3fa5ff3a42a29ae1b6cbb23c
23160         * g10/tofu.c (get_trust): If the policy is auto or none, check if the
23161         key is ultimately trusted.  If so, return that.
23162         (tofu_register): If the key is ultimately trusted, don't show any
23163         statistics.
23164         (tofu_get_validity): Likewise.
23165
23166         gpg: Keep the trust DB up to date for the tofu and tofu+pgp models.
23167         + commit d05ff81732e20e6f9d6d7a6281a96a312b001abb
23168         * g10/trustdb.c (init_trustdb): Recognize tofu and tofu+pgp as
23169         possibly saved trust models.  Also register the ultimately trusted
23170         keys if the trust model is tofu or tofu+pgp.
23171         (check_trustdb): Don't skip if the trust model is tofu or tofu+pgp.
23172         (update_trustdb): Likewise.
23173         (tdb_check_trustdb_stale): Likewise.
23174         (validate_keys): If the trust model is TOFU, just write out the
23175         ultimately trusted keys.
23176
23177         gpg: Factor out code into a standalone function.
23178         + commit 243f90afba87e99ca42e2451ac5cc59d00a044ac
23179         * g10/trustdb.c (tdb_keyid_is_utk): New function.
23180         (add_utk): Use it.
23181
23182         dirmngr: Allow building with libassuan < 2.3.
23183         + commit a79045e38d239a7f6e787cf7c1132772c737cc0e
23184         * dirmngr/http.c (send_request): Use newer assuan function only if
23185         available.
23186
23187 2015-10-21  Neal H. Walfield  <neal@g10code.com>
23188             Andre Heinecke  <aheinecke@intevation.de>
23189
23190         gpg: Make the tofu DB check and initialization atomic.
23191         + commit 85bd7d9491f8cc13c2b03f19b4f70ea13b45c704
23192         * g10/tofu.c (initdb): Make the version check and the database
23193         initialization atomic.
23194
23195 2015-10-21  Werner Koch  <wk@gnupg.org>
23196
23197         build: Make --disable-g13 the default.
23198         + commit 485e0a221deb5c68f29b6a7a110b349dbe41c027
23199         * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Add --enable-g13.  Remove
23200         --enable-gpgtar because that is enabled anyway.
23201         * configure.ac: Do not build g13 by default.
23202
23203         dirmngr: Rename file dns-cert.c.
23204         + commit 5055b617a94587580bc16a56bb82333077b05693
23205         * dirmngr/dns-cert.c: Rename to dirmngr/dns-stuff.c.
23206         * dirmngr/dns-cert.h: Rename to dirmngr/dns-stuff.h and change
23207         includers.
23208         * dirmngr/t-dns-cert.c: Rename to dirmngr/t-dns-stuff.c.
23209         * dirmngr/Makefile.am: Adjust.
23210
23211         common: Add status code for use by g13.
23212         + commit 42571a38344e39f747315f754700a8181b8744fe
23213         * common/status.h (STATUS_PLAINTEXT_FOLLOWS): New.
23214
23215 2015-10-20  Werner Koch  <wk@gnupg.org>
23216
23217         dirmngr: Prefer ADNS over system resolver.
23218         + commit 58ebe50bdf4837e9ab2d3f8c6e5fcf28c66f26e9
23219         * configure.ac (HAVE_ADNS_IF_TORMODE): New ac_define.
23220         (USE_DNS_CERT): Prefer ADNS over the system resolver.
23221         * dirmngr/dns-cert.c (tor_mode): New global var.
23222         (enable_dns_tormode): New func.
23223         (get_dns_cert): Use DNS resolver at 8.8.8.8 in tor-mode.
23224         * dirmngr/server.c (cmd_dns_cert): If supported allow DNS requests.
23225
23226         w32: Allow building again.
23227         + commit c83b627174f46e841f1ccc018322fe499969c267
23228         * dirmngr/http.c (connect_server): Fix called function name.
23229
23230         build: Allow building without SQLlite support.
23231         + commit 734c61dc9d4915605816803182c9adcc1594e008
23232         * configure.ac: Add option --dsiable-tofu and --disable-sqlite.
23233         (NEED_SQLITE_VERSION): New var.
23234         (USE_TOFU): New ac_define and am_conditional.
23235         * autogen.sh (build-w32): Add PKG_CONFIG_LIBDIR to configure so that
23236         pkg-config find the correct .pc file.
23237
23238         * g10/Makefile.am (tofu_source): New.  Build only if enabled.
23239         * g10/gpg.c (parse_trust_model)[!USE_TOFU]: Disable tofu models.
23240         (parse_tofu_policy)[!USE_TOFU]: Disable all.
23241         (parse_tofu_db_format)[!USE_TOFU]: Disable all.
23242         (main) <aTOFUPolicy>[!USE_TOFU]: Skip.
23243         * g10/keyedit.c (show_key_with_all_names_colon)[!USE_TOFU]: Do not
23244         call tofu functions.
23245         * g10/keylist.c (list_keyblock_colon)[!USE_TOFU]: Ditto.
23246         * g10/trustdb.c (tdb_get_validity_core)[!USE_TOFU]: Skip tofu
23247         processing.
23248
23249 2015-10-20  Neal H. Walfield  <neal@g10code.com>
23250
23251         gpg: Don't die immediately if the TOFU DB is locked.
23252         + commit 26d457c218c2e93b2e2cf316f0c1074c70894d0f
23253         * g10/tofu.c (opendb): Don't die immediately if the DB is locked.
23254
23255         gpg: Improve output.
23256         + commit bc9ff6c85e2d89be4ee873b8a72a214759a66157
23257         * g10/tofu.c (get_trust): Also show the binding when indicating a
23258         conflict occurred.
23259
23260         gpg: Synchronize translation template.
23261         + commit 251c070f91e2c65baa3f1195f14a176440a8aafa
23262         * g10/tofu.c (show_statistics): Synchronize translation template.
23263
23264         gpg: When showing conflicts, also show bindings with no recorded sigs.
23265         + commit d3eca517745a862432fcfeaa729e5333b15ffa6a
23266         * g10/tofu.c (signature_stats_collect_cb): If the time_ago column is
23267         NULL, then both time_ago and count should be 0.
23268         (get_trust): Reverse the direction of the join so that we also get
23269         statistics about bindings without any signatures.
23270
23271         gpg: Improve text.
23272         + commit 445f94bc81b20959a667a4ad80ea6c73059540bf
23273         * g10/tofu.c (show_statistics): Improve text.
23274
23275         gpg: Use the right variable to display the information.
23276         + commit 4957e3236796979b58f35628351505ea5f4e936a
23277         * g10/tofu.c (get_trust): Use the right variable to display the
23278         conflicting key.
23279
23280         gpg: Make failing to create a directory a soft error.
23281         + commit eb8a0b051faa03584b3820200e10301936e82f51
23282         * g10/tofu.c (getdb): Don't exit if we can't create the directory.
23283         Just return an error.
23284
23285         common: Make sure tilde expansion works for the mkdir functions.
23286         + commit c3bb9fccb7963a0918b9ec6a4f10d568fac7c125
23287         * common/mkdir_p.c (gnupg_amkdir_p): Use make_filename_try on the
23288         first directory component as well.
23289
23290         gpg: Remove unused prototype digest_algo_from_sig.
23291         + commit d1a0b520b15bb941cdbf66c2e832c617af778ac8
23292         * g10/packet.h (digest_algo_from_sig): Remove prototype without a
23293         corresponding implementation.
23294
23295 2015-10-19  Werner Koch  <wk@gnupg.org>
23296
23297         dirmngr: Allow building with libassuan < 2.3.
23298         + commit 4e42ad300b3de9fab25095a9e82431b1ea2740e7
23299         * dirmngr/dirmngr.c (set_tor_mode): Use newer assuan function only if
23300         available.
23301         * dirmngr/http.c (http_raw_connect): Ditto.
23302
23303 2015-10-19  Neal H. Walfield  <neal@g10code.com>
23304
23305         gpg: Fix --desig-revoke.
23306         + commit c37621166e9cc2a818de73bc99287a393dbb5744
23307         * g10/revoke.c (gen_desig_revoke): Add additional parameter ctrl.
23308         Check that the secret key is available.  If not, display an error
23309         message.
23310
23311         gpg: Improve function documentation and some comments.
23312         + commit a608ee750dd83bf77a5fb4f0ab5bcf812436ba4d
23313         * g10/main.h: Improve function documentation.
23314         * g10/packet.h.h: Improve function documentation.
23315         * g10/sig-check.c: Improve function documentation and some comments.
23316
23317         gpg: Improve and regularize naming of signature checking functions.
23318         + commit 0433e667029508d6933e8798d3d95bcdde70a7aa
23319         * g10/packet.h (signature_check): Rename from this...
23320         (check_signature): ... to this.  Update users.
23321         (signature_check2): Rename from this...
23322         (check_signature2): ... to this.  Update users.
23323         * g10/sig-check.c (do_check): Rename from this...
23324         (check_signature_end): ... to this.  Update users.
23325         (do_check_messages): Rename from this...
23326         (check_signature_metadata_validity): ... to this.  Update users.
23327
23328         gpg: Mark local function as static.
23329         + commit 547a1b3fb881bb8581d03dbf4eacf49163eaa4b5
23330         * g10/tdbio.c (put_record_into_cache): Mark as static.
23331
23332 2015-10-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
23333
23334         gpg: Print warning when rejecting weak digests.
23335         + commit b98939812abf6c643c752ce7c325f98039a1a9e2
23336         * g10/misc.c (print_md5_rejected_note): Rename to ..
23337         (print_digest_rejected_note): this.  Parameterize function to take an
23338         enum gcry_md_algos.
23339         * g10/sig-check.c: Use print_digest_rejected_note() when rejecting
23340         signatures.
23341
23342         gpg: Add option --weak-digest to gpg and gpgv.
23343         + commit 76afaed65e3b0ddfa4923cb577ada43217dd4b18
23344         * g10/options.h: Add additional_weak_digests linked list to opts.
23345         * g10/main.h: Declare weakhash linked list struct and
23346         additional_weak_digest() function to insert newly-declared weak
23347         digests into opts.
23348         * g10/misc.c: (additional_weak_digest): New function.
23349         (print_digest_algo_note): Check for deprecated digests; use proper
23350         gcry_md_algos type.
23351         * g10/sig-check.c: (do_check): Reject weak digests in addition to MD5.
23352         * g10/gpg.c: Add --weak-digest option to gpg.
23353         * doc/gpg.texi: Document gpg --weak-digest option.
23354         * g10/gpgv.c: Add --weak-digest option to gpgv.
23355         * doc/gpgv.texi: Document gpgv --weak-digest option.
23356
23357 2015-10-19  Werner Koch  <wk@gnupg.org>
23358
23359         dirmngr: Make --use-tor work - still leaks DNS.
23360         + commit 6983fd131f648ba4acd57b266de9868911874d14
23361         * dirmngr/dirmngr.c (set_tor_mode): New.
23362         (main, reread_configuration): Call it.
23363         * dirmngr/http.c (http_raw_connect, send_request): Check whether TOR
23364         mode is enabled if the FORCE_TOR flag is given.
23365
23366         dirmngr: Use Assuan socket wrappers for http.c.
23367         + commit 8c609eaf35b547f02979ef0b206520dd0853b294
23368         * dirmngr/http.c: Include assuan.h.  Changed all code taking a socket
23369         descriptor from int to assuan_fd_t.
23370         (my_unprotect, my_protect): New.
23371         (my_connect): Remove.
23372         (_my_socket_new, _my_socket_unref): use assuan_sock_close.
23373         (connect_server): Use assuan_sock_connect, assuan_sock_new, and
23374         assuan_sock_close.
23375         * dirmngr/Makefile.am (t_common_ldadd): Add LIBASSUAN_LIBS.
23376
23377 2015-10-19  Neal H. Walfield  <neal@g10code.com>
23378
23379         gpg: Fix formatting.
23380         + commit 253afa244487dd8129816615ac2865c9fe812aaf
23381         * g10/tofu.c (get_trust): Fix formatting.
23382
23383         gpg: Don't forget to free some memory.
23384         + commit e56a116f9a1171ccf8b3293887a217953a46fc20
23385         * g10/tofu.c (tofu_register): Free SIG_DIGEST before returning.
23386
23387         gpg: If a conflict occurs in batch mode, record that.
23388         + commit 55d88454652543c98d74376977d855e394df6c92
23389         * g10/tofu.c (get_trust): If a conflict occurs when MAY_ASK is false,
23390         set conflict to the key.  When prompting the user, don't show the
23391         conflicting key if the conflicting key is the current key.
23392
23393 2015-10-18  Werner Koch  <wk@gnupg.org>
23394
23395         gpg: Silence two more warnings.
23396         + commit c2c400714854d5a127a6966200d345d0d6cfc7d4
23397         * g10/trustdb.c (tdb_get_validity_core): Silence a warning.
23398         * g10/tofu.c (tofu_register): Move SIG_DIGEST computation to the top
23399         so that it is not uninitialized in case of an early error.
23400
23401         gpg: Fix harmless compiler warnings.
23402         + commit 558bcd43ae0a841cf1e58e06f5d72a19d5bc70cd
23403         * g10/tofu.h (_tofu_GET_POLICY_ERROR): New.  This avoids warnings
23404         about undefined enum values in a switch.
23405         * g10/trustdb.h (_tofu_GET_TRUST_ERROR): New.
23406         * g10/tofu.c (TIME_AGO_FUTURE_IGNORE): Move to the top.
23407         (opendbs): Avoid compiler warning (use braces).
23408         (GET_POLICY_ERROR): Replace define by enum _tofu_GET_POLICY_ERROR.
23409         (get_policy): Remove assert.
23410         (GET_TRUST_ERROR): Replace by _tofu_GET_TRUST_ERROR macro.
23411         (show_statistics): Undef MIN_SECS et al. after use.
23412
23413         common: Avoid warning about const char ** assignment.
23414         + commit e64c805b0c270d859ddf2c35d573110cf25e8d48
23415         * common/mkdir_p.c (gnupg_amkdir_p): Also strdup first item.  Return
23416         an error on malloc failure.
23417         (gnupg_mkdir_p): Fix type of dirs and tmp_dirs.
23418
23419         Move http module from common/ to dirmngr/.
23420         + commit 5aa1b392b1bf6fcf4cd380862c5affac39a4f34d
23421         * common/http.c: Move to ../dirmngr/.
23422         * common/http.h: Move to ../dirmngr/.
23423         * common/t-http.c: Move to ../dirmngr/.
23424         * common/tls-ca.pem: Move to ../dirmngr/.
23425         * common/Makefile.am: Do not build libcommontls.a libcommontlsnpth.a.
23426         Remove http.c related stuff.
23427         * po/POTFILES.in: Move http.c to dirmngr/.
23428         * dirmngr/Makefile.am (EXTRA_DIST): Add tls-ca.pem.
23429         (module_maint_tests): New.
23430         (noinst_PROGRAMS): Add module_maint_tests.
23431         (dirmngr_SOURCES): Add http.c and http.h.
23432         (dirmngr_LDADD): Remove libcommontlsnpth.
23433         (t_common_ldadd): Ditto.
23434         (t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
23435         (t_ldap_parse_uri_SOURCES): Add http.c.
23436         (t_ldap_parse_uri_CFLAGS): Build without npth.
23437         ($(PROGRAMS)): Do not require libcommontls.a libcommontlsnpth.a.
23438         * dirmngr/dirmngr.h, dirmngr/ks-engine.h: Fix include of http.h.
23439
23440 2015-10-18  Neal H. Walfield  <neal@g10code.com>
23441
23442         g10: Fix assert.
23443         + commit 128a456e775edf393d47e40bb9ae8b62434e2978
23444         * g10/tofu.c (get_trust): Fix assert.
23445
23446         g10: Add TOFU support.
23447         + commit f77913e0ff7be4cd9c6337a70ac715e6f4a43572
23448         * configure.ac: Check for sqlite3.
23449         (SQLITE3_CFLAGS): AC_SUBST it.
23450         (SQLITE3_LIBS): Likewise.
23451         * g10/Makefile.am (AM_CFLAGS): Add $(SQLITE3_CFLAGS).
23452         (gpg2_SOURCES): Add tofu.h and tofu.c.
23453         (gpg2_LDADD): Add $(SQLITE3_LIBS).
23454         * g10/tofu.c: New file.
23455         * g10/tofu.h: New file.
23456         * g10/options.h (trust_model): Define TM_TOFU and TM_TOFU_PGP.
23457         (tofu_db_format): Define.
23458         * g10/packet.h (PKT_signature): Add fields digest and digest_len.
23459         * g10/gpg.c: Include "tofu.h".
23460         (cmd_and_opt_values): Declare aTOFUPolicy, oTOFUDefaultPolicy,
23461         oTOFUDBFormat.
23462         (opts): Add them.
23463         (parse_trust_model): Recognize the tofu and tofu+pgp trust models.
23464         (parse_tofu_policy): New function.
23465         (parse_tofu_db_format): New function.
23466         (main): Initialize opt.tofu_default_policy and opt.tofu_db_format.
23467         Handle aTOFUPolicy, oTOFUDefaultPolicy and oTOFUDBFormat.
23468         * g10/mainproc.c (do_check_sig): If the signature is good, copy the
23469         hash to SIG->DIGEST and set SIG->DIGEST_LEN appropriately.
23470         * g10/trustdb.h (get_validity): Add arguments sig and may_ask.  Update
23471         callers.
23472         (tdb_get_validity_core): Add arguments sig and may_ask.  Update
23473         callers.
23474         * g10/trust.c (get_validity) Add arguments sig and may_ask.  Pass them
23475         to tdb_get_validity_core.
23476         * g10/trustdb.c: Include "tofu.h".
23477         (trust_model_string): Handle TM_TOFU and TM_TOFU_PGP.
23478         (tdb_get_validity_core): Add arguments sig and may_ask.  If
23479         OPT.TRUST_MODEL is TM_TOFU or TM_TOFU_PGP, compute the TOFU trust
23480         level.  Combine it with the computed PGP trust level, if appropriate.
23481         * g10/keyedit.c: Include "tofu.h".
23482         (show_key_with_all_names_colon): If the trust mode is tofu or
23483         tofu+pgp, then show the trust policy.
23484         * g10/keylist.c: Include "tofu.h".
23485         (public_key_list): Also show the PGP stats if the trust model is
23486         TM_TOFU_PGP.
23487         (list_keyblock_colon): If the trust mode is tofu or
23488         tofu+pgp, then show the trust policy.
23489         * g10/pkclist.c: Include "tofu.h".
23490         * g10/gpgv.c (get_validity): Add arguments sig and may_ask.
23491         (enum tofu_policy): Define.
23492         (tofu_get_policy): New stub.
23493         (tofu_policy_str): Likewise.
23494         * g10/test-stubs.c (get_validity): Add arguments sig and may_ask.
23495         (enum tofu_policy): Define.
23496         (tofu_get_policy): New stub.
23497         (tofu_policy_str): Likewise.
23498         * doc/DETAILS: Describe the TOFU Policy field.
23499         * doc/gpg.texi: Document --tofu-set-policy, --trust-model=tofu,
23500         --trust-model=tofu+pgp, --tofu-default-policy and --tofu-db-format.
23501         * tests/openpgp/Makefile.am (TESTS): Add tofu.test.
23502         (TEST_FILES): Add tofu-keys.asc, tofu-keys-secret.asc,
23503         tofu-2183839A-1.txt, tofu-BC15C85A-1.txt and tofu-EE37CF96-1.txt.
23504         (CLEANFILES): Add tofu.db.
23505         (clean-local): Add tofu.d.
23506         * tests/openpgp/tofu.test: New file.
23507         * tests/openpgp/tofu-2183839A-1.txt: New file.
23508         * tests/openpgp/tofu-BC15C85A-1.txt: New file.
23509         * tests/openpgp/tofu-EE37CF96-1.txt: New file.
23510         * tests/openpgp/tofu-keys.asc: New file.
23511         * tests/openpgp/tofu-keys-secret.asc: New file.
23512
23513 2015-10-16  Neal H. Walfield  <neal@g10code.com>
23514
23515         common: Prefix the mkdir functions with gnupg_.  Make args const.
23516         + commit 93e855553eba03f5c31682e0aaf39f18f29860b7
23517         * common/mkdir_p.h (mkdir_p): Rename from this...
23518         (gnupg_mkdir_p): ... to this.  Change directory_component's type from
23519         char * to const char *.
23520         (amkdir_p): Rename from this...
23521         (gnupg_amkdir_p): ... to this.  Change directory_component's type from
23522         char * to const char *.
23523         * common/mkdir_p.c (mkdir_p): Rename from this...
23524         (gnupg_mkdir_p): ... to this.  Change directory_component's type from
23525         char * to const char *.
23526         (amkdir_p): Rename from this...
23527         (gnupg_amkdir_p): ... to this.  Change directory_component's type from
23528         char * to const char *.
23529
23530 2015-10-14  NIIBE Yutaka  <gniibe@fsij.org>
23531
23532         cleanup: Fix confusion between gpg_error_t and gpg_err_code_t.
23533         + commit 3de5ef759895837fe499cff7fb1fa7798e6d5754
23534         * dirmngr/crlcache.c (hash_dbfile): Use gpg_error_t for ERR.
23535         * kbx/keybox-update.c (keybox_set_flags): Call
23536         gpg_err_code_from_syserror.
23537
23538 2015-10-13  NIIBE Yutaka  <gniibe@fsij.org>
23539
23540         po: Update Japanese translation.
23541         + commit 0b4ebc398cc8aad3f25f84034cd6b129e55f1368
23542
23543
23544 2015-10-12  Werner Koch  <wk@gnupg.org>
23545
23546         gpg: Try hard to use MDC also for sign+symenc.
23547         + commit 4584125802be11833a5b289e864b45eedc2b45fd
23548         * g10/encrypt.c (use_mdc): Make it a global func.
23549         * g10/sign.c (sign_symencrypt_file): Use that function to decide
23550         whether to use an MDC.
23551         * tests/openpgp/conventional-mdc.test: Add a simple test case.
23552
23553 2015-10-09  Werner Koch  <wk@gnupg.org>
23554
23555         Release 2.1.9.
23556         + commit 086b8738f71ba26d36287db81f6d78116053ba66
23557
23558
23559 2015-10-09  NIIBE Yutaka  <gniibe@fsij.org>
23560
23561         agent: simplify agent_get_passphrase.
23562         + commit 5a12c45666cd16bc750d7f0e63620c295feb77ea
23563         * agent/call-pinentry.c (agent_get_passphrase): Simplify.
23564
23565         agent: fix agent_askpin.
23566         + commit 818fa4f71e1056831b35d0f8aff715c0e1d537e6
23567         * agent/call-pinentry.c (agent_askpin): Fix off-by-one error.
23568
23569         agent: Fix function return type for check_cb and agent_askpin.
23570         + commit f70f6695368444d8058305ab696e5e5a1bace18c
23571         * agent/call-pinentry.c (unlock_pinentry): Return gpg_error_t.
23572         (start_pinentry, setup_qualitybar): Likewise.
23573         (agent_askpin): Fix return value check of check_cb.
23574         * agent/command-ssh.c (reenter_compare_cb): Return gpg_error_t.
23575         (ssh_identity_register): Fix return value check of agent_askpin.
23576         * agent/cvt-openpgp.c (try_do_unprotect_cb): Return gpg_error_t.
23577         * agent/findkey.c (try_unprotect_cb): Likewise.
23578         * agent/genkey.c (reenter_compare_cb): Return gpg_error_t.
23579         (agent_ask_new_passphrase): Fix return value check of agent_askpin.
23580
23581 2015-10-08  Andre Heinecke  <aheinecke@intevation.de>
23582
23583         dirmngr: Default to http protocol for http-proxy.
23584         + commit ea079d283de6bf4ac70d7530fac70938e7c5e8f5
23585         * common/http.c (send_request): Fix handling for hostname:port string.
23586
23587 2015-10-08  Werner Koch  <wk@gnupg.org>
23588
23589         common: Allow building of mkdir_p.c for Windows.
23590         + commit 4c298525903f844eee95ecbcdc45f5ac034fa148
23591         * common/mkdir_p.c: Change license and comment debug statements.
23592         (amkdir_p, mkdir_p): Fail on malloc error and use default_errsource to
23593         build an error code.  Change return value to gpg_error_t.
23594         (amkdir_p): Use gnupg_mkdir.
23595
23596         * common/membuf.c: Include util.h first to avoid redefined macro
23597         warnings.
23598
23599         gpg: Add option --print-dane-records.
23600         + commit d7b8e76f9930750d669405dee3108c9bc8e87b91
23601         * g10/options.h (opt): Add field "print_dane_records".
23602         * g10/gpg.c (oPrintDANERecords): new.
23603         (opts): Add --print-dane-records.
23604         (main): Set that option.
23605         * g10/export.c (do_export): Remove EXPORT_DANE_FORMAT handling.
23606         (do_export_stream): Add EXPORT_DANE_FORMAT handling.
23607         * g10/keylist.c (list_keyblock_pka): Implement DANE record printing.
23608
23609         * g10/gpgv.c (export_pubkey_buffer): New stub.
23610         * g10/test-stubs.c (export_pubkey_buffer): New stub.
23611
23612         gpg: Pass CTRL parameter to all key listing functions.
23613         + commit b6d621583fc9cbda6f9376a24f2f4cf11499a4fd
23614         * g10/keylist.c (public_key_list): Add arg CTRL.
23615         (secret_key_list): Ditto.
23616         (list_all, list_one): Ditto.
23617         (locate_one): Ditto.
23618         (list_keyblock_pka): Ditto.
23619         (list_keyblock): Ditto.
23620         (list_keyblock_direct): Ditto.
23621         * g10/keygen.c (proc_parameter_file): Add arg CTRL.
23622         (read_parameter_file): Ditto.
23623         (quick_generate_keypair): Ditto.
23624         (do_generate_keypair): Ditto.
23625         (generate_keypair): Pass arg CTRL.
23626         * g10/gpg.c (main): Pass arg CTRL to quick_generate_keypair.
23627
23628 2015-10-07  Werner Koch  <wk@gnupg.org>
23629
23630         gpg: Remove unfinished experimental code to export as S-expressions.
23631         + commit a400958323d93036dca9c63135b167012ea64f8b
23632         * g10/options.h (EXPORT_SEXP_FORMAT): Remove.
23633         (EXPORT_DANE_FORMAT): New.
23634         * g10/export.c (parse_export_options): Remove "export-sexp-format".
23635         (export_seckeys): Adjust for removed option.
23636         (export_secsubkeys): Ditto.
23637         (do_export): Prepare for DANE format.
23638         (build_sexp, build_sexp_seckey): Remove.
23639         (do_export_stream): Remove use of removed functions.
23640
23641 2015-10-06  Werner Koch  <wk@gnupg.org>
23642
23643         gpg: Add new --auto-key-locate mechanism "dane".
23644         + commit 9ac31f91b10059474da1c9580fb99e94278d4c11
23645         * g10/call-dirmngr.c (gpg_dirmngr_dns_cert): Allow fetching via DANE.
23646         * g10/keyserver.c (keyserver_import_cert): Add arg "dane_mode".
23647         * g10/options.h (AKL_DANE): New.
23648         * g10/getkey.c (get_pubkey_byname): Implement AKL_DANE.
23649         (parse_auto_key_locate): Ditto.
23650
23651         dirmngr: Addlow fetching keys using OpenPGP DANE.
23652         + commit 264a81d82737369ee8beef771cf2bd2cd874320a
23653         * dirmngr/server.c (cmd_dns_cert): Add option --dane.
23654
23655         dirmngr: Improve DNS code to retrieve arbitrary records.
23656         + commit 211b8084ee4391baec35e8c5bd75a9ecbcb889a7
23657         * dirmngr/dns-cert.c (get_dns_cert): Add hack to retrieve arbitrary
23658         resource records.
23659         * dirmngr/dns-cert.h (DNS_CERTTYPE_RRBASE): New.
23660         (DNS_CERTTYPE_RR61): New.
23661
23662         dirmngr: Change DNS code to make additions easier.
23663         + commit 6cf80dc77ec5df3722924301ff4be2475966937b
23664         * dirmngr/dns-cert.c (get_dns_cert) [!USE_ADNS]: Change loop to allow
23665         adding more resource types.
23666
23667         dirmngr: Make commands RELOADDIRMNGR and KILLDIRMNGR work properly.
23668         + commit 7faf45effcd47d2d04d35090a1e01a1dbb99ec70
23669         * dirmngr/server.c (cmd_killdirmngr): Set assuan close flag.
23670         (cmd_reloaddirmngr): Use check_owner_permission.
23671
23672         dirmngr: Do tilde expansion for --hkp-cacert.
23673         + commit 9db6547a00cded92c00c8f8382b1b605be1027d2
23674         * dirmngr/dirmngr.c (parse_rereadable_options): Do tilde expansion and
23675         check for cert file existance in option --hkp-cacert.
23676
23677         gpg: Fail decryption for AES etc message w/o MDC.
23678         + commit 625e292108cc0fd9077769587a8c22abe7805e33
23679         * g10/mainproc.c (proc_encrypted): Fail for modern messages w/o MDC.
23680
23681 2015-10-06  NIIBE Yutaka  <gniibe@fsij.org>
23682
23683         agent: Fix verification of signature for smartcard.
23684         + commit 4a5bd1720f5a3dbb26f5daeb03725cae29be7e24
23685         * agent/pksign.c (agent_pksign_do): Use public key smartcard.
23686
23687         agent: Fix non-allocation for pinentry_loopback.
23688         + commit ce2a84b58833fd308d5fe11756721f39c953280a
23689         * agent/call-pinentry.c (agent_get_passphrase): Don't allocate, it will
23690         be allocated by pinentry_loopback.
23691
23692 2015-10-05  Werner Koch  <wk@gnupg.org>
23693
23694         gpg: Install a dirmngr.conf file.
23695         + commit f3959f14b6c496c726bbca5230becb7b6844a234
23696         * g10/dirmngr-conf.skel: New.
23697         * g10/Makefile.am (EXTRA_DIST): Add file.
23698         (install-data-local, uninstall-local): Install that file.
23699         * g10/openfile.c (copy_options_file): Add arg "name", return a value,
23700         simplify with xstrconcat, and factor warning message out to:
23701         (try_make_homedir): here.  Also install dirmngr.conf.
23702         * g10/options.skel: Remove --keyserver entry.
23703
23704         gpg: Deprecate the --keyserver option.
23705         + commit ae471fa978589fb61ecb0f89bbfe4d43cf2d5eac
23706         * g10/keyserver.c (keyserver_refresh): Change return type to
23707         gpg_error_t.  Use gpg_dirmngr_ks_list to print the name of the
23708         keyserver to use.
23709         (keyserver_search): Do not print the "no keyserver" error
23710         message.  The same error is anyway returned from dirmngr.
23711         * g10/call-dirmngr.c (ks_status_parm_s): Add field "keyword".
23712         (ks_status_cb): Handle other status keywords.
23713         (gpg_dirmngr_ks_list): New.
23714         * tools/gpgconf-comp.c (gc_options_gpg): Deprecate "keyserver".
23715         (gc_options_dirmngr): Add "Keyserver" group and "keyserver".
23716
23717         dirmngr: Add option --keyserver.
23718         + commit a48e6de603c3a312f02b1b5fdb813032eeae9074
23719         * dirmngr/dirmngr.c (oKeyServer): New.
23720         (opts): Add "keyserver".
23721         (parse_rereadable_options): Parse that options
23722         (main): Add option to the gpgconf list.
23723         * dirmngr/dirmngr.h (opt): Add field "keyserver".
23724         * dirmngr/server.c (ensure_keyserver): New.
23725         (make_keyserver_item): New.  Factored out from
23726         (cmd_keyserver): here.  Call ensure_keyserver.
23727         (cmd_ks_search): Call ensure_keyserver.
23728         (cmd_ks_get): Ditto.
23729         (cmd_ks_fetch): Ditto.
23730         (cmd_ks_put): Ditto.
23731
23732         dirmngr: Make clear that --use-tor is not yet ready for use.
23733         + commit 438730323a5d9bbf8dd5cd60d479b6c03f8721d0
23734         * dirmngr/dirmngr.c (main): Print a warning if --use-tor has been
23735         given.
23736         * tools/gpgconf-comp.c (gc_options_dirmngr): Make --use-tor invisible.
23737
23738         gpgconf: Change displayed name of Dirmngr to "Key Acquirer".
23739         + commit c6400c1aa82239f1c154ca27596600cae964515d
23740         * tools/gpgconf-comp.c (gc_component): Change printed name.
23741
23742 2015-10-02  Werner Koch  <wk@gnupg.org>
23743
23744         dirmngr: Fix use-after-free due to a realloc shrinking.
23745         + commit 75c64c2b6d77856b90903cc3b7c6a2f62ff8eb7b
23746         * dirmngr/ks-engine-hkp.c (map_host): Do not use original pointer
23747         after realloc.
23748
23749         agent: Fix alignment problem with the second passphrase struct.
23750         + commit ddf9dd135acd2b3635bb986f6dfc0e4e446d5fad
23751         * agent/genkey.c (agent_ask_new_passphrase): Use a separate malloc for
23752         PI2.  Check return value of the malloc function.
23753         * agent/command-ssh.c (ssh_identity_register): Use a separate malloc
23754         for PI2.  Wipe PI2.
23755
23756 2015-10-01  Werner Koch  <wk@gnupg.org>
23757
23758         gpg: Fix a practical hang after use of --faked-system-time.
23759         + commit 2acceba5cc299796c7b5b1851a9baeb75d9f32a1
23760         * g10/sign.c (update_keysig_packet): Bail out if we would need to long
23761         for a new timestamp.
23762
23763         gpg: Print more info with "check selfsig".
23764         + commit 2c60663a72f090573c4869e305b098b4b1fb23bd
23765         * g10/keyedit.c (print_and_check_one_sig): Print more Some sigsub
23766         packets.
23767
23768         gpg: Add debug helper to --edit-keys's check sub-command.
23769         + commit 13a3f65968f4a8205ca664cc46b1a53de4dc489b
23770         * g10/keyedit.c (print_and_check_one_sig): Add arg "extended" and
23771         print an asterisk for the chosen selfsig.
23772         (check_all_keysigs): Add arg "only_selfsig"
23773         (keyedit_menu) <cmdCHECK>: Add optional arg "selfsig".
23774
23775 2015-10-01  NIIBE Yutaka  <gniibe@fsij.org>
23776
23777         common: Fix strsplit.
23778         + commit a9895a5a72a851c5fcc70f16d5f8f588cc885751
23779         * common/stringhelp.c (strsplit): Fix arguments order.
23780
23781 2015-09-30  Neal H. Walfield  <neal@g10code.com>
23782
23783         common: Add mkdir_p.
23784         + commit c8584a1e559bc720412e1a2fc546a54ff4517205
23785         * common/mkdir_p.c: New file.
23786         * common/mkdir_p.h: New file.
23787         * common/Makefile.am (common_sources): Add mkdir_p.c and mkdir_p.h.
23788
23789         common: Remove unused files.
23790         + commit 5576146ede40b42bc632fd9697dd429a4d1409cf
23791         * common/xmalloc.c: Remove file.
23792         * common/xmalloc.h: Remove file.
23793
23794         common: Include <gpg-error.h>.
23795         + commit 270d3f55f9193ebda5e1b642d58daf905019914d
23796         * common/logging.h: Include <gpg-error.h>.
23797
23798 2015-09-29  Neal H. Walfield  <neal@g10code.com>
23799
23800         g10: Remove unused struct cmp_help_context_s.
23801         + commit 8ab63e4b5018044ecfb0b9910412487066886826
23802         * g10/sig-check.c (struct cmp_help_context_s) Remove unused struct.
23803
23804         g10: Avoid an unnecessary copy.
23805         + commit 12443eafa6e19b94a8b554126423e2a5ccc2dd7e
23806         * g10/sig-check.c (signature_check2): Avoid copying PK to RET_PK.
23807         Instead, directly use the provided storage.  If none is provided
23808         allocate some.
23809
23810 2015-09-29  NIIBE Yutaka  <gniibe@fsij.org>
23811
23812         ssh: Fix fingerprint computation for EdDSA key.
23813         + commit 5c067d54d349fdfb3243634789c8841515d2c28f
23814         * common/ssh-utils.c (get_fingerprint): Handle the prefix of 0x40.
23815         * common/t-ssh-utils.c (sample_keys): Add a new key.
23816
23817         agent: RSA signature verification by gpg-agent.
23818         + commit cfbe6ba9cf1414e9aa4977e2bbaecaa43154b2ae
23819         * g10/sign.c (do_sign): Let verify signature by gpg-agent.
23820         * agent/pksign.c (agent_pksign_do): Call gcry_pk_verify for RSA.
23821
23822 2015-09-28  Werner Koch  <wk@gnupg.org>
23823
23824         common: Provide two new error code replacements.
23825         + commit f1effdc5ecd0cc52a28db7ae28a5c28f33486542
23826         * common/util.h (GPG_ERR_FALSE, GPG_ERR_TRUE): Rew replcements.
23827
23828         common: Change calling convention for gnupg_spawn_process.
23829         + commit 83811e3f1f0c615b2b63bafdb49a35a0fc198088
23830         * common/exechelp.h (GNUPG_SPAWN_NONBLOCK): New.
23831         (GNUPG_SPAWN_RUN_ASFW, GNUPG_SPAWN_DETACHED): Macro to replace the
23832         numbers.
23833         * common/exechelp.h (gnupg_spawn_process): Change function to not take
23834         an optional stream for stdin but to return one.
23835         * common/exechelp-posix.c (gnupg_spawn_process): Implement change.
23836         (create_pipe_and_estream): Add args outbound and nonblock.
23837         * common/exechelp-w32.c (gnupg_spawn_process): Implement change.
23838
23839 2015-09-28  NIIBE Yutaka  <gniibe@fsij.org>
23840
23841         scd: Handle error correctly.
23842         + commit 6bb7206e357acfd7276a8f1334c0f0c9cc6ed100
23843         * scd/apdu.c (apdu_connect): Initialize variables and check an error
23844         of apdu_get_status_internal.
23845
23846 2015-09-22  Werner Koch  <wk@gnupg.org>
23847
23848         ssh: Add 256, 384 and 521 bit test keys for the fingerprint.
23849         + commit 12ff806d1b63d08cb43d131065d51353495d9346
23850         * common/t-ssh-utils.c (sample_keys): Add 3 new keys.
23851
23852         ssh: Fix fingerprint computation for 384 bit ECDSA keys.
23853         + commit 2167951b275bae51cf669c02547e2e7ea8fbe2ee
23854         * common/ssh-utils.c (get_fingerprint): Fix hashed string.
23855
23856 2015-09-19  NIIBE Yutaka  <gniibe@fsij.org>
23857
23858         agent: Fix importing ECC key.
23859         + commit 1542dc604b9c3e6a6a99750c48f7800e72584a89
23860         * agent/cvt-openpgp.c (convert_from_openpgp_main): Only encrypted
23861         parameters are stored as opaque.
23862         (apply_protection): ARRAY members are all normal, non-opaque MPI.
23863         (extract_private_key): Get public key as normal, non-opaque MPI.
23864         Remove support of ECC key with '(flags param)'.
23865         Remove support of "ecdsa" and "ecdh" keys of our experiment.
23866
23867         scd: Fix KEYTOCARD handling for ECC key.
23868         + commit 708b7eccdef8d274bd5578b9a5fd908e9685c795
23869         * scd/app-openpgp.c (ecc_writekey): Only public key can be native
23870         format.
23871
23872 2015-09-19  Neal H. Walfield  <neal@g10code.com>
23873
23874         common: Add new function strlist_length.
23875         + commit 8499c4f84a664bedbdf5a5689cb02420909f1968
23876         * common/strlist.c (strlist_length): New function.
23877
23878 2015-09-18  Werner Koch  <wk@gnupg.org>
23879
23880         gpgconf: Change displayed name of Dirmngr to "Network Manager".
23881         + commit 819bba75aaed11ecef2e274add173718358212b9
23882         * tools/gpgconf-comp.c (gc_component): Change printed name.
23883
23884         dirmngr: Add option --use-tor as a stub.
23885         + commit c091816b4a90d7eea6f8601ec1522a0a006794e8
23886         * dirmngr/dirmngr.h (opt): Add field "use_tor".
23887         * dirmngr/dirmngr.c (oUseTor): New.
23888         (opts): Add --use-tor.
23889         (parse_rereadable_options): Set option.
23890         (main): Tell gpgconf about that option.
23891
23892         * dirmngr/crlfetch.c (crl_fetch): Pass TOR flag to the http module and
23893         return an error if LDAP is used in TOR mode.
23894         (ca_cert_fetch): Return an error in TOR mode.
23895         (start_cert_fetch): Ditto.
23896         * dirmngr/ks-engine-finger.c (ks_finger_fetch): Pass TOR flag to the
23897         http module.
23898         * dirmngr/ks-engine-hkp.c (send_request): Ditto.
23899         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
23900         * dirmngr/ks-engine-ldap.c (ks_ldap_get): Return an error in TOR mode.
23901         (ks_ldap_search): Ditto.
23902         (ks_ldap_put): Ditto.
23903         * dirmngr/ocsp.c (do_ocsp_request): Ditto.  Also pass TOR flag to the
23904         http module.
23905
23906         * dirmngr/server.c (option_handler): Add "honor-keyserver-url-used".
23907         (cmd_dns_cert): Return an error in TOR mode.
23908         (cmd_getinfo): Add subcommand "tor"
23909         * tools/gpgconf-comp.c (gc_options_dirmngr): Add TOR group.
23910
23911         gpg: Report a conflict between honor-keyserver-url and TOR.
23912         + commit d5a3142b8f2e5603357182f34f0b081b47eda23c
23913         * g10/call-dirmngr.c (create_context): Send option and print a verbose
23914         error.
23915
23916         http: Add flag to force use of TOR (part 1)
23917         + commit b4bc1c8b10c7a794fa108678b80f76366a65c47d
23918         * common/http.h (HTTP_FLAG_FORCE_TOR): New.
23919         * common/http.c (http_raw_connect, send_request): Detect flag and
23920         return an error for now.
23921
23922 2015-09-17  NIIBE Yutaka  <gniibe@fsij.org>
23923
23924         po: Update Japanese translation.
23925         + commit f986b23e13eaa2d7705733b4bf6b5210311f181a
23926
23927
23928         scd: Fix ccid-driver timeout for OpenPGPcard v2.1.
23929         + commit 6510df3a7cd2b5bf44fac1e4d50ee54b8c897daa
23930         * scd/ccid-driver.c (CCID_CMD_TIMEOUT): New.
23931         (ccid_transceive_apdu_level, ccid_transceive): Use.
23932
23933 2015-09-16  Werner Koch  <wk@gnupg.org>
23934
23935         agent: New option --pinentry-invisible-char.
23936         + commit 93d257c81952cbb08a744a9cea6749639aa32cd7
23937         * agent/gpg-agent.c (oPinentryInvisibleChar): New.
23938         (opts): Add option.
23939         (parse_rereadable_options): Set option.
23940         * agent/agent.h (opt): Add field pinentry_invisible_char.
23941         * agent/call-pinentry.c (start_pinentry): Pass option to pinentry.
23942
23943         g13: Move some code to a separate module.
23944         + commit 9e65bbd255c43f0e59f35b0003052234d69042be
23945         * g13/g13-common.c, g13/g13-common.h: New.
23946         * g13/Makefile.am (g13_SOURCES): Add new files.
23947         * g13/g13.c (g13_errors_seen): Move to g13-common.c.
23948         (cmdline_conttype): New.
23949         (main): Use g13_init_signals and g13_install_emergency_cleanup.
23950         (emergency_cleanup, g13_exit): Move to g13-common.c.
23951         * g13/g13.h: Move OPT and some other code to g13-common.h.
23952
23953         gpg: Fix skip function dummy parameter.
23954         + commit 8eb3a1797a1e7cb59a8342a8aa917756fe67949f
23955         * g10/trustdb.c (search_skipfnc): Fix dummy argument
23956
23957         gpg: Change last commit to avoid extra translations.
23958         + commit f71ed902def81f9408d9094289d8a97abaa0f609
23959         * g10/keyedit.c (keyedit_menu): Do not print usage hints in expert
23960         mode.
23961
23962 2015-09-16  Neal H. Walfield  <neal@g10code.com>
23963
23964         g10: Improve error message.
23965         + commit 172af881a1cfe82dfec1c43102d6c464e67ef230
23966         * g10/keyedit.c (keyedit_menu): When complaining that a user ID or key
23967         must be selected, indicate what command to use to do this.
23968
23969         g10: Be more careful when merging self-signed data.
23970         + commit 6845737736d3264d7ee8b7364d908951010084c9
23971         * g10/getkey.c (merge_selfsigs_main): Stop looking for self-signed
23972         data belonging to the public key when we encounter an attribute packet
23973         or a subkey packet, not just a user id packet.  When looking for
23974         self-signed data belonging to a user id packet, stop when we see a
23975         user attribute packet.
23976
23977         g10: Simplify some complicated boolean expressions.
23978         + commit c31e089129c0102c1710522d71fbe1880e84d68e
23979         * g10/getkey.c (finish_lookup): Simplify logic.
23980
23981         g10: Also mark revoked and expired keys as unusable.
23982         + commit 77c2ad4a817c129b899708399ed2078a52b452b8
23983         * g10/getkey.c (skip_unusable): Also mark the key as unusable if it
23984         has been revoked or has expired.
23985
23986         g10: Release resources when returning an error in get_seckey.
23987         + commit 1b601de06a57c78537a336093d2531d8c58bc0d2
23988         * g10/getkey.c (get_seckey): If the key doesn't have a secret key,
23989         release *PK.
23990
23991         g10: Improve documentation and comments for getkey.c.
23992         + commit cab581c486e1987445092b1afdf2cba1f62d017d
23993         * g10/getkey.c: Improve documentation and comments for most
23994         functions.  Move documentation for public functions from here...
23995         * g10/keydb.h: ... to here.
23996
23997         g10: Remove unused function have_any_secret_key.
23998         + commit 7333e704efde6923d4b914b37e9a92c4a5bab156
23999         * g10/getkey.c (have_any_secret_key): Remove function.
24000
24001         g10: Bring cache semantics closer to non-cache semantics.
24002         + commit 5e233e12f55be00f5659c63bc32fbdca2ec93136
24003         * g10/getkey.c (get_pubkey_fast): When reading from the cache, only
24004         consider primary keys.
24005
24006         g10: Break out of the loop earlier.
24007         + commit 3940f10af7915b080bf4ed25ceb7e20b52e3cd3e
24008         * g10/getkey.c (have_secret_key_with_kid): Once we find the relevent
24009         key or subkey, stop searching.
24010
24011         g10: Don't skip legacy keys if the search mode is KEYDB_SEARCH_MODE_NEXT
24012         + commit 50affffe93a07643f2610c7a5f3d6f61988855e8
24013         * g10/getkey.c (lookup): Also don't skip legacy keys if the search
24014         mode is KEYDB_SEARCH_MODE_NEXT.
24015
24016         g10: Remove unused function get_seckeyblock_byfprint.
24017         + commit efbaa8f891812e13ae9e689299aa2cd51781ccb3
24018         * g10/keydb.h (get_seckeyblock_byfprint): Remove prototype.
24019         * g10/getkey.c (get_seckeyblock_byfprint): Remove function.
24020
24021         g10: Remove unused function get_seckey_byfprint.
24022         + commit e2b300801ed7143fa924df5442ec2b61079c0bbb
24023         * g10/keydb.h (get_seckey_byfprint): Remove prototype.
24024         * g10/getkey.c (get_seckey_byfprint): Remove function.
24025
24026         g10: Simplify get_seckey_byname: it was never called with NAME not NULL.
24027         + commit 80dbf8006ffe52e77930b0a6dca9d8caba8c3fd5
24028         * g10/keydb.h (get_seckey_byname): Rename from this...
24029         (get_seckey_default): ... to this.  Drop the parameter name.  Update
24030         users.
24031         * g10/getkey.c (get_seckey_byname): Rename from this...
24032         (get_seckey_default): ... to this.  Drop the parameter name.  Drop the
24033         code which assumed that NAME is not NULL.
24034
24035         g10: Eliminate the redundant function get_keyblock_byfprint.
24036         + commit dc69804ab0576fbc87297215d63b37a680d74d4d
24037         * g10/keydb.h (get_keyblock_byfprint): Remove prototype.  Replace use
24038         of this function with get_pubkey_byfprint.
24039         * g10/getkey.c (get_pubkey_byname): Remove function.
24040
24041         g10: Simplify semantics of get_pubkey_byname.
24042         + commit 911fcca36d61afd061e9e6dc0584bb069353db89
24043         * g10/getkey.c (get_pubkey_byname): If R_KEYBLOCK is not NULL, return
24044         the keyblock in R_KEYBLOCK independent of whether PK is set or not.
24045
24046         g10: Eliminate the redundant function get_pubkey_byname.
24047         + commit b4672e4d48fb1e1e4d17551c4c828763d1dfbb57
24048         * g10/getkey.c (get_pubkey_byname): Remove function.
24049         (lookup): Replace use of get_pubkey_byname by get_pubkey_byfprint.
24050
24051         g10: Eliminate the redundant function get_pubkey_end.
24052         + commit 65e58ae6748c280c8633d2ca5f227ebe1220805d
24053         * g10/keydb.h (get_pubkey_end): Remove declaration.  Replace use of
24054         function with getkey_end.
24055         * g10/getkey.c (get_pubkey_byname): Remove function.
24056
24057         g10: Eliminate the redundant function get_pubkey_next.
24058         + commit be6743b2e19241f66148bf89c3442d8e2ebcd63e
24059         * g10/keydb.h (get_pubkey_next): Remove prototype.
24060         * g10/getkey.c (get_pubkey_next): Remove function.
24061         * g10/keylist.c (locate_one): Use getkey_next instead of
24062         get_pubkey_next.
24063
24064         kbx: Change skipfnc's prototype so that we can provide all information.
24065         + commit 9acbeac23668a1d0dabca27d7825430d76e095c2
24066         * kbx/keybox-search-desc.h (struct keydb_search_desc.skipfnc): Change
24067         third parameter to be the index of the user id packet in the keyblock
24068         rather than the packet itself.  Update users.
24069
24070         g10: Remove unused prototype (get_pubkey_byfpr).
24071         + commit 83e17ab1b4cf4420f2abaf9e1f4017a9473fb281
24072         * g10/keydb.h (get_pubkey_byfpr): Remove unused prototype.
24073
24074         g10: Remove unused function (get_pubkey_bynames).
24075         + commit b06f96ba4f57f55194efcd37a0e3a2aa5450b974
24076         * g10/keydb.h (get_pubkey_bynames): Remove prototype.
24077         * g10/getkey.c (get_pubkey_bynames): Remove function.
24078
24079         g10: Simplify code.  Turn struct getkey_ctx_s.found_key into an argument
24080         + commit d47e84946ee010917cfc3501062721b74afbb771
24081         * g10/getkey.c (struct getkey_ctx_s): Remove field found_key.
24082         (lookup): Add argument ret_found_key.  If not NULL, set it to the
24083         found key.  Update callers.
24084         (pk_from_block): Add argument found_key.  Use it instead of
24085         CTX->FOUND_KEY.  Update callers.
24086         (finish_lookup): Return a KBNODE (the found key) instead of an int.
24087         Don't set CTX->FOUND_KEY.  Return the found key instead.
24088
24089         g10: Remove unused field struct getkey_ctx_s.kbpos.
24090         + commit c110e186e07fb1035dc757d322274f939df1c86d
24091         * g10/getkey.c (struct getkey_ctx_s): Remove field kbpos.
24092         (getkey_end): Don't clear CTX->KBPOS.
24093
24094         g10: Simplify code: remove field struct getkey_ctx_s.keyblock.
24095         + commit 3798f73c07f33576bd02ba4a3256c626bd80752f
24096         * g10/getkey.c (struct getkey_ctx_s): Remove field keyblock.
24097         (finish_lookup): Add parameter keyblock.  Update caller to pass this.
24098         (lookup): Add new local variable keyblock.  Use this instead of
24099         ctx->keyblock for referencing the keyblock.
24100
24101 2015-09-16  NIIBE Yutaka  <gniibe@fsij.org>
24102
24103         agent: Fix registering SSH Key of Ed25519.
24104         + commit 7d5999f0964c9412c0e18eb1adefdb729be68cd4
24105         * agent/command-ssh.c (stream_read_string): Add the prefix of 0x40.
24106
24107 2015-09-15  NIIBE Yutaka  <gniibe@fsij.org>
24108
24109         po: Update Japanese translation.
24110         + commit faee25e670cfeb0d0166d7c59cc6a0b3842ee34d
24111
24112
24113 2015-09-10  Werner Koch  <wk@gnupg.org>
24114
24115         Release 2.1.8.
24116         + commit 311816f6cf9d411dba060603e3c5d01c72824645
24117
24118
24119         tests: Silence the 5gb-packet test.
24120         + commit 7a0c3cc760367024305d23e2124ea4cbc7e802df
24121         * tests/openpgp/4gb-packet.test: Send output to /dev/null.
24122
24123         g10: Fix make distcheck problem.
24124         + commit e92a8ab021672b19e5cd397fa555fcc8a3401e8b
24125         * g10/test.c: Include string.h.
24126         (prepend_srcdir): New.  Taken from Libgcrypt.
24127         (test_free): New.
24128         * g10/t-keydb.c (do_test): Malloc the filename.
24129         * g10/Makefile.am (AM_CPPFLAGS): Remove -DSOURCE_DIR
24130         (EXTRA_DIST): Add t-keydb-keyring.kbx.
24131
24132         g10: Improve portability of the new test driver.
24133         + commit fbf24cd09abcdc3dec21db4114ab2db99ce21e4c
24134         * g10/test.c: Include stdio.h and stdlib.h.
24135         (verbose): New.
24136         (print_results): Rename to exit_tests.
24137         (main): Remove atexit and call exit_tests.  Set verbose.
24138         (ASSERT, ABORT): Call exit_tests instead of exit.
24139
24140 2015-09-09  Werner Koch  <wk@gnupg.org>
24141
24142         dirmngr: Allow sending much larger keyblocks.
24143         + commit 19545e3a2d2990cba6d62f98cdb1f665b38ba4f1
24144         * dirmngr/server.c (MAX_CERT_LENGTH): Increase to 16k.
24145         (MAX_KEYBLOCK_LENGTH): Increase to 20M.
24146
24147 2015-09-07  NIIBE Yutaka  <gniibe@fsij.org>
24148
24149         scd: Force key attribute change for writekey.
24150         + commit f10b427d0e2be333776fee2df8150145da36e587
24151         * scd/app-openpgp.c (change_rsa_keyattr): New.
24152         (change_keyattr_from_string): Use change_rsa_keyattr.
24153         (rsa_writekey): Call change_rsa_keyattr when different size.
24154         (ecc_writekey): Try to change key attribute.
24155
24156         scd: KEYNO cleanup.
24157         + commit fd689e85423d0d80d725f0315c52d94f0e9766f8
24158         * scd/app-openpgp.c (get_public_key, send_keypair_info, do_readkey)
24159         (change_keyattr, change_keyattr_from_string, ecc_writekey, do_genkey)
24160         (compare_fingerprint, check_against_given_fingerprint): KEYNO starts
24161         from 0.
24162
24163 2015-09-02  Neal H. Walfield  <neal@g10code.com>
24164
24165         g10: Remove unused field req_algo.
24166         + commit bd0c902f1de46eda03a065da41487e7e01ab4c50
24167         * g10/packet.h (PKT_public_key): Remove unused field req_algo.  Remove
24168         users.
24169         * g10/getkey.c (struct getkey_ctx_s): Remove unused field req_algo.
24170         Remove users.
24171
24172         g10: Use a symbolic constant instead of a literal.
24173         + commit 1f03d4cd940fed26fc3ffa1742728d68c55ee5d1
24174         * g10/trustdb.c (KEY_HASH_TABLE_SIZE): Define.
24175         (new_key_hash_table): Use KEY_HASH_TABLE_SIZE instead of a literal.
24176         (release_key_hash_table): Likewise.
24177         (test_key_hash_table): Likewise.
24178         (add_key_hash_table): Likewise.
24179
24180         g10: Add test for keydb as well as new testing infrastructure.
24181         + commit ee7ec1256b24dc340656c331ef92fc59cad817b6
24182         * g10/Makefile.am (EXTRA_DIST): Add test.c.
24183         (AM_CPPFLAGS): Add -DSOURCE_DIR="\"$(srcdir)\"".
24184         (module_tests): Add t-keydb.
24185         (t_keydb_SOURCES): New variable.
24186         (t_keydb_LDADD): Likewise.
24187         * g10/t-keydb.c: New file.
24188         * g10/t-keydb-keyring.kbx: New file.
24189         * g10/test-stubs.c: New file.
24190         * g10/test.c: New file.
24191
24192         g10: Make the keyblock cache per-handle rather than global.
24193         + commit 60bc518645d3acfd4dcb79e61a2be6ce001e93aa
24194         * g10/keydb.c (keyblock_cache): Don't declare this variable.  Instead...
24195         (struct keyblock_cache): ... turn its type into this first class
24196         object...
24197         (struct keydb_handle): ... and instantiate it once per database
24198         handle.  Update all users.
24199         (keydb_rebuild_caches): Don't invalidate the keyblock cache.
24200
24201         g10: If iobuf_seek fails when reading from the cache, do a hard read.
24202         + commit f076fa190e09eab5c586650d81e241e0bb85ce25
24203         * g10/keydb.c (keydb_get_keyblock): If the iobuf_seek fails when
24204         reading from the cache, then simply clear the cache and try reading
24205         from the database.
24206
24207         iobuf: Reduce verbosity of test.
24208         + commit 219de84df9a8408fffedbb2600f5eb4c441950b6
24209         * common/t-iobuf.c (main): Reduce verbosity.
24210
24211         iobuf: Add the IOBUF_INPUT_TEMP type to improve input temp handling.
24212         + commit f2d75ac7dc58f5ea59b231be6b83fea939b43ab8
24213         * common/iobuf.h (enum iobuf_use): Add new member, IOBUF_INPUT_TEMP.
24214         * common/iobuf.c (iobuf_temp_with_content): Create the iobuf as an
24215         IOBUF_INPUT_TEMP, not an IOBUF_INPUT buffer.  Assert that LENGTH ==
24216         A->D.SIZE.
24217         (iobuf_push_filter2): If A is an IOBUF_INPUT_TEMP, then make the new
24218         filter an IOBUF_INPUT filter and set its buffer size to
24219         IOBUF_BUFFER_SIZE.
24220         (underflow): If A is an IOBUF_INPUT_TEMP, then just return EOF; don't
24221         remove already read data.
24222         (iobuf_seek): If A is an IOBUF_INPUT_TEMP, don't discard the buffered
24223         data.
24224         (iobuf_alloc): Allow USE == IOBUF_INPUT_TEMP.
24225         (pop_filter): Allow USE == IOBUF_INPUT_TEMP.
24226         (iobuf_peek): Allow USE == IOBUF_INPUT_TEMP.
24227         (iobuf_writebyte): Fail if USE == IOBUF_INPUT_TEMP.
24228         (iobuf_write): Fail if USE == IOBUF_INPUT_TEMP.
24229         (iobuf_writestr): Fail if USE == IOBUF_INPUT_TEMP.
24230         (iobuf_flush_temp): Fail if USE == IOBUF_INPUT_TEMP.
24231
24232         iobuf: Rename IOBUF_TEMP to IOBUF_OUTPUT_TEMP.
24233         + commit 5ff5e72b9c275fbd978136b1028bbf251af26e57
24234         * common/iobuf.h (enum iobuf_use): Rename IOBUF_TEMP to
24235         IOBUF_OUTPUT_TEMP.  Update users.
24236
24237         iobuf: Use a first-class enum.
24238         + commit 24259d856b6cbdd679035512a8fb7c042de8f02e
24239         * common/iobuf.h (enum iobuf_use): Name the IOBUF_OUTPUT, etc. enum.
24240         (struct iobuf_struct): Change the field use's type to it.
24241
24242         iobuf: Fix test.
24243         + commit 8522cdc2264804d0677b7c0a447a0b45cf4195e3
24244         * common/t-iobuf.c (content_filter): If there is nothing to read,
24245         don't forget to set *LEN to 0.
24246         (main): Fix checks.
24247
24248 2015-09-01  Werner Koch  <wk@gnupg.org>
24249
24250         agent: Protect commit 135b1e3 against misbehaving Libgcrypt.
24251         + commit 9ba4ccdaf5e128fbea51ff142c63d4b359c7264d
24252         * agent/command-ssh.c (ssh_key_to_blob): Check DATALEN.
24253
24254         gpg: Remove option --no-sig-create-check.
24255         + commit f9c83d84e7d33df76898975f5ac852efa9c4882a
24256         * g10/gpg.c (opts): Remove --no-sig-create-check.
24257         * g10/options.h (struct opt): Remove field no_sig_create_check.
24258         * g10/sign.c (do_sign): Always check unless it is RSA and we are using
24259         Libgcrypt 1.7.
24260
24261         common: Assume an utf-8 locale on iconv errors.
24262         + commit 99c9bf7defd6c1ac9cc49c84e6c78eeb886a6952
24263         * common/utf8conv.c (handle_iconv_error): Use utf-8 as fallback.
24264
24265         common: Fix regression in building argpase.c standalone.
24266         + commit bc23e69b70191f887dcb937007833d0187af181f
24267         * common/argparse.c (is_native_utf8) [GNUPG_MAJOR_VERSION]: New.
24268
24269 2015-08-31  Neal H. Walfield  <neal@g10code.com>
24270
24271         g10: Don't leak memory if we fail to initialize a new database handle.
24272         + commit 04a6b903d0354be2c69c7f2c98987de17d68416e
24273         * g10/keydb.c (keydb_new): If we fail to open a keyring or keybox
24274         correctly release all resources.
24275
24276         g10: Improve interface documentation of the keydb API.
24277         + commit 360b699e9b4b8f99bd790b3cd158cd6f0fd7c131
24278         * g10/keydb.c: Improve code comments and documentation of internal
24279         interfaces.  Improve documentation of public APIs and move that to...
24280         * g10/keydb.h: ... this file.
24281
24282         g10: Don't cache search results if the search didn't scan the whole DB.
24283         + commit efd1ead9e779eb3bd37384258e08ad921a934612
24284         * g10/keydb.c (struct keydb_handle): Add new field is_reset.
24285         (keydb_new): Initialize hd->is_reset to 1.
24286         (keydb_locate_writable): Set hd->is_reset to 1.
24287         (keydb_search): Set hd->is_reset to 0.  Don't cache a key not found if
24288         the search started from the beginning of the database.
24289
24290         g10: Have keydb_search_first call keydb_search_reset before searching.
24291         + commit 11d8ffc939a4d20cfb0082b2d966b1e1a7d61f8d
24292         * g10/keydb.c (keydb_search_first): Reset the handle before starting
24293         the search.
24294
24295         g10: Remove unused parameter.
24296         + commit 0377db4b3581561b1ffc5bb7c3b4d698e8993b3a
24297         * g10/keydb.h (keydb_locate_writable): Remove unused parameter
24298         reserved.  Update users.
24299
24300 2015-08-31  NIIBE Yutaka  <gniibe@fsij.org>
24301
24302         agent: Fix SSH public key for EdDSA.
24303         + commit 135b1e32f01beaceba8a4ecc774e23b56aca1d24
24304         * agent/command-ssh.c (ssh_key_to_blob): Remove the prefix 0x40.
24305
24306 2015-08-26  Neal H. Walfield  <neal@g10code.com>
24307
24308         g10: Simplify cache.  Only include data that is actually used.
24309         + commit fad91071cadff43d77ce2e524dfb03999ba6678e
24310         * g10/keydb.c (struct kid_list_s): Rename from this...
24311         (struct kid_not_found_cache_bucket): ... to this.  Update users.
24312         Remove field state.
24313         (kid_list_t): Remove type.
24314         (KID_NOT_FOUND_CACHE_BUCKETS): Define.  Use this instead of a literal.
24315         (kid_found_table): Rename from this...
24316         (kid_not_found_cache_bucket): ... to this.  Update users.
24317         (kid_found_table_count): Rename from this...
24318         (kid_not_found_cache_count): ... to this.  Update users.
24319         (kid_not_found_p): Only return whether a key with the specified key id
24320         is definitely not in the database.
24321         (kid_not_found_insert): Remove parameter found.  Update callers.
24322         (keydb_search): Only insert a key id in the not found cache if it is
24323         not found.  Rename local variable once_found to already_in_cache.
24324
24325 2015-08-25  Werner Koch  <wk@gnupg.org>
24326
24327         Add configure option --enable-build-timestamp.
24328         + commit 9d07f6930aaa40dce92104e8c99241713d92eed2
24329         * configure.ac (BUILD_TIMESTAMP): Set to "<none>" by default.
24330
24331         gpg: Emit ERROR status for key signing failures.
24332         + commit 51b9b8fba4ee326013c2cc911c70cde4c5f81fc7
24333         * g10/keyedit.c (sign_uids): Write an ERROR status for a signing
24334         failure.
24335         (menu_adduid, menu_addrevoker, menu_revsig): Ditto.
24336         (menu_revuid, menu_revkey, menu_revsubkey): Ditto.
24337
24338         gpg: Print a new FAILURE status after most commands.
24339         + commit 9cdff09743c473a12359bfdb914578ede0e4e3e2
24340         * common/status.h (STATUS_FAILURE): New.
24341         * g10/cpr.c (write_status_failure): New.
24342         * g10/gpg.c (main): Call write_status_failure for all commands which
24343         print an error message here.
24344         * g10/call-agent.c (start_agent): Print an STATUS_ERROR if we can't
24345         set the pinentry mode.
24346
24347 2015-08-24  Neal H. Walfield  <neal@g10code.com>
24348
24349         agent: Raise the maximum password length.  Don't hard code it.
24350         + commit 348a6ebb63523305ce9f47d0f3e8a9086c338fed
24351         * agent/agent.h (MAX_PASSPHRASE_LEN): Define.
24352         * agent/command-ssh.c (ssh_identity_register): Use it instead of a
24353         hard-coded literal.
24354         * agent/cvt-openpgp.c (convert_from_openpgp_main): Likewise.
24355         * agent/findkey.c (unprotect): Likewise.
24356         * agent/genkey.c (agent_ask_new_passphrase): Likewise.
24357
24358 2015-08-24  Werner Koch  <wk@gnupg.org>
24359
24360         sm: Support secret key export via the Assuan interface.
24361         + commit 3cf02192a890d04f8f558cb72d46f9bd7a378322
24362         * sm/server.c (cmd_export): Add options --secret, --raw, and --pkcs12.
24363
24364 2015-08-23  Werner Koch  <wk@gnupg.org>
24365
24366         dirmngr: Allow sending of Zack's key.
24367         + commit 84f4c8811fc5bdd78693c4dc289389a8337cc257
24368         * dirmngr/server.c (MAX_KEYBLOCK_LENGTH): Increase to 1 MiB.
24369
24370         gpg: Fix regression in packet parser from Aug 19.
24371         + commit 88317ae8c829bfeb1689415efbd32b7a232d7bd0
24372         * g10/parse-packet.c (parse): Use an int to compare to -1.  Use
24373         buf32_to_ulong.
24374
24375         gpg: Show not found keys with --locate-key --verbose.
24376         + commit 00def10d365a88ce2d034ea9a5d6be4b03285fa4
24377         * g10/keylist.c (locate_one): Print a diagnostic for a not-found key.
24378
24379 2015-08-21  Neal H. Walfield  <neal@g10code.com>
24380
24381         common: Don't incorrectly reject 4 GB - 1 sized packets.
24382         + commit 09f2a7bca624d0492e1d7ab29ce19542249c13ff
24383         * g10/parse-packet.c (parse): Don't reject 4 GB - 1 sized packets.
24384         Add the constraint that the type must be 63.
24385         * kbx/keybox-openpgp.c (next_packet): Likewise.
24386         * tests/openpgp/4gb-packet.asc: New file.
24387         * tests/openpgp/4gb-packet.test: New file.
24388         * tests/openpgp/Makefile.am (TESTS): Add 4gb-packet.test.
24389         (TEST_FILES): Add 4gb-packet.asc.
24390
24391         common: Don't assume on-disk layout matches in-memory layout.
24392         + commit 4f37820334fadd8c5036ea6c42f3dc242665c4a9
24393         * g10/packet.h (PKT_signature): Change revkey's type from a struct
24394         revocation_key ** to a struct revocation_key *.  Update users.
24395
24396         common: Don't incorrectly copy packets with partial lengths.
24397         + commit b3226cadf9bbef4a367072396e5b0abf37afff2d
24398         * g10/parse-packet.c (parse): We don't handle copying packets with a
24399         partial body length to an output stream.  If this occurs, log an error
24400         and abort.
24401
24402         common: Check parameters more rigorously.
24403         + commit 0143d5c1ca4d12ac252c14f01931f48131591065
24404         * g10/parse-packet.c (dbg_copy_all_packets): Check that OUT is not
24405         NULL.
24406         (copy_all_packets): Likewise.
24407
24408         common: Don't continuing processing on error.
24409         + commit 48e792cc951a9d00fad0691ef7411c9e22cf675a
24410         * g10/parse-packet.c (dbg_parse_packet): Also return if parse returns
24411         an error.
24412         (parse_packet): Likewise.
24413         (dbg_search_packet): Likewise.
24414         (search_packet): Likewise.
24415
24416         common: Better respect the packet's length when reading it.
24417         + commit 73af66a0aada8f30d8f400fdc4f69e233fb53089
24418         * g10/parse-packet.c (parse_signature): Make sure PKTLEN doesn't
24419         underflow.  Be more careful that a read doesn't read more data than
24420         PKTLEN says is available.
24421
24422 2015-08-20  Werner Koch  <wk@gnupg.org>
24423
24424         po: Add lost translation of validity strings.
24425         + commit 0d5a4138f27187e7828ef8216758edc9b48b2c64
24426         * po/POTFILES.in (trust.c): Add missing file.
24427         * po/de.po: Changed German validity strings.
24428         * doc/help.de.txt: Ditto.
24429
24430 2015-08-20  Neal H. Walfield  <neal@g10code.com>
24431
24432         g10/parse-packet.c:parse: Try harder to not ignore an EOF.
24433         + commit 0add91ae1ca3718e8140af09294c595f47c958d3
24434         * g10/parse-packet.c (parse): Be more robust: make sure to process any
24435         EOF.
24436
24437         g10/parse-packet.c: Replace literal with symbolic expression.
24438         + commit 24a72dffa75a04611c98343140c4eb0fbfe2a59f
24439         * g10/parse-packet.c (dump_hex_line): Use sizeof rather than the
24440         buffer's size.
24441
24442         Add documentation for g10/parse-packet.c.
24443         + commit 026feff4a8e3090fb152af72c73aaa80c78e4551
24444         * g10/packet.h: Add documentation for functions defined in
24445         parse-packet.c.
24446         * g10/parse-packet.c: Improve comments for many functions.
24447
24448         g10/packet.h: Remove unused argument from enum_sig_subpkt.
24449         + commit c46e8bfe9a1ae3f1e5327d0451cffd6e4567b449
24450         * g10/packet.h (enum_sig_subpkt): Remove argument RET_N.  Update
24451         callers.
24452         * g10/parse-packet.c (enum_sig_subpkt): Remove argument RET_N.
24453
24454         g10/parse-packet.c:mpi_read: Detect EOF and correct boundary conditions.
24455         + commit c271feb53664dbf2b4ccbae90a31b8e726481e2d
24456         * g10/parse-packet.c (mpi_read): Improve documentation.  Correctly
24457         handle an EOF.  On overflow, correctly return the number of bytes read
24458         from the pipeline.
24459
24460         common/iobuf.c: Make control flow more obvious.
24461         + commit 49f922286fa8adb2d2ca730eb7bbe67e684b20de
24462         * common/iobuf.c (iobuf_read): Make control flow more obvious.
24463         (iobuf_get_filelength): Likewise.
24464         (iobuf_get_fd): Likewise.
24465         (iobuf_seek): Likewise.
24466
24467         common/iobuf.c: Add some sanity checks to catch programmer bugs.
24468         + commit c5da750cf3d53277fe6d86776bfe0d2304b05151
24469         * common/iobuf.c (iobuf_alloc): Check that BUFSIZE is not 0.
24470         (iobuf_readbyte): Check that A is an input filter.  Check that the
24471         amount of read data is at most the amount of buffered data.
24472         (iobuf_read): Check that A is an input filter.
24473         (iobuf_writebyte): Check that A is not an input filter.
24474         (iobuf_writestr): Check that A is not an input filter.
24475         (iobuf_flush_temp): Check that A is not an input filter.
24476
24477         common/iobuf.c:iobuf_write_temp: Elide redundant code.
24478         + commit e291b631c3b1aedf529078190cd51e2acfcd1d92
24479         * common/iobuf.c (iobuf_write_temp): Don't repeat iobuf_flush_temp.
24480         Use it directly.
24481
24482         common/iobuf.c: Have iobuf_writestr use iobuf_write, not iobuf_writebyte
24483         + commit a6d4bca3b576c3c5dba1aa6e8c1039089e14147b
24484         * common/iobuf.c (iobuf_write): Don't write a byte at a time.  Use
24485         iobuf_write.
24486
24487         common/iobuf: Improve documentation and code comments.
24488         + commit 1bfd1e43246c16e20f819bf5381ca21abde54458
24489         common/iobuf.h: Improve documentation and code comments.
24490         common/iobuf.c: Likewise.
24491
24492         common/iobuf.c: Adjust buffer size of filters in front of temp filters.
24493         + commit 0d40c4e83f6fbfea2f494f1f88412d3132ff98bd
24494         * common/iobuf.c (iobuf_push_filter2): If the head filter is a temp
24495         filter, use IOBUF_BUFFER_SIZE for the new filter.
24496
24497         common/iobuf.c: Buffered data should not be processed by new filters.
24498         + commit 827cc922d84d8113d4f13ebbed1314e03da5f7d2
24499         * common/iobuf.c (iobuf_push_filter2): If the pipeline is an output or
24500         temp pipeline, the new filter shouldn't assume ownership of the old
24501         head's internal buffer: the data was written before the filter was
24502         added.
24503         * common/t-iobuf.c (double_filter): New function.
24504         (main): Add test cases for the above bug.
24505
24506         common/iobuf.c: Flush the pipeline in iobuf_temp_to_buffer.
24507         + commit 616181f3c757160af8539869a6d929faca4962c4
24508         * common/iobuf.c (iobuf_temp_to_buffer): Flush each filter in the
24509         pipeline and copy the data from the last (not the first) filter's
24510         internal buffer.
24511
24512         common/iobuf.c: Combine iobuf_open, iobuf_create and iobuf_openrw.
24513         + commit 15ae99f887f4694de8468625d455d487d283f719
24514         * common/iobuf.c (do_open): New function, which is a generalization of
24515         iobuf_open, iobuf_Create, iobuf_openrw.
24516         (iobuf_open): Call do_open.
24517         (iobuf_create): Likewise.
24518         (iobuf_openrw): Likewise.
24519
24520         common/iobuf.h: Remove iobuf_open_fd_or_name.
24521         + commit 8402815d8e0e04a44362968f88b3d484d2395402
24522         * common/iobuf.h (iobuf_open_fd_or_name): Remove prototype.  Replace
24523         use with either iobuf_open or iobuf_fdopen_nc, as appropriate.
24524         * common/iobuf.c (iobuf_open): Remove function.
24525
24526         common/iobuf.c: Rename iobuf_flush and make it a static function.
24527         + commit 6d49a2b6691f2dd0d8ac34a15f18cc2a0c3ba5d3
24528         * common/iobuf.h (iobuf_flush): Remove prototype.
24529         * common/iobuf.c (filter_flush): New static prototype.
24530         (iobuf_flush): Rename...
24531         (filter_flush): ... to this.  Make static.  Simplify code.  Update
24532         callers.
24533
24534         common/iobuf.c: Don't abort freeing a pipeline if freeing a filter fails
24535         + commit 1f94646a86348128f585301fcd605e5e703fd77d
24536         * common/iobuf.c (iobuf_cancel): Don't abort freeing a pipeline if
24537         freeing a filter fails.  This needs to a memory leak.  Instead, keep
24538         freeing and return the error code of the first filter that fails.
24539
24540         common/iobuf.c: Improve iobuf_peek.
24541         + commit a250f73783c06d7789ac65a395d9247f4ab44c26
24542         * common/iobuf.c (underflow): Take additional parameter
24543         clear_pending_eof.  If not set, don't clear a pending eof when
24544         returning EOF.  Update callers.
24545         (iobuf_peek): Fill the internal buffer, if needed, to be able to
24546         better satisfy any request.
24547
24548         common/iobuf.c: When requested, fill the buffer even if it is not empty.
24549         + commit c7ad36eb0d7f872fc15e793aa1d0b6b89bc471d6
24550         * common/iobuf.c (underflow): Don't require that the buffer be empty.
24551         When called, fill any available space.
24552
24553         common/t-iobuf.c: Add a test case for multiple EOFs.
24554         + commit e76c75d8726558dc9084710253f0f6780e06fad3
24555         common/t-iobuf.c (main): Add a test case for multiple EOFs in an INPUT
24556         pipeline.
24557
24558         common/iobuf.c: Better respect boundary conditions in iobuf_read_line.
24559         + commit 4e32c602f5c40cca5f8f40e642ccb10d3f8c5614
24560         * common/iobuf.c (iobuf_read_line): Be more careful with boundary
24561         conditions.
24562         * common/iobuf.h: Include <gpg-error.h>.
24563         * common/t-iobuf.c: New file.
24564         * common/Makefile.am (module_tests): Add t-iobuf.
24565         (t_mbox_util_LDADD): New variable.
24566
24567         common/iobuf.c: Fix filter type for iobuf_temp_with_content.
24568         + commit fa9fda23c2c8cf6982b7263f6882ed8687d98c16
24569         * common/iobuf.c (iobuf_temp_with_content): Set the filter type to
24570         IOBUF_INPUT, not IOBUF_TEMP, which is only for output filters that
24571         write into a dynamic buffer.
24572
24573         common/iobuf.h: Remove unimplemented prototypes.
24574         + commit 75fd86bbd175e085a93c1ad62f50ae936494b307
24575         * common/iobuf.h (iobuf_unread): Remove unimplemented prototype.
24576         (iobuf_clear_eof): Likewise.
24577         (iobuf_append): Likewise.
24578
24579         common/iobuf.c: Refactor code to not need the desc field.
24580         + commit 679acc671e621847f50d6b4dca10a22c62500b9a
24581         * common/iobuf.h (struct iobuf_struct): Remove field desc.
24582         * common/iobuf.c (iobuf_desc): New function.  When a filter's
24583         description is needed, use this instead of the filter's desc field.
24584
24585         common/iobuf.h: Clarify semantics of nofast.  Simplify implementation.
24586         + commit 12fc56bcb51d984a6e86fc1eb7952f9976c67043
24587         * common/iobuf.h (struct iobuf_struct): Clarify semantics of nofast.
24588         Simplify use of nofast to implement just these semantics.
24589
24590         common/iobuf.c: Remove dead code (directfp).
24591         + commit e8c0b6abf88309c23a70df0abbd38d42fa22a786
24592         * common/iobuf.h (struct iobuf_struct): Remove field directfp.  Remove
24593         all uses of it.
24594
24595         common/iobuf.c: Remove dead code (opaque).
24596         + commit f05d60b3813a97e316a067680d7598b74621a522
24597         * common/iobuf.h (struct iobuf_struct): Remove field opaque.  Remove
24598         all uses of it.
24599
24600         common/iobuf.h: Replace further use of literals with symbolic constants.
24601         + commit c06eabac8e85f7f79414363836f093415e8da62e
24602         * common/iobuf.c: Move BLOCK_FILTER_INPUT,
24603         BLOCK_FILTER_OUTPUT_BLOCK_FILTER_TEMP from here...
24604         * common/iobuf.h: ... to here and rename to IOBUF_INPUT, IOBUF_OUTPUT
24605         and IOBUF_TEMP, respectively.  Where appropriate, use these macros
24606         instead of a literal.
24607
24608 2015-08-17  Werner Koch  <wk@gnupg.org>
24609
24610         gpg: Avoid linking to Libksba.
24611         + commit 91357b7722f2bf0d3765ec72855bdc96732df9d6
24612         * kbx/keybox.h (KEYBOX_WITH_X509): Do not define.
24613         * sm/Makefile.am (AM_CPPFLAGS): Define it here.
24614         (common_libs): Change to libkeybox509.a
24615         * g10/Makefile.am (AM_CFLAGS): remove KSBA_CFLAGS.
24616         (gpg2_LDADD, gpgv2_LDADD): Remove KSBA_LIBS
24617         * kbx/Makefile.am (noinst_LIBRARIES): Add libkeybox509.a.
24618         (libkeybox509_a_SOURCES): New.
24619         (libkeybox_a_CFLAGS): New.
24620         (libkeybox509_a_CFLAGS): New.
24621         (kbxutil_CFLAGS): New.
24622         * kbx/keybox-search.c (has_keygrip) [!KEYBOX_WITH_X509]: Declare args
24623         as unused.
24624
24625 2015-08-16  Ben Kibbey  <bjk@luxsci.net>
24626
24627         Fix pinentry loopback and passphrase contraints.
24628         + commit bba74cdd95ea98b5a7c3a12823b229341e91504e
24629         * agent/command.c (cmd_get_passphrase): Don't repeat passphrase for
24630         pinentry loopback mode.
24631         * agent/genkey.c (check_passphrase_constraints): Immediately return when
24632         pinentry mode is loopback.
24633
24634         Fix sending INQUIRE_MAXLEN for symmetric data.
24635         + commit 93f5295df512269dd8fecbd649b11cbacf78e864
24636         * g10/passphrase.c (passphrase_to_dek_ext): Write the status message.
24637
24638 2015-08-15  Ben Kibbey  <bjk@luxsci.net>
24639
24640         Inform a user about inquire length limit.
24641         + commit f126ca61565922b3b938c3486614b9bd7e6e454c
24642         * common/status.h (INQUIRE_MAXLEN): New.
24643         * g10/call-agent.c (default_inquire_cb): Send STATUS_INQUIRE_MAXLEN.
24644         client when inquiring a passphrase over pinentry-loopback.
24645
24646         Allow --gen-key to inquire a passphrase.
24647         + commit 233b5fedabd80a34452e748132e65b5944310428
24648         * g10/gpg.c (main): test for --command-fd during --gen-key parse.
24649
24650         When --command-fd is set then imply --batch to let gpg inquire a
24651         passphrase rather than requiring a pinentry.
24652
24653 2015-08-11  Werner Koch  <wk@gnupg.org>
24654
24655         Release 2.1.7.
24656         + commit b5e081973b56b21214fc0c65ba9015dd026328b4
24657
24658
24659 2015-08-10  NIIBE Yutaka  <gniibe@fsij.org>
24660
24661         agent: fix ECC key handling.
24662         + commit 8704c70108218a60f8fb2ee0e558ca8ed125600d
24663         * agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
24664         (convert_transfer_key): CURVE is the name of curve.
24665
24666 2015-08-08  Neal H. Walfield  <neal@g10code.com>
24667
24668         common/iobuf.c: Replace use of literals with symbolic constants.
24669         + commit c80643c5ecbee89f343ef087313870cee1334fe4
24670         * common/iobuf.c (BLOCK_FILTER_INPUT): Define.  Where appropriate, use
24671         this instead of a literal.
24672         (BLOCK_FILTER_OUTPUT): Likewise.
24673         (BLOCK_FILTER_TEMP): Likewise.
24674
24675 2015-08-07  Werner Koch  <wk@gnupg.org>
24676
24677         gpg: Allow gpgv to work with a trustedkeys.kbx file.
24678         + commit 5b7a80b1ab91d2f199065e5dd14e85f42918975d
24679         * g10/keydb.h (KEYDB_RESOURCE_FLAG_GPGVDEF): New.
24680         * g10/keydb.c (keydb_add_resource): Take care of new flag.
24681         * g10/gpgv.c (main): Use new flag.
24682
24683         agent: Add option --force to the DELETE_KEY command.
24684         + commit a68c5c5c7fe4ec8665e252e5062292f6c7b94fdd
24685         * agent/findkey.c (agent_delete_key): Add arg "force".
24686         * agent/command.c (cmd_delete_key): Add option --force.
24687
24688         common: Change alias for Curve25519 to "cv25519".
24689         + commit 9f31ab3d216ed74d6f392a62e3f95e0591174119
24690         * common/openpgp-oid.c (oidtable): Change alias.
24691
24692 2015-08-06  Werner Koch  <wk@gnupg.org>
24693
24694         gpg: Remove duplicated printing of the curve name in "sub" lines.
24695         + commit fb754dc6170d12edf3d35c48340b8d7b1ded20f7
24696         * g10/keylist.c (list_keyblock_print): Do not print extra curve name.
24697
24698         gpg: Add commands "fpr *" and "grip" to --edit-key.
24699         + commit fbb6c25ab5dbb5f2b1f1eb342ca7caa3f955d8c9
24700         * g10/keyedit.c (cmdGRIP): New.
24701         (cmds): Add command "grip".
24702         (keyedit_menu) <cmdFPR>: Print subkeys with argument "*".
24703         (keyedit_menu) <cmdGRIP>: Print keygrip.
24704         (show_key_and_fingerprint): Add arg "with_subkeys".
24705         (show_key_and_grip): New.
24706         * g10/keylist.c (print_fingerprint): Add mode 4.
24707
24708         gpg: Adjust UID line indentation for common key algos.
24709         + commit 969542c8c2f48a60c1d68b7bf70b0c00374bacba
24710         * g10/keylist.c (list_keyblock_print): Change UID line indentation
24711         * g10/mainproc.c (list_node): Ditto.
24712
24713 2015-08-06  NIIBE Yutaka  <gniibe@fsij.org>
24714
24715         Curve25519 support.
24716         + commit e5891a82c39997b65ce9ff90eb6120db7bedd399
24717         * agent/cvt-openpgp.c (get_keygrip): Handle Curve25519.
24718         (convert_secret_key, convert_transfer_key): Ditto.
24719         * common/openpgp-oid.c (oidtable): Add Curve25519.
24720         (oid_crv25519, openpgp_oid_is_crv25519): New.
24721         * common/util.h (openpgp_oid_is_crv25519): New.
24722         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Handle the case
24723         with Montgomery curve which uses x-only coordinate.
24724         * g10/keygen.c (gen_ecc): Handle Curve25519.
24725         (ask_curve): Change the API and second arg is to return subkey algo.
24726         (generate_keypair, generate_subkeypair): Follow chage of ask_curve.
24727         * g10/keyid.c (keygrip_from_pk): Handle Curve25519.
24728         * g10/pkglue.c (pk_encrypt): Handle Curve25519.
24729         * g10/pubkey-enc.c (get_it): Handle the case with Montgomery curve.
24730         * scd/app-openpgp.c (ECC_FLAG_DJB_TWEAK): New.
24731         (send_key_attr): Work with general ECC, Ed25519, and Curve25519.
24732         (get_public_key): Likewise.
24733         (ecc_writekey): Handle flag_djb_tweak.
24734
24735         common: extend API of openpgp_oid_to_curve for canonical name.
24736         + commit a6e40530898622fbc5d76557a7da5e69368ecaa4
24737         * common/openpgp-oid.c (openpgp_oid_to_curve): Add CANON argument.
24738         * common/util.h: Update.
24739         * g10/import.c (transfer_secret_keys): Follow the change.
24740         * g10/keyid.c (pubkey_string): Likewise.
24741         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Likewise.
24742         * parse-packet.c (parse_key): Likewise.
24743         * scd/app-openpgp.c (send_key_attr, get_public_key): Likewise.
24744
24745 2015-08-05  NIIBE Yutaka  <gniibe@fsij.org>
24746
24747         scd: Fix ecc_oid.
24748         + commit d088d2c81690a89051349ddc8a82fe222625f4e0
24749         * scd/app-openpgp.c (ecc_oid): Call with OIDBUF.
24750
24751         scd: Fix ECC support.
24752         + commit 0751571cac0f5aef2862c34a184f7f09ad9cb203
24753         * scd/app-openpgp.c (send_key_attr): Send KEYNO.
24754         (get_public_key): Fix SEXP composing.
24755         (ecc_writekey): Fix OID length calculation.
24756         (ecc_oid): Prepend the length before query.
24757         (parse_algorithm_attribute): Handle the case the curve is not available.
24758
24759 2015-08-04  Werner Koch  <wk@gnupg.org>
24760
24761         gpg: Fix duplicate key import due to legacy key in keyring.
24762         + commit 4a326d7c9a3b09efcccf4de00d6c003829ad89e8
24763         * g10/keydb.c (keydb_search_fpr): Skip legacy keys.
24764
24765         gpg: Properly handle legacy keys while looking for a secret key.
24766         + commit f05a63b10428df2878b1bb6fde57a2fc2aa99105
24767         * g10/getkey.c (have_secret_key_with_kid): Skip legacy keys.
24768
24769 2015-07-31  Werner Koch  <wk@gnupg.org>
24770
24771         gpg: Fix endless loop for expired keys given by fpr.
24772         + commit 328a6b6459a5ce4a70b374262f221ada20c40878
24773         * g10/getkey.c (lookup): Disable keydb caching when continuing a
24774         search.
24775
24776 2015-07-29  Werner Koch  <wk@gnupg.org>
24777
24778         gpg: Do not return "Legacy Key" from lookup if a key is expired.
24779         + commit 23d8609f4b5ec3432323a676fd7ef225c0ef71a1
24780         * g10/getkey.c (lookup): Map GPG_ERR_LEGACY_KEY.
24781
24782         gpg: Indicate secret keys and cards in a key-edit listing.
24783         + commit 8b2b988309cbc5af339beb0a55ff71d7464eb646
24784         * g10/keyedit.c (sign_uids): Add arg "ctrl".
24785         (show_key_with_all_names_colon): Ditto.
24786         (show_key_with_all_names): Ditto.
24787
24788         * g10/keyedit.c (show_key_with_all_names): Print key record
24789         indicators by checking with gpg-agent.
24790         (show_key_with_all_names): Ditto.  May now also print sec/sbb.
24791
24792 2015-07-28  Werner Koch  <wk@gnupg.org>
24793
24794         gpg: Remove the edit-key toggle command.
24795         + commit 7ef09afd1a6a37c7f22e7c3d898f0c917b08f940
24796         * g10/keyedit.c (cmds): Remove helptext from "toggle".
24797         (keyedit_menu): Remove "toggle" var and remove the sub/pub check
24798         against toggle.
24799
24800         common,w32: Avoid unused var warning about msgcache.
24801         + commit 4bc75337f31374b7424d7bdebf839dd91ec80c0a
24802         * common/i18n.c (USE_MSGCACHE): New.
24803         (msgcache) [!USE_MSGCACHE]: Do not define.
24804         (i18n_localegettext): Repalce #if conditions by USE_MSGCACHE.
24805
24806         w32: Try more places to find an installed Pinentry.
24807         + commit 18f1e627c697d75175b79fe095305fa775f20841
24808         * common/homedir.c (get_default_pinentry_name): Re-implement to
24809         support several choices for Windows.
24810
24811 2015-07-26  Werner Koch  <wk@gnupg.org>
24812
24813         scd: Fix size_t/unsigned int mismatch.
24814         + commit 55e64f47a52d76e097a01eb4044a88a4e10d6a87
24815         * scd/app-openpgp.c (ecc_writekey): Use extra var n.
24816
24817         Replace GNUPG_GCC_A_ macros by GPGRT_ATTR_ macros.
24818         + commit d382242fb6789973ce8d246ec154a4a1468c24c0
24819         * common/util.h: Provide replacement for GPGRT_ATTR_ macros when using
24820         libgpg-error < 1.20.
24821         * common/mischelp.h: Ditto.
24822         * common/types.h: Ditto.
24823
24824 2015-07-25  NIIBE Yutaka  <gniibe@fsij.org>
24825
24826         scd: support any curves defined by libgcrypt.
24827         + commit ef080d5c7fb7f3b75c3c57c011f78a312b8e13a9
24828         * g10/call-agent.h (struct agent_card_info_s): Add curve field.
24829         * g10/call-agent.c (learn_status_cb): Use curve name.
24830         * g10/card-util.c (card_status): Show pubkey name.
24831         * scd/app-openpgp.c (struct app_local_s): Record OID and flags.
24832         (store_fpr): Use ALGO instead of key type.
24833         (send_key_attr): Use curve name instead of OID.
24834         (get_public_key): Clean up by OID to curve name.
24835         (ecc_writekey): Support any curves in libgcrypt.
24836         (do_genkey, do_auth, ): Follow the change.
24837         (ecc_oid): New.
24838         (parse_algorithm_attribute): Show OID here.
24839
24840 2015-07-23  Peter Wu  <peter@lekensteyn.nl>
24841
24842         build: ignore scissor line for the commit-msg hook.
24843         + commit d24165bce2823c2f5dcb39b7b84c9aa00802a8ee
24844         * build-aux/git-hooks/commit-msg: Stop processing more lines when the
24845           scissor line is encountered.
24846
24847 2015-07-23  NIIBE Yutaka  <gniibe@fsij.org>
24848
24849         scd: Format change to specify "rsa2048" for KEY-ATTR.
24850         + commit dbf4534f49a1fe3823bd6d6d7bb4d9df863b4789
24851         * g10/card-util.c (do_change_keysize): Put "rsa".
24852         * scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
24853         Change the command format.
24854         (rsa_writekey): Check key type.
24855         (do_writekey): Remove "ecdh" and "ecdsa" support which was available
24856         in experimental libgcrypt before 1.6.0.
24857
24858 2015-07-22  Werner Koch  <wk@gnupg.org>
24859
24860         Avoid a leading double slash in make_filename.
24861         + commit 69d2c9b09bd9d0b86b9f2feb585037a2c11795b0
24862         * common/stringhelp.c (do_make_filename): Special case leading '/'.
24863
24864 2015-07-21  NIIBE Yutaka  <gniibe@fsij.org>
24865
24866         scd: change_keyattr_from_string for ECC.
24867         + commit 9901be395684dd1b35d83685a719291347684ab1
24868         * scd/app-openpgp.c (change_keyattr, change_keyattr_from_string):
24869         Support ECC.
24870         (rsa_writekey): Don't change key attribute.
24871
24872 2015-07-17  NIIBE Yutaka  <gniibe@fsij.org>
24873
24874         scd: Use openpgpdefs.h for constants.
24875         + commit f5d356fb5bbbd0e05a753612455253e4bc335266
24876         * scd/app-openpgp.c: Include openpgpdefs.h.
24877
24878 2015-07-16  Neal H. Walfield  <neal@g10code.com>
24879
24880         Don't segfault if the first 'auto-key-locate' option is 'clear'.
24881         + commit f2ee673c99825d5189631031ddec2dbf54dbd482
24882         * g10/getkey.c (free_akl): If AKL is NULL, just return.
24883
24884 2015-07-10  NIIBE Yutaka  <gniibe@fsij.org>
24885
24886         agent: Support non-NLS build.
24887         + commit b3286af36d452fc801be573a057b0838d53a2edd
24888         * agent/agent.h: Use ENABLE_NLS and define L_() macro.
24889
24890 2015-07-09  NIIBE Yutaka  <gniibe@fsij.org>
24891
24892         scd: Remove unused files.
24893         + commit 67b2dc7636e47baefd5aafe0eb45b4730f974481
24894         * scd/Makefile.am (sc_copykeys_*): Remove.
24895         * scd/sc-copykeys.c: Remove.
24896         * scd/pcsc-wrapper.c: Remove.
24897         * scd/{card-common.h,card-dinsig.c,card-p15.c,card.c}: Remove.
24898
24899 2015-07-08  NIIBE Yutaka  <gniibe@fsij.org>
24900
24901         g10: Use canonical name for curve.
24902         + commit 5b46726931049e060d8fbfa879db7907078a9aed
24903         * g10/import.c (transfer_secret_keys): Use canonical name.
24904         * common/openpgp-oid.c (openpgp_curve_to_oid): Return NULL on error.
24905         * g10/keyid.c (pubkey_string): Follow change of openpgp_curve_to_oid.
24906         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
24907         * g10/parse-packet.c (parse_key): Ditto.
24908
24909 2015-07-03  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
24910
24911         drop long-deprecated gpgsm-gencert.sh.
24912         + commit 1be2cebf7ff5837c8b548b4f4afbf1b8b28211bc
24913          * tools/gpgsm-gencert.sh: remove deprecated script entirely.  It is
24914            fully replaced by gpgsm --gen-key
24915          * doc/tools.texi: remove gpgsm-gencert.sh documentation
24916          * .gitignore: no longer ignore gpgsm-gencert.sh manpage
24917          * doc/Makefile.am: quit making the manpage
24918          * tools/Makefile.am: quit distributing the script
24919          * doc/howto-create-a-server-cert.texi: overhaul documentation to use
24920            gpgsm --gen-key and tweak explanations
24921
24922 2015-07-02  NIIBE Yutaka  <gniibe@fsij.org>
24923
24924         po: Update Japanese translation.
24925         + commit 3502b3cc0f5ff92ab89a0da8b1e344a8ad615737
24926
24927
24928         scd: Support AES decryption for OpenPGPcard v3.0.
24929         + commit 45c49a0030c7a01ec011ce810ddb3aaef734e9bf
24930         * scd/app-openpgp.c (do_decipher): Support AES decryption.
24931
24932 2015-07-01  Werner Koch  <wk@gnupg.org>
24933
24934         Release 2.1.6.
24935         + commit a499eeb6a6545d87ac9f1b64e32017bfdb4f67e6
24936
24937
24938 2015-07-01  Daiki Ueno  <ueno@gnu.org>
24939
24940         agent: Unset INSIDE_EMACS on gpg-agent startup.
24941         + commit f1490a3a0ecf4a5a03373c9563f7709630232ee3
24942         * agent/gpg-agent.c (main): Unset INSIDE_EMACS envvar.
24943
24944 2015-07-01  Werner Koch  <wk@gnupg.org>
24945
24946         common: Implement i18n_localegettext.
24947         + commit a65447f0d64d0c53ddbdcfc988f26ecc9a8a6f08
24948         * common/i18n.c (msg_cache_s, msg_cache_head_s): New.
24949         (msgcache): New.
24950         (i18n_localegettext): Implement locale dependent lookup.
24951
24952 2015-06-30  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
24953
24954         Pass DBUS_SESSION_BUS_ADDRESS for gnome3.
24955         + commit 816824953c91959c23a57c047bdba6a902ffdde6
24956         * common/session-env.c (stdenvnames): Add DBUS_SESSION_BUS_ADDRESS.
24957
24958 2015-06-30  Werner Koch  <wk@gnupg.org>
24959
24960         Flag the L_() function with attribute format_arg.
24961         + commit 232af382e563fcbe15589a3ccae7d6908a17c44d
24962         * agent/agent.h (LunderscorePROTO): New.
24963         * common/util.h (GNUPG_GCC_ATTR_FORMAT_ARG): New.
24964         * common/i18n.h (GNUPG_GCC_ATTR_FORMAT_ARG): New. Use for
24965         i18n_localegettext.  Expand LunderscorePROTO.
24966         * agent/genkey.c (check_passphrase_constraints): Use xtryasprintf
24967         again to keep the old translations.
24968
24969         agent: Use different translation func for Pinentry strings.
24970         + commit e76d4c05b24211f3981ab69cddb3fccc17d21e0e
24971         * po/Makevars (XGETTEXT_OPTIONS): Add keyword "L_".
24972         * common/i18n.c (i18n_localegettext): New stub.
24973         * common/i18n.h: Expand the LunderscoreIMPL macro.
24974         * agent/agent.h (L_): New.
24975         (LunderscoreIMPL): New.
24976         * agent/call-pinentry.c (setup_qualitybar): Add arg ctrl anc change
24977         caller.
24978         * agent/findkey.c (try_unprotect_cb): Add local var ctrl.
24979         * agent/genkey.c (check_passphrase_constraints): Replace xtryasprintf
24980         by xtrystrdup to avoid gcc warning.  Unfortinately this changes the
24981         string.
24982         (agent_ask_new_passphrase): Cleanup the use of initial_errtext.
24983
24984         gpg: Make show-sig-subpackets work again.
24985         + commit 010e4281c3e15e2f86589dd1da419531ead519ef
24986         * g10/gpg.c (parse_list_options): Fix offset for subpackets.
24987
24988 2015-06-29  Werner Koch  <wk@gnupg.org>
24989
24990         agent: Prepare for Libassuan with Cygwin support.
24991         + commit b6076579311029aa76c00377d9a804b1578bf58f
24992         * agent/gpg-agent.c (create_server_socket): Add arg "cygwin".  Call
24993         assuan_sock_set_flag if Assuan version is recent enough.
24994         (main): Create ssh server socket with Cygwin flag set.
24995
24996 2015-06-29  Neal H. Walfield  <neal@gnu.org>
24997
24998         Show passphrase constraints errors as password prompt errors.
24999         + commit 2778c6f8f40d73272075ce04c07097f65c94054e
25000         * agent/agent.h (check_passphrase_constraints): Add parameter
25001         failed_constraint and remove parameter silent.  Update callers.
25002         * agent/genkey.c (check_passphrase_constraints): Add parameter
25003         failed_constraint and remove parameter silent.  If FAILED_CONSTRAINT
25004         is not NULL and OPT.ENFORCE_PASSPHRASE_CONSTRAINTS is FALSE, save the
25005         error text in *FAILED_CONSTRAINT and don't call take_this_one_anyway
25006         or take_this_one_anyway2.  If FAILED_CONSTRAINT is NULL, act as if
25007         SILENT was set.
25008         (agent_ask_new_passphrase): Change initial_errtext's type from a const
25009         char * to a char *.  Pass it to check_passphrase_constraints.  If it
25010         contains malloc's memory, free it.
25011
25012 2015-06-29  Neal H. Walfield  <neal@g10code.com>
25013
25014         Improve documentation for default-cache-ttl and default-cache-ttl-ssh.
25015         + commit 0416aed4abf6cea94458d2e38eb4a5e6bfea2d8b
25016         * doc/gpg-agent.texi (Agent Options): Improve documentation for
25017         default-cache-ttl and default-cache-ttl-ssh.
25018
25019         Don't raise max-cache-ttl to default-cache-ttl.
25020         + commit 60cf69ff9d61a2cd37fc4468f232fd41aa70a651
25021         * agent/gpg-agent.c (finalize_rereadable_options): Don't raise
25022         max-cache-ttl to default-cache-ttl.  Likewise for max-cache-ttl-ssh
25023         and default-cache-ttl-ssh.
25024
25025         Improve the description of old packets with an indeterminate length.
25026         + commit 68c217f457a772984d0afbdd341f18de7c867505
25027         * g10/parse-packet.c (parse): Make the description more accurate when
25028         listing packets: old format packets don't support partial lengths,
25029         only indeterminate lengths (RFC 4880, Section 4.2).
25030
25031 2015-06-29  Werner Koch  <wk@gnupg.org>
25032
25033         agent: Add --verify to the PASSWD command.
25034         + commit 9bca96dbc5c32bdd00196462fde8c9ab94aeb28d
25035         * agent/command.c (cmd_passwd): Add option --verify.
25036
25037         agent,w32: Do not create a useless socket with --enable-putty-support.
25038         + commit 7a387331645736eaeaaef57770beef5fa741bc22
25039         * agent/agent.h (opt): Remove field ssh_support.
25040         * agent/gpg-agent.c (ssh_support): New.  Replace all opt.ssh_support
25041         by this.
25042         (main): Do not set ssh_support along with setting putty_support.
25043
25044         gpgsm: Add command option "offline".
25045         + commit 2c9c46e2a2b8f9a1bdc1ef46a135b5fc7d1a8073
25046         * sm/server.c (option_handler): Add "offline".
25047         (cmd_getinfo): Ditto.
25048         * sm/certchain.c (is_cert_still_valid):
25049         (do_validate_chain):
25050         * sm/gpgsm.c (gpgsm_init_default_ctrl): Default "offline" to the value
25051         of --disable-dirmngr.
25052         * sm/call-dirmngr.c (start_dirmngr_ext): Better also check for
25053         ctrl->offline.
25054
25055 2015-06-26  NIIBE Yutaka  <gniibe@fsij.org>
25056
25057         scd: Support button flag and AES key data for OpenPGPcard v3.0.
25058         + commit d2fdf2e1b6cd447bb1c36df0ac7d8e669802fa22
25059         * scd/app-openpgp.c (do_getattr, show_caps, app_select_openpgp):
25060         Support button and symmetric decryption.
25061         (do_setattr): Support setting AESKEY.
25062
25063 2015-06-25  Andre Heinecke  <aheinecke@intevation.de>
25064
25065         sm: Fix cert storage for ephemeral certs.
25066         + commit 5e1a844ae9b6730b4b8a2c9178ea9bc121560c28
25067         * sm/keydb.c (keydb_store_cert): Clear ephemeral flag for
25068         existing certs if store should not be ephemeral.
25069
25070 2015-06-23  Werner Koch  <wk@gnupg.org>
25071
25072         Allow use of debug flag names for all tools.
25073         + commit 54a0ed3d9b10a3c6dfb3d6a4d20b693a3183f8f6
25074         * g13/g13.c: Make use of debug_parse_flag.
25075         * scd/scdaemon.c: Ditto.
25076         * sm/gpgsm.c: Ditto
25077         * agent/gpg-agent.c: Ditto.  But do not terminate on "help"
25078         * dirmngr/dirmngr.c: Ditto.
25079
25080         common: Improve fucntion parse_debug_flag.
25081         + commit 8195e55d0c134a45f7c9bd95c8b5741781841c18
25082         * common/miscellaneous.c (parse_debug_flag): Add hack not to call
25083         exit.  Add "none" and "all" flags.
25084
25085 2015-06-23  NIIBE Yutaka  <gniibe@fsij.org>
25086
25087         scd: pinpad workaround for PC/SC implementations.
25088         + commit 5e1d2fe6555d06f9dcd2daac713b2edfbc0428a5
25089         * scd/adpu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Bigger buffer
25090         for TPDU card reader.
25091
25092 2015-06-22  Werner Koch  <wk@gnupg.org>
25093
25094         gpg: Allow debug flag names for --debug.
25095         + commit 4698e5b203bd983503b5fd784fcd09dd3bc3a15e
25096         * g10/gpg.c (opts): Change arg for oDebug to a string.
25097         (debug_flags): New; factored out from set_debug.
25098         (set_debug): Remove "--debug-level help".  Use parse_debug_flag to
25099         print the used flags.
25100         (main): Use parse_debug_flag for oDebug.
25101
25102         common: Add function parse_debug_flag.
25103         + commit 22147952b744958ec46d356e942540356ff7d93e
25104         * common/miscellaneous.c (parse_debug_flag): New.
25105         * common/util.h (struct debug_flags_s): New.
25106
25107         common: Add function strtokenize.
25108         + commit d37f47081d41584efc0c397432811f9cfa5d5867
25109         * common/stringhelp.c: Include assert.h.
25110         (strtokenize): New.
25111         * common/t-stringhelp.c (test_strtokenize): New.
25112
25113         gpg: Fix regression due to recent commit 6500f33.
25114         + commit e0873a3372800d51c90ca656450f937dbae9c169
25115         * g10/keydb.c (kid_list_s): Keep a state in the table.
25116         (kid_not_found_table): Rename to kid_found_table.
25117         (n_kid_not_found_table): Rename to kid_found_table_count.
25118         (kid_not_found_p): Return found state.
25119         (kid_not_found_insert): Add arg found.
25120         (keydb_search): Store found state in the table.
25121
25122 2015-06-22  NIIBE Yutaka  <gniibe@fsij.org>
25123
25124         scd: Fix Cherry ST-2000 support for pinpad input.
25125         + commit 444e9232aa9e00aacd939cbf7bdb881b550dfebe
25126         * scd/apdu.c (pcsc_vendor_specific_init): Set pinmax to 15.
25127         * scd/ccid-driver.c (ccid_transceive_secure): Add zero for the
25128         template of APDU.
25129
25130 2015-06-20  Werner Koch  <wk@gnupg.org>
25131
25132         gpg: Print number of good signatures with --check-sigs.
25133         + commit 0948c4f217308ffa0ec61ce189d387fd61b02bbd
25134         * g10/keylist.c (keylist_context): Add field good_sigs.
25135         (list_keyblock_print): Updated good_sigs.
25136         (print_signature_stats): Print number of good signatures and use
25137         log_info instead of tty_printf.
25138
25139         gpg: Improve speed of --check-sigs and --lish-sigs.
25140         + commit 6500f338a35f4148606480c79f3a0c1b0d15f13a
25141         * g10/keydb.c (kid_list_t): New.
25142         (kid_not_found_table, n_kid_not_found_table): New.
25143         (kid_not_found_p, kid_not_found_insert, kid_not_found_flush): New.
25144         (keydb_insert_keyblock): Flush the new cache.
25145         (keydb_delete_keyblock): Ditto.
25146         (keydb_update_keyblock): Ditto.
25147         (keydb_search): Use the new cache.
25148         (keydb_dump_stats): New.
25149         * g10/gpg.c (g10_exit): Dump keydb stats.
25150
25151 2015-06-19  Werner Koch  <wk@gnupg.org>
25152
25153         gpg: Add more log_clock calls to keydb.c.
25154         + commit 53e9b86085ac70ede8a0b1de9018ccbfe55b0932
25155         * g10/keydb.c (keydb_get_keyblock): Add log_clock calls.
25156
25157         gpg: Print available debug flags using "--debug-level help".
25158         + commit 663a31f1ea2fc5a43c822e916cf20fece5243851
25159         * g10/gpg.c (set_debug): Add "help" option and use a table for the
25160         flags.
25161
25162         gpg: Fix export problem in case an old keyring has PGP-2 keys.
25163         + commit c5604eeee4b64a44a1ca1d517ace14fc1cbda298
25164         * g10/export.c (do_export_stream): Skip legacy keys.
25165
25166 2015-06-18  Werner Koch  <wk@gnupg.org>
25167
25168         dirmngr: Fix the cleanup zombies fix (685b782).
25169         + commit c97198371b7307e64afdd323231977b2247f64ec
25170         * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Do not close the
25171         stdout reader after EOF from read_log_data.
25172         * dirmngr/crlcache.c (crl_cache_reload_crl): Close the reader before
25173         the next iteration.
25174
25175 2015-06-17  Werner Koch  <wk@gnupg.org>
25176
25177         agent: Print a warning for obsolete options.
25178         + commit 010d26a85bfe15c4aa12eefeab851dbde0609c26
25179         * g10/misc.c (obsolete_scdaemon_option): Move to
25180         * common/miscellaneous.c (obsolete_option): ... here.
25181         * agent/gpg-agent.c (main): Use obsolete_option for the 3 obsolete
25182         options.
25183
25184 2015-06-16  Werner Koch  <wk@gnupg.org>
25185
25186         dirmngr: Cleanup zombies and fix hang on shutdown.
25187         + commit 685b782a18adb90bbf78956682e4e7f89fed678c
25188         * dirmngr/ldap-wrapper.c (ldap_wrapper_thread): Move nfds computation
25189         into the loop.  Check the queue also on timeout.  Close log_fd and
25190         reader context on EOF or error.
25191
25192         dirmngr: Avoid accessing uninitialized memory in log callback.
25193         + commit 82c72e2db7bc5b633768d59822f2e2a353fa6e32
25194         * dirmngr/dirmngr.c (pid_suffix_callback): Clear int_and_ptr_u before
25195         use.
25196         (start_connection_thread): Ditto.
25197         (handle_connections): Ditto.
25198
25199 2015-06-16  Neal H. Walfield  <neal@g10code.com>
25200
25201         Don't prompt for the password multiple times in pinentry loopback mode.
25202         + commit eac081ba1278855fa223b031b527498fec558bc7
25203         * g10/gpg.c (main): If OPT.PINENTRY_MODE is PINENTRY_MODE_LOOPBACK,
25204         clear OPT.PASSPHRASE_REPEAT.
25205
25206 2015-06-16  NIIBE Yutaka  <gniibe@fsij.org>
25207
25208         po: Update Japanese Translation.
25209         + commit 15540f6233bd041b06708862a6d9535cbcabe330
25210
25211
25212 2015-06-15  Werner Koch  <wk@gnupg.org>
25213
25214         doc: Add defs.inc to BUILT_SOURCES.
25215         + commit ef273a9afc7840b75cfb9b8af78d117b7d672c6a
25216
25217
25218 2015-06-11  Werner Koch  <wk@gnupg.org>
25219
25220         Release 2.1.5.
25221         + commit 9b7bdfae82f74a147a5dbf0fac0f78cde77a207b
25222
25223
25224         agent: Fix --extra-socket on Windows.
25225         + commit 985918aab025cf0ac9db411b88a47c4b985e5e95
25226         * agent/gpg-agent.c (start_connection_thread): Rename to ...
25227         (do_start_connection_thread): this.  Factor nonce checking out to ...
25228         (start_connection_thread_std): this,
25229         (start_connection_thread_extra): this,
25230         (start_connection_thread_browser): and this.
25231
25232         agent: Add experimental option --browser-socket.
25233         + commit 008435b95cbca19adc217178dc9d793eca584345
25234         * agent/agent.h (opt): Add field "browser_socket".
25235         * agent/command.c (cmd_setkeydesc): Use a different message for
25236         restricted==2.
25237         * agent/gpg-agent.c (oBrowserSocket): New.
25238         (opts): Add --browser-socket.
25239         (socket_name_browser, redir_socket_name_browser): New.
25240         (socket_nonce_browser): New.
25241         (cleanup): Cleanup browser socket.
25242         (main): Implement option.
25243         (start_connection_thread_browser): New.
25244         (handle_connections): Add arg listen_fd_browser and use it.
25245
25246 2015-06-10  Daiki Ueno  <ueno@gnu.org>
25247
25248         agent: Add option --allow-emacs-pinentry.
25249         + commit 691dae270b3b741178912599724d69adabdb48b9
25250         * agent/agent.h (opt): Add field allow_emacs_pinentry.
25251         * agent/call-pinentry.c (start_pinentry): Act upon new var.
25252         * agent/gpg-agent.c (oAllowEmacsPinentry): New.
25253         (opts): Add option --allow-emacs-pinentry.
25254         (parse_rereadable_options): Set this option.
25255         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add new option.
25256
25257 2015-06-09  Werner Koch  <wk@gnupg.org>
25258
25259         doc: Do not used fixed file names in the manuals.
25260         + commit 25331bba5554a39d226d32433add7784b2e170b8
25261         * doc/mkdefsinc.c: New.
25262         * doc/Makefile.am: Include cmacros.am.
25263         (EXTRA_DIST): Add mkdefsinc.c defsincdate.
25264         (BUILT_SOURCES): Add defsincdate
25265         (CLEANFILES): Add mkdefsinc and defs.inc.
25266         (mkdefsinc): New rule.
25267         (yat2m-stamp): Depend on defs.inc.
25268         ($(myman_pages) gnupg.7): Ditto.
25269         (gnupg.texi): Remove rule to touch itself.
25270         (dist-hook): New.
25271         (defsincdate): New.
25272         (defs.inc): New.
25273         * doc/gnupg.texi: Remove inclusion of version.texi.  Include defs.inc.
25274         Also include defs.inc in all files used to build man files.  Change
25275         fixed directory names to those from defs.inc.
25276
25277         dirmngr: Avoid crash due to an empty crls.d/DIR.txt.
25278         + commit 255dadd76d5a2101d2c5450741326b67253fa9ea
25279         * dirmngr/crlcache.c (check_dir_version): Avoid segv.
25280
25281 2015-06-08  Werner Koch  <wk@gnupg.org>
25282
25283         doc: Change the manual source to be only for GnuPG 2.1.
25284         + commit abbefdd04d7ee30218506caeae1fd858569c9f0a
25285
25286
25287         Convey envvar INSIDE_EMACS to the pinentry.
25288         + commit c672572bd50966187cc823585efed673b66ff942
25289         * common/session-env.c (stdenvnames): Add it.
25290
25291         agent: Add command "getinfo std_env_names".
25292         + commit 8425db6a26bf66dad16dfbc26be9af7d272f31d3
25293         * agent/command.c (cmd_getinfo): Add new sub-command.
25294
25295 2015-06-05  NIIBE Yutaka  <gniibe@fsij.org>
25296
25297         scd: do_decipher change for OpenPGPcard v3.0.
25298         + commit cf508a1f7f4c8926dc554be68a2d46f5ce272ac0
25299         * scd/app-openpgp.c (do_decipher): Add a header for ECDH.
25300
25301 2015-06-04  Werner Koch  <wk@gnupg.org>
25302
25303         gpg: Replace -1 by GPG_ERR_NOT_FOUND in tdbio.c.
25304         + commit a4a15195c2a3729025a3ba3439ac8860083fceeb
25305         * g10/tdbio.c (lookup_hashtable): Return GPG_ERR_NOT_FOUND.
25306         * g10/tdbdump.c (import_ownertrust): Test for GPG_ERR_NOT_FOUND.
25307         * g10/trustdb.c (read_trust_record): Ditto.
25308         (tdb_get_ownertrust, tdb_get_min_ownertrust): Ditto.
25309         (tdb_update_ownertrust, update_min_ownertrust): Ditto.
25310         (tdb_clear_ownertrusts, update_validity): Ditto.
25311         (tdb_cache_disabled_value): Ditto.
25312
25313         gpg: Cleanup error code path in case of a bad trustdb.
25314         + commit f170240ef735edc481f60e51527cbb5ee1acfd55
25315         * g10/tdbio.c (tdbio_read_record): Fix returning of the error.
25316
25317         gpg: Fix output in case of a corrupted trustdb.
25318         + commit bf06d04f53296f4b4b73b9360cf1571559bb2295
25319         * g10/tdbdump.c (list_trustdb): Add arg FP and change callers to pass
25320         es_stdout.
25321         * g10/tdbio.c (upd_hashtable): On a corrupted trustdb call
25322         list_trustdb only in verbose > 1 mode and let it dump to stderr.
25323
25324 2015-05-29  NIIBE Yutaka  <gniibe@fsij.org>
25325
25326         scd: Fix key template of ECC.
25327         + commit e5c69e87beebe99d362ac721ce4ea6b057a30a99
25328         * scd/app-openpgp.c (build_ecc_privkey_template): Use correct value.
25329
25330 2015-05-28  NIIBE Yutaka  <gniibe@fsij.org>
25331
25332         g10: Fix a race condition initially creating trustdb.
25333         + commit fe5c6edaed78839303d67e01e141cfc6b5de9aec
25334         * g10/tdbio.c (take_write_lock, release_write_lock): New.
25335         (put_record_into_cache, tdbio_sync, tdbio_end_transaction): Use
25336         new lock functions.
25337         (tdbio_set_dbname): Fix the race.
25338         (open_db): Don't call dotlock_create.
25339
25340 2015-05-27  NIIBE Yutaka  <gniibe@fsij.org>
25341
25342         g10: Remove g10/signal.c.
25343         + commit 6cb18a8f975b7ff7ca79c1fb0cddcd4b66be90fb
25344         * g10/signal.c: Remove.
25345         * g10/main.h: Remove old function API.
25346         * g10/tdbio.c: Use new API, even in the dead code.
25347
25348 2015-05-20  Werner Koch  <wk@gnupg.org>
25349
25350         agent: Cleanup caching code for command GET_PASSPHRASE.
25351         + commit 23d2ef83cda644c6a83499f9327350d3371e8a17
25352         * agent/command.c (cmd_get_passphrase): Read from the user cache.
25353
25354 2015-05-19  Neal H. Walfield  <neal@g10code.com>
25355
25356         agent: When the password cache is cleared, also clear the ext. cache.
25357         + commit 3a9305439b75ccd4446378d4fd87da087fd9c892
25358         * agent/agent.h (agent_clear_passphrase): New declaration.
25359         * agent/call-pinentry.c (agent_clear_passphrase): New function.
25360         * agent/command.c (cmd_clear_passphrase): Call agent_clear_passphrase.
25361
25362         agent: Modify agent_clear_passphrase to support an ext. password cache.
25363         + commit e201c20f25e7bed29088186c5f717d43047a0f4b
25364         * agent/agent.h (agent_get_passphrase): Add arguments keyinfo and
25365         cache_mode.  Update callers.
25366         * agent/call-pinentry.c (agent_get_passphrase): Add arguments keyinfo
25367         and cache_mode.  If KEYINFO and CACHE_MODE describe a cachable key,
25368         then send SETKEYINFO to the pinentry.
25369
25370 2015-05-19  NIIBE Yutaka  <gniibe@fsij.org>
25371
25372         g10: detects public key encryption packet error properly.
25373         + commit c771963140cad7c1c25349bcde27e427effc0058
25374         g10/mainproc.c (proc_pubkey_enc): Only allow relevant algorithms for
25375         encryption.
25376
25377 2015-05-15  Werner Koch  <wk@gnupg.org>
25378
25379         build: Make --disable-gpgsm work.
25380         + commit 43ea8f5d884dd108bb27d8e1610fa28802295a06
25381         * Makefile.am: Always build kbx/
25382         * g10/Makefile.am (AM_CFLAGS): Include KSBA_CFLAGS.
25383
25384 2015-05-12  Werner Koch  <wk@gnupg.org>
25385
25386         Release 2.1.4.
25387         + commit a67ead6525d7597a9e0b152c5971f6290f7912f3
25388
25389
25390         speedo: Add make option SELFCHECK=0 to build a new release.
25391         + commit 21b0701e2e044894c53ff59d22c5c6a172780c25
25392         * build-aux/getswdb.sh: Add option --skip-selfcheck.
25393         * build-aux/speedo.mk: Add option SELFCHECK.
25394
25395 2015-05-11  Werner Koch  <wk@gnupg.org>
25396
25397         common: Cope with AIX problem on number of open files.
25398         + commit 987532b038a2d9b9e76c0de425ee036ca2bffa1b
25399         * common/exechelp-posix.c: Limit returned value for too hight values.
25400
25401         gpg-connect-agent: Fix quoting of internal percent+ function.
25402         + commit 26e2eb98d3d8405b335b43c8e86deacf622cd957
25403         * tools/gpg-connect-agent.c (get_var_ext) <percent, percent+): Also
25404         escape '+'.
25405
25406         agent: Add option --no-allow-external-cache.
25407         + commit d7293cb317acc40cc9e5189cef33fe9d8b47e62a
25408         * agent/agent.h (opt): Add field allow_external_cache.
25409         * agent/call-pinentry.c (start_pinentry): Act upon new var.
25410         * agent/gpg-agent.c (oNoAllowExternalCache): New.
25411         (opts): Add option --no-allow-external-cache.
25412         (parse_rereadable_options): Set this option.
25413
25414         agent: Add strings for use by future Pinentry versions.
25415         + commit 02d5e1205489aa5027a87a64552eaf15984dc22d
25416         * agent/call-pinentry.c (start_pinentry): Add more strings.
25417
25418         agent: Add option --debug-pinentry.
25419         + commit 14232c3870c5ef5d2fa15e8ed3f302b1ba29d25c
25420         * agent/gpg-agent.c (oDebugPinentry): New.
25421         (opts): Add --debug-pinentry.
25422         (parse_rereadable_options): Set that option.
25423         * agent/call-pinentry.c (start_pinentry): Pass option to
25424         assuan_set_flag.
25425
25426 2015-05-08  Werner Koch  <wk@gnupg.org>
25427
25428         gpg: Avoid cluttering stdout with trustdb info in verbose mode.
25429         + commit b03a2647299a6c8764a2574590cbaccdff9e497d
25430         * g10/trustdb.c (validate_keys): Call dump_key_array only in debug
25431         mode.
25432
25433         gpg: Fix wrong output in list mode.
25434         + commit 7039f87375b3c89d6e63837b811ed2be71c8d9db
25435         * g10/parse-packet.c (parse_gpg_control): Replace puts by es_fputs to
25436         LISTFP.
25437
25438         gpg: New command --quick-adduid.
25439         + commit 64e809b791645f343feb69112baba8e2700e454b
25440         * g10/keygen.c (ask_user_id): Factor some code out to ...
25441         (uid_already_in_keyblock): new.
25442         (generate_user_id): Add arg UIDSTR.  Fix leaked P.
25443         * g10/keyedit.c (menu_adduid): Add new arg uidstring.  Adjust caller.
25444         (keyedit_quick_adduid): New.
25445         * g10/gpg.c (aQuickAddUid): New.
25446         (opts):  Add command --quick-adduid.
25447         (main): Implement that.
25448
25449         gpg: Add push/pop found state feature to keydb.
25450         + commit 3c439c0447f8a7468a61bbdc4c9a101ef2451dcb
25451         * g10/keydb.c (keydb_handle): Add field saved_found.
25452         (keydb_new): Init new field.
25453         (keydb_push_found_state, keydb_pop_found_state): New.
25454         * g10/keyring.c (kyring_handle): Add field saved_found.
25455         (keyring_push_found_state, keyring_pop_found_state): New.
25456
25457         gpg: Minor code merging in keyedit.
25458         + commit b772e459fa91cdc7facd95227ebc0faba20a7003
25459         * g10/keyedit.c (fix_keyblock): Rename to fix_key_signature_order.
25460         (fix_keyblock): New.  Call fix_key_signature_order and other fix
25461         functions.
25462         (keyedit_menu): Factor code out to new fix_keyblock.
25463         (keyedit_quick_sign): Ditto.  Check for primary fpr before calling
25464         fix_keyblock.
25465
25466 2015-05-07  Werner Koch  <wk@gnupg.org>
25467
25468         agent: Minor change for 56b5c9f.
25469         + commit 436f2060721e997479a9dd5be8dfc73627dd49c9
25470         * agent/call-pinentry.c (agent_askpin): Move option setting to ...
25471         (start_pinentry): here.  Fix error code check.
25472
25473 2015-05-07  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
25474
25475         dirmngr: Fix segfault in ldap engine.
25476         + commit d0d4984cfec54dee727b9e9d33d09e33c6f2e182
25477         (ks-engine-ldap.c) Fix segfault caused by missing check whether uri is
25478         initialized
25479
25480 2015-05-07  Neal H. Walfield  <neal@g10code.com>
25481
25482         agent: Improve support for externally cached passwords.
25483         + commit 56b5c9f94f2e55d096be585ed061ccf1c9ec0de6
25484         * agent/call-pinentry.c (PINENTRY_STATUS_PASSWORD_FROM_CACHE): New
25485         constant.
25486         (pinentry_status_cb): Add it to *FLAGS if PASSWORD_FROM_CACHE was
25487         provided.
25488         (agent_askpin): Pass "OPTION allow-external-password-cache" to the
25489         pinentry.  Always pass SETKEYINFO to the pinentry.  If there is no
25490         stable identifier, then use "--clear".  If the password is incorrect
25491         and PINENTRY_STATUS_PASSWORD_FROM_CACHE is set in *PINENTRY_STATUS,
25492         then decrement PININFO->FAILED_TRIES.
25493
25494         agent: Or in the value; don't overwrite the variable.
25495         + commit 74944330ba7229ed0cbe23cc0f573962a444bd07
25496         * agent/call-pinentry.c (pinentry_status_cb): Or in
25497         PINENTRY_STATUS_CLOSE_BUTTON; don't overwrite *FLAG.
25498
25499         agent: Avoid magic numbers.  Use more accurate names.
25500         + commit d3b5cad2346bd5747789dc62d7804fa5c15f4f3b
25501         * agent/call-pinentry.c (PINENTRY_STATUS_CLOSE_BUTTON): New constant.
25502         (PINENTRY_STATUS_PIN_REPEATED): Likewise.
25503         (close_button_status_cb): Rename from this...
25504         (pinentry_status_cb): ... to this.  Use the constants.
25505         (agent_askpin): Rename local variable from close_button to
25506         pinentry_status.  Use symbolic constants rather than magic numbers.
25507
25508 2015-05-07  Werner Koch  <wk@gnupg.org>
25509
25510         gpg: Improve 'General key info' line of --card-status.
25511         + commit 874ef16e70ab750db7b153f17a7e859a0db6a2f1
25512         * g10/keylist.c (print_pubkey_info): Print either "pub" or "sub".
25513
25514         * g10/getkey.c (get_pubkey_byfprint): Add optional arg R_KEYBLOCK.
25515         * g10/keyid.c (keyid_from_fingerprint): Adjust for change.
25516         * g10/revoke.c (gen_desig_revoke): Adjust for change.
25517         * g10/card-util.c (card_status): Simplify by using new arg.  Align
25518         card-no string.
25519
25520         * g10/card-util.c (card_status): Remove not used GnuPG-1 code.
25521
25522         gpg: Fix regression not displaying the card serial number.
25523         + commit 173b26c8f83a3c623165a96c315bf9ed4b90edcc
25524         * g10/call-agent.c (keyinfo_status_cb): Detect KEYINFO.
25525
25526 2015-05-06  Werner Koch  <wk@gnupg.org>
25527
25528         speedo,w32: Install a native pinentry.
25529         + commit 154abaf3c97dae43ba972e4482680a287f3e5c39
25530         * build-aux/speedo.mk: Always build pinentry for w32.
25531         (speedo_pkg_pinentry_configure): Adjust to modern pinentry.
25532         * build-aux/speedo/w32/inst.nsi: Install native pinentry under the
25533         name pinentry-basic.exe.
25534
25535 2015-05-01  NIIBE Yutaka  <gniibe@fsij.org>
25536
25537         g10: fix cmp_public_key.
25538         + commit f77fd572db658959fa40aa8c181be919e688b707
25539         * g10/free-packet.c (cmp_public_keys): Compare opaque
25540         data at the first entry of the array when it's unknown algo.
25541
25542 2015-04-30  NIIBE Yutaka  <gniibe@fsij.org>
25543
25544         scd: PC/SC reader selection by partial string match.
25545         + commit 01a2a61bc4b34817c4216888265f65d59a33dad3
25546         * scd/apdu.c (open_pcsc_reader_direct): Partial string match.
25547
25548 2015-04-24  Werner Koch  <wk@gnupg.org>
25549
25550         common: Remove JNLIB from boiler plate (jnlib merge).
25551         + commit 172b6193488f433a206fd88f85d8c4a5d1eb7fdf
25552         * common/README.jnlib: Remove.
25553
25554         common: Rename log and gcc attribute macros (jnlib merge).
25555         + commit 26d7e0d7accf269c15fb4bc23e5e80580bfb7fe3
25556         * common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*.
25557         * common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*.
25558
25559         common: Remove two JNLIB_ macros (jnlib merge).
25560         + commit 575230d91bba95697518da418ea0e8712f889a0f
25561         * configure.ac: Merge seperate jnlib checks.
25562         (HAVE_JNLIB_LOGGING): Remove.
25563         * common/logging.c, common/simple-pwquery.c (JNLIB_NEED_AFLOCAL):
25564         Rename to GNUPG_COMMON_NEED_AFLOCAL.  Change all tests.
25565
25566         common: Remove libjnlib-config.h (jnlib merge).
25567         + commit 17bcd087082d01c48c60ff20d7f9a40f34c6969f
25568         * common/libjnlib-config.h: Remove.
25569         * common/common-defs.h (getenv) [HAVE_GETENV]: New.  From removed
25570         header.
25571         (getpid) [HAVE_W32CE_SYSTEM]: New.  From removed header.
25572         * common/argparse.c: Include util.h and common-defs.h.  Replace
25573         jnlib_ macro names for non-GNUPG builds by x* names.
25574         * common/dotlock.c: Ditto.
25575         * common/logging.c: Include util.h and common-defs.h.  Replace jnlib_
25576         symbol names by x* names.
25577         * common/strlist.c: Ditto.
25578         * common/utf8conv.c: Ditto.
25579         * common/w32-reg.c: Ditto.
25580         * common/mischelp.c: Ditto.  Also remove _jnlib_free.
25581         * common/stringhelp.c: Ditto.
25582         (JNLIB_LOG_WITH_PREFIX): Do not depend on this macro.
25583         * common/logging.h (JNLIB_LOG_WITH_PREFIX): Do not depend on this
25584         macro.
25585
25586 2015-04-23  Werner Koch  <wk@gnupg.org>
25587
25588         gpg: Move all DNS access to Dirmngr.
25589         + commit 154f3ed2bf64de801ae0f9796338a2767ec6357b
25590         * common/dns-cert.h: Move to ../dirmngr/.
25591         * common/dns-cert.c: Move to ../dirmngr/.  Change args to return the
25592         key as a buffer.
25593         * common/t-dns-cert.c: Move to ../dirmngr/.
25594         * common/pka.c, common/pka.h, common/t-pka.c: Remove.
25595
25596         * dirmngr/server.c (data_line_cookie_write): Factor code out to
25597         data_line_write and make it a wrapper for that.
25598         (data_line_write): New.
25599         (cmd_dns_cert): New.
25600         (register_commands): Register new command.
25601
25602         * g10/Makefile.am (LDADD): Remove DNSLIBS.
25603         * g10/call-dirmngr.c (dns_cert_parm_s): New.
25604         (dns_cert_data_cb, dns_cert_status_cb): New.
25605         (gpg_dirmngr_dns_cert): New.
25606         (gpg_dirmngr_get_pka): New.
25607         * g10/gpgv.c (gpg_dirmngr_get_pka): New dummy function.
25608         * g10/keyserver.c (keyserver_import_cert): Replace get_dns_cert by
25609         gpg_dirmngr_dns_cert.
25610         (keyserver_import_pka): Replace get_pka_info by gpg_dirmngr_get_pka.
25611         * g10/mainproc.c: Include call-dirmngr.h.
25612         (pka_uri_from_sig): Add CTX arg. Replace get_pka_info by
25613         gpg_dirmngr_get_pka.
25614
25615         common: Minor change of hex2str to allow for embedded nul.
25616         + commit ce11cc39ea7e011040debc9339a2310a714efe7e
25617         * common/convert.c (hex2str): Set ERRNO.  Return adjusted COUNT.
25618
25619 2015-04-23  NIIBE Yutaka  <gniibe@fsij.org>
25620
25621         common: removal of t-support.c from t_jnlib_src.
25622         + commit a7264e3a6a83189a9e43edf5e99f5ac7ee42a2ab
25623         * common/Makefile.am (t_jnlib_src): Remove t-support.c.
25624
25625 2015-04-21  Werner Koch  <wk@gnupg.org>
25626
25627         gpg: Make keyserver-option http_proxy work.
25628         + commit c4d98734c5df39f57a71f0ec1c0c80e82ff08508
25629         * g10/options.h (opt): Add field keyserver_options.http_proxy.
25630         * g10/keyserver.c (warn_kshelper_option): Add arg noisy.
25631         (parse_keyserver_options): Parse into new http_proxy field.
25632         * g10/call-dirmngr.c (create_context): Send the http-proxy option.
25633
25634         common: Make proper use of http proxy parameter.
25635         + commit 54e55149f2af96eff08bfd6f70ef13d007fb58c7
25636         * common/http.c (is_hostname_port): New.
25637         (send_request): Fix proxy name parsing.
25638
25639         dirmngr: Add http proxy support for keyservers.
25640         + commit a0dead5edce07838cf5ff3ec7205a3bff2a6ef70
25641         * dirmngr/dirmngr.h (server_control_s): Add field http_proxy.
25642         * dirmngr/dirmngr.c (dirmngr_init_default_ctrl): Copy http_proxy value
25643         from OPT.
25644         (dirmngr_deinit_default_ctrl): New.
25645         (main): Call dirmngr_deinit_default_ctrl.
25646         * dirmngr/server.c (start_command_handler): Ditto.
25647         (option_handler): Add option "http-proxy".
25648         * dirmngr/crlfetch.c (crl_fetch): Take http_proxy from CTRL.
25649         * dirmngr/ocsp.c (do_ocsp_request): Ditto.
25650         * dirmngr/ks-engine-hkp.c (send_request): Add proxy support.
25651         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
25652
25653         gpg: Do not use honor-keyserver-url sub-option by default.
25654         + commit 727fe4f8d7d5fc3eac0b0aa6fafa4a314686d7dc
25655
25656
25657         gpg: Make preferred keyservers work.
25658         + commit ae0d65f86413a82a40cf68e08aaeca405eee8c78
25659         * g10/call-dirmngr.c (dirmngr_local_s): Add field set_keyservers_done.
25660         (create_context): Move keyserver setting to ...
25661         (open_context): here.
25662         (clear_context_flags): New.
25663         (gpg_dirmngr_ks_get): Add arg override_keyserver.
25664         * g10/keyserver.c (keyserver_refresh): Improve diagnostics.
25665         (keyserver_get_chunk): Ditto.  Pass OVERRIDE_KEYSERVER to ks_get.
25666
25667         gpg: Update sub-options of --keyserver-options.
25668         + commit da1990bac71f6447d8ebd169c3b3b186e9f287d9
25669         * g10/options.h (KEYSERVER_HTTP_PROXY): New.
25670         (KEYSERVER_USE_TEMP_FILES, KEYSERVER_KEEP_TEMP_FILES): Remove.
25671         (KEYSERVER_TIMEOUT): New.
25672         * common/keyserver.h (KEYSERVER_TIMEOUT): Remove.
25673         * g10/keyserver.c (keyserver_opts): Remove obsolete "use-temp-files"
25674         and "keep-temp-files". Add "http-proxy" and "timeout".
25675         (parse_keyserver_options): Remove 1.2 compatibility option
25676         "honor-http_proxy".  Remove "use-temp-files" and "keep-temp-files"
25677         code.
25678
25679 2015-04-14  Werner Koch  <wk@gnupg.org>
25680
25681         agent: Send the new SETKEYINFO command to the Pinentry.
25682         + commit 2180845959839705200e3172dbafc94b70b9007f
25683         * agent/call-pinentry.c (agent_askpin): Add args keyinfo and
25684         cache_mode.  Change all callers to pass (NULL,0) for them.  Send
25685         SETKEYINFO command.
25686         * agent/findkey.c (unprotect): Pass the keygrip and the cache_mode for
25687         the new args.
25688
25689 2015-04-14  NIIBE Yutaka  <gniibe@fsij.org>
25690
25691         scd: better handling of extended APDU.
25692         + commit 971d558e862db878a7310e06ed7116dbe36886ab
25693         * scd/apdu.c (send_le): Bug fix for not append Z when lc<0&&le<0.
25694         * scd/app-common.h (struct app_ctx_s): Use bit fields for flags.
25695         * scd/ccid-driver.c (CCID_MAX_BUF): New.  Only for OpenPGPcard.
25696         (struct ccid_driver_s): New field of max_ccid_msglen.
25697          Remove ifsd field.
25698         (parse_ccid_descriptor): Initialize max_ccid_msglen.
25699         (ccid_transceive_apdu_level): Implement sending extended APDU in
25700         chain of CCID message.
25701
25702 2015-04-13  Werner Koch  <wk@gnupg.org>
25703
25704         gpg: Fix NULL-segv due to invalid imported data.
25705         + commit 25fce93ba19d997e234a674d5cc98df82c5b5496
25706         * g10/free-packet.c (my_mpi_copy): New.
25707         (copy_public_key, copy_signature): Use instead of mpi_copy.
25708
25709 2015-04-13  Neal H. Walfield  <neal@g10code.com>
25710
25711         dirmngr: If LDAP is not enable, don't build the LDAP bits.
25712         + commit 5cde5bf37339cdeb0bd0a33d39477382eafebede
25713         * dirmngr/Makefile.am (dirmngr_SOURCES): Only include
25714         ks-engine-ldap.c, ldap-parse-uri.c and ldap-parse-uri.h if USE_LDAP
25715         is TRUE.
25716         (module_tests): Only add t-ldap-parse-uri if USE_LDAP is TRUE.
25717         * dirmngr/ks-action.c: Only include "ldap-parse-uri.h" if USE_LDAP is
25718         TRUE.
25719         (ks_action_help): Don't invoke LDAP functionality if USE_LDAP is not
25720         TRUE.
25721         (ks_action_search): Likewise.
25722         (ks_action_get): Likewise.
25723         (ks_action_put): Likewise.
25724         * dirmngr/server.c: Only include "ldap-parse-uri.h" if USE_LDAP is
25725         TRUE.
25726         (cmd_keyserver): Don't invoke LDAP functionality if USE_LDAP is not
25727         TRUE.
25728
25729 2015-04-13  Werner Koch  <wk@gnupg.org>
25730
25731         common: Do without nested fucntions to support non-gcc.
25732         + commit 454f60399c7318fffd3de2afadd58c7a490178bd
25733         * common/t-stringhelp.c (test_strsplit): Remove nested function.
25734
25735 2015-04-11  Werner Koch  <wk@gnupg.org>
25736
25737         Release 2.1.3.
25738         + commit b1e1959d59a12b53c016ca9c95aee3a62c0bfc00
25739
25740
25741 2015-04-11  Yuri Chornoivan  <yurchor@ukr.net>
25742
25743         po: Update Ukrainian translation.
25744         + commit 896f438967b66b4836419aa737c706ced6b6454a
25745
25746
25747 2015-04-11  Ineiev  <ineiev@gnu.org>
25748
25749         po: Update and review Russian translation.
25750         + commit b69d7064f30c38ffe18e71de6a0fc14b5da0452f
25751
25752
25753 2015-04-10  Werner Koch  <wk@gnupg.org>
25754
25755         dirmngr,w32: Make it build for Windows.
25756         + commit c8bb5000d4c86a055348dc08352f573c599743a7
25757         * dirmngr/Makefile.am (t_common_ldadd): Add missing libs.
25758
25759         Remove obsolete directories from AM_CPPFLAGS.
25760         + commit 67158ff155ef52fd54a6bbe680551c0e12b31e69
25761
25762
25763         dirmngr,w32: Replace functions not available under Windows.
25764         + commit 0fb224c2c5e0c6770d4a6044d62d84f6bbc1b26b
25765         * dirmngr/ks-engine-ldap.c (extract_attributes): Replace isoptime and
25766         gmtime_r.
25767
25768         common: Add new function gnupg_gmtime.
25769         + commit 5d60c7f7e05a06e46e23bafe61cef09ad32aa998
25770         * common/gettime.c (gnupg_gmtime): New.
25771         (gnupg_get_isotime): Use it.  Also take care of an gmtime_t returning
25772         an error.
25773
25774         common: Add new function isodate_human_to_tm.
25775         + commit f6670100b7a15b2071c2e4062f5c5a678f2a30f6
25776         * common/gettime.c (isotime_human_p): Add arg date_only.
25777         (isodate_human_to_tm): New.
25778         * common/t-gettime.c (test_isodate_human_to_tm): New.
25779         (main): Call new test.
25780
25781         dirmngr,w32: Avoid name clash with existing function.
25782         + commit 6ad95fe6f1f130c8f6d139a9bd57fc4a0d38292b
25783         * dirmngr/ks-engine-ldap.c (ldap_connect): Rename to my_ldap_connect.
25784
25785         gpgparsemail: Fix last commit (3f2bdac)
25786         + commit 9433661419043431a6cfc7d84c8450e0b2f6c353
25787         * tools/rfc822parse.c (parse_field): Replace break by goto.
25788
25789 2015-04-09  Werner Koch  <wk@gnupg.org>
25790
25791         gpgparsemail: Fix case of zero length continuation lines.
25792         + commit 3fbeba64a8bfb2b673230c124a3d616b6568fd2f
25793         * tools/rfc822parse.c (parse_field): Loop after continuation line.
25794
25795 2015-04-08  Werner Koch  <wk@gnupg.org>
25796
25797         sm: Fix certificate lookup in dirmngr cache.
25798         + commit 6619ead2cfd2abcb95b66dc70622fdeef624fb8a
25799         * sm/call-dirmngr.c (get_cached_cert): Fix typo in LOOKUP command.
25800
25801 2015-04-06  Werner Koch  <wk@gnupg.org>
25802
25803         gpg: Print the user id in --fast-list-mode.
25804         + commit c2383407bba5eefea486464a31e02846124c9da5
25805         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Change.
25806
25807         gpg: Prepare to pass additional context to the list functions.
25808         + commit 67a58118ab6171c0cf28b65a39973062690d1313
25809         * g10/keylist.c (struct sig_stats): Rename to keylist_context and add
25810         field check_sigs.
25811         (keylist_context_release): New.
25812         (list_all): Set listctx.check_sigs and call release func.
25813         (list_one): Ditto.
25814         (locate_one): Ditto.
25815         (list_keyblock_print): Use .check_sigs field.  Repalce arg opaque by
25816         listctx.
25817         (list_keyblock): Ditto.  Make static.
25818         (list_keyblock_direct): New.
25819         * g10/keygen.c (do_generate_keypair): Replace list_keyblock by
25820         list_keyblock_direct.
25821
25822         gpg: Merge duplicated code for get_user_id et al.
25823         + commit f577d5c1a747d673fa1d5c012ce3e3b78b699c6a
25824         * g10/getkey.c (get_user_id_string): Add args mode and r_LEN.
25825         (get_user_id_string_native): Add new args.
25826         (get_long_user_id_string, get_user_id): Rewrite using
25827         get_user_id_string.
25828
25829         gpg: Add new option --debug-iolbf.
25830         + commit c581ed717ad2cc4be90c46253baa44a0d3ba5b80
25831         * g10/gpg.c (oDebugIOLBF): new.
25832         (opts): Add --debug-iolbf.
25833         (main): Set option.
25834
25835         Rename DBG_ASSUAN to DBG_IPC and add separate DBG_EXTPROG.
25836         + commit 24a75201da6be72edf85b96dbc0c01c747d02c6a
25837         * g10/options.h (DBG_EXTPROG_VALUE): Separate from DBG_IPC_VALUE.
25838
25839         Fix use of DBG_CACHE and DBG_LOOKUP.
25840         + commit 2f099eb62ac6491675bbcccaca4e076b2d8e7ea0
25841         * dirmngr/dirmngr.h (DBG_LOOKUP_VALUE): Change to 8192.
25842         * g10/options.h (DBG_LOOKUP_VALUE, DBG_LOOKUP): New.
25843         * g10/getkey.c: Use DBG_LOOKUP instead of DBG_CACHE at most places.
25844
25845         gpg: Rename a debug macro.
25846         + commit 4de8a58e44262a25564e2acef8c8865d1755982e
25847         * g10/options.h (DBG_CIPHER_VALUE): Rename to DBG_CRYPTO_VALUE.
25848         (DBG_CIPHER): Rename to DBG_CRYPTO.
25849
25850 2015-04-05  Werner Koch  <wk@gnupg.org>
25851
25852         gpg: Fix DoS while parsing mangled secret key packets.
25853         + commit d901efcebaefaf6eae4a9b9aa8f0c2c055d3518a
25854         * g10/parse-packet.c (parse_key): Check PKTLEN before calling mpi_read
25855         et al.
25856
25857 2015-04-03  NIIBE Yutaka  <gniibe@fsij.org>
25858
25859         g10: Fix keytocard.
25860         + commit f82c4a6d0d76e716b6a7b22ca964fa2da1f962a0
25861         g10/call-agent.h (agent_scd_learn): Add FORCE option.
25862         g10/call-agent.c (agent_scd_learn): Implement FORCE option.
25863         g10/keygen.c (gen_card_key): Follow the change of option.
25864         g10/card-util.c (change_pin, card_status, factory_reset): Likewise.
25865         g10/keyedit.c (keyedit_menu): Update private key storage by
25866         agent_scd_learn.
25867
25868         agent: Add --force option for LEARN.
25869         + commit 4ffadb74b3ada8a5d69ef8d87f4326df9bd97e97
25870         * agent/command.c (cmd_learn): Handle --force option.
25871         (cmd_keytocard): Don't update key storage file.
25872         * agent/agent.h (agent_handle_learn): Add FORCE.
25873         * agent/learncard.c (agent_handle_learn): Implement FORCE to update
25874         key stroage file.
25875
25876 2015-03-31  Neal H. Walfield  <neal@g10code.com>
25877
25878         dirmngr: Don't use alloca.
25879         + commit d0ff2ee04187fbedacbe4d3884ee75d957a0b8c6
25880         * dirmngr/ks-engine-ldap.c (ks_ldap_put): Replace use of alloca with
25881         xmalloc and xfree.
25882
25883         dirmngr: Simplify truncation of long strings in debug code.
25884         + commit 802eec0ca49b92104c92f18c9a6a04c34de74168
25885         * dirmngr/ks-engine-ldap.c (modlist_dump): Simplify truncation of long
25886         strings.
25887
25888         dirmngr: Use a better error code.
25889         + commit 7f6d7948c1e56e09c1bdaa5143e1b5558c4376dd
25890         * dirmngr/ldap-parse-uri.c (ldap_parse_uri): On error, return
25891         GPG_ERR_GENERAL, not GPG_ERR_ASS_GENERAL.
25892
25893         dirmngr: Better encapsulate the keyservers variable.
25894         + commit 348c520040a31f5c322183c0654a34978e2baf6f
25895         * dirmngr/dirmngr.h (struct server_control_s): Move field keyservers
25896         from here...
25897         * dirmngr/server.c (struct server_local_s): ... to here.  Update
25898         users.
25899         * dirmngr/ks-action.h (ks_action_resolve): Add argument keyservers.
25900         (ks_action_search): Likewise.
25901         (ks_action_get): Likewise.
25902         (ks_action_put): Likewise.
25903         * dirmngr/ks-action.c (ks_action_resolve): Add argument keyservers.
25904         Use it instead of ctrl->keyservers.
25905         (ks_action_search): Likewise.
25906         (ks_action_get): Likewise.
25907         (ks_action_put): Likewise.
25908
25909 2015-03-28  Neal H. Walfield  <neal@g10code.de>
25910
25911         gpg: Only use the last specified keyserver.
25912         + commit f26ba14028d34845ae10aae552b90681907e377d
25913         * g10/gpg.c (main): Only use the last specified keyserver.
25914
25915 2015-03-25  Werner Koch  <wk@gnupg.org>
25916
25917         dirmngr: Fix resource leaks and check rare errors.
25918         + commit bec10ae4b5a870303c800cdf3cd906044613fc2d
25919         * dirmngr/ks-engine-ldap.c (keyspec_to_ldap_filter): Fix resource
25920         leak.
25921         (ks_ldap_search): Check error from es_fopenmem.  Use LDAP_ERR where
25922         required.
25923         (modlist_dump): Check error from es_fopenmem.
25924         (uncescape): s/int/size_t/.  Use existing macros.
25925         (extract_attributes): Use existing trim function.
25926         (ks_ldap_put): Do not segv on error from modlist_dump.
25927
25928         dirmngr: Minor cleanups.
25929         + commit 6c701af121782c2feb4ee51e559a7420df00471f
25930         * dirmngr/ks-engine-ldap.c [__riscos__]: Remove doubled util.h.
25931         (ldap_to_gpg_err): s/GPG_ERR_GENERAL/GPG_ERR_INTERNAL/.
25932         (tm2ldaptime): Use snprintf.
25933         (ldap_connect): Get error code prior to log_error and and use modern
25934         function.   Use xfree, xtrustrdup etc.
25935         (modlist_lookup): Use GNUPG_GCC_A_USED.
25936         (modlist_free): Use xfree.
25937
25938         common: Add macro GNUPG_GCC_A_USED.
25939         + commit 99ef9cd7f589b51921bfbe8d52735c104ef260e3
25940         * common/util.h (GNUPG_GCC_A_USED): New.
25941
25942         sm: Change default algos to SHA256 (CSR) and AES128 (bulk encryption).
25943         + commit 1e4d8ddbe3ad7ee8f1c1d1798694d91f792776c0
25944         * sm/certreqgen.c (create_request): Change default hash algo.
25945         * sm/gpgsm.c (DEFAULT_CIPHER_ALGO): Change default bulk cipher algo.
25946
25947 2015-03-24  Werner Koch  <wk@gnupg.org>
25948
25949         gpg,w32: Handle forward slash in --keyring option.
25950         + commit bdd22e3a0846d38a0b6cdb822476ad2f15d03455
25951         * g10/keydb.c (keydb_add_resource): Allow forward slash under Windows.
25952
25953 2015-03-23  Neal H. Walfield  <neal@g10code.de>
25954
25955         Improve documentation for ks_hkp_get.
25956         + commit 7a56b6b3aa8b7a07bd80a3fcd5114bd1af359fa3
25957         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Improvement documentation.
25958
25959         Improve documenation of http_parse_uri.
25960         + commit 00a16cf49336ee0b4ce21eb05a79db955af053e0
25961         * common/http.c (http_parse_uri): Improve documentation.
25962
25963         Add support to talking to LDAP key servers.
25964         + commit 51341badb623927f2a358588c725a356fc77dbe7
25965         * g10/call-dirmngr.c (record_output): New function.
25966         (ks_put_inq_cb): Use it here to generate a --with-colons like output
25967         instead of a custom format.
25968         * dirmngr/ks-action.c: Include "ldap-parse-uri.h".
25969         (ks_action_help): If the provided URI is an LDAP URI, then use
25970         ldap_parse_uri to parse.  Call ks_ldap_help.
25971         (ks_action_search): If passed an LDAP URI, then call ks_ldap_search.
25972         (ks_action_get): Likewise.
25973         (ks_action_put): Likewise.  Also, change data from a 'const void *' to
25974         a 'void *' and add info and infolen parameters.  Add note that
25975         function may modify DATA.
25976         * dirmngr/ks-action.h (ks_action_put): Update declaration accordingly.
25977         * dirmngr/server.c: Include "ldap-parse-uri.h".
25978         (cmd_keyserver): If ITEM->URI is an LDAP URI, parse it using
25979         ldap_parse_uri.
25980         (hlp_ks_put): Improve documentation.
25981         (cmd_ks_put): Also pass info and infolen to ks_action_put.  Improve
25982         documentation.
25983         * dirmngr/ks-engine.h (ks_ldap_help): New declaration.
25984         (ks_ldap_search): Likewise.
25985         (ks_ldap_get): Likewise.
25986         (ks_ldap_put): Likewise.
25987         * dirmngr/ks-engine-ldap.c: New file.
25988         * dirmngr/Makefile.am (dirmngr_SOURCES): Add ks-engine-ldap.c,
25989         ldap-parse-uri.c and ldap-parse-uri.h.
25990         (dirmngr_LDADD) [USE_LDAP]: Add $(ldaplibs).
25991
25992         Import _gpgme_parse_timestamp from gpgme as parse_timestamp.
25993         + commit 81e83060856f02f6cfc7b48f8032e0cf14fc6c68
25994         * common/gettime.h (parse_timestamp): New declaration.
25995         * common/gettime.c (_win32_timegm): New function imported from
25996         gpgme/src/conversion.c:_gpgme_timegm.
25997         (parse_timestamp): New function imported from
25998         gpgme/src/conversion.c:_gpgme_parse_timestamp.
25999
26000         Move copy_stream function to misc.c.
26001         + commit 9e79a15f74c428624b0049a3f6a077c1bc7c731d
26002         * dirmngr/ks-action.c (copy_stream): Move function from here...
26003         * dirmngr/misc.c (copy_stream): ... to here and drop the static
26004         qualifier.
26005         * dirmngr/misc.h (copy_stream): Add declaration.
26006
26007         Move armor_data to misc.c.
26008         + commit 63552852bf191985b4b55aa524bc397c5b1d1515
26009         * dirmngr/ks-engine-hkp.c (armor_data): Move function from here...
26010         * dirmngr/misc.c (armor_data): ... to here and drop static qualifier.
26011         * dirmngr/misc.h: New declaration.
26012
26013         Add new LDAP utility functions.
26014         + commit 1a75b7c39f0a84f518711438565645a34fb2673f
26015         * dirmngr/Makefile.am (module_tests): New variable.
26016         (noinst_PROGRAMS): New primary.  Set it to $(module_tests).
26017         (TESTS): New variable.  Set it to $(module_tests).
26018         (t_common_src): New variable.
26019         (t_common_ldadd): Likewise.
26020         (t_ldap_parse_uri_SOURCES): New primary.
26021         (t_ldap_parse_uri_LDADD): Likewise.
26022         * dirmngr/ldap-parse-uri.c: New file.
26023         * dirmngr/ldap-parse-uri.h: Likewise.
26024         * dirmngr/t-ldap-parse-uri.c: Likewise.
26025         * dirmngr/t-support.h: Likewise.
26026
26027         Add new function uri_query_lookup.
26028         + commit e23b3ba5ffd3134a72da176a039e4d6c4f3ff595
26029         * common/http.h (uri_query_lookup): New declaration.
26030         * common/http.c (uri_query_lookup): The corresponding implementation.
26031
26032         Add new function strlist_find.
26033         + commit 79907ad256f5b84f36cbebdc92e5a05d9e266557
26034         * common/strlist.h (strlist_find): New declaration.
26035         * common/strlist.c (strlist_find): New function.
26036
26037         common: Add new helper function, strsplit.
26038         + commit b18ffcb81a3839dbf09603d70ebb8b80f65892d3
26039         * common/stringhelp.h (strsplit): New declaration.
26040         * common/stringhelp.c (strsplit): New function.
26041         * common/t-stringhelp.c (test_strsplit): New function.
26042         (main): Call it here.
26043
26044 2015-03-20  Werner Koch  <wk@gnupg.org>
26045
26046         gpg: Consider a mailbox only userid in mail search mode.
26047         + commit bebab54027d8c63574a2680c60481cfe9b88c240
26048         * kbx/keybox-search.c: Include mbox-util.h.
26049         (blob_cmp_mail): Improve OpenPGP uid parsing.
26050
26051         common: Add function is_valid_mailbox_mem.
26052         + commit a0eb2e4e8cef9ca6a5dfbae6440fa6cd583d0805
26053         * common/mbox-util.c (mem_count_chr): New.
26054         (my_memstr): New.
26055         (has_invalid_email_chars): Change args to work on a buffer.
26056         (is_valid_mailbox_mem): New.
26057         (is_valid_mailbox): Rewrite to use is_valid_mailbox_mem.
26058
26059         gpg: Find keys using mail addresses with garbage after the '>'
26060         + commit 783a4a98378fa1aa222d5cb7427dd37151feb08b
26061         * kbx/keybox-search.c (blob_cmp_mail): Stop comparing at the '>'.
26062
26063         common: Fix syntax error when building with gnutls.
26064         + commit 5136e39c6466de90697153ea253c4b540c1f7d1a
26065         * common/http.c (send_request): Add missing comma.
26066
26067 2015-03-19  Werner Koch  <wk@gnupg.org>
26068
26069         gpg: Emit status line NEWSIG before signature verification starts.
26070         + commit e7ddaad0fd2c8774a1d3367adfaa68014eaf65de
26071         * g10/mainproc.c (check_sig_and_print): Emit STATUS_NEWSIG.
26072
26073         agent: Compute correct MPI length header for protected ECC keys.
26074         + commit cf83ff01fce3ddcbde6d97dffa0db6f277588e25
26075         * agent/cvt-openpgp.c (apply_protection): Strip leading zeroes from
26076         opaque MPIs to comply with the OpenPGP spec.
26077
26078         hkps: Fix host name verification when using pools.
26079         + commit dc10d466bff53821f23d2cb4814c259d40c5d9c5
26080         * common/http.c (send_request): Set the requested for SNI.
26081         * dirmngr/ks-engine-hkp.c (map_host): Return the poolname and not
26082         the selecting a host.
26083
26084         Define replacement error codes from libgpg-error 1.19.
26085         + commit 28bb3ab686c1c994f67a92b6846b3726c58a0bc3
26086         * common/util.h: Add GPG_ERR_LDAP codes for libgpg-error < 1.19.
26087
26088 2015-03-17  Andre Heinecke  <aheinecke@intevation.de>
26089
26090         gpgtar: Fix extracting files with !(size % 512)
26091         + commit 6cbbb0bec98e1acefc4c7163cc41a507469db920
26092         * tools/gpgtar-extract.c (extract_regular): Handle size multiples
26093           of RECORDSIZE.
26094
26095 2015-03-17  Werner Koch  <wk@gnupg.org>
26096
26097         common: Add feature to ease using argparse's usage().
26098         + commit 9078b75a73600fc6b7b5502ceee8de032bb9c446
26099         * common/argparse.c (show_help): Take care of flag value
26100         (usage): Ditto.
26101
26102         common: Allow standalone build of argparse.c.
26103         + commit eb5f2c0af6691229300ac120ee44815cb27ed38e
26104         * common/argparse.h: Remove types.h - not required.
26105         * common/argparse.c: Change to allow standalone use.
26106
26107 2015-03-16  Werner Koch  <wk@gnupg.org>
26108
26109         gpg: Create all MPIs with RFC-4880 correct length headers.
26110         + commit ab17f7b6c392782718f57eaea94fc18a0ff49389
26111         * g10/build-packet.c (gpg_mpi_write): Strip leading zeroes.
26112
26113         gpg: Allow printing of MPI values in --list-mode.
26114         + commit bcc8250bc5b9a357c6d1444f03e334edec573ede
26115         * g10/parse-packet.c (set_packet_list_mode): Set mpi_print_mode.
26116         * g10/misc.c (mpi_print): Do not print an extra leading zero.
26117
26118         gpg: Fix broken write of opaque MPI length header.
26119         + commit 8bc1debfefb7cd4b0be724317793d59dea37d677
26120         * g10/build-packet.c (gpg_mpi_write): Use a char array for the length.
26121
26122 2015-03-15  Werner Koch  <wk@gnupg.org>
26123
26124         gpg: Fix possible dead code elimination.
26125         + commit 1a9f13bc663daa75c5009f6a0bf7d7483f12cce0
26126         * g10/encrypt.c: Change condition for detecting a real file.
26127
26128         g13: Fix pointer wrap check.
26129         + commit 4bc3a2e954afc2ba7dbe79ba5f740184b7d4cd73
26130         * g13/utils.c (find_tuple, next_tuple): Cast pointer to size_t before
26131         doing an overflow check.
26132
26133         agent: Remove useless conditions in command.c.
26134         + commit 3a35c9740ab792068ec4b3732ecfaa17bf4fc7f0
26135         * agent/command.c (cmd_setkeydesc): Remove NULL check.
26136         (cmd_get_passphrase): Ditto.
26137         (cmd_clear_passphrase): Ditto.
26138         (cmd_get_confirmation): Ditto.
26139         (cmd_getval): Ditto.
26140         (cmd_putval): Ditto.
26141
26142         agent: Fix length test in sshcontrol parser.
26143         + commit 3529dd8bb5bafc4e02915648d5f409bd27a9cc37
26144         * agent/command-ssh.c (ssh_search_control_file): Check S before
26145         upcasing it.
26146
26147         agent: Remove useless conditions.
26148         + commit 95415bdec77a608e6052ba3e2a5d857a8e8f7689
26149         * agent/genkey.c (agent_ask_new_passphrase): Remove useless condition.
26150         * agent/command-ssh.c (ssh_identity_register): Ditto.
26151
26152         gpg: Remove useless condition.
26153         + commit c59b410cf1d5676de7061e5a183c01227aa8e760
26154         * g10/keylist.c (list_keyblock_colon): Remove useless condition (PK).
26155         (list_keyblock_print):  Likewise.
26156
26157         scd: Fix possible NULL deref in apdu.c.
26158         + commit ef0a3abf7305133d071bf1a94a7f461082f9a9aa
26159         * scd/apdu.c (control_pcsc_direct): Take care of BUFLEN being NULL.
26160         (control_pcsc_wrapped): Ditto.
26161
26162         common: Make openpgp_oid_to_str more robust.
26163         + commit 35db798c2df7f31b52a9dd9d55ea60ae1f325be9
26164         * common/openpgp-oid.c (openpgp_oid_to_str): Take care of
26165         gcry_mpi_get_opaque returning NULL.  Remove useless condition !BUF.
26166
26167 2015-03-11  Werner Koch  <wk@gnupg.org>
26168
26169         agent: Improve error reporting from Pinentry.
26170         + commit efde50f92af241d8357db83e280a6ece62f6397f
26171         * agent/call-pinentry.c (unlock_pinentry): Add error logging.  Map
26172         error source of uncommon errors to Pinentry.
26173
26174 2015-03-10  Werner Koch  <wk@gnupg.org>
26175
26176         gpg: Change --print-pka-records into an option.
26177         + commit 7b5b52f3268b093eebbac3f199fb69bf246d9cd1
26178         * g10/gpg.c (aPrintPKARecords): Rename to oPrintPKARecords and do not
26179         use it as a command.
26180         * g10/keylist.c (list_keyblock): List PKA rceords also for secret
26181         keys.
26182
26183         gpg: Add --list-gcrypt-config and "curve" item for --list-config.
26184         + commit 14af2be022ccaf826db048fc16959d0222ff1134
26185         * common/openpgp-oid.c (curve_supported_p): New.
26186         (openpgp_enum_curves): New.
26187         * common/t-openpgp-oid.c (test_openpgp_enum_curves): New.
26188         (main): Add option --verbose.
26189         * g10/gpg.c (opts): Add --list-gcrypt-config.
26190         (list_config): Add items "curve" and "curveoid".  Remove unused code.
26191
26192 2015-03-09  NIIBE Yutaka  <gniibe@fsij.org>
26193
26194         scd: fix for 64-bit arch.
26195         + commit bb5a1b7c738d74d5b46340ec7b50000a2d343ca9
26196         * agent/pksign.c (agent_pksign_do): Use int.
26197         * scd/app-openpgp.c (get_public_key): Likewise.
26198
26199 2015-03-04  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
26200
26201         gpg: avoid chatter about trustdb when --quiet.
26202         + commit 82146af85b65498a69b28913593dc1ffeb6b6fed
26203         * g10/trustdb.c (tdb_check_trustdb_stale): avoid log_info() when
26204           opt.quiet
26205
26206 2015-02-26  Werner Koch  <wk@gnupg.org>
26207
26208         gpg: Lowercase mailbox for PKA lookups.
26209         + commit c071be698efadef1ad01fd3d329d1b486a372927
26210         * common/stringhelp.c (ascii_strlwr): New.
26211         * common/mbox-util.c (mailbox_from_userid): Downcase result.
26212
26213         gpg: Fix memory leak due to PKA lookup.
26214         + commit 91baea2dcde6c1e5ca9e8fa7020d9ab4551d1bca
26215         * g10/keyserver.c (keyserver_import_pka): Move the xfree.
26216
26217 2015-02-25  Werner Koch  <wk@gnupg.org>
26218
26219         gpg: Switch to a hash and CERT record based PKA system.
26220         + commit 2fc27c8696f5cf2ddf3212397ea49bff115d617b
26221         * common/dns-cert.c (get_dns_cert): Make r_key optional.
26222         * common/pka.c: Rewrite for the new hash based lookup.
26223         * common/t-pka.c: New.
26224         * configure.ac: Remove option --disable-dns-pka.
26225         (USE_DNS_PKA): Remove ac_define.
26226         * g10/getkey.c (parse_auto_key_locate): Always include PKA.
26227
26228         common: Allow requesting a specific certtype with get_dns_cert()
26229         + commit af60152a4632ef26ca950a424429b15b6c69038d
26230         * common/dns-cert.c (get_dns_cert): Add arg want_certtype.  Change all
26231         callers.
26232         (CERTTYPE_): Move constants to ...
26233         * common/dns-cert.h: here as DNS_CERTTYPE_.
26234
26235         Move new mailbox.c source file to common/.
26236         + commit 9913253610bac69e9503800e85696491e018e327
26237         * g10/mailbox.c: Move to ...
26238         * common/mbox-util.c: new file.
26239         * common/mbox-util.h: New. Include where needed.
26240         * g10/t-mailbox.c: Move to ...
26241         * common/t-mbox-util.c: new file.
26242
26243 2015-02-24  Werner Koch  <wk@gnupg.org>
26244
26245         gpg: Add command --print-pka-records.
26246         + commit e2d93402801a2cb822c723e891fd98233fdb3fd5
26247         * g10/gpg.c (main): Add command --print-pka-records.
26248         * g10/options.h (struct opt): Add field "print_pka_records".
26249         * g10/keylist.c (list_keyblock_pka): New.
26250         (list_keyblock): Call it if new option is set.
26251         (print_fingerprint): Add mode 10.
26252
26253         gpg: Add function to extract the mailbox.
26254         + commit 93fa3d5c1760f3fee5412fb29d58fbd60db16ea9
26255         * g10/misc.c (has_invalid_email_chars, is_valid_mailbox)
26256         (is_valid_user_id): Move to ...
26257         * g10/mailbox.c: new file.
26258         (string_has_ctrl_or_space, has_dotdot_after_at): New.
26259         (has_invalid_email_chars): New.
26260
26261         * g10/t-mailbox.c: New.
26262         * g10/Makefile.am (module_tests): Add t-mailbox.
26263         (t_mailbox_SOURCES, t_mailbox_LDADD): New.
26264
26265 2015-02-23  Werner Koch  <wk@gnupg.org>
26266
26267         gpg: Add option to print fingerprints in ICAO spelling.
26268         + commit ae09515b9d3aae653b62a32ea5b4a9b9e557fc52
26269         * g10/gpg.c: Add option --with-icao-spelling.
26270         * g10/options.h (struct opt): Add with_icao_spelling.
26271         * g10/keylist.c (print_icao_hexdigit): New.
26272         (print_fingerprint): Print ICAO spelling.
26273
26274         gpg: Skip legacy keys while searching keyrings.
26275         + commit a8116aacd91b7e775762a62c268fab6cc3c77438
26276         * g10/getkey.c (search_modes_are_fingerprint): New.
26277         (lookup): Skip over legacy keys.
26278
26279         common: Fix regression due to commit 2183683b.
26280         + commit d9f6eea6115df7959564123eb99d633ce5bba42e
26281         * common/dns-cert.c (get_dns_cert): Remove cruft.
26282
26283 2015-02-19  Werner Koch  <wk@gnupg.org>
26284
26285         gpg: Replace remaining uses of stdio by estream.
26286         + commit d2a70fd8348d6c11d1960caf2afe0701833dad6a
26287         * g10/sign.c (sign_file):  Use log_printf instead of stderr.
26288         * g10/tdbdump.c (export_ownertrust): Use estream fucntions.
26289         (import_ownertrust): Ditto.
26290         * g10/tdbio.c (tdbio_dump_record): Ditto.  Change arg to estream_t.
26291
26292         gpg: Fix segv due to NULL value stored as opaque MPI.
26293         + commit 76c8122adfed0f0f443cce7bda702ba2b39661b3
26294         * g10/build-packet.c (gpg_mpi_write): Check for NULL return from
26295         gcry_mpi_get_opaque.
26296         (gpg_mpi_write_nohdr, do_key): Ditto.
26297         * g10/keyid.c (hash_public_key): Ditto.
26298
26299 2015-02-12  Werner Koch  <wk@gnupg.org>
26300
26301         scd: Fix regression in 2.1.2 (due to commit 2183683)
26302         + commit 07a71da479daaac43b8c5b1034a1e66f96bdbc48
26303         * scd/apdu.c (pcsc_vendor_specific_init): Replace use of
26304         bufNN_to_uint by direct code.
26305
26306 2015-02-12  Andre Heinecke  <aheinecke@intevation.de>
26307
26308         dirmngr: Initialize cache from sysconfig dir.
26309         + commit 070d7bf940efa60db2b0734273b9b3736d18338a
26310         * dirmngr/certcache.c (cert_cache_init): Load certificates
26311         from sysconfig dir instead of the homeidr.
26312         * dirmngr/dirmngr.c (main): Removed parsing of obsolete
26313         homedir_data option.
26314         * dirmngr/dirmngr.h (opt): Removed homedir_data.
26315         * doc/dirmngr.texi: Update and clarify certs directory doc.
26316
26317 2015-02-11  Werner Koch  <wk@gnupg.org>
26318
26319         Release 2.1.2.
26320         + commit fc17562cc4f8d531ae7f0887cf2a96dcc224b021
26321
26322
26323         dirmngr: Avoid warning about unused function.
26324         + commit 8219c87c301ec669f07528e8d8108655f7b705be
26325         * dirmngr/dirmngr.c (my_gnutls_log): Build only if gnutls is used.
26326
26327         build: Update standard build-aux files.
26328         + commit 81e93e251e52e427a29556de75640c7933bb5aad
26329
26330
26331         Use inline functions to convert buffer data to scalars.
26332         + commit 2183683bd633818dd031b090b5530951de76f392
26333         * common/host2net.h (buf16_to_ulong, buf16_to_uint): New.
26334         (buf16_to_ushort, buf16_to_u16): New.
26335         (buf32_to_size_t, buf32_to_ulong, buf32_to_uint, buf32_to_u32): New.
26336
26337 2015-02-09  Werner Koch  <wk@gnupg.org>
26338
26339         gpg: Prevent an invalid memory read using a garbled keyring.
26340         + commit f0f71a721ccd7ab9e40b8b6b028b59632c0cc648
26341         * g10/keyring.c (keyring_get_keyblock): Whitelist allowed packet
26342         types.
26343         * g10/keydb.c (parse_keyblock_image): Ditto.
26344
26345         gpg: Fix a NULL-deref in export due to invalid packet lengths.
26346         + commit 0835d2f44ef62eab51fce6a927908f544e01cf8f
26347         * g10/build-packet.c (write_fake_data): Take care of a NULL stored as
26348         opaque MPI.
26349
26350         gpg: Fix a NULL-deref due to empty ring trust packets.
26351         + commit 39978487863066e59bb657f5fe4e8baab510da7e
26352         * g10/parse-packet.c (parse_trust): Always allocate a packet.
26353
26354 2015-02-04  Werner Koch  <wk@gnupg.org>
26355
26356         gpg-agent: Use "pinentry-basic" as fallback.
26357         + commit 0de5c6a9a783ed9dc69cecbf34eadcaace4be243
26358         * common/homedir.c (get_default_pinentry_name): New.
26359         (gnupg_module_name): Use that for the default pinentry.
26360         (gnupg_module_name_flush_some): New.
26361         * agent/gpg-agent.c (agent_sighup_action): Flush some module names.
26362         * agent/call-pinentry.c (start_pinentry): Do not modify
26363         opt.pinentry_program.
26364
26365         w32: Add manifest to gpg.
26366         + commit 05428d12561bc7eb872a81444918dfe706477a41
26367         * g10/gpg.w32-manifest.in: New.
26368         * g10/gpg-w32info.rc: Add manifest.
26369         * g10/Makefile.am (EXTRA_DIST): Add manifest.
26370         (gpg-w32info.o): Depend on manifest.
26371         * configure.ac (BUILD_VERSION): New.
26372         (AC_CONFIG_FILES): Add manifest.
26373
26374 2015-02-03  Werner Koch  <wk@gnupg.org>
26375
26376         Update copyright years.
26377         + commit 3f67426a89bf4b37e1d2662fddc3eb4fa474c4ad
26378         * common/w32info-rc.h.in (W32INFO_COMPANYNAME): Change to "The GnuPG
26379         Project".
26380
26381 2015-02-02  Werner Koch  <wk@gnupg.org>
26382
26383         w32: Change default Windows install dir and add bin to PATH.
26384         + commit 8872657b2a52dd9698224b80e5672e23c5405eda
26385         * build-aux/speedo.mk (WITH_GUI): New macro.  The Windows installer is
26386         now build by default without any GUI stuff.
26387         * build-aux/speedo/w32/inst.nsi: Change standard installation
26388         directory.
26389         (AddToPath, un.RemoveFromPath): New.
26390         (gnupginst): Add bin directory to the PATH.
26391
26392 2015-02-01  Werner Koch  <wk@gnupg.org>
26393
26394         w32: Allow for Unicocde installation directory.
26395         + commit 616633b7713081ecc39419494879947cc7f163d0
26396         * common/homedir.c (w32_rootdir): Use Unicode fucntion not only for
26397         WinCE.
26398
26399 2015-01-30  Joshua Rogers  <git@internot.info>
26400
26401         kbx: Fix resource leak.
26402         + commit 7db6c82cec49b7c56c403a8ea98364086baf75f3
26403         * kbx/keybox-update.c (blob_filecopy): Fix resource leak.  On error
26404         return, 'fp' and 'newfp' was never closed.
26405
26406 2015-01-29  Werner Koch  <wk@gnupg.org>
26407
26408         agent: Fix use of imported but unprotected openpgp keys.
26409         + commit 6ab0fac575a8b04152a199cb300a08436b096753
26410         * agent/agent.h (PRIVATE_KEY_OPENPGP_NONE): New.
26411         * agent/command.c (do_one_keyinfo): Implement it.
26412         * agent/findkey.c (agent_key_from_file): Ditto.
26413         (agent_key_info_from_file): Ditto.
26414         (agent_delete_key): Ditto.
26415         * agent/protect.c (agent_private_key_type): Add detection for openpgp
26416         "none" method.
26417
26418 2015-01-29  NIIBE Yutaka  <gniibe@fsij.org>
26419
26420         po: Update Japanese Translation.
26421         + commit 6c368533f5211bed62e8638f522cef65c7ba4b87
26422
26423
26424 2015-01-28  Werner Koch  <wk@gnupg.org>
26425
26426         gpg: Limit the size of key packets to a sensible value.
26427         + commit 382ba4b137b42d5f25a7e256bb7c053ee5ac7b64
26428         * g10/parse-packet.c (MAX_KEY_PACKET_LENGTH): New.
26429         (MAX_UID_PACKET_LENGTH): New.
26430         (MAX_COMMENT_PACKET_LENGTH): New.
26431         (MAX_ATTR_PACKET_LENGTH): New.
26432         (parse_key): Limit the size of a key packet to 256k.
26433         (parse_user_id): Use macro for the packet size limit.
26434         (parse_attribute): Ditto.
26435         (parse_comment): Ditto.
26436
26437         gpg: Fix buffering problem in --list-config.
26438         + commit d8eea25b8b7becbfa3f059be6f5966a2f1aa7112
26439         * g10/gpg.c (list_config): Replace print_sanitized_string2 by
26440         es_write_sanitized.
26441
26442         * common/stringhelp.c (print_sanitized_buffer2): Remove.
26443         (print_sanitized_buffer, print_sanitized_utf8_buffer): Remove.
26444         (print_sanitized_utf8_buffer, print_sanitized_utf8_string): Remove.
26445         (print_sanitized_string): Remove.
26446
26447         * sm/certdump.c (print_dn_part, print_dn_parts): Remove arg FP.
26448         (pretty_print_sexp, gpgsm_print_name2, gpgsm_print_name): Remove.
26449
26450         Add a hook to be called right after main.
26451         + commit 0c2bfd9d5a49a6134188f8f7820f6ccdebd9f181
26452         * common/init.c (early_system_init): New stub function.
26453
26454         gpg: Allow predefined names as answer to the keygen.algo prompt.
26455         + commit b1d5ed6ac842469afcb84868d0f6641dc286a6c7
26456         * g10/keygen.c (ask_algo): Add list of strings.
26457
26458         agent: Add some extra robustness to extract_private_key.
26459         + commit 795965437732e50f6216d7f5db0e6174e90548a9
26460         * agent/cvt-openpgp.c (extract_private_key): Add arg "arraysize".
26461         Make sure that R_FLAGS and R_CURVE are set to NULL.
26462
26463 2015-01-28  NIIBE Yutaka  <gniibe@fsij.org>
26464
26465         scd: Fix varargs call for 64-bit arch on ECC keys.
26466         + commit f6d3c6e5263d84b94ebe13df9ff39b02109a2acb
26467         * scd/app-openpgp.c (store_fpr): Remove CARD_VERSION from the
26468         arguments.
26469         (rsa_writekey): Follow the change.
26470         (do_genkey): Likewise.
26471         (ecc_writekey): Likewise.  Cast to size_t.
26472
26473 2015-01-27  Werner Koch  <wk@gnupg.org>
26474
26475         gpg: Fix segv introduced to commit 4d7c9b0.
26476         + commit 6eebc56687935f3e993eac374b9f4cc5ad3bcf2b
26477         * g10/keygen.c (get_parameter_passphrase): Take care of R == NULL.
26478
26479 2015-01-27  NIIBE Yutaka  <gniibe@fsij.org>
26480
26481         agent: Fix agent_public_key_from_file for ECC.
26482         + commit 9453d645d4a489f038829c80343c124fff62d635
26483         * agent/cvt-openpgp.c (extract_private_key): New.
26484         (convert_to_openpgp): Use extract_private_key.
26485         * agent/findkey.c (agent_public_key_from_file): Use
26486         extract_private_key.
26487
26488 2015-01-26  Werner Koch  <wk@gnupg.org>
26489
26490         sm: Simplify fix ed8383c6.
26491         + commit 6c87d1ce66d8e93e6c0f16c06116e9179f6158ba
26492         * sm/minip12.c (p12_build): Release PWBUF only at the end.
26493
26494 2015-01-25  Joshua Rogers  <git@internot.info>
26495
26496         ccid: Remove incorrect expression leading to errors.
26497         + commit 274d7b17a90908a90ba6ad295c08a79b287fc231
26498         * scd/ccid-driver.c (send_escape_cmd): Fix setting of 'rc'.
26499
26500 2015-01-23  Werner Koch  <wk@gnupg.org>
26501
26502         gpgconf: Fix validity check for UINT32 values.
26503         + commit 3f6abb57a7b5e54b593c5775c8f7a07d61119705
26504         * tools/gpgconf-comp.c (option_check_validity): Enable check for
26505         UINT32.
26506
26507 2015-01-22  Werner Koch  <wk@gnupg.org>
26508
26509         gpg: Improve skipping of PGP-2 keys.
26510         + commit 09e8f35d3808d6e49f891360c341aae3869e8650
26511         * g10/keydb.c (keydb_search_first, keydb_search_next): Skip legacy
26512         keys.
26513         * g10/keyring.c (keyring_get_keyblock): Handle GPG_ERR_LEGACY_KEY.
26514         (prepare_search): Ditto.
26515         (keyring_rebuild_cache): Skip legacy keys.
26516         * g10/keyserver.c (keyidlist): Ditto.
26517         * g10/trustdb.c (validate_key_list): Ditto.
26518
26519         gpg: Add dedicated error code for PGP-2 keys.
26520         + commit 6f3d11d8837b00e3a1c4fa881066855c0321d6b2
26521         * g10/parse-packet.c (parse_key): Return GPG_ERR_LEGACY_KEY for PGP2
26522         keys.
26523         * g10/import.c (read_block): Simplify by checking GPG_ERR_LEGACY_KEY.
26524         * g10/getkey.c (lookup): Silence error message for PGP-2 keys.
26525
26526         * common/util.h (GPG_ERR_LEGACY_KEY): Add replacement for older
26527         libgpg-error.
26528
26529         gpg: Replace remaining old error code macros by GPG_ERR_.
26530         + commit 11142e0ad7bc9a9e3c3dccf958d8dbd3312cb993
26531         * g10/gpg.h (g10_errstr): Remove macro and change all occurrences by
26532         gpg_strerror.
26533         (G10ERR_): Remove all macros and change all occurrences by their
26534         GPG_ERR_ counterparts.
26535
26536         gpg: Remove an unused variable.
26537         + commit a23c30fb59c0a216763a7972028995d3be42a844
26538         * g10/getkey.c (getkey_ctx_s): Remove last_rc.
26539
26540 2015-01-21  Werner Koch  <wk@gnupg.org>
26541
26542         dirmngr: Fix TLS build problems.
26543         + commit 091c35ec726a4fa4691c2665b13adee6a34b5b66
26544         * dirmngr/Makefile.am (AM_CFLAGS): Add flags for TLS libs.
26545
26546         gpg: Support --passphrase with --quick-gen-key.
26547         + commit 4d7c9b0e9aceedd924d600978bc1b6cae7d5c456
26548         * g10/keygen.c: Include shareddefs.h.
26549         (quick_generate_keypair): Support static passphrase.
26550         (get_parameter_passphrase): New.
26551         (do_generate_keypair): Use it.
26552
26553         gpg: Re-enable the "Passphrase" parameter for batch key generation.
26554         + commit aa99ebde778b7b563f35025f1b48954757f840be
26555         * agent/command.c (cmd_genkey): Add option --inq-passwd.
26556         * agent/genkey.c (agent_genkey): Add new arg override_passphrase.
26557         * g10/call-agent.c (inq_genkey_parms): Handle NEWPASSWD keyword.
26558         (agent_genkey): Add arg optional arg "passphrase".
26559         * g10/keygen.c (common_gen, gen_elg, gen_dsa, gen_ecc)
26560         (gen_rsa, do_create): Add arg "passphrase" and pass it through.
26561         (do_generate_keypair): Make use of pPASSPHRASE.
26562         (release_parameter_list): Wipe out a passphrase parameter.
26563
26564 2015-01-19  Werner Koch  <wk@gnupg.org>
26565
26566         kbx: Minor cleanup for the previous fix.
26567         + commit 7be1b7d8017cb7ebf1a3855edec0ef5e342cc9c5
26568         * kbx/keybox-search.c (blob_get_keyid): Rename to
26569         blob_get_first_keyid. Check number of keys and remove blob type check.
26570
26571 2015-01-19  Damien Goutte-Gattat  <dgouttegattat@incenp.org>
26572
26573         kbx: Call skipfnc callback to filter out keys.
26574         + commit c5956592c171e6fe988e74161aa99636b7f12e4b
26575         * kbx/keybox-search.c (blob_get_keyid): New.
26576         (keybox-search): Call skipfnc callback function.
26577
26578 2015-01-13  Andreas Schwier  <andreas.schwier@cardcontact.de>
26579
26580         scd: Allow for certificates > 1024 with PC/SC.
26581         + commit 16a1330fa16f6b23e2661c0175c431ab40da45ff
26582         * scd/pcsc-wrapper.c (handle_transmit): Enlarge buffer to 4096 too
26583         allow for larger certificates.
26584
26585 2015-01-08  NIIBE Yutaka  <gniibe@fsij.org>
26586
26587         dirmngr: Fix error code path of map_host.
26588         + commit 657a26f3af1b3f817d6cde2d091273d332571247
26589         * dirmngr/ks-engine-hkp.c (map_host): Fix error return.
26590
26591 2015-01-08  Joshua Rogers  <git@internot.info>
26592
26593         scd: fix get_public_key for OpenPGPcard v1.0.
26594         + commit 100b322f5da3066bab5a2b0eb234c631c581c0e4
26595         * scd/app-openpgp.c (get_public_key): correctly close 'fp' upon use.
26596
26597 2015-01-07  NIIBE Yutaka  <gniibe@fsij.org>
26598
26599         dirmngr: fix LDAP query PATTERNS limit check.
26600         + commit 22b15fccffe613f455f9748c048c8e451724a842
26601         * dirmngr/ldap.c (start_cert_fetch_ldap): fix ARGC limitation.
26602
26603         scd: fix merge failure.
26604         + commit 602f17b5a775f02e0e33a54d3155929dc00e4f53
26605         * scd/apdu.c (pcsc_pinpad_verify): Remove wrong lines inserted by
26606         merge.
26607
26608 2015-01-05  Werner Koch  <wk@gnupg.org>
26609
26610         sm,g13: Init local vars to avoid compiler warnings.
26611         + commit 9bf40849a9f86204e113712c4cc285f1ac16127a
26612         * sm/misc.c (transform_sigval): Init RSA_S_LEN.
26613         * g13/mount.c (read_keyblob): Init HEADERLEN.
26614
26615         gpg: Remove unused args from a function.
26616         + commit 616e511f278bf9af04dc66bbb8b05b37bf541f37
26617         * g10/keyserver.c (parse_keyserver_uri): Remove args configname and
26618         configlineno.  Change all callers.
26619
26620         gpg: Clear a possible rest of the KDF secret buffer.
26621         + commit 56e688823345bbcfef220b13eb418854f8798b16
26622         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Fix order of args.
26623
26624         build: Require automake 1.14.
26625         + commit 445bb17d5fe6b53db078082fb033dbc67eea8307
26626         * configure.ac (AM_INIT_AUTOMAKE): Add serial-tests.
26627
26628 2015-01-04  Werner Koch  <wk@gnupg.org>
26629
26630         agent: Make --allow-loopback-pinentry gpgconf changeable.
26631         + commit ac2cb47fc5c0be539aaa07fd141acdbc0934800f
26632
26633
26634 2014-12-22  Joshua Rogers  <git@internot.info>
26635
26636         tools: Free variable before return.
26637         + commit cf88337f8a4f8c98aca4b1da5921d18567b4f474
26638         * tools/gpgconf-comp.c: Free 'dest_filename' before it is returned
26639         upon error.
26640
26641 2014-12-22  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
26642
26643         sm: Avoid double-free on iconv failure.
26644         + commit ed8383c618e124cfa708c9ee87563fcdf2f4649c
26645         * sm/minip12.c: (p12_build) if jnlib_iconv_open fails, avoid
26646         double-free of pwbuf.
26647
26648         scd: Avoid double-free on error condition in scd.
26649         + commit b0b3803e8c2959dd67ca96debc54b5c6464f0d41
26650         * scd/command.c (cmd_readkey): avoid double-free of cert
26651
26652         avoid future chance of using uninitialized memory.
26653         + commit 367b073ab5f439ccf0750461d10c69f36998bd62
26654         * common/iobuf.c: (iobuf_open): initialize len
26655
26656         avoid double-close in unusual dotlock situations.
26657         + commit 628b111fa679612e23c0d46505b1ecbbf091897d
26658         * common/dotlock.c: (dotlock_create_unix) avoid double-close()
26659          in unusual situations.
26660
26661         gpgkey2ssh: clean up varargs.
26662         + commit 351bca9047d748c3c4f7e9a3cdc476af127b1da3
26663         * tools/gpgkey2ssh.c (key_to_blob) : ensure that va_end is called.
26664
26665 2014-12-22  Werner Koch  <wk@gnupg.org>
26666
26667         doc: Fix memory leak in yat2m.
26668         + commit 6056d2467310260ddc0db2fe65b737ace6febcaa
26669         * doc/yat2m.c (write_th): Free NAME.
26670
26671         dirmngr: Fix memory leak.
26672         + commit 5a556e4e88bcbc926c0922070acaf5f7b25d18fb
26673         * dirmngr/server.c (cmd_ks_search, cmd_ks_get): Fix memory leak.
26674
26675         * dirmngr/ks-engine-hkp.c (ks_hkp_mark_host): Remove double check.
26676
26677         dirmngr: Remove un-needed check.
26678         + commit 0d5cb55402c44fb5f731ecf85705f845f3091aa7
26679         * dirmngr/crlfetch.c (crl_fetch): Check that URL is not NULL.
26680
26681         dirmngr,gpgsm: Return NULL on fail.
26682         + commit abd5f6752d693b7f313c19604f0723ecec4d39a6
26683         * dirmngr/ldapserver.c (ldapserver_parse_one): Set SERVER to NULL.
26684         * sm/gpgsm.c (parse_keyserver_line): Ditto.
26685
26686 2014-12-22  NIIBE Yutaka  <gniibe@fsij.org>
26687
26688         scd: ECDH Support.
26689         + commit bdc8efbdd124d836c36cf482216e375421f72891
26690         * agent/divert-scd.c (divert_pkdecrypt): Support ECDH.
26691         * scd/app-openpgp.c (get_algo_byte, store_fpr): Support ECDH.
26692         (send_key_attr): Support ECDH.  Fix EdDSA algorithm value.
26693         (retrieve_key_material): Initialize fields.
26694         (get_public_key, ecc_writekey, do_writekey): Support ECDH.
26695         (ecdh_writekey): Remove.
26696         (do_decipher): Support ECDH.
26697         (parse_algorithm_attribute): Support ECDH.  Fix EdDSA.
26698
26699 2014-12-19  Werner Koch  <wk@gnupg.org>
26700
26701         agent: Make sure --max-cache-ttl is >= --default-cache-ttl.
26702         + commit 76140141699b545f7a988bf5fc101063917e8ce3
26703         * agent/gpg-agent.c (finalize_rereadable_options): New.
26704         (main, reread_configuration): Call it.
26705
26706         agent: Keep the session environment for restricted connections.
26707         + commit 14601eacb51f6c8a60d3d57aee1be11debd94c68
26708         * agent/command-ssh.c (setup_ssh_env): Move code to ...
26709         * agent/gpg-agent.c (agent_copy_startup_env): .. new function.  Change
26710         calllers.
26711         * agent/command.c (start_command_handler): Call that fucntion for
26712         restricted connections.
26713
26714         agent: Fix string prepended to remotely initiated prompts.
26715         + commit aad8963f7b9d13b319abd413db8f42ec467db913
26716         * agent/command.c (cmd_setkeydesc): Use %0A and not \n. Make
26717         translatable.
26718
26719 2014-12-18  Werner Koch  <wk@gnupg.org>
26720
26721         build: Remove option to build without agent.
26722         + commit abec64f3cb04e49ca48cc476a5830a920e2ebf8f
26723         * configure.ac (build-agent): Set to yes.
26724
26725 2014-12-17  Werner Koch  <wk@gnupg.org>
26726
26727         gpgconf: Exit with failure if --launch fails.
26728         + commit 5cb6df8996623c00eaa2a39e3037101585442f7e
26729         * tools/gpgconf-comp.c (gc_component_launch): Return an error code.
26730         * tools/gpgconf.c (main): Exit if launch failed.
26731
26732 2014-12-16  Werner Koch  <wk@gnupg.org>
26733
26734         Release 2.1.1.
26735         + commit 08c00cd4fe432d6852ad1d5c34a234c56aa3617c
26736
26737
26738         po: Update the German translation.
26739         + commit 4ba740bd4734c43e7876f6f6380cc5963789d510
26740
26741
26742 2014-12-16  Petr Pisar  <petr.pisar@atlas.cz>
26743
26744         po: Update Czech translation.
26745         + commit 30560491fe42562f4bbdb17d3213f7210f549a0f
26746
26747
26748 2014-12-16  Werner Koch  <wk@gnupg.org>
26749
26750         gpg: Show private DO information in the card status.
26751         + commit ce9212924039fba4e479760bba86c61b0d91c469
26752         * g10/call-agent.c (agent_release_card_info): Free private_do.
26753         (learn_status_cb): Parse PRIVATE-DO-n stati.
26754
26755 2014-12-16  Ineiev  <ineiev@gnu.org>
26756
26757         po: Update Russian translation.
26758         + commit 5ab5b3fa6921f08dd0a498fe0381735e803d01e3
26759
26760
26761 2014-12-16  Jedi  <jedi@jedi.org>
26762
26763         po: Update zh_TW translation.
26764         + commit 668dc6b32cb97608ef65b85d917c86f5aec896ce
26765
26766
26767 2014-12-15  Werner Koch  <wk@gnupg.org>
26768
26769         gpg: Add sub-command "factory-reset" to --card-edit.
26770         + commit dd65e21cb4934b40e6f2f7a8095f39fd6d9971bc
26771         * common/util.h (GPG_ERR_OBJ_TERM_STATE): New.
26772         * scd/iso7816.c (map_sw): Add this error code.
26773         * scd/app-openpgp.c (do_getattr): Return the life cycle indicator.
26774         * scd/app.c (select_application): Allow a return value of
26775         GPG_ERR_OBJ_TERM_STATE.
26776         * scd/scdaemon.c (set_debug): Print the DBG_READER value.
26777         * g10/call-agent.c (start_agent): Print a status line for the
26778         termination state.
26779         (agent_scd_learn): Make arg "info" optional.
26780         (agent_scd_apdu): New.
26781         * g10/card-util.c (send_apdu): New.
26782         (factory_reset): New.
26783         (card_edit): Add command factory-reset.
26784
26785         gpg: Fix regression in notation data regression.
26786         + commit fc9a35d2dec2f838abac831fd88dca494773e082
26787         * g10/misc.c (pct_expando): Reorder conditions for clarity.
26788         * g10/sign.c (write_signature_packets): Fix notation data creation.
26789
26790         gpg: Avoid extra LF in notaion data listing.
26791         + commit b4e402cb5c6d7fc507e8d5131969145b49640e50
26792         * g10/keylist.c (show_notation): Use log_printf.
26793
26794 2014-12-12  Werner Koch  <wk@gnupg.org>
26795
26796         scd: Fix possibly inhibited checkpin of the admin pin.
26797         + commit 68b4e7c9e4de0dc3580ca5af3cfd0f20a2691b5e
26798         * scd/app-openpgp.c (do_check_pin): Do not check a byte of a released
26799         buffer.
26800
26801         gpg: Let --card--status create a shadow key (card key stub).
26802         + commit f3f9f9b2844c35f7942ee904d5222523615cdad4
26803         * agent/command.c (cmd_learn): Add option --sendinfo.
26804         * agent/learncard.c (agent_handle_learn): Add arg "send" andsend
26805         certifciate only if that is set.
26806         * g10/call-agent.c (agent_scd_learn): Use --sendinfo.  Make INFO
26807         optional.
26808         (agent_learn): Remove.
26809         * g10/keygen.c (gen_card_key): Replace agent_learn by agent_scd_learn.
26810
26811         gpg: Fix possible read of unallocated memory.
26812         + commit 193815030d20716d9a97850013ac3cc8749022c9
26813         * g10/parse-packet.c (can_handle_critical): Check content length
26814         before calling can_handle_critical_notation.
26815
26816 2014-12-11  Werner Koch  <wk@gnupg.org>
26817
26818         build: Replace deprecated autconf macro.
26819         + commit 1d8ebe4d54eef37da65e7bd5d7386bc04f344447
26820         * m4/intl.m4: s/AM_PROG_MKDIR_P/AC_PROG_MKDIR_P/
26821         * m4/po.m4: Ditto.
26822
26823 2014-12-08  Werner Koch  <wk@gnupg.org>
26824
26825         dirmngr: Improve dead host detection.
26826         + commit e8c0ed779579293b3f4592d9337bc15ee0fc3fdd
26827         * dirmngr/ks-engine-hkp.c (handle_send_request_error): Mark host dead
26828         also for 2 other error messages.
26829
26830         http: Improve diagnostic messages.
26831         + commit 6d5f12834124ba5ee0e54261531abf95c36c116c
26832         * common/http.c (send_request): Print TLS alert info
26833         (connect_server): Detect bogus DNS entry.
26834
26835         gpg: Obsolete some keyserver helper options.
26836         + commit 5bf93f4ea7a11381dd256b5fd4e5913366828265
26837         * g10/options.h (opt): Remove keyserver_options.other.
26838         * g10/gpg.c (main): Obsolete option --honor-http-proxt.
26839         * g10/keyserver.c (add_canonical_option): Replace by ...
26840         (warn_kshelper_option): New.
26841         (parse_keyserver_uri): Obsolete "x-broken-http".
26842
26843         dirmngr: Return a proper error for all dead hosts.
26844         + commit b72ece6d74d3e385e818ead748eba0cb111b95b3
26845         * dirmngr/ks-engine-hkp.c (map_host): Change to return an gpg_error_t.
26846         Return an error code for all dead hosts.
26847         (make_host_part): Change to return an gpg_error_t.  Change all
26848         callers.
26849
26850         gpg: Write a status line for a failed --send-keys.
26851         + commit 66ab8f807c96b778f2a2c82b58d3e15ac295e1b2
26852         * g10/keyserver.c (keyserver_put): Write an status error.
26853
26854 2014-12-08  NIIBE Yutaka  <gniibe@fsij.org>
26855
26856         scd: Fix for EdDSA.
26857         + commit c50c11d5751f46ddb38244a5a07d8274e1e10922
26858         * scd/app-openpgp.c (get_algo_byte): It catches 22.
26859         (store_fpr): It's MPI usually, but it's opaque bytes for EdDSA.
26860
26861 2014-12-05  Andre Heinecke  <aheinecke@intevation.de>
26862
26863         Document no-allow-mark-trusted option.
26864         + commit f4ed04fca8885301b567ec004ffff0d6e24f4611
26865             doc: Document no-allow-mark-trusted for gpg-agent
26866
26867             * doc/gpg-agent.texi: Change allow-mark-trusted doc to
26868             no-allow-mark-trusted.
26869
26870             --
26871             Since rev. 78a56b14 allow-mark-trusted is the default option
26872             and was replaced by no-allow-mark-trusted to disable the
26873             interactive prompt.
26874
26875 2014-12-05  NIIBE Yutaka  <gniibe@fsij.org>
26876
26877         scd: Fix for NIST P-256.
26878         + commit 8720125f5a283ede34e52c2493b8a9b0226ae62c
26879         * g10/card-util.c (card_store_subkey): Error check.
26880         * scd/app-opengpg.c (ecc_writekey): Support NIST P-256.
26881         (do_writekey): Error check.
26882
26883 2014-12-04  Werner Koch  <wk@gnupg.org>
26884
26885         gpg: Allow import of large keys.
26886         + commit 63e7891f0f9f0228d93c6cd979fbf2797da2b67d
26887         * g10/import.c (import): Skip too large keys.
26888         * kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 2MB to 5MB.
26889
26890 2014-12-03  Werner Koch  <wk@gnupg.org>
26891
26892         gpg: Remove option aliases --[no-]throw-keyid and --notation-data.
26893         + commit 17b4662984b4669d8dcbbd6705ccfbe6c263319c
26894         * g10/gpg.c (opts): Remove them.
26895         * g10/options.h (opt): s/throw_keyid/throw_keyids/ and change users.
26896
26897 2014-12-02  Werner Koch  <wk@gnupg.org>
26898
26899         agent: Replace some sprintf.
26900         + commit fabcf1440a6900b9471f11e4f2a015e9f2d1a74c
26901         * agent/call-scd.c (agent_card_pksign): Replace sprintf by bin2hex.
26902         * agent/command-ssh.c (ssh_identity_register): Ditto.
26903         * agent/pkdecrypt.c (agent_pkdecrypt): Replace sprintf by
26904         put_membuf_printf.
26905
26906 2014-12-01  Werner Koch  <wk@gnupg.org>
26907
26908         tools: Improve watchgnupg portability.
26909         + commit 0367a4b8cfbf1f197e093ca2b83b27e0a409c3c7
26910         * configure.ac (AC_CHECK_HEADERS): Check for sys.select.h
26911         * tools/watchgnupg.c: Include it.
26912
26913         gpg: Fix export bug using exact search with only one key in the keybox.
26914         + commit f1c3eb4b16ca43b5d3712a3b54c22d17ce85af47
26915         * g10/export.c (do_export_stream): Disable caching.
26916         * g10/keyserver.c (keyidlist): Ditto.
26917
26918         scd: Implement socket redirection.
26919         + commit 2f90b7c21b2f84ca2bf5f4555da9233e84606b4e
26920         * scd/scdaemon.c (ENAMETOOLONG): New.
26921         (redir_socket_name): New.
26922         (cleanup): Take care of a redirected socket.
26923         (main): Pass redir_socket_name to create_server_socket.
26924         (create_socket_name): Remove superfluous length check.
26925         (create_server_socket): Add arg r_redir_name and implement
26926         redirection.  Replace assert for older Assuan by an error message.
26927
26928         dirmngr: Implement socket redirection.
26929         + commit eede0e59bf6281777da7391752ae4191f3e51204
26930         * dirmngr/dirmngr.c (ENAMETOOLONG): new.
26931         (redir_socket_name): New.
26932         (main): Add Assuan socket redirection.
26933         (cleanup): Adjust cleanup for redirection.
26934
26935 2014-11-28  Werner Koch  <wk@gnupg.org>
26936
26937         agent: Implement socket redirection.
26938         + commit e1f515b19c7f63b6d0b0253319b9fc41dabed657
26939         * agent/gpg-agent.c (ENAMETOOLONG): New.
26940         (redir_socket_name, redir_socket_name_extra)
26941         (redir_socket_name_ssh): New.
26942         (remove_socket): Take care of the redir names.
26943         (main): Pass the redir names to create_server_socket.
26944         (create_socket_name): Remove length check - that is anyway done later.
26945         (create_server_socket): Add arg r_redir_name and implement redirection
26946         if Libassuan is at least 2.14.
26947
26948         gpg: Change another BUG() call to a regular error message.
26949         + commit e59b1cc7471dd161a627b290c645ef7bd0d9d42c
26950         * g10/mainproc.c (proc_tree): Replace BUG by a proper error messages.
26951
26952         Add option --no-autostart.
26953         + commit 7aee3579be6e24a1aa280e75615fc3a11ceef960
26954         * g10/gpg.c: Add option --no-autostart.
26955         * sm/gpgsm.c: Ditto.
26956         * g10/options.h (opt): Add field autostart.
26957         * sm/gpgsm.h (opt): Ditto.
26958         * g10/call-agent.c (start_agent): Print note if agent was not
26959         autostarted.
26960         * sm/call-agent.c (start_agent): Ditto.
26961         * g10/call-dirmngr.c (create_context): Likewise.
26962         * sm/call-dirmngr.c (start_dirmngr_ext): Ditto.
26963
26964 2014-11-27  Мирослав Николић  <wk@gnupg.org>
26965
26966         gpg-agent: Add restricted connection feature.
26967         + commit f173cdcdfbfd083b035516a406c2c754f38a0ace
26968         * agent/agent.h (opt): Add field extra_socket.
26969         (server_control_s): Add field restricted.
26970         * agent/command.c: Check restricted flag on many commands.
26971         * agent/gpg-agent.c (oExtraSocket): New.
26972         (opts): Add option --extra-socket.
26973         (socket_name_extra): New.
26974         (cleanup): Cleanup that socket name.
26975         (main): Implement oExtraSocket.
26976         (create_socket_name): Add arg homedir and change all callers.
26977         (create_server_socket): Rename arg is_ssh to primary and change
26978         callers.
26979         (start_connection_thread): Take ctrl as arg.
26980         (start_connection_thread_std): New.
26981         (start_connection_thread_extra): New.
26982         (handle_connections): Add arg listen_fd_extra and replace the
26983         connection starting code by parameterized loop.
26984         * common/asshelp.c (start_new_gpg_agent): Detect the use of the
26985         restricted mode and don't fail on sending the pinentry environment.
26986
26987         * common/util.h (GPG_ERR_FORBIDDEN): New.
26988
26989         agent: Make auditing of the option list easier.
26990         + commit ccee34736b57a42ec4bdcb0d3181bdc6a08b0fff
26991         * agent/gpg-agent.c (opts): Use ARGPARSE_ macros.
26992
26993 2014-11-26  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
26994
26995         dirmngr: Only report hkps scheme when available.
26996         + commit 68a7ccc0c870cce6ab9fefb1aa6fd100e1de129b
26997         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Make use of TLS macros.
26998
26999 2014-11-26  Werner Koch  <wk@gnupg.org>
27000
27001         gpg: Change a bug() call to a regular error message.
27002         + commit 1c2140346d6ef9c35e303099d2d15be57869b4d5
27003         * g10/decrypt-data.c (decrypt_data): Return an error code instead of
27004         calling BUG().
27005
27006 2014-11-25  Werner Koch  <wk@gnupg.org>
27007
27008         Fix buffer overflow in openpgp_oid_to_str.
27009         + commit 8445ef24fc31e1fe0291e17f90f9f06b536e34da
27010         * common/openpgp-oid.c (openpgp_oid_to_str): Fix unsigned underflow.
27011
27012         * common/t-openpgp-oid.c (BADOID): New.
27013         (test_openpgp_oid_to_str): Add test cases.
27014
27015 2014-11-24  Werner Koch  <wk@gnupg.org>
27016
27017         gpg: Fix use of uninit.value in listing sig subpkts.
27018         + commit 596ae9f5433ca3b0e01f7acbe06fd2e424c42ae8
27019         * g10/parse-packet.c (dump_sig_subpkt): Print regex subpacket
27020         sanitized.
27021
27022         gpg: Fix off-by-one read in the attribute subpacket parser.
27023         + commit 0988764397f99db4efef1eabcdb8072d6159af76
27024         * g10/parse-packet.c (parse_attribute_subpkts): Check that the
27025         attribute packet is large enough for the subpacket type.
27026
27027         gpg: Fix batch generation of ECC keys.
27028         + commit b716e6a69919b89c7887d6c7c9b97e58d18fdf95
27029         * g10/keygen.c (get_parameter_algo): Map ECC algorithm strings
27030         directly.
27031
27032 2014-11-24  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
27033
27034         Distinguish between ARGPARSE_AMBIGUOUS_{OPTION,COMMAND}
27035         + commit eed16ccebf8fd1fdf9709affbd5c831f6957b8ae
27036         * common/argparse.c (initialize): Use correct value.
27037
27038         gpg: Refer to --throw-keyids instead of --throw-keyid.
27039         + commit a3cf781e3bc144aff60e007b9ba59bff7b1b2c9e
27040         * g10/encrypt.c: adjust error message
27041
27042 2014-11-21  Werner Koch  <wk@gnupg.org>
27043
27044         gpg: Track number of skipped v3 keys on import.
27045         + commit 44c9cc18968b3e1d7568ec41ebf28a07285c61bb
27046         * g10/import.c (stats_s): Add field v3keys.
27047         (import): Update this field.
27048         (import_print_stats): Print v3 key count.
27049         (read_block): Skip v3 keys and return a count for them.
27050
27051         gpg: Fix regression in parse_key.
27052         + commit 94a54425144e412bc83e44b7c6323282f49f650f
27053         * g10/parse-packet.c (parse): Better return just the gpg_err_code.
27054         (parse_key): Return the error code.
27055
27056         speedo: Add simple logos to the installer.
27057         + commit 9a85b91e925ac0798d56820353bf5858b212277f
27058         * build-aux/speedo/w32/README.txt: Include GnuPG Readme.
27059         * build-aux/speedo/w32/gnupg-logo-150x57.bmp: New.
27060         * build-aux/speedo/w32/gnupg-logo-164x314.bmp: New.
27061         * build-aux/speedo/w32/inst.nsi: Add logos.
27062         * build-aux/speedo.mk ($(bdir)/NEWS.tmp): Extract news items.
27063
27064 2014-11-20  Werner Koch  <wk@gnupg.org>
27065
27066         gpg: Fix hash detection for ECDSA.
27067         + commit f80c2dd78d522f12b2c7afbd5c0763a97d87d2bd
27068         * g10/sign.c (sign_file): Use DSA or ECDSA and not DSA|EdDSA.
27069
27070         Fix linker problem on OS X.
27071         + commit cd2c6f36fe5d1d1d45546f5168aead5cbe6487e0
27072         * common/init.c (default_errsource): Move to the .data segmemt.
27073
27074 2014-11-19  Werner Koch  <wk@gnupg.org>
27075
27076         gpg-connect-agent: Add convenience option --uiserver.
27077         + commit 164a6a9dd4af26668dd0d01061688bf1ceff44bf
27078
27079
27080         Add "gpgconf --kill dirmngr" and avoid useless launch before a kill.
27081         + commit 0e7dd40342bd56810c27db1c38c1928f56f43bfd
27082         * common/asshelp.c (start_new_gpg_agent): Add arg autostart.  Change
27083         all callers to use 1 for it.
27084         (start_new_dirmngr): Ditto.
27085         * tools/gpg-connect-agent.c: Add option --no-autostart.
27086         (main): Default autostart to 1.
27087         (start_agent): Implement no-autostart.
27088         * tools/gpgconf-comp.c (gpg_agent_runtime_change): Use --no-autostart.
27089         (scdaemon_runtime_change): Ditto.
27090         (dirmngr_runtime_change): New.
27091
27092         po: Copied missing translations from the 2.0 branch.
27093         + commit 329ece46bf83871f01eb833d5ebec6da36bfcce0
27094         * po/LINGUAS: Add new translations.
27095
27096 2014-11-17  Werner Koch  <wk@gnupg.org>
27097
27098         gpg: Fix a NULL-deref for invalid input data.
27099         + commit 32e85668b82f6fbcb824eea9548970804fb41d9e
27100         * g10/mainproc.c (proc_encrypted): Take care of canceled passpharse
27101         entry.
27102
27103 2014-11-13  Werner Koch  <wk@gnupg.org>
27104
27105         gpg: Make the use of "--verify FILE" for detached sigs harder.
27106         + commit 69384568f66a48eff3968bb1714aa13925580e9f
27107         * g10/openfile.c (open_sigfile): Factor some code out to ...
27108         (get_matching_datafile): new function.
27109         * g10/plaintext.c (hash_datafiles): Do not try to find matching file
27110         in batch mode.
27111         * g10/mainproc.c (check_sig_and_print): Print a warning if a possibly
27112         matching data file is not used by a standard signatures.
27113
27114         gpg: Fix a missing LF in debug output.
27115         + commit 22748338da9a78d20aefe3656ba40b0f9d34a681
27116         * g10/kbnode.c (dump_kbnode): Print a LF.
27117
27118         gpg: Remove PGP-2 related cruft.
27119         + commit e30cb8f61792e3808f7c8f343fc8545e6c81fe74
27120         * g10/armor.c (parse_hash_header,carmor_filter): Ignore MD5 in hash
27121         header.
27122         (fake_packet): Remove pgp-2 workaround for white space stripping.
27123         * g10/filter.h (armor_filter_context_t): Remove field pgp2mode.
27124         * g10/options.h (opt): Remove field pgp2_workarounds.
27125         * g10/gpg.c (main): Do not set this field.
27126         * g10/gpgv.c (main): Ditto.
27127         * g10/mainproc.c (proc_encrypted): Use SHA-1 as fallback s2k hash
27128           algo.  Using MD5 here is useless.
27129         (proc_plaintext): Remove PGP-2 related woraround
27130         (proc_tree): Remove another workaround but keep the one for PGP-5.
27131
27132 2014-11-12  Werner Koch  <wk@gnupg.org>
27133
27134         gpg: Improve perceived speed of secret key listings.
27135         + commit 81e177be10273885573f5d1fd88a1ee23479f4ab
27136         * g10/keylist.c (list_keyblock): Flush stdout for secret keys.
27137
27138         gpg: Fix regression in --refresh-keys.
27139         + commit eecbed004ca1e9ca23c3892c3a5e6dd174ddf93b
27140         * g10/keyserver.c (keyserver_get): Factor all code out to ...
27141         (keyserver_get_chunk): new.  Extimate line length.
27142         (keyserver_get): Split up requests into chunks.
27143
27144         gpg: Add import options "keep-ownertrust".
27145         + commit ffc2307843ce6c4ac3c8d99ba8c70ffa1ae28e39
27146         * g10/options.h (IMPORT_KEEP_OWNERTTRUST): New.
27147         * g10/import.c (parse_import_options): Add "keep-ownertrust".
27148         (import_one): Act upon new option.
27149
27150 2014-11-11  Werner Koch  <wk@gnupg.org>
27151
27152         Remove use of gnulib (part 2)
27153         + commit b8cdfac353ad96d4ef025c066c16dbde34805661
27154         * configure.ac (strpbrk): Add to AC_CHECK_FUNCS.
27155         (gl_EARLY): Remove.
27156         * common/stringhelp.c (strpbrk) [!HAVE_STRPBRK]: New.
27157         * common/sysutils.c (gnupg_mkdtemp): New.  Based on code from
27158         glibc-2.6.
27159         (gnupg_setenv): Rewrite.
27160         (gnupg_unsetenv): Rewrite.
27161         * g10/exec.c: Include sysutils.h and replace mkdtemp by gnupg_mkdtemp.
27162         * g13/be-encfs.c: Ditto.
27163         * g13/mount.c: Ditto.
27164         * tools/symcryptrun.c (confucius_mktmpdir): Ditto.
27165
27166         Remove use of gnulib (part 1)
27167         + commit 1adf719b2d8e2d5b912bf6655731e7e586402654
27168         * gl/: Remove entire tree.
27169         * configure.ac: Remove gnulib tests and the gl/ Makefile.
27170         (setenv): Add to AC_CHECK_FUNCS.
27171         * autogen.rc (extra_aclocal_flags): Set to empty.
27172         * Makefile.am (ACLOCAL_AMFLAGS): Remove -I gl/m4
27173         (SUBDIRS): Remove gl/.
27174         * agent/Makefile.am (common_libs): Remove ../gl/gnulib.a
27175         * common/Makefile.am (t_common_ldadd): Ditto.
27176         * dirmngr/Makefile.am (dirmngr_LDADD): Ditto.
27177         (dirmngr_ldap_LDADD, dirmngr_client_LDADD): Ditto.
27178         * g10/Makefile.am (needed_libs): Ditto.
27179         * g13/Makefile.am (g13_LDADD): Ditto.
27180         * kbx/Makefile.am (kbxutil_LDADD): Ditto.
27181         ($(PROGRAMS)): Ditto.
27182         * scd/Makefile.am (scdaemon_LDADD): Ditto.
27183         * sm/Makefile.am (common_libs): Ditto.
27184         * tools/Makefile.am (common_libs, commonpth_libs): Ditto.
27185
27186         * agent/gpg-agent.c: Remove "mkdtemp.h"
27187         * g10/exec.c: Ditto.
27188         * scd/scdaemon.c: Ditto.
27189         * tools/symcryptrun.c: Ditto.
27190         * common/sysutils.c: Remove "setenv.h"
27191
27192         * common/t-timestuff.c: Use putenv if setenv is not available.
27193
27194 2014-11-07  Werner Koch  <wk@gnupg.org>
27195
27196         gpg: Remove warning message for non-implemented search modes.
27197         + commit 7362c8c6e60939588e817384ae2e29195cb3f518
27198         * kbx/keybox-search.c (keybox_search): Silently ignore.
27199         * doc/specify-user-id.texi: Docuement '@", '+', and '.' search
27200         prefixes.
27201
27202         w32: Fix http access module.
27203         + commit f0f5cb6b3e525f696b8820c517190e1d84f3b885
27204         * common/http.c (write_server) [W32]: Rework to use send() instead of
27205         write even when build with npth.
27206         (cookie_read) [W32]: Rework to use recv() instead of read even when
27207         build with npth.
27208
27209         build: Add method to use a custom swdb.lst and use adns with Windows.
27210         + commit c7c79e31937e2d2fdb4042641786c229e31fbfae
27211         * build-aux/getswdb.sh: Add option --skip-verify.
27212         * build-aux/speedo.mk: Add config var CUSTOM_SWDB.  Tage adns version
27213         from swdb and build for Windows with adns.
27214
27215         build: Improve test for ADNS.
27216         + commit f7e1be24c8fcf588d4e48aa53a85b22bd035e3b0
27217         * configure.ac <adns>: Use adns_free as probe function for libadns.
27218         (HAVE_ADNS_FREE): Remove bogus tests to set this and remove the macro.
27219         (ADNSLIBS): Do not ac_subst - it is only used within configure.
27220
27221 2014-11-05  Werner Koch  <wk@gnupg.org>
27222
27223         speedo: Append the date to the Windows installer.
27224         + commit 8ec0b384a86bd7f67a60ab43ff1540e80c3f729d
27225         * build-aux/speedo.mk (BUILD_DATESTR): New.
27226         (dist-source, installer): Use it.
27227
27228         Release 2.1.0.
27229         + commit e22b459b910762f77245283746de34c67ebc72da
27230
27231
27232         Avoid sign extension when shifting the MSB.
27233         + commit 91b826a38880fd8a989318585eb502582636ddd8
27234         * sm/fingerprint.c (gpgsm_get_short_fingerprint): Cast MSB before
27235         shifting.
27236         * g10/build-packet.c (delete_sig_subpkt): Ditto.
27237
27238 2014-11-04  Werner Koch  <wk@gnupg.org>
27239
27240         Remove all expired common CA certificates.
27241         + commit 46fa1e0fe9f7407f12aa854e5cdb54624af3e89b
27242         * doc/com-certs.pem: Remove certifciates.
27243
27244 2014-11-02  Werner Koch  <wk@gnupg.org>
27245
27246         gpg: Avoid extra pinentries for each subkey in --export-secret-keys.
27247         + commit f8c993fbe28bf02f1d7aadec823a9dfc935398fa
27248         * agent/command.c (cmd_export_key): Actually implement the cache_nonce
27249         feature.
27250         * g10/export.c (do_export_stream): Make use of a cache_nonce.
27251
27252         gpg: Fix endless loop in keylisting with fingerprint.
27253         + commit d95f05c314adfecbe0af9073f964030010442f9b
27254         * g10/getkey.c (getkey_next): Disable cache.
27255
27256         gpg: Minor cleanup for key listing related code.
27257         + commit 440e8f517008107a9fe1b72cb659b97b7d840de6
27258         * g10/getkey.c (get_pubkey_next): Divert to getkey_next.
27259         (get_pubkey_end): Move code to getkey_end.
27260         * g10/keydb.c (keydb_search_reset): Add a debug statement.
27261         (dump_search_desc): Add arg HD and print the handle.
27262
27263         gpg: Do not show an useless passphrase prompt in batch mode.
27264         + commit a929f36693567e57eca89fb48f23cada8ce7291a
27265         * g10/keygen.c: Remove unused PASSPHRASE related code.
27266         (proc_parameter_file): Remove useless asking for a passphrase in batch
27267         mode.
27268
27269 2014-10-31  Werner Koch  <wk@gnupg.org>
27270
27271         gpg: Remove superfluous check for Libgcrypt >= 1.4.0.
27272         + commit f4df71aa2d544ec46a2ded3055ffb21b9842129e
27273         * g10/gpg.c (main): Remove check.
27274
27275         kbx: Let keydb_search skip unwanted blobs.
27276         + commit 935edf88ab29b2f63afc2a0e3af1b33c92033ab7
27277         * kbx/keybox.h (keybox_blobtype_t): New.
27278         * kbx/keybox-defs.h (BLOBTYPE_*): Replace by KEYBOX_BLOBTYPE_*.
27279         * kbx/keybox-search.c (keybox_search): Add arg want_blobtype and skip
27280         non-matching blobs.
27281         * sm/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_X509 to keybox_search.
27282         * g10/keydb.c (keydb_search): Pass KEYBOX_BLOBTYPE_PGP to keybox_search.
27283
27284         gpg: Fix --rebuild-keydb-caches.
27285         + commit 28ae8ad70b3b802e67344468a4765eee6e291c68
27286         * g10/parse-packet.c (parse_key): Store even unsupported packet
27287         versions.
27288         * g10/keyring.c (keyring_rebuild_cache): Do not copy keys with
27289         versions less than 4.
27290
27291         gpg: Fix testing for secret key availability.
27292         + commit 433208a5536608c2b40525eebadbbdeb7780d7f2
27293         * g10/getkey.c (have_secret_key_with_kid): Do not change the search
27294         mode.
27295
27296         build: Avoid distributing backup files etc.
27297         + commit b47fe2b14e2a610706bdeff9dbd9a5f7bd6f6b3a
27298         * Makefile.am (EXTRA_DIST): Do not include directories.
27299
27300 2014-10-30  Werner Koch  <wk@gnupg.org>
27301
27302         tests: Speed up the genkey1024.test by using not so strong random.
27303         + commit 9546aa3cc87fc83a40768a12fbbceb19496ce129
27304         * agent/gpg-agent.c (oDebugQuickRandom): New.
27305         (opts): New option --debug-quick-random.
27306         (main): Use new option.
27307         * common/asshelp.c (start_new_gpg_agent): Add hack to pass an
27308         additional argument for the agent name.
27309         * tests/openpgp/defs.inc: Pass --debug-quick-random to the gpg-agent
27310         starting parameters.
27311         * tests/openpgp/version.test: Ditto.
27312
27313 2014-10-29  Werner Koch  <wk@gnupg.org>
27314
27315         common: Check option arguments for a valid range.
27316         + commit 0d73a242cb53522669cf712b5ece7d1ed05d003a
27317         * common/argparse.h (ARGPARSE_INVALID_ARG): New.
27318         * common/argparse.c: Include limits h and errno.h.
27319         (initialize): Add error strings for new error constant.
27320         (set_opt_arg): Add range checking.
27321
27322         Fix stdint.h problem for Apple.
27323         + commit f5592fcff308007322a201c970a6d5e8763c9fe3
27324         * gl/stdint_.h [__APPLE__]: Include hack.
27325
27326 2014-10-27  Werner Koch  <wk@gnupg.org>
27327
27328         speedo: Fixes for native build.
27329         + commit 158fe900183daf745821dea7a70cf1c673cd8de0
27330         * build-aux/speedo.mk (TARGETOS): Init with empty string.
27331         (speedo_pkg_gnupg_configure): Use --enable-gpg2-is-gpg only for w32.
27332         (INST_VERSION, INST_PROD_VERSION): Create only for w32.
27333
27334 2014-10-24  Werner Koch  <wk@gnupg.org>
27335
27336         agent: Support pinentries with integrated repeat passphrase feature.
27337         + commit c9aadcb3a248632c07391ff3d829bece9320a901
27338         * agent/agent.h (struct pin_entry_info_s): Add fields repeat_okay and
27339         with_repeat.
27340         * agent/call-pinentry.c (close_button_status_cb): Rewrite and check
27341         for PIN_REPEAT.  Change users to check only the relevant bit.
27342         (agent_askpin): Support repeat logic of new Pinentries.
27343
27344         * agent/command-ssh.c (ssh_identity_register): Use the new repeat
27345         feature.
27346         * agent/genkey.c (agent_ask_new_passphrase): Ditto.
27347
27348 2014-10-19  Werner Koch  <wk@gnupg.org>
27349
27350         gpg: Silence "packet with obsolete versoin" warnings.
27351         + commit 472a4a0d82add2d17154fa38e0074eaea56c28c1
27352         * g10/parse-packet.c (parse_key): Print warning only in very verbose
27353         mode.
27354
27355         gpg: Make card key generation work again.
27356         + commit 1b8decc4767f0c55867327bdf3113204efcd19a7
27357         * g10/call-agent.c (agent_scd_learn): Rename from agent_learn.
27358         (agent_learn): New.
27359         * g10/keygen.c (gen_card_key): Call new agent-learn.
27360
27361 2014-10-17  Werner Koch  <wk@gnupg.org>
27362
27363         dirmngr: Allow building without LDAP support.
27364         + commit 6d9491842d5da597980eaa59e1e3e2137965fe09
27365         * configure.ac: Add option --disable-ldap.
27366         (USE_LDAP): New ac_define and am_conditional.
27367         * dirmngr/Makefile.am: Take care of USE_LDAP.
27368         * dirmngr/dirmngr.c (!USE_LDAP): Make all ldap options dummy options
27369         and do not call any ldap function.
27370         * dirmngr/server.c (!USE_LDAP): Do not call any ldap function.
27371         * dirmngr/crlfetch.c (!USE_LDAP): Ditto.
27372
27373         w32: Set SYSROOT to help finding config scripts.
27374         + commit a13705f4c18db56765f4af31376e81241dbabebe
27375         * autogen.sh <build-w32>: Set SYSROOT.
27376
27377         gpg: Remove all support for v3 keys and always create v4-signatures.
27378         + commit 8fd150b05b744fe9465057c12529d5e6b6b02785
27379         * g10/build-packet.c (do_key): Remove support for building v3 keys.
27380         * g10/parse-packet.c (read_protected_v3_mpi): Remove.
27381         (parse_key): Remove support for v3-keys.  Add dedicated warnings for
27382         v3-key packets.
27383         * g10/keyid.c (hash_public_key): Remove v3-key support.
27384         (keyid_from_pk): Ditto.
27385         (fingerprint_from_pk): Ditto.
27386
27387         * g10/options.h (opt): Remove fields force_v3_sigs and force_v4_certs.
27388         * g10/gpg.c (cmd_and_opt_values): Remove oForceV3Sigs, oNoForceV3Sigs,
27389         oForceV4Certs, oNoForceV4Certs.
27390         (opts): Turn --force-v3-sigs, --no-force-v3-sigs, --force-v4-certs,
27391         --no-force-v4-certs int dummy options.
27392         (main): Remove setting of the force_v3_sigs force_v4_certs flags.
27393         * g10/revoke.c (gen_revoke, create_revocation): Always create v4 certs.
27394         * g10/sign.c (hash_uid): Remove support for v3-signatures
27395         (hash_sigversion_to_magic): Ditto.
27396         (only_old_style): Remove this v3-key function.
27397         (write_signature_packets): Remove support for creating v3-signatures.
27398         (sign_file): Ditto.
27399         (sign_symencrypt_file): Ditto.
27400         (clearsign_file): Ditto.  Remove code to emit no Hash armor line if
27401         only v3-keys are used.
27402         (make_keysig_packet): Remove arg SIGVERSION and force using
27403         v4-signatures.  Change all callers to not pass a value for this arg.
27404         Remove all v3-key related code.
27405         (update_keysig_packet): Remove v3-signature support.
27406         * g10/keyedit.c (sign_uids): Always create v4-signatures.
27407
27408         * g10/textfilter.c (copy_clearsig_text): Remove arg pgp2mode and
27409         change caller.
27410
27411 2014-10-13  Werner Koch  <wk@gnupg.org>
27412
27413         gpg: Remove extra RSA import status line.
27414         + commit fab89f159bcb36ea7285af661d5756eefa981822
27415         * g10/import.c (stats_s): Remove field "imported_rsa".
27416         (import_print_stats): Do not print separate value for RSA.
27417         (import_one): Remove the RSA counter.
27418
27419         gpg: Fix informative printing of user ids.
27420         + commit 21c0ea6bafafbcc4a2e07f0ac76275cc0229e9a0
27421         * g10/getkey.c (keyid_list): Add field "fpr".
27422         (cache_user_id): Store fpr and check for dups only by fpr.
27423         (get_pubkey_byfpr): New.
27424         (get_user_id_string): Make static and use xasprintf.
27425         (get_long_user_id_string): Use xasprintf.
27426         (get_user_id_byfpr): New.
27427         (get_user_id_byfpr_native): New.
27428         * g10/keyid.c (fingerprint_from_pk): Make arg RET_LEN optional.
27429         * g10/import.c (import_one): Use get_user_id_byfpr_native.
27430
27431         gpg: Allow importing keys with duplicated long key ids.
27432         + commit c60814a5ce13932d933b363abc0c60c12783ae2f
27433         * g10/keydb.c (keydb_handle): Add field no_caching.
27434         (keyblock_cache): Repalce field kid by fpr.
27435         (keydb_disable_caching): New.
27436         (keydb_search): Use the fingerprint as cache index.
27437
27438         * g10/import.c (import_one): Use the fingerprint and not the kid to
27439         lookup the key.  Call keydb_disable_caching beofre re-searching for
27440         update.
27441
27442         * tests/openpgp/import.test: Add a test case.
27443
27444         tests: Speed up conventional encryption tests for gpg.
27445         + commit 2543f0ab9c7b4247347688863f898667bae31984
27446         * tests/openpgp/conventional-mdc.test: Add an s2k-count option.
27447         * tests/openpgp/conventional.test: Ditto.
27448
27449 2014-10-12  Werner Koch  <wk@gnupg.org>
27450
27451         gpg: Minor change for better readability.
27452         + commit 2d68dc437e7de92619abe3a019b0a7606487b6bf
27453         * g10/build-packet.c (write_version): Remove.
27454         (do_pubkey_enc, do_onepass_sig): Write version directly.
27455
27456 2014-10-10  Werner Koch  <wk@gnupg.org>
27457
27458         doc: Fix a man page rendering problem.
27459         + commit 5b5e5a6027ae1743719e112aa4e9055f1b8133a7
27460         * doc/gpg-agent.texi (Agent Configuration): Fix rendering of the
27461         sshcontrol example.
27462
27463 2014-10-10  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
27464
27465         gpg: Add build and runtime support for larger RSA keys.
27466         + commit 6cabb7a2a18f871b8c3d5de58bcdc5aaa5b201af
27467         * configure.ac: Added --enable-large-secmem option.
27468         * g10/options.h: Add opt.flags.large_rsa.
27469         * g10/gpg.c: Contingent on configure option: adjust secmem size,
27470         add gpg --enable-large-rsa, bound to opt.flags.large_rsa.
27471         * g10/keygen.c: Adjust max RSA size based on opt.flags.large_rsa
27472         * doc/gpg.texi: Document --enable-large-rsa.
27473
27474 2014-10-09  Werner Koch  <wk@gnupg.org>
27475
27476         gpg: Skip overlong keys and a print a warning.
27477         + commit 2ca90f78cee91c43b8d538d1cb92728f8e1452d5
27478         * kbx/keybox-search.c (keybox_search): Add arg r_skipped and skip too
27479         long blobs.
27480         * sm/keydb.c (keydb_search): Call keybox_search with a dummy param.
27481         * g10/keydb.c (struct keydb_handle): Add field skipped_long_blobs.
27482         (keydb_search_reset): Reset that field.
27483         (keydb_search): Update that field.
27484         (keydb_get_skipped_counter): New.
27485         * g10/keylist.c (list_all): Print count of skipped keys.
27486
27487         gpg: Sync keylist output and warning messages.
27488         + commit 60e21d8b85888b8c9ea15c70268f98d780fdf5fb
27489         * g10/keylist.c (list_all): Flush stdout before logging.
27490         * g10/misc.c (print_pubkey_algo_note): Ditto.
27491         (print_cipher_algo_note): Ditto.
27492         (print_digest_algo_note): Ditto.
27493         (print_md5_rejected_note): Ditto.
27494
27495         kbx: Fix handling of overlong keys.
27496         + commit b6507bb80e4e4aa5c85a918fdcf5c28cccb75081
27497         * kbx/keybox-file.c (IMAGELEN_LIMIT): Change limit from 10^6 to 2MiB.
27498         (_keybox_read_blob2): Skip too long record records.
27499         (_keybox_write_blob): Do not accept too long record.
27500         * kbx/keybox-dump.c (file_stats_s): Add field skipped_long_blobs.
27501         (_keybox_dump_file): Print new counter.
27502         (_keybox_dump_file): Skip too long records.
27503         ----
27504
27505         To test this feature you may set the limit back to 1MiB and use key
27506         F7F0E70F307D56ED which is in my local copy close to 2MiB.  Without
27507         this patch it was possible to import the key but access to that key
27508         and all keys stored after it was not possible.
27509
27510         gpg: Take care to use pubring.kbx if it has ever been used.
27511         + commit ec332d58efc50f6508b87fc9f51db68c39cee044
27512         * kbx/keybox-defs.h (struct keybox_handle): Add field for_openpgp.
27513         * kbx/keybox-file.c (_keybox_write_header_blob): Set openpgp header
27514         flag.
27515         * kbx/keybox-blob.c (_keybox_update_header_blob): Add arg for_openpgp
27516         and set header flag.
27517         * kbx/keybox-init.c (keybox_new): Rename to do_keybox_new, make static
27518         and add arg for_openpgp.
27519         (keybox_new_openpgp, keybox_new_x509): New.  Use them instead of the
27520         former keybox_new.
27521         * kbx/keybox-update.c (blob_filecopy): Add arg for_openpgp and set the
27522         openpgp header flags.
27523
27524         * g10/keydb.c (rt_from_file): New.  Factored out and extended from
27525         keydb_add_resource.
27526         (keydb_add_resource): Switch to the kbx file if it has the openpgp
27527         flag set.
27528
27529         * kbx/keybox-dump.c (dump_header_blob): Print header flags.
27530
27531 2014-10-09  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
27532
27533         Avoid unnecessary library linkage.
27534         + commit 27fe067efea883629354450a042ad09e47d90ff8
27535         * dirmngr/Makefile.am: Avoid $(DNSLIBS) for dirmngr_ldap
27536         * g10/Makefile.am: $(LIBREADLINE) is only for gpg2; gpgv2 does not
27537         need $(LIBASSUAN_LIBS)
27538         * sm/Makefile.am: gpgsm does not need $(ZLIBS)
27539         * tools/Makefile.am: gpgconf does not need $(NPTH_LIBS)
27540
27541 2014-10-08  Werner Koch  <wk@gnupg.org>
27542
27543         gpg: Avoid error exit if keygrip computations fails in a key listing.
27544         + commit 3ae6afc1336d42bd95fa0b7f5f83bd299ae26b97
27545         * g10/keyid.c (keygrip_from_pk): Use log_info and clear array on error.
27546
27547 2014-10-03  Werner Koch  <wk@gnupg.org>
27548
27549         Release 2.1.0-beta864.
27550         + commit 0943c7cc23371943e9670a2f35c318d847cbac6a
27551
27552
27553         gpg: Allow creating a cert-only primary key.
27554         + commit bc8583f247898a1fa45f6de834d34b335ab1952c
27555         * g10/keygen.c (ask_key_flags): Allow a 'c' in direct entry.
27556
27557         build: Add configure options --disable-{ntb,gnu}tls.
27558         + commit 6522a68d8d11e15ee77102e6830f251c2d9f440d
27559         * configure.ac: Add --disable-ntbtls and --disable-gnutls.
27560
27561 2014-10-03  Andre Heinecke  <aheinecke@intevation.de>
27562
27563         gpg: Check gpg-agent version before 2.1 migration.
27564         + commit a6fcdbc9e0fc0e45a3badc23813e689e83059b61
27565         * g10/call-agent.c, g10/call-agent.h (agent_get_version): New.
27566         * g10/migrate.c (migrate_secring): Abort migration if
27567         agent_get_version returns not at least 2.1.0
27568
27569 2014-10-03  Werner Koch  <wk@gnupg.org>
27570
27571         po: Update German translation.
27572         + commit b15d5d42adf31c0797797ebe19c471ab6f52c668
27573
27574
27575         Remove support for the GPG_AGENT_INFO envvar.
27576         + commit 9c380384dafb213334f8834178c5ceb0bf33db6e
27577         * agent/agent.h (opt): Remove field use_standard_socket.
27578         * agent/command.c (cmd_killagent): Always allow killing.
27579         * agent/gpg-agent.c (main): Turn --{no,}use-standard-socket and
27580         --write-env-file into dummy options.  Always return true for
27581         --use-standard-socket-p. Do not print the GPG_AGENT_INFO envvar
27582         setting or set that envvar.
27583         (create_socket_name): Simplify by removing non standard socket
27584         support.
27585         (check_for_running_agent): Ditto.
27586         * common/asshelp.c (start_new_gpg_agent): Remove GPG_AGENT_INFO use.
27587         * common/simple-pwquery.c (agent_open): Ditto.
27588         * configure.ac (GPG_AGENT_INFO_NAME): Remove.
27589         * g10/server.c (gpg_server): Do not print the AgentInfo comment.
27590         * g13/server.c (g13_server): Ditto.
27591         * sm/server.c (gpgsm_server): Ditto.
27592         * tools/gpgconf.c (main): Simplify by removing non standard socket
27593         support.
27594
27595 2014-10-02  Werner Koch  <wk@gnupg.org>
27596
27597         gpg: Fix regression removing SHA256.
27598         + commit 688a903b4b3ad348c0d09e9d3fab8a12f4f94311
27599         * g10/misc.c (map_md_openpgp_to_gcry): Always use SHA256.
27600
27601         First changes for future use of NTBTLS.
27602         + commit f2361e6d582d4343d71d294ed1da654afe7750ee
27603         * configure.ac (NEED_NTBTLS_ABI, NEED_NTBTLS_VERSION): New.
27604         (HTTP_USE_NTBTLS): New.  Prefer over GNUTLS.
27605         * m4/ntbtls.m4: New.
27606         * m4/Makefile.am (EXTRA_DIST): Add new file.
27607         * common/http.c: Add conditionals to eventually use NTBTLS.
27608
27609         build: Update m4 scripts.
27610         + commit 6bc0cd6202033be113999dbf27be4014bdf2c784
27611         * m4/gpg-error.m4: Update from Libgpg-error git master.
27612         * m4/libgcrypt.m4: Update from Libgcrypt git master.
27613         * configure.ac: Declare SYSROOT a precious variable.  Add extra error
27614         message for library configuration mismatches.
27615
27616 2014-09-29  Werner Koch  <wk@gnupg.org>
27617
27618         doc: Remove GnuPG-1 related parts from gpg.texi.
27619         + commit edd191e5b006dc6ace1d41672e7201cbe58c41c9
27620         * doc/Makefile.am (YAT2M_OPTIONS): Add 2.1 to the source info.
27621         * doc/gpg.texi: Remove gpg1 related texts.
27622
27623 2014-09-27  Werner Koch  <wk@gnupg.org>
27624
27625         gpg: Default to SHA-256 for all signature types on RSA keys.
27626         + commit d33246700578cddd1cb8ed8164cfbba50aba4ef3
27627         * g10/main.h (DEFAULT_DIGEST_ALGO): Use SHA256 in --gnupg and SHA1 in
27628         strict RFC or PGP modes.
27629         * g10/sign.c (make_keysig_packet): Use DEFAULT_DIGEST_ALGO also for
27630         RSA key signatures.
27631         * configure.ac: Do not allow to disable sha256.
27632
27633         gpg: Simplify command --gen-key and add --full-gen-key.
27634         + commit f3625bb018fa8d5bc754f982996f8788386f0a9d
27635         * g10/gpg.c (aFullKeygen): New.
27636         (opts): Add command --full-key-gen.
27637         (main): Implement it.
27638         * g10/keygen.c (DEFAULT_STD_ALGO): Replace wrong GCRY_PK_RSA although
27639         the value is identical.
27640         (DEFAULT_STD_CURVE): New.
27641         (DEFAULT_STD_SUBALGO): New.
27642         (DEFAULT_STD_SUBKEYSIZE): New.
27643         (DEFAULT_STD_SUBCURVE): New.
27644         (quick_generate_keypair): Use new macros here.
27645         (generate_keypair): Add arg "full" and fix call callers. Do not ask
27646         for keysize in non-full node.
27647         (ask_user_id): Add arg "full" and simplify for non-full mode.
27648
27649 2014-09-26  Werner Koch  <wk@gnupg.org>
27650
27651         gpg: Add shortcut for setting key capabilities.
27652         + commit 7ff4ea2160e87a16bf701552d3b9c7ab1c42f9ec
27653         * g10/keygen.c (ask_key_flags): Add shortcut '='.
27654         * doc/help.txt (gpg.keygen.flags): New.
27655
27656 2014-09-25  Werner Koch  <wk@gnupg.org>
27657
27658         gpg: Do not always print dashes in obsolete_option.
27659         + commit 20c6da50d4f6264d26d113d7de606971f719a0ca
27660         * g10/gpg.c (main): Pass option names to obsolete_option without
27661         double dash.
27662         * g10/misc.c (obsolete_option, obsolete_scdaemon_option): Print double
27663         dash only for command line options.
27664
27665 2014-09-25  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
27666
27667         gpg: Warn about (but don't fail) on scdaemon options in gpg.conf.
27668         + commit 371c2b14b0347209efd23b4e54e1981a12d7aeab
27669         * g10/gpg.c: Add config options that should belong in scdaemon.conf
27670         * g10/main.h, g10/misc.c (obsolete_scdaemon_option): New.
27671
27672 2014-09-22  Werner Koch  <wk@gnupg.org>
27673
27674         speedo: Check that wget and gpgv are installed.
27675         + commit 59b6f6f16e095162358ac2001aeb2c058de2fd1e
27676         * build-aux/getswdb.sh: Check for required tools.
27677
27678         speedo: Autodetect sha1sum tools.
27679         + commit 2427bc5bc76b00cfe790e1f370113f5b4199e8fa
27680         * build-aux/getswdb.sh: Add option --find-sha1sum.
27681         * build-aux/speedo.mk (check-tools): New phony target.  Not yet used.
27682         (SHA1SUM): New var.  Use it instead of sha1sum.
27683
27684         gpg: Create default keyring with .kbx suffix.
27685         + commit bc2f5c1d1afbe8ba413e594639fd05f19df32f75
27686         * g10/keydb.c (maybe_create_keyring_or_box): Rename arg for clarity.
27687         (keydb_add_resource): Fix order of args to maybe_create_keyring_or_box
27688         and check and create .kbx.
27689
27690 2014-09-20  Werner Koch  <wk@gnupg.org>
27691
27692         gpg: --delete-secret-key - check that a secret key exists.
27693         + commit 1d33d03f0bb576601f5eef1a548cbc519f251b17
27694         * g10/delkey.c (do_delete_key): Check availibility of a secret key.
27695
27696         gpg: Make algorithm selection prompt for ECC more clear.
27697         + commit cf648fc5c8cb20bfea4fd303631ba311bbaf3659
27698         * g10/keygen.c (ask_algo): Change 9 to "ECC and ECC".
27699
27700 2014-09-18  Werner Koch  <wk@gnupg.org>
27701
27702         Release 2.1.0-beta834.
27703         + commit 93f158df381af86036332c4314c2d4a64eab3e62
27704
27705
27706         speedo: Distribute needed files.
27707         + commit 72a16d80d4505aa0ff509aae41f848bbe42ed129
27708         * Makefile.am (EXTRA_DIST): Add speedo stuff.
27709
27710         build: Enable gpgtar by default.
27711         + commit 345a8374f31e637a99e6438e527670cf6845ca05
27712
27713
27714         common: Do not build maintainer modules in non-maintainer mode.
27715         + commit 927db789c19cbe5656ff980841ee37dd3a8989e7
27716         * common/Makefile.am (module_maint_tests): Use only in maintainer
27717         mode.
27718         (t_common_cflags): New.
27719
27720         common: Remove superfluous statements.
27721         + commit cad181b5ece3ab6910575c82c731ce2b47271a09
27722         * common/exechelp-posix.c: Remove weak pragmas.
27723         * common/sexputil.c (make_canon_sexp_from_rsa_pk): Remove double
27724         const.
27725
27726         g13: Avoid segv after pipe creation failure.
27727         + commit 6e7bcabd781a3ca9ad7dd90d962fb2a239feab4a
27728         * g13/call-gpg.c (gpg_encrypt_blob): Init some vars in case of an
27729         early error.
27730         (gpg_decrypt_blob): Ditto.
27731
27732         scd: Fix int/short mismatch in format string of app-p15.c.
27733         + commit b17e8bbf20239e840763f98d3e62f16efdc82ba3
27734         * scd/app-p15.c (parse_certid): Use snprintf and cast value.
27735         (send_certinfo): Ditto.
27736         (send_keypairinfo): Ditto.
27737         (do_getattr): Ditto.
27738
27739         agent: Init a local variable in the error case.
27740         + commit f82a6e0f08725008c5bbf702a5f4c175ea09f01c
27741         * agent/pksign.c (do_encode_md): Init HASH on error.
27742
27743         agent: Remove left over debug output.
27744         + commit 4f35ef499ac913036b7b69296a62afe8159b90b8
27745         * agent/command-ssh.c (ssh_signature_encoder_eddsa): Remove debug
27746         output.
27747
27748         agent: Silence compiler warning for a debug message.
27749         + commit ba6f8b3d9ec83b35c4f3839853567491fee2f99c
27750         * agent/call-pinentry.c (agent_query_dump_state): Use %p for
27751         POPUP_TID.
27752
27753         sm: Silence compiler warnings.
27754         + commit 34b2e8c7dcb0edb28f99edbd788d73491334e3c0
27755         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Remove unused var I.
27756         * sm/certreqgen.c (proc_parameters): Init PUBLIC to avoid compiler
27757         warning.
27758
27759         gpg: Silence a compiler warning.
27760         + commit 6a0c3fa19cfcdd590b96691e8a8ffb48fb5e0ec4
27761         * g10/parse-packet.c (enum_sig_subpkt): Replace hack.
27762
27763         gpg: Replace a hash algo test function.
27764         + commit 327134934d79d141d92170ad3b4a6ef3cb718ee0
27765         * g10/gpg.c (print_mds): Replace openpgp_md_test_algo.
27766
27767         speedo: Various fixes.
27768         + commit 2f065d7ab6c514013eb8504281f50284764c26ec
27769         * build-aux/speedo.mk: Take zlib and bzip2 from ftp.gnupg.org.  Minor
27770         other fixes.
27771
27772 2014-09-17  Werner Koch  <wk@gnupg.org>
27773
27774         gpg: Print a warning if the subkey expiration may not be what you want.
27775         + commit ae3d1bbb65b65cf3c57bb14886be120f5e31635d
27776         * g10/keyedit.c (subkey_expire_warning): New.
27777         (keyedit_menu): Call it when needed.
27778
27779         gpg: Improve passphrase caching.
27780         + commit 457bce5cd39146df047e4740162125c32c738789
27781         * agent/cache.c (last_stored_cache_key): New.
27782         (agent_get_cache): Allow NULL for KEY.
27783         (agent_store_cache_hit): New.
27784         * agent/findkey.c (unprotect): Call new function and try to use the
27785         last stored key.
27786
27787         * g10/revoke.c (create_revocation): Add arg CACHE_NONCE and pass to
27788         make_keysig_packet.
27789         (gen_standard_revoke): Add arg CACHE_NONCE and pass to
27790         create_revocation.
27791         * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke with
27792         cache nonce.
27793
27794 2014-09-12  Werner Koch  <wk@gnupg.org>
27795
27796         gpg: Use algorithm id 22 for EdDSA.
27797         + commit 83c2d2396cc9fa6bdd887a560830fc0f48b01b08
27798         * common/openpgpdefs.h (PUBKEY_ALGO_EDDSA): Change to 22.
27799         * g10/keygen.c (ask_curve): Reword the Curve25519 warning note.
27800
27801 2014-09-11  Werner Koch  <wk@gnupg.org>
27802
27803         gpg: Stop early on bogus old style comment packets.
27804         + commit 3d250d21d36e8a0935b645f1ed5134ef9083530e
27805         * g10/parse-packet.c (parse_key): Take care of too short packets for
27806         old style commet packets.
27807
27808 2014-09-10  Werner Koch  <wk@gnupg.org>
27809
27810         dirmngr: Support https for KS_FETCH.
27811         + commit 84419f42da0fd436a9e0e669730157e74ce38b77
27812         * dirmngr/ks-engine-hkp.c (cert_log_cb): Move to ...
27813         * dirmngr/misc.c (cert_log_cb): here.
27814         * dirmngr/ks-engine-http.c (ks_http_fetch): Support 307-redirection
27815         and https.
27816
27817         dirmngr: Fix the ks_fetch command for the http scheme.
27818         + commit 3b20cc21de86ac8a475bdefd3aebb02a12fb8d0b
27819         * common/http.c (http_session_ref): Allow for NULL arg.
27820
27821 2014-09-08  Werner Koch  <wk@gnupg.org>
27822
27823         gpg: Fix memory leak in ECC encryption.
27824         + commit 98f65291d7abecc1e4d618125f33b6ce759e0892
27825         * g10/pkglue.c (pk_encrypt): Fix memory leak and streamline error
27826         handling.
27827
27828 2014-09-02  Werner Koch  <wk@gnupg.org>
27829
27830         gpg: Fix export of NIST ECC keys.
27831         + commit bf2fc12b83b45953f7afa403b8d91c36d0b50ec9
27832         * common/openpgp-oid.c (struct oidtable): New.
27833         (openpgp_curve_to_oid): Rewrite and allow OID as input.
27834         (openpgp_oid_to_curve): Make use of the new table.
27835
27836         agent: Fix import of OpenPGP EdDSA keys.
27837         + commit afe85582ddc2ebc285728bf6417f8929fd0b3281
27838         * agent/cvt-openpgp.c (get_keygrip): Special case EdDSA.
27839         (convert_secret_key): Ditto.
27840         (convert_transfer_key): Ditto.
27841         (apply_protection): Handle opaque MPIs.
27842
27843         (do_unprotect): Check FLAG_OPAQUE instead of FLAG_USER1 before
27844         unpacking an opaque mpi.
27845
27846 2014-09-01  Kyle Butt  <kylebutt@gmail.com>
27847
27848         gpg: Fix export of ecc secret keys by adjusting check ordering.
27849         + commit 4054d86abcb7ad953ed9e988b1765cb9266faefd
27850         * g10/export.c (transfer_format_to_openpgp): Move the check against
27851         PUBKEY_MAX_NSKEY to after the ECC code adjusts the number of
27852         parameters.
27853
27854 2014-09-01  Werner Koch  <wk@gnupg.org>
27855
27856         agent: Allow key unprotection using AES-256.
27857         + commit c913e09ebdbb1a1e9838a0a5897448841f5e9bc3
27858         * agent/protect.c (PROT_CIPHER): Rename to GCRY_CIPHER_AES128 for
27859         clarity.
27860         (do_decryption): Add args prot_cipher and prot_cipher_keylen.  USe
27861         them instead of the hardwired values.
27862         (agent_unprotect): Change to use a table of protection algorithms.
27863         Add AES-256 variant.
27864
27865 2014-08-28  Werner Koch  <wk@gnupg.org>
27866
27867         gpg: Do not show "MD5" and triplicated "RSA" in --version.
27868         + commit be98b5960ebd48929c399b0b91c95bfc0cb9749b
27869         * g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
27870         (build_list_md_test_algo): Ignore MD5.
27871
27872         gpg: Do not show "MD5" and triplicated "RSA" in --version.
27873         + commit 40ad42dbe3c67d8103aedb6b584f4bedc5f93307
27874         * g10/gpg.c (build_list_pk_test_algo): Ignore RSA aliases
27875         (build_list_md_test_algo): Ignore MD5.
27876
27877 2014-08-26  Werner Koch  <wk@gnupg.org>
27878
27879         gpg: Remove CAST5 from the default prefs and order SHA-1 last.
27880         + commit 15cfd9a3bcdd561091a28c8f989c616b87348463
27881         * g10/keygen.c (keygen_set_std_prefs): Update prefs.
27882
27883         Switch to the libgpg-error provided estream.
27884         + commit 519305feb888b529c005b40445d041a088a2f8fc
27885         * configure.ac (NEED_GPG_ERROR_VERSION): Reguire 1.14.
27886         (GPGRT_ENABLE_ES_MACROS): Define.
27887         (estream_INIT): Remove.
27888         * m4/estream.m4: Remove.
27889         * common/estream-printf.c, common/estream-printf.h: Remove.
27890         * common/estream.c, common/estream.h: Remove.
27891         * common/init.c (_init_common_subsystems): Call gpgrt initialization.
27892
27893         gpg: Allow for positional parameters in the passphrase prompt.
27894         + commit a731c22952278c12c601b73d7581fda3a15a4b5b
27895         * g10/passphrase.c (passphrase_get): Replace sprintf by xasprintf.
27896
27897 2014-08-20  Werner Koch  <wk@gnupg.org>
27898
27899         gpg: Fix "can't handle public key algorithm" warning.
27900         + commit cb680c5ea540738692a5c74951802b0fdc658e85
27901         * g10/parse-packet.c (unknown_pubkey_warning): Check for encr/sign
27902         capabilities.
27903
27904 2014-08-19  Werner Koch  <wk@gnupg.org>
27905
27906         speedo: Get version numbers from online database.
27907         + commit 31649e72fd106a990614ce3cf720640a841ba722
27908         * build-aux/getswdb.sh: New.
27909         * build-aux/speedo.mk: Get release version numbers from swdb.lst.
27910
27911         build: Create VERSION file via autoconf.
27912         + commit 4fc1c712e986f280057b1bce7ca4696ba6d95dfc
27913         * Makefile.am (dist-hook): Remove creation of VERSION.
27914         (EXTRA_DIST): Add VERSION.
27915         * configure.ac: Let autoconf create VERSION.
27916
27917 2014-08-18  Werner Koch  <wk@gnupg.org>
27918
27919         gpg: Install the current release signing pubkey.
27920         + commit e5da80bc1888bf8801e69c9ff99f7f47550f7a09
27921         * g10/distsigkey.gpg: New.
27922
27923         agent: Return NO_SECKEY instead of ENONET for PKSIGN and others.
27924         + commit 3981ff15f3c0829ba22cd37794353502d996683c
27925         * agent/pksign.c (agent_pksign_do): Replace ENONET by NO_SECKEY.
27926         * agent/findkey.c (agent_key_from_file): No diagnostic for NO_SECKEY.
27927         * agent/pkdecrypt.c (agent_pkdecrypt): Replace checking for ENOENT.
27928
27929         kbx: Make user id and signature data optional for OpenPGP.
27930         + commit e4aa006e4807285ffdd881e4e05af3bc47c5c964
27931         * kbx/keybox-blob.c (_keybox_create_openpgp_blob): Remove restriction.
27932
27933         gpg: Change default cipher for --symmetric from CAST5 to AES-128.
27934         + commit 57df1121c18b004dd763b35eabf7b51fc9e8ec38
27935         * g10/main.h (DEFAULT_CIPHER_ALGO): Chhange to AES or CAST5 or 3DES
27936         depending on configure option.
27937         * g10/gpg.c (main): Set opt.s2k_cipher_algo to DEFAULT_CIPHER_ALGO.
27938
27939         yat2m: Support @set and @value.
27940         + commit 425d0750168f6b66a5d78a857cf21375a8f129eb
27941         * doc/yat2m.c (variablelist): New.
27942         (set_variable): New.
27943         (macro_set_p): Also check the variables.
27944         (proc_texi_cmd): Support the @value command.
27945         (parse_file): Support the @set command.
27946         (top_parse_file): Release variablelist.
27947
27948         yat2m: Support the $* command for man page rendering.
27949         + commit 7e51ef0f77962f5fb215da53817caf28899ca190
27950
27951
27952 2014-08-17  Werner Koch  <wk@gnupg.org>
27953
27954         estream: Change license from GPL to LPGL.
27955         + commit af1196512f505e8a3a338f9b72394fa3585a5234
27956         * common/estream-printf.c, common/estream-printf.h: Change license.
27957         * common/estream.c, common/estream.h: Ditto.
27958
27959 2014-08-14  Werner Koch  <wk@gnupg.org>
27960
27961         Release 2.1.0-beta783.
27962         + commit a13198d9bcee368a8de7a401feb017efc83ff795
27963
27964
27965         po: Update the German (de) translation.
27966         + commit fe9ff33b9dc8793957998341cf4bcf5e50827b41
27967
27968
27969         sm: Create homedir and lock empty keybox creation.
27970         + commit c4b60cdae8dbf68206fd105fd09adeb61a9dafe4
27971         * sm/gpgsm.h (opt): Add field "no_homedir_creation".
27972         * sm/gpgsm.c (main): Set it if --no-options is used.
27973         * sm/keydb.c (try_make_homedir): New.  Similar to the one from
27974         g10/openfile.c.
27975         (maybe_create_keybox): New.  Similar to the one from g10/keydb.c.
27976         (keydb_add_resource): Replace some code by maybe_create_keybox.
27977
27978         gpg: Screen keyserver responses.
27979         + commit c23c18c1543d1ff58f0f78baaa6a8e319c659ecb
27980         * g10/main.h (import_screener_t): New.
27981         * g10/import.c (import): Add screener callbacks to param list.
27982         (import_one): Ditto.
27983         (import_secret_one): Ditto.
27984         (import_keys_internal): Ditto.
27985         (import_keys_stream): Ditto.
27986         * g10/keyserver.c (struct ks_retrieval_screener_arg_s): New.
27987         (keyserver_retrieval_screener): New.
27988         (keyserver_get): Pass screener to import_keys_es_stream().
27989
27990         scd: Minor changes to app-sc-hsm.
27991         + commit a61b28df1f29b1e306115282ec1ce580fa54945a
27992         * scd/app-sc-hsm.c: Re-indendet some parts and set some vars to NULL
27993         after xfree for improbed robustness.
27994         (read_ef_prkd): Replace serial operator by blocks for better
27995         readability.
27996         (apply_PKCS_padding): Rewrite for easier auditing.
27997         (strip_PKCS15_padding): Ditto.  Add stricter check on SRCLEN.
27998
27999         gpg: Disable an MD5 workaround for pgp2 by default.
28000         + commit ae29b52119aa419989b773b2d6abb6e287dfc81b
28001         * g10/sig-check.c (do_check): Move some code to ...
28002         * g10/misc.c (print_md5_rejected_note): new function.
28003         * g10/mainproc.c (proc_tree, proc_plaintext): Enable MD5 workaround
28004         only if option --allow-weak-digest-algos is used.
28005
28006         gpg: Remove options --pgp2 and --rfc1991.
28007         + commit 2b8d8369d59249b89526c18c5ac276e6445dc35e
28008         * g10/gpg.c (oRFC1991, oPGP2): Remove
28009         (opts): Remove --pgp2 and --rfc1991.
28010         * g10/options.h (CO_PGP2, CO_RFC1991): Remove.  Remove all users.
28011         (RFC2440, PGP2): Remove.  Remove all code only enabled by these
28012         conditions.
28013         * tests/openpgp/clearsig.test: Remove --rfc1991 test.
28014
28015         build: Fix autogen.sh base version hack.
28016         + commit 49c9a958e0b786850309bca555d4465c97d337e1
28017         * autogen.sh <find-version>: Fix.
28018
28019         gpg: Remove --compress-keys and --compress-sigs feature.
28020         + commit 71b55e91f02cdb65a8884892f71c4c7bf8a75247
28021         * g10/gpg.c (oCompressKeys, oCompressSigs): Remove.
28022         (opts): Turn --compress-keys and --compress-signs in NOPs.
28023         * g10/options.h (opt): Remove fields compress_keys and compress_sigs.
28024         * g10/export.c (do_export): Remove compress_keys feature.
28025         * g10/sign.c (sign_file): Remove compress_sigs feature.
28026
28027 2014-08-13  Werner Koch  <wk@gnupg.org>
28028
28029         gpg: Add list-option "show-usage".
28030         + commit 7d0492075ea638607309b3ea6a792b0e95ea7d98
28031         * g10/gpg.c (parse_list_options): Add "show-usage".
28032         * g10/options.h (LIST_SHOW_USAGE): New.
28033         * g10/keyid.c (usagestr_from_pk): Add arg FILL.  Change caller.
28034         * g10/keylist.c (list_keyblock_print): Print usage info.
28035
28036 2014-08-12  Werner Koch  <wk@gnupg.org>
28037
28038         gpg: Make --with-colons work again for --search-keys.
28039         + commit a57c33c855c6757c8770529ee71f0f90744cd7a6
28040         * g10/keyserver.c (search_line_handler): Replace log_debug by
28041         es_printf.
28042
28043 2014-08-08  NIIBE Yutaka  <gniibe@fsij.org>
28044
28045         po: Update Japanese translation.
28046         + commit 2d9f76e07082fc231303ac2c6ae1aea3c98fa2e4
28047
28048
28049 2014-07-25  Werner Koch  <wk@gnupg.org>
28050
28051         scd: Minor and editorial changes to app-sc-hsm.c.
28052         + commit 2e936915cf2f830e60d974d607b08822645f5753
28053         * scd/app-sc-hsm.c (select_and_read_binary): Use SW_ macro.
28054         (parse_certid): Remove useless test.
28055         (send_certinfo, send_keypairinfo): Shrink malloc to the needed size.
28056         (do_getattr): Ditto.
28057         (verify_pin): Use SW_ macro.
28058         (do_decipher): Replace OFS variable and extend comment.
28059
28060         scd: Add a new status word code.
28061         + commit e49c851ff54d5ecf856411bf6cdee721695ea172
28062         * scd/apdu.h (SW_REF_DATA_INV): New.
28063         * scd/apdu.c (apdu_strerror): Add string.
28064
28065 2014-07-25  Andreas Schwier  <andreas.schwier@cardcontact.de>
28066
28067         scd: Support for SmartCard-HSM.
28068         + commit 8eb9224f32ddf1c9e1490c4d9688a177f8b6ae64
28069         * scd/app-sc-hsm.c: New.
28070         * scd/app.c (select_application, get_supported_applications): Register
28071         new app.
28072
28073 2014-07-25  Werner Koch  <wk@gnupg.org>
28074
28075         gpg: Switch to an EdDSA format with prefix byte.
28076         + commit 557cc11a605dd280d03c52d8b546deed8c4c714d
28077         * g10/keygen.c (gen_ecc): USe "comp" for EdDSA.
28078
28079 2014-07-23  Werner Koch  <wk@gnupg.org>
28080
28081         agent: Show just one warning with all failed passphrase constraints.
28082         + commit b3378b3a56fc90ba8ae38e6298b23a378305af32
28083         * agent/genkey.c (check_passphrase_constraints): Build a final warning
28084         after all checks.
28085
28086         agent: Only one confirmation prompt for an empty passphrase.
28087         + commit a24510d53bb23e3a680ed2c306e576268c07060d
28088         * agent/genkey.c (check_passphrase_constraints): Moev empty passphrase
28089         check to the front.
28090
28091         gpg: Add command --quick-gen-key.
28092         + commit ea186540db5b418bc6f6e5ca90337672c9981c88
28093         * g10/gpg.c (aQuickKeygen): New.
28094         * g10/misc.c (is_valid_user_id): New stub.
28095         * g10/keygen.c (quickgen_set_para): New.
28096         (quick_generate_keypair): New.
28097
28098         common: Add cpr_get_answer_is_yes_def()
28099         + commit 75127bc4561787aa9bc1cf976658e20192446d7f
28100         * g10/cpr.c (cpr_get_answer_is_yes): Factor code out to ....
28101         (cpr_get_answer_is_yes_def): ...new.
28102
28103         gpg: Make --quick-sign-key promote local key signatures.
28104         + commit 17404b2fccbc74c4f0b2364cc08e9dcc64175cf8
28105         * g10/keyedit.c (sign_uids): Promote local sigs in quick mode.
28106
28107 2014-07-22  Werner Koch  <wk@gnupg.org>
28108
28109         scd: Do not use the pcsc-wrapper.
28110         + commit bc6b452129178658da7241903ca2174c79281752
28111         * scd/apdu.c (NEED_PCSC_WRAPPER): Do not define.
28112         * scd/Makefile.am (libexec_PROGRAMS): Remove gnupg-pcsc-wrapper
28113         (gnupg_pcsc_wrapper_SOURCES): Remove.
28114         (gnupg_pcsc_wrapper_LDADD): Remove.
28115         (gnupg_pcsc_wrapper_CFLAGS): Remove.
28116
28117 2014-07-21  Werner Koch  <wk@gnupg.org>
28118
28119         gpg: Improve --list-packets output for faulty packets.
28120         + commit 5b34e347b612765f31061d077b7c343e08662ba9
28121         * g10/parse-packet.c: Add list_mode output for certain failures.
28122
28123         gpg: Cap size of attribute packets at 16MB.
28124         + commit bab9cdd971f35ff47e153c00034c95e7ffeaa09a
28125         * g10/parse-packet.c (parse_attribute): Avoid xmalloc failure and cap
28126         size of packet.
28127
28128 2014-07-03  Werner Koch  <wk@gnupg.org>
28129
28130         Release 2.1.0-beta751.
28131         + commit 5ae34f574baca2b98a09fd982c941855558408e1
28132
28133
28134         gpg: Make show-uid-validity the default.
28135         + commit 5214d8f02bf65fb0a4af15ff80cf1369ccd4c167
28136
28137
28138         tests: Fix end-of-all-ticks test for Western locales.
28139         + commit 3533860ee316918dd47501c53e910bfd0032b39d
28140         * common/t-timestuff.c (test_timegm): Use timegm if available.
28141         (main): Set TX to UTC if timegm is not available.
28142
28143 2014-07-03  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
28144
28145         gpg: Spelling error.
28146         + commit b51af333bdf77c042c9fe748616e80d1f5e4d3f9
28147
28148
28149 2014-06-30  Werner Koch  <wk@gnupg.org>
28150
28151         gpg: Auto-create revocation certificates.
28152         + commit 03018ef9eec75e4d91ea53c95547a77dedef8f80
28153         * configure.ac (GNUPG_OPENPGP_REVOC_DIR): New config define.
28154         * g10/revoke.c (create_revocation): Add arg "leadin".
28155         (gen_standard_revoke): New.
28156         * g10/openfile.c (get_openpgp_revocdir): New.
28157         (open_outfile): Add MODE value 3.
28158         * g10/keyid.c (hexfingerprint): New.
28159         * g10/keygen.c (do_generate_keypair): Call gen_standard_revoke.
28160
28161         estream: Fix minor glitch in "%.*s" format.
28162         + commit aa5b4392aac99382d96be94782ae745e0a42484a
28163         * common/estream-printf.c (pr_string): Take care of non-nul terminated
28164         strings.
28165
28166         gpg: Rearrange code in gen_revoke.
28167         + commit 3a01b220715b3d1a90d94353e4980ab5a1ea8f26
28168         * g10/revoke.c (gen_revoke): Factor some code out to ...
28169         (create_revocation): new.
28170
28171         gpg: Create exported secret files and revocs with mode 700.
28172         + commit c434de4d83ccfaca8bde51de5c2ac8d9656e4e18
28173         * common/iobuf.c (direct_open): Add arg MODE700.
28174         (iobuf_create): Ditto.
28175         * g10/openfile.c (open_outfile): Add arg RESTRICTEDPERM.  Change call
28176         callers to pass 0 for it.
28177         * g10/revoke.c (gen_desig_revoke, gen_revoke): Here pass true for new
28178         arg.
28179         * g10/export.c (do_export): Pass true for new arg if SECRET is true.
28180
28181         common: Minor code cleanup for a legacy OS.
28182         + commit 35fdfaa0b94342c53eb82eea155a37ad4009fa9f
28183         * common/iobuf.c (direct_open) [__riscos__]: Simply cpp conditionals.
28184
28185 2014-06-27  Werner Koch  <wk@gnupg.org>
28186
28187         speedo: Fix the w32 installer name.
28188         + commit adad1872b448593275d8cae06dffe376bee067b5
28189
28190
28191         po: Update some strings of the French (fr) translation.
28192         + commit 1ef7870fc96f6dd8137e9bfabf9b06787f75dffd
28193
28194
28195         po: Update the German (de) translation.
28196         + commit c2e3eb98884785e6794dc79c1a53d75945f4c1ab
28197
28198
28199         agent: Adjust for changed npth_eselect under W32.
28200         + commit a1dff86da8ebaab6e154360f538ca9d43a6c4934
28201         * agent/gpg-agent.c (handle_connections) [W32]: Make events_set an
28202         unsigned int to match the changed prototype.
28203
28204         dirmngr: Use the homedir based socket also under W32.
28205         + commit 5e1f9b5e1427688ac340f0829e02bece7f0caf9c
28206         * common/homedir.c (dirmngr_user_socket_name): Use same code for all
28207         platforms.
28208
28209 2014-06-27  Yuri Chornoivan  <yurchor@ukr.net>
28210
28211         po: Update and enable Ukrainian (uk) translation.
28212         + commit 2c4025576105a9deb78e1cfb22c11af4af09c4fa
28213
28214
28215         Fix typos in messages.
28216         + commit e56a2d6a56d95c0f169506a8dc74a845c22b699d
28217
28218
28219 2014-06-27  Werner Koch  <wk@gnupg.org>
28220
28221         build: Remove unused options.
28222         + commit 2540a4b674a17b45ec33f43f26e830e74ff0afed
28223         * configure.ac: Remove option --build-agent-only.
28224         (FAKE_CURL, GPGKEYS_CURL): Remove check for cURL
28225         (GPGKEYS_MAILTO): Remove ac_subst but keep the currently unused
28226         SENDMAIL check.
28227         (GPGKEYS_KDNS): Remove ac_subst.
28228         * autogen.rc (final_info): Remove suggestion to use the removed option
28229         --enable-mailto.
28230
28231 2014-06-27  NIIBE Yutaka  <gniibe@fsij.org>
28232
28233         scd: Add pinpad support for REINER SCT cyberJack go.
28234         + commit 73ba75ad8b933beddd2c3f4b66937b56faa0a2d8
28235         * scd/ccid-driver.h (VENDOR_REINER, CYBERJACK_GO): New.
28236         * scd/ccid-driver.c (ccid_transceive_secure): Handle the case for
28237         VENDOR_REINER. Original work was by Alina Friedrichsen (tiny change).
28238
28239 2014-06-27  Werner Koch  <wk@gnupg.org>
28240
28241         scd: Support reader Gemalto IDBridge CT30.
28242         + commit 24be0f24d3a9325a04de10ae0e5e277bf28a74fe
28243         * scd/ccid-driver.h (GEMPC_CT30): New product id.
28244         * scd/ccid-driver.c (parse_ccid_descriptor): Add quirk for that
28245         reader.
28246
28247 2014-06-26  Werner Koch  <wk@gnupg.org>
28248
28249         gpg: Limit keysize for unattended key generation to useful values.
28250         + commit 03f0b51fe454f8dbe77c302897f7a5899c4c5380
28251         * g10/keygen.c (gen_elg): Enforce keysize 1024 to 4096.
28252         (gen_rsa): Enforce keysize 1024 to 4096.
28253         (gen_dsa): Enforce keysize 768 to 3072.
28254
28255         Enable DNS SRV records again.
28256         + commit c0d1e7fca95629e1cddd7d129fa51b9a6556cb70
28257         * configure.ac (GPGKEYS_HKP, GPGKEYS_FINGER): Remove ac_subst.
28258         (use_dns_srv): Make test work.
28259
28260         agent: Fix export of RSA keys to OpenPGP.
28261         + commit 9a034acf8ab6f85c65ccc75a4fd7b8dd47b73e3a
28262         * agent/cvt-openpgp.c (convert_transfer_key): Fix sexp build format
28263         string.
28264
28265         gpg,gpgsm: Simplify wrong_args function.
28266         + commit 572502bd2c0637429bca547ba882629640477495
28267
28268
28269         speedo: "make clean-gnupg" may not remove the source.
28270         + commit c029a184d6a1a96c6de234835fff97d4e946b19c
28271         * build-aux/speedo.mk (clean-$(1)): Take care of gnupg.
28272
28273         gpgsm: Fix default config name.
28274         + commit 2480b0253166712a2f20b92f34c8e4c2db0fc26f
28275
28276
28277 2014-06-25  Werner Koch  <wk@gnupg.org>
28278
28279         doc: Improve the rendering of the manual.
28280         + commit b5f95c1b566f9530127f3f34e10d120a951cf428
28281
28282
28283         doc: Update for modern makeinfo.
28284         + commit f149e05427a370f5985bc3fb142370b043f19924
28285         * doc/texi.css: Remove.
28286         * doc/Makefile.am (AM_MAKEINFOFLAGS): Use --css-ref.
28287
28288         gpg: Allow key-to-card upload for cert-only keys.
28289         + commit f171fd226e84311f92545ca0494771db07ba777d
28290         * g10/card-util.c (card_store_subkey): Allo CERT usage for key 0.
28291
28292 2014-06-24  Werner Koch  <wk@gnupg.org>
28293
28294         doc: Add conditionals for GnuPG-1.
28295         + commit 2c8e00137a340d04f0836f75e138dd85f8c9eff7
28296
28297
28298 2014-06-20  Werner Koch  <wk@gnupg.org>
28299
28300         gpg: Make export of ECC keys work again.
28301         + commit f4fcaa29367daacfe0ca209fa83dfa8640ace276
28302         * agent/cvt-openpgp.c (convert_to_openpgp): Use the curve name instead
28303         of the curve parameters.
28304         * g10/export.c (canon_pubkey_algo): Rename to ...
28305         (canon_pk_algo): this.  Support ECC.
28306         (transfer_format_to_openpgp): Expect curve name.
28307
28308         gpg: Avoid infinite loop in uncompressing garbled packets.
28309         + commit d6ca407a27877174c10adfae9dc601bea996cf27
28310         * g10/compress.c (do_uncompress): Limit the number of extra FF bytes.
28311
28312 2014-06-17  Kristian Fiskerstrand  <kf@sumptuouscapital.com>
28313
28314         gpg: Fix a couple of spelling errors.
28315         + commit 3f17b74aa57ac1ea2f3aa93dec4889778a21afeb
28316
28317
28318 2014-06-17  Werner Koch  <wk@gnupg.org>
28319
28320         speedo: Support building from dist-source generated tarball.
28321         + commit 47e63dc00169030b6ff01ab67e73e52aec1395db
28322
28323
28324 2014-06-13  Werner Koch  <wk@gnupg.org>
28325
28326         http: Print human readable GNUTLS status.
28327         + commit 5bf04522e353675e4c3eda118fee2580756704a2
28328         * common/http.c (send_gnutls_bye): Take care of EAGAIN et al.
28329         (http_verify_server_credentials): Print a human readable status.
28330
28331 2014-06-12  Werner Koch  <wk@gnupg.org>
28332
28333         gpg: Improve the output of --list-packets.
28334         + commit d8314e31c58ea0827d0e2361dabcdf869ab08fce
28335         * g10/parse-packet.c (parse): Print packet meta info in list mode.
28336
28337 2014-06-11  Werner Koch  <wk@gnupg.org>
28338
28339         speedo: Improve building of the w32 installer.
28340         + commit 6eeb31abee82cb2016bf054cd302af64f6dfdc2e
28341         * build-aux/speedo.mk: Change name of build directory to PLAY.
28342         Improve the dist-source target.
28343         * build-aux/speedo/w32/gdk-pixbuf-loaders.cache: Add a blank
28344         line (plus comment).
28345         * build-aux/speedo/w32/inst.nsi: Change name of file to gnupg-w32-*.
28346         Install more tools.
28347
28348 2014-06-10  Werner Koch  <wk@gnupg.org>
28349
28350         speedo: Revamped speedo and include a w32 installer.
28351         + commit e06d5d1a3b4a5c446a27d64cd2da0e48ccec5601
28352         * build-aux/speedo/: New.
28353         * build-aux/speedo/w32/: New.
28354
28355         build: Add more options to autogen.sh.
28356         + commit 0399d87f7aaf2f2126a63899004c5c7bffd4346b
28357         * autogen.sh: Add options --print-host and --print-build.
28358
28359         w32: Fix build problem with dirmngr.
28360         + commit 141d69cb2a94a752244e89f49611923a2f184dfd
28361         * dirmngr/ks-engine-hkp.c (EAI_SYSTEM) [W32]: Add replacement
28362         constant.
28363
28364         gpg: Use more specific reason codes for INV_RECP.
28365         + commit 45ed901c466bd72118c2844069f566e190d847d6
28366         * g10/pkclist.c (find_and_check_key, build_pk_list): Use more specific
28367         reasons codes for INV_RECP.
28368
28369 2014-06-06  Werner Koch  <wk@gnupg.org>
28370
28371         Improve the beta number generation.
28372         + commit b67e4e523e6d19d384e23c5bb03010caebd150e7
28373         * autogen.sh: Add option --find-version
28374         * configure.ac: Rework the setting of the mym4_ variables.
28375
28376 2014-06-05  Werner Koch  <wk@gnupg.org>
28377
28378         Remove keyserver helper code.
28379         + commit 23712e69d3f97df9d789325f1a2f2f61e7d5bbb4
28380         * configure.ac: Remove keyserver helper related stuff.
28381         * Makefile.am (SUBDIRS): Remove keyserver.
28382         * keyserver/Makefile.am: Remove.
28383
28384         gpg: Require confirmation for --gen-key with experimental curves.
28385         + commit 9c9e26d41e7d65711da8dbf1afa452254749621c
28386         * g10/keygen.c (ask_curve): Add arg both.  Require confirmation for
28387         Curve25519.
28388
28389         gpg: Auto-migrate existing secring.gpg.
28390         + commit 4f0625889b768eabdec52696bf15059a9e8d9c02
28391         * g10/migrate.c: New.
28392         * g10/import.c (import_old_secring): New.
28393         (import_one): Add arg silent.
28394         (transfer_secret_keys): Add arg batch.
28395         (import_secret_one): Add args batch and for_migration.
28396         * g10/gpg.c (main): Call migration function.
28397
28398 2014-06-04  Werner Koch  <wk@gnupg.org>
28399
28400         gpgsm: Fix commit be07ed65.
28401         + commit 09a2d4ec74d352dcb4f006aab60b07bc4f5f1a37
28402         * sm/server.c (option_handler): Use "with-secret".
28403
28404 2014-06-03  Werner Koch  <wk@gnupg.org>
28405
28406         Add new option --with-secret.
28407         + commit be07ed65e169a7ec3fbecdb1abf988fc0245d9ff
28408         * g10/gpg.c: Add option --with-secret.
28409         * g10/options.h (struct opt): Add field with_secret.
28410         * g10/keylist.c (public_key_list): Pass opt.with_secret to list_all
28411         and list_one.
28412         (list_all, list_one): Add arg mark_secret.
28413         (list_keyblock_colon): Add arg has_secret.
28414         * sm/gpgsm.c: Add option --with-secret.
28415         * sm/server.c (option_handler): Add option "with-secret".
28416         * sm/gpgsm.h (server_control_s): Add field with_secret.
28417         * sm/keylist.c (list_cert_colon): Take care of with_secret.  Also move
28418         the token string from the wrong field 14 to 15.
28419
28420         gpgsm: New commands --export-secret-key-{p8,raw}
28421         + commit 0beec2f0f255a71f9d5a4a0729d0259f673e8838
28422         * sm/gpgsm.c: Add new commands.
28423         * sm/minip12.c (build_key_sequence): Add arg mode.
28424         (p12_raw_build): New.
28425         * sm/export.c (export_p12): Add arg rawmode.  Call p12_raw_build.
28426         (gpgsm_p12_export): Ditto.
28427         (print_short_info): Print the keygrip.
28428
28429 2014-06-02  Werner Koch  <wk@gnupg.org>
28430
28431         gpg: Avoid NULL-deref in default key listing.
28432         + commit 958e5f292fa3f8e127f54bc088c56780c564dcae
28433         * g10/keyid.c (hash_public_key): Take care of NULL keys.
28434         * g10/misc.c (pubkey_nbits): Ditto.
28435
28436         gpg: Simplify default key listing.
28437         + commit f3249b1c4d0f2e9e0e8956042677e47fc9c6f6c0
28438         * g10/mainproc.c (list_node): Rework.
28439
28440         gpg: Graceful skip reading of corrupt MPIs.
28441         + commit d9cde7ba7d4556b216f062d0cf92d60cbb204b00
28442         * g10/parse-packet.c (mpi_read): Change error message on overflow.
28443
28444         gpgsm: Handle re-issued CA certificates in a better way.
28445         + commit 715285bcbc12c024dbd9b633805189c09173e317
28446         * sm/certchain.c (find_up_search_by_keyid): Consider all matching
28447         certificates.
28448         (find_up): Add some debug messages.
28449
28450         gpgsm: Add a way to save a found state.
28451         + commit 42c043a8ad542c131917879c9b458f234b4bb645
28452         * kbx/keybox-defs.h (keybox_found_s): New.
28453         (keybox_handle): Factor FOUND out to above.  Add saved_found.
28454         * kbx/keybox-init.c (keybox_release): Release saved_found.
28455         (keybox_push_found_state, keybox_pop_found_state): New.
28456
28457         * sm/keydb.c (keydb_handle): Add field saved_found.
28458         (keydb_new): Init it.
28459         (keydb_push_found_state, keydb_pop_found_state): New.
28460
28461         gpg: Fix bug parsing a zero length user id.
28462         + commit 99972bd6e9abea71f270284f49997de5f00208af
28463         * g10/getkey.c (get_user_id): Do not call xmalloc with 0.
28464
28465         * common/xmalloc.c (xmalloc, xcalloc): Take extra precaution not to
28466         pass 0 to the arguments.
28467
28468 2014-05-19  Werner Koch  <wk@gnupg.org>
28469
28470         dirmngr: Print certificates on failed TLS verification.
28471         + commit 9e1c99f8009f056c39a7465b91912c136b248e8f
28472         * dirmngr/ks-engine-hkp.c (cert_log_cb): New.
28473         (send_request): Set callback.
28474
28475         http: Add callback to help logging of server certificates.
28476         + commit 45f15b2d767d4068f79fd5b123e9eeae08a0616d
28477         * common/http.c (http_session_s): Add field cert_log_cb.
28478         (http_session_set_log_cb): New.
28479         (http_verify_server_credentials): Call callback.
28480
28481 2014-05-16  Werner Koch  <wk@gnupg.org>
28482
28483         keyserver: Improve support for hkps pools.
28484         + commit d2d9d4fb60e3f2160af6252335364d3aac4b7d17
28485         * dirmngr/ks-engine-hkp.c (hostinfo_s): Add fields cname, v4addr, and
28486         v6addr.
28487         (create_new_hostinfo): Clear them.
28488         (my_getnameinfo): Add args numeric and r_isnumeric.
28489         (is_ip_address): New.
28490         (map_host): Add arg r_host.  Rewrite the code to handle pools in a
28491         special way.
28492         (ks_hkp_print_hosttable): Change format of help info output.
28493         (make_host_part): Add arg optional r_httphost.
28494         (send_request): Add arg httphost.
28495         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Get httphost and pass it to
28496         send_request.
28497
28498         http: Allow overriding of the Host header.
28499         + commit 8b90d79818355b81ce223e1cb96cd0c939096fe2
28500         * common/http.c (http_open): Add arg httphost.
28501         (http_open_document): Pass NULL for httphost.
28502         (send_request): Add arg httphost.  If given, use HTTPHOST instead of
28503         SERVER.  Use https with a proxy if requested.
28504         (http_verify_server_credentials): Do not stop at the first error
28505         message.
28506         * dirmngr/ocsp.c (do_ocsp_request): Adjust call to http_open.
28507         * keyserver/curl-shim.c (curl_easy_perform): Ditto.
28508         * dirmngr/ks-engine-http.c (ks_http_fetch): Ditto.
28509         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Ditto.
28510
28511 2014-05-14  Werner Koch  <wk@gnupg.org>
28512
28513         gpg: Fix uninitialized access to search descindex with gpg keyboxes.
28514         + commit 25036ec6abbc0c9d0003dcfe227724038c35a304
28515         * kbx/keybox-search.c (keybox_search): Add arg  R_DESCINDEX.  Chnage
28516         both callers.
28517         * g10/keydb.c (keydb_search): Always set DESCINDEX.
28518
28519         w32: Make make_absfilename work with drive letters.
28520         + commit 71fa6a35107d4d4547eb9155d7c2612b6a6a16fb
28521         * common/stringhelp.c (do_make_filename) [HAVE_DRIVE_LETTERS]: Fix.
28522
28523         gpg: Remove useless diagnostic in MDC verification.
28524         + commit 455a4a2212302c05095e736b127f647e95714fe7
28525         * g10/decrypt-data.c (decrypt_data): Do not distinguish between a bad
28526         MDC packer header and a bad MDC.
28527
28528         gpg: Fix glitch entering a full expiration time.
28529         + commit b2945c451d3d3f25ba11a9fe88c6cbf3f88c2fb5
28530         * g10/keygen.c (ask_expire_interval): Get the current time after the
28531         prompt.
28532
28533 2014-05-08  Werner Koch  <wk@gnupg.org>
28534
28535         agent: Fix import of non-protected gpg keys.
28536         + commit 4aeb02562c9db4b96366220b781e2b4fa2d6fd3b
28537         * agent/cvt-openpgp.c (do_unprotect): Return an s-exp also for
28538         non-protected keys.
28539         (convert_from_openpgp_main): Do not call agent_askpin for a
28540         non-protected key.
28541
28542         Make more use of *_NAME macros.
28543         + commit cb2aeb4e1157fc0d7dc25d94115973422dc1a800
28544         * configure.ac (GPG_DISP_NAME, GPGSM_DISP_NAME): New.
28545         (GPG_AGENT_DISP_NAME, SCDAEMON_DISP_NAME): New.
28546         (DIRMNGR_DISP_NAME, G13_DISP_NAME): New.
28547         (GPGCONF_DISP_NAME): New.
28548         (SCDAEMON_SOCK_NAME): New.
28549         * common/argparse.c (show_help): Map description string.
28550
28551 2014-05-08  NIIBE Yutaka  <gniibe@fsij.org>
28552
28553         agent: Fix auth key comment handling.
28554         + commit fb24808db9af9dfe36f9f6d7fc24e0b903ecc12c
28555         * agent/command-ssh.c (ssh_send_key_public): Handle the case with no
28556         comment.
28557
28558 2014-05-07  Werner Koch  <wk@gnupg.org>
28559
28560         Make -jN work again.
28561         + commit 57011da53e43f9c8a6c7e7314166c3e17ff8627a
28562         * common/Makefile.am ($(PROGRAMS)): New rule
28563         (t_http_LDADD): Use libcommontls.a without directory prefix.
28564         * dirmngr/Makefile.am ($(PROGRAMS)): New rule.
28565
28566         gpg: Print the key algorithm/curve with signature info.
28567         + commit 359c643d747c890f73f68b42e0aeb896016f05fd
28568         * g10/mainproc.c (check_sig_and_print): Print the name and curve.
28569
28570         gpg: Fix memleak in signature verification of bogus keys.
28571         + commit e73edfb1759d05121ea66f67c775e763bf47d737
28572         * g10/mainproc.c (check_sig_and_print): Factor common code out to ...
28573         (print_good_bad_signature): here.
28574
28575         gpg: Mark experimental algorithms in the key listing.
28576         + commit 09055aa0f7993aaf4dcffdd80d8192945ae6080a
28577         * g10/keylist.c (list_keyblock_print): Remove duplicate curve name.
28578         Print a note for experimental algorithms.
28579         * g10/misc.c (print_pubkey_algo_note): Fix warning message.
28580
28581         gpg: Finish experimental support for Ed25519.
28582         + commit 8fee6c1ce6d116fe7909dbe1184d95bc91305484
28583         * agent/cvt-openpgp.c (try_do_unprotect_arg_s): Add field "curve".
28584         (get_keygrip): Add and use arg CURVE.
28585         (convert_secret_key): Ditto.
28586         (convert_transfer_key): Ditto.
28587         (get_npkey_nskey): New.
28588         (prepare_unprotect): Replace gcrypt functions by
28589         get_npkey_nskey.  Allow opaque MPIs.
28590         (do_unprotect): Use CURVE instead of parameters.
28591         (convert_from_openpgp_main): Ditto.
28592         (convert_to_openpgp):  Simplify.
28593         * g10/import.c (one_mpi_from_pkey): Remove.
28594         (transfer_secret_keys): Rewrite to use the curve instead of the
28595         parameters.
28596         * g10/parse-packet.c (parse_key): Mark protected MPIs with USER1 flag.
28597
28598         * common/openpgp-oid.c (openpgp_curve_to_oid): Allow the use of
28599          "NIST P-256" et al.
28600         * g10/keygen.c (ask_curve): Add arg ALGO.
28601         (generate_keypair): Rewrite the ECC key logic.
28602
28603         * tests/openpgp/ecc.test: Provide the "ecc" passphrase.
28604
28605         kbx: Add experimental support for EDDSA.
28606         + commit bdb9c2b314400da9155b8a924e22e486793dda89
28607         * kbx/keybox-openpgp.c (parse_key): Use algo constants and add
28608         experimental support for EdDSA.
28609
28610         agent: Remove greeting message.
28611         + commit a63ed9875830e5b3b4d48b7d97d24c18de36b326
28612         * agent/gpg-agent.c (main): Remove greeting.  Make --no-greeting a
28613         dummy.
28614
28615 2014-05-06  Werner Koch  <wk@gnupg.org>
28616
28617         Use "samethread" mode keyword for some es_fopenmem.
28618         + commit 6477e51919ef97f0f9cc05d10cdc7aa2b89faafe
28619         * dirmngr/ks-engine-hkp.c (armor_data): Add mode keyword.
28620         * g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
28621         * scd/atr.c (atr_dump): Ditto.
28622
28623 2014-05-05  Werner Koch  <wk@gnupg.org>
28624
28625         dirmngr: Add support for hkps keyservers.
28626         + commit 60e2fc7d38d8b37d1de944cf230e410c2ce37d5e
28627         * dirmngr/dirmngr.c: Include gnutls.h.
28628         (opts): Add --gnutls-debug and --hkp-cacert.
28629         (opt_gnutls_debug, my_gnutls_log): New.
28630         (set_debug): Set gnutls log level.
28631         (parse_rereadable_options): Register a CA file.
28632         (main): Init GNUTLS.
28633         * dirmngr/ks-engine-hkp.c (ks_hkp_help): Support hkps.
28634         (send_request): Ditto.
28635
28636         http: Add reference counting to the session object.
28637         + commit ea0f5481f01eacedff264bf08144164aa989ec4d
28638         * common/http.c (http_session_t): Add field "refcount".
28639         (_my_socket_new, _my_socket_ref, _my_socket_unref): Add debug code.
28640         (send_request, my_npth_read, my_npth_write): Use SOCK object for the
28641         transport ptr.
28642         (http_session_release): Factor all code out to ...
28643         (session_unref): here.  Deref SOCK.
28644         (http_session_new): Init refcount and transport ptr.
28645         (http_session_ref): New.  Ref and unref all assignments.
28646
28647 2014-05-02  Werner Koch  <wk@gnupg.org>
28648
28649         http: Add HTTP_FLAG_FORCE_TLS and http_get_tls_info.
28650         + commit 0e59195642eb26263b8e0b9200290538631d35cd
28651         * common/http.c (http_parse_uri): Factor code out to ...
28652         (parse_uri): here.  Add arg FORCE_TLS.
28653         (do_parse_uri): Ditto.  Implement flag.
28654         (http_get_tls_info): New.
28655         (http_register_tls_ca): Allow clearing of the list.
28656         (send_request): Use a default verification function.
28657         * common/http.h (HTTP_FLAG_FORCE_TLS): New.
28658         * common/t-http.c (main): Add several command line options.
28659
28660         common: Fix test for openpgp_oid_is_ed25519.
28661         + commit 2def230231abd34f6012df284ab468321ffedc10
28662         * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): Add correct
28663         value.
28664
28665         http: Revamp TLS API.
28666         + commit 8412a5825c225c8ff14de3ffaad2e55e040b2eca
28667         * configure.ac (NEED_GNUTLS_VERSION): New.
28668         (HTTP_USE_GNUTLS, LIBGNUTLS_CFLAGS, LIBGNUTLS_LIBS): New ac_subst.
28669
28670         * common/http.h (http_session_t): New.
28671         * common/http.c: Remove compatibility for gnutls < 3.0.
28672         (http_session_s): New.
28673         (cookie_s): Replace gnutls_session_t by http_session_t.
28674         (tls_callback, tls_ca_certlist): New variables.
28675         (my_socket_unref): Add preclose args.
28676         (my_npth_read, my_npth_write): New.
28677         (make_header_line): Fix bug using int* instead of char*.
28678         (http_register_tls_callback): New.
28679         (http_register_tls_ca): New.
28680         (http_session_new): New.
28681         (http_session_release): New.
28682         (http_get_header_names): New.
28683         (escape_data): Add hack to escape in forms mode.
28684         (send_request) [HTTP_USE_GNUTLS]: Support SNI.
28685         (send_request) [HTTP_USE_GNUTLS]: Fix use of make_header_line.
28686         (send_gnutls_bye): New.
28687         (cookie_close): Make use of preclose feature.
28688         (http_verify_server_credentials): New.
28689         (main) [TEST]: Remove test code.
28690         * common/t-http.c: New.
28691         * common/tls-ca.pem: New.
28692         * common/Makefile.am (tls_sources): New. Move http code to here.
28693         (libcommontls_a_SOURCES): New.
28694         (libcommontlsnpth_a_SOURCES): New.
28695         (EXTRA_DIST): Add tls-ca.pem
28696         (module_maint_tests): Add t-http.
28697         (t_http_SOURCES, t_http_CFLAGS, t_http_LDADD): New.
28698
28699         * dirmngr/Makefile.am (dirmngr_LDADD): Add libcommontlsnpth.
28700
28701         common: Cleanup the use of USE_NPTH and HAVE_NPTH macros.
28702         + commit 84289e85c72ae58c321dfdb96816700a6b7f7122
28703         * configure.ac (HAVE_NPTH): New ac_define.
28704         * common/estream.c: Use USE_NPTH instead of HAVE_NPTH.
28705         * common/http.c: Ditto.  Replace remaining calls to pth by npth calls.
28706         (connect_server): Remove useless _().
28707         * common/exechelp-posix.c, common/exechelp-w32.c
28708         * common/exechelp-w32ce.c: Use HAVE_PTH to include npth.h.
28709         * common/init.c (_init_common_subsystems): Remove call to pth_init.
28710         * common/sysutils.c (gnupg_sleep): Use npth_sleep.
28711         * scd/ccid-driver.c (my_sleep): Ditto.
28712
28713 2014-04-30  Werner Koch  <wk@gnupg.org>
28714
28715         estream: Implement "samethread" mode keyword.
28716         + commit 8416c875a729426eae05ed1ca9f1ebcb933c246a
28717         * src/estream.c (estream_internal): Add field SAMETHREAD.
28718         (init_stream_lock, lock_stream, trylock_stream, unlock_stream): Use it.
28719         (parse_mode): Add arg SAMETHREAD and parse that keyword.
28720         (es_initialize): Rename to ...
28721         (init_stream_obj): this.  Add arg SAMETHREAD.
28722         (es_create): Add arg SAMETHREAD.  Call init_stream_lock after
28723         init_stream_obj.
28724         (doreadline): Call es_create with samethread flag.
28725         (es_fopen, es_mopen, es_fopenmem, es_fopencookie, do_fdopen)
28726         (do_fpopen, do_w32open): Implement "samethread" keyword.
28727         (es_freopen): Take samthread flag from old stream.
28728         (es_tmpfile): Call es)_create w/o samethread.
28729
28730         estream: Fix deadlock in es_fileno.
28731         + commit ecea94461ed40f3f6ef662c2501e1d56ec284022
28732         * src/estream.c (es_fileno_unlocked): Call the unlocked functions.
28733
28734         estream: Add debug code to the lock functions.
28735         + commit aeb81727c77dfea3bf5d2d689ffbdc897f2938a7
28736         * common/estream.c (dbg_lock_0, dbg_lock_1, dbg_lock_1): New.
28737
28738         estream: Replace locking macros by functions.
28739         + commit 39e91a5f0a666aad2fef7a840b2cd03949bb1be4
28740         * common/estream.c: Replace most macros.
28741
28742 2014-04-28  NIIBE Yutaka  <gniibe@fsij.org>
28743
28744         ECC Fixes.
28745         + commit 21dab64030c95a909767bf6d8f99e8476f9df8a2
28746         * agent/cvt-openpgp.c (get_keygrip, convert_secret_key)
28747         (convert_transfer_key): Follow newer (>= 1.6) libgcrypt API, which
28748         does not distinguish the detail.
28749         (do_unprotect, convert_from_openpgp_main): Don't call
28750         map_pk_openpgp_to_gcry, as it's the value of libgcrypt API already and
28751         not the value defined by OpenPGP.
28752         (convert_to_openpgp): It's "ecc".
28753         * agent/gpg-agent.c (map_pk_openpgp_to_gcry): Remove.
28754         * g10/call-agent.c (agent_pkdecrypt): Fix off-by-one error.
28755         * g10/pubkey-enc.c (get_it): Fix swapping the fields error.
28756
28757 2014-04-22  Werner Koch  <wk@gnupg.org>
28758
28759         gpg: Pass --homedir to gpg-agent.
28760         + commit fdd938a5bbecb5b70f564ae3afb4e17905404bb2
28761         * agent/gpg-agent.c (main): Make sure homedir is absolute.
28762         * common/asshelp.c (lock_spawning): Create lock file with an absolute
28763         name.
28764         (start_new_gpg_agent): Use an absolute name for the socket and pass
28765         option --homedir to the agent.
28766         (start_new_dirmngr): Use an absolute name for the --homedir.
28767
28768         common: Add functions make_absfilename and make_absfilename_try.
28769         + commit 71a54313adf7b57b7b27bb9ad07b142a34306260
28770         * common/stringhelp.c (do_make_filename): Add modes 2 and 3.
28771         (make_absfilename): New.
28772         (make_absfilename_try): New.
28773
28774         common: Add function gnupg_getcwd.
28775         + commit 1a87edab6657a257876ab2f8790f2937feba7066
28776         * tools/gpg-connect-agent.c (gnu_getcwd): Move to ...
28777         * common/sysutils.c (gnupg_getcwd): .. here.
28778         * tools/gpg-connect-agent.c (get_var_ext): Use gnupg_getcwd.
28779
28780         gpg: Print a warning if GKR has hijacked gpg-agent.
28781         + commit ffa39be5ebfc1059a737905ee317c9b6f3d2a77e
28782         * g10/call-agent.c (check_hijacking): New.
28783         (start_agent): Call it.
28784         (membuf_data_cb, default_inq_cb): Move more to the top.
28785
28786 2014-04-17  Werner Koch  <wk@gnupg.org>
28787
28788         gpg: New %U expando for the photo viewer.
28789         + commit e184a11f94e2d41cd9266484542631bec23628b5
28790         * g10/photoid.c (show_photos): Set namehash.
28791         * g10/misc.c (pct_expando): Add "%U" expando.
28792
28793         common: Add z-base-32 encoder.
28794         + commit b8a91ebf46a927801866e99bb5a66ab00651424e
28795         * common/zb32.c: New.
28796         * common/t-zb32.c: New.
28797         * common/Makefile.am (common_sources): Add zb82.c
28798         (module_tests): Add t-zb32.
28799
28800 2014-04-16  Werner Koch  <wk@gnupg.org>
28801
28802         Two minor code cleanups and one NULL deref on error fix.
28803         + commit a34afa8f2053d75f276d6d28dbf1a43db0fd9768
28804         * common/estream.c (es_freopen): Remove useless check for STREAM.
28805         * kbx/keybox-blob.c (_keybox_create_x509_blob): Remove useless check
28806         for BLOB.
28807         * tools/sockprox.c (run_proxy): Do not fclose(NULL).
28808
28809 2014-04-15  Werner Koch  <wk@gnupg.org>
28810
28811         gpg: Re-enable secret key deletion.
28812         + commit db3b528239c9d56bc71fd2283e07a3f1d91e4fd0
28813         * g10/call-agent.c (agent_delete_key): New.
28814         * g10/keydb.h (FORMAT_KEYDESC_DELKEY): New.
28815         * g10/passphrase.c (gpg_format_keydesc): Support new format.
28816         * g10/delkey.c (do_delete_key): Add secret key deletion.
28817
28818         gpg: Re-indent a file.
28819         + commit d25d00b89efed461d344028d0e2e2be38cc77628
28820         * g10/delkey.c: Re-indent.
28821         (do_delete_key, delete_keys): Change return type top gpg_error_t.
28822
28823         gpg: Fix regression in secret key export.
28824         + commit c4d983239a3f0a18c77f0a5aeba520a81a1b86e8
28825         * agent/cvt-openpgp.c (convert_to_openpgp): Fix use
28826         gcry_sexp_extract_param.
28827         * g10/export.c (do_export_stream): Provide a proper prompt to the
28828         agent.
28829
28830         gpg: Change pinentry prompt to talk about "secret key".
28831         + commit e549799db66be30cdd68a3e6cdca9c6a050466d1
28832         * g10/passphrase.c (gpg_format_keydesc): Add mode 2.  Change strings.
28833         * g10/keydb.h (FORMAT_KEYDESC_NORMAL, FORMAT_KEYDESC_IMPORT)
28834         (FORMAT_KEYDESC_EXPORT): New.  Use them for clarity.
28835
28836         agent: Add command DELETE_KEY.
28837         + commit e3a4ff89a0b106e678bf9d0a4d47917123071140
28838         * agent/command.c (cmd_delete_key): New.
28839         * agent/findkey.c (modify_description): Add '%C' feature.
28840         (remove_key_file): New.
28841         (agent_delete_key): New.
28842         * agent/command-ssh.c (search_control_file): Make arg R_DISABLE
28843         optional.
28844
28845         * configure.ac: Require libgpg-error 1.13.
28846
28847 2014-04-09  NIIBE Yutaka  <gniibe@fsij.org>
28848
28849         scd: EdDSA support.
28850         + commit 3132bd90dc8db9c7fd19ba201918e95891306dc5
28851         * scd/app-openpgp.c (KEY_TYPE_EDDSA, CURVE_ED25519): New.
28852         (struct app_local_s): Add eddsa.
28853         (get_algo_byte, store_fpr): Support KEY_TYPE_EDDSA.
28854         (get_ecc_key_parameters, get_curve_name): Support CURVE_ED25519.
28855         (send_key_attr, get_public_key): Support KEY_TYPE_EDDSA.
28856         (build_ecc_privkey_template): Rename as it supports both of
28857         ECDSA and EdDSA.
28858         (ecc_writekey): Rename.  Support CURVE_ED25519, too.
28859         (do_writekey): Follow the change of ecc_writekey.
28860         (do_auth): Support KEY_TYPE_EDDSA.
28861         (parse_ecc_curve): Support CURVE_ED25519.  Bug fix for other curves.
28862         (parse_algorithm_attribute): Bug fix for ECDH.  Support EdDSA.
28863
28864 2014-04-08  Werner Koch  <wk@gnupg.org>
28865
28866         dirmngr: Fix compiler warning.
28867         + commit db85feceaf43ebd6d44421bb14fcb60495804ae0
28868         * common/mischelp.h (JNLIB_GCC_HAVE_PUSH_PRAGMA): New.
28869         * dirmngr/dirmngr.c (handle_tick): Factor time check out to ...
28870         (time_for_housekeeping_p): new.
28871
28872         gpgconf: Add command --launch.
28873         + commit b4cf4686f7349be9558217f20e51157398cd88a0
28874         * tools/gpgconf.c: Add command --launch.
28875         * tools/gpgconf-comp.c (gc_component_launch): New.
28876
28877         scd: Silent compiler warnings about unused variables.
28878         + commit 36dfc37e438660632d3a2bf5d5526be9005fa8c5
28879         * scd/app-openpgp.c (build_ecdsa_privkey_template): Mark unused arg.
28880         (ecdh_writekey): Mark unused args.
28881
28882 2014-04-08  NIIBE Yutaka  <gniibe@fsij.org>
28883
28884         agent: Support EdDSA.
28885         + commit 5ff6d0c25e6d0f422b17809b954e9e87cb137347
28886         * agent/pksign.c (agent_pksign_do): Handle EdDSA signature.
28887
28888         g10: EdDSA support.
28889         + commit 40c3b0741e593d0658dda0c707c4f32e80648dd1
28890         * g10/keyid.c (keygrip_from_pk): Compute keygrip of EdDSA key.
28891         * g10/keygen.c (generate_subkeypair): Ed25519 is for EdDSA.
28892         * common/openpgp-oid.c (oid_ed25519): Update.
28893
28894 2014-04-04  NIIBE Yutaka  <gniibe@fsij.org>
28895
28896         agent: EdDSA support for SSH.
28897         + commit 513c67b7461a2451247ef2b2fc64e0470a16edf1
28898         * agent/command-ssh.c (ssh_signature_encoder_eddsa): Signature is
28899         two 32-byte opaque data which should not be interpreted as number.
28900
28901 2014-03-27  Werner Koch  <wk@gnupg.org>
28902
28903         gpg: Add commands --quick-sign-key and --quick-lsign-key.
28904         + commit b6786cc3ec0bb582323adf94c2ee624bcfbeb466
28905         * g10/gpg.c (main): Add commands --quick-sign-key and
28906         --quick-lsign-key.
28907         * g10/keyedit.c (sign_uids): Add args FP and QUICK.
28908         (keyedit_quick_sign): New.
28909         (show_key_with_all_names): Add arg NOWARN.
28910
28911         Change some keyedit functions to allow printing to arbitrary streams.
28912         + commit 4f50ec98ddd57253cae66e2321f0cc98ee189a09
28913         * common/ttyio.c (tty_print_string): Add optional arg FP. Change all
28914         callers.
28915         (tty_print_utf8_string2): Ditto.
28916         * g10/keyedit.c (show_prefs):  Ditto.
28917         (show_key_with_all_names_colon): Ditto.
28918         (show_names): Ditto.
28919         * g10/keylist.c (print_revokers): Ditto.
28920         (print_fingerprint): Ditto.
28921
28922 2014-03-23  Werner Koch  <wk@gnupg.org>
28923
28924         agent: Replace es_mopen by es_fopenmem for ssh.
28925         + commit 5c2a50cdc90e85b1fc380851ccfbe9186969b658
28926         * agent/command-ssh.c (ssh_read_key_public_from_blob): Use
28927         es_fopenmem.
28928         (ssh_handler_request_identities): Ditto.
28929         (ssh_request_process): Ditto.
28930
28931 2014-03-22  Werner Koch  <wk@gnupg.org>
28932
28933         agent: Put ssh key type as comment into sshcontrol.
28934         + commit fc3e70c11342267c1062e4244955d19ecd72e0f6
28935         * agent/command-ssh.c (ssh_key_type_spec): Add field name.
28936         (ssh_key_types): Add human readable names.
28937         (add_control_entry): Add arg SPEC and print key type as comment.
28938         (ssh_identity_register): Add arg SPEC.
28939         (ssh_handler_add_identity): Add var SPEC and pass ssh_receive_key.
28940
28941         agent: Support the Ed25519 signature algorithm for ssh.
28942         + commit 072432883ededa15bf35f80102e0572746ba4af1
28943         * agent/command-ssh.c (SPEC_FLAG_IS_EdDSA): New.
28944         (ssh_key_types): Add entry for ssh-ed25519.
28945         (ssh_identifier_from_curve_name): Move to the top.
28946         (stream_read_skip): New.
28947         (stream_read_blob): New.
28948         (ssh_signature_encoder_rsa): Replace MPIS array by an s-exp and move
28949         the s-exp parsing to here.
28950         (ssh_signature_encoder_dsa): Ditto.
28951         (ssh_signature_encoder_ecdsa): Ditto.
28952         (ssh_signature_encoder_eddsa): New.
28953         (sexp_key_construct): Rewrite.
28954         (ssh_key_extract): Rename to ...
28955         (ssh_key_to_blob): .. this and rewrite most of it.
28956         (ssh_receive_key): Add case for EdDSA.
28957         (ssh_convert_key_to_blob, key_secret_to_public): Remove.
28958         (ssh_send_key_public): Rewrite.
28959         (ssh_handler_request_identities): Simplify.
28960         (data_sign): Add rename args.  Add new args HASH and HASHLEN.  Make
28961         use of es_fopenmen and es_fclose_snatch.  Remove parsing into MPIs
28962         which is now doe in the sgnature encoder functions.
28963         (ssh_handler_sign_request): Take care of Ed25519.
28964         (ssh_key_extract_comment): Rewrite using gcry_sexp_nth_string.
28965
28966         agent: Cleanups to prepare implementation of Ed25519.
28967         + commit a77ed0f266d03e234027dda4de5a7f3dd6787b1e
28968         * agent/cvt-openpgp.c: Remove.
28969         (convert_to_openpgp): Use gcry_sexp_extract_param.
28970         * agent/findkey.c (is_eddsa): New.
28971         (agent_is_dsa_key, agent_is_eddsa_key): Check whether ecc means EdDSA.
28972         * agent/pksign.c (agent_pksign_do): Add args OVERRIDEDATA and
28973         OVERRIDEDATALEN.
28974
28975         * common/ssh-utils.c (is_eddsa): New.
28976         (get_fingerprint): Take care or EdDSA.
28977
28978 2014-03-18  Werner Koch  <wk@gnupg.org>
28979
28980         tools: Fix NULL deref in gpg-connect-agent.
28981         + commit 6376227a31b3076321ce16ad626b333057bda53d
28982         * tools/gpg-connect-agent.c (handle_inquire): Do not pass NULL to
28983         strlen.
28984
28985         dirmngr: Resurrect hosts in the HKP hosttable.
28986         + commit 6c058fac65c7e9d1ffb72686f0f02644f172da22
28987         * dirmngr/dirmngr.c (HOUSEKEEPING_INTERVAL): New.
28988         (housekeeping_thread): New.
28989         (handle_tick): Call new function.
28990         * dirmngr/ks-engine-hkp.c (RESURRECT_INTERVAL): New.
28991         (struct hostinfo_s): Add field died_at and set it along with the dead
28992         flag.
28993         (ks_hkp_print_hosttable): Print that info.
28994         (ks_hkp_housekeeping): New.
28995
28996         common: New function elapsed_time_string.
28997         + commit 04e304278c9302831bc81e7fe9049c588ead029a
28998         * common/gettime.c (elapsed_time_string): New.
28999
29000 2014-03-17  Werner Koch  <wk@gnupg.org>
29001
29002         gpg: Reject signatures made with MD5.
29003         + commit f90cfe6b66269de0154d810c5cee1fe9a5af475c
29004         * g10/gpg.c: Add option --allow-weak-digest-algos.
29005         (main): Set option also in PGP2 mode.
29006         * g10/options.h (struct opt): Add flags.allow_weak_digest_algos.
29007         * g10/sig-check.c (do_check): Reject MD5 signatures.
29008         * tests/openpgp/defs.inc: Add allow_weak_digest_algos to gpg.conf.
29009
29010         gpg: Make --auto-key-locate work again with keyservers.
29011         + commit 1e2e39c5758ffaf62f8bb85b4a86dc49c41f3a68
29012         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Allow exact search mode.
29013         * g10/keyserver.c (keyserver_import_name): Implement.
29014         (keyserver_get): Use exact mode for name based import.
29015         (keyserver_get): Add args R_FPR and R_FPRLEN.  Change all callers.
29016
29017         gpg: New mechanism "clear" for --auto-key-locate.
29018         + commit 1d642d3ca890daa65ee5dd949a00747da6b49015
29019         * g10/getkey.c (parse_auto_key_locate): Implement "clear".
29020
29021 2014-03-14  Werner Koch  <wk@gnupg.org>
29022
29023         gpg-connect-agent: Make it easier to connect to the dirmngr.
29024         + commit 2223eaefaf53aa7217ac593b83e4294148a4db5d
29025         * tools/gpg-connect-agent.c: Add options --dirmngr and
29026         --dirmngr-program.
29027
29028         dirmngr: Make use of IPv4 and IPV6 more explicit.
29029         + commit 59b4fb5f4927908af06bb80ecd86adbf6e54ba14
29030         * common/http.c (connect_server): Handle the new flags.
29031         * common/http.h (HTTP_FLAG_IGNORE_IPv4, HTTP_FLAG_IGNORE_IPv4): New.
29032         * dirmngr/ks-engine-hkp.c (map_host): Add arg r_httpflags.
29033         (make_host_part): Ditto.
29034         (send_request): Add arg httpflags.
29035         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Handle httpflags.
29036
29037         dirmngr: Do not use brackets around legacy IP addresses.
29038         + commit d7fbefeb82833db9eea8b15dc7889ecf0b7ffab4
29039         * dirmngr/ks-engine-hkp.c (my_getnameinfo): Change args to take a
29040         complete addrinfo.  Bracket only v6 addresses.  Change caller.
29041
29042         gpg: Print the actual used keyserver address.
29043         + commit a401f768ca8e218eef7a5c87a8f99cb1d6b4aaeb
29044         * dirmngr/ks-engine-hkp.c (ks_hkp_search, ks_hkp_get): Print SOURCE
29045         status lines.
29046         * g10/call-dirmngr.c (ks_status_parm_s): New.
29047         (ks_search_parm_s): Add field stparm.
29048         (ks_status_cb): New.
29049         (ks_search_data_cb): Send source to the data callback.
29050         (gpg_dirmngr_ks_search): Change callback prototope to include the
29051         SPECIAL arg.  Adjust all users.  Use ks_status_cb.
29052         (gpg_dirmngr_ks_get): Add arg r_source and use ks_status_cb.
29053         * g10/keyserver.c (search_line_handler): Adjust callback and print
29054         "data source" disgnostic.
29055         (keyserver_get): Print data source diagnostic.
29056
29057         dirmngr: Default to a user socket name and enable autostart.
29058         + commit 5d321eb00be0774418de1a05678ac0ec44d7193b
29059         * common/homedir.c (dirmngr_socket_name): Rename to
29060         dirmngr_sys_socket_name.
29061         (dirmngr_user_socket_name): New.
29062         * common/asshelp.c (start_new_dirmngr): Handle sys and user dirmngr
29063         socket.
29064         * dirmngr/dirmngr.c (main): Ditto.
29065         * dirmngr/server.c (cmd_getinfo): Ditto.
29066         * sm/server.c (gpgsm_server): Ditto.
29067         * dirmngr/dirmngr-client.c (start_dirmngr): Likewise.
29068         * tools/gpgconf.c (main): Print "dirmngr-sys-socket" with --list-dirs.
29069
29070         * configure.ac (USE_DIRMNGR_AUTO_START): Set by default.
29071
29072 2014-03-12  Werner Koch  <wk@gnupg.org>
29073
29074         gpg: Add option --dirmngr-program.
29075         + commit 6dd5d99a61f24aff862ccba9f7410d7f1af87c05
29076         * g10/gpg.c: Add option --dirmngr-program.
29077         * g10/options.h (struct opt): Add field dirmngr_program.
29078         * g10/call-dirmngr.c (create_context): Use new var.
29079
29080         * dirmngr/dirmngr.c: Include gc-opt-flags.h.
29081         (main): Remove GC_OPT_FLAG_*.
29082         * tools/gpgconf-comp.c (GC_OPT_FLAG_NO_CHANGE): Move macro to ...
29083         * common/gc-opt-flags.h: here.
29084
29085         dirmngr: Detect dead keyservers and try another one.
29086         + commit fb56a273b1f2b3a99dc1d1a0850378ab7625e6b9
29087         * dirmngr/ks-action.c (ks_action_resolve): Rename var for clarity.
29088         (ks_action_search, ks_action_put): Ditto.
29089         (ks_action_get): Consult only the first server which retruned some
29090         data.
29091
29092         * dirmngr/ks-engine-hkp.c (SEND_REQUEST_RETRIES): New.
29093         (map_host): Add arg CTRL and call dirmngr_tick.
29094         (make_host_part): Add arg CTRL.
29095         (mark_host_dead): Allow the use of an URL.
29096         (handle_send_request_error): New.
29097         (ks_hkp_search, ks_hkp_get, ks_hkp_put): Mark host dead and retry on
29098         error.
29099
29100         http: Add a flag to the URL parser indicating a literal v6 address.
29101         + commit 3d9e0eb02ce2b2e153e25deb0fc4b27b45f5026a
29102         * common/http.h (struct parsed_uri_t): Add field v6lit.
29103         * common/http.c (do_parse_uri): Set v6lit.
29104
29105 2014-03-12  NIIBE Yutaka  <gniibe@fsij.org>
29106
29107         scd: writekey support of ECC.
29108         + commit 781b94174310dceffa075719420b74b29fe41764
29109         * scd/app-openpgp.c (CURVE_SEC_P256K1, get_algo_byte): New.
29110         (store_fpr): Support ECC keys with varargs.
29111         (get_ecc_key_parameters, get_curve_name): Support secp256k1.
29112         (parse_ecc_curve): Likewise.
29113         (build_ecdsa_privkey_template, rsa_writekey, ecdsa_writekey): New.
29114         (ecdh_writekey): New.  Not implemented yet.
29115         (do_writekey): Call rsa_writekey, ecdsa_writekey, or ecdh_writekey.
29116         (do_genkey): Follow the change of store_fpr.
29117
29118 2014-03-11  Werner Koch  <wk@gnupg.org>
29119
29120         dirmngr: Put brackets around IP addresses in the hosttable.
29121         + commit 0b2cca807d5a4a3664145032271141da853e7bac
29122         * dirmngr/ks-engine-hkp.c (EAI_OVERFLOW): Provide a substitute.
29123         (my_getnameinfo): New.
29124         (map_host): Use it.
29125
29126         dirmngr: Add command option to mark hosts as dead or alive.
29127         + commit a3dee2889106fcab112c1c96b32e04d8154875e7
29128         * dirmngr/server.c (cmd_killdirmngr): Factor some code out to ...
29129         (check_owner_permission): here.
29130         (cmd_keyserver): Add options --dead and --alive.
29131         * dirmngr/ks-engine-hkp.c (host_in_pool_p): New.
29132         (ks_hkp_mark_host): New.
29133
29134         dirmngr: Make Assuan output of keyblocks easier readable.
29135         + commit 71b55c945542e695161ddbd783f87c5f534012a5
29136         * dirmngr/server.c (data_line_cookie_write): Print shorter data lines
29137         in verbose mode.
29138
29139         dirmngr: Fix HKP host selection code.
29140         + commit 3c35b46a32ac7584f3807b611cde78b199c527d6
29141         * dirmngr/server.c (cmd_keyserver): Add option --resolve and change
29142         --print-hosttable to --hosttable.
29143         * dirmngr/ks-action.c (ks_printf_help): New.
29144         (ks_action_resolve): New.
29145         * dirmngr/ks-engine-hkp.c (select_random_host): Fix selection.
29146         (ks_hkp_print_hosttable): Print to assuan stream.
29147         (map_host): Remove debug code.  Add arg FORCE_SELECT.  Return numeric
29148         IP addr if it can't be resolved.
29149         (make_host_part): Add arg FORCE_SELECT; change callers to pass false.
29150         (ks_hkp_resolve): New.
29151
29152         List readline support in configure summary.
29153         + commit f30d8b018871495327cbf711b73b04278a34f3e1
29154         * m4/readline.m4: Set gnupg_cv_have_readline.
29155         * configure.ac: Add readline support to summary output.
29156
29157 2014-03-11  NIIBE Yutaka  <gniibe@fsij.org>
29158
29159         agent: API change of agent_key_from_file.
29160         + commit ac5a1a3ccb7c3e6393bc83d73b545dec9b70e7d1
29161         * agent/findkey.c (agent_key_from_file): Always return S-expression.
29162         * agent/command.c (cmd_passwd): Distinguish by SHADOW_INFO.
29163         (cmd_export_key): Likewise.  Free SHADOW_INFO.
29164         (cmd_keytocard): Likewise.  Release S_SKEY.
29165         * agent/pkdecrypt.c (agent_pkdecrypt): Likewise.
29166         * agent/pksign.c (agent_pksign_do): Likewise.  Use the S-expression to
29167         know the key type.
29168
29169 2014-03-10  Werner Koch  <wk@gnupg.org>
29170
29171         Backport useful code from fixes for bug 1447.
29172         + commit 57d26f39afb3c75e24a8d240d7af32b9d2b9775a
29173         * configure.ac: Cehck for inet_ntop.
29174         * m4/libcurl.m4: Provide a #define for the version of the curl
29175         library.
29176
29177         scd: acquire lock in new_reader_slot.
29178         + commit 9ab9f414fb919f0bc87c301c3e36180715d0aa4e
29179         * scd/apdu.c (new_reader_slot): Acquire lock.
29180         (open_ct_reader, open_pcsc_reader_direct, open_pcsc_reader_wrapped)
29181         (open_ccid_reader, open_rapdu_reader): Release lock.
29182         (lock_slot, trylock_slot, unlock_slot): Move more to the top.
29183
29184         Do not require libiconv for Android.
29185         + commit b278043a8f38e2706ccf617d2ac5661b33791d6b
29186         * configure.ac (require_iconv): New.  Set to false for android.
29187         (AM_ICONV): Run only if required.
29188
29189 2014-03-07  Werner Koch  <wk@gnupg.org>
29190
29191         dirmmgr: Use a portability wrapper for struct timeval.
29192         + commit feda379595e06583bc5b3610dec74890de29cb8e
29193         * dirmngr/dirmngr_ldap.c [W32]: Include winber.h.
29194         (my_ldap_timeval_t): New.
29195
29196         Silence more warnings about unused vars and args.
29197         + commit 4387ecb11cdb2addf738eb922c1b9f14c6c76efc
29198         * dirmngr/cdblib.c (cdb_init) [W32]: Remove unused var.
29199         * dirmngr/dirmngr-client.c (start_dirmngr): s/int/assuan_fd_t/.
29200         * dirmngr/dirmngr.c (w32_service_control): Mark unused args.
29201         (call_real_main): New.
29202         (main) [W32]: Use new function to match prototype.
29203         (real_main) [W32]: Mark unused vars.
29204         (handle_signal) [W32]: Do not build the function at all.
29205         (handle_connections) [W32]: Do not define signo.
29206         * dirmngr/ldap-wrapper-ce.c (outstream_reader_cb): Remove used vars.
29207         * g10/tdbio.c (ftruncate) [DOSISH]: Define only if not yet defined.
29208
29209         dirmngr: Simplify strtok macro.
29210         + commit 35266076e3452590931e58f188815859dff6de3c
29211         * dirmngr/ldap-url.c (ldap_utf8_strtok): Remove unused r3d arg.
29212         (ldap_str2charray): Remove lasts.
29213
29214         Use attribute __gnu_printf__ also in estream header files.
29215         + commit 72133b54de89e593d8193b106e9369cf90d2e1c0
29216         * common/estream-printf.h: Use attribute gnu_printf.
29217         * common/estream.h: Ditto.
29218
29219         Use attribute __gnu_printf__ with our estream-printf functions.
29220         + commit 36372dcb2f75a659b7ace0e9c46f07bb431d009c
29221         * common/mischelp.h (JNLIB_GCC_A_PRINTF): Use __gnu_printf__
29222         (JNLIB_GCC_A_NR_PRINTF): Ditto.
29223
29224         w32: Silence warnings about unused vars.
29225         + commit 094aa2589e3920d400be93ae2823a6c4b23db623
29226         * agent/gpg-agent.c (main) [W32]: Mark unused vars.
29227         * sm/gpgsm.c (run_protect_tool) [W32]: Ditto.
29228         * g10/trustdb.c (check_regexp) [DISABLE_REGEX]: Ditto.
29229         * scd/scdaemon.c (main) [W32]: Ditto.
29230         (handle_connections) [W32]: Ditto.
29231         (handle_signal) [W32]: Do not build the function at all.
29232         * scd/apdu.c (pcsc_send_apdu_direct): Ditto.
29233         (connect_pcsc_card): s/long/pcsc_dword_t/.
29234         (open_pcsc_reader_direct): Remove var listlen.
29235
29236         w32: Fix a potential problem in gpgconf's gettext.
29237         + commit a0fc42598f51ef4a958fc3c2fed7f4b8df2da3fd
29238         * tools/gpgconf-comp.c (my_dgettext) [USE_SIMPLE_GETTEXT]: Make sure
29239         to return something even DOMAIN is not given.
29240
29241         Silence several warnings when building under Windows.
29242         + commit 3032fc3ad78ac9ed857570844547afed520d635a
29243         * agent/call-scd.c (start_scd): Replace int by assuan_fd_t.
29244         (start_pinentry): Ditto.
29245         * common/asshelp.c (start_new_gpg_agent): Replace int by assuan_fd_t.
29246         * common/dotlock.c (GNUPG_MAJOR_VERSION): Include stringhelp.h for
29247         prototypes on Windows and some other platforms.
29248         * common/logging.c (fun_writer): Declare addrbuf only if needed.
29249         * g10/decrypt.c (decrypt_message_fd) [W32]: Return not_implemented.
29250         * g10/encrypt.c (encrypt_crypt) [W32]: Return error if used in server
29251         mode.
29252         * g10/dearmor.c (dearmor_file, enarmor_file): Replace GNUPG_INVALID_FD
29253         by -1 as temporary hack for Windows.
29254         * g10/export.c (do_export): Ditto.
29255         * g10/revoke.c (gen_desig_revoke, gen_revoke): Ditto.
29256         * g10/sign.c (sign_file, clearsign_file, sign_symencrypt_file): Ditto.
29257         * g10/server.c (cmd_verify, gpg_server) [W32]: Return an error.
29258
29259         w32: Include winsock2.h to silence warnings.
29260         + commit cb0dcc340836a64e2d33b27f1be7bc888c084f12
29261
29262
29263         gl: Avoid warning about shadowing an arg.
29264         + commit 84fd36f8baa2b800ea47ff74935f5aaf0e55c299
29265         * gl/setenv.c (KNOWN_VALUE): s/value/_v/.
29266
29267         common: Fix build problem with Sun Studio compiler.
29268         + commit 0fc71f7277c6f833f838bbd384f1a22d0c333e8e
29269         * common/estream.c (ESTREAM_MUTEX_UNLOCK): Use int dummy dummy
29270         functions.
29271         (ESTREAM_MUTEX_INITIALIZE): Ditto.
29272
29273         gpg: Do not require a trustdb with --always-trust.
29274         + commit d8f0b83e4f04641e5e9adbdd8abada15380f981c
29275         * g10/tdbio.c (tdbio_set_dbname): Add arg R_NOFILE.
29276         * g10/trustdb.c (trustdb_args): Add field no_trustdb.
29277         (init_trustdb): Set that field.
29278         (revalidation_mark):  Take care of a nonexistent trustdb file.
29279         (read_trust_options): Ditto.
29280         (tdb_get_ownertrust): Ditto.
29281         (tdb_get_min_ownertrust): Ditto.
29282         (tdb_update_ownertrust): Ditto.
29283         (update_min_ownertrust): Ditto.
29284         (tdb_clear_ownertrusts): Ditto.
29285         (tdb_cache_disabled_value): Ditto.
29286         (tdb_check_trustdb_stale): Ditto.
29287         (tdb_get_validity_core): Ditto.
29288         * g10/gpg.c (main): Do not create a trustdb with most commands for
29289         trust-model always.
29290
29291         gpg: Print a "not found" message for an unknown key in --key-edit.
29292         + commit dfb25d47a9fcfd7c7c084ea58744724cd5315086
29293         * g10/keyedit.c (keyedit_menu): Print message.
29294
29295         gpg: Protect against rogue keyservers sending secret keys.
29296         + commit db1f74ba5338f624f146a3cb41a346e46b15c8f9
29297         * g10/options.h (IMPORT_NO_SECKEY): New.
29298         * g10/keyserver.c (keyserver_spawn, keyserver_import_cert): Set new
29299         flag.
29300         * g10/import.c (import_secret_one): Deny import if flag is set.
29301
29302         agent: Fix UPDATESTARTUPTTY for ssh.
29303         + commit 90688b29f3701f4d3e2a5a49c5544fe8d2a84b2d
29304         * agent/command-ssh.c (setup_ssh_env): Fix env setting.
29305
29306         gpgv: Init Libgcrypt to avoid syslog warning.
29307         + commit 7c4bfa599fa69c3a942c8deea83737a4c5a0806e
29308         * g10/gpgv.c (main): Check libgcrypt version and disable secure
29309         memory.
29310
29311         Improve libcurl detection.
29312         + commit 5ca482d5f949444ffd453de158ee186ab07fc9b6
29313         * m4/libcurl.m4: Do not use AC_PATH_PROG if --with-libcurl as been
29314         given.  Suggested by John Marshall.
29315
29316         gpg: Remove legacy keyserver examples from the template conf file.
29317         + commit 0ab752cc2d46bbd0077bed889676169b7aeb1eb6
29318         * g10/options.skel: Update.
29319
29320         (cherry picked from commit f3c5cc8bcd37e38b5d65db6a50466e22d03d1f0c)
29321
29322         w32: Define WINVER only if needed.
29323         + commit 76b1940ad6f5f058c4a6bec35902da9f6d4e27b0
29324         * common/sysutils.c (WINVER): Define only if less that 5.0.
29325
29326         w32: Remove unused code.
29327         + commit 63b7658a29809249d7aeb0423bf8c5a693eee0c7
29328         * jnlib/w32-reg.c (write_w32_registry_string): Remove.
29329
29330         agent: Make --allow-mark-trusted the default.
29331         + commit 9942a149ff2ab919c1b2916c7bc347e578a56b14
29332         * agent/gpg-agent.c (opts, main): Add option --no-allow-mark-trusted.
29333         Put this option into the gpgconf-list.
29334         (main): Enable opt.allow_mark_trusted by default.
29335         * tools/gpgconf-comp.c (gc_options_gpg_agent): Replace
29336         allow-mark-trusted by no-allow-mark-trusted.
29337
29338         * agent/trustlist.c (agent_marktrusted): Always set the "relax" flag.
29339
29340         ssh: Add support for Putty.
29341         + commit 5105c8d2d344fd7301d456d8c13c7e90a54f7e98
29342         * agent/gpg-agent.c [W32]: Include Several Windows header.
29343         (opts): Change help text for enable-ssh-support.
29344         (opts, main): Add option --enable-putty-support
29345         (putty_support, PUTTY_IPC_MAGIC, PUTTY_IPC_MAXLEN): New for W32.
29346         (agent_init_default_ctrl): Add and asssert call.
29347         (putty_message_proc, putty_message_thread): New.
29348         (handle_connections) [W32]: Start putty message thread.
29349         * common/sysutils.c (w32_get_user_sid): New for W32 only
29350         * tools/gpgconf-comp.c (gc_options_gpg_agent): Add
29351         --enable-ssh-support and --enable-putty-support.  Make the
29352         configuration group visible at basic level.
29353         * agent/command-ssh.c (serve_mmapped_ssh_request): New for W32 only.
29354
29355         agent: Fix binary vs. text mode problem in ssh.
29356         + commit 179012ddd48e63ca83e8f5c24537a2db45c3e122
29357         * agent/command-ssh.c (file_to_buffer)
29358         (ssh_handler_request_identities): Open streams in binary mode.
29359         (start_command_handler_ssh): Factor some code out to ..
29360         (setup_ssh_env): new function.
29361
29362         Fix syntax error for building on APPLE.
29363         + commit 4ad123d6fe341da7768e43360375e17fa89e8e0d
29364         * scd/pcsc-wrapper.c [__APPLE__]: Fix syntax error.
29365
29366         Ignore obsolete option --disable-keypad.
29367         + commit d2a6be24af0bf220bb448fdd50c0196faddee0f4
29368         * scd/scdaemon.c (opts): Ignore --disable-keypad.
29369
29370         Allow marking options as ignored.
29371         + commit 8fc9de8d6bf663f7c8419b42dab01f590a694d59
29372         * jnlib/argparse.h (ARGPARSE_OPT_IGNORE): New.
29373         (ARGPARSE_TYPE_MASK): New, for internal use.
29374         (ARGPARSE_ignore): New.
29375         * jnlib/argparse.c (optfile_parse, arg_parse): Replace remaining
29376         constants by macros.
29377         (optfile_parse): Implement ARGPARSE_OPT_IGNORE.
29378         (arg_parse): Exclide ignore options from --dump-options.
29379
29380 2014-03-06  Werner Koch  <wk@gnupg.org>
29381
29382         common: Fix recent commit 55656208.
29383         + commit 191e32026f02054b1edb4f02536875462fd0b6b3
29384         * common/membuf.c (get_membuf_shrink): Fix use of LEN.
29385
29386 2014-03-06  NIIBE Yutaka  <gniibe@fsij.org>
29387
29388         Fix g10/trust.c.
29389         + commit 5ed8e9335fb886d7ddc86728d8481e5e47485531
29390         * g10/trust.c (register_trusted_keyid, register_trusted_key)
29391         (update_ownertrust): Call functions with tdb_.
29392
29393 2014-02-26  Werner Koch  <wk@gnupg.org>
29394
29395         common: Replace all macros in strusage() returned strings.
29396         + commit 0f38c87f427a155ab5684e18e3b73956f81edfab
29397         * common/argparse.c (writechar): Remove.
29398         (writestrings): Simplify.
29399         (strusage): Use map_static_macro_string.
29400
29401         common: New function map_static_macro_string.
29402         + commit c72762f9acf3eef5c466ba76e895d7654df12ff7
29403         * common/mapstrings.c: New.
29404         * common/t-mapstrings.c: New.
29405         * common/t-support.h (DIM, DIMof): Define if not defined.
29406         * common/Makefile.am: Add new files.
29407
29408         common: New function get_membuf_shrink.
29409         + commit 556562086acd2bc2f8e3aa3126ebf155715e042b
29410         * common/membuf.c (get_membuf_shrink): New.
29411
29412         agent: Fixed unresolved symbol under Windows.
29413         + commit 55c3e5f448c26360eda31e05b1f62249119f73d9
29414         * agent/gpg-agent.c (main): s/ttyname/gnupg_ttyname/.
29415
29416         common: Require an installed libiconv.
29417         + commit 380a2aa18e0c048cfefa1cb4102dfbf902a1962b
29418         * common/utf8conv.c: Remove dynload.h.
29419         (load_libiconv): Remove.  Remove all calls to it.
29420
29421 2014-02-10  Werner Koch  <wk@gnupg.org>
29422
29423         gpg: Silent more compiler warnings due to some configure options.
29424         + commit 47e6b6bad1dff493f4102a5549a7bb54466684c2
29425         * g10/keygen.c (generate_keypair, gen_card_key)
29426         (gen_card_key_with_backup) [!ENABLE_CARD_SUPPORT]: Mark unused args.
29427
29428         tests: Avoid segv if dns cert lookup is not configured.
29429         + commit 672f4aeba8bf55839911e1fe805af6b2873853f7
29430         * common/dns-cert.c (get_dns_cert) [!USE_DNS_CERT]: Reset return args.
29431
29432         gpg: Cleanup compiler warnings due to some configure options.
29433         + commit 7901c5c2a3b7b24e9a4eaab590b0a54e9695c3e4
29434         * g10/photoid.c (show_photos) [DISABLE_PHOTO_VIEWER]: Mark args as
29435         unused.
29436         * tools/gpgconf-comp.c (my_dgettext): Mark DOMAIN as unused if NLS is
29437         not configured.
29438
29439         gpg: Allow building without any trust model support.
29440         + commit 62fb86c6589f7f74dad4741db31b3aefa0848420
29441         * configure.ac: Add option --disable-trust-models
29442         (NO_TRUST_MODELS): New ac_define and am_conditional.
29443         * g10/Makefile.am (trust_source): New.
29444         (gpg2_SOURCES): Factor some files out to above.  Add trust.c.
29445         * g10/gpg.c [NO_TRUST_MODELS]: Disable options --export-ownertrust,
29446         --import-ownertrust, --update-trustdb, --check-trustdb, --fix-trustdb,
29447         --list-trustdb, --trustdb-name, --auto-check-trustdb,
29448         --no-auto-check-trustdb, and --force-ownertrust.
29449         (parse_trust_model) [NO_TRUST_MODELS]: Do not build.
29450         (main) [NO_TRUST_MODELS]: Set trust_model to always and exclude all
29451         trustdb related option code.
29452         * g10/keyedit.c (cmds) [NO_TRUST_MODELS]: Remove menu items "trust",
29453         "enable", and "disable".
29454         * g10/keylist.c (public_key_list) [NO_TRUST_MODELS]: Do not print
29455         "tru" record.
29456
29457         * g10/trust.c: New.
29458         * g10/trustdb.c (struct key_item): Move to trustdb.h.
29459         (register_trusted_keyid): Rename to tdb_register_trusted_keyid.
29460         (register_trusted_key): Rename to tdb_register_trusted_key.
29461         (trust_letter, uid_trust_string_fixed, trust_value_to_string)
29462         (string_to_trust_value, get_ownertrust_with_min, get_ownertrust_info)
29463         (get_ownertrust_string, get_validity_info, get_validity_string)
29464         (clean_sigs_from_uid, clean_uid_from_key, clean_key): Move to trust.c.
29465         (mark_usable_uid_certs): Move to trust.c and make global.
29466         (is_in_klist): Move as inline to trustdb.h.
29467         (trustdb_check_or_update): Rename to tdb_check_or_update
29468         (revalidation_mark): Rename to tdb_revalidation_mark.
29469         (get_ownertrust): Rename to tdb_get_ownertrust.
29470         (get_min_ownertrust): Rename to tdb_get_min_ownertrust.
29471         (update_ownertrust): Rename to tdb_update_ownertrust.
29472         (clear_ownertrusts): Rename to tdb_clear_ownertrusts.
29473         (cache_disabled_value): Rename to tdb_cache_disabled_value.
29474         (check_trustdb_stale): Rename to tdb_check_trustdb_stale.
29475         (get_validity): Rename to tdb_get_validity_core, add arg MAIN_PK and
29476         factor some code out to ...
29477         * trust.c (get_validity): ...new.
29478         (check_or_update_trustdb): New wrapper.
29479         (revalidation_mark): New wrapper.
29480         (get_ownertrust): New wrapper.
29481         (get_ownertrust_with_min): New wrapper.
29482         (update_ownertrust): New wrapper.
29483         (clear_ownertrusts): New wrapper.
29484         (cache_disabled_value): New wrapper.
29485         (check_trustdb_stale): New wrapper.
29486
29487         * tests/openpgp/defs.inc (opt_always): New.  Use in all tests instead
29488         of --always-trust.
29489
29490         tests: Handle disabled algorithms.
29491         + commit ea7f895319e89150e5613b6d20f21410f99d6f22
29492         * tests/openpgp/mds.test: Skip disabled algorithms.
29493         * tests/openpgp/signencrypt-dsa.test: Ditto.
29494         * tests/openpgp/sigs-dsa.test: Ditto.
29495
29496 2014-02-07  Werner Koch  <wk@gnupg.org>
29497
29498         Silence annoying ABI change warning.
29499         + commit 111f082487dc7a2a50375e24203de31b000e0dea
29500         * configure.ac [GCC]: Pass -Wno-psabi for gcc >= 4.6.  Avoid some gcc
29501         option tests for gcc >= 4.6
29502
29503         Allow disabling of card support.
29504         + commit 8e0ba4ecd3897c748ac2f06028406604ae7baced
29505         * configure.ac: Add option --disable-card-support.  Also add
29506         am_conditional and do not build scd if card support is enabled.
29507
29508         gpg: List only available algos in --gen-key.
29509         + commit 357b142e7225e5c7f1e0f9768f48e833d5804b6a
29510         * g10/keygen.c (ask_algo, ask_curve): Take care of GPG_USE_<algo>.
29511
29512         gpg: Change --print-mds to output enabled OpenPGP algos.
29513         + commit 54a11729fb71ba06e318fe229d0a230686ed4dc8
29514         * g10/gpg.c (print_mds): Use opengpg_md_test_algo.  Test also for MD5
29515         availibility.
29516
29517         gpg: Avoid compiler warnings for disabled algos.
29518         + commit aa76a1660613ece3fc0d774856abcbe0bb158300
29519         * g10/misc.c (map_cipher_openpgp_to_gcry): Add case for disabled algo.
29520         (openpgp_pk_test_algo2): Ditto.
29521         (map_md_openpgp_to_gcry): Ditto.
29522
29523 2014-02-05  Werner Koch  <wk@gnupg.org>
29524
29525         gpg: Change format for the key size in --list-key and --edit-key.
29526         + commit 2c814806d759e5cf611200e8210137cf8502a672
29527         * g10/gpg.c (oLegacyListMode, opts, main): Add --legacy-list-mode.
29528         * g10/options.h (struct opt): Add field legacy_list_mode.
29529         * g10/keydb.h (PUBKEY_STRING_SIZE): New.
29530         * g10/keyid.c (pubkey_string): New.
29531         * g10/import.c (import_one, import_secret_one): Use pubkey_string.
29532         * g10/keylist.c (print_seckey_info): Ditto.
29533         (print_pubkey_info, print_card_key_info): Ditto.
29534         (list_keyblock_print): Ditto.
29535         * g10/mainproc.c (list_node): Ditto.
29536         * g10/pkclist.c (do_edit_ownertrust, build_pk_list): Ditto.
29537         * g10/keyedit.c (show_key_with_all_names): Ditto.  Also change the
29538         format.
29539         (show_basic_key_info): Ditto.
29540         * common/openpgp-oid.c (openpgp_curve_to_oid): Also allow "ed25519".
29541         (openpgp_oid_to_curve): Downcase "ed25519"
29542
29543 2014-01-31  Werner Koch  <wk@gnupg.org>
29544
29545         gpg: Add configure options to disable algorithms.
29546         + commit 2ba818de1aa311ba8eb27012d69e93dd16e7d4ed
29547         * acinclude.m4 (GNUPG_GPG_DISABLE_ALGO): New.
29548         * configure.ac: Add --enable-gpg-* options to disable non MUS
29549         algorithms.
29550         * g10/misc.c (map_cipher_openpgp_to_gcry): Implement these options.
29551         (openpgp_pk_test_algo2): Ditto.
29552         (map_md_openpgp_to_gcry): Ditto.
29553         (openpgp_cipher_test_algo, openpgp_md_test_algo): Simplify.
29554
29555         gpg: Improve --version algo info output.
29556         + commit 71540d40414dc8b304b45dc476e5e5650a2db20a
29557         * g10/misc.c (openpgp_pk_algo_name): Return a different string for
29558         each ECC algorithm.
29559         * g10/gpg.c (build_list_pk_test_algo): New wrapper to cope with the
29560         different algo type enums.
29561         (build_list_pk_algo_name): Ditto.
29562         (build_list_cipher_test_algo): Ditto.
29563         (build_list_cipher_algo_name): Ditto.
29564         (build_list_md_test_algo): Ditto.
29565         (build_list_md_algo_name): Ditto.
29566         (my_strusage): Use them.
29567         (list_config): Ditto. Add "pubkeyname".
29568         (build_list): Add letter==1 hack.
29569
29570         gpg: Start using OpenPGP digest algo ids.
29571         + commit bf50604a0d50b974c1d4b8ccf5d774489f996cae
29572         * g10/misc.c (print_pubkey_algo_note): Use enum typedef for the arg.
29573         (print_cipher_algo_note): Ditto.
29574         (print_digest_algo_note): Ditto.
29575         (map_md_openpgp_to_gcry): New.
29576         (openpgp_md_test_algo): Rewrite.
29577         (openpgp_md_algo_name): Rewrite to do without Libgcrypt.
29578         * g10/cpr.c (write_status_begin_signing): Remove hardwired list of
29579         algo ranges.
29580
29581         gpg: Use only OpenPGP cipher algo ids.
29582         + commit 16a6311adefff0139056714521214f845315b7f8
29583         * g10/misc.c (map_cipher_openpgp_to_gcry): Use explicit mapping and
29584         use enums for the arg and return value.
29585         (map_cipher_gcry_to_openpgp): Ditto.
29586         (openpgp_cipher_blocklen): Use constant macros.
29587         (openpgp_cipher_test_algo): Use mapping function and prepare to
29588         disable algorithms.
29589         (openpgp_cipher_algo_name): Do not use Libgcrypt.
29590
29591         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Replace
29592         CGRY_CIPHER_* by CIPHER_ALGO_*.
29593
29594         * common/openpgpdefs.h (cipher_algo_t): Remove unused
29595         CIPHER_ALGO_DUMMY.
29596
29597 2014-01-30  Werner Koch  <wk@gnupg.org>
29598
29599         gpg: Use only OpenPGP public key algo ids and add the EdDSA algo id.
29600         + commit b7f8dec6325f1c80640f878ed3080bbc194fbc78
29601         * common/sexputil.c (get_pk_algo_from_canon_sexp): Change to return a
29602         string.
29603         * g10/keygen.c (check_keygrip): Adjust for change.
29604         * sm/certreqgen-ui.c (check_keygrip): Likewise.
29605
29606         * agent/pksign.c (do_encode_dsa): Remove bogus map_pk_openpgp_to_gcry.
29607
29608         * g10/misc.c (map_pk_openpgp_to_gcry): Remove.
29609         (openpgp_pk_test_algo): Change to a wrapper for openpgp_pk_test_algo2.
29610         (openpgp_pk_test_algo2): Rewrite.
29611         (openpgp_pk_algo_usage, pubkey_nbits): Add support for EdDSA.
29612         (openpgp_pk_algo_name): Rewrite to remove need for gcry calls.
29613         (pubkey_get_npkey, pubkey_get_nskey): Ditto.
29614         (pubkey_get_nsig, pubkey_get_nenc): Ditto.
29615         * g10/keygen.c(do_create_from_keygrip):  Support EdDSA.
29616         (common_gen, gen_ecc, ask_keysize, generate_keypair): Ditto.
29617         * g10/build-packet.c (do_key): Ditto.
29618         * g10/export.c (transfer_format_to_openpgp): Ditto.
29619         * g10/getkey.c (cache_public_key): Ditto.
29620         * g10/import.c (transfer_secret_keys): Ditto.
29621         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Ditto.
29622         * g10/mainproc.c (proc_pubkey_enc): Ditto.
29623         * g10/parse-packet.c (parse_key): Ditto,
29624         * g10/sign.c (hash_for, sign_file, make_keysig_packet): Ditto.
29625         * g10/keyserver.c (print_keyrec): Use openpgp_pk_algo_name.
29626         * g10/pkglue.c (pk_verify, pk_encrypt, pk_check_secret_key): Use only
29627         OpenPGP algo ids and support EdDSA.
29628         * g10/pubkey-enc.c (get_it): Use only OpenPGP algo ids.
29629         * g10/seskey.c (encode_md_value): Ditto.
29630
29631 2014-01-29  Werner Koch  <wk@gnupg.org>
29632
29633         gpg: Remove cipher.h and put algo ids into a common file.
29634         + commit ea8a1685f75d27f5277d42ea7390ad5aeaf51b1f
29635         * common/openpgpdefs.h (cipher_algo_t, pubkey_algo_t, digest_algo_t)
29636         (compress_algo_t): New.
29637         * agent/gpg-agent.c: Remove ../g10/cipher.h. Add openpgpdefs.h.
29638         * g10/cipher.h (DEK): Move to ...
29639         * g10/dek.h: new file.
29640         * g10/cipher.h (is_RSA, is_ELGAMAL, is_DSA)
29641         (PUBKEY_MAX_NPKEY, PUBKEY_MAX_NSKEY, PUBKEY_MAX_NSIG, PUBKEY_MAX_NENC)
29642         (PUBKEY_USAGE_SIG, PUBKEY_USAGE_ENC, PUBKEY_USAGE_CERT)
29643         (PUBKEY_USAGE_AUTH, PUBKEY_USAGE_NONE): Move to
29644         * g10/packet.h: here.
29645         * g10/cipher.h: Remove.  Remove from all files.
29646         * g10/filter.h, g10/packet.h:  Include dek.h.
29647         * g10/Makefile.am (common_source): Remove cipher.h.  Add dek.h.
29648
29649         include: Remove this directory.
29650         + commit 25b4c2acbd01f9b4c2c364f44c53b73498ed8469
29651         * include/cipher.h: Move to ...
29652         * g10/cipher.h: here.
29653         * agent/gpg-agent.c: Adjust header file name.
29654
29655         * include/host2net.h: Move to ...
29656         * common/host2net.h: here.  Change license to LGPLv3/GPLv2.  Adjust
29657         notices to reflect that only me worked on that file.
29658
29659         * include/types.h: Remove.
29660         * common/types.h: Include inttypes.h.  Add byte typedef and comments
29661         for __riscos__.
29662         * common/iobuf.h: Adjust header file name.
29663
29664         * include/_regex.h: Remove this unused file.
29665
29666         * include/Makefile.am: Remove.
29667         * Makefile.am (SUBDIRS): Remove "include".
29668         * configure.ac (AC_CONFIG_FILES): Remove include/Makefile.
29669         * include/ChangeLog-2011: Move to ...
29670         * common/ChangeLog-2011.include: here.
29671         * common/Makefile.am (EXTRA_DIST): Add file.
29672
29673         * include/zlib-riscos.h: Move this repo only file to ...
29674         * g10/zlib-riscos.h: here.
29675
29676         * include/: Remove.
29677
29678 2014-01-17  Werner Koch  <wk@gnupg.org>
29679
29680         Remove unused u64 type definitions.
29681         + commit 362a30d8c2f529cd44687066f9c33cab7b43bedc
29682         * configure.ac: Remove check for uint64 and UINT64_C.
29683         * include/types.h: Remove u64 stuff.
29684         * common/types.h: Ditto.
29685
29686 2014-01-16  NIIBE Yutaka  <gniibe@fsij.org>
29687
29688         agent: Not remove SSH socket when already running.
29689         + commit 0ee66a6f66d7389e381fffa5f9eedbc8de9add10
29690         * agent/gpg-agent.c (main): Defer setting of socket_name_ssh to avoid
29691         removal of the socket when it will die in create_server_socket for
29692         socket_name.
29693
29694         agent: Fix agent_is_eddsa_key.
29695         + commit 9c731bbedfd8bded5efd886304c5ca6655768c45
29696         * agent/findkey.c (agent_is_eddsa_key): Implemented.
29697
29698 2014-01-15  NIIBE Yutaka  <gniibe@fsij.org>
29699
29700         Add secp256k1.
29701         + commit c5e41f539b9a21cbad10c7dae95572a4445d31c3
29702         * common/openpgp-oid.c (openpgp_curve_to_oid): Add secp256k1.
29703         (openpgp_oid_to_curve): Likewise.
29704
29705         * g10/keygen.c (ask_curve): Add secp256k1.
29706
29707 2014-01-10  Werner Koch  <wk@gnupg.org>
29708
29709         autogen.sh: Add rule for 64 bit windows.
29710         + commit aedfa95bcc49156f2bc6ae5d0f385705d4fbdd32
29711
29712
29713         Turn autogen.sh into a generic script.
29714         + commit e7973d36d88178b4b0a977e3fcc0d62600777618
29715         * autogen.sh: Revamp.
29716         * autogen.rc: New.
29717         * Makefile.am (EXTRA_DIST): Add autogen.rc.
29718
29719         Rename scripts/ to build-aux/
29720         + commit 99a48b2fcdf7c33fe553511c12f2ebb8eea5c634
29721         * scripts/: Rename to build-aux/
29722         * Makefile.am: Adjust accordingly.
29723         * configure.ac (AC_CONFIG_AUX_DIR): Change to build-aux.
29724
29725 2014-01-09  Werner Koch  <wk@gnupg.org>
29726
29727         Improve the speedo make script.
29728         + commit a55ffb9da9a844bd2bd73a4a2ea65bf18b21c57f
29729         * scripts/gpg-w32-dev/README: Remove
29730         * scripts/gpg-w32-dev/GNUmakefile, scripts/gpg-w32-dev/speedo.mk:
29731         Merge into ..
29732         * scripts/speedo.mk: this.
29733
29734         gpgsplit: Allow building without zlib support.
29735         + commit 00d5d2204cefb0f4b953e0c00448f16aab2d39c7
29736         * tools/gpgsplit.c [!HAVE_ZLIB]: Do not include zlib.h.
29737         (handle_zlib): Build only if HAVE_ZLIB is defined.
29738         (write_part): Support zlib and zip only if HAVE_ZLIB is defined.
29739
29740         w32: Fix backslash quoting in registry name.
29741         + commit fa318406c9bdb60aee1e1b410e4c9e0b3eb1392e
29742         * configure.ac (GNUPG_REGISTRY_DIR): Double backslashes.
29743
29744         Fix test for zlib.
29745         + commit 477aabaf753f987987f7a2e1f999a499ea3bd103
29746         * configure.ac (HAVE_ZLIB): Define only if found.
29747
29748         Add --enable-silent-rules stuff.
29749         + commit aba53e9f96d0c9b270edef0806976a56326249c4
29750         * configure.ac: Add AM_SILENT_RULES.
29751
29752 2014-01-08  Werner Koch  <wk@gnupg.org>
29753
29754         w32: Add macro for the registry key.
29755         + commit 75ba215ebd8be7e14b26bb53ef3c7d41e4ce1e02
29756         * configure.ac (GNUPG_REGISTRY_DIR) [W32]: New ac-define.
29757         * common/homedir.c (default_homedir): Use it.
29758         * common/logging.c (do_logv): Use it.
29759
29760 2013-12-11  Werner Koch  <wk@gnupg.org>
29761
29762         gpg: Change --show-session-key to print the session key earlier.
29763         + commit 101a54add351ff62793cbfbf3877787c4791f833
29764         * g10/cpr.c (write_status_strings): New.
29765         (write_status_text): Replace code by a call to write_status_strings.
29766         * g10/mainproc.c (proc_encrypted): Remove show_session_key code.
29767         * g10/decrypt-data.c (decrypt_data): Add new show_session_key code.
29768
29769 2013-12-05  Werner Koch  <wk@gnupg.org>
29770
29771         gpg: Change OID of Ed25519 and add Brainpool oids.
29772         + commit 59207a86e5f40c77fed296b642bf76692e8eef65
29773         * common/openpgp-oid.c (openpgp_curve_to_oid): Change OID for
29774         Ed25519.  Add brainpool OIDs.
29775         (openpgp_oid_to_curve): Ditto.
29776
29777 2013-11-29  Werner Koch  <wk@gnupg.org>
29778
29779         common: Add put_membuf_printf.
29780         + commit 159d42ee6ab21d97f40ee129445f37209b875739
29781         * common/membuf.c (put_membuf_printf): New.
29782
29783 2013-11-27  Werner Koch  <wk@gnupg.org>
29784
29785         gpg: Change armor Version header to emit only the major version.
29786         + commit e951782e937ce290be0d89d83e84b3daea997587
29787         * g10/options.h (opt): Rename field no_version to emit_version.
29788         * g10/gpg.c (main): Init opt.emit_vesion to 1.  Change --emit-version
29789         to bump up opt.emit_version.
29790         * g10/armor.c (armor_filter): Implement different --emit-version
29791         values.
29792
29793 2013-11-18  Werner Koch  <wk@gnupg.org>
29794
29795         Make use of the *_NAME etc macros.
29796         + commit cc9a0b69b698ba436eaf777e5020532845b56236
29797         Replace hardwired strings at many places with new macros from config.h
29798         and use the new strusage macro replacement feature.
29799
29800         * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
29801         sentinels.
29802         * agent/command.c (cmd_import_key): Use asprintf to create the prompt.
29803
29804         Add strusage macro replacement feature.
29805         + commit 798daaa1ddf73f64cf840fbdc1f4c5b9c4b4ec13
29806         * common/argparse.c (writechar): New.
29807         (writestrings): Add macro replacement feature.
29808         (show_help): Remove specialized @EMAIL@ replacement.
29809         * configure.ac (GNUPG_NAME, GPG_NAME, GPGSM_NAME): Define.
29810         (GPG_AGENT_NAME, DIRMNGR_NAME, G13_NAME, GPGCONF_NAME): Define.
29811         (GPGTAR_NAME, GPG_AGENT_INFO_NAME, GPG_AGENT_SOCK_NAME): Define.
29812         (GPG_AGENT_SSH_SOCK_NAME, DIRMNGR_INFO_NAME): Define.
29813         (DIRMNGR_SOCK_NAME): Define.
29814
29815 2013-11-15  Werner Koch  <wk@gnupg.org>
29816
29817         kbx: Implement update operation for OpenPGP keyblocks.
29818         + commit 5499942571a88a1223a7318992605c6d29858866
29819         * kbx/keybox-update.c (keybox_update_keyblock): Implement.
29820         * kbx/keybox-search.c (get_blob_flags): Move to ...
29821         * kbx/keybox-defs.h (blob_get_type): here.
29822         * kbx/keybox-file.c (_keybox_read_blob2): Fix calling without R_BLOB.
29823         * g10/keydb.c (build_keyblock_image): Allow calling without
29824         R_SIGSTATUS.
29825         (keydb_update_keyblock): Implement for keybox.
29826
29827         * kbx/keybox-dump.c (_keybox_dump_blob): Fix printing of the unhashed
29828         size.  Print "does not expire" also on 64 bit platforms.
29829
29830         gpg: Rework ECC support and add experimental support for Ed25519.
29831         + commit 402aa0f94854bb00475c934be5ca6043a4632126
29832         * agent/findkey.c (key_parms_from_sexp): Add algo name "ecc".
29833         (agent_is_dsa_key): Ditto.
29834         (agent_is_eddsa_key): New.  Not finished, though.
29835         * agent/pksign.c (do_encode_eddsa): New.
29836         (agent_pksign_do): Use gcry_log_debug functions.
29837         * agent/protect.c (agent_protect): Parse a flags parameter.
29838         * g10/keygen.c (gpg_curve_to_oid): Move to ...
29839         * common/openpgp-oid.c (openpgp_curve_to_oid): here and rename.
29840         (oid_ed25519): New.
29841         (openpgp_oid_is_ed25519): New.
29842         (openpgp_oid_to_curve): New.
29843         * common/t-openpgp-oid.c (test_openpgp_oid_is_ed25519): New.
29844         * g10/build-packet.c (gpg_mpi_write): Write the length header also for
29845         opaque MPIs.
29846         (gpg_mpi_write_nohdr): New.
29847         (do_key): Use gpg_mpi_write_nohdr depending on algorithm.
29848         (do_pubkey_enc): Ditto.
29849         * g10/ecdh.c (pk_ecdh_encrypt_with_shared_point): Use
29850         gpg_mpi_write_nohdr.
29851         * g10/export.c (transfer_format_to_openpgp):
29852         * g10/keygen.c (ecckey_from_sexp): Return the error.
29853         (gen_ecc): Repalce arg NBITS by CURVE.
29854         (read_parameter_file): Add keywords "Key-Curve" and "Subkey-Curve".
29855         (ask_curve): New.
29856         (generate_keypair, generate_subkeypair): Use ask_curve.
29857         (do_generate_keypair): Also pass curve name.
29858         * g10/keylist.c (list_keyblock_print, list_keyblock_colon): Print
29859         curve name.
29860         * g10/parse-packet.c (mpi_read): Remove workaround for
29861         Libcgrypt < 1.5.
29862         (parse_key): Fix ECC case.  Print the curve name.
29863         * g10/pkglue.c (mpi_from_sexp): Rename to get_mpi_from_sexp.
29864         (pk_verify, pk_check_secret_key): Add special case for Ed25519.
29865         * g10/seskey.c (encode_md_value): Ditto.
29866         * g10/sign.c (do_sign, hash_for, sign_file): Ditto.
29867
29868         kbx: Fix possible segv in kbxdump.
29869         + commit 9ae48b173c93f4747a9826beb1fbd023c4362c22
29870         * kbx/keybox-dump.c (_keybox_dump_blob): Check length before get32.
29871
29872         Require Libgcrypt 1.6.
29873         + commit b27161cd0c76ae6e2381f60c3a502cde3a2aaa21
29874         * agent/pksign.c (do_encode_dsa): Remove Libgcrypt version check
29875
29876 2013-11-13  NIIBE Yutaka  <gniibe@fsij.org>
29877
29878         scd: more pinpad input fix for PC/SC.
29879         + commit abd922e79b2ff63a5a763a30d4a06a91f93d0b12
29880         * scd/apdu.c (check_pcsc_pinpad): Set default values here.
29881         (pcsc_pinpad_verify, pcsc_pinpad_modify): Remove setting default
29882         values, as it's too late.
29883
29884 2013-11-11  NIIBE Yutaka  <gniibe@fsij.org>
29885
29886         scd: more pinpad fix.
29887         + commit 037dea9dd5eac7a74df0e12cb437e71fb0732afa
29888         * scd/apdu.c (check_pcsc_pinpad): Set ->minlen and ->maxlen only when
29889         those are specified.
29890         (pcsc_pinpad_modify): Remove old check code.
29891
29892 2013-10-29  NIIBE Yutaka  <gniibe@fsij.org>
29893
29894         scd: pinpad fix for PC/SC on Windows.
29895         + commit 32989ad2b152d18198d718bc2c7232ce3e79c72f
29896         * scd/apdu.c (SCARD_CTL_CODE): Fix for Windows.
29897
29898 2013-10-28  Werner Koch  <wk@gnupg.org>
29899
29900         doc: Change yat2m to allow arbitrary condition names.
29901         + commit a15c35f37ed2b58805adc213029998aa3e52f038
29902         * doc/yat2m.c (MAX_CONDITION_NESTING): New.
29903         (gpgone_defined): Remove.
29904         (condition_s, condition_stack, condition_stack_idx): New.
29905         (cond_is_active, cond_in_verbatim): New.
29906         (add_predefined_macro, set_macro, macro_set_p): New.
29907         (evaluate_conditions, push_condition, pop_condition): New.
29908         (parse_file): Rewrite to use the condition stack.
29909         (top_parse_file): Set prefined macros.
29910         (main): Change -D to define arbitrary macros.
29911
29912 2013-10-25  NIIBE Yutaka  <gniibe@fsij.org>
29913
29914         scd: fix pinpad input on Windows.
29915         + commit de7e15c6b80164a351586e9087aad86420c8b89e
29916         * scd/apdu.c (open_pcsc_reader_direct): Don't call
29917         pcsc_vendor_specific_init here, but...
29918         (connect_pcsc_card): Call it here.
29919
29920 2013-10-23  NIIBE Yutaka  <gniibe@fsij.org>
29921
29922         po: Update Japanese translation.
29923         + commit b66158cac7347e4c56c79ab7b5416ae5b3f4a0a2
29924
29925
29926 2013-10-16  NIIBE Yutaka  <gniibe@fsij.org>
29927
29928         scd: add pinpad readers information for PC/SC service.
29929         + commit 5efcc2b8fee8de31d255d09037f0a1e6209eab32
29930         * scd/apdu.c (pcsc_vendor_specific_init): Add information for Cherry
29931         ST-2xxx, Reiner cyberJack, Vasco DIGIPASS, FSIJ Gnuk Token, and KAAN
29932         Advance.
29933
29934 2013-10-15  NIIBE Yutaka  <gniibe@fsij.org>
29935
29936         scd: remove pin length check.
29937         + commit e0ab665a792ada6470cb8885b8427acc3c960998
29938         * scd/apdu.c (pcsc_pinpad_verify): Remove old check code for pin
29939         length.
29940
29941 2013-10-04  Werner Koch  <wk@gnupg.org>
29942
29943         gpg: Limit the nesting level of I/O filters.
29944         + commit e6175055fbca958b7fa43aaf84359574ca7f3ebb
29945         * common/iobuf.c (MAX_NESTING_FILTER): New.
29946         (iobuf_push_filter2): Limit the nesting level.
29947
29948         * g10/mainproc.c (mainproc_context): New field ANY.  Change HAVE_DATA
29949         and ANY_SIG_SIGN to bit fields of ANY.  Add bit field
29950         UNCOMPRESS_FAILED.
29951         (proc_compressed): Avoid printing multiple Bad Data messages.
29952         (check_nesting): Return GPG_ERR_BAD_DATA instead of UNEXPECTED_DATA.
29953
29954 2013-10-02  Werner Koch  <wk@gnupg.org>
29955
29956         gpg: Fix bug with deeply nested compressed packets.
29957         + commit 0899f6d4be0406c9efbf9c3f342825804f359b5a
29958         * g10/mainproc.c (MAX_NESTING_DEPTH): New.
29959         (proc_compressed): Return an error code.
29960         (check_nesting): New.
29961         (do_proc_packets): Check packet nesting depth.  Handle errors from
29962         check_compressed.
29963
29964 2013-09-08  Werner Koch  <wk@gnupg.org>
29965
29966         Switch to deterministic DSA.
29967         + commit 6466db10fb22a4f24df4edad9c5cb33ec67321bd
29968         * agent/pksign.c (rfc6979_hash_algo_string): New.
29969         (do_encode_dsa) [Libgcrypt >= 1.6]: Make use of RFC-6979.
29970
29971 2013-08-30  Werner Koch  <wk@gnupg.org>
29972
29973         scd: Suppress gcc warning about possible uninitialized use.
29974         + commit 244587ea41d4c75cb5570356f09a6705864a7e8d
29975         * scd/app-nks.c (parse_pwidstr): Always init r_pwid.
29976
29977         gpg: Use 2048 as the default keysize in batch mode.
29978         + commit 4c3b35b067a4e7002bb6473b879b551014bb7857
29979         * g10/keygen.c (gen_elg, gen_dsa, gen_rsa): Set default keysize to
29980         2048.
29981
29982         gpgtar: Fix building for systems with a separate libintl.
29983         + commit 12990efb45ee7c425167aad19fe759d5609c5182
29984         * tools/Makefile.am (gpgtar_LDADD): Add LIBINTL and LIBICONV.
29985
29986         scd: Use vendor and product id macros also in apdu.c.
29987         + commit fc31d730d8506b069de1d3529ed26660856bf07f
29988         * scd/ccid-driver.c: Move vendor and product ids to ...
29989         * scd/ccid-driver.h: here.
29990         * scd/apdu.c (CCID_DRIVER_INCLUDE_USB_IDS): Define to include ids.
29991         (pcsc_vendor_specific_init): Use vendor and product id macros.
29992
29993 2013-08-30  NIIBE Yutaka  <gniibe@fsij.org>
29994
29995         scd: PC/SC pinpad input improvement.
29996         + commit 95a3bffeaf07e8bf9487d4b165c336d166236fc1
29997         * scd/apdu.c (struct reader_table_s): Add members: PINMIN, PINMAX, and
29998         PINPAD_VERLEN_SUPPORTED.
29999         (CM_IOCTL_VENDOR_IFD_EXCHANGE, FEATURE_GET_TLV_PROPERTIES,
30000         PCSCv2_PART10_PROPERTY_*): New.
30001         (new_reader_slot): Initialize pinpad_varlen_supported, pinmin, pinmax.
30002         (pcsc_vendor_specific_init): New.
30003         (open_pcsc_reader_direct, open_pcsc_reader_wrapped): Call
30004         pcsc_vendor_specific_init.
30005         (check_pcsc_pinpad): Not detect here but use the result of
30006         pcsc_vendor_specific_init.
30007         (pcsc_pinpad_verify, pcsc_pinpad_modify): Specify bNumberMessage.
30008
30009 2013-08-29  Jonas Borgström  <jonas@borgstrom.se>
30010
30011         scd: add support for RSA_CRT and RSA_CRT_N key import.
30012         + commit cc67918c088e90c1d9a507af5f6288e8faa93d87
30013         * scd/app-openpgp.c (do_writekey): Added RSA_CRT and RSA_CRT_N support.
30014
30015 2013-08-29  Werner Koch  <wk@gnupg.org>
30016
30017         kbx: Add a few macros for easier readability.
30018         + commit 3adfaa9beee4502479b5673c7dfd386680a920c5
30019         * kbx/keybox-update.c (FILECOPY_INSERT)
30020         (FILECOPY_DELETE, FILECOPY_UPDATE): New macros.  Replace numbers by
30021         them.
30022
30023 2013-08-28  Werner Koch  <wk@gnupg.org>
30024
30025         Fix commit 04e2c83f.
30026         + commit fdbf76eee6a4e81b040d423926b71af7b491fb4a
30027         * agent/command-ssh.c (stream_read_string): Do not assign to a NULL
30028         ptr.
30029
30030         gpg: Make decryption with the OpenPGP card work.
30031         + commit 780ba3233618393835970bac4cf8aab713f4d7fa
30032         * scd/app-common.h (APP_DECIPHER_INFO_NOPAD): New.
30033         * scd/app-openpgp.c (do_decipher): Add arg R_INFO.
30034         * scd/app-nks.c (do_decipher): Add arg R_INFO as a dummy.
30035         * scd/app.c (app_decipher): Add arg R_INFO.
30036         * scd/command.c (cmd_pkdecrypt): Print status line "PADDING".
30037         * agent/call-scd.c (padding_info_cb): New.
30038         (agent_card_pkdecrypt): Add arg R_PADDING.
30039         * agent/divert-scd.c (divert_pkdecrypt): Ditto.
30040         * agent/pkdecrypt.c (agent_pkdecrypt): Ditto.
30041         * agent/command.c (cmd_pkdecrypt):  Print status line "PADDING".
30042         * g10/call-agent.c (padding_info_cb): New.
30043         (agent_pkdecrypt): Add arg R_PADDING.
30044         * g10/pubkey-enc.c (get_it): Use padding info.
30045
30046         agent: Fix two compiler warnings.
30047         + commit 04e2c83f189cc56342e1be784bdc63761ccdb5bb
30048         * agent/command.c (cmd_preset_passphrase, pinentry_loopback): Use %zu
30049         in format string.
30050         * scd/ccid-driver.c (ccid_get_atr): Ditto.
30051         * agent/command-ssh.c (stream_read_string): Init arg STRING_SIZE to
30052         avoid maybe_unitialized warning.
30053
30054 2013-08-27  NIIBE Yutaka  <gniibe@fsij.org>
30055
30056         scd: fix parsing login-data DO.
30057         + commit b6d54f1196d5f110fd94dfd661e74dbc60ca9811
30058         * scd/app-openpgp.c (parse_login_data): Release RELPTR.  Fix parsing.
30059
30060         scd: fix Vega for Alpha reader.
30061         + commit 54cbab29c700db2df74e808f16db49170e6c42f1
30062         * scd/ccid-driver.c (ccid_vendor_specific_init): Fix error handling
30063         and size of command.
30064
30065 2013-08-21  Werner Koch  <wk@gnupg.org>
30066
30067         scd: Make SPRx32 pinpad work with PC/SC on Windows.
30068         + commit 5c5e52df4b92e23045ac87abac09357de58920d4
30069         * scd/apdu.c (CM_IOCTL_GET_FEATURE_REQUEST): Use SCARD_CTL_CODE.
30070         (SCARD_CTL_CODE): Define if not defined.
30071         (reader_table_s): Add is_spr532.
30072         (new_reader_slot): Clear it.
30073         (check_pcsc_pinpad): Set it.
30074         (pcsc_pinpad_verify, pcsc_pinpad_modify): Add fix for SPR532.
30075
30076         scd: Improve --enable-pinpad-varlen.
30077         + commit 7bde2bf3b0ddb5d3515a44879e1a7ddb581a5c0b
30078         * tools/gpgconf-comp.c (gc_options_scdaemon): Add
30079         enable-pinpad-varlen.
30080         * scd/apdu.c (check_pcsc_pinpad): Detect SPRx32 reader.
30081
30082 2013-08-08  Werner Koch  <wk@gnupg.org>
30083
30084         agent: Extend cmd KEYINFO to return data from sshcontrol.
30085         + commit 50c98c7ed6b542857ee2f902eca36cda37407737
30086         * agent/command-ssh.c (struct control_file_s): Rename to
30087         ssh_control_file_s.
30088         (ssh_open_control_file, ssh_close_control_file)
30089         (ssh_read_control_file, ssh_search_control_file): New.
30090         (control_file_t):  Rename and move to ...
30091         * agent/agent.h (ssh_control_file_t): here.
30092         * agent/command.c (do_one_keyinfo): Add args is_ssh, ttl, disabled,
30093         and confirm. Rename unknown keytype indicator from '-' to 'X'.  Extend
30094         output.
30095         (cmd_keyinfo): Add options --ssh-list and --with-ssh.
30096
30097 2013-08-02  Werner Koch  <wk@gnupg.org>
30098
30099         gpg: No need to create a trustdb when encrypting with --always-trust.
30100         + commit 498b9a95dc65c43240835d64cc92d8fb43014d53
30101         * g10/gpg.c (main): Special case setup_trustdb for --encrypt.
30102
30103 2013-08-01  Werner Koch  <wk@gnupg.org>
30104
30105         w32: Fix recent patch 9ff72e4.
30106         + commit ca6fe88c0068f8d45ef39df0fc7b161998a91fe9
30107         * common/homedir.c (check_portable_app): Fix the name of the control
30108         file.
30109
30110         agent: Include missing prototype.
30111         + commit ef6a6d973c2bcc54006c04dc41f978ff01005c97
30112         * agent/protect.c: Include cvt-openpgp.h.
30113
30114         w32: Add code to support a portable use of GnuPG.
30115         + commit 9ff72e4e7e4f56c241a525479a94ed4c95efc23f
30116         * common/homedir.c (w32_bin_is_bin, w32_portable_app) [W32]: New.
30117         (check_portable_app) [W32]: New.
30118         (standard_homedir, default_homedir) [W32]: Support the portable flag.
30119         (w32_rootdir, w32_commondir) [W32]: Ditto.
30120         (gnupg_bindir, gnupg_cachedir, dirmngr_socket_name) [W32]: Ditto.
30121         * common/logging.h (JNLIB_LOG_NO_REGISTRY): New.
30122         * common/logging.c (no_registry): New variable.
30123         (log_set_prefix, log_get_prefix): Set/get that variable.
30124         (do_logv): Do not check the registry if that variable is set.
30125
30126         Silence compiler warning about deprecated Libgcrypt symbols.
30127         + commit db4651734fe91935b17876dc9194329b00066eff
30128         * configure.ac (AH_BOTTOM): Define GCRYPT_NO_DEPRECATED.
30129
30130         dirmngr: Define missing LDAP constant.
30131         + commit ef2e2e54020c3475bf2129c3ec8360c7bad3a6c9
30132         * dirmngr/ldap-url.c (LDAP_SCOPE_DEFAULT): Define if missing.
30133
30134         scd: Fix a syntax error for Apple and Windows.
30135         + commit 25b0357bf0a4861a751cfbc3e0335ae05c8b2b1b
30136         * scd/apdu.c (pcsc_dword_t) [W32]: Fix syntax error.
30137
30138         common: Fix a build error when using adns.
30139         + commit ffa7472db551f12f66b9789c31fabb5fc80cc13a
30140         * common/dns-cert.c (get_dns_cert) [USE_ADNS]: Fix synatx error.
30141
30142 2013-07-31  Werner Koch  <wk@gnupg.org>
30143
30144         common: Comment out unused code.
30145         + commit f101f34fffee4a02e7a5f62b59667e45e50e8325
30146         * common/w32-reg.c (write_w32_registry_string): Comment out.
30147
30148         dirmngr: Remove unused file.
30149         + commit 2830fcb83c99289a49da0e111766daf2d9a1fa3b
30150         * dirmngr/get-path.c: Remove.
30151
30152 2013-06-27  Werner Koch  <wk@gnupg.org>
30153
30154         sm: Remove cruft from source files.
30155         + commit f254497e09fa4e0e24e63d14f7316fc31c938844
30156         * sm/keydb.c, sm/keydb.h: Remove disabled code parts.
30157
30158         Prepare for newer automake versions.
30159         + commit 043e2728c813299fafcf62cd125ecf872b26179e
30160         * configure.ac (AM_INIT_AUTOMAKE): Replace 2 argument form by the
30161         option form.  Add options from the top Makefile.
30162         (AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADER.
30163         * Makefile.am (AUTOMAKE_OPTIONS): Remove.
30164
30165         * kbx/Makefile.am: Remove INCLUDES.  Include cmacros.am.  FActor some
30166         AM_CPPFLAGS options to  AM_CFLAGS.
30167
30168 2013-06-26  Werner Koch  <wk@gnupg.org>
30169
30170         Fix Makefile regression.
30171         + commit 136f190a2f20c6ec4d5c3ca3ac7f0440c14e4dc2
30172         * agent/Makefile.am (gpg_agent_DEPENDENCIES): Remove cruft from wrong
30173         resolve conflict 2013-04-25.
30174         (gpg_agent_DEPENDENCIES): Remove obsolete gpg_agent_res_deps
30175         (gpg_agent_LDFLAGS): Remove obsolete gpg_agent_res_ldflags.
30176
30177 2013-05-22  Werner Koch  <wk@gnupg.org>
30178
30179         Implement unattended OpenPGP secret key import.
30180         + commit 7777e68d0482c942f527e91c04adbcfb40bc8bef
30181         * agent/command.c (cmd_import_key): Add option --unattended.
30182         * agent/cvt-openpgp.c (convert_transfer_key): New.
30183         (do_unprotect): Factor some code out to ...
30184         (prepare_unprotect): new function.
30185         (convert_from_openpgp): Factor all code out to ...
30186         (convert_from_openpgp_main): this.  Add arg 'passphrase'.  Implement
30187         openpgp-native protection modes.
30188         (convert_from_openpgp_native): New.
30189         * agent/t-protect.c (convert_from_openpgp_native): New dummy fucntion
30190         * agent/protect-tool.c (convert_from_openpgp_native): Ditto.
30191         * agent/protect.c (agent_unprotect): Add arg CTRL.  Adjust all
30192         callers.  Support openpgp-native protection.
30193         * g10/call-agent.c (agent_import_key): Add arg 'unattended'.
30194         * g10/import.c (transfer_secret_keys): Use unattended in batch mode.
30195
30196         New debug functions log_printcanon and log_printsexp.
30197         + commit cb6a64bb78296c8e9f72df0c482ff847e89a1541
30198         * common/sexputil.c (sexp_to_string, canon_sexp_to_string): New.
30199         (log_printcanon, log_printsexp): New.
30200
30201         agent: Fix length detection of canonical formatted openpgp keys.
30202         + commit 0f0e0559f9b160824f10dc17b389268cdb53aea4
30203         * agent/command.c (cmd_import_key): Pass 0 instead of KEYLEN to
30204         gcry_sexp_canon_len.
30205
30206         agent: New option --disable-check-own-socket.
30207         + commit f2d8a14e1b12534eba69d595a62c78f92331e11b
30208         * agent/gpg-agent.c (oDisableCheckOwnSocket): New.
30209         (disable_check_own_socket): New.
30210         (parse_rereadable_options): Set new option.
30211         (check_own_socket): Implement new option.
30212
30213 2013-05-07  Werner Koch  <wk@gnupg.org>
30214
30215         w32: Add icons and version information.
30216         + commit 88e24341e57c96e31a25e92e09d67989e64cc1c1
30217         * common/gnupg.ico: New.  Take from artwork/gnupg-favicon-1.ico.
30218         * agent/gpg-agent-w32info.rc: New.
30219         * g10/gpg-w32info.rc: New.
30220         * scd/scdaemon-w32info.rc: New.
30221         * sm/gpgsm-w32info.rc: New.
30222         * tools/gpg-connect-agent-w32info.rc: New.
30223         * common/w32info-rc.h.in: New.
30224         * configure.ac (BUILD_REVISION, BUILD_FILEVERSION, BUILD_TIMESTAMP)
30225         (BUILD_HOSTNAME): New.
30226         (AC_CONFIG_FILES): Add w32info-rc.h.
30227         * am/cmacros.am (.rc.o): New rule.
30228         * agent/Makefile.am, common/Makefile.am, g10/Makefile.am
30229         * scd/Makefile.am, sm/Makefile.am, tools/Makefile.am: Add stuff to
30230         build resource files.
30231
30232 2013-05-07  Ian Abbott  <abbotti@mev.co.uk>
30233
30234         doc: fix some Texinfo warnings.
30235         + commit 2c3fc4719b92d9e3ac32efd134a930e1cc126032
30236         * doc/gpg.texi: Fix syntax and add missing menu entries.
30237         * doc/gpgsm.texi: Fix subsectioning.
30238
30239 2013-04-22  Werner Koch  <wk@gnupg.org>
30240
30241         Fix potential heap corruption in "gpg -v --version".
30242         + commit 151b78cc26d728e9eb42620e0caf8c6f4bd7f839
30243         * g10/gpg.c (build_list): Rewrite to cope with buffer overflow in
30244         certain locales.
30245
30246 2013-04-19  Werner Koch  <wk@gnupg.org>
30247
30248         gpgsm: Remove non-implemented commands from --help.
30249         + commit d6798d261cbe6519ef5b3ebb474e2ad348442c0c
30250         * sm/gpgsm.c (opts): Removed commands --clearsign, --symmetric,
30251         --send-keys, and --recv-keys.
30252
30253 2013-04-19  Daiki Ueno  <ueno@gnu.org>
30254
30255         Make sure to call fflush if estream_t is backed with stdio.
30256         + commit e498180d5647d3427a7d7e6c82a9f09cf1ba439d
30257         * common/estream.c (es_func_fp_write): Call fflush after fwrite.
30258
30259 2013-04-19  Werner Koch  <wk@gnupg.org>
30260
30261         doc: Formatting fixes.
30262         + commit ff6115227a1ced14e2fb3d160a12181b9dfbc502
30263         * doc/Makefile.am (.fig.jpg): Correct to use -L jpeg.
30264         * doc/gpg.texi: Fix cross reference for --options.
30265         * doc/gpgsm.texi: Likewise.
30266         * doc/gpl.texi: Fix enumerate and re-indent examples.
30267
30268 2013-04-01  NIIBE Yutaka  <gniibe@fsij.org>
30269
30270         scd: move SCDaemon to libexecdir.
30271         + commit 021767d8aa11aac8ac87dc3a31969ee6cfa65966
30272         * common/homedir.c (gnupg_module_name): It's now libexecdir.
30273         * scd/Makefile.am (libexec_PROGRAMS): Add scdaemon
30274         (bin_PROGRAMS): Remove scdaemon.
30275
30276 2013-03-29  Werner Koch  <wk@gnupg.org>
30277
30278         copyright assignments are not anymore required.
30279         + commit 07227279c44e3af0939f90025a0d22b782d0f185
30280
30281
30282 2013-03-26  NIIBE Yutaka  <gniibe@fsij.org>
30283
30284         scd: PC/SC status fix.
30285         + commit 64b1a2cf6f18348544a2d2cd4d49fd27bf01c150
30286         * scd/apdu.c (pcsc_get_status_direct): Check PCSC_STATE_MUTE only when
30287         PCSC_STATE_PRESENT.
30288
30289         * scd/pcsc-wrapper.c (handle_status): Ditto.
30290
30291         scd: PC/SC cleanup (more).
30292         + commit b9aceaa442914beb4f5359283053b43ba5a46b4c
30293         * scd/apdu.c (control_pcsc_direct, control_pcsc_wrapped, control_pcsc)
30294         (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify): Use
30295         pcsc_dword_t.
30296
30297         scd: call update_card_removed only when detecting removal.
30298         + commit 1062893832bb15eaac853f52e1cb673e5e03790a
30299         * scd/command.c (update_reader_status_file): Add condition
30300         vr->status == 0.
30301
30302 2013-03-22  NIIBE Yutaka  <gniibe@fsij.org>
30303
30304         scd: PC/SC cleanup.
30305         + commit ee95c23fcdc6673db0fc7287ab2197915d9b55b3
30306         * scd/apdu.c (pcsc_dword_t): New.  It was named as DWORD (double-word)
30307         when a word was 16-bit.
30308         (struct reader_table_s): Fixes for types.
30309         (struct pcsc_readerstate_s) [__APPLE__]: Enable #pragma pack(1).
30310         Throughout: Fixes for types.
30311
30312         * scd/pcsc-wrapper.c: Likewise.
30313
30314 2013-03-21  NIIBE Yutaka  <gniibe@fsij.org>
30315
30316         po: Enable ja.po.
30317         + commit a75a08d6e30e93e1793aa78a15d473a3ea7623cb
30318         * po/LINGUAS: Enable ja.po.
30319
30320         scd: change default value of pinpad maxlen.
30321         + commit ca66f5c779af74d0eb7221afd7a9707201931e50
30322         * scd/apdu.c (pcsc_pinpad_verify, pcsc_pinpad_modify): Default value
30323         of maxlen for pinpad input is now 15 (was: 25).
30324
30325         * scd/ccid-driver.c (ccid_transceive_secure): Likewise.
30326
30327 2013-03-20  Werner Koch  <wk@gnupg.org>
30328
30329         Add code to allow for late memory cleanup.
30330         + commit 2739834206f23833161898a73427b8a9c6d5d26d
30331         * common/init.c (mem_cleanup_item_t): New.
30332         (run_mem_cleanup): New.
30333         (_init_common_subsystems): Add an atexit for it.
30334         (register_mem_cleanup_func): New.
30335
30336         * g10/kbnode.c (cleanup_registered): New.
30337         (release_unused_nodes): New.
30338         (alloc_node): Call register_mem_cleanup_func.
30339
30340         kbx: Remove unused macro.
30341         + commit 44159b681f8f09000fabfc3ee294d5821578d3a6
30342         * kbx/keybox.h (KEYBOX_WITH_OPENPGP): Remove unused macro.
30343
30344 2013-03-19  Werner Koch  <wk@gnupg.org>
30345
30346         gpg: Print indicator for unknown key capability.
30347         + commit c4dbd1b2de8ae3847a040444e86500848868bcf4
30348         * g10/keylist.c (print_capabilities): Print '?' for unknown usage.
30349
30350 2013-03-19  Daniel Kahn Gillmor  <dkg@fifthhorseman.net>
30351
30352         gpg: Allow setting of all zero key flags.
30353         + commit b693ec02c467696bf9d7324dd081e279f9965151
30354         * g10/keygen.c (do_add_key_flags): Do not check for empty key flags.
30355
30356 2013-03-19  Werner Koch  <wk@gnupg.org>
30357
30358         gpg: Distinguish between missing and cleared key flags.
30359         + commit 4bde12206c5bf199dc6e12a74af8da4558ba41bf
30360         * include/cipher.h (PUBKEY_USAGE_NONE): New.
30361         * g10/getkey.c (parse_key_usage): Set new flag.
30362
30363 2013-03-15  NIIBE Yutaka  <gniibe@fsij.org>
30364
30365         scd: ccid-driver supporting larger APDU.
30366         + commit 76dc5c08dc2686eef32e1bd221c60fe91201246f
30367         * scd/ccid-driver.c (ccid_transceive_apdu_level): Support larger
30368         APDU.
30369
30370         scd: fix missing close paren.
30371         + commit 006782068e4d2a9413770400494421a2e9726ee7
30372         * scd/app-openpgp.c (du_auth): Fix.
30373
30374 2013-03-09  NIIBE Yutaka  <gniibe@fsij.org>
30375
30376         scd: support ECDSA signing.
30377         + commit 73ad742deacfe2bf7d6efc7cc30f9ced2d83521a
30378         * scd/app-openpgp.c (do_sign): Only prepend message digest block
30379         for RSA or do_auth.
30380         (do_auth): Remove message digest block for ECDSA.
30381
30382 2013-03-08  NIIBE Yutaka  <gniibe@fsij.org>
30383
30384         scd: support ECDSA public key.
30385         + commit 010bc7f4f06d8affb98950e1adc76c68bfcc9abb
30386         * scd/app-openpgp.c (key_type_t): New.
30387         (CURVE_NIST_P256, CURVE_NIST_P384, CURVE_NIST_P521): New.
30388         (struct app_local_s): Change keyattr to have key_type and union.
30389         (get_ecc_key_parameters, get_curve_name): New.
30390         (send_key_attr, get_public_key): Support ECDSA.
30391         (build_privkey_template, do_writekey, do_genkey): Follow the change
30392         of the member KEY_ATTR.
30393         (parse_historical): New.
30394         (parse_algorithm_attribute): Support ECDSA.
30395
30396 2013-03-05  Werner Koch  <wk@gnupg.org>
30397
30398         Require libgpg-error 1.11.
30399         + commit 5bac5040dc93343e1e89916b263390b0e52040bf
30400         * configure.ac: Require libgpg-error 1.11.
30401         * common/util.h (GPG_ERR_NO_KEYSERVER, GPG_ERR_INV_CURVE)
30402         (GPG_ERR_UNKNOWN_CURVE): Remove fallback definitions.
30403
30404 2013-02-28  NIIBE Yutaka  <gniibe@fsij.org>
30405
30406         agent: pksign result conversion to sexp to upper layer.
30407         + commit ef1983d58b913306e9bf02a7189e530123839c59
30408         * agent/agent.h (divert_pksign): Add R_SIGLEN argument.
30409         * agent/divert-scd.c (divert_pksign): Return length at R_SIGLEN.
30410         * agent/call-scd.c (agent_card_pksign): Move composition of
30411         S-expression to...
30412         * agent/pksign.c (agent_pksign_do): ... here.
30413
30414 2013-02-22  Werner Koch  <wk@gnupg.org>
30415
30416         Use has_leading_keyword in the assuan callbacks.
30417         + commit 585d5c62eece23911a768d97d11f159be138b13d
30418         * agent/call-pinentry.c (inq_quality): Use has_leading_keyword.
30419         * agent/call-scd.c (inq_needpin, inq_writekey_parms): Ditto.
30420         * g10/call-agent.c (inq_writecert_parms, keyinfo_status_cb): Ditto.
30421         (inq_genkey_parms, inq_ciphertext_cb, inq_import_key_parms): Ditto.
30422         * g10/call-dirmngr.c (ks_put_inq_cb): Ditto.
30423         * sm/call-agent.c (default_inq_cb, inq_ciphertext_cb): Ditto.
30424         (inq_genkey_parms, istrusted_status_cb, learn_status_cb): Ditto.
30425         (keyinfo_status_cb, inq_import_key_parms): Ditto.
30426         * sm/call-dirmngr.c (inq_certificate, isvalid_status_cb): Ditto.
30427         (lookup_status_cb, run_command_inq_cb, run_command_status_cb): Ditto.
30428
30429         Remove some unused variables.
30430         + commit c6b8f05517228c6aeab28d2bf5da7724c059bb1a
30431         * tools/gpgconf-comp.c (gc_process_gpgconf_conf): Remove unused
30432         used_components.
30433         * agent/command-ssh.c (ssh_signature_encoder_ecdsa): Mark unused arg.
30434         * g13/g13.c (main): Comment variable of yet unimplemented options.
30435
30436         gpg: Fix a memory leak in batch key generation.
30437         + commit 161674118d568025896026ede5e03d26bdfdfa68
30438         * g10/keygen.c (append_to_parameter): New.
30439         (proc_parameter_file): Use new func to extend the parameter list.
30440
30441         * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
30442         gcry_kdf_derive failed.
30443         * g10/keygen.c (proc_parameter_file): Print a diagnostic if
30444         passphrase_to_dek failed.
30445
30446         gpg: Handle the agent's NEW_PASSPHRASE inquiry.
30447         + commit baee681d2406530c45fd6d4bde77193ba23ac263
30448         * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
30449
30450         common: Add func has_leading_keyword.
30451         + commit 2838385e76c8c7108bc949d5a1d1c947051bd5be
30452         * common/stringhelp.c (has_leading_keyword): New.
30453
30454         Remove build hacks for FreeBSD.
30455         + commit 21f5a9ec27c0794141a835a5bb3c69495ee554a6
30456         * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
30457         LDFLAGS.
30458
30459 2013-02-22  NIIBE Yutaka  <gniibe@fsij.org>
30460
30461         agent: fix two bugs.
30462         + commit 3c3648e720b8014828573bd708c88ba4775014e3
30463         * agent/command.c (cmd_keytocard): Decrement KEYDATALEN.
30464         * agent/findkey.c (agent_public_key_from_file): Increment for ELEMS.
30465
30466         gpg: fix keytocard and support ECC card for key attribute.
30467         + commit 7d376ffa321d4af6e62a2bc64ef2b8574b122b1a
30468         * g10/call-agent.c (agent_keytocard): Supply PARM arg.
30469         * g10/card-util.c (card_status): Support ECC.
30470         (card_store_subkey): Don't assume RSA.
30471
30472 2013-02-21  Werner Koch  <wk@gnupg.org>
30473
30474         gpg: Fix a memory leak in batch key generation.
30475         + commit 273bb38cd7b517460cb3de67662e96e910104675
30476         * g10/keygen.c (append_to_parameter): New.
30477         (proc_parameter_file): Use new func to extend the parameter list.
30478
30479         * g10/passphrase.c (passphrase_to_dek_ext): Print a diagnostic of
30480         gcry_kdf_derive failed.
30481         * g10/keygen.c (proc_parameter_file): Print a diagnostic if
30482         passphrase_to_dek failed.
30483
30484         gpg: Handle the agent's NEW_PASSPHRASE inquiry.
30485         + commit 18a261b65fd77a9e434b13483ceaaaf2176f1197
30486         * g10/call-agent.c (default_inq_cb): Take care of NEW_PASSPHRASE.
30487
30488         common: Add func has_leading_keyword.
30489         + commit 4af0c62b15c51056dc293c8e3b907e7c41fbf08c
30490         * common/stringhelp.c (has_leading_keyword): New.
30491
30492 2013-02-20  Werner Koch  <wk@gnupg.org>
30493
30494         Remove build hacks for FreeBSD.
30495         + commit 8e5766c38f3ac376fb8e7c7f2b0f65de23d84cbe
30496         * configure.ac [freebsd]: Do not add /usr/local to CPPFLAGS and
30497         LDFLAGS.
30498
30499 2013-02-12  NIIBE Yutaka  <gniibe@fsij.org>
30500
30501         gpg: Implement card_store_subkey again.
30502         + commit b90506ea220860c89128f002bd593d0462a08d73
30503         * g10/call-agent.h (agent_keytocard): New.
30504         * g10/call-agent.c (agent_keytocard): New.
30505         * g10/card-util.c (replace_existing_key_p): Returns 1 when replace.
30506         (card_generate_subkey): Check return value of replace_existing_key_p.
30507         (card_store_subkey): Implement again using agent_keytocard.
30508
30509         agent: Add KEYTOCARD command.
30510         + commit 30f8a3c8736451d8c06ef72521a8da5eabf23016
30511         * agent/agent.h (divert_writekey, agent_card_writekey): New.
30512         * agent/call-scd.c (inq_writekey_parms, agent_card_writekey): New.
30513         * agent/command.c (cmd_keytocard, hlp_keytocard): New.
30514         (register_commands): Add cmd_keytocard.
30515         * agent/divert-scd.c (divert_writekey): New.
30516
30517         Japanese: update po and doc.
30518         + commit 595ab0da666c43a1315a72a1346ee149998d8771
30519         * doc/help.ja.txt, po/ja.po: Updated.
30520
30521 2013-02-08  NIIBE Yutaka  <gniibe@fsij.org>
30522
30523         scd: Rename 'keypad' to 'pinpad'.
30524         + commit 7253093addfd82a8dd25cd80e3ba820a85e3c9a7
30525         * NEWS: Mention scd changes.
30526
30527         * agent/divert-scd.c (getpin_cb): Change message.
30528
30529         * agent/call-scd.c (inq_needpin): Change the protocol to
30530         POPUPPINPADPROMPT and DISMISSPINPADPROMPT.
30531         * scd/command.c (pin_cb): Likewise.
30532
30533         * scd/apdu.c (struct reader_table_s): Rename member functions.
30534         (check_pcsc_pinpad, pcsc_pinpad_verify, pcsc_pinpad_modify,
30535         check_ccid_pinpad, ccid_pinpad_operation, apdu_check_pinpad
30536         apdu_pinpad_verify, apdu_pinpad_modify): Rename.
30537
30538         * scd/apdu.h (SW_HOST_NO_PINPAD, apdu_check_pinpad)
30539         (apdu_pinpad_verify, apdu_pinpad_modify): Rename.
30540
30541         * scd/iso7816.h (iso7816_check_pinpad): Rename.
30542
30543         * scd/iso7816.c (map_sw): Use SW_HOST_NO_PINPAD.
30544         (iso7816_check_pinpad): Rename.
30545         (iso7816_verify_kp, iso7816_change_reference_data_kp): Follow
30546         the change.
30547
30548         * scd/ccid-driver.h (CCID_DRIVER_ERR_NO_PINPAD): Rename.
30549         * scd/ccid-driver.c (ccid_transceive_secure): Use it.
30550
30551         * scd/app-dinsig.c (verify_pin): Follow the change.
30552         * scd/app-nks.c (verify_pin): Follow the change.
30553
30554         * scd/app-openpgp.c (check_pinpad_request): Rename.
30555         (parse_login_data, verify_a_chv, verify_chv3, do_change_pin): Follow
30556         the change.
30557
30558         * scd/scdaemon.c (oDisablePinpad, oEnablePinpadVarlen): Rename.
30559
30560         * scd/scdaemon.h (opt): Rename to disable_pinpad,
30561         enable_pinpad_varlen.
30562
30563         * tools/gpgconf-comp.c (gc_options_scdaemon): Rename to
30564         disable-pinpad.
30565
30566 2013-02-07  Werner Koch  <wk@gnupg.org>
30567
30568         gpg: Add pinentry-mode feature.
30569         + commit 21feecd48f990b2569cb4b385dea3e57b9501525
30570         * g10/gpg.c: Include shareddefs.h.
30571         (main): Add option --pinentry-mode.
30572         * g10/options.h (struct opt): Add field pinentry_mode.
30573         * g10/passphrase.c: Include shareddefs.h.
30574         (have_static_passphrase): Take care of loopback pinentry_mode.
30575         (read_passphrase_from_fd): Ditto.
30576         (get_static_passphrase): New.
30577         (passphrase_to_dek_ext): Factor some code out to ...
30578         (emit_status_need_passphrase): new.
30579         * g10/call-agent.c (start_agent): Send the pinentry mode.
30580         (default_inq_cb): Take care of the PASSPHRASE inquiry.  Return a
30581         proper error code.
30582         (agent_pksign): Add args keyid, mainkeyid and pubkey_algo.
30583         (agent_pkdecrypt): Ditto.
30584         * g10/pubkey-enc.c (get_it): Pass new args.
30585         * g10/sign.c (do_sign): Pass new args.
30586
30587         * g10/call-agent.c (struct default_inq_parm_s): New.  Change all
30588         similar structs to reference this one.  Change all users and inquire
30589         callback to use this struct, instead of NULL or some undefined but not
30590         used structs.  This change will help to eventually get rid of global
30591         variables.
30592
30593 2013-02-06  Werner Koch  <wk@gnupg.org>
30594
30595         agent: Move a typedef to common and provide parse_pinentry_mode.
30596         + commit 8b2b8dfe5c4cd346bbea2c228e75737bbeeca4c4
30597         * common/agent-opt.c: New.
30598         * common/shareddefs.h: New.
30599         * common/Makefile.am: Add new files.
30600         * agent/agent.h: Include shareddefs.h.
30601         (pinentry_mode_t): Factor out to shareddefs.h.
30602         * agent/command.c (option_handler): Use parse_pinentry_mode.
30603
30604         agent: Return a better error code if no passphrase was given.
30605         + commit 4483a4f0ea030046137ba04905eb5220c14a2161
30606         * agent/protect.c (hash_passphrase): Handle an empty passphrase.
30607
30608 2013-02-05  NIIBE Yutaka  <gniibe@fsij.org>
30609
30610         scd: Fix check_keypad_request.
30611         + commit c27315fc6466cceb862c9e67755a8e044e9b7688
30612         * scd/app-openpgp.c (check_keypad_request): 0 means not to use pinpad.
30613
30614         SCD: Add vendor specific initalization.
30615         + commit e791ac6683bfb90d5e40c0103324784bd58535c9
30616         * scd/ccid-driver.c (ccid_vendor_specific_init): New.
30617         (ccid_open_reader): Call ccid_vendor_specific_init.
30618
30619         SCD: Support P=N format for login data.
30620         + commit 0407e642f796fb2780a77b7a1a86731d0de27e5d
30621         * scd/app-openpgp.c (parse_login_data): Support P=N format.
30622
30623         SCD: Better interoperability.
30624         + commit bd5eded73a1268afdf81482f8408e5f640abf9c4
30625         * scd/apdu.c: Fill bTeoPrologue[2] field.
30626
30627         SCD: Defaults to use pinpad if the reader has the capability.
30628         + commit a9ff97a10f7ae5a703ed1bccba294473ecc88d5d
30629         * scd/app-openpgp.c (struct app_local_s): Remove VARLEN.
30630         (parse_login_data): "P=0" means to disable pinpad.
30631         (check_keypad_request): Default is to use pinpad if available.
30632
30633         SCD: handle keypad request on the card.
30634         + commit 334ba6efa5a05d8849fae213128a0505e7615e13
30635         * scd/app-openpgp.c: Add 2013.
30636         (struct app_local_s): Add keypad structure.
30637         (parse_login_data): Add parsing keypad request on the card.
30638         (check_keypad_request): New.
30639         (verify_a_chv, verify_chv3, do_change_pin): Call check_keypad_request
30640         to determine use of keypad.
30641
30642         SCD: Minor fix of ccid-driver.
30643         + commit d5bf83a24cf3871b7d8cfe61049f70e1e206d09a
30644         * scd/ccid-driver.c (VENDOR_VEGA): Fix typo.
30645
30646         SCD: Add support of Covadis VEGA_ALPHA reader.
30647         + commit 82e1e837c29225cd55642b193cc04ce6191d19bb
30648         * scd/ccid-driver.c: Add 2013.
30649         (VENDER_VEGA, VEGA_ALPHA):New.
30650         (ccid_transceive_secure): VEGA_ALPHA is same firmware as GEMPC_PINPAD.
30651         Change bNumberMessage to 0x01, as it works better (was: 0xff).
30652
30653         SCD: Support fixed length PIN input for keypad (PC/SC).
30654         + commit 3aae780f9debaeb3560ff866b7e09d0923481c57
30655         * scd/apdu.c (pcsc_keypad_verify): SUpport fixed length PIN input for
30656         keypad.
30657         (pcsc_keypad_modify): Likewise.
30658         * scd/ccid-driver.c (ccid_transceive_secure): Clean up.
30659
30660         SCD: Support fixed length PIN input for keypad.
30661         + commit 40a914a2e3052847b49c4b5e8ac8538e97efd18a
30662         * scd/iso7816.h (struct pininfo_s): Remove MODE and add FIXEDLEN.
30663         * scd/app-dinsig.c (verify_pin): Initialize FIXEDLEN to unknown.
30664         * scd/app-nks.c (verify_pin): Likewise.
30665         * scd/app-openpgp.c (verify_a_chv, verify_chv3, do_change_pin):
30666         Likewise.
30667         * scd/apdu.c (check_pcsc_keypad): Add comment.
30668         (pcsc_keypad_verify, pcsc_keypad_modify): PC/SC driver only support
30669         readers with the feature of variable length input (yet).
30670         (apdu_check_keypad): Set FIXEDLEN.
30671         * scd/ccid-driver.c (ccid_transceive_secure): Add GEMPC_PINPAD
30672         specific settings.
30673         Support fixed length PIN input for keypad.
30674
30675         SCD: API cleanup for keypad handling.
30676         + commit b526f6e223604b7c1852ef2aab9fc1ea691b1181
30677         * scd/iso7816.h (struct pininfo_s): Rename from iso7816_pininfo_s.
30678         Change meaning of MODE.
30679         (pininfo_t): Rename from iso7816_pininfo_t.
30680         * scd/sc-copykeys.c: Include "iso7816.h".
30681         * scd/scdaemon.c, scd/command.c: Likewise.
30682         * scd/ccid-driver.c: Include "scdaemon.h" and "iso7816.h".
30683         (ccid_transceive_secure): Follow the change of PININFO_T.
30684         * scd/app.c: Include "apdu.h" after "iso7816.h".
30685         * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
30686         (iso7816_change_reference_data_kp): Follow the change of API.
30687         * scd/apdu.c (struct reader_table_s): Change API of CHECK_KEYPAD,
30688         KEYPAD_VERIFY, KEYPAD_MODIFY to have arg of PININFO_T.
30689         (check_pcsc_keypad, check_ccid_keypad): Likewise.
30690         (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify): Likewise.
30691         (pcsc_keypad_verify, pcsc_keypad_modify, ct_send_apdu)
30692         (pcsc_send_apdu_direct,  pcsc_send_apdu_wrapped, pcsc_send_apdu)
30693         (send_apdu_ccid, ccid_keypad_operation, my_rapdu_send_apdu, send_apdu)
30694         (send_le): Follow the change of API.
30695         * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
30696         (apdu_keypad_modify): Change the API.
30697         * scd/app-dinsig.c, scd/app-nks.c, scd/app-openpgp.c: Follow the
30698         change.
30699
30700         SCD: Clean up.  Remove PADLEN for keypad input.
30701         + commit ca89277cb4cb9558da97a71a4cb070cb77c9b536
30702         * scd/apdu.c (struct pininfo_s): Use iso7816_pininfo_s.
30703         (struct reader_table_s): Remove last arg from check_keypad method.
30704         (check_pcsc_keypad, check_pcsc_keypad): Remove PIN_PADLEN.
30705         (pcsc_keypad_verify, pcsc_keypad_modify): Don't check PIN_PADLEN.
30706         (send_apdu_ccid, ccid_keypad_operation): Remove PIN_PADLEN.
30707         (apdu_check_keypad, apdu_keypad_verify, apdu_keypad_modify):
30708         Likewise.
30709
30710         * scd/apdu.h (apdu_check_keypad, apdu_keypad_verify)
30711         (apdu_keypad_modify): Remove PIN_PADLEN.
30712
30713         * scd/ccid-driver.c (ccid_transceive_secure): Remove PIN_PADLEN.
30714
30715         * scd/ccid-driver.h (ccid_transceive_secure): Remove PIN_PADLEN.
30716
30717         * scd/iso7816.c (iso7816_check_keypad, iso7816_verify_kp)
30718         (iso7816_change_reference_data_kp): Remove PADLEN.
30719
30720         * scd/iso7816.h (struct iso7816_pininfo_s): Remove PADLEN, PADCHAR.
30721
30722         SCD: Add option enable-keypad-varlen and support for GEMPC_PINPAD.
30723         + commit d9f6cc7502793ed41928042cc2f968c8c7effc22
30724         * scd/scdaemon.h (opt): Add enable_keypad_varlen.
30725         * scd/scdaemon.c (cmd_and_opt_values): Add oEnableKeypadVarlen.
30726         (opts, main): Add oEnableKeypadVarlen.
30727         * scd/ccid-driver.c (GEMPC_PINPAD): New.
30728         (ccid_transceive_secure): Add enable_varlen handling.
30729         Enable GEMPC_PINPAD.
30730
30731 2013-01-30  Werner Koch  <wk@gnupg.org>
30732
30733         Remove unused status codes.
30734         + commit 50a7badbdacac8ba472b35090c1aab4568434d04
30735         * common/status.h (STATUS_BEGIN_STREAM, STATUS_END_STREAM)
30736         (STATUS_SIEXPIRED): Remove unused codes.
30737
30738         gpg: Add status line PINENTRY_LAUNCHED.
30739         + commit 1cd6445eec4c3642ad92afb02f3563a01cc10c10
30740         * common/status.h (STATUS_PINENTRY_LAUNCHED): New.
30741         * g10/server.c (server_local_s): Add field allow_pinentry_notify.
30742         (option_handler): Add option "allow-pinentry-notify".
30743         (gpg_proxy_pinentry_notify): New.
30744         * g10/call-agent.c (default_inq_cb): Factor code out to the new
30745         function.
30746
30747 2013-01-25  NIIBE Yutaka  <gniibe@fsij.org>
30748
30749         agent: Fix a bug of handling return code from npth_join.
30750         + commit 19994466449a93704d38d429ca1ea36f63da0bf0
30751         * agent/call-pinentry.c (agent_popup_message_stop): Fix npth_join
30752         return code.
30753
30754 2013-01-11  Christian Aistleitner  <christian@quelltextlich.at>
30755
30756         gpg: Fix honoring --cert-digest-algo when recreating a cert.
30757         + commit 60c58766aeb847b769372fa981f79abac6014500
30758         * g10/sign.c (update_keysig_packet): Override original signature's
30759         digest algo in hashed data and for hash computation.
30760
30761 2013-01-11  Werner Koch  <wk@gnupg.org>
30762
30763         Fix spurious cruft from configure summary output.
30764         + commit 7a638c094fa1aa7ed1d9caf085af9980a2664d64
30765         * configure.ac (build_scdaemon_extra): Remove $tmp cruft.
30766
30767 2013-01-11  NIIBE Yutaka  <gniibe@fsij.org>
30768
30769         SCD: Hold lock for pinpad input.
30770         + commit 4dddf32c83f52483d95d7770232e9e808558e702
30771         * scd/apdu.c (apdu_check_keypad, apdu_keypad_verify)
30772         (apdu_keypad_modify): Hold lock to serialize communication.
30773
30774 2013-01-08  Werner Koch  <wk@gnupg.org>
30775
30776         kbx: Switch from MD5 to SHA-1 for the checksum.
30777         + commit b11f84b858bad867f1062977a7aba30299157e90
30778         * kbx/keybox-blob.c (put_membuf): Use a NULL buf to store zero bytes.
30779         (create_blob_finish): Write just the needed space.
30780         (create_blob_finish): Switch to SHA-1.
30781         * kbx/keybox-dump.c (print_checksum): New.
30782         (_keybox_dump_blob): Print the checksum and the verification status.
30783
30784         gpg: Cache keybox searches.
30785         + commit 492792378dc7a79316ef742b2ffaa46c6cda282a
30786         * common/iobuf.c (iobuf_seek): Fix for temp streams.
30787         * g10/pubkey-enc.c (get_session_key, get_it): Add some log_clock calls.
30788         * g10/keydb.c (dump_search_desc): New.
30789         (enum_keyblock_states, struct keyblock_cache): New.
30790         (keyblock_cache_clear): New.
30791         (keydb_get_keyblock, keydb_search): Implement a keyblock cache.
30792         (keydb_update_keyblock, keydb_insert_keyblock, keydb_delete_keyblock)
30793         (keydb_rebuild_caches, keydb_search_reset): Clear the cache.
30794
30795         Make log_clock easier to read.
30796         + commit 5c565512b8af73bee2a176530663154b9277ef1c
30797         * common/logging.c (log_clock): Print in microseconds.
30798
30799         gpg: Remove a function wrapper.
30800         + commit f3f5721e6843a08d1011875400f385b8cd5fe226
30801         * g10/keydb.h (keydb_search): Remove macro.
30802         * g10/keydb.c (keydb_search2): Rename to keydb_search.  Change all
30803         callers.
30804
30805 2013-01-08  NIIBE Yutaka  <gniibe@fsij.org>
30806
30807         SCD: Support not-so-smart card readers.
30808         + commit a776f660363d20b6cc023609c4547e0aa8825d97
30809         * scd/ccid-driver.c (struct ccid_driver_s): Add auto_voltage,
30810         auto_param, and auto_pps.
30811         (parse_ccid_descriptor): Set auto_voltage, auto_param, and auto_pps.
30812         Support non-autoconf readers.
30813         (update_param_by_atr): New.
30814         (ccid_get_atr): Use 5V for PowerOn when auto_voltage is not supported.
30815         Use 0x10 when nonnull_nad for SetParameters.
30816         Call update_param_by_atr for parsing ATR, and use param for
30817         SetParameters.
30818         Send PPS if reader requires it and card is negotiable.
30819         When bNadValue in the return values of SetParameters == 0,
30820         clear handle->nonnull_nad flag.
30821
30822 2013-01-07  Werner Koch  <wk@gnupg.org>
30823
30824         gpg: Set the node flags while retrieving a keyblock.
30825         + commit f6d7b3f1ee5eed32bc3257c99cb878091d26c482
30826         * g10/keydb.c (parse_keyblock_image): Add args PK_NO and UID_NO and
30827         set the note flags accordingly.
30828         (keydb_get_keyblock): Transfer PK_NO and UID_NO to parse_keyblock_image.
30829         * kbx/keybox-search.c (blob_cmp_fpr, blob_cmp_fpr_part)
30830         (blob_cmp_name, blob_cmp_mail): Return the key/user number.
30831         (keybox_search): Set the key and user number into the found struct.
30832         (keybox_get_keyblock): Add args R_PK_NO and R_UID_NO and set them from
30833         the found struct.
30834
30835         New function log_clock.
30836         + commit 0baedfd25a4bdc6c8e7aefbd67006b063e2dc33f
30837         * common/logging.c (log_clock): New.
30838         * g10/gpg.c (set_debug): Print clock debug flag.
30839         * g10/options.h (DBG_CLOCK_VALUE, DBG_CLOCK): New.
30840
30841         gpg: Allow searching for user ids in a keybox.
30842         + commit fb31462e7e92d4b19256e6fd40b1b6ffcef2676c
30843         * kbx/keybox-search.c (blob_cmp_name): Add arg X509 and adjust for PGP
30844         use.  Change callers.
30845         (blob_cmp_mail): Add arg X509 and find the mailbox offset for PGP.
30846         Chnage callers.
30847         (has_subject_or_alt): Rename to has_username.
30848         (has_username): Allow blobtype PGP.
30849         (has_mail): Ditto.
30850
30851         gpg: Allow generation of more than 4096 keys in one run.
30852         + commit 7d00e52bd58d9e40c18dcc0122b2c236ef3318f5
30853         * g10/getkey.c (cache_public_key): Make room in the cache if needed.
30854
30855 2013-01-07  NIIBE Yutaka  <gniibe@fsij.org>
30856
30857         Update Japanese Translation.
30858         + commit bb51edc31e6595e38fcbd91d470de57d3a1a7150
30859         * po/ja.po: Fix wrong translations for designated revocation.
30860         Reported by Hideki Saito.
30861
30862         Conflicts:
30863                 po/ja.po
30864
30865 2013-01-05  NIIBE Yutaka  <gniibe@fsij.org>
30866
30867         Update Japanese Translation.
30868         + commit 05a4458e5721a0afd600f0ec908e739fa83d58f2
30869         * po/ja.po: Fix fuzzy translations.
30870
30871 2013-01-03  NIIBE Yutaka  <gniibe@fsij.org>
30872
30873         Update Japanese Translation.
30874         + commit 709a8f8125b9ba5e1ad1e6268cca5ac96d478f63
30875         * po/ja.po: Update with POT.
30876
30877         Update Japanese Translation.
30878         + commit 0fae789c4125dd8492ed25bd6728b5ac98f19729
30879         * po/ja.po: Start from the new one of 2.0.
30880
30881 2012-12-28  Werner Koch  <wk@gnupg.org>
30882
30883         gpg: Add signature cache support to the keybox.
30884         + commit 79f08fb0699f4a065e3a29bc7676a90534d7ba60
30885         * g10/keydb.c (parse_keyblock_image): Add arg SIGSTATUS.
30886         (keydb_get_keyblock): Handle it.
30887         (build_keyblock_image): Add arg SIGSTATUS.
30888         (keydb_insert_keyblock): Handle it.
30889         * kbx/keybox-blob.c (pgp_create_sig_part): Add arg SIGSTATUS.
30890         (_keybox_create_openpgp_blob): Ditto.
30891         * kbx/kbxutil.c (import_openpgp): Adjust for above change.
30892         * kbx/keybox.h (KEYBOX_FLAG_SIG_INFO): New.
30893         * kbx/keybox-search.c (_keybox_get_flag_location): Handle new flag.
30894         (keybox_get_keyblock): Add arg R_SIGSTATUS.
30895         * kbx/keybox-update.c (keybox_insert_keyblock): Add arg SIGSTATUS.
30896
30897         kbxutil: Improve format of the Sig-Expire lines.
30898         + commit 564d10ea5cd29685a00a4096d69ae2476b60506f
30899         * kbx/keybox-dump.c (_keybox_dump_blob): Print the expirate timestamp.
30900
30901         gpg: First working support for keyboxes.
30902         + commit a9863834244fc2a58d8950977243702d12e420a1
30903         * g10/getkey.c (get_pubkey_fast): Improve the assertion.
30904         * kbx/keybox.h: Include iobuf.h.
30905         * kbx/keybox-blob.c (keyboxblob_uid): Add field OFF.
30906         (KEYBOX_WITH_OPENPGP): Remove use of this macro.
30907         (pgp_create_key_part_single): New.
30908         (pgp_temp_store_kid): Change to use the keybox-openpgp parser.
30909         (pgp_create_key_part): Ditto.
30910         (pgp_create_uid_part): Ditto.
30911         (pgp_create_sig_part): Ditto.
30912         (pgp_create_blob_keyblock): Ditto.
30913         (_keybox_create_openpgp_blob): Ditto.
30914         * kbx/keybox-search.c (keybox_get_keyblock): New.
30915         * kbx/keybox-update.c (keybox_insert_keyblock): New.
30916         * g10/keydb.c (parse_keyblock_image):
30917         (keydb_get_keyblock): Support keybox.
30918         (build_keyblock_image): New.
30919         (keydb_insert_keyblock): Support keybox.
30920
30921         * kbx/kbxutil.c (import_openpgp, main): Add option --dry-run and print
30922         a kbx file to stdout.
30923
30924         * kbx/keybox-file.c (_keybox_read_blob2): Allow keyblocks up to 10^6
30925         bytes.
30926
30927         kbxutil: Print algo number and fold similar lines.
30928         + commit f7495f1004071a0ceac394007bb37f88d7a3467f
30929         * kbx/keybox-defs.h (_keybox_openpgp_key_info): Add field ALGO.
30930         * kbx/keybox-openpgp.c (parse_key): Store algo.
30931         * kbx/kbxutil.c (dump_openpgp_key): Print algo number.
30932         * kbx/keybox-dump.c (_keybox_dump_blob): Print identical Sig-Expire
30933         value lines with a range of indices.
30934
30935 2012-12-27  Werner Koch  <wk@gnupg.org>
30936
30937         gpg: First patches to support a keybox storage backend.
30938         + commit 91e61d52539b1808e209c43e51465c76cebb06f9
30939         * kbx/keybox-defs.h (_keybox_write_header_blob): Move prototype to ..
30940         * kbx/keybox.h: here.
30941         * kbx/keybox-init.c (keybox_lock): Add dummy function
30942         * g10/keydb.c: Include keybox.h.
30943         (KeydbResourceType): Add KEYDB_RESOURCE_TYPE_KEYBOX.
30944         (struct resource_item): Add field kb.
30945         (maybe_create_keyring_or_box): Add error descriptions to diagnostics.
30946         Add arg IS_BOX.  Write a header for a new keybox file.
30947         (keydb_add_resource): No more need for the force flag.  Rename the
30948         local variable "force" to "create".  Add URL scheme "gnupg-kbx".  Add
30949         magic test to detect a keybox file.  Add basic support for keybox.
30950         (keydb_new, keydb_get_resource_name, keydb_delete_keyblock)
30951         (keydb_locate_writable, keydb_search_reset, keydb_search2): Add
30952         support for keybox.
30953         (lock_all, unlock_all): Ditto.
30954         * g10/Makefile.am (needed_libs): Add libkeybox.a.
30955         (gpg2_LDADD, gpgv2_LDADD): Add KSBA_LIBS as a workaround.
30956
30957         * g10/keydb.h (KEYDB_RESOURCE_FLAG_PRIMARY)
30958         KEYDB_RESOURCE_FLAG_DEFAULT, KEYDB_RESOURCE_FLAG_READONLY): New.
30959         * g10/gpg.c, g10/gpgv.c (main): Use new constants.
30960
30961 2012-12-20  Werner Koch  <wk@gnupg.org>
30962
30963         gpg: Import only packets which are allowed in a keyblock.
30964         + commit f0b33b6fb8e0586e9584a7a409dcc31263776a67
30965         * g10/import.c (valid_keyblock_packet): New.
30966         (read_block): Store only valid packets.
30967
30968 2012-12-19  Werner Koch  <wk@gnupg.org>
30969
30970         gpg: Make commit 2b3cb2ee actually work.
30971         + commit d61f7402f2b0f6dd288e403ed9408fd65e617f85
30972         * g10/sign.c (update_keysig_packet): Use digest_algo.
30973
30974         (cherry-picked from commit d23ec86095714d388acac14b515445fe69f019e9)
30975
30976         gpg: Suppress "public key already present" in quiet mode.
30977         + commit 8325d616593187ff227853de0295e3269b96edcb
30978         * g10/pkclist.c (find_and_check_key, build_pk_list): Print a
30979         diagnostic only in non-quiet mode.
30980
30981 2012-12-18  Werner Koch  <wk@gnupg.org>
30982
30983         common: Add meta option ignore-invalid-option.
30984         + commit 41d564333d35c923f473aa90625d91f8fe18cd0b
30985         * common/argparse.c (iio_item_def_s, IIO_ITEM_DEF): New.
30986         (initialize): Init field IIO_LIST.
30987         (ignore_invalid_option_p): New.
30988         (ignore_invalid_option_add): New.
30989         (ignore_invalid_option_clear): New.
30990         (optfile_parse): Implement meta option.
30991
30992 2012-12-13  Werner Koch  <wk@gnupg.org>
30993             Hans of Guardian  <hans@guardianproject.info>
30994
30995         utf8conv.c: Add hacks for Android.
30996         + commit 6177fb3c87f485fb654bbba492d04508755718b3
30997         * common/utf8conv.c [HAVE_ANDROID_SYSTEM]: Do not include iconv.h.
30998         (iconv_open, iconv_close, load_libiconv) [HAVE_ANDROID_SYSTEM]: New
30999         dummy functions.
31000         (set_native_charset) [HAVE_ANDROID_SYSTEM]: Force use of "utf-8".
31001         (jnlib_iconv_open) [HAVE_ANDROID_SYSTEM]: Act the same as under W32.
31002         (jnlib_iconv) [HAVE_ANDROID_SYSTEM]: Ditto.
31003         (jnlib_iconv_close) [HAVE_ANDROID_SYSTEM]: Ditto.
31004
31005 2012-12-13  NIIBE Yutaka  <gniibe@fsij.org>
31006
31007         SCD: Fix the process of writing key or generating key.
31008         + commit e7dca3e83ebd6df0a7ea55e97c3cd6e91be90af5
31009         * scd/app-openpgp.c (store_fpr): Flush KEY-FPR and KEY-TIME.
31010
31011 2012-12-12  Werner Koch  <wk@gnupg.org>
31012
31013         ssh: Support ECDSA keys.
31014         + commit 649b31c663b8674bc874b4ef283d714a13dc8cfe
31015         * agent/command-ssh.c (SPEC_FLAG_IS_ECDSA): New.
31016         (struct ssh_key_type_spec): Add fields CURVE_NAME and HASH_ALGO.
31017         (ssh_key_types): Add types ecdsa-sha2-nistp{256,384,521}.
31018         (ssh_signature_encoder_t): Add arg spec and adjust all callers.
31019         (ssh_signature_encoder_ecdsa): New.
31020         (sexp_key_construct, sexp_key_extract, ssh_receive_key)
31021         (ssh_convert_key_to_blob): Support ecdsa.
31022         (ssh_identifier_from_curve_name): New.
31023         (ssh_send_key_public): Retrieve and pass the curve_name.
31024         (key_secret_to_public): Ditto.
31025         (data_sign): Add arg SPEC and change callers to pass it.
31026         (ssh_handler_sign_request): Get the hash algo from SPEC.
31027         * common/ssh-utils.c (get_fingerprint): Support ecdsa.
31028
31029         * agent/protect.c (protect_info): Add flag ECC_HACK.
31030         (agent_protect): Allow the use of the "curve" parameter.
31031         * agent/t-protect.c (test_agent_protect): Add a test case for ecdsa.
31032
31033         * agent/command-ssh.c (ssh_key_grip): Print a better error code.
31034
31035 2012-12-11  Werner Koch  <wk@gnupg.org>
31036
31037         ssh: Rewrite a function for better maintainability.
31038         + commit f76a0312c3794afd81fe1e172df15eb0612deae0
31039         * agent/command-ssh.c (ssh_signature_encoder_dsa): Rewrite.
31040
31041 2012-12-10  Werner Koch  <wk@gnupg.org>
31042
31043         ssh: Improve key lookup for many keys.
31044         + commit d2777f84be0ded5906a9bec3bc23cfed0a9be02f
31045         * agent/command-ssh.c: Remove dirent.h.
31046         (control_file_s): Add struct item.
31047         (rewind_control_file): New.
31048         (search_control_file): Factor code out to ...
31049         (read_control_file_item): New.
31050         (ssh_handler_request_identities): Change to iterate over entries in
31051         sshcontrol.
31052
31053         ssh: Cleanup sshcontrol file access code.
31054         + commit 25fb53ab4ae7e1c098500229c776d29b82713a20
31055         * agent/command-ssh.c (SSH_CONTROL_FILE_NAME): New macro to replace
31056         the direct use of the string.
31057         (struct control_file_s, control_file_t): New.
31058         (open_control_file, close_control_file): New.  Use them instead of
31059         using fopen/fclose directly.
31060
31061         agent: Add envvar "gnupg_SSH_AUTH_SOCK_by"
31062         + commit 36ba7845995dd3caf8faeec3e09b3ffb879fc29b
31063         * agent/gpg-agent.c (main): Pass new envar gnupg_SSH_AUTH_SOCK_by to
31064         an invoked process.
31065
31066         config: Update npth.m4.
31067         + commit ceab60b59d907354d323ace09d7b3f2d36d330fb
31068         * m4/npth.m4: Take from current npth master.
31069
31070 2012-12-04  NIIBE Yutaka  <gniibe@fsij.org>
31071
31072         Revert SCD changes of 2010-05-03.
31073         + commit 1e1326aeb8923782138e133f091afec41d969c40
31074         * scd/apdu.c (pcsc_no_service): Remove.
31075         (open_pcsc_reader_direct, open_pcsc_reader_wrapped): Remove
31076         pcsc_no_service support.
31077         (apdu_open_reader): Remove R_NO_SERVICE.
31078         * scd/apdu.h (apdu_open_reader): Remove R_NO_SERVICE.
31079         * scd/command.c (reader_disabled): Remove.
31080         (get_current_reader): Follow the change of R_NO_SERVICE.
31081         (open_card, cmd_serialno, scd_command_handler): Remove reader_disabled
31082         support.
31083         * scd/sc-copykeys.c (main): Follow the change of R_NO_SERVICE.
31084
31085         Don't keep opening unavailable card reader.
31086         + commit baf7b09e124f9eb4ca4b8ee02474ee7710a95a40
31087         * scd/command.c (update_reader_status_file): Don't call
31088         get_current_reader.
31089
31090 2012-11-30  David Shaw  <dshaw@jabberwocky.com>
31091
31092         Refresh sample keys.
31093         + commit b8eb2ab56971a309353ae2682bc6ef1357e9ac53
31094
31095
31096         Adjust awk to not add trailing whitespace.
31097         + commit 3f8ad564674431b4c0c6cff259f02248c80a6ef9
31098         * mksamplekeys: Tweak awk script to not add trailing whitespace to
31099           blank lines (makes git pre-commit hook unhappy)
31100
31101 2012-11-29  David Shaw  <dshaw@jabberwocky.com>
31102
31103         The keyserver search menu should honor --keyid-format.
31104         + commit 7602d9e3edda99b0b65ba928eef435dab04ecd09
31105         * keyserver.c (print_keyrec): Honor --keyid-format when getting back
31106           full fingerprints from the keyserver (the comment in the code was
31107           correct, the code was not).
31108
31109 2012-11-27  Werner Koch  <wk@gnupg.org>
31110
31111         Fix printing of ECC algo names in hkp keyserver listings.
31112         + commit 3d2da6c82163ffbc2e827abc4144dc3197ed53db
31113         * g10/keyserver.c (print_keyrec): Map OpenPGP algorithm ids.
31114
31115 2012-11-26  Ben Kibbey  <bjk@luxsci.net>
31116
31117         Check for inet_addr() in -lnsl.
31118         + commit 66331e138ec17e176cc3f45bb095820866d5358c
31119         * configure.ac: Check for inet_addr() in libnsl.
31120
31121 2012-11-20  Werner Koch  <wk@gnupg.org>
31122
31123         Do not use a broken ttyname.
31124         + commit 835698b72bc509565aad52b0753f1c56c1a8f062
31125         * configure.ac (HAVE_BROKEN_TTYNAME): New ac_define set for Android
31126         systems.
31127         * common/util.h (gnupg_ttyname): New macro.  Change all callers of
31128         ttyname to use this macro instead.
31129         (ttyname) [W32]: Rename to _gnupg_ttyname and use also if
31130         HAVE_BROKEN_TTYNAME is defined.
31131         * common/simple-pwquery.c (agent_send_all_options): Keep on using
31132         ttyname unless HAVE_BROKEN_TTYNAME is set.  This is because this file
31133         may be used standalone.
31134
31135 2012-11-16  Werner Koch  <wk@gnupg.org>
31136
31137         Fix non-portable use of chmod in autogen.sh.
31138         + commit e7bc5012c568da9ceb0a80a8f3fe3edf3dac9564
31139         * autogen.sh: Remove option -c from chmod.
31140
31141         Improve parsing of the GIT revision number.
31142         + commit 011faa0c68cf0c628ef581193166e9ac9bf22b71
31143         * configure.ac (mmm4_revision): Use git rev-parse.
31144
31145         Add an OpenPGP card vendor.
31146         + commit ac775780fef3ef63f896e822add9ff6ea7e5119c
31147         * g10/card-util.c (get_manufacturer): Add Yubico.
31148
31149 2012-11-06  Werner Koch  <wk@gnupg.org>
31150
31151         agent: Use wipememory instead of memset in one place.
31152         + commit 9f0e9ea80ca30269770eb955e33b54401bff917f
31153         * agent/command.c (clear_outbuf): Use wipememory.  Suggested by Ben
31154         Kibbey.
31155
31156         Allow decryption with card keys > 3072 bits.
31157         + commit 905b6a36d3ca21b2f619721e1de892398e5eb759
31158         * scd/command.c (MAXLEN_SETDATA): New.
31159         (cmd_setdata): Add option --append.
31160         * agent/call-scd.c (agent_card_pkdecrypt): Use new option for long
31161         data.
31162
31163         * scd/app-openpgp.c (struct app_local_s): Add field manufacturer.
31164         (app_select_openpgp): Store manufacturer.
31165         (do_decipher): Print a note for broken cards.
31166
31167 2012-11-02  NIIBE Yutaka  <gniibe@fsij.org>
31168
31169         agent: Fix wrong use of gcry_sexp_build_array.
31170         + commit 8f8c29d24ca13f987e6c118702b428a2051b7072
31171         * findkey.c (agent_public_key_from_file): Fix use of
31172         gcry_sexp_build_array.
31173
31174 2012-10-31  NIIBE Yutaka  <gniibe@fsij.org>
31175
31176         SCD: Upon error, open_pcsc_reader_wrapped does same as _direct.
31177         + commit 8df89f3e9cf0255f11011c2f1df0d419a5c23a8c
31178         * scd/apdu.c (PCSC_E_NO_SERVICE): New.
31179         (open_pcsc_reader_direct): Use PCSC_E_NO_SERVICE.
31180         (open_pcsc_reader_wrapped): Set pcsc_no_service.
31181
31182 2012-08-24  Werner Koch  <wk@gnupg.org>
31183
31184         Update and enable French translation.
31185         + commit 76055d49d1c8b8e4f6245e6729cae81b1eaecbf6
31186         * po/fr.po: Update.
31187         * po/LINGUAS: Enable fr.
31188
31189 2012-08-24  David Prévot  <taffit@debian.org>
31190
31191         Fix typos spotted during translations.
31192         + commit ba591e2f14c0d85ba15346ffd04b9e7d72ec89dc
31193         * agent/genkey.c: s/to to/to/
31194         * sm/*.c: s/failed to allocated/failed to allocate/
31195         * sm/certlist.c, ./dirmngr/validate.c: s/should have not/should not have/
31196         * g10/seskey.c: missing closing parenthesis
31197         * dirmngr/crlcache.c: s/may has/may have/
31198
31199         Consistency fix:
31200
31201         * g10/gpg.c, kbx/kbxutil.c, sm/gpgsm.c: uppercase after Syntax
31202         * dirmngr/dirmngr_ldap: no period in Syntax
31203         * dirmngr/dirmngr-client.c: infinitive for option description:
31204                 s/certificates are expected/expect certificates/
31205
31206         Keep previous msgids of translated messages.
31207         + commit bf95408fc33709d154cd41566d33af3ec3c48886
31208         * po/Makefile.in.in: Use --previous with msgmerge.
31209
31210 2012-08-24  Hans-Christoph Steiner  <hans@eds.org>
31211
31212         Fix build system for Android by disabling tests since its x-compiled.
31213         + commit 1da04bfb3f5714a0fa6d0b779d0d2ae4e9544b8f
31214         * configure.ac (HAVE_ANDROID_SYSTEM, RUN_TESTS): New.
31215         (AH_BOTTOM) [__ANDROID__]: Do not re-define ttyname.
31216         * Makefile.am: Depend tests on new RUN_TESTS conditional.
31217
31218 2012-08-24  Werner Koch  <wk@gnupg.org>
31219
31220         Fix left over use of jnlib on some platforms.
31221         + commit 8156a38674421deef6c2eb3e91e0186fe7fe4b26
31222         * tools/watchgnupg.c: Take mischelp.h from common/ and not jnlib/.
31223
31224 2012-06-25  NIIBE Yutaka  <gniibe@fsij.org>
31225
31226         scd: handle reader/token removal.
31227         + commit ca8eec8e28abb8473d02dbaf8d61cfb1094c5c50
31228         * scd/apdu.c (pcsc_error_to_sw): PCSC_E_UNKNOWN_READER means
31229         SW_HOST_NO_READER.
31230
31231 2012-06-05  Werner Koch  <wk@gnupg.org>
31232
31233         Change all quotes in strings and comments to the new GNU standard.
31234         + commit 096e7457ec636bcfcf128678660eb2f2e19f113a
31235         The asymmetric quotes used by GNU in the past (`...') don't render
31236         nicely on modern systems.  We now use two \x27 characters ('...').
31237
31238         The proper solution would be to use the correct Unicode symmetric
31239         quotes here.  However this has the disadvantage that the system
31240         requires Unicode support.  We don't want that today.  If Unicode is
31241         available a generated po file can be used to output proper quotes.  A
31242         simple sed script like the one used for en@quote is sufficient to
31243         change them.
31244
31245         The changes have been done by applying
31246
31247           sed -i "s/\`\([^'\`]*\)'/'\1'/g"
31248
31249         to most files and fixing obvious problems by hand.  The msgid strings in
31250         the po files were fixed with a similar command.
31251
31252 2012-05-24  Werner Koch  <wk@gnupg.org>
31253
31254         Print the hash algorithm in colon mode key listing.
31255         + commit fc00d3fcb201476b3495f47138fa35b71c52f403
31256         * g10/keylist.c (list_keyblock_colon): Print digest_algo.
31257
31258         Fix type conflict warning.
31259         + commit f8a8c71c41bc1893df8af6ce522876ccbf6240a9
31260         * g10/keylist.c: Change min_cert_level to a byte.
31261
31262 2012-05-11  Werner Koch  <wk@gnupg.org>
31263
31264         Switch to the new automagic beta numbering scheme.
31265         + commit 68777b40dcf215305a325185f6bd9cfd6dcc0542
31266         * configure.ac: Add all the require m4 magic.
31267
31268 2012-05-08  Werner Koch  <wk@gnupg.org>
31269
31270         Add tweaks for the not anymore patented IDEA algorithm.
31271         + commit b4d9f8dbc8e074cd91bbd3e2e54e2b77c9268d1a
31272         * g10/keygen.c (keygen_set_std_prefs): Include IDEA only in PGP2
31273         compatibility mode.
31274         * g10/misc.c (idea_cipher_warn): Remove.  Also remove all callers.
31275         * common/status.h (STATUS_RSA_OR_IDEA): Remove.  Do not emit this
31276         status anymore.
31277
31278         po: Update de.po.
31279         + commit 59b77f9ea7dfa4d5c74573d2186c9a3e129ab3bf
31280         * po/de.po: Update.
31281
31282         common: Remove generated files only during maintainer-clean.
31283         + commit d800fa5ce6102e069305f8e1a5d55d18ac3a1993
31284         * common/Makefile.am (CLEANFILES): Rename to MAINTAINERCLEANFILES.
31285
31286 2012-04-30  Werner Koch  <wk@gnupg.org>
31287
31288         agent: Fix deadlock in trustlist due to the switch to npth.
31289         + commit 0f02fba19df16c82ca1ad44a8cb09f952d755598
31290         * agent/trustlist.c (clear_trusttable): New.
31291         (agent_reload_trustlist): Use new function.
31292         (read_trustfiles): Require to be called with lock held.
31293         (agent_istrusted): Factor all code out to ...
31294         (istrusted_internal): new.  Add ALREADY_LOCKED arg.  Make sure the
31295         table islocked.  Do not print TRUSTLISTFLAG stati if called internally.
31296         (agent_marktrusted): Replace calls to agent_reload_trustlist by
31297         explicit code.
31298
31299 2012-04-26  NIIBE Yutaka  <gniibe@fsij.org>
31300
31301         make DNS and URI fields work in gpgsm --gen-key.
31302         + commit 8d7522837c6dba3065d24594bcdbe7b99a702cde
31303         * sm/certreqgen-ui.c (gpgsm_gencertreq_tty): Actually set mb_uri and
31304         mb_dns.avoid buffer strncpy-induced buffer overrun
31305
31306 2012-04-26  Jim Meyering  <jim@meyering.net>
31307
31308         avoid buffer strncpy-induced buffer overrun.
31309         + commit 20c9ac4df34e25f7085bb4e4ab5ea7223932f5c4
31310         * dirmngr/crlcache.c (open_dir): Ensure that both this_update
31311         and next_update member strings are NUL-terminated.
31312
31313         remove doubled words in a comment.
31314         + commit 6e3882785a629b361c57c8b9d5cad51fb234ac23
31315
31316
31317 2012-04-20  Werner Koch  <wk@gnupg.org>
31318
31319         Change license for some files in common to LGPLv3+/GPLv2+.
31320         + commit 37df3d5f593f76ddbf1b9dc6de0173b7bb85c0ad
31321         Having the LGPL on the common GnuPG code helps to share code
31322         between GnuPG and related projects (like GPGME and Libassuan).  This
31323         is good for interoperability and to reduces bugs.
31324
31325         * common/asshelp.c, common/asshelp.h, common/asshelp2.c, common/b64dec.c
31326         * common/b64enc.c, common/convert.c, common/dns-cert.c
31327         * common/dns-cert.h common/exechelp-posix.c, common/exechelp-w32.c
31328         * common/exechelp-w32ce.c, common/exechelp.h, common/get-passphrase.c
31329         * common/get-passphrase.h, common/gettime.c, common/gpgrlhelp.c
31330         * common/helpfile.c, common/homedir.c, common/http.c, common/http.h
31331         * common/i18n.c, common/init.c, common/init.h, common/iobuf.c
31332         * common/iobuf.h, common/localename.c, common/membuf.c, common/membuf.h
31333         * common/miscellaneous.c, common/openpgp-oid.c, common/openpgpdefs.h
31334         * common/percent.c, common/pka.c, common/pka.h, common/session-env.c
31335         * common/session-env.h, common/sexp-parse.h, common/sexputil.c
31336         * common/signal.c, common/srv.c, common/srv.h, common/ssh-utils.c
31337         * common/ssh-utils.h, common/sysutils.c, common/sysutils.h
31338         * common/tlv.c, common/tlv.h, common/ttyio.c, common/ttyio.h
31339         * common/userids.c, common/userids.h, common/xasprintf.c: Change
31340         license to LGPLv3+/GPLv2+/
31341
31342 2012-04-10  Ben Kibbey  <bjk@luxsci.net>
31343
31344         Fix killing PID -1.
31345         + commit bee0ac28c9c8027540ae56900b9f85e0bd555f1d
31346         When the KILLSCD command had been sent a race condition would occur
31347         causing PID -1 getting killed, which on Linux seems to terminate all
31348         applications for the current user.
31349
31350 2012-04-05  Werner Koch  <wk@gnupg.org>
31351
31352         Do not mix test result with progress lines.
31353         + commit f1e1387bee286c7434f0462185048872bcdb4484
31354         This makes parsing of the results easier.  Fixes bug#1400.
31355
31356         * tests/openpgp/defs.inc (progress_cancel, progress_end)
31357         (progress_new): New.
31358         * tests/openpgp/conventional-mdc.test: Use progress functions
31359         * tests/openpgp/conventional.test: Ditto.
31360         * tests/openpgp/encrypt-dsa.test: Ditto.
31361         * tests/openpgp/encrypt.test: Ditto.
31362         * tests/openpgp/sigs.test: Ditto.
31363
31364 2012-04-04  Ben Kibbey  <bjk@luxsci.net>
31365
31366         Mention status messages in the documentation.
31367         + commit 99fc61f1cf09c7f72a9037d91d3cf0cd2e035ae6
31368         Note INQUIRE_MAXLEN.
31369
31370         Document PASSWD --preset.
31371         + commit a577f06c4aecc0af5b492e15812e9150c747cbe4
31372
31373
31374         Document GENKEY options.
31375         + commit 108e8f622ef9cfa256707debec1d379ce3cf21ca
31376
31377
31378         Document PRESET_PASSPHRASE.
31379         + commit 96e107fc29db625b247022ae1bf2cbe90b939c5d
31380
31381
31382         Document CLEAR_PASSPHRASE.
31383         + commit 26b59d78c43d72fa28609fb2c0d80fb377393127
31384         And describe the --mode=normal option.
31385
31386 2012-03-27  Werner Koch  <wk@gnupg.org>
31387
31388         Fix timegm regression test.
31389         + commit 17499e761e8cd0fe867b5b5f3e42a71b6d45f954
31390         * common/t-timestuff.c (test_timegm): Change test to use January and
31391         not February or December+1.  Bug spotted by Daniel Kahn Gillmor.
31392
31393         Print warning for arguments not considered an option.
31394         + commit de01c51ecb3918f427aa76281351749c8ad07ed6
31395         GnuPG requires that options are given before other arguments.  This
31396         can sometimes be confusing.  We now print a warning if we found an
31397         argument looking alike a long option without being preceded by the
31398         stop option.  This is bug#1343.
31399
31400         * common/argparse.h (ARGPARSE_FLAG_STOP_SEEN): New.
31401         * common/argparse.c (arg_parse): Set new flag.
31402         * g10/gpg.c (main): Print the warning.
31403         * agent/gpg-agent.c (main): Ditto.
31404         * dirmngr/dirmngr.c (main): Ditto.
31405         * g13/g13.c (main): Ditto.
31406         * scd/scdaemon.c (main): Ditto.
31407         * sm/gpgsm.c (main): Ditto.
31408         * tools/gpg-connect-agent.c (main): Ditto.
31409         * tools/gpgconf.c (main): Ditto.
31410
31411 2012-03-26  Werner Koch  <wk@gnupg.org>
31412
31413         Allow compress algorithm 0.
31414         + commit 7ddbcb6b6ab8b26c8e609fcd95c2c8a89bc20a7d
31415         * g10/mainproc.c (proc_compressed): Remove superfluous check for
31416         compress algorithm 0.  Reported by pfandrade.  This is bug#1326.
31417
31418         Add mksamplekeys script.
31419         + commit 7441e622ffb3296686bd0d7f04b4051466aaad38
31420         * doc/mksamplekeys: New.
31421
31422 2012-02-28  Marcus Brinkmann  <mb@g10code.com>
31423
31424         Replace npth_yield in busy wait by npth_usleep.
31425         + commit 8f8c6594147608b1021c16fc3561feb96da5d55a
31426         * dirmngr/ldap-wrapper.c (ldap_wrapper_wait_connections): Call
31427         npth_usleep instead of npth_yield.
31428
31429 2012-02-16  Marcus Brinkmann  <mb@g10code.com>
31430
31431         Check for lber and link dirmngr_ldap to it.
31432         + commit 76ff42ef8d1232dd36bf48c1020b0b9b2afb1c7d
31433         * configure.ac (LBER_LIBS, HAVE_LBER): New variables, check for lber.
31434         * dirmngr/Makefile.am (dirmngr_lda_LDADD): Add $(LBER_LIBS).
31435
31436 2012-02-07  Werner Koch  <wk@gnupg.org>
31437
31438         agent: Add pin length field to the shadowed private key format.
31439         + commit b817ae7df947093384a25797999a9aa187e20f9c
31440         This is not yet fully implemented.  It will eventually allow to
31441         support pinpad equipped readers which do not support variable length
31442         pin lengths.
31443         * agent/protect.c (parse_shadow_info): Add optional arg R_PINLEN and
31444         parse pinlen info.  Change all callers to pass NULL for it.
31445
31446         Use new status printing functions.
31447         + commit 12ea5c904c0008a2adec2e8bbe45dac629548e7d
31448         * agent/command.c (cmd_geteventcounter): Get rid of static buffers.
31449         * scd/command.c (cmd_serialno, cmd_learn): Simplify by using
31450         print_assuan_status.
31451
31452         agent: New function agent_print_status.
31453         + commit e78585cd0f553d92f332e33810ab636758bc88a2
31454         * common/asshelp2.c (vprint_assuan_status): New.
31455         (print_assuan_status): Re-implement using above func.
31456         * agent/command.c (agent_print_status): New.
31457
31458         po: Add Ukrainian translation.
31459         + commit 8d8d740bfd73d8764a03220c0b0c949e03fea351
31460         * po/uk.po: New.
31461
31462         common: Replace macro based function calls by using DEFAULT_ERRSOURCE.
31463         + commit 13ec74481ce0137f7a60b3256cc4840073c77efa
31464         * common/dns-cert.h (get_dns_cert): Remove macro.
31465         * common/dns-cert.c (_get_dns_cert): Rename to get_dns_cert.  Replace
31466         arg ERRSOURCE by global DEFAULT_ERRSOURCE.
31467         * common/http.h (http_parse_uri, http_raw_connect, http_open)
31468         (http_open_document, http_wait_response): Remove macros.
31469         * common/http.c (_http_parse_uri, _http_raw_connect, _http_open)
31470         (_http_open_document, _http_wait_response): Remove underscore from
31471         symbols.  Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
31472         * common/ssh-utils.h (ssh_get_fingerprint)
31473         (ssh_get_fingerprint_string): Remove macros.
31474         * common/ssh-utils.h (_ssh_get_fingerprint)
31475         (_ssh_get_fingerprint_string): Remove underscore from symbols.
31476         Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
31477         * common/tlv.h (parse_ber_header, parse_sexp): Remove macros.
31478         * common/tlv.c: Include util.h.
31479         (_parse_ber_header, _parse_sexp): Remove underscore from symbols.
31480         Replace args ERRSOURCE by global DEFAULT_ERRSOURCE.
31481
31482 2012-02-06  Werner Koch  <wk@gnupg.org>
31483
31484         Add replacement hack for Android's broken ttyname.
31485         + commit 115a6ed55d1f6be33f66de6734359fa590ca3749
31486         * configure.ac (HAVE_TTYNAME) [__ANDROID__]: Add hack.
31487
31488         agent: Simplify printing of INQUIRE_MAXLEN.
31489         + commit 7981cdd1345d51fd917b2375691ead60c24db2cd
31490         * agent/command.c: Include asshelp.h.
31491         (cmd_pkdecrypt, cmd_genkey, cmd_preset_passphrase)
31492         (pinentry_loopback): Use print_assuan_status for INQUIRE_MAXLEN.
31493
31494         common: Add function print_assuan_status.
31495         + commit 1a0df8506050448f16c63666850e3ae6d94a971b
31496         * common/asshelp2.c: New.
31497         (print_assuan_status): New function.
31498         * common/Makefile.am (common_sources): Add asshelp2.c.
31499
31500         common: Add a global variable to for the default error source.
31501         + commit eb0faef81dae2cba1f62056fdc4dc2a7d58ac86a
31502         For the shared code parts it is cumbersome to pass an error sourse
31503         variable to each function.  Its value is always a constant for a given
31504         binary and thus a global variable makes things a lot easier than the
31505         former macro stuff.
31506         * common/init.c (default_errsource): New global var.
31507         (init_common_subsystems): Rename to _init_common_subsystems.  Set
31508         DEFAULT_ERRSOURCE.
31509         * common/init.h: Assert value of GPG_ERR_SOURCE_DEFAULT.
31510         (init_common_subsystems): New macro.
31511         * common/util.h (default_errsource): Add declaration.
31512         * kbx/keybox-defs.h: Add some GPG_ERR_SOURCE_DEFAULT trickery.
31513
31514 2012-02-03  Ben Kibbey  <bjk@luxsci.net>
31515
31516         Also let GENKEY and PKDECRYPT send the INQUIRE_MAXLEN status message.
31517         + commit ecda65498ac60dfde50fbbc71cd0cc321d7175a9
31518         * agent/command.c (cmd_pkdecrypt): Send the INQUIRE_MAXLEN status
31519         message before doing the inquire.
31520         (cmd_genkey): Ditto.
31521
31522 2012-02-02  Ben Kibbey  <bjk@luxsci.net>
31523
31524         Inform the client of the preset passphrase length.
31525         + commit 3f7788f2e035eb939abb27b3a53854ec0fc6178c
31526         * agent/command.c (cmd_preset_passphrase): Send the INQUIRE_MAXLEN
31527         status message before inquiring the passphrase.
31528
31529 2012-02-01  David Shaw  <dshaw@jabberwocky.com>
31530
31531         Honor --cert-digest-algo when recreating a cert.
31532         + commit 2b3cb2ee94625498e7a7f939216c9bcddef6ec20
31533         * g10/sign.c (update_keysig_packet): Honor --cert-digest-algo when
31534           recreating a cert.
31535
31536         This is used by various things in --edit-key like setpref, primary,
31537         etc.  Suggested by Christian Aistleitner.
31538
31539 2012-01-27  Werner Koch  <wk@gnupg.org>
31540
31541         gl: Add support for Android to stdint.h replacement.
31542         + commit bdde44ae8d4709e33c09781c3d37a5da2c7a5e0d
31543         * gl/stdint_.h: When included from Bionic <sys/types.h>, just include
31544         the system's <stdint.h>.
31545
31546         gpg-connect-tool: Take the string "true" as a true condition.
31547         + commit 2871422d9a889cb632f59efda4d9cd170fc9fca7
31548         * tools/gpg-connect-agent.c (main): Handle strings "true" and "yes" in
31549         conditions as expected.
31550
31551 2012-01-26  Ben Kibbey  <bjk@luxsci.net>
31552
31553         Return GPG_ERR_CARD_NOT_PRESENT when pinentry-mode=loopback.
31554         + commit cf748e8736b984194345bfd74887b35d3d23fa37
31555         Since there isn't a way to prompt the user to insert the smartcard when
31556         pinentry-mode=loopback, return GPG_ERR_CARD_NOT_PRESENT instead of
31557         GPG_ERR_NO_PIN_ENTRY.
31558
31559         * agent/divert-scd.c (ask_for_card): Return GPG_ERR_CARD_NOT_PRESENT
31560         when pinentry-mode=loopback.
31561
31562         Also check for GPG_ERR_ASS_CANCELED during an inquire.
31563         + commit 3da10eefcb09a520f11e4fae7f59a33f80ffba69
31564         Fix pinentry-mode=loopback when cancelling an inquire from scdaemon.
31565         This is similar to commit 4f21f8d but for both protocol command
31566         cancellation and pinentry cancellation.
31567
31568         * agent/call-scd.c (agent_card_pkdecrypt): Check for
31569         GPG_ERR_ASS_CANCELED.
31570         (agent_card_pksign): Ditto.
31571
31572 2012-01-25  Werner Koch  <wk@gnupg.org>
31573
31574         nPth is now a hard requirement for GnuPG.
31575         + commit 001352077cdc7e402421c77328bea1a052005673
31576         * configure.ac: Remove cruft to allow building without npth.
31577
31578         Require libassuan 2.1.0.
31579         + commit c254d0f0d13a54777a62dad8f78a8f287d6ae565
31580         * configure.ac (NEED_LIBASSUAN_VERSION): Set to 2.1.0.  This is due to
31581         the npth changes.
31582
31583         Fix strerror vs. gpg_strerror usage.
31584         + commit 2be7818c6d916a69ffdf88cce32960949a56e893
31585         This bug was introduced by the migration to npth.
31586         * agent/gpg-agent.c (handle_connections): Use strerror.
31587
31588         Add missing variable.
31589         + commit a55d2e16f1090264338dc3ad0b2afca28db27c09
31590         * agent/gpg-agent.c (handle_connections) [!W32]: Add missing variable.
31591
31592 2012-01-25  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
31593
31594         Port LDAP wrapper to NPTH.
31595         + commit 4074f966276be10a794fd63a7f443b9d974d3982
31596         * agent/gpg-agent.c (handle_connections): Handle error.
31597         * dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c: Port to NPTH.
31598
31599         Port Windows code to NPTH.
31600         + commit ccbb4c3652ee72386b8889358b829e256e1ebcda
31601         * agent/gpg-agent.c (get_agent_ssh_socket_name): Use
31602         INVALID_HANDLE_VALUE instead of 0.
31603         (handle_signal) [!HAVE_W32_SYSTEM]: Don't define.
31604         (handle_connections): Port Windows code to NPTH.
31605         * dirmngr/dirmngr.c (handle_connections): Port Windows code to NPTH.
31606         * g13/g13.c (handle_connections): Port Windows code to NPTH.
31607         * scd/scdaemon.c (handle_connections): Port Windows code to NPTH.
31608
31609         Port to npth.
31610         + commit 7a7a59782766a8bde0c3e7156d14bb2b0e4a3951
31611         * configure.ac: Don't check for PTH but for NPTH.
31612         (AH_BOTTOM): Remove PTH_SYSCALL_SOFT.
31613         (have_pth): Rename to ...
31614         (have_npth): ... this.
31615         (USE_GNU_NPTH): Rename to ...
31616         (USE_GNU_PTH): ... this.
31617         * m4/npth.m4: New file.
31618         * agent/Makefile.am, agent/cache.c, agent/call-pinentry.c,
31619         agent/call-scd.c, agent/findkey.c, agent/gpg-agent.c,
31620         agent/trustlist.c, common/Makefile.am, common/estream.c,
31621         common/exechelp-posix.c, common/exechelp-w32.c,
31622         common/exechelp-w32ce.c, common/http.c, common/init.c,
31623         common/sysutils.c, dirmngr/Makefile.am, dirmngr/crlfetch.c,
31624         dirmngr/dirmngr.c, dirmngr/dirmngr_ldap.c, dirmngr/ldap-wrapper-ce.c,
31625         dirmngr/ldap-wrapper.c, dirmngr/ldap.c, g13/Makefile.am,
31626         g13/call-gpg.c, g13/g13.c, g13/runner.c, scd/Makefile.am,
31627         scd/apdu.c, scd/app.c, scd/ccid-driver.c, scd/command.c,
31628         scd/scdaemon.c, tools/Makefile.am: Port to npth.
31629
31630 2012-01-25  Werner Koch  <wk@gnupg.org>
31631
31632         Require gitlog-to-changelog to be installed.
31633         + commit 495dc68586356891b82a2d2b6367c4131fd17f08
31634         * Makefile.am (GITLOG_TO_CHANGELOG): New.
31635         (gen-ChangeLog): Use installed version of gitlog-to-changelog.
31636
31637 2012-01-20  David Shaw  <dshaw@jabberwocky.com>
31638
31639         Changes to --min-cert-level should cause a trustdb rebuild (issue 1366)
31640         + commit deee8147aab086161c91e6aa6fb41d7148a630f6
31641         * g10/gpgv.c, g10/trustdb.c (read_trust_options): Add min_cert_level
31642
31643         * g10/trustdb.c (check_trustdb_stale): Request a rebuild if
31644           pending_check_trustdb is true (set when we detect a trustdb
31645           parameter has changed).
31646
31647         * g10/keylist.c (public_key_list): Use 'l' in the "tru" with-colons
31648           listing for min_cert_level not matching.
31649
31650         * g10/tdbio.c (tdbio_update_version_record, create_version_record,
31651           tdbio_db_matches_options, tdbio_dump_record, tdbio_read_record,
31652           tdbio_write_record): Add a byte for min_cert_level in the tdbio
31653           version record.
31654
31655 2012-01-20  Werner Koch  <wk@gnupg.org>
31656
31657         estream: Fix unclean usage of realloc.
31658         + commit e97e2ced6cf3ee295a3cc9f8968969a1910380ea
31659         * common/estream-printf.c (_ESTREAM_PRINTF_MALLOC): Remove.
31660         (_ESTREAM_PRINTF_FREE): Remove.
31661         (_ESTREAM_PRINTF_REALLOC): New.
31662         (fixed_realloc) [!_ESTREAM_PRINTF_REALLOC]): New.
31663         (estream_vasprintf): Use my_printf_realloc instead of my_printf_malloc
31664         and my_printf_free.
31665         (dynamic_buffer_out): Use my_printf_realloc instead of realloc.
31666
31667         Do not copy default merge commit log entries into the ChangeLog.
31668         + commit 7589e43b21c8d80c5a57ecb6eb78dfcd0b5dac46
31669         * scripts/gitlog-to-changelog: Skip merge commits.
31670
31671 2012-01-18  Ben Kibbey  <bjk@luxsci.net>
31672
31673         Add the INQUIRE_MAXLEN status message.
31674         + commit ae981dd8f454e2a8bbc6429bed5abc5e87cc83d5
31675         This status message is used to inform the client of the maximum length
31676         of an inquired passphrase and is used in pinentry-mode=loopback.
31677
31678         * agent/command.c (pinentry_loopback): Send the INQUIRE_MAXLEN status
31679         message before doing the inquire.
31680
31681 2012-01-16  Jim Meyering  <meyering@redhat.com>
31682
31683         yat2m: don't dereference pointer to freed memory.
31684         + commit 4402dc3f0a5c5d0f26ed2ae97f9cda9cf4e695fa
31685         * doc/yat2m.c (top_parse_file): Correct macrolist-freeing loop.
31686
31687         gpg-agent: fix lc-messages handling not to change Xauthority setting.
31688         + commit 37801918cb916ae8c641e003f204dcc70cccb29c
31689         * agent/gpg-agent.c (main): Supply omitted "break" statement for
31690         lc-messages option.  Otherwise, control would fall through to the
31691         following oXauthority case and use the same value there.
31692
31693 2012-01-15  Werner Koch  <wk@gnupg.org>
31694
31695         Fix indentation.
31696         + commit 75a402fc25e4ec9659723dd58306aff3415736f4
31697
31698
31699 2012-01-14  Ben Kibbey  <bjk@luxsci.net>
31700
31701         Fix scdaemon pinentry inquire cancelation.
31702         + commit 4f21f8d6e109eae111d2da91f4c946afda4174e4
31703         Similar to commit 29af488 but also fixes PKDECRYPT and PKSIGN.
31704
31705         * agent/call-scd.c (agent_card_pkdecrypt): Check for GPG_ERR_CANCELED
31706         when returning from the PKDECRYPT operation of scdaemon and cancel the
31707         inquire.
31708         (agent_card_pksign): Ditto.
31709         (cancel_inquire): New.
31710
31711 2012-01-11  Werner Koch  <wk@gnupg.org>
31712
31713         gpg: Fix segv with RSA_S keys.
31714         + commit 30ec869b8c63f1edcc58110ed20b83b0e77248f8
31715         * g10/misc.c (pubkey_get_npkey, pubkey_get_nskey)
31716         (pubkey_get_nsig, pubkey_get_nenc): Map all RSA algo ids to
31717         GCRY_PK_RSA.
31718
31719         estream: Avoid printing leading zeroes by %p on 32 bit systems.
31720         + commit b42bc48dfb4b6d4f745eb02d8de4f4dcffdacf48
31721         * common/estream-printf.c (pr_pointer): Synchronize definition of
31722         AULONG with its use.
31723
31724 2012-01-11  David Shaw  <dshaw@jabberwocky.com>
31725
31726         Refresh sample keys.
31727         + commit 860861279bc17dd80eecc9631c4ae5d161a335fd
31728
31729
31730 2012-01-10  David Shaw  <dshaw@jabberwocky.com>
31731
31732         Adapt HKP fix for fingerprint/long keyid retrievals for dirmngr.
31733         + commit 3f59561cee635c6801e0a59d3abff1c064fcbdbe
31734         * dirmngr/ks-engine-hkp.c (ks_hkp_get): Use the longest valid keyid form
31735
31736 2012-01-06  Werner Koch  <wk@gnupg.org>
31737
31738         gpg: Make the double space in the middle of a fingerprint optional.
31739         + commit 957fe728466893bc63f5ccad197d3e245dca4bf3
31740         This change might help to c+p a fingerprint from an HTML page without
31741         being enclosed in a "pre" tag.
31742         * common/userids.c (classify_user_id): Skip a second blank in the
31743         middle of a fingerprint.
31744
31745         gpg: Allow use of a standard space separated fingerprint.
31746         + commit 372fb4fc0661014ccd9275c89e6da2208f87155f
31747         * common/userids.c (classify_user_id): Check for space separated GPG
31748         fingerprint.
31749
31750 2012-01-06  NIIBE Yutaka  <gniibe@fsij.org>
31751
31752         Merge ccid_driver_improvement branch.
31753         + commit 5988c8bfb7eafaca53c8abeb793f189acd3177c6
31754         * scd/apdu.c (ccid_keypad_operation): Rename from ccid_keypad_verify.
31755         (open_ccid_reader): Use ccid_keypad_operation for verify and modify.
31756
31757         * scd/ccid-driver.c (VENDOR_VASCO, VASCO_920): New.
31758         (ccid_transceive_apdu_level): Permit sending packet where
31759         apdulen <= 289.  Support receiving packets in a chain.
31760         (ccid_transceive_secure): Maximum is 15 for VASCO DIGIPASS 920.
31761         Support keypad_modify method such as CHANGE_REFERENCE_DATA: 0x24.
31762
31763 2012-01-03  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
31764
31765         Silence gcc warning.
31766         + commit ed432f030e604f7b2fd4a79c2110d92b9cde7501
31767         * sm/call-dirmngr.c (get_cached_cert): Make sure buflen is initialized.
31768
31769         Revert last change, add comment about link() return values.
31770         + commit ff2095ad7b4be7eaf9468b6ef39fd979527ecc4f
31771         * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Do not check
31772         return value of link().
31773
31774         Fix compiler warnings.
31775         + commit 0dce26778ef8abd4fc40de689d7ec9b720d26430
31776         * common/dotlock.c (use_hardlinks_p, dotlock_take_unix): Check return
31777         value of link().
31778         * g13/g13.c: Make sure err is initialized.
31779         * scd/scdaemon.c (main) [!USE_GCRY_THREAD_CBS]: Do not define ERR.
31780
31781         Fix last change: Only set gcrypt thread callback for older versions.
31782         + commit 61ccd8d92d9d3b8ba0eca3c2969d7f6f37e16405
31783         * dirmngr/dirmngr.c, g13/g13.c: Rename FIX_GCRY_PTH_INIT to
31784         USE_GCRY_THREAD_CBS.
31785
31786 2012-01-03  Werner Koch  <wk@gnupg.org>
31787
31788         Terminate csh commands with a semicolon also for dirmngr.
31789         + commit 682df45d15661ed3544e2ed34bcb636200cc40f9
31790         * dirmngr/dirmngr.c (main): Terminate csh style output with a semicolon.
31791
31792         Terminate csh commands with a semicolon.
31793         + commit d01d9ff11f46cbd61b7b8c0e04431e4f0c4a8580
31794         Fixes bug#1386.
31795
31796         * agent/gpg-agent.c (main): Terminate csh style output with a semicolon.
31797         * scd/scdaemon.c: Ditto.
31798
31799 2012-01-02  Marcus Brinkmann  <marcus.brinkmann@ruhr-uni-bochum.de>
31800
31801         Only set gcrypt thread callback for older version of gcrypt.
31802         + commit a2d9e48fcca6cfc2dfadef6dbd3579a30314676b
31803         * agent/gpg-agent.c, dirmngr/dirmngr.c, g13/g13.c, scd/scdaemon.c
31804         (USE_GCRY_THREAD_CBS): New macro, defined if
31805         GCRY_THREAD_OPTION_VERSION is 0.
31806         (fixed_gcry_pth_init) [!USE_GCRY_THREAD_CBS]: Don't define.
31807         (main) [!USE_GCRY_THREAD_CBS]: Do not install thread callbacks.
31808
31809 2011-12-28  David Shaw  <dshaw@jabberwocky.com>
31810
31811         Use the longest key ID available when talking to a HKP server.
31812         + commit c6aaf024651c7d55ac9fb77a53c084efb3adc1a9
31813         This is issue 1340.  Now that PKSD is dead, and SKS supports long key
31814         IDs, this is safe to do.  Patch from Daniel Kahn Gillmor
31815         <dkg@fifthhorseman.net>.
31816
31817 2011-12-20  Werner Koch  <wk@gnupg.org>
31818
31819         Post-release version number update.
31820         + commit 97d1c884e62bba94e42bb5b2bb13cd3880334c31
31821
31822
31823         Release 2.1.0beta3.
31824         + commit 604c130a85d4203b9d84137a42673aeaff1c0bd1
31825
31826
31827         Prepare for the beta3 release.
31828         + commit 8e47f1e576f70d4dbe966523057fe3078006ae8b
31829
31830
31831         po: Update the German translation.
31832         + commit 6f02c143440865781b4e3c1753e24e55a0de40e4
31833
31834
31835         Add the STEED Self-Signing Nonthority certificate.
31836         + commit fe2f1826991e8130f727ee15df1a4651f679752f
31837         * doc/com-certs.pem: Install it when creating a keybox.
31838
31839         faq: Add section on US export restrictions.
31840         + commit 779611494dbd187d09b05d2eb10faabd31a70156
31841
31842
31843         Require Libassuan 2.0.3.
31844         + commit 366512abe44d9e71bb2c699c29477afa6ac71cdd
31845         * configure.ac: Require Libassuan 2.0.3.
31846         * agent/call-scd.c (ASSUAN_CONVEY_COMMENTS): Remove macro replacement.
31847         * agent/command.c (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Remove
31848         dependency.
31849         (cmd_killagent) [ASSUAN_FORCE_CLOSE]: Ditto.
31850         * scd/command.c (cmd_killscd) [ASSUAN_FORCE_CLOSE]: Ditto.
31851
31852 2011-12-20  NIIBE Yutaka  <gniibe@fsij.org>
31853
31854         Add error log and debug log for pcsc_keypad_verify and pcsc_keypad_modify.
31855         + commit 07f20f313a0b13e5c93168a8a62ff1cbb94a4514
31856         * scd/apdu.c (pcsc_keypad_verify): Add debug log and error log.
31857         (pcsc_keypad_modify): Likewise.
31858
31859 2011-12-19  Werner Koch  <wk@gnupg.org>
31860             Ben Kibbey  <bjk@luxsci.net>
31861
31862         scd: Fix for card change returning GPG_ERR_CARD_RESET.
31863         + commit f4b7f7146349c388a2f3ce224ff2006606c66232
31864         * scd/apdu.c (apdu_connect): Do not test for zero atrlen.
31865
31866 2011-12-16  NIIBE Yutaka  <gniibe@fsij.org>
31867
31868         Don't kill pinentry by SIGKILL but let it quit by SIGINT.
31869         + commit f6251c0d0af92331388f5e9bcd1750cbadcaca8f
31870         * agent/call-pinentry.c (agent_popup_message_stop): To pinentry, send
31871         SIGINT (was: SIGKILL).
31872
31873 2011-12-15  David Shaw  <dshaw@jabberwocky.com>
31874
31875         Merge fix for issue 1331 from 1.4.
31876         + commit a98260c39f1c0ccdad004784cbc9440376766082
31877         * photoid.c (generate_photo_id): Check for the JPEG magic numbers
31878         instead of JFIF since some programs generate an EXIF header first.
31879
31880 2011-12-15  Werner Koch  <wk@gnupg.org>
31881
31882         scd: Prefer application Geldkarte over DINSIG.
31883         + commit 27089564b6453deaf7b4ffe7cc5f5f290b6d892b
31884         * scd/app.c (select_application): Reorder application tests.
31885
31886         scd: Add option --dump-atr to command APDU.
31887         + commit b22d62bd1481dfe13d60a6d16b09b9297944f063
31888         * scd/atr.c: Rewrite.
31889         * scd/Makefile.am (scdaemon_SOURCES): Add atr.c and atr.h.
31890         * scd/command.c (cmd_apdu): Add option --dump-atr.
31891
31892         estream: New function es_fclose_snatch.
31893         + commit 7737a2c269657189a583cde7f214f20871d264f8
31894         * common/estream.c (cookie_ioctl_function_t): New type.
31895         (es_fclose_snatch): New function.
31896         (COOKIE_IOCTL_SNATCH_BUFFER): New constant.
31897         (struct estream_internal): Add field FUNC_IOCTL.
31898         (es_initialize): Clear FUNC_IOCTL.
31899         (es_func_mem_ioctl): New function.
31900         (es_fopenmem, es_fopenmem_init): Init FUNC_IOCTL.
31901
31902 2011-12-14  Werner Koch  <wk@gnupg.org>
31903
31904         scd: Skip S/N reading for the "undefined" application.
31905         + commit 792e137ec7997a0ff5c54ff970611238d28d4ba8
31906         * scd/app.c (select_application): Skip serial number reading.
31907
31908         scd: Add more status word values for documentation.
31909         + commit 0bac31ee9f74a25d76b08c3e0355a338908f083a
31910
31911
31912         scd: Add the "undefined" stub application.
31913         + commit dcd64131c60efd0189aa05d5dbce6b93547b04e3
31914         * scd/app.c (select_application): Implement the "undefined"
31915         application.
31916
31917         agent: Pass comment lines from scd verbatim thru gpg-agent.
31918         + commit 45cf9de341405a228e331bd3893cbcd6b72306be
31919         * agent/call-scd.c (pass_status_thru): Pass comment lines verbatim.
31920         * tools/gpg-connect-agent.c (help_cmd_p): New.
31921         (main): Treat an "SCD HELP" the same as "HELP".
31922
31923         scd: Fix resetting and closing of the reader.
31924         + commit 2d91febbd8d30beb7eb33f7aa80ffd5691d1d3cc
31925         * scd/command.c (update_card_removed): Do no act on an invalid VRDR.
31926         (do_reset): Ignore apdu_reset error codes for no and inactive card.
31927         Close the reader before setting the slot to -1.
31928         (update_reader_status_file): Notify the application before closing the
31929         reader.
31930
31931         scd: Add debug option for reader function calls.
31932         + commit 07ea8c56b507b06d4bd70e94fa51914659afac4b
31933         * scd/scdaemon.h (DBG_READER_VALUE, DBG_READER): New.
31934         * scd/apdu.c (apdu_open_reader, apdu_close_reader)
31935         (apdu_shutdown_reader, apdu_connect, apdu_disconnect)
31936         (apdu_reset, apdu_get_atr, apdu_get_status): Add debug code.
31937         (apdu_activate): Remove this unused function.
31938
31939 2011-12-13  Werner Koch  <wk@gnupg.org>
31940
31941         scd: New option --debug-assuan-log-cats.
31942         + commit 00c760f628f4cf0fc11e79d305c172f98123f815
31943         * scd/scdaemon.c (oDebugAssuanLogCats): New.
31944         (opts): Add option --debug-assuan-log-cats.
31945         (main): Implement option.
31946         * common/asshelp.c (set_libassuan_log_cats): New.
31947
31948         scd: Introduce a virtual reader table.
31949         + commit 24e121ef261731069868ca403b818f1168237f53
31950         The vreader table makes the code more clear by explicitly talking
31951         about APDU slots and reader indices.  It also accommodates for future
31952         extensions.
31953
31954         * scd/scdaemon.h (server_control_s): Remove READER_SLOT.
31955         * scd/scdaemon.c (scd_init_default_ctrl): Do not init READER_SLOT.
31956         * scd/app.c (check_application_conflict): Add arg SLOT.
31957         * scd/command.c (slot_status_s): Rename to vreader_s.
31958         (server_local_s): Add field VREADER_IDX as replacement for
31959         the READER_SLOT in server_control_s.  Change all users.
31960         (slot_table): Rename to vreader_table.  Change all users.
31961         (vreader_slot): New.
31962         (do_reset, cmd_apdu): Map vreader to apdu slot.
31963         (get_reader_slot): Rename to get_current_reader.  Return -1 on error.
31964         (open_card): Map vreader toapdu slot.  Pass slot to
31965         check_application_conflict.
31966         (scd_command_handler): Init VREADER_IDX.
31967         (update_reader_status_file): Reset SLOT field on error.
31968
31969 2011-12-12  Werner Koch  <wk@gnupg.org>
31970
31971         scd: Retry command SERIALNO for an inactive card.
31972         + commit 11164662788036c4b15d30555ea33ec0b6f5a670
31973         * scd/command.c (cmd_serialno): Retry once for an inactive card.
31974
31975         Fix detection of card removal and insertion.
31976         + commit cd29dc0f1cf7f3bd7938ffa65bf13f9a75d8c156
31977         * scd/apdu.c (apdu_connect): Return status codes for no card available
31978         and inactive card.
31979         * scd/command.c (TEST_CARD_REMOVAL): Also test for GPG_ERR_CARD_RESET.
31980         (open_card): Map apdu_connect status to GPG_ERR_CARD_RESET.
31981
31982         gitlog-to-changelog: New option --tear-off.
31983         + commit ea0a21410b8fa460882c0f8de90b9291345fd4fc
31984         * scripts/gitlog-to-changelog: Add option --tear-off.
31985         * Makefile.am (gen-ChangeLog): Use that option.
31986
31987 2011-12-07  Werner Koch  <wk@gnupg.org>
31988
31989         gpgsm: Add new validation model "steed".
31990         + commit 8a12a2000d82acfa881e8c18d028290100bf5e43
31991         * sm/gpgsm.h (VALIDATE_FLAG_STEED): New.
31992         * sm/gpgsm.c (gpgsm_parse_validation_model): Add model "steed".
31993         * sm/server.c (option_handler): Allow validation model "steed".
31994         * sm/certlist.c (gpgsm_cert_has_well_known_private_key): New.
31995         * sm/certchain.c (do_validate_chain): Handle the
31996         well-known-private-key attribute.  Support the "steed" model.
31997         (gpgsm_validate_chain): Ditto.
31998         * sm/verify.c (gpgsm_verify): Return "steed" in the trust status line.
31999         * sm/keylist.c (list_cert_colon): Print the new 'w' flag.
32000
32001         Correct punctuation in the ChangeLog summary line.
32002         + commit 14e4fdc9f97d6f12bf563adfff1e3157305d7795
32003         * Makefile.am (gen-ChangeLog): Supply --append-dot.
32004
32005         Allow comments which will not show up in the ChangeLog.
32006         + commit cd3732841de32ce5c7841e6e158df3a5f1102f86
32007         * scripts/gitlog-to-changelog: Ignore lines after a "--" line.
32008
32009 2011-12-06  Werner Koch  <wk@gnupg.org>
32010
32011         gpgsm: Allow specification of an AuthorityKeyIdentifier.
32012         + commit 596b84a4de58def2155d3fe56462f6607f135b69
32013         * sm/certreqgen.c (pAUTHKEYID): New.
32014         (read_parameters): Add keyword Authority-Key-Id.
32015         (proc_parameters): Check its value.
32016         (create_request): Insert an Authority-Key-Id.
32017
32018         gpgsm: Allow arbitrary extensions for cert creation.
32019         + commit 5cdad8ff000152b4bd01953646bb87fe8703c70d
32020         * sm/certreqgen.c (pSUBJKEYID, pEXTENSION): New.
32021         (read_parameters): Add new keywords.
32022         (proc_parameters): Check values of new keywords.
32023         (create_request): Add SubjectKeyId and extensions.
32024         (parse_parameter_usage): Support "cert" and the encrypt alias "encr".
32025
32026         gpgsm: Fix storing of the serial number.
32027         + commit 3f284e40502d8181b0b3ea66c77cd7c1252ea781
32028         * sm/certreqgen.c (create_request): Fix hex-bin conversion.
32029
32030 2011-12-05  Werner Koch  <wk@gnupg.org>
32031
32032         Fix last change.
32033         + commit 9274d4d18281b3364fa8abaa821dddf124b105d7
32034         * agent/command.c (start_command_handler): Remove use of removed var.
32035
32036         Amend the agent code with more comments.
32037         + commit 477360e8cdc458b0a36e9c7fb52a35f27766255d
32038         * agent/command.c (server_local_s): Remove unused field MESSAGE_FD.
32039
32040 2011-12-02  Werner Koch  <wk@gnupg.org>
32041
32042         Support the Cherry ST-2000 card reader.
32043         + commit 239659d3a0b8c0c378734ca3d1e9210a02e24da7
32044         * scd/ccid-driver.c (SCM_SCR331, SCM_SCR331DI, SCM_SCR335)
32045         (SCM_SCR3320, SCM_SPR532, CHERRY_ST2000): New constants.
32046         (parse_ccid_descriptor): Use them.
32047         (scan_or_find_usb_device, ccid_transceive_secure): Handle Cherry
32048         ST-2000.  Suggested by Matthias-Christian Ott.
32049
32050         Avoid possible double free in export.c.
32051         + commit 96dc146fa17a7853277dbf3dc771c585a815c247
32052         * g10/export.c (transfer_format_to_openpgp): Avoid possible double
32053           free of LIST.  Reported by NIIBE Yutaka.
32054
32055 2011-12-02  NIIBE Yutaka  <gniibe@fsij.org>
32056
32057         Fix pinpad input support for passphrase modification.
32058         + commit bf37c32367ba149559385ee90b6435cef8bd6412
32059         * apdu.c (pcsc_keypad_verify): Have dummy Lc field with value 0.
32060         (pcsc_keypad_modify): Likewise.
32061         (pcsc_keypad_modify): It's only for ISO7816_CHANGE_REFERENCE_DATA.
32062         bConfirmPIN value is determined by the parameter p0.
32063
32064         * app-openpgp.c (do_change_pin): The flag use_keypad should be 0 when
32065         reset_mode is on, or resetcode is on.  use_keypad only makes sense for
32066         iso7816_change_reference_data_kp.
32067
32068         * iso7816.h (iso7816_put_data_kp): Remove.
32069         (iso7816_reset_retry_counter_kp): Remove.
32070         (iso7816_reset_retry_counter_with_rc_kp): Remove.
32071         (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.
32072
32073         * iso7816.c (iso7816_put_data_kp): Remove.
32074         (iso7816_reset_retry_counter_kp): Remove.
32075         (iso7816_reset_retry_counter_with_rc_kp): Remove.
32076         (iso7816_change_reference_data_kp): Add an argument: IS_EXCHANGE.
32077
32078 2011-12-01  Werner Koch  <wk@gnupg.org>
32079
32080         Add hook to check the commit log syntax.
32081         + commit 29e96e6b9a8e68e6554dd48bc2ce68ae9525d29f
32082         * autogen.sh: Install commit-msg hook for git.
32083
32084         Generate the ChangeLog from commit logs.
32085         + commit 2336b09779d313c1594acf6df3bd8a8486e90458
32086         * scripts/gitlog-to-changelog: New script.  Taken from gnulib.
32087         * scripts/git-log-fix: New file.
32088         * scripts/git-log-footer: New file.
32089         * doc/HACKING: Describe the ChangeLog policy
32090         * ChangeLog: New file.
32091         * Makefile.am (EXTRA_DIST): Add new files.
32092         (gen-ChangeLog): New.
32093         (dist-hook): Run gen-ChangeLog.
32094
32095         Rename all ChangeLog files to ChangeLog-2011.
32096
32097 2011-12-01  Werner Koch  <wk@gnupg.org>
32098
32099         NB: Changes done before December 1st, 2011 are described in
32100         per directory files named ChangeLog-2011.  See doc/HACKING for
32101         details.
32102
32103         -----
32104         Copyright (C) 2011 Free Software Foundation, Inc.
32105
32106         Copying and distribution of this file and/or the original GIT
32107         commit log messages, with or without modification, are
32108         permitted provided the copyright notice and this notice are
32109         preserved.