diff --git a/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs b/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs index 7827d97600..5f90ffe2b8 100644 --- a/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs +++ b/mcs/class/System/Mono.Net.Security/AsyncProtocolRequest.cs @@ -99,7 +99,8 @@ namespace Mono.Net.Security Complete, WantRead, WantWrite, - ReadDone + ReadDone, + FinishWrite } class AsyncProtocolRequest @@ -160,9 +161,16 @@ namespace Mono.Net.Security Debug ("ResetRead: {0} {1}", oldStatus, Status); } + internal void ResetWrite () + { + var oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)AsyncOperationStatus.Complete, (int)AsyncOperationStatus.WantWrite); + Debug ("ResetWrite: {0} {1}", oldStatus, Status); + } + internal void RequestWrite () { var oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)AsyncOperationStatus.WantWrite, (int)AsyncOperationStatus.Running); + Debug ("RequestWrite: {0} {1}", oldStatus, Status); if (oldStatus == AsyncOperationStatus.Running) return; else if (oldStatus != AsyncOperationStatus.WantRead && oldStatus != AsyncOperationStatus.WantWrite) @@ -209,7 +217,19 @@ namespace Mono.Net.Security status = ProcessOperation (status); - var oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)status, (int)AsyncOperationStatus.Running); + Debug ("ProcessOperation done: {0}", status); + + AsyncOperationStatus oldStatus; + if (status == AsyncOperationStatus.Complete) { + oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)AsyncOperationStatus.FinishWrite, (int)AsyncOperationStatus.WantWrite); + if (oldStatus == AsyncOperationStatus.WantWrite) { + // We are done, but still need to flush the write queue. + status = AsyncOperationStatus.FinishWrite; + continue; + } + } + + oldStatus = (AsyncOperationStatus)Interlocked.CompareExchange (ref Status, (int)status, (int)AsyncOperationStatus.Running); Debug ("ProcessOperation done: {0} -> {1}", oldStatus, status); if (oldStatus != AsyncOperationStatus.Running) { @@ -243,7 +263,9 @@ namespace Mono.Net.Security else return AsyncOperationStatus.WantRead; } else if (status == AsyncOperationStatus.WantWrite) { + Debug ("ProcessOperation - want write"); Parent.InnerWrite (); + Debug ("ProcessOperation - want write done"); return AsyncOperationStatus.Continue; } else if (status == AsyncOperationStatus.Initialize || status == AsyncOperationStatus.Continue) { Debug ("ProcessOperation - continue"); @@ -255,6 +277,11 @@ namespace Mono.Net.Security status = Operation (this, status); Debug ("ProcessOperation - read done: {0}", status); return status; + } else if (status == AsyncOperationStatus.FinishWrite) { + Debug ("ProcessOperation - finish write"); + Parent.InnerWrite (); + Debug ("ProcessOperation - finish write done"); + return AsyncOperationStatus.Complete; } throw new InvalidOperationException (); diff --git a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs index 5d2812d273..58d5c3865b 100644 --- a/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs +++ b/mcs/class/System/Mono.Net.Security/ChainValidationHelper.cs @@ -305,6 +305,13 @@ namespace Mono.Net.Security return new ValidationResult (result, user_denied, 0, (MonoSslPolicyErrors)errors); } + // Ignore port number when validating certificates. + if (!string.IsNullOrEmpty (host)) { + var pos = host.IndexOf (':'); + if (pos > 0) + host = host.Substring (0, pos); + } + ICertificatePolicy policy = ServicePointManager.GetLegacyCertificatePolicy (); int status11 = 0; // Error code passed to the obsolete ICertificatePolicy callback diff --git a/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs index 8701ffe92e..cf1082618e 100644 --- a/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs +++ b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs @@ -660,6 +660,7 @@ namespace Mono.Net.Security if (wantMore || writeBuffer.Size > 0) return AsyncOperationStatus.WantWrite; + asyncRequest.ResetWrite (); asyncRequest.UserResult = asyncRequest.CurrentSize; return AsyncOperationStatus.Complete; } diff --git a/mcs/class/lib/monolite/System.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.dll.REMOVED.git-id index 40dfca87bb..16ee9aeb5f 100644 --- a/mcs/class/lib/monolite/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.dll.REMOVED.git-id @@ -1 +1 @@ -e1e9686ed7784f6a16ea693a569012bf15888449 \ No newline at end of file +6bbc3c03d2cb117b010f43a89db6683af9ceb8f6 \ No newline at end of file diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index 2833af7157..f5bfa89bc8 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -824,7 +824,7 @@ EXTRA_DIST = TestDriver.cs \ Makefile.am.in version.h: Makefile - echo "#define FULL_VERSION \"Stable 4.6.1.3/abb06f1\"" > version.h + echo "#define FULL_VERSION \"Stable 4.6.1.5/ef43c15\"" > version.h # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index 2833af7157..f5bfa89bc8 100755 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -824,7 +824,7 @@ EXTRA_DIST = TestDriver.cs \ Makefile.am.in version.h: Makefile - echo "#define FULL_VERSION \"Stable 4.6.1.3/abb06f1\"" > version.h + echo "#define FULL_VERSION \"Stable 4.6.1.5/ef43c15\"" > version.h # Utility target for patching libtool to speed up linking patch-libtool: diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index bd6917fbf9..28dc16e462 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -906197df9f69b49f888b78629651ab70ec983eaf \ No newline at end of file +af57916ed7a1e484a212d0ac404d689861bcb022 \ No newline at end of file diff --git a/mono/mini/version.h b/mono/mini/version.h index c953416145..04f9e95621 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "Stable 4.6.1.3/abb06f1" +#define FULL_VERSION "Stable 4.6.1.5/ef43c15" diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index 34d82564c0..19959698a8 100644 Binary files a/po/mcs/de.gmo and b/po/mcs/de.gmo differ diff --git a/po/mcs/de.po.REMOVED.git-id b/po/mcs/de.po.REMOVED.git-id index f3df2c0c14..d60deed8a9 100644 --- a/po/mcs/de.po.REMOVED.git-id +++ b/po/mcs/de.po.REMOVED.git-id @@ -1 +1 @@ -8440bded44bc0320b80d941464dc88082c9fc152 \ No newline at end of file +5e4e19f077ff0b739d21c49cb7d12f01406323f0 \ No newline at end of file diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index 2c3362ad06..3d7265122b 100644 Binary files a/po/mcs/es.gmo and b/po/mcs/es.gmo differ diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index 3cefc0fe5c..2d1725981d 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -ff26f00339a484b537285682fe56c4a828b3da2a \ No newline at end of file +bc163f403dc4484be068e049bd90467d235957fd \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index b5c3b21bbd..8ae7486bd3 100644 Binary files a/po/mcs/ja.gmo and b/po/mcs/ja.gmo differ diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index d2b62af185..327e4358aa 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -40d73f201b4597e8a20a26bb7134cafb96ffb9bf \ No newline at end of file +180d9e14490b61253133b79b59798a3bda578368 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index 076288b9e0..9c8e79964b 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: mono 4.6.1\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2016-09-28 11:40+0000\n" +"POT-Creation-Date: 2016-10-11 13:11+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 457b5346c1..8a8d8c0594 100644 Binary files a/po/mcs/pt_BR.gmo and b/po/mcs/pt_BR.gmo differ diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index e0de9b8197..b224d69edb 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -740c11c139617ffbd21ab7a6a39ae82f22019014 \ No newline at end of file +faaa44720891d4d758b7b091b9b95ccf4243e9db \ No newline at end of file