OpenFlags Enumeration

OpenFlags Enumeration


Specifies the way to open the X.509 certificate store.

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

Namespace:   System.Security.Cryptography.X509Certificates
Assembly:  System (in System.dll)

type OpenFlags

Member nameDescription

Open the X.509 certificate store and include archived certificates.


Open the X.509 certificate store for the highest access allowed.


Opens only existing stores; if no store exists, the Open method will not create a new store.


Open the X.509 certificate store for reading only.


Open the X.509 certificate store for both reading and writing.

The ReadOnly, ReadWrite, and MaxAllowed flags are mutually exclusive. The OpenExistingOnly flag is the only flag that does not require the CreateStore permission to be granted.

The following code example opens an X.509 certificate store, adds and deletes certificates, and then closes the store. It assumes you have three certificates to add to and remove from a local store.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Return to top
© 2016 Microsoft