зеркало из https://github.com/mozilla/pjs.git
Remove ssl-forcehandshake workaround r=kaie/rpotts/bienvenu sr=darin
This commit is contained in:
Родитель
45a175ab8d
Коммит
aa210f4255
|
@ -638,7 +638,7 @@ nsresult nsImapProtocol::SetupWithUrl(nsIURI * aURL, nsISupports* aConsumer)
|
|||
const char *connectionType = nsnull;
|
||||
|
||||
if (NS_SUCCEEDED(server->GetIsSecure(&isSecure)) && isSecure)
|
||||
connectionType = "ssl-forcehandshake";
|
||||
connectionType = "ssl";
|
||||
|
||||
nsCOMPtr<nsIProxyInfo> proxyInfo;
|
||||
rv = NS_ExamineForProxy("imap", hostName.get(), port, getter_AddRefs(proxyInfo));
|
||||
|
|
|
@ -474,7 +474,7 @@ nsresult nsPop3Protocol::Initialize(nsIURI * aURL)
|
|||
if (NS_FAILED(rv)) proxyInfo = nsnull;
|
||||
|
||||
if (isSecure)
|
||||
rv = OpenNetworkSocketWithInfo(hostName.get(), port, "ssl-forcehandshake", proxyInfo, ir);
|
||||
rv = OpenNetworkSocketWithInfo(hostName.get(), port, "ssl", proxyInfo, ir);
|
||||
else
|
||||
rv = OpenNetworkSocketWithInfo(hostName.get(), port, nsnull, proxyInfo, ir);
|
||||
|
||||
|
|
|
@ -567,7 +567,7 @@ NS_IMETHODIMP nsNNTPProtocol::Initialize(nsIURI * aURL, nsIMsgWindow *aMsgWindow
|
|||
if (NS_FAILED(rv)) proxyInfo = nsnull;
|
||||
|
||||
if (isSecure)
|
||||
rv = OpenNetworkSocketWithInfo(hostName.get(), port, "ssl-forcehandshake", proxyInfo, ir);
|
||||
rv = OpenNetworkSocketWithInfo(hostName.get(), port, "ssl", proxyInfo, ir);
|
||||
else
|
||||
rv = OpenNetworkSocketWithInfo(hostName.get(), port, nsnull, proxyInfo, ir);
|
||||
|
||||
|
|
|
@ -847,14 +847,6 @@ nsresult nsSocketTransport::doConnection(PRInt16 aSelectFlags)
|
|||
if (secCtrl)
|
||||
secCtrl->SetNotificationCallbacks(mNotificationCallbacks);
|
||||
}
|
||||
else if (nsCRT::strcmp(mSocketTypes[type], "ssl-forcehandshake") == 0) {
|
||||
mSecurityInfo = socketInfo;
|
||||
nsCOMPtr<nsISSLSocketControl> secCtrl(do_QueryInterface(mSecurityInfo));
|
||||
if (secCtrl) {
|
||||
secCtrl->SetForceHandshake(PR_TRUE);
|
||||
secCtrl->SetNotificationCallbacks(mNotificationCallbacks);
|
||||
}
|
||||
}
|
||||
else if ((nsCRT::strcmp(mSocketTypes[type], "socks") == 0)
|
||||
|| (nsCRT::strcmp(mSocketTypes[type], "socks4") == 0)) {
|
||||
// since socks is transparent, any layers above
|
||||
|
|
|
@ -29,7 +29,7 @@ interface nsIInterfaceRequestor;
|
|||
[noscript, uuid(8b3e8488-1dd2-11b2-b547-956290be347c)]
|
||||
interface nsISSLSocketControl : nsISupports {
|
||||
attribute nsIInterfaceRequestor notificationCallbacks;
|
||||
attribute boolean forceHandshake;
|
||||
attribute boolean forceHandshake; /* obsolete, unused */
|
||||
|
||||
void proxyStepUp();
|
||||
void TLSStepUp();
|
||||
|
|
|
@ -32,10 +32,6 @@ interface nsISSLSocketProvider : nsISocketProvider {
|
|||
#define NS_ISSLSOCKETPROVIDER_CONTRACTID NS_NETWORK_SOCKET_CONTRACTID_PREFIX "ssl"
|
||||
#define NS_ISSLSOCKETPROVIDER_CLASSNAME "Mozilla SSL Socket Provider Component"
|
||||
|
||||
/* This code behaves just like the above, but works around bug 66706 */
|
||||
#define NS_ISSLFHSOCKETPROVIDER_CONTRACTID NS_NETWORK_SOCKET_CONTRACTID_PREFIX "ssl-forcehandshake"
|
||||
#define NS_ISSLFHSOCKETPROVIDER_CLASSNAME "Mozilla SSL-FH Socket Provider Component"
|
||||
|
||||
/* This code produces a normal socket which can be stepped up to TLS by
|
||||
* calling its nsISSLSocketControl->TLSStepUp()
|
||||
*/
|
||||
|
|
|
@ -813,8 +813,6 @@ nsSSLIOLayerConnect(PRFileDesc* fd, const PRNetAddr* addr,
|
|||
PR_SetSocketOption(fd, &sockopt);
|
||||
#endif
|
||||
|
||||
nsNSSSocketInfo *infoObject = (nsNSSSocketInfo*)fd->secret;
|
||||
|
||||
status = fd->lower->methods->connect(fd->lower, addr,
|
||||
#if defined(XP_BEOS) // bug 70217
|
||||
PR_INTERVAL_NO_TIMEOUT);
|
||||
|
@ -831,12 +829,7 @@ nsSSLIOLayerConnect(PRFileDesc* fd, const PRNetAddr* addr,
|
|||
#endif
|
||||
}
|
||||
|
||||
PRBool forceHandshake, forTLSStepUp;
|
||||
infoObject->GetForceHandshake(&forceHandshake);
|
||||
infoObject->GetForTLSStepUp(&forTLSStepUp);
|
||||
|
||||
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] Connect: forceHandshake = %d, forTLSStepUp = %d\n",
|
||||
(void*)fd, forceHandshake, forTLSStepUp));
|
||||
PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] Connect\n", (void*)fd));
|
||||
|
||||
#if defined(XP_BEOS) // bug 70217
|
||||
loser:
|
||||
|
|
|
@ -231,13 +231,6 @@ static const nsModuleComponentInfo components[] =
|
|||
nsTLSSocketProviderConstructor
|
||||
},
|
||||
|
||||
{
|
||||
NS_ISSLFHSOCKETPROVIDER_CLASSNAME,
|
||||
NS_SSLSOCKETPROVIDER_CID,
|
||||
NS_ISSLFHSOCKETPROVIDER_CONTRACTID,
|
||||
nsSSLSocketProviderConstructor
|
||||
},
|
||||
|
||||
{
|
||||
NS_SDR_CLASSNAME,
|
||||
NS_SDR_CID,
|
||||
|
|
Загрузка…
Ссылка в новой задаче