1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-05-27 21:41:23 +02:00

scd: Add the "undefined" stub application.

* scd/app.c (select_application): Implement the "undefined"
application.
This commit is contained in:
Werner Koch 2011-12-14 17:00:50 +01:00
parent 45cf9de341
commit dcd64131c6
2 changed files with 21 additions and 0 deletions

View File

@ -181,6 +181,8 @@ write hashed data to files named @code{dbgmd-000*}
trace Assuan protocol. See also option @option{--debug-assuan-log-cats}.
@item 11 (2048)
trace APDU I/O to the card. This may reveal sensitive data.
@item 12 (4096)
trace some card reader related function calls.
@end table
@item --debug-all
@ -327,6 +329,7 @@ stripping off the two leading dashes.
* DINSIG Card:: The DINSIG card application
* PKCS#15 Card:: The PKCS#15 card application
* Geldkarte Card:: The Geldkarte application
* Undefined Card:: The Undefined stub application
@end menu
@node OpenPGP Card
@ -367,6 +370,14 @@ This is a simple application to display information of a German
Geldkarte. The Geldkarte is a small amount debit card application which
comes with almost all German banking cards.
@node Undefined Card
@subsection The Undefined card application ``undefined''
This is a stub application to allow the use of the APDU command even
if no supported application is found on the card. This application is
not used automatically but must be explicitly requested using the
SERIALNO command.
@c *******************************************
@c *************** ****************

View File

@ -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;