Пример #1
0
        public SOSIFactory CreateSOSIFactory(X509Certificate2 cert)
        {
            GenericCredentialVault vault = new GenericCredentialVault();

            //Make sure certStore is cleaned for testing
            RemoveAllCerts(vault);

            //Add test certificate to vault
            X509Certificate2 newCert = cert;

            //newCert.FriendlyName = vault.ALIAS_SYSTEM;
            vault.AddTrustedCertificate(newCert);

            CredentialVaultSignatureProvider sigProvider = new CredentialVaultSignatureProvider(vault);
            SOSIFactory factory = new SOSIFactory(null, sigProvider);

            return(factory);
        }
Пример #2
0
        public void TestNullVault()
        {
            GenericCredentialVault vault = null;

            Assert.Throws <ArgumentException>(delegate { CredentialVaultSignatureProvider sigProvider = new CredentialVaultSignatureProvider(vault); });
        }