Class CertificateManager

Definition

Namespace:
Tizen.Security.SecureRepository
Assembly:
Tizen.Security.SecureRepository.dll
API Level:
3

This class provides the methods handling certificates.

C#
Copy
public class CertificateManager : Manager
Inheritance
CertificateManager

Methods

View Source

CheckOcsp(IEnumerable<Certificate>)

Perform OCSP, which checks whether the certificate is revoked or not.

Declaration
C#
Copy
public static OcspStatus CheckOcsp(IEnumerable<Certificate> certificateChain)
Parameters
Type Name Description
IEnumerable<Certificate> certificateChain

Valid certificate chain to perform the OCSP check.

Returns
Type Description
OcspStatus

A status result of the OCSP check.

API Level: 3
View Source

Get(String, String)

Gets a certificate from the secure repository.

Declaration
C#
Copy
public static Certificate Get(string alias, string password)
Parameters
Type Name Description
String alias

The name of a certificate to be retrieved.

String password

The password used in decrypting a certificate value. If password of policy is provided in SaveCertificate(), the same password should be provided.

Returns
Type Description
Certificate

A certificate specified by alias.

API Level: 3
View Source

GetAliases()

Gets all aliases of certificates, which the client can access.

Declaration
C#
Copy
public static IEnumerable<string> GetAliases()
Returns
Type Description
IEnumerable<String>

All aliases of certificates, which the client can access.

API Level: 3
View Source

GetCertificateChain(Certificate, IEnumerable<Certificate>)

Verifies a certificate chain and returns that chain.

Declaration
C#
Copy
public static IEnumerable<Certificate> GetCertificateChain(Certificate certificate, IEnumerable<Certificate> untrustedCertificates)
Parameters
Type Name Description
Certificate certificate

The certificate to be verified.

IEnumerable<Certificate> untrustedCertificates

The untrusted CA certificates to be used in verifying a certificate chain.

Returns
Type Description
IEnumerable<Certificate>

A newly created certificate chain.

Remarks

The trusted root certificate of the chain should exist in the system's certificate storage.

API Level: 3
View Source

GetCertificateChain(Certificate, IEnumerable<Certificate>, IEnumerable<Certificate>, Boolean)

Verifies a certificate chain and returns that chain using user entered trusted and untrusted CA certificates.

Declaration
C#
Copy
public static IEnumerable<Certificate> GetCertificateChain(Certificate certificate, IEnumerable<Certificate> untrustedCertificates, IEnumerable<Certificate> trustedCertificates, bool useTrustedSystemCertificates)
Parameters
Type Name Description
Certificate certificate

The certificate to be verified.

IEnumerable<Certificate> untrustedCertificates

The untrusted CA certificates to be used in verifying a certificate chain.

IEnumerable<Certificate> trustedCertificates

The trusted CA certificates to be used in verifying a certificate chain.

Boolean useTrustedSystemCertificates

The flag indicating the use of the trusted root certificates in the system's certificate storage.

Returns
Type Description
IEnumerable<Certificate>

A newly created certificate chain.

Remarks

The trusted root certificate of the chain in the system's certificate storage is added to the certificate chain.

API Level: 3
View Source

Save(String, Certificate, Policy)

Stores a certificate inside the secure repository based on the provided policy.

Declaration
C#
Copy
public static void Save(string alias, Certificate cert, Policy policy)
Parameters
Type Name Description
String alias

The name of a certificate to be stored.

Certificate cert

The certificate's binary value to be stored.

Policy policy

The policy about how to store a certificate securely.

API Level: 3

Extension Methods