This error is reasied when the key cannot be parsed. Since the error code and message are totally helpless, this gist is here to help you verify your certificate and key are correct, which have been the root cause when such error was raised in our Python code.
Sample use case:
ssl_context.load_cert_chain(certfile=certfile, keyfile=keyfile, password='secret')
# Raise SSLError