Ejemplo n.º 1
0
        public void builds_with_partial_chain()
        {
            var chainStatus = CertificateUtils.BuildChain(
                _leaf,
                new X509Certificate2Collection(_intermediate),
                new X509Certificate2Collection());

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

            Assert.True(chainStatus == X509ChainStatusFlags.NoError);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }