mesh: Handle messages encrypted with a remote device key
authorMichał Lowas-Rzechonek <michal.lowas-rzechonek@silvair.com>
Thu, 4 Jul 2019 12:33:38 +0000 (14:33 +0200)
committerAnupam Roy <anupam.r@samsung.com>
Tue, 17 Dec 2019 15:21:17 +0000 (20:51 +0530)
commit592eb014742c0d72d6348e80872968373e1a4e46
tree6ff4e4462d0a495cdaf39a8f37ff98f696d4af15
parent9fdb9e5f948e6308aa6c7c25dd331eb35e58261e
mesh: Handle messages encrypted with a remote device key

This adds ability to receive messages encrypted using known remote
device key. Such a key must be added to the node's keyring using
ImportRemoteNode() method of org.bluez.mesh.Management1 interface.

Decrypted messages are then forwarded to the application using
DevKeyMessageReceived() D-Bus API.

Also, messages originating from a local node and encrypted using local
device key are forwarde to the application as well, if they weren't
handled by internal model. This allows e.g. receiving status messages
from a local Config Server in the application.

Change-Id: I2fcf957dcf652d5c5cd5ae799344692a4f9c69cf
Signed-off-by: Anupam Roy <anupam.r@samsung.com>
mesh/model.c