Commit 7f5fe36c authored by Oleksii Beketov's avatar Oleksii Beketov

[IOT-3301] CSR encoding PEM

CSR encoding changed from DER to PEM.

Change-Id: Ia745d65ac2885056aa4ed5affadd2e38d2fab512
Signed-off-by: default avatarOleksii Beketov <ol.beketov@samsung.com>
parent c029e953
...@@ -437,7 +437,7 @@ static OCEntityHandlerResult HandleCsrGetRequest(OCEntityHandlerRequest * ehRequ ...@@ -437,7 +437,7 @@ static OCEntityHandlerResult HandleCsrGetRequest(OCEntityHandlerRequest * ehRequ
VERIFY_SUCCESS(TAG, 0 <= ret, ERROR); VERIFY_SUCCESS(TAG, 0 <= ret, ERROR);
/* ret >= myDNStrLen means there was truncation; assert because this means a code bug. */ /* ret >= myDNStrLen means there was truncation; assert because this means a code bug. */
assert((size_t)ret < myDNStrLen); assert((size_t)ret < myDNStrLen);
ret = OCInternalCSRRequest(myDNStr, &keyPair, OIC_ENCODING_DER, &csr); ret = OCInternalCSRRequest(myDNStr, &keyPair, OIC_ENCODING_PEM, &csr);
if (0 > ret) if (0 > ret)
{ {
res = OC_STACK_ERROR; res = OC_STACK_ERROR;
...@@ -445,7 +445,7 @@ static OCEntityHandlerResult HandleCsrGetRequest(OCEntityHandlerRequest * ehRequ ...@@ -445,7 +445,7 @@ static OCEntityHandlerResult HandleCsrGetRequest(OCEntityHandlerRequest * ehRequ
} }
// Convert CSR data into CBOR for transmission // Convert CSR data into CBOR for transmission
res = CSRToCBORPayload(csr.bytes, csr.len, OIC_ENCODING_DER, &payload, &size); res = CSRToCBORPayload(csr.bytes, csr.len, OIC_ENCODING_PEM, &payload, &size);
exit: exit:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment