Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp2824170ybe; Sun, 15 Sep 2019 01:27:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqzwCCWW6J1E2WXlKNO7+gq2XRcNBdobpsOKZstpOvKt0inG5Ios/ZHqf/d+YPOoXxAn/IaF X-Received: by 2002:a17:906:5c49:: with SMTP id c9mr47057861ejr.78.1568536043786; Sun, 15 Sep 2019 01:27:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568536043; cv=none; d=google.com; s=arc-20160816; b=WUyaTRNF6sDEcP4/9qb7+WDQZsw9sDnfA4JLfnrfN/UdspWOWoRXR5lFSer412TLX9 C62ukbukY1NMMULDUKwoj+LlSIRVx9wyhs2avXSsGrTrM1KEYvae8yF/zG74je2Ax3w0 p+nJovsYJswlMP/6IyfssAYBT3vkYYIQcMUh6qDx9lhBAftRM2HFdydfKRvjrjUC+PPv Tfhc24UwhJi+BhJfMMm2n5M5cI+3pUd6B0WcJKQNUTcC9ORBDwi7C+J6BGheJMd3+HIp 76mp8vCm4lVg/FCEjFIYn3qpZhM+cDN6an3cWI/NYlN4lBk/P6tfsKna9rPVDP6S0kls j/wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=3C3dPpOB0xJVN1cqI2Yc/m7UxJXbBxi2WGWPJEMbHVs=; b=kmSiDifD9NLKsgWfqYz7WpUsw8H9axF3E2PggHw4a503xZXCKGgm4/Ux0rNP4rPnXf IvKowjExZrpPqACRC/8lEff7Fk9rHonrUWFxm3B7Ej7kI03UwE+RBmLfANVZIXzLyU3l w33MwtfGe8PfPWy1YumjbfCo6MfjE40ItjBy5Nws47PU3zuVWo/fx7JnxUKmedGLDDnQ IK05NgBFDcVpQitFzT0swPTuadDrh0VAYEIeCJeEa6QfOhPDPvGSaG0OYzZJTsXqlTz9 1xyXSZnkVh+714WdMvJ/4WHmktaQE9cKu448loiovL287WHPD3KFyoqGTu4fg2MeoJ7k Axdg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qx16si17371302ejb.279.2019.09.15.01.26.40; Sun, 15 Sep 2019 01:27:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726364AbfIOIOU (ORCPT + 99 others); Sun, 15 Sep 2019 04:14:20 -0400 Received: from mga18.intel.com ([134.134.136.126]:61783 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725497AbfIOIOU (ORCPT ); Sun, 15 Sep 2019 04:14:20 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Sep 2019 01:14:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,489,1559545200"; d="scan'208";a="385906896" Received: from bgi1-mobl2.amr.corp.intel.com ([10.251.80.76]) by fmsmga005.fm.intel.com with ESMTP; 15 Sep 2019 01:14:18 -0700 From: Brian Gix To: linux-bluetooth@vger.kernel.org Cc: brian.gix@intel.com, inga.stotland@intel.com, michal.lowas-rzechonek@silvair.com Subject: [PATCH BlueZ 1/1] mesh: Add local/remote bools to DevKey transactions Date: Sun, 15 Sep 2019 01:14:08 -0700 Message-Id: <20190915081408.18116-2-brian.gix@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190915081408.18116-1-brian.gix@intel.com> References: <20190915081408.18116-1-brian.gix@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/mesh-api.txt b/doc/mesh-api.txt index 9b9f4e3de..be2a337ba 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, bool 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,7 +787,7 @@ Methods: The data parameter is the incoming message. - void DevKeyMessageReceived(uint16 source, uint16 net_index, + void DevKeyMessageReceived(uint16 source, bool local, uint16 net_index, array{byte} data) This method is called by meshd daemon when a message arrives @@ -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