Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Baulig <mabaul@microsoft.com>2017-09-14 20:17:19 +0300
committerGitHub <noreply@github.com>2017-09-14 20:17:19 +0300
commit56c2802ff9d1eec9ac6ab090100bb9cceccc83fb (patch)
tree4bc38139859054c03d4ebe14c17635edde9e8f65
parent002fcd5835bf0171bbc4d938d9114de4169e9ae1 (diff)
[System]: SslStream.Flush() now flushes the underlying stream. Bug #57528. (#5569)
* Mono.Security.Interface.IMonoSslStream: removed Flush(). * Mono.Net.Security.MobileAuthenticatedStream: Flush() now calls `InnerStream.Flush ()'. * System.Net.Security.SslStream: Flush() now calls `InnerStream.Flush ()'. * System.Net.Security.SslStream: fix `CanRead`, `CanWrite` and `CanTimeout` logic.
-rw-r--r--mcs/class/Mono.Security/Mono.Security.Interface/IMonoSslStream.cs2
-rw-r--r--mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs2
-rw-r--r--mcs/class/System/System.Net.Security/SslStream.cs8
3 files changed, 5 insertions, 7 deletions
diff --git a/mcs/class/Mono.Security/Mono.Security.Interface/IMonoSslStream.cs b/mcs/class/Mono.Security/Mono.Security.Interface/IMonoSslStream.cs
index 0b64495fc5f..131ebab00e6 100644
--- a/mcs/class/Mono.Security/Mono.Security.Interface/IMonoSslStream.cs
+++ b/mcs/class/Mono.Security/Mono.Security.Interface/IMonoSslStream.cs
@@ -71,8 +71,6 @@ namespace Mono.Security.Interface
Task AuthenticateAsServerAsync (X509Certificate serverCertificate, bool clientCertificateRequired, SSA.SslProtocols enabledSslProtocols, bool checkCertificateRevocation);
- void Flush ();
-
int Read (byte[] buffer, int offset, int count);
void Write (byte[] buffer);
diff --git a/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs
index 95ecb8fd64a..ee3aa44c49e 100644
--- a/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs
+++ b/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs
@@ -707,7 +707,7 @@ namespace Mono.Net.Security
public override void Flush ()
{
- // Write() automatically flushes the underlying stream.
+ InnerStream.Flush ();
}
public SslProtocols SslProtocol {
diff --git a/mcs/class/System/System.Net.Security/SslStream.cs b/mcs/class/System/System.Net.Security/SslStream.cs
index c0b702fde1b..a536f3bb822 100644
--- a/mcs/class/System/System.Net.Security/SslStream.cs
+++ b/mcs/class/System/System.Net.Security/SslStream.cs
@@ -293,15 +293,15 @@ namespace System.Net.Security
}
public override bool CanRead {
- get { return Impl.CanRead; }
+ get { return impl != null && impl.CanRead; }
}
public override bool CanTimeout {
- get { return Impl.CanTimeout; }
+ get { return InnerStream.CanTimeout; }
}
public override bool CanWrite {
- get { return Impl.CanWrite; }
+ get { return impl != null && impl.CanWrite; }
}
public override int ReadTimeout {
@@ -337,7 +337,7 @@ namespace System.Net.Security
public override void Flush ()
{
- Impl.Flush ();
+ InnerStream.Flush ();
}
void CheckDisposed ()