generalize SSL support to also include web seeds (and in theory regular peers)

This commit is contained in:
Arvid Norberg
2010-10-12 08:57:43 +00:00
parent 43b29c3627
commit 7bd25edc9d
21 changed files with 374 additions and 937 deletions

View File

@@ -66,6 +66,7 @@ namespace libtorrent
, web_seed_entry::headers_t const& extra_headers)
: peer_connection(ses, t, s, remote, peerinfo)
, m_first_request(true)
, m_ssl(false)
, m_external_auth(auth)
, m_extra_headers(extra_headers)
{
@@ -88,6 +89,10 @@ namespace libtorrent
= parse_url_components(url, ec);
TORRENT_ASSERT(!ec);
#ifdef TORRENT_USE_OPENSSL
if (protocol == "https") m_ssl = true;
#endif
if (!m_basic_auth.empty())
m_basic_auth = base64encode(m_basic_auth);