MCPcopy
hub / github.com/benoitc/gunicorn / _get_ssl_context

Method _get_ssl_context

gunicorn/workers/gasgi.py:260–270  ·  view source on GitHub ↗

Get SSL context if configured.

(self)

Source from the content-addressed store, hash-verified

258 self.log.error("ASGI lifespan shutdown error: %s", e)
259
260 def _get_ssl_context(self):
261 """Get SSL context if configured."""
262 if not self.cfg.is_ssl:
263 return None
264
265 try:
266 from gunicorn import sock
267 return sock.ssl_context(self.cfg)
268 except Exception as e:
269 self.log.error("Failed to create SSL context: %s", e)
270 return None
271
272 def _cleanup(self):
273 """Clean up resources on exit."""

Callers 1

_serveMethod · 0.95

Calls 2

ssl_contextMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected