Certificates 对象
[CAPICOM 是一个仅 32 位组件,可用于以下操作系统:Windows Server 2008、Windows Vista 和 Windows XP。 请改用 System.Security.Cryptography.X509Certificates 命名空间中的 X509Certificate2Collection 类。]
Certificates 对象表示 Certificate 对象的集合。 每个 Certificate 对象表示单个 数字证书。
Certificates 对象公开以下接口:
- ICertificates2:在 CAPICOM 2.0 中引入。
- ICertificates:在 CAPICOM 1.0 中引入。
何时使用
Certificates 对象用于执行以下任务:
- 添加或删除集合中的 Certificate 对象。
- 通过查找一组证书或显示一个对话框来选择证书来生成集合的子集。
- 清除集合中的所有 Certificate 对象。
- 检索集合中的证书数。
- 从集合中检索特定的 Certificate 对象。
- 循环访问集合。
成员
Certificates 对象具有以下类型的成员:
方法
Certificates 对象具有这些方法。
方法 | 描述 |
---|---|
添加 | 将 Certificate 对象添加到集合。 继承自 CertificatesICertificates2) 的 ( |
清除 | 从集合中删除所有 Certificate 对象。 继承自 CertificatesICertificates2) 的 ( |
找到 | 返回一个 Certificates 对象,该对象包含与指定搜索条件匹配的所有证书。 继承自 CertificatesICertificates2) 的 ( |
删除 | 从集合中删除单个 Certificate 对象。 继承自 CertificatesICertificates2) 的 ( |
保存 | 将证书保存到指定文件。 继承自 CertificatesICertificates2) 的 ( |
Select | 显示用于选择证书的对话框,并返回所选证书的集合。 继承自 CertificatesICertificates2) 的 ( |
属性
Certificates 对象具有这些属性。
属性 | 访问类型 | 描述 |
---|---|---|
_NewEnum |
只读 |
检索可用于枚举集合的对象上的 IEnumVARIANT 接口。 此属性隐藏在 Visual Basic Scripting Edition (VBScript) 中。 |
计数 |
只读 |
检索集合中的 Certificate 对象数。 |
项目 |
只读 |
检索一个 Certificate 对象,该对象表示集合的索引证书。 这是默认属性。 (继承自 CertificatesICertificates2ICertificates) |
注解
可以创建 Certificates 对象,并且可以安全地编写脚本。 Certificates 对象的 ProgID 为“CAPICOM”。Certificates.2”。
CAPICOM 1.x:Certificates 对象的 ProgID 为“CAPICOM”。Certificates.1”。
要求
要求 | “值” |
---|---|
客户端支持结束 |
Windows Vista |
服务器支持结束 |
Windows 2008 Server |
可再发行组件 |
Windows Server 2003 和 Windows XP 上的 CAPICOM 2.0 或更高版本 |
DLL |
|
另请参阅