public static InstalledCertificateValidator Create(IList <X509Certificate2> certs)
        {
            var instance = new InstalledCertificateValidator(certs);

            instance.SetupCertificateValidation();
            return(instance);
        }
        private ICertificateValidator GetCertificateValidator(IList <X509Certificate2> certs)
        {
            if (certs.Count() != 0)
            {
                Debug.WriteLine("EdgeModuleClientFactory.GetCertificateValidator()");
                if (IsOSPlatform(OSPlatform.Windows))
                {
                    Debug.WriteLine("EdgeModuleClientFactory GetCertificateValidator on Windows");
                    var certValidator = CustomCertificateValidator.Create(certs, transportSettings);
                    return(certValidator);
                }
                else
                {
                    Debug.WriteLine("EdgeModuleClientFactory GetCertificateValidator on Linux");
                    var certValidator = InstalledCertificateValidator.Create(certs);
                    return(certValidator);
                }
            }

            return(NullCertificateValidator.Instance);
        }