summaryrefslogtreecommitdiff
path: root/modules/io-tls/tls.hpp
blob: a04598db4bedfa7ad6fb468a8497776a8e13d1ea (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
#pragma once

#include <forstio/common.hpp>
#include <forstio/io/io.hpp>

#include <optional>
#include <variant>

namespace saw {
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_;
};

std::optional<own<tls_network>> setup_tls_network(network &network);

} // namespace saw