java.lang.Object |
↳ |
com.samsung.android.knox.zt.devicetrust.cert.CertProvisionProfile.Builder |
Class Overview
Builder class to create Certificate provision profile
Summary
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public Constructors
public
Builder
(String rootCA, String protocol, String provisionType, String keyProvider, int keyOwner, String keyAlias, Bundle subject)
Constructs a new Builder with the defaults.
Parameters
rootCA
| root of CA when remote certificate provisioning
It can consist of either CA_DEFAULT or CA_LOOPBACK. |
protocol
| protocol used when remote certificate provisioning
It can consist of either PROTOCOL_ACME or PROTOCOL_SCEP. |
provisionType
| provision type of remote certificate provisioning
It can consist of either TYPE_PROVISION, TYPE_RENEW or TYPE_REVOKE. |
keyProvider
| key provider of remote certificate provisioning
It can consist of either PROVIDER_ANDROID or PROVIDER_UCM. |
keyOwner
| key owner to be provisioned
It can consist of either KEY_OWNER_SYSTEM or KEY_OWNER_APP. |
keyAlias
| alias of the key to be provisioned |
subject
| subject to be written in the certificate
The representation of a X.500 name represented as an array of OID and value.
For example, C=KR O=Samsung Electronics. O=Samsung Mobile. CN=foo 1.2.3.4=bar corresponds to:
Bundle subject = new Bundle();
subject.putString("C", "KR");
subject.putStringArrayList("O", ["Samsung Electronics.", "Samsung Mobile."]);
subject.putString("CN", "foo");
subject.putString("1.2.3.4", "bar");
Dotted numbers can represent OIDs, with shortcuts
for common name (CN), country (C), organization (O), organizational unit (OU), locality (L) and state (ST).
The server may override or ignore this field in the certificate it issues. |
Public Methods
Combine all of the options that have been set and return a new CertProvisionProfile object.
Set a challenge password. This value only valid for scep protocol case.
That value is valid only when protocol is PROTOCOL_SCEP.
Parameters
challengePassword
| challenge password to communicate certificate server |
public
CertProvisionProfile.Builder
setClientIdentifierType
(int clientIdentifierType)
Set a client identifier type.
That value is valid only when protocol is PROTOCOL_ACME.
Parameters
clientIdentifierType
| Client identified type by the server.
It can consist of either CLIENT_ID_TYPE_IMEI or CLIENT_ID_TYPE_SAK_UID. |
Set a client identifier.
That value is valid only when protocol is PROTOCOL_ACME.
Parameters
clientIdentifiers
| client identified by the server |
Set the extended purposes to be written to the certificate to be provisioned.
The server may override or ignore this field in the certificate it issues.
Parameters
keyExtendedPurposes
| The value is an array of strings. Each string is an OID in dotted notation.
For instance, ["1.3.6.1.5.5.7.3.1", "1.3.6.1.5.5.7.3.4"] indicates server authentication and email protection. |
Set a certificate server host address.
If loopback rootCA case, the value set here is ignored.
Parameters
serverHost
| host address of certificate server |
Set a certificate server path.
If loopback rootCA case, the value set here is ignored.
Parameters
serverPath
| path of certificate server |
Set a certificate server port.
If loopback rootCA case, the value set here is ignored.
Parameters
serverPort
| port of certificate server |
Set a subject alternative name to be written on the certificate.
The server may override or ignore this field in the certificate it issues.
Parameters
subjectAltName
| You can specify a single string or an array list of strings for each key.
The key value must consist of SAN_DNS_NAME, SAN_IP_ADDRESS, SAN_RFC822_NAME or SAN_URI.
For example, dns=127.0.1, dns=dns.samsung.com ip=192.168.0.1 corresponds to:
Bundle subject = new Bundle();
subject.putStringArrayList(SAN_DNS_NAME, ["127.0.1", "dns.samsung.com"]);
subject.putString(SAN_IP_ADDRESS, "192.168.0.1"); |
Set a purpose of system key.
That value is valid only when key owner is KEY_OWNER_SYSTEM.
Parameters
systemKeyPurposes
| Set of purposes (e.g., encrypt, decrypt, sign) for which the key can be used.
It can consist of a combination of KEY_PURPOSE_ENCRYPT and KEY_PURPOSE_SIGN. |
Set a size of system key.
That value is valid only when key owner is KEY_OWNER_SYSTEM.
Parameters
systemKeySize
| Sets the size (in bits) of the key to be generated |
Set a algorithm of system key.
That value is valid only when key owner is KEY_OWNER_SYSTEM.
Parameters
systemKeyType
| Key algorithm to use (RSA, EC).
It can consist of either KEY_TYPE_RSA or KEY_TYPE_EC. |