Class Pkcs12Manager

Definition

Namespace:
Tizen.Security.SecureRepository
Assembly:
Tizen.Security.SecureRepository.dll

Provides methods for storing and retrieving Pkcs12 contents.

C#
Copy
public class Pkcs12Manager : Manager
Inheritance
object
Pkcs12Manager

Methods

View Source

Get(string, string, string)

Gets Pkcs12 contents from the secure repository.

Declaration
C#
Copy
public static Pkcs12 Get(string alias, string keyPassword, string cerificatePassword)
Parameters
Type Name Description
string alias

Name of data to retrieve.

string keyPassword

Password used in decrypting a private key value.

string cerificatePassword

Password used in decrypting a certificate value.

Returns
Type Description
Pkcs12

Pkcs12 data specified by alias.

Remarks

If password of keyPolicy is provided in SavePkcs12(), the same password should be provided in as keyPassword argument.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when alias argument is null.

System.ArgumentException

Thrown when alias argument has an invalid format.

System.InvalidOperationException

Thrown when Pkcs12 does not exist with given alias. Thrown when optional password of key in Pkcs12 does not match. Thrown when optional password of certificate in Pkcs12 does not match.

View Source

Save(string, Pkcs12, Policy, Policy)

Stores PKCS12's contents inside key manager based on provided policies. All items from PKCS12 will use the same alias.

Declaration
C#
Copy
public static void Save(string alias, Pkcs12 pkcs12, Policy keyPolicy, Policy certificatePolicy)
Parameters
Type Name Description
string alias

Name of a data to be stored.

Pkcs12 pkcs12

pkcs12 data to be stored.

Policy keyPolicy

Pkcs' private key storing policy.

Policy certificatePolicy

Pkcs' certificate storing policy.

Exceptions
Type Condition
System.ArgumentNullException

Thrown when any provided argument is null.

System.ArgumentException

Thrown when alias or pkcs12 argument has an invalid format.

System.InvalidOperationException

Thrown when pkcs12 with given alias already exists.