Resolve memory leaks from make_SSLContext:

* Move into ssl functions that release the unique ptr
* Use string ref in make_SSLContext
* Resolve memory leaks
This commit is contained in:
seelabs
2017-07-19 21:06:28 -04:00
parent 7aa838c091
commit 397410bac6
2 changed files with 36 additions and 28 deletions

View File

@@ -28,15 +28,15 @@ namespace ripple {
/** Create a self-signed SSL context that allows anonymous Diffie Hellman. */
std::shared_ptr<boost::asio::ssl::context>
make_SSLContext(
std::string cipherList);
std::string const& cipherList);
/** Create an authenticated SSL context using the specified files. */
std::shared_ptr<boost::asio::ssl::context>
make_SSLContextAuthed (
std::string keyFile,
std::string certFile,
std::string chainFile,
std::string cipherList);
std::string const& keyFile,
std::string const& certFile,
std::string const& chainFile,
std::string const& cipherList);
}