зеркало из https://github.com/mozilla/pjs.git
Bug 331977, No error dialog is presented if an SSL rehandshake fails
r=rrelyea
This commit is contained in:
Родитель
7ba96eb6ea
Коммит
f18172888d
|
@ -1076,19 +1076,18 @@ nsSSLThread::checkHandshake(PRInt32 bytesTransfered, PRFileDesc* ssl_layer_fd, n
|
|||
PRBool handleHandshakeResultNow;
|
||||
socketInfo->GetHandshakePending(&handleHandshakeResultNow);
|
||||
|
||||
if (0 > bytesTransfered && handleHandshakeResultNow) {
|
||||
if (0 > bytesTransfered) {
|
||||
PRInt32 err = PR_GetError();
|
||||
|
||||
// Let's see if there was an error set by the SSL libraries that we
|
||||
// should tell the user about.
|
||||
if (PR_WOULD_BLOCK_ERROR == err) {
|
||||
// we are not yet ready to handle the result code from the
|
||||
// first transfer after the handshake
|
||||
handleHandshakeResultNow = PR_FALSE;
|
||||
socketInfo->SetHandshakeInProgress(PR_TRUE);
|
||||
}
|
||||
else {
|
||||
PRBool wantRetry = PR_FALSE;
|
||||
PRBool wantRetry = PR_FALSE;
|
||||
|
||||
if (handleHandshakeResultNow) {
|
||||
// Let's see if there was an error set by the SSL libraries that we
|
||||
// should tell the user about.
|
||||
if (PR_WOULD_BLOCK_ERROR == err) {
|
||||
socketInfo->SetHandshakeInProgress(PR_TRUE);
|
||||
return bytesTransfered;
|
||||
}
|
||||
|
||||
PRBool withInitialCleartext = socketInfo->GetHasCleartextPhase();
|
||||
|
||||
// When not using a proxy we'll see a connection reset error.
|
||||
|
@ -1104,10 +1103,10 @@ nsSSLThread::checkHandshake(PRInt32 bytesTransfered, PRFileDesc* ssl_layer_fd, n
|
|||
PR_SetError(PR_CONNECT_RESET_ERROR, 0);
|
||||
}
|
||||
}
|
||||
|
||||
if (!wantRetry && (IS_SSL_ERROR(err) || IS_SEC_ERROR(err))) {
|
||||
nsHandleSSLError(socketInfo, err);
|
||||
}
|
||||
}
|
||||
|
||||
if (!wantRetry && (IS_SSL_ERROR(err) || IS_SEC_ERROR(err))) {
|
||||
nsHandleSSLError(socketInfo, err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче