/*++
* ProcessHandshakeSuccess -
* Called on successful completion of Handshake -
* used to set header/trailer sizes for encryption use
*
* Fills in the information about established protocol
* --*/
internal void ProcessHandshakeSuccess()
{
GlobalLog.Enter("SecureChannel#" + Logging.HashString(this) + "::ProcessHandshakeSuccess");
StreamSizes streamSizes;
SslStreamPal.QueryContextStreamSizes(_securityContext, out streamSizes);
if (streamSizes != null)
{
try
{
_headerSize = streamSizes.header;
_trailerSize = streamSizes.trailer;
_maxDataSize = checked (streamSizes.maximumMessage - (_headerSize + _trailerSize));
}
catch (Exception e)
{
if (!ExceptionCheck.IsFatal(e))
{
GlobalLog.Assert(false, "SecureChannel#" + Logging.HashString(this) + "::ProcessHandshakeSuccess", "StreamSizes out of range.");
}
throw;
}
}
SslStreamPal.QueryContextConnectionInfo(_securityContext, out _connectionInfo);
GlobalLog.Leave("SecureChannel#" + Logging.HashString(this) + "::ProcessHandshakeSuccess");
}