Merge pull request #376 from dengert/piv-reverts

Fix-up changes caused by Coverity scan See #366 in PIV code
This commit is contained in:
Doug Engert 2015-02-16 10:29:36 -06:00
commit e37690aed5
2 changed files with 5 additions and 6 deletions

View File

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

View File

@ -494,11 +494,8 @@ 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
*/
compress_cert = 1;
/* fall through */
case 'C':
do_load_cert = 1;
cert_id = optarg;