static ResourceManager() { provider = DependencyInjector.Get <ICertificateProvider> (); cacertData = ResourceManager.ReadResource("CA.Hamiller-Tube-CA.pem"); cacert = provider.GetCertificateFromData(cacertData); hamillerTubeIMData = ResourceManager.ReadResource("CA.Hamiller-Tube-IM.pem"); hamillerTubeIM = provider.GetCertificateFromData(hamillerTubeIMData); serverCertNoKeyData = ResourceManager.ReadResource("CA.server-cert.pem"); serverCertNoKey = provider.GetCertificateFromData(serverCertNoKeyData); selfServerCertNoKeyData = ResourceManager.ReadResource("CA.server-self.pem"); selfServerCertNoKey = provider.GetCertificateFromData(selfServerCertNoKeyData); selfServerCert = provider.GetCertificateWithKey(ReadResource("CA.server-self.pfx"), "monkey"); serverCert = provider.GetCertificateWithKey(ReadResource("CA.server-cert.pfx"), "monkey"); invalidServerCert = provider.GetCertificateWithKey(ReadResource("CA.invalid-server-cert.pfx"), "monkey"); invalidClientCert = provider.GetCertificateWithKey(ReadResource("CA.invalid-client-cert.pfx"), "monkey"); invalidClientCaCert = provider.GetCertificateWithKey(ReadResource("CA.invalid-client-ca-cert.pfx"), "monkey"); invalidClientCertRsa512 = provider.GetCertificateWithKey(ReadResource("CA.client-cert-rsa512.pfx"), "monkey"); monkeyCert = provider.GetCertificateWithKey(ReadResource("CA.monkey.pfx"), "monkey"); penguinCert = provider.GetCertificateWithKey(ReadResource("CA.penguin.pfx"), "penguin"); serverCertRsaOnly = provider.GetCertificateWithKey(ReadResource("CA.server-cert-rsaonly.pfx"), "monkey"); serverCertDheOnly = provider.GetCertificateWithKey(ReadResource("CA.server-cert-dhonly.pfx"), "monkey"); invalidServerCertRsa512 = provider.GetCertificateWithKey(ReadResource("CA.server-cert-rsa512.pfx"), "monkey"); clientCertRsaOnly = provider.GetCertificateWithKey(ReadResource("CA.client-cert-rsaonly.pfx"), "monkey"); clientCertDheOnly = provider.GetCertificateWithKey(ReadResource("CA.client-cert-dheonly.pfx"), "monkey"); tlsTestXamDevExpiredData = ResourceManager.ReadResource("CA.tlstest-xamdev-expired.pem"); tlsTestXamDevExpired = provider.GetCertificateFromData(tlsTestXamDevExpiredData); tlsTestXamDevExpired2Data = ResourceManager.ReadResource("CA.tlstest-xamdev-expired2.pem"); tlsTestXamDevExpired2 = provider.GetCertificateFromData(tlsTestXamDevExpired2Data); tlsTestXamDevNewData = ResourceManager.ReadResource("CA.tlstest-xamdev-new.pem"); tlsTestXamDevNew = provider.GetCertificateFromData(tlsTestXamDevNewData); tlsTestXamDevNewCAData = ResourceManager.ReadResource("CA.tlstest-xamdev-new-ca.pem"); tlsTestXamDevNewCA = provider.GetCertificateFromData(tlsTestXamDevNewCAData); tlsTestXamDevOldCAData = ResourceManager.ReadResource("CA.tlstest-xamdev-old-ca.pem"); tlsTestXamDevOldCA = provider.GetCertificateFromData(tlsTestXamDevOldCAData); intermediateCAData = ResourceManager.ReadResource("CA.intermediate-ca.pem"); intermediateCA = provider.GetCertificateFromData(intermediateCAData); intermediateServerData = ResourceManager.ReadResource("CA.intermediate-server.pem"); intermediateServer = provider.GetCertificateWithKey(ResourceManager.ReadResource("CA.intermediate-server.pfx"), "monkey"); hamillerTubeCAInfo = new HamillerTubeCAData(cacertData); selfSignedServerInfo = new SelfSignedServerData(selfServerCertNoKeyData); tlsTestXamDevExpired2Info = new TlsTestXamDevExpired2Data(tlsTestXamDevExpired2Data); tlsTestXamDevNewInfo = new TlsTestXamDevNewData(tlsTestXamDevNewData); tlsTestXamDevExpiredInfo = new TlsTestXamDevExpiredData(tlsTestXamDevExpiredData); tlsTestXamDevOldCAInfo = new TlsTestXamDevOldCAData(tlsTestXamDevOldCAData); intermediateCAInfo = new IntermediateCAData(intermediateCAData); intermediateServerInfo = new IntermediateServerData(intermediateServerData); serverCertWithCAData = ResourceManager.ReadResource("CA.server-cert-with-ca.pfx"); serverCertWithCA = provider.GetCertificateWithKey(serverCertWithCAData, "monkey"); intermediateServerCertData = ResourceManager.ReadResource("CA.server-cert-im.pfx"); intermediateServerCert = provider.GetCertificateWithKey(intermediateServerCertData, "monkey"); intermediateServerCertNoKeyData = ResourceManager.ReadResource("CA.server-cert-im.pem"); intermediateServerCertNoKey = provider.GetCertificateFromData(intermediateServerCertNoKeyData); intermediateServerCertBareData = ResourceManager.ReadResource("CA.server-cert-im-bare.pfx"); intermediateServerCertBare = provider.GetCertificateWithKey(intermediateServerCertBareData, "monkey"); intermediateServerCertFullData = ResourceManager.ReadResource("CA.server-cert-im-full.pfx"); intermediateServerCertFull = provider.GetCertificateWithKey(intermediateServerCertFullData, "monkey"); trustedIMCAData = ResourceManager.ReadResource("CA.trusted-im-ca.pem"); trustedIMCA = provider.GetCertificateFromData(trustedIMCAData); serverCertTrustedIMBareData = ResourceManager.ReadResource("CA.server-cert-trusted-im-bare.pfx"); serverCertTrustedIMBare = provider.GetCertificateWithKey(serverCertTrustedIMBareData, "monkey"); serverCertTrustedIMData = ResourceManager.ReadResource("CA.server-cert-trusted-im.pfx"); serverCertTrustedIM = provider.GetCertificateWithKey(serverCertTrustedIMData, "monkey"); }