Tag: urllib3

为sslv3问题修补pyopenssl

我使用python 2.7.9-2 amd64在Debian 8系统上遇到问题: marius@pydev:/usr/lib/python2.7/dist-packages/urllib3/contrib$ pip search doo Traceback (most recent call last): File "/usr/bin/pip", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 356, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2476, in load_entry_point return ep.load() File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2190, in load ['__name__']) File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 74, in <module> from pip.vcs import […]

抑制InsecureRequestWarning:未经validation的HTTPS请求正在Python2.6中进行

我正在使用pyVmomi在Python2.6中编写脚本,同时使用其中一种连接方法: service_instance = connect.SmartConnect(host=args.ip, user=args.user, pwd=args.password) 我收到以下警告: /usr/lib/python2.6/site-packages/requests/packages/urllib3/connectionpool.py:734: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) 有趣的是,我没有用pip安装urllib3(但是它在/usr/lib/python2.6/site-packages/requests/packages/urllib3/中 )。 我按照这里的build议尝试过 import urllib3 … urllib3.disable_warnings() 但是这并没有改变任何东西。

Python请求引发SSLError

我正在研究一个涉及CAS,jspring安全检查,redirect等的简单脚本。我想使用Kenneth Reitz的python请求,因为这是一个伟大的工作! 但是,CAS需要通过SSL进行validation,所以我必须先经过这一步。 我不知道Python要求的是什么? 这个SSL证书应该放在哪里? Traceback (most recent call last): File "./test.py", line 24, in <module> response = requests.get(url1, headers=headers) File "build/bdist.linux-x86_64/egg/requests/api.py", line 52, in get File "build/bdist.linux-x86_64/egg/requests/api.py", line 40, in request File "build/bdist.linux-x86_64/egg/requests/sessions.py", line 209, in request File "build/bdist.linux-x86_64/egg/requests/models.py", line 624, in send File "build/bdist.linux-x86_64/egg/requests/models.py", line 300, in _build_response File "build/bdist.linux-x86_64/egg/requests/models.py", line 611, in […]