locked
How to retrieve smartcard User/Admin Pin attempts remaining? RRS feed

  • Question

  • Hello All,

    Currently I am working with Smart Card project.

    I am able to authenticate smartcard pin by using CRYPTO API function name -CryptSetProvParam with parameter PP_KEYEXCHANGE_PIN.

    But now, I want to retrieve remaining pin attempts (There are maximum 3 valid pin attempts after that smartcard will be block).

    Also if smartcard is already blocked then how to retrieve exact status of smart card (Card is Blocked or not)? 

    Is there any method in CRYPTO API to retrieve remaining pin attempts?

    How to identify if Smart card is Blocked or Not? 

    If we pass wrong pin for CryptSetProvParam function it always returns 0 value rather than error code.

    Waiting for reply.

    Thanks in advance.

    Regards,

    Rohan Jayraj Mohite.

    • Moved by May Wang - MSFT Friday, August 29, 2014 2:41 AM smart device related
    • Moved by Anna Cc Wednesday, September 3, 2014 2:05 AM
    • Moved by Sheng Jiang 蒋晟 Wednesday, September 3, 2014 3:08 PM Cryptography API
    Thursday, August 28, 2014 10:00 AM

All replies

  • Hi Rohan Jayraj Mohite,

    Thanks for posting here.

    According to your description, the issue is more related with smart card developing, so in order to provide professional support for you I help you move this thread to a more proper forum: Visual Studio Smart Device Development - Native C++ Project. Hope you can understand.

    Best Regards,

    May


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 29, 2014 2:44 AM
  • Hi Rohan Jayraj Mohite,

    This forum is to discuss native projects and libraries (ATL, MFC etc) related issues for Smart devices. And your issue doesn't look like related with this forum.

    I have checked the API CryptSetProvParam and it is for desktop app. Please provide more information about your project and I will help you find a suitable forum.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Saturday, August 30, 2014 9:43 AM
  • Hello Anna,

    Thanks for your reply.

    I am Developing a MFC application in simple vc++ platform.

    You are right by using CryptSetProvParam function I can able to validate smart card pin, but If I passed wrong pin then it should reply remaining pin attempts. 

    With smartcard minidrivers I can able to get remaining pin attempts with CardAuthenticatePin functions. But smartcard minidrivers are failed in windows xp machine, Because smartcard minidrivers are not installed in windows XP.

    Hence To retrieve remaining pin attempts I want to use simply Microsoft CAPI function, but  I didn't found any specific method which will retrieve PIN attempts.

    Please reply.


    Regards, Rohan Jayraj Mohite.

    Monday, September 1, 2014 10:24 AM
  • Hi Rohan Jayraj Mohite,

    General windows desktop development issue forum is a proper forum for this case. I will move it there.

    Best regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    • Edited by Anna Cc Wednesday, September 3, 2014 2:06 AM
    Wednesday, September 3, 2014 2:03 AM
  • Still I didn't received any reply from MSDN team forums.

    Waiting for reply. Can anybody help me to get right direction.



    Best Regards, Rohan Jayraj Mohite.


    • Edited by RohanMohite Tuesday, September 9, 2014 9:33 AM
    Tuesday, September 9, 2014 9:32 AM
  • I'm not aware of any way to do this.  CryptSetProvParam(PP_KEYEXCHANGE_PIN) is normally used to unlock a card but if it fails the error codes don't provide any information about the number of attempts remaining.  CryptGetProvParam doesn't seem to have anything to retrieve the number of attempts remaining.  Maybe there are ways to send calls directly to the card using the SCard APIs but I don't know.

    Sunday, September 14, 2014 12:48 AM