diff options
| author | Werner Koch <[email protected]> | 2017-07-28 08:37:33 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2017-07-28 08:38:57 +0000 |
| commit | 5516ef47a22dfdf9cdf56107f34d2bda9e46deec (patch) | |
| tree | c74f181b797321b36c07f2d6658f43d21171b44f /agent/agent.h | |
| parent | gpg: Tweak compliance checking for verification (diff) | |
| download | gnupg-5516ef47a22dfdf9cdf56107f34d2bda9e46deec.tar.gz gnupg-5516ef47a22dfdf9cdf56107f34d2bda9e46deec.zip | |
agent: Minor cleanup (mostly for documentation).
* agent/command.c (cmd_pksign): Change var name 'rc' to 'err'.
* agent/findkey.c (read_key_file): Ditto. Change return type to
gpg_error_t. On es_fessk failure return a correct error code.
(agent_key_from_file): Change var name 'rc' to 'err'.
* agent/pksign.c (agent_pksign_do): Ditto. Change return type to
gpg_error_t. Return a valid erro code on malloc failure.
(agent_pksign): Ditto. Change return type to gpg_error_t. replace
xmalloc by xtrymalloc.
* agent/protect.c (calculate_mic): Change return type to gpg_error_t.
(do_decryption): Ditto. Do not init RC.
(merge_lists): Change return type to gpg_error_t.
(agent_unprotect): Ditto.
(agent_get_shadow_info): Ditto.
--
While code starring for bug 3266 I found two glitches and also changed
var name for easier reading.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'agent/agent.h')
| -rw-r--r-- | agent/agent.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/agent/agent.h b/agent/agent.h index b95df5700..815d9a543 100644 --- a/agent/agent.h +++ b/agent/agent.h @@ -450,14 +450,14 @@ void agent_store_cache_hit (const char *key); /*-- pksign.c --*/ -int agent_pksign_do (ctrl_t ctrl, const char *cache_nonce, - const char *desc_text, - gcry_sexp_t *signature_sexp, - cache_mode_t cache_mode, lookup_ttl_t lookup_ttl, - const void *overridedata, size_t overridedatalen); -int agent_pksign (ctrl_t ctrl, const char *cache_nonce, - const char *desc_text, - membuf_t *outbuf, cache_mode_t cache_mode); +gpg_error_t agent_pksign_do (ctrl_t ctrl, const char *cache_nonce, + const char *desc_text, + gcry_sexp_t *signature_sexp, + cache_mode_t cache_mode, lookup_ttl_t lookup_ttl, + const void *overridedata, size_t overridedatalen); +gpg_error_t agent_pksign (ctrl_t ctrl, const char *cache_nonce, + const char *desc_text, + membuf_t *outbuf, cache_mode_t cache_mode); /*-- pkdecrypt.c --*/ int agent_pkdecrypt (ctrl_t ctrl, const char *desc_text, @@ -482,7 +482,7 @@ unsigned char get_standard_s2k_count_rfc4880 (void); int agent_protect (const unsigned char *plainkey, const char *passphrase, unsigned char **result, size_t *resultlen, unsigned long s2k_count, int use_ocb); -int agent_unprotect (ctrl_t ctrl, +gpg_error_t agent_unprotect (ctrl_t ctrl, const unsigned char *protectedkey, const char *passphrase, gnupg_isotime_t protected_at, unsigned char **result, size_t *resultlen); @@ -491,8 +491,8 @@ unsigned char *make_shadow_info (const char *serialno, const char *idstring); int agent_shadow_key (const unsigned char *pubkey, const unsigned char *shadow_info, unsigned char **result); -int agent_get_shadow_info (const unsigned char *shadowkey, - unsigned char const **shadow_info); +gpg_error_t agent_get_shadow_info (const unsigned char *shadowkey, + unsigned char const **shadow_info); gpg_error_t parse_shadow_info (const unsigned char *shadow_info, char **r_hexsn, char **r_idstr, int *r_pinlen); gpg_error_t s2k_hash_passphrase (const char *passphrase, int hashalgo, |
