aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-common.h
diff options
context:
space:
mode:
Diffstat (limited to 'scd/app-common.h')
-rw-r--r--scd/app-common.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/scd/app-common.h b/scd/app-common.h
index 2619823dc..6bf432e65 100644
--- a/scd/app-common.h
+++ b/scd/app-common.h
@@ -119,6 +119,19 @@ struct app_ctx_s {
} fnc;
};
+
+/* Helper to get the slot from an APP object. */
+static inline int
+app_get_slot (app_t app)
+{
+ /* Note that this is a similar function of the one in 2.3 which we
+ * use to make back porting easier. */
+ if (app)
+ return app->slot;
+ return -1;
+}
+
+
/*-- app-help.c --*/
unsigned int app_help_count_bits (const unsigned char *a, size_t len);
gpg_error_t app_help_get_keygrip_string (ksba_cert_t cert, char *hexkeygrip);