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.
C#Copypublic class Pkcs12
- Inheritance
-
System.ObjectPkcs12
Constructors
Declaration
C#Copypublic Pkcs12(Key privateKey)
Parameters
Type | Name | Description |
---|---|---|
Key | privateKey | A private key. |
API Level: 3
View Source
Pkcs12(Key, Certificate, IEnumerable<Certificate>)
A constructor of Key that takes a private key, its corresponding certicate, and CA's certificate chain.
Declaration
C#Copypublic 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<Certificate> | caChain | A certificate chain of CA(Certificate Authority) that issued the certificate. |
API Level: 3
Properties
Declaration
C#Copypublic IEnumerable<Certificate> CaChain { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Certificate> |
API Level: 3
Declaration
C#Copypublic Certificate Certificate { get; set; }
Property Value
Type | Description |
---|---|
Certificate |
API Level: 3
Declaration
C#Copypublic Key PrivateKey { get; set; }
Property Value
Type | Description |
---|---|
Key |
API Level: 3
Methods
Declaration
C#Copypublic static Pkcs12 Load(string filePath, string filePassword)
Parameters
Type | Name | Description |
---|---|---|
System.String | filePath | The path of the PKCS12 file to be loaded. |
System.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. |
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. |