diff options
author | Peter Hartmann <phartmann@blackberry.com> | 2013-04-04 09:30:43 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-24 16:03:42 (GMT) |
commit | 488cb662604437b31db0667dd9e17772395f16c2 (patch) | |
tree | c9ce430944173b17dff5a77d64f5479d9a00c17f /tests/auto | |
parent | 1df30fbd1e9ce54dd1076649162121b99700dc98 (diff) | |
download | Qt-488cb662604437b31db0667dd9e17772395f16c2.zip Qt-488cb662604437b31db0667dd9e17772395f16c2.tar.gz Qt-488cb662604437b31db0667dd9e17772395f16c2.tar.bz2 |
SSL internals: do not write after shutting down the socket
... but rather throw an error, so the HTTP layer can recover from a SSL
shutdown gracefully. In case the other side sent us a shutdown, we tried
to send one as well, which results in an error.
(backport of commit e145b67fbd54f147dab0f8e460280a9c8533aa7b)
Change-Id: I57291a5363cb0f6585dbd6aaa521c748766a1fdf
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qsslsocket/tst_qsslsocket.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index 880c4c2..75f74a5 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -1996,7 +1996,8 @@ void tst_QSslSocket::writeBigChunk() QFAIL("Error while writing! Check if the OpenSSL BIO size is limited?!"); } // also check the error string. If another error (than UnknownError) occurred, it should be different than before - QVERIFY(errorBefore == errorAfter); + QVERIFY2(errorBefore == errorAfter || socket->error() == QAbstractSocket::RemoteHostClosedError, + QByteArray("unexpected error: ").append(qPrintable(errorAfter))); // check that everything has been written to OpenSSL QVERIFY(socket->bytesToWrite() == 0); |