Пример #1
0
        public void SwapCertTest()
        {
            X509 currentCert;
            X509 targetCert;
            List <CertificateClusterUpgradeStep> flow;

            GetCerts_Swap(out currentCert, out targetCert);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_Swap(currentCert.ClusterCertificate, targetCert.ClusterCertificate, flow);
        }
Пример #2
0
        public void ReplaceCertTest()
        {
            X509 currentCert;
            X509 targetCert;
            List <CertificateClusterUpgradeStep> flow;

            GetCerts_ReplaceThumbprint(out currentCert, out targetCert);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_ReplaceThumbprint(currentCert.ClusterCertificate, targetCert.ClusterCertificate, flow);

            GetCerts_ReplaceCn(out currentCert, out targetCert);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_ReplaceCn(currentCert.ClusterCertificateCommonNames, targetCert.ClusterCertificateCommonNames, flow);
        }
Пример #3
0
        public void CertTypeChangeTest()
        {
            X509 currentCert;
            X509 targetCert;
            List <CertificateClusterUpgradeStep> flow;

            // 1 thumbprint -> 1 cn
            GetCerts_TypeChange(out currentCert, out targetCert, 1, 0, 0, 1);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);

            // 1 thumbprint -> 2 cns
            GetCerts_TypeChange(out currentCert, out targetCert, 1, 0, 0, 2);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);

            // 2 thumbprint -> 1 cn
            GetCerts_TypeChange(out currentCert, out targetCert, 2, 0, 0, 1);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);

            // 2 thumbprint -> 2 cns
            GetCerts_TypeChange(out currentCert, out targetCert, 2, 0, 0, 2);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);

            // 1 cn -> 1 thumbprint
            GetCerts_TypeChange(out currentCert, out targetCert, 0, 1, 1, 0);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);

            // 1 cn -> 2 thumbprints
            GetCerts_TypeChange(out currentCert, out targetCert, 0, 1, 2, 0);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);

            // 2 cns -> 1 thumbprint
            GetCerts_TypeChange(out currentCert, out targetCert, 0, 2, 1, 0);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);

            // 2 cns -> 2 thumbprints
            GetCerts_TypeChange(out currentCert, out targetCert, 0, 2, 2, 0);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_TypeChange(currentCert, targetCert, flow);
        }
Пример #4
0
        public void AddCertTest()
        {
            X509 currentCert;
            X509 targetCert;
            List <CertificateClusterUpgradeStep> flow;

            GetCerts_AddThumbprint(out currentCert, out targetCert, addPrimary: true);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_AddThumbprint(currentCert.ClusterCertificate, targetCert.ClusterCertificate, flow);

            GetCerts_AddThumbprint(out currentCert, out targetCert, addPrimary: false);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_AddThumbprint(currentCert.ClusterCertificate, targetCert.ClusterCertificate, flow);

            GetCerts_AddCn(out currentCert, out targetCert, addCn1: true);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_AddCn(currentCert.ClusterCertificateCommonNames, targetCert.ClusterCertificateCommonNames, flow);

            GetCerts_AddCn(out currentCert, out targetCert, addCn1: false);
            flow = CertificateClusterUpgradeFlow.GetUpgradeFlow(currentCert, targetCert);
            VerifyFlow_AddCn(currentCert.ClusterCertificateCommonNames, targetCert.ClusterCertificateCommonNames, flow);
        }