Bug 331977, No error dialog is presented if an SSL rehandshake fails
r=rrelyea git-svn-id: svn://10.0.0.236/trunk@201378 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
1b302573e1
commit
2173cc63f5
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user