智能卡证书枚举 [英] Smart Card Certificate enumeration

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

问题描述

我想从证书存储区枚举智能卡登录证书(存储区可以具有多种证书).我该怎么办?

I want to enumerate smart card logon certificate from certificate store(Store can have multiple kinds of certificate). How can I do this?

如果上述问题不清楚,那么我想找出所有可用于智能卡登录的证书.

If above question is not clear then i want to find out all the certificates which can be used for smart card logon.

我找到了一个枚举所有证书的链接.那是 http://msdn.microsoft.com/en-us/library/aa376050 (VS.85).aspx

I have found one link to enumerate all the certificate. That is http://msdn.microsoft.com/en-us/library/aa376050(VS.85).aspx

但是我只需要智能卡登录证书.

But I want only smart card logon certificates.

推荐答案

您好,

您可以枚举所有智能卡使用功能 CertFindCertificateInStore 为了查找包含带有智能卡登录OID的增强密钥用法扩展名的证书,即"1.3.6.1.4.1.311.20.2.2" .

我已经编写了一个小样本,使用该功能来实现相同的目的.您可以从以下链接获取源代码:
http://www.idrix.fr/Root/Samples/EnumLogonCerts.cpp

希望对您有所帮助.
干杯,
-
Mounir IDRASSI
IDRIX
http://www.idrix.fr
Hi,

You can enumerate all the Smart Card Logon certificates present on the certificate store by using the function CertFindCertificateInStore in order to look for certificate that contain an Enhanced Key Usage extension with an the Smart Card Logon OID, that is "1.3.6.1.4.1.311.20.2.2" .

I have wrote a small sample that uses this function to accomplish the same purpose. You can grab the source from the following link :
http://www.idrix.fr/Root/Samples/EnumLogonCerts.cpp

I hope this will help.
Cheers,
--
Mounir IDRASSI
IDRIX
http://www.idrix.fr


这篇关于智能卡证书枚举的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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