1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg,sm: Add STATUS_ERROR keydb_search and keydb_add-resource.

* g10/keydb.c (keydb_add_resource): Make ANY_REGISTERED
file-global.  Write a STATUS_ERROR.
(maybe_create_keyring_or_box): Check for non-accessible but existant
file.
(keydb_search): Write a STATUS_ERROR if no keyring has been registered
but continue to return NOT_FOUND.
* sm/keydb.c (keydb_add_resource): Rename ANY_PUBLIC to ANY_REGISTERED
and make file-global.  Write a STATUS_ERROR.
(keydb_search): Write a STATUS_ERROR if no keyring has been registered
but continue to return NOT_FOUND.  Also add new arg CTRL and change
all callers to pass it down.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2016-11-10 17:01:19 +01:00
parent c8044c6e33
commit 5d13581f47
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
17 changed files with 163 additions and 99 deletions

View file

@ -967,7 +967,7 @@ learn_cb (void *opaque, const void *buffer, size_t length)
{
int existed;
if (!keydb_store_cert (cert, 0, &existed))
if (!keydb_store_cert (parm->ctrl, cert, 0, &existed))
{
if (opt.verbose > 1 && existed)
log_info ("certificate already in DB\n");