StorePermissionFlags StorePermissionFlags StorePermissionFlags StorePermissionFlags Enum

定义

指定对 X.509 证书存储区的允许访问权限。Specifies the permitted access to X.509 certificate stores.

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

public enum class StorePermissionFlags
[System.Flags]
[System.Serializable]
public enum StorePermissionFlags
type StorePermissionFlags = 
Public Enum StorePermissionFlags
继承
StorePermissionFlagsStorePermissionFlagsStorePermissionFlagsStorePermissionFlags
属性

字段

AddToStore AddToStore AddToStore AddToStore 32

将证书添加到存储区的能力。The ability to add a certificate to a store.

出于安全原因,应仅向高度受信任的代码授予此功能。For security reasons, this ability should be granted only to highly trusted code.

AllFlags AllFlags AllFlags AllFlags 247

执行所有证书和存储区操作的能力。The ability to perform all certificate and store operations.

CreateStore CreateStore CreateStore CreateStore 1

新建存储区的能力。The ability to create a new store.

新存储是通过调用 Open(OpenFlags) 方法创建而成的。New stores are created by calling the Open(OpenFlags) method.

DeleteStore DeleteStore DeleteStore DeleteStore 2

删除存储区的能力。The ability to delete a store.

X509Store 类没有公开此功能。This functionality is not exposed by the X509Store class.

EnumerateCertificates EnumerateCertificates EnumerateCertificates EnumerateCertificates 128

枚举存储区中的证书的能力。The ability to enumerate the certificates in a store.

出于隐私原因,应仅向高度受信任的代码授予此功能。For privacy reasons, this ability should be granted only to fully trusted code.

EnumerateStores EnumerateStores EnumerateStores EnumerateStores 4

枚举计算机上的存储区的能力。The ability to enumerate the stores on a computer.

X509Store 类没有公开此功能。This functionality is not exposed by the X509Store class.

NoFlags NoFlags NoFlags NoFlags 0

未授予执行任何证书或存储区操作的权限。Permission is not given to perform any certificate or store operations.

OpenStore OpenStore OpenStore OpenStore 16

打开存储区的能力。The ability to open a store.

打开存储的功能不包括枚举证书(导致隐私问题)以及添加或删除证书(导致安全问题)的功能。The ability to open a store does not include the ability to enumerate certificates (which raises privacy concerns) or to add or remove certificates (which raises security concerns).

RemoveFromStore RemoveFromStore RemoveFromStore RemoveFromStore 64

从存储区中移除证书的能力。The ability to remove a certificate from a store.

此功能应仅授予给高度受信任的代码,因为删除证书可能会导致拒绝服务。This ability should be granted only to highly trusted code because removing a certificate can result in a denial of service.

示例

下面的代码示例演示如何使用StorePermissionFlags枚举。The following code example shows the use of the StorePermissionFlags enumeration.

Console::WriteLine( "Creating a permission with Flags = OpenStore." );
StorePermission^ sp = gcnew StorePermission( StorePermissionFlags::OpenStore );

Console.WriteLine("Creating a permission with Flags = OpenStore.");
StorePermission sp = new StorePermission(StorePermissionFlags.OpenStore);
Console.WriteLine("Creating a permission with Flags = OpenStore.")
Dim sp As New System.Security.Permissions.StorePermission(StorePermissionFlags.OpenStore)

注解

其中的许多访问权限会造成潜在的安全和隐私威胁。Many of these access permissions pose potential security and privacy threats. 授予对存储的访问权限时, 应格外小心。Great care should be taken in granting access to stores. 有关访问公开的威胁类型的简要说明可在单个枚举成员的摘要中找到。A brief description of the type of threat exposed by an access can be found in the summary for the individual enumeration member.

适用于