shrink buffer used for CSR
@@ -36,7 +36,7 @@ oc_event_callback_retval_t generate_csr(void *data)
{
struct csr_callback_params *params = data;
size_t device = params->device;
- unsigned char *csr = malloc(4096);
+ unsigned char *csr = malloc(512);
oc_set_separate_response_buffer(&csr_response);
@@ -47,7 +47,7 @@ oc_event_callback_retval_t generate_csr(void *data)
return OC_EVENT_DONE;
}
- int ret = oc_certs_generate_csr(device, csr, OC_PDU_SIZE);
+ int ret = oc_certs_generate_csr(device, csr, 512);
if (ret != 0) {
oc_send_separate_response(&csr_response, OC_STATUS_INTERNAL_SERVER_ERROR);
