summaryrefslogtreecommitdiffstats
path: root/src/Net
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-09-27 23:51:34 +0200
committerMatthias Schiffer <matthias@gamezock.de>2009-09-27 23:51:34 +0200
commita7a285eb61dd83afc892bc1d64ffe14b9f1426a3 (patch)
tree08d2efcaec46e5f5702d9e336a0e8ba7e636aff9 /src/Net
parentb40ba0cf91603b695f1f2380cbd39966a458f22f (diff)
downloadmad-a7a285eb61dd83afc892bc1d64ffe14b9f1426a3.tar
mad-a7a285eb61dd83afc892bc1d64ffe14b9f1426a3.zip
Completely migrate to Unicode String class
Diffstat (limited to 'src/Net')
-rw-r--r--src/Net/Listener.cpp6
-rw-r--r--src/Net/Listener.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/src/Net/Listener.cpp b/src/Net/Listener.cpp
index a67e608..3d7088f 100644
--- a/src/Net/Listener.cpp
+++ b/src/Net/Listener.cpp
@@ -80,7 +80,7 @@ void Listener::handleDisconnect(boost::shared_ptr<Connection> con) {
}
-Listener::Listener(Core::Application *application0, const std::string &x905CertFile0, const std::string &x905KeyFile0,
+Listener::Listener(Core::Application *application0, const Core::String &x905CertFile0, const Core::String &x905KeyFile0,
const boost::asio::ip::tcp::endpoint &address0) throw(Core::Exception)
: application(application0), x905CertFile(x905CertFile0), x905KeyFile(x905KeyFile0), address(address0),
context(new boost::asio::ssl::context(application->getIOService(), boost::asio::ssl::context::sslv23)),
@@ -89,8 +89,8 @@ acceptor(application->getIOService(), address), signal(application)
context->set_options(boost::asio::ssl::context::default_workarounds
| boost::asio::ssl::context::no_sslv2
| boost::asio::ssl::context::single_dh_use);
- context->use_certificate_chain_file(x905CertFile);
- context->use_private_key_file(x905KeyFile, boost::asio::ssl::context::pem);
+ context->use_certificate_chain_file(x905CertFile.toLocale());
+ context->use_private_key_file(x905KeyFile.toLocale(), boost::asio::ssl::context::pem);
accept();
}
diff --git a/src/Net/Listener.h b/src/Net/Listener.h
index 598ea2f..46ad4f2 100644
--- a/src/Net/Listener.h
+++ b/src/Net/Listener.h
@@ -23,7 +23,6 @@
#include "export.h"
#include <map>
-#include <string>
#include "Connection.h"
#include <Core/Exception.h>
@@ -37,7 +36,7 @@ class MAD_NET_EXPORT Listener : private boost::noncopyable {
boost::mutex mutex;
- std::string x905CertFile, x905KeyFile;
+ Core::String x905CertFile, x905KeyFile;
boost::asio::ip::tcp::endpoint address;
boost::shared_ptr<boost::asio::ssl::context> context;
boost::asio::ip::tcp::acceptor acceptor;
@@ -53,7 +52,7 @@ class MAD_NET_EXPORT Listener : private boost::noncopyable {
void handleDisconnect(boost::shared_ptr<Connection> con);
public:
- Listener(Core::Application *application0, const std::string &x905CertFile0, const std::string &x905KeyFile0,
+ Listener(Core::Application *application0, const Core::String &x905CertFile0, const Core::String &x905KeyFile0,
const boost::asio::ip::tcp::endpoint &address0) throw(Core::Exception);
virtual ~Listener();