[opensc-devel] Pin unlock.

2010-09-08 Thread Patrik Martinsson
Hello Everybody, I just wanted to share a small program I wrote for unlocking pin's with your puk. This will *only* work if you use NetID as provider, since they added the C_unlockPIN function to make this possible. This program is intended to use for those people in our company that's

Re: [opensc-devel] Pin unlock.

2010-09-08 Thread Peter Stuge
Patrik Martinsson wrote: I just wanted to share a small program I wrote for unlocking pin's with your puk. .. Any comments, suggestions, improvements, thoughts around this method, are welcome. (Go easy on the coding-part since I'm not a programmer) The approach seems fine to me. Some things

Re: [opensc-devel] Pin unlock.

2010-09-08 Thread Martin Paljak
Hello, On Sep 8, 2010, at 10:30 AM, Patrik Martinsson wrote: I just wanted to share a small program I wrote for unlocking pin's with your puk. This will *only* work if you use NetID as provider, since they added the C_unlockPIN function to make this possible. Companies who add C_* functions

Re: [opensc-devel] Pin unlock.

2010-09-08 Thread Patrik Martinsson
Hey, Companies who add C_* functions (nCipher, NetID ... others?) or use require the use of pReserved pointers (NSS) are not nice. Better call it CX_UnblockPIN instead of C_UnblockPIN. MIME is nice, with the x- prefix for non-standard subtypes. Ok i hear you. You can do the same with

Re: [opensc-devel] Pin unlock.

2010-09-08 Thread Patrik Martinsson
Hey Peter, Is there also a limit to the number of unlock attempts? What happens when the limit is reached? Yes there is, if you enter the wrong puk 8 times your card will be locked and not usable anymore. Any memory used to store a PIN should IMO be mlock()ed before the first use. Ok

Re: [opensc-devel] Pin unlock.

2010-09-08 Thread Peter Stuge
Patrik Martinsson wrote: Is there also a limit to the number of unlock attempts? What happens when the limit is reached? Yes there is, if you enter the wrong puk 8 times your card will be locked and not usable anymore. It would be nice for usability if the PUK counter is displayed with