智能卡minidriver CertSequences测试错误 [英] Smart card minidriver CertSequences test bug

查看:84
本文介绍了智能卡minidriver CertSequences测试错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试认证我们的智能卡微型驱动程序。智能卡只能通过取消供电(冷重置)卡来取消认证用户。

Hello, I'm trying to certify our smart card minidriver. The smart card can deauthenticate users only through unpowering (cold resetting) the card.

文档"Windows智能卡微型驱动器规范版本7.07"。第4.2.5节说:

The document "Windows Smart Card Minidriver Specification Version 7.07" section 4.2.5 says:

" ... CardDeauthenticate功能是一个可选的导出,应该提供 卡片微型驱动程序可以有效地逆转用户的效果或管理员没有重置卡。如果此函数未实现,则
卡minidriver应在此函数的CARD_DATA指针中放置NULL。 基本CSP / KSP在调用此值之前将此指针测试为NULL值。如果找到,则基本CSP / KSP通过重置卡来取消验证用户......"

"... The CardDeauthenticate function is an optional export that should be provided it is possible the card minidriver to efficiently reverse the effect of a user or administrator without resetting the card. If this function not implemented, the card minidriver should put NULL in the CARD_DATA pointer for this function. Base CSP/KSP tests this pointer for NULL value before calling it. If it is found, the Base CSP/KSP deauthenticates a user by resetting the card..."

但是在"CertSequences"期间重置卡时存在问题。测试。这是一个cmck日志跟踪:

But there is a problem with resetting the card during "CertSequences" test. Here is a cmck log trace:

如您所见,测试工具正在尝试验证证书但出错,因为调用了CardDeauthenticate并且任何智能卡共享状态都变得无效。

As you can see, test tool is trying to verify certificate but get an error, because CardDeauthenticate was called and any smart card shared state has became invalid.

如果我实现CardDeauthenticate只返回"SCARD_S_SUCCESS" - 此测试已通过,但其余测试均失败。

If I implement CardDeauthenticate that just return "SCARD_S_SUCCESS" - this test is passed, but the rest of the tests fail.

因此,CertSequences测试中存在一个错误,需要更正。

So, there is a bug in CertSequences test, which need to be corrected.

推荐答案

您好,

这不是CertSequences测试中的错误,而是您实施中的问题。

This is not a bug in the CertSequences test but rather an issue in your implementation.

您是否正在重置CardDeauthenticate功能中的卡?如果是,那么这就是问题的根源,因为您不应该更改Base CSP传递给您的SCARDHANDLE的状态。为了重置卡,你应该只是
导出CardDeauthenticate并将其指针在CARD_DATA结构中设置为NULL。

Are you resetting the card inside the CardDeauthenticate function? If yes, then this is the origin of your problem because you should not change the state of the SCARDHANDLE passed to you by the Base CSP. In order to reset the card, you should simply not exporting the CardDeauthenticate and set its pointer in CARD_DATA structure to NULL.

Anayway,错误0x80100068(SCARD_W_RESET_CARD)由CMCK是因为SCARDHANDLE被重置在Base CSP和CMCK的范围之外,因为重置是在禁止的minidriver内完成的。

Anayway, the error 0x80100068 (SCARD_W_RESET_CARD) received by the CMCK is due to the fact that the SCARDHANDLE was reset outside the scope of the Base CSP and the CMCK, most certainly because the reset was done inside the minidriver which is forbidden.

干杯,

-

Mounir IDRASSI

Cheers,
--
Mounir IDRASSI


这篇关于智能卡minidriver CertSequences测试错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆