This function retrieves the private key.
- API
-
int Iotc_GetPrivateKey(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