diff options
author | Werner Koch <[email protected]> | 2016-11-10 16:01:19 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2016-11-10 16:07:28 +0000 |
commit | 5d13581f4737c18430f6572dd4ef486d1ad80dd1 (patch) | |
tree | d90f1618778b7534bb195aa7c09060cb631484dd /sm/verify.c | |
parent | sm: Remove unused arg SECRET from keydb functions. (diff) | |
download | gnupg-5d13581f4737c18430f6572dd4ef486d1ad80dd1.tar.gz gnupg-5d13581f4737c18430f6572dd4ef486d1ad80dd1.zip |
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 <[email protected]>
Diffstat (limited to 'sm/verify.c')
-rw-r--r-- | sm/verify.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sm/verify.c b/sm/verify.c index 7a9f7e163..a04688375 100644 --- a/sm/verify.c +++ b/sm/verify.c @@ -270,7 +270,7 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp) we would avoid cluttering the DB with invalid certificates. */ audit_log_cert (ctrl->audit, AUDIT_SAVE_CERT, cert, - keydb_store_cert (cert, 0, NULL)); + keydb_store_cert (ctrl, cert, 0, NULL)); ksba_cert_release (cert); } @@ -417,7 +417,7 @@ gpgsm_verify (ctrl_t ctrl, int in_fd, int data_fd, estream_t out_fp) /* Find the certificate of the signer */ keydb_search_reset (kh); - rc = keydb_search_issuer_sn (kh, issuer, serial); + rc = keydb_search_issuer_sn (ctrl, kh, issuer, serial); if (rc) { if (rc == -1) |