diff --git a/src/libopensc/pkcs15-cardos.c b/src/libopensc/pkcs15-cardos.c index 752631ce..cba2123c 100644 --- a/src/libopensc/pkcs15-cardos.c +++ b/src/libopensc/pkcs15-cardos.c @@ -73,7 +73,7 @@ static int cardos_fix_token_info(sc_pkcs15_card_t *p15card) for (i = 0, sa = saa[0]; i < SC_MAX_SUPPORTED_ALGORITHMS; i++, sa++) { - if (sa->reference == 0 && sa->reference == 0 && sa->mechanism == 0 + if (sa->reference == 0 && sa->mechanism == 0 && sa->operations == 0 && sa->algo_ref == 0) break; diff --git a/src/tools/pkcs15-tool.c b/src/tools/pkcs15-tool.c index 363bfb82..bdf1764d 100644 --- a/src/tools/pkcs15-tool.c +++ b/src/tools/pkcs15-tool.c @@ -1708,7 +1708,7 @@ static void list_info(void) for (i = 0; i < SC_MAX_SUPPORTED_ALGORITHMS; i++) { struct sc_supported_algo_info * sa = &p15card->tokeninfo->supported_algos[i]; - if (sa->reference == 0 && sa->reference == 0 && sa->mechanism == 0 + if (sa->reference == 0 && sa->mechanism == 0 && sa->operations == 0 && sa->algo_ref == 0) break; printf("\t\t sc_supported_algo_info[%d]:\n", i);