Dave
Dave

Reputation: 2089

Why does pyOpenSSL have a separate copy of the OpenSSL DLLs?

I am developing under Python 2.7.8. The _ssl.pyd that's in there was built with OpenSSL 1.0.1h.

However, I also have pyOpenSSL 0.10 (I know, older version) to meet a required dependency. pyOpenSSL includes libeay32.dll and ssleay32.dll version 0.9.8o.

What's the deal with this? Is it because pyOpenSSL provides a direct interface to the OpenSSL libraries?

Upvotes: 2

Views: 4703

Answers (1)

MordicusEtCubitus
MordicusEtCubitus

Reputation: 713

Python may be compiled with OpenSSL support which is required for internal libraries like TLS/SSL (https://docs.python.org/3.4/library/ssl.html) or urllib. The internal Python ssl library implements SSL protocol over sockets. urllib use it for https protocol, for example.

pyOpenSSL is another Python library that you can find on Pypi. It has been created to provide a full support of OpenSSL lib as the internal Python SSL module still not cover all functionalities.

So, it is not part of Python internal libraries. It implements a high level interface over openssl library. You have to compile/install it outside Python scope. So it may be compiled using another version than the openssl lib used by Python.

More, on Windows, you will install it using a binary package, so the OpenSSL dll with which it has been compiled are provided; so they may be different than the one installed on the system or by Python.

Yes pyOpenSLL does direct interface to OpenSSL lib. The tests scripts also execute the openssl command line tool, but not the Python files of the lib when having a quick look at version 0.14 source files.

Hope it can help.

Upvotes: 5

Related Questions