blob: e2202f46c3b42d3d5919e699cf1031431b789f20 (
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#pragma once
#include <forstio/common.hpp>
#include <forstio/io/io.hpp>
#include <optional>
#include <variant>
namespace saw {
namespace net {
template<typename T = net::Os>
struct Tls {};
}
class tls;
/**
* tls context class.
* Provides tls network class which ensures the usage of tls encrypted connections
*/
class tls {
private:
class impl;
own<impl> impl_;
public:
tls();
~tls();
struct version {
struct tls_1_0{};
struct tls_1_1{};
struct tls_1_2{};
};
struct options {
public:
version version;
};
impl &get_impl();
private:
options options_;
};
template<>
class network<net::Tls> {
};
template<typename T = net::Os>
error_or<own<network<net::Tls<T>>>> setup_tls_network(network<T> &network);
} // namespace saw
|