CertificateStore Constructor (String, CertStoreType, String) |
Opens an existing or creates a new store of certificates.
Namespace: MailBee.SecurityAssembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax public CertificateStore(
string storeName,
CertStoreType storeType,
string pfxPassword
)
Public Sub New (
storeName As String,
storeType As CertStoreType,
pfxPassword As String
)
Parameters
- storeName
- Type: SystemString
The name of the certificate store or the filename if the store is a file. - storeType
- Type: MailBee.SecurityCertStoreType
The type of the certificate store. - pfxPassword
- Type: SystemString
PFX (.P12, PKCS #12) password if storeType is Pfx; otherwise,
can be a null reference (Nothing in Visual Basic).
Exceptions Remarks Only Memory stores can be created. Other stores can only be opened.
It's possible, however, to create a memory store and then save it into a file using SaveToFile(String, CertStoreFileType, String) method.
To create a new system store, use RegisterSystemStore(String, RegistryStoreLocation) method.
If you open a file store and then modify its contents, it won't be updated on disk until you save it back to the file.
A system store, however, gets updated immediately in its registry location each time you call any method which modifies this store.
Note |
---|
In .NET Standard 2.0 edition and later, this constructor is no longer available (it's Win32-specific). Use CertificateStore(X509Store) instead. |
Examples See Also