def getContext(self): ctx = SSL.Context(SSL.TLSv1_METHOD) ctx.use_certificate_file(self.filename) ctx.use_privatekey_file(self.filename) return ctx