replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / security / provisioning / src / cloud / csr.c
index 1c4fcd1..048e0f5 100644 (file)
@@ -393,17 +393,11 @@ static OCStackResult HandleCertificateIssueRequest(void *ctx, void **data, OCCli
             OIC_ENCODING_DER
         };
 
-        OicSecCert_t cert1 =
-        {
-            cert.data,
-            cert.len,
-        };
-
         uint16_t credId;
-        result = SRPSaveOwnCertChain(&cert1, &key, &credId);
+        result = SRPSaveOwnCertChain(&cert, &key, &credId);
         if (result != OC_STACK_OK)
         {
-            OIC_LOG(ERROR, TAG, "Cann't add cert");
+            OIC_LOG(ERROR, TAG, "Can't add cert");
         }
     }
 
@@ -412,7 +406,7 @@ static OCStackResult HandleCertificateIssueRequest(void *ctx, void **data, OCCli
     if (!OCRepPayloadGetPropPubDataType((OCRepPayload *)response->payload,
                                    OC_RSRVD_CACERT, &caCert))
     {
-        OIC_LOG_V(ERROR, TAG, "Cann't get: %s", OC_RSRVD_CACERT);
+        OIC_LOG_V(ERROR, TAG, "Can't get: %s", OC_RSRVD_CACERT);
         result = OC_STACK_ERROR;
     }
     else
@@ -462,7 +456,7 @@ OCStackResult OCCloudCertificateIssueRequest(void* ctx,
 
     OIC_LOG_V(DEBUG, TAG, "Certificate Request subject: %s", subject);
 
-    OCByteString request;
+    OCByteString request = {0};
     if (0 != GenerateCSR(subject, &request))
     {
         OIC_LOG(ERROR, TAG, "Cann't get the sertificate request");