我有 .Net 应用程序使用 PKCS11Interop 库与加密令牌(智能卡)进行交互,用户可以在其中登录到令牌并生成密钥对和签名。
如果用户多次输入错误密码,令牌将被锁定,如何获取令牌的剩余尝试登录次数。
在互联网上搜索时,我遇到了包含此信息的 Net.Pkcs11Interop.HighLevelAPI.TokenInfo.TokenFlags
CKF_USER_PIN_COUNT_LOW 0x00010000 True if an incorrect user login
PIN has been entered at least
once since the last successful
authentication.
CKF_USER_PIN_FINAL_TRY 0x00020000 True if supplying an incorrect
user PIN will cause it to
become locked.
CKF_USER_PIN_LOCKED 0x00040000 True if the user PIN has been locked. User login to the token
is not possible
但这些是布尔值,我需要确切的重试次数。