Message ID | 20250109123824.2549800-1-patrick.vogelaar@belden.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBDV6NJFR2YERBW4G765QMGQESPYW6BA@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=f6ASqB23; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::1039; helo=mail-pj1-x1039.google.com; envelope-from=swupdate+bncbdv6njfr2yerbw4g765qmgqespyw6ba@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-pj1-x1039.google.com (mail-pj1-x1039.google.com [IPv6:2607:f8b0:4864:20::1039]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4YTPV82kqZz1yP7 for <incoming@patchwork.ozlabs.org>; Thu, 9 Jan 2025 23:38:55 +1100 (AEDT) Received: by mail-pj1-x1039.google.com with SMTP id 98e67ed59e1d1-2ef80d30df1sf1584385a91.1 for <incoming@patchwork.ozlabs.org>; Thu, 09 Jan 2025 04:38:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736426333; cv=pass; d=google.com; s=arc-20240605; b=F1Ex025iXEC7O8mAUlu8A3G8ajvvJwhSxdGR9TdjtWDsPhIipuBxCv7cB1u8fIMI5B HUZ1VsFTbYC0ZXn1NXwaKYIzUkPnSyhgjBfkCW4VnXyG4oCW9c8jw3SWBqXKgG49sx8u BOBRntg6C/MdzBG/8DIBxfwHu3o0LJnpqu7f8rhqBTHcJjq42VundQ06XMg1KPFbl0aU 8WvBpNRTAzM2bx6qz6GWdjnxPnuEWi7JJ3DYqJrn2jXaUcGvzJOT0g2aiP3UBhltimST H7xuw8MS2cclMaEe9tEaP9oGbE0cGV6vfioD7FDfZCqyfoOJF1Gm9QZppED82P13ySii gB6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=lZD01cEgsnWeNPwUkMMsG/BO4HHF/TY2LmBr2Ex95/8=; fh=0qdc1CGC3TDtdQlPnczSq40WlMCeCky2n+6EtoTfGAc=; b=gzSFYBud8p59QbMVe6TDdmOdZCmQyn8k55XitE5VPY/6oFV4vISYwxibi3tUr8SI0k arIIBQF5A6ZKXdW+ZGKFt0cFHQAl6TIWI1JqwFWYt0cntf1giDRvwqtnWRd7Y1N1MC7I I8ZCskmo5BchrCjjzrzNgLhzC1YidPj+w9GlHCM4H3Voze8T1Z+Ktw7nQXfkw98ayNLb Z2+2qycdwjLmm3Bmw8EkQSpqx9t7EKEvr8tik/5AeG5ZSKDDSvj/sV1SgbeHWzFD6vhQ h91+zUM8YDYqDHX6kdmTumjGLU0O/sQ8R3cUiLcb6/GCmOt9QqcCU+Q0slU+hsUFAqNJ wWBA==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@belden.com header.s=podpps1 header.b=3SeimPLP; spf=pass (google.com: domain of noreply@belden.com designates 205.220.178.250 as permitted sender) smtp.mailfrom=noreply@belden.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=belden.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1736426333; x=1737031133; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lZD01cEgsnWeNPwUkMMsG/BO4HHF/TY2LmBr2Ex95/8=; b=f6ASqB23dSdta9Mu58UP5Ko5KX7mpQzl7N/qv/B1aAYFVWTvPeKNQHV82UCXO6wFXI UoThc2waXGI0ClCoS5FXsfIMO5yI3LRNhLQUO7qObWUchfdCQ9OWZgsWMZ7yGQrJGk2Z FIpzo1+rxQwPx/9sqzMwSahX7pLvOfZtjwhSAOis1zTbR2sT+WAOta5ZzzOoG/1EfLWh abTRqmQclvVfSeybU0S50TWMRuujmxhXeBnzxd9B3gZBeK9dU3YJaUyCpw+903TwXhNW wtc3YjoJg6dXT/qz69ZjvZjIxRBzbFlLJajgDn0S0WbwGuFeSodIlK8kLiwtI4XV/1op o52w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736426333; x=1737031133; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=lZD01cEgsnWeNPwUkMMsG/BO4HHF/TY2LmBr2Ex95/8=; b=PyaN0LYQW+H95rWd7+sWgIkQ8KfYwPDA6l4GCMng7y9caGkMSsN8DdtW4gBR+vOpBX WZrxDtW2mB86e3hBFytLsPGD8aSuOciWWlsagcSRPKpSF6GvIShL9QfPllSzkNDxzVZH TtupGQOHIM9+X4y65L346yopRuWlu/9uOShPYKvfNLu9CXYW1/6DICi/sM8ch+y5AfvJ wfdZnUKN9iZBf7xy53/0mA72YPV7t2oMuHXGSUi6F8AvAGPT5IZK0shvsYos2+HSEUOI /e6HFJ4B0XWwZ2UzldaQQZx2C7jRjOztziEvzlHtwEtHtbUt89ws2BGvJgISvVKzGvMz a37A== X-Forwarded-Encrypted: i=2; AJvYcCXo4jdcyxuTM3op6oJl/hEozegP+sD/PCONRnBd5JHB/hipRJ7HjPYEcia3dQdtLfLf3ilFB1jQnA==@patchwork.ozlabs.org X-Gm-Message-State: AOJu0Ywc7sYS+5XtPBgMxngjgc2HZ4EE8INtzoP44QafqzmBoHIGpKqQ 2H8aW5/CCfxt9xwRxlkX+E7AnO0ipPrxxHIk38RUf0jTxJ0dCFxX X-Google-Smtp-Source: AGHT+IFD5kREuAx0YAwsctVbaGT8/hkNCXuCpm6EzAKrvh+0KvPCaP7NXCtEeWE+VQUHhuU7zm712w== X-Received: by 2002:a17:90a:d64f:b0:2ee:94d1:7a89 with SMTP id 98e67ed59e1d1-2f548ea62aemr9406478a91.1.1736426332864; Thu, 09 Jan 2025 04:38:52 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:903:2282:b0:215:8275:b90 with SMTP id d9443c01a7336-21a8d313c61ls10410185ad.1.-pod-prod-07-us; Thu, 09 Jan 2025 04:38:51 -0800 (PST) X-Received: by 2002:a17:902:db0a:b0:216:7d22:f69 with SMTP id d9443c01a7336-21a83fd0994mr79710955ad.50.1736426330946; Thu, 09 Jan 2025 04:38:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736426330; cv=none; d=google.com; s=arc-20240605; b=PVJgZkW7PAa7/IFJnaCtynqMMF5g0sgeoMzj3Kv9IBJ3TLNioVm7kSg17oVVPV7lKr 2880AXu6ObVP+Gvp++RTD3dSINQXc7ba8lR1NByxrkotLYbe+EsXRjKRTcDBgK9TZ52x Kh+gmGq1hpaoEXagMjM2w1CfEaen1dUDpnzVRPYVM1syDKFpvP06s3MXUImbwnB9BwO/ YPtgx6tgurhgtcBdpzR5KQBmfju9huzR3/XERBsHD1ryVdApC+Z0VhWvkjU7aadfxND/ bF3iI4sW2zgjmJIeXsJ8AlyEJFIwgFMd6lsSmffdYOnqve+DxZVqVTuDxe3tZ6ULWmI0 7G7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=9tD3KDy5f8M7Tw0YnLr5aYkx1GnQHA66HH+vUVgtQm0=; fh=gpLQyUnU1AugiZJFmdWvHakKIHh8sDSI4FJvH3b2S14=; b=YPpRFKZ2x/NEzPtkkWxCfWYNcJyBG0C+mOD1MIOzWeOqqU1rV51YzjX6yERT2KIdnB ocyiAnbKVo/pLN+3uY57mPO0tKgKNvx06Ong4DBcV1elcLG0LJfNCp7C/AJax/a/Kwn6 1NiLBQWo6I+EUE7N1Kn+r2UsjrcZka7fO3TebDeiNEcaWpzfFWR3tzhryMy+CHvVvux6 ov+JLZfOF5o6XVKIgYINaQ+sCFQaseT+8p5TbbZP9aKcFp+toqFlfaoO5rHg2/szC6Og b+dKxbpILzOKXmQs3PCRvrlPmPXtyTxp9uNucEJLVC4yrGFnkoVOomLWuL++Uyhj4CFr iP6g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@belden.com header.s=podpps1 header.b=3SeimPLP; spf=pass (google.com: domain of noreply@belden.com designates 205.220.178.250 as permitted sender) smtp.mailfrom=noreply@belden.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=belden.com Received: from mx0b-00015a02.pphosted.com (mx0b-00015a02.pphosted.com. [205.220.178.250]) by gmr-mx.google.com with ESMTPS id d9443c01a7336-21a91778b5csi441205ad.7.2025.01.09.04.38.50 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Jan 2025 04:38:50 -0800 (PST) Received-SPF: pass (google.com: domain of noreply@belden.com designates 205.220.178.250 as permitted sender) client-ip=205.220.178.250; Received: from pps.filterd (m0382793.ppops.net [127.0.0.1]) by mx0b-00015a02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 5099Z9vY009021 for <swupdate@googlegroups.com>; Thu, 9 Jan 2025 07:38:49 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-00015a02.pphosted.com (PPS) with ESMTPS id 442bxqg9mp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for <swupdate@googlegroups.com>; Thu, 09 Jan 2025 07:38:49 -0500 (EST) Received: from m0382793.ppops.net (m0382793.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 509CcnET024956; Thu, 9 Jan 2025 07:38:49 -0500 Received: from relay1.belden.com ([12.161.118.81]) by mx0b-00015a02.pphosted.com (PPS) with ESMTPS id 442bxqg9mn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 09 Jan 2025 07:38:49 -0500 (EST) Received: from pps.filterd (dcric1ppa01pb.mcp.local [127.0.0.1]) by dcric1ppa01pb.mcp.local (8.18.1.2/8.18.1.2) with ESMTP id 5093W43q009327; Thu, 9 Jan 2025 07:38:47 -0500 Received: from denec1rnd301p.tcn.gad.local ([10.1.2.1]) by dcric1ppa01pb.mcp.local (PPS) with ESMTP id 43y171cnwn-1; Thu, 09 Jan 2025 07:38:47 -0500 Received: from [10.115.248.18] (port=51090 helo=pxv03011-build-home.fritz.box) by denec1rnd301p.tcn.gad.local with esmtp (Exim 4.96) (envelope-from <noreply@belden.com>) id 1tVroE-00506p-2e; Thu, 09 Jan 2025 13:38:46 +0100 From: "'Patrick Vogelaar' via swupdate" <swupdate@googlegroups.com> To: swupdate@googlegroups.com Cc: Patrick Vogelaar <patrick.vogelaar@belden.com> Subject: [swupdate] [PATCH][swugenerator] fix: check value of encrypted variable Date: Thu, 9 Jan 2025 13:38:24 +0100 Message-Id: <20250109123824.2549800-1-patrick.vogelaar@belden.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-09_05,2025-01-09_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 spamscore=0 mlxlogscore=682 phishscore=0 mlxscore=0 adultscore=0 malwarescore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2411120000 definitions=main-2501090100 X-Proofpoint-ORIG-GUID: zD1cm2EowdVH-OixK-q1kKk2Fh69Ebf0 X-Proofpoint-GUID: 7DGhbjAy76hd4xEkEgwhBQ2hYh0sLh6g X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 mlxscore=0 phishscore=0 suspectscore=0 mlxlogscore=668 clxscore=1015 spamscore=0 malwarescore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501090100 X-Proofpoint-TriggeredRule: module.spam.rule.outbound_notspam X-Original-Sender: patrick.vogelaar@belden.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@belden.com header.s=podpps1 header.b=3SeimPLP; spf=pass (google.com: domain of noreply@belden.com designates 205.220.178.250 as permitted sender) smtp.mailfrom=noreply@belden.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=belden.com X-Original-From: Patrick Vogelaar <patrick.vogelaar@belden.com> Reply-To: Patrick Vogelaar <patrick.vogelaar@belden.com> Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
[swugenerator] fix: check value of encrypted variable
|
expand
|
diff --git a/swugenerator/generator.py b/swugenerator/generator.py index 3f4efa1..628dffe 100644 --- a/swugenerator/generator.py +++ b/swugenerator/generator.py @@ -177,7 +177,7 @@ class SWUGenerator: new.fullfilename = zckheaderfile # Encrypt if required - if "encrypted" in entry and not self.noencrypt: + if "encrypted" in entry and entry["encrypted"] is True and not self.noencrypt: if not self.aeskey: logging.critical( "%s must be encrypted, but no encryption key is given", @@ -208,7 +208,7 @@ class SWUGenerator: entry["filename"] = new.newfilename if not self.nohash: entry["sha256"] = new.getsha256() - if "encrypted" in entry: + if "encrypted" in entry and entry["encrypted"] is True: entry["ivt"] = new.ivt def find_files_in_swdesc(self, first):
So far the value of the encrypted variable has not been checked. This means that even if encrypted = False was set the artifact was encrypted. The behaviour now is that only with encrypted set to True the artifact is encrypted. Signed-off-by: Patrick Vogelaar <patrick.vogelaar@belden.com> --- swugenerator/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)