Skip to content
Snippets Groups Projects
Commit 3b0620e9 authored by istmxrein's avatar istmxrein
Browse files

fix bug writing private key

parent 314ce699
No related branches found
No related tags found
No related merge requests found
...@@ -93,8 +93,8 @@ def generate_rsa_keypair(): ...@@ -93,8 +93,8 @@ def generate_rsa_keypair():
format=serialization.PrivateFormat.TraditionalOpenSSL, format=serialization.PrivateFormat.TraditionalOpenSSL,
encryption_algorithm=serialization.NoEncryption()) encryption_algorithm=serialization.NoEncryption())
with open(env.PRIVATE_KEY_PATH, 'wb') as content_file: with open(env.PRIVATE_KEY_PATH, 'w') as content_file:
content_file.write(pem.decode('utf-8')) content_file.write(pem.decode('utf-8'))
public_key_str = public_key.decode('utf-8') public_key_str = public_key.decode('utf-8')
print(f'Public Key: {public_key_str}') print(f'Public Key: {public_key_str}')
return public_key_str return public_key_str
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment