forked from wolfSSL/wolfssl
made the workflow to compile & executes easier, updated the readme also
This commit is contained in:
@ -42,40 +42,44 @@ sudo make install
|
||||
|
||||
### Build and run the wrapper
|
||||
|
||||
From the wolfssl root directory:
|
||||
|
||||
```
|
||||
cd wrapper/CSharp
|
||||
```
|
||||
|
||||
Building the server:
|
||||
Compile server:
|
||||
|
||||
```
|
||||
mcs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs \
|
||||
wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs && \
|
||||
cp wolfSSL_CSharp/wolfSSL.exe ../../certs/server.exe
|
||||
wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs -OUT:server.exe
|
||||
```
|
||||
|
||||
Building the client:
|
||||
Compile client:
|
||||
|
||||
```
|
||||
mcs wolfSSL_CSharp/wolfSSL.cs wolfSSL_CSharp/X509.cs \
|
||||
wolfSSL-TLS-Server/wolfSSL-TLS-Server.cs && \
|
||||
cp wolfSSL_CSharp/wolfSSL.exe ../../certs/client.exe
|
||||
wolfSSL-TLS-Client/wolfSSL-TLS-Client.cs -OUT:client.exe
|
||||
```
|
||||
|
||||
### Run the example
|
||||
|
||||
In one terminal instance run:
|
||||
In one terminal instance run the server:
|
||||
|
||||
```
|
||||
cd ../../certs
|
||||
mono server.exe
|
||||
```
|
||||
|
||||
And in another terminal instance run:
|
||||
And in another terminal instance run the client:
|
||||
|
||||
```
|
||||
cd ../../certs
|
||||
mono client.exe
|
||||
```
|
||||
|
||||
### Enabling SNI
|
||||
|
||||
To enable SNI, just pass the `-S` argument with the specified hostname:
|
||||
|
||||
```
|
||||
mono client.exe -S hostname
|
||||
```
|
||||
|
@ -88,7 +88,7 @@ public class wolfSSL_TLS_Client
|
||||
IntPtr sniHostName;
|
||||
|
||||
/* These paths should be changed for use */
|
||||
string caCert = @"ca-cert.pem";
|
||||
string caCert = @"../../certs/ca-cert.pem";
|
||||
StringBuilder dhparam = new StringBuilder("dh2048.pem");
|
||||
|
||||
StringBuilder buff = new StringBuilder(1024);
|
||||
|
@ -88,8 +88,8 @@ public class wolfSSL_TLS_CSHarp
|
||||
IntPtr arg_sni;
|
||||
|
||||
/* These paths should be changed for use */
|
||||
string fileCert = @"server-cert.pem";
|
||||
string fileKey = @"server-key.pem";
|
||||
string fileCert = @"../../certs/server-cert.pem";
|
||||
string fileKey = @"../../certs/server-key.pem";
|
||||
StringBuilder dhparam = new StringBuilder("dh2048.pem");
|
||||
|
||||
StringBuilder buff = new StringBuilder(1024);
|
||||
|
Reference in New Issue
Block a user