Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp171824pxb; Wed, 3 Nov 2021 02:05:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAl0T2BG3DUwCkLxIF5koYI7coXGIyFq1BDH+uL1gSjMm8HaBbGa75wmyzXCYWF9ftfsVr X-Received: by 2002:a05:6402:128a:: with SMTP id w10mr50119190edv.272.1635930329304; Wed, 03 Nov 2021 02:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635930329; cv=none; d=google.com; s=arc-20160816; b=KxfXS/07GRgQV0GhzWujKSrvfmYRCb1dVVCZw158M43PQnrHNuQTzqqYOnioL3gltr UIOsL/V1G08ielOZxcj314GM8RWmYEf4hpjDjowaiudBFxNt0gfD4Urzc+ERz9YwOg7e pAY8P4qeCISleLT4pIoZZMsMnJNnepTo43I09W7EOp3gTmAQ74MqX/QX/AADcpdKmnSC dFvSMZVCarg8nBGakXNP5KbEzjECEBcLxgJmpIl6cNWtpa7LlZ8vqdFb+QWJzptmI1Se cdlzOyM7+LSxjMSsFZcCGdaEjM+eYg/+zUeqxZiS3K+Fn+DLOiF9WBSaXH4sXhAbY3J3 3fMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:references:mime-version :message-id:in-reply-to:date:dkim-signature; bh=qO4nWP74PgUYZ6ku/F35jiPU7Ia3HjCxnhp1F2jmYls=; b=knIXQjO71iCCwluGcWTxncPIZiT5bav9gaAtUXOpCWt8hE8NK6sVmiWnGJgQd3fwj7 MlVmQxuHykput0xcJMtWKvSnCW2MbC8KGhGUi7r4M9mbs6+Za89wFNiHNXziDqWLBk31 OUlDp1luzNe66jQ6j5fPF/854IiuuFiYBd9MEQhQsGuydOqsBKCIK8QK6qnUgjbFR1ch Q0rN9RYnw6IForh18NSs97suDDgJyi/cc3uVEOSSry1E95kb2bYH5sVEZNfWcXQzoLx0 fJ98VgEMrYbd8kowlsrAr6ztX9q2tjOiH+yXdA7cZMuHZJ0HBnDf53qD97RPbizJPLMf Et/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=JfNgJBf8; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id do2si2860290ejc.536.2021.11.03.02.04.57; Wed, 03 Nov 2021 02:05:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=JfNgJBf8; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232063AbhKCJF5 (ORCPT + 99 others); Wed, 3 Nov 2021 05:05:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232095AbhKCJFy (ORCPT ); Wed, 3 Nov 2021 05:05:54 -0400 Received: from mail-yb1-xb4a.google.com (mail-yb1-xb4a.google.com [IPv6:2607:f8b0:4864:20::b4a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0AC2DC061228 for ; Wed, 3 Nov 2021 02:03:15 -0700 (PDT) Received: by mail-yb1-xb4a.google.com with SMTP id g36-20020a25ae64000000b005c1f46f7ee6so3145586ybe.8 for ; Wed, 03 Nov 2021 02:03:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=qO4nWP74PgUYZ6ku/F35jiPU7Ia3HjCxnhp1F2jmYls=; b=JfNgJBf8+g6NhFNfAtdkHw9ACZfdgVKx8b+QcKTyxKchfDwFEqsEAefTMwF0b2Cpzq ybRDT9RH0fllh52jPENHmjjq4aArWzHfkON5xYA/pRrbJwDA4MoZxnVTOmUEhKrDMIOZ 52/pIUs6C2bOdDdJayTK//RtL79vKHz2BzMaq4FoUP9s1tC3N92FNzE1bBb2KoJjLjpk 30wkO2DPxgI7CBB563C69nLRhSleIAnVqO6GjRo+HEsHpsEbcf7XLKhSctHUcJV6Bm8o GHC7O8GS45L3M9KIjNpO5uVzeNBzGaqGdWTWi1xOuhMM8Fpd5NYea7YPheDmT5htrAAT n/nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=qO4nWP74PgUYZ6ku/F35jiPU7Ia3HjCxnhp1F2jmYls=; b=PwXWJBVasB8r7un9JXnU42X5DORieVbGAWRZZEU6DHX2pwm+L8Gs1UZTmyImyIUCDi OHdchfW1spklqQWq/MXtxGwmrkbOU0J0hU3hWEx/O9sT85SYe2Tid6SbI8BUzvvsDCeK l8/TawLYPXf/kF3vmANyX0+mt9kfpn4KRKjDF4e/4Sz40xlzGjCQBpiBZ0qKVu0jU2C1 e2WUwPg6GykUu8jdGTQ7McfGqqvq6Y3fTSZuG2Vlpm7GA2NAYbE+gNnKuBecaMTQgvX2 fQ0k12kU9tKsKYkEHWWxLD8avPBI7TR7KVFHcMT/l9RD1jwPTtYMXA6UmQt510q/tiQq HsQw== X-Gm-Message-State: AOAM531IYW5lkWVvFRql+limUr8z02qCex47DMJ0vh0+YimQrR5BDS/X uicfStSq9GRXxPDkdrytV/hOzvltraQZwj4gU3xHcfdxAJRuqUg/TY+cvwjAQd32LWY7yrcficy C0ccnC9DNcUoDz0BUvpbxd20QaNxFBt8J+xADz7E7i4GFkMJUjzdBDuho5Drh3Z1flEHCGpwmRL 5i X-Received: from apusaka-p920.tpe.corp.google.com ([2401:fa00:1:10:7af7:a937:5810:b542]) (user=apusaka job=sendgmr) by 2002:a05:6902:100b:: with SMTP id w11mr18971055ybt.64.1635930194158; Wed, 03 Nov 2021 02:03:14 -0700 (PDT) Date: Wed, 3 Nov 2021 17:02:55 +0800 In-Reply-To: <20211103170206.Bluez.v2.1.I515833d2764b8ec2ac2bb1f87313de80ebb497cd@changeid> Message-Id: <20211103170206.Bluez.v2.3.Idb95ae18113225915b97a4f06983e1e41a7f7a2e@changeid> Mime-Version: 1.0 References: <20211103170206.Bluez.v2.1.I515833d2764b8ec2ac2bb1f87313de80ebb497cd@changeid> X-Mailer: git-send-email 2.33.1.1089.g2158813163f-goog Subject: [Bluez PATCH v2 3/3] adapter: Remove "Master" entry from LTK storage From: Archie Pusaka To: linux-bluetooth , Luiz Augusto von Dentz , Marcel Holtmann Cc: CrosBT Upstreaming , Archie Pusaka Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org From: Archie Pusaka The entry has been deprecated since 2014 and it's time to remove them altogether. Signed-off-by: Archie Pusaka --- (no changes since v1) src/adapter.c | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/adapter.c b/src/adapter.c index 114ae84c10..508917e58d 100644 --- a/src/adapter.c +++ b/src/adapter.c @@ -3779,8 +3779,6 @@ static struct smp_ltk_info *get_ltk(GKeyFile *key_file, const char *peer, uint8_t peer_type, const char *group) { struct smp_ltk_info *ltk = NULL; - GError *gerr = NULL; - bool central; char *key; char *rand = NULL; @@ -3836,12 +3834,6 @@ static struct smp_ltk_info *get_ltk(GKeyFile *key_file, const char *peer, NULL); ltk->ediv = g_key_file_get_integer(key_file, group, "EDiv", NULL); - central = g_key_file_get_boolean(key_file, group, "Master", &gerr); - if (gerr) - g_error_free(gerr); - else - ltk->central = central; - ltk->is_blocked = is_blocked_key(HCI_BLOCKED_KEY_TYPE_LTK, ltk->val); @@ -5907,7 +5899,6 @@ static void convert_ltk_entry(GKeyFile *key_file, void *value) g_free(str); g_key_file_set_integer(key_file, "LongTermKey", "Authenticated", auth); - g_key_file_set_integer(key_file, "LongTermKey", "Master", central); g_key_file_set_integer(key_file, "LongTermKey", "EncSize", enc_size); g_key_file_set_integer(key_file, "LongTermKey", "EDiv", ediv); @@ -8448,9 +8439,6 @@ static void store_ltk_group(struct btd_adapter *adapter, const bdaddr_t *peer, g_error_free(gerr); } - /* Old files may contain this so remove it in case it exists */ - g_key_file_remove_key(key_file, "LongTermKey", "Master", NULL); - for (i = 0; i < 16; i++) sprintf(key_str + (i * 2), "%2.2X", key[i]); -- 2.33.1.1089.g2158813163f-goog