MCPcopy Create free account
hub / github.com/s3tools/s3cmd / _ssl_verified_context

Method _ssl_verified_context

S3/ConnMan.py:45–56  ·  view source on GitHub ↗
(cafile)

Source from the content-addressed store, hash-verified

43
44 @staticmethod
45 def _ssl_verified_context(cafile):
46 cfg = Config()
47 context = None
48 try:
49 context = ssl.create_default_context(cafile=cafile)
50 except AttributeError: # no ssl.create_default_context
51 pass
52 if context and not cfg.check_ssl_hostname:
53 context.check_hostname = False
54 debug(u'Disabling SSL certificate hostname checking')
55
56 return context
57
58 @staticmethod
59 def _ssl_unverified_context(cafile):

Callers 1

_ssl_contextMethod · 0.80

Calls 1

ConfigClass · 0.90

Tested by

no test coverage detected