diff --git a/src/libopensc/card-piv.c b/src/libopensc/card-piv.c index 21f83934..d25c4406 100644 --- a/src/libopensc/card-piv.c +++ b/src/libopensc/card-piv.c @@ -1557,7 +1557,8 @@ static int piv_general_mutual_authenticate(sc_card_t *card, r = sc_lock(card); if (r != SC_SUCCESS) - SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, r); + sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "sc_lock failed\n"); + goto err; /* cleanup */ locked = 1; p = sbuf; @@ -1827,7 +1828,8 @@ static int piv_general_external_authenticate(sc_card_t *card, r = sc_lock(card); if (r != SC_SUCCESS) - SC_FUNC_RETURN(card->ctx, SC_LOG_DEBUG_NORMAL, r); + sc_debug(card->ctx, SC_LOG_DEBUG_VERBOSE, "sc_lock failed\n"); + goto err; /* cleanup */ locked = 1; p = sbuf; diff --git a/src/tools/piv-tool.c b/src/tools/piv-tool.c index 053c97ba..f750c14f 100644 --- a/src/tools/piv-tool.c +++ b/src/tools/piv-tool.c @@ -494,10 +494,7 @@ int main(int argc, char * const argv[]) action_count++; break; case 'Z': - /* - -Z is the same as -C but -Z says the cert is compressed. - https://github.com/OpenSC/OpenSC/commit/3a92bf7af5aaa85fdbc0434d0a55393e68e0f98d#commitcomment-9636487 - */ + /* fall through */ compress_cert = 1; case 'C': do_load_cert = 1;