g10: Export cleartext keys as cleartext
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>
Fri, 10 Jun 2016 20:15:36 +0000 (16:15 -0400)
committerWerner Koch <wk@gnupg.org>
Sat, 11 Jun 2016 09:18:58 +0000 (11:18 +0200)
commitc41c46fa84cabbed74a13ded51fc3a817a919367
tree1deafa79a85c35b7cb09253f4a208d04193d21e9
parenta3cb72af79ee645eda212f31ab0b266f2c3d9f29
g10: Export cleartext keys as cleartext

* g10/export.c (do_export_stream): If a key is stored by the agent in
cleartext, then try to export it as cleartext.
* tests/openpgp/export.test: For secret keys that are stored in
cleartext, test should try to export without pinentry interaction.
--

This restores the behavior of GnuPG 2.0 and 1.4 when exporting
passphraseless secret keys, and fixes the test suite accordingly.

GnuPG-bug-id: 2070, 2324
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
g10/export.c
tests/openpgp/export.test