diff --git a/tornado/curl_httpclient.py b/tornado/curl_httpclient.py index c3903e9bf7..048876319f 100644 --- a/tornado/curl_httpclient.py +++ b/tornado/curl_httpclient.py @@ -395,8 +395,11 @@ def ioctl(cmd): curl.unsetopt(pycurl.USERPWD) logging.debug("%s %s", request.method, request.url) - if request.client_key is not None or request.client_cert is not None: - raise ValueError("Client certificate not supported with curl_httpclient") + if request.client_cert is not None: + curl.setopt(pycurl.SSLCERT, request.client_cert) + + if request.client_key is not None: + curl.setopt(pycurl.SSLKEY, request.client_key) if threading.activeCount() > 1: # libcurl/pycurl is not thread-safe by default. When multiple threads