public void ServiceModelLoadResourceCertificates() { using (X509CertificateLoader loader = new X509CertificateLoader(GetType(), "Tasty.Test.TastyClient.cer")) { Assert.IsNotNull(loader.LoadCertificate()); } using (X509CertificateLoader loader = new X509CertificateLoader(GetType(), "Tasty.Test.TastyClient.pfx", "tastyclient")) { Assert.IsNotNull(loader.LoadCertificate()); } using (X509CertificateLoader loader = new X509CertificateLoader(GetType(), "Tasty.Test.TastyServer.pfx", "tastyserver")) { Assert.IsNotNull(loader.LoadCertificate()); } }
public void ServiceModelLoadFileSystemCertificates() { using (X509CertificateLoader loader = new X509CertificateLoader(Path.GetFullPath("TastyClient.cer"))) { Assert.IsNotNull(loader.LoadCertificate()); } using (X509CertificateLoader loader = new X509CertificateLoader(Path.GetFullPath("TastyClient.pfx"), "tastyclient")) { Assert.IsNotNull(loader.LoadCertificate()); } using (X509CertificateLoader loader = new X509CertificateLoader(Path.GetFullPath("TastyServer.pfx"), "tastyserver")) { Assert.IsNotNull(loader.LoadCertificate()); } }