aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-common.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-06-17 12:35:21 +0000
committerWerner Koch <[email protected]>2019-06-17 12:35:21 +0000
commit70f7b262877b1e751d8557dc04a09a420e9d8a8f (patch)
tree76037c7364eeb515ed129767d06c4ef82c38baf7 /scd/app-common.h
parentscd: Use the correct gpg for the v1.0 OpenPGP card hack. (diff)
downloadgnupg-70f7b262877b1e751d8557dc04a09a420e9d8a8f.tar.gz
gnupg-70f7b262877b1e751d8557dc04a09a420e9d8a8f.zip
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 <[email protected]>
Diffstat (limited to 'scd/app-common.h')
-rw-r--r--scd/app-common.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/scd/app-common.h b/scd/app-common.h
index 8a25cda55..cf51d26fe 100644
--- a/scd/app-common.h
+++ b/scd/app-common.h
@@ -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,