diff --git a/panda/src/downloader/bioStreamBuf.cxx b/panda/src/downloader/bioStreamBuf.cxx index 7b7d8946bf..4603af0c02 100644 --- a/panda/src/downloader/bioStreamBuf.cxx +++ b/panda/src/downloader/bioStreamBuf.cxx @@ -164,6 +164,22 @@ underflow() { << _source->get_server_name() << ":" << _source->get_port() << " (" << read_count << ").\n"; notify_ssl_errors(); + + SSL *ssl; + BIO_get_ssl(*_source, &ssl); + if (ssl != (SSL *)NULL) { + downloader_cat.warning() + << "OpenSSL error code: " << SSL_get_error(ssl, read_count) + << "\n"; + } + +#ifdef WIN32_VC + downloader_cat.warning() + << "Windows error code: " << WSAGetLastError() << "\n"; +#else + downloader_cat.warning() + << "Unix error code: " << errno << "\n"; +#endif // WIN32_VC } gbump(num_bytes); return EOF; diff --git a/panda/src/downloader/httpClient.cxx b/panda/src/downloader/httpClient.cxx index 37b21d520e..003aa0fd08 100644 --- a/panda/src/downloader/httpClient.cxx +++ b/panda/src/downloader/httpClient.cxx @@ -926,6 +926,9 @@ get_ssl_ctx() { } #endif + // Make sure the error strings are loaded. + notify_ssl_errors(); + // Get the configured set of expected servers. { Config::ConfigTable::Symbol expected_servers;