diff options
author | Peter Hartmann <phartmann@blackberry.com> | 2013-04-30 14:48:22 +0200 |
---|---|---|
committer | Peter Hartmann <phartmann@blackberry.com> | 2013-06-03 12:50:15 +0200 |
commit | 054e85bfdae2af37f0c2ee17d131e0b3cb2d2f25 (patch) | |
tree | ab51c7b9c845455c94a3997c23da2bb77d0673f1 /src/network/ssl/qsslconfiguration.cpp | |
parent | 84eb6200ff0850db8bab8d32b70e571ca9db2bda (diff) | |
download | qt4-tools-054e85bfdae2af37f0c2ee17d131e0b3cb2d2f25.tar.gz |
[BB10-internal] QSslConfiguration: add API to persist and resume SSL sessions4.8-bb10
Session tickets can be cached on the client side for hours (e.g.
graph.facebook.com: ~ 24 hours, api.twitter.com: 4 hours), because the
server does not need to maintain state.
We need public API for it so an application can cache the session (e.g.
to disk) and resume a session already with the 1st handshake, saving
one network round trip.
Task-number: QTBUG-20668
(backport of commit 3be197881f100d1c3c8f3ce00501d7a32eb51119)
Change-Id: I4c7f3a749edf0012b52deeb495706e550d24c42d
Signed-off-by: Peter Hartmann <phartmann@blackberry.com>
Diffstat (limited to 'src/network/ssl/qsslconfiguration.cpp')
-rw-r--r-- | src/network/ssl/qsslconfiguration.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp index 54e6751664..d1d4b87231 100644 --- a/src/network/ssl/qsslconfiguration.cpp +++ b/src/network/ssl/qsslconfiguration.cpp @@ -169,7 +169,10 @@ bool QSslConfiguration::operator==(const QSslConfiguration &other) const d->peerVerifyMode == other.d->peerVerifyMode && d->peerVerifyDepth == other.d->peerVerifyDepth && d->allowRootCertOnDemandLoading == other.d->allowRootCertOnDemandLoading && - d->sslOptions == other.d->sslOptions; + d->sslOptions == other.d->sslOptions && + d->sslSession == other.d->sslSession && + d->cacheSslSession == other.d->cacheSslSession && + d->sslSessionTicketLifeTimeHint == other.d->sslSessionTicketLifeTimeHint; } /*! @@ -205,7 +208,10 @@ bool QSslConfiguration::isNull() const d->peerCertificateChain.count() == 0 && d->sslOptions == ( QSsl::SslOptionDisableEmptyFragments |QSsl::SslOptionDisableLegacyRenegotiation - |QSsl::SslOptionDisableCompression)); + |QSsl::SslOptionDisableCompression) && + d->sslSession.isNull() && + d->cacheSslSession == false && + d->sslSessionTicketLifeTimeHint == -1); } /*! |