Class Pkcs12
Definition
- Namespace:
- Tizen.Security.SecureRepository
- Assembly:
- Tizen.Security.SecureRepository.dll
The class that represents a PKCS#12 contents. It has a private key or its certificate or all the members of a chain of trust.
public class Pkcs12
- Inheritance
-
objectPkcs12
Constructors
View SourcePkcs12(Key, Certificate, IEnumerable<Certificate>)
A constructor of Key that takes a private key, its corresponding certicate, and CA's certificate chain.
Declaration
public Pkcs12(Key privateKey, Certificate certificate, IEnumerable<Certificate> caChain)
Parameters
Type | Name | Description |
---|---|---|
Key | privateKey | A private key. |
Certificate | certificate | A certificate corresponding the private key. |
System.Collections.Generic.IEnumerable<T><Certificate> | caChain | A certificate chain of CA(Certificate Authority) that issued the certificate. |
Pkcs12(Key)
A constructor of Key that takes a private key.
Declaration
public Pkcs12(Key privateKey)
Parameters
Type | Name | Description |
---|---|---|
Key | privateKey | A private key. |
Properties
View SourceCaChain
A certificate chain of CA(Certificate Authority) that issued the certificate.
Declaration
public IEnumerable<Certificate> CaChain { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Certificate> |
Certificate
A certificate corresponding to the private key.
Declaration
public Certificate Certificate { get; set; }
Property Value
Type | Description |
---|---|
Certificate |
PrivateKey
A private key.
Declaration
public Key PrivateKey { get; set; }
Property Value
Type | Description |
---|---|
Key |
Methods
View SourceLoad(string, string)
Loads the Pkcs12 from the given PKCS#12 file path.
Declaration
public static Pkcs12 Load(string filePath, string filePassword)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | The path of the PKCS12 file to be loaded. |
string | filePassword | The passphrase used to decrypt the PCKS12 file. If the PKCS12 file is not encrypted, passphrase can be null. |
Returns
Type | Description |
---|---|
Pkcs12 |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | The filePath is null. |
System.InvalidOperationException | No file on filePath. No permission to access file. File is in the invalid PKCS12 format. File cannot be extracted with provided filePassword. |