读书人

python的httplib.HTTPSConnection()会

发布时间: 2012-09-10 22:20:12 作者: rapoo

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……

读书人网 >perl python

热点推荐