X509CertificateWithInfo Class
- java.
lang. Object - com.
microsoft. azure. sdk. iot. provisioning. service. configs. X509CertificateWithInfo
- com.
public class X509CertificateWithInfo
Representation of a single Device Provisioning Service X509 Certificate with its info.
this class creates a representation of an X509 certificate that can contains the certificate, the info of the certificate or both.
To create this class, users must provide the certificate as a String
, from a .pem or .cert files.
The following JSON is an example of the result of this class.
{
"certificate": "-----BEGIN CERTIFICATE-----\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\n" +
"-----END CERTIFICATE-----\n";
}
After send an X509 certificate to the provisioning service, it will return the X509CertificateInfo. User can get this info from this class,
The following JSON is an example what info the provisioning service will return for X509.
{
"info": {
"subjectName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",
"sha1Thumbprint": "0000000000000000000000000000000000",
"sha256Thumbprint": "validEnrollmentGroupId",
"issuerName": "CN=ROOT_00000000-0000-0000-0000-000000000000, OU=Azure IoT, O=MSFT, C=US",
"notBeforeUtc": "2017-11-14T12:34:18Z",
"notAfterUtc": "2017-11-20T12:34:18Z",
"serialNumber": "000000000000000000",
"version": 3
}
}
Constructor Summary
Constructor | Description |
---|---|
X509CertificateWithInfo(X509CertificateWithInfo x509CertificateWithInfo) |
Constructor [COPY] |
Method Summary
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCertificate()
Getter for the certificate. |
X509Certificate |
getInfo()
Getter for the info. |
Methods inherited from java.lang.Object
Constructor Details
X509CertificateWithInfo
public X509CertificateWithInfo(X509CertificateWithInfo x509CertificateWithInfo)
Constructor [COPY]
Creates a new instance of the X509CertificateWithInfo copping the content of the provided one.
Parameters:
X509CertificateWithInfo
to copy.
Method Details
getCertificate
public String getCertificate()
Getter for the certificate.
Returns:
String
with the stored certificate. It can be null
.getInfo
public X509CertificateInfo getInfo()
Getter for the info.
Returns:
String
with the stored info. It can be null
.Applies to
Azure SDK for Java