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

scd: Slight change to app->fnc.do_with_keygrip.

* scd/app-openpgp.c (do_with_keygrip): Return a real error code to
avoid misinterpretation of the result.  Also fix the case for a too
small buffer.
--

The only real chnage is the case for a too small buffer.  That should
in general never happen but if so we now return an error instead of
success.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-06-17 14:35:21 +02:00
parent 479c2775d5
commit 70f7b26287
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 36 additions and 13 deletions

View file

@ -126,11 +126,13 @@ struct app_ctx_s {
gpg_error_t (*check_pin) (app_t app, const char *keyidstr,
gpg_error_t (*pincb)(void*, const char *, char **),
void *pincb_arg);
int (*with_keygrip) (app_t app, ctrl_t ctrl, int action,
const char *keygrip_str);
gpg_error_t (*with_keygrip) (app_t app, ctrl_t ctrl, int action,
const char *keygrip_str);
} fnc;
};
/* Action values for app_do_with_keygrip. */
enum
{
KEYGRIP_ACTION_SEND_DATA,
@ -138,6 +140,7 @@ enum
KEYGRIP_ACTION_LOOKUP
};
/*-- app-help.c --*/
unsigned int app_help_count_bits (const unsigned char *a, size_t len);
gpg_error_t app_help_get_keygrip_string_pk (const void *pk, size_t pklen,