fix SSL error messages

This commit is contained in:
Arvid Norberg 2012-08-01 15:01:13 +00:00
parent c10c5aa369
commit e7cc28e9df
3 changed files with 13 additions and 3 deletions

View File

@ -1,6 +1,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fix incorrect SSL error messages
* fix windows build of shared library with openssl
* fix race condition causing shutdown hang

View File

@ -490,6 +490,9 @@ torrent an *SSL torrent*. An SSL torrent requires that each peer has a valid cer
signed by this root certificate. For SSL torrents, all peers are connecting over SSL
connections. For more information on SSL torrents, see the manual_.
The string is not the path to the cert, it's the actual content of the certificate,
loaded into a std::string.
.. _manual: manual.html#ssl-torrents
set_priv() priv()

View File

@ -1468,7 +1468,9 @@ namespace libtorrent
if (!ctx)
{
set_error(asio::error::no_memory, "SSL context");
error_code ec(::ERR_get_error(),
asio::error::get_ssl_category());
set_error(ec, "SSL context");
pause();
return;
}
@ -1504,7 +1506,9 @@ namespace libtorrent
X509_STORE* cert_store = X509_STORE_new();
if (!cert_store)
{
set_error(asio::error::no_memory, "x.509 certificate store");
error_code ec(::ERR_get_error(),
asio::error::get_ssl_category());
set_error(ec, "x.509 certificate store");
pause();
return;
}
@ -1520,8 +1524,10 @@ namespace libtorrent
if (!certificate)
{
error_code ec(::ERR_get_error(),
asio::error::get_ssl_category());
X509_STORE_free(cert_store);
set_error(asio::error::no_memory, "x.509 certificate");
set_error(ec, "x.509 certificate");
pause();
return;
}