From a86588956cfedb64733c841152df17dbca4a3298 Mon Sep 17 00:00:00 2001 From: Thore Sommer Date: Fri, 27 Aug 2021 15:54:45 +0200 Subject: [PATCH] tenant: open file to send utf-8 encoded Was by mistake changed to byte encoding in 2ba03e9a Signed-off-by: Thore Sommer --- keylime/tenant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keylime/tenant.py b/keylime/tenant.py index 39c926157..40c3e257d 100755 --- a/keylime/tenant.py +++ b/keylime/tenant.py @@ -357,7 +357,7 @@ def init_add(self, args): else: raise UserError("Invalid file payload provided") else: - with open(args["file"], 'rb') as f: + with open(args["file"], encoding="utf-8") as f: contents = f.read() ret = user_data_encrypt.encrypt(contents) self.K = ret['k']