C# Класс Elastacloud.AzureManagement.Fluent.Helpers.CertificateGenerator

Certificate generator class used to create an X509 cert with exportable privatekey and optionally add to the personal store
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddToMyStore ( X509Certificate2 certificate2 ) : void

Adds a certificate to My store for the LocalMachine

CertificateGenerator ( ) : System
CertificateGenerator ( string subscriptionId, X509Certificate2 managementCertificate ) : System
Create ( string name, System.DateTime start, System.DateTime end, string userPassword, bool addtoStore = false ) : X509Certificate2

Static method used to create a certificate and return as a .net object

ExportToFileSystem ( string exportDirectory ) : void

Used to export the certificates to the filesystem

ExportToStorageAccount ( string account, string container, string folder ) : string
GetCerData ( ) : byte[]
GetPemData ( ) : string
GetPfxData ( ) : byte[]
IsInMyStore ( X509Certificate2 certificate2 ) : bool

Checks to see whether the certificate is in the appropriate store

RemoveFromMyStore ( X509Certificate2 certificate2 ) : void

Removes a certificate from My LocalMachine Store

Приватные методы

Метод Описание
ReturnStore ( ) : X509Store

Returns the My LocalMachine store

Описание методов

AddToMyStore() публичный Метод

Adds a certificate to My store for the LocalMachine
public AddToMyStore ( X509Certificate2 certificate2 ) : void
certificate2 System.Security.Cryptography.X509Certificates.X509Certificate2
Результат void

CertificateGenerator() публичный Метод

public CertificateGenerator ( ) : System
Результат System

CertificateGenerator() публичный Метод

public CertificateGenerator ( string subscriptionId, X509Certificate2 managementCertificate ) : System
subscriptionId string
managementCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
Результат System

Create() публичный Метод

Static method used to create a certificate and return as a .net object
public Create ( string name, System.DateTime start, System.DateTime end, string userPassword, bool addtoStore = false ) : X509Certificate2
name string
start System.DateTime
end System.DateTime
userPassword string
addtoStore bool
Результат System.Security.Cryptography.X509Certificates.X509Certificate2

ExportToFileSystem() публичный Метод

Used to export the certificates to the filesystem
public ExportToFileSystem ( string exportDirectory ) : void
exportDirectory string
Результат void

ExportToStorageAccount() публичный Метод

public ExportToStorageAccount ( string account, string container, string folder ) : string
account string
container string
folder string
Результат string

GetCerData() публичный Метод

public GetCerData ( ) : byte[]
Результат byte[]

GetPemData() публичный Метод

public GetPemData ( ) : string
Результат string

GetPfxData() публичный Метод

public GetPfxData ( ) : byte[]
Результат byte[]

IsInMyStore() публичный Метод

Checks to see whether the certificate is in the appropriate store
public IsInMyStore ( X509Certificate2 certificate2 ) : bool
certificate2 System.Security.Cryptography.X509Certificates.X509Certificate2
Результат bool

RemoveFromMyStore() публичный Метод

Removes a certificate from My LocalMachine Store
public RemoveFromMyStore ( X509Certificate2 certificate2 ) : void
certificate2 System.Security.Cryptography.X509Certificates.X509Certificate2
Результат void