Verify PIN support Plug&Play

If card was reset or reader reconnected, verify can restart
transaction, as upper level will not cache PIN in this case.



git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3508 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
alonbl 2008-05-02 17:56:52 +00:00
parent e237574742
commit 96b0f4a670
1 changed files with 2 additions and 0 deletions

View File

@ -203,6 +203,8 @@ int sc_pkcs15_verify_pin(struct sc_pkcs15_card *p15card,
card = p15card->card;
r = sc_lock(card);
if (r == SC_ERROR_CARD_RESET || r == SC_ERROR_READER_REATTACHED)
r = sc_lock(card);
SC_TEST_RET(card->ctx, r, "sc_lock() failed");
/* the path in the pin object is optional */
if (pin->path.len > 0) {