From: Brian Gix <brian.gix@intel.com>
To: linux-bluetooth@vger.kernel.org
Cc: brian.gix@intel.com, inga.stotland@intel.com,
michal.lowas-rzechonek@silvair.com
Subject: [PATCH BlueZ v2 1/3] mesh: Add local/remote bools to DevKey transactions
Date: Wed, 25 Sep 2019 09:33:27 -0700 [thread overview]
Message-ID: <20190925163329.23767-2-brian.gix@intel.com> (raw)
In-Reply-To: <20190925163329.23767-1-brian.gix@intel.com>
DevKey operations require authorization on the part of the applications
making the requests. Messages to state changing Servers should use keys
from the local Key Database to demonstrate authority.
---
doc/mesh-api.txt | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt
index 9b9f4e3de..ec502dbd7 100644
--- a/doc/mesh-api.txt
+++ b/doc/mesh-api.txt
@@ -245,7 +245,7 @@ Methods:
org.bluez.mesh.Error.InvalidArguments
org.bluez.mesh.Error.NotFound
- void DevKeySend(object element_path, uint16 destination,
+ void DevKeySend(object element_path, uint16 destination, boolean remote,
uint16 net_index, array{byte} data)
This method is used to send a message originated by a local
@@ -259,6 +259,11 @@ Methods:
destination must be a uint16 to a unicast address, or a well
known group address.
+ The remote parameter, if true, looks up the destination address
+ in the key database to encrypt the message. If false the local
+ device key is used. If remote is true, but requested key does
+ not exist, a NotFound error will be returned.
+
The net_index parameter is the subnet index of the network on
which the message is to be sent.
@@ -782,8 +787,8 @@ Methods:
The data parameter is the incoming message.
- void DevKeyMessageReceived(uint16 source, uint16 net_index,
- array{byte} data)
+ void DevKeyMessageReceived(uint16 source, boolean local,
+ uint16 net_index, array{byte} data)
This method is called by meshd daemon when a message arrives
addressed to the application, which was sent with the remote
@@ -792,6 +797,10 @@ Methods:
The source parameter is unicast address of the remote
node-element that sent the message.
+ The local parameter if true indicates that the local device key
+ was used to decrypt the message. False indicates that the remote
+ nodes device key was used.
+
The net_index parameter indicates what subnet the message was
received on, and if a response is required, the same subnet
must be used to send the response.
--
2.21.0
next prev parent reply other threads:[~2019-09-25 16:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-25 16:33 [PATCH BlueZ v2 0/3] mesh: Fix Remote/Local dev key usage Brian Gix
2019-09-25 16:33 ` Brian Gix [this message]
2019-09-25 16:33 ` [PATCH BlueZ v2 2/3] mesh: Use explicit Local vs Remote Device " Brian Gix
2019-09-25 16:33 ` [PATCH BlueZ v2 3/3] mesh: Fix Key Ring permissions for local nodes Brian Gix
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190925163329.23767-2-brian.gix@intel.com \
--to=brian.gix@intel.com \
--cc=inga.stotland@intel.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=michal.lowas-rzechonek@silvair.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).