summaryrefslogtreecommitdiffstats
blob: cdcb8a71abdaafe1ac1f13a835c3541bf009312a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "Swiften/StreamStack/PlatformTLSLayerFactory.h"

#include <cassert>

#ifdef HAVE_OPENSSL
#include "Swiften/StreamStack/OpenSSLLayer.h"
#endif

namespace Swift {

PlatformTLSLayerFactory::PlatformTLSLayerFactory() {
}

bool PlatformTLSLayerFactory::canCreate() const {
#ifdef HAVE_OPENSSL
	return true;
#else
	return false;
#endif
}

boost::shared_ptr<TLSLayer> PlatformTLSLayerFactory::createTLSLayer() {
#ifdef HAVE_OPENSSL
	return boost::shared_ptr<TLSLayer>(new OpenSSLLayer());
#else
	assert(false);
	return boost::shared_ptr<TLSLayer>();
#endif
}

}