Questions tagged [pyopenssl]

Pyopenssl is a Python interface to the OpenSSL library.

Pyopenssl is a Python interface to the OpenSSL library.

480 questions
86
votes
23 answers

Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

A Python script of mine is failing with: Traceback (most recent call last): File "./inspect_sheet.py", line 21, in main() File "./inspect_sheet.py", line 12, in main workbook_name=workbook_name, File "./google_sheets.py", line…
Ben Wheeler
  • 6,788
  • 2
  • 45
  • 55
67
votes
3 answers

Why is there a handshake failure when trying to run TLS over TLS with this code?

I tried to implement a protocol that can run TLS over TLS using twisted.protocols.tls, an interface to OpenSSL using a memory BIO. I implemented this as a protocol wrapper that mostly looks like a regular TCP transport, but which has startTLS and…
Jean-Paul Calderone
  • 47,755
  • 6
  • 94
  • 122
62
votes
4 answers

Python "pip install " is failing with AttributeError: 'module' object has no attribute 'SSL_ST_INIT'

$ sudo pip install --upgrade pyOpenSSL Traceback (most recent call last): File "/usr/local/bin/pip", line 9, in load_entry_point('pip==8.1.1', 'console_scripts', 'pip')() File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",…
May
  • 1,158
  • 2
  • 13
  • 24
53
votes
7 answers

Patch pyopenssl for sslv3 issue

I got a problem on a Debian 8 system with python 2.7.9-2 amd64: marius@pydev:/usr/lib/python2.7/dist-packages/urllib3/contrib$ pip search doo Traceback (most recent call last): File "/usr/bin/pip", line 9, in
wishi
  • 7,188
  • 17
  • 64
  • 103
50
votes
8 answers

HTTPS connection Python

I am trying to verify the that target exposes a https web service. I have code to connect via HTTP but I am not sure how to connect via HTTPS. I have read you use SSL but I have also read that it did not support certificate errors. The code I have…
chrisg
  • 40,337
  • 38
  • 86
  • 107
40
votes
1 answer

How to install OpenSSL for Python

I need to install OpenSSL on my python2.7. I tried $ pip install pyopenssl And I got the following /usr/local/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe' warnings.warn(msg) running build running…
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307
31
votes
1 answer

AttributeError: 'Context' object has no attribute 'wrap_socket'

I am trying to set up a Flask server that uses an OpenSSL context. However, since I moved the script on a different server, it keeps throwing the following error, no matter if I am using Python 2.7 or 3.4 and no matter which SSL method I chose…
Nils Milchert
  • 313
  • 1
  • 3
  • 5
23
votes
1 answer

Python - SSL - wrong version number

This will probably be just another unsolved thread but i'll fill in some info anyway. I can't get my SSL wrapping together not even for a second. Any ideas to what i'm doing wrong with my wrap_socket() and do_handshake()? The key files appear to be…
Torxed
  • 22,866
  • 14
  • 82
  • 131
22
votes
3 answers

Python: reading a pkcs12 certificate with pyOpenSSL.crypto

I have a valid certificate issued by the spanish authority (FNMT) and I want to play with it to learn more about it. The file has extension .p12 I would like to read the information in it (first and last name) and check if the certificate is valid.…
nemesisdesign
  • 8,159
  • 12
  • 58
  • 97
22
votes
3 answers

Web app hangs for several hours in ssl.py at self._sslobj.do_handshake()

I am using Python 2.7.5. I have a web app which queries an API every few minutes and has been working successfully for the last day or so. However, after leaving it sitting for a few hours, I came back to find my program stalled with no activity for…
Matt Vukas
  • 3,225
  • 3
  • 26
  • 37
19
votes
9 answers

easy_install PyOpenSSL error

Any idea about what cause the error below ? I use Linux centos with openssl-devel.i386 0.9.8e-12.el5_5.7 $ easy_install PyOpenSSL Searching for PyOpenSSL Reading http://pypi.python.org/simple/PyOpenSSL/ Reading http://launchpad.net/pyopenssl Reading…
3r1d
  • 456
  • 1
  • 4
  • 12
18
votes
2 answers

Mutual ssl authentication in simple ECHO client/server [Python / sockets / ssl modules], ssl.SSLEOFError: EOF occurred in violation of protocol

I would like to have a mutual authentication in my echo client/server program. I'm using python 2.7.12 and thessl` module on Distributor ID: Ubuntu Description: Ubuntu 14.04.5 LTS Release: 14.04 Codename: trusty I've generated…
yak
  • 3,770
  • 19
  • 60
  • 111
17
votes
3 answers

Installing scrapy/pyopenssl in Windows' virtualenv

I am trying to install scrapy on Windows XP (32bit) virtualenv: pip install scrapy The installer spits out this ambiguous error message: error: Only found improper OpenSSL directories: ['E:\\cygwin', 'E:\\Program Files\\Git'] How should I…
Udi
  • 29,222
  • 9
  • 96
  • 129
17
votes
2 answers

Alexa request validation in python

I work on a service that will handle Alexa voice intents. I need to verify the signature of each request and I almost succeed. The only part that is not working is the validation of certificates chain. From the documentation I know that: This…
16
votes
1 answer

Validating client certificates in PyOpenSSL

I'm writing an app that requires a cert to be installed in the client browser. I've found this in the PyOpenSSL docs for the "Context" object but I can't see anything about how the callback is supposed to validate the cert, only that it should,…
Roger Heathcote
  • 3,091
  • 1
  • 33
  • 39
1
2 3
31 32