private void UpdateSecurityHeaderType(RdpbcgrServerSessionContext serverSessionContext, ref SecurityHeaderType securityHeaderType)
{
// Redirection PDU need to decrypt
if (serverSessionContext.RdpEncryptionLevel == EncryptionLevel.ENCRYPTION_LEVEL_LOW)
{
if (serverSessionContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_40BIT
|| serverSessionContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_56BIT
|| serverSessionContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_128BIT)
{
securityHeaderType = SecurityHeaderType.NonFips;
}
else if (serverSessionContext.RdpEncryptionMethod == EncryptionMethods.ENCRYPTION_METHOD_FIPS)
{
securityHeaderType = SecurityHeaderType.Fips;
}
else
{
securityHeaderType = SecurityHeaderType.None;
}
}
}