Albert Solana wrote:
Hi all,
While testing an OpenSC compiled by myself, I've found a strange
behaviour when using a smart card with a PIN greater than 8 bytes.
Any verify_pin or C_Login function returned Wrong PIN, but I was sure
I've entered it correctly.
All functionality except from it, works perfectly. Same smart card with
a PIN equal or lower than 8 bytes was accepted as a good one.
After debugging OpenSC code and googling I've found out that function
"getpass" on Solaris only returns the first 8 bytes of read buffer, and
instead of that it should be used "getpassphrase" that accepts until 256
bytes.
I've modified all getpass functions to getpassphrase and now PIN is
accepted on Solaris despite of being greater than 8 bytes.
I attach a patch fixing all getpass to getpassphrase.
I am aware that you are on a release candidate and I am not really sure
if it can still enter on it, due to, I suppose you will want to have a
look at my patch, discuss and test it.
Any suggestions will be gratefully accepted.
well, which platforms actually have a getpassphrase() function ?
Perhaps it's time to replace getpass() with something own
(getpass() isn't really nice anyway as it suppresses some signals).
Nils
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel