为了账号安全,请及时绑定邮箱和手机立即绑定

请问在python 2.7中更新OpenSSL

请问在python 2.7中更新OpenSSL

江户川乱折腾 2019-08-03 03:03:10
在python 2.7中更新OpenSSL想知道是否有人可以解释OpenSSL在python2.7中是如何工作的。我不确定python是否有自己的OpenSSL,还是从本地机器/env中获取?让我解释一下:(如果我用Python来做这件事)>>> import ssl>>> ssl.OPENSSL_VERSION'OpenSSL 0.9.8x 10 May 2012'(在终点站)$ openssl versionOpenSSL 0.9.8x 10 May 2012$ which openssl /usr/bin/openssl现在我更新了OpenSSL(下载)。$ cd openssl-1.0.1c$ ./Configure darwin64-x86_64-cc --prefix=/usr --openssldir=/opt/local/etc/openssl shared$ make$ sudo make install这创建了单独的指令(如指定的那样),因此我将其复制到旧路径中。cp -f /usr/local/ssl/bin/openssl /usr/bin/openssl现在,在终端,OpenSSL版本已经更新,但不是从python!$ openssl versionOpenSSL 1.0.1c 10 May 2012我确实注意到.dylib仍然指向旧版本,如何更改它?$ ls -l /usr/lib/*ssl*-rwxr-xr-x  1 root  wheel  411680 Jul 17  2012 /usr/lib/libssl.0.9.7.dylib-rwxr-xr-x  1 root  wheel  602800 May 24 03:43 /usr/lib/libssl.0.9.8.dylib-rwxr-xr-x  1 root  wheel  390908 Sep  9 17:37 /usr/lib/libssl.1.0.0.dyliblrwxr-xr-x  1 root  wheel      18 Jul 17  2012 /usr/lib/libssl.dylib -> libssl.0.9.8.dylib更新:我更改了链接,但在python上仍然有旧版本。$ ls -l /usr/lib/*ssl*-rwxr-xr-x  1 root  wheel  411680 Jul 17  2012 /usr/lib/libssl.0.9.7.dylib-rwxr-xr-x  1 root  wheel  602800 May 24 03:43 /usr/lib/libssl.0.9.8.dylib-rwxr-xr-x  1 root  wheel  390908 Sep  9 17:37 /usr/lib/libssl.1.0.0.dyliblrwxr-xr-x  1 root  wheel      18 Sep 11 15:47 /usr/lib/libssl.dylib -> libssl.1.0.0.dylib
查看完整描述

3 回答

  • 3 回答
  • 0 关注
  • 454 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信