aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2011-12-14 16:00:50 +0000
committerWerner Koch <[email protected]>2011-12-14 16:00:50 +0000
commitdcd64131c60efd0189aa05d5dbce6b93547b04e3 (patch)
tree494a8224feaff4c8da1f4fc911c410039cbbf9cd /scd/app.c
parentagent: Pass comment lines from scd verbatim thru gpg-agent. (diff)
downloadgnupg-dcd64131c60efd0189aa05d5dbce6b93547b04e3.tar.gz
gnupg-dcd64131c60efd0189aa05d5dbce6b93547b04e3.zip
scd: Add the "undefined" stub application.
* scd/app.c (select_application): Implement the "undefined" application.
Diffstat (limited to 'scd/app.c')
-rw-r--r--scd/app.c10
1 files changed, 10 insertions, 0 deletions
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;