Part Number: CC2652R
Hi,
I'm trying do add my own authentication process before sending the network key to validate if the device is authorized to my system and allowed into the network.
I'm trying to start this process in the ZStatus_t ZDSecMegrDeviceValidate( ) function in z_sec_mgr.c before validating and setting the ZStatus_t. A'm also trying to extend the events in the OsalPort_EvenHdr to handle the authentication, a three-way handshake, and through this events do the procedure needed depending on the message.
The three-way handshake is based on the Challange Handshake Authentication (CHAP) protocol and consists of:
- A challenge which will be initiated from the ZStatus_t ZDSecMegrDeviceValidate( ) function and sent from the coordinator to the joining device.
- A response sent from the joining device to the coordinator based on the challenge.
- A Success or Failure indication sent to the joining device from the coordinator
After this is a variable set to "true" to indicate a successful authentication or false if it is unsuccessful. This variable will be checked in the if statement deciding if ZStatus for the validation will be ZSuccessful or not.
My question is how can I send these messages for the handshake between the joining device and the coordinator before the network key is sent to the joining device?