summarylogtreecommitdiffstats
path: root/ps-ssl_verify_host_all.patch
blob: adb5d66f9ae0232a7d23523f26998847e646de21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- rel-0.9.5/src/core/curl_stack.h	2015-07-02 00:32:45.000000000 +0200
+++ rtorrent-0.9.5/src/core/curl_stack.h	2015-08-08 22:44:11.000000000 +0200
@@ -104,2 +104,4 @@
   void                set_ssl_verify_peer(bool s)            { m_ssl_verify_peer = s; }
+  bool                ssl_verify_host() const                { return m_ssl_verify_host; }
+  void                set_ssl_verify_host(bool s)            { m_ssl_verify_host = s; }
 
@@ -143,2 +145,3 @@
   bool                m_ssl_verify_peer;
+  bool                m_ssl_verify_host;
   long                m_dns_timeout;
--- rel-0.9.5/src/core/curl_stack.cc	2015-07-02 00:32:45.000000000 +0200
+++ rtorrent-0.9.5/src/core/curl_stack.cc	2015-08-08 22:47:37.000000000 +0200
@@ -54,2 +54,3 @@
   m_ssl_verify_peer(true),
+  m_ssl_verify_host(true),
   m_dns_timeout(60) {
@@ -183,2 +184,3 @@
   curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYPEER, (long)m_ssl_verify_peer); 
+  curl_easy_setopt(get->handle(), CURLOPT_SSL_VERIFYHOST, (long)(m_ssl_verify_host ? 2 : 0));
   curl_easy_setopt(get->handle(), CURLOPT_DNS_CACHE_TIMEOUT, m_dns_timeout);
--- rel-0.9.5/src/command_network.cc	2015-07-02 00:32:45.000000000 +0200
+++ rtorrent-0.9.5/src/command_network.cc	2015-08-08 22:49:39.000000000 +0200
@@ -276,2 +276,4 @@
   CMD2_ANY_VALUE_V ("network.http.ssl_verify_peer.set",   tr1::bind(&core::CurlStack::set_ssl_verify_peer, httpStack, tr1::placeholders::_2));
+  CMD2_ANY         ("network.http.ssl_verify_host",       tr1::bind(&core::CurlStack::ssl_verify_host, httpStack));
+  CMD2_ANY_VALUE_V ("network.http.ssl_verify_host.set",   tr1::bind(&core::CurlStack::set_ssl_verify_host, httpStack, tr1::placeholders::_2));
   CMD2_ANY         ("network.http.dns_cache_timeout",     tr1::bind(&core::CurlStack::dns_timeout, httpStack));