QtNetwork: Fix some messages in OCSP stapling

Amends a8412dc020e82b45b54b0b6637b8b88b255c413a.

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"); errStr = QSslSocket::tr("The client is not authorized to request OCSP status from this server");
break; break;
case OcspResponseCannotBeTrusted: case OcspResponseCannotBeTrusted:
errStr = QSslSocket::tr("OCSP reponder's identity cannot be verified"); errStr = QSslSocket::tr("OCSP responder's identity cannot be verified");
break; break;
case OcspResponseCertIdUnknown: case OcspResponseCertIdUnknown:
errStr = QSslSocket::tr("The identity of a certificate in an OCSP response cannot be established"); 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, &findParam,
nullptr); nullptr);
if (!chainContext) { if (!chainContext) {
setErrorAndEmit(QAbstractSocket::SocketError::SslInvalidUserDataError, const QString message = isClient
QSslSocket::tr("The certificate provided can not be used for a %1.") ? QSslSocket::tr("The certificate provided can not be used for a client.")
.arg(isClient ? QSslSocket::tr("client") : QSslSocket::tr("The certificate provided can not be used for a server.");
: QSslSocket::tr("server"))); setErrorAndEmit(QAbstractSocket::SocketError::SslInvalidUserDataError, message);
return false; return false;
} }
Q_ASSERT(chainContext->cChain == 1); Q_ASSERT(chainContext->cChain == 1);