QtNetwork: Fix some messages in OCSP stapling

Amends a8412dc020.

Task-number: QTBUG-12812
Task-number: QTBUG-17158
Change-Id: Idcdf9ad39a43373097e2c3f31a62ce1b3cb46c22
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
This commit is contained in:
Friedemann Kleint 2019-01-29 15:47:24 +01:00
parent 201dde1f31
commit 5de981d3bc
2 changed files with 5 additions and 5 deletions

View File

@ -326,7 +326,7 @@ QString QSslError::errorString() const
errStr = QSslSocket::tr("The client is not authorized to request OCSP status from this server");
break;
case OcspResponseCannotBeTrusted:
errStr = QSslSocket::tr("OCSP reponder's identity cannot be verified");
errStr = QSslSocket::tr("OCSP responder's identity cannot be verified");
break;
case OcspResponseCertIdUnknown:
errStr = QSslSocket::tr("The identity of a certificate in an OCSP response cannot be established");

View File

@ -578,10 +578,10 @@ bool QSslSocketBackendPrivate::acquireCredentialsHandle()
&findParam,
nullptr);
if (!chainContext) {
setErrorAndEmit(QAbstractSocket::SocketError::SslInvalidUserDataError,
QSslSocket::tr("The certificate provided can not be used for a %1.")
.arg(isClient ? QSslSocket::tr("client")
: QSslSocket::tr("server")));
const QString message = isClient
? QSslSocket::tr("The certificate provided can not be used for a client.")
: QSslSocket::tr("The certificate provided can not be used for a server.");
setErrorAndEmit(QAbstractSocket::SocketError::SslInvalidUserDataError, message);
return false;
}
Q_ASSERT(chainContext->cChain == 1);