Trying to implement TPM provisioning for edge devices through nodeJS. https://learn.microsoft.com/en-us/azure/iot-dps/quick-create-simulated-device-x509-node As mentioned able to generate a self-signed certificate for testing purposes. Please help me with, How to generate and validate for the production environment. I am not much clear terminology-wise and looking for starting point to do RD.
Here is a sample code for self-signed certificate validation which is derived from azure-IoT-sdk node JS.
var deviceCert = {
cert: fs.readFileSync(process.env.CERTIFICATE_FILE).toString(),
key: fs.readFileSync(process.env.KEY_FILE).toString()
};
var transport = new Transport();
var securityClient = new X509Security(registrationId, deviceCert);
var deviceClient = ProvisioningDeviceClient.create(provisioningHost, idScope, transport, securityClient);