Class Pkcs12
Definition
- Namespace:
- Tizen.Security.SecureRepository
- Assembly:
- Tizen.Security.SecureRepository.dll
- API Level:
- 3
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
-
Pkcs12
Constructors
View SourcePkcs12(Key)
A constructor of Key that takes a private key.
Declaration
public Pkcs12(Key privateKey)
Parameters
Type | Name | Description |
---|---|---|
Key | privateKey | A private key. |
API Level: 3
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. |
IEnumerable<Certificate> | caChain | A certificate chain of CA(Certificate Authority) that issued the certificate. |
API Level: 3
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 |
---|---|
IEnumerable<Certificate> |
API Level: 3
View SourceCertificate
A certificate corresponding to the private key.
Declaration
public Certificate Certificate { get; set; }
Property Value
Type | Description |
---|---|
Certificate |
API Level: 3
View SourcePrivateKey
A private key.
Declaration
public Key PrivateKey { get; set; }
Property Value
Type | Description |
---|---|
Key |
API Level: 3
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 |
---|---|
ArgumentNullException | The filePath is null. |
InvalidOperationException | No file on filePath. No permission to access file. File is in the invalid PKCS12 format. File cannot be extracted with provided filePassword. |