C# Class Elastacloud.AzureManagement.Fluent.Helpers.CertificateGenerator

Certificate generator class used to create an X509 cert with exportable privatekey and optionally add to the personal store
Mostrar archivo Open project: azurecoder/fluent-management Class Usage Examples

Public Methods

Method Description
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

Private Methods

Method Description
ReturnStore ( ) : X509Store

Returns the My LocalMachine store

Method Details

AddToMyStore() public method

Adds a certificate to My store for the LocalMachine
public AddToMyStore ( X509Certificate2 certificate2 ) : void
certificate2 System.Security.Cryptography.X509Certificates.X509Certificate2
return void

CertificateGenerator() public method

public CertificateGenerator ( ) : System
return System

CertificateGenerator() public method

public CertificateGenerator ( string subscriptionId, X509Certificate2 managementCertificate ) : System
subscriptionId string
managementCertificate System.Security.Cryptography.X509Certificates.X509Certificate2
return System

Create() public method

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
return System.Security.Cryptography.X509Certificates.X509Certificate2

ExportToFileSystem() public method

Used to export the certificates to the filesystem
public ExportToFileSystem ( string exportDirectory ) : void
exportDirectory string
return void

ExportToStorageAccount() public method

public ExportToStorageAccount ( string account, string container, string folder ) : string
account string
container string
folder string
return string

GetCerData() public method

public GetCerData ( ) : byte[]
return byte[]

GetPemData() public method

public GetPemData ( ) : string
return string

GetPfxData() public method

public GetPfxData ( ) : byte[]
return byte[]

IsInMyStore() public method

Checks to see whether the certificate is in the appropriate store
public IsInMyStore ( X509Certificate2 certificate2 ) : bool
certificate2 System.Security.Cryptography.X509Certificates.X509Certificate2
return bool

RemoveFromMyStore() public method

Removes a certificate from My LocalMachine Store
public RemoveFromMyStore ( X509Certificate2 certificate2 ) : void
certificate2 System.Security.Cryptography.X509Certificates.X509Certificate2
return void