static SecureTransportContext()

in src/NMS.AMQP/Transport/SecureTransportContext.cs [45:82]


        static SecureTransportContext()
        {
            const string Default = "Default";
            const string None = "None";
            SupportedProtocols = new List<string>();
            SupportedProtocolValues = new Dictionary<string, int>();
            foreach (string name in Enum.GetNames(typeof(System.Security.Authentication.SslProtocols)))
            {
                if (name.Equals(Default, StringComparison.CurrentCultureIgnoreCase) ||
                   name.Equals(None, StringComparison.CurrentCultureIgnoreCase))
                {
                    // ignore
                }
                else
                {
                    SupportedProtocols.Add(name);
                }

            }
            foreach (int value in Enum.GetValues(typeof(System.Security.Authentication.SslProtocols)))
            {
                SslProtocols p = (System.Security.Authentication.SslProtocols)value;
                if (p.Equals(SslProtocols.Default) ||
                   p.Equals(SslProtocols.None))
                {
                    // ignore
                }
                else 
                {
                    string name = ((SslProtocols)value).ToString().ToLower();
                    SupportedProtocolValues.Add(name, value);
                }
            }
            if (Tracer.IsDebugEnabled)
            {
                Tracer.DebugFormat("Supported SSL protocols list {0}", Util.PropertyUtil.ToString(SupportedProtocols));
            }
        }