summarylogtreecommitdiffstats
path: root/ps-ssl_verify_host_all.patch
diff options
context:
space:
mode:
authorxsmile2017-03-09 18:46:37 +0100
committerxsmile2017-03-09 18:46:37 +0100
commita386ce87b56799cfb29b1667f56a63695fe781ed (patch)
tree70cbf797d882faad63eb3ff1561f0b79f247b34e /ps-ssl_verify_host_all.patch
downloadaur-a386ce87b56799cfb29b1667f56a63695fe781ed.tar.gz
init
Diffstat (limited to 'ps-ssl_verify_host_all.patch')
-rw-r--r--ps-ssl_verify_host_all.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/ps-ssl_verify_host_all.patch b/ps-ssl_verify_host_all.patch
new file mode 100644
index 00000000000..adb5d66f9ae
--- /dev/null
+++ b/ps-ssl_verify_host_all.patch
@@ -0,0 +1,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));