Changeset - 9275aa8c8e2b
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-06-16 15:51:10
hanzz.k@gmail.com
TLSServerContextFactory
1 file changed with 5 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/transport.cpp
Show inline comments
 
@@ -22,12 +22,15 @@
 
#include <boost/bind.hpp>
 
#include "transport/storagebackend.h"
 
#include "transport/factory.h"
 
#include "discoinforesponder.h"
 
#include "discoitemsresponder.h"
 
#include "storageparser.h"
 
#include "Swiften/TLS/OpenSSL/OpenSSLServerContext.h"
 
#include "Swiften/TLS/PKCS12Certificate.h"
 
#include "Swiften/TLS/OpenSSL/OpenSSLServerContextFactory.h"
 

	
 
using namespace Swift;
 
using namespace boost;
 

	
 
namespace Transport {
 

	
 
@@ -65,12 +68,14 @@ Component::Component(Swift::EventLoop *loop, Config *config, Factory *factory) {
 
	m_reconnectTimer = m_factories->getTimerFactory()->createTimer(1000);
 
	m_reconnectTimer->onTick.connect(bind(&Component::connect, this)); 
 

	
 
	if (CONFIG_BOOL(m_config, "service.server_mode")) {
 
		m_userRegistry = new MyUserRegistry(this);
 
		m_server = new Swift::Server(loop, m_factories, m_userRegistry, m_jid, CONFIG_INT(m_config, "service.port"));
 
		TLSServerContextFactory *f = new OpenSSLServerContextFactory();
 
// 		m_server->addTLSEncryption(f, PKCS12Certificate("localhost.p12", createSafeByteArray("")));
 
		m_server->start();
 
		m_stanzaChannel = m_server->getStanzaChannel();
 
		m_iqRouter = m_server->getIQRouter();
 

	
 
		m_server->addPayloadParserFactory(new GenericPayloadParserFactory<StorageParser>("private", "jabber:iq:private"));
 

	
0 comments (0 inline, 0 general)