Since: API level 2
public class

CertificateInfo

extends Object
implements Parcelable
java.lang.Object
   ↳ com.samsung.android.knox.keystore.CertificateInfo

Class Overview

This class is used to send security information data across processes.

Since
API level 2
MDM 2.0

Summary

[Expand]
Inherited Constants
From interface android.os.Parcelable
Public Constructors
CertificateInfo()
Default Constructor
CertificateInfo(Certificate cert)
Create from java Certificate.
Public Methods
String getAlias()
API to retrieve the alias of an installed certificate.
Certificate getCertificate()
Get certificate object
boolean getEnabled()
API to verify whether this certificate is enabled or not.
boolean getHasPrivateKey()
API to verify if a given user certificate has a user private key associated with it.
int getKeystore()
API to retrieve the keystore where this certificate is installed.
boolean getSystemPreloaded()
API to check whether this certificate is pre-loaded on system or not.
void setCertificate(Certificate aCertificate)
Set certificate object
[Expand]
Inherited Methods
From class java.lang.Object
From interface android.os.Parcelable

Public Constructors

public CertificateInfo ()

Since: API level 2

Default Constructor

Since
API level 2
MDM 2.0

public CertificateInfo (Certificate cert)

Since: API level 2

Create from java Certificate.

Since
API level 2
MDM 2.0

Public Methods

public String getAlias ()

Since: API level 11

API to retrieve the alias of an installed certificate.

Returns
Usage
An administrator can use this API to get the alias associated with an installed certificate.

Since
API level 11
MDM 5.0

public Certificate getCertificate ()

Since: API level 2

Get certificate object

Returns
  • certificate object
Since
API level 2
MDM 2.0

public boolean getEnabled ()

Since: API level 11

API to verify whether this certificate is enabled or not.

Returns
  • true if certificate is enabled, false otherwise.
Usage
An administrator can use this API to check if this certificate is enabled. User certificates are always enabled. On the other hand, as pre-loaded certificates are not removable, they may be enabled or not.

Since
API level 11
MDM 5.0

public boolean getHasPrivateKey ()

Since: API level 11

API to verify if a given user certificate has a user private key associated with it.

Returns
  • true if a private key with this alias is present, else false.
Usage
An administrator can use this API to check if this certificate has a user private key associated with it, with the same alias. Only user certificates may have a private key. On the other hand, certificate authorities will not have a private key.
Since
API level 11
KNOX 2.0

public int getKeystore ()

Since: API level 28

API to retrieve the keystore where this certificate is installed.

Returns
  • the keystore where this certificate is installed.
Usage
An administrator can use this API to get the keystore where this certificate is installed on device. Possible keystores are KEYSTORE_DEFAULT, KEYSTORE_FOR_WIFI and KEYSTORE_FOR_VPN_AND_APPS.

public boolean getSystemPreloaded ()

Since: API level 11

API to check whether this certificate is pre-loaded on system or not.

Returns
  • true if certificate is pre-loaded on system, false otherwise
Usage
An administrator can use this API to verify if this certificate is pre-loaded on system or if it was installed (by a user or an administrator).

Since
API level 11
MDM 5.0

public void setCertificate (Certificate aCertificate)

Since: API level 2

Set certificate object

Since
API level 2
MDM 2.0