首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > perl python >

python的httplib.HTTPSConnection()会验证客户端服务器的证书吗解决方法

2012-09-10 
python的httplib.HTTPSConnection()会验证客户端服务器的证书吗class httplib.HTTPSConnection(host[, por

python的httplib.HTTPSConnection()会验证客户端服务器的证书吗
class httplib.HTTPSConnection(host[, port[, key_file[, cert_file[, strict[, timeout[, source_address]]]]]])¶
A subclass of HTTPConnection that uses SSL for communication with secure servers. Default port is 443. key_file is the name of a PEM formatted file that contains your private key. cert_file is a PEM formatted certificate chain file.

Warning:
This does not do any verification of the server’s certificate.

New in version 2.0.

Changed in version 2.6: timeout was added.

Changed in version 2.7: source_address was added.



[解决办法]
class httplib.HTTPSConnection(host[, port[, key_file[, cert_file[, strict[, timeout[, source_address]]]]]])
======================
注意看其参数:从port以后的参数都输可选参数,也就是可以不管的
[解决办法]
具体要如何认证?
[解决办法]

探讨
引用:

class httplib.HTTPSConnection(host[, port[, key_file[, cert_file[, strict[, timeout[, source_address]]]]]])
======================
注意看其参数:从port以后的参数都输可选参数,也就是可以不管的

您说的这个我了解,但是下面的wa……

热点排行