From patchwork Wed Apr 6 08:18:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Babic X-Patchwork-Id: 1613840 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=fyMb5PBC; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::638; helo=mail-ej1-x638.google.com; envelope-from=swupdate+bncbcxploxj6ikrb3uzwwjamgqejckdsfq@googlegroups.com; receiver=) Received: from mail-ej1-x638.google.com (mail-ej1-x638.google.com [IPv6:2a00:1450:4864:20::638]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KYHTs0jrFz9sFq for ; Wed, 6 Apr 2022 18:18:57 +1000 (AEST) Received: by mail-ej1-x638.google.com with SMTP id qw30-20020a1709066a1e00b006e7f3de1be3sf788539ejc.11 for ; Wed, 06 Apr 2022 01:18:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649233134; cv=pass; d=google.com; s=arc-20160816; b=dj9/n8dVv1SehiBFkaeUBgB7KIhbSLoXtxW5P/qUzuNGsIY/0ExBuNsqjb8YhAEvS7 IBfeYni4cT/LQIlEyYrvuVQiLtKGYHqa/t17yev15uBi54q35z1fyKBcGy6vfanjd2Nu B2IdieALYma0Mfgbgqqo7zhfrlgn/CRIU/UNfmHIQZKL4TtQfIjvImpBh4YoDvGRFIZJ JmIFGkgSK1+9PV7xu1idY8tIrnVdOv1c15AFxD0L7gkAV9Q4tv6Q1yVRNH5KvamdQUVX KG+H66R840enIhqoNwNhnFOxF62RTDPDHh/sIAgiDZx2YnpjQIdFOikpD5ihimHs7oiN VEBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=/WPDP5k4GPgHHizexlC8dl2yZSOhPYWWke0gxXLrl5c=; b=nPBYOBtVgBGiBZqi/x4/BQ1J1URJtC+S2sWYJwqOyjuR7rcZRqckswHuvlaCjLNcMF yygfQw3rcnB2TsKUk1kFuVrupN+FXnHZiwd3/MrSH0oDc+5K96f9MokdwAHlV9tWhtPa chUDzrb+95WiMenK9iuhONtJPTiZkkYA/uAp3sfq+oqaxgPyb/OXaYcjVeXX0l9gyOpj aA8r/oGUK4ROYodNJiqrG7Tvo9GpwW8wtRn6x+bqh2Qud4e2HhstrO0bcitmxEKqOIr4 Tl7vTqFEUbFoa00iJBFtVJqsLK4kGSIYkMDWnmVyUnQuD1vMriGC0i1BRWsC9j8+w4HO ckNw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=/WPDP5k4GPgHHizexlC8dl2yZSOhPYWWke0gxXLrl5c=; b=fyMb5PBCW/S1ZmUzlPweC9srpo94FRmGQcBYvA1XpJOtP7ElHYT1NRB9SXSWMrNzyW 2ei5Re2Gv02SkOfQVpNJv9FSnqbRsTITjOibP0/VZd6sJdrAWL0hBc1hPcsiPcvYiUu+ KRyYdvSRZDpbyi37lIM2a5uOq+XgKqc84OVJ9CnkSYWmvohR8LSYvYwe1cRfXJvH7ryk 2zAghqYE7yJ6WZrchVh0ixWGoyNP8JEy8NkdKvfv15n3OiS/3jLJM3sbwBj+ZSoexXAb nwYlcRBXaDvFdXxUERbxHKr7Th+gjYvl4A9AlfK8CQY32nGNhoJ1d9zKX58FHpy0X+8P ssoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=/WPDP5k4GPgHHizexlC8dl2yZSOhPYWWke0gxXLrl5c=; b=TWD2dDa5eTPiivK8i5yCGuvbB2iGSy4j66L/SiXsQC5fjbHLAeOmiUw+phjI/JViF5 d7YOZo9yPeKVVB8/a22OTEnM+M//2lRngebdRVd+E1AZRp9NUD7zS1d4AXODMjxGKzxV e9BZzu51DByMlwRiCR0z3M0QBjwpyimY6kfeGI7LXESGDj1vZvK3UcJPdA5fpYXa03gb YMydfJGhDigFogUod/w8yjlvrdX5Wt/Mvp0UfAMhfEZJ6kDXVAXS/mrCoLjDytIDwERc Ezh2u/svWERe6I9kGVUQuUOWk8iD419Cm0MkTMK3GfscSKzI2UgviQlV/j2CRPf7zYaC TMhw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM5301wR3EB+P7yznmpu3YS/STWqEbUb2aacZlXfgA6PiVMb9DwIA8 zenXia3jLmZMekIdLYI+vjo= X-Google-Smtp-Source: ABdhPJzYV84KfwMLQYk/wneeCmVDCVH0B0kYedywVkIrUpmd3/pciiEEPRXahUp3dfPv8hpcDoR00g== X-Received: by 2002:a17:907:6da1:b0:6e7:efbe:d217 with SMTP id sb33-20020a1709076da100b006e7efbed217mr7324405ejc.119.1649233134280; Wed, 06 Apr 2022 01:18:54 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:aa7:d1cf:0:b0:403:768d:84b2 with SMTP id g15-20020aa7d1cf000000b00403768d84b2ls778980edp.1.gmail; Wed, 06 Apr 2022 01:18:53 -0700 (PDT) X-Received: by 2002:a05:6402:c1c:b0:41c:d04f:31b2 with SMTP id co28-20020a0564020c1c00b0041cd04f31b2mr7437519edb.89.1649233133346; Wed, 06 Apr 2022 01:18:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649233133; cv=none; d=google.com; s=arc-20160816; b=DbzrejqPk5x07dDUUqjBBcCqIgk5Dvwhkfx9cIsz8FLABfHJr3BZFZroPSZbxMRFtZ sh38c1DOwdJawwYUq6DKb7XZjdK1CRBGrWznO8qSXv+BEzjZTj50W53CwoAdORgRsDms M/FOKJ7c1cml1jEywx30DIdrKnn5ZINKnqm/tZK4Lu62BRgUo2T0uRrMSmzOpxISbUhW +P5uxGj3lULanAtuLUnEnFKEE3rnBLgCsl7i9Qk1ZEwoZT5Fj2/7CeaGjEbcmPSTh8XZ 67di0JMI9Ru4GDGMEWZy61pX8FmulHbTpNfXNO5c3mPCOqNVV8lYnSD1a7hLtZCiaB4E yZ+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=Zqj5JJKC0O+8H9b1jEpaPt3TJmIv3GGfuYqORVLesFY=; b=GG8alKKTuXej/jHXEjCx6m5yumZbRuoQgVWK5Nv7rWHmNOrCfCGOgEFWZhFEi2VpkB uGOhTo5BVANVWrluk9E0EQ3wsnTGRczX10MRUeKGG/8JKp4XPZ75izRTLpKNi89TC9hC cRteheIpxQEWPNbkMrHln2EykxVTPXiEMXipV8jKllYDmk28TUiM3PAF1iipiRFP5V4k yRo7v0vE9bqezhZlAqkiN4GOvq7DLy+a4Ci72To1NLDfqe8y2tyn73tLE82KgCyJk+Cu 7wrEfoq5raF5lLP3cxLfxByea2ELhLXfWPDbuiaX2zWxYTYrOhECEon/7rOXGPkaBHOK mVug== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.10]) by gmr-mx.google.com with ESMTPS id d8-20020a50e408000000b00418f6042d64si984492edm.1.2022.04.06.01.18.53 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2022 01:18:53 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.10; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4KYHTn1NrYz1s7tQ; Wed, 6 Apr 2022 10:18:53 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4KYHTn18TQz1qqkB; Wed, 6 Apr 2022 10:18:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id nERr7PS0R5ii; Wed, 6 Apr 2022 10:18:52 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Wed, 6 Apr 2022 10:18:52 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id 6135445400DB; Wed, 6 Apr 2022 10:18:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([127.0.0.1]) by localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CsPqxl-AEigj; Wed, 6 Apr 2022 10:18:50 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 1F3CB4542CF7; Wed, 6 Apr 2022 10:18:40 +0200 (CEST) From: Stefano Babic To: swupdate@googlegroups.com Cc: Stefano Babic Subject: [swupdate] [meta swupdate] [V2 09/12] class: move swupdate_extract_keys to lib Date: Wed, 6 Apr 2022 10:18:34 +0200 Message-Id: <20220406081837.2222008-10-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220406081837.2222008-1-sbabic@denx.de> References: <20220406081837.2222008-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.10 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Signed-off-by: Stefano Babic --- classes/swupdate-common.bbclass | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/classes/swupdate-common.bbclass b/classes/swupdate-common.bbclass index 7d60a6f..79b2246 100644 --- a/classes/swupdate-common.bbclass +++ b/classes/swupdate-common.bbclass @@ -51,23 +51,6 @@ def swupdate_getdepends(d): return depstr -def swupdate_extract_keys(keyfile_path): - try: - with open(keyfile_path, 'r') as f: - lines = f.readlines() - except IOError: - bb.fatal("Failed to open file with keys %s" % (keyfile)) - - data = {} - for _ in lines: - k,v = _.split('=',maxsplit=1) - data[k.rstrip()] = v - - key = data['key'].rstrip('\n') - iv = data['iv'].rstrip('\n') - - return key,iv - def swupdate_write_sha256(s): import re write_lines = []