コード例 #1
0
        // For testing purposes only.
        internal static bool TryCreate(IReadOnlyList <string> probePaths, out SystemCertificateBundleX509ChainFactory factory)
        {
            factory = null;

            foreach (string probePath in probePaths)
            {
                if (TryImportFromPemFile(probePath, out X509Certificate2Collection certificates) &&
                    certificates.Count > 0)
                {
                    factory = new SystemCertificateBundleX509ChainFactory(certificates, probePath);

                    return(true);
                }
            }

            return(false);
        }
コード例 #2
0
 internal static bool TryCreate(out SystemCertificateBundleX509ChainFactory factory)
 {
     return(TryCreate(ProbePaths, out factory));
 }