Commit 043187e2 authored by Thomas Goirand's avatar Thomas Goirand

Add Fix_on-disk_encryption_under_Python_3.patch.

parent 90d7049d
swift (2.23.0-3) experimental; urgency=medium
* Add Fix_on-disk_encryption_under_Python_3.patch.
-- Thomas Goirand <> Fri, 11 Oct 2019 14:16:53 +0200
swift (2.23.0-2) experimental; urgency=medium
* Do not use --processes=-1 when running tests, as this seems to fail on
Description: Fix on-disk encryption under Python 3
When using encryption with Python 3, we get:
TypeError: key: expected bytes or bytearray,
but got 'str' (txn: tx2b59918356794c709b34b-005da06b77)
This patch fixes it by converting the key into a bytearay.
Author: Thomas Goirand <>
Date: Fri, 11 Oct 2019 14:12:01 +0200
Change-Id: I6da047716c05e4f2a9e1e74ca19afb62e812d172
Last-Update: 2019-10-11
diff --git a/swift/common/middleware/crypto/ b/swift/common/middleware/crypto/
index da337d3..c0dc35e 100644
--- a/swift/common/middleware/crypto/
+++ b/swift/common/middleware/crypto/
@@ -292,6 +292,8 @@
self.logger.warning('Unrecognised secret id: %s' % secret_id)
raise UnknownSecretIdError(secret_id)
+ if not isinstance(key, bytes):
+ key = key.encode("utf-8")
return, wsgi_to_bytes(path),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment