internal string GetCipherString(bool FIPSmode, SslProtocols sslProtocols, SslStrength sslStrength)
{
string str = "";
if (FIPSmode || ((sslStrength & SslStrength.High) == SslStrength.High))
{
str = "HIGH";
}
if (FIPSmode || ((sslStrength & SslStrength.Medium) == SslStrength.Medium))
{
if (String.IsNullOrEmpty(str))
{
str = "MEDIUM";
}
else
{
str += ":MEDIUM";
}
}
if (!FIPSmode && ((sslStrength & SslStrength.Low) == SslStrength.Low))
{
if (String.IsNullOrEmpty(str))
{
str = "LOW";
}
else
{
str += ":LOW";
}
}
if ((sslProtocols == SslProtocols.Default) ||
(sslProtocols == SslProtocols.Tls10) ||
(sslProtocols == SslProtocols.Ssl3))
{
if (String.IsNullOrEmpty(str))
{
str = "!SSLv2";
}
else
{
str += ":!SSLv2";
}
}
if (FIPSmode)
{
str += ":AES:3DES:SHA:!DES:!MD5:!IDEA:!RC2:!RC4";
}
// Now format the return string
return String.Format("{0}:!ADH:!aNULL:!eNULL:@STRENGTH", str);
}