Skip to content

M2Crypto.EVP.EVPError: Unable to read private key in function pkey_read_pem. #47

Description

@wzjjwxy

Hi~
I have a problem with smime exceptions when reading pem files (smime.load_key(str(keyPemPath), certificatePemPath)), exception information: M2Crypto.EVP.EVPError: Unable to read private key in function pkey_read_pem.
Complete error:
Traceback (most recent call last):
   File "/Work/pythonWork/pkpass/test.py", line 15, in
     Smime.load_key(str(keypemPath), pemPath)
   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/M2Crypto/SMIME.py", line 163, in load_key
     Self.pkey = EVP.load_key(keyfile, callback)
   File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/M2Crypto/EVP.py", line 395, in load_key
     Cptr = m2.pkey_read_pem(bio.bio, callback)
M2Crypto.EVP.EVPError: Unable to read private key in function pkey_read_pem.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions