Beispiel #1
0
 protected override void Dispose(bool disposing)
 {
     lock (this)
     {
         base.Dispose(disposing);
         KeyExchange?.Dispose();
         KeyExchange = null;
         _secretSchedule?.Dispose();
         _secretSchedule = null;
     }
 }
Beispiel #2
0
 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);
 }