Added config parameter network.http.ssl_verify_host to support certificates.

Added config parameter network.http.ssl_verify_host to support certificates
with a mismatched or empty CN. Default is 2 (verify name match). Use 1 to simply
verify the presence of a name or 0 to allow for missing names.
This commit is contained in:
Mike Valentine
2014-04-12 14:06:22 -04:00
parent 38f39bdb23
commit 24f84214c8
3 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -52,7 +52,8 @@ CurlStack::CurlStack() :
m_active(0),
m_maxActive(32),
m_ssl_verify_peer(true),
m_dns_timeout(60) {
m_dns_timeout(60),
m_ssl_verify_host(2) {
m_taskTimeout.slot() = std::tr1::bind(&CurlStack::receive_timeout, this);
@@ -167,6 +168,7 @@ CurlStack::add_get(CurlGet* get) {
curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYPEER, (long)m_ssl_verify_peer);
curl_easy_setopt(get->handle(), CURLOPT_DNS_CACHE_TIMEOUT, m_dns_timeout);
curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYHOST, m_ssl_verify_host);
base_type::push_back(get);