From dcd64131c60efd0189aa05d5dbce6b93547b04e3 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 14 Dec 2011 17:00:50 +0100 Subject: scd: Add the "undefined" stub application. * scd/app.c (select_application): Implement the "undefined" application. --- scd/app.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'scd') diff --git a/scd/app.c b/scd/app.c index 6f0d7560b..63ef4fa65 100644 --- a/scd/app.c +++ b/scd/app.c @@ -387,6 +387,14 @@ select_application (ctrl_t ctrl, int slot, const char *name, app_t *r_app) if (err && is_app_allowed ("geldkarte") && (!name || !strcmp (name, "geldkarte"))) err = app_select_geldkarte (app); + if (err && is_app_allowed ("undefined") + && (name && !strcmp (name, "undefined"))) + { + /* We switch to the "undefined" application only if explicitly + requested. */ + app->apptype = "UNDEFINED"; + err = 0; + } if (err && name) err = gpg_error (GPG_ERR_NOT_SUPPORTED); @@ -422,6 +430,8 @@ get_supported_applications (void) "p15", "dinsig", "geldkarte", + /* Note: "undefined" is not listed here because it needs special + treatment by the client. */ NULL }; int idx; -- cgit v1.2.3