blob: bb1abf1037243ff906b1e96762f0a449635431b1 (
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
32
33
34
|
#include "Swiften/StreamStack/PlatformTLSLayerFactory.h"
#include <cassert>
#ifdef HAVE_SWIFTEN_CONFIG_H
#include "Swiften/config.h"
#endif
#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
}
TLSLayer* PlatformTLSLayerFactory::createTLSLayer() {
#ifdef HAVE_OPENSSL
return new OpenSSLLayer();
#else
assert(false);
return 0;
#endif
}
}
|