mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
workaround for multiple certificates problem
This commit is contained in:
parent
ffa0680096
commit
456e33dca4
@ -47,16 +47,6 @@ operator = (const HTTPClient ©) {
|
|||||||
_proxy = copy._proxy;
|
_proxy = copy._proxy;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: HTTPClient::Destructor
|
|
||||||
// Access: Published
|
|
||||||
// Description:
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
INLINE HTTPClient::
|
|
||||||
~HTTPClient() {
|
|
||||||
SSL_CTX_free(_ssl_ctx);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: HTTPClient::set_proxy
|
// Function: HTTPClient::set_proxy
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -31,6 +31,19 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool HTTPClient::_ssl_initialized = false;
|
bool HTTPClient::_ssl_initialized = false;
|
||||||
|
SSL_CTX *HTTPClient::_ssl_ctx = NULL;
|
||||||
|
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: HTTPClient::Destructor
|
||||||
|
// Access: Published
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
HTTPClient::
|
||||||
|
~HTTPClient() {
|
||||||
|
// Since the context is temporarily shared among all clients.
|
||||||
|
// SSL_CTX_free(_ssl_ctx);
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: HTTPClient::load_certificates
|
// Function: HTTPClient::load_certificates
|
||||||
@ -112,6 +125,12 @@ make_ctx() {
|
|||||||
if (!_ssl_initialized) {
|
if (!_ssl_initialized) {
|
||||||
initialize_ssl();
|
initialize_ssl();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_ssl_ctx != (SSL_CTX *)NULL) {
|
||||||
|
// Since the context is temporarily shared among all clients.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
_ssl_ctx = SSL_CTX_new(SSLv23_client_method());
|
||||||
|
|
||||||
#if defined(SSL_097) && !defined(NDEBUG)
|
#if defined(SSL_097) && !defined(NDEBUG)
|
||||||
|
@ -84,10 +84,13 @@ private:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
URLSpec _proxy;
|
URLSpec _proxy;
|
||||||
SSL_CTX *_ssl_ctx;
|
|
||||||
bool _verify_ssl;
|
bool _verify_ssl;
|
||||||
|
|
||||||
static bool _ssl_initialized;
|
static bool _ssl_initialized;
|
||||||
|
|
||||||
|
// This is temporarily static, shared among all clients, to work
|
||||||
|
// around the loading certificates problem.
|
||||||
|
static SSL_CTX *_ssl_ctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "httpClient.I"
|
#include "httpClient.I"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user