本文介绍了在Mac OSX上启用TLS 1.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力尝试在OSX 10.12.3的本地计算机上使用与Stripe一起工作的Django应用程序.尝试运行测试付款时出现的错误是:

I am pulling my hair out trying to get a Django application working with Stripe on my local machine with OSX 10.12.3. The error I get when trying to run a test payment is:

我使用brew成功升级了openssl.当我运行openssl version时,输出为:

I successfully upgraded openssl using brew. When I run openssl version the output is:

OpenSSL 1.0.2k  26 Jan 2017

当我运行which openssl时,输出为:

/usr/local/opt/openssl/bin/openssl

我在堆栈溢出中找到了说可以运行brew link --force openssl的指令.当我这样做时,错误是:

I found instructions on stack overflow that said to run brew link --force openssl. When I do that the error is:

有人可以帮助我完成这项工作吗?

Can anybody help me get this working?

推荐答案

问题出在Python环境中,可以尝试的解决方案如下:

The problem’s in the Python environment and the solution to try seems to be the following:

pip install urllib3
pip install pyopenssl
pip install ndg-httpsclient
pip install pyasn1
pip uninstall requests
pip install requests

请参见 https://github.com/pinax/pinax-stripe/issues/267 如何在TLS 1.2上运行django runserver

这一切都假设您运行的是Python 2.7.9+.早期的Python版本不支持TLS 1.2.

That’s all assuming you’re running Python 2.7.9+. Earlier Python versions have no TLS 1.2 support.

这篇关于在Mac OSX上启用TLS 1.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-29 12:50
查看更多