gpg,sm: Add STATUS_ERROR keydb_search and keydb_add-resource.
authorWerner Koch <wk@gnupg.org>
Thu, 10 Nov 2016 16:01:19 +0000 (17:01 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 10 Nov 2016 16:07:28 +0000 (17:07 +0100)
commit5d13581f4737c18430f6572dd4ef486d1ad80dd1
treed90f1618778b7534bb195aa7c09060cb631484dd
parentc8044c6e335f044d7386b9e8869bc4a0d3adff70
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>
17 files changed:
g10/keydb.c
sm/call-agent.c
sm/call-dirmngr.c
sm/certchain.c
sm/certlist.c
sm/decrypt.c
sm/delete.c
sm/export.c
sm/gpgsm.c
sm/gpgsm.h
sm/import.c
sm/keydb.c
sm/keydb.h
sm/keylist.c
sm/server.c
sm/sign.c
sm/verify.c