Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of d7a_1x by
Diff: src/d7a_alp.cpp
- Revision:
- 82:5d1b101b6d11
- Parent:
- 80:30265d5dd20a
- Child:
- 83:f4054d0b29ba
--- a/src/d7a_alp.cpp Wed Dec 21 17:15:38 2016 +0000 +++ b/src/d7a_alp.cpp Thu Jan 05 12:37:44 2017 +0000 @@ -342,6 +342,8 @@ sha256_update(req, req_size); sha256_update((uint8_t*)root_key, D7A_ROOT_KEY_SIZE); sha256_final(hash); + //PRINT_DATA("Req : ", "%02X ", (uint8_t*)req, req_size, "\r\n"); + //PRINT_DATA("Key : ", "%d ", (uint8_t*)root_key, D7A_ROOT_KEY_SIZE, "\r\n"); //PRINT_DATA("Token: ", "%02X", hash, D7A_AUTH_PROTOCOLE_TOKEN_SIZE, "\r\n"); p += d7a_alp_add(p, hash, D7A_AUTH_PROTOCOLE_TOKEN_SIZE); @@ -443,7 +445,7 @@ } while (1); } -uint32_t d7a_alp_construct_itf(uint8_t* p, const uint8_t* root_key, d7a_addressee_t* addressee, uint8_t retry, bool resp) +uint32_t d7a_alp_construct_itf(uint8_t* p, d7a_addressee_t* addressee, uint8_t retry, bool resp) { bool broadcast = false; uint32_t max_responses = 2; @@ -508,7 +510,7 @@ d7a_msg_t** ret = NULL; uint32_t max_responses; - max_responses = d7a_alp_construct_itf(p, root_key, addressee, retry, resp); + max_responses = d7a_alp_construct_itf(p, addressee, retry, resp); // malloc and init pointer array ret = d7a_alp_init_ret(max_responses); @@ -553,7 +555,7 @@ d7a_msg_t** ret = NULL; uint32_t max_responses; - max_responses = d7a_alp_construct_itf(p, root_key, addressee, retry, true); + max_responses = d7a_alp_construct_itf(p, addressee, retry, true); // malloc and init pointer array ret = d7a_alp_init_ret(max_responses); @@ -568,7 +570,7 @@ if (root_key) { uint8_t req[100]; - uint8_t req_size = d7a_alp_read_action(p, file_id, offset, size, true); + uint8_t req_size = d7a_alp_read_action(req, file_id, offset, size, true); p += d7a_alp_perm_request_action(p, req, req_size, root_key, false); } @@ -598,7 +600,7 @@ d7a_msg_t** ret = NULL; uint32_t max_responses; - max_responses = d7a_alp_construct_itf(p, root_key, addressee, retry, resp); + max_responses = d7a_alp_construct_itf(p, addressee, retry, resp); // malloc and init pointer array ret = d7a_alp_init_ret(max_responses); @@ -613,7 +615,7 @@ if (root_key) { uint8_t req[100]; - uint8_t req_size = d7a_alp_flush_action(p, file_id, resp); + uint8_t req_size = d7a_alp_flush_action(req, file_id, resp); p += d7a_alp_perm_request_action(p, req, req_size, root_key, false); }