mirror of
https://github.com/Mailu/Mailu.git
synced 2025-03-05 14:55:20 +02:00
remove newline
This commit is contained in:
parent
3e38e7b89d
commit
b553d025eb
@ -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]
|
||||
|
Loading…
x
Reference in New Issue
Block a user