Signing support implemented in the MySensors library
The dummy signing driver backend is used. But with this commit all framework logic for managing signed messages in the MySensors ecosystem is implemented and enables more sophisticated signing backends to be added later on. For a sensor (or gateway) that require a gateway to send signed messages to it, add 'true' as the fifth argument to 'begin'. The gateway will automatically inform a node of it's signing requirements as soon as it receivs the nodes signing preference. It is important to understand that if the gateway require signing, it will in this implementation only require signing from nodes that require signing by the gateway. If the sensor requires signing from another node on the network which it communicates directly with, it needs to send 'true' in an internal message of type I_REQUEST_SIGNING.
This commit is contained in:
@@ -152,6 +152,12 @@ int main () {
|
||||
address(nc.nodeId);
|
||||
}
|
||||
|
||||
// Inform gateway that bootloader does not accept signed messages
|
||||
msg.type = I_REQUEST_SIGNING;
|
||||
mSetLength(msg, 1);
|
||||
msg.data[0] = 0;
|
||||
sendWrite(msg);
|
||||
|
||||
// Read settings from EEPROM
|
||||
eeprom_read_block((void*)&fc, (void*)EEPROM_FIRMWARE_TYPE_ADDRESS, sizeof(struct FirmwareConfig));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user