Partilhar via


X509Attestation Class

public class X509Attestation
extends Attestation

Representation of a single Device Provisioning Service X509 Attestation.

The provisioning service supports Device Identifier Composition Engine, or DICE, as the device attestation mechanism. To use DICE, user must provide the X509 certificate. This class provide the means to create a new attestation for a X509 certificate and return it as an abstract interface Attestation.

An X509 attestation can contains one of the 3 types of certificate:

Client or Alias certificate:

Called on this class as clientCertificates, this certificate can authenticate a single device.

Signing or Root certificate:

Called on this class as rootCertificates, this certificate can create multiple Client certificates to authenticate multiple devices.

CA Reference:

Called on this class as X509CAReferences, this is a CA reference for a rootCertificate that can create multiple Client certificates to authenticate multiple devices.

The provisioning service allows user to create IndividualEnrollment and EnrollmentGroup. For all operations over IndividualEnrollment with DICE, user must provide a clientCertificates, and for operations over EnrollmentGroup, user must provide a rootCertificates or a X509CAReferences.

For each of this types of certificates, user can provide 2 Certificates, a primary and a secondary. Only the primary is mandatory, the secondary is optional.

The provisioning service will process the provided certificates, but will never return it back. Instead of it, getPrimaryX509CertificateInfo() and getSecondaryX509CertificateInfo() will return the certificate information for the certificates.

Constructor Summary

Constructor Description
X509Attestation(X509Attestation x509Attestation)

Constructor [COPY]

Method Summary

Modifier and Type Method and Description
static X509Attestation createFromCAReferences(String primary)

Factory with CAReferences with only primary reference.

static X509Attestation createFromCAReferences(String primary, String secondary)

Factory with CAReferences with primary and secondary references.

static X509Attestation createFromClientCertificates(String primary)

Factory with ClientCertificate with only primary certificate.

static X509Attestation createFromClientCertificates(String primary, String secondary)

Factory with ClientCertificates with primary and secondary certificates.

static X509Attestation createFromRootCertificates(String primary)

Factory with RootCertificates with only primary certificate.

static X509Attestation createFromRootCertificates(String primary, String secondary)

Factory with RootCertificates with primary and secondary certificates.

X509CAReferences getCAReferences()

Deprecated

as of provisioning-service-client version 1.3.3, please use getCAReferencesFinal()

Getter for the caReferences.

final X509CAReferences getCAReferencesFinal()

Getter for the caReferences.

X509Certificates getClientCertificates()

Deprecated

as of provisioning-service-client version 1.3.3, please use getClientCertificatesFinal()

Getter for the clientCertificates.

final X509Certificates getClientCertificatesFinal()

Getter for the clientCertificates.

X509CertificateInfo getPrimaryX509CertificateInfo()

Getter for the primary X509 certificate info.

X509Certificates getRootCertificates()

Deprecated

as of provisioning-service-client version 1.3.3, please use getRootCertificatesFinal()

Getter for the rootCertificates.

final X509Certificates getRootCertificatesFinal()

Getter for the rootCertificates.

X509CertificateInfo getSecondaryX509CertificateInfo()

Getter for the secondary X509 certificate info.

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Constructor Details

X509Attestation

public X509Attestation(X509Attestation x509Attestation)

Constructor [COPY]

Creates a new instance of the X509Attestation copping the content of the provided one.

Parameters:

x509Attestation - the original X509Attestation to copy.

Method Details

createFromCAReferences

public static X509Attestation createFromCAReferences(String primary)

Factory with CAReferences with only primary reference.

Creates a new instance of the X509Attestation using the provided primary CA reference.

Parameters:

primary - the String with the primary CA reference. It cannot be null or empty.

Returns:

the new instance of the X509Attestation.

createFromCAReferences

public static X509Attestation createFromCAReferences(String primary, String secondary)

Factory with CAReferences with primary and secondary references.

Creates a new instance of the X509Attestation with the primary and secondary CA references.

Parameters:

primary - the String with the primary CA references. It cannot be null or empty.
secondary - the String with the secondary CA references. It can be null or empty (ignored).

Returns:

the new instance of the X509Attestation.

createFromClientCertificates

public static X509Attestation createFromClientCertificates(String primary)

Factory with ClientCertificate with only primary certificate.

Creates a new instance of the X509Attestation using the provided primary Certificate.

Parameters:

primary - the String with the primary certificate. It cannot be null or empty.

Returns:

the new instance of the X509Attestation.

createFromClientCertificates

public static X509Attestation createFromClientCertificates(String primary, String secondary)

Factory with ClientCertificates with primary and secondary certificates.

Creates a new instance of the X509Attestation with the primary and secondary certificates.

Parameters:

primary - the String with the primary certificate. It cannot be null or empty.
secondary - the String with the secondary certificate. It can be null or empty (ignored).

Returns:

the new instance of the X509Attestation.

createFromRootCertificates

public static X509Attestation createFromRootCertificates(String primary)

Factory with RootCertificates with only primary certificate.

Creates a new instance of the X509Attestation using the provided primary Certificate.

Parameters:

primary - the String with the primary certificate. It cannot be null or empty.

Returns:

the new instance of the X509Attestation.

createFromRootCertificates

public static X509Attestation createFromRootCertificates(String primary, String secondary)

Factory with RootCertificates with primary and secondary certificates.

Creates a new instance of the X509Attestation with the primary and secondary certificates.

Parameters:

primary - the String with the primary certificate. It cannot be null or empty.
secondary - the String with the secondary certificate. It can be null or empty (ignored).

Returns:

the new instance of the X509Attestation.

getCAReferences


public X509CAReferences getCAReferences()

Deprecated

as of provisioning-service-client version 1.3.3, please use getCAReferencesFinal()

Getter for the caReferences.

Returns:

the X509CAReferences with the stored caReferences. it can be null.

getCAReferencesFinal

public final X509CAReferences getCAReferencesFinal()

Getter for the caReferences.

Returns:

the X509CAReferences with the stored caReferences. it can be null.

getClientCertificates


public X509Certificates getClientCertificates()

Deprecated

as of provisioning-service-client version 1.3.3, please use getClientCertificatesFinal()

Getter for the clientCertificates.

Returns:

the X509Certificates with the stored clientCertificates. it can be null.

getClientCertificatesFinal

public final X509Certificates getClientCertificatesFinal()

Getter for the clientCertificates.

Returns:

the X509Certificates with the stored clientCertificates. it can be null.

getPrimaryX509CertificateInfo

public X509CertificateInfo getPrimaryX509CertificateInfo()

Getter for the primary X509 certificate info.

This method is a getter for the information returned from the provisioning service for the provided primary certificate.

Returns:

the X509CertificateInfo with the returned certificate information. it can be null.

getRootCertificates


public X509Certificates getRootCertificates()

Deprecated

as of provisioning-service-client version 1.3.3, please use getRootCertificatesFinal()

Getter for the rootCertificates.

Returns:

the X509Certificates with the stored rootCertificates. it can be null.

getRootCertificatesFinal

public final X509Certificates getRootCertificatesFinal()

Getter for the rootCertificates.

Returns:

the X509Certificates with the stored rootCertificates. it can be null.

getSecondaryX509CertificateInfo

public X509CertificateInfo getSecondaryX509CertificateInfo()

Getter for the secondary X509 certificate info.

This method is a getter for the information returned from the provisioning service for the provided secondary certificate.

Returns:

the X509CertificateInfo with the returned certificate information. it can be null.

Applies to