Pkcs12Generator
Namespace: Lacuna.Pki.Stores
Assembly: Lacuna.Pki
Class
Class for PKCS#12 store generation
public class Pkcs12Generator
Hierarquia: object → Pkcs12Generator
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
| Nome | Tipo | Descrição |
|---|---|---|
alias | string | Alias entry |
certificate | PKCertificate | Certifcate |
AddCertificateEntry(string, X509Certificate)
Adds a certificate entry to PKCS#12 store
public void AddCertificateEntry(string alias, X509Certificate certificate)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
alias | string | Alias entry |
certificate | X509Certificate | Certifcate |
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
| Nome | Tipo | Descrição |
|---|---|---|
alias | string | Alias entry |
privateKey | AsymmetricAlgorithm | Private key |
certificates | IEnumerable<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
| Nome | Tipo | Descrição |
|---|---|---|
alias | string | Alias entry |
privateKey | AsymmetricAlgorithm | Private key |
certificates | IEnumerable<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
| Nome | Tipo | Descrição |
|---|---|---|
alias | string | Alias entry |
privateKey | AsymmetricAlgorithm | Private key |
certificate | PKCertificate | Certificate associated with the private key |
caCertificates | IEnumerable<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
| Nome | Tipo | Descrição |
|---|---|---|
alias | string | Alias entry |
privateKey | PrivateKey | Private key |
certificate | PKCertificate | Certificate associated with the private key |
caCertificates | IEnumerable<PKCertificate> | CA certificates chain |
Generate(string)
Generates the PKCS#12 content
public byte[] Generate(string password)
Parâmetros
| Nome | Tipo | Descrição |
|---|---|---|
password | string | Password for key encryption |
Retorno
byte[] — PKCS#12 content bytes
Membros herdados
ToString(), Equals(object), Equals(object, object), ReferenceEquals(object, object), GetHashCode(), GetType(), MemberwiseClone()