diff --git a/prepare.py b/prepare.py index 84ce6e167bdf9b2d62bcfb8fda7225756a3099cc..5e95c5ab94ec4aa2c4db3e72bee94167632d284c 100644 --- a/prepare.py +++ b/prepare.py @@ -93,8 +93,8 @@ def generate_rsa_keypair(): format=serialization.PrivateFormat.TraditionalOpenSSL, encryption_algorithm=serialization.NoEncryption()) - with open(env.PRIVATE_KEY_PATH, 'wb') as content_file: - content_file.write(pem.decode('utf-8')) + with open(env.PRIVATE_KEY_PATH, 'w') as content_file: + content_file.write(pem.decode('utf-8')) public_key_str = public_key.decode('utf-8') print(f'Public Key: {public_key_str}') return public_key_str