在httplib.HTTPSConnection https://wiki.openstack.org/wiki/OSSN/OSSN-0033上修改和修复用于修复SSL证书验证检查的库的任何想法?感谢
Test results:
>> Issue: [B309:blacklist] Use of HTTPSConnection does not
provide security, see https://wiki.openstack.org/wiki/OSSN/OSSN-0033
Severity: Medium Confidence: High
def _get_connection(self):
return httplib.HTTPSConnection(self.hostname, timeout=120)
--------------------------------------------------
>> Issue: [B309:blacklist] Use of HTTPSConnection
does not provide security,
see https://wiki.openstack.org/wiki/OSSN/OSSN-0033
Severity: Medium Confidence: High
conn = httplib.HTTPSConnection(pa.hostname)
答案 0 :(得分:0)
此问题似乎已于2014年修复(https://www.python.org/dev/peps/pep-0476/)。当前版本的HTTPSConnection会检查SSL证书的有效性。
使用最新的稳定的2.7.x或3.x Python就足够了。如果 使用最新版本的Python,但该测试只是标记了HTTPSConnection的所有提及 - 那么,那个测试已经过时,应该被删除。