From c612bb8a15fd21dd9bdf70adb707beebfaebcf42 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 15 Sep 2019 11:48:01 +0100 Subject: Revert "Revert "open private key as a bytestring"" This reverts commit 97afbc1e40a005d66321fcadf971e2adcd955733. --- modules/fediverse/ap_security.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/fediverse/ap_security.py') diff --git a/modules/fediverse/ap_security.py b/modules/fediverse/ap_security.py index 00fe8264..dbb57df7 100644 --- a/modules/fediverse/ap_security.py +++ b/modules/fediverse/ap_security.py @@ -8,7 +8,7 @@ SIGNATURE_FORMAT = ( def _private_key(key_filename: str) -> rsa.RSAPrivateKey: - with open(key_filename) as key_file: + with open(key_filename, "rb") as key_file: return serialization.load_pem_private_key( key_file.read(), password=None, backend=default_backend()) -- cgit v1.3.1-10-gc9f91