initial import
[gentoo-soor-overlay.git] / x11-libs / qt / files / qsslsocket-fix.patch
blobb44b78f2812fa2e56e9d58bb8ca4f80e2598b80f
1 diff src/network/qsslsocket_openssl.cpp src/network/qsslsocket_openssl.cpp
2 --- src/network/qsslsocket_openssl.cpp
3 +++ src/network/qsslsocket_openssl.cpp
4 @@ -188,8 +188,8 @@ struct QSslErrorList
5 Q_GLOBAL_STATIC(QSslErrorList, _q_sslErrorList)
6 static int q_X509Callback(int ok, X509_STORE_CTX *ctx)
8 - Q_UNUSED(ok);
9 - _q_sslErrorList()->errors << ctx->error;
10 + if (!ok)
11 + _q_sslErrorList()->errors << ctx->error;
12 return ctx->error;
15 @@ -297,6 +297,7 @@ bool QSslSocketBackendPrivate::initSslContext()
17 // Clear the session.
18 q_SSL_clear(ssl);
19 + errorList.clear();
21 // Initialize memory BIOs for encryption and decryption.
22 readBio = q_BIO_new(q_BIO_s_mem());
23 @@ -570,7 +571,7 @@ bool QSslSocketBackendPrivate::testConnection()
24 _q_sslErrorList()->mutex.lock();
25 _q_sslErrorList()->errors.clear();
26 int result = (mode == QSslSocket::SslClientMode) ? q_SSL_connect(ssl) : q_SSL_accept(ssl);
27 - QList<int> errorList = _q_sslErrorList()->errors;
28 + errorList << _q_sslErrorList()->errors;
29 _q_sslErrorList()->mutex.unlock();
31 // Check if we're encrypted or not.
32 diff src/network/qsslsocket_openssl_p.h src/network/qsslsocket_openssl_p.h
33 index be57b87..00b9b45 100644
34 --- src/network/qsslsocket_openssl_p.h
35 +++ src/network/qsslsocket_openssl_p.h
36 @@ -77,6 +77,7 @@ public:
37 SSL_SESSION *session;
38 X509_STORE *certificateStore;
39 X509_STORE_CTX *certificateStoreCtx;
40 + QList<int> errorList;
42 // Platform specific functions
43 void startClientEncryption();