summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslsocket.cpp
diff options
context:
space:
mode:
authorTimur Pocheptsov <timur.pocheptsov@qt.io>2019-01-25 15:11:34 +0100
committerTimur Pocheptsov <timur.pocheptsov@qt.io>2019-01-27 10:41:51 +0000
commit315969725da24c336b5dd5c5463c605ee679781d (patch)
tree9c70ad83df5116ad95a7ce146d549c790cf03cb7 /src/network/ssl/qsslsocket.cpp
parent5ae8fcd17bda45177ae7f65bf1c9f25f30706bb4 (diff)
QSslSocket - make ocsp response into ... ocsp responseS
If later we try to introduce multiple ocsp support, the API returning a single response will be somewhat broken and illogical/not clear how to use at all. Let's return a vector of responses (for now it's one, can change in future). This makes isNull() redundant on a response, also, we now need 'subject' - a cert that response was for. Change-Id: Ibbd9dec163b53906b2fd61fa31c43db7d08adc4d Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/network/ssl/qsslsocket.cpp')
-rw-r--r--src/network/ssl/qsslsocket.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index 68de9dedaa..88398488a5 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -1155,16 +1155,16 @@ QSsl::SslProtocol QSslSocket::sessionProtocol() const
/*!
\since 5.13
- This function returns Online Certificate Status Protocol response that
- a server may send during a TLS handshake using OCSP stapling. If no
- definitive or no response was received at all, the response is empty.
+ This function returns Online Certificate Status Protocol responses that
+ a server may send during a TLS handshake using OCSP stapling. The vector
+ is empty if no definitive response or no response at all was received.
- \sa QSslConfiguration::setOcspStaplingEnabled(), QOcspResponse::isNull()
+ \sa QSslConfiguration::setOcspStaplingEnabled()
*/
-QOcspResponse QSslSocket::ocspResponse() const
+QVector<QOcspResponse> QSslSocket::ocspResponses() const
{
Q_D(const QSslSocket);
- return d->ocspResponse;
+ return d->ocspResponses;
}
/*!
@@ -2150,7 +2150,7 @@ void QSslSocketPrivate::init()
shutdown = false;
pendingClose = false;
flushTriggered = false;
- ocspResponse.clear();
+ ocspResponses.clear();
// we don't want to clear the ignoreErrorsList, so
// that it is possible setting it before connecting