merged SSL fix from RC_0_16

This commit is contained in:
Arvid Norberg 2013-08-05 16:20:25 +00:00
parent 75ba9333e6
commit d782fc224c
2 changed files with 5 additions and 1 deletions

View File

@ -23,6 +23,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fix SSL authentication issue
* deprecate std::wstring overloads. long live utf-8
* improve time-critical pieces feature (streaming)
* introduce bandwidth exhaustion attack-mitigation in allowed-fast pieces

View File

@ -588,7 +588,10 @@ namespace aux {
if (!t->ssl_ctx()) return SSL_TLSEXT_ERR_ALERT_FATAL;
// use this torrent's certificate
SSL_set_SSL_CTX(s, t->ssl_ctx()->native_handle());
SSL_CTX *torrent_context = t->ssl_ctx()->native_handle();
SSL_set_SSL_CTX(s, torrent_context);
SSL_set_verify(s, SSL_CTX_get_verify_mode(torrent_context), SSL_CTX_get_verify_callback(torrent_context));
return SSL_TLSEXT_ERR_OK;
}