-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
49 lines (30 loc) · 1.07 KB
/
README
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
-------------------------------------------------------------------------------
Secure connection
-------------------------------------------------------------------------------
1. Init
-------
1. To wrap existing non-encrypted connection into encrypted one (TLS) use
one of SecureConnectionCreate() functions family.
Input non-encrypted connection can be defined as:
- FD pair
- socket
- {read, write} callbacks
2. To start TLS session:
------------------------
Server needs:
- certificate file (cert parameter)
- private key file (privKey paramter)
Client needs:
- nothing (cert and privKey parameters should be NULL)
3. Server skeleton code:
------------------------
sc = SecureConnectionCreate(SECURE_INTENT_SERVER, ..., cert, privateKey);
sc -> read(...);
sc -> write(...);
sc -> release();
4. Client skeleton code:
------------------------
sc = SecureConnectionCreate(SECURE_INTENT_CLIENT, ..., NULL, NULL);
sc -> write(...);
sc -> read(...);
sc -> release();