Fix two bugs, noticed by Mats Andersson

http://www.opensc-project.org/pipermail/opensc-devel/2009-November/012817.html



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3819 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
martin 2009-11-11 08:42:24 +00:00
parent 4dc884574e
commit 15b1ba0cd7
2 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ sc_pkcs15_bind_synthetic(sc_pkcs15_card_t *p15card)
}
}
}
if (builtin_enabled) {
else if (builtin_enabled) {
sc_debug(ctx, "no emulator list in config file, trying all builtin emulators\n");
for (i = 0; builtin_emulators[i].name; i++) {
sc_debug(ctx, "trying %s\n", builtin_emulators[i].name);

View File

@ -757,8 +757,8 @@ done:
if (strcmp(p15card->card->driver->short_name,"cardos") == 0) {
/* D-Trust cards (D-TRUST, D-SIGN) */
if (strstr(p15card->label,"D-TRUST") == 0
|| strstr(p15card->label,"D-SIGN") == 0) {
if (strstr(p15card->label,"D-TRUST") != NULL
|| strstr(p15card->label,"D-SIGN") != NULL) {
/* D-TRUST Card 2.0 2cc (standard cards, which always add
* SHA1 prefix itself */