more clean up
This commit is contained in:
1 parent
3dcc7d9367
commit
75e223a024
2 files changed
+3
-11
No files matched your search
@@ -91,9 +91,6 @@ void srp_init(void)
|
||||
// The MPI library uses a ridiculous amount of memory. We use the stack allocator
|
||||
// so we don't tie this memory up except when we absolutely need to.
|
||||
// uint8_t memory[11 * 1024];
|
||||
// uint8_t* memory = (uint8_t*) rtos_malloc(11*1024);
|
||||
// VERIFY(memory, );
|
||||
//
|
||||
// memory_buffer_alloc_init(memory, sizeof(memory));
|
||||
|
||||
// Generate salt
|
||||
@@ -170,7 +167,6 @@ void srp_init(void)
|
||||
mpi_free(&x);
|
||||
|
||||
// memory_buffer_alloc_free();
|
||||
// rtos_free(memory);
|
||||
}
|
||||
|
||||
void srp_start(void)
|
||||
@@ -186,9 +182,6 @@ uint8_t srp_setA(uint8_t* abuf, uint16_t length, moretime_t moretime)
|
||||
// The MPI library uses a ridiculous amount of memory. We use the stack allocator
|
||||
// so we don't tie this memory up except when we absolutely need to.
|
||||
// uint8_t memory[11 * 1024];
|
||||
// uint8_t* memory = (uint8_t*) rtos_malloc(11*1024);
|
||||
// VERIFY(memory, NRF_ERROR_NO_MEM);
|
||||
//
|
||||
// memory_buffer_alloc_init(memory, sizeof(memory));
|
||||
|
||||
// getK
|
||||
@@ -265,7 +258,6 @@ uint8_t srp_setA(uint8_t* abuf, uint16_t length, moretime_t moretime)
|
||||
}
|
||||
|
||||
// memory_buffer_alloc_free();
|
||||
// rtos_free(memory);
|
||||
|
||||
// getM1 - username s abuf srp.B K
|
||||
{
|
||||
|
||||
@@ -221,14 +221,14 @@ HAPResponse_t* HAPPairing::pair_setup_m1(HAPRequest_t const* hap_req)
|
||||
TLV8_t tlv_para[] =
|
||||
{
|
||||
{ .type = PAIRING_TYPE_STATE , .len = 1 , .value = &mstate },
|
||||
{ .type = PAIRING_TYPE_SALT , .len = 16 , .value = srp_getSalt() },
|
||||
{ .type = PAIRING_TYPE_PUBLIC_KEY , .len = 384, .value = srp_getB() },
|
||||
{ .type = PAIRING_TYPE_SALT , .len = 16 , .value = srp_getSalt() },
|
||||
};
|
||||
|
||||
#if DEBUG_HAP_PAIRING
|
||||
LOG_LV2_BUFFER("SRP State" , tlv_para[0].value, tlv_para[0].len);
|
||||
LOG_LV2_BUFFER("SRP Salt" , tlv_para[1].value, tlv_para[1].len);
|
||||
LOG_LV2_BUFFER("SRP Pub Key", tlv_para[2].value, tlv_para[2].len);
|
||||
LOG_LV2_BUFFER("SRP Pub Key", tlv_para[1].value, tlv_para[1].len);
|
||||
LOG_LV2_BUFFER("SRP Salt" , tlv_para[2].value, tlv_para[2].len);
|
||||
#endif
|
||||
|
||||
return createSrpResponse(hap_req->header.tid, HAP_STATUS_SUCCESS, tlv_para, arrcount(tlv_para));
|
||||
|
||||
Reference in new issue
Block a user