C# Class Internal.Cryptography.Pal.StorePal

Inheritance: IDisposable, IStorePal, IExportPal, ILoaderPal
Show file Open project: dotnet/corefx Class Usage Examples

Private Properties

Property Type Description
FromBlobOrFile StorePal
MapKeyStorageFlags PfxCertStoreFlags
MapX509StoreFlags CertStoreFlags
SaveToMemoryStore byte[]
StorePal System

Public Methods

Method Description
Add ( ICertificatePal certificate ) : void
CloneTo ( X509Certificate2Collection collection ) : void
CopyTo ( X509Certificate2Collection collection ) : void
Dispose ( ) : void
Export ( X509ContentType contentType, SafePasswordHandle password ) : byte[]
FromBlob ( byte rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags ) : ILoaderPal
FromCertificate ( ICertificatePal cert ) : IExportPal
FromFile ( string fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags ) : ILoaderPal
FromHandle ( IntPtr storeHandle ) : IStorePal
FromSystemStore ( string storeName, StoreLocation storeLocation, OpenFlags openFlags ) : IStorePal
LinkFromCertificateCollection ( X509Certificate2Collection certificates ) : IExportPal

Note: this factory method creates the store using links to the original certificates rather than copies. This means that any changes to certificate properties in the store changes the original.

MoveTo ( X509Certificate2Collection collection ) : void
Remove ( ICertificatePal certificate ) : void

Private Methods

Method Description
FromBlobOrFile ( byte rawData, string fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags ) : StorePal
MapKeyStorageFlags ( X509KeyStorageFlags keyStorageFlags ) : PfxCertStoreFlags
MapX509StoreFlags ( StoreLocation storeLocation, OpenFlags flags ) : CertStoreFlags
SaveToMemoryStore ( CertStoreSaveAs dwSaveAs ) : byte[]
StorePal ( SafeCertStoreHandle certStore ) : System

Method Details

Add() public method

public Add ( ICertificatePal certificate ) : void
certificate ICertificatePal
return void

CloneTo() public method

public CloneTo ( X509Certificate2Collection collection ) : void
collection System.Security.Cryptography.X509Certificates.X509Certificate2Collection
return void

CopyTo() public method

public CopyTo ( X509Certificate2Collection collection ) : void
collection System.Security.Cryptography.X509Certificates.X509Certificate2Collection
return void

Dispose() public method

public Dispose ( ) : void
return void

Export() public method

public Export ( X509ContentType contentType, SafePasswordHandle password ) : byte[]
contentType X509ContentType
password Microsoft.Win32.SafeHandles.SafePasswordHandle
return byte[]

FromBlob() public static method

public static FromBlob ( byte rawData, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags ) : ILoaderPal
rawData byte
password Microsoft.Win32.SafeHandles.SafePasswordHandle
keyStorageFlags X509KeyStorageFlags
return ILoaderPal

FromCertificate() public static method

public static FromCertificate ( ICertificatePal cert ) : IExportPal
cert ICertificatePal
return IExportPal

FromFile() public static method

public static FromFile ( string fileName, SafePasswordHandle password, X509KeyStorageFlags keyStorageFlags ) : ILoaderPal
fileName string
password Microsoft.Win32.SafeHandles.SafePasswordHandle
keyStorageFlags X509KeyStorageFlags
return ILoaderPal

FromHandle() public static method

public static FromHandle ( IntPtr storeHandle ) : IStorePal
storeHandle System.IntPtr
return IStorePal

FromSystemStore() public static method

public static FromSystemStore ( string storeName, StoreLocation storeLocation, OpenFlags openFlags ) : IStorePal
storeName string
storeLocation StoreLocation
openFlags OpenFlags
return IStorePal

LinkFromCertificateCollection() public static method

Note: this factory method creates the store using links to the original certificates rather than copies. This means that any changes to certificate properties in the store changes the original.
public static LinkFromCertificateCollection ( X509Certificate2Collection certificates ) : IExportPal
certificates System.Security.Cryptography.X509Certificates.X509Certificate2Collection
return IExportPal

MoveTo() public method

public MoveTo ( X509Certificate2Collection collection ) : void
collection System.Security.Cryptography.X509Certificates.X509Certificate2Collection
return void

Remove() public method

public Remove ( ICertificatePal certificate ) : void
certificate ICertificatePal
return void