Hello, On Oct 17, 2010, at 1:08 AM, webmas...@opensc-project.org wrote:
> Revision: 4814 > Author: vtarasov > Date: 2010-10-16 22:08:35 +0000 (Sat, 16 Oct 2010) > > Log Message: > ----------- > ias/ecc: get 'tries_left' when printing PINs info > - SC_TEST_RET(ctx, SC_LOG_DEBUG_NORMAL, r, "PIN value do not conforms the > PIN policy"); > + /* Ignore validating of zero length PIN for the cards that supports it > */ > + if (!(pincode && !pinlen && (p15card->card->flags | > SC_CARD_FLAG_ZERO_LENGTH_PIN_ACCEPTED))) { > + r = _validate_pin(p15card, pin_info, pinlen); > + SC_TEST_RET(ctx, SC_LOG_DEBUG_NORMAL, r, "PIN value do not > conforms the PIN policy"); > + } The fact that the actual command to fetch tires left is achieved with an empty PIN in a VERIFY command, does not mean it is a PIN verification operation. Tries left fetching should be left for a separate operation. If there's a better function than the current sc_pin_cmd gateway, it could be used, but sc_pkcs15_verify_pin should not be overloaded (which should do what the expecte - verify a PIN and return SC_SUCCESS or an error). Also, this makes it possible to use the same code with cards that do NOT support empty PIN commands. -- @MartinPaljak.net +3725156495 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel