Don't call ConvertUuidToStr from ocprovision and the C++ apps
linking with this library.
Change-Id: Ie440f0d368b3bdc15a5055eb1161b0f33586a375
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19173
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Dave Thaler <dthaler@microsoft.com>
; Windows octbstack.dll exports that are required for both products and tests,
; but only when building with SECURED=1.
-ConvertUuidToStr
-
OCAssertRoles
OCConfigSelfOwnership
OCConvertDerCSRToPem
* *****************************************************************/
#include "ocstack.h"
+#include "ocrandom.h"
#include "srmutility.h"
#include "base64.h"
#include "OCProvisioningManager.hpp"
std::string OCSecureResource::getDeviceID()
{
std::ostringstream deviceId("");
- char *devID = nullptr;
+ char devID[UUID_STRING_SIZE];
validateSecureResource();
- if (OC_STACK_OK == ConvertUuidToStr(&(devPtr->doxm->deviceID), &devID))
+ if (OCConvertUuidToString(devPtr->doxm->deviceID.id, devID))
{
deviceId << devID;
- free(devID);
}
else
{
oclog() <<"Can not convert uuid to struuid";
}
+
return deviceId.str();
}