Uh oh!
There was an error while loading. Please reload this page.
Fix load pem private key with the PEM encoded data - #162
Conversation
coveralls
commented
Jun 17, 2019
greateggsgreg
left a comment
There was a problem hiding this comment.
This definitely needs to be fixed. An alternative method is to open the files in binary (mode "rb") so we don't need to convert to bytes after the fact. Example:
with open(rsa_key_path + '.pub', 'rb') as rsa_pub_file:
self.public_key = rsa_pub_file.read()
with open(rsa_key_path, 'rb') as rsa_prv_file:
self.rsa_key = serialization.load_pem_private_key(
rsa_prv_file.read(), None, default_backend())
JeffLIrion
commented
Sep 28, 2019
I created a new package However, the If you submit a pull request that fixes this issue, that would be much appreciated! |
fix problem like this issues "pyca/cryptography#2730", and it also happened in here.