Pular para o conteúdo principal

Pkcs12Generator

Namespace: Lacuna.Pki.Stores
Assembly: Lacuna.Pki
Class

Class for PKCS#12 store generation

public class Pkcs12Generator

Hierarquia: objectPkcs12Generator

Construtores

Pkcs12Generator()

public Pkcs12Generator()

Métodos

AddCertificateEntry(string, PKCertificate)

Adds a certificate entry to PKCS#12 store

public void AddCertificateEntry(string alias, PKCertificate certificate)

Parâmetros

NomeTipoDescrição
aliasstringAlias entry
certificatePKCertificateCertifcate

AddCertificateEntry(string, X509Certificate)

Adds a certificate entry to PKCS#12 store

public void AddCertificateEntry(string alias, X509Certificate certificate)

Parâmetros

NomeTipoDescrição
aliasstringAlias entry
certificateX509CertificateCertifcate

AddKeyEntry(string, AsymmetricAlgorithm, IEnumerable<PKCertificate>)

Adds a key entry to PKCS#12 store

[Obsolete("Use overload with separate certificate and CA certificates")]
public void AddKeyEntry(string alias, AsymmetricAlgorithm privateKey, IEnumerable<PKCertificate> certificates)

Parâmetros

NomeTipoDescrição
aliasstringAlias entry
privateKeyAsymmetricAlgorithmPrivate key
certificatesIEnumerable<PKCertificate>Certificate chain. If more than one certificate, the certificate associated with the privateKey MUST come in the first position

AddKeyEntry(string, AsymmetricAlgorithm, IEnumerable<X509Certificate>)

Adds a key entry to PKCS#12 store

[Obsolete("Use overload with separate certificate and CA certificates")]
public void AddKeyEntry(string alias, AsymmetricAlgorithm privateKey, IEnumerable<X509Certificate> certificates)

Parâmetros

NomeTipoDescrição
aliasstringAlias entry
privateKeyAsymmetricAlgorithmPrivate key
certificatesIEnumerable<X509Certificate>Certificate chain. If more than one certificate, the certificate associated with the privateKey MUST come in the first position

AddKeyEntry(string, AsymmetricAlgorithm, PKCertificate, IEnumerable<PKCertificate>)

Adds a key entry to PKCS#12 store

public void AddKeyEntry(string alias, AsymmetricAlgorithm privateKey, PKCertificate certificate, IEnumerable<PKCertificate> caCertificates = null)

Parâmetros

NomeTipoDescrição
aliasstringAlias entry
privateKeyAsymmetricAlgorithmPrivate key
certificatePKCertificateCertificate associated with the private key
caCertificatesIEnumerable<PKCertificate>CA certificates chain

AddKeyEntry(string, PrivateKey, PKCertificate, IEnumerable<PKCertificate>)

Adds a key entry to PKCS#12 store

public void AddKeyEntry(string alias, PrivateKey privateKey, PKCertificate certificate, IEnumerable<PKCertificate> caCertificates = null)

Parâmetros

NomeTipoDescrição
aliasstringAlias entry
privateKeyPrivateKeyPrivate key
certificatePKCertificateCertificate associated with the private key
caCertificatesIEnumerable<PKCertificate>CA certificates chain

Generate(string)

Generates the PKCS#12 content

public byte[] Generate(string password)

Parâmetros

NomeTipoDescrição
passwordstringPassword for key encryption

Retorno

byte[] — PKCS#12 content bytes


Membros herdados

ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()