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#
Copy
public class Pkcs12
Inheritance
System.Object
Pkcs12

Constructors

View Source

Pkcs12(Key)

A constructor of Key that takes a private key.

Declaration
C#
Copy
public 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#
Copy
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<Certificate> caChain

A certificate chain of CA(Certificate Authority) that issued the certificate.

API Level: 3

Properties

View Source

CaChain

A certificate chain of CA(Certificate Authority) that issued the certificate.

Declaration
C#
Copy
public IEnumerable<Certificate> CaChain { get; set; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<Certificate>
API Level: 3
View Source

Certificate

A certificate corresponding to the private key.

Declaration
C#
Copy
public Certificate Certificate { get; set; }
Property Value
Type Description
Certificate
API Level: 3
View Source

PrivateKey

A private key.

Declaration
C#
Copy
public Key PrivateKey { get; set; }
Property Value
Type Description
Key
API Level: 3

Methods

View Source

Load(String, String)

Loads the Pkcs12 from the given PKCS#12 file path.

Declaration
C#
Copy
public 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
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.

API Level: 3