File: README.md

package info (click to toggle)
wolfssl 5.8.4-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 117,604 kB
  • sloc: ansic: 1,584,954; asm: 481,206; sh: 11,586; cs: 6,596; xml: 3,878; perl: 3,291; makefile: 2,058; ada: 1,891; javascript: 748; python: 636; cpp: 131; ruby: 118; objc: 80; tcl: 73
file content (105 lines) | stat: -rw-r--r-- 2,357 bytes parent folder | download
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# wolfSSL CSharp Wrappers

This directory contains the CSharp wrapper for the wolfSSL TLS layer with examples.

* `wolfSSL_CSharp`: wolfSSL TLS layer wrappers (library).
* `wolfCrypt-Test`: wolfCrypt layer wrapper testing.
* `user_settings.h`: wolfCrypt wrapper user settings.

Examples:
* `wolfSSL-DTLS-PSK-Server`
* `wolfSSL-DTLS-Server`
* `wolfSSL-Example-IOCallbacks`
* `wolfSSL-TLS-Client`
* `wolfSSL-TLS-PSK-Client`
* `wolfSSL-TLS-PSK-Server`
* `wolfSSL-TLS-Server`
* `wolfSSL-TLS-ServerThreaded`

## Windows

A Visual Studio solution `wolfSSL_CSharp.sln` is provided. This will allow you
to build the wrapper library and examples. It includes the wolfSSL Visual Studio
project directly.

To successfully run and build the solution on Windows Visual Studio you will
need to open a new solution `wolfSSL_CSharp.sln` located in `wrapper\CSharp\wolfSSL_CSharp.sln`.

Select the CPU type, configuration, and target file.
select `Build` and either `Rebuild Solution` or `Build Solution`.

## Linux (Ubuntu) using mono

Prerequisites for linux:

```
apt-get update
apt-get upgrade
apt-get install mono-complete
```

### Build wolfSSL and install

```
./autogen.sh
cp wrapper/CSharp/user_settings.h .
./configure --enable-usersettings
make
make check
sudo make install
```

### Build and run the wolfCrypt test wrapper

From the `wrapper/CSharp` directory (`cd wrapper/CSharp`):

Compile wolfCrypt test:

```
mcs wolfCrypt-Test/wolfCrypt-Test.cs wolfSSL_CSharp/wolfCrypt.cs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs -OUT:wolfcrypttest.exe
mono wolfcrypttest.exe
```

### Build and run the wolfSSL client/server test

From the `wrapper/CSharp` directory (`cd wrapper/CSharp`):

Compile server:

```
mcs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs -OUT:server.exe
```

Compile client:

```
mcs wolfSSL_CSharp/wolfCrypt.cs wolfSSL-TLS-Client/wolfSSL-TLS-Client.cs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs -OUT:client.exe
```

#### Run the example

In one terminal instance run the server:

```
mono server.exe
```

And in another terminal instance run the client:

```
mono client.exe
```

#### Enabling SNI

To enable SNI, just pass the `-S` argument with the specified hostname to the client:

```
mono client.exe -S hostname
```

And run the server with the `-S` flag:

```
mono server.exe -S
```