|
|
Q_GLOBAL_STATIC(QSslErrorList, _q_sslErrorList) | Q_GLOBAL_STATIC(QSslErrorList, _q_sslErrorList) |
static int q_X509Callback(int ok, X509_STORE_CTX *ctx) | static int q_X509Callback(int ok, X509_STORE_CTX *ctx) |
{ | { |
Q_UNUSED(ok); |
if (!ok) |
_q_sslErrorList()->errors << ctx->error; |
_q_sslErrorList()->errors << ctx->error; |
return ctx->error; | return ctx->error; |
} | } |
| |
|
Lines 297-302
bool QSslSocketBackendPrivate::initSslContext()
|
Link Here
|
|---|
|
| |
// Clear the session. | // Clear the session. |
q_SSL_clear(ssl); | q_SSL_clear(ssl); |
|
errorList.clear(); |
| |
// Initialize memory BIOs for encryption and decryption. | // Initialize memory BIOs for encryption and decryption. |
readBio = q_BIO_new(q_BIO_s_mem()); | readBio = q_BIO_new(q_BIO_s_mem()); |
|
Lines 570-576
bool QSslSocketBackendPrivate::testConnection()
|
Link Here
|
|---|
|
_q_sslErrorList()->mutex.lock(); | _q_sslErrorList()->mutex.lock(); |
_q_sslErrorList()->errors.clear(); | _q_sslErrorList()->errors.clear(); |
int result = (mode == QSslSocket::SslClientMode) ? q_SSL_connect(ssl) : q_SSL_accept(ssl); | int result = (mode == QSslSocket::SslClientMode) ? q_SSL_connect(ssl) : q_SSL_accept(ssl); |
QList<int> errorList = _q_sslErrorList()->errors; |
errorList << _q_sslErrorList()->errors; |
_q_sslErrorList()->mutex.unlock(); | _q_sslErrorList()->mutex.unlock(); |
| |
// Check if we're encrypted or not. | // Check if we're encrypted or not. |