diff options
author | Werner Koch <wk@gnupg.org> | 2017-02-28 20:28:56 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2017-02-28 20:30:48 +0100 |
commit | e182542e90cbeff4f2ac6c8d71061356d7cdcdea (patch) | |
tree | bb6b89c7dad607f50868749daea1af29411e0f8b /g10/tdbdump.c | |
parent | gpgscm: Improve parsing. (diff) | |
download | gnupg2-e182542e90cbeff4f2ac6c8d71061356d7cdcdea.tar.xz gnupg2-e182542e90cbeff4f2ac6c8d71061356d7cdcdea.zip |
gpg: Do not require a trustdb for decryption.
* g10/trustdb.c (init_trustdb): Add and implement arg NO_CREATE.
Change to return an error code. Change all callers to to pass False
for NO_CREATE.
(tdb_get_ownertrust): New arg NO_CREATE. Call init_trustdb to test
for a non-existing trustdb. Change all callers to to pass False for
NO_CREATE.
(tdb_get_min_ownertrust): Ditto.
* g10/trust.c (get_ownertrust_with_min): Add arg NO_CREATE. Call
init_trustdb for a quick check.
(get_ownertrust_info): Add arg NO_CREATE.
(get_ownertrust_string): Ditto.
* g10/gpgv.c (get_ownertrust_info): Adjust stub.
* g10/test-stubs.c (get_ownertrust_info): Ditto.
* g10/mainproc.c (list_node): Call get_ownertrust_info with NO_CREATE
set.
* g10/pubkey-enc.c (get_it): Ditto.
--
Fixes-commit: effa80e0b5fd8cf9e31a984afe391c2406edee8b
For details see mails on Feb 27 and 28 by dkg, gniibe, and Justus to
gnupg-devel 'test failure on git master with
decrypt-session-key.scm (and: continuous integration?)'
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/tdbdump.c')
-rw-r--r-- | g10/tdbdump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/tdbdump.c b/g10/tdbdump.c index be9d1f2e6..ab2f0724d 100644 --- a/g10/tdbdump.c +++ b/g10/tdbdump.c @@ -70,7 +70,7 @@ list_trustdb (estream_t fp, const char *username) (void)username; - init_trustdb(); + init_trustdb (0); /* For now we ignore the user ID. */ if (1) { @@ -101,7 +101,7 @@ export_ownertrust() int i; byte *p; - init_trustdb(); + init_trustdb (0); es_printf (_("# List of assigned trustvalues, created %s\n" "# (Use \"gpg --import-ownertrust\" to restore them)\n"), asctimestamp( make_timestamp() ) ); @@ -133,7 +133,7 @@ import_ownertrust( const char *fname ) int any = 0; int rc; - init_trustdb(); + init_trustdb (0); if( iobuf_is_pipe_filename (fname) ) { fp = es_stdin; fname = "[stdin]"; |