Udostępnij za pośrednictwem


X509Certificates Class

Definition

Representation of a single Device Provisioning Service X509 primary and secondary certificates.

public class X509Certificates
type X509Certificates = class
Public Class X509Certificates
Inheritance
X509Certificates

Examples

The following JSON is an example of the result of this class.

{
    "primary": {
        "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";
    },
    "secondary": {
        "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 with success, the provisioning service will return the X509CertificateInfo for both primary and secondary certificate. User can get these info from this class, and once again, only the primary info is mandatory. The following JSON is an example what info the provisioning service will return for X509.

{
    "primary": {
        "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
         }
    },
    "secondary": {
        "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
         }
    }
}

Remarks

This class creates a representation of an X509 certificate. It can receive primary and secondary certificate, but only the primary is mandatory.

Properties

Primary

Primary certificate.

Secondary

Secondary certificate.

Applies to