summaryrefslogtreecommitdiffstats
path: root/src/network/ssl
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/ssl')
-rw-r--r--src/network/ssl/qssl.cpp2
-rw-r--r--src/network/ssl/qsslconfiguration.cpp24
-rw-r--r--src/network/ssl/qsslconfiguration.h4
-rw-r--r--src/network/ssl/qsslcontext.cpp4
-rw-r--r--src/network/ssl/qsslsocket.cpp2
-rw-r--r--src/network/ssl/ssl.pri2
6 files changed, 19 insertions, 19 deletions
diff --git a/src/network/ssl/qssl.cpp b/src/network/ssl/qssl.cpp
index ec771e1f49..5b7274e3e6 100644
--- a/src/network/ssl/qssl.cpp
+++ b/src/network/ssl/qssl.cpp
@@ -164,7 +164,7 @@ QT_BEGIN_NAMESPACE
\value SslOptionDisableSessionSharing Disables SSL session sharing via
the session ID handshake attribute.
\value SslOptionDisableSessionPersistence Disables storing the SSL session
- in ASN.1 format as returned by QSslConfiguration::session(). Enabling
+ in ASN.1 format as returned by QSslConfiguration::sessionTicket(). Enabling
this feature adds memory overhead of approximately 1K per used session
ticket.
diff --git a/src/network/ssl/qsslconfiguration.cpp b/src/network/ssl/qsslconfiguration.cpp
index 8979c48d5d..4aad7c04c5 100644
--- a/src/network/ssl/qsslconfiguration.cpp
+++ b/src/network/ssl/qsslconfiguration.cpp
@@ -602,19 +602,19 @@ bool QSslConfiguration::testSslOption(QSsl::SslOption option) const
\since 5.2
If QSsl::SslOptionDisableSessionPersistence was turned off, this
- function returns the session used in the SSL handshake in ASN.1
- format, suitable to e.g. be persisted to disk. If no session was
+ function returns the session ticket used in the SSL handshake in ASN.1
+ format, suitable to e.g. be persisted to disk. If no session ticket was
used or QSsl::SslOptionDisableSessionPersistence was not turned off,
this function returns an empty QByteArray.
- \b{Note:} When persisting the session to disk or similar, be
+ \b{Note:} When persisting the session ticket to disk or similar, be
careful not to expose the session to a potential attacker, as
knowledge of the session allows for eavesdropping on data
encrypted with the session parameters.
- \sa setSession(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
+ \sa setSessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
*/
-QByteArray QSslConfiguration::session() const
+QByteArray QSslConfiguration::sessionTicket() const
{
return d->sslSession;
}
@@ -622,16 +622,16 @@ QByteArray QSslConfiguration::session() const
/*!
\since 5.2
- Sets the session to be used in an SSL handshake.
+ Sets the session ticket to be used in an SSL handshake.
QSsl::SslOptionDisableSessionPersistence must be turned off
- for this to work, and \a session must be in ASN.1 format
- as returned by session().
+ for this to work, and \a sessionTicket must be in ASN.1 format
+ as returned by sessionTicket().
- \sa session(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
+ \sa sessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
*/
-void QSslConfiguration::setSession(const QByteArray &session)
+void QSslConfiguration::setSessionTicket(const QByteArray &sessionTicket)
{
- d->sslSession = session;
+ d->sslSession = sessionTicket;
}
/*!
@@ -645,7 +645,7 @@ void QSslConfiguration::setSession(const QByteArray &session)
QSsl::SslOptionDisableSessionPersistence was not turned off,
this function returns -1.
- \sa session(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
+ \sa sessionTicket(), QSsl::SslOptionDisableSessionPersistence, setSslOption()
*/
int QSslConfiguration::sessionTicketLifeTimeHint() const
{
diff --git a/src/network/ssl/qsslconfiguration.h b/src/network/ssl/qsslconfiguration.h
index 949ce70d4c..a48eceb63e 100644
--- a/src/network/ssl/qsslconfiguration.h
+++ b/src/network/ssl/qsslconfiguration.h
@@ -124,8 +124,8 @@ public:
void setSslOption(QSsl::SslOption option, bool on);
bool testSslOption(QSsl::SslOption option) const;
- QByteArray session() const;
- void setSession(const QByteArray &session);
+ QByteArray sessionTicket() const;
+ void setSessionTicket(const QByteArray &sessionTicket);
int sessionTicketLifeTimeHint() const;
static QSslConfiguration defaultConfiguration();
diff --git a/src/network/ssl/qsslcontext.cpp b/src/network/ssl/qsslcontext.cpp
index 6d281c390d..037ee8c672 100644
--- a/src/network/ssl/qsslcontext.cpp
+++ b/src/network/ssl/qsslcontext.cpp
@@ -260,8 +260,8 @@ init_context:
q_SSL_CTX_set_verify_depth(sslContext->ctx, sslContext->sslConfiguration.peerVerifyDepth());
// set persisted session if the user set it
- if (!configuration.session().isEmpty())
- sslContext->setSessionASN1(configuration.session());
+ if (!configuration.sessionTicket().isEmpty())
+ sslContext->setSessionASN1(configuration.sessionTicket());
return sslContext;
}
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 24843e9f92..38b493a769 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -903,7 +903,7 @@ void QSslSocket::setSslConfiguration(const QSslConfiguration &configuration)
d->configuration.peerVerifyMode = configuration.peerVerifyMode();
d->configuration.protocol = configuration.protocol();
d->configuration.sslOptions = configuration.d->sslOptions;
- d->configuration.sslSession = configuration.session();
+ d->configuration.sslSession = configuration.sessionTicket();
d->configuration.sslSessionTicketLifeTimeHint = configuration.sessionTicketLifeTimeHint();
// if the CA certificates were set explicitly (either via
diff --git a/src/network/ssl/ssl.pri b/src/network/ssl/ssl.pri
index 0fe231357b..eb8268515e 100644
--- a/src/network/ssl/ssl.pri
+++ b/src/network/ssl/ssl.pri
@@ -45,5 +45,5 @@ android:!android-no-sdk: SOURCES += ssl/qsslsocket_openssl_android.cpp
QMAKE_CXXFLAGS += $$OPENSSL_CFLAGS
LIBS_PRIVATE += $$OPENSSL_LIBS
- windows:LIBS += -lcrypt32
+ win32: LIBS_PRIVATE += -lcrypt32
}