AaltoTLS.PluginInterface.ProtocolVersion.ToString C# (CSharp) Method

ToString() public method

public ToString ( ) : string
return string
        public override string ToString()
        {
            string ret;

            if (this == ProtocolVersion.NULL) {
                ret = "NULL";
            } else if (this < ProtocolVersion.TLS1_0) {
                ret = "SSLv" + this.Major + "." + this.Minor;
            } else if (this.Major == 3) {
                ret = "TLSv1." + (this.Minor - 1);
            } else if (!this.IsUsingDatagrams) {
                ret = "TLSv" + (this.Major - 2) + "." + this.Minor;
            } else {
                ret = "DTLSv" + (255 - this.Major) + "." + (255 - this.Minor);
            }

            return ret;
        }