|
157 | 157 | * Just set the flag @ref MY_SIGNING_REQUEST_SIGNATURES and the node will inform the gateway that it expects the gateway to sign all
|
158 | 158 | * messages sent to the node. If this is set in a gateway, it will @b NOT force all nodes to sign messages to it. It will only require
|
159 | 159 | * signatures from nodes that in turn require signatures.<br>
|
| 160 | + * If you want to have two nodes communicate securely directly with each other, the nodes that require signatures must send a presentation |
| 161 | + * message to all nodes it expect signed messages from (only the gateway is informed automatically). See @ref signerPresentation().<br> |
160 | 162 | * A node can have three "states" with respect to signing:
|
161 | 163 | * 1. Node does not support signing in any way (neither @ref MY_SIGNING_ATSHA204 nor @ref MY_SIGNING_SOFT is set)
|
162 | 164 | * 2. Node does support signing but don't require messages sent to it to be signed (@ref MY_SIGNING_REQUEST_SIGNATURES is not set)
|
@@ -506,14 +508,19 @@ void signerInit(void);
|
506 | 508 | /**
|
507 | 509 | * @brief Does signing specific presentation for a node.
|
508 | 510 | *
|
509 |
| - * This function makes sure any signing related presentation info is shared with the gateway. |
| 511 | + * This function makes sure any signing related presentation info is shared with the other part. |
510 | 512 | * The presentation of the gateways signing preferences is done in @ref signerProcessInternal().
|
511 | 513 | * \n@b Usage: This function should be called by the presentation routine of the mysensors library.
|
512 |
| - * There is no need to call this directly from a sketch. |
| 514 | + * You only need to call this directly from a sketch to set up a node to node signed message exchange. |
| 515 | + * If you do call this directly from a sketch, and you at some point change your sketch to go from |
| 516 | + * requireing signing to not requireing signatures, you need to present this change to the node at least |
| 517 | + * once, so it can update its requirements tables accordingly. Or it will keep believing that this node |
| 518 | + * require signatures and attempt to send signed messages to it. |
513 | 519 | *
|
514 | 520 | * @param msg Message buffer to use.
|
| 521 | + * @param destination Node ID of the destination. |
515 | 522 | */
|
516 |
| -void signerPresentation(MyMessage &msg); |
| 523 | +void signerPresentation(MyMessage &msg, uint8_t destination); |
517 | 524 |
|
518 | 525 | /**
|
519 | 526 | * @brief Manages internal signing message handshaking.
|
|
0 commit comments