diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index 178f75276..a999fd67f 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -665,12 +665,6 @@ namespace libtorrent torrent_map m_torrents; std::map > m_uuids; - // these are all the torrents using full AES-256 encryption of - // all peer connections. When receiving a handshake that's encrypred - // these are the torrents we need to try to decrypt it with to - // find the decryption key - std::set > m_encrypted_torrents; - typedef std::list > check_queue_t; // this has all torrents that wants to be checked in it diff --git a/include/libtorrent/torrent.hpp b/include/libtorrent/torrent.hpp index 3162030e8..1cbb3825d 100644 --- a/include/libtorrent/torrent.hpp +++ b/include/libtorrent/torrent.hpp @@ -1363,12 +1363,6 @@ namespace libtorrent // if set to true, add tracker URLs loaded from resume // data into this torrent instead of replacing them bool m_merge_resume_trackers:1; - - // set to true if this torrent has been added to the session - // global list for encrypted torrents. When the torrent is - // paused it's removed and when it's started again, it's - // re-added - bool m_in_encrypted_list:1; // state subscription. If set, a pointer to this torrent // will be added to the m_state_updates set in session_impl diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp index d78d40b4d..fc055fab8 100644 --- a/src/peer_connection.cpp +++ b/src/peer_connection.cpp @@ -1218,14 +1218,6 @@ namespace libtorrent return; } -#ifdef TORRENT_USE_OPENSSL - if (t->torrent_file().encryption_key().size() == 32 && !allow_encrypted) - { - disconnect(errors::invalid_info_hash, 2); - return; - } -#endif - if (t->is_paused() && (!t->is_auto_managed() || !m_ses.m_settings.incoming_starts_queued_torrents)) { diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 5bcbfc248..eeaa825ce 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -830,7 +830,6 @@ namespace aux { PRINT_OFFSETOF(torrent_info, m_created_by) #ifdef TORRENT_USE_OPENSSL PRINT_OFFSETOF(torrent_info, m_ssl_root_cert) - PRINT_OFFSETOF(torrent_info, m_aes_key) #endif PRINT_OFFSETOF(torrent_info, m_info_dict) PRINT_OFFSETOF(torrent_info, m_creation_date) diff --git a/src/torrent.cpp b/src/torrent.cpp index 9e4e05aa8..ebefdf866 100644 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -428,7 +428,6 @@ namespace libtorrent , m_magnet_link(false) , m_apply_ip_filter(p.flags & add_torrent_params::flag_apply_ip_filter) , m_merge_resume_trackers(p.flags & add_torrent_params::flag_merge_resume_trackers) - , m_in_encrypted_list(false) , m_state_subscription(p.flags & add_torrent_params::flag_update_subscribe) , m_in_state_updates(false) { @@ -1491,14 +1490,6 @@ namespace libtorrent if (!cert.empty()) init_ssl(cert); #endif -#ifdef TORRENT_USE_OPENSSL - if (m_torrent_file->encryption_key().size() == 32 && !m_in_encrypted_list) - { - m_ses.m_encrypted_torrents.insert(shared_from_this()); - m_in_encrypted_list = true; - } -#endif - m_file_priority.resize(m_torrent_file->num_files(), 1); m_file_progress.resize(m_torrent_file->num_files(), 0); @@ -3369,14 +3360,6 @@ namespace libtorrent if (m_abort) return; -#ifdef TORRENT_USE_OPENSSL - if (m_torrent_file->is_valid() && m_torrent_file->encryption_key().size() == 32 && m_in_encrypted_list) - { - m_ses.m_encrypted_torrents.erase(shared_from_this()); - m_in_encrypted_list = false; - } -#endif - m_abort = true; // if the torrent is paused, it doesn't need // to announce with even=stopped again. @@ -6813,14 +6796,6 @@ namespace libtorrent TORRENT_ASSERT(m_ses.is_network_thread()); if (!is_paused()) return; -#ifdef TORRENT_USE_OPENSSL - if (m_torrent_file->is_valid() && m_torrent_file->encryption_key().size() == 32 && m_in_encrypted_list) - { - m_ses.m_encrypted_torrents.erase(shared_from_this()); - m_in_encrypted_list = false; - } -#endif - #ifndef TORRENT_DISABLE_EXTENSIONS for (extension_list_t::iterator i = m_extensions.begin() , end(m_extensions.end()); i != end; ++i) @@ -6972,14 +6947,6 @@ namespace libtorrent TORRENT_ASSERT(m_ses.is_network_thread()); if (is_paused()) return; -#ifdef TORRENT_USE_OPENSSL - if (m_torrent_file->is_valid() && m_torrent_file->encryption_key().size() == 32 && !m_in_encrypted_list) - { - m_ses.m_encrypted_torrents.insert(shared_from_this()); - m_in_encrypted_list = true; - } -#endif - #ifndef TORRENT_DISABLE_EXTENSIONS for (extension_list_t::iterator i = m_extensions.begin() , end(m_extensions.end()); i != end; ++i) diff --git a/src/torrent_info.cpp b/src/torrent_info.cpp index 68e4a5ce4..bd9b2d4fe 100644 --- a/src/torrent_info.cpp +++ b/src/torrent_info.cpp @@ -470,7 +470,6 @@ namespace libtorrent , m_created_by(t.m_created_by) #ifdef TORRENT_USE_OPENSSL , m_ssl_root_cert(t.m_ssl_root_cert) - , m_aes_key(t.m_aes_key) #endif , m_creation_date(t.m_creation_date) , m_info_hash(t.m_info_hash) @@ -761,7 +760,6 @@ namespace libtorrent m_created_by.swap(ti.m_created_by); #ifdef TORRENT_USE_OPENSSL m_ssl_root_cert.swap(ti.m_ssl_root_cert); - m_aes_key.swap(ti.m_aes_key); #endif boost::uint32_t tmp; SWAP(m_multifile, ti.m_multifile); @@ -943,8 +941,6 @@ namespace libtorrent #ifdef TORRENT_USE_OPENSSL m_ssl_root_cert = info.dict_find_string_value("ssl-cert"); - - m_aes_key = info.dict_find_string_value("encryption-key"); #endif return true;