mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
6502bb0d2a
commit
5516ef47a2
5 changed files with 173 additions and 161 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue