}
else
{
- this.Context.RecordProtocol.SendAlert(AlertDescription.ProtocolVersion);
-
- throw this.Context.CreateException("Incorrect protocol version received from server");
+ throw new TlsException(
+ AlertDescription.ProtocolVersion,
+ "Incorrect protocol version received from server");
}
}
if (this.Context.Cipher == null)
{
- this.Context.RecordProtocol.SendAlert(AlertDescription.InsuficientSecurity);
-
- throw this.Context.CreateException("Insuficient Security");
+ throw new TlsException(
+ AlertDescription.InsuficientSecurity,
+ "Insuficient Security");
}
}