private X509Certificate2 ServerCertificate() { if (_serverCertificate == null) { byte[] bytes = Certificates.CreateSelfSignCertificate("CN=ssl-test.db4o.anywere, OU=db4o", DateTime.Now.AddDays(-1), DateTime.Now.AddDays(1), "db4o-ssl-test"); _serverCertificate = new X509Certificate2(bytes, "db4o-ssl-test"); } return(_serverCertificate); }