【发布时间】:2018-10-30 15:14:43
【问题描述】:
当我跑步时:
$ openssl version -a
我得到 1.0.2k 作为版本:
OpenSSL 1.0.2k 26 Jan 2017
built on: reproducible build, date unspecified
platform: darwin64-x86_64-cc
options: bn(64,64) rc4(ptr,int) des(idx,cisc,16,int) idea(int) blowfish(idx)
compiler: cc -I. -I.. -I../include -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -arch x86_64 -O3 -DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM -DECP_NISTZ256_ASM
OPENSSLDIR: "/usr/local/php5/ssl"
但是当我用python检查版本时:
$ python -c 'import ssl; print(ssl.OPENSSL_VERSION)'
我得到:OpenSSL 0.9.8zg 14 July 2015
如何链接最新的 openssl 版本? 我的点子版本是;
pip 10.0.1 from /Library/Python/2.7/site-packages/pip (python 2.7)
当我尝试使用 PIP 安装一些模块时,我收到 [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590) 错误。所以尝试在 python 中升级我的 ssl 版本
以及如何使我的系统Openssl版本与virtualenv版本相同?
【问题讨论】:
-
您是否还可以添加以下命令的输出(从 shell 启动):
which openssl和otool -L path/to/openssl(其中 path/to/openssl 由上一个命令输出)? -
@martin-martin:(刚刚注意到这个问题有多老了)你能在评论中添加我之前评论中问题的答案吗?
-
Hei @CristiFati - 这不是我的问题,所以我不能在那里添加任何东西 - 但我同意这会有所帮助
-
@martin-martin:这就是我在评论中指定的原因::)
-
@hoefling 如果您想在答案中总结您的 cmets,我很乐意为您提供赏金。不过,它只剩下几个小时就会消失了。
标签: python macos python-2.7 openssl