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....@belden.com>
---
swugenerator/generator.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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):
--
2.34.1
**********************************************************************
DISCLAIMER:
Privileged and/or Confidential information may be contained in this message. If you are not the addressee of this message, you may not copy, use or deliver this message to anyone. In such event, you should destroy the message and kindly notify the sender by reply e-mail. It is understood that opinions or conclusions that do not relate to the official business of the company are neither given nor endorsed by the company. Thank You.