Class Pkcs12
Definition
- Namespace:
- Tizen.Security.SecureRepository
- Assembly:
- Tizen.Security.SecureRepository.dll
Represents PKCS#12 contents.
public class Pkcs12
- Inheritance
-
objectPkcs12
Remarks
It has a private key or its certificate or all members of a chain of trust.
Constructors
View SourcePkcs12(Key, Certificate, IEnumerable<Certificate>)
Initializes an instance of Pkcs12 class with a private key, its corresponding certificate and CA's certificate chain.
Declaration
public 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.
Pkcs12(Key)
Initializes an instance of Pkcs12 class with a private key.
Declaration
public 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
View SourceCaChain
Gets and sets a certificate chain.
Declaration
public 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.
Certificate
Gets and sets a certificate.
Declaration
public 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.
PrivateKey
Gets and sets private key.
Declaration
public 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
View SourceLoad(string, string)
Loads Pkcs12 from the given PKCS#12 file path.
Declaration
public 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 |