def METHOD_NAME(self, cert):
    """
    Temporarily trust the certificate.
    """
    self.cert = cert
    tmp_dir = os.path.expanduser("~/.config/osc")
    data = self.cert.public_bytes(serialization.Encoding.PEM)
    with tempfile.NamedTemporaryFile(mode="wb+", dir=tmp_dir, prefix="temp_trusted_cert_") as f:
        f.write(data)
        f.flush()
        self.ssl_context.load_verify_locations(cafile=f.name)