Imported Upstream version 5.16.0.144

Former-commit-id: 2b9e8926e7df56dfea2d6991a64c8f5129cfffcb
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-09-05 08:26:42 +00:00
parent 6dab091a3e
commit 47a1b3e592
53 changed files with 201 additions and 108 deletions

View File

@@ -77,7 +77,7 @@ namespace Mono.Net.Security
Settings = settings;
Provider = provider;
readBuffer = new BufferOffsetSize2 (16834);
readBuffer = new BufferOffsetSize2 (16500);
writeBuffer = new BufferOffsetSize2 (16384);
operation = Operation.None;
}

View File

@@ -50,7 +50,7 @@ using System.Security.Cryptography;
namespace Mono.Net.Security
{
class MonoTlsStream
class MonoTlsStream : IDisposable
{
#if SECURITY_DEP
readonly MonoTlsProvider provider;
@@ -136,6 +136,7 @@ namespace Mono.Net.Security
request.ServicePoint.UpdateClientCertificate (sslStream.InternalLocalCertificate);
else {
request.ServicePoint.UpdateClientCertificate (null);
sslStream.Dispose ();
sslStream = null;
}
}
@@ -154,5 +155,13 @@ namespace Mono.Net.Security
throw new PlatformNotSupportedException (EXCEPTION_MESSAGE);
#endif
}
public void Dispose ()
{
if (sslStream != null) {
sslStream.Dispose ();
sslStream = null;
}
}
}
}