Class Pkcs12
Definition
- Namespace:
- Tizen.Security.SecureRepository
- Assembly:
- Tizen.Security.SecureRepository.dll
Represents PKCS#12 contents.
C#Copypublic class Pkcs12
- Inheritance
-
objectPkcs12
Remarks
It has a private key or its certificate or all members of a chain of trust.
Constructors
Pkcs12(Key, Certificate, IEnumerable<Certificate>)
Initializes an instance of Pkcs12 class with a private key, its corresponding certificate and CA's certificate chain.
Declaration
C#Copypublic Pkcs12(Key privateKey, Certificate certificate, IEnumerable<Certificate> caChain)
Parameters
Type | Name | Description |
---|---|---|
Key | privateKey | Private key. |
Certificate | certificate | Certificate corresponding to the private key. |
System.Collections.Generic.IEnumerable<T><Certificate> | caChain | Certificate chain of CA (Certificate Authority) that issued the certificate. |
Remarks
It has a private key or its certificate or all members of a chain of trust.
Declaration
C#Copypublic Pkcs12(Key privateKey)
Parameters
Type | Name | Description |
---|---|---|
Key | privateKey | A private key. |
Remarks
It has a private key or its certificate or all members of a chain of trust.
Properties
Declaration
C#Copypublic IEnumerable<Certificate> CaChain { get; set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<T><Certificate> | Certificate chain of CA (Certificate Authority) that issued the certificate. |
Remarks
It has a private key or its certificate or all members of a chain of trust.
Declaration
C#Copypublic Certificate Certificate { get; set; }
Property Value
Type | Description |
---|---|
Certificate | Certificate corresponding to the private key. |
Remarks
It has a private key or its certificate or all members of a chain of trust.
Declaration
C#Copypublic Key PrivateKey { get; set; }
Property Value
Type | Description |
---|---|
Key | Private key. |
Remarks
It has a private key or its certificate or all members of a chain of trust.
Methods
Declaration
C#Copypublic static Pkcs12 Load(string filePath, string filePassword)
Parameters
Type | Name | Description |
---|---|---|
string | filePath | Path of the PKCS12 file to be loaded. |
string | filePassword | Passphrase used to decrypt the PCKS12 file. |
Returns
Type | Description |
---|---|
Pkcs12 | Pkcs12 class instance. |
Remarks
If the PKCS12 file is not encrypted, passphrase can be null.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown when filePath is null. |
System.InvalidOperationException | Thrown when there's no existing file on |