From 79c4cee47535dba34d18ed84e023e14c1bd24e19 Mon Sep 17 00:00:00 2001 From: Henrik Ekblad Date: Tue, 28 Jul 2015 19:44:46 +0200 Subject: [PATCH] Fix signing problem reported by @scalz http://forum.mysensors.org/topic/1021/security-introducing-signing-support-to-mysensors/103 --- libraries/MySensors/MySensor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/MySensors/MySensor.cpp b/libraries/MySensors/MySensor.cpp index b065d7c..6949e83 100644 --- a/libraries/MySensors/MySensor.cpp +++ b/libraries/MySensors/MySensor.cpp @@ -343,7 +343,7 @@ boolean MySensor::sendRoute(MyMessage &message) { #ifdef MY_SIGNING_FEATURE // If destination is known to require signed messages and we are the sender, sign this message unless it is an ACK or a handshake message - if (DO_SIGN(message.destination) && message.sender == nc.nodeId && !mGetAck(message) && mGetLength(msg) && + if (DO_SIGN(message.destination) && message.sender == nc.nodeId && !mGetAck(message) && mGetLength(message) && (mGetCommand(message) != C_INTERNAL || (message.type != I_GET_NONCE && message.type != I_GET_NONCE_RESPONSE && message.type != I_REQUEST_SIGNING && message.type != I_ID_REQUEST && message.type != I_ID_RESPONSE &&