code: def get_context(self):
          
          # See https://code.activestate.com/recipes/442473/
          c = SSL.Context(SSL.SSLv23_METHOD)
          c.use_privatekey_file(self.private_key)
          if self.certificate_chain:
              c.load_verify_locations(self.certificate_chain)
          c.use_certificate_file(self.certificate)
          return c
docs: Return an SSL.Context from self attributes.