X509KeyStorageFlags X509KeyStorageFlags X509KeyStorageFlags X509KeyStorageFlags Enum


定义在何处以及如何导入 X.509 证书的私钥。 Defines where and how to import the private key of an X.509 certificate.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class X509KeyStorageFlags
public enum X509KeyStorageFlags
type X509KeyStorageFlags = 
Public Enum X509KeyStorageFlags


DefaultKeySet DefaultKeySet DefaultKeySet DefaultKeySet 0

使用默认密钥集。 The default key set is used. 用户密钥集通常是默认值。 The user key set is usually the default.

EphemeralKeySet EphemeralKeySet EphemeralKeySet EphemeralKeySet 32

与 PFX 文件相关联的密钥是在内存中创建的,导入证书时它不会保留在磁盘上。 The key associated with a PFX file is created in memory and not persisted on disk when importing a certificate.

Exportable Exportable Exportable Exportable 4

导入的密钥将标记为可导出。 Imported keys are marked as exportable.

MachineKeySet MachineKeySet MachineKeySet MachineKeySet 2

私钥存储在本地计算机存储,而非当前用户存储。 Private keys are stored in the local computer store rather than the current user store.

PersistKeySet PersistKeySet PersistKeySet PersistKeySet 16

导出证书时,与 PFX 文件关联的密钥将会保留。 The key associated with a PFX file is persisted when importing a certificate.

UserKeySet UserKeySet UserKeySet UserKeySet 1

私钥存储在当前用户存储,而非本地计算机存储。 Private keys are stored in the current user store rather than the local computer store. 即使证书指定密钥应放入本地计算机存储,也仍会按此方式存储。 This occurs even if the certificate specifies that the keys should go in the local computer store.

UserProtected UserProtected UserProtected UserProtected 8

通过对话框或可访问密钥的其他方法通知用户。 Notify the user through a dialog box or other method that the key is accessed. 由使用中的加密服务提供程序 (CSP) 定义精确行为。 The Cryptographic Service Provider (CSP) in use defines the precise behavior.