From b553d025eb029fe4189f0c51fbe60332203540e5 Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Tue, 29 Nov 2022 13:32:40 +0100 Subject: [PATCH] remove newline --- core/admin/mailu/dkim.py | 1 - 1 file changed, 1 deletion(-) diff --git a/core/admin/mailu/dkim.py b/core/admin/mailu/dkim.py index 5719a62e..7eda45d7 100644 --- a/core/admin/mailu/dkim.py +++ b/core/admin/mailu/dkim.py @@ -16,7 +16,6 @@ def gen_key(bits=2048): def strip_key(pem): """ Return only the b64 part of the ASCII armored PEM. """ - priv_key = serialization.load_pem_private_key(pem, password=None) public_pem = priv_key.public_key().public_bytes(encoding=serialization.Encoding.PEM,format=serialization.PublicFormat.SubjectPublicKeyInfo) return public_pem.replace(b"\n", b"").split(b"-----")[2]