Commited in [3400]
Thanks!
On Feb 29, 2008, at 10:35 AM, Alon Bar-Lev wrote:
>
> Return CKR_PIN_INCORRECT and not CKR_ARGUMENTS_BAD
> at C_Login when PIN length is out of range, as PIN
> must be incorrect, and applications are not expected
> to follow PIN limitations on user entry. They
> Do epxected to do so when they set a new PIN, and
> for this reason we have CKR_PIN_LEN_RANGE out
> of C_SetPIN.
>
> Alon Bar-Lev
>
> svn diff -r 3397:3398 https://www.opensc-project.org/svn/open
sc/branches/alonbl/pkcs11-login-rv
>
> ---
>
> Index: pkcs11-login-rv/src/pkcs11/framework-pkcs15.c
>
============================================================
=======
> ---
pkcs11-login-rv/src/pkcs11/framework-pkcs15.c (revision
3397)
> +++
pkcs11-login-rv/src/pkcs11/framework-pkcs15.c (revision
3398)
>  -905,10 +905,15 
> * a valid pin (which is processed normally). --okir
*/
> if (ulPinLen == 0)
> pPin = NULL;
> - } else
> - if (ulPinLen < pin->min_length ||
> - ulPinLen > pin->max_length)
> - return CKR_ARGUMENTS_BAD;
> + } else {
> + /*
> + * If PIN is out of range,
> + * it cannot be currect.
> + */
> + if (ulPinLen < pin->min_length ||
> + ulPinLen > pin->max_length)
> + return CKR_PIN_INCORRECT;
> + }
>
> /* By default, we make the reader resource manager
keep other
> * processes from accessing the card while we're
logged in.
> _______________________________________________
> opensc-devel mailing list
> opensc-devel lists.opensc-project.org
> http://www.opensc-project.org/mailman/listinfo/opensc
-devel
--
Martin Paljak
http://martin.paljak.pri.
ee
+3725156495
_______________________________________________
opensc-devel mailing list
opensc-devel lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc
-devel
|