def getContext(self):
# FIXME -- we should use sslv23 to allow for tlsv1.2
# and, if possible, explicitely disable sslv3 clientside.
# Servers should avoid sslv3
self.method = SSL.TLSv1_METHOD # SSLv23_METHOD
ctx = ssl.ClientContextFactory.getContext(self)
ctx.use_certificate_file(self.cert)
ctx.use_privatekey_file(self.key)
return ctx
评论列表
文章目录