Closed amenon closed 11 years ago
Make sure you include the -----BEGIN PRIVATE KEY----- and -----END PRIVATE KEY----- ... it will give you the error your are seeing if you don't. Let me know if that works
I'm getting the same error.
SSLError: _ssl module: Unable to parse private key.
Tried with -----BEGIN PRIVATE KEY----- and -----BEGIN RSA PRIVATE KEY----- ... what was the solution?
Make sure the RSA key is not encrypted. To identify whether a private key is encrypted or not, view the contents of the key. If it is encrypted, then the text ENCRYPTED appears in the first line.
You can use openssl to decrypt the key:
openssl rsa –in enc.key -out dec.key
I am getting the same error , unable to debug it . I am copying all the contents of certificate in sandbox certificate field and public key in sandbox key. Please help
Make sure that it's the right type of SSH key. I'm on Windows, and the Putty Keys (ppk) will not work. Convert it to OpenSSL and make sure it has the correct signatures.
-----BEGIN RSA PRIVATE KEY-----
-----END RSA PRIVATE KEY-----
To my horror, adding "\n" at the end of the file (after END PRIVATE KEY) fixed it for me
Thanks for creating this project. I am developing an APN module to work on AppEngine and am using similar code to your apn.py. However, I run into an issue when the socket tries to connect: SSLError: _ssl module: Unable to parse private key.
My private key is a string that contains -----BEGIN RSA PRIVATE KEY----- to -----END RSA PRIVATE KEY----- and I pass the StingIO.StringIO of this string as the keyfile.
Am I missing anything?