From 8fc048905a7c48555002c61071938cad0090eee5 Mon Sep 17 00:00:00 2001 From: Panos Astithas Date: Wed, 15 Feb 2012 16:12:27 +0200 Subject: [PATCH 1/6] Bug 726609 - Intermittent browser_dbg_select-line.js | The correct line is selected. - Got 0, expected 5; r=msucan --- .../debugger/test/browser_dbg_select-line.js | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/browser/devtools/debugger/test/browser_dbg_select-line.js b/browser/devtools/debugger/test/browser_dbg_select-line.js index 57e7b8186b9..885e5786c96 100644 --- a/browser/devtools/debugger/test/browser_dbg_select-line.js +++ b/browser/devtools/debugger/test/browser_dbg_select-line.js @@ -43,37 +43,41 @@ function testSelectLine() { ok(gDebugger.editor.getText().search(/debugger/) != -1, "The correct script was loaded initially."); - // getCaretPosition is 0-based. - is(gDebugger.editor.getCaretPosition().line, 5, - "The correct line is selected."); + // Yield control back to the event loop so that the debugger has a + // chance to highlight the proper line. + executeSoon(function(){ + // getCaretPosition is 0-based. + is(gDebugger.editor.getCaretPosition().line, 5, + "The correct line is selected."); - gDebugger.editor.addEventListener(SourceEditor.EVENTS.TEXT_CHANGED, - function onChange() { - gDebugger.editor.removeEventListener(SourceEditor.EVENTS.TEXT_CHANGED, - onChange); - ok(gDebugger.editor.getText().search(/debugger/) == -1, - "The second script is no longer displayed."); + gDebugger.editor.addEventListener(SourceEditor.EVENTS.TEXT_CHANGED, + function onChange() { + gDebugger.editor.removeEventListener(SourceEditor.EVENTS.TEXT_CHANGED, + onChange); + ok(gDebugger.editor.getText().search(/debugger/) == -1, + "The second script is no longer displayed."); - ok(gDebugger.editor.getText().search(/firstCall/) != -1, - "The first script is displayed."); + ok(gDebugger.editor.getText().search(/firstCall/) != -1, + "The first script is displayed."); - // Yield control back to the event loop so that the debugger has a - // chance to highlight the proper line. - executeSoon(function(){ - // getCaretPosition is 0-based. - is(gDebugger.editor.getCaretPosition().line, 4, - "The correct line is selected."); + // Yield control back to the event loop so that the debugger has a + // chance to highlight the proper line. + executeSoon(function(){ + // getCaretPosition is 0-based. + is(gDebugger.editor.getCaretPosition().line, 4, + "The correct line is selected."); - gDebugger.StackFrames.activeThread.resume(function() { - removeTab(gTab); - finish(); + gDebugger.StackFrames.activeThread.resume(function() { + removeTab(gTab); + finish(); + }); }); }); - }); - // Click the oldest stack frame. - let element = gDebugger.document.getElementById("stackframe-3"); - EventUtils.synthesizeMouseAtCenter(element, {}, gDebugger); + // Click the oldest stack frame. + let element = gDebugger.document.getElementById("stackframe-3"); + EventUtils.synthesizeMouseAtCenter(element, {}, gDebugger); + }); }}, 0); }); From 7c04dc3989c17b2d5551483b0dd13524d16230ce Mon Sep 17 00:00:00 2001 From: Mark Banner Date: Tue, 14 Feb 2012 12:57:31 -0500 Subject: [PATCH 2/6] Bug 727081 - Fix for clang error 'use of undeclared identifier EnumerateEntries'. r=nfroyd --- toolkit/components/telemetry/Telemetry.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index f54a379e9e3..e67bd740f39 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -110,7 +110,7 @@ AutoHashtable::ReflectHashtable(ReflectEntryFunc entryFunc, JSContext *cx, JSObject *obj) { EnumeratorArgs args = { cx, obj, entryFunc }; - PRUint32 num = EnumerateEntries(ReflectEntryStub, static_cast(&args)); + PRUint32 num = this->EnumerateEntries(ReflectEntryStub, static_cast(&args)); return num == this->Count(); } From 218b96570abb38a67f84e0c17515dfc2c781dfe9 Mon Sep 17 00:00:00 2001 From: Jared Wein Date: Wed, 15 Feb 2012 17:15:42 -0800 Subject: [PATCH 3/6] Bug 709182 - 'Connecting...' in tab title when reloading is unnecessary visual noise. r=ttaubert r=dao --- browser/base/content/tabbrowser.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 30f18e07275..23292789e1a 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -536,7 +536,8 @@ if (!this.mBlank) { if (!(aStateFlags & nsIWebProgressListener.STATE_RESTORING)) { this.mTab.setAttribute("busy", "true"); - this.mTabBrowser.setTabTitleLoading(this.mTab); + if (!(this.mBrowser.docShell.loadType & Ci.nsIDocShell.LOAD_CMD_RELOAD)) + this.mTabBrowser.setTabTitleLoading(this.mTab); } if (this.mTab.selected) From 62dde07cf2e8980b662d3a3d81b866d6364734ba Mon Sep 17 00:00:00 2001 From: Olli Pettay Date: Thu, 16 Feb 2012 18:45:25 +0200 Subject: [PATCH 4/6] Bug 725804 - Don't add active network requests (XHR, WebSocket, EventSource) to CC graph, r=mccr8,jduell,jst --- content/base/src/nsEventSource.cpp | 17 +++++++++++++++-- content/base/src/nsEventSource.h | 1 + content/base/src/nsWebSocket.cpp | 8 +++++++- content/base/src/nsXMLHttpRequest.cpp | 17 ++++++++++++++--- content/base/src/nsXMLHttpRequest.h | 2 +- 5 files changed, 38 insertions(+), 7 deletions(-) diff --git a/content/base/src/nsEventSource.cpp b/content/base/src/nsEventSource.cpp index cb91fea9bdb..b0860e28151 100644 --- a/content/base/src/nsEventSource.cpp +++ b/content/base/src/nsEventSource.cpp @@ -89,6 +89,7 @@ nsEventSource::nsEventSource() : mErrorLoadOnRedirect(false), mGoingToDispatchAllMessages(false), mWithCredentials(false), + mWaitingForOnStopRequest(false), mLastConvertionResult(NS_OK), mReadyState(nsIEventSource::CONNECTING), mScriptLine(0), @@ -108,13 +109,19 @@ nsEventSource::~nsEventSource() NS_IMPL_CYCLE_COLLECTION_CLASS(nsEventSource) NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsEventSource) - if (tmp->IsBlack()) { + bool isBlack = tmp->IsBlack(); + if (isBlack || tmp->mWaitingForOnStopRequest) { if (tmp->mListenerManager) { tmp->mListenerManager->UnmarkGrayJSListeners(); NS_UNMARK_LISTENER_WRAPPER(Open) NS_UNMARK_LISTENER_WRAPPER(Message) NS_UNMARK_LISTENER_WRAPPER(Error) } + if (!isBlack) { + xpc_UnmarkGrayObject(tmp->PreservingWrapper() ? + tmp->GetWrapperPreserveColor() : + tmp->GetExpandoObjectPreserveColor()); + } return true; } NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END @@ -599,6 +606,8 @@ nsEventSource::OnStopRequest(nsIRequest *aRequest, nsISupports *aContext, nsresult aStatusCode) { + mWaitingForOnStopRequest = false; + if (mReadyState == nsIEventSource::CLOSED) { return NS_ERROR_ABORT; } @@ -949,7 +958,11 @@ nsEventSource::InitChannelAndRequestEventSource() NS_ENSURE_SUCCESS(rv, rv); // Start reading from the channel - return mHttpChannel->AsyncOpen(listener, nsnull); + rv = mHttpChannel->AsyncOpen(listener, nsnull); + if (NS_SUCCEEDED(rv)) { + mWaitingForOnStopRequest = true; + } + return rv; } void diff --git a/content/base/src/nsEventSource.h b/content/base/src/nsEventSource.h index 4ee1c32b004..0b04bce34e5 100644 --- a/content/base/src/nsEventSource.h +++ b/content/base/src/nsEventSource.h @@ -216,6 +216,7 @@ protected: bool mErrorLoadOnRedirect; bool mGoingToDispatchAllMessages; bool mWithCredentials; + bool mWaitingForOnStopRequest; // used while reading the input streams nsCOMPtr mUnicodeDecoder; diff --git a/content/base/src/nsWebSocket.cpp b/content/base/src/nsWebSocket.cpp index 1a6f1457120..b5b53594db3 100644 --- a/content/base/src/nsWebSocket.cpp +++ b/content/base/src/nsWebSocket.cpp @@ -439,7 +439,8 @@ nsWebSocket::~nsWebSocket() NS_IMPL_CYCLE_COLLECTION_CLASS(nsWebSocket) NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsWebSocket) - if (tmp->IsBlack()) { + bool isBlack = tmp->IsBlack(); + if (isBlack|| tmp->mKeepingAlive) { if (tmp->mListenerManager) { tmp->mListenerManager->UnmarkGrayJSListeners(); NS_UNMARK_LISTENER_WRAPPER(Open) @@ -447,6 +448,11 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsWebSocket) NS_UNMARK_LISTENER_WRAPPER(Message) NS_UNMARK_LISTENER_WRAPPER(Close) } + if (!isBlack) { + xpc_UnmarkGrayObject(tmp->PreservingWrapper() ? + tmp->GetWrapperPreserveColor() : + tmp->GetExpandoObjectPreserveColor()); + } return true; } NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END diff --git a/content/base/src/nsXMLHttpRequest.cpp b/content/base/src/nsXMLHttpRequest.cpp index 170b68fa459..bb86e90fece 100644 --- a/content/base/src/nsXMLHttpRequest.cpp +++ b/content/base/src/nsXMLHttpRequest.cpp @@ -445,8 +445,8 @@ nsXMLHttpRequest::nsXMLHttpRequest() mProgressSinceLastProgressEvent(false), mUploadProgress(0), mUploadProgressMax(0), mRequestSentTime(0), mTimeoutMilliseconds(0), - mErrorLoad(false), mProgressTimerIsActive(false), - mProgressEventWasDelayed(false), + mErrorLoad(false), mWaitingForOnStopRequest(false), + mProgressTimerIsActive(false), mProgressEventWasDelayed(false), mIsHtml(false), mWarnAboutMultipartHtml(false), mWarnAboutSyncHtml(false), @@ -602,7 +602,8 @@ nsXMLHttpRequest::SetRequestObserver(nsIRequestObserver* aObserver) NS_IMPL_CYCLE_COLLECTION_CLASS(nsXMLHttpRequest) NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsXMLHttpRequest) - if (tmp->IsBlack()) { + bool isBlack = tmp->IsBlack(); + if (isBlack || tmp->mWaitingForOnStopRequest) { if (tmp->mListenerManager) { tmp->mListenerManager->UnmarkGrayJSListeners(); NS_UNMARK_LISTENER_WRAPPER(Load) @@ -614,6 +615,11 @@ NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_BEGIN(nsXMLHttpRequest) NS_UNMARK_LISTENER_WRAPPER(UploadProgress) NS_UNMARK_LISTENER_WRAPPER(Readystatechange) } + if (!isBlack) { + xpc_UnmarkGrayObject(tmp->PreservingWrapper() ? + tmp->GetWrapperPreserveColor() : + tmp->GetExpandoObjectPreserveColor()); + } return true; } NS_IMPL_CYCLE_COLLECTION_CAN_SKIP_END @@ -2140,6 +2146,8 @@ nsXMLHttpRequest::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult return NS_OK; } + mWaitingForOnStopRequest = false; + nsresult rv = NS_OK; // If we're loading a multipart stream of XML documents, we'll get @@ -2774,6 +2782,9 @@ nsXMLHttpRequest::Send(nsIVariant *aBody) return rv; } + // Either AsyncOpen was called, or CORS will open the channel later. + mWaitingForOnStopRequest = true; + // If we're synchronous, spin an event loop here and wait if (!(mState & XML_HTTP_REQUEST_ASYNC)) { mState |= XML_HTTP_REQUEST_SYNCLOOPING; diff --git a/content/base/src/nsXMLHttpRequest.h b/content/base/src/nsXMLHttpRequest.h index 3d5a1ab8424..f25c953d6a6 100644 --- a/content/base/src/nsXMLHttpRequest.h +++ b/content/base/src/nsXMLHttpRequest.h @@ -365,7 +365,7 @@ protected: void HandleTimeoutCallback(); bool mErrorLoad; - + bool mWaitingForOnStopRequest; bool mProgressTimerIsActive; bool mProgressEventWasDelayed; bool mIsHtml; From faf66b5596ac910e67723475d6d06f4b2e8b6934 Mon Sep 17 00:00:00 2001 From: Serge Gautherie Date: Fri, 17 Feb 2012 02:50:40 +0100 Subject: [PATCH 5/6] Bug 285374. (Av1) Set background color as a property, not as an attribute. r=neil. --- toolkit/content/widgets/colorpicker.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolkit/content/widgets/colorpicker.xml b/toolkit/content/widgets/colorpicker.xml index 5d37202c65c..3eda7d537e7 100644 --- a/toolkit/content/widgets/colorpicker.xml +++ b/toolkit/content/widgets/colorpicker.xml @@ -445,7 +445,7 @@ return this.getAttribute("color"); ]]> From 4c0f5df06711f7dc9c46df1c4dea6cfe55928b00 Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Thu, 16 Feb 2012 19:16:42 -0800 Subject: [PATCH 6/6] Bug 713936: Update to NSS_3_13_2_RTM (NSS 3.13.2), r=kai --- security/coreconf/coreconf.dep | 1 + security/nss/TAG-INFO | 2 +- security/nss/cmd/tstclnt/tstclnt.c | 3 ++- security/nss/lib/nss/nss.h | 6 +++--- security/nss/lib/softoken/softkver.h | 4 ++-- security/nss/lib/ssl/ssl.h | 25 +++++++++++++++++-------- security/nss/lib/ssl/ssl3con.c | 8 ++++---- security/nss/lib/ssl/ssl3ext.c | 12 ++++++------ security/nss/lib/ssl/sslimpl.h | 4 ++-- security/nss/lib/ssl/sslsecur.c | 6 +++--- security/nss/lib/ssl/sslsock.c | 17 ++++++++++++++++- security/nss/lib/ssl/sslt.h | 4 ++-- security/nss/lib/util/nssutil.h | 4 ++-- 13 files changed, 61 insertions(+), 35 deletions(-) diff --git a/security/coreconf/coreconf.dep b/security/coreconf/coreconf.dep index b75161110bb..b536cfc01b9 100644 --- a/security/coreconf/coreconf.dep +++ b/security/coreconf/coreconf.dep @@ -42,3 +42,4 @@ */ #error "Do not include this header file." + diff --git a/security/nss/TAG-INFO b/security/nss/TAG-INFO index ce7da6e81f8..afb975faf11 100644 --- a/security/nss/TAG-INFO +++ b/security/nss/TAG-INFO @@ -1 +1 @@ -NSS_3_13_2_RC0 +NSS_3_13_2_RTM diff --git a/security/nss/cmd/tstclnt/tstclnt.c b/security/nss/cmd/tstclnt/tstclnt.c index 8a8071b371b..52ef9a15f72 100644 --- a/security/nss/cmd/tstclnt/tstclnt.c +++ b/security/nss/cmd/tstclnt/tstclnt.c @@ -325,7 +325,8 @@ ownAuthCertificate(void *arg, PRFileDesc *fd, PRBool checkSig, { ServerCertAuth * serverCertAuth = (ServerCertAuth *) arg; - FPRINTF(stderr, "using asynchronous certificate validation\n"); + FPRINTF(stderr, "%s: using asynchronous certificate validation\n", + progName); PORT_Assert(serverCertAuth->shouldPause); PORT_Assert(!serverCertAuth->isPaused); diff --git a/security/nss/lib/nss/nss.h b/security/nss/lib/nss/nss.h index 83393ed8e89..405c0596df9 100644 --- a/security/nss/lib/nss/nss.h +++ b/security/nss/lib/nss/nss.h @@ -36,7 +36,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: nss.h,v 1.88 2012/02/13 21:34:08 kaie%kuix.de Exp $ */ +/* $Id: nss.h,v 1.89 2012/02/15 21:56:55 kaie%kuix.de Exp $ */ #ifndef __nss_h_ #define __nss_h_ @@ -66,11 +66,11 @@ * The format of the version string should be * ".[.[.]][ ][ ]" */ -#define NSS_VERSION "3.13.2.0" _NSS_ECC_STRING _NSS_CUSTOMIZED +#define NSS_VERSION "3.13.2.1" _NSS_ECC_STRING _NSS_CUSTOMIZED #define NSS_VMAJOR 3 #define NSS_VMINOR 13 #define NSS_VPATCH 2 -#define NSS_VBUILD 0 +#define NSS_VBUILD 1 #define NSS_BETA PR_FALSE #ifndef RC_INVOKED diff --git a/security/nss/lib/softoken/softkver.h b/security/nss/lib/softoken/softkver.h index d2c2763c1ea..4a3bf4c3347 100644 --- a/security/nss/lib/softoken/softkver.h +++ b/security/nss/lib/softoken/softkver.h @@ -57,11 +57,11 @@ * The format of the version string should be * ".[.[.]][ ][ ]" */ -#define SOFTOKEN_VERSION "3.13.2.0" SOFTOKEN_ECC_STRING +#define SOFTOKEN_VERSION "3.13.2.1" SOFTOKEN_ECC_STRING #define SOFTOKEN_VMAJOR 3 #define SOFTOKEN_VMINOR 13 #define SOFTOKEN_VPATCH 2 -#define SOFTOKEN_VBUILD 0 +#define SOFTOKEN_VBUILD 1 #define SOFTOKEN_BETA PR_FALSE #endif /* _SOFTKVER_H_ */ diff --git a/security/nss/lib/ssl/ssl.h b/security/nss/lib/ssl/ssl.h index f93a2e27f2c..74da9119b7b 100644 --- a/security/nss/lib/ssl/ssl.h +++ b/security/nss/lib/ssl/ssl.h @@ -36,7 +36,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: ssl.h,v 1.48 2012/02/11 12:58:47 kaie%kuix.de Exp $ */ +/* $Id: ssl.h,v 1.49 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ #ifndef __ssl_h_ #define __ssl_h_ @@ -347,11 +347,14 @@ SSL_IMPORT CERTCertificate *SSL_PeerCertificate(PRFileDesc *fd); ** ** If the authenticate certificate hook returns SECFailure, then the bad cert ** hook will be called. The bad cert handler is NEVER called if the -** authenticate certificate hook returns SECWouldBlock. +** authenticate certificate hook returns SECWouldBlock. If the application +** needs to handle and/or override a bad cert, it should do so before it +** calls SSL_AuthCertificateComplete (modifying the error it passes to +** SSL_AuthCertificateComplete as needed). ** ** See the documentation for SSL_AuthCertificateComplete for more information ** about the asynchronous behavior that occurs when the authenticate -** certificate hook returns SECWouldBlock +** certificate hook returns SECWouldBlock. */ typedef SECStatus (PR_CALLBACK *SSLAuthCertificate)(void *arg, PRFileDesc *fd, PRBool checkSig, @@ -772,11 +775,11 @@ extern const char *NSSSSL_GetVersion(void); * a connection; it does not work for the server role. * * The application must call SSL_AuthCertificateComplete with 0 as the value of - * status parameter after it has successfully validated the peer's certificate, - * in order to continue the SSL handshake. + * the error parameter after it has successfully validated the peer's + * certificate, in order to continue the SSL handshake. * * The application may call SSL_AuthCertificateComplete with a non-zero value - * for status (e.g. SEC_ERROR_REVOKED_CERTIFICATE) when certificate validation + * for error (e.g. SEC_ERROR_REVOKED_CERTIFICATE) when certificate validation * fails, before it closes the connection. If the application does so, an * alert corresponding to the error (e.g. certificate_revoked) will be sent to * the peer. See the source code of the internal function @@ -816,10 +819,16 @@ extern const char *NSSSSL_GetVersion(void); * Returns SECFailure on failure, SECSuccess on success. Never returns * SECWouldBlock. Note that SSL_AuthCertificateComplete will (usually) return * SECSuccess; do not interpret the return value of SSL_AuthCertificateComplete - * as an indicator of whether it is OK to continue using the connection. + * as an indicator of whether it is OK to continue using the connection. For + * example, SSL_AuthCertificateComplete(fd, SEC_ERROR_REVOKED_CERTIFICATE) will + * return SECSuccess (normally), but that does not mean that the application + * should continue using the connection. If the application passes a non-zero + * value for second argument (error), or if SSL_AuthCertificateComplete returns + * anything other than SECSuccess, then the application should close the + * connection. */ SSL_IMPORT SECStatus SSL_AuthCertificateComplete(PRFileDesc *fd, - PRErrorCode status); + PRErrorCode error); SEC_END_PROTOS #endif /* __ssl_h_ */ diff --git a/security/nss/lib/ssl/ssl3con.c b/security/nss/lib/ssl/ssl3con.c index f17d4c1d724..a9161534c08 100644 --- a/security/nss/lib/ssl/ssl3con.c +++ b/security/nss/lib/ssl/ssl3con.c @@ -39,7 +39,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: ssl3con.c,v 1.162 2012/02/11 13:03:08 kaie%kuix.de Exp $ */ +/* $Id: ssl3con.c,v 1.163 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ #include "cert.h" #include "ssl.h" @@ -8146,7 +8146,7 @@ ssl3_AlwaysFail(sslSocket * ss) /* Caller must hold 1stHandshakeLock. */ SECStatus -ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode status) +ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error) { SECStatus rv; @@ -8168,9 +8168,9 @@ ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode status) ss->ssl3.hs.authCertificatePending = PR_FALSE; - if (status != 0) { + if (error != 0) { ss->ssl3.hs.restartTarget = ssl3_AlwaysFail; - ssl3_SendAlertForCertError(ss, status); + ssl3_SendAlertForCertError(ss, error); rv = SECSuccess; } else if (ss->ssl3.hs.restartTarget != NULL) { sslRestartTarget target = ss->ssl3.hs.restartTarget; diff --git a/security/nss/lib/ssl/ssl3ext.c b/security/nss/lib/ssl/ssl3ext.c index f0cd26e3b00..6aa00c368b9 100644 --- a/security/nss/lib/ssl/ssl3ext.c +++ b/security/nss/lib/ssl/ssl3ext.c @@ -41,7 +41,7 @@ * ***** END LICENSE BLOCK ***** */ /* TLS extension code moved here from ssl3ecc.c */ -/* $Id: ssl3ext.c,v 1.20 2011/11/16 19:12:35 kaie%kuix.de Exp $ */ +/* $Id: ssl3ext.c,v 1.21 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ #include "nssrenam.h" #include "nss.h" @@ -241,7 +241,7 @@ static const ssl3HelloExtensionHandler clientHelloHandlers[] = { #endif { ssl_session_ticket_xtn, &ssl3_ServerHandleSessionTicketXtn }, { ssl_renegotiation_info_xtn, &ssl3_HandleRenegotiationInfoXtn }, - { ssl_next_proto_neg_xtn, &ssl3_ServerHandleNextProtoNegoXtn }, + { ssl_next_proto_nego_xtn, &ssl3_ServerHandleNextProtoNegoXtn }, { -1, NULL } }; @@ -252,7 +252,7 @@ static const ssl3HelloExtensionHandler serverHelloHandlersTLS[] = { /* TODO: add a handler for ssl_ec_point_formats_xtn */ { ssl_session_ticket_xtn, &ssl3_ClientHandleSessionTicketXtn }, { ssl_renegotiation_info_xtn, &ssl3_HandleRenegotiationInfoXtn }, - { ssl_next_proto_neg_xtn, &ssl3_ClientHandleNextProtoNegoXtn }, + { ssl_next_proto_nego_xtn, &ssl3_ClientHandleNextProtoNegoXtn }, { -1, NULL } }; @@ -276,7 +276,7 @@ ssl3HelloExtensionSender clientHelloSendersTLS[SSL_MAX_EXTENSIONS] = { { ssl_ec_point_formats_xtn, &ssl3_SendSupportedPointFormatsXtn }, #endif { ssl_session_ticket_xtn, &ssl3_SendSessionTicketXtn }, - { ssl_next_proto_neg_xtn, &ssl3_ClientSendNextProtoNegoXtn } + { ssl_next_proto_nego_xtn, &ssl3_ClientSendNextProtoNegoXtn } /* any extra entries will appear as { 0, NULL } */ }; @@ -641,14 +641,14 @@ ssl3_ClientSendNextProtoNegoXtn(sslSocket * ss, PRBool append, if (append && maxBytes >= extension_length) { SECStatus rv; - rv = ssl3_AppendHandshakeNumber(ss, ssl_next_proto_neg_xtn, 2); + rv = ssl3_AppendHandshakeNumber(ss, ssl_next_proto_nego_xtn, 2); if (rv != SECSuccess) goto loser; rv = ssl3_AppendHandshakeNumber(ss, 0, 2); if (rv != SECSuccess) goto loser; ss->xtnData.advertised[ss->xtnData.numAdvertised++] = - ssl_next_proto_neg_xtn; + ssl_next_proto_nego_xtn; } else if (maxBytes < extension_length) { return 0; } diff --git a/security/nss/lib/ssl/sslimpl.h b/security/nss/lib/ssl/sslimpl.h index f2573536dfc..123fce81010 100644 --- a/security/nss/lib/ssl/sslimpl.h +++ b/security/nss/lib/ssl/sslimpl.h @@ -39,7 +39,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslimpl.h,v 1.93 2012/02/11 12:58:47 kaie%kuix.de Exp $ */ +/* $Id: sslimpl.h,v 1.94 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ #ifndef __sslimpl_h_ #define __sslimpl_h_ @@ -1359,7 +1359,7 @@ extern void ssl_FreeSocket(struct sslSocketStr *ssl); extern SECStatus SSL3_SendAlert(sslSocket *ss, SSL3AlertLevel level, SSL3AlertDescription desc); -extern SECStatus ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode status); +extern SECStatus ssl3_AuthCertificateComplete(sslSocket *ss, PRErrorCode error); /* * for dealing with SSL 3.0 clients sending SSL 2.0 format hellos diff --git a/security/nss/lib/ssl/sslsecur.c b/security/nss/lib/ssl/sslsecur.c index 71b87aba52e..61148d33408 100644 --- a/security/nss/lib/ssl/sslsecur.c +++ b/security/nss/lib/ssl/sslsecur.c @@ -37,7 +37,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslsecur.c,v 1.56 2012/02/11 12:58:47 kaie%kuix.de Exp $ */ +/* $Id: sslsecur.c,v 1.57 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ #include "cert.h" #include "secitem.h" #include "keyhi.h" @@ -1488,7 +1488,7 @@ SSL_RestartHandshakeAfterServerCert(sslSocket * ss) /* See documentation in ssl.h */ SECStatus -SSL_AuthCertificateComplete(PRFileDesc *fd, PRErrorCode status) +SSL_AuthCertificateComplete(PRFileDesc *fd, PRErrorCode error) { SECStatus rv; sslSocket *ss = ssl_FindSocket(fd); @@ -1508,7 +1508,7 @@ SSL_AuthCertificateComplete(PRFileDesc *fd, PRErrorCode status) PORT_SetError(SSL_ERROR_FEATURE_NOT_SUPPORTED_FOR_SSL2); rv = SECFailure; } else { - rv = ssl3_AuthCertificateComplete(ss, status); + rv = ssl3_AuthCertificateComplete(ss, error); } ssl_Release1stHandshakeLock(ss); diff --git a/security/nss/lib/ssl/sslsock.c b/security/nss/lib/ssl/sslsock.c index af9dcf506d2..22206f7fa14 100644 --- a/security/nss/lib/ssl/sslsock.c +++ b/security/nss/lib/ssl/sslsock.c @@ -40,7 +40,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslsock.c,v 1.81 2012/02/11 13:20:53 kaie%kuix.de Exp $ */ +/* $Id: sslsock.c,v 1.82 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ #include "seccomon.h" #include "cert.h" #include "keyhi.h" @@ -1964,8 +1964,23 @@ ssl_Poll(PRFileDesc *fd, PRInt16 how_flags, PRInt16 *p_out_flags) * the caller to poll the socket unless there is pending write data. */ if (ss->lastWriteBlocked && ss->pendingBuf.len != 0) { + /* Ignore any newly-received data on the socket, but do wait for + * the socket to become writable again. Here, it is OK for an error + * to be detected, because our logic for sending pending write data + * will allow us to report the error to the caller without the risk + * of the application spinning. + */ new_flags &= (PR_POLL_WRITE | PR_POLL_EXCEPT); } else { + /* Unfortunately, clearing new_flags will make it impossible for + * the application to detect errors that it would otherwise be + * able to detect with PR_POLL_EXCEPT, until the asynchronous + * callback completes. However, we must clear all the flags to + * prevent the application from spinning (alternating between + * calling PR_Poll that would return PR_POLL_EXCEPT, and send/recv + * which won't actually report the I/O error while we are waiting + * for the asynchronous callback to complete). + */ new_flags = 0; } } diff --git a/security/nss/lib/ssl/sslt.h b/security/nss/lib/ssl/sslt.h index 644668801d4..8991fb4e04d 100644 --- a/security/nss/lib/ssl/sslt.h +++ b/security/nss/lib/ssl/sslt.h @@ -37,7 +37,7 @@ * the terms of any one of the MPL, the GPL or the LGPL. * * ***** END LICENSE BLOCK ***** */ -/* $Id: sslt.h,v 1.17 2011/10/29 00:29:11 bsmith%mozilla.com Exp $ */ +/* $Id: sslt.h,v 1.18 2012/02/15 21:52:08 kaie%kuix.de Exp $ */ #ifndef __sslt_h_ #define __sslt_h_ @@ -203,7 +203,7 @@ typedef enum { ssl_ec_point_formats_xtn = 11, #endif ssl_session_ticket_xtn = 35, - ssl_next_proto_neg_xtn = 13172, + ssl_next_proto_nego_xtn = 13172, ssl_renegotiation_info_xtn = 0xff01 /* experimental number */ } SSLExtensionType; diff --git a/security/nss/lib/util/nssutil.h b/security/nss/lib/util/nssutil.h index f32f270bcd6..d6cedb3b585 100644 --- a/security/nss/lib/util/nssutil.h +++ b/security/nss/lib/util/nssutil.h @@ -51,11 +51,11 @@ * The format of the version string should be * ".[.[.]][ ]" */ -#define NSSUTIL_VERSION "3.13.2.0" +#define NSSUTIL_VERSION "3.13.2.1" #define NSSUTIL_VMAJOR 3 #define NSSUTIL_VMINOR 13 #define NSSUTIL_VPATCH 2 -#define NSSUTIL_VBUILD 0 +#define NSSUTIL_VBUILD 1 #define NSSUTIL_BETA PR_FALSE SEC_BEGIN_PROTOS