StorePermissionFlags Enumeration

Note: This enumeration is new in the .NET Framework version 2.0.

Specifies the permitted access to X.509 certificate stores.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace: System.Security.Permissions
Assembly: System (in system.dll)

public enum class StorePermissionFlags
/** @attribute SerializableAttribute() */ 
/** @attribute FlagsAttribute() */ 
public enum StorePermissionFlags
public enum StorePermissionFlags

 Member nameDescription
AddToStoreThe ability to add a certificate to a store. 

For security reasons, this ability should be granted only to highly trusted code.

AllFlagsThe ability to perform all certificate and store operations. 
CreateStoreThe ability to create a new store. 

New stores are created by calling the X509Store.Open method.

DeleteStoreThe ability to delete a store. 

This functionality is not exposed by the X509Store class.

EnumerateCertificatesThe ability to enumerate the certificates in a store. 

For privacy reasons, this ability should be granted only to fully trusted code.

EnumerateStoresThe ability to enumerate the stores on a computer. 

This functionality is not exposed by the X509Store class.

NoFlagsPermission is not given to perform any certificate or store operations. 
OpenStoreThe 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).

RemoveFromStoreThe 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.

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 access.

The following code example shows the use of the StorePermissionFlags enumeration. This code example is part of a larger example provided for the StorePermission class.

No code example is currently available or this language may not be supported.
Console.WriteLine("Creating a permission with Flags = OpenStore.");
StorePermission sp = new StorePermission(StorePermissionFlags.OpenStore);

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions