summaryrefslogtreecommitdiffstats
path: root/src/HTTPServer/HTTPServer.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-01 15:21:41 +0200
committermadmaxoft <github@xoft.cz>2014-05-01 15:21:41 +0200
commit1587b21edded56dbfb88150500336c2853b460c6 (patch)
tree544cd9d1aece0e7902739b30a75e372506d775fa /src/HTTPServer/HTTPServer.cpp
parentFixed crashes in the SSL HTTP connection. (diff)
downloadcuberite-1587b21edded56dbfb88150500336c2853b460c6.tar
cuberite-1587b21edded56dbfb88150500336c2853b460c6.tar.gz
cuberite-1587b21edded56dbfb88150500336c2853b460c6.tar.bz2
cuberite-1587b21edded56dbfb88150500336c2853b460c6.tar.lz
cuberite-1587b21edded56dbfb88150500336c2853b460c6.tar.xz
cuberite-1587b21edded56dbfb88150500336c2853b460c6.tar.zst
cuberite-1587b21edded56dbfb88150500336c2853b460c6.zip
Diffstat (limited to 'src/HTTPServer/HTTPServer.cpp')
-rw-r--r--src/HTTPServer/HTTPServer.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/HTTPServer/HTTPServer.cpp b/src/HTTPServer/HTTPServer.cpp
index 9e3e0a17b..c45044c66 100644
--- a/src/HTTPServer/HTTPServer.cpp
+++ b/src/HTTPServer/HTTPServer.cpp
@@ -124,17 +124,17 @@ class cDebugCallbacks :
cHTTPServer::cHTTPServer(void) :
m_ListenThreadIPv4(*this, cSocket::IPv4, "WebServer IPv4"),
m_ListenThreadIPv6(*this, cSocket::IPv6, "WebServer IPv6"),
- m_Callbacks(NULL),
- m_Cert(new cX509Cert),
- m_CertPrivKey(new cPublicKey)
+ m_Callbacks(NULL)
{
AString CertFile = cFile::ReadWholeFile("webadmin/httpscert.crt");
AString KeyFile = cFile::ReadWholeFile("webadmin/httpskey.pem");
if (!CertFile.empty() && !KeyFile.empty())
{
+ m_Cert.reset(new cX509Cert);
int res = m_Cert->Parse(CertFile.data(), CertFile.size());
if (res == 0)
{
+ m_CertPrivKey.reset(new cCryptoKey);
int res2 = m_CertPrivKey->ParsePrivate(KeyFile.data(), KeyFile.size(), "");
if (res2 != 0)
{