Updating openssl in python 2.7

前端 未结 6 1292
醉酒成梦
醉酒成梦 2020-11-22 15:17

wondering if someone may please explain how openssl works in python2.7. I\'m not sure if python got its own openssl or picks it up from local machine/env?

let me exp

6条回答
  •  庸人自扰
    2020-11-22 16:18

    This could be because of an outdated version of Python.

    After running python -c "import ssl; print ssl.OPENSSL_VERSION" on Python 2.7.1, I saw that I had this outdated version: OpenSSL 0.9.7l 28 Sep 2006.

    It seems as though my version of Python depended on a deprecated version of OpenSSL, as indicated by this forum:

    For the upcoming Python 2.7.9 release (planned for early December), I intend to have the Pythons in the python.org OS X installers use their own versions of OpenSSL and thus no longer depend on the now-deprecated system OpenSSL.

    I updated to Python 2.7.9 and the issue was immediately fixed. Now, after running python -c "import ssl; print ssl.OPENSSL_VERSION", I get OpenSSL 0.9.8za 5 Jun 2014.

提交回复
热议问题