Imported Upstream version 4.8.0.371

Former-commit-id: 1cedda3b6a8e480191a7a40a8dc33eb078fba58b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-28 21:01:12 +00:00
parent 62edeef69b
commit 069517201b
48 changed files with 181 additions and 50 deletions

View File

@ -273,11 +273,13 @@ namespace Mono.Btls
var cipher = (CipherSuiteCode)ssl.GetCipher ();
var protocol = (TlsProtocolCode)ssl.GetVersion ();
var serverName = ssl.GetServerName ();
Debug ("GET CONNECTION INFO: {0:x}:{0} {1:x}:{1} {2}", cipher, protocol, (TlsProtocolCode)protocol);
connectionInfo = new MonoTlsConnectionInfo {
CipherSuiteCode = cipher,
ProtocolVersion = GetProtocol (protocol)
ProtocolVersion = GetProtocol (protocol),
PeerDomainName = serverName
};
}
@ -361,7 +363,23 @@ namespace Mono.Btls
public override void Close ()
{
Debug ("Close!");
ssl.Dispose ();
if (ssl != null) {
ssl.Dispose ();
ssl = null;
}
if (ctx != null) {
ctx.Dispose ();
ctx = null;
}
if (bio != null) {
bio.Dispose ();
bio = null;
}
if (errbio != null) {
errbio.Dispose ();
errbio = null;
}
}
void Dispose<T> (ref T disposable)