Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2122036ybi; Thu, 4 Jul 2019 05:34:26 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrvfkFvCqPp11I0rEXJF+30ve+pHcpgsOKa2diD67Z6+MKPvYeXz+bafZGuCDl2NdjGMsg X-Received: by 2002:a17:902:d81:: with SMTP id 1mr16124760plv.323.1562243666675; Thu, 04 Jul 2019 05:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562243666; cv=none; d=google.com; s=arc-20160816; b=oY0Xs0mTnd45w4GMCvAeC5WN+Z0YZjYTGn0xzP78NYWwaAgpSgO8OKZf+sEFPmq/UZ zNju0I0twl93BrGp7zDpbFztG0PftP/MKUi7lV72vBa10q7GKw8MpbE/WlP5w5Ln6VdN NXTsAhtuIaTqSLcGyMIyUAlBoZGonv4V0VbuXjbpEFUxmoITvcQOFJPTBvEzwLFftnGi XXzpNILCup2bcIG/mKxCmpZpj6sqmyqks/e1TTK3MpTRDZAr473Mk6o5+DpoV3x4MtP7 fTwiW0vGUbsv4vUI7Crm0cTPlC6PgU5wvpjoMLArVF5SZm+bKFkhrOjphjlJyXtAkc5K wjsg== 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 :message-id:date:subject:to:from:dkim-signature; bh=U3doyi/oIBgrWoo6lZoqBf/FoW6Brbnlh7rxX+qhdko=; b=GcTSgb2S2M7yqOSbcIyZ+SLaaBDANWXlllGiagCe4gwSBrQcVKVHWPJ2lR/0S5QOip Q/Jyz9ePki1CEmeF7C6GiDCPI5wBlDvzP7L/+9TZW/15Lc8QfkZ/BV/fzIzLOL3gA7ye gHzGFqR7KmekPZ9MJBEKS9WX3/qZxPWV7rPv98WLLuMrLg8yR30HY4RjJTrgyi9Jre05 LqXJ6vigRshKJiurkM90ccnlZ8GId4E5B6UJc3aN9uP/2qpA3UAVdD+jPCaedDqB+xRi qnPLi25hHM3e7nYFVq/QTX1U07/0PzwmNC4+JOIVYbvbgTWWiEPBdYlwl9UvARw8VUBy SvoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=i1n5EjwI; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f96si5259770plb.339.2019.07.04.05.33.57; Thu, 04 Jul 2019 05:34:26 -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; dkim=pass header.i=@silvair-com.20150623.gappssmtp.com header.s=20150623 header.b=i1n5EjwI; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727769AbfGDMdp (ORCPT + 99 others); Thu, 4 Jul 2019 08:33:45 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:42990 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727768AbfGDMdp (ORCPT ); Thu, 4 Jul 2019 08:33:45 -0400 Received: by mail-lj1-f194.google.com with SMTP id t28so5988576lje.9 for ; Thu, 04 Jul 2019 05:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silvair-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=U3doyi/oIBgrWoo6lZoqBf/FoW6Brbnlh7rxX+qhdko=; b=i1n5EjwI7BaD/0KEJc19WE4SYCU3oVzyqpx25zbKDL5kTB4+6fY3S5oTLYRw4rrEmP b7CHpfN5o5EURn8Il9W+vt1fgiKS+d4F+kRdT7TtT0UT+TqB04OKgWsnwO8OPO6XFp4k gcGrSrAFN8FLRhVeNWwlZRJOZHSAclnY9HPoB3HuXQelHLs6f+1ohmI9vSngAotfc7IH QSZrFglHVvqGCmsHXuvXJpw9dwoeu525LkvJ40KhaTDbcFoMQL1vwh5eQGoH3mPQTPoM +Ue34NeQBROeIfMTMZUda/vTDm2S6OzWhOtp+G/9KHQmGcMfKzWB/McXc86bK7qafkOH mJDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=U3doyi/oIBgrWoo6lZoqBf/FoW6Brbnlh7rxX+qhdko=; b=Wo9wn7M+SCEjTKOP8U3jNAtFcPibRHyF1/lT19lzj8fcL+bP83QJ/j6dNFc6s2UdE6 MUT0vaqE/urINibRqZOl4yDPc8gaENVknJPDafHl+hBTEf1BZNagZH6yTDcSLUrYhIbe aokCNQuto0wwDKfX3QcvdPW6IBWLQpax4ZE0U8zflMnUYVoJsrYy4buiD93ib3SfcBNM hEtuWPbHluA3HZmJzTYRvEhN2SRTpxR7nV7ldyk7rh7H38Z7rEi7+uznq05KCtr79JKZ bhmUbJCMf12r4nEZQq1SXndph9WUSmgAKqRIEpIVfPmqz/kGLAp7f4uFRJPwuPLBmqzU asUQ== X-Gm-Message-State: APjAAAXG9aa8lv34QelYqdiMLjGZdLlI6WiI5rcCj843qRShvJvM+fy2 YeQJg7xTohvQ7+JwAx1fZxM9qqVXDFM= X-Received: by 2002:a2e:9758:: with SMTP id f24mr8508856ljj.58.1562243623210; Thu, 04 Jul 2019 05:33:43 -0700 (PDT) Received: from mlowasrzechonek2133.silvair.lan ([217.153.94.18]) by smtp.gmail.com with ESMTPSA id g68sm1126151ljg.47.2019.07.04.05.33.42 for (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 04 Jul 2019 05:33:42 -0700 (PDT) From: =?UTF-8?q?Micha=C5=82=20Lowas-Rzechonek?= To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v5 0/5] Add possibility to use remote device keys Date: Thu, 4 Jul 2019 14:33:33 +0200 Message-Id: <20190704123338.5988-1-michal.lowas-rzechonek@silvair.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org +Fix build/checkpatch errors +Remove unused APP_IDX_NET and APP_IDX_ANY +Fix handling of incoming packets marked with APP_IDX_DEV_REMOTE +Fix usage of l_dbus_message_new_method_return +Fix usage of l_dbus_message_builder APIs This patchset adds support for sending and receiving messages encrypted with remote device keys. This plugs a 'loophole' in the API where it was possible to exchange such messages using Send()/MessageReceived() API by using 0x7fff app key index. In order to allow the application to receive responses from a local Config Server model, messages originating from a local node and encrypted using local device key are also forwarded to the application via D-Bus (assuming they were not handled by one of internal models). MichaƂ Lowas-Rzechonek (5): mesh: Cleanup l_dbus_message_... API usage in models mesh: Cleanup D-Bus method returns with empty result mesh: Split APP_IDX_DEV into APP_IDX_DEV_LOCAL and APP_IDX_DEV_REMOTE mesh: Implement DevKeySend() method on Node interface mesh: Handle messages encrypted with a remote device key mesh/cfgmod-server.c | 15 +++--- mesh/model.c | 124 ++++++++++++++++++++++++++++++------------- mesh/net.h | 8 +-- mesh/node.c | 71 +++++++++++++++++++------ 4 files changed, 154 insertions(+), 64 deletions(-) -- 2.19.1