This function retrieves the certificate associated with a device.
- API
-
int Iotc_GetCertificate(IotcSession *iotcSession, const IotcDeviceId *deviceId, const IotcCertificateId *certId, const char *filePath)
- Description
-
Get private key as a PEM file. The PEM file is written to a specified file path.
- Parameters
-
iotcSession
The current
IotcSession
to be used.deviceId
Pointer to the device identifier of the device.
certId
Pointer to
IotcCertificateId
.filePath
The path to which the certificate is written. Must be a full path.
- Returns
-
0 on success and -1 on failure