diff options
author | Shane Kearns <shane.kearns@accenture.com> | 2010-07-08 09:42:59 (GMT) |
---|---|---|
committer | Shane Kearns <shane.kearns@accenture.com> | 2010-07-08 09:47:35 (GMT) |
commit | 4f8ec542b123399574d2e509fa99f4bd66a34e25 (patch) | |
tree | c83529d456638a6bdeb5ec41f61f5105e4600a3d /src/network | |
parent | 9f0d39135141e9f048d4cb3647a9e50f3d3db5a1 (diff) | |
download | Qt-4f8ec542b123399574d2e509fa99f4bd66a34e25.zip Qt-4f8ec542b123399574d2e509fa99f4bd66a34e25.tar.gz Qt-4f8ec542b123399574d2e509fa99f4bd66a34e25.tar.bz2 |
Add exception barrier to QCertificateRetriever::RunL()
This translates stl exceptions into Symbian OS Leaves, to
prevent an assertion failure in the active scheduler.
Reviewed-by: mread
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/ssl/qsslsocket_openssl.cpp | 11 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_p.h | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp index d7088ee..1d794ae 100644 --- a/src/network/ssl/qsslsocket_openssl.cpp +++ b/src/network/ssl/qsslsocket_openssl.cpp @@ -199,7 +199,7 @@ QSslCipher QSslSocketBackendPrivate::QSslCipher_from_SSL_CIPHER(SSL_CIPHER *ciph ciph.d->protocol = QSsl::SslV2; else if (protoString == QLatin1String("TLSv1")) ciph.d->protocol = QSsl::TlsV1; - + if (descriptionList.at(2).startsWith(QLatin1String("Kx="))) ciph.d->keyExchangeMethod = descriptionList.at(2).mid(3); if (descriptionList.at(3).startsWith(QLatin1String("Au="))) @@ -367,7 +367,7 @@ init_context: // Set verification depth. if (configuration.peerVerifyDepth != 0) q_SSL_CTX_set_verify_depth(ctx, configuration.peerVerifyDepth); - + // Create and initialize SSL session if (!(ssl = q_SSL_new(ctx))) { // ### Bad error code @@ -616,6 +616,11 @@ void QCertificateRetriever::retrieveNextCertificate() void QCertificateRetriever::RunL() { + QT_TRYCATCH_LEAVING(run()); +} + +void QCertificateRetriever::run() +{ switch (state) { case Initializing: list(); @@ -818,7 +823,7 @@ void QSslSocketBackendPrivate::transmit() bool transmitting; do { transmitting = false; - + // If the connection is secure, we can transfer data from the write // buffer (in plain text) to the write BIO through SSL_write. if (connectionEncrypted && !writeBuffer.isEmpty()) { diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h index e41320d..987dfae 100644 --- a/src/network/ssl/qsslsocket_openssl_p.h +++ b/src/network/ssl/qsslsocket_openssl_p.h @@ -161,6 +161,7 @@ private: virtual void RunL(); virtual void DoCancel(); + void run(); void list(); void retrieveNextCertificate(); |