protected override void Dispose(bool disposing) { lock (this) { base.Dispose(disposing); KeyExchange?.Dispose(); KeyExchange = null; _secretSchedule?.Dispose(); _secretSchedule = null; } }
private bool HandleClientHello(ReadableBuffer messageBuffer) { _secretSchedule = new SecretSchedule12(this); var helloParser = new ClientHelloParser(messageBuffer, Connection); var version = GetVersion(ref helloParser); if (version != TlsVersion.Tls12) { Alerts.AlertException.ThrowAlert(Alerts.AlertLevel.Fatal, Alerts.AlertDescription.protocol_version, "Invalid protocol version"); } return HandleClientHello(ref helloParser); }