Пример #1
0
        public MqttClientOptionsBuilder WithTls()
        {
            _tlsOptions = new MqttClientTlsOptions
            {
                UseTls = true
            };

            return(this);
        }
Пример #2
0
        public MqttClientOptionsBuilder WithTls(
            bool allowUntrustedCertificates        = false,
            bool ignoreCertificateChainErrors      = false,
            bool ignoreCertificateRevocationErrors = false,
            params byte[][] certificates)
        {
            _tlsOptions = new MqttClientTlsOptions
            {
                UseTls = true,
                AllowUntrustedCertificates        = allowUntrustedCertificates,
                IgnoreCertificateChainErrors      = ignoreCertificateChainErrors,
                IgnoreCertificateRevocationErrors = ignoreCertificateRevocationErrors,
                Certificates = certificates.ToList()
            };

            return(this);
        }