- OnRehash(user);
-
- ConfigReader Conf(ServerInstance);
-
- std::string confdir(ServerInstance->ConfigFileName);
- // +1 so we the path ends with a /
- confdir = confdir.substr(0, confdir.find_last_of('/') + 1);
-
- cafile = Conf.ReadValue("openssl", "cafile", 0);
- certfile = Conf.ReadValue("openssl", "certfile", 0);
- keyfile = Conf.ReadValue("openssl", "keyfile", 0);
- dhfile = Conf.ReadValue("openssl", "dhfile", 0);
-
- // Set all the default values needed.
- if (cafile.empty())
- cafile = "ca.pem";
-
- if (certfile.empty())
- certfile = "cert.pem";
-
- if (keyfile.empty())
- keyfile = "key.pem";
-
- if (dhfile.empty())
- dhfile = "dhparams.pem";
-
- // Prepend relative paths with the path to the config directory.
- if ((cafile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(cafile)))
- cafile = confdir + cafile;
-
- if ((certfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(certfile)))
- certfile = confdir + certfile;
-
- if ((keyfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(keyfile)))
- keyfile = confdir + keyfile;
+ X509* cert;
+ ssl_cert* certinfo = new ssl_cert;
+ session->cert = certinfo;
+ unsigned int n;
+ unsigned char md[EVP_MAX_MD_SIZE];