Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About errors of _util.py and crypto.py of pyOpenSSL #113

Closed
GioZhu opened this issue May 22, 2014 · 1 comment
Closed

About errors of _util.py and crypto.py of pyOpenSSL #113

GioZhu opened this issue May 22, 2014 · 1 comment
Labels

Comments

@GioZhu
Copy link

GioZhu commented May 22, 2014

Just picked up pyOpenSSL coding, and the same error cannot be debugged. It's just the most basical implementation of loading private key and signing something. Here's my code:

from OpenSSL.crypto import load_privatekey, FILETYPE_PEM, sign
import base64
key = load_privatekey(FILETYPE_PEM, open("C:\Users\Gio\SSL\gioCA\newcerts\01.pem").read())
content = "test_message"
d = sign(key, content, 'sha1')
b = base64.b64encode(d)
print(b)

And the errors are as below:
Traceback (most recent call last):
File "F:\workspace\myFirst\encrytion.py", line 5, in
key = load_privatekey(FILETYPE_PEM, open("C:\Users\Gio\SSL\gioCA\newcerts\01.pem").read())
File "C:\Python33\lib\site-packages\pyOpenSSL-0.14-py3.3.egg\OpenSSL\crypto.py", line 2010, in load_privatekey
File "C:\Python33\lib\site-packages\pyOpenSSL-0.14-py3.3.egg\OpenSSL_util.py", line 22, in exception_from_error_queue
OpenSSL.crypto.Error: []

Can anyone solve this problem?

@exarkun
Copy link
Member

exarkun commented May 22, 2014

Please use the pyopenssl-users mailing list for questions.

@exarkun exarkun closed this as completed May 22, 2014
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants