示例#1
0
        public void builds_with_partial_chain()
        {
            var chainStatus = CertificateUtils.BuildChain(
                _leaf,
                new X509Certificate2Collection(_intermediate),
                new X509Certificate2Collection());

            Assert.True(chainStatus == X509ChainStatusFlags.PartialChain);
        }
示例#2
0
        public void builds_with_no_error()
        {
            var chainStatus = CertificateUtils.BuildChain(
                _leaf,
                new X509Certificate2Collection(),
                new X509Certificate2Collection(_root));

            Assert.True(chainStatus == X509ChainStatusFlags.NoError);
        }
示例#3
0
        public void builds_with_not_time_valid()
        {
            var chainStatus = CertificateUtils.BuildChain(
                _leaf,
                new X509Certificate2Collection(_intermediate),
                new X509Certificate2Collection(_root));

            Assert.True(chainStatus == X509ChainStatusFlags.NotTimeValid);
        }
示例#4
0
        public void builds_with_untrusted_root()
        {
            var chainStatus = CertificateUtils.BuildChain(
                _leaf,
                new X509Certificate2Collection(new [] { _intermediate, _root }),
                new X509Certificate2Collection());

            Assert.True(chainStatus == X509ChainStatusFlags.UntrustedRoot);
        }