def set_tmp_rsa(self, rsa): """Load ephemeral RSA key into the context. @param rsa: M2Crypto.RSA.RSA instance. """ if isinstance(rsa, RSA.RSA): return m2.ssl_ctx_set_tmp_rsa(self.ctx, rsa.rsa) else: raise TypeError("Expected an instance of RSA.RSA, got %s." % rsa)